0
我需要在安裝前向用戶詢問幾條路徑,但我無法在NSIS中完成。好像我的代碼犯規在MUI得到引用:NSIS中的多個路徑。代碼不會被執行
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico""
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
!define MUI_CUSTOMPAGECOMMANDS
!define MUI_DIRECTORYPAGE
!define MUI_CUSTOMFUNCTION_COMPONENTS_LEAVE ComponentPost
!define MUI_CUSTOMFUNCTION_DIRECTORY_SHOW DirectoryShow
!define MUI_CUSTOMFUNCTION_DIRECTORY_LEAVE DirectoryLeave
而且在編譯我得到
install function "ComponentPost" not referenced - zeroing code (0-2) out
install function "DirectoryShow" not referenced - zeroing code (2-49) out
install function "DirectoryLeave" not referenced - zeroing code (49-61) out
顯然,這三個函數的代碼犯規得到執行
iirc,MUI_ DIRECTORYPAGE是MUI 1.x的語法,您仍然可以在nsis wiki上找到它的許多實例 – idleberg 2013-04-09 12:09:33