Statistiques
| Révision :

root / tmp / org.txm.setups / nsis / Examples / makensis.nsi @ 2425

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

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