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 "5.4.0"
|
---|
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 "${README}"
|
---|
93 |
|
---|
94 |
|
---|
95 | ;Store installation folder
|
---|
96 | WriteRegStr HKCU "Software\${CREATOR}\${TITLE}" "" $INSTDIR
|
---|
97 |
|
---|
98 | ;Create uninstaller
|
---|
99 | WriteUninstaller "$INSTDIR\Uninstall.exe"
|
---|
100 |
|
---|
101 | SectionEnd
|
---|
102 |
|
---|
103 | Section "Addon" Addon
|
---|
104 |
|
---|
105 | SetOutPath "$INSTDIR\Interface\AddOns\CzWoW"
|
---|
106 | file "CzWoW\*"
|
---|
107 |
|
---|
108 | SectionEnd
|
---|
109 |
|
---|
110 | Section "Fonts" Fonts
|
---|
111 |
|
---|
112 | SetOutPath "$INSTDIR\Data\Fonts"
|
---|
113 | file "Fonts\*"
|
---|
114 |
|
---|
115 | SectionEnd
|
---|
116 |
|
---|
117 |
|
---|
118 | Section "Zobrazit informace" ShowChangeLog
|
---|
119 |
|
---|
120 | SetDetailsPrint textonly
|
---|
121 | DetailPrint "Zobrazuji doplňující informace..."
|
---|
122 | SetDetailsPrint listonly
|
---|
123 |
|
---|
124 | ExecShell "open" "$INSTDIR\${README}"
|
---|
125 |
|
---|
126 | SectionEnd
|
---|
127 |
|
---|
128 | Section "Smazat WDB cache" DeleteWDBCache
|
---|
129 |
|
---|
130 | SetDetailsPrint textonly
|
---|
131 | DetailPrint "Mažu WDB cache..."
|
---|
132 | SetDetailsPrint listonly
|
---|
133 |
|
---|
134 | RMDir /r "$INSTDIR\Cache\WDB"
|
---|
135 |
|
---|
136 | SectionEnd
|
---|
137 |
|
---|
138 |
|
---|
139 | ;--------------------------------
|
---|
140 | ;Installer Functions
|
---|
141 |
|
---|
142 | Function .onInit
|
---|
143 |
|
---|
144 | !insertmacro MUI_LANGDLL_DISPLAY
|
---|
145 |
|
---|
146 | FunctionEnd
|
---|
147 |
|
---|
148 | ;--------------------------------
|
---|
149 | ;Descriptions
|
---|
150 |
|
---|
151 | ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
|
---|
152 |
|
---|
153 | ;Assign descriptions to sections
|
---|
154 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
---|
155 | !insertmacro MUI_DESCRIPTION_TEXT ${Base} "Základní soubory"
|
---|
156 | !insertmacro MUI_DESCRIPTION_TEXT ${Fonts} "Fonty do hry, pro správné zobrazování diakritiky"
|
---|
157 | !insertmacro MUI_DESCRIPTION_TEXT ${Addon} "Přeloží Výpravy, Slova NPC, Knížky aj."
|
---|
158 | !insertmacro MUI_DESCRIPTION_TEXT ${ShowChangeLog} "Zobrazí informace o vydání"
|
---|
159 | !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."
|
---|
160 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
---|
161 |
|
---|
162 |
|
---|
163 | ;--------------------------------
|
---|
164 | ;Uninstaller Section
|
---|
165 |
|
---|
166 | Section "Uninstall"
|
---|
167 |
|
---|
168 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
|
---|
169 |
|
---|
170 |
|
---|
171 | Delete "$INSTDIR\Interface\AddOns\CzWoW\*"
|
---|
172 |
|
---|
173 | Delete "$INSTDIR\${README}"
|
---|
174 | Delete "$INSTDIR\Uninstall.exe"
|
---|
175 |
|
---|
176 | DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
|
---|
177 |
|
---|
178 | SectionEnd
|
---|
179 |
|
---|
180 | ;--------------------------------
|
---|
181 | ;Uninstaller Functions
|
---|
182 |
|
---|
183 | Function un.onInit
|
---|
184 |
|
---|
185 | !insertmacro MUI_UNGETLANGUAGE
|
---|
186 |
|
---|
187 | FunctionEnd
|
---|