2003-01-04 16:25:28 +00:00
;NSIS Setup Script
2003-11-27 21:29:05 +00:00
;--------------------------------
2002-11-06 12:12:51 +00:00
2017-09-01 23:06:48 +00:00
! pragma warning error all
! pragma warning warning 7010 ; File /NonFatal
2012-10-13 01:47:50 +00:00
!ifdef VER_MAJOR & VER_MINOR
!define /ifndef VER_REVISION 0
!define /ifndef VER_BUILD 0
!endif
2013-07-10 16:34:53 +00:00
!define /ifndef VERSION 'anonymous-build'
2003-02-17 20:38:49 +00:00
2003-01-04 16:25:28 +00:00
;--------------------------------
;Configuration
2002-11-06 12:12:51 +00:00
2017-07-24 21:38:21 +00:00
!if ${NSIS_PTR_SIZE} > 4
2013-09-06 23:48:59 +00:00
!define BITS 64
!define NAMESUFFIX " (64 bit) "
2005-06-19 17:00:09 +00:00
!else
2013-09-06 23:48:59 +00:00
!define BITS 32
!define NAMESUFFIX " "
2005-06-19 17:00:09 +00:00
!endif
2013-09-06 23:48:59 +00:00
!ifndef OUTFILE
!define OUTFILE " ..\nsis${BITS}-${VERSION}-setup.exe "
!searchreplace OUTFILE " ${OUTFILE} " nsis32 nsis
!endif
OutFile " ${OUTFILE} "
2012-10-13 01:47:50 +00:00
Unicode true
2005-04-02 12:04:36 +00:00
SetCompressor /SOLID lzma
2002-10-27 17:10:57 +00:00
2003-11-27 21:29:05 +00:00
InstType " Full "
InstType " Lite "
2005-06-19 17:00:09 +00:00
InstType " Minimal "
2003-01-04 16:25:28 +00:00
2013-09-06 23:48:59 +00:00
InstallDir $PROGRAMFILES ${BITS} \ NSIS
2003-11-27 21:29:05 +00:00
InstallDirRegKey HKLM Software\ NSIS " "
2003-01-04 16:25:28 +00:00
2006-12-08 11:21:44 +00:00
RequestExecutionLevel admin
2003-01-04 16:25:28 +00:00
;--------------------------------
2003-12-04 16:28:13 +00:00
;Header Files
2007-12-19 20:33:45 +00:00
!include " MUI2.nsh "
2003-12-04 16:28:13 +00:00
!include " Sections.nsh "
2006-07-30 10:11:40 +00:00
!include " LogicLib.nsh "
2007-03-10 14:41:05 +00:00
!include " Memento.nsh "
2007-12-19 21:17:14 +00:00
!include " WordFunc.nsh "
2018-05-30 21:31:23 +00:00
!include " Util.nsh "
2020-05-21 00:44:39 +00:00
!include " Integration.nsh "
2004-10-11 10:32:23 +00:00
2003-09-05 15:16:15 +00:00
;--------------------------------
2003-10-08 11:19:25 +00:00
;Configuration
2003-01-04 16:25:28 +00:00
2003-09-05 15:16:15 +00:00
;Names
2003-09-12 16:05:00 +00:00
Name " NSIS "
2013-09-06 23:48:59 +00:00
Caption " NSIS ${VERSION}${NAMESUFFIX} Setup "
2003-01-04 16:25:28 +00:00
2013-07-10 16:34:53 +00:00
!define REG_UNINST_KEY " Software\Microsoft\Windows\CurrentVersion\Uninstall\NSIS "
2007-03-10 14:41:05 +00:00
;Memento Settings
!define MEMENTO_REGISTRY_ROOT HKLM
2013-07-10 16:34:53 +00:00
!define MEMENTO_REGISTRY_KEY " ${REG_UNINST_KEY} "
2007-03-10 14:41:05 +00:00
2003-10-08 11:19:25 +00:00
;Interface Settings
!define MUI_ABORTWARNING
2016-12-03 22:06:46 +00:00
!define MUI_ICON " ${NSISDIR} \Contrib\Graphics\Icons\nsis3-install.ico "
!define MUI_UNICON " ${NSISDIR} \Contrib\Graphics\Icons\nsis3-uninstall.ico "
2003-10-22 19:23:45 +00:00
!define MUI_HEADERIMAGE
2016-12-03 22:06:46 +00:00
!define MUI_HEADERIMAGE_BITMAP " ${NSISDIR} \Contrib\Graphics\Header\nsis3-branding.bmp "
!define MUI_WELCOMEFINISHPAGE_BITMAP " ${NSISDIR} \Contrib\Graphics\Wizard\nsis3-branding.bmp "
2003-10-08 11:19:25 +00:00
!define MUI_COMPONENTSPAGE_SMALLDESC
2003-09-05 15:16:15 +00:00
;Pages
2005-06-19 17:00:09 +00:00
!define MUI_WELCOMEPAGE_TITLE " Welcome to the NSIS ${VERSION} Setup Wizard "
2014-01-23 14:33:23 +00:00
!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 "
2003-09-26 11:10:23 +00:00
2003-09-05 15:16:15 +00:00
!insertmacro MUI_PAGE_WELCOME
2006-10-28 19:45:02 +00:00
!insertmacro MUI_PAGE_LICENSE " ..\COPYING "
2005-06-19 17:00:09 +00:00
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
2003-10-08 17:44:33 +00:00
Page custom PageReinstall PageLeaveReinstall
2005-06-19 17:00:09 +00:00
!endif
2003-09-05 15:16:15 +00:00
!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
2003-01-04 16:25:28 +00:00
2004-02-23 17:46:16 +00:00
!define MUI_FINISHPAGE_LINK " Visit the NSIS site for the latest news, FAQs and support "
2003-09-26 11:10:23 +00:00
!define MUI_FINISHPAGE_LINK_LOCATION " http://nsis.sf.net/ "
2003-11-06 15:05:27 +00:00
!define MUI_FINISHPAGE_RUN " $INSTDIR \NSIS.exe "
2003-09-05 15:16:15 +00:00
!define MUI_FINISHPAGE_NOREBOOTSUPPORT
2003-01-04 16:25:28 +00:00
2006-07-30 10:11:40 +00:00
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT " Show release notes "
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION ShowReleaseNotes
2003-09-05 15:16:15 +00:00
!insertmacro MUI_PAGE_FINISH
2002-12-17 13:47:24 +00:00
2003-09-05 15:16:15 +00:00
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE " English "
2002-08-02 10:01:35 +00:00
2012-10-13 01:47:50 +00:00
;--------------------------------
;Version information
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
VIProductVersion ${VER_MAJOR} .${VER_MINOR} .${VER_REVISION} .${VER_BUILD}
VIAddVersionKey " FileVersion " " ${VERSION} "
VIAddVersionKey " FileDescription " " NSIS Setup "
2013-03-22 21:57:00 +00:00
VIAddVersionKey " LegalCopyright " " http://nsis.sf.net/License "
2012-10-13 01:47:50 +00:00
!endif
2003-01-04 16:25:28 +00:00
;--------------------------------
;Installer Sections
2002-11-15 18:46:19 +00:00
2012-10-13 01:47:50 +00:00
!macro InstallPlugin pi
2017-07-24 21:38:21 +00:00
!if ${BITS} >= 64
2013-09-06 23:48:59 +00:00
File " /oname=$InstDir\Plugins\amd64-unicode\${pi}.dll " ..\ Plugins\ amd64- unicode\ ${pi} .dll
2016-04-01 17:39:32 +00:00
!else
File " /oname=$InstDir\Plugins\x86-ansi\${pi}.dll " ..\ Plugins\ x86- ansi\ ${pi} .dll
File " /oname=$InstDir\Plugins\x86-unicode\${pi}.dll " ..\ Plugins\ x86- unicode\ ${pi} .dll
2013-09-06 23:48:59 +00:00
!endif
2012-10-13 01:47:50 +00:00
!macroend
2013-07-10 16:34:53 +00:00
!macro InstallStub stub
2017-07-24 21:38:21 +00:00
!if ${BITS} >= 64
2013-09-06 23:48:59 +00:00
File ..\ Stubs\ ${stub} - amd64- unicode
2016-04-01 17:39:32 +00:00
!else
File ..\ Stubs\ ${stub} - x86- ansi
File ..\ Stubs\ ${stub} - x86- unicode
2013-09-06 23:48:59 +00:00
!endif
2013-07-10 16:34:53 +00:00
!macroend
2007-03-10 14:41:05 +00:00
${MementoSection} " NSIS Core Files (required) " SecCore
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing NSIS Core Files... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2002-08-02 10:01:35 +00:00
SectionIn 1 2 3 RO
SetOutPath $INSTDIR
2002-09-20 20:41:16 +00:00
RMDir /r $SMPROGRAMS \ NSIS
2012-09-16 14:45:43 +00:00
IfFileExists $INSTDIR \ nsisconf.nsi " " + 2
Rename $INSTDIR \ nsisconf.nsi $INSTDIR \ nsisconf.nsh
SetOverwrite off
File ..\ nsisconf.nsh
2003-02-19 22:36:14 +00:00
SetOverwrite on
2011-12-05 22:52:54 +00:00
File ..\ makensis.exe
2002-08-02 10:01:35 +00:00
File ..\ makensisw.exe
2006-10-28 19:45:02 +00:00
File ..\ COPYING
2010-04-21 12:45:53 +00:00
File ..\ NSIS.chm
2017-04-25 13:58:43 +00:00
! pragma verifychm " ..\NSIS.chm "
2018-10-30 22:33:18 +00:00
!if /FileExists " ..\NSIS.exe "
!if /FileExists " ..\NSIS.exe.manifest "
File " ..\NSIS.exe.manifest "
!endif
!else
!define NO_NSISMENU_HTML 1
! makensis '-v2 "NSISMenu.nsi" "-XOutFile ..\NSIS.exe"' = 0
2015-11-24 12:48:21 +00:00
!endif
2018-10-30 22:33:18 +00:00
File ..\ NSIS.exe
2012-09-16 14:45:43 +00:00
2010-02-07 21:24:09 +00:00
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ makensis.exe
2012-08-22 23:32:05 +00:00
!ifdef USE_NEW_ZLIB
File ..\ Bin\ zlib .dll
!else
2010-02-07 21:24:09 +00:00
File ..\ Bin\ zlib1.dll
2012-08-22 23:32:05 +00:00
!endif
2007-03-30 16:30:22 +00:00
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Stubs
File ..\ Stubs\ uninst
2012-10-13 01:47:50 +00:00
!insertmacro InstallStub bzip2
!insertmacro InstallStub bzip2_solid
!insertmacro InstallStub lzma
!insertmacro InstallStub lzma_solid
!insertmacro InstallStub zlib
!insertmacro InstallStub zlib_solid
2005-06-19 17:00:09 +00:00
2002-12-06 17:20:16 +00:00
SetOutPath $INSTDIR \ Include
File ..\ Include\ WinMessages.nsh
2003-02-17 18:57:49 +00:00
File ..\ Include\ Sections.nsh
2004-08-07 07:55:53 +00:00
File ..\ Include\ Library.nsh
2003-11-12 17:35:04 +00:00
File ..\ Include\ UpgradeDLL.nsh
2003-12-14 01:15:44 +00:00
File ..\ Include\ LogicLib.nsh
2004-02-07 00:39:42 +00:00
File ..\ Include\ StrFunc.nsh
2004-07-24 12:34:47 +00:00
File ..\ Include\ Colors.nsh
2005-07-23 13:51:15 +00:00
File ..\ Include\ FileFunc.nsh
File ..\ Include\ TextFunc.nsh
File ..\ Include\ WordFunc.nsh
2006-09-30 12:35:12 +00:00
File ..\ Include\ WinVer.nsh
File ..\ Include\ x64.nsh
2007-03-10 14:41:05 +00:00
File ..\ Include\ Memento.nsh
2007-08-25 13:13:05 +00:00
File ..\ Include\ LangFile.nsh
File ..\ Include\ InstallOptions.nsh
2008-01-03 01:26:09 +00:00
File ..\ Include\ MultiUser.nsh
2008-01-24 21:45:42 +00:00
File ..\ Include\ VB6RunTime.nsh
2008-12-20 09:02:20 +00:00
File ..\ Include\ Util.nsh
2020-05-21 00:44:39 +00:00
File ..\ Include\ Integration.nsh
2009-02-05 00:02:09 +00:00
File ..\ Include\ WinCore.nsh
2008-12-27 13:25:25 +00:00
SetOutPath $INSTDIR \ Include\ Win
File ..\ Include\ Win\ WinDef.nsh
File ..\ Include\ Win\ WinError.nsh
File ..\ Include\ Win\ WinNT.nsh
File ..\ Include\ Win\ WinUser.nsh
2011-03-11 05:35:56 +00:00
File ..\ Include\ Win\ COM.nsh
2011-03-17 18:47:58 +00:00
File ..\ Include\ Win\ Propkey.nsh
2002-12-06 17:20:16 +00:00
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ StrFunc
File ..\ Docs\ StrFunc\ StrFunc.txt
2008-01-03 01:26:09 +00:00
SetOutPath $INSTDIR \ Docs\ MultiUser
File ..\ Docs\ MultiUser\ Readme.html
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ makensisw
File ..\ Docs\ makensisw\ * .txt
2003-12-04 22:12:25 +00:00
2018-10-30 22:33:18 +00:00
!ifndef NO_NSISMENU_HTML
SetOutPath $INSTDIR \ Menu
File ..\ Menu\ * .html
SetOutPath $INSTDIR \ Menu\ images
File ..\ Menu\ images\ header.gif
File ..\ Menu\ images\ line.gif
File ..\ Menu\ images\ site.gif
!endif
2003-12-04 22:12:25 +00:00
2003-11-10 18:51:23 +00:00
Delete $INSTDIR \ makensis.htm
2003-11-10 18:48:48 +00:00
Delete $INSTDIR \ Docs\ * .html
Delete $INSTDIR \ Docs\ style.css
RMDir $INSTDIR \ Docs
2003-12-04 22:12:25 +00:00
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Bin
2017-07-24 21:38:21 +00:00
!if ${BITS} >= 64
File /NonFatal ..\ Bin\ RegTool- x86.bin
File ..\ Bin\ RegTool- amd64.bin
!else
File ..\ Bin\ RegTool- x86.bin
!if /FileExists ..\ Bin\ RegTool- amd64.bin ; It is unlikely that this exists, avoid the /NonFatal warning.
File ..\ Bin\ RegTool- amd64.bin
!endif
!endif
2004-10-11 10:32:23 +00:00
2012-10-13 01:47:50 +00:00
CreateDirectory $INSTDIR \ Plugins\ x86- ansi
CreateDirectory $INSTDIR \ Plugins\ x86- unicode
2017-07-24 21:38:21 +00:00
!if ${BITS} >= 64
2013-09-06 23:48:59 +00:00
CreateDirectory $INSTDIR \ Plugins\ amd64- unicode
!endif
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin TypeLib
2004-08-07 07:55:53 +00:00
2003-11-27 21:29:05 +00:00
ReadRegStr $R0 HKCR " .nsi " " "
2003-12-11 21:05:30 +00:00
StrCmp $R0 " NSISFile " 0 + 2
2003-11-27 21:29:05 +00:00
DeleteRegKey HKCR " NSISFile "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " .nsi " " " " NSIS.Script "
2013-07-10 16:36:18 +00:00
WriteRegStr HKCR " .nsi " " PerceivedType " " text "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " NSIS.Script " " " " NSIS Script File "
WriteRegStr HKCR " NSIS.Script\DefaultIcon " " " " $INSTDIR \makensisw.exe,1 "
ReadRegStr $R0 HKCR " NSIS.Script\shell\open\command " " "
2013-07-10 16:34:53 +00:00
${If} $R0 == " "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " NSIS.Script\shell " " " " open "
WriteRegStr HKCR " NSIS.Script\shell\open\command " " " 'notepad.exe "%1"'
2013-07-10 16:34:53 +00:00
${EndIf}
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " NSIS.Script\shell\compile " " " " Compile NSIS Script "
WriteRegStr HKCR " NSIS.Script\shell\compile\command " " " '"$INSTDIR\makensisw.exe" "%1"'
WriteRegStr HKCR " NSIS.Script\shell\compile-compressor " " " " Compile NSIS Script (Choose Compressor) "
WriteRegStr HKCR " NSIS.Script\shell\compile-compressor\command " " " '"$INSTDIR\makensisw.exe" /ChooseCompressor "%1"'
2003-12-04 22:12:25 +00:00
2003-11-27 21:29:05 +00:00
ReadRegStr $R0 HKCR " .nsh " " "
2003-12-11 21:05:30 +00:00
StrCmp $R0 " NSHFile " 0 + 2
2003-11-27 21:29:05 +00:00
DeleteRegKey HKCR " NSHFile "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " .nsh " " " " NSIS.Header "
2013-07-10 16:36:18 +00:00
WriteRegStr HKCR " .nsh " " PerceivedType " " text "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " NSIS.Header " " " " NSIS Header File "
2015-11-23 10:36:58 +00:00
WriteRegStr HKCR " NSIS.Header\DefaultIcon " " " " $INSTDIR \makensisw.exe,2 "
2003-12-11 21:05:30 +00:00
ReadRegStr $R0 HKCR " NSIS.Header\shell\open\command " " "
2013-07-10 16:34:53 +00:00
${If} $R0 == " "
2003-12-11 21:05:30 +00:00
WriteRegStr HKCR " NSIS.Header\shell " " " " open "
WriteRegStr HKCR " NSIS.Header\shell\open\command " " " 'notepad.exe "%1"'
2013-07-10 16:34:53 +00:00
${EndIf}
2003-11-27 21:29:05 +00:00
2020-05-21 00:44:39 +00:00
${NotifyShell_AssocChanged}
2004-10-11 10:32:23 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-02 10:01:35 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Script Examples " SecExample
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Installing Script Examples... "
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1 2
2003-02-20 09:49:19 +00:00
SetOutPath $INSTDIR \ Examples
File ..\ Examples\ makensis.nsi
File ..\ Examples\ example1.nsi
File ..\ Examples\ example2.nsi
2020-03-17 19:02:42 +00:00
File ..\ Examples\ install- per- user .nsi
2020-03-18 01:01:29 +00:00
File ..\ Examples\ install- shared.nsi
2003-02-20 09:49:19 +00:00
File ..\ Examples\ waplugin.nsi
File ..\ Examples\ bigtest.nsi
File ..\ Examples\ primes.nsi
File ..\ Examples\ rtest.nsi
File ..\ Examples\ gfx.nsi
File ..\ Examples\ one- section .nsi
File ..\ Examples\ languages.nsi
2005-07-28 17:58:36 +00:00
File ..\ Examples\ Library.nsi
2003-06-10 19:34:15 +00:00
File ..\ Examples\ VersionInfo.nsi
2003-12-14 01:15:44 +00:00
File ..\ Examples\ LogicLib.nsi
2003-12-17 23:57:19 +00:00
File ..\ Examples\ silent .nsi
2004-02-07 00:39:42 +00:00
File ..\ Examples\ StrFunc.nsi
2005-07-23 13:51:15 +00:00
File ..\ Examples\ FileFunc.nsi
File ..\ Examples\ FileFunc.ini
File ..\ Examples\ FileFuncTest.nsi
File ..\ Examples\ TextFunc.nsi
File ..\ Examples\ TextFunc.ini
File ..\ Examples\ TextFuncTest.nsi
File ..\ Examples\ WordFunc.nsi
File ..\ Examples\ WordFunc.ini
File ..\ Examples\ WordFuncTest.nsi
2007-03-31 13:48:46 +00:00
File ..\ Examples\ Memento.nsi
2013-04-11 09:36:48 +00:00
File ..\ Examples\ unicode.nsi
2018-12-15 22:11:30 +00:00
File ..\ Examples\ NSISMenu.nsi
2007-03-31 13:48:46 +00:00
2007-03-31 13:51:35 +00:00
SetOutPath $INSTDIR \ Examples\ Plugin
File ..\ Examples\ Plugin\ exdll.c
File ..\ Examples\ Plugin\ exdll.dpr
File ..\ Examples\ Plugin\ exdll.dsp
File ..\ Examples\ Plugin\ exdll.dsw
File ..\ Examples\ Plugin\ exdll_with_unit.dpr
2009-02-01 12:06:41 +00:00
File ..\ Examples\ Plugin\ exdll- vs2008.sln
File ..\ Examples\ Plugin\ exdll- vs2008.vcproj
2007-03-31 13:51:35 +00:00
File ..\ Examples\ Plugin\ extdll.inc
File ..\ Examples\ Plugin\ nsis.pas
2007-03-31 13:48:46 +00:00
2009-02-05 00:02:09 +00:00
SetOutPath $INSTDIR \ Examples\ Plugin\ nsis
File ..\ Examples\ Plugin\ nsis\ pluginapi.h
2012-10-13 01:47:50 +00:00
File /nonfatal ..\ Examples\ Plugin\ nsis\ pluginapi* .lib
2009-02-05 00:02:09 +00:00
File ..\ Examples\ Plugin\ nsis\ api.h
2010-04-21 08:55:35 +00:00
File ..\ Examples\ Plugin\ nsis\ nsis_tchar.h
2008-12-12 16:33:25 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-02-20 09:49:19 +00:00
2003-01-21 19:24:17 +00:00
!ifndef NO_STARTMENUSHORTCUTS
2007-03-10 14:41:05 +00:00
${MementoSection} " Start Menu and Desktop Shortcuts " SecShortcuts
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Start Menu and Desktop Shortcuts... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2003-01-21 19:24:17 +00:00
!else
2007-03-10 14:41:05 +00:00
${MementoSection} " Desktop Shortcut " SecShortcuts
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Installing Desktop Shortcut... "
SetDetailsPrint listonly
2003-01-21 19:24:17 +00:00
!endif
2005-06-19 17:00:09 +00:00
SectionIn 1 2
2002-09-20 19:20:10 +00:00
SetOutPath $INSTDIR
2003-01-21 19:24:17 +00:00
!ifndef NO_STARTMENUSHORTCUTS
2014-03-28 16:21:39 +00:00
CreateShortcut " $SMPROGRAMS \NSIS${NAMESUFFIX}.lnk " " $INSTDIR \NSIS.exe "
2003-01-21 19:24:17 +00:00
!endif
2003-09-21 16:18:17 +00:00
2014-03-28 16:21:39 +00:00
CreateShortcut " $DESKTOP \NSIS${NAMESUFFIX}.lnk " " $INSTDIR \NSIS.exe "
2003-12-04 22:12:25 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-02 10:01:35 +00:00
2005-01-10 12:43:52 +00:00
SectionGroup " User Interfaces " SecInterfaces
2002-10-12 18:30:36 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Modern User Interface " SecInterfacesModernUI
2003-07-12 14:44:38 +00:00
2003-12-01 11:36:04 +00:00
SetDetailsPrint textonly
2003-12-04 16:28:13 +00:00
DetailPrint " Installing User Interfaces | Modern User Interface... "
2003-12-01 11:36:04 +00:00
SetDetailsPrint listonly
2003-07-12 14:44:38 +00:00
2005-06-19 17:00:09 +00:00
SectionIn 1 2
2003-12-01 11:36:04 +00:00
2003-11-27 21:29:05 +00:00
SetOutPath " $INSTDIR \Examples\Modern UI "
File " ..\Examples\Modern UI\Basic.nsi "
File " ..\Examples\Modern UI\HeaderBitmap.nsi "
File " ..\Examples\Modern UI\MultiLanguage.nsi "
File " ..\Examples\Modern UI\StartMenu.nsi "
File " ..\Examples\Modern UI\WelcomeFinish.nsi "
SetOutPath " $INSTDIR \Contrib\Modern UI "
File " ..\Contrib\Modern UI\System.nsh "
File " ..\Contrib\Modern UI\ioSpecial.ini "
2004-10-11 10:32:23 +00:00
2005-06-19 17:00:09 +00:00
SetOutPath " $INSTDIR \Docs\Modern UI "
File " ..\Docs\Modern UI\Readme.html "
File " ..\Docs\Modern UI\Changelog.txt "
File " ..\Docs\Modern UI\License.txt "
SetOutPath " $INSTDIR \Docs\Modern UI\images "
File " ..\Docs\Modern UI\images\header.gif "
File " ..\Docs\Modern UI\images\screen1.png "
File " ..\Docs\Modern UI\images\screen2.png "
File " ..\Docs\Modern UI\images\open.gif "
File " ..\Docs\Modern UI\images\closed.gif "
2003-11-27 21:29:05 +00:00
SetOutPath $INSTDIR \ Contrib\ UIs
File " ..\Contrib\UIs\modern.exe "
File " ..\Contrib\UIs\modern_headerbmp.exe "
File " ..\Contrib\UIs\modern_headerbmpr.exe "
File " ..\Contrib\UIs\modern_nodesc.exe "
File " ..\Contrib\UIs\modern_smalldesc.exe "
2004-10-11 10:32:23 +00:00
2003-11-27 21:29:05 +00:00
SetOutPath $INSTDIR \ Include
File " ..\Include\MUI.nsh "
2003-12-04 22:12:25 +00:00
2007-08-25 13:13:05 +00:00
SetOutPath " $INSTDIR \Contrib\Modern UI 2 "
2007-12-22 16:35:12 +00:00
File " ..\Contrib\Modern UI 2\Deprecated.nsh "
2007-08-25 13:13:05 +00:00
File " ..\Contrib\Modern UI 2\Interface.nsh "
File " ..\Contrib\Modern UI 2\Localization.nsh "
File " ..\Contrib\Modern UI 2\MUI2.nsh "
File " ..\Contrib\Modern UI 2\Pages.nsh "
SetOutPath " $INSTDIR \Contrib\Modern UI 2\Pages "
File " ..\Contrib\Modern UI 2\Pages\Components.nsh "
File " ..\Contrib\Modern UI 2\Pages\Directory.nsh "
File " ..\Contrib\Modern UI 2\Pages\Finish.nsh "
File " ..\Contrib\Modern UI 2\Pages\InstallFiles.nsh "
File " ..\Contrib\Modern UI 2\Pages\License.nsh "
File " ..\Contrib\Modern UI 2\Pages\StartMenu.nsh "
File " ..\Contrib\Modern UI 2\Pages\UninstallConfirm.nsh "
File " ..\Contrib\Modern UI 2\Pages\Welcome.nsh "
SetOutPath " $INSTDIR \Docs\Modern UI 2 "
File " ..\Docs\Modern UI 2\Readme.html "
File " ..\Docs\Modern UI 2\License.txt "
SetOutPath " $INSTDIR \Docs\Modern UI 2\images "
File " ..\Docs\Modern UI 2\images\header.gif "
File " ..\Docs\Modern UI 2\images\screen1.png "
File " ..\Docs\Modern UI 2\images\screen2.png "
File " ..\Docs\Modern UI 2\images\open.gif "
File " ..\Docs\Modern UI 2\images\closed.gif "
SetOutPath $INSTDIR \ Include
File " ..\Include\MUI2.nsh "
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-09-21 16:18:17 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Default User Interface " SecInterfacesDefaultUI
2003-07-12 14:44:38 +00:00
2003-12-01 11:36:04 +00:00
SetDetailsPrint textonly
2003-12-04 16:28:13 +00:00
DetailPrint " Installing User Interfaces | Default User Interface... "
2003-12-01 11:36:04 +00:00
SetDetailsPrint listonly
2003-07-12 14:44:38 +00:00
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2003-11-27 21:29:05 +00:00
SetOutPath " $INSTDIR \Contrib\UIs "
File " ..\Contrib\UIs\default.exe "
2003-09-21 16:18:17 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-07-12 14:44:38 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Tiny User Interface " SecInterfacesTinyUI
2003-07-12 14:44:38 +00:00
2003-12-01 11:36:04 +00:00
SetDetailsPrint textonly
2003-12-04 16:28:13 +00:00
DetailPrint " Installing User Interfaces | Tiny User Interface... "
2003-12-01 11:36:04 +00:00
SetDetailsPrint listonly
2003-11-27 21:29:05 +00:00
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2003-11-27 21:29:05 +00:00
SetOutPath " $INSTDIR \Contrib\UIs "
File " ..\Contrib\UIs\sdbarker_tiny.exe "
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-09-21 16:18:17 +00:00
2005-01-10 12:43:52 +00:00
SectionGroupEnd
2002-10-07 21:16:57 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Graphics " SecGraphics
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Graphics... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2003-09-23 18:50:38 +00:00
Delete $INSTDIR \ Contrib\ Icons\ * .ico
Delete $INSTDIR \ Contrib\ Icons\ * .bmp
2003-11-10 18:48:48 +00:00
RMDir $INSTDIR \ Contrib\ Icons
2003-09-23 18:50:38 +00:00
SetOutPath $INSTDIR \ Contrib\ Graphics
2018-12-15 22:11:30 +00:00
File /r " ..\Contrib\Graphics\*.ico "
2003-09-23 18:50:38 +00:00
File /r " ..\Contrib\Graphics\*.bmp "
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-02 10:01:35 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Language Files " SecLangFiles
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-12-04 16:28:13 +00:00
DetailPrint " Installing Language Files... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-09-21 16:18:17 +00:00
2002-08-04 20:25:10 +00:00
SetOutPath " $INSTDIR \Contrib\Language files "
File " ..\Contrib\Language files\*.nlf "
2003-09-21 16:18:17 +00:00
2002-08-26 16:56:33 +00:00
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ MakeLangID.exe
2003-09-21 16:18:17 +00:00
2017-03-22 15:05:13 +00:00
${If} ${SectionIsSelected} ${SecInterfacesModernUI}
2007-08-25 13:13:05 +00:00
SetOutPath " $INSTDIR \Contrib\Language files "
File " ..\Contrib\Language files\*.nsh "
2017-03-22 15:05:13 +00:00
${EndIf}
2003-09-21 16:18:17 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-04 20:25:10 +00:00
2005-01-10 12:43:52 +00:00
SectionGroup " Tools " SecTools
2003-11-27 21:29:05 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Zip2Exe " SecToolsZ2E
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Tools | Zip2Exe... "
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2003-11-27 21:29:05 +00:00
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ zip2exe.exe
SetOutPath $INSTDIR \ Contrib\ zip2exe
File ..\ Contrib\ zip2exe\ Base.nsh
File ..\ Contrib\ zip2exe\ Modern.nsh
File ..\ Contrib\ zip2exe\ Classic.nsh
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-11-27 21:29:05 +00:00
2005-01-10 12:43:52 +00:00
SectionGroupEnd
2003-11-27 21:29:05 +00:00
2005-01-10 12:43:52 +00:00
SectionGroup " Plug-ins " SecPluginsPlugins
2003-11-27 21:29:05 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Banner " SecPluginsBanner
2003-11-27 21:29:05 +00:00
SetDetailsPrint textonly
DetailPrint " Installing Plug-ins | Banner... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin Banner
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ Banner
File ..\ Docs\ Banner\ Readme.txt
SetOutPath $INSTDIR \ Examples\ Banner
File ..\ Examples\ Banner\ Example.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-11-24 18:50:31 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Language DLL " SecPluginsLangDLL
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | Language DLL... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin LangDLL
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-29 13:36:46 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " nsExec " SecPluginsnsExec
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | nsExec... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin nsExec
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ nsExec
File ..\ Docs\ nsExec\ nsExec.txt
SetOutPath $INSTDIR \ Examples\ nsExec
File ..\ Examples\ nsExec\ test.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-09-05 16:41:54 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Splash " SecPluginsSplash
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | Splash... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin splash
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ Splash
File ..\ Docs\ Splash\ splash.txt
SetOutPath $INSTDIR \ Examples\ Splash
File ..\ Examples\ Splash\ Example.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-02 10:01:35 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " AdvSplash " SecPluginsSplashT
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | AdvSplash... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin advsplash
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ AdvSplash
File ..\ Docs\ AdvSplash\ advsplash.txt
SetOutPath $INSTDIR \ Examples\ AdvSplash
File ..\ Examples\ AdvSplash\ Example.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-05 14:31:50 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " BgImage " SecPluginsBgImage
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | BgImage... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin BgImage
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ BgImage
File ..\ Docs\ BgImage\ BgImage.txt
SetOutPath $INSTDIR \ Examples\ BgImage
File ..\ Examples\ BgImage\ Example.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-11-08 21:05:57 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " InstallOptions " SecPluginsIO
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-12-04 22:12:25 +00:00
DetailPrint " Installing Plug-ins | InstallOptions... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin InstallOptions
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ InstallOptions
File ..\ Docs\ InstallOptions\ Readme.html
File ..\ Docs\ InstallOptions\ Changelog.txt
SetOutPath $INSTDIR \ Examples\ InstallOptions
File ..\ Examples\ InstallOptions\ test.ini
File ..\ Examples\ InstallOptions\ test.nsi
File ..\ Examples\ InstallOptions\ testimgs.ini
File ..\ Examples\ InstallOptions\ testimgs.nsi
File ..\ Examples\ InstallOptions\ testlink.ini
File ..\ Examples\ InstallOptions\ testlink.nsi
File ..\ Examples\ InstallOptions\ testnotify.ini
File ..\ Examples\ InstallOptions\ testnotify.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-08-02 10:01:35 +00:00
2007-07-14 09:40:06 +00:00
${MementoSection} " nsDialogs " SecPluginsDialogs
SetDetailsPrint textonly
DetailPrint " Installing Plug-ins | nsDialogs... "
SetDetailsPrint listonly
SectionIn 1
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin nsDialogs
2007-07-14 09:40:06 +00:00
SetOutPath $INSTDIR \ Examples\ nsDialogs
File ..\ Examples\ nsDialogs\ example.nsi
File ..\ Examples\ nsDialogs\ InstallOptions.nsi
2008-12-20 12:26:02 +00:00
File ..\ Examples\ nsDialogs\ timer.nsi
2007-07-14 09:40:06 +00:00
File ..\ Examples\ nsDialogs\ welcome.nsi
SetOutPath $INSTDIR \ Include
File ..\ Include\ nsDialogs.nsh
2007-08-25 13:13:05 +00:00
SetOutPath $INSTDIR \ Docs\ nsDialogs
File ..\ Docs\ nsDialogs\ Readme.html
2007-07-14 09:40:06 +00:00
${MementoSectionEnd}
2007-03-10 14:41:05 +00:00
${MementoSection} " Math " SecPluginsMath
2003-09-21 16:18:17 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | Math... "
2003-09-21 16:18:17 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin Math
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ Math
File ..\ Docs\ Math\ Math.txt
SetOutPath $INSTDIR \ Examples\ Math
File ..\ Examples\ Math\ math.nsi
File ..\ Examples\ Math\ mathtest.txt
File ..\ Examples\ Math\ mathtest.nsi
File ..\ Examples\ Math\ mathtest.ini
2003-09-21 16:18:17 +00:00
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-09-21 16:18:17 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " NSISdl " SecPluginsNSISDL
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | NSISdl... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin nsisdl
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ NSISdl
File ..\ Docs\ NSISdl\ ReadMe.txt
File ..\ Docs\ NSISdl\ License.txt
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-09-26 14:52:18 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " System " SecPluginsSystem
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | System... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin System
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ System
File ..\ Docs\ System \ System .html
File ..\ Docs\ System \ WhatsNew.txt
SetOutPath $INSTDIR \ Examples\ System
File ..\ Examples\ System \ Resource.dll
File ..\ Examples\ System \ SysFunc.nsh
File ..\ Examples\ System \ System .nsh
File ..\ Examples\ System \ System .nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-11-08 21:05:57 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " StartMenu " SecPluginsStartMenu
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | StartMenu... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin StartMenu
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ StartMenu
File ..\ Docs\ StartMenu\ Readme.txt
SetOutPath $INSTDIR \ Examples\ StartMenu
File ..\ Examples\ StartMenu\ Example.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-09-26 14:52:18 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " UserInfo " SecPluginsUserInfo
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | UserInfo... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin UserInfo
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Examples\ UserInfo
File ..\ Examples\ UserInfo\ UserInfo.nsi
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2002-09-26 14:52:18 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " Dialer " SecPluginsDialer
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | Dialer... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin Dialer
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Docs\ Dialer
File ..\ Docs\ Dialer\ Dialer.txt
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
2003-02-19 21:29:44 +00:00
2007-03-10 14:41:05 +00:00
${MementoSection} " VPatch " SecPluginsVPatch
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
2003-11-27 21:29:05 +00:00
DetailPrint " Installing Plug-ins | VPatch... "
2003-07-12 14:44:38 +00:00
SetDetailsPrint listonly
2005-06-19 17:00:09 +00:00
SectionIn 1
2003-12-01 11:36:04 +00:00
2012-10-13 01:47:50 +00:00
!insertmacro InstallPlugin VPatch
2005-06-19 17:00:09 +00:00
SetOutPath $INSTDIR \ Examples\ VPatch
File ..\ Examples\ VPatch\ example.nsi
File ..\ Examples\ VPatch\ oldfile.txt
File ..\ Examples\ VPatch\ newfile.txt
File ..\ Examples\ VPatch\ patch.pat
SetOutPath $INSTDIR \ Docs\ VPatch
File ..\ Docs\ VPatch\ Readme.html
SetOutPath $INSTDIR \ Bin
File ..\ Bin\ GenPat.exe
2005-09-17 09:25:44 +00:00
SetOutPath $INSTDIR \ Include
File ..\ Include\ VPatchLib.nsh
2007-03-10 14:41:05 +00:00
${MementoSectionEnd}
${MementoSectionDone}
2003-05-21 12:24:22 +00:00
2005-01-10 12:43:52 +00:00
SectionGroupEnd
2002-08-02 10:01:35 +00:00
Section - post
2003-02-17 20:38:49 +00:00
2003-02-20 09:49:19 +00:00
; When Modern UI is installed:
; * Always install the English language file
; * Always install default icons / bitmaps
2003-02-17 20:38:49 +00:00
2013-07-10 16:34:53 +00:00
${If} ${SectionIsSelected} ${SecInterfacesModernUI}
2003-07-12 14:44:38 +00:00
2003-12-04 16:28:13 +00:00
SetDetailsPrint textonly
2006-05-19 16:27:56 +00:00
DetailPrint " Configuring Modern UI... "
2003-12-04 16:28:13 +00:00
SetDetailsPrint listonly
2003-07-12 14:44:38 +00:00
2017-03-22 15:05:13 +00:00
${IfNot} ${SectionIsSelected} ${SecLangFiles}
2003-12-04 16:28:13 +00:00
SetOutPath " $INSTDIR \Contrib\Language files "
File " ..\Contrib\Language files\English.nlf "
2007-08-25 13:13:05 +00:00
File " ..\Contrib\Language files\English.nsh "
2013-07-10 16:34:53 +00:00
${EndIf}
2003-09-21 16:18:17 +00:00
2017-03-22 15:05:13 +00:00
${IfNot} ${SectionIsSelected} ${SecGraphics}
2003-12-04 16:28:13 +00:00
SetOutPath $INSTDIR \ Contrib\ Graphics\ Checks
File " ..\Contrib\Graphics\Checks\modern.bmp "
2003-09-23 18:50:38 +00:00
SetOutPath $INSTDIR \ Contrib\ Graphics\ Icons
File " ..\Contrib\Graphics\Icons\modern-install.ico "
File " ..\Contrib\Graphics\Icons\modern-uninstall.ico "
2003-12-04 16:28:13 +00:00
SetOutPath $INSTDIR \ Contrib\ Graphics\ Header
File " ..\Contrib\Graphics\Header\nsis.bmp "
2003-09-23 19:57:55 +00:00
SetOutPath $INSTDIR \ Contrib\ Graphics\ Wizard
2003-09-23 18:50:38 +00:00
File " ..\Contrib\Graphics\Wizard\win.bmp "
2013-07-10 16:34:53 +00:00
${EndIf}
2003-09-21 16:18:17 +00:00
2013-07-10 16:34:53 +00:00
${EndIf}
2003-09-21 16:18:17 +00:00
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Creating Registry Keys... "
SetDetailsPrint listonly
2003-02-17 20:38:49 +00:00
2002-09-20 20:41:16 +00:00
SetOutPath $INSTDIR
2003-09-21 16:18:17 +00:00
2003-10-08 17:44:33 +00:00
WriteRegStr HKLM " Software\NSIS " " " $INSTDIR
2005-06-19 17:00:09 +00:00
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
2003-10-08 17:44:33 +00:00
WriteRegDword HKLM " Software\NSIS " " VersionMajor " " ${VER_MAJOR} "
WriteRegDword HKLM " Software\NSIS " " VersionMinor " " ${VER_MINOR} "
WriteRegDword HKLM " Software\NSIS " " VersionRevision " " ${VER_REVISION} "
WriteRegDword HKLM " Software\NSIS " " VersionBuild " " ${VER_BUILD} "
2005-06-19 17:00:09 +00:00
!endif
2003-10-08 17:44:33 +00:00
2013-07-10 16:34:53 +00:00
WriteRegExpandStr HKLM " ${REG_UNINST_KEY} " " UninstallString " '"$INSTDIR\uninst-nsis.exe"'
2018-06-01 22:08:04 +00:00
;WriteRegStr HKLM "${REG_UNINST_KEY}" "QuietUninstallString" '"$INSTDIR\uninst-nsis.exe" /S' ; Ideally WACK would use this
2013-07-10 16:34:53 +00:00
WriteRegExpandStr HKLM " ${REG_UNINST_KEY} " " InstallLocation " " $INSTDIR "
2013-09-06 23:48:59 +00:00
WriteRegStr HKLM " ${REG_UNINST_KEY} " " DisplayName " " Nullsoft Install System${NAMESUFFIX} "
2016-12-05 20:34:35 +00:00
WriteRegStr HKLM " ${REG_UNINST_KEY} " " DisplayIcon " " $INSTDIR \uninst-nsis.exe,0 "
2013-07-10 16:34:53 +00:00
WriteRegStr HKLM " ${REG_UNINST_KEY} " " DisplayVersion " " ${VERSION} "
2005-06-19 17:00:09 +00:00
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
2018-06-01 22:08:04 +00:00
WriteRegDWORD HKLM " ${REG_UNINST_KEY} " " VersionMajor " " ${VER_MAJOR} " ; Required by WACK
WriteRegDWORD HKLM " ${REG_UNINST_KEY} " " VersionMinor " " ${VER_MINOR} " ; Required by WACK
2005-06-19 17:00:09 +00:00
!endif
2018-06-01 22:08:04 +00:00
WriteRegStr HKLM " ${REG_UNINST_KEY} " " Publisher " " Nullsoft and Contributors " ; Required by WACK
2020-07-31 20:07:43 +00:00
WriteRegStr HKLM " ${REG_UNINST_KEY} " " URLInfoAbout " " https://nsis.sourceforge.io/ "
WriteRegStr HKLM " ${REG_UNINST_KEY} " " HelpLink " " https://nsis.sourceforge.io/Support "
2013-07-10 16:34:53 +00:00
WriteRegDWORD HKLM " ${REG_UNINST_KEY} " " NoModify " " 1 "
WriteRegDWORD HKLM " ${REG_UNINST_KEY} " " NoRepair " " 1 "
2018-05-30 21:31:23 +00:00
${MakeARPInstallDate} $1
WriteRegStr HKLM " ${REG_UNINST_KEY} " " InstallDate " $1
2003-09-21 16:18:17 +00:00
2002-08-02 10:01:35 +00:00
WriteUninstaller $INSTDIR \ uninst- nsis.exe
2007-03-10 14:41:05 +00:00
${MementoSectionSave}
2003-07-12 14:44:38 +00:00
SetDetailsPrint both
2002-11-15 18:46:19 +00:00
SectionEnd
2002-08-02 10:01:35 +00:00
2003-01-04 16:25:28 +00:00
;--------------------------------
;Descriptions
2003-09-04 20:25:32 +00:00
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
2003-02-20 09:49:19 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecCore} " The core files required to use NSIS (compiler etc.) "
2002-11-01 20:51:14 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecExample} " Example installation scripts that show you how to use NSIS "
2003-11-27 21:29:05 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecShortcuts} " Adds icons to your start menu and your desktop for easy access "
!insertmacro MUI_DESCRIPTION_TEXT ${SecInterfaces} " User interface designs that can be used to change the installer look and feel "
!insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesModernUI} " A modern user interface like the wizards of recent Windows versions "
!insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesDefaultUI} " The default NSIS user interface which you can customize to make your own UI "
!insertmacro MUI_DESCRIPTION_TEXT ${SecInterfacesTinyUI} " A tiny version of the default user interface "
!insertmacro MUI_DESCRIPTION_TEXT ${SecTools} " Tools that help you with NSIS development "
!insertmacro MUI_DESCRIPTION_TEXT ${SecToolsZ2E} " A utility that converts a ZIP file to a NSIS installer "
2003-12-04 16:28:13 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecGraphics} " Icons, checkbox images and other graphics "
!insertmacro MUI_DESCRIPTION_TEXT ${SecLangFiles} " Language files used to support multiple languages in an installer "
2003-11-27 21:29:05 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsPlugins} " Useful plugins that extend NSIS's functionality "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBanner} " Plugin that lets you show a banner before installation starts "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsLangDLL} " Plugin that lets you add a language select dialog to your installer "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsnsExec} " Plugin that executes console programs and prints its output in the NSIS log window or hides it "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplash} " Splash screen add-on that lets you add a splash screen to an installer "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSplashT} " Splash screen add-on with transparency support that lets you add a splash screen to an installer "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsSystem} " Plugin that lets you call Win32 API or external DLLs "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsMath} " Plugin that lets you evaluate complicated mathematical expressions "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialer} " Plugin that provides internet connection functions "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsIO} " Plugin that lets you add custom pages to an installer "
2007-07-14 09:40:06 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsDialogs} " Plugin that lets you add custom pages to an installer "
2003-11-27 21:29:05 +00:00
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsStartMenu} " Plugin that lets the user select the start menu folder "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsBgImage} " Plugin that lets you show a persistent background image plugin and play sounds "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsUserInfo} " Plugin that that gives you the user name and the user account type "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsNSISDL} " Plugin that lets you create a web based installer "
!insertmacro MUI_DESCRIPTION_TEXT ${SecPluginsVPatch} " Plugin that lets you create patches to upgrade older files "
2003-09-04 20:25:32 +00:00
!insertmacro MUI_FUNCTION_DESCRIPTION_END
2002-08-02 10:01:35 +00:00
2003-01-04 16:25:28 +00:00
;--------------------------------
;Installer Functions
2003-10-08 17:44:33 +00:00
Function .onInit
2007-03-10 14:41:05 +00:00
${MementoSectionRestore}
2003-10-08 17:44:33 +00:00
FunctionEnd
2007-03-10 14:41:05 +00:00
!ifdef VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
2007-12-19 20:57:23 +00:00
Var ReinstallPageCheck
2003-10-08 17:44:33 +00:00
Function PageReinstall
ReadRegStr $R0 HKLM " Software\NSIS " " "
2013-07-10 16:34:53 +00:00
ReadRegStr $R1 HKLM " ${REG_UNINST_KEY} " " UninstallString "
2012-10-13 01:47:50 +00:00
${IfThen} " $R0 $R1 " == " " ${|} Abort ${|}
2003-12-04 22:12:25 +00:00
2012-10-13 01:47:50 +00:00
StrCpy $R4 " older "
2007-12-19 21:17:14 +00:00
ReadRegDWORD $R0 HKLM " Software\NSIS " " VersionMajor "
ReadRegDWORD $R1 HKLM " Software\NSIS " " VersionMinor "
ReadRegDWORD $R2 HKLM " Software\NSIS " " VersionRevision "
ReadRegDWORD $R3 HKLM " Software\NSIS " " VersionBuild "
2012-10-13 01:47:50 +00:00
${IfThen} $R0 = 0 ${|} StrCpy $R4 " unknown " ${|} ; Anonymous builds have no version number
2007-12-19 21:17:14 +00:00
StrCpy $R0 $R0 .$R1 .$R2 .$R3
${VersionCompare} ${VER_MAJOR} .${VER_MINOR} .${VER_REVISION} .${VER_BUILD} $R0 $R0
${If} $R0 == 0
StrCpy $R1 " NSIS ${VERSION} is already installed. Select the operation you want to perform and click Next to continue. "
StrCpy $R2 " Add/Reinstall components "
StrCpy $R3 " Uninstall NSIS "
!insertmacro MUI_HEADER_TEXT " Already Installed " " Choose the maintenance option to perform. "
StrCpy $R0 " 2 "
${ElseIf} $R0 == 1
2012-10-13 01:47:50 +00:00
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. "
2007-12-19 21:17:14 +00:00
StrCpy $R2 " Uninstall before installing "
StrCpy $R3 " Do not uninstall "
!insertmacro MUI_HEADER_TEXT " Already Installed " " Choose how you want to install NSIS. "
StrCpy $R0 " 1 "
${ElseIf} $R0 == 2
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. "
StrCpy $R2 " Uninstall before installing "
StrCpy $R3 " Do not uninstall "
!insertmacro MUI_HEADER_TEXT " Already Installed " " Choose how you want to install NSIS. "
StrCpy $R0 " 1 "
${Else}
Abort
${EndIf}
2003-10-08 17:44:33 +00:00
2008-12-20 08:17:15 +00:00
nsDialogs :: Create 1018
2008-06-12 18:09:34 +00:00
Pop $R4
2007-12-19 20:52:59 +00:00
${NSD_CreateLabel} 0 0 100% 24u $R1
Pop $R1
2007-12-19 20:58:46 +00:00
${NSD_CreateRadioButton} 30u 50u - 30u 8u $R2
2007-12-19 20:52:59 +00:00
Pop $R2
2007-12-19 20:57:23 +00:00
${NSD_OnClick} $R2 PageReinstallUpdateSelection
2007-12-19 20:52:59 +00:00
2007-12-19 20:58:46 +00:00
${NSD_CreateRadioButton} 30u 70u - 30u 8u $R3
2007-12-19 20:52:59 +00:00
Pop $R3
2007-12-19 20:57:23 +00:00
${NSD_OnClick} $R3 PageReinstallUpdateSelection
2007-12-19 20:52:59 +00:00
2007-12-19 20:59:33 +00:00
${If} $ReinstallPageCheck != 2
2007-12-19 20:52:59 +00:00
SendMessage $R2 ${BM_SETCHECK} ${BST_CHECKED} 0
${Else}
SendMessage $R3 ${BM_SETCHECK} ${BST_CHECKED} 0
${EndIf}
2008-12-12 19:22:36 +00:00
${NSD_SetFocus} $R2
2007-12-19 20:52:59 +00:00
nsDialogs :: Show
2003-12-04 22:12:25 +00:00
2003-10-08 17:44:33 +00:00
FunctionEnd
2007-12-19 20:57:23 +00:00
Function PageReinstallUpdateSelection
Pop $R1
${NSD_GetState} $R2 $R1
${If} $R1 == ${BST_CHECKED}
StrCpy $ReinstallPageCheck 1
${Else}
StrCpy $ReinstallPageCheck 2
${EndIf}
FunctionEnd
2003-10-08 17:44:33 +00:00
Function PageLeaveReinstall
2003-12-04 22:12:25 +00:00
2007-12-19 20:57:23 +00:00
${NSD_GetState} $R2 $R1
2003-10-08 17:44:33 +00:00
2013-06-08 01:53:18 +00:00
StrCmp $R0 " 1 " 0 + 2 ; Existing install is not the same version?
2003-10-08 17:44:33 +00:00
StrCmp $R1 " 1 " reinst_uninstall reinst_done
2003-12-04 22:12:25 +00:00
2013-06-08 01:53:18 +00:00
StrCmp $R1 " 1 " reinst_done ; Same version, skip to add/reinstall components?
2003-10-08 17:44:33 +00:00
reinst_uninstall :
2013-07-10 16:34:53 +00:00
ReadRegStr $R1 HKLM " ${REG_UNINST_KEY} " " UninstallString "
2003-12-04 22:12:25 +00:00
2003-10-08 17:44:33 +00:00
;Run uninstaller
2012-10-13 01:47:50 +00:00
HideWindow
2003-12-04 22:12:25 +00:00
2003-10-08 17:44:33 +00:00
ClearErrors
2013-06-08 01:53:18 +00:00
ExecWait '$R1 _?=$INSTDIR' $0
2003-12-04 22:12:25 +00:00
2012-10-13 01:47:50 +00:00
BringToFront
2013-06-08 01:53:18 +00:00
${IfThen} ${Errors} ${|} StrCpy $0 2 ${|} ; ExecWait failed, set fake exit code
2003-12-04 22:12:25 +00:00
2013-06-08 01:53:18 +00:00
${If} $0 <> 0
${OrIf} ${FileExists} " $INSTDIR \Bin\makensis.exe "
${If} $0 = 1 ; User aborted uninstaller?
StrCmp $R0 " 2 " 0 + 2 ; Is the existing install the same version?
Quit ; ...yes, already installed, we are done
Abort
${EndIf}
2012-10-13 01:47:50 +00:00
MessageBox MB_ICONEXCLAMATION " Unable to uninstall! "
Abort
2013-06-08 01:53:18 +00:00
${Else}
StrCpy $0 $R1 1
${IfThen} $0 == '"' ${|} StrCpy $R1 $R1 - 1 1 ${|} ; Strip quotes from UninstallString
Delete $R1
RMDir $INSTDIR
${EndIf}
2003-12-04 22:12:25 +00:00
2003-10-08 17:44:33 +00:00
reinst_done :
2003-12-04 22:12:25 +00:00
2003-10-08 17:44:33 +00:00
FunctionEnd
2005-06-19 17:00:09 +00:00
!endif # VER_MAJOR & VER_MINOR & VER_REVISION & VER_BUILD
2003-01-04 16:25:28 +00:00
2006-07-30 10:11:40 +00:00
Function ShowReleaseNotes
2013-07-10 16:34:53 +00:00
StrCpy $0 $WINDIR \ hh.exe
${IfNotThen} ${FileExists} $0 ${|} SearchPath $0 hh.exe ${|}
${If} ${FileExists} $0
2006-07-30 10:11:40 +00:00
Exec '"$0" mk:@MSITStore:$INSTDIR\NSIS.chm::/SectionF.1.html'
${Else}
2020-07-31 20:07:43 +00:00
ExecShell " " " https://nsis.sourceforge.io/Docs/AppendixF.html#F.1 "
2006-07-30 10:11:40 +00:00
${EndIf}
FunctionEnd
2003-01-04 16:25:28 +00:00
;--------------------------------
;Uninstaller Section
2002-08-02 10:01:35 +00:00
Section Uninstall
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Uninstalling NSI Development Shell Extensions... "
SetDetailsPrint listonly
2010-02-07 21:24:09 +00:00
IfFileExists $INSTDIR \ Bin\ makensis.exe nsis_installed
2003-12-04 16:28:13 +00:00
MessageBox MB_YESNO " It does not appear that NSIS is installed in the directory '$INSTDIR'.$\r$\nContinue anyway (not recommended)? " IDYES nsis_installed
2002-08-02 10:01:35 +00:00
Abort " Uninstall aborted by user "
2003-12-04 16:28:13 +00:00
nsis_installed :
2002-09-11 02:14:39 +00:00
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Deleting Registry Keys... "
SetDetailsPrint listonly
2003-12-04 22:12:25 +00:00
2014-06-29 19:01:14 +00:00
!macro AssocDeleteFileExtAndProgId _hkey _dotext _pid
ReadRegStr $R0 ${_hkey} " Software\Classes\${_dotext} " " "
StrCmp $R0 " ${_pid} " 0 + 2
DeleteRegKey ${_hkey} " Software\Classes\${_dotext} "
2003-12-04 22:12:25 +00:00
2014-06-29 19:01:14 +00:00
DeleteRegKey ${_hkey} " Software\Classes\${_pid} "
!macroend
2003-07-12 14:44:38 +00:00
2014-06-29 19:01:14 +00:00
!insertmacro AssocDeleteFileExtAndProgId HKLM " .nsi " " NSIS.Script "
!insertmacro AssocDeleteFileExtAndProgId HKLM " .nsh " " NSIS.Header "
2003-12-04 22:12:25 +00:00
2020-05-21 00:44:39 +00:00
${NotifyShell_AssocChanged}
2004-10-11 10:32:23 +00:00
2013-07-10 16:34:53 +00:00
DeleteRegKey HKLM " ${REG_UNINST_KEY} "
2003-12-04 16:28:13 +00:00
DeleteRegKey HKLM " Software\NSIS "
2002-08-02 10:01:35 +00:00
2003-07-12 14:44:38 +00:00
SetDetailsPrint textonly
DetailPrint " Deleting Files... "
SetDetailsPrint listonly
2013-09-06 23:48:59 +00:00
Delete " $SMPROGRAMS \NSIS${NAMESUFFIX}.lnk "
Delete " $DESKTOP \NSIS${NAMESUFFIX}.lnk "
2002-12-06 20:24:44 +00:00
Delete $INSTDIR \ makensis.exe
Delete $INSTDIR \ makensisw.exe
2003-02-17 21:49:22 +00:00
Delete $INSTDIR \ NSIS.exe
2010-02-07 21:24:09 +00:00
Delete $INSTDIR \ NSIS.exe.manifest
2002-09-19 16:27:17 +00:00
Delete $INSTDIR \ license.txt
2006-10-28 23:58:07 +00:00
Delete $INSTDIR \ COPYING
2002-08-02 10:01:35 +00:00
Delete $INSTDIR \ uninst- nsis.exe
Delete $INSTDIR \ nsisconf.nsi
2002-10-01 23:03:34 +00:00
Delete $INSTDIR \ nsisconf.nsh
2003-11-10 18:48:48 +00:00
Delete $INSTDIR \ NSIS.chm
2002-08-02 10:01:35 +00:00
RMDir /r $INSTDIR \ Bin
2005-06-19 17:00:09 +00:00
RMDir /r $INSTDIR \ Contrib
RMDir /r $INSTDIR \ Docs
2002-08-02 10:01:35 +00:00
RMDir /r $INSTDIR \ Examples
2002-12-06 20:24:44 +00:00
RMDir /r $INSTDIR \ Include
2005-06-19 17:00:09 +00:00
RMDir /r $INSTDIR \ Menu
RMDir /r $INSTDIR \ Plugins
RMDir /r $INSTDIR \ Stubs
2002-08-02 10:01:35 +00:00
RMDir $INSTDIR
2003-07-12 14:44:38 +00:00
SetDetailsPrint both
2003-12-04 22:12:25 +00:00
SectionEnd