macro system updates

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1567 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-11-02 23:06:46 +00:00
parent c8f70d62b1
commit 1f2aeac3e1
4 changed files with 172 additions and 121 deletions

View file

@ -293,62 +293,82 @@
!macroend !macroend
;-------------------------------- ;--------------------------------
;BASIC FUNCTIONS ;FUNCTIONS
!macro MUI_BASICFUNCTIONS !macro MUI_FUNCTIONS_GUIINIT
!ifdef MUI_LICENSEPAGE !verbose 3
Page license SetLicense SetLicenseDialog
Function SetLicense
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_LICENSE_TITLE) $(MUI_TEXT_LICENSE_SUBTITLE)
FunctionEnd
Function SetLicenseDialog
!insertmacro MUI_INNERDIALOG_TEXT 1040 $(MUI_INNERTEXT_LICENSE)
FunctionEnd
!endif
!ifdef MUI_COMPONENTSPAGE
Page components SetComponents SetComponentsDialog
Function SetComponents
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_COMPONENTS_TITLE) $(MUI_TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
Function SetComponentsDialog
!insertmacro MUI_INNERDIALOG_TEXT 1042 $(MUI_INNERTEXT_DESCRIPTION_TITLE)
!insertmacro MUI_INNERDIALOG_TEXT 1043 $(MUI_INNERTEXT_DESCRIPTION_INFO)
FunctionEnd
!endif
!ifdef MUI_DIRECTORYPAGE
Page directory SetDirectory SetDirectoryDialog
Function SetDirectory
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_DIRSELECT_TITLE) $(MUI_TEXT_DIRSELECT_SUBTITLE)
FunctionEnd
Function SetDirectoryDialog
!insertmacro MUI_INNERDIALOG_TEXT 1041 $(MUI_INNERTEXT_DESTINATIONFOLDER)
FunctionEnd
!endif
Page instfiles SetInstFiles
Function SetInstFiles
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_INSTALLING_TITLE) $(MUI_TEXT_INSTALLING_SUBTITLE)
FunctionEnd
Function .onGUIInit Function .onGUIInit
!insertmacro MUI_GUIINIT !insertmacro MUI_GUIINIT
FunctionEnd FunctionEnd
!verbose 4 !verbose 4
!macroend !macroend
!macro MUI_FUNCTION_DESCRIPTION_START !macro MUI_FUNCTIONS_LICENSEPAGE SETLICENSE SETLICENSEDIALOG
!verbose 3
Function "${SETLICENSE}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_LICENSE_TITLE) $(MUI_TEXT_LICENSE_SUBTITLE)
FunctionEnd
Function "${SETLICENSEDIALOG}"
!insertmacro MUI_INNERDIALOG_TEXT 1040 $(MUI_INNERTEXT_LICENSE)
FunctionEnd
!verbose 4
!macroend
!macro MUI_FUNCTIONS_COMPONENTSPAGE SETCOMPONENTS SETCOMPONENTSDIALOG
!verbose 3
Function "${SETCOMPONENTS}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_COMPONENTS_TITLE) $(MUI_TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
Function "${SETCOMPONENTSDIALOG}"
!insertmacro MUI_INNERDIALOG_TEXT 1042 $(MUI_INNERTEXT_DESCRIPTION_TITLE)
!insertmacro MUI_INNERDIALOG_TEXT 1043 $(MUI_INNERTEXT_DESCRIPTION_INFO)
FunctionEnd
!verbose 4
!macroend
!macro MUI_FUNCTIONS_DIRECTORYPAGE SETDIRECTORYPAGE SETDIRECTORYDIALOGPAGE
!verbose 3
Function "${SETDIRECTORYPAGE}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_DIRSELECT_TITLE) $(MUI_TEXT_DIRSELECT_SUBTITLE)
FunctionEnd
Function "${SETDIRECTORYDIALOGPAGE}"
!insertmacro MUI_INNERDIALOG_TEXT 1041 $(MUI_INNERTEXT_DESTINATIONFOLDER)
FunctionEnd
!verbose 4
!macroend
!macro MUI_FUNCTIONS_INSTFILESPAGE SETINSTFILES
!verbose 3
Function "${SETINSTFILES}"
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_INSTALLING_TITLE) $(MUI_TEXT_INSTALLING_SUBTITLE)
FunctionEnd
!verbose 4
!macroend
!macro MUI_FUNCTIONS_DESCRIPTION_START
!verbose 3 !verbose 3
@ -359,7 +379,7 @@
!macroend !macroend
!macro MUI_FUNCTION_DESCRIPTION_END !macro MUI_FUNCTIONS_DESCRIPTION_END
!verbose 3 !verbose 3
@ -370,7 +390,7 @@
!macroend !macroend
!macro MUI_FUNCTION_ABORTWARNING !macro MUI_FUNCTIONS_ABORTWARNING
!verbose 3 !verbose 3
@ -382,26 +402,87 @@
!macroend !macroend
!macro MUI_UNBASICFUNCTIONS !macro MUI_UNFUNCTIONS_GUIINIT
!verbose 3 !verbose 3
UninstPage uninstConfirm un.SetUninstConfirm
UninstPage instfiles un.SetInstFiles
Function un.SetUninstConfirm
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_INTRO_TITLE) $(MUI_UNTEXT_INTRO_SUBTITLE)
FunctionEnd
Function un.SetInstFiles
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_UNINSTALLING_TITLE) $(MUI_UNTEXT_UNINSTALLING_SUBTITLE)
FunctionEnd
Function un.onGUIInit Function un.onGUIInit
!insertmacro MUI_GUIINIT !insertmacro MUI_GUIINIT
FunctionEnd FunctionEnd
!verbose 4 !verbose 4
!macroend
!macro MUI_UNFUNCTIONS_CONFIRMPAGE UNSETUNINSTCONFIRM
!verbose 3
Function "${UNSETUNINSTCONFIRM}"
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_INTRO_TITLE) $(MUI_UNTEXT_INTRO_SUBTITLE)
FunctionEnd
!verbose 4
!macroend
!macro MUI_UNFUNCTIONS_INSTFILESPAGE UNSETINSTFILES
!verbose 3
Function ${UNSETINSTFILES}
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_UNINSTALLING_TITLE) $(MUI_UNTEXT_UNINSTALLING_SUBTITLE)
FunctionEnd
!verbose 4
!macroend
;--------------------------------
;BASIC FUNCTIONS
!macro MUI_FUNCTIONS_BASIC
!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_FUNCTIONS_GUIINIT
!verbose 4
!macroend
!macro MUI_UNFUNCTIONS_BASIC
!verbose 3
UninstPage uninstConfirm un.SetUninstConfirm
UninstPage instfiles un.SetInstFiles
!insertmacro MUI_UNFUNCTIONS_CONFIRMPAGE un.SetUninstConfirm
!insertmacro MUI_UNFUNCTIONS_INSTFILESPAGE un.SetInstFiles
!insertmacro MUI_UNFUNCTIONS_GUIINIT
!verbose 4
!macroend !macroend

View file

@ -61,13 +61,13 @@ SectionEnd
;-------------------------------- ;--------------------------------
;Installer Functions ;Installer Functions
!insertmacro MUI_BASICFUNCTIONS !insertmacro MUI_FUNCTIONS_BASIC
!insertmacro MUI_FUNCTION_DESCRIPTION_START !insertmacro MUI_FUNCTIONS_DESCRIPTION_START
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
!insertmacro MUI_FUNCTION_ABORTWARNING !insertmacro MUI_FUNCTIONS_ABORTWARNING
;-------------------------------- ;--------------------------------
;Uninstaller Section ;Uninstaller Section
@ -89,4 +89,4 @@ SectionEnd
;-------------------------------- ;--------------------------------
;Uninstaller Functions ;Uninstaller Functions
!insertmacro MUI_UNBASICFUNCTIONS !insertmacro MUI_UNFUNCTIONS_BASIC

View file

@ -29,6 +29,7 @@
OutFile "InstallOptions.exe" OutFile "InstallOptions.exe"
Name "${NAME} ${VERSION}" Name "${NAME} ${VERSION}"
;Page order
!ifdef MUI_LICENSEPAGE !ifdef MUI_LICENSEPAGE
Page license SetLicense SetLicenseDialog Page license SetLicense SetLicenseDialog
!endif !endif
@ -128,9 +129,7 @@ SectionEnd
;Installer Functions ;Installer Functions
!ifdef MUI_LICENSEPAGE !ifdef MUI_LICENSEPAGE
Function SetLicense !insertmacro MUI_FUNCTIONS_LICENSEPAGE SetLicense SetLicenseDialog
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_LICENSE_TITLE) $(MUI_TEXT_LICENSE_SUBTITLE)
FunctionEnd
!endif !endif
Function SetCustomA Function SetCustomA
@ -144,15 +143,11 @@ Function SetCustomB
FunctionEnd FunctionEnd
!ifdef MUI_COMPONENTSPAGE !ifdef MUI_COMPONENTSPAGE
Function SetComponents !insertmacro MUI_FUNCTIONS_COMPONENTSPAGE SetComponents SetComponentsDialog
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_COMPONENTS_TITLE) $(MUI_TEXT_COMPONENTS_SUBTITLE)
FunctionEnd
!endif !endif
!ifdef MUI_DIRECTORYPAGE !ifdef MUI_DIRECTORYPAGE
Function SetDirectory !insertmacro MUI_FUNCTIONS_DIRECTORYPAGE SetDirectory SetDirectoryDialog
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_DIRSELECT_TITLE) $(MUI_TEXT_DIRSELECT_SUBTITLE)
FunctionEnd
!endif !endif
Function SetCustomC Function SetCustomC
@ -160,37 +155,16 @@ Function SetCustomC
!insertmacro MUI_INSTALLOPTIONS_SHOW "ioC.ini" !insertmacro MUI_INSTALLOPTIONS_SHOW "ioC.ini"
FunctionEnd FunctionEnd
Function SetInstFiles !insertmacro MUI_FUNCTIONS_INSTFILESPAGE SetInstFiles
!insertmacro MUI_HEADER_TEXT $(MUI_TEXT_INSTALLING_TITLE) $(MUI_TEXT_INSTALLING_SUBTITLE)
FunctionEnd
Function SetLicenseDialog !insertmacro MUI_FUNCTIONS_GUIINIT
!insertmacro MUI_INNERDIALOG_TEXT 1040 $(MUI_INNERTEXT_LICENSE)
FunctionEnd
Function SetComponentsDialog !insertmacro MUI_FUNCTIONS_DESCRIPTION_START
!insertmacro MUI_INNERDIALOG_TEXT 1042 $(MUI_INNERTEXT_DESCRIPTION_TITLE)
!insertmacro MUI_INNERDIALOG_TEXT 1043 $(MUI_INNERTEXT_DESCRIPTION_INFO)
FunctionEnd
Function SetDirectoryDialog
!insertmacro MUI_INNERDIALOG_TEXT 1041 $(MUI_INNERTEXT_DESTINATIONFOLDER)
FunctionEnd
Function .onGUIInit
!insertmacro MUI_GUIINIT
FunctionEnd
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_INIT
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_DESCRIPTION_TEXT ${SecCreateUninst} $(DESC_SecCreateUninst) !insertmacro MUI_DESCRIPTION_TEXT ${SecCreateUninst} $(DESC_SecCreateUninst)
!insertmacro MUI_DESCRIPTION_END !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
FunctionEnd
Function .onUserAbort !insertmacro MUI_FUNCTIONS_ABORTWARNING
!insertmacro MUI_ABORTWARNING
FunctionEnd
;-------------------------------- ;--------------------------------
;Uninstaller ;Uninstaller
@ -211,16 +185,12 @@ SectionEnd
;-------------------------------- ;--------------------------------
;Uninstaller Functions ;Uninstaller Functions
Function un.SetUninstConfirm UninstPage uninstConfirm un.SetUninstConfirm
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_INTRO_TITLE) $(MUI_UNTEXT_INTRO_SUBTITLE) UninstPage instfiles un.SetInstFiles
FunctionEnd
Function un.SetInstFiles !insertmacro MUI_UNFUNCTIONS_CONFIRMPAGE un.SetUninstConfirm
!insertmacro MUI_HEADER_TEXT $(MUI_UNTEXT_UNINSTALLING_TITLE) $(MUI_UNTEXT_UNINSTALLING_SUBTITLE) !insertmacro MUI_UNFUNCTIONS_INSTFILESPAGE un.SetInstFiles
FunctionEnd
Function un.onGUIInit !insertmacro MUI_UNFUNCTIONS_GUIINIT
!insertmacro MUI_GUIINIT
FunctionEnd
;eof ;eof

View file

@ -217,13 +217,13 @@ Function .onInit
FunctionEnd FunctionEnd
!insertmacro MUI_BASICFUNCTIONS !insertmacro MUI_FUNCTIONS_BASIC
!insertmacro MUI_FUNCTION_DESCRIPTION_START !insertmacro MUI_FUNCTIONS_DESCRIPTION_START
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI) !insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
!insertmacro MUI_FUNCTION_ABORTWARNING !insertmacro MUI_FUNCTIONS_ABORTWARNING
;-------------------------------- ;--------------------------------
;Uninstaller Section ;Uninstaller Section
@ -251,4 +251,4 @@ Function un.onInit
ReadRegStr $LANGUAGE HKCU "Software\${NAME}" "Installer Language" ReadRegStr $LANGUAGE HKCU "Software\${NAME}" "Installer Language"
FunctionEnd FunctionEnd
!insertmacro MUI_UNBASICFUNCTIONS !insertmacro MUI_UNFUNCTIONS_BASIC