macro system updates
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1569 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fd2f12a759
commit
ce7c1170c6
2 changed files with 164 additions and 78 deletions
|
@ -191,6 +191,8 @@
|
|||
|
||||
!macro MUI_GUIINIT
|
||||
|
||||
!verbose 3
|
||||
|
||||
Push ${MUI_TEMP1}
|
||||
Push ${MUI_TEMP2}
|
||||
|
||||
|
@ -211,6 +213,98 @@
|
|||
Pop ${MUI_TEMP2}
|
||||
Pop ${MUI_TEMP1}
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PAGECOMMANDS
|
||||
|
||||
!verbose 3
|
||||
|
||||
!insertmacro MUI_PAGECOMMAND_LICENSE
|
||||
!insertmacro MUI_PAGECOMMAND_COMPONENTS
|
||||
!insertmacro MUI_PAGECOMMAND_DIRECTORY
|
||||
!insertmacro MUI_PAGECOMMAND_INSTFILES
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PAGECOMMAND_LICENSE
|
||||
|
||||
!verbose 3
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
Page license SetLicense SetLicenseDialog
|
||||
!endif
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PAGECOMMAND_COMPONENTS
|
||||
|
||||
!verbose 3
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
Page components SetComponents SetComponentsDialog
|
||||
!endif
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PAGECOMMAND_DIRECTORY
|
||||
|
||||
!verbose 3
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
Page directory SetDirectory SetDirectoryDialog
|
||||
!endif
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_PAGECOMMAND_INSTFILES
|
||||
|
||||
!verbose 3
|
||||
|
||||
Page instfiles SetInstFiles
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNPAGECOMMANDS
|
||||
|
||||
!verbose 3
|
||||
|
||||
!insertmacro MUI_UNPAGECOMMAND_CONFIRM
|
||||
!insertmacro MUI_UNPAGECOMMAND_INSTFILES
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNPAGECOMMAND_CONFIRM
|
||||
|
||||
!verbose 3
|
||||
|
||||
UninstPage uninstConfirm un.SetUninstConfirm
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNPAGECOMMAND_INSTFILES
|
||||
|
||||
!verbose 3
|
||||
|
||||
UninstPage instfiles un.SetInstFiles
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
;--------------------------------
|
||||
|
@ -307,6 +401,28 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_FUNCTIONS_PAGES
|
||||
|
||||
!verbose 3
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
!insertmacro MUI_FUNCTIONS_LICENSEPAGE SetLicense SetLicenseDialog
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
!insertmacro MUI_FUNCTIONS_COMPONENTSPAGE SetComponents SetComponentsDialog
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
!insertmacro MUI_FUNCTIONS_DIRECTORYPAGE SetDirectory SetDirectoryDialog
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_INSTFILESPAGE SetInstFiles
|
||||
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_FUNCTIONS_LICENSEPAGE SETLICENSE SETLICENSEDIALOG
|
||||
|
||||
!verbose 3
|
||||
|
@ -394,9 +510,11 @@
|
|||
|
||||
!verbose 3
|
||||
|
||||
Function .onUserAbort
|
||||
!insertmacro MUI_ABORTWARNING
|
||||
FunctionEnd
|
||||
!ifdef MUI_ABORTWARNING
|
||||
Function .onUserAbort
|
||||
!insertmacro MUI_ABORTWARNING
|
||||
FunctionEnd
|
||||
!endif
|
||||
|
||||
!verbose 4
|
||||
|
||||
|
@ -414,6 +532,13 @@
|
|||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNFUNCTIONS_PAGES
|
||||
|
||||
!insertmacro MUI_UNFUNCTIONS_CONFIRMPAGE un.SetUninstConfirm
|
||||
!insertmacro MUI_UNFUNCTIONS_INSTFILESPAGE un.SetInstFiles
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNFUNCTIONS_CONFIRMPAGE UNSETUNINSTCONFIRM
|
||||
|
||||
!verbose 3
|
||||
|
@ -445,30 +570,22 @@
|
|||
|
||||
!verbose 3
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
Page license SetLicense SetLicenseDialog
|
||||
!insertmacro MUI_FUNCTIONS_LICENSEPAGE SetLicense SetLicenseDialog
|
||||
!endif
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
Page components SetComponents SetComponentsDialog
|
||||
!insertmacro MUI_FUNCTIONS_COMPONENTSPAGE SetComponents SetComponentsDialog
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
Page directory SetDirectory SetDirectoryDialog
|
||||
!insertmacro MUI_FUNCTIONS_DIRECTORYPAGE SetDirectory SetDirectoryDialog
|
||||
!endif
|
||||
|
||||
Page instfiles SetInstFiles
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_INSTFILESPAGE SetInstFiles
|
||||
|
||||
!insertmacro MUI_PAGECOMMANDS
|
||||
!insertmacro MUI_FUNCTIONS_PAGES
|
||||
!insertmacro MUI_FUNCTIONS_GUIINIT
|
||||
!insertmacro MUI_FUNCTIONS_ABORTWARNING
|
||||
|
||||
!ifdef MUI_ABORTWARNING
|
||||
!insertmacro MUI_FUNCTIONS_ABORTWARNING
|
||||
!endif
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_FUNCTIONS_CUSTOMPAGE_BASIC
|
||||
|
||||
!verbose 3
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_PAGES
|
||||
!insertmacro MUI_FUNCTIONS_GUIINIT
|
||||
!insertmacro MUI_FUNCTIONS_ABORTWARNING
|
||||
|
||||
!verbose 4
|
||||
|
||||
|
@ -478,12 +595,19 @@
|
|||
|
||||
!verbose 3
|
||||
|
||||
UninstPage uninstConfirm un.SetUninstConfirm
|
||||
UninstPage instfiles un.SetInstFiles
|
||||
!insertmacro MUI_UNPAGECOMMANDS
|
||||
!insertmacro MUI_UNFUNCTIONS_PAGES
|
||||
!insertmacro MUI_UNFUNCTIONS_GUIINIT
|
||||
|
||||
!insertmacro MUI_UNFUNCTIONS_CONFIRMPAGE un.SetUninstConfirm
|
||||
!insertmacro MUI_UNFUNCTIONS_INSTFILESPAGE un.SetInstFiles
|
||||
!verbose 4
|
||||
|
||||
!macroend
|
||||
|
||||
!macro MUI_UNFUNCTIONS_CUSTOMPAGE_BASIC
|
||||
|
||||
!verbose 3
|
||||
|
||||
!insertmacro MUI_UNFUNCTIONS_PAGES
|
||||
!insertmacro MUI_UNFUNCTIONS_GUIINIT
|
||||
|
||||
!verbose 4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;NSIS Modern User Interface version 1.4
|
||||
;Advanced Macro System & Install Options Example Script
|
||||
;Install Options Example Script
|
||||
;Written by Joost Verburg
|
||||
|
||||
!define NAME "Test Software" ;Define your own software name here
|
||||
|
@ -30,19 +30,13 @@
|
|||
Name "${NAME} ${VERSION}"
|
||||
|
||||
;Page order
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
Page license SetLicense SetLicenseDialog
|
||||
!endif
|
||||
!insertmacro MUI_PAGECOMMAND_LICENSE
|
||||
Page custom SetCustomA
|
||||
Page custom SetCustomB
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
Page components SetComponents SetComponentsDialog
|
||||
!endif
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
Page directory SetDirectory SetDirectoryDialog
|
||||
!endif
|
||||
!insertmacro MUI_PAGECOMMAND_COMPONENTS
|
||||
!insertmacro MUI_PAGECOMMAND_DIRECTORY
|
||||
Page custom SetCustomC
|
||||
Page instfiles SetInstFiles
|
||||
!insertmacro MUI_PAGECOMMAND_INSTFILES
|
||||
|
||||
!insertmacro MUI_INTERFACE
|
||||
|
||||
|
@ -62,8 +56,8 @@
|
|||
LangString TEXT_IO_SUBTITLE ${LANG_ENGLISH} "Create your own dialog!"
|
||||
|
||||
;Uninstaller
|
||||
UninstPage uninstConfirm un.SetUninstConfirm
|
||||
UninstPage instfiles un.SetInstFiles
|
||||
!insertmacro MUI_UNPAGECOMMAND_CONFIRM
|
||||
!insertmacro MUI_UNPAGECOMMAND_INSTFILES
|
||||
|
||||
;Things that need to be extracted on startup (keep these lines before any File command!)
|
||||
;Use ReserveFile for your own Install Options ini files too!
|
||||
|
@ -107,13 +101,8 @@ Section "modern.exe" SecCopyUI
|
|||
StrCmp ${TEMP1} "1" "" +2
|
||||
;Checked
|
||||
MessageBox MB_OK "A MessageBox..."
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section "Create uninstaller" SecCreateUninst
|
||||
|
||||
;Add your stuff here
|
||||
|
||||
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
SectionEnd
|
||||
|
@ -128,10 +117,6 @@ SectionEnd
|
|||
;--------------------------------
|
||||
;Installer Functions
|
||||
|
||||
!ifdef MUI_LICENSEPAGE
|
||||
!insertmacro MUI_FUNCTIONS_LICENSEPAGE SetLicense SetLicenseDialog
|
||||
!endif
|
||||
|
||||
Function SetCustomA
|
||||
!insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioA.ini"
|
||||
|
@ -141,30 +126,13 @@ Function SetCustomB
|
|||
!insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioB.ini"
|
||||
FunctionEnd
|
||||
|
||||
!ifdef MUI_COMPONENTSPAGE
|
||||
!insertmacro MUI_FUNCTIONS_COMPONENTSPAGE SetComponents SetComponentsDialog
|
||||
!endif
|
||||
|
||||
!ifdef MUI_DIRECTORYPAGE
|
||||
!insertmacro MUI_FUNCTIONS_DIRECTORYPAGE SetDirectory SetDirectoryDialog
|
||||
!endif
|
||||
|
||||
Function SetCustomC
|
||||
!insertmacro MUI_HEADER_TEXT $(TEXT_IO_TITLE) $(TEXT_IO_SUBTITLE)
|
||||
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioC.ini"
|
||||
FunctionEnd
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_INSTFILESPAGE SetInstFiles
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_GUIINIT
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_DESCRIPTION_START
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SecCreateUninst} $(DESC_SecCreateUninst)
|
||||
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
|
||||
|
||||
!insertmacro MUI_FUNCTIONS_ABORTWARNING
|
||||
!insertmacro MUI_FUNCTIONS_CUSTOMPAGE_BASIC
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller
|
||||
|
@ -185,12 +153,6 @@ SectionEnd
|
|||
;--------------------------------
|
||||
;Uninstaller Functions
|
||||
|
||||
UninstPage uninstConfirm un.SetUninstConfirm
|
||||
UninstPage instfiles un.SetInstFiles
|
||||
|
||||
!insertmacro MUI_UNFUNCTIONS_CONFIRMPAGE un.SetUninstConfirm
|
||||
!insertmacro MUI_UNFUNCTIONS_INSTFILESPAGE un.SetInstFiles
|
||||
|
||||
!insertmacro MUI_UNFUNCTIONS_GUIINIT
|
||||
!insertmacro MUI_UNFUNCTIONS_CUSTOMPAGE_BASIC
|
||||
|
||||
;eof
|
Loading…
Add table
Add a link
Reference in a new issue