setup.nsi 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. ; This script allows the following parameters being overwritten from
  2. ; command line. When called without any parameters it behaves exactly
  3. ; like the old install script.
  4. ;
  5. ; DLLDIR - directory containing required dlls
  6. ; EXEDIR - directory containing manaplus.exe
  7. ; EXESUFFIX - offset to SRCDIR pointing to a directory containing manaplus.exe
  8. ; PRODUCT_VERSION - software version
  9. ; UPX - upx binary name
  10. ;
  11. ; For a cmake build on UNIX the following should give you a working installer:
  12. ; makensis -DDLLDIR=/path/to/dlls \
  13. ; -DPRODUCT_VERSION=0.1.`date +%Y%m%d`
  14. ; -DUPX=upx
  15. ; -DEXESUFFIX=/src
  16. CRCCheck on
  17. SetCompress off
  18. SetCompressor /SOLID lzma
  19. RequestExecutionLevel admin
  20. !define SRCDIR "..\.."
  21. !ifndef UPX
  22. !define "UPX upx\upx.exe"
  23. !endif
  24. !ifdef EXESUFFIX
  25. !define EXEDIR ${SRCDIR}/${EXESUFFIX}
  26. !endif
  27. !ifndef EXEDIR
  28. !define EXEDIR ${SRCDIR}
  29. !endif
  30. !ifndef DLLDIR
  31. !define DLLDIR ${SRCDIR}/dll
  32. !endif
  33. !ifndef BITS
  34. !define BITS 32
  35. !endif
  36. !ifndef SEHDLL
  37. !define SEHDLL "libgcc_s_sjlj-1.dll"
  38. !endif
  39. ;--- (and without !defines ) ---
  40. !System "${UPX} --best --crp-ms=999999 --compress-icons=0 --nrv2d ${EXEDIR}\manaplus.exe"
  41. !define MULTIUSER_INSTALLMODE_COMMANDLINE
  42. !define MULTIUSER_EXECUTIONLEVEL "admin"
  43. !include "MultiUser.nsh"
  44. ; HM NIS Edit helper defines
  45. !define PRODUCT_NAME "ManaPlus"
  46. !ifndef PRODUCT_VERSION
  47. !define PRODUCT_VERSION "1.1"
  48. !endif
  49. !define PRODUCT_PUBLISHER "ManaPlus Development Team"
  50. !define PRODUCT_WEB_SITE "http://manaplus.evolonline.org/"
  51. !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\manaplus.exe"
  52. !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
  53. !define PRODUCT_UNINST_ROOT_KEY "SHCTX"
  54. !include "FileAssociation.nsh"
  55. ; MUI 1.67 compatible ------
  56. !include "MUI.nsh"
  57. ; MUI Settings
  58. !define MUI_ABORTWARNING
  59. ;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\win-install.ico"
  60. !define MUI_ICON "${SRCDIR}\data\icons\manaplus.ico"
  61. ;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\win-uninstall.ico"
  62. !define MUI_UNICON "${SRCDIR}\data\icons\manaplus.ico"
  63. ;Language Selection Dialog Settings
  64. ;Remember the installer language
  65. !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
  66. !define MUI_LANGDLL_REGISTRY_KEY "Software\Mana"
  67. !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
  68. !define MUI_WELCOMEFINISHPAGE_BITMAP "setup_welcome.bmp"
  69. !define MUI_UNWELCOMEFINISHPAGE_BITMAP "setup_welcome.bmp"
  70. ; Welcome page
  71. !define MUI_WELCOMEPAGE_TITLE_3LINES
  72. !insertmacro MUI_PAGE_WELCOME
  73. ; License page
  74. !insertmacro MUI_PAGE_LICENSE "${SRCDIR}\COPYING"
  75. ; Directory page
  76. !insertmacro MUI_PAGE_DIRECTORY
  77. ; Components page
  78. !insertmacro MUI_PAGE_COMPONENTS
  79. ; Instfiles page
  80. !insertmacro MUI_PAGE_INSTFILES
  81. ; Finish page
  82. !define MUI_FINISHPAGE_RUN
  83. !define MUI_FINISHPAGE_RUN_FUNCTION RunMana
  84. !define MUI_FINISHPAGE_SHOWREADME 'notepad.exe "$\"$INSTDIR\README$\""'
  85. !define MUI_PAGE_CUSTOMFUNCTION_PRE changeFinishImage
  86. !define MUI_FINISHPAGE_LINK "Visit ManaPlus website for the latest news, FAQs and support"
  87. !define MUI_FINISHPAGE_LINK_LOCATION "http://manaplus.evolonline.org/"
  88. !insertmacro MUI_PAGE_FINISH
  89. Function RunMana
  90. SetOutPath $INSTDIR
  91. Exec "$INSTDIR\manaplus.exe"
  92. FunctionEnd
  93. Function changeFinishImage
  94. !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 1" "Text" "$PLUGINSDIR\setup_finish.bmp"
  95. FunctionEnd
  96. ; Uninstaller pages
  97. !insertmacro MUI_UNPAGE_CONFIRM
  98. !insertmacro MUI_UNPAGE_INSTFILES
  99. !define MUI_FINISHPAGE_TITLE_3LINES
  100. !insertmacro MUI_UNPAGE_FINISH
  101. ;Languages
  102. !insertmacro MUI_LANGUAGE "English" # first language is the default language
  103. !insertmacro MUI_LANGUAGE "French"
  104. !insertmacro MUI_LANGUAGE "German"
  105. !insertmacro MUI_LANGUAGE "Spanish"
  106. !insertmacro MUI_LANGUAGE "SimpChinese"
  107. !insertmacro MUI_LANGUAGE "TradChinese"
  108. !insertmacro MUI_LANGUAGE "Japanese"
  109. !insertmacro MUI_LANGUAGE "Korean"
  110. !insertmacro MUI_LANGUAGE "Italian"
  111. !insertmacro MUI_LANGUAGE "Dutch"
  112. !insertmacro MUI_LANGUAGE "Danish"
  113. !insertmacro MUI_LANGUAGE "Swedish"
  114. !insertmacro MUI_LANGUAGE "Norwegian"
  115. !insertmacro MUI_LANGUAGE "Finnish"
  116. !insertmacro MUI_LANGUAGE "Greek"
  117. !insertmacro MUI_LANGUAGE "Russian"
  118. !insertmacro MUI_LANGUAGE "Portuguese"
  119. !insertmacro MUI_LANGUAGE "PortugueseBR"
  120. !insertmacro MUI_LANGUAGE "Polish"
  121. !insertmacro MUI_LANGUAGE "Ukrainian"
  122. !insertmacro MUI_LANGUAGE "Czech"
  123. !insertmacro MUI_LANGUAGE "Slovak"
  124. !insertmacro MUI_LANGUAGE "Croatian"
  125. !insertmacro MUI_LANGUAGE "Bulgarian"
  126. !insertmacro MUI_LANGUAGE "Hungarian"
  127. !insertmacro MUI_LANGUAGE "Thai"
  128. !insertmacro MUI_LANGUAGE "Romanian"
  129. !insertmacro MUI_LANGUAGE "Latvian"
  130. !insertmacro MUI_LANGUAGE "Macedonian"
  131. !insertmacro MUI_LANGUAGE "Estonian"
  132. !insertmacro MUI_LANGUAGE "Turkish"
  133. !insertmacro MUI_LANGUAGE "Lithuanian"
  134. !insertmacro MUI_LANGUAGE "Catalan"
  135. !insertmacro MUI_LANGUAGE "Slovenian"
  136. !insertmacro MUI_LANGUAGE "Serbian"
  137. !insertmacro MUI_LANGUAGE "SerbianLatin"
  138. !insertmacro MUI_LANGUAGE "Arabic"
  139. !insertmacro MUI_LANGUAGE "Farsi"
  140. !insertmacro MUI_LANGUAGE "Hebrew"
  141. !insertmacro MUI_LANGUAGE "Indonesian"
  142. !insertmacro MUI_LANGUAGE "Mongolian"
  143. !insertmacro MUI_LANGUAGE "Luxembourgish"
  144. !insertmacro MUI_LANGUAGE "Albanian"
  145. !insertmacro MUI_LANGUAGE "Breton"
  146. !insertmacro MUI_LANGUAGE "Belarusian"
  147. !insertmacro MUI_LANGUAGE "Icelandic"
  148. !insertmacro MUI_LANGUAGE "Malay"
  149. !insertmacro MUI_LANGUAGE "Bosnian"
  150. !insertmacro MUI_LANGUAGE "Kurdish"
  151. !insertmacro MUI_RESERVEFILE_LANGDLL
  152. ReserveFile "setup_finish.bmp"
  153. ; MUI end ------
  154. Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
  155. OutFile "manaplus-${PRODUCT_VERSION}-win${BITS}.exe"
  156. InstallDir "$PROGRAMFILES\Mana"
  157. InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
  158. ShowInstDetails show
  159. ShowUnInstDetails show
  160. RequestExecutionLevel admin
  161. Function .onInit
  162. !insertmacro MULTIUSER_INIT
  163. !insertmacro MUI_LANGDLL_DISPLAY
  164. InitPluginsDir
  165. File /oname=$PLUGINSDIR\setup_finish.bmp "setup_finish.bmp"
  166. ReadRegStr $R0 SHCTX \
  167. "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
  168. "UninstallString"
  169. StrCmp $R0 "" done
  170. MessageBox MB_YESNO|MB_ICONEXCLAMATION \
  171. "${PRODUCT_NAME} is already installed. $\n$\nClick `YES` (recomended) to remove the \
  172. previous version or `NO` to install new version over old version." \
  173. IDNO done
  174. ;Run the uninstaller
  175. uninst:
  176. ClearErrors
  177. ExecWait '$R0' ;Do not copy the uninstaller to a temp file
  178. IfErrors no_remove_uninstaller done
  179. ;You can either use Delete /REBOOTOK in the uninstaller or add some code
  180. ;here to remove the uninstaller. Use a registry key to check
  181. ;whether the user has chosen to uninstall. If you are using an uninstaller
  182. ;components page, make sure all sections are uninstalled.
  183. no_remove_uninstaller:
  184. done:
  185. FunctionEnd
  186. Section "Core files (required)" SecCore
  187. SectionIn RO
  188. SetOutPath "$INSTDIR"
  189. SetOverwrite ifnewer
  190. CreateDirectory "$INSTDIR\data"
  191. CreateDirectory "$INSTDIR\data\fonts"
  192. CreateDirectory "$INSTDIR\data\graphics"
  193. CreateDirectory "$INSTDIR\data\help"
  194. CreateDirectory "$INSTDIR\data\help\idx"
  195. CreateDirectory "$INSTDIR\data\help\tips"
  196. CreateDirectory "$INSTDIR\data\icons"
  197. CreateDirectory "$INSTDIR\data\music"
  198. CreateDirectory "$INSTDIR\data\perserver"
  199. CreateDirectory "$INSTDIR\data\perserver\default"
  200. CreateDirectory "$INSTDIR\data\graphics\badges"
  201. CreateDirectory "$INSTDIR\data\graphics\gui"
  202. CreateDirectory "$INSTDIR\data\graphics\flags"
  203. CreateDirectory "$INSTDIR\data\graphics\images"
  204. CreateDirectory "$INSTDIR\data\graphics\shaders"
  205. CreateDirectory "$INSTDIR\data\graphics\sprites"
  206. CreateDirectory "$INSTDIR\data\sfx"
  207. CreateDirectory "$INSTDIR\data\sfx\system"
  208. CreateDirectory "$INSTDIR\data\themes"
  209. CreateDirectory "$INSTDIR\data\themes\blacknblack"
  210. CreateDirectory "$INSTDIR\data\themes\blackwood"
  211. CreateDirectory "$INSTDIR\data\themes\classic"
  212. CreateDirectory "$INSTDIR\data\themes\enchilado"
  213. CreateDirectory "$INSTDIR\data\themes\golden-delicious"
  214. CreateDirectory "$INSTDIR\data\themes\jewelry"
  215. CreateDirectory "$INSTDIR\data\themes\mana"
  216. CreateDirectory "$INSTDIR\data\themes\pink"
  217. CreateDirectory "$INSTDIR\data\themes\unity"
  218. CreateDirectory "$INSTDIR\data\themes\wood"
  219. CreateDirectory "$INSTDIR\data\translations"
  220. CreateDirectory "$INSTDIR\data\translations\help"
  221. CreateDirectory "$INSTDIR\docs"
  222. SetOverwrite ifnewer
  223. SetOutPath "$INSTDIR"
  224. File "${EXEDIR}\manaplus.exe"
  225. File "${DLLDIR}\SDL.dll"
  226. File "${DLLDIR}\SDL_image.dll"
  227. ; File "${DLLDIR}\SDL_mixer.dll"
  228. File "${DLLDIR}\SDL_net.dll"
  229. File "${DLLDIR}\SDL_ttf.dll"
  230. File "${DLLDIR}\libSDL_gfx-15.dll"
  231. File "${DLLDIR}\libcurl-4.dll"
  232. File "${DLLDIR}\libfreetype-6.dll"
  233. File "${DLLDIR}\${SEHDLL}"
  234. File "${DLLDIR}\libiconv-2.dll"
  235. File "${DLLDIR}\libintl-8.dll"
  236. File "${DLLDIR}\libjpeg-9.dll"
  237. File "${DLLDIR}\libogg-0.dll"
  238. File "${DLLDIR}\libpng16-16.dll"
  239. File "${DLLDIR}\libstdc++-6.dll"
  240. File "${DLLDIR}\libvorbis-0.dll"
  241. File "${DLLDIR}\libvorbisfile-3.dll"
  242. File "${DLLDIR}\libxml2-2.dll"
  243. File "${DLLDIR}\libwinpthread-1.dll"
  244. File "${DLLDIR}\zlib1.dll"
  245. File "${SRCDIR}\AUTHORS"
  246. File "${SRCDIR}\COPYING"
  247. File "${SRCDIR}\NEWS"
  248. File "${SRCDIR}\README.txt"
  249. SetOutPath "$INSTDIR\data\fonts"
  250. File "${SRCDIR}\data\fonts\*.ttf"
  251. SetOutPath "$INSTDIR\data\graphics\badges"
  252. File "${SRCDIR}\data\graphics\badges\*.png"
  253. File "${SRCDIR}\data\graphics\badges\*.xml"
  254. SetOutPath "$INSTDIR\data\graphics\flags"
  255. File "${SRCDIR}\data\graphics\flags\*.png"
  256. SetOutPath "$INSTDIR\data\graphics\gui"
  257. File "${SRCDIR}\data\graphics\gui\*.png"
  258. File "${SRCDIR}\data\graphics\gui\*.xml"
  259. SetOutPath "$INSTDIR\data\graphics\images"
  260. File /x minimap_*.png ${SRCDIR}\data\graphics\images\*.png
  261. File "${SRCDIR}\data\graphics\images\error.png"
  262. SetOutPath "$INSTDIR\data\graphics\shaders"
  263. File "${SRCDIR}\data\graphics\shaders\*.glsl"
  264. SetOutPath "$INSTDIR\data\graphics\sprites"
  265. File "${SRCDIR}\data\graphics\sprites\*.png"
  266. File "${SRCDIR}\data\graphics\sprites\*.xml"
  267. SetOutPath "$INSTDIR\data\sfx\system"
  268. File "${SRCDIR}\data\sfx\system\*.ogg"
  269. SetOutPath "$INSTDIR\data\themes\blacknblack"
  270. File "${SRCDIR}\data\themes\blacknblack\*.png"
  271. File "${SRCDIR}\data\themes\blacknblack\*.xml"
  272. SetOutPath "$INSTDIR\data\themes\blackwood"
  273. File "${SRCDIR}\data\themes\blackwood\*.png"
  274. File "${SRCDIR}\data\themes\blackwood\*.xml"
  275. SetOutPath "$INSTDIR\data\themes\mana"
  276. File "${SRCDIR}\data\themes\mana\*.png"
  277. File "${SRCDIR}\data\themes\mana\*.xml"
  278. SetOutPath "$INSTDIR\data\themes\enchilado"
  279. File "${SRCDIR}\data\themes\enchilado\*.png"
  280. File "${SRCDIR}\data\themes\enchilado\*.xml"
  281. SetOutPath "$INSTDIR\data\themes\golden-delicious"
  282. File "${SRCDIR}\data\themes\golden-delicious\*.png"
  283. File "${SRCDIR}\data\themes\golden-delicious\*.xml"
  284. SetOutPath "$INSTDIR\data\themes\jewelry"
  285. File "${SRCDIR}\data\themes\jewelry\*.png"
  286. File "${SRCDIR}\data\themes\jewelry\*.xml"
  287. SetOutPath "$INSTDIR\data\themes\pink"
  288. File "${SRCDIR}\data\themes\pink\*.png"
  289. File "${SRCDIR}\data\themes\pink\*.xml"
  290. SetOutPath "$INSTDIR\data\themes\unity"
  291. File "${SRCDIR}\data\themes\unity\*.png"
  292. File "${SRCDIR}\data\themes\unity\*.xml"
  293. SetOutPath "$INSTDIR\data\themes\wood"
  294. File "${SRCDIR}\data\themes\wood\*.png"
  295. File "${SRCDIR}\data\themes\wood\*.xml"
  296. SetOutPath "$INSTDIR\data\translations\help"
  297. File "${SRCDIR}\data\translations\help\*.po"
  298. SetOutPath "$INSTDIR\data\help"
  299. File "${SRCDIR}\data\help\*.txt"
  300. SetOutPath "$INSTDIR\data\help\tips"
  301. File "${SRCDIR}\data\help\tips\*.txt"
  302. File "${SRCDIR}\data\help\tips\*.jpg"
  303. SetOutPath "$INSTDIR\data\help\idx"
  304. File "${SRCDIR}\data\help\idx\*.idx"
  305. SetOutPath "$INSTDIR\data\icons\"
  306. File "${SRCDIR}\data\icons\manaplus.ico"
  307. SetOutPath "$INSTDIR\data\music"
  308. File "${SRCDIR}\data\music\*.ogg"
  309. SetOutPath "$INSTDIR\data\perserver\default\"
  310. File "${SRCDIR}\data\perserver\default\*.txt"
  311. File "${SRCDIR}\data\perserver\default\*.xml"
  312. SetOutPath "$INSTDIR\docs"
  313. File "${SRCDIR}\docs\FAQ.txt"
  314. SectionEnd
  315. Section "Create Shortcuts" SecShortcuts
  316. SetOutPath "$INSTDIR"
  317. SetOverwrite ifnewer
  318. CreateDirectory "$SMPROGRAMS\Mana"
  319. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus.lnk" "$INSTDIR\manaplus.exe"
  320. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (no opengl).lnk" "$INSTDIR\manaplus.exe" --no-opengl
  321. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (safemode).lnk" "$INSTDIR\manaplus.exe" --safemode
  322. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (tests).lnk" "$INSTDIR\manaplus.exe" --tests
  323. CreateShortCut "$DESKTOP\ManaPlus.lnk" "$INSTDIR\manaplus.exe"
  324. CreateShortCut "$DESKTOP\ManaPlus (tests).lnk" "$INSTDIR\manaplus.exe" --tests
  325. ${registerExtension} "$INSTDIR\manaplus.exe" ".manaplus" "ManaPlus brandings"
  326. SectionEnd
  327. Section /o "Portable" SecPortable
  328. SetOutPath "$INSTDIR"
  329. File "portable.xml"
  330. SectionEnd
  331. Section /o "Debugger" SecDebug
  332. SetOutPath "$INSTDIR"
  333. File "${DLLDIR}\gdb.exe"
  334. File "${DLLDIR}\libdl.dll"
  335. File "${DLLDIR}\libexpat-1.dll"
  336. File "${DLLDIR}\libreadline6.dll"
  337. File "${DLLDIR}\libtermcap.dll"
  338. File "${EXEDIR}\manaplusd.exe"
  339. ${If} ${SectionIsSelected} ${SecShortcuts}
  340. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe"
  341. CreateShortCut "$DESKTOP\ManaPlus (debug).lnk" '"$INSTDIR\gdb.exe"' '"$INSTDIR\manaplusd.exe"' "$INSTDIR\manaplusd.exe"
  342. ${EndIf}
  343. SectionEnd
  344. Section /o "Profiler" SecProfiler
  345. SetOutPath "$INSTDIR"
  346. File "${EXEDIR}\manaplusp.exe"
  347. ${If} ${SectionIsSelected} ${SecShortcuts}
  348. CreateShortCut "$SMPROGRAMS\Mana\ManaPlus (profiler).lnk" "$INSTDIR\manaplusp.exe"
  349. CreateShortCut "$DESKTOP\ManaPlus (profiler).lnk" "$INSTDIR\manaplusp.exe"
  350. ${EndIf}
  351. SectionEnd
  352. ; Section "Tools" SecTools
  353. ; SetOutPath "$INSTDIR"
  354. ; File "${EXEDIR}\dyecmd.exe"
  355. ; SectionEnd
  356. Section "Evol Online shortcuts" SecEvol
  357. SetOutPath "$INSTDIR"
  358. CreateDirectory "$INSTDIR\data\evol"
  359. CreateDirectory "$INSTDIR\data\evol\icons"
  360. CreateDirectory "$INSTDIR\data\evol\images"
  361. SetOutPath "$INSTDIR"
  362. File "${SRCDIR}\data\evol\evol.manaplus"
  363. SetOutPath "$INSTDIR\data\evol\images"
  364. File "${SRCDIR}\data\evol\images\*.png"
  365. SetOutPath "$INSTDIR\data\evol\icons"
  366. File "${SRCDIR}\data\evol\icons\*.ico"
  367. CreateShortCut "$SMPROGRAMS\Mana\EvolOnline.lnk" '"$INSTDIR\manaplus.exe"' '"$INSTDIR\evol.manaplus"' "$INSTDIR\manaplus.exe" 1
  368. CreateShortCut "$DESKTOP\EvolOnline.lnk" '"$INSTDIR\manaplus.exe"' '"$INSTDIR\evol.manaplus"' "$INSTDIR\manaplus.exe" 1
  369. SectionEnd
  370. Section "Translations" SecTrans
  371. SetOutPath "$INSTDIR"
  372. File /nonfatal /r "${SRCDIR}\translations"
  373. SectionEnd
  374. ;Package descriptions
  375. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  376. !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core program files."
  377. !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} "Create game shortcuts and register extensions."
  378. !insertmacro MUI_DESCRIPTION_TEXT ${SecPortable} "Portable client. (If selected client will work as portable client.)"
  379. !insertmacro MUI_DESCRIPTION_TEXT ${SecEvol} "Create shortcuts for Evol Online."
  380. !insertmacro MUI_DESCRIPTION_TEXT ${SecTrans} "Translations for the user interface. Uncheck this component to leave it in English."
  381. !insertmacro MUI_DESCRIPTION_TEXT ${SecDebug} "Install debugger for try to detect stability issues."
  382. !insertmacro MUI_DESCRIPTION_TEXT ${SecProfiler} "Install profiler build to detect perfomance issues."
  383. ; !insertmacro MUI_DESCRIPTION_TEXT ${SecTools} "Install tools like dyecmd."
  384. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  385. Section -AdditionalIcons
  386. WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
  387. CreateShortCut "$SMPROGRAMS\Mana\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url"
  388. CreateShortCut "$SMPROGRAMS\Mana\Readme.lnk" "notepad.exe" "$INSTDIR\README.txt"
  389. CreateShortCut "$SMPROGRAMS\Mana\FAQ.lnk" "$INSTDIR\docs\FAQ.txt"
  390. CreateShortCut "$SMPROGRAMS\Mana\Uninstall.lnk" "$INSTDIR\uninst.exe"
  391. SectionEnd
  392. Section -Post
  393. WriteUninstaller "$INSTDIR\uninst.exe"
  394. WriteRegStr SHCTX "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\manaplus.exe"
  395. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)"
  396. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe"
  397. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\manaplus.exe"
  398. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
  399. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  400. WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
  401. SectionEnd
  402. Function un.onInit
  403. !insertmacro MUI_UNGETLANGUAGE
  404. !insertmacro MULTIUSER_UNINIT
  405. FunctionEnd
  406. Section Uninstall
  407. DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\Mana"
  408. Delete "$INSTDIR\*.*"
  409. Delete "$SMPROGRAMS\Mana\Uninstall.lnk"
  410. Delete "$DESKTOP\ManaPlus.lnk"
  411. Delete "$DESKTOP\ManaPlus (debug).lnk"
  412. Delete "$DESKTOP\ManaPlus (profiler).lnk"
  413. Delete "$DESKTOP\ManaPlus (tests).lnk"
  414. Delete "$SMPROGRAMS\Mana\ManaPlus.lnk"
  415. Delete "$SMPROGRAMS\Mana\ManaPlus (debug).lnk"
  416. Delete "$SMPROGRAMS\Mana\ManaPlus (profiler).lnk"
  417. Delete "$SMPROGRAMS\Mana\ManaPlus (no opengl).lnk"
  418. Delete "$SMPROGRAMS\Mana\ManaPlus (safemode).lnk"
  419. Delete "$SMPROGRAMS\Mana\ManaPlus (tests).lnk"
  420. Delete "$SMPROGRAMS\Mana\Website.lnk"
  421. Delete "$SMPROGRAMS\Mana\Readme.lnk"
  422. Delete "$SMPROGRAMS\Mana\FAQ.lnk"
  423. Delete "$SMPROGRAMS\Mana\EvolOnline.lnk"
  424. Delete "$DESKTOP\EvolOnline.lnk"
  425. RMDir "$SMPROGRAMS\Mana"
  426. RMDir /r "$INSTDIR\data"
  427. RMDir /r "$INSTDIR\docs"
  428. RMDir /r "$INSTDIR\translations"
  429. RMDir /r "$INSTDIR\updates"
  430. RMDir "$INSTDIR"
  431. DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  432. DeleteRegKey SHCTX "${PRODUCT_DIR_REGKEY}"
  433. ${unregisterExtension} ".manaplus" "ManaPlus brandings"
  434. SetAutoClose true
  435. SectionEnd