2002-10-07 19:59:01 +00:00
;NSIS Modern UI version 1.3
;MultiLanguage & LangDLL Example Script
2002-08-29 10:31:13 +00:00
;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
2002-10-07 19:59:01 +00:00
!include " ${NSISDIR} \Contrib\Modern UI\System.nsh "
2002-08-29 10:31:13 +00:00
!verbose 4
;--------------------------------
2002-09-22 13:33:53 +00:00
;Configuration
2002-08-29 10:31:13 +00:00
2002-10-08 09:29:03 +00:00
!define MUI_LICENSEPAGE
!define MUI_COMPONENTPAGE
!define MUI_DIRSELECTPAGE
!define MUI_UNINSTALLER
;Languages
2002-10-07 19:59:01 +00:00
;English
LoadLanguageFile " ${NSISDIR} \Contrib\Language files\English.nlf "
!include " ${NSISDIR} \Contrib\Modern UI\English.nsh "
;Dutch
LoadLanguageFile " ${NSISDIR} \Contrib\Language files\Dutch.nlf "
!include " ${NSISDIR} \Contrib\Modern UI\Dutch.nsh "
2002-10-08 09:29:03 +00:00
;French
LoadLanguageFile " ${NSISDIR} \Contrib\Language files\French.nlf "
!include " ${NSISDIR} \Contrib\Modern UI\French.nsh "
2002-08-29 10:31:13 +00:00
;General
2002-09-26 18:00:16 +00:00
Name /LANG = ${LANG_ENGLISH} " ${NAME} ${VERSION} "
Name /LANG = ${LANG_DUTCH} " ${NAME} ${VERSION} "
2002-10-08 09:29:03 +00:00
Name /LANG = ${LANG_FRENCH} " ${NAME} ${VERSION} "
2002-10-07 19:59:01 +00:00
OutFile " MultiLanguage.exe "
2002-08-29 10:31:13 +00:00
2002-10-07 19:59:01 +00:00
;User interface - icons, ui file, check bitmap, progress bar etc.
2002-09-25 18:46:36 +00:00
!insertmacro MUI_INTERFACE " modern.exe " " adni18-installer-C-no48xp.ico " " adni18-uninstall-C-no48xp.ico " " modern.bmp " " smooth " " $9 " ;$9 is the variable used to store the current page, do not use this var!
2002-09-02 19:50:25 +00:00
2002-08-29 10:31:13 +00:00
;License dialog
2002-09-26 18:00:16 +00:00
LicenseData /LANG = ${LANG_ENGLISH} " License.txt "
LicenseData /LANG = ${LANG_DUTCH} " License.txt "
2002-10-08 09:29:03 +00:00
LicenseData /LANG = ${LANG_FRENCH} " License.txt "
2002-08-29 10:31:13 +00:00
;Component-select dialog
2002-10-07 19:59:01 +00:00
;Titles
LangString TITLE_SecCopyUI ${LANG_ENGLISH} " modern.exe "
LangString TITLE_SecCopyUI ${LANG_DUTCH} " modern.exe "
2002-10-08 09:29:03 +00:00
LangString TITLE_SecCopyUI ${LANG_FRENCH} " modern.exe "
2002-10-07 19:59:01 +00:00
LangString TITLE_SecCreateUninst ${LANG_ENGLISH} " Uninstaller "
LangString TITLE_SecCreateUninst ${LANG_DUTCH} " De<EFBFBD> nstallatie programma "
2002-10-08 09:29:03 +00:00
LangString TITLE_SecCreateUninst ${LANG_FRENCH} " D<EFBFBD> sinstaller "
2002-10-07 19:59:01 +00:00
;Descriptions
2002-10-08 09:29:03 +00:00
LangString DESC_SecCopyUI ${LANG_ENGLISH} " modern.exe: English description "
LangString DESC_SecCopyUI ${LANG_DUTCH} " modern.exe: Nederlandse beschrijven "
LangString DESC_SecCopyUI ${LANG_FRENCH} " modern.exe: Description Fran<61> ais "
LangString DESC_SecCreateUninst ${LANG_ENGLISH} " Uninstaller: English description "
LangString DESC_SecCreateUninst ${LANG_DUTCH} " De<EFBFBD> nstallatie programma: Nederlandse beschrijven "
LangString DESC_SecCreateUninst ${LANG_FRENCH} " D<EFBFBD> sinstaller: Description Fran<61> ais "
2002-08-29 10:31:13 +00:00
;Folder-select dialog
InstallDir " $PROGRAMFILES \${NAME} "
2002-10-08 09:29:03 +00:00
2002-08-29 10:31:13 +00:00
;--------------------------------
;Installer Sections
2002-10-07 19:59:01 +00:00
Section $ ( TITLE_SecCopyUI) SecCopyUI
2002-08-29 10:31:13 +00:00
;Add your stuff here
SetOutPath " $INSTDIR "
File " ${NSISDIR} \Contrib\UIs\modern.exe "
SectionEnd
2002-10-07 19:59:01 +00:00
Section $ ( TITLE_SecCreateUninst) SecCreateUninst
2002-09-25 18:46:36 +00:00
2002-08-29 10:31:13 +00:00
;Add your stuff here
WriteUninstaller " $INSTDIR \Uninstall.exe "
SectionEnd
Section " "
;Invisible section to display the Finish header
2002-09-19 15:50:37 +00:00
!insertmacro MUI_FINISHHEADER SetPage
2002-09-02 19:50:25 +00:00
2002-08-29 10:31:13 +00:00
SectionEnd
;--------------------------------
;Installer Functions
Function .onInit
2002-10-08 09:29:03 +00:00
LangDLL :: LangDialog " Installer Language " " Please select a language. " " 3F " " English " " ${LANG_ENGLISH} " " Fran<EFBFBD> ais " " ${LANG_FRENCH} " " Nederlands " " ${LANG_DUTCH} " " 8 " " Tahoma " ;3 is the number of lanugages, F means change font
2002-09-22 12:52:32 +00:00
2002-09-26 18:00:16 +00:00
Pop $LANGUAGE
StrCmp $LANGUAGE " cancel " 0 + 2
Abort
2002-08-29 10:31:13 +00:00
FunctionEnd
Function .onInitDialog
2002-10-07 19:59:01 +00:00
!insertmacro MUI_INNERDIALOG_INIT
2002-08-29 10:31:13 +00:00
!insertmacro MUI_INNERDIALOG_START 1
2002-10-07 19:59:01 +00:00
!insertmacro MUI_INNERDIALOG_TEXT 1040 $ ( MUI_INNERTEXT_LICENSE)
2002-08-29 10:31:13 +00:00
!insertmacro MUI_INNERDIALOG_STOP 1
!insertmacro MUI_INNERDIALOG_START 2
2002-10-07 19:59:01 +00:00
!insertmacro MUI_INNERDIALOG_TEXT 1042 $ ( MUI_INNERTEXT_DESCRIPTION_TITLE)
!insertmacro MUI_INNERDIALOG_TEXT 1043 $ ( MUI_INNERTEXT_DESCRIPTION_INFO)
2002-08-29 10:31:13 +00:00
!insertmacro MUI_INNERDIALOG_STOP 2
!insertmacro MUI_INNERDIALOG_START 3
2002-10-07 19:59:01 +00:00
!insertmacro MUI_INNERDIALOG_TEXT 1041 $ ( MUI_INNERTEXT_DESTINATIONFOLDER)
2002-08-29 10:31:13 +00:00
!insertmacro MUI_INNERDIALOG_STOP 3
!insertmacro MUI_INNERDIALOG_END
FunctionEnd
Function .onNextPage
2002-09-19 15:50:37 +00:00
!insertmacro MUI_NEXTPAGE SetPage
2002-08-29 10:31:13 +00:00
FunctionEnd
Function .onPrevPage
2002-09-20 20:21:00 +00:00
!insertmacro MUI_PREVPAGE SetPage
2002-08-29 10:31:13 +00:00
FunctionEnd
2002-09-19 15:50:37 +00:00
Function SetPage
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_INIT
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 1
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_LICENSE_TITLE) $ ( MUI_TEXT_LICENSE_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 1
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 2
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_COMPONENTS_TITLE) $ ( MUI_TEXT_COMPONENTS_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 2
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 3
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_DIRSELECT_TITLE) $ ( MUI_TEXT_DIRSELECT_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 3
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 4
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_INSTALLING_TITLE) $ ( MUI_TEXT_INSTALLING_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 4
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 5
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_TEXT_FINISHED_TITLE) $ ( MUI_TEXT_FINISHED_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 5
2002-08-29 10:31:13 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_PAGE_END
2002-08-29 10:31:13 +00:00
FunctionEnd
Function .onMouseOverSection
!insertmacro MUI_DESCRIPTION_INIT
2002-10-07 19:59:01 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $ ( DESC_SecCopyUI)
!insertmacro MUI_DESCRIPTION_TEXT ${SecCreateUninst} $ ( DESC_SecCreateUninst)
2002-08-29 10:31:13 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_DESCRIPTION_END
2002-08-29 10:31:13 +00:00
FunctionEnd
Function .onUserAbort
2002-10-07 19:59:01 +00:00
!insertmacro MUI_ABORTWARNING
2002-09-02 19:50:25 +00:00
2002-08-29 10:31:13 +00:00
FunctionEnd
;--------------------------------
;Uninstaller Section
Section " Uninstall "
;Add your stuff here
Delete " $INSTDIR \modern.exe "
Delete " $INSTDIR \Uninstall.exe "
RMDir " $INSTDIR "
2002-09-19 15:50:37 +00:00
!insertmacro MUI_FINISHHEADER un.SetPage
2002-08-29 19:48:16 +00:00
2002-08-29 10:31:13 +00:00
SectionEnd
;--------------------------------
;Uninstaller Functions
Function un.onNextPage
2002-10-07 19:59:01 +00:00
!insertmacro MUI_NEXTPAGE un.onNextPage
2002-08-29 10:31:13 +00:00
FunctionEnd
2002-09-19 15:50:37 +00:00
Function un.SetPage
2002-10-07 19:59:01 +00:00
!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
2002-08-29 10:31:13 +00:00
2002-10-07 19:59:01 +00:00
!insertmacro MUI_PAGE_START 2
!insertmacro MUI_HEADER_TEXT $ ( MUI_UNTEXT_UNINSTALLING_TITLE) $ ( MUI_UNTEXT_UNINSTALLING_SUBTITLE)
!insertmacro MUI_PAGE_STOP 2
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_START 3
2002-10-07 19:59:01 +00:00
!insertmacro MUI_HEADER_TEXT $ ( MUI_UNTEXT_FINISHED_TITLE) $ ( MUI_UNTEXT_FINISHED_SUBTITLE)
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_STOP 3
2002-08-29 10:31:13 +00:00
2002-09-19 15:50:37 +00:00
!insertmacro MUI_PAGE_END
2002-08-29 10:31:13 +00:00
FunctionEnd
2002-10-07 19:59:01 +00:00
;eof