Updated Glossario.tex
[GoMoku3D.git] / src / gomoku.nsi
blob5b13bed0407ea4c343438b864c08f8fbbe6da5e4
1 ;NSIS Modern User Interface
2 ;Multilingual Example Script
3 ;Written by Joost Verburg
5 ;--------------------------------
6 ;Include Modern UI
8 !include "MUI2.nsh"
10 ;--------------------------------
11 ;General
13 ;Name and file
14 Name "Gomoku3D"
15 OutFile "gomokuSetup.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 ;--------------------------------
26 ;Variables
28 Var StartMenuFolder
30 ;--------------------------------
31 ;--------------------------------
32 ;Interface Settings
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"
49 ;Pages
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 ;--------------------------------
69 ;Languages
71 !insertmacro MUI_LANGUAGE "English" ;first language is the default language
72 !insertmacro MUI_LANGUAGE "Italian"
74 ;--------------------------------
76 ;Reserve Files
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 ;--------------------------------
84 ;Installer Sections
86 Section "gomoku3d" gomoku3d
88 SetOutPath "$INSTDIR"
90 ;ADD YOUR OWN FILES HERE...
91 File /r ".\release\*.*"
93 ;Store installation folder
94 WriteRegStr HKCU "Software\gomoku3d" "" $INSTDIR
96 ;Create uninstaller
97 WriteUninstaller "$INSTDIR\Uninstall.exe"
98 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
100 ;Create shortcuts
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
106 SectionEnd
108 ;--------------------------------
109 ;Installer Functions
111 Function .onInit
113 !insertmacro MUI_LANGDLL_DISPLAY
115 FunctionEnd
117 ;--------------------------------
118 ;Descriptions
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 ;--------------------------------
130 ;Uninstaller Section
132 Section "Uninstall"
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"
142 RMDir "$INSTDIR"
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"
152 SectionEnd
154 ;--------------------------------
155 ;Uninstaller Functions
157 Function un.onInit
159 !insertmacro MUI_UNGETLANGUAGE
161 FunctionEnd