2002-10-07 19:59:01 +00:00
;NSIS Modern UI version 1.3
;Basic Example Script
;Written by Joost Verburg
!define NAME " Test Software " ;Define your own software name here
!define VERSION " 1.0 " ;Define your own software version here
!verbose 3
!include " ${NSISDIR} \Contrib\Modern UI\System.nsh "
!verbose 4
;--------------------------------
;Configuration
2002-10-08 09:29:03 +00:00
!define MUI_LICENSEPAGE
!define MUI_COMPONENTPAGE
!define MUI_DIRSELECTPAGE
2002-10-13 18:28:38 +00:00
!define MUI_ABORTWARNING
2002-10-08 09:29:03 +00:00
!define MUI_UNINSTALLER
2002-10-07 19:59:01 +00:00
;Language
;English
LoadLanguageFile " ${NSISDIR} \Contrib\Language files\English.nlf "
2002-10-12 15:57:47 +00:00
!include " ${NSISDIR} \Contrib\Modern UI\Language files\English.nsh "
2002-10-07 19:59:01 +00:00
;General
Name " ${NAME} ${VERSION} "
OutFile " Basic.exe "
;User interface - icons, ui file, check bitmap, progress bar etc.
2002-10-12 18:33:28 +00:00
!insertmacro MUI_INTERFACE " modern.exe " " modern-install.ico " " modern-uninstall.ico " " modern.bmp " " smooth " " Tahoma " " $9 " ;$9 is the variable used to store the current page, do not use this var!
2002-10-07 19:59:01 +00:00
;License dialog
2002-10-12 16:16:46 +00:00
LicenseData " ${NSISDIR} \Contrib\Modern UI\License.txt "
2002-10-07 19:59:01 +00:00
;Component-select dialog
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} " Copy the modern.exe file to the application folder. "
LangString DESC_SecCreateUninst ${LANG_ENGLISH} " Create a uninstaller which can automatically delete ${NAME}. "
;Folder-select dialog
InstallDir " $PROGRAMFILES \${NAME} "
;--------------------------------
;Installer Sections
Section " modern.exe " SecCopyUI
;Add your stuff here
SetOutPath " $INSTDIR "
File " ${NSISDIR} \Contrib\UIs\modern.exe "
SectionEnd
Section " Create uninstaller " SecCreateUninst
;Add your stuff here
WriteUninstaller " $INSTDIR \Uninstall.exe "
SectionEnd
Section " "
;Invisible section to display the Finish header
!insertmacro MUI_FINISHHEADER SetPage
SectionEnd
;--------------------------------
;Installer Functions
Function .onInitDialog
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_INNERDIALOG_INIT
!insertmacro MUI_INNERDIALOG_START 1
!insertmacro MUI_INNERDIALOG_TEXT 1040 $ ( MUI_INNERTEXT_LICENSE)
!insertmacro MUI_INNERDIALOG_STOP 1
!insertmacro MUI_INNERDIALOG_START 2
!insertmacro MUI_INNERDIALOG_TEXT 1042 $ ( MUI_INNERTEXT_DESCRIPTION_TITLE)
!insertmacro MUI_INNERDIALOG_TEXT 1043 $ ( MUI_INNERTEXT_DESCRIPTION_INFO)
!insertmacro MUI_INNERDIALOG_STOP 2
!insertmacro MUI_INNERDIALOG_START 3
!insertmacro MUI_INNERDIALOG_TEXT 1041 $ ( MUI_INNERTEXT_DESTINATIONFOLDER)
!insertmacro MUI_INNERDIALOG_STOP 3
!insertmacro MUI_INNERDIALOG_END
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
FunctionEnd
Function .onNextPage
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_NEXTPAGE SetPage
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
FunctionEnd
Function .onPrevPage
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_PREVPAGE SetPage
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
FunctionEnd
Function SetPage
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGE_START 1
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_LICENSE_TITLE) $ ( MUI_TEXT_LICENSE_SUBTITLE)
!insertmacro MUI_PAGE_STOP 1
!insertmacro MUI_PAGE_START 2
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_COMPONENTS_TITLE) $ ( MUI_TEXT_COMPONENTS_SUBTITLE)
!insertmacro MUI_PAGE_STOP 2
!insertmacro MUI_PAGE_START 3
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_DIRSELECT_TITLE) $ ( MUI_TEXT_DIRSELECT_SUBTITLE)
!insertmacro MUI_PAGE_STOP 3
!insertmacro MUI_PAGE_START 4
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_INSTALLING_TITLE) $ ( MUI_TEXT_INSTALLING_SUBTITLE)
!insertmacro MUI_PAGE_STOP 4
!insertmacro MUI_PAGE_START 5
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_FINISHED_TITLE) $ ( MUI_TEXT_FINISHED_SUBTITLE)
!insertmacro MUI_PAGE_STOP 5
!insertmacro MUI_PAGE_END
FunctionEnd
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_INIT
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $ ( DESC_SecCopyUI)
!insertmacro MUI_DESCRIPTION_TEXT ${SecCreateUninst} $ ( DESC_SecCreateUninst)
!insertmacro MUI_DESCRIPTION_END
FunctionEnd
Function .onUserAbort
!insertmacro MUI_ABORTWARNING
FunctionEnd
;--------------------------------
;Uninstaller Section
Section " Uninstall "
;Add your stuff here
Delete " $INSTDIR \modern.exe "
Delete " $INSTDIR \Uninstall.exe "
RMDir " $INSTDIR "
!insertmacro MUI_FINISHHEADER un.SetPage
SectionEnd
;--------------------------------
;Uninstaller Functions
Function un.onNextPage
2002-10-08 18:06:36 +00:00
2002-10-08 20:07:23 +00:00
!insertmacro MUI_NEXTPAGE un.SetPage
2002-10-08 18:06:36 +00:00
2002-10-07 19:59:01 +00:00
FunctionEnd
Function un.SetPage
!insertmacro MUI_PAGE_INIT
!insertmacro MUI_PAGE_START 1
!insertmacro MUI_HEADER_TEXT $ ( MUI_UNTEXT_INTRO_TITLE) $ ( MUI_UNTEXT_INTRO_SUBTITLE)
!insertmacro MUI_PAGE_STOP 1
!insertmacro MUI_PAGE_START 2
!insertmacro MUI_HEADER_TEXT $ ( MUI_UNTEXT_UNINSTALLING_TITLE) $ ( MUI_UNTEXT_UNINSTALLING_SUBTITLE)
!insertmacro MUI_PAGE_STOP 2
!insertmacro MUI_PAGE_START 3
!insertmacro MUI_HEADER_TEXT $ ( MUI_UNTEXT_FINISHED_TITLE) $ ( MUI_UNTEXT_FINISHED_SUBTITLE)
!insertmacro MUI_PAGE_STOP 3
!insertmacro MUI_PAGE_END
FunctionEnd
;eof