2 !define PRODUCT_NAME
"Scorched3D"
3 !define PRODUCT_VERSION
"42"
4 !define PRODUCT_PUBLISHER
"Scorched"
5 !define PRODUCT_WEB_SITE
"http://www.scorched3d.co.uk"
6 !define PRODUCT_DONATE_WEB_SITE
"https://www.paypal.com/xclick/business=donations%40scorched3d.co.uk&item_name=Scorched3D&no_note=1&tax=0¤cy_code=GBP"
7 !define PRODUCT_UNINST_KEY
"Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
8 !define PRODUCT_UNINST_ROOT_KEY
"HKLM"
12 ; MUI 1.67 compatible ------
16 !define MUI_ABORTWARNING
17 !define MUI_ICON
"data\windows\tank2.ico"
18 !define MUI_UNICON
"data\windows\tank2.ico"
21 !insertmacro MUI_PAGE_WELCOME
23 !insertmacro MUI_PAGE_LICENSE
"COPYING"
25 !insertmacro MUI_PAGE_DIRECTORY
27 !insertmacro MUI_PAGE_INSTFILES
29 !insertmacro MUI_PAGE_FINISH
32 !insertmacro MUI_UNPAGE_INSTFILES
35 !insertmacro MUI_LANGUAGE
"English"
38 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
42 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
43 OutFile "Scorched3D-${PRODUCT_VERSION}.exe"
44 InstallDir "$PROGRAMFILES\Scorched3D"
46 ShowUnInstDetails show
49 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
52 MessageBox MB_OKCANCEL|
MB_ICONEXCLAMATION "$(^Name) is already installed, do you wish to re-install?" IDOK done
57 Section "MainSection" SEC01
61 RMDir /r
"$INSTDIR\data"
63 File /r
/x
".svn" /x
"*.db" "data"
64 File /r
/x
".svn" /x
"*.db" "documentation"
71 File "src\scorched\Release\scorched.exe"
72 File "src\scorched\Release\scorchedc.exe"
73 File "src\scorched\Release\scorcheds.exe"
76 Section -AdditionalIcons
77 WriteIniStr
"$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
78 WriteIniStr
"$INSTDIR\${PRODUCT_NAME}-docs.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}\wiki"
79 WriteIniStr
"$INSTDIR\${PRODUCT_NAME}-donate.url" "InternetShortcut" "URL" "${PRODUCT_DONATE_WEB_SITE}"
81 CreateDirectory "$SMPROGRAMS\Scorched3D"
83 CreateShortCut "$SMPROGRAMS\Scorched3D\Uninstall Scorched3D.lnk" "$INSTDIR\uninst.exe"
84 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D.lnk" "$INSTDIR\scorched.exe" "" "$INSTDIR\data\windows\tank2.ico"
85 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Documentation.lnk" "$INSTDIR\${PRODUCT_NAME}-docs.url"
86 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Homepage.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
87 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Donations.lnk" "$INSTDIR\${PRODUCT_NAME}-donate.url"
91 WriteUninstaller "$INSTDIR\uninst.exe"
92 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
93 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
94 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
95 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
96 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
99 Function un
.onUninstSuccess
101 MessageBox MB_ICONINFORMATION|
MB_OK "$(^Name) was successfully removed from your computer."
106 MessageBox MB_ICONQUESTION|
MB_YESNO|MB_DEFBUTTON2
"Are you sure you want to completely remove $(^Name) and all of its components?" IDYES remove
110 StrCpy $DEL_USER "FALSE"
111 MessageBox MB_ICONQUESTION|
MB_YESNO|MB_DEFBUTTON2
"Do you want to remove all $(^Name) user data. Warning: this includes STATS, saved games, mods etc?" IDNO nodel
112 StrCpy $DEL_USER "TRUE";
118 RMDir /r
"$INSTDIR\data"
119 RMDir /r
"$INSTDIR\documentation"
120 RMDir /r
"$SMPROGRAMS\Scorched3D"
122 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
125 StrCmp $DEL_USER "FALSE" nodel
126 RMDir /r
"$INSTDIR\.scorched3d"
127 RMDir /r
"$PROFILE\.scorched3d"
130 Delete "$INSTDIR\*.*"