source: trunk/Modules/Export/files/4.3.4/install.nsi

Last change on this file was 894, checked in by chronos, 21 months ago
  • Fixed: Export error due to PHP 8.1 deprecated code.
  • Modified: Code cleanup.
File size: 6.8 KB
Line 
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 "4.3.4"
12;not use !define RELEASE_DATE "2010-04-23"
13 !define TITLE "CzechWoW"
14 !define FULL_TITLE "Český překlad WoW"
15 !define CREATOR "Autor"
16 !define README "ReadMe.htm"
17 !define LOCALE "czCZ"
18
19 ;Name and file
20 Name "${FULL_TITLE} ${VERSION}"
21 OutFile "Instalace_${TITLE}_${VERSION}.exe"
22
23 ;Default installation folder
24 InstallDir "$PROGRAMFILES\World of Warcraft\"
25
26 ;Get installation folder from registry if available
27 InstallDirRegKey HKLM "Software\Blizzard Entertainment\World of Warcraft" "InstallPath"
28
29;--------------------------------
30;Interface Settings
31
32 !define MUI_ABORTWARNING
33
34;--------------------------------
35;Language Selection Dialog Settings
36
37 ;Remember the installer language
38 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
39 !define MUI_LANGDLL_REGISTRY_KEY "Software\${CREATOR}\${FULL_TITLE}"
40 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
41
42;--------------------------------
43;Pages
44
45 !define MUI_ICON "WoW.ico"
46 !define MUI_UNICON "WoW.ico"
47 ;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
48
49 !insertmacro MUI_PAGE_WELCOME
50 ;!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Contrib\Modern UI\License.txt"
51 !insertmacro MUI_PAGE_COMPONENTS
52 !insertmacro MUI_PAGE_DIRECTORY
53 !insertmacro MUI_PAGE_INSTFILES
54
55 !insertmacro MUI_UNPAGE_CONFIRM
56 !insertmacro MUI_UNPAGE_INSTFILES
57
58;--------------------------------
59;Languages
60
61 !insertmacro MUI_LANGUAGE "Czech"
62
63;--------------------------------
64;Reserve Files
65
66 ;These files should be inserted before other files in the data block
67 ;Keep these lines before any File command
68 ;Only for solid compression (by default, solid compression is enabled for BZIP2 and LZMA)
69
70 !insertmacro MUI_RESERVEFILE_LANGDLL
71
72;--------------------------------
73;Installer Sections
74
75Section "Základní soubory" Base
76
77 SetDetailsPrint textonly
78 DetailPrint "Instaluji základní soubory..."
79 SetDetailsPrint listonly
80
81 SectionIn RO ; Read only section
82
83 ; Write the uninstall keys for Windows
84 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "DisplayName" "${FULL_TITLE}"
85 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
86 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoModify" 1
87 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}" "NoRepair" 1
88
89 SetOutPath "$INSTDIR"
90
91 ;ADD YOUR OWN FILES HERE...
92 File "WowLua.exe"
93 File "${README}"
94
95
96 ;Store installation folder
97 WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR
98
99 ;Create uninstaller
100 WriteUninstaller "$INSTDIR\Uninstall.exe"
101
102SectionEnd
103
104Section "Rozhraní, Kouzla.." Interface
105
106 SetOutPath "$INSTDIR\Data"
107 File "patch-5.MPQ"
108 Rename "$INSTDIR\Data\patch-5.MPQ" "$INSTDIR\Data\wow-update-base-50000.MPQ"
109
110 IfFileExists "$INSTDIR\Data\enGB\*.*" 0 +3
111 Rename "$INSTDIR\Data\wow-update-base-50000.MPQ" "$INSTDIR\Data\enGB\wow-update-enGB-50000.MPQ"
112 Goto +2
113 Rename "$INSTDIR\Data\wow-update-base-50000.MPQ" "$INSTDIR\Data\enUS\wow-update-enUS-50000.MPQ"
114
115SectionEnd
116
117Section "Addon" Addon
118
119 SetOutPath "$INSTDIR\Interface\AddOns\CzWoW"
120 file "CzWoW\*"
121
122SectionEnd
123
124Section "Fonts" Fonts
125
126 SetOutPath "$INSTDIR\Data\Fonts"
127 file "Fonts\*"
128
129SectionEnd
130
131Section "Zástupci nabídky Start" StartMenuShortCut
132
133 SetDetailsPrint textonly
134 DetailPrint "Instaluji Zástupce nabídky Start..."
135 SetDetailsPrint listonly
136
137 CreateDirectory "$SMPROGRAMS\${FULL_TITLE}"
138 SetOutPath "$INSTDIR"
139 CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Odinstalovat.lnk" "$INSTDIR\Uninstall.exe"
140 CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\České WoW.lnk" "$INSTDIR\WowLua.exe"
141
142 CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Nápověda.lnk" "$INSTDIR\${README}"
143
144SectionEnd
145
146Section "Zástupci na plochu" DesktopShortCut
147
148 SetDetailsPrint textonly
149 DetailPrint "Instaluji zástupce na plochu..."
150 SetDetailsPrint listonly
151
152 CreateShortCut "$DESKTOP\České WoW.lnk" "$INSTDIR\WowLua.exe"
153
154SectionEnd
155
156Section "Zobrazit informace" ShowChangeLog
157
158 SetDetailsPrint textonly
159 DetailPrint "Zobrazuji doplňující informace..."
160 SetDetailsPrint listonly
161
162 ExecShell "open" "$INSTDIR\${README}"
163
164SectionEnd
165
166Section "Smazat WDB cache" DeleteWDBCache
167
168 SetDetailsPrint textonly
169 DetailPrint "Mažu WDB cache..."
170 SetDetailsPrint listonly
171
172 RMDir /r "$INSTDIR\Cache\WDB"
173
174SectionEnd
175
176
177;--------------------------------
178;Installer Functions
179
180Function .onInit
181
182 !insertmacro MUI_LANGDLL_DISPLAY
183
184FunctionEnd
185
186;--------------------------------
187;Descriptions
188
189 ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
190
191 ;Assign descriptions to sections
192 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
193 !insertmacro MUI_DESCRIPTION_TEXT ${Base} "Základní soubory"
194 !insertmacro MUI_DESCRIPTION_TEXT ${Fonts} "Fonty do hry, pro správné zobrazování diakritiky"
195 !insertmacro MUI_DESCRIPTION_TEXT ${Interface} "Přeloží Rozhraní, Kouzla, Herní tipy, Úspěchy, Místa, Rasy postav aj."
196 !insertmacro MUI_DESCRIPTION_TEXT ${Addon} "Přeloží Výpravy, Slova NPC, Knížky aj."
197 !insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortCut} "Přidá zástupce do Nabídky start pro snadné použití"
198 !insertmacro MUI_DESCRIPTION_TEXT ${DesktopShortCut} "Přidá zástupce na plochu"
199 !insertmacro MUI_DESCRIPTION_TEXT ${ShowChangeLog} "Zobrazí informace o vydání"
200 !insertmacro MUI_DESCRIPTION_TEXT ${DeleteWDBCache} "Smaže vyrovnávací paměť v podsložece cache\WDB ve složce hry. Ve zde ukládaných souborech se uchovávají anglické texty přijaté ze serveru. Při změně připojení mezi servery anglickými a českými servery je potřeba obsah této složky vymazat."
201 !insertmacro MUI_FUNCTION_DESCRIPTION_END
202
203
204;--------------------------------
205;Uninstaller Section
206
207Section "Uninstall"
208
209 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
210
211 Delete "$DESKTOP\${TITLE}.lnk"
212
213 RMDir /r "$SMPROGRAMS\${FULL_TITLE}"
214 Delete "$INSTDIR\WowLua.exe"
215
216 IfFileExists "$INSTDIR\Data\enGB\*.*" 0 +3
217 Delete "$INSTDIR\Data\enGB\wow-update-enGB-50000.MPQ"
218 Goto +2
219 Delete "$INSTDIR\Data\enUS\wow-update-enUS-50000.MPQ"
220
221 Delete "$INSTDIR\Data\wow-update-base-50000.MPQ"
222
223 Delete "$INSTDIR\Interface\AddOns\CzWoW\*"
224
225 Delete "$INSTDIR\${README}"
226 Delete "$INSTDIR\Uninstall.exe"
227
228 DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
229
230SectionEnd
231
232;--------------------------------
233;Uninstaller Functions
234
235Function un.onInit
236
237 !insertmacro MUI_UNGETLANGUAGE
238
239FunctionEnd
Note: See TracBrowser for help on using the repository browser.