1;NSIS Modern User Interface version 1.69 2;Original templates by Joost Verburg 3;Redesigned for BZFlag by blast007 4 5;-------------------------------- 6;BZFlag Version Variables 7 8 !define VER_MAJOR 2 9 !define VER_MINOR 4 10 !define VER_REVISION 22 11 12 !define TYPE "release" 13 ;!define TYPE "alpha" 14 ;!define TYPE "beta" 15 ;!define TYPE "devel" 16 ;!define TYPE "RC" 17 18 !define TYPE_REVISION "0" 19 20 ;Allow manually specifying a date for the installer. This only works if the 21 ;minor or revision version numbers are odd. Uses YYYYMMDD format. Uncomment 22 ;to use. Don't commit changes to this into Git. 23 ;!define DATE_OVERRIDE 20150101 24 25;-------------------------------- 26;Includes 27 28 ; Modern UI 29 !include "MUI2.nsh" 30 31 ; Windows Version Detection 32 !include "WinVer.nsh" 33 34;-------------------------------- 35;Automatically generated version variables 36 37 ; Include the date for alpha/beta/RC builds 38 !if ${TYPE} != "release" 39 !if ${TYPE} != "devel" 40 !define VERSION_TAIL "-${TYPE}${TYPE_REVISION}" 41 !else 42 !define VERSION_TAIL "" 43 !endif 44 !ifndef DATE_OVERRIDE 45 !define /date VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.%Y%m%d${VERSION_TAIL}" 46 !else 47 !define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${DATE_OVERRIDE}${VERSION_TAIL}" 48 !endif 49 !else 50 !define VERSION "${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}" 51 !endif 52 53 !ifdef BUILD_64 54 !define PLATFORM x64 55 !define RUNTIME_PLATFORM x64 56 !define BITNESS 64Bit 57 !else 58 !define PLATFORM Win32 59 !define RUNTIME_PLATFORM x86 60 !define BITNESS 32Bit 61 !endif 62 63;-------------------------------- 64;Compression options 65 66 ;If you want to comment these 67 ;out while testing, it speeds 68 ;up the installer compile time 69 ;Uncomment to reduce installer 70 ;size by ~35% 71 SetCompress auto 72 SetCompressor /SOLID lzma 73 74;-------------------------------- 75;Configuration 76 77 ; Installer output file and default installation folder 78 !ifdef BUILD_64 79 Name "BZFlag ${VERSION} ${BITNESS}" 80 OutFile "..\..\..\bin_Release_x64\bzflag-${VERSION}_${BITNESS}.exe" 81 InstallDir "$PROGRAMFILES64\BZFlag ${VERSION} ${BITNESS}" 82 !else 83 Name "BZFlag ${VERSION}" 84 OutFile "..\..\..\bin_Release_Win32\bzflag-${VERSION}.exe" 85 InstallDir "$PROGRAMFILES32\BZFlag ${VERSION}" 86 !endif 87 88 ; Make it look pretty in XP 89 XPStyle on 90 91 ; The installer needs administrative rights 92 RequestExecutionLevel admin 93 94;-------------------------------- 95;Variables 96 97 Var MUI_TEMP 98 Var STARTMENU_FOLDER 99 100;-------------------------------- 101;Interface Settings 102 103 ;Icons 104 !define MUI_ICON ..\..\..\MSVC\bzflag.ico 105 !define MUI_UNICON uninstall.ico 106 107 ;Bitmaps 108 !define MUI_WELCOMEFINISHPAGE_BITMAP "side.bmp" 109 !define MUI_UNWELCOMEFINISHPAGE_BITMAP "side.bmp" 110 111 !define MUI_HEADERIMAGE 112 !define MUI_HEADERIMAGE_BITMAP "header.bmp" 113 !define MUI_COMPONENTSPAGE_CHECKBITMAP "${NSISDIR}\Contrib\Graphics\Checks\simple-round2.bmp" 114 115 !define MUI_COMPONENTSPAGE_SMALLDESC 116 117 ;Show a warning before aborting install 118 !define MUI_ABORTWARNING 119 120;-------------------------------- 121;Pages 122 123 ;Welcome page configuration 124 !ifdef BUILD_64 125 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of BZFlag ${VERSION} ${BITNESS}.$\r$\n$\r$\nBZFlag is a free multiplayer multiplatform 3D tank battle game. The name stands for Battle Zone capture Flag. It runs on Irix, Linux, *BSD, Windows, Mac OS X and other platforms. It's one of the most popular games ever on Silicon Graphics machines.$\r$\n$\r$\nClick Next to continue." 126 !else 127 !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of BZFlag ${VERSION}.$\r$\n$\r$\nBZFlag is a free multiplayer multiplatform 3D tank battle game. The name stands for Battle Zone capture Flag. It runs on Irix, Linux, *BSD, Windows, Mac OS X and other platforms. It's one of the most popular games ever on Silicon Graphics machines.$\r$\n$\r$\nClick Next to continue." 128 !endif 129 130 !insertmacro MUI_PAGE_WELCOME 131 !define MUI_LICENSEPAGE_TEXT_TOP "License" 132 !insertmacro MUI_PAGE_LICENSE "copying.rtf" 133 !insertmacro MUI_PAGE_COMPONENTS 134 !insertmacro MUI_PAGE_DIRECTORY 135 136 ;Start Menu Folder Page Configuration 137 !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" 138 !ifdef BUILD_64 139 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\BZFlag ${VERSION} ${BITNESS}" 140 !else 141 !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\BZFlag ${VERSION}" 142 !endif 143 !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder" 144 145 !insertmacro MUI_PAGE_STARTMENU Application $STARTMENU_FOLDER 146 147 148 !insertmacro MUI_PAGE_INSTFILES 149 150 ;Finished page configuration 151 !define MUI_FINISHPAGE_NOAUTOCLOSE 152 153 !define MUI_FINISHPAGE_RUN 154 !define MUI_FINISHPAGE_RUN_NOTCHECKED 155 !define MUI_FINISHPAGE_RUN_TEXT "Play BZFlag now!" 156 !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink" 157 158 !define MUI_FINISHPAGE_SHOWREADME "https://www.bzflag.org/documentation/getting_started" 159 !define MUI_FINISHPAGE_SHOWREADME_TEXT "Read Getting Started" 160 !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED 161 162 !define MUI_FINISHPAGE_LINK "BZFlag Home Page" 163 !define MUI_FINISHPAGE_LINK_LOCATION "https://www.bzflag.org" 164 165 !insertmacro MUI_PAGE_FINISH 166 167 !insertmacro MUI_UNPAGE_WELCOME 168 !insertmacro MUI_UNPAGE_CONFIRM 169 !insertmacro MUI_UNPAGE_INSTFILES 170 171 !define MUI_UNFINISHPAGE_NOAUTOCLOSE 172 !insertmacro MUI_UNPAGE_FINISH 173 174;-------------------------------- 175;Languages 176 177 !insertmacro MUI_LANGUAGE "English" 178 179;-------------------------------- 180;Installer Sections 181 182Section "!BZFlag (Required)" BZFlag 183 ;Make it required 184 SectionIn RO 185 186 ; Set output path to the installation directory. 187 SetOutPath $INSTDIR 188 ; Put file there 189 File ..\..\..\bin_Release_${PLATFORM}\bzflag.exe 190 191 ; make the data dir 192 SetOutPath $INSTDIR\data 193 File ..\..\..\data\*.png 194 195 ; make the fonts dir 196 SetOutPath $INSTDIR\data\fonts 197 File ..\..\..\data\fonts\*.png 198 File ..\..\..\data\fonts\*.fmt 199 File ..\..\..\data\fonts\*.License 200 File ..\..\..\data\fonts\README 201 202 ; make the l10n dir 203 SetOutPath $INSTDIR\data\l10n 204 File ..\..\..\data\l10n\*.po 205 File ..\..\..\data\l10n\*.txt 206 207 SetOutPath $INSTDIR\data 208 File ..\..\..\data\*.png 209 210 ; make the sounds dir 211 SetOutPath $INSTDIR\data 212 File ..\..\..\data\*.wav 213 214 ; make the documentation dir 215 SetOutPath $INSTDIR\documentation 216 File /oname=Authors.txt ..\..\..\AUTHORS 217 File ..\..\..\bin_Release_${PLATFORM}\docs\bzflag.html 218 219 ; make the licenses dir 220 SetOutPath $INSTDIR\licenses 221 File /oname=BZFlag.txt ..\..\..\COPYING 222 File /oname=COPYING.LGPL.txt ..\..\..\COPYING.LGPL 223 File /oname=COPYING.MPL.txt ..\..\..\COPYING.MPL 224 File ..\..\..\bin_Release_${PLATFORM}\licenses\* 225 226 ; Add some DLL files 227 SetOutPath $INSTDIR 228 File ..\..\..\bin_Release_${PLATFORM}\libcurl.dll 229 File ..\..\..\bin_Release_${PLATFORM}\zlib1.dll 230 File ..\..\..\bin_Release_${PLATFORM}\cares.dll 231 File ..\..\..\bin_Release_${PLATFORM}\SDL2.dll 232 233 ; This requires the Visual C++ runtime file to be located in the same directory as the NSIS script. This will be 234 ; found in a location such as: 235 ; C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.12.25810 236 SetOutPath $TEMP 237 DetailPrint "Installing Visual C++ ${RUNTIME_PLATFORM} runtime" 238 File vcredist_${RUNTIME_PLATFORM}.exe 239 ExecWait "$TEMP\vcredist_${RUNTIME_PLATFORM}.exe /quiet /norestart" 240 DetailPrint "Cleaning up" 241 Delete $TEMP\vcredist_${RUNTIME_PLATFORM}.exe 242 243 ; Write the installation path into the registry 244 WriteRegStr HKLM "SOFTWARE\BZFlag ${VERSION}" "Install_Dir" "$INSTDIR" 245 246 ; Write the uninstall keys for Windows 247 !ifdef BUILD_64 248 !define UNINSTALL_REG_ROOT "Software\Microsoft\Windows\CurrentVersion\Uninstall\BZFlag ${VERSION} ${BITNESS}" 249 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "DisplayName" "BZFlag ${VERSION} ${BITNESS}" 250 !else 251 !define UNINSTALL_REG_ROOT "Software\Microsoft\Windows\CurrentVersion\Uninstall\BZFlag ${VERSION}" 252 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "DisplayName" "BZFlag ${VERSION}" 253 !endif 254 255 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "DisplayIcon" "$INSTDIR\bzflag.exe" 256 ; We're roughly 30MB installed 257 WriteRegDWORD HKLM "${UNINSTALL_REG_ROOT}" "EstimatedSize" 30720 258 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "HelpLink" "https://www.bzflag.org/" 259 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "Comments" "Online multiplayer tank battle game" 260 WriteRegDWORD HKLM "${UNINSTALL_REG_ROOT}" "NoRepair" 1 261 WriteRegDWORD HKLM "${UNINSTALL_REG_ROOT}" "NoModify" 1 262 WriteRegStr HKLM "${UNINSTALL_REG_ROOT}" "UninstallString" '"$INSTDIR\uninstall.exe"' 263 264 ;Create uninstaller 265 WriteUninstaller "$INSTDIR\Uninstall.exe" 266 267 268 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 269 ;Create for all users 270 SetShellVarContext all 271 272 ;Main start menu shortcuts 273 SetOutPath $INSTDIR 274 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" 275 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 276 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\BZFlag ${VERSION}.lnk" "$INSTDIR\bzflag.exe" "" "$INSTDIR\bzflag.exe" 0 277 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\BZFlag ${VERSION} (800x600 Windowed).lnk" "$INSTDIR\bzflag.exe" "-window 800x600" "$INSTDIR\bzflag.exe" 0 278 279 ; Local User Data 280 Var /GLOBAL UserData 281 StrCpy $UserData "%LOCALAPPDATA%\BZFlag" 282 283 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Browse User Data.lnk" "$UserData" 284 285 SetOutPath $INSTDIR\documentation 286 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation" 287 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation\BZFlag [game] Manual Pages (HTML).lnk" "$INSTDIR\documentation\bzflag.html" "" "" 0 288 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation\Credits.lnk" "$INSTDIR\documentation\Authors.txt" "" "" 0 289 290 !insertmacro MUI_STARTMENU_WRITE_END 291 292SectionEnd 293 294Section "BZAdmin" BZAdmin 295 ; Set output path to the installation directory. 296 SetOutPath $INSTDIR 297 ; Put file there 298 File ..\..\..\bin_Release_${PLATFORM}\bzadmin.exe 299 300 ; Add to the documentation dir 301 SetOutPath $INSTDIR\documentation 302 File ..\..\..\bin_Release_${PLATFORM}\docs\bzadmin.html 303 304 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 305 306 ;Create for all users 307 SetShellVarContext all 308 309 ;Main start menu shortcuts 310 SetOutPath $INSTDIR 311 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER" 312 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\BZAdmin ${VERSION}.lnk" "$INSTDIR\bzadmin.exe" "" "$INSTDIR\bzadmin.exe" 0 313 314 SetOutPath $INSTDIR\documentation 315 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation" 316 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation\bzadmin [admin] Manual Pages (HTML).lnk" "$INSTDIR\documentation\bzadmin.html" "" "" 0 317 318 !insertmacro MUI_STARTMENU_WRITE_END 319SectionEnd 320 321SectionGroup "BZFlag Server" BZFlagServer 322 Section "Server Application" BZFlagServer_Application 323 ; Set output path to the installation directory. 324 SetOutPath $INSTDIR 325 ; Put file there 326 File ..\..\..\bin_Release_${PLATFORM}\bzfs.exe 327 328 ; add to the data dir 329 SetOutPath $INSTDIR\misc 330 File ..\..\..\misc\maps\hix.bzw 331 File ..\..\..\misc\bzfs.conf 332 File ..\..\..\misc\groups.conf 333 File ..\..\..\misc\vars.txt 334 335 ; Add to the documentation dir 336 SetOutPath $INSTDIR\documentation 337 File ..\..\..\bin_Release_${PLATFORM}\docs\bzfs.html 338 File ..\..\..\bin_Release_${PLATFORM}\docs\bzw.html 339 340 !insertmacro MUI_STARTMENU_WRITE_BEGIN Application 341 342 ;Create for all users 343 SetShellVarContext all 344 345 ;Main start menu shortcuts 346 SetOutPath $INSTDIR 347 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Server" 348 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Server\Start Server (Simple Jump Teleport 1 shot).lnk" "$INSTDIR\bzfs.exe" "-p 5154 -j -t -s 32 +s 16 -h" "$INSTDIR\bzflag.exe" 0 349 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Server\Start Server (Simple Jump Teleport 3 shots).lnk" "$INSTDIR\bzfs.exe" "-p 5154 -j -t -ms 3 -s 32 +s 16 -h" "$INSTDIR\bzflag.exe" 0 350 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Server\Start Server (HiX 2.0 FFA).lnk" "$INSTDIR\bzfs.exe" '-p 5154 -j -tkkr 80 -fb -ms 3 -s 32 +s 16 -world misc\hix.bzw' "$INSTDIR\bzflag.exe" 0 351 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Server\Start Server (HiX 2.0 CTF).lnk" "$INSTDIR\bzfs.exe" '-p 5154 -c -j -fb -world misc\hix.bzw' "$INSTDIR\bzflag.exe" 0 352 353 SetOutPath $INSTDIR\documentation 354 CreateDirectory "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation" 355 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation\bzfs [server] Manual Pages (HTML).lnk" "$INSTDIR\documentation\bzfs.html" "" "" 0 356 CreateShortCut "$SMPROGRAMS\$STARTMENU_FOLDER\Documentation\bzw [maps] Manual Pages (HTML).lnk" "$INSTDIR\documentation\bzw.html" "" "" 0 357 358 !insertmacro MUI_STARTMENU_WRITE_END 359 SectionEnd 360 361 Section "Plugins" BZFlagServer_Plugins 362 ; Include the plugins 363 SetOutPath $INSTDIR 364 File ..\..\..\bin_Release_${PLATFORM}\plugins\*.dll 365 File ..\..\..\bin_Release_${PLATFORM}\plugins\*.txt 366 File ..\..\..\bin_Release_${PLATFORM}\plugins\*.cfg 367 SectionEnd 368 369 Section "Plugin API" BZFlagServer_PluginAPI 370 ; Add the API library and header 371 SetOutPath $INSTDIR\API 372 File ..\..\..\bin_Release_${PLATFORM}\bzfs.lib 373 File ..\..\..\bin_Release_${PLATFORM}\plugin_utils.lib 374 File ..\..\..\include\bzfsAPI.h 375 File ..\..\..\plugins\plugin_utils\*.h 376 SectionEnd 377SectionGroupEnd 378 379Section "Desktop Icon" Desktop 380 ; Install for all users 381 SetShellVarContext all 382 383 ;shortcut on the "desktop" 384 SetOutPath $INSTDIR 385 !ifdef BUILD_64 386 CreateShortCut "$DESKTOP\BZFlag ${VERSION} ${BITNESS}.lnk" "$INSTDIR\bzflag.exe" "" "$INSTDIR\bzflag.exe" 0 387 !else 388 CreateShortCut "$DESKTOP\BZFlag ${VERSION}.lnk" "$INSTDIR\bzflag.exe" "" "$INSTDIR\bzflag.exe" 0 389 !endif 390SectionEnd 391 392;-------------------------------- 393;Descriptions 394 395 ;Language strings 396 LangString DESC_BZFlag ${LANG_ENGLISH} "Installs the main 3D application and the associated data files." 397 LangString DESC_BZAdmin ${LANG_ENGLISH} "Installs the command line administration tool." 398 LangString DESC_BZFlagServer ${LANG_ENGLISH} "Installs the server application, associated plugins, and/or the plugin API." 399 LangString DESC_BZFlagServer_Application ${LANG_ENGLISH} "This can be used to run private and public servers, but is not required to play the game." 400 LangString DESC_BZFlagServer_Plugins ${LANG_ENGLISH} "Plugins can be used to modify the way a bzflag server runs, and add functionality." 401 LangString DESC_BZFlagServer_PluginAPI ${LANG_ENGLISH} "The plugin API is used to compile plugins, and is only need for plugin developers." 402 LangString DESC_Desktop ${LANG_ENGLISH} "Adds a shortcut on the desktop." 403 404 ;Assign language strings to sections 405 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 406 !insertmacro MUI_DESCRIPTION_TEXT ${BZFlag} $(DESC_BZFlag) 407 !insertmacro MUI_DESCRIPTION_TEXT ${BZAdmin} $(DESC_BZAdmin) 408 !insertmacro MUI_DESCRIPTION_TEXT ${BZFlagServer} $(DESC_BZFlagServer) 409 !insertmacro MUI_DESCRIPTION_TEXT ${BZFlagServer_Application} $(DESC_BZFlagServer_Application) 410 !insertmacro MUI_DESCRIPTION_TEXT ${BZFlagServer_Plugins} $(DESC_BZFlagServer_Plugins) 411 !insertmacro MUI_DESCRIPTION_TEXT ${BZFlagServer_PluginAPI} $(DESC_BZFlagServer_PluginAPI) 412 !insertmacro MUI_DESCRIPTION_TEXT ${Desktop} $(DESC_Desktop) 413 !insertmacro MUI_FUNCTION_DESCRIPTION_END 414 415;-------------------------------- 416;Uninstaller Section 417 418Section "Uninstall" 419 ;Remove for all users 420 SetShellVarContext all 421 422 ; remove files 423 Delete $INSTDIR\*.* 424 Delete $INSTDIR\documentation\*.* 425 Delete $INSTDIR\misc\*.* 426 Delete $INSTDIR\data\*.* 427 Delete $INSTDIR\data\fonts\*.* 428 Delete $INSTDIR\data\l10n\*.* 429 Delete $INSTDIR\data\*.* 430 431 Delete $INSTDIR\API\*.* 432 433 ; MUST REMOVE UNINSTALLER, too 434 Delete $INSTDIR\uninstall.exe 435 436 437 ; remove directories used. 438 RMDir "$INSTDIR\API" 439 RMDir /r "$INSTDIR\data" 440 RMDir "$INSTDIR\misc" 441 RMDir "$INSTDIR\documentation" 442 RMDir /r "$INSTDIR\licenses" 443 RMDir "$INSTDIR" 444 445 !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP 446 447 ;remove shortcuts, if any. 448 Delete "$SMPROGRAMS\$MUI_TEMP\*.*" 449 Delete "$SMPROGRAMS\$MUI_TEMP\Server\*.*" 450 Delete "$SMPROGRAMS\$MUI_TEMP\Documentation\*.*" 451 RMDir "$SMPROGRAMS\$MUI_TEMP\Server" 452 RMDir "$SMPROGRAMS\$MUI_TEMP\Documentation" 453 RMDir "$SMPROGRAMS\$MUI_TEMP" 454 455 ;Delete empty start menu parent diretories 456 StrCpy $MUI_TEMP "$SMPROGRAMS\$MUI_TEMP" 457 458 startMenuDeleteLoop: 459 RMDir $MUI_TEMP 460 GetFullPathName $MUI_TEMP "$MUI_TEMP\.." 461 462 IfErrors startMenuDeleteLoopDone 463 464 StrCmp $MUI_TEMP $SMPROGRAMS startMenuDeleteLoopDone startMenuDeleteLoop 465 startMenuDeleteLoopDone: 466 467 ; Remove desktop shortcut 468 !ifdef BUILD_64 469 Delete "$DESKTOP\BZFlag ${VERSION} ${BITNESS}.lnk" 470 !else 471 Delete "$DESKTOP\BZFlag ${VERSION}.lnk" 472 !endif 473 474 ;remove registry keys 475 !ifdef BUILD_64 476 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BZFlag ${VERSION} ${BITNESS}" 477 DeleteRegKey HKLM "SOFTWARE\BZFlag ${VERSION} ${BITNESS}" 478 !else 479 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BZFlag ${VERSION}" 480 DeleteRegKey HKLM "SOFTWARE\BZFlag ${VERSION}" 481 !endif 482 ; This deletes a key that stored the current running path of BZFlag, which was/is used by Xfire 483 DeleteRegKey HKCU "Software\BZFlag" 484 485SectionEnd 486 487Function LaunchLink 488 ExecShell "" "$INSTDIR\bzflag.exe" 489FunctionEnd 490 491Function .onInit 492 ${If} ${AtMostWinXP} 493 MessageBox MB_OK "BZFlag requires Windows Vista or higher." 494 Quit 495 ${EndIf} 496FunctionEnd 497