;=== Info ======================================================= ; ... ;=== Header ===================================================== !include MUI2.nsh ; Modern UI !include nsDialogs.nsh ; Plug-in to create custom pages !include LogicLib.nsh ; Provide macros that allow easy construction of complex logical structures ;=== General ==================================================== ; Save/change version !define sw_version "0.9" ; Name displayed in installer Name "SoftwareName ${sw_version}" ; Name of exe-file OutFile "SoftwareName_${sw_version}_Installer.exe" ; Default installation directory InstallDir $DOCUMENTS\MATLAB\SoftwareName_${sw_version} ; Request application privileges for Windows Vista / 7 RequestExecutionLevel user ;=== Variables ================================================== ; Save chosen SoftwareName components Var val_main ; Used to create custom overview page Var Dialog Var Label Var Text ;=== Interface configuration ==================================== ; ... ;=== Page Settings ============================================== ; ... ;=== Pages ====================================================== ; !insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_COMPONENTS ; !insertmacro MUI_PAGE_DIRECTORY Page custom MUI_PAGE_OVERVIEW ; Custom page !insertmacro MUI_PAGE_INSTFILES ; !insertmacro MUI_PAGE_FINISH ; ... ;=== Languages ================================================== !insertmacro MUI_LANGUAGE "English" ; Used to create custom overview page LangString page_titel ${LANG_ENGLISH} "Title" LangString page_subtitel ${LANG_ENGLISH} "Subtitle" LangString overview_label ${LANG_ENGLISH} "Label" LangString overview_text ${LANG_ENGLISH} "Chosen path: $INSTDIR" ; ... ;=== Reserve Files ============================================== ; http://nsis.sourceforge.net/Docs/Modern%20UI/Readme.html ;=== Callback Functions ========================================= Function .onInit ; Assign values StrCpy $val_main "0" FunctionEnd ; ... ;=== Sections =================================================== Section "Hauptprogramm - ${sw_version}" secA StrCpy $val_main "1" messageBox MB_OK "$val_main" SectionEnd ; ... ;=== Functions ================================================== ; Customize overview page Function MUI_PAGE_OVERVIEW ; Create page nsDialogs::Create 1018 Pop $Dialog ${If} $Dialog == error Abort ${EndIf} ; Set page title & subtitle !insertmacro MUI_HEADER_TEXT $(page_titel) $(page_subtitel) ${If} ${SectionIsSelected} ${secA} messageBox MB_OK "ONE" ${Else} messageBox MB_OK "NULL" ${EndIf} ; Add controls to page ${NSD_CreateLabel} 0 0 100% 12u $(overview_label) Pop $Label ${NSD_CreateText} 0 13u 100% -13u $(overview_text) Pop $Text ; Show page nsDialogs::Show FunctionEnd