YUMI(NSIS)软件界面模糊处理(用SetProcessDp

2019-05-12  本文已影响0人  storyteller_F

步骤

  1. 下载YUMI的源码,解压打开,打开YUMI-Readme.txt 文件,下面是从中截取的片段

YUMI is an easy to use Multiboot script created using NSIS

所以YUMI是用NSIS制作的。

  1. 首先 了解NSIS是什么。这是一个用来快捷创建安装程序,一般安装程序的功能就是解压,粘贴,修改部分文件,添加注册表什么的(或者还有我不知道的😄)。所以什么安装程序,安装向导好多都是用NSIS 做的(虽然我在以前并没有了解过😄)。
  2. 那么编辑YUMI的代码,然后重新编译就可以了。

!define: "TBM_SETPOS" already defined!

很显然出错了

!undef TBM_SETPOS
  !define TBM_SETPOS 0x0405

!undef TBM_GETPOS
  !define TBM_GETPOS 0x0400

!undef TBM_SETRANGEMIN
  !define TBM_SETRANGEMIN 0x0407

!undef TBM_SETRANGEMAX
  !define TBM_SETRANGEMAX 0x0408

或者

!ifndef TBM_SETPOS
  !define TBM_SETPOS 0x0405
!endif
!ifndefTBM_GETPOS
  !define TBM_GETPOS 0x0400
!endif
!ifndefTBM_SETRANGEMIN
  !define TBM_SETRANGEMIN 0x0407
!endif
!ifndefTBM_SETRANGEMAX
  !define TBM_SETRANGEMAX 0x0408
!endif

这样编译就能够通过了

; --- Stuff to do at startup of script ---
Function .onInit
;在这里添加

添加后是这样的

; --- Stuff to do at startup of script ---
Function .onInit
System::Call 'SHCore::SetProcessDpiAwareness(i 2)i.R0'

添加的内容是调用了一个Windows Api ,关于这个Api SetProcessDpiAwareness,这里是我参考的博客 NSIS对高分屏的支持以及解决方案
关于System::Call 的有关信息可以到NSIS 的用户手册中查看

上一篇下一篇

猜你喜欢

热点阅读