1; Script generated by the HM NIS Edit Script Wizard. 2 3Var PACKAGEDIR 4Var UQMARGS 5Var MAKEICON 6Var UQMUSERDATA 7 8; HM NIS Edit Wizard helper defines 9!define PRODUCT_NAME "The Ur-Quan Masters" 10!define PRODUCT_VERSION "0.8.0" 11!define PRODUCT_WEB_SITE "http://sc2.sourceforge.net" 12!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\uqm.exe" 13!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 14!define PRODUCT_UNINST_ROOT_KEY "HKLM" 15!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir" 16 17; The INSTALLER_VERSION is a suffix to the version number for installer patches or to mark 18; alpha/beta/release candidate status. In normal releases it is the empty string. 19!define INSTALLER_VERSION "" 20 21; UQM Package definitions 22!include "packages.nsh" 23 24; MUI 1.67 compatible ------ 25!include "MUI.nsh" 26 27; Start using macros for block structure 28!include "LogicLib.nsh" 29 30 31; MUI Settings 32!define MUI_ABORTWARNING 33!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico" 34!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico" 35!define MUI_WELCOMEFINISHPAGE_BITMAP "orzshofixti.bmp" 36!define MUI_HEADERIMAGE 37!define MUI_HEADERIMAGE_BITMAP "ultron.bmp" 38!define MUI_HEADERIMAGE_RIGHT 39 40; UAC support 41RequestExecutionLevel admin 42 43; Welcome page 44!insertmacro MUI_PAGE_WELCOME 45; License page 46!define MUI_LICENSEPAGE_BUTTON "Install" 47!define MUI_LICENSEPAGE_TEXT_BOTTOM "Press the Install button to continue." 48!insertmacro MUI_PAGE_LICENSE "COPYING.txt" 49; Components page 50!define MUI_COMPONENTSPAGE_TEXT_COMPLIST "You can preconfigure the options to mimic the original platforms by selecting those install types. Note that more complete installs will need to download more packages." 51!insertmacro MUI_PAGE_COMPONENTS 52; Directory page 53!insertmacro MUI_PAGE_DIRECTORY 54; Package Dictory 55!define MUI_PAGE_HEADER_TEXT "Choose Package Location" 56!define MUI_PAGE_HEADER_SUBTEXT "Choose the folder that holds packages that have already been downloaded." 57!define MUI_DIRECTORYPAGE_TEXT_TOP "Setup will look for already-downloaded content packages in the following folder. To copy them from a different folder, click Browse and select another folder. If you are doing a net install, leave this field alone. Click Next to continue." 58!define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Source Folder" 59!define MUI_DIRECTORYPAGE_VARIABLE $PACKAGEDIR 60!define MUI_DIRECTORYPAGE_VERIFYONLEAVE 61!insertmacro MUI_PAGE_DIRECTORY 62; Start menu page 63var ICONS_GROUP 64!define MUI_STARTMENUPAGE_NODISABLE 65!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Games\The Ur-Quan Masters" 66!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" 67!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" 68!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}" 69!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP 70; Instfiles page 71!insertmacro MUI_PAGE_INSTFILES 72; Finish page 73!define MUI_FINISHPAGE_RUN_NOTCHECKED 74!define MUI_FINISHPAGE_NOREBOOTSUPPORT 75!define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt" 76!define MUI_FINISHPAGE_RUN "$INSTDIR\uqm.exe" 77!define MUI_FINISHPAGE_RUN_PARAMETERS $UQMARGS 78!insertmacro MUI_PAGE_FINISH 79 80; Uninstaller pages 81!define MUI_UNCONFIRMPAGE_TEXT_TOP "This program will now uninstall The Ur-Quan Masters entirely. If you wish to preserve content or expansion packs, select Cancel now and back them up. Otherwise, press Uninstall to continue." 82!insertmacro MUI_UNPAGE_CONFIRM 83!insertmacro MUI_UNPAGE_INSTFILES 84 85; Language files 86!insertmacro MUI_LANGUAGE "English" 87 88; MUI end ------ 89 90Name "${PRODUCT_NAME} ${PRODUCT_VERSION}" 91OutFile "uqm-${PRODUCT_VERSION}${INSTALLER_VERSION}-installer.exe" 92InstallDir "$PROGRAMFILES\The Ur-Quan Masters\" 93InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" "" 94ShowInstDetails show 95ShowUnInstDetails show 96AllowRootDirInstall true 97DirText "" "" "" "Please select a folder." 98InstType "Typical" 99InstType "Minimal" 100InstType "Mimic PC" 101InstType "Mimic 3DO" 102InstType "No Content" 103InstType "All Expansions" 104 105Function .onInit 106 Push $0 107 StrCpy $PACKAGEDIR $EXEDIR 108 StrCpy $UQMARGS "" 109 StrCpy $MAKEICON 0 110 ReadEnvStr $0 APPDATA 111 ${If} $0 == "" 112 ReadEnvStr $0 USERPROFILE 113 ${If} $0 == "" 114 StrCpy $UQMUSERDATA "$INSTDIR\userdata\uqm" 115 ${Else} 116 ExpandEnvStrings $UQMUSERDATA "%USERPROFILE%\Application Data\uqm" 117 ${EndIf} 118 ${Else} 119 ExpandEnvStrings $UQMUSERDATA "%APPDATA%\uqm" 120 ${EndIf} 121FunctionEnd 122 123# To use: 124# Push the file name. 125# Push the installation location. 126# It will install it from the Package Directory if necessary; otherwise it 127# will download it to a temp file and install that. 128Var DOWNLOADTARGET 129Var MANDATORY 130Var MD5SUM 131Var DOWNLOADPATH 132Function HandlePackage 133 Exch $0 # File location 134 Exch 135 Exch $1 # File name 136 Push $2 137 Push $3 138 StrCpy $R9 0 # failure count 139 # Check to make sure the file wasn't already installed 140 ${If} ${FileExists} "$0\$1" 141 md5dll::GetFileMD5 "$0\$1" 142 Pop $3 143 ${If} $MD5SUM == $3 144 MessageBox MB_ICONINFORMATION|MB_OK "The package $1 has already been installed." 145 Goto PackageDone 146 ${EndIf} 147 ${EndIf} 148 # It's not installed, so check if it's in the package dir. 149 SetOutPath "$0" 150 SetOverwrite ifdiff 151 ${If} ${FileExists} "$PACKAGEDIR\$1" 152 md5dll::GetFileMD5 "$PACKAGEDIR\$1" 153 Pop $3 154 ${If} $MD5SUM != $3 155 MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1 appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone 156 ${EndIf} 157 CopyFiles "$PACKAGEDIR\$1" "$0\$1" 158 Goto PackageDone 159 ${EndIf} 160 # It's not in the package dir, but check if it's there but an over-helpful 161 # browser stuck a .zip at the end 162 ${If} ${FileExists} "$PACKAGEDIR\$1.zip" 163 md5dll::GetFileMD5 "$PACKAGEDIR\$1.zip" 164 Pop $3 165 ${If} $MD5SUM != $3 166 MessageBox MB_ICONINFORMATION|MB_OKCANCEL "The file $PACKAGEDIR\$1.zip appears to be corrupt. The expected MD5 sum was '$MD5SUM', but the actual MD5 sum was '$3'. Press OK to attempt to download a fresh copy from the distribution site, or Cancel to skip the package." IDOK AttemptDownload IDCANCEL PackageDone 167 ${EndIf} 168 CopyFiles "$PACKAGEDIR\$1.zip" "$0\$1" 169 Goto PackageDone 170 ${EndIf} 171 172 # We're now in a loop of trying to download the file until the user gives 173 # up. Since the only way to iterate through the loop more than once is to 174 # have the user reply to a message box, this loop is still marked by a 175 # label instead of being part of a Do/Loop macro. 176AttemptDownload: 177 GetTempFileName $DOWNLOADTARGET 178 Delete $DOWNLOADTARGET 179 CreateDirectory $DOWNLOADTARGET 180 inetc::get "https://downloads.sourceforge.net/project/sc2/$DOWNLOADPATH$1" "$DOWNLOADTARGET/$1" /END 181 Pop $2 182 ${If} $2 == "OK" 183 # Download completed. Confirm the MD5 sum is OK. 184 md5dll::GetFileMD5 "$DOWNLOADTARGET\$1" 185 Pop $3 186 ${If} $MD5SUM != $3 187 ${If} $MANDATORY != 0 188 StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." 189 ${Else} 190 StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." 191 ${EndIf} 192 MessageBox MB_ICONEXCLAMATION|MB_YESNO "The downloaded file $1 doesn't match the internal MD5 sum. This probably means the download was corrupt. $3 Do you want to retry from a different mirror? (Select NO to install the downloaded package anyway - for instance, if you know that the content pack was upgraded or modified since.)" IDYES AttemptDownload 193 ${EndIf} 194 CopyFiles "$DOWNLOADTARGET\$1" "$0\$1" 195 ${Else} 196 ${If} $2 == "Cancelled" 197 StrCpy $2 "Download was canceled by user." 198 ${Else} 199 StrCpy $2 "Could not install the package $1 due to the following error: $\"$2$\"." 200 ${EndIf} 201 ${If} $MANDATORY != 0 202 StrCpy $3 "THIS IS A MANDATORY PACKAGE. Without this package, $(^Name) will NOT run." 203 ${Else} 204 StrCpy $3 "This is an optional package. $(^Name) will still run, but some content will not be available." 205 ${EndIf} 206 MessageBox MB_ICONEXCLAMATION|MB_YESNO "$2 $3 Do you want to retry from a different mirror?" IDYES AttemptDownload 207 ${EndIf} 208 RmDir /r $DOWNLOADTARGET 209PackageDone: 210 Pop $3 211 Pop $2 212 Pop $1 213 Pop $0 214FunctionEnd 215 216# Usage: 217# Push the file name, preferrably a full path. 218# Push the string to be appended 219# Any errors during appending will be ignored. 220Function AppendToFile 221 Exch $0 # string to append 222 Exch 223 Exch $1 # File name 224 Push $2 # using $2 for file handle 225 FileOpen $2 $1 a 226 ${Unless} ${Errors} 227 FileSeek $2 0 END # seek to end 228 FileWrite $2 $0 229 FileClose $2 230 ${EndUnless} 231 Pop $2 232 Pop $1 233 Pop $0 234FunctionEnd 235 236Function EnableRemixes 237 # If there are errors pending AppendToFile will fail 238 ClearErrors 239 Push "$UQMUSERDATA\uqm.cfg" 240 Push "remixmusic = BOOLEAN:true$\r$\n" 241 Call AppendToFile 242 ClearErrors 243FunctionEnd 244 245SectionGroup "!UQM" SECGRP01 246 Section "Executable" SEC01 247 SectionIn 1 2 3 4 5 6 RO 248 SetOutPath "$INSTDIR" 249 SetOverwrite try 250 File "AUTHORS.txt" 251 File "COPYING.txt" 252 File "Manual.txt" 253 File "README.txt" 254 File "README-SDL.txt" 255 File "WhatsNew.txt" 256!include "dlls.nsi" 257 258 SetOutPath $UQMUSERDATA 259 SetOverwrite try 260 File "uqm-pc.cfg" 261 File "uqm-3do.cfg" 262 263 # Delete old content 264 Delete "$INSTDIR\content\packages\uqm-0.3-3domusic.zip" 265 Delete "$INSTDIR\content\packages\uqm-0.3-voice.zip" 266 Delete "$INSTDIR\content\packages\uqm-0.3-content.zip" 267 Delete "$INSTDIR\content\packages\uqm-0.4.0-3domusic.uqm" 268 Delete "$INSTDIR\content\packages\uqm-0.4.0-voice.uqm" 269 Delete "$INSTDIR\content\packages\uqm-0.4.0-content.uqm" 270 Delete "$INSTDIR\content\packages\uqm-0.5.0-3domusic.uqm" 271 Delete "$INSTDIR\content\packages\uqm-0.5.0-voice.uqm" 272 Delete "$INSTDIR\content\packages\uqm-0.5.0-content.uqm" 273 Delete "$INSTDIR\content\packages\uqm-0.6.0-3domusic.uqm" 274 Delete "$INSTDIR\content\packages\uqm-0.6.0-voice.uqm" 275 Delete "$INSTDIR\content\packages\uqm-0.6.0-content.uqm" 276 Delete "$INSTDIR\content\packages\uqm-0.7.0-3domusic.uqm" 277 Delete "$INSTDIR\content\packages\uqm-0.7.0-voice.uqm" 278 Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm" 279 # and in a case of manual install and overly helpful browsers 280 Delete "$INSTDIR\content\packages\uqm-0.7.0-3domusic.uqm.zip" 281 Delete "$INSTDIR\content\packages\uqm-0.7.0-voice.uqm.zip" 282 Delete "$INSTDIR\content\packages\uqm-0.7.0-content.uqm.zip" 283 284 ; Shortcuts 285 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 286 !insertmacro MUI_STARTMENU_WRITE_END 287 SectionEnd 288 289 Section "Core Data" SEC02 290 SectionIn 1 2 3 4 6 291 CreateDirectory "$INSTDIR\content\addons" 292 SetOutPath "$INSTDIR\content" 293 SetOverwrite ifnewer 294 AddSize ${PKG_CONTENT_SIZE} 295 StrCpy $MANDATORY 1 296 StrCpy $MD5SUM "${PKG_CONTENT_MD5SUM}" 297 File "..\..\content\version" 298 StrCpy $DOWNLOADPATH "UQM/0.8/" 299 Push "${PKG_CONTENT_FILE}" 300 Push "$INSTDIR\content\packages" 301 Call HandlePackage 302 303 ; Shortcuts 304 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 305 !insertmacro MUI_STARTMENU_WRITE_END 306 SectionEnd 307 308 Section "Desktop Icon" SECICON 309 SectionIn 1 2 3 4 5 6 310 StrCpy $MAKEICON 1 311 SectionEnd 312SectionGroupEnd 313 314SectionGroup /e "3DO Content" SECGRP02 315 Section "Music" SEC03 316 SectionIn 1 4 6 317 AddSize ${PKG_3DOMUSIC_SIZE} 318 StrCpy $MANDATORY 0 319 StrCpy $MD5SUM "${PKG_3DOMUSIC_MD5SUM}" 320 StrCpy $DOWNLOADPATH "UQM/0.8/" 321 Push "${PKG_3DOMUSIC_FILE}" 322 Push "$INSTDIR\content\addons" 323 Call HandlePackage 324 ; Shortcuts 325 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 326 !insertmacro MUI_STARTMENU_WRITE_END 327 SectionEnd 328 329 Section "Voiceovers" SEC04 330 SectionIn 1 4 6 331 AddSize ${PKG_VOICE_SIZE} 332 StrCpy $MANDATORY 0 333 StrCpy $MD5SUM "${PKG_VOICE_MD5SUM}" 334 StrCpy $DOWNLOADPATH "UQM/0.8/" 335 Push "${PKG_VOICE_FILE}" 336 Push "$INSTDIR\content\addons" 337 Call HandlePackage 338 ; Shortcuts 339 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 340 !insertmacro MUI_STARTMENU_WRITE_END 341 SectionEnd 342SectionGroupEnd 343 344SectionGroup "Modern Remixes" SECGRP03 345 Section "Pack 1" SEC05 346 SectionIn 6 347 AddSize ${PKG_REMIX1_SIZE} 348 StrCpy $MANDATORY 0 349 StrCpy $MD5SUM "${PKG_REMIX1_MD5SUM}" 350 StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%201/" 351 Push "${PKG_REMIX1_FILE}" 352 Push "$INSTDIR\content\addons" 353 Call HandlePackage 354 Call EnableRemixes 355 ; Shortcuts 356 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 357 !insertmacro MUI_STARTMENU_WRITE_END 358 SectionEnd 359 360 Section "Pack 2" SEC06 361 SectionIn 6 362 AddSize ${PKG_REMIX2_SIZE} 363 StrCpy $MANDATORY 0 364 StrCpy $MD5SUM "${PKG_REMIX2_MD5SUM}" 365 StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%202/" 366 Push "${PKG_REMIX2_FILE}" 367 Push "$INSTDIR\content\addons" 368 Call HandlePackage 369 Call EnableRemixes 370 ; Shortcuts 371 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 372 !insertmacro MUI_STARTMENU_WRITE_END 373 SectionEnd 374 375 Section "Pack 3" SEC07 376 SectionIn 6 377 AddSize ${PKG_REMIX3_SIZE} 378 StrCpy $MANDATORY 0 379 StrCpy $MD5SUM "${PKG_REMIX3_MD5SUM}" 380 StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%203/" 381 Push "${PKG_REMIX3_FILE}" 382 Push "$INSTDIR\content\addons" 383 Call HandlePackage 384 Call EnableRemixes 385 ; Shortcuts 386 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 387 !insertmacro MUI_STARTMENU_WRITE_END 388 SectionEnd 389 390 Section "Pack 4" SEC08 391 SectionIn 6 392 AddSize ${PKG_REMIX4_SIZE} 393 StrCpy $MANDATORY 0 394 StrCpy $MD5SUM "${PKG_REMIX4_MD5SUM}" 395 StrCpy $DOWNLOADPATH "UQM%20Remix%20Packs/UQM%20Remix%20Pack%204/" 396 Push "${PKG_REMIX4_FILE}" 397 Push "$INSTDIR\content\addons" 398 Call HandlePackage 399 Call EnableRemixes 400 ; Shortcuts 401 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 402 !insertmacro MUI_STARTMENU_WRITE_END 403 SectionEnd 404SectionGroupEnd 405 406Section -ShortcutsAndIcons 407 SetOutPath $INSTDIR 408 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 409 CreateDirectory "$SMPROGRAMS\$ICONS_GROUP" 410 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS 411 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" "$INSTDIR\uqm.exe" "-x --safe" 412 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" "$INSTDIR\uqm.exe" "-o --safe" 413 CreateDirectory "$SMPROGRAMS\$ICONS_GROUP\Documentation" 414 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" "$INSTDIR\AUTHORS.txt" 415 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" "$INSTDIR\COPYING.txt" 416 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" "$INSTDIR\Manual.txt" 417 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" "$INSTDIR\README.txt" 418 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" "$INSTDIR\WhatsNew.txt" 419 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" "$INSTDIR\keyjam.exe" 420 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" "$UQMUSERDATA\save" 421 ${If} $MAKEICON = 1 422 CreateShortCut "$DESKTOP\The Ur-Quan Masters.lnk" "$INSTDIR\uqm.exe" $UQMARGS 423 ${EndIf} 424 CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe" 425 !insertmacro MUI_STARTMENU_WRITE_END 426SectionEnd 427 428Section -Set3DOConfig 429 SectionIn 4 430 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 431 SetOutPath $UQMUSERDATA 432 Delete "uqm.cfg" 433 CopyFiles "$UQMUSERDATA\uqm-3do.cfg" "$UQMUSERDATA\uqm.cfg" 434 !insertmacro MUI_STARTMENU_WRITE_END 435SectionEnd 436 437Section -SetPCConfig 438 SectionIn 3 439 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 440 SetOutPath $UQMUSERDATA 441 Delete "uqm.cfg" 442 CopyFiles "$UQMUSERDATA\uqm-pc.cfg" "$UQMUSERDATA\uqm.cfg" 443 !insertmacro MUI_STARTMENU_WRITE_END 444SectionEnd 445 446Section -SetRemixConfig 447 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 448 !insertmacro MUI_STARTMENU_WRITE_END 449SectionEnd 450 451Section -Post 452 WriteUninstaller "$INSTDIR\uninst.exe" 453 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\uqm.exe" 454 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" 455 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" 456 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\uqm.exe" 457 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 458 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 459SectionEnd 460 461; Section descriptions 462!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 463 !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP01} "The core executables and content libraries for The Ur-Quan Masters. All elements in this section must be installed for the game to be playable." 464 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "Includes the main program, all subsidiary libraries, and basic documentation for The Ur-Quan Masters. Required for play." 465 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02} "Graphics, sound, and the PC-edition music for The Ur-Quan Masters. Required for play. If this package is selected and not present in the packages directory, the installer will attempt to download it." 466 !insertmacro MUI_DESCRIPTION_TEXT ${SECICON} "Adds a desktop icon linking directly to The Ur-Quan Masters." 467 !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP02} "Optional content packages containing music and sound unique to the 1993 3DO release." 468 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "Optional package which includes the remixed songs from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." 469 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} "Optional package containing the voiceovers from the 3DO release. If this package is selected and not present in the packages directory, the installer will attempt to download it." 470 !insertmacro MUI_DESCRIPTION_TEXT ${SECGRP03} "Optional content packages containing the official UQM remixes by The Precursors. Selecting any element from this group will also enable the 'remix' addon by default in the starting configuration." 471 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} `Ur-Quan Masters Remix Pack 1 - 'Super Melee!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` 472 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} `Ur-Quan Masters Remix Pack 2 - 'Neutral Aliens - Don't Shoot!' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` 473 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} `Ur-Quan Masters Remix Pack 3 - 'The Ur-Quan Hierarchy.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` 474 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} `Ur-Quan Masters Remix Pack 4 - 'The New Alliance of Free Stars.' Optional add-on music package. If this package is selected and not present in the packages directory, the installer will attempt to download it.` 475!insertmacro MUI_FUNCTION_DESCRIPTION_END 476 477 478Function un.onUninstSuccess 479 HideWindow 480 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." 481FunctionEnd 482 483Function un.onInit 484 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2 485 Abort 486FunctionEnd 487 488Section Uninstall 489 !insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP 490 Delete "$INSTDIR\uninst.exe" 491 Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack4.zip" 492 Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack3.zip" 493 Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack2.zip" 494 Delete "$INSTDIR\content\packages\addons\remix\uqm-remix-pack1.zip" 495 Delete "$INSTDIR\content\addons\uqm-remix-disc4-1.uqm" 496 Delete "$INSTDIR\content\addons\uqm-remix-disc4.uqm" 497 Delete "$INSTDIR\content\addons\uqm-remix-disc3.uqm" 498 Delete "$INSTDIR\content\addons\uqm-remix-disc2.uqm" 499 Delete "$INSTDIR\content\addons\uqm-remix-disc1.uqm" 500 Delete "$INSTDIR\content\addons\${PKG_VOICE_FILE}" 501 Delete "$INSTDIR\content\addons\${PKG_3DOMUSIC_FILE}" 502 Delete "$INSTDIR\content\packages\${PKG_CONTENT_FILE}" 503 Delete "$INSTDIR\content\version" 504 Delete "$INSTDIR\zlib.dll" 505 Delete "$INSTDIR\zlib1.dll" 506 Delete "$INSTDIR\WhatsNew.txt" 507 Delete "$INSTDIR\vorbisfile.dll" 508 Delete "$INSTDIR\vorbis.dll" 509 Delete "$INSTDIR\uqm.exe" 510 Delete "$INSTDIR\keyjam.exe" 511 Delete "$INSTDIR\SDL_gfx.dll" 512 Delete "$INSTDIR\SDL_image.dll" 513 Delete "$INSTDIR\SDL.dll" 514 Delete "$INSTDIR\README.txt" 515 Delete "$INSTDIR\README-SDL.txt" 516 Delete "$INSTDIR\wrap_oal.dll" 517 Delete "$INSTDIR\OpenAL32.dll" 518 Delete "$INSTDIR\ogg.dll" 519 Delete "$INSTDIR\Manual.txt" 520 Delete "$INSTDIR\libpng13.dll" 521 Delete "$INSTDIR\libpng12.dll" 522 Delete "$INSTDIR\libpng12-0.dll" 523 Delete "$INSTDIR\COPYING.txt" 524 Delete "$INSTDIR\AUTHORS.txt" 525 Delete "$INSTDIR\stderr.txt" 526 527!include "undlls.nsi" 528 529 Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" 530 Delete "$SMPROGRAMS\$ICONS_GROUP\Options Configuration.lnk" 531 Delete "$SMPROGRAMS\$ICONS_GROUP\Key Configuration.lnk" 532 Delete "$SMPROGRAMS\$ICONS_GROUP\Keyboard Test.lnk" 533 Delete "$SMPROGRAMS\$ICONS_GROUP\Saved Games.lnk" 534 Delete "$DESKTOP\The Ur-Quan Masters.lnk" 535 Delete "$SMPROGRAMS\$ICONS_GROUP\The Ur-Quan Masters.lnk" 536 Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe Mode).lnk" 537 Delete "$SMPROGRAMS\$ICONS_GROUP\UQM (Safe OpenGL).lnk" 538 Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\AUTHORS.lnk" 539 Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\COPYING.lnk" 540 Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\Manual.lnk" 541 Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\README.lnk" 542 Delete "$SMPROGRAMS\$ICONS_GROUP\Documentation\WhatsNew.lnk" 543 544 RMDir "$SMPROGRAMS\$ICONS_GROUP\Documentation" 545 RMDir "$SMPROGRAMS\$ICONS_GROUP" 546 RMDir "$INSTDIR\content\addons" 547 RMDir "$INSTDIR\content\packages\addons\remix" 548 RMDir "$INSTDIR\content\packages\addons" 549 RMDir "$INSTDIR\content\packages" 550 RMDir "$INSTDIR\content" 551 RMDir "$INSTDIR" 552 553 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" 554 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" 555 SetAutoClose true 556SectionEnd 557