1 ;NSIS Modern User Interface
2 ;Multilingual Example Script
3 ;Written by Joost Verburg
5 ;--------------------------------
10 ;--------------------------------
15 OutFile "GoMoku3D_Setup.exe"
17 ;Default installation folder
18 InstallDir "$PROGRAMFILES\GoMoku3D"
20 ;Get installation folder from registry if available
21 InstallDirRegKey HKCU "Software\gomoku3d" ""
23 ;Request application privileges for Windows Vista
24 RequestExecutionLevel user
25 ;--------------------------------
30 ;--------------------------------
31 ;--------------------------------
34 !define MUI_ABORTWARNING
36 ;--------------------------------
37 ;Language Selection Dialog Settings
39 ;Remember the installer language
40 !define MUI_LANGDLL_REGISTRY_ROOT
"HKCU"
41 !define MUI_LANGDLL_REGISTRY_KEY
"Software\gomoku3d"
42 !define MUI_LANGDLL_REGISTRY_VALUENAME
"Installer Language"
44 ;--------------------------------
45 ;--------------------------------
46 LicenseLangString myLicenseData
${LANG_ENGLISH} ".\release\COPYING"
50 !insertmacro MUI_PAGE_WELCOME
51 !insertmacro MUI_PAGE_LICENSE
".\release\COPYING"
52 !insertmacro MUI_PAGE_COMPONENTS
53 !insertmacro MUI_PAGE_DIRECTORY
54 !insertmacro MUI_PAGE_INSTFILES
55 ;Start Menu Folder Page Configuration
56 !define MUI_STARTMENUPAGE_REGISTRY_ROOT
"HKCU"
57 !define MUI_STARTMENUPAGE_REGISTRY_KEY
"Software\gomoku3d"
58 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME
"Start Menu Folder"
60 !insertmacro MUI_PAGE_STARTMENU Application
$StartMenuFolder
61 !insertmacro MUI_PAGE_FINISH
62 !insertmacro MUI_UNPAGE_WELCOME
63 !insertmacro MUI_UNPAGE_CONFIRM
64 !insertmacro MUI_UNPAGE_INSTFILES
65 !insertmacro MUI_UNPAGE_FINISH
68 ;--------------------------------
71 !insertmacro MUI_LANGUAGE
"English" ;first language is the default language
72 !insertmacro MUI_LANGUAGE
"Italian"
74 ;--------------------------------
78 ;If you are using solid compression, files that are required before
79 ;the actual installation should be stored first in the data block,
80 ;because this will make your installer start faster.
82 !insertmacro MUI_RESERVEFILE_LANGDLL
83 ;--------------------------------
86 Section "GoMoku3D" gomoku3d
90 ;ADD YOUR OWN FILES HERE...
91 File /r
".\release\*.*"
93 ;Store installation folder
94 WriteRegStr HKCU "Software\gomoku3d" "" $INSTDIR
97 WriteUninstaller "$INSTDIR\Uninstall.exe"
98 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
101 CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
102 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
103 CreateShortCut "$SMPROGRAMS\$StartMenuFolder\GoMoku3D.lnk" "$INSTDIR\gomoku3d.exe"
104 !insertmacro MUI_STARTMENU_WRITE_END
108 ;--------------------------------
113 !insertmacro MUI_LANGDLL_DISPLAY
117 ;--------------------------------
120 ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
121 LangString Desc
${LANG_ITALIAN} "Un'implementazione 3d del gioco gomoku"
122 LangString Desc
${LANG_ENGLISH} "A 3d implementation of gomoku"
123 ;Assign descriptions to sections
124 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
125 !insertmacro MUI_DESCRIPTION_TEXT
${gomoku3d} $(Desc
)
126 !insertmacro MUI_FUNCTION_DESCRIPTION_END
129 ;--------------------------------
134 ;ADD YOUR OWN FILES HERE...
135 Delete "$INSTDIR\*.*"
136 Delete "$INSTDIR\translations\*.*"
137 RMDir "$INSTDIR\translations"
138 Delete "$INSTDIR\Microsoft.VC90.CRT\*.*"
139 RMDir "$INSTDIR\Microsoft.VC90.CRT"
140 Delete "$INSTDIR\Uninstall.exe"
144 !insertmacro MUI_STARTMENU_GETFOLDER Application
$StartMenuFolder
146 Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
147 Delete "$SMPROGRAMS\$StartMenuFolder\GoMoku3D.lnk"
148 RMDir "$SMPROGRAMS\$StartMenuFolder"
150 DeleteRegKey /ifempty
HKCU "Software\gomoku3d"
154 ;--------------------------------
155 ;Uninstaller Functions
159 !insertmacro MUI_UNGETLANGUAGE