Statistiques
| Révision :

root / tmp / org.txm.setups / nsis-2.5 / Examples / makensis.nsi @ 3030

Historique | Voir | Annoter | Télécharger (32,32 ko)

1
;NSIS Setup Script
2
;--------------------------------
3

    
4
!ifndef VERSION
5
  !define VERSION 'anonymous-build'
6
!endif
7

    
8
;--------------------------------
9
;Configuration
10

    
11
!ifdef OUTFILE
12
  OutFile "${OUTFILE}"
13
!else
14
  OutFile ..\nsis-${VERSION}-setup.exe
15
!endif
16

    
17
SetCompressor /SOLID lzma
18

    
19
InstType "Full"
20
InstType "Lite"
21
InstType "Minimal"
22

    
23
InstallDir $PROGRAMFILES\NSIS
24
InstallDirRegKey HKLM Software\NSIS ""
25

    
26
RequestExecutionLevel admin
27

    
28
;--------------------------------
29
;Header Files
30

    
31
!include "MUI2.nsh"
32
!include "Sections.nsh"
33
!include "LogicLib.nsh"
34
!include "Memento.nsh"
35
!include "WordFunc.nsh"
36

    
37
;--------------------------------
38
;Functions
39

    
40
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
41

    
42
  !insertmacro VersionCompare
43

    
44
!endif
45

    
46
;--------------------------------
47
;Definitions
48

    
49
!define SHCNE_ASSOCCHANGED 0x8000000
50
!define SHCNF_IDLIST 0
51

    
52
;--------------------------------
53
;Configuration
54

    
55
;Names
56
Name "NSIS"
57
Caption "NSIS ${VERSION} Setup"
58

    
59
;Memento Settings
60
!define MEMENTO_REGISTRY_ROOT HKLM
61
!define MEMENTO_REGISTRY_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
62

    
63
;Interface Settings
64
!define MUI_ABORTWARNING
65

    
66
!define MUI_HEADERIMAGE
67
!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\nsis.bmp"
68

    
69
!define MUI_COMPONENTSPAGE_SMALLDESC
70

    
71
;Pages
72
!define MUI_WELCOMEPAGE_TITLE "Welcome to the NSIS ${VERSION} Setup Wizard"
73
!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"
74

    
75
!insertmacro MUI_PAGE_WELCOME
76
!insertmacro MUI_PAGE_LICENSE "..\COPYING"
77
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
78
Page custom PageReinstall PageLeaveReinstall
79
!endif
80
!insertmacro MUI_PAGE_COMPONENTS
81
!insertmacro MUI_PAGE_DIRECTORY
82
!insertmacro MUI_PAGE_INSTFILES
83

    
84
!define MUI_FINISHPAGE_LINK "Visit the NSIS site for the latest news, FAQs and support"
85
!define MUI_FINISHPAGE_LINK_LOCATION "http://nsis.sf.net/"
86

    
87
!define MUI_FINISHPAGE_RUN "$INSTDIR\NSIS.exe"
88
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
89

    
90
!define MUI_FINISHPAGE_SHOWREADME
91
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show release notes"
92
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes
93

    
94
!insertmacro MUI_PAGE_FINISH
95

    
96
!insertmacro MUI_UNPAGE_CONFIRM
97
!insertmacro MUI_UNPAGE_INSTFILES
98

    
99
;--------------------------------
100
;Languages
101

    
102
!insertmacro MUI_LANGUAGE "English"
103

    
104
;--------------------------------
105
;Installer Sections
106

    
107
${MementoSection} "NSIS Core Files (required)" SecCore
108

    
109
  SetDetailsPrint textonly
110
  DetailPrint "Installing NSIS Core Files..."
111
  SetDetailsPrint listonly
112

    
113
  SectionIn 1 2 3 RO
114
  SetOutPath $INSTDIR
115
  RMDir /r $SMPROGRAMS\NSIS
116

    
117
  SetOverwrite on
118
  File ..\makensis.exe
119
  File ..\makensisw.exe
120
  File ..\COPYING
121
  File ..\NSIS.chm
122
  !searchparse /file "..\NSIS.chm" "ITSF" VALIDATE_CHM
123
  File ..\NSIS.exe
124
  File /nonfatal ..\NSIS.exe.manifest
125

    
126
  IfFileExists $INSTDIR\nsisconf.nsi "" +2
127
  Rename $INSTDIR\nsisconf.nsi $INSTDIR\nsisconf.nsh
128
  SetOverwrite off
129
  File ..\nsisconf.nsh
130
  SetOverwrite on
131

    
132
  SetOutPath $INSTDIR\Stubs
133
  File ..\Stubs\bzip2
134
  File ..\Stubs\bzip2_solid
135
  File ..\Stubs\lzma
136
  File ..\Stubs\lzma_solid
137
  File ..\Stubs\zlib
138
  File ..\Stubs\zlib_solid
139
  File ..\Stubs\uninst
140

    
141
  SetOutPath $INSTDIR\Include
142
  File ..\Include\WinMessages.nsh
143
  File ..\Include\Sections.nsh
144
  File ..\Include\Library.nsh
145
  File ..\Include\UpgradeDLL.nsh
146
  File ..\Include\LogicLib.nsh
147
  File ..\Include\StrFunc.nsh
148
  File ..\Include\Colors.nsh
149
  File ..\Include\FileFunc.nsh
150
  File ..\Include\TextFunc.nsh
151
  File ..\Include\WordFunc.nsh
152
  File ..\Include\WinVer.nsh
153
  File ..\Include\x64.nsh
154
  File ..\Include\Memento.nsh
155
  File ..\Include\LangFile.nsh
156
  File ..\Include\InstallOptions.nsh
157
  File ..\Include\MultiUser.nsh
158
  File ..\Include\VB6RunTime.nsh
159
  File ..\Include\Util.nsh
160
  File ..\Include\WinCore.nsh
161

    
162
  SetOutPath $INSTDIR\Include\Win
163
  File ..\Include\Win\WinDef.nsh
164
  File ..\Include\Win\WinError.nsh
165
  File ..\Include\Win\WinNT.nsh
166
  File ..\Include\Win\WinUser.nsh
167

    
168
  SetOutPath $INSTDIR\Docs\StrFunc
169
  File ..\Docs\StrFunc\StrFunc.txt
170

    
171
  SetOutPath $INSTDIR\Docs\MultiUser
172
  File ..\Docs\MultiUser\Readme.html
173

    
174
  SetOutPath $INSTDIR\Docs\makensisw
175
  File ..\Docs\makensisw\*.txt
176

    
177
  SetOutPath $INSTDIR\Menu
178
  File ..\Menu\*.html
179
  SetOutPath $INSTDIR\Menu\images
180
  File ..\Menu\images\header.gif
181
  File ..\Menu\images\line.gif
182
  File ..\Menu\images\site.gif
183

    
184
  Delete $INSTDIR\makensis.htm
185
  Delete $INSTDIR\Docs\*.html
186
  Delete $INSTDIR\Docs\style.css
187
  RMDir $INSTDIR\Docs
188

    
189
  SetOutPath $INSTDIR\Bin
190
  File ..\Bin\LibraryLocal.exe
191
  File ..\Bin\RegTool.bin
192

    
193
  SetOutPath $INSTDIR\Plugins
194
  File ..\Plugins\TypeLib.dll
195

    
196
  ReadRegStr $R0 HKCR ".nsi" ""
197
  StrCmp $R0 "NSISFile" 0 +2
198
    DeleteRegKey HKCR "NSISFile"
199

    
200
  WriteRegStr HKCR ".nsi" "" "NSIS.Script"
201
  WriteRegStr HKCR "NSIS.Script" "" "NSIS Script File"
202
  WriteRegStr HKCR "NSIS.Script\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
203
  ReadRegStr $R0 HKCR "NSIS.Script\shell\open\command" ""
204
  StrCmp $R0 "" 0 no_nsiopen
205
    WriteRegStr HKCR "NSIS.Script\shell" "" "open"
206
    WriteRegStr HKCR "NSIS.Script\shell\open\command" "" 'notepad.exe "%1"'
207
  no_nsiopen:
208
  WriteRegStr HKCR "NSIS.Script\shell\compile" "" "Compile NSIS Script"
209
  WriteRegStr HKCR "NSIS.Script\shell\compile\command" "" '"$INSTDIR\makensisw.exe" "%1"'
210
  WriteRegStr HKCR "NSIS.Script\shell\compile-compressor" "" "Compile NSIS Script (Choose Compressor)"
211
  WriteRegStr HKCR "NSIS.Script\shell\compile-compressor\command" "" '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
212

    
213
  ReadRegStr $R0 HKCR ".nsh" ""
214
  StrCmp $R0 "NSHFile" 0 +2
215
    DeleteRegKey HKCR "NSHFile"
216

    
217
  WriteRegStr HKCR ".nsh" "" "NSIS.Header"
218
  WriteRegStr HKCR "NSIS.Header" "" "NSIS Header File"
219
  WriteRegStr HKCR "NSIS.Header\DefaultIcon" "" "$INSTDIR\makensisw.exe,1"
220
  ReadRegStr $R0 HKCR "NSIS.Header\shell\open\command" ""
221
  StrCmp $R0 "" 0 no_nshopen
222
    WriteRegStr HKCR "NSIS.Header\shell" "" "open"
223
    WriteRegStr HKCR "NSIS.Header\shell\open\command" "" 'notepad.exe "%1"'
224
  no_nshopen:
225

    
226
  System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
227

    
228
${MementoSectionEnd}
229

    
230
${MementoSection} "Script Examples" SecExample
231

    
232
  SetDetailsPrint textonly
233
  DetailPrint "Installing Script Examples..."
234
  SetDetailsPrint listonly
235

    
236
  SectionIn 1 2
237
  SetOutPath $INSTDIR\Examples
238
  File ..\Examples\makensis.nsi
239
  File ..\Examples\example1.nsi
240
  File ..\Examples\example2.nsi
241
  File ..\Examples\viewhtml.nsi
242
  File ..\Examples\waplugin.nsi
243
  File ..\Examples\bigtest.nsi
244
  File ..\Examples\primes.nsi
245
  File ..\Examples\rtest.nsi
246
  File ..\Examples\gfx.nsi
247
  File ..\Examples\one-section.nsi
248
  File ..\Examples\languages.nsi
249
  File ..\Examples\Library.nsi
250
  File ..\Examples\VersionInfo.nsi
251
  File ..\Examples\UserVars.nsi
252
  File ..\Examples\LogicLib.nsi
253
  File ..\Examples\silent.nsi
254
  File ..\Examples\StrFunc.nsi
255
  File ..\Examples\FileFunc.nsi
256
  File ..\Examples\FileFunc.ini
257
  File ..\Examples\FileFuncTest.nsi
258
  File ..\Examples\TextFunc.nsi
259
  File ..\Examples\TextFunc.ini
260
  File ..\Examples\TextFuncTest.nsi
261
  File ..\Examples\WordFunc.nsi
262
  File ..\Examples\WordFunc.ini
263
  File ..\Examples\WordFuncTest.nsi
264
  File ..\Examples\Memento.nsi
265

    
266
  SetOutPath $INSTDIR\Examples\Plugin
267
  File ..\Examples\Plugin\exdll.c
268
  File ..\Examples\Plugin\exdll.dpr
269
  File ..\Examples\Plugin\exdll.dsp
270
  File ..\Examples\Plugin\exdll.dsw
271
  File ..\Examples\Plugin\exdll_with_unit.dpr
272
  File ..\Examples\Plugin\exdll-vs2008.sln
273
  File ..\Examples\Plugin\exdll-vs2008.vcproj
274
  File ..\Examples\Plugin\extdll.inc
275
  File ..\Examples\Plugin\nsis.pas
276

    
277
  SetOutPath $INSTDIR\Examples\Plugin\nsis
278
  File ..\Examples\Plugin\nsis\pluginapi.h
279
  File ..\Examples\Plugin\nsis\pluginapi.lib
280
  File ..\Examples\Plugin\nsis\api.h
281

    
282
${MementoSectionEnd}
283

    
284
!ifndef NO_STARTMENUSHORTCUTS
285
${MementoSection} "Start Menu and Desktop Shortcuts" SecShortcuts
286

    
287
  SetDetailsPrint textonly
288
  DetailPrint "Installing Start Menu and Desktop Shortcuts..."
289
  SetDetailsPrint listonly
290

    
291
!else
292
${MementoSection} "Desktop Shortcut" SecShortcuts
293

    
294
  SetDetailsPrint textonly
295
  DetailPrint "Installing Desktop Shortcut..."
296
  SetDetailsPrint listonly
297

    
298
!endif
299
  SectionIn 1 2
300
  SetOutPath $INSTDIR
301
!ifndef NO_STARTMENUSHORTCUTS
302
  CreateShortCut "$SMPROGRAMS\NSIS.lnk" "$INSTDIR\NSIS.exe"
303
!endif
304

    
305
  CreateShortCut "$DESKTOP\NSIS.lnk" "$INSTDIR\NSIS.exe"
306

    
307
${MementoSectionEnd}
308

    
309
SectionGroup "User Interfaces" SecInterfaces
310

    
311
${MementoSection} "Modern User Interface" SecInterfacesModernUI
312

    
313
  SetDetailsPrint textonly
314
  DetailPrint "Installing User Interfaces | Modern User Interface..."
315
  SetDetailsPrint listonly
316

    
317
  SectionIn 1 2
318

    
319
  SetOutPath "$INSTDIR\Examples\Modern UI"
320
  File "..\Examples\Modern UI\Basic.nsi"
321
  File "..\Examples\Modern UI\HeaderBitmap.nsi"
322
  File "..\Examples\Modern UI\MultiLanguage.nsi"
323
  File "..\Examples\Modern UI\StartMenu.nsi"
324
  File "..\Examples\Modern UI\WelcomeFinish.nsi"
325

    
326
  SetOutPath "$INSTDIR\Contrib\Modern UI"
327
  File "..\Contrib\Modern UI\System.nsh"
328
  File "..\Contrib\Modern UI\ioSpecial.ini"
329

    
330
  SetOutPath "$INSTDIR\Docs\Modern UI"
331
  File "..\Docs\Modern UI\Readme.html"
332
  File "..\Docs\Modern UI\Changelog.txt"
333
  File "..\Docs\Modern UI\License.txt"
334

    
335
  SetOutPath "$INSTDIR\Docs\Modern UI\images"
336
  File "..\Docs\Modern UI\images\header.gif"
337
  File "..\Docs\Modern UI\images\screen1.png"
338
  File "..\Docs\Modern UI\images\screen2.png"
339
  File "..\Docs\Modern UI\images\open.gif"
340
  File "..\Docs\Modern UI\images\closed.gif"
341

    
342
  SetOutPath $INSTDIR\Contrib\UIs
343
  File "..\Contrib\UIs\modern.exe"
344
  File "..\Contrib\UIs\modern_headerbmp.exe"
345
  File "..\Contrib\UIs\modern_headerbmpr.exe"
346
  File "..\Contrib\UIs\modern_nodesc.exe"
347
  File "..\Contrib\UIs\modern_smalldesc.exe"
348

    
349
  SetOutPath $INSTDIR\Include
350
  File "..\Include\MUI.nsh"
351

    
352
  SetOutPath "$INSTDIR\Contrib\Modern UI 2"
353
  File "..\Contrib\Modern UI 2\Deprecated.nsh"
354
  File "..\Contrib\Modern UI 2\Interface.nsh"
355
  File "..\Contrib\Modern UI 2\Localization.nsh"
356
  File "..\Contrib\Modern UI 2\MUI2.nsh"
357
  File "..\Contrib\Modern UI 2\Pages.nsh"
358

    
359
  SetOutPath "$INSTDIR\Contrib\Modern UI 2\Pages"
360
  File "..\Contrib\Modern UI 2\Pages\Components.nsh"
361
  File "..\Contrib\Modern UI 2\Pages\Directory.nsh"
362
  File "..\Contrib\Modern UI 2\Pages\Finish.nsh"
363
  File "..\Contrib\Modern UI 2\Pages\InstallFiles.nsh"
364
  File "..\Contrib\Modern UI 2\Pages\License.nsh"
365
  File "..\Contrib\Modern UI 2\Pages\StartMenu.nsh"
366
  File "..\Contrib\Modern UI 2\Pages\UninstallConfirm.nsh"
367
  File "..\Contrib\Modern UI 2\Pages\Welcome.nsh"
368

    
369
  SetOutPath "$INSTDIR\Docs\Modern UI 2"
370
  File "..\Docs\Modern UI 2\Readme.html"
371
  File "..\Docs\Modern UI 2\License.txt"
372

    
373
  SetOutPath "$INSTDIR\Docs\Modern UI 2\images"
374
  File "..\Docs\Modern UI 2\images\header.gif"
375
  File "..\Docs\Modern UI 2\images\screen1.png"
376
  File "..\Docs\Modern UI 2\images\screen2.png"
377
  File "..\Docs\Modern UI 2\images\open.gif"
378
  File "..\Docs\Modern UI 2\images\closed.gif"
379

    
380
  SetOutPath $INSTDIR\Include
381
  File "..\Include\MUI2.nsh"
382

    
383
${MementoSectionEnd}
384

    
385
${MementoSection} "Default User Interface" SecInterfacesDefaultUI
386

    
387
  SetDetailsPrint textonly
388
  DetailPrint "Installing User Interfaces | Default User Interface..."
389
  SetDetailsPrint listonly
390

    
391
  SectionIn 1
392

    
393
  SetOutPath "$INSTDIR\Contrib\UIs"
394
  File "..\Contrib\UIs\default.exe"
395

    
396
${MementoSectionEnd}
397

    
398
${MementoSection} "Tiny User Interface" SecInterfacesTinyUI
399

    
400
  SetDetailsPrint textonly
401
  DetailPrint "Installing User Interfaces | Tiny User Interface..."
402
  SetDetailsPrint listonly
403

    
404
  SectionIn 1
405

    
406
  SetOutPath "$INSTDIR\Contrib\UIs"
407
  File "..\Contrib\UIs\sdbarker_tiny.exe"
408

    
409
${MementoSectionEnd}
410

    
411
SectionGroupEnd
412

    
413
${MementoSection} "Graphics" SecGraphics
414

    
415
  SetDetailsPrint textonly
416
  DetailPrint "Installing Graphics..."
417
  SetDetailsPrint listonly
418

    
419
  SectionIn 1
420

    
421
  Delete $INSTDIR\Contrib\Icons\*.ico
422
  Delete $INSTDIR\Contrib\Icons\*.bmp
423
  RMDir $INSTDIR\Contrib\Icons
424
  SetOutPath $INSTDIR\Contrib\Graphics
425
  File /r "..\Contrib\Graphics\*.ico"
426
  File /r "..\Contrib\Graphics\*.bmp"
427
${MementoSectionEnd}
428

    
429
${MementoSection} "Language Files" SecLangFiles
430

    
431
  SetDetailsPrint textonly
432
  DetailPrint "Installing Language Files..."
433
  SetDetailsPrint listonly
434

    
435
  SectionIn 1
436

    
437
  SetOutPath "$INSTDIR\Contrib\Language files"
438
  File "..\Contrib\Language files\*.nlf"
439

    
440
  SetOutPath $INSTDIR\Bin
441
  File ..\Bin\MakeLangID.exe
442

    
443
  !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
444
  mui:
445
    SetOutPath "$INSTDIR\Contrib\Language files"
446
    File "..\Contrib\Language files\*.nsh"
447
  nomui:
448

    
449
${MementoSectionEnd}
450

    
451
SectionGroup "Tools" SecTools
452

    
453
${MementoSection} "Zip2Exe" SecToolsZ2E
454

    
455
  SetDetailsPrint textonly
456
  DetailPrint "Installing Tools | Zip2Exe..."
457
  SetDetailsPrint listonly
458

    
459
  SectionIn 1
460

    
461
  SetOutPath $INSTDIR\Bin
462
  File ..\Bin\zip2exe.exe
463
  SetOutPath $INSTDIR\Contrib\zip2exe
464
  File ..\Contrib\zip2exe\Base.nsh
465
  File ..\Contrib\zip2exe\Modern.nsh
466
  File ..\Contrib\zip2exe\Classic.nsh
467

    
468
${MementoSectionEnd}
469

    
470
SectionGroupEnd
471

    
472
SectionGroup "Plug-ins" SecPluginsPlugins
473

    
474
${MementoSection} "Banner" SecPluginsBanner
475

    
476
  SetDetailsPrint textonly
477
  DetailPrint "Installing Plug-ins | Banner..."
478
  SetDetailsPrint listonly
479

    
480
  SectionIn 1
481

    
482
  SetOutPath $INSTDIR\Plugins
483
  File ..\Plugins\Banner.dll
484
  SetOutPath $INSTDIR\Docs\Banner
485
  File ..\Docs\Banner\Readme.txt
486
  SetOutPath $INSTDIR\Examples\Banner
487
  File ..\Examples\Banner\Example.nsi
488
${MementoSectionEnd}
489

    
490
${MementoSection} "Language DLL" SecPluginsLangDLL
491

    
492
  SetDetailsPrint textonly
493
  DetailPrint "Installing Plug-ins | Language DLL..."
494
  SetDetailsPrint listonly
495

    
496
  SectionIn 1
497
  SetOutPath $INSTDIR\Plugins
498
  File ..\Plugins\LangDLL.dll
499
${MementoSectionEnd}
500

    
501
${MementoSection} "nsExec" SecPluginsnsExec
502

    
503
  SetDetailsPrint textonly
504
  DetailPrint "Installing Plug-ins | nsExec..."
505
  SetDetailsPrint listonly
506

    
507
  SectionIn 1
508

    
509
  SetOutPath $INSTDIR\Plugins
510
  File ..\Plugins\nsExec.dll
511
  SetOutPath $INSTDIR\Docs\nsExec
512
  File ..\Docs\nsExec\nsExec.txt
513
  SetOutPath $INSTDIR\Examples\nsExec
514
  File ..\Examples\nsExec\test.nsi
515
${MementoSectionEnd}
516

    
517
${MementoSection} "Splash" SecPluginsSplash
518

    
519
  SetDetailsPrint textonly
520
  DetailPrint "Installing Plug-ins | Splash..."
521
  SetDetailsPrint listonly
522

    
523
  SectionIn 1
524

    
525
  SetOutPath $INSTDIR\Plugins
526
  File ..\Plugins\splash.dll
527
  SetOutPath $INSTDIR\Docs\Splash
528
  File ..\Docs\Splash\splash.txt
529
  SetOutPath $INSTDIR\Examples\Splash
530
  File ..\Examples\Splash\Example.nsi
531
${MementoSectionEnd}
532

    
533
${MementoSection} "AdvSplash" SecPluginsSplashT
534

    
535
  SetDetailsPrint textonly
536
  DetailPrint "Installing Plug-ins | AdvSplash..."
537
  SetDetailsPrint listonly
538

    
539
  SectionIn 1
540

    
541
  SetOutPath $INSTDIR\Plugins
542
  File ..\Plugins\advsplash.dll
543
  SetOutPath $INSTDIR\Docs\AdvSplash
544
  File ..\Docs\AdvSplash\advsplash.txt
545
  SetOutPath $INSTDIR\Examples\AdvSplash
546
  File ..\Examples\AdvSplash\Example.nsi
547
${MementoSectionEnd}
548

    
549
${MementoSection} "BgImage" SecPluginsBgImage
550

    
551
  SetDetailsPrint textonly
552
  DetailPrint "Installing Plug-ins | BgImage..."
553
  SetDetailsPrint listonly
554

    
555
  SectionIn 1
556

    
557
  SetOutPath $INSTDIR\Plugins
558
  File ..\Plugins\BgImage.dll
559
  SetOutPath $INSTDIR\Docs\BgImage
560
  File ..\Docs\BgImage\BgImage.txt
561
  SetOutPath $INSTDIR\Examples\BgImage
562
  File ..\Examples\BgImage\Example.nsi
563
${MementoSectionEnd}
564

    
565
${MementoSection} "InstallOptions" SecPluginsIO
566

    
567
  SetDetailsPrint textonly
568
  DetailPrint "Installing Plug-ins | InstallOptions..."
569
  SetDetailsPrint listonly
570

    
571
  SectionIn 1
572

    
573
  SetOutPath $INSTDIR\Plugins
574
  File ..\Plugins\InstallOptions.dll
575
  SetOutPath $INSTDIR\Docs\InstallOptions
576
  File ..\Docs\InstallOptions\Readme.html
577
  File ..\Docs\InstallOptions\Changelog.txt
578
  SetOutPath $INSTDIR\Examples\InstallOptions
579
  File ..\Examples\InstallOptions\test.ini
580
  File ..\Examples\InstallOptions\test.nsi
581
  File ..\Examples\InstallOptions\testimgs.ini
582
  File ..\Examples\InstallOptions\testimgs.nsi
583
  File ..\Examples\InstallOptions\testlink.ini
584
  File ..\Examples\InstallOptions\testlink.nsi
585
  File ..\Examples\InstallOptions\testnotify.ini
586
  File ..\Examples\InstallOptions\testnotify.nsi
587
${MementoSectionEnd}
588

    
589
${MementoSection} "nsDialogs" SecPluginsDialogs
590

    
591
  SetDetailsPrint textonly
592
  DetailPrint "Installing Plug-ins | nsDialogs..."
593
  SetDetailsPrint listonly
594

    
595
  SectionIn 1
596

    
597
  SetOutPath $INSTDIR\Plugins
598
  File ..\Plugins\nsDialogs.dll
599
  SetOutPath $INSTDIR\Examples\nsDialogs
600
  File ..\Examples\nsDialogs\example.nsi
601
  File ..\Examples\nsDialogs\InstallOptions.nsi
602
  File ..\Examples\nsDialogs\timer.nsi
603
  File ..\Examples\nsDialogs\welcome.nsi
604
  SetOutPath $INSTDIR\Include
605
  File ..\Include\nsDialogs.nsh
606
  SetOutPath $INSTDIR\Docs\nsDialogs
607
  File ..\Docs\nsDialogs\Readme.html
608
${MementoSectionEnd}
609

    
610
${MementoSection} "Math" SecPluginsMath
611

    
612
  SetDetailsPrint textonly
613
  DetailPrint "Installing Plug-ins | Math..."
614
  SetDetailsPrint listonly
615

    
616
  SectionIn 1
617

    
618
  SetOutPath $INSTDIR\Plugins
619
  File ..\Plugins\Math.dll
620
  SetOutPath $INSTDIR\Docs\Math
621
  File ..\Docs\Math\Math.txt
622
  SetOutPath $INSTDIR\Examples\Math
623
  File ..\Examples\Math\math.nsi
624
  File ..\Examples\Math\mathtest.txt
625
  File ..\Examples\Math\mathtest.nsi
626
  File ..\Examples\Math\mathtest.ini
627

    
628
${MementoSectionEnd}
629

    
630
${MementoSection} "NSISdl" SecPluginsNSISDL
631

    
632
  SetDetailsPrint textonly
633
  DetailPrint "Installing Plug-ins | NSISdl..."
634
  SetDetailsPrint listonly
635

    
636
  SectionIn 1
637

    
638
  SetOutPath $INSTDIR\Plugins
639
  File ..\Plugins\nsisdl.dll
640
  SetOutPath $INSTDIR\Docs\NSISdl
641
  File ..\Docs\NSISdl\ReadMe.txt
642
  File ..\Docs\NSISdl\License.txt
643
${MementoSectionEnd}
644

    
645
${MementoSection} "System" SecPluginsSystem
646

    
647
  SetDetailsPrint textonly
648
  DetailPrint "Installing Plug-ins | System..."
649
  SetDetailsPrint listonly
650

    
651
  SectionIn 1
652

    
653
  SetOutPath $INSTDIR\Plugins
654
  File ..\Plugins\System.dll
655
  SetOutPath $INSTDIR\Docs\System
656
  File ..\Docs\System\System.html
657
  File ..\Docs\System\WhatsNew.txt
658
  SetOutPath $INSTDIR\Examples\System
659
  File ..\Examples\System\Resource.dll
660
  File ..\Examples\System\SysFunc.nsh
661
  File ..\Examples\System\System.nsh
662
  File ..\Examples\System\System.nsi
663
${MementoSectionEnd}
664

    
665
${MementoSection} "StartMenu" SecPluginsStartMenu
666

    
667
  SetDetailsPrint textonly
668
  DetailPrint "Installing Plug-ins | StartMenu..."
669
  SetDetailsPrint listonly
670

    
671
  SectionIn 1
672

    
673
  SetOutPath $INSTDIR\Plugins
674
  File ..\Plugins\StartMenu.dll
675
  SetOutPath $INSTDIR\Docs\StartMenu
676
  File ..\Docs\StartMenu\Readme.txt
677
  SetOutPath $INSTDIR\Examples\StartMenu
678
  File ..\Examples\StartMenu\Example.nsi
679
${MementoSectionEnd}
680

    
681
${MementoSection} "UserInfo" SecPluginsUserInfo
682

    
683
  SetDetailsPrint textonly
684
  DetailPrint "Installing Plug-ins | UserInfo..."
685
  SetDetailsPrint listonly
686

    
687
  SectionIn 1
688

    
689
  SetOutPath $INSTDIR\Plugins
690
  File ..\Plugins\UserInfo.dll
691
  SetOutPath $INSTDIR\Examples\UserInfo
692
  File ..\Examples\UserInfo\UserInfo.nsi
693
${MementoSectionEnd}
694

    
695
${MementoSection} "Dialer" SecPluginsDialer
696

    
697
  SetDetailsPrint textonly
698
  DetailPrint "Installing Plug-ins | Dialer..."
699
  SetDetailsPrint listonly
700

    
701
  SectionIn 1
702

    
703
  SetOutPath $INSTDIR\Plugins
704
  File ..\Plugins\Dialer.dll
705
  SetOutPath $INSTDIR\Docs\Dialer
706
  File ..\Docs\Dialer\Dialer.txt
707
${MementoSectionEnd}
708

    
709
${MementoSection} "VPatch" SecPluginsVPatch
710

    
711
  SetDetailsPrint textonly
712
  DetailPrint "Installing Plug-ins | VPatch..."
713
  SetDetailsPrint listonly
714

    
715
  SectionIn 1
716

    
717
  SetOutPath $INSTDIR\Plugins
718
  File ..\Plugins\VPatch.dll
719
  SetOutPath $INSTDIR\Examples\VPatch
720
  File ..\Examples\VPatch\example.nsi
721
  File ..\Examples\VPatch\oldfile.txt
722
  File ..\Examples\VPatch\newfile.txt
723
  File ..\Examples\VPatch\patch.pat
724
  SetOutPath $INSTDIR\Docs\VPatch
725
  File ..\Docs\VPatch\Readme.html
726
  SetOutPath $INSTDIR\Bin
727
  File ..\Bin\GenPat.exe
728
  SetOutPath $INSTDIR\Include
729
  File ..\Include\VPatchLib.nsh
730
${MementoSectionEnd}
731

    
732
${MementoSectionDone}
733

    
734
SectionGroupEnd
735

    
736
Section -post
737

    
738
  ; When Modern UI is installed:
739
  ; * Always install the English language file
740
  ; * Always install default icons / bitmaps
741

    
742
  !insertmacro SectionFlagIsSet ${SecInterfacesModernUI} ${SF_SELECTED} mui nomui
743

    
744
    mui:
745

    
746
    SetDetailsPrint textonly
747
    DetailPrint "Configuring Modern UI..."
748
    SetDetailsPrint listonly
749

    
750
    !insertmacro SectionFlagIsSet ${SecLangFiles} ${SF_SELECTED} langfiles nolangfiles
751

    
752
      nolangfiles:
753

    
754
      SetOutPath "$INSTDIR\Contrib\Language files"
755
      File "..\Contrib\Language files\English.nlf"
756
      SetOutPath "$INSTDIR\Contrib\Language files"
757
      File "..\Contrib\Language files\English.nsh"
758

    
759
    langfiles:
760

    
761
    !insertmacro SectionFlagIsSet ${SecGraphics} ${SF_SELECTED} graphics nographics
762

    
763
      nographics:
764

    
765
      SetOutPath $INSTDIR\Contrib\Graphics
766
      SetOutPath $INSTDIR\Contrib\Graphics\Checks
767
      File "..\Contrib\Graphics\Checks\modern.bmp"
768
      SetOutPath $INSTDIR\Contrib\Graphics\Icons
769
      File "..\Contrib\Graphics\Icons\modern-install.ico"
770
      File "..\Contrib\Graphics\Icons\modern-uninstall.ico"
771
      SetOutPath $INSTDIR\Contrib\Graphics\Header
772
      File "..\Contrib\Graphics\Header\nsis.bmp"
773
      SetOutPath $INSTDIR\Contrib\Graphics\Wizard
774
      File "..\Contrib\Graphics\Wizard\win.bmp"
775

    
776
    graphics:
777

    
778
  nomui:
779

    
780
  SetDetailsPrint textonly
781
  DetailPrint "Creating Registry Keys..."
782
  SetDetailsPrint listonly
783

    
784
  SetOutPath $INSTDIR
785

    
786
  WriteRegStr HKLM "Software\NSIS" "" $INSTDIR
787
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
788
  WriteRegDword HKLM "Software\NSIS" "VersionMajor" "${VER_MAJOR}"
789
  WriteRegDword HKLM "Software\NSIS" "VersionMinor" "${VER_MINOR}"
790
  WriteRegDword HKLM "Software\NSIS" "VersionRevision" "${VER_REVISION}"
791
  WriteRegDword HKLM "Software\NSIS" "VersionBuild" "${VER_BUILD}"
792
!endif
793

    
794
  WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString" '"$INSTDIR\uninst-nsis.exe"'
795
  WriteRegExpandStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "InstallLocation" "$INSTDIR"
796
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayName" "Nullsoft Install System"
797
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayIcon" "$INSTDIR\NSIS.exe,0"
798
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "DisplayVersion" "${VERSION}"
799
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
800
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMajor" "${VER_MAJOR}"
801
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "VersionMinor" "${VER_MINOR}.${VER_REVISION}"
802
!endif
803
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "URLInfoAbout" "http://nsis.sourceforge.net/"
804
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "HelpLink" "http://nsis.sourceforge.net/Support"
805
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoModify" "1"
806
  WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "NoRepair" "1"
807

    
808
  WriteUninstaller $INSTDIR\uninst-nsis.exe
809

    
810
  ${MementoSectionSave}
811

    
812
  SetDetailsPrint both
813

    
814
SectionEnd
815

    
816
;--------------------------------
817
;Descriptions
818

    
819
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
820
  !insertmacro MUI_DESCRIPTION_TEXT ${SecCore} "The core files required to use NSIS (compiler etc.)"
821
  !insertmacro MUI_DESCRIPTION_TEXT ${SecExample} "Example installation scripts that show you how to use NSIS"
822
  !insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} "Adds icons to your start menu and your desktop for easy access"
823
  !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfaces} "User interface designs that can be used to change the installer look and feel"
824
  !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesModernUI} "A modern user interface like the wizards of recent Windows versions"
825
  !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesDefaultUI} "The default NSIS user interface which you can customize to make your own UI"
826
  !insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesTinyUI} "A tiny version of the default user interface"
827
  !insertmacro MUI_DESCRIPTION_TEXT ${SecTools} "Tools that help you with NSIS development"
828
  !insertmacro MUI_DESCRIPTION_TEXT ${SecToolsZ2E} "A utility that converts a ZIP file to a NSIS installer"
829
  !insertmacro MUI_DESCRIPTION_TEXT ${SecGraphics} "Icons, checkbox images and other graphics"
830
  !insertmacro MUI_DESCRIPTION_TEXT ${SecLangFiles} "Language files used to support multiple languages in an installer"
831
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsPlugins} "Useful plugins that extend NSIS's functionality"
832
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBanner} "Plugin that lets you show a banner before installation starts"
833
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsLangDLL} "Plugin that lets you add a language select dialog to your installer"
834
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsnsExec} "Plugin that executes console programs and prints its output in the NSIS log window or hides it"
835
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplash} "Splash screen add-on that lets you add a splash screen to an installer"
836
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplashT} "Splash screen add-on with transparency support that lets you add a splash screen to an installer"
837
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSystem} "Plugin that lets you call Win32 API or external DLLs"
838
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsMath} "Plugin that lets you evaluate complicated mathematical expressions"
839
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialer} "Plugin that provides internet connection functions"
840
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsIO} "Plugin that lets you add custom pages to an installer"
841
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialogs} "Plugin that lets you add custom pages to an installer"
842
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsStartMenu} "Plugin that lets the user select the start menu folder"
843
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBgImage} "Plugin that lets you show a persistent background image plugin and play sounds"
844
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsUserInfo} "Plugin that that gives you the user name and the user account type"
845
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsNSISDL} "Plugin that lets you create a web based installer"
846
  !insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsVPatch} "Plugin that lets you create patches to upgrade older files"
847
!insertmacro MUI_FUNCTION_DESCRIPTION_END
848

    
849
;--------------------------------
850
;Installer Functions
851

    
852
Function .onInit
853

    
854
  ${MementoSectionRestore}
855

    
856
FunctionEnd
857

    
858
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
859

    
860
Var ReinstallPageCheck
861

    
862
Function PageReinstall
863

    
864
  ReadRegStr $R0 HKLM "Software\NSIS" ""
865

    
866
  ${If} $R0 == ""
867
    Abort
868
  ${EndIf}
869

    
870
  ReadRegDWORD $R0 HKLM "Software\NSIS" "VersionMajor"
871
  ReadRegDWORD $R1 HKLM "Software\NSIS" "VersionMinor"
872
  ReadRegDWORD $R2 HKLM "Software\NSIS" "VersionRevision"
873
  ReadRegDWORD $R3 HKLM "Software\NSIS" "VersionBuild"
874
  StrCpy $R0 $R0.$R1.$R2.$R3
875

    
876
  ${VersionCompare} ${VER_MAJOR}.${VER_MINOR}.${VER_REVISION}.${VER_BUILD} $R0 $R0
877
  ${If} $R0 == 0
878
    StrCpy $R1 "NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue."
879
    StrCpy $R2 "Add/Reinstall components"
880
    StrCpy $R3 "Uninstall NSIS"
881
    !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose the maintenance option to perform."
882
    StrCpy $R0 "2"
883
  ${ElseIf} $R0 == 1
884
    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."
885
    StrCpy $R2 "Uninstall before installing"
886
    StrCpy $R3 "Do not uninstall"
887
    !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
888
    StrCpy $R0 "1"
889
  ${ElseIf} $R0 == 2
890
    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."
891
    StrCpy $R2 "Uninstall before installing"
892
    StrCpy $R3 "Do not uninstall"
893
    !insertmacro MUI_HEADER_TEXT "Already Installed" "Choose how you want to install NSIS."
894
    StrCpy $R0 "1"
895
  ${Else}
896
    Abort
897
  ${EndIf}
898

    
899
  nsDialogs::Create 1018
900
  Pop $R4
901

    
902
  ${NSD_CreateLabel} 0 0 100% 24u $R1
903
  Pop $R1
904

    
905
  ${NSD_CreateRadioButton} 30u 50u -30u 8u $R2
906
  Pop $R2
907
  ${NSD_OnClick} $R2 PageReinstallUpdateSelection
908

    
909
  ${NSD_CreateRadioButton} 30u 70u -30u 8u $R3
910
  Pop $R3
911
  ${NSD_OnClick} $R3 PageReinstallUpdateSelection
912

    
913
  ${If} $ReinstallPageCheck != 2
914
    SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
915
  ${Else}
916
    SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
917
  ${EndIf}
918

    
919
  ${NSD_SetFocus} $R2
920

    
921
  nsDialogs::Show
922

    
923
FunctionEnd
924

    
925
Function PageReinstallUpdateSelection
926

    
927
  Pop $R1
928

    
929
  ${NSD_GetState} $R2 $R1
930

    
931
  ${If} $R1 == ${BST_CHECKED}
932
    StrCpy $ReinstallPageCheck 1
933
  ${Else}
934
    StrCpy $ReinstallPageCheck 2
935
  ${EndIf}
936

    
937
FunctionEnd
938

    
939
Function PageLeaveReinstall
940

    
941
  ${NSD_GetState} $R2 $R1
942

    
943
  StrCmp $R0 "1" 0 +2
944
    StrCmp $R1 "1" reinst_uninstall reinst_done
945

    
946
  StrCmp $R0 "2" 0 +3
947
    StrCmp $R1 "1" reinst_done reinst_uninstall
948

    
949
  reinst_uninstall:
950
  ReadRegStr $R1 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS" "UninstallString"
951

    
952
  ;Run uninstaller
953
  HideWindow
954

    
955
    ClearErrors
956
    ExecWait '$R1 _?=$INSTDIR'
957

    
958
    IfErrors no_remove_uninstaller
959
    IfFileExists "$INSTDIR\makensis.exe" no_remove_uninstaller
960

    
961
      Delete $R1
962
      RMDir $INSTDIR
963

    
964
    no_remove_uninstaller:
965

    
966
  StrCmp $R0 "2" 0 +2
967
    Quit
968

    
969
  BringToFront
970

    
971
  reinst_done:
972

    
973
FunctionEnd
974

    
975
!endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
976

    
977
Function ShowReleaseNotes
978
  ${If} ${FileExists} $WINDIR\hh.exe
979
    StrCpy $0 $WINDIR\hh.exe
980
    Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
981
  ${Else}
982
    SearchPath $0 hh.exe
983
    ${If} ${FileExists} $0
984
      Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
985
    ${Else}
986
      ExecShell "open" "http://nsis.sourceforge.net/Docs/AppendixF.html#F.1"
987
    ${EndIf}
988
  ${EndIf}
989
FunctionEnd
990

    
991
;--------------------------------
992
;Uninstaller Section
993

    
994
Section Uninstall
995

    
996
  SetDetailsPrint textonly
997
  DetailPrint "Uninstalling NSI Development Shell Extensions..."
998
  SetDetailsPrint listonly
999

    
1000
  IfFileExists $INSTDIR\makensis.exe nsis_installed
1001
    MessageBox MB_YESNO "It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)?" IDYES nsis_installed
1002
    Abort "Uninstall aborted by user"
1003
  nsis_installed:
1004

    
1005
  SetDetailsPrint textonly
1006
  DetailPrint "Deleting Registry Keys..."
1007
  SetDetailsPrint listonly
1008

    
1009
  ReadRegStr $R0 HKCR ".nsi" ""
1010
  StrCmp $R0 "NSIS.Script" 0 +2
1011
    DeleteRegKey HKCR ".nsi"
1012

    
1013
  ReadRegStr $R0 HKCR ".nsh" ""
1014
  StrCmp $R0 "NSIS.Header" 0 +2
1015
    DeleteRegKey HKCR ".nsh"
1016

    
1017
  DeleteRegKey HKCR "NSIS.Script"
1018
  DeleteRegKey HKCR "NSIS.Header"
1019

    
1020
  System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
1021

    
1022
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS"
1023
  DeleteRegKey HKLM "Software\NSIS"
1024

    
1025
  SetDetailsPrint textonly
1026
  DetailPrint "Deleting Files..."
1027
  SetDetailsPrint listonly
1028

    
1029
  Delete $SMPROGRAMS\NSIS.lnk
1030
  Delete $DESKTOP\NSIS.lnk
1031
  Delete $INSTDIR\makensis.exe
1032
  Delete $INSTDIR\makensisw.exe
1033
  Delete $INSTDIR\NSIS.exe
1034
  Delete $INSTDIR\license.txt
1035
  Delete $INSTDIR\COPYING
1036
  Delete $INSTDIR\uninst-nsis.exe
1037
  Delete $INSTDIR\nsisconf.nsi
1038
  Delete $INSTDIR\nsisconf.nsh
1039
  Delete $INSTDIR\NSIS.chm
1040
  RMDir /r $INSTDIR\Bin
1041
  RMDir /r $INSTDIR\Contrib
1042
  RMDir /r $INSTDIR\Docs
1043
  RMDir /r $INSTDIR\Examples
1044
  RMDir /r $INSTDIR\Include
1045
  RMDir /r $INSTDIR\Menu
1046
  RMDir /r $INSTDIR\Plugins
1047
  RMDir /r $INSTDIR\Stubs
1048
  RMDir $INSTDIR
1049

    
1050
  SetDetailsPrint both
1051

    
1052
SectionEnd