2002-12-14 00:15:41 +00:00
|
|
|
;NSIS Modern User Interface version 1.62
|
2002-11-08 21:08:27 +00:00
|
|
|
;MultiLanguage Example Script
|
2002-08-29 10:31:13 +00:00
|
|
|
;Written by Joost Verburg
|
|
|
|
|
2002-11-04 11:19:21 +00:00
|
|
|
!define MUI_PRODUCT "Test Software" ;Define your own software name here
|
|
|
|
!define MUI_VERSION "1.0" ;Define your own software version here
|
|
|
|
|
2003-02-07 14:15:51 +00:00
|
|
|
!include "MUI.nsh"
|
2002-08-29 10:31:13 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
2002-09-22 13:33:53 +00:00
|
|
|
;Configuration
|
2002-08-29 10:31:13 +00:00
|
|
|
|
2002-12-24 22:38:06 +00:00
|
|
|
;General
|
2003-01-09 16:49:11 +00:00
|
|
|
OutFile "MultiLanguage.exe"
|
2002-12-24 22:38:06 +00:00
|
|
|
|
|
|
|
;Folder selection page
|
|
|
|
InstallDir "$PROGRAMFILES\${MUI_PRODUCT}"
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Modern UI Configuration
|
|
|
|
|
2002-10-08 09:29:03 +00:00
|
|
|
!define MUI_LICENSEPAGE
|
2002-11-01 20:45:53 +00:00
|
|
|
!define MUI_COMPONENTSPAGE
|
|
|
|
!define MUI_DIRECTORYPAGE
|
2002-12-06 21:56:28 +00:00
|
|
|
|
2002-10-13 18:28:38 +00:00
|
|
|
!define MUI_ABORTWARNING
|
2002-12-06 21:56:28 +00:00
|
|
|
|
2002-10-08 09:29:03 +00:00
|
|
|
!define MUI_UNINSTALLER
|
2002-12-06 21:56:28 +00:00
|
|
|
!define MUI_UNCONFIRMPAGE
|
2002-12-24 22:38:06 +00:00
|
|
|
|
|
|
|
;Modern UI System
|
|
|
|
!insertmacro MUI_SYSTEM
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Languages
|
2002-10-08 09:29:03 +00:00
|
|
|
|
2002-11-04 16:40:35 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "English"
|
|
|
|
!insertmacro MUI_LANGUAGE "French"
|
|
|
|
!insertmacro MUI_LANGUAGE "German"
|
|
|
|
!insertmacro MUI_LANGUAGE "Spanish"
|
|
|
|
!insertmacro MUI_LANGUAGE "SimpChinese"
|
|
|
|
!insertmacro MUI_LANGUAGE "TradChinese"
|
|
|
|
!insertmacro MUI_LANGUAGE "Japanese"
|
|
|
|
!insertmacro MUI_LANGUAGE "Italian"
|
|
|
|
!insertmacro MUI_LANGUAGE "Dutch"
|
2003-01-09 16:49:11 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Danish"
|
2002-11-04 16:40:35 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Greek"
|
|
|
|
!insertmacro MUI_LANGUAGE "Russian"
|
|
|
|
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Polish"
|
2002-11-04 16:40:35 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Ukrainian"
|
2002-11-19 19:06:46 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Czech"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Slovak"
|
2002-12-03 19:57:32 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Bulgarian"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Hungarian"
|
2002-12-14 00:15:41 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Thai"
|
2002-12-16 16:41:53 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Romanian"
|
2003-01-06 11:37:01 +00:00
|
|
|
!insertmacro MUI_LANGUAGE "Macedonian"
|
2002-10-26 17:39:56 +00:00
|
|
|
|
2002-12-24 22:38:06 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Language Strings
|
|
|
|
|
|
|
|
;Descriptions
|
|
|
|
LangString DESC_SecCopyUI ${LANG_ENGLISH} "modern.exe: English description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_FRENCH} "modern.exe: French description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_GERMAN} "modern.exe: German description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_SPANISH} "modern.exe: Spanish description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "modern.exe: Simplified Chinese description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "modern.exe: Traditional Chinese description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_JAPANESE} "modern.exe: Japanese description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_ITALIAN} "modern.exe: Italian description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_DUTCH} "modern.exe: Dutch description"
|
2003-01-09 16:49:11 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_DANISH} "modern.exe: Danish description"
|
2002-12-24 22:38:06 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_GREEK} "modern.exe: Greek description"
|
2003-01-13 21:01:25 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_RUSSIAN} "modern.exe: Russian description"
|
2002-12-24 22:38:06 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "modern.exe: Portuguese (Brasil) description"
|
2003-01-16 12:23:09 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_POLISH} "modern.exe: Polish description"
|
2002-12-24 22:38:06 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "modern.exe: Ukrainian description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_CZECH} "modern.exe: Czechian description"
|
2003-01-16 12:23:09 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_SLOVAK} "modern.exe: Slovakian description"
|
2002-12-24 22:38:06 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_BULGARIAN} "modern.exe: Bulgarian description"
|
2003-01-16 12:23:09 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "modern.exe: Hungarian description"
|
2002-12-24 22:38:06 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_THAI} "modern.exe: Thai description"
|
|
|
|
LangString DESC_SecCopyUI ${LANG_ROMANIAN} "modern.exe: Romanian description"
|
2003-01-06 11:37:01 +00:00
|
|
|
LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "modern.exe: Macedonian description"
|
2002-12-24 22:38:06 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Data
|
|
|
|
|
2002-10-12 16:16:46 +00:00
|
|
|
LicenseData /LANG=${LANG_ENGLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
|
|
|
LicenseData /LANG=${LANG_FRENCH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
|
|
|
LicenseData /LANG=${LANG_GERMAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-23 17:32:35 +00:00
|
|
|
LicenseData /LANG=${LANG_SPANISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-26 13:06:26 +00:00
|
|
|
LicenseData /LANG=${LANG_SIMPCHINESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
|
|
|
LicenseData /LANG=${LANG_TRADCHINESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-11-01 20:45:53 +00:00
|
|
|
LicenseData /LANG=${LANG_JAPANESE} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-26 17:49:47 +00:00
|
|
|
LicenseData /LANG=${LANG_ITALIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-12 16:16:46 +00:00
|
|
|
LicenseData /LANG=${LANG_DUTCH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2003-01-09 16:49:11 +00:00
|
|
|
LicenseData /LANG=${LANG_DANISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-12 16:16:46 +00:00
|
|
|
LicenseData /LANG=${LANG_GREEK} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-23 17:32:35 +00:00
|
|
|
LicenseData /LANG=${LANG_RUSSIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-24 21:32:34 +00:00
|
|
|
LicenseData /LANG=${LANG_PORTUGUESEBR} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2003-01-16 12:23:09 +00:00
|
|
|
LicenseData /LANG=${LANG_POLISH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-10-26 13:06:26 +00:00
|
|
|
LicenseData /LANG=${LANG_UKRAINIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-11-19 19:06:46 +00:00
|
|
|
LicenseData /LANG=${LANG_CZECH} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2003-01-16 12:23:09 +00:00
|
|
|
LicenseData /LANG=${LANG_SLOVAK} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-12-03 19:57:32 +00:00
|
|
|
LicenseData /LANG=${LANG_BULGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2003-01-16 12:23:09 +00:00
|
|
|
LicenseData /LANG=${LANG_HUNGARIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-12-14 00:15:41 +00:00
|
|
|
LicenseData /LANG=${LANG_THAI} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-12-16 16:41:53 +00:00
|
|
|
LicenseData /LANG=${LANG_ROMANIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2003-01-06 11:37:01 +00:00
|
|
|
LicenseData /LANG=${LANG_MACEDONIAN} "${NSISDIR}\Contrib\Modern UI\License.txt"
|
2002-08-29 10:31:13 +00:00
|
|
|
|
2002-12-24 22:38:06 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Reserve Files
|
2002-11-04 11:19:21 +00:00
|
|
|
|
2002-12-15 21:43:38 +00:00
|
|
|
;Things that need to be extracted on first (keep these lines before any File command!)
|
|
|
|
;Only useful for BZIP2 compression
|
|
|
|
!insertmacro MUI_RESERVEFILE_LANGDLL
|
|
|
|
|
2002-08-29 10:31:13 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Installer Sections
|
|
|
|
|
2002-12-24 22:38:06 +00:00
|
|
|
Section "modern.exe" SecCopyUI
|
2002-08-29 10:31:13 +00:00
|
|
|
|
2002-10-17 21:53:26 +00:00
|
|
|
;ADD YOUR OWN STUFF HERE!
|
2002-08-29 10:31:13 +00:00
|
|
|
|
|
|
|
SetOutPath "$INSTDIR"
|
|
|
|
File "${NSISDIR}\Contrib\UIs\modern.exe"
|
2002-10-17 21:53:26 +00:00
|
|
|
|
2002-11-09 17:58:22 +00:00
|
|
|
;Write language to the registry (for the uninstaller)
|
2002-11-04 11:19:21 +00:00
|
|
|
WriteRegStr HKCU "Software\${MUI_PRODUCT}" "Installer Language" $LANGUAGE
|
2002-10-08 18:06:22 +00:00
|
|
|
|
2002-11-09 17:58:22 +00:00
|
|
|
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
|
|
|
|
2002-08-29 10:31:13 +00:00
|
|
|
SectionEnd
|
2002-11-04 11:19:21 +00:00
|
|
|
|
2002-12-05 16:29:41 +00:00
|
|
|
;Display the Finish header
|
|
|
|
;Insert this macro after the sections if you are not using a finish page
|
|
|
|
!insertmacro MUI_SECTIONS_FINISHHEADER
|
2002-08-29 10:31:13 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Installer Functions
|
|
|
|
|
|
|
|
Function .onInit
|
|
|
|
|
2002-10-17 21:53:26 +00:00
|
|
|
;Language selection
|
|
|
|
|
2002-12-03 19:57:32 +00:00
|
|
|
;Font
|
2002-10-10 20:26:17 +00:00
|
|
|
Push Tahoma
|
|
|
|
Push 8
|
|
|
|
|
2002-12-03 19:57:32 +00:00
|
|
|
;Languages
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "English"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "French"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "German"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Spanish"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "SimpChinese"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "TradChinese"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Japanese"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Italian"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Dutch"
|
2003-01-09 16:49:11 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Danish"
|
2002-12-03 19:57:32 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Greek"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Russian"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "PortugueseBR"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Polish"
|
2002-12-03 19:57:32 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Ukrainian"
|
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Czech"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Slovak"
|
2002-12-03 19:57:32 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Bulgarian"
|
2003-01-16 12:23:09 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Hungarian"
|
2002-12-14 00:15:41 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Thai"
|
2002-12-16 16:41:53 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Romanian"
|
2003-01-06 11:37:01 +00:00
|
|
|
!insertmacro MUI_LANGDLL_PUSH "Macedonian"
|
2002-10-10 20:26:17 +00:00
|
|
|
|
2003-01-16 12:23:09 +00:00
|
|
|
Push 22F ;22 = number of languages, F = change font
|
2002-10-10 20:26:17 +00:00
|
|
|
|
|
|
|
LangDLL::LangDialog "Installer Language" "Please select a language."
|
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
|
|
|
|
|
2002-11-03 13:21:09 +00:00
|
|
|
;--------------------------------
|
2002-11-04 11:19:21 +00:00
|
|
|
;Descriptions
|
2002-08-29 10:31:13 +00:00
|
|
|
|
2002-11-08 21:08:27 +00:00
|
|
|
!insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
|
2002-10-17 21:53:26 +00:00
|
|
|
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopyUI} $(DESC_SecCopyUI)
|
2002-11-02 23:06:46 +00:00
|
|
|
!insertmacro MUI_FUNCTIONS_DESCRIPTION_END
|
2002-10-17 21:53:26 +00:00
|
|
|
|
2002-08-29 10:31:13 +00:00
|
|
|
;--------------------------------
|
|
|
|
;Uninstaller Section
|
|
|
|
|
|
|
|
Section "Uninstall"
|
|
|
|
|
2002-10-17 21:53:26 +00:00
|
|
|
;ADD YOUR OWN STUFF HERE!
|
2002-08-29 10:31:13 +00:00
|
|
|
|
|
|
|
Delete "$INSTDIR\modern.exe"
|
|
|
|
Delete "$INSTDIR\Uninstall.exe"
|
|
|
|
|
|
|
|
RMDir "$INSTDIR"
|
2002-10-08 18:06:22 +00:00
|
|
|
|
2002-11-04 11:19:21 +00:00
|
|
|
DeleteRegValue HKCU "Software\${MUI_PRODUCT}" "Installer Language"
|
2002-08-29 10:31:13 +00:00
|
|
|
|
2002-10-17 21:53:26 +00:00
|
|
|
;Display the Finish header
|
2002-10-26 12:25:02 +00:00
|
|
|
!insertmacro MUI_UNFINISHHEADER
|
2002-08-29 19:48:16 +00:00
|
|
|
|
2002-08-29 10:31:13 +00:00
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
;Uninstaller Functions
|
|
|
|
|
2002-10-08 18:06:22 +00:00
|
|
|
Function un.onInit
|
2002-12-03 19:57:32 +00:00
|
|
|
|
|
|
|
;Get language from registry
|
2002-11-04 11:19:21 +00:00
|
|
|
ReadRegStr $LANGUAGE HKCU "Software\${MUI_PRODUCT}" "Installer Language"
|
2002-12-03 19:57:32 +00:00
|
|
|
|
2002-11-03 13:21:09 +00:00
|
|
|
FunctionEnd
|