ac.nsi 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. !include MUI.nsh
  2. !include Sections.nsh
  3. !include FileFunc.nsh
  4. ## TOOLS
  5. # Open Browser Window
  6. !macro openLink un
  7. # Uses $0
  8. Function ${un}openLinkNewWindow
  9. Push $3
  10. Push $2
  11. Push $1
  12. Push $0
  13. ReadRegStr $0 HKCR "http\shell\open\command" ""
  14. # Get browser path
  15. DetailPrint $0
  16. StrCpy $2 '"'
  17. StrCpy $1 $0 1
  18. StrCmp $1 $2 +2 # if path is not enclosed in " look for space as final char
  19. StrCpy $2 ' '
  20. StrCpy $3 1
  21. loop:
  22. StrCpy $1 $0 1 $3
  23. DetailPrint $1
  24. StrCmp $1 $2 found
  25. StrCmp $1 "" found
  26. IntOp $3 $3 + 1
  27. Goto loop
  28. found:
  29. StrCpy $1 $0 $3
  30. StrCmp $2 " " +2
  31. StrCpy $1 '$1"'
  32. Pop $0
  33. Exec '$1 $0'
  34. Pop $1
  35. Pop $2
  36. Pop $3
  37. FunctionEnd
  38. !macroend
  39. !insertmacro openLink ""
  40. !insertmacro openLink "un."
  41. ; CONFIGURATION
  42. ; general
  43. SetCompressor /SOLID lzma
  44. !define CURPATH ".\" ; must include the installer graphics and the AC_NEWVERSIONDIR directory
  45. !define AC_FULLVERSIONINT "1.3.0.0"
  46. !define AC_FULLVERSION "v${AC_FULLVERSIONINT}"
  47. !define AC_SHORTNAME "AssaultCube ${AC_FULLVERSIONINT}"
  48. !define AC_FULLNAME "AssaultCube ${AC_FULLVERSIONINT}"
  49. !define AC_URLPROTOCOL "assaultcube"
  50. !define AC_MAJORVERSIONINT 1
  51. !define AC_MINORVERSIONINT 3
  52. !define AC_NEWVERSIONDIR "AC" ; directory with prepared new AC version
  53. ; path to profile folder in "MYDOCUMENTS" directory, should be the same as in assaultcube.bat
  54. !define AC_PROFILEPATH "My Games\AssaultCube\v${AC_MAJORVERSIONINT}.${AC_MINORVERSIONINT}"
  55. Name "${AC_SHORTNAME}"
  56. VAR StartMenuFolder
  57. !define AC_STARTMENUFOLDER "$SMPROGRAMS\$StartMenuFolder"
  58. OutFile "AssaultCube_v1.3.0.0_LockdownEdition.exe"
  59. InstallDir "$PROGRAMFILES\${AC_SHORTNAME}"
  60. InstallDirRegKey HKLM "Software\${AC_SHORTNAME}" ""
  61. !define ARP "Software\Microsoft\Windows\CurrentVersion\Uninstall\${AC_SHORTNAME}"
  62. RequestExecutionLevel admin ; require admin in Vista/7
  63. ; Variables
  64. Var EstimatedSize
  65. Var Day
  66. Var Month
  67. Var Year
  68. Var DoW
  69. Var Hour
  70. Var Minute
  71. Var Second
  72. Function LeaveDirectory
  73. IfFileExists $INSTDIR\assaultcube.bat 0 true
  74. MessageBox MB_YESNO|MB_ICONQUESTION \
  75. "The folder $INSTDIR already exists. \
  76. $\nThe previous AssaultCube version in this folder will be uninstalled if you install the new version here. \
  77. $\n$\nDo you want to continue? Click 'No' to install AssaultCube in a different folder." \
  78. IDYES true IDNO false
  79. true:
  80. ClearErrors
  81. ExecWait '$INSTDIR\Uninstall.exe /S _?=$INSTDIR' ; wait until previous AC installation will be uninstalled
  82. Goto next
  83. false:
  84. Abort
  85. next:
  86. FunctionEnd
  87. ; Interface Configuration
  88. !define MUI_HEADERIMAGE
  89. !define MUI_HEADERIMAGE_BITMAP "${CURPATH}\header.bmp" ; optional
  90. ; icon
  91. XPStyle on
  92. Icon "${CURPATH}\icon.ico"
  93. UninstallIcon "${CURPATH}\icon.ico"
  94. !define MUI_ICON "${CURPATH}\icon.ico"
  95. !define MUI_UNICON "${CURPATH}\icon.ico"
  96. ; Pages
  97. Page custom WelcomePage
  98. !insertmacro MUI_PAGE_LICENSE "${CURPATH}\mui_page_license.txt"
  99. !insertmacro MUI_PAGE_COMPONENTS
  100. !define MUI_PAGE_CUSTOMFUNCTION_LEAVE LeaveDirectory
  101. !insertmacro MUI_PAGE_DIRECTORY
  102. !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
  103. !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\${AC_SHORTNAME}"
  104. !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "start_menu"
  105. !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
  106. !insertmacro MUI_PAGE_INSTFILES
  107. Page custom FinishPage
  108. !insertmacro MUI_UNPAGE_CONFIRM
  109. !insertmacro MUI_UNPAGE_INSTFILES
  110. !insertmacro MUI_LANGUAGE "English"
  111. ; Custom Welcome Page
  112. !define WS_CHILD 0x40000000
  113. !define WS_VISIBLE 0x10000000
  114. !define WS_DISABLED 0x08000000
  115. !define WS_CLIPSIBLINGS 0x04000000
  116. !define WS_MAXIMIZE 0x01000000
  117. !define WS_VSCROLL 0x00200000
  118. !define WS_HSCROLL 0x00100000
  119. !define WS_GROUP 0x00020000
  120. !define WS_TABSTOP 0x00010000
  121. !define ES_LEFT 0x00000000
  122. !define ES_CENTER 0x00000001
  123. !define ES_RIGHT 0x00000002
  124. !define ES_MULTILINE 0x00000004
  125. !define ES_UPPERCASE 0x00000008
  126. !define ES_LOWERCASE 0x00000010
  127. !define ES_PASSWORD 0x00000020
  128. !define ES_AUTOVSCROLL 0x00000040
  129. !define ES_AUTOHSCROLL 0x00000080
  130. !define ES_NOHIDESEL 0x00000100
  131. !define ES_OEMCONVERT 0x00000400
  132. !define ES_READONLY 0x00000800
  133. !define ES_WANTRETURN 0x00001000
  134. !define ES_NUMBER 0x00002000
  135. !define SS_LEFT 0x00000000
  136. !define SS_CENTER 0x00000001
  137. !define SS_RIGHT 0x00000002
  138. !define SS_ICON 0x00000003
  139. !define SS_BLACKRECT 0x00000004
  140. !define SS_GRAYRECT 0x00000005
  141. !define SS_WHITERECT 0x00000006
  142. !define SS_BLACKFRAME 0x00000007
  143. !define SS_GRAYFRAME 0x00000008
  144. !define SS_WHITEFRAME 0x00000009
  145. !define SS_USERITEM 0x0000000A
  146. !define SS_SIMPLE 0x0000000B
  147. !define SS_LEFTNOWORDWRAP 0x0000000C
  148. !define SS_OWNERDRAW 0x0000000D
  149. !define SS_BITMAP 0x0000000E
  150. !define SS_ENHMETAFILE 0x0000000F
  151. !define SS_ETCHEDHORZ 0x00000010
  152. !define SS_ETCHEDVERT 0x00000011
  153. !define SS_ETCHEDFRAME 0x00000012
  154. !define SS_TYPEMASK 0x0000001F
  155. !define SS_REALSIZECONTROL 0x00000040
  156. !define SS_NOPREFIX 0x00000080
  157. !define SS_NOTIFY 0x00000100
  158. !define SS_CENTERIMAGE 0x00000200
  159. !define SS_RIGHTJUST 0x00000400
  160. !define SS_REALSIZEIMAGE 0x00000800
  161. !define SS_SUNKEN 0x00001000
  162. !define SS_EDITCONTROL 0x00002000
  163. !define SS_ENDELLIPSIS 0x00004000
  164. !define SS_PATHELLIPSIS 0x00008000
  165. !define SS_WORDELLIPSIS 0x0000C000
  166. !define SS_ELLIPSISMASK 0x0000C000
  167. !define BS_PUSHBUTTON 0x00000000
  168. !define BS_DEFPUSHBUTTON 0x00000001
  169. !define BS_CHECKBOX 0x00000002
  170. !define BS_AUTOCHECKBOX 0x00000003
  171. !define BS_RADIOBUTTON 0x00000004
  172. !define BS_3STATE 0x00000005
  173. !define BS_AUTO3STATE 0x00000006
  174. !define BS_GROUPBOX 0x00000007
  175. !define BS_USERBUTTON 0x00000008
  176. !define BS_AUTORADIOBUTTON 0x00000009
  177. !define BS_PUSHBOX 0x0000000A
  178. !define BS_OWNERDRAW 0x0000000B
  179. !define BS_TYPEMASK 0x0000000F
  180. !define BS_LEFTTEXT 0x00000020
  181. !define BS_TEXT 0x00000000
  182. !define BS_ICON 0x00000040
  183. !define BS_BITMAP 0x00000080
  184. !define BS_LEFT 0x00000100
  185. !define BS_RIGHT 0x00000200
  186. !define BS_CENTER 0x00000300
  187. !define BS_TOP 0x00000400
  188. !define BS_BOTTOM 0x00000800
  189. !define BS_VCENTER 0x00000C00
  190. !define BS_PUSHLIKE 0x00001000
  191. !define BS_MULTILINE 0x00002000
  192. !define BS_NOTIFY 0x00004000
  193. !define BS_FLAT 0x00008000
  194. !define BS_RIGHTBUTTON ${BS_LEFTTEXT}
  195. !define LR_DEFAULTCOLOR 0x0000
  196. !define LR_MONOCHROME 0x0001
  197. !define LR_COLOR 0x0002
  198. !define LR_COPYRETURNORG 0x0004
  199. !define LR_COPYDELETEORG 0x0008
  200. !define LR_LOADFROMFILE 0x0010
  201. !define LR_LOADTRANSPARENT 0x0020
  202. !define LR_DEFAULTSIZE 0x0040
  203. !define LR_VGACOLOR 0x0080
  204. !define LR_LOADMAP3DCOLORS 0x1000
  205. !define LR_CREATEDIBSECTION 0x2000
  206. !define LR_COPYFROMRESOURCE 0x4000
  207. !define LR_SHARED 0x8000
  208. !define IMAGE_BITMAP 0
  209. !define IMAGE_ICON 1
  210. !define IMAGE_CURSOR 2
  211. !define IMAGE_ENHMETAFILE 3
  212. Var DIALOG
  213. Var HEADLINE
  214. Var TEXT
  215. Var IMAGECTL
  216. Var IMAGE
  217. ; Version Info
  218. VIProductVersion "${AC_FULLVERSIONINT}"
  219. VIAddVersionKey "ProductName" "${AC_SHORTNAME}"
  220. VIAddVersionKey "CompanyName" "Rabid Viper Productions"
  221. VIAddVersionKey "LegalCopyright" "Copyright © Rabid Viper Productions"
  222. VIAddVersionKey "FileDescription" "AssaultCube is a FREE, multiplayer, first-person shooter game, based on the CUBE engine."
  223. VIAddVersionKey "FileVersion" "${AC_FULLVERSIONINT}"
  224. VIAddVersionKey "ProductVersion" "${AC_FULLVERSIONINT}"
  225. Function .onInit
  226. InitPluginsDir
  227. File /oname=$TEMP\welcome.bmp "${CURPATH}\welcome.bmp"
  228. FunctionEnd
  229. Function .onInstSuccess
  230. IfSilent skipopenlink
  231. StrCpy $0 "http://assault.cubers.net/releasenotes/v${AC_MAJORVERSIONINT}.${AC_MINORVERSIONINT}/"
  232. Call openLinkNewWindow
  233. skipopenlink:
  234. FunctionEnd
  235. Function un.onUninstSuccess
  236. IfSilent skipopenlink
  237. StrCpy $0 "http://assault.cubers.net/uninstallnotes/v${AC_MAJORVERSIONINT}.${AC_MINORVERSIONINT}/"
  238. Call un.openLinkNewWindow
  239. skipopenlink:
  240. FunctionEnd
  241. Function HideControls
  242. LockWindow on
  243. GetDlgItem $0 $HWNDPARENT 1028
  244. ShowWindow $0 ${SW_HIDE}
  245. GetDlgItem $0 $HWNDPARENT 1256
  246. ShowWindow $0 ${SW_HIDE}
  247. GetDlgItem $0 $HWNDPARENT 1035
  248. ShowWindow $0 ${SW_HIDE}
  249. GetDlgItem $0 $HWNDPARENT 1037
  250. ShowWindow $0 ${SW_HIDE}
  251. GetDlgItem $0 $HWNDPARENT 1038
  252. ShowWindow $0 ${SW_HIDE}
  253. GetDlgItem $0 $HWNDPARENT 1039
  254. ShowWindow $0 ${SW_HIDE}
  255. GetDlgItem $0 $HWNDPARENT 1045
  256. ShowWindow $0 ${SW_NORMAL}
  257. LockWindow off
  258. FunctionEnd
  259. Function ShowControls
  260. LockWindow on
  261. GetDlgItem $0 $HWNDPARENT 1028
  262. ShowWindow $0 ${SW_NORMAL}
  263. GetDlgItem $0 $HWNDPARENT 1256
  264. ShowWindow $0 ${SW_NORMAL}
  265. GetDlgItem $0 $HWNDPARENT 1035
  266. ShowWindow $0 ${SW_NORMAL}
  267. GetDlgItem $0 $HWNDPARENT 1037
  268. ShowWindow $0 ${SW_NORMAL}
  269. GetDlgItem $0 $HWNDPARENT 1038
  270. ShowWindow $0 ${SW_NORMAL}
  271. GetDlgItem $0 $HWNDPARENT 1039
  272. ShowWindow $0 ${SW_NORMAL}
  273. GetDlgItem $0 $HWNDPARENT 1045
  274. ShowWindow $0 ${SW_HIDE}
  275. LockWindow off
  276. FunctionEnd
  277. Function WelcomePage
  278. nsDialogs::Create /NOUNLOAD 1044
  279. Pop $DIALOG
  280. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP} 0 0 0 109u 193u ""
  281. Pop $IMAGECTL
  282. StrCpy $0 $TEMP\welcome.bmp
  283. System::Call 'user32::LoadImage(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
  284. Pop $IMAGE
  285. SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE
  286. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 10u -130u 20u "Welcome to the AssaultCube Setup Wizard"
  287. Pop $HEADLINE
  288. SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
  289. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 32u -130u -32u "This wizard will guide you through the installation of AssaultCube ${AC_FULLVERSIONINT}.$\r$\n$\r$\nClick Next to continue."
  290. Pop $TEXT
  291. SetCtlColors $DIALOG "" 0xffffff
  292. SetCtlColors $HEADLINE "" 0xffffff
  293. SetCtlColors $TEXT "" 0xffffff
  294. Call HideControls
  295. nsDialogs::Show
  296. Call ShowControls
  297. System::Call gdi32::DeleteObject(i$IMAGE)
  298. # MessageBox MB_OK "This is a TEST BUILD, do NOT redistribute this file! This is NOT a final release!"
  299. FunctionEnd
  300. Function FinishPage
  301. nsDialogs::Create /NOUNLOAD 1044
  302. Pop $DIALOG
  303. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${SS_BITMAP} 0 0 0 109u 193u ""
  304. Pop $IMAGECTL
  305. StrCpy $0 $TEMP\welcome.bmp
  306. System::Call 'user32::LoadImage(i 0, t r0, i ${IMAGE_BITMAP}, i 0, i 0, i ${LR_LOADFROMFILE}) i.s'
  307. Pop $IMAGE
  308. SendMessage $IMAGECTL ${STM_SETIMAGE} ${IMAGE_BITMAP} $IMAGE
  309. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 10u -130u 20u "Completing the AssaultCube Setup Wizard"
  310. Pop $HEADLINE
  311. SendMessage $HEADLINE ${WM_SETFONT} $HEADLINE_FONT 0
  312. nsDialogs::CreateControl /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 120u 32u -130u -32u "AssaultCube has been installed on your computer.$\r$\n$\r$\nClick Finish to close this wizard."
  313. Pop $TEXT
  314. SetCtlColors $DIALOG "" 0xffffff
  315. SetCtlColors $HEADLINE "" 0xffffff
  316. SetCtlColors $TEXT "" 0xffffff
  317. Call HideControls
  318. nsDialogs::Show
  319. Call ShowControls
  320. System::Call gdi32::DeleteObject(i$IMAGE)
  321. FunctionEnd
  322. ; Installer Sections
  323. Section "AssaultCube ${AC_FULLVERSIONINT}" AC
  324. SectionIn RO
  325. SetOutPath "$INSTDIR"
  326. File /r "${AC_NEWVERSIONDIR}\*.*"
  327. WriteRegStr HKLM "Software\${AC_SHORTNAME}" "" $INSTDIR
  328. WriteRegStr HKLM "Software\${AC_SHORTNAME}" "version" ${AC_FULLVERSIONINT}
  329. ; Determine installed size (will include all files, even user placed in $INSTDIR!)
  330. ${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
  331. IntFmt $EstimatedSize "0x%08X" $0
  332. ${GetTime} "" "LS" $Day $Month $Year $DoW $Hour $Minute $Second
  333. ; Create uninstaller
  334. WriteRegStr HKLM "${ARP}" "DisplayName" "${AC_FULLNAME}"
  335. WriteRegStr HKLM "${ARP}" "Publisher" "Rabid Viper Productions"
  336. WriteRegStr HKLM "${ARP}" "InstallDate" "$Year$Month$Day"
  337. WriteRegStr HKLM "${ARP}" "InstallLocation" "$INSTDIR"
  338. WriteRegStr HKLM "${ARP}" "UninstallString" "$INSTDIR\Uninstall.exe"
  339. WriteRegStr HKLM "${ARP}" "DisplayIcon" "$INSTDIR\docs\images\favicon.ico"
  340. WriteRegStr HKLM "${ARP}" "HelpLink" "$INSTDIR\README.html"
  341. WriteRegStr HKLM "${ARP}" "URLInfoAbout" "http://assault.cubers.net"
  342. WriteRegStr HKLM "${ARP}" "URLUpdateInfo" "http://assault.cubers.net/download.html"
  343. WriteRegStr HKLM "${ARP}" "DisplayVersion" "${AC_FULLVERSIONINT}"
  344. WriteRegDWORD HKLM "${ARP}" "EstimatedSize" "$EstimatedSize"
  345. WriteRegDWORD HKLM "${ARP}" "VersionMajor" ${AC_MAJORVERSIONINT}
  346. WriteRegDWORD HKLM "${ARP}" "VersionMinor" ${AC_MINORVERSIONINT}
  347. WriteRegDWORD HKLM "${ARP}" "NoModify" 1
  348. WriteRegDWORD HKLM "${ARP}" "NoRepair" 1
  349. WriteUninstaller "$INSTDIR\Uninstall.exe"
  350. ; create shortcuts
  351. !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
  352. SetShellVarContext current
  353. StrCpy $0 $DOCUMENTS
  354. SetShellVarContext all
  355. CreateDirectory "${AC_STARTMENUFOLDER}"
  356. CreateShortCut "${AC_STARTMENUFOLDER}\${AC_SHORTNAME}.lnk" "$INSTDIR\assaultcube.bat" "" "$INSTDIR\docs\images\favicon.ico" 0 SW_SHOWMINIMIZED
  357. CreateShortCut "${AC_STARTMENUFOLDER}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\docs\images\favicon.ico" 0
  358. CreateShortCut "${AC_STARTMENUFOLDER}\README.lnk" "$INSTDIR\README.html" "" "" 0
  359. CreateShortCut "${AC_STARTMENUFOLDER}\Profile folder.lnk" "$0\${AC_PROFILEPATH}"
  360. !insertmacro MUI_STARTMENU_WRITE_END
  361. SectionEnd
  362. Section "OpenAL 1.1 redistributable" OAL
  363. SectionIn RO
  364. ExecWait '"$INSTDIR\bin_win32\oalinst.exe" -s'
  365. SectionEnd
  366. Section "Desktop Shortcuts" DESKSHORTCUTS
  367. SetShellVarContext all
  368. CreateShortCut "$DESKTOP\${AC_SHORTNAME}.lnk" "$INSTDIR\assaultcube.bat" "" "$INSTDIR\docs\images\favicon.ico" 0 SW_SHOWMINIMIZED
  369. SectionEnd
  370. Section "Register URL protocol" REGISTERURL
  371. WriteRegStr HKCR "${AC_URLPROTOCOL}" "" "${AC_SHORTNAME}"
  372. WriteRegStr HKCR "${AC_URLPROTOCOL}" "URL Protocol" ""
  373. WriteRegStr HKCR "${AC_URLPROTOCOL}\DefaultIcon" "" '"$INSTDIR\bin_win32\ac_client.exe"'
  374. WriteRegStr HKCR "${AC_URLPROTOCOL}\shell\open\command" "" '"cmd.exe" /C cd "$INSTDIR" & "assaultcube.bat" "%1"'
  375. SectionEnd
  376. Section "Uninstall"
  377. SetShellVarContext all
  378. ; delete installation directory
  379. ; RMDir /r "$INSTDIR" is not safe
  380. RMDir /r "$INSTDIR\bin_win32"
  381. RMDir /r "$INSTDIR\bin_win64"
  382. RMDir /r "$INSTDIR\bot"
  383. RMDir /r "$INSTDIR\config"
  384. Delete "$INSTDIR\demos\tutorial_demo.dmo"
  385. RMDir "$INSTDIR\demos"
  386. RMDir /r "$INSTDIR\docs"
  387. Delete "$INSTDIR\mods\ac_mods_README.html"
  388. Delete "$INSTDIR\mods\protox_hq_reskin.zip"
  389. RMDir "$INSTDIR\mods"
  390. RMDir /r "$INSTDIR\packages"
  391. RMDir "$INSTDIR\screenshots"
  392. RMDir /r "$INSTDIR\scripts"
  393. Delete "$INSTDIR\assaultcube*.bat"
  394. Delete "$INSTDIR\changelog.txt"
  395. Delete "$INSTDIR\README*"
  396. Delete "$INSTDIR\server*.bat"
  397. Delete "$INSTDIR\Uninstall.exe"
  398. RMDir "$INSTDIR"
  399. ; delete shortcuts
  400. Delete "$DESKTOP\${AC_SHORTNAME}.lnk"
  401. !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
  402. Delete "${AC_STARTMENUFOLDER}\${AC_SHORTNAME}.lnk"
  403. Delete "${AC_STARTMENUFOLDER}\Uninstall.lnk"
  404. Delete "${AC_STARTMENUFOLDER}\README.lnk"
  405. Delete "${AC_STARTMENUFOLDER}\Profile folder.lnk"
  406. RMDir "${AC_STARTMENUFOLDER}"
  407. ; delete reg keys
  408. DeleteRegKey HKLM "${ARP}"
  409. DeleteRegKey HKLM "SOFTWARE\${AC_SHORTNAME}"
  410. DeleteRegKey HKCR "${AC_URLPROTOCOL}"
  411. SectionEnd
  412. ; set descriptions
  413. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  414. !insertmacro MUI_DESCRIPTION_TEXT ${AC} "Installs the required AssaultCube core files"
  415. !insertmacro MUI_DESCRIPTION_TEXT ${OAL} "Installs a sound library for 3D audio"
  416. !insertmacro MUI_DESCRIPTION_TEXT ${DESKSHORTCUTS} "Creates shortcuts on your Desktop"
  417. !insertmacro MUI_DESCRIPTION_TEXT ${REGISTERURL} "Registers the ${AC_URLPROTOCOL}:// protocol"
  418. !insertmacro MUI_FUNCTION_DESCRIPTION_END