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-07 19:59:01 +00:00
;Language
;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-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-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-10-07 19:59:01 +00:00
!insertmacro MUI_ENGLISH_LICENSETEXT
!insertmacro MUI_DUTCH_LICENSETEXT
2002-09-26 18:00:16 +00:00
LicenseData /LANG = ${LANG_ENGLISH} " License.txt "
LicenseData /LANG = ${LANG_DUTCH} " License.txt "
2002-08-29 10:31:13 +00:00
;Component-select dialog
2002-10-07 19:59:01 +00:00
!insertmacro MUI_ENGLISH_COMPONENTTEXT
!insertmacro MUI_DUTCH_COMPONENTTEXT
;Titles
LangString TITLE_SecCopyUI ${LANG_ENGLISH} " modern.exe "
LangString TITLE_SecCopyUI ${LANG_DUTCH} " modern.exe "
LangString TITLE_SecCreateUninst ${LANG_ENGLISH} " Uninstaller "
LangString TITLE_SecCreateUninst ${LANG_DUTCH} " De<EFBFBD> nstallatie programma "
;Descriptions
LangString DESC_SecCopyUI ${LANG_ENGLISH} " Copy the modern.exe file to the application folder. "
LangString DESC_SecCopyUI ${LANG_DUTCH} " Kopie<EFBFBD> r modern.exe naar de programma map. "
LangString DESC_SecCreateUninst ${LANG_ENGLISH} " Create a uninstaller which can automatically delete ${NAME}. "
LangString DESC_SecCreateUninst ${LANG_DUTCH} " Maak een de<64> nstallatie programma dat ${NAME} automatisch kan verwijderen. "
2002-08-29 10:31:13 +00:00
;Folder-select dialog
2002-10-07 19:59:01 +00:00
!insertmacro MUI_ENGLISH_DIRTEXT
!insertmacro MUI_DUTCH_DIRTEXT
2002-08-29 10:31:13 +00:00
InstallDir " $PROGRAMFILES \${NAME} "
;Uninstaller
2002-10-07 19:59:01 +00:00
!insertmacro MUI_ENGLISH_UNINSTALLTEXT
!insertmacro MUI_DUTCH_UNINSTALLTEXT
2002-09-22 13:33:53 +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-09-26 18:00:16 +00:00
LangDLL :: LangDialog " Installer Language " " Please select a language. " " 2F " " English " " ${LANG_ENGLISH} " " Nederlands " " ${LANG_DUTCH} " " 8 " " Tahoma " ;2 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