Statistiques
| Révision :

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

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

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