使用NSIS更改FINISH_UNPAGE中的左图像?

时间:2014-12-13 10:20:51

标签: nsis

是否可以仅在FINISH_UNPAGE中更改左侧的图像bmp? 谢谢!

示例是:

finish

我只需要在此窗口中更改图像" FINISH_UNPAGE"。

1 个答案:

答案 0 :(得分:1)

MUI_UNWELCOMEFINISHPAGE_BITMAP通常是您所需要的,但您可以在合适的时间覆盖位图文件进行更改。

!include MUI2.nsh
InstallDir $temp\example
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\orange.bmp" ; This sets the image for the uninstallers Welcome AND Finish pages which is usually what you want.

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_WELCOME
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_PRE un.overrideunfinishbmp
!insertmacro MUI_UNPAGE_FINISH
!insertmacro MUI_LANGUAGE "English"

Function un.overrideunfinishbmp 
File "/oname=$PLUGINSDIR\modern-wizard.bmp" "${NSISDIR}\Contrib\Graphics\Wizard\nullsoft.bmp"
FunctionEnd

Section
SetOutPath "$InstDir"
WriteUninstaller "$InstDir\Uninstall.exe"
SectionEnd

Section Uninstall
Delete "$InstDir\Uninstall.exe"
RMDir "$InstDir"
SectionEnd