Changed launcher to not have S3D_SERVER #defined to allow visible dialog messages
[scorched3d.git] / scorched-patch.nsi
blobfe1fb9025d9020d024fa05bf90d54e530eaed3d6
1 ; Helper defines
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&currency_code=GBP"
7 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
8 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
10 SetCompressor lzma
12 ; MUI 1.67 compatible ------
13 !include "MUI.nsh"
15 ; MUI Settings
16 !define MUI_ABORTWARNING
17 !define MUI_ICON "data\windows\tank2.ico"
18 !define MUI_UNICON "data\windows\tank2.ico"
20 ; Welcome page
21 !insertmacro MUI_PAGE_WELCOME
22 ; License page
23 !insertmacro MUI_PAGE_LICENSE "COPYING"
24 ; Directory page
25 !insertmacro MUI_PAGE_DIRECTORY
26 ; Instfiles page
27 !insertmacro MUI_PAGE_INSTFILES
28 ; Finish page
29 !insertmacro MUI_PAGE_FINISH
31 ; Uninstaller pages
32 !insertmacro MUI_UNPAGE_INSTFILES
34 ; Language files
35 !insertmacro MUI_LANGUAGE "English"
37 ; Reserve files
38 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
40 ; MUI end ------
42 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
43 OutFile "Scorched3D-${PRODUCT_VERSION}-patch.exe"
44 InstallDir "$PROGRAMFILES\Scorched3D"
45 ShowInstDetails show
46 ShowUnInstDetails show
48 Function .onInit
49 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
50 StrCmp $R0 "" 0 done
51 MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION "${PRODUCT_NAME} is not already installed, do you wish to patch anyway?" IDOK done
52 Abort
53 done:
54 FunctionEnd
56 Section "MainSection" SEC01
57 SetOutPath "$INSTDIR"
58 SetOverwrite try
60 File "/oname=$INSTDIR\.\CHANGELOG" ".\CHANGELOG"
61 File "/oname=$INSTDIR\.\data\accessories.xml" ".\data\accessories.xml"
62 File "/oname=$INSTDIR\.\data\custominfo.xml" ".\data\custominfo.xml"
63 File "/oname=$INSTDIR\.\data\fonts\dejavusans.ttf" ".\data\fonts\dejavusans.ttf"
64 File "/oname=$INSTDIR\.\data\fonts\dejavusconbd.ttf" ".\data\fonts\dejavusconbd.ttf"
65 File "/oname=$INSTDIR\.\data\fonts\dejavusmobd.ttf" ".\data\fonts\dejavusmobd.ttf"
66 Delete "$INSTDIR\.\data\fonts\test.ttf"
67 Delete "$INSTDIR\.\data\fonts\VERA-COPYRIGHT.TXT"
68 Delete "$INSTDIR\.\data\fonts\vera.ttf"
69 Delete "$INSTDIR\.\data\fonts\veramobd.ttf"
70 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\accessories.xml" ".\data\globalmods\apoc\data\accessories.xml"
71 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnapoccity.xml" ".\data\globalmods\apoc\data\landscapes\defnapoccity.xml"
72 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnarizonaislands.xml" ".\data\globalmods\apoc\data\landscapes\defnarizonaislands.xml"
73 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnbighill.xml" ".\data\globalmods\apoc\data\landscapes\defnbighill.xml"
74 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnbullseye.xml" ".\data\globalmods\apoc\data\landscapes\defnbullseye.xml"
75 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defncastle.xml" ".\data\globalmods\apoc\data\landscapes\defncastle.xml"
76 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defncolosseum.xml" ".\data\globalmods\apoc\data\landscapes\defncolosseum.xml"
77 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defncraters.xml" ".\data\globalmods\apoc\data\landscapes\defncraters.xml"
78 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defndesertmesa.xml" ".\data\globalmods\apoc\data\landscapes\defndesertmesa.xml"
79 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defndonuthills.xml" ".\data\globalmods\apoc\data\landscapes\defndonuthills.xml"
80 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnhexisle.xml" ".\data\globalmods\apoc\data\landscapes\defnhexisle.xml"
81 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnmaze.xml" ".\data\globalmods\apoc\data\landscapes\defnmaze.xml"
82 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnmoon.xml" ".\data\globalmods\apoc\data\landscapes\defnmoon.xml"
83 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnmountains.xml" ".\data\globalmods\apoc\data\landscapes\defnmountains.xml"
84 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnnexuscanyon.xml" ".\data\globalmods\apoc\data\landscapes\defnnexuscanyon.xml"
85 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnpillars.xml" ".\data\globalmods\apoc\data\landscapes\defnpillars.xml"
86 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnplateau.xml" ".\data\globalmods\apoc\data\landscapes\defnplateau.xml"
87 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnpyramids.xml" ".\data\globalmods\apoc\data\landscapes\defnpyramids.xml"
88 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnpyramids2.xml" ".\data\globalmods\apoc\data\landscapes\defnpyramids2.xml"
89 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnruffles.xml" ".\data\globalmods\apoc\data\landscapes\defnruffles.xml"
90 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnsteppes.xml" ".\data\globalmods\apoc\data\landscapes\defnsteppes.xml"
91 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnterraces.xml" ".\data\globalmods\apoc\data\landscapes\defnterraces.xml"
92 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defntwotowers.xml" ".\data\globalmods\apoc\data\landscapes\defntwotowers.xml"
93 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnusa.xml" ".\data\globalmods\apoc\data\landscapes\defnusa.xml"
94 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnvolcano.xml" ".\data\globalmods\apoc\data\landscapes\defnvolcano.xml"
95 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnweathered.xml" ".\data\globalmods\apoc\data\landscapes\defnweathered.xml"
96 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\defnworld.xml" ".\data\globalmods\apoc\data\landscapes\defnworld.xml"
97 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texarizona_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texarizona_bldg.xml"
98 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texasianspring_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texasianspring_bldg.xml"
99 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcastle_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texcastle_bldg.xml"
100 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texchina_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texchina_bldg.xml"
101 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity1_storm.xml" ".\data\globalmods\apoc\data\landscapes\texcity1_storm.xml"
102 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity1_summer.xml" ".\data\globalmods\apoc\data\landscapes\texcity1_summer.xml"
103 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity1_winter.xml" ".\data\globalmods\apoc\data\landscapes\texcity1_winter.xml"
104 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity2_storm.xml" ".\data\globalmods\apoc\data\landscapes\texcity2_storm.xml"
105 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity2_summer.xml" ".\data\globalmods\apoc\data\landscapes\texcity2_summer.xml"
106 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity2_winter.xml" ".\data\globalmods\apoc\data\landscapes\texcity2_winter.xml"
107 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity3_storm.xml" ".\data\globalmods\apoc\data\landscapes\texcity3_storm.xml"
108 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity3_summer.xml" ".\data\globalmods\apoc\data\landscapes\texcity3_summer.xml"
109 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texcity3_winter.xml" ".\data\globalmods\apoc\data\landscapes\texcity3_winter.xml"
110 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texdefault_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texdefault_bldg.xml"
111 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texdenali_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texdenali_bldg.xml"
112 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texdesert.xml" ".\data\globalmods\apoc\data\landscapes\texdesert.xml"
113 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texhell.xml" ".\data\globalmods\apoc\data\landscapes\texhell.xml"
114 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texice.xml" ".\data\globalmods\apoc\data\landscapes\texice.xml"
115 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texice_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texice_bldg.xml"
116 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texmoon.xml" ".\data\globalmods\apoc\data\landscapes\texmoon.xml"
117 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texnight_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texnight_bldg.xml"
118 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texsand_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texsand_bldg.xml"
119 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texsnow_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texsnow_bldg.xml"
120 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texstorm_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texstorm_bldg.xml"
121 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\textropical_bldg.xml" ".\data\globalmods\apoc\data\landscapes\textropical_bldg.xml"
122 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\textuscan_bldg.xml" ".\data\globalmods\apoc\data\landscapes\textuscan_bldg.xml"
123 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texusa_summer.xml" ".\data\globalmods\apoc\data\landscapes\texusa_summer.xml"
124 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\landscapes\texvulcano_bldg.xml" ".\data\globalmods\apoc\data\landscapes\texvulcano_bldg.xml"
125 File "/oname=$INSTDIR\.\data\globalmods\apoc\data\modinfo.xml" ".\data\globalmods\apoc\data\modinfo.xml"
126 File "/oname=$INSTDIR\.\data\html\server\account.html" ".\data\html\server\account.html"
127 File "/oname=$INSTDIR\.\data\html\server\adminmenu.html" ".\data\html\server\adminmenu.html"
128 File "/oname=$INSTDIR\.\data\html\server\game.html" ".\data\html\server\game.html"
129 File "/oname=$INSTDIR\.\data\html\server\menu.html" ".\data\html\server\menu.html"
130 File "/oname=$INSTDIR\.\data\html\server\player.html" ".\data\html\server\player.html"
131 File "/oname=$INSTDIR\.\data\html\server\server.html" ".\data\html\server\server.html"
132 File "/oname=$INSTDIR\.\data\html\server\sessions.html" ".\data\html\server\sessions.html"
133 File "/oname=$INSTDIR\.\data\keys.xml" ".\data\keys.xml"
134 File "/oname=$INSTDIR\.\data\landscapes\ascencion2.bmp" ".\data\landscapes\ascencion2.bmp"
135 File "/oname=$INSTDIR\.\data\landscapes\boidslargenumber.xml" ".\data\landscapes\boidslargenumber.xml"
136 File "/oname=$INSTDIR\.\data\landscapes\circle.bmp" ".\data\landscapes\circle.bmp"
137 File "/oname=$INSTDIR\.\data\landscapes\defnascencion.xml" ".\data\landscapes\defnascencion.xml"
138 File "/oname=$INSTDIR\.\data\landscapes\defnascencion2.xml" ".\data\landscapes\defnascencion2.xml"
139 File "/oname=$INSTDIR\.\data\landscapes\defncanyon.xml" ".\data\landscapes\defncanyon.xml"
140 File "/oname=$INSTDIR\.\data\landscapes\defncanyon2.xml" ".\data\landscapes\defncanyon2.xml"
141 File "/oname=$INSTDIR\.\data\landscapes\defncavern.xml" ".\data\landscapes\defncavern.xml"
142 File "/oname=$INSTDIR\.\data\landscapes\defncavern2.xml" ".\data\landscapes\defncavern2.xml"
143 File "/oname=$INSTDIR\.\data\landscapes\defndenali.xml" ".\data\landscapes\defndenali.xml"
144 File "/oname=$INSTDIR\.\data\landscapes\defndenali2.xml" ".\data\landscapes\defndenali2.xml"
145 File "/oname=$INSTDIR\.\data\landscapes\defndenali3.xml" ".\data\landscapes\defndenali3.xml"
146 File "/oname=$INSTDIR\.\data\landscapes\defnglaciation.xml" ".\data\landscapes\defnglaciation.xml"
147 File "/oname=$INSTDIR\.\data\landscapes\defnglaciation2.xml" ".\data\landscapes\defnglaciation2.xml"
148 File "/oname=$INSTDIR\.\data\landscapes\defnglaciation3.xml" ".\data\landscapes\defnglaciation3.xml"
149 File "/oname=$INSTDIR\.\data\landscapes\defnhalfed.xml" ".\data\landscapes\defnhalfed.xml"
150 File "/oname=$INSTDIR\.\data\landscapes\defnhilly.xml" ".\data\landscapes\defnhilly.xml"
151 File "/oname=$INSTDIR\.\data\landscapes\defnicebergs2.xml" ".\data\landscapes\defnicebergs2.xml"
152 File "/oname=$INSTDIR\.\data\landscapes\defnicebergs3.xml" ".\data\landscapes\defnicebergs3.xml"
153 File "/oname=$INSTDIR\.\data\landscapes\defnislands.xml" ".\data\landscapes\defnislands.xml"
154 File "/oname=$INSTDIR\.\data\landscapes\defnlowlands.xml" ".\data\landscapes\defnlowlands.xml"
155 File "/oname=$INSTDIR\.\data\landscapes\defnoldstyle.xml" ".\data\landscapes\defnoldstyle.xml"
156 File "/oname=$INSTDIR\.\data\landscapes\defnoldstyleerrosion.xml" ".\data\landscapes\defnoldstyleerrosion.xml"
157 File "/oname=$INSTDIR\.\data\landscapes\defnridge.xml" ".\data\landscapes\defnridge.xml"
158 File "/oname=$INSTDIR\.\data\landscapes\defnspike.xml" ".\data\landscapes\defnspike.xml"
159 File "/oname=$INSTDIR\.\data\landscapes\defntest.xml" ".\data\landscapes\defntest.xml"
160 File "/oname=$INSTDIR\.\data\landscapes\defnvalley.xml" ".\data\landscapes\defnvalley.xml"
161 File "/oname=$INSTDIR\.\data\landscapes\denali2.bmp" ".\data\landscapes\denali2.bmp"
162 File "/oname=$INSTDIR\.\data\landscapes\denali3.bmp" ".\data\landscapes\denali3.bmp"
163 File "/oname=$INSTDIR\.\data\landscapes\fjords.bmp" ".\data\landscapes\fjords.bmp"
164 File "/oname=$INSTDIR\.\data\landscapes\glaciation2.bmp" ".\data\landscapes\glaciation2.bmp"
165 File "/oname=$INSTDIR\.\data\landscapes\glaciation3.bmp" ".\data\landscapes\glaciation3.bmp"
166 File "/oname=$INSTDIR\.\data\landscapes\placepinelargenumber.xml" ".\data\landscapes\placepinelargenumber.xml"
167 File "/oname=$INSTDIR\.\data\landscapes\texarizona.xml" ".\data\landscapes\texarizona.xml"
168 File "/oname=$INSTDIR\.\data\landscapes\texasianspring.xml" ".\data\landscapes\texasianspring.xml"
169 File "/oname=$INSTDIR\.\data\landscapes\texcastle.xml" ".\data\landscapes\texcastle.xml"
170 File "/oname=$INSTDIR\.\data\landscapes\texcavern.xml" ".\data\landscapes\texcavern.xml"
171 File "/oname=$INSTDIR\.\data\landscapes\texchina.xml" ".\data\landscapes\texchina.xml"
172 File "/oname=$INSTDIR\.\data\landscapes\texdefault.xml" ".\data\landscapes\texdefault.xml"
173 File "/oname=$INSTDIR\.\data\landscapes\texdenali.xml" ".\data\landscapes\texdenali.xml"
174 File "/oname=$INSTDIR\.\data\landscapes\texdenalilandperf.xml" ".\data\landscapes\texdenalilandperf.xml"
175 File "/oname=$INSTDIR\.\data\landscapes\texhell.xml" ".\data\landscapes\texhell.xml"
176 File "/oname=$INSTDIR\.\data\landscapes\texice.xml" ".\data\landscapes\texice.xml"
177 File "/oname=$INSTDIR\.\data\landscapes\texnight.xml" ".\data\landscapes\texnight.xml"
178 File "/oname=$INSTDIR\.\data\landscapes\texplage.xml" ".\data\landscapes\texplage.xml"
179 File "/oname=$INSTDIR\.\data\landscapes\texsahara.xml" ".\data\landscapes\texsahara.xml"
180 File "/oname=$INSTDIR\.\data\landscapes\texsand.xml" ".\data\landscapes\texsand.xml"
181 File "/oname=$INSTDIR\.\data\landscapes\texsnow.xml" ".\data\landscapes\texsnow.xml"
182 File "/oname=$INSTDIR\.\data\landscapes\texstorm.xml" ".\data\landscapes\texstorm.xml"
183 File "/oname=$INSTDIR\.\data\landscapes\textropical.xml" ".\data\landscapes\textropical.xml"
184 File "/oname=$INSTDIR\.\data\landscapes\textuscan.xml" ".\data\landscapes\textuscan.xml"
185 File "/oname=$INSTDIR\.\data\landscapes\texvulcano.xml" ".\data\landscapes\texvulcano.xml"
186 File "/oname=$INSTDIR\.\data\landscapes.xml" ".\data\landscapes.xml"
187 CreateDirectory "$INSTDIR\.\data\lang"
188 File "/oname=$INSTDIR\.\data\lang\lang.resource" ".\data\lang\lang.resource"
189 File "/oname=$INSTDIR\.\data\lang\lang_undefined.resource" ".\data\lang\lang_undefined.resource"
190 CreateDirectory "$INSTDIR\.\data\lua"
191 CreateDirectory "$INSTDIR\.\data\lua\accessories"
192 File "/oname=$INSTDIR\.\data\lua\accessories\test.lua" ".\data\lua\accessories\test.lua"
193 File "/oname=$INSTDIR\.\data\modinfo.xml" ".\data\modinfo.xml"
194 File "/oname=$INSTDIR\.\data\mysql.xml" ".\data\mysql.xml"
195 File "/oname=$INSTDIR\.\data\shaders\land-splat.fshader" ".\data\shaders\land-splat.fshader"
196 File "/oname=$INSTDIR\.\data\shaders\land.fshader" ".\data\shaders\land.fshader"
197 File "/oname=$INSTDIR\.\data\shaders\land.vshader" ".\data\shaders\land.vshader"
198 File "/oname=$INSTDIR\.\data\shaders\water.fshader" ".\data\shaders\water.fshader"
199 File "/oname=$INSTDIR\.\data\shaders\watersimple.fshader" ".\data\shaders\watersimple.fshader"
200 File "/oname=$INSTDIR\.\data\shaders\watersimple.vshader" ".\data\shaders\watersimple.vshader"
201 File "/oname=$INSTDIR\.\data\singlecustom.xml" ".\data\singlecustom.xml"
202 File "/oname=$INSTDIR\.\data\singleeasy.xml" ".\data\singleeasy.xml"
203 File "/oname=$INSTDIR\.\data\singlehard.xml" ".\data\singlehard.xml"
204 File "/oname=$INSTDIR\.\data\singlenormal.xml" ".\data\singlenormal.xml"
205 File "/oname=$INSTDIR\.\data\tanks.xml" ".\data\tanks.xml"
206 File "/oname=$INSTDIR\.\data\textures\circle.bmp" ".\data\textures\circle.bmp"
207 File "/oname=$INSTDIR\.\data\textures\circlem.bmp" ".\data\textures\circlem.bmp"
208 File "/oname=$INSTDIR\.\data\textures\circlew.bmp" ".\data\textures\circlew.bmp"
209 Delete "$INSTDIR\.\data\textures\landscape\china\texture2.jpg"
210 File "/oname=$INSTDIR\.\data\tutorial.xml" ".\data\tutorial.xml"
211 File "/oname=$INSTDIR\.\data\windows\perf.bmp" ".\data\windows\perf.bmp"
212 File "/oname=$INSTDIR\.\data\windows\perfa.bmp" ".\data\windows\perfa.bmp"
213 File "/oname=$INSTDIR\.\data\windows\rotation.png" ".\data\windows\rotation.png"
214 File "/oname=$INSTDIR\.\data\windows.xml" ".\data\windows.xml"
215 File "/oname=$INSTDIR\.\libexpat.dll" ".\libexpat.dll"
216 File "/oname=$INSTDIR\.\libpng13.dll" ".\libpng13.dll"
217 File "/oname=$INSTDIR\.\Microsoft.VC90.CRT.manifest" ".\Microsoft.VC90.CRT.manifest"
218 File "/oname=$INSTDIR\.\msvcm90.dll" ".\msvcm90.dll"
219 File "/oname=$INSTDIR\.\msvcp90.dll" ".\msvcp90.dll"
220 File "/oname=$INSTDIR\.\msvcr90.dll" ".\msvcr90.dll"
221 File "/oname=$INSTDIR\.\scorched.exe" ".\scorched.exe"
222 File "/oname=$INSTDIR\.\Scorched3D-docs.url" ".\Scorched3D-docs.url"
223 File "/oname=$INSTDIR\.\Scorched3D.url" ".\Scorched3D.url"
224 File "/oname=$INSTDIR\.\scorchedc.exe" ".\scorchedc.exe"
225 File "/oname=$INSTDIR\.\scorcheds.exe" ".\scorcheds.exe"
226 File "/oname=$INSTDIR\.\uninst.exe" ".\uninst.exe"
227 Delete "$INSTDIR\.\Microsoft.VC80.CRT.manifest"
228 Delete "$INSTDIR\.\msvcm80.dll"
229 Delete "$INSTDIR\.\msvcp80.dll"
230 Delete "$INSTDIR\.\msvcr80.dll"
231 Delete "$INSTDIR\.\scorched-patch.nsi"
232 Delete "$INSTDIR\.\TODO"
239 SectionEnd
241 Section -AdditionalIcons
242 WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
243 WriteIniStr "$INSTDIR\${PRODUCT_NAME}-docs.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}\wiki"
244 WriteIniStr "$INSTDIR\${PRODUCT_NAME}-donate.url" "InternetShortcut" "URL" "${PRODUCT_DONATE_WEB_SITE}"
246 CreateDirectory "$SMPROGRAMS\Scorched3D"
248 CreateShortCut "$SMPROGRAMS\Scorched3D\Uninstall Scorched3D.lnk" "$INSTDIR\uninst.exe"
249 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D.lnk" "$INSTDIR\scorched.exe" "" "$INSTDIR\data\windows\tank2.ico"
250 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Documentation.lnk" "$INSTDIR\${PRODUCT_NAME}-docs.url"
251 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Homepage.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
252 CreateShortCut "$SMPROGRAMS\Scorched3D\Scorched3D Donations.lnk" "$INSTDIR\${PRODUCT_NAME}-donate.url"
253 SectionEnd
255 Section -Post
256 WriteUninstaller "$INSTDIR\uninst.exe"
257 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
258 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
259 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
260 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
261 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
262 SectionEnd
264 Function un.onUninstSuccess
265 HideWindow
266 MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer."
267 FunctionEnd
269 Var DEL_USER
270 Function un.onInit
271 MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name) and all of its components?" IDYES remove
272 Abort
273 remove:
275 StrCpy $DEL_USER "FALSE"
276 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
277 StrCpy $DEL_USER "TRUE";
278 nodel:
279 FunctionEnd
281 Section Uninstall
283 RMDir /r "$INSTDIR\data"
284 RMDir /r "$INSTDIR\documentation"
285 RMDir /r "$SMPROGRAMS\Scorched3D"
287 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
288 SetAutoClose true
290 StrCmp $DEL_USER "FALSE" nodel
291 RMDir /r "$INSTDIR\.scorched3d"
292 RMDir /r "$PROFILE\.scorched3d"
293 nodel:
295 Delete "$INSTDIR\*.*"
296 RMDir "$INSTDIR"
298 SectionEnd