Modern UI 1.6

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1728 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2002-11-15 16:00:32 +00:00
parent c360002f07
commit 2366257c05
10 changed files with 541 additions and 66 deletions

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.5
;NSIS Modern User Interface version 1.6
;Basic Example Script
;Written by Joost Verburg

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.5
;NSIS Modern User Interface version 1.6
;Install Options Example Script
;Written by Joost Verburg
@ -17,7 +17,6 @@
!define MUI_UNINSTALLER
!define MUI_WINDOWTITLE
!define MUI_CUSTOMPAGECOMMANDS
!define TEMP1 $R0
@ -62,7 +61,7 @@
;Things that need to be extracted on startup (keep these lines before any File command!)
;Only useful for BZIP2 compression
;Use ReserveFile for your own Install Options ini files too!
ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
ReserveFile "ioA.ini"
ReserveFile "ioB.ini"
ReserveFile "ioC.ini"

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.5
;NSIS Modern User Interface version 1.6
;MultiLanguage Example Script
;Written by Joost Verburg

View file

@ -1,4 +1,4 @@
;NSIS Modern User Interface version 1.5
;NSIS Modern User Interface version 1.6
;Start Menu Folder Selection Example Script
;Written by Joost Verburg
@ -58,13 +58,17 @@ Section "modern.exe" SecCopyUI
SetOutPath "$INSTDIR"
File "${NSISDIR}\Contrib\UIs\modern.exe"
;Create shortcut
CreateDirectory "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}\Modern UI.lnk" "$INSTDIR\modern.exe"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
!insertmacro MUI_STARTMENU_WRITE_BEGIN
;Create shortcuts
CreateDirectory "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}\Modern UI.lnk" "$INSTDIR\modern.exe"
CreateShortCut "$SMPROGRAMS\${MUI_STARTMENU_VARIABLE}\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
;Write shortcut location to the registry (for Uninstaller)
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "Start Menu Folder" "${MUI_STARTMENU_VARIABLE}"
;Write shortcut location to the registry (for Uninstaller)
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "Start Menu Folder" "${MUI_STARTMENU_VARIABLE}"
!insertmacro MUI_STARTMENU_WRITE_END
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
@ -92,9 +96,14 @@ Section "Uninstall"
;Remove shortcut
ReadRegStr ${TEMP1} HKCU "Software\${MUI_PRODUCT}" "Start Menu Folder"
Delete "$SMPROGRAMS\${TEMP1}\Modern UI.lnk"
Delete "$SMPROGRAMS\${TEMP1}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${TEMP1}" ;Only if empty, so it won't delete other shortcuts
StrCmp ${TEMP1} "" noshotcuts
Delete "$SMPROGRAMS\${TEMP1}\Modern UI.lnk"
Delete "$SMPROGRAMS\${TEMP1}\Uninstall.lnk"
RMDir "$SMPROGRAMS\${TEMP1}" ;Only if empty, so it won't delete other shortcuts
noshortcuts:
RMDir "$INSTDIR"

View file

@ -0,0 +1,100 @@
;NSIS Modern User Interface version 1.6
;Welcome/Finish Page Example Script
;Written by Joost Verburg
!define MUI_PRODUCT "Test Software" ;Define your own software name here
!define MUI_VERSION "1.0" ;Define your own software version here
!include "${NSISDIR}\Contrib\Modern UI\System.nsh"
;--------------------------------
;Configuration
!define MUI_WELCOMEPAGE
!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_RUN "$INSTDIR\modern.exe"
!define MUI_LICENSEPAGE
!define MUI_COMPONENTSPAGE
!define MUI_DIRECTORYPAGE
!define MUI_ABORTWARNING
!define MUI_UNINSTALLER
;Language
!insertmacro MUI_LANGUAGE "English"
;General
OutFile "WelcomeFinish.exe"
;License page
LicenseData "${NSISDIR}\Contrib\Modern UI\License.txt"
;Component-selection page
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} "Copy the modern.exe file to the application folder."
;Folder-selection page
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
;Things that need to be extracted on startup (keep these lines before any File command!)
;Only useful for BZIP2 compression
;Use ReserveFile for your own Install Options ini files too!
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
!insertmacro MUI_RESERVEFILE_WIZARDINI
!insertmacro MUI_RESERVEFILE_WIZARDBITMAP
;--------------------------------
;Modern UI System
!insertmacro MUI_SYSTEM
;--------------------------------
;Installer Sections
Section "modern.exe" SecCopyUI
;Add your stuff here
SetOutPath "$INSTDIR"
File "${NSISDIR}\Contrib\UIs\modern.exe"
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
!insertmacro MUI_SECTIONS_FINISHHEADER ;Insert this macro after the sections
;--------------------------------
;Descriptions
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
;--------------------------------
;Installer Functions
Function .onInit
!insertmacro MUI_WELCOMEFINISHPAGE_INIT
FunctionEnd
;--------------------------------
;Uninstaller Section
Section "Uninstall"
;Add your stuff here
Delete "$INSTDIR\modern.exe"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
!insertmacro MUI_UNFINISHHEADER
SectionEnd
;eof