1 | ;NSIS Modern User Interface version 1.70
|
---|
2 |
|
---|
3 | ;--------------------------------
|
---|
4 | ;Include Modern UI
|
---|
5 |
|
---|
6 | !include "MUI.nsh"
|
---|
7 |
|
---|
8 | ;--------------------------------
|
---|
9 | ;General
|
---|
10 |
|
---|
11 | !define VERSION "3.4"
|
---|
12 | !define TITLE "HeroesOfFantasyClient"
|
---|
13 | !define FULL_TITLE "Heroes of Fantasy client"
|
---|
14 | !define CREATOR "maronsoft"
|
---|
15 | !define CHANGELOG_FILE "readme.txt"
|
---|
16 | !define STARTER "HoFClient.exe"
|
---|
17 | !define HELP_FILENAME "Hof Client.hlp"
|
---|
18 |
|
---|
19 | ;Name and file
|
---|
20 | Name "${FULL_TITLE} ${VERSION}"
|
---|
21 | OutFile "Instalace${TITLE}-${VERSION}.exe"
|
---|
22 |
|
---|
23 | ;Default installation folder
|
---|
24 | InstallDir "$PROGRAMFILES\${CREATOR}\${FULL_TITLE}\"
|
---|
25 |
|
---|
26 | ;--------------------------------
|
---|
27 | ;Interface Settings
|
---|
28 |
|
---|
29 | !define MUI_ABORTWARNING
|
---|
30 |
|
---|
31 | ;--------------------------------
|
---|
32 | ;Language Selection Dialog Settings
|
---|
33 |
|
---|
34 | ;Remember the installer language
|
---|
35 | !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
|
---|
36 | !define MUI_LANGDLL_REGISTRY_KEY "Software\${CREATOR}\${FULL_TITLE}"
|
---|
37 | !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
|
---|
38 |
|
---|
39 | ;--------------------------------
|
---|
40 |
|
---|
41 | ;Pages
|
---|
42 |
|
---|
43 | !define MUI_ICON "..\trunk\image\Heroes.ico"
|
---|
44 | !define MUI_UNICON "..\trunk\image\Heroes.ico"
|
---|
45 |
|
---|
46 | !insertmacro MUI_PAGE_WELCOME
|
---|
47 | ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
|
---|
48 | !insertmacro MUI_PAGE_COMPONENTS
|
---|
49 | !insertmacro MUI_PAGE_DIRECTORY
|
---|
50 | !insertmacro MUI_PAGE_INSTFILES
|
---|
51 |
|
---|
52 | !insertmacro MUI_UNPAGE_CONFIRM
|
---|
53 | !insertmacro MUI_UNPAGE_INSTFILES
|
---|
54 |
|
---|
55 |
|
---|
56 | ;--------------------------------
|
---|
57 | ;Languages
|
---|
58 |
|
---|
59 | !insertmacro MUI_LANGUAGE "English"
|
---|
60 | !insertmacro MUI_LANGUAGE "Czech"
|
---|
61 |
|
---|
62 | ;--------------------------------
|
---|
63 | ;Reserve Files
|
---|
64 |
|
---|
65 | ;These files should be inserted before other files in the data block
|
---|
66 | ;Keep these lines before any File command
|
---|
67 | ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
|
---|
68 |
|
---|
69 | !insertmacro MUI_RESERVEFILE_LANGDLL
|
---|
70 |
|
---|
71 | ;--------------------------------
|
---|
72 | ;Installer Sections
|
---|
73 |
|
---|
74 | Section "Nutné součásti" Nutne
|
---|
75 |
|
---|
76 | SectionIn RO
|
---|
77 |
|
---|
78 | ; Write the uninstall keys for Windows
|
---|
79 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "DisplayName" "${FULL_TITLE}"
|
---|
80 | WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "UninstallString" '"$INSTDIR\uninstall.exe"'
|
---|
81 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoModify" 1
|
---|
82 | WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoRepair" 1
|
---|
83 |
|
---|
84 |
|
---|
85 | SetOutPath "$INSTDIR"
|
---|
86 |
|
---|
87 | ;ADD YOUR OWN FILES HERE...
|
---|
88 | File "..\trunk\HoFclient.exe"
|
---|
89 | File "${CHANGELOG_FILE}"
|
---|
90 | File "..\trunk\image\Heroes.ico"
|
---|
91 |
|
---|
92 | SetOutPath "$INSTDIR\Fonts\"
|
---|
93 | File "Fonts\*.*"
|
---|
94 |
|
---|
95 |
|
---|
96 | ;Store installation folder
|
---|
97 | WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR
|
---|
98 |
|
---|
99 | ;Create uninstaller
|
---|
100 | WriteUninstaller "$INSTDIR\Uninstall.exe"
|
---|
101 |
|
---|
102 | SectionEnd
|
---|
103 |
|
---|
104 | Section "Přidat do nabídky Start"
|
---|
105 |
|
---|
106 | CreateDirectory "$SMPROGRAMS\${FULL_TITLE}"
|
---|
107 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
|
---|
108 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\${FULL_TITLE}.lnk" "$INSTDIR\${STARTER}" "" "$INSTDIR\Heroes.ico"
|
---|
109 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Readme.lnk" "$INSTDIR\${CHANGELOG_FILE}"
|
---|
110 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Domovská stránka.lnk" "http://www.heroesoffantasy.cz/?page=client" "" "$INSTDIR\Heroes.ico"
|
---|
111 |
|
---|
112 | SectionEnd
|
---|
113 |
|
---|
114 |
|
---|
115 | Section "Umístit ikonu na plochu"
|
---|
116 |
|
---|
117 | CreateShortCut "$DESKTOP\${FULL_TITLE}.lnk" "$INSTDIR\${STARTER}" "" "$INSTDIR\Heroes.ico"
|
---|
118 |
|
---|
119 | SectionEnd
|
---|
120 |
|
---|
121 |
|
---|
122 | Section "Nápověda"
|
---|
123 |
|
---|
124 | SetOutPath "$INSTDIR"
|
---|
125 |
|
---|
126 | File "..\trunk\help\${HELP_FILENAME}"
|
---|
127 |
|
---|
128 | SectionEnd
|
---|
129 |
|
---|
130 |
|
---|
131 | Section "Skiny"
|
---|
132 |
|
---|
133 | SetOutPath "$INSTDIR\Skiny\"
|
---|
134 |
|
---|
135 | File "Skiny\*.*"
|
---|
136 |
|
---|
137 | SectionEnd
|
---|
138 |
|
---|
139 |
|
---|
140 | Section "Zvuky"
|
---|
141 |
|
---|
142 | SetOutPath "$INSTDIR\Sounds\"
|
---|
143 |
|
---|
144 | File "Sounds\*.*"
|
---|
145 |
|
---|
146 | SectionEnd
|
---|
147 |
|
---|
148 |
|
---|
149 | Section "Zobrazit informace"
|
---|
150 |
|
---|
151 | ExecShell "open" "$INSTDIR\${CHANGELOG_FILE}"
|
---|
152 |
|
---|
153 | SectionEnd
|
---|
154 |
|
---|
155 |
|
---|
156 | Section "Spustit clienta"
|
---|
157 |
|
---|
158 | ExecShell "open" "$INSTDIR\HoFclient.exe"
|
---|
159 |
|
---|
160 | SectionEnd
|
---|
161 |
|
---|
162 |
|
---|
163 | ;--------------------------------
|
---|
164 |
|
---|
165 | ;Installer Functions
|
---|
166 |
|
---|
167 | Function .onInit
|
---|
168 |
|
---|
169 | !insertmacro MUI_LANGDLL_DISPLAY
|
---|
170 |
|
---|
171 | FunctionEnd
|
---|
172 |
|
---|
173 | ;--------------------------------
|
---|
174 | ;Descriptions
|
---|
175 |
|
---|
176 | ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
|
---|
177 |
|
---|
178 | ;Assign descriptions to sections
|
---|
179 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
---|
180 | !insertmacro MUI_DESCRIPTION_TEXT ${Nutne} "Vyberte potřebné součásti."
|
---|
181 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
---|
182 |
|
---|
183 |
|
---|
184 | ;--------------------------------
|
---|
185 | ;Uninstaller Section
|
---|
186 |
|
---|
187 | Section "Uninstall"
|
---|
188 |
|
---|
189 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
|
---|
190 |
|
---|
191 | Delete "$DESKTOP\${TITLE}.lnk"
|
---|
192 |
|
---|
193 | RMDir /r "$SMPROGRAMS\${CREATOR}\${FULL_TITLE}"
|
---|
194 | RMDir /r "$PROGRAMFILES\${CREATOR}\${FULL_TITLE}"
|
---|
195 |
|
---|
196 | DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
|
---|
197 |
|
---|
198 | SectionEnd
|
---|
199 |
|
---|
200 | ;--------------------------------
|
---|
201 | ;Uninstaller Functions
|
---|
202 |
|
---|
203 | Function un.onInit
|
---|
204 |
|
---|
205 | !insertmacro MUI_UNGETLANGUAGE
|
---|
206 |
|
---|
207 | FunctionEnd
|
---|