source/misc/install_script.nsi
browsing at commit = 0c2013005771c84be31a2b53fcd4dcddf329f159
; Script generated by the HM NIS Edit Script Wizard.
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "Block Attack - Rise Of the Blocks"
!define PRODUCT_VERSION "1.4.0"
!define PRODUCT_PUBLISHER "Poul Sander"
!define PRODUCT_WEB_SITE "http://blockattack.net"
!define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\block_attack.exe"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_STARTMENU_REGVAL "NSIS:StartMenuDir"
; MUI 1.67 compatible ------
!include "MUI.nsh"
; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
;!insertmacro MUI_PAGE_LICENSE "..\Game\COPYING.TXT"
; Components page
!insertmacro MUI_PAGE_COMPONENTS
; Directory page
!insertmacro MUI_PAGE_DIRECTORY
; Start menu page
var ICONS_GROUP
!define MUI_STARTMENUPAGE_NODISABLE
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "Block Attack - Rise Of the Blocks"
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "${PRODUCT_STARTMENU_REGVAL}"
!insertmacro MUI_PAGE_STARTMENU Application $ICONS_GROUP
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
; Finish page
!define MUI_FINISHPAGE_RUN "$INSTDIR\block_attack.exe"
!insertmacro MUI_PAGE_FINISH
; Uninstaller pages
!insertmacro MUI_UNPAGE_INSTFILES
; Language files
!insertmacro MUI_LANGUAGE "English"
; MUI end ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\Block Attack - Rise Of the Blocks"
InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
ShowInstDetails show
ShowUnInstDetails show
Section "Game Files" SEC01
SetOutPath "$INSTDIR"
SetOverwrite try
File "..\Game\block_attack.exe"
File "..\Game\libpng1.dll"
File "..\Game\SDL_image.dll"
File "..\Game\SDL_mixer.dll"
File "..\Game\SDL.dll"
File "..\Game\jpeg.dll"
File "..\Game\zlib1.dll"
File "..\Game\zlib.dll"
SetOutPath "$INSTDIR\sound"
File "..\Game\sound\pop.ogg"
File "..\Game\sound\cameraclick.ogg"
File "..\Game\sound\typing.ogg"
File "..\Game\sound\counter.ogg"
File "..\Game\sound\counterFinal.ogg"
SetOutPath "$INSTDIR\res"
File "..\Game\res\puzzle.levels"
File "..\Game\res\copy"
File "..\Game\res\testPuzzles"
SetOutPath "$INSTDIR\music"
File "..\Game\music\bgMusic.ogg"
File "..\Game\music\highbeat.ogg"
SetOutPath "$INSTDIR\gfx"
File "..\Game\gfx\mouse.png"
File "..\Game\gfx\bOff.png"
File "..\Game\gfx\iDraw.png"
File "..\Game\gfx\changeButtonsBack.png"
File "..\Game\gfx\bOptions.png"
File "..\Game\gfx\b1024.png"
File "..\Game\gfx\blackLine.png"
File "..\Game\gfx\iCheckBoxArea.png"
File "..\Game\gfx\bHost.png"
File "..\Game\gfx\bChange.png"
File "..\Game\gfx\icon.png"
File "..\Game\gfx\bBack.png"
File "..\Game\gfx\bConfigure.png"
File "..\Game\gfx\bConnect.png"
File "..\Game\gfx\bEndless.png"
File "..\Game\gfx\bExit.png"
File "..\Game\gfx\bForward.png"
File "..\Game\gfx\bReplays.png"
File "..\Game\gfx\bSave.png"
File "..\Game\gfx\bLoad.png"
File "..\Game\gfx\bNetwork.png"
File "..\Game\gfx\bHost.png"
File "..\Game\gfx\bConnect.png"
File "..\Game\gfx\bHighScore.png"
File "..\Game\gfx\bSelectPuzzle.png"
File "..\Game\gfx\BackBoard.png"
File "..\Game\gfx\options.png"
File "..\Game\gfx\bInternet.png"
File "..\Game\gfx\iStageClearLimit.png"
File "..\Game\gfx\iWinner.png"
File "..\Game\gfx\bNetwork.png"
File "..\Game\gfx\bNewGame.png"
File "..\Game\gfx\bOn.png"
File "..\Game\gfx\iLevelCheckBox.png"
File "..\Game\gfx\iLevelCheck.png"
File "..\Game\gfx\dialogbox.png"
File "..\Game\gfx\bOnePlayer.png"
File "..\Game\gfx\boardBackBack.png"
File "..\Game\gfx\bPuzzle.png"
File "..\Game\gfx\bStageClear.png"
File "..\Game\gfx\bTimeTrial.png"
File "..\Game\gfx\bTwoPlayers.png"
File "..\Game\gfx\iLoser.png"
File "..\Game\gfx\bVsGame.png"
File "..\Game\gfx\bVsGameConfig.png"
File "..\Game\gfx\crossover.png"
File "..\Game\gfx\24P_Arial_Blue.png"
File "..\Game\gfx\14P_Arial_Angle_Red.png"
File "..\Game\gfx\background.png"
File "..\Game\gfx\blockAttack.ico"
File "..\Game\gfx\transCover.png"
File "..\Game\gfx\blackBackGround.png"
File "..\Game\gfx\background.png"
File "..\Game\gfx\iGameOver.png"
File "..\Game\gfx\fileDialogbox.png"
File "..\Game\gfx\chainFrame.png"
File "..\Game\gfx\bSkip.png"
File "..\Game\gfx\bNext.png"
File "..\Game\gfx\bRetry.png"
File "..\Game\gfx\bTheme.png"
SetOutPath "$INSTDIR\gfx\bricks"
File "..\Game\gfx\bricks\yellow.png"
File "..\Game\gfx\bricks\blue.png"
File "..\Game\gfx\bricks\green.png"
File "..\Game\gfx\bricks\grey.png"
File "..\Game\gfx\bricks\purple.png"
File "..\Game\gfx\bricks\red.png"
File "..\Game\gfx\bricks\turkish.png"
SetOutPath "$INSTDIR\gfx\balls"
File "..\Game\gfx\balls\ballBlue.png"
File "..\Game\gfx\balls\ballRed.png"
File "..\Game\gfx\balls\ballGray.png"
File "..\Game\gfx\balls\ballGreen.png"
File "..\Game\gfx\balls\ballPurple.png"
File "..\Game\gfx\balls\ballTurkish.png"
File "..\Game\gfx\balls\ballYellow.png"
SetOutPath "$INSTDIR\gfx\garbage"
File "..\Game\gfx\garbage\garbageTR.png"
File "..\Game\gfx\garbage\garbageB.png"
File "..\Game\gfx\garbage\garbageBL.png"
File "..\Game\gfx\garbage\garbageBR.png"
File "..\Game\gfx\garbage\garbageFill.png"
File "..\Game\gfx\garbage\garbageL.png"
File "..\Game\gfx\garbage\garbageM.png"
File "..\Game\gfx\garbage\garbageR.png"
File "..\Game\gfx\garbage\garbageT.png"
File "..\Game\gfx\garbage\garbageTL.png"
File "..\Game\gfx\garbage\garbageML.png"
File "..\Game\gfx\garbage\garbageMR.png"
File "..\Game\gfx\garbage\garbageGM.png"
File "..\Game\gfx\garbage\garbageGML.png"
File "..\Game\gfx\garbage\garbageGMR.png"
SetOutPath "$INSTDIR\gfx\smileys"
File "..\Game\gfx\smileys\0.png"
File "..\Game\gfx\smileys\1.png"
File "..\Game\gfx\smileys\2.png"
File "..\Game\gfx\smileys\3.png"
SetOutPath "$INSTDIR\gfx\animations\cursor"
File "..\Game\gfx\animations\cursor\1.png"
File "..\Game\gfx\animations\cursor\2.png"
SetOutPath "$INSTDIR\gfx\counter"
File "..\Game\gfx\counter\1.png"
File "..\Game\gfx\counter\2.png"
File "..\Game\gfx\counter\3.png"
SetOutPath "$INSTDIR\gfx\animations\bomb"
File "..\Game\gfx\animations\bomb\bomb_2.png"
File "..\Game\gfx\animations\bomb\bomb_1.png"
SetOutPath "$INSTDIR\gfx\animations\ready"
File "..\Game\gfx\animations\ready\ready_1.png"
File "..\Game\gfx\animations\ready\ready_2.png"
SetOutPath "$INSTDIR\gfx\animations\explosion"
File "..\Game\gfx\animations\explosion\1.png"
File "..\Game\gfx\animations\explosion\2.png"
File "..\Game\gfx\animations\explosion\0.png"
File "..\Game\gfx\animations\explosion\3.png"
SetOutPath "$INSTDIR"
File "..\Game\COPYING.TXT"
; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateDirectory "$SMPROGRAMS\$ICONS_GROUP"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Block Attack - Rise Of the Blocks.lnk" "$INSTDIR\block_attack.exe"
CreateShortCut "$DESKTOP\Block Attack - Rise Of the Blocks.lnk" "$INSTDIR\block_attack.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section "Manual" SEC03
SetOutPath "$INSTDIR\docs"
File "..\block_attack_manual.pdf"
; Shortcuts
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Manual.lnk" "$INSTDIR\DOCS\block_attack_manual.pdf"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section -AdditionalIcons
SetOutPath $INSTDIR
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk" "$INSTDIR\uninst.exe"
!insertmacro MUI_STARTMENU_WRITE_END
SectionEnd
Section -Post
WriteUninstaller "$INSTDIR\uninst.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\block_attack.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\block_attack.exe"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
SectionEnd
; Section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "The Game files, must be installed!"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC03} "The Manual"
!insertmacro MUI_FUNCTION_DESCRIPTION_END
Function un.onUninstSuccess
HideWindow
MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
FunctionEnd
Function un.onInit
MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES +2
Abort
FunctionEnd
Section Uninstall
!insertmacro MUI_STARTMENU_GETFOLDER "Application" $ICONS_GROUP
Delete "$INSTDIR\${PRODUCT_NAME}.url"
Delete "$INSTDIR\uninst.exe"
Delete "$INSTDIR\docs\block_attack_manual.pdf"
Delete "$INSTDIR\COPYING.TXT"
Delete "$INSTDIR\gfx\counter\1.png"
Delete "$INSTDIR\gfx\counter\2.png"
Delete "$INSTDIR\gfx\counter\3.png"
Delete "$INSTDIR\gfx\smileys\0.png"
Delete "$INSTDIR\gfx\smileys\1.png"
Delete "$INSTDIR\gfx\smileys\2.png"
Delete "$INSTDIR\gfx\smileys\3.png"
Delete "$INSTDIR\gfx\animations\cursor\2.png"
Delete "$INSTDIR\gfx\animations\cursor\1.png"
Delete "$INSTDIR\gfx\animations\bomb\bomb_1.png"
Delete "$INSTDIR\gfx\animations\bomb\bomb_2.png"
Delete "$INSTDIR\gfx\animations\explosion\0.png"
Delete "$INSTDIR\gfx\animations\explosion\1.png"
Delete "$INSTDIR\gfx\animations\explosion\2.png"
Delete "$INSTDIR\gfx\animations\explosion\3.png"
Delete "$INSTDIR\gfx\animations\ready\ready_1.png"
Delete "$INSTDIR\gfx\animations\ready\ready_2.png"
Delete "$INSTDIR\gfx\garbage\garbageMR.png"
Delete "$INSTDIR\gfx\garbage\garbageML.png"
Delete "$INSTDIR\gfx\garbage\garbageTL.png"
Delete "$INSTDIR\gfx\garbage\garbageT.png"
Delete "$INSTDIR\gfx\garbage\garbageR.png"
Delete "$INSTDIR\gfx\garbage\garbageM.png"
Delete "$INSTDIR\gfx\garbage\garbageL.png"
Delete "$INSTDIR\gfx\garbage\garbageFill.png"
Delete "$INSTDIR\gfx\garbage\garbageBR.png"
Delete "$INSTDIR\gfx\garbage\garbageBL.png"
Delete "$INSTDIR\gfx\garbage\garbageB.png"
Delete "$INSTDIR\gfx\garbage\garbageTR.png"
Delete "$INSTDIR\gfx\garbage\garbageGMR.png"
Delete "$INSTDIR\gfx\garbage\garbageGML.png"
Delete "$INSTDIR\gfx\garbage\garbageGM.png"
Delete "$INSTDIR\gfx\balls\ballYellow.png"
Delete "$INSTDIR\gfx\balls\ballTurkish.png"
Delete "$INSTDIR\gfx\balls\ballPurple.png"
Delete "$INSTDIR\gfx\balls\ballGreen.png"
Delete "$INSTDIR\gfx\balls\ballGray.png"
Delete "$INSTDIR\gfx\balls\ballRed.png"
Delete "$INSTDIR\gfx\balls\ballBlue.png"
Delete "$INSTDIR\gfx\bTheme.png"
Delete "$INSTDIR\gfx\bRetry.png"
Delete "$INSTDIR\gfx\bNext.png"
Delete "$INSTDIR\gfx\bSkip.png"
Delete "$INSTDIR\gfx\chainFrame.png"
Delete "$INSTDIR\gfx\fileDialogbox.png"
Delete "$INSTDIR\gfx\iGameOver.png"
Delete "$INSTDIR\gfx\background.png"
Delete "$INSTDIR\gfx\blackBackGround.png"
Delete "$INSTDIR\gfx\bricks\green.png"
Delete "$INSTDIR\gfx\bricks\blue.png"
Delete "$INSTDIR\gfx\bricks\yellow.png"
Delete "$INSTDIR\gfx\transCover.png"
Delete "$INSTDIR\gfx\bricks\turkish.png"
Delete "$INSTDIR\gfx\bricks\red.png"
Delete "$INSTDIR\gfx\bricks\purple.png"
Delete "$INSTDIR\gfx\bricks\grey.png"
Delete "$INSTDIR\gfx\blockAttack.ico"
Delete "$INSTDIR\gfx\background.jpg"
Delete "$INSTDIR\gfx\14P_Arial_Angle_Red.png"
Delete "$INSTDIR\gfx\24P_Arial_Blue.png"
Delete "$INSTDIR\gfx\bVsGame.png"
Delete "$INSTDIR\gfx\bVsGameConfig.png"
Delete "$INSTDIR\gfx\iLoser.png"
Delete "$INSTDIR\gfx\bTwoPlayers.png"
Delete "$INSTDIR\gfx\bTimeTrial.png"
Delete "$INSTDIR\gfx\bStageClear.png"
Delete "$INSTDIR\gfx\bPuzzle.png"
Delete "$INSTDIR\gfx\boardBackBack.png"
Delete "$INSTDIR\gfx\bOnePlayer.png"
Delete "$INSTDIR\gfx\dialogbox.png"
Delete "$INSTDIR\gfx\iLevelCheck.png"
Delete "$INSTDIR\gfx\iLevelCheckBox.png"
Delete "$INSTDIR\gfx\bOn.png"
Delete "$INSTDIR\gfx\bNewGame.png"
Delete "$INSTDIR\gfx\bNetwork.png"
Delete "$INSTDIR\gfx\iWinner.png"
Delete "$INSTDIR\gfx\iStageClearLimit.png"
Delete "$INSTDIR\gfx\bInternet.png"
Delete "$INSTDIR\gfx\options.png"
Delete "$INSTDIR\gfx\BackBoard.png"
Delete "$INSTDIR\gfx\bSelectPuzzle.png"
Delete "$INSTDIR\gfx\bHighScore.png"
Delete "$INSTDIR\gfx\bForward.png"
Delete "$INSTDIR\gfx\bReplays.png"
Delete "$INSTDIR\gfx\bSave.png"
Delete "$INSTDIR\gfx\bLoad.png"
Delete "$INSTDIR\gfx\bNetwork.png"
Delete "$INSTDIR\gfx\bHost.png"
Delete "$INSTDIR\gfx\bConnect.png"
Delete "$INSTDIR\gfx\bExit.png"
Delete "$INSTDIR\gfx\bEndless.png"
Delete "$INSTDIR\gfx\bConnect.png"
Delete "$INSTDIR\gfx\bConfigure.png"
Delete "$INSTDIR\gfx\bBack.png"
Delete "$INSTDIR\gfx\icon.png"
Delete "$INSTDIR\gfx\bChange.png"
Delete "$INSTDIR\gfx\bHost.png"
Delete "$INSTDIR\gfx\iCheckBoxArea.png"
Delete "$INSTDIR\gfx\blackLine.png"
Delete "$INSTDIR\gfx\b1024.png"
Delete "$INSTDIR\gfx\bOptions.png"
Delete "$INSTDIR\gfx\changeButtonsBack.png"
Delete "$INSTDIR\gfx\crossover.png"
Delete "$INSTDIR\gfx\iDraw.png"
Delete "$INSTDIR\gfx\bOff.png"
Delete "$INSTDIR\gfx\mouse.png"
Delete "$INSTDIR\music\bgMusic.ogg"
Delete "$INSTDIR\music\highbeat.ogg"
Delete "$INSTDIR\res\puzzle.levels"
Delete "$INSTDIR\res\copy"
Delete "$INSTDIR\res\testPuzzles"
Delete "$INSTDIR\sound\counter.ogg"
Delete "$INSTDIR\sound\counterFinal.ogg"
Delete "$INSTDIR\sound\typing.ogg"
Delete "$INSTDIR\sound\cameraclick.ogg"
Delete "$INSTDIR\sound\pop.ogg"
Delete "$INSTDIR\zlib.dll"
Delete "$INSTDIR\zlib1.dll"
Delete "$INSTDIR\jpeg.dll"
Delete "$INSTDIR\SDL.dll"
Delete "$INSTDIR\SDL_mixer.dll"
Delete "$INSTDIR\SDL_image.dll"
Delete "$INSTDIR\libpng1.dll"
Delete "$INSTDIR\block_attack.exe"
Delete "$INSTDIR\gmon.out"
Delete "$INSTDIR\stderr.txt"
Delete "$INSTDIR\stdout.txt"
Delete "$SMPROGRAMS\$ICONS_GROUP\Uninstall.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Website.lnk"
Delete "$DESKTOP\Block Attack - Rise Of the Blocks.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Block Attack - Rise Of the Blocks.lnk"
Delete "$SMPROGRAMS\$ICONS_GROUP\Manual.lnk"
RMDir "$SMPROGRAMS\$ICONS_GROUP"
RMDir "$INSTDIR\sound"
RMDir "$INSTDIR\res"
RMDir "$INSTDIR\music"
RMDir "$INSTDIR\gfx\garbage"
RMDir "$INSTDIR\gfx\counter"
RMDir "$INSTDIR\gfx\smileys"
RMDir "$INSTDIR\gfx\bricks"
RMDir "$INSTDIR\gfx\balls"
RMDir "$INSTDIR\gfx\animations\cursor"
RMDir "$INSTDIR\gfx\animations\bomb"
RMDir "$INSTDIR\gfx\animations\explosion"
RMDir "$INSTDIR\gfx\animations\ready"
RMDir "$INSTDIR\gfx\animations"
RMDir "$INSTDIR\gfx"
RMDir "$INSTDIR\docs"
RMDir "$INSTDIR"
DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
SetAutoClose true
SectionEnd