| 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.3.5a"
|
|---|
| 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 |
|
|---|
| 109 | IfFileExists "$INSTDIR\Data\enGB\*.*" 0 +3
|
|---|
| 110 | Rename "$INSTDIR\Data\patch-5.MPQ" "$INSTDIR\Data\enGB\patch-enGB-5.MPQ"
|
|---|
| 111 | Goto +2
|
|---|
| 112 | Rename "$INSTDIR\Data\patch-5.MPQ" "$INSTDIR\Data\enUS\patch-enUS-5.MPQ"
|
|---|
| 113 |
|
|---|
| 114 | SectionEnd
|
|---|
| 115 |
|
|---|
| 116 | Section "Addon" Addon
|
|---|
| 117 |
|
|---|
| 118 | SetOutPath "$INSTDIR\Interface\AddOns\CzWoW"
|
|---|
| 119 | file "CzWoW\*"
|
|---|
| 120 |
|
|---|
| 121 | SectionEnd
|
|---|
| 122 |
|
|---|
| 123 | Section "Fonts" Fonts
|
|---|
| 124 |
|
|---|
| 125 | SetOutPath "$INSTDIR\Data\Fonts"
|
|---|
| 126 | file "Fonts\*"
|
|---|
| 127 |
|
|---|
| 128 | SectionEnd
|
|---|
| 129 |
|
|---|
| 130 | Section "Zástupci nabídky Start" StartMenuShortCut
|
|---|
| 131 |
|
|---|
| 132 | SetDetailsPrint textonly
|
|---|
| 133 | DetailPrint "Instaluji Zástupce nabídky Start..."
|
|---|
| 134 | SetDetailsPrint listonly
|
|---|
| 135 |
|
|---|
| 136 | CreateDirectory "$SMPROGRAMS\${FULL_TITLE}"
|
|---|
| 137 | SetOutPath "$INSTDIR"
|
|---|
| 138 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Odinstalovat.lnk" "$INSTDIR\Uninstall.exe"
|
|---|
| 139 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\České WoW.lnk" "$INSTDIR\WowLua.exe"
|
|---|
| 140 |
|
|---|
| 141 | CreateShortCut "$SMPROGRAMS\${FULL_TITLE}\Nápověda.lnk" "$INSTDIR\${README}"
|
|---|
| 142 |
|
|---|
| 143 | SectionEnd
|
|---|
| 144 |
|
|---|
| 145 | Section "Zástupci na plochu" DesktopShortCut
|
|---|
| 146 |
|
|---|
| 147 | SetDetailsPrint textonly
|
|---|
| 148 | DetailPrint "Instaluji zástupce na plochu..."
|
|---|
| 149 | SetDetailsPrint listonly
|
|---|
| 150 |
|
|---|
| 151 | CreateShortCut "$DESKTOP\České WoW.lnk" "$INSTDIR\WowLua.exe"
|
|---|
| 152 |
|
|---|
| 153 | SectionEnd
|
|---|
| 154 |
|
|---|
| 155 | Section "Zobrazit informace" ShowChangeLog
|
|---|
| 156 |
|
|---|
| 157 | SetDetailsPrint textonly
|
|---|
| 158 | DetailPrint "Zobrazuji doplňující informace..."
|
|---|
| 159 | SetDetailsPrint listonly
|
|---|
| 160 |
|
|---|
| 161 | ExecShell "open" "$INSTDIR\${README}"
|
|---|
| 162 |
|
|---|
| 163 | SectionEnd
|
|---|
| 164 |
|
|---|
| 165 | Section "Smazat WDB cache" DeleteWDBCache
|
|---|
| 166 |
|
|---|
| 167 | SetDetailsPrint textonly
|
|---|
| 168 | DetailPrint "Mažu WDB cache..."
|
|---|
| 169 | SetDetailsPrint listonly
|
|---|
| 170 |
|
|---|
| 171 | RMDir /r "$INSTDIR\Cache\WDB"
|
|---|
| 172 |
|
|---|
| 173 | SectionEnd
|
|---|
| 174 |
|
|---|
| 175 |
|
|---|
| 176 | ;--------------------------------
|
|---|
| 177 | ;Installer Functions
|
|---|
| 178 |
|
|---|
| 179 | Function .onInit
|
|---|
| 180 |
|
|---|
| 181 | !insertmacro MUI_LANGDLL_DISPLAY
|
|---|
| 182 |
|
|---|
| 183 | FunctionEnd
|
|---|
| 184 |
|
|---|
| 185 | ;--------------------------------
|
|---|
| 186 | ;Descriptions
|
|---|
| 187 |
|
|---|
| 188 | ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC
|
|---|
| 189 |
|
|---|
| 190 | ;Assign descriptions to sections
|
|---|
| 191 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
|---|
| 192 | !insertmacro MUI_DESCRIPTION_TEXT ${Base} "Základní soubory"
|
|---|
| 193 | !insertmacro MUI_DESCRIPTION_TEXT ${Fonts} "Fonty do hry, pro správné zobrazování diakritiky"
|
|---|
| 194 | !insertmacro MUI_DESCRIPTION_TEXT ${Interface} "Přeloží Rozhraní, Kouzla, Herní tipy, Úspěchy, Místa, Rasy postav aj."
|
|---|
| 195 | !insertmacro MUI_DESCRIPTION_TEXT ${Addon} "Přeloží Výpravy, Slova NPC, Knížky aj."
|
|---|
| 196 | !insertmacro MUI_DESCRIPTION_TEXT ${StartMenuShortCut} "Přidá zástupce do Nabídky start pro snadné použití"
|
|---|
| 197 | !insertmacro MUI_DESCRIPTION_TEXT ${DesktopShortCut} "Přidá zástupce na plochu"
|
|---|
| 198 | !insertmacro MUI_DESCRIPTION_TEXT ${ShowChangeLog} "Zobrazí informace o vydání"
|
|---|
| 199 | !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."
|
|---|
| 200 | !insertmacro MUI_FUNCTION_DESCRIPTION_END
|
|---|
| 201 |
|
|---|
| 202 |
|
|---|
| 203 | ;--------------------------------
|
|---|
| 204 | ;Uninstaller Section
|
|---|
| 205 |
|
|---|
| 206 | Section "Uninstall"
|
|---|
| 207 |
|
|---|
| 208 | DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${TITLE}"
|
|---|
| 209 |
|
|---|
| 210 | Delete "$DESKTOP\${TITLE}.lnk"
|
|---|
| 211 |
|
|---|
| 212 | RMDir /r "$SMPROGRAMS\${FULL_TITLE}"
|
|---|
| 213 | Delete "$INSTDIR\WowLua.exe"
|
|---|
| 214 |
|
|---|
| 215 | IfFileExists "$INSTDIR\Data\enGB\*.*" 0 +3
|
|---|
| 216 | Delete "$INSTDIR\Data\enGB\patch-enGB-5.MPQ"
|
|---|
| 217 | Goto +2
|
|---|
| 218 | Delete "$INSTDIR\Data\enUS\patch-enUS-5.MPQ"
|
|---|
| 219 |
|
|---|
| 220 | Delete "$INSTDIR\Data\patch-5.MPQ"
|
|---|
| 221 |
|
|---|
| 222 | Delete "$INSTDIR\Interface\AddOns\CzWoW\*"
|
|---|
| 223 |
|
|---|
| 224 | Delete "$INSTDIR\${README}"
|
|---|
| 225 | Delete "$INSTDIR\Uninstall.exe"
|
|---|
| 226 |
|
|---|
| 227 | DeleteRegKey /ifempty HKCU "Software\${CREATOR}\${FULL_TITLE}"
|
|---|
| 228 |
|
|---|
| 229 | SectionEnd
|
|---|
| 230 |
|
|---|
| 231 | ;--------------------------------
|
|---|
| 232 | ;Uninstaller Functions
|
|---|
| 233 |
|
|---|
| 234 | Function un.onInit
|
|---|
| 235 |
|
|---|
| 236 | !insertmacro MUI_UNGETLANGUAGE
|
|---|
| 237 |
|
|---|
| 238 | FunctionEnd
|
|---|