makensis.nsi 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051
  1. ;NSIS Setup Script
  2. ;--------------------------------
  3. !ifndef VERSION
  4. !define VERSION 'anonymous-build'
  5. !endif
  6. ;--------------------------------
  7. ;Configuration
  8. !ifdef OUTFILE
  9. OutFile "${OUTFILE}"
  10. !else
  11. OutFile ..\nsis-${VERSION}-setup.exe
  12. !endif
  13. SetCompressor /SOLID lzma
  14. InstType "Full"
  15. InstType "Lite"
  16. InstType "Minimal"
  17. InstallDir $PROGRAMFILES\NSIS
  18. InstallDirRegKey HKLM Software\NSIS ""
  19. RequestExecutionLevel admin
  20. ;--------------------------------
  21. ;Header Files
  22. !include "MUI2.nsh"
  23. !include "Sections.nsh"
  24. !include "LogicLib.nsh"
  25. !include "Memento.nsh"
  26. !include "WordFunc.nsh"
  27. ;--------------------------------
  28. ;Functions
  29. !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  30. !insertmacro VersionCompare
  31. !endif
  32. ;--------------------------------
  33. ;Definitions
  34. !define SHCNE_ASSOCCHANGED 0x8000000
  35. !define SHCNF_IDLIST 0
  36. ;--------------------------------
  37. ;Configuration
  38. ;Names
  39. Name "NSIS"
  40. Caption "NSIS ${VERSION} Setup"
  41. ;Memento Settings
  42. !define MEMENTO_REGISTRY_ROOT HKLM
  43. !define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
  44. ;Interface Settings
  45. !define MUI_ABORTWARNING
  46. !define MUI_HEADERIMAGE
  47. !define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp"
  48. !define MUI_COMPONENTSPAGE_SMALLDESC
  49. ;Pages
  50. !define MUI_WELCOMEPAGE_TITLE "Welcome to the NSIS ${VERSION} Setup Wizard"
  51. !define MUI_WELCOMEPAGE_TEXT "This wizard will guide you through the installation of NSIS (Nullsoft Scriptable Install System) ${VERSION}, the next generation of the Windows installer and uninstaller system that doesn't suck and isn't huge.$\r$\n$\r$\nNSIS 2 includes a new Modern User Interface, LZMA compression, support for multiple languages and an easy plug-in system.$\r$\n$\r$\n$_CLICK"
  52. !insertmacro MUI_PAGE_WELCOME
  53. !insertmacro MUI_PAGE_LICENSE "..\COPYING"
  54. !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  55. Page custom PageReinstall PageLeaveReinstall
  56. !endif
  57. !insertmacro MUI_PAGE_COMPONENTS
  58. !insertmacro MUI_PAGE_DIRECTORY
  59. !insertmacro MUI_PAGE_INSTFILES
  60. !define MUI_FINISHPAGE_LINK "Visit the NSIS site for the latest news, FAQs and support"
  61. !define MUI_FINISHPAGE_LINK_LOCATION "http://nsis.sf.net/"
  62. !define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
  63. !define MUI_FINISHPAGE_NOREBOOTSUPPORT
  64. !define MUI_FINISHPAGE_SHOWREADME
  65. !define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
  66. !define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes
  67. !insertmacro MUI_PAGE_FINISH
  68. !insertmacro MUI_UNPAGE_CONFIRM
  69. !insertmacro MUI_UNPAGE_INSTFILES
  70. ;--------------------------------
  71. ;Languages
  72. !insertmacro MUI_LANGUAGE "English"
  73. ;--------------------------------
  74. ;Installer Sections
  75. ${MementoSection} "NSIS Core Files (required)" SecCore
  76. SetDetailsPrint textonly
  77. DetailPrint "Installing NSIS Core Files..."
  78. SetDetailsPrint listonly
  79. SectionIn 1 2 3 RO
  80. SetOutPath $INSTDIR
  81. RMDir /r $SMPROGRAMS\NSIS
  82. SetOverwrite on
  83. File ..\makensis.exe
  84. File ..\makensisw.exe
  85. File ..\COPYING
  86. File ..\NSIS.chm
  87. File ..\NSIS.exe
  88. File /nonfatal ..\NSIS.exe.manifest
  89. IfFileExists $INSTDIR\nsisconf.nsi "" +2
  90. Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
  91. SetOverwrite off
  92. File ..\nsisconf.nsh
  93. SetOverwrite on
  94. SetOutPath $INSTDIR\Stubs
  95. File ..\Stubs\bzip2
  96. File ..\Stubs\bzip2_solid
  97. File ..\Stubs\lzma
  98. File ..\Stubs\lzma_solid
  99. File ..\Stubs\zlib
  100. File ..\Stubs\zlib_solid
  101. File ..\Stubs\uninst
  102. SetOutPath $INSTDIR\Include
  103. File ..\Include\WinMessages.nsh
  104. File ..\Include\Sections.nsh
  105. File ..\Include\Library.nsh
  106. File ..\Include\UpgradeDLL.nsh
  107. File ..\Include\LogicLib.nsh
  108. File ..\Include\StrFunc.nsh
  109. File ..\Include\Colors.nsh
  110. File ..\Include\FileFunc.nsh
  111. File ..\Include\TextFunc.nsh
  112. File ..\Include\WordFunc.nsh
  113. File ..\Include\WinVer.nsh
  114. File ..\Include\x64.nsh
  115. File ..\Include\Memento.nsh
  116. File ..\Include\LangFile.nsh
  117. File ..\Include\InstallOptions.nsh
  118. File ..\Include\MultiUser.nsh
  119. File ..\Include\VB6RunTime.nsh
  120. File ..\Include\Util.nsh
  121. File ..\Include\WinCore.nsh
  122. SetOutPath $INSTDIR\Include\Win
  123. File ..\Include\Win\WinDef.nsh
  124. File ..\Include\Win\WinError.nsh
  125. File ..\Include\Win\WinNT.nsh
  126. File ..\Include\Win\WinUser.nsh
  127. SetOutPath $INSTDIR\Docs\StrFunc
  128. File ..\Docs\StrFunc\StrFunc.txt
  129. SetOutPath $INSTDIR\Docs\MultiUser
  130. File ..\Docs\MultiUser\Readme.html
  131. SetOutPath $INSTDIR\Docs\makensisw
  132. File ..\Docs\makensisw\*.txt
  133. SetOutPath $INSTDIR\Menu
  134. File ..\Menu\*.html
  135. SetOutPath $INSTDIR\Menu\images
  136. File ..\Menu\images\header.gif
  137. File ..\Menu\images\line.gif
  138. File ..\Menu\images\site.gif
  139. Delete $INSTDIR\makensis.htm
  140. Delete $INSTDIR\Docs\*.html
  141. Delete $INSTDIR\Docs\style.css
  142. RMDir $INSTDIR\Docs
  143. SetOutPath $INSTDIR\Bin
  144. File ..\Bin\LibraryLocal.exe
  145. File ..\Bin\RegTool.bin
  146. SetOutPath $INSTDIR\Plugins
  147. File ..\Plugins\TypeLib.dll
  148. ReadRegStr $R0 HKCR ".nsi" ""
  149. StrCmp $R0 "NSISFile" 0 +2
  150. DeleteRegKey HKCR "NSISFile"
  151. WriteRegStr HKCR ".nsi" "" "NSIS.Script"
  152. WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
  153. WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
  154. ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
  155. StrCmp $R0 "" 0 no_nsiopen
  156. WriteRegStr HKCR "NSIS.Script\shell" "" "open"
  157. WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
  158. no_nsiopen:
  159. WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
  160. WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
  161. WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
  162. WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
  163. ReadRegStr $R0 HKCR ".nsh" ""
  164. StrCmp $R0 "NSHFile" 0 +2
  165. DeleteRegKey HKCR "NSHFile"
  166. WriteRegStr HKCR ".nsh" "" "NSIS.Header"
  167. WriteRegStr HKCR "NSIS.Header" "" "NSIS Header File"
  168. WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
  169. ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
  170. StrCmp $R0 "" 0 no_nshopen
  171. WriteRegStr HKCR "NSIS.Header\shell" "" "open"
  172. WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
  173. no_nshopen:
  174. System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
  175. ${MementoSectionEnd}
  176. ${MementoSection} "Script Examples" SecExample
  177. SetDetailsPrint textonly
  178. DetailPrint "Installing Script Examples..."
  179. SetDetailsPrint listonly
  180. SectionIn 1 2
  181. SetOutPath $INSTDIR\Examples
  182. File ..\Examples\makensis.nsi
  183. File ..\Examples\example1.nsi
  184. File ..\Examples\example2.nsi
  185. File ..\Examples\viewhtml.nsi
  186. File ..\Examples\waplugin.nsi
  187. File ..\Examples\bigtest.nsi
  188. File ..\Examples\primes.nsi
  189. File ..\Examples\rtest.nsi
  190. File ..\Examples\gfx.nsi
  191. File ..\Examples\one-section.nsi
  192. File ..\Examples\languages.nsi
  193. File ..\Examples\Library.nsi
  194. File ..\Examples\VersionInfo.nsi
  195. File ..\Examples\UserVars.nsi
  196. File ..\Examples\LogicLib.nsi
  197. File ..\Examples\silent.nsi
  198. File ..\Examples\StrFunc.nsi
  199. File ..\Examples\FileFunc.nsi
  200. File ..\Examples\FileFunc.ini
  201. File ..\Examples\FileFuncTest.nsi
  202. File ..\Examples\TextFunc.nsi
  203. File ..\Examples\TextFunc.ini
  204. File ..\Examples\TextFuncTest.nsi
  205. File ..\Examples\WordFunc.nsi
  206. File ..\Examples\WordFunc.ini
  207. File ..\Examples\WordFuncTest.nsi
  208. File ..\Examples\Memento.nsi
  209. SetOutPath $INSTDIR\Examples\Plugin
  210. File ..\Examples\Plugin\exdll.c
  211. File ..\Examples\Plugin\exdll.dpr
  212. File ..\Examples\Plugin\exdll.dsp
  213. File ..\Examples\Plugin\exdll.dsw
  214. File ..\Examples\Plugin\exdll_with_unit.dpr
  215. File ..\Examples\Plugin\exdll-vs2008.sln
  216. File ..\Examples\Plugin\exdll-vs2008.vcproj
  217. File ..\Examples\Plugin\extdll.inc
  218. File ..\Examples\Plugin\nsis.pas
  219. SetOutPath $INSTDIR\Examples\Plugin\nsis
  220. File ..\Examples\Plugin\nsis\pluginapi.h
  221. File ..\Examples\Plugin\nsis\pluginapi.lib
  222. File ..\Examples\Plugin\nsis\api.h
  223. ${MementoSectionEnd}
  224. !ifndef NO_STARTMENUSHORTCUTS
  225. ${MementoSection} "Start Menu and Desktop Shortcuts" SecShortcuts
  226. SetDetailsPrint textonly
  227. DetailPrint "Installing Start Menu and Desktop Shortcuts..."
  228. SetDetailsPrint listonly
  229. !else
  230. ${MementoSection} "Desktop Shortcut" SecShortcuts
  231. SetDetailsPrint textonly
  232. DetailPrint "Installing Desktop Shortcut..."
  233. SetDetailsPrint listonly
  234. !endif
  235. SectionIn 1 2
  236. SetOutPath $INSTDIR
  237. !ifndef NO_STARTMENUSHORTCUTS
  238. CreateShortCut "$SMPROGRAMS\NSIS.lnk" "$INSTDIR\NSIS.exe"
  239. !endif
  240. CreateShortCut "$DESKTOP\NSIS.lnk" "$INSTDIR\NSIS.exe"
  241. ${MementoSectionEnd}
  242. SectionGroup "User Interfaces" SecInterfaces
  243. ${MementoSection} "Modern User Interface" SecInterfacesModernUI
  244. SetDetailsPrint textonly
  245. DetailPrint "Installing User Interfaces | Modern User Interface..."
  246. SetDetailsPrint listonly
  247. SectionIn 1 2
  248. SetOutPath "$INSTDIR\Examples\Modern UI"
  249. File "..\Examples\Modern UI\Basic.nsi"
  250. File "..\Examples\Modern UI\HeaderBitmap.nsi"
  251. File "..\Examples\Modern UI\MultiLanguage.nsi"
  252. File "..\Examples\Modern UI\StartMenu.nsi"
  253. File "..\Examples\Modern UI\WelcomeFinish.nsi"
  254. SetOutPath "$INSTDIR\Contrib\Modern UI"
  255. File "..\Contrib\Modern UI\System.nsh"
  256. File "..\Contrib\Modern UI\ioSpecial.ini"
  257. SetOutPath "$INSTDIR\Docs\Modern UI"
  258. File "..\Docs\Modern UI\Readme.html"
  259. File "..\Docs\Modern UI\Changelog.txt"
  260. File "..\Docs\Modern UI\License.txt"
  261. SetOutPath "$INSTDIR\Docs\Modern UI\images"
  262. File "..\Docs\Modern UI\images\header.gif"
  263. File "..\Docs\Modern UI\images\screen1.png"
  264. File "..\Docs\Modern UI\images\screen2.png"
  265. File "..\Docs\Modern UI\images\open.gif"
  266. File "..\Docs\Modern UI\images\closed.gif"
  267. SetOutPath $INSTDIR\Contrib\UIs
  268. File "..\Contrib\UIs\modern.exe"
  269. File "..\Contrib\UIs\modern_headerbmp.exe"
  270. File "..\Contrib\UIs\modern_headerbmpr.exe"
  271. File "..\Contrib\UIs\modern_nodesc.exe"
  272. File "..\Contrib\UIs\modern_smalldesc.exe"
  273. SetOutPath $INSTDIR\Include
  274. File "..\Include\MUI.nsh"
  275. SetOutPath "$INSTDIR\Contrib\Modern UI 2"
  276. File "..\Contrib\Modern UI 2\Deprecated.nsh"
  277. File "..\Contrib\Modern UI 2\Interface.nsh"
  278. File "..\Contrib\Modern UI 2\Localization.nsh"
  279. File "..\Contrib\Modern UI 2\MUI2.nsh"
  280. File "..\Contrib\Modern UI 2\Pages.nsh"
  281. SetOutPath "$INSTDIR\Contrib\Modern UI 2\Pages"
  282. File "..\Contrib\Modern UI 2\Pages\Components.nsh"
  283. File "..\Contrib\Modern UI 2\Pages\Directory.nsh"
  284. File "..\Contrib\Modern UI 2\Pages\Finish.nsh"
  285. File "..\Contrib\Modern UI 2\Pages\InstallFiles.nsh"
  286. File "..\Contrib\Modern UI 2\Pages\License.nsh"
  287. File "..\Contrib\Modern UI 2\Pages\StartMenu.nsh"
  288. File "..\Contrib\Modern UI 2\Pages\UninstallConfirm.nsh"
  289. File "..\Contrib\Modern UI 2\Pages\Welcome.nsh"
  290. SetOutPath "$INSTDIR\Docs\Modern UI 2"
  291. File "..\Docs\Modern UI 2\Readme.html"
  292. File "..\Docs\Modern UI 2\License.txt"
  293. SetOutPath "$INSTDIR\Docs\Modern UI 2\images"
  294. File "..\Docs\Modern UI 2\images\header.gif"
  295. File "..\Docs\Modern UI 2\images\screen1.png"
  296. File "..\Docs\Modern UI 2\images\screen2.png"
  297. File "..\Docs\Modern UI 2\images\open.gif"
  298. File "..\Docs\Modern UI 2\images\closed.gif"
  299. SetOutPath $INSTDIR\Include
  300. File "..\Include\MUI2.nsh"
  301. ${MementoSectionEnd}
  302. ${MementoSection} "Default User Interface" SecInterfacesDefaultUI
  303. SetDetailsPrint textonly
  304. DetailPrint "Installing User Interfaces | Default User Interface..."
  305. SetDetailsPrint listonly
  306. SectionIn 1
  307. SetOutPath "$INSTDIR\Contrib\UIs"
  308. File "..\Contrib\UIs\default.exe"
  309. ${MementoSectionEnd}
  310. ${MementoSection} "Tiny User Interface" SecInterfacesTinyUI
  311. SetDetailsPrint textonly
  312. DetailPrint "Installing User Interfaces | Tiny User Interface..."
  313. SetDetailsPrint listonly
  314. SectionIn 1
  315. SetOutPath "$INSTDIR\Contrib\UIs"
  316. File "..\Contrib\UIs\sdbarker_tiny.exe"
  317. ${MementoSectionEnd}
  318. SectionGroupEnd
  319. ${MementoSection} "Graphics" SecGraphics
  320. SetDetailsPrint textonly
  321. DetailPrint "Installing Graphics..."
  322. SetDetailsPrint listonly
  323. SectionIn 1
  324. Delete $INSTDIR\Contrib\Icons\*.ico
  325. Delete $INSTDIR\Contrib\Icons\*.bmp
  326. RMDir $INSTDIR\Contrib\Icons
  327. SetOutPath $INSTDIR\Contrib\Graphics
  328. File /r "..\Contrib\Graphics\*.ico"
  329. File /r "..\Contrib\Graphics\*.bmp"
  330. ${MementoSectionEnd}
  331. ${MementoSection} "Language Files" SecLangFiles
  332. SetDetailsPrint textonly
  333. DetailPrint "Installing Language Files..."
  334. SetDetailsPrint listonly
  335. SectionIn 1
  336. SetOutPath "$INSTDIR\Contrib\Language files"
  337. File "..\Contrib\Language files\*.nlf"
  338. SetOutPath $INSTDIR\Bin
  339. File ..\Bin\MakeLangID.exe
  340. !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
  341. mui:
  342. SetOutPath "$INSTDIR\Contrib\Language files"
  343. File "..\Contrib\Language files\*.nsh"
  344. nomui:
  345. ${MementoSectionEnd}
  346. SectionGroup "Tools" SecTools
  347. ${MementoSection} "Zip2Exe" SecToolsZ2E
  348. SetDetailsPrint textonly
  349. DetailPrint "Installing Tools | Zip2Exe..."
  350. SetDetailsPrint listonly
  351. SectionIn 1
  352. SetOutPath $INSTDIR\Bin
  353. File ..\Bin\zip2exe.exe
  354. SetOutPath $INSTDIR\Contrib\zip2exe
  355. File ..\Contrib\zip2exe\Base.nsh
  356. File ..\Contrib\zip2exe\Modern.nsh
  357. File ..\Contrib\zip2exe\Classic.nsh
  358. ${MementoSectionEnd}
  359. SectionGroupEnd
  360. SectionGroup "Plug-ins" SecPluginsPlugins
  361. ${MementoSection} "Banner" SecPluginsBanner
  362. SetDetailsPrint textonly
  363. DetailPrint "Installing Plug-ins | Banner..."
  364. SetDetailsPrint listonly
  365. SectionIn 1
  366. SetOutPath $INSTDIR\Plugins
  367. File ..\Plugins\Banner.dll
  368. SetOutPath $INSTDIR\Docs\Banner
  369. File ..\Docs\Banner\Readme.txt
  370. SetOutPath $INSTDIR\Examples\Banner
  371. File ..\Examples\Banner\Example.nsi
  372. ${MementoSectionEnd}
  373. ${MementoSection} "Language DLL" SecPluginsLangDLL
  374. SetDetailsPrint textonly
  375. DetailPrint "Installing Plug-ins | Language DLL..."
  376. SetDetailsPrint listonly
  377. SectionIn 1
  378. SetOutPath $INSTDIR\Plugins
  379. File ..\Plugins\LangDLL.dll
  380. ${MementoSectionEnd}
  381. ${MementoSection} "nsExec" SecPluginsnsExec
  382. SetDetailsPrint textonly
  383. DetailPrint "Installing Plug-ins | nsExec..."
  384. SetDetailsPrint listonly
  385. SectionIn 1
  386. SetOutPath $INSTDIR\Plugins
  387. File ..\Plugins\nsExec.dll
  388. SetOutPath $INSTDIR\Docs\nsExec
  389. File ..\Docs\nsExec\nsExec.txt
  390. SetOutPath $INSTDIR\Examples\nsExec
  391. File ..\Examples\nsExec\test.nsi
  392. ${MementoSectionEnd}
  393. ${MementoSection} "Splash" SecPluginsSplash
  394. SetDetailsPrint textonly
  395. DetailPrint "Installing Plug-ins | Splash..."
  396. SetDetailsPrint listonly
  397. SectionIn 1
  398. SetOutPath $INSTDIR\Plugins
  399. File ..\Plugins\splash.dll
  400. SetOutPath $INSTDIR\Docs\Splash
  401. File ..\Docs\Splash\splash.txt
  402. SetOutPath $INSTDIR\Examples\Splash
  403. File ..\Examples\Splash\Example.nsi
  404. ${MementoSectionEnd}
  405. ${MementoSection} "AdvSplash" SecPluginsSplashT
  406. SetDetailsPrint textonly
  407. DetailPrint "Installing Plug-ins | AdvSplash..."
  408. SetDetailsPrint listonly
  409. SectionIn 1
  410. SetOutPath $INSTDIR\Plugins
  411. File ..\Plugins\advsplash.dll
  412. SetOutPath $INSTDIR\Docs\AdvSplash
  413. File ..\Docs\AdvSplash\advsplash.txt
  414. SetOutPath $INSTDIR\Examples\AdvSplash
  415. File ..\Examples\AdvSplash\Example.nsi
  416. ${MementoSectionEnd}
  417. ${MementoSection} "BgImage" SecPluginsBgImage
  418. SetDetailsPrint textonly
  419. DetailPrint "Installing Plug-ins | BgImage..."
  420. SetDetailsPrint listonly
  421. SectionIn 1
  422. SetOutPath $INSTDIR\Plugins
  423. File ..\Plugins\BgImage.dll
  424. SetOutPath $INSTDIR\Docs\BgImage
  425. File ..\Docs\BgImage\BgImage.txt
  426. SetOutPath $INSTDIR\Examples\BgImage
  427. File ..\Examples\BgImage\Example.nsi
  428. ${MementoSectionEnd}
  429. ${MementoSection} "InstallOptions" SecPluginsIO
  430. SetDetailsPrint textonly
  431. DetailPrint "Installing Plug-ins | InstallOptions..."
  432. SetDetailsPrint listonly
  433. SectionIn 1
  434. SetOutPath $INSTDIR\Plugins
  435. File ..\Plugins\InstallOptions.dll
  436. SetOutPath $INSTDIR\Docs\InstallOptions
  437. File ..\Docs\InstallOptions\Readme.html
  438. File ..\Docs\InstallOptions\Changelog.txt
  439. SetOutPath $INSTDIR\Examples\InstallOptions
  440. File ..\Examples\InstallOptions\test.ini
  441. File ..\Examples\InstallOptions\test.nsi
  442. File ..\Examples\InstallOptions\testimgs.ini
  443. File ..\Examples\InstallOptions\testimgs.nsi
  444. File ..\Examples\InstallOptions\testlink.ini
  445. File ..\Examples\InstallOptions\testlink.nsi
  446. File ..\Examples\InstallOptions\testnotify.ini
  447. File ..\Examples\InstallOptions\testnotify.nsi
  448. ${MementoSectionEnd}
  449. ${MementoSection} "nsDialogs" SecPluginsDialogs
  450. SetDetailsPrint textonly
  451. DetailPrint "Installing Plug-ins | nsDialogs..."
  452. SetDetailsPrint listonly
  453. SectionIn 1
  454. SetOutPath $INSTDIR\Plugins
  455. File ..\Plugins\nsDialogs.dll
  456. SetOutPath $INSTDIR\Examples\nsDialogs
  457. File ..\Examples\nsDialogs\example.nsi
  458. File ..\Examples\nsDialogs\InstallOptions.nsi
  459. File ..\Examples\nsDialogs\timer.nsi
  460. File ..\Examples\nsDialogs\welcome.nsi
  461. SetOutPath $INSTDIR\Include
  462. File ..\Include\nsDialogs.nsh
  463. SetOutPath $INSTDIR\Docs\nsDialogs
  464. File ..\Docs\nsDialogs\Readme.html
  465. ${MementoSectionEnd}
  466. ${MementoSection} "Math" SecPluginsMath
  467. SetDetailsPrint textonly
  468. DetailPrint "Installing Plug-ins | Math..."
  469. SetDetailsPrint listonly
  470. SectionIn 1
  471. SetOutPath $INSTDIR\Plugins
  472. File ..\Plugins\Math.dll
  473. SetOutPath $INSTDIR\Docs\Math
  474. File ..\Docs\Math\Math.txt
  475. SetOutPath $INSTDIR\Examples\Math
  476. File ..\Examples\Math\math.nsi
  477. File ..\Examples\Math\mathtest.txt
  478. File ..\Examples\Math\mathtest.nsi
  479. File ..\Examples\Math\mathtest.ini
  480. ${MementoSectionEnd}
  481. ${MementoSection} "NSISdl" SecPluginsNSISDL
  482. SetDetailsPrint textonly
  483. DetailPrint "Installing Plug-ins | NSISdl..."
  484. SetDetailsPrint listonly
  485. SectionIn 1
  486. SetOutPath $INSTDIR\Plugins
  487. File ..\Plugins\nsisdl.dll
  488. SetOutPath $INSTDIR\Docs\NSISdl
  489. File ..\Docs\NSISdl\ReadMe.txt
  490. File ..\Docs\NSISdl\License.txt
  491. ${MementoSectionEnd}
  492. ${MementoSection} "System" SecPluginsSystem
  493. SetDetailsPrint textonly
  494. DetailPrint "Installing Plug-ins | System..."
  495. SetDetailsPrint listonly
  496. SectionIn 1
  497. SetOutPath $INSTDIR\Plugins
  498. File ..\Plugins\System.dll
  499. SetOutPath $INSTDIR\Docs\System
  500. File ..\Docs\System\System.html
  501. File ..\Docs\System\WhatsNew.txt
  502. SetOutPath $INSTDIR\Examples\System
  503. File ..\Examples\System\Resource.dll
  504. File ..\Examples\System\SysFunc.nsh
  505. File ..\Examples\System\System.nsh
  506. File ..\Examples\System\System.nsi
  507. ${MementoSectionEnd}
  508. ${MementoSection} "StartMenu" SecPluginsStartMenu
  509. SetDetailsPrint textonly
  510. DetailPrint "Installing Plug-ins | StartMenu..."
  511. SetDetailsPrint listonly
  512. SectionIn 1
  513. SetOutPath $INSTDIR\Plugins
  514. File ..\Plugins\StartMenu.dll
  515. SetOutPath $INSTDIR\Docs\StartMenu
  516. File ..\Docs\StartMenu\Readme.txt
  517. SetOutPath $INSTDIR\Examples\StartMenu
  518. File ..\Examples\StartMenu\Example.nsi
  519. ${MementoSectionEnd}
  520. ${MementoSection} "UserInfo" SecPluginsUserInfo
  521. SetDetailsPrint textonly
  522. DetailPrint "Installing Plug-ins | UserInfo..."
  523. SetDetailsPrint listonly
  524. SectionIn 1
  525. SetOutPath $INSTDIR\Plugins
  526. File ..\Plugins\UserInfo.dll
  527. SetOutPath $INSTDIR\Examples\UserInfo
  528. File ..\Examples\UserInfo\UserInfo.nsi
  529. ${MementoSectionEnd}
  530. ${MementoSection} "Dialer" SecPluginsDialer
  531. SetDetailsPrint textonly
  532. DetailPrint "Installing Plug-ins | Dialer..."
  533. SetDetailsPrint listonly
  534. SectionIn 1
  535. SetOutPath $INSTDIR\Plugins
  536. File ..\Plugins\Dialer.dll
  537. SetOutPath $INSTDIR\Docs\Dialer
  538. File ..\Docs\Dialer\Dialer.txt
  539. ${MementoSectionEnd}
  540. ${MementoSection} "VPatch" SecPluginsVPatch
  541. SetDetailsPrint textonly
  542. DetailPrint "Installing Plug-ins | VPatch..."
  543. SetDetailsPrint listonly
  544. SectionIn 1
  545. SetOutPath $INSTDIR\Plugins
  546. File ..\Plugins\VPatch.dll
  547. SetOutPath $INSTDIR\Examples\VPatch
  548. File ..\Examples\VPatch\example.nsi
  549. File ..\Examples\VPatch\oldfile.txt
  550. File ..\Examples\VPatch\newfile.txt
  551. File ..\Examples\VPatch\patch.pat
  552. SetOutPath $INSTDIR\Docs\VPatch
  553. File ..\Docs\VPatch\Readme.html
  554. SetOutPath $INSTDIR\Bin
  555. File ..\Bin\GenPat.exe
  556. SetOutPath $INSTDIR\Include
  557. File ..\Include\VPatchLib.nsh
  558. ${MementoSectionEnd}
  559. ${MementoSectionDone}
  560. SectionGroupEnd
  561. Section -post
  562. ; When Modern UI is installed:
  563. ; * Always install the English language file
  564. ; * Always install default icons / bitmaps
  565. !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
  566. mui:
  567. SetDetailsPrint textonly
  568. DetailPrint "Configuring Modern UI..."
  569. SetDetailsPrint listonly
  570. !insertmacro SectionFlagIsSet ${SecLangFiles} ${SF_SELECTED} langfiles nolangfiles
  571. nolangfiles:
  572. SetOutPath "$INSTDIR\Contrib\Language files"
  573. File "..\Contrib\Language files\English.nlf"
  574. SetOutPath "$INSTDIR\Contrib\Language files"
  575. File "..\Contrib\Language files\English.nsh"
  576. langfiles:
  577. !insertmacro SectionFlagIsSet ${SecGraphics} ${SF_SELECTED} graphics nographics
  578. nographics:
  579. SetOutPath $INSTDIR\Contrib\Graphics
  580. SetOutPath $INSTDIR\Contrib\Graphics\Checks
  581. File "..\Contrib\Graphics\Checks\modern.bmp"
  582. SetOutPath $INSTDIR\Contrib\Graphics\Icons
  583. File "..\Contrib\Graphics\Icons\modern-install.ico"
  584. File "..\Contrib\Graphics\Icons\modern-uninstall.ico"
  585. SetOutPath $INSTDIR\Contrib\Graphics\Header
  586. File "..\Contrib\Graphics\Header\nsis.bmp"
  587. SetOutPath $INSTDIR\Contrib\Graphics\Wizard
  588. File "..\Contrib\Graphics\Wizard\win.bmp"
  589. graphics:
  590. nomui:
  591. SetDetailsPrint textonly
  592. DetailPrint "Creating Registry Keys..."
  593. SetDetailsPrint listonly
  594. SetOutPath $INSTDIR
  595. WriteRegStr HKLM "Software\NSIS" "" $INSTDIR
  596. !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  597. WriteRegDword HKLM "Software\NSIS" "VersionMajor" "${VER_MAJOR}"
  598. WriteRegDword HKLM "Software\NSIS" "VersionMinor" "${VER_MINOR}"
  599. WriteRegDword HKLM "Software\NSIS" "VersionRevision" "${VER_REVISION}"
  600. WriteRegDword HKLM "Software\NSIS" "VersionBuild" "${VER_BUILD}"
  601. !endif
  602. WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
  603. WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "InstallLocation" "$INSTDIR"
  604. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayName" "Nullsoft Install System"
  605. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayIcon" "$INSTDIR\NSIS.exe,0"
  606. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayVersion" "${VERSION}"
  607. !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  608. WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMajor" "${VER_MAJOR}"
  609. WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMinor" "${VER_MINOR}.${VER_REVISION}"
  610. !endif
  611. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "URLInfoAbout" "http://nsis.sourceforge.net/"
  612. WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "HelpLink" "http://nsis.sourceforge.net/Support"
  613. WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoModify" "1"
  614. WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoRepair" "1"
  615. WriteUninstaller $INSTDIR\uninst-nsis.exe
  616. ${MementoSectionSave}
  617. SetDetailsPrint both
  618. SectionEnd
  619. ;--------------------------------
  620. ;Descriptions
  621. !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
  622. !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use NSIS (compiler etc.)"
  623. !insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example installation scripts that show you how to use NSIS"
  624. !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} "Adds icons to your start menu and your desktop for easy access"
  625. !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfaces} "User interface designs that can be used to change the installer look and feel"
  626. !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesModernUI} "A modern user interface like the wizards of recent Windows versions"
  627. !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesDefaultUI} "The default NSIS user interface which you can customize to make your own UI"
  628. !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesTinyUI} "A tiny version of the default user interface"
  629. !insertmacro MUI_DESCRIPTION_TEXT ${SecTools} "Tools that help you with NSIS development"
  630. !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsZ2E} "A utility that converts a ZIP file to a NSIS installer"
  631. !insertmacro MUI_DESCRIPTION_TEXT ${SecGraphics} "Icons, checkbox images and other graphics"
  632. !insertmacro MUI_DESCRIPTION_TEXT ${SecLangFiles} "Language files used to support multiple languages in an installer"
  633. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsPlugins} "Useful plugins that extend NSIS's functionality"
  634. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBanner} "Plugin that lets you show a banner before installation starts"
  635. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsLangDLL} "Plugin that lets you add a language select dialog to your installer"
  636. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsnsExec} "Plugin that executes console programs and prints its output in the NSIS log window or hides it"
  637. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplash} "Splash screen add-on that lets you add a splash screen to an installer"
  638. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplashT} "Splash screen add-on with transparency support that lets you add a splash screen to an installer"
  639. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSystem} "Plugin that lets you call Win32 API or external DLLs"
  640. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsMath} "Plugin that lets you evaluate complicated mathematical expressions"
  641. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialer} "Plugin that provides internet connection functions"
  642. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsIO} "Plugin that lets you add custom pages to an installer"
  643. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialogs} "Plugin that lets you add custom pages to an installer"
  644. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsStartMenu} "Plugin that lets the user select the start menu folder"
  645. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBgImage} "Plugin that lets you show a persistent background image plugin and play sounds"
  646. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsUserInfo} "Plugin that that gives you the user name and the user account type"
  647. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsNSISDL} "Plugin that lets you create a web based installer"
  648. !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsVPatch} "Plugin that lets you create patches to upgrade older files"
  649. !insertmacro MUI_FUNCTION_DESCRIPTION_END
  650. ;--------------------------------
  651. ;Installer Functions
  652. Function .onInit
  653. ${MementoSectionRestore}
  654. FunctionEnd
  655. !ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  656. Var ReinstallPageCheck
  657. Function PageReinstall
  658. ReadRegStr $R0 HKLM "Software\NSIS" ""
  659. ${If} $R0 == ""
  660. Abort
  661. ${EndIf}
  662. ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMajor"
  663. ReadRegDWORD $R1 HKLM "Software\NSIS" "VersionMinor"
  664. ReadRegDWORD $R2 HKLM "Software\NSIS" "VersionRevision"
  665. ReadRegDWORD $R3 HKLM "Software\NSIS" "VersionBuild"
  666. StrCpy $R0 $R0.$R1.$R2.$R3
  667. ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0
  668. ${If} $R0 == 0
  669. StrCpy $R1 "NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue."
  670. StrCpy $R2 "Add/Reinstall components"
  671. StrCpy $R3 "Uninstall NSIS"
  672. !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
  673. StrCpy $R0 "2"
  674. ${ElseIf} $R0 == 1
  675. StrCpy $R1 "An older version of NSIS is installed on your system. It's recommended that you uninstall the current version before installing. Select the operation you want to perform and click Next to continue."
  676. StrCpy $R2 "Uninstall before installing"
  677. StrCpy $R3 "Do not uninstall"
  678. !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
  679. StrCpy $R0 "1"
  680. ${ElseIf} $R0 == 2
  681. StrCpy $R1 "A newer version of NSIS is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
  682. StrCpy $R2 "Uninstall before installing"
  683. StrCpy $R3 "Do not uninstall"
  684. !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
  685. StrCpy $R0 "1"
  686. ${Else}
  687. Abort
  688. ${EndIf}
  689. nsDialogs::Create 1018
  690. Pop $R4
  691. ${NSD_CreateLabel} 0 0 100% 24u $R1
  692. Pop $R1
  693. ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
  694. Pop $R2
  695. ${NSD_OnClick} $R2 PageReinstallUpdateSelection
  696. ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3
  697. Pop $R3
  698. ${NSD_OnClick} $R3 PageReinstallUpdateSelection
  699. ${If} $ReinstallPageCheck != 2
  700. SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
  701. ${Else}
  702. SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
  703. ${EndIf}
  704. ${NSD_SetFocus} $R2
  705. nsDialogs::Show
  706. FunctionEnd
  707. Function PageReinstallUpdateSelection
  708. Pop $R1
  709. ${NSD_GetState} $R2 $R1
  710. ${If} $R1 == ${BST_CHECKED}
  711. StrCpy $ReinstallPageCheck 1
  712. ${Else}
  713. StrCpy $ReinstallPageCheck 2
  714. ${EndIf}
  715. FunctionEnd
  716. Function PageLeaveReinstall
  717. ${NSD_GetState} $R2 $R1
  718. StrCmp $R0 "1" 0 +2
  719. StrCmp $R1 "1" reinst_uninstall reinst_done
  720. StrCmp $R0 "2" 0 +3
  721. StrCmp $R1 "1" reinst_done reinst_uninstall
  722. reinst_uninstall:
  723. ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString"
  724. ;Run uninstaller
  725. HideWindow
  726. ClearErrors
  727. ExecWait '$R1 _?=$INSTDIR'
  728. IfErrors no_remove_uninstaller
  729. IfFileExists "$INSTDIR\makensis.exe" no_remove_uninstaller
  730. Delete $R1
  731. RMDir $INSTDIR
  732. no_remove_uninstaller:
  733. StrCmp $R0 "2" 0 +2
  734. Quit
  735. BringToFront
  736. reinst_done:
  737. FunctionEnd
  738. !endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
  739. Function ShowReleaseNotes
  740. ${If} ${FileExists} $WINDIR\hh.exe
  741. StrCpy $0 $WINDIR\hh.exe
  742. Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
  743. ${Else}
  744. SearchPath $0 hh.exe
  745. ${If} ${FileExists} $0
  746. Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
  747. ${Else}
  748. ExecShell "open" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
  749. ${EndIf}
  750. ${EndIf}
  751. FunctionEnd
  752. ;--------------------------------
  753. ;Uninstaller Section
  754. Section Uninstall
  755. SetDetailsPrint textonly
  756. DetailPrint "Uninstalling NSI Development Shell Extensions..."
  757. SetDetailsPrint listonly
  758. IfFileExists $INSTDIR\makensis.exe nsis_installed
  759. MessageBox MB_YESNO "It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES nsis_installed
  760. Abort "Uninstall aborted by user"
  761. nsis_installed:
  762. SetDetailsPrint textonly
  763. DetailPrint "Deleting Registry Keys..."
  764. SetDetailsPrint listonly
  765. ReadRegStr $R0 HKCR ".nsi" ""
  766. StrCmp $R0 "NSIS.Script" 0 +2
  767. DeleteRegKey HKCR ".nsi"
  768. ReadRegStr $R0 HKCR ".nsh" ""
  769. StrCmp $R0 "NSIS.Header" 0 +2
  770. DeleteRegKey HKCR ".nsh"
  771. DeleteRegKey HKCR "NSIS.Script"
  772. DeleteRegKey HKCR "NSIS.Header"
  773. System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
  774. DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
  775. DeleteRegKey HKLM "Software\NSIS"
  776. SetDetailsPrint textonly
  777. DetailPrint "Deleting Files..."
  778. SetDetailsPrint listonly
  779. Delete $SMPROGRAMS\NSIS.lnk
  780. Delete $DESKTOP\NSIS.lnk
  781. Delete $INSTDIR\makensis.exe
  782. Delete $INSTDIR\makensisw.exe
  783. Delete $INSTDIR\NSIS.exe
  784. Delete $INSTDIR\license.txt
  785. Delete $INSTDIR\COPYING
  786. Delete $INSTDIR\uninst-nsis.exe
  787. Delete $INSTDIR\nsisconf.nsi
  788. Delete $INSTDIR\nsisconf.nsh
  789. Delete $INSTDIR\NSIS.chm
  790. RMDir /r $INSTDIR\Bin
  791. RMDir /r $INSTDIR\Contrib
  792. RMDir /r $INSTDIR\Docs
  793. RMDir /r $INSTDIR\Examples
  794. RMDir /r $INSTDIR\Include
  795. RMDir /r $INSTDIR\Menu
  796. RMDir /r $INSTDIR\Plugins
  797. RMDir /r $INSTDIR\Stubs
  798. RMDir $INSTDIR
  799. SetDetailsPrint both
  800. SectionEnd