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 |
|
---|
75 | Section "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 |
|
---|
102 | SectionEnd
|
---|
103 |
|
---|
104 | Section "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 |
|
---|
115 | SectionEnd
|
---|
116 |
|
---|
117 | Section "Addon" Addon
|
---|
118 |
|
---|
119 | SetOutPath "$INSTDIR\Interface\AddOns\CzWoW"
|
---|
120 | file "CzWoW\*"
|
---|
121 |
|
---|
122 | SectionEnd
|
---|
123 |
|
---|
124 | Section "Fonts" Fonts
|
---|
125 |
|
---|
126 | SetOutPath "$INSTDIR\Data\Fonts"
|
---|
127 | file "Fonts\*"
|
---|
128 |
|
---|
129 | SectionEnd
|
---|
130 |
|
---|
131 | Section "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 |
|
---|
144 | SectionEnd
|
---|
145 |
|
---|
146 | Section "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 |
|
---|
154 | SectionEnd
|
---|
155 |
|
---|
156 | Section "Zobrazit informace" ShowChangeLog
|
---|
157 |
|
---|
158 | SetDetailsPrint textonly
|
---|
159 | DetailPrint "Zobrazuji doplňující informace..."
|
---|
160 | SetDetailsPrint listonly
|
---|
161 |
|
---|
162 | ExecShell "open" "$INSTDIR\${README}"
|
---|
163 |
|
---|
164 | SectionEnd
|
---|
165 |
|
---|
166 | Section "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 |
|
---|
174 | SectionEnd
|
---|
175 |
|
---|
176 |
|
---|
177 | ;--------------------------------
|
---|
178 | ;Installer Functions
|
---|
179 |
|
---|
180 | Function .onInit
|
---|
181 |
|
---|
182 | !insertmacro MUI_LANGDLL_DISPLAY
|
---|
183 |
|
---|
184 | FunctionEnd
|
---|
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 |
|
---|
207 | Section "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 |
|
---|
230 | SectionEnd
|
---|
231 |
|
---|
232 | ;--------------------------------
|
---|
233 | ;Uninstaller Functions
|
---|
234 |
|
---|
235 | Function un.onInit
|
---|
236 |
|
---|
237 | !insertmacro MUI_UNGETLANGUAGE
|
---|
238 |
|
---|
239 | FunctionEnd
|
---|