├── .github └── workflows │ ├── build-n-release.yml │ ├── build.yml │ ├── copy-svn.yml │ ├── release-body.md │ └── svn-authors ├── .gitignore ├── .gitmodules ├── COMPILE ├── COPYING ├── Contrib ├── AdvSplash │ ├── Example.nsi │ ├── SConscript │ ├── advsplash.c │ └── advsplash.txt ├── Banner │ ├── Banner.c │ ├── Example.nsi │ ├── Readme.txt │ └── SConscript ├── BgImage │ ├── BgImage.cpp │ ├── BgImage.txt │ ├── Example.nsi │ └── SConscript ├── Dialer │ ├── Dialer.txt │ ├── SConscript │ └── dialer.c ├── ExDLL │ ├── SConscript │ ├── exdll-vs2008.sln │ ├── exdll-vs2008.vcproj │ ├── exdll.c │ ├── exdll.dpr │ ├── exdll.dsp │ ├── exdll.dsw │ ├── exdll.h │ ├── exdll_with_unit.dpr │ ├── extdll.inc │ ├── nsis.pas │ ├── nsis_tchar.h │ ├── pluginapi.c │ └── pluginapi.h ├── Graphics │ ├── Checks │ │ ├── big.bmp │ │ ├── classic-cross.bmp │ │ ├── classic.bmp │ │ ├── colorful.bmp │ │ ├── grey-cross.bmp │ │ ├── grey.bmp │ │ ├── modern.bmp │ │ ├── red-round.bmp │ │ ├── red.bmp │ │ ├── simple-round.bmp │ │ ├── simple-round2.bmp │ │ └── simple.bmp │ ├── Header │ │ ├── nsis-r.bmp │ │ ├── nsis.bmp │ │ ├── nsis3-branding-r.bmp │ │ ├── nsis3-branding.bmp │ │ ├── nsis3-grey-right.bmp │ │ ├── nsis3-grey.bmp │ │ ├── nsis3-metro-right.bmp │ │ ├── nsis3-metro.bmp │ │ ├── nsis3-vintage-right.bmp │ │ ├── nsis3-vintage.bmp │ │ ├── orange-nsis.bmp │ │ ├── orange-r-nsis.bmp │ │ ├── orange-r.bmp │ │ ├── orange-uninstall-nsis.bmp │ │ ├── orange-uninstall-r-nsis.bmp │ │ ├── orange-uninstall-r.bmp │ │ ├── orange-uninstall.bmp │ │ ├── orange.bmp │ │ └── win.bmp │ ├── Icons │ │ ├── arrow-install.ico │ │ ├── arrow-uninstall.ico │ │ ├── arrow2-install.ico │ │ ├── arrow2-uninstall.ico │ │ ├── box-install.ico │ │ ├── box-uninstall.ico │ │ ├── classic-install.ico │ │ ├── classic-uninstall.ico │ │ ├── llama-blue.ico │ │ ├── llama-grey.ico │ │ ├── modern-install-blue-full.ico │ │ ├── modern-install-blue.ico │ │ ├── modern-install-colorful.ico │ │ ├── modern-install-full.ico │ │ ├── modern-install.ico │ │ ├── modern-uninstall-blue-full.ico │ │ ├── modern-uninstall-blue.ico │ │ ├── modern-uninstall-colorful.ico │ │ ├── modern-uninstall-full.ico │ │ ├── modern-uninstall.ico │ │ ├── nsis-menu.ico │ │ ├── nsis1-install.ico │ │ ├── nsis1-uninstall.ico │ │ ├── nsis3-install-alt.ico │ │ ├── nsis3-install.ico │ │ ├── nsis3-uninstall.ico │ │ ├── orange-install-nsis.ico │ │ ├── orange-install.ico │ │ ├── orange-uninstall-nsis.ico │ │ ├── orange-uninstall.ico │ │ ├── pixel-install.ico │ │ ├── pixel-uninstall.ico │ │ ├── win-install.ico │ │ └── win-uninstall.ico │ ├── SConscript │ └── Wizard │ │ ├── arrow.bmp │ │ ├── llama.bmp │ │ ├── modern-xl-install.bmp │ │ ├── modern-xl-uninstall.bmp │ │ ├── modern-xxl-install.bmp │ │ ├── modern-xxl-uninstall.bmp │ │ ├── nsis.bmp │ │ ├── nsis3-branding.bmp │ │ ├── nsis3-grey.bmp │ │ ├── nsis3-metro.bmp │ │ ├── nsis3-vintage.bmp │ │ ├── nullsoft.bmp │ │ ├── orange-nsis.bmp │ │ ├── orange-uninstall-nsis.bmp │ │ ├── orange-uninstall.bmp │ │ ├── orange.bmp │ │ └── win.bmp ├── InstallOptions │ ├── Changelog.txt │ ├── InstallOptions.nsh │ ├── InstallerOptions.cpp │ ├── Readme.html │ ├── SConscript │ ├── ioptdll.rc │ ├── resource.h │ ├── test.ini │ ├── test.nsi │ ├── testimgs.ini │ ├── testimgs.nsi │ ├── testlink.ini │ ├── testlink.nsi │ ├── testnotify.ini │ └── testnotify.nsi ├── LangDLL │ ├── LangDLL.c │ ├── SConscript │ ├── resource.h │ └── resource.rc ├── Language files │ ├── Afrikaans.nlf │ ├── Afrikaans.nsh │ ├── Albanian.nlf │ ├── Albanian.nsh │ ├── Arabic.nlf │ ├── Arabic.nsh │ ├── Armenian.nlf │ ├── Armenian.nsh │ ├── Asturian.nlf │ ├── Asturian.nsh │ ├── Basque.nlf │ ├── Basque.nsh │ ├── Belarusian.nlf │ ├── Belarusian.nsh │ ├── Bosnian.nlf │ ├── Bosnian.nsh │ ├── Breton.nlf │ ├── Breton.nsh │ ├── Bulgarian.nlf │ ├── Bulgarian.nsh │ ├── Catalan.nlf │ ├── Catalan.nsh │ ├── Cibemba.nlf │ ├── Cibemba.nsh │ ├── Corsican.nlf │ ├── Corsican.nsh │ ├── Croatian.nlf │ ├── Croatian.nsh │ ├── Czech.nlf │ ├── Czech.nsh │ ├── Danish.nlf │ ├── Danish.nsh │ ├── Dutch.nlf │ ├── Dutch.nsh │ ├── Efik.nlf │ ├── Efik.nsh │ ├── English.nlf │ ├── English.nsh │ ├── Esperanto.nlf │ ├── Esperanto.nsh │ ├── Estonian.nlf │ ├── Estonian.nsh │ ├── Farsi.nlf │ ├── Farsi.nsh │ ├── Finnish.nlf │ ├── Finnish.nsh │ ├── French.nlf │ ├── French.nsh │ ├── Galician.nlf │ ├── Galician.nsh │ ├── Georgian.nlf │ ├── Georgian.nsh │ ├── German.nlf │ ├── German.nsh │ ├── Greek.nlf │ ├── Greek.nsh │ ├── Hebrew.nlf │ ├── Hebrew.nsh │ ├── Hindi.nlf │ ├── Hindi.nsh │ ├── Hungarian.nlf │ ├── Hungarian.nsh │ ├── Icelandic.nlf │ ├── Icelandic.nsh │ ├── Igbo.nlf │ ├── Igbo.nsh │ ├── Indonesian.nlf │ ├── Indonesian.nsh │ ├── Irish.nlf │ ├── Irish.nsh │ ├── Italian.nlf │ ├── Italian.nsh │ ├── Japanese.nlf │ ├── Japanese.nsh │ ├── Khmer.nlf │ ├── Khmer.nsh │ ├── Korean.nlf │ ├── Korean.nsh │ ├── Kurdish.nlf │ ├── Kurdish.nsh │ ├── Latvian.nlf │ ├── Latvian.nsh │ ├── Lithuanian.nlf │ ├── Lithuanian.nsh │ ├── Luxembourgish.nlf │ ├── Luxembourgish.nsh │ ├── Macedonian.nlf │ ├── Macedonian.nsh │ ├── Malagasy.nlf │ ├── Malagasy.nsh │ ├── Malay.nlf │ ├── Malay.nsh │ ├── Mongolian.nlf │ ├── Mongolian.nsh │ ├── Norwegian.nlf │ ├── Norwegian.nsh │ ├── NorwegianNynorsk.nlf │ ├── NorwegianNynorsk.nsh │ ├── Pashto.nlf │ ├── Pashto.nsh │ ├── Polish.nlf │ ├── Polish.nsh │ ├── Portuguese.nlf │ ├── Portuguese.nsh │ ├── PortugueseBR.nlf │ ├── PortugueseBR.nsh │ ├── Romanian.nlf │ ├── Romanian.nsh │ ├── Russian.nlf │ ├── Russian.nsh │ ├── SConscript │ ├── ScotsGaelic.nlf │ ├── ScotsGaelic.nsh │ ├── Serbian.nlf │ ├── Serbian.nsh │ ├── SerbianLatin.nlf │ ├── SerbianLatin.nsh │ ├── SimpChinese.nlf │ ├── SimpChinese.nsh │ ├── Slovak.nlf │ ├── Slovak.nsh │ ├── Slovenian.nlf │ ├── Slovenian.nsh │ ├── Spanish.nlf │ ├── Spanish.nsh │ ├── SpanishInternational.nlf │ ├── SpanishInternational.nsh │ ├── Swahili.nlf │ ├── Swahili.nsh │ ├── Swedish.nlf │ ├── Swedish.nsh │ ├── Tatar.nlf │ ├── Tatar.nsh │ ├── Thai.nlf │ ├── Thai.nsh │ ├── TradChinese.nlf │ ├── TradChinese.nsh │ ├── Turkish.nlf │ ├── Turkish.nsh │ ├── Ukrainian.nlf │ ├── Ukrainian.nsh │ ├── Uzbek.nlf │ ├── Uzbek.nsh │ ├── Valencian.nlf │ ├── Valencian.nsh │ ├── Vietnamese.nlf │ ├── Vietnamese.nsh │ ├── Welsh.nlf │ ├── Welsh.nsh │ ├── Yoruba.nlf │ └── Yoruba.nsh ├── Library │ ├── RegTool │ │ ├── RegTool.cpp │ │ └── SConscript │ └── TypeLib │ │ ├── SConscript │ │ └── TypeLib.cpp ├── MakeLangId │ ├── MakeLangId.cpp │ ├── MakeLangId.ico │ ├── MakeLangId.xml │ ├── SConscript │ ├── resource.h │ └── resource.rc ├── Makensisw │ ├── License.txt │ ├── Readme.txt │ ├── SConscript │ ├── afxres.h │ ├── assoc_nsh.ico │ ├── assoc_nsi.ico │ ├── icon.ico │ ├── lookup.cpp │ ├── makensisw.cpp │ ├── makensisw.h │ ├── makensisw.xml │ ├── resource.h │ ├── resource.rc │ ├── toolbar.bmp │ ├── toolbar.cpp │ ├── toolbar.h │ ├── toolbar16d24.bmp │ ├── toolbar16h24.bmp │ ├── toolbar16n24.bmp │ ├── toolbar24d24.bmp │ ├── toolbar24h24.bmp │ ├── toolbar24n24.bmp │ ├── toolbar32d24.bmp │ ├── toolbar32h24.bmp │ ├── toolbar32n24.bmp │ ├── update.cpp │ ├── update.h │ ├── utils.cpp │ ├── utils.h │ ├── version.cpp │ └── wndspy.cpp ├── Math │ ├── Math.txt │ ├── SConscript │ ├── Source │ │ ├── Math.c │ │ ├── Math.h │ │ ├── MyMath.c │ │ ├── MyMath.h │ │ └── plugin.c │ ├── math.nsi │ ├── mathtest.ini │ ├── mathtest.nsi │ └── mathtest.txt ├── Modern UI 2 │ ├── Deprecated.nsh │ ├── Interface.nsh │ ├── License.txt │ ├── Localization.nsh │ ├── MUI2.nsh │ ├── Pages.nsh │ ├── Pages │ │ ├── Components.nsh │ │ ├── Directory.nsh │ │ ├── Finish.nsh │ │ ├── InstallFiles.nsh │ │ ├── License.nsh │ │ ├── StartMenu.nsh │ │ ├── UninstallConfirm.nsh │ │ └── Welcome.nsh │ ├── Readme.html │ └── SConscript ├── Modern UI │ ├── Changelog.txt │ ├── License.txt │ ├── Readme.html │ ├── SConscript │ ├── System.nsh │ ├── images │ │ ├── closed.gif │ │ ├── header.gif │ │ ├── open.gif │ │ ├── screen1.png │ │ └── screen2.png │ └── ioSpecial.ini ├── MultiUser │ ├── MultiUser.nsh │ ├── Readme.html │ └── SConscript ├── NSIS Menu │ ├── SConscript │ ├── nsismenu │ │ ├── nsisicon.ico │ │ ├── nsismenu.cpp │ │ ├── nsismenu.rc │ │ ├── nslinks.cpp │ │ └── resource.h │ └── wx │ │ ├── build.txt │ │ ├── setup.h │ │ └── wxbuild.bat ├── NSISdl │ ├── License.txt │ ├── ReadMe.txt │ ├── SConscript │ ├── asyncdns.cpp │ ├── asyncdns.h │ ├── connection.cpp │ ├── connection.h │ ├── httpget.cpp │ ├── httpget.h │ ├── netinc.h │ ├── nsisdl.cpp │ ├── util.cpp │ └── util.h ├── NScurl │ └── SConscript ├── Splash │ ├── Example.nsi │ ├── SConscript │ ├── splash.c │ └── splash.txt ├── StartMenu │ ├── Example.nsi │ ├── Readme.txt │ ├── SConscript │ ├── StartMenu.c │ ├── StartMenu.rc │ └── resource.h ├── SubStart │ ├── SConscript │ └── substart.c ├── System │ ├── Resource │ │ ├── Icon.ico │ │ ├── Main.c │ │ ├── Resource.h │ │ └── Resource.rc │ ├── SConscript │ ├── Source │ │ ├── Buffers.c │ │ ├── Buffers.h │ │ ├── Call-amd64.S │ │ ├── Call-amd64CPP.S │ │ ├── Call-amd64CPP.sx │ │ ├── Call.S │ │ ├── CallCPP.S │ │ ├── CallCPP.sx │ │ ├── Plugin.c │ │ ├── Plugin.h │ │ ├── System.c │ │ ├── System.h │ │ ├── stdafx.c │ │ └── stdafx.h │ ├── SysFunc.nsh │ ├── System.html │ ├── System.nsh │ ├── System.nsi │ └── WhatsNew.txt ├── UIs │ ├── SConscript │ ├── default.rc │ ├── modern.rc │ ├── modern_headerbmp.rc │ ├── modern_headerbmpr.rc │ ├── modern_nodesc.rc │ ├── modern_smalldesc.rc │ ├── resource.h │ ├── sdbarker_tiny.rc │ ├── ui.c │ ├── ui.rc │ ├── xl.rc │ ├── xl_headerbmp.rc │ ├── xl_headerbmpr.rc │ ├── xl_nodesc.rc │ ├── xl_smalldesc.rc │ ├── xxl.rc │ ├── xxl_headerbmp.rc │ ├── xxl_headerbmpr.rc │ ├── xxl_nodesc.rc │ └── xxl_smalldesc.rc ├── UserInfo │ ├── SConscript │ ├── UserInfo.c │ └── UserInfo.nsi ├── VPatch │ ├── Readme.html │ ├── SConscript │ ├── Source │ │ ├── GenPat │ │ │ ├── Checksums.cpp │ │ │ ├── Checksums.h │ │ │ ├── ChunkedFile.cpp │ │ │ ├── ChunkedFile.h │ │ │ ├── FileFormat1.cpp │ │ │ ├── FileFormat1.h │ │ │ ├── GlobalTypes.cpp │ │ │ ├── GlobalTypes.h │ │ │ ├── POSIXUtil.cpp │ │ │ ├── POSIXUtil.h │ │ │ ├── PatchGenerator.cpp │ │ │ ├── PatchGenerator.h │ │ │ ├── SConscript │ │ │ ├── adler32.cpp │ │ │ ├── adler32.h │ │ │ ├── main.cpp │ │ │ ├── md5.c │ │ │ ├── md5.h │ │ │ └── tchar.h │ │ └── Plugin │ │ │ ├── SConscript │ │ │ ├── apply_patch.c │ │ │ ├── apply_patch.h │ │ │ ├── checksum.c │ │ │ ├── checksum.h │ │ │ ├── md5.c │ │ │ ├── md5.h │ │ │ └── vpatchdll.c │ ├── VPatchLib.nsh │ ├── example.nsi │ ├── newfile.txt │ ├── oldfile.txt │ └── patch.pat ├── nsDialogs │ ├── InstallOptions.nsi │ ├── Readme.html │ ├── SConscript │ ├── browse.c │ ├── defs.h │ ├── dialog.rc │ ├── example.nsi │ ├── input.c │ ├── input.h │ ├── nsDialogs.c │ ├── nsDialogs.def │ ├── nsDialogs.nsh │ ├── rtl.c │ ├── rtl.h │ ├── timer.nsi │ └── welcome.nsi ├── nsExec │ ├── SConscript │ ├── nsExec.txt │ ├── nsexec.c │ └── test.nsi └── zip2exe │ ├── Base.nsh │ ├── Classic.nsh │ ├── Modern.nsh │ ├── SConscript │ ├── icon.ico │ ├── main.cpp │ ├── res.rc │ ├── resource.h │ ├── zip2exe.xml │ └── zlib │ ├── crypt.h │ ├── ioapi.c │ ├── ioapi.h │ ├── unzip.c │ └── unzip.h ├── Docs ├── src │ ├── SConscript │ ├── attributes.but │ ├── basic.but │ ├── bin │ │ └── halibut │ │ │ ├── LICENSE │ │ │ ├── SConscript │ │ │ ├── biblio.c │ │ │ ├── bk_xhtml.c │ │ │ ├── contents.c │ │ │ ├── error.c │ │ │ ├── halibut.h │ │ │ ├── help.c │ │ │ ├── index.c │ │ │ ├── input.c │ │ │ ├── keywords.c │ │ │ ├── licence.c │ │ │ ├── main.c │ │ │ ├── malloc.c │ │ │ ├── misc.c │ │ │ ├── style.c │ │ │ ├── tree234.c │ │ │ ├── tree234.h │ │ │ ├── ustring.c │ │ │ └── version.c │ ├── build.but │ ├── callback.but │ ├── chmlink.js │ ├── compiler.but │ ├── compilerflags.but │ ├── config.but │ ├── config_chm.but │ ├── config_html.but │ ├── config_htmlsingle.but │ ├── config_web.but │ ├── credits.but │ ├── defines.but │ ├── file.but │ ├── flowcontrol.but │ ├── functions.but │ ├── generalpurpose.but │ ├── headers.but │ ├── history.but │ ├── int.but │ ├── intro.but │ ├── jumps.but │ ├── labels.but │ ├── langs.but │ ├── library.but │ ├── license.but │ ├── log.but │ ├── misc.but │ ├── modernui.but │ ├── nsis.hhp │ ├── pages.but │ ├── plugin.but │ ├── reboot.but │ ├── registry.but │ ├── script.but │ ├── sec.but │ ├── sections.but │ ├── silent.but │ ├── stack.but │ ├── string.but │ ├── tutorial.but │ ├── ui.but │ ├── uninstall.but │ ├── usage.but │ ├── usection.but │ ├── usefulfunc.but │ ├── usefulinfos.but │ └── var.but ├── style.css └── unreleased.png ├── Examples ├── AppGen.nsi ├── FileFunc.ini ├── FileFunc.nsi ├── FileFuncTest.nsi ├── Library.nsi ├── LogicLib.nsi ├── Memento.nsi ├── Modern UI │ ├── Basic.nsi │ ├── HeaderBitmap.nsi │ ├── MultiLanguage.nsi │ ├── StartMenu.nsi │ └── WelcomeFinish.nsi ├── ModernXL.nsi ├── MultiUser.nsi ├── NSISMenu.nsi ├── SConscript ├── StrFunc.nsi ├── TextFunc.ini ├── TextFunc.nsi ├── TextFuncTest.nsi ├── VersionInfo.nsi ├── WordFunc.ini ├── WordFunc.nsi ├── WordFuncTest.nsi ├── bigtest.nsi ├── example1.nsi ├── example2.nsi ├── gfx.nsi ├── install-per-user.nsi ├── install-shared.nsi ├── languages.nsi ├── makensis-fork.nsi ├── makensis.nsi ├── one-section.nsi ├── primes.nsi ├── rtest.nsi ├── silent.nsi ├── unicode.nsi └── waplugin.nsi ├── INSTALL ├── Include ├── Colors.nsh ├── FileFunc.nsh ├── Integration.nsh ├── LangFile.nsh ├── Library.nsh ├── LogicLib.nsh ├── MUI.nsh ├── MUI2.nsh ├── Memento.nsh ├── ModernXL.nsh ├── ModernXXL.nsh ├── SConscript ├── Sections.nsh ├── StrFunc.nsh ├── StrFunc.txt ├── TextFunc.nsh ├── UpgradeDLL.nsh ├── Util.nsh ├── VB6RunTime.nsh ├── Win │ ├── COM.nsh │ ├── Propkey.nsh │ ├── RestartManager.nsh │ ├── WinDef.nsh │ ├── WinError.nsh │ ├── WinNT.nsh │ └── WinUser.nsh ├── WinCore.nsh ├── WinMessages.nsh ├── WinVer.nsh ├── WordFunc.nsh └── x64.nsh ├── Menu ├── images │ ├── header-notext.gif │ ├── header.gif │ ├── line.gif │ └── site.gif ├── index.html └── notinstalled.html ├── README.md ├── SCons ├── Config │ ├── default │ ├── gnu │ ├── hpc++ │ ├── linker_script │ ├── memcpy.c │ ├── memset.c │ └── ms ├── Tools │ ├── crossmingw.py │ └── mstoolkit.py ├── config.py └── utils.py ├── SConstruct ├── Scripts ├── RegRestore.nsi └── release.py ├── Source ├── 7zip │ ├── 7zGuids.cpp │ ├── 7zip │ │ ├── Common │ │ │ ├── InBuffer.cpp │ │ │ ├── InBuffer.h │ │ │ ├── OutBuffer.cpp │ │ │ ├── OutBuffer.h │ │ │ ├── StdAfx.h │ │ │ ├── StreamUtils.cpp │ │ │ └── StreamUtils.h │ │ ├── Compress │ │ │ ├── LZ │ │ │ │ ├── BinTree │ │ │ │ │ ├── BinTree.h │ │ │ │ │ ├── BinTree2.h │ │ │ │ │ ├── BinTree3.h │ │ │ │ │ ├── BinTree3Z.h │ │ │ │ │ ├── BinTree3ZMain.h │ │ │ │ │ ├── BinTree4.h │ │ │ │ │ ├── BinTree4b.h │ │ │ │ │ ├── BinTreeMF.h │ │ │ │ │ ├── BinTreeMFMain.h │ │ │ │ │ └── BinTreeMain.h │ │ │ │ ├── IMatchFinder.h │ │ │ │ ├── LZInWindow.cpp │ │ │ │ ├── LZInWindow.h │ │ │ │ ├── LZOutWindow.cpp │ │ │ │ ├── LZOutWindow.h │ │ │ │ └── StdAfx.h │ │ │ ├── LZMA │ │ │ │ ├── LZMA.h │ │ │ │ ├── LZMAEncoder.cpp │ │ │ │ ├── LZMAEncoder.h │ │ │ │ └── StdAfx.h │ │ │ └── RangeCoder │ │ │ │ ├── RangeCoder.h │ │ │ │ ├── RangeCoderBit.cpp │ │ │ │ ├── RangeCoderBit.h │ │ │ │ ├── RangeCoderBitTree.h │ │ │ │ ├── RangeCoderOpt.h │ │ │ │ └── StdAfx.h │ │ ├── ICoder.h │ │ └── IStream.h │ ├── Common │ │ ├── Alloc.cpp │ │ ├── Alloc.h │ │ ├── CRC.cpp │ │ ├── CRC.h │ │ ├── Defs.h │ │ ├── MyCom.h │ │ ├── MyGuidDef.h │ │ ├── MyUnknown.h │ │ ├── MyWindows.h │ │ ├── StdAfx.h │ │ └── Types.h │ ├── LZMADecode.c │ ├── LZMADecode.h │ └── sdk.diff ├── BinInterop.cpp ├── BinInterop.h ├── DialogTemplate.cpp ├── DialogTemplate.h ├── Platform.h ├── Plugins.cpp ├── Plugins.h ├── ResourceEditor.cpp ├── ResourceEditor.h ├── ResourceVersionInfo.cpp ├── ResourceVersionInfo.h ├── SConscript ├── ShConstants.cpp ├── ShConstants.h ├── Tests │ ├── DialogTemplate.cpp │ ├── Platform.cpp │ ├── ResourceEditor.cpp │ ├── SConscript │ ├── compression.cpp │ ├── decompress.cpp │ ├── decompress.h │ ├── endian.cpp │ ├── icon1.nsi │ ├── icon2.nsi │ ├── icons.py │ ├── memcpy.c │ ├── mmap.cpp │ ├── preprocessor.nsi │ ├── root.txt │ ├── specmatch.cpp │ ├── textrunner.cpp │ ├── winchar.cpp │ └── winver.nsi ├── afxres.h ├── boost │ ├── checked_delete.hpp │ ├── detail │ │ └── workaround.hpp │ ├── scoped_array.hpp │ └── scoped_ptr.hpp ├── build.cpp ├── build.h ├── bzip2 │ ├── blocksort.c │ ├── bzlib.c │ ├── bzlib.h │ ├── compress.c │ ├── decompress.c │ └── huffman.c ├── cbzip2.h ├── clzma.cpp ├── clzma.h ├── compressor.h ├── crc32.c ├── crc32.h ├── czlib.h ├── dirreader.cpp ├── dirreader.h ├── exehead │ ├── Main.c │ ├── SConscript │ ├── Ui.c │ ├── afxres.h │ ├── api.h │ ├── bgbg.c │ ├── bitmap1.bmp │ ├── components.c │ ├── components.h │ ├── config.h │ ├── exec.c │ ├── exec.h │ ├── fileform.c │ ├── fileform.h │ ├── lang.h │ ├── nsis.ico │ ├── plugin.c │ ├── plugin.h │ ├── resource.h │ ├── resource.rc │ ├── state.h │ ├── ui.h │ ├── uninst.ico │ ├── util.c │ └── util.h ├── fileform.cpp ├── fileform.h ├── growbuf.cpp ├── growbuf.h ├── icon.cpp ├── icon.h ├── lang.cpp ├── lang.h ├── lineparse.cpp ├── lineparse.h ├── makenssi.cpp ├── manifest.cpp ├── manifest.h ├── mmap.cpp ├── mmap.h ├── script.cpp ├── scriptpp.cpp ├── strlist.cpp ├── strlist.h ├── tchar.h ├── tokens.cpp ├── tokens.h ├── tstring.cpp ├── tstring.h ├── uservars.h ├── utf.cpp ├── utf.h ├── util.cpp ├── util.h ├── validateunicode.cpp ├── validateunicode.h ├── winchar.cpp ├── winchar.h ├── writer.cpp ├── writer.h └── zlib │ ├── INFBLOCK.C │ ├── ZCONF.H │ ├── ZLIB.H │ └── ZUTIL.H ├── TODO.txt ├── nsis_build.py ├── nsis_build_local.py ├── nsis_cleanup.bat ├── nsis_package.py ├── nsis_version.py └── nsisconf.nsh /.github/workflows/release-body.md: -------------------------------------------------------------------------------- 1 | ## Changelog 2 | 3 | * TODO 4 | 5 | ## Release Notes 6 | 7 | * GitHub workflow run: {url-workflow} 8 | * Both **x86** and **amd64** compilers can generate both **x86** and **amd64** installers. 9 | Use **`Target x86-ansi|x86-unicode|amd64-unicode`** in your script. 10 | * Extra built-in plugins: [NScurl](https://github.com/negrutiu/nsis-nscurl), [NSxfer](https://github.com/negrutiu/nsis-nsxfer), [NSutils](https://github.com/negrutiu/nsis-nsutils), [TaskbarProgress](https://github.com/negrutiu/nsis-taskbarprogress), [ExecDos](https://github.com/negrutiu/nsis-execdos), [ShellLink](https://github.com/negrutiu/nsis-shelllink) 11 | -------------------------------------------------------------------------------- /.github/workflows/svn-authors: -------------------------------------------------------------------------------- 1 | (no author) = No Author 2 | anoncvs_ezcontents = No Author 3 | anders_k = Anders 4 | eccles = Dave Laundon 5 | joostverburg = Joost Verburg 6 | justin1014 = Justin Frankel 7 | kichik = Amir Szekely 8 | sunjammerx = Ximon Eighteen 9 | afrow_uk = Stuart 10 | ballison = Ben Allison 11 | f0rt = f0rt 12 | flizebogen = Flizebogen 13 | gavenkoa = Oleksandr Gavenko 14 | golubdr = David Golub 15 | icemank = Sunil Kamath 16 | jimpark = Jim Park 17 | oripel = Ori Peleg 18 | pabs3 = Paul Wise 19 | ramon18 = Ramon 20 | whyeye = Jan T. Sott 21 | wizou = Wizou 22 | rainwater = Robert Rainwater 23 | uid27073 = Robert Rainwater 24 | zarg = zarg 25 | o_owd = o_owd 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *nogit* 2 | 3 | /Contrib/NScurl/github/ 4 | 5 | /.depend/ 6 | 7 | /artifacts/ 8 | /build/ 9 | /build-local*/ 10 | /.instdist*/ 11 | /.test/ 12 | /nsis-*/ 13 | /nsis-*.zip 14 | /nsis-*.exe 15 | 16 | /__pycache__ 17 | /.sconsign.dblite 18 | /.sconf_temp/ 19 | /config.log -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Contrib/w7tbp"] 2 | path = Contrib/w7tbp 3 | url = https://github.com/negrutiu/nsis-taskbarprogress.git 4 | branch = master 5 | [submodule "Contrib/ShellLink"] 6 | path = Contrib/ShellLink 7 | url = https://github.com/negrutiu/nsis-shelllink 8 | branch = master 9 | [submodule "Contrib/ExecDos"] 10 | path = Contrib/ExecDos 11 | url = https://github.com/negrutiu/nsis-execdos 12 | branch = master 13 | [submodule "Contrib/NSutils"] 14 | path = Contrib/NSutils 15 | url = https://github.com/negrutiu/nsis-nsutils.git 16 | branch = master 17 | [submodule "Contrib/NSxfer"] 18 | path = Contrib/NSxfer 19 | url = https://github.com/negrutiu/nsis-nsxfer.git 20 | branch = master 21 | -------------------------------------------------------------------------------- /Contrib/AdvSplash/Example.nsi: -------------------------------------------------------------------------------- 1 | Name "AdvSplash.dll test" 2 | 3 | OutFile "AdvSplash Test.exe" 4 | 5 | XPStyle on 6 | 7 | Function .onInit 8 | # the plugins dir is automatically deleted when the installer exits 9 | InitPluginsDir 10 | File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp" 11 | #optional 12 | #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav" 13 | 14 | MessageBox MB_OK "Fading" 15 | 16 | advsplash::show 1000 600 400 -1 $PLUGINSDIR\splash 17 | 18 | Pop $0 ; $0 has '1' if the user closed the splash screen early, 19 | ; '0' if everything closed normally, and '-1' if some error occurred. 20 | 21 | MessageBox MB_OK "Transparency" 22 | File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\orange-uninstall.bmp" 23 | advsplash::show 2000 0 0 0x1856B1 $PLUGINSDIR\splash 24 | Pop $0 25 | 26 | MessageBox MB_OK "Transparency/Fading" 27 | File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\llama.bmp" 28 | advsplash::show 1000 600 400 0x04025C $PLUGINSDIR\splash 29 | Pop $0 30 | 31 | Delete $PLUGINSDIR\splash.bmp 32 | FunctionEnd 33 | 34 | Section 35 | SectionEnd -------------------------------------------------------------------------------- /Contrib/AdvSplash/SConscript: -------------------------------------------------------------------------------- 1 | target = 'AdvSplash' 2 | 3 | files = Split(""" 4 | advsplash.c 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | gdi32 11 | winmm 12 | """) 13 | 14 | examples = Split(""" 15 | Example.nsi 16 | """) 17 | 18 | docs = Split(""" 19 | advsplash.txt 20 | """) 21 | 22 | Import('BuildPlugin') 23 | 24 | BuildPlugin(target, files, libs, examples, docs) 25 | -------------------------------------------------------------------------------- /Contrib/Banner/Example.nsi: -------------------------------------------------------------------------------- 1 | # Look at Readme.txt for usage alongside with the Modern UI 2 | 3 | !include "WinMessages.nsh" 4 | 5 | Name "Banner.dll test" 6 | 7 | OutFile "Banner Test.exe" 8 | 9 | ShowInstDetails show 10 | 11 | Function .onInit 12 | Banner::show "Calculating important stuff..." 13 | 14 | Banner::getWindow 15 | Pop $1 16 | 17 | again: 18 | IntOp $0 $0 + 1 19 | Sleep 1 20 | StrCmp $0 100 0 again 21 | 22 | GetDlgItem $2 $1 1030 23 | SendMessage $2 ${WM_SETTEXT} 0 "STR:Calculating more important stuff..." 24 | 25 | again2: 26 | IntOp $0 $0 + 1 27 | Sleep 1 28 | StrCmp $0 200 0 again2 29 | 30 | Banner::destroy 31 | FunctionEnd 32 | 33 | Section 34 | DetailPrint "Using previous calculations to quickly calculate 1*2000..." 35 | Sleep 1000 36 | DetailPrint "Eureka! It's $0!!!" 37 | DetailPrint "" 38 | SectionEnd -------------------------------------------------------------------------------- /Contrib/Banner/Readme.txt: -------------------------------------------------------------------------------- 1 | BANNER PLUG-IN 2 | -------------- 3 | 4 | The Banner plug-in shows a banner with customizable text. It uses the IDD_VERIFY dialog of the UI. 5 | 6 | There are three functions - show, getWindow and destroy. 7 | 8 | Usage 9 | ----- 10 | 11 | Banner::show "Text to show" 12 | 13 | [optional] Banner::getWindow 14 | 15 | Banner::destroy 16 | 17 | See Example.nsi for an example. 18 | 19 | Modern UI 20 | --------- 21 | 22 | The Modern UI has two labels on the IDD_VERIFY dialog. To change all the texts, use: 23 | 24 | Banner::show /set 76 "Text 1 (replaces Please wait while Setup is loading...)" "Normal text" 25 | 26 | Custom UI 27 | --------- 28 | 29 | If you have more labels on your IDD_VERIFY dialog, you can use multiple /set parameters to change the texts. 30 | 31 | Example: 32 | 33 | Banner::show /set 76 "bah #1" /set 54 "bah #2" "Normal text" 34 | 35 | The second parameter for /set is the ID of the control. 36 | 37 | Some More Tricks 38 | ---------------- 39 | 40 | If you use /set to set the main string (IDC_STR, 1030) you can specify a different string for the window's caption and for the main string. 41 | 42 | If you use an empty string as the main string (Banner::show "") the banner window will not show on the taskbar. 43 | 44 | Credits 45 | ------- 46 | 47 | A joint effort of brainsucker and kichik in honor of the messages dropped during the battle -------------------------------------------------------------------------------- /Contrib/Banner/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Banner' 2 | 3 | files = Split(""" 4 | Banner.c 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | """) 11 | 12 | examples = Split(""" 13 | Example.nsi 14 | """) 15 | 16 | docs = Split(""" 17 | Readme.txt 18 | """) 19 | 20 | Import('BuildPlugin') 21 | 22 | BuildPlugin(target, files, libs, examples, docs) 23 | -------------------------------------------------------------------------------- /Contrib/BgImage/SConscript: -------------------------------------------------------------------------------- 1 | target = 'BgImage' 2 | 3 | files = Split(""" 4 | BgImage.cpp 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | gdi32 11 | winmm 12 | """) 13 | 14 | examples = Split(""" 15 | Example.nsi 16 | """) 17 | 18 | docs = Split(""" 19 | BgImage.txt 20 | """) 21 | 22 | Import('BuildPlugin') 23 | 24 | BuildPlugin(target, files, libs, examples, docs, cppused = True) 25 | -------------------------------------------------------------------------------- /Contrib/Dialer/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Dialer' 2 | 3 | files = Split(""" 4 | dialer.c 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | wininet 11 | """) 12 | 13 | docs = Split(""" 14 | Dialer.txt 15 | """) 16 | 17 | Import('BuildPlugin') 18 | 19 | BuildPlugin(target, files, libs, docs = docs) 20 | -------------------------------------------------------------------------------- /Contrib/ExDLL/exdll-vs2008.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 10.00 3 | # Visual Studio 2008 4 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "exdll", "exdll-vs2008.vcproj", "{5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}" 5 | EndProject 6 | Global 7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 8 | Debug|Win32 = Debug|Win32 9 | Release|Win32 = Release|Win32 10 | EndGlobalSection 11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 12 | {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.ActiveCfg = Debug|Win32 13 | {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Debug|Win32.Build.0 = Debug|Win32 14 | {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.ActiveCfg = Release|Win32 15 | {5E3E2AFD-1D6B-4997-A9B5-8ECBC8F6C31A}.Release|Win32.Build.0 = Release|Win32 16 | EndGlobalSection 17 | GlobalSection(SolutionProperties) = preSolution 18 | HideSolutionNode = FALSE 19 | EndGlobalSection 20 | EndGlobal 21 | -------------------------------------------------------------------------------- /Contrib/ExDLL/exdll.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include // nsis plugin 3 | 4 | HINSTANCE g_hInstance; 5 | HWND g_hwndParent; 6 | 7 | // To work with Unicode version of NSIS, please use TCHAR-type 8 | // functions for accessing the variables and the stack. 9 | 10 | void __declspec(dllexport) myFunction(HWND hwndParent, int string_size, 11 | LPTSTR variables, stack_t **stacktop, 12 | extra_parameters *extra, ...) 13 | { 14 | EXDLL_INIT(); 15 | g_hwndParent = hwndParent; 16 | 17 | 18 | // note if you want parameters from the stack, pop them off in order. 19 | // i.e. if you are called via exdll::myFunction file.dat read.txt 20 | // calling popstring() the first time would give you file.dat, 21 | // and the second time would give you read.txt. 22 | // you should empty the stack of your parameters, and ONLY your 23 | // parameters. 24 | 25 | // do your stuff here 26 | { 27 | LPTSTR msgbuf = (LPTSTR) GlobalAlloc(GPTR, (3 + string_size + 1) * sizeof(*msgbuf)); 28 | if (msgbuf) 29 | { 30 | wsprintf(msgbuf, TEXT("$0=%s"), getuservariable(INST_0)); 31 | MessageBox(g_hwndParent, msgbuf, TEXT("Message from example plugin"), MB_OK); 32 | GlobalFree(msgbuf); 33 | } 34 | } 35 | } 36 | 37 | 38 | BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) 39 | { 40 | g_hInstance = hInst; 41 | return TRUE; 42 | } 43 | -------------------------------------------------------------------------------- /Contrib/ExDLL/exdll.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "exdll"=.\exdll.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Global: 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<3> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | -------------------------------------------------------------------------------- /Contrib/ExDLL/exdll.h: -------------------------------------------------------------------------------- 1 | // this file is for backward compatibility only 2 | // use the new plugin.h and plugin.lib directly for new plug-ins 3 | 4 | #ifndef _EXDLL_H_ 5 | #define _EXDLL_H_ 6 | 7 | #include 8 | #include // nsis plugin 9 | 10 | // this may not work if /NODEFAULTLIB is used 11 | #ifdef _MSC_VER 12 | # pragma comment(lib, "plugin.lib") 13 | #endif 14 | 15 | #endif//_EXDLL_H_ 16 | -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/big.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/big.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/classic-cross.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/classic-cross.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/classic.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/classic.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/colorful.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/colorful.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/grey-cross.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/grey-cross.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/grey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/grey.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/modern.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/modern.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/red-round.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/red-round.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/red.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/red.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/simple-round.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/simple-round.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/simple-round2.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/simple-round2.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Checks/simple.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Checks/simple.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis-r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis-r.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-branding-r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-branding-r.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-branding.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-branding.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-grey-right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-grey-right.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-grey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-grey.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-metro-right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-metro-right.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-metro.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-metro.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-vintage-right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-vintage-right.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/nsis3-vintage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/nsis3-vintage.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-r-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-r-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-r.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-uninstall-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-uninstall-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-uninstall-r-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-uninstall-r-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-uninstall-r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-uninstall-r.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange-uninstall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange-uninstall.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/orange.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/orange.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Header/win.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Header/win.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/arrow-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/arrow-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/arrow-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/arrow-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/arrow2-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/arrow2-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/arrow2-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/arrow2-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/box-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/box-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/box-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/box-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/classic-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/classic-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/classic-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/classic-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/llama-blue.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/llama-blue.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/llama-grey.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/llama-grey.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-install-blue-full.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-install-blue-full.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-install-blue.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-install-blue.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-install-colorful.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-install-colorful.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-install-full.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-install-full.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-uninstall-blue-full.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-uninstall-blue-full.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-uninstall-blue.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-uninstall-blue.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-uninstall-colorful.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-uninstall-colorful.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-uninstall-full.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-uninstall-full.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/modern-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/modern-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis-menu.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis-menu.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis1-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis1-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis1-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis1-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis3-install-alt.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis3-install-alt.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis3-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis3-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/nsis3-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/nsis3-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/orange-install-nsis.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/orange-install-nsis.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/orange-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/orange-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/orange-uninstall-nsis.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/orange-uninstall-nsis.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/orange-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/orange-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/pixel-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/pixel-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/pixel-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/pixel-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/win-install.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/win-install.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Icons/win-uninstall.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Icons/win-uninstall.ico -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/arrow.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/arrow.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/llama.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/llama.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/modern-xl-install.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/modern-xl-install.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/modern-xl-uninstall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/modern-xl-uninstall.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/modern-xxl-install.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/modern-xxl-install.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/modern-xxl-uninstall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/modern-xxl-uninstall.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nsis3-branding.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nsis3-branding.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nsis3-grey.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nsis3-grey.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nsis3-metro.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nsis3-metro.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nsis3-vintage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nsis3-vintage.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/nullsoft.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/nullsoft.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/orange-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/orange-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/orange-uninstall-nsis.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/orange-uninstall-nsis.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/orange-uninstall.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/orange-uninstall.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/orange.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/orange.bmp -------------------------------------------------------------------------------- /Contrib/Graphics/Wizard/win.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Graphics/Wizard/win.bmp -------------------------------------------------------------------------------- /Contrib/InstallOptions/SConscript: -------------------------------------------------------------------------------- 1 | target = 'InstallOptions' 2 | 3 | files = Split(""" 4 | InstallerOptions.cpp 5 | """) 6 | 7 | resources = Split(""" 8 | ioptdll.rc 9 | """) 10 | 11 | libs = Split(""" 12 | kernel32 13 | user32 14 | gdi32 15 | shell32 16 | comdlg32 17 | ole32 18 | """) 19 | 20 | examples = Split(""" 21 | test.nsi 22 | test.ini 23 | testimgs.nsi 24 | testimgs.ini 25 | testlink.nsi 26 | testlink.ini 27 | testnotify.nsi 28 | testnotify.ini 29 | """) 30 | 31 | docs = Split(""" 32 | Changelog.txt 33 | Readme.html 34 | """) 35 | 36 | includes = Split(""" 37 | InstallOptions.nsh 38 | """) 39 | 40 | Import('BuildPlugin env PerformPluginExtrasDistOperationOnce') 41 | 42 | unicodetarget = 'UNICODE' in env['CPPDEFINES'] 43 | 44 | BuildPlugin(target, files, libs, examples, docs, res = resources, cppused = True) 45 | if PerformPluginExtrasDistOperationOnce(env, unicodetarget): 46 | env.DistributeInclude(includes) 47 | -------------------------------------------------------------------------------- /Contrib/InstallOptions/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by ioptdll.rc 4 | // 5 | #define IDD_DIALOG1 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1000 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 17 | -------------------------------------------------------------------------------- /Contrib/InstallOptions/test.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=8 3 | 4 | [Field 1] 5 | Type=GroupBox 6 | Left=0 7 | Right=-1 8 | Top=0 9 | Bottom=-5 10 | Text=" This is a group box... " 11 | 12 | [Field 2] 13 | Type=checkbox 14 | Text=Install support for X 15 | Left=10 16 | Right=-10 17 | Top=17 18 | Bottom=25 19 | State=0 20 | Flags=GROUP 21 | 22 | [Field 3] 23 | Type=checkbox 24 | Text=Install support for Y 25 | Left=10 26 | Right=-10 27 | Top=30 28 | Bottom=38 29 | State=1 30 | Flags=NOTABSTOP 31 | 32 | [Field 4] 33 | Type=checkbox 34 | Text=Install support for Z 35 | Left=10 36 | Right=-10 37 | Top=43 38 | Bottom=51 39 | State=0 40 | Flags=NOTABSTOP 41 | 42 | [Field 5] 43 | Type=FileRequest 44 | State=C:\dummy.xyz 45 | Left=10 46 | Right=-10 47 | Top=56 48 | Bottom=68 49 | Filter=XYZ Files|*.xyz|All files|*.* 50 | Flags=GROUP|FILE_MUST_EXIST|FILE_EXPLORER|FILE_HIDEREADONLY 51 | 52 | [Field 6] 53 | Type=DirRequest 54 | Left=10 55 | Right=-10 56 | Top=73 57 | Bottom=85 58 | Text=Select a directory... 59 | State=C:\Program Files\NSIS 60 | 61 | [Field 7] 62 | Type=Label 63 | Left=10 64 | Right=-10 65 | Top=90 66 | Bottom=98 67 | Text=This is a label... 68 | 69 | [Field 8] 70 | Type=Text 71 | Left=10 72 | Right=-10 73 | Top=98 74 | Bottom=120 75 | State="Multiline\r\nedit..." 76 | Flags=MULTILINE|VSCROLL|WANTRETURN -------------------------------------------------------------------------------- /Contrib/InstallOptions/testlink.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=5 3 | 4 | [Field 1] 5 | Type=Label 6 | Left=10 7 | Right=-40 8 | Top=10 9 | Bottom=18 10 | Text=This custom page demonstrates the "Link" control 11 | 12 | [Field 2] 13 | Type=Link 14 | Left=20 15 | Right=-40 16 | Top=40 17 | Bottom=50 18 | Text=* Run notepad 19 | 20 | [Field 3] 21 | Type=Link 22 | Left=20 23 | Right=-40 24 | Top=55 25 | Bottom=65 26 | State=mailto:someone@anywhere.com 27 | Text=* Send E-mail 28 | 29 | [Field 4] 30 | Type=Link 31 | Left=20 32 | Right=-40 33 | Top=70 34 | Bottom=80 35 | State=https://nsis.sourceforge.io/ 36 | Text=* Homepage https://nsis.sourceforge.io/ 37 | 38 | [Field 5] 39 | Type=Text 40 | Left=20 41 | Right=-40 42 | Top=85 43 | Bottom=98 44 | State=Just to test proper interaction with the other fields 45 | -------------------------------------------------------------------------------- /Contrib/InstallOptions/testlink.nsi: -------------------------------------------------------------------------------- 1 | ;InstallOptions Test Script 2 | ;Written by Ramon 3 | ;This script demonstrates the power of the new control "LINK" 4 | ;that allows you to execute files, send mails, open wepsites, etc. 5 | ;-------------------------- 6 | 7 | !define TEMP1 $R0 ;Temp variable 8 | 9 | ;The name of the installer 10 | Name "InstallOptions Test Link" 11 | 12 | ;The file to write 13 | OutFile "TestLink.exe" 14 | 15 | ; Show install details 16 | ShowInstDetails show 17 | 18 | ;Things that need to be extracted on startup (keep these lines before any File command!) 19 | ;Only useful for BZIP2 compression 20 | ;Use ReserveFile for your own InstallOptions INI files too! 21 | 22 | ReserveFile /plugin InstallOptions.dll 23 | ReserveFile "testlink.ini" 24 | 25 | ;Order of pages 26 | Page custom SetCustom 27 | Page instfiles 28 | 29 | Section "Components" 30 | 31 | ;Get Install Options dialog user input 32 | 33 | SectionEnd 34 | 35 | Function .onInit 36 | 37 | ;Extract InstallOptions files 38 | ;$PLUGINSDIR will automatically be removed when the installer closes 39 | 40 | InitPluginsDir 41 | File /oname=$PLUGINSDIR\test.ini "testlink.ini" 42 | WriteIniStr $PLUGINSDIR\test.ini "Field 2" "State" "$WINDIR\Notepad.exe" 43 | 44 | FunctionEnd 45 | 46 | Function SetCustom 47 | 48 | ;Display the InstallOptions dialog 49 | 50 | Push ${TEMP1} 51 | 52 | InstallOptions::dialog "$PLUGINSDIR\test.ini" 53 | Pop ${TEMP1} 54 | 55 | Pop ${TEMP1} 56 | 57 | FunctionEnd 58 | 59 | -------------------------------------------------------------------------------- /Contrib/LangDLL/SConscript: -------------------------------------------------------------------------------- 1 | target = 'LangDLL' 2 | 3 | files = Split(""" 4 | LangDLL.c 5 | """) 6 | 7 | resources = Split(""" 8 | resource.rc 9 | """) 10 | 11 | libs = Split(""" 12 | kernel32 13 | user32 14 | gdi32 15 | """) 16 | 17 | Import('BuildPlugin') 18 | 19 | BuildPlugin(target, files, libs, res = resources) 20 | -------------------------------------------------------------------------------- /Contrib/LangDLL/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by resource.rc 4 | // 5 | #define IDD_DIALOG 101 6 | #define IDC_LANGUAGE 1002 7 | #define IDC_TEXT 1007 8 | #define IDC_APPICON 1008 9 | 10 | // Next default values for new objects 11 | // 12 | #ifdef APSTUDIO_INVOKED 13 | #ifndef APSTUDIO_READONLY_SYMBOLS 14 | #define _APS_NEXT_RESOURCE_VALUE 104 15 | #define _APS_NEXT_COMMAND_VALUE 40001 16 | #define _APS_NEXT_CONTROL_VALUE 1010 17 | #define _APS_NEXT_SYMED_VALUE 101 18 | #endif 19 | #endif 20 | -------------------------------------------------------------------------------- /Contrib/Language files/SConscript: -------------------------------------------------------------------------------- 1 | languages = Split(""" 2 | Albanian 3 | Afrikaans 4 | Arabic 5 | Armenian 6 | Asturian 7 | Basque 8 | Belarusian 9 | Bosnian 10 | Breton 11 | Bulgarian 12 | Catalan 13 | Corsican 14 | Croatian 15 | Czech 16 | Danish 17 | Dutch 18 | English 19 | Esperanto 20 | Estonian 21 | Farsi 22 | Finnish 23 | French 24 | Galician 25 | Georgian 26 | German 27 | Greek 28 | Hebrew 29 | Hindi 30 | Hungarian 31 | Icelandic 32 | Indonesian 33 | Irish 34 | Italian 35 | Japanese 36 | Korean 37 | Kurdish 38 | Latvian 39 | Lithuanian 40 | Luxembourgish 41 | Macedonian 42 | Malay 43 | Mongolian 44 | Norwegian 45 | NorwegianNynorsk 46 | Pashto 47 | Polish 48 | Portuguese 49 | PortugueseBR 50 | Romanian 51 | Russian 52 | ScotsGaelic 53 | Serbian 54 | SerbianLatin 55 | SimpChinese 56 | Slovak 57 | Slovenian 58 | Spanish 59 | SpanishInternational 60 | Swedish 61 | Tatar 62 | Thai 63 | TradChinese 64 | Turkish 65 | Ukrainian 66 | Uzbek 67 | Vietnamese 68 | Welsh 69 | """) 70 | 71 | language_files = Flatten([(i + '.nlf', i + '.nsh') for i in languages]) 72 | 73 | Import('defenv') 74 | 75 | defenv.DistributeContrib(language_files, path='Language files') 76 | -------------------------------------------------------------------------------- /Contrib/Library/RegTool/SConscript: -------------------------------------------------------------------------------- 1 | target = 'RegTool' 2 | 3 | files = Split(""" 4 | RegTool.cpp 5 | """) 6 | 7 | libs = Split(""" 8 | advapi32 9 | oleaut32 10 | ole32 11 | user32 12 | kernel32 13 | """) 14 | 15 | Import('BuildUtil env GetArcCPU') 16 | 17 | filename = 'RegTool-' + GetArcCPU(env) + '.bin' 18 | 19 | BuildUtil(target, files, libs, entry = 'NSISWinMainNOCRT', nodeflib = True, file_name = filename) 20 | -------------------------------------------------------------------------------- /Contrib/Library/TypeLib/SConscript: -------------------------------------------------------------------------------- 1 | target = 'TypeLib' 2 | 3 | files = Split(""" 4 | TypeLib.cpp 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | oleaut32 11 | """) 12 | 13 | Import('BuildPlugin') 14 | 15 | BuildPlugin(target, files, libs) 16 | 17 | -------------------------------------------------------------------------------- /Contrib/MakeLangId/MakeLangId.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/MakeLangId/MakeLangId.ico -------------------------------------------------------------------------------- /Contrib/MakeLangId/MakeLangId.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MakeLangId 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Contrib/MakeLangId/SConscript: -------------------------------------------------------------------------------- 1 | target = "MakeLangId" 2 | 3 | files = Split(""" 4 | MakeLangId.cpp 5 | """) 6 | 7 | res = Split(""" 8 | resource.rc 9 | """) 10 | 11 | resources = Split(""" 12 | MakeLangId.xml 13 | """) 14 | 15 | libs = Split(""" 16 | kernel32 17 | user32 18 | comctl32 19 | """) 20 | 21 | Import('BuildUtil') 22 | 23 | BuildUtil(target, files, libs, res = res, resources = resources, entry = 'NSISWinMainNOCRT', nodeflib = True) 24 | 25 | -------------------------------------------------------------------------------- /Contrib/MakeLangId/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by resource.rc 4 | // 5 | #define IDR_MANIFEST 1 6 | #define IDD_DIALOG 101 7 | #define IDI_ICON 102 8 | #define IDC_SOURCE 1001 9 | #define IDC_SYSLANGLIST 1002 10 | #define IDC_INTLANGLIST 1003 11 | #define IDC_INFO 1004 12 | #define IDC_LANGID 1005 13 | #define IDC_CODEPAGE 1006 14 | #define IDC_COPYHELPER 1007 15 | 16 | // Next default values for new objects 17 | // 18 | #ifdef APSTUDIO_INVOKED 19 | #ifndef APSTUDIO_READONLY_SYMBOLS 20 | #define _APS_NEXT_RESOURCE_VALUE 103 21 | #define _APS_NEXT_COMMAND_VALUE 40001 22 | #define _APS_NEXT_CONTROL_VALUE 1008 23 | #define _APS_NEXT_SYMED_VALUE 101 24 | #endif 25 | #endif 26 | -------------------------------------------------------------------------------- /Contrib/Makensisw/License.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2002 Robert Rainwater 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 2. Altered source versions must be plainly marked as such, and must not be 16 | misrepresented as being the original software. 17 | 3. This notice may not be removed or altered from any source distribution. 18 | -------------------------------------------------------------------------------- /Contrib/Makensisw/SConscript: -------------------------------------------------------------------------------- 1 | target = 'makensisw' 2 | 3 | files = Split(""" 4 | makensisw.cpp 5 | toolbar.cpp 6 | utils.cpp 7 | version.cpp 8 | update.cpp 9 | lookup.cpp 10 | wndspy.cpp 11 | """) 12 | 13 | res = Split(""" 14 | resource.rc 15 | """) 16 | 17 | resources = Split(""" 18 | icon.ico 19 | assoc_nsi.ico 20 | assoc_nsh.ico 21 | makensisw.xml 22 | toolbar.bmp 23 | toolbar16n24.bmp 24 | toolbar16d24.bmp 25 | toolbar16h24.bmp 26 | toolbar24n24.bmp 27 | toolbar24d24.bmp 28 | toolbar24h24.bmp 29 | toolbar32n24.bmp 30 | toolbar32d24.bmp 31 | toolbar32h24.bmp 32 | """) 33 | 34 | libs = Split(""" 35 | advapi32 36 | user32 37 | gdi32 38 | msimg32 39 | shell32 40 | shlwapi 41 | comdlg32 42 | comctl32 43 | wininet 44 | winmm 45 | kernel32 46 | ole32 47 | """) 48 | 49 | docs = Split(""" 50 | License.txt 51 | Readme.txt 52 | """) 53 | 54 | Import('BuildUtil') 55 | 56 | BuildUtil( 57 | target, 58 | files, 59 | libs, 60 | res = res, 61 | resources = resources, 62 | entry = None, 63 | defines = ['RELEASE=2.4.1'], 64 | docs = docs, 65 | root_util = True 66 | ) 67 | -------------------------------------------------------------------------------- /Contrib/Makensisw/afxres.h: -------------------------------------------------------------------------------- 1 | // Reviewed for Unicode support by Jim Park -- 08/17/2007 2 | 3 | #define _WIN32_IE 0x0400 4 | #include 5 | #include 6 | 7 | #ifndef IDC_STATIC 8 | #define IDC_STATIC -1 9 | #endif 10 | 11 | #ifndef LWS_IGNORERETURN 12 | #define LWS_IGNORERETURN 0x0002 13 | #endif 14 | -------------------------------------------------------------------------------- /Contrib/Makensisw/assoc_nsh.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/assoc_nsh.ico -------------------------------------------------------------------------------- /Contrib/Makensisw/assoc_nsi.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/assoc_nsi.ico -------------------------------------------------------------------------------- /Contrib/Makensisw/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/icon.ico -------------------------------------------------------------------------------- /Contrib/Makensisw/makensisw.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | MakeNSIS Wrapper 5 | 6 | 7 | 8 | 9 | 10 | 11 | true 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar16d24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar16d24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar16h24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar16h24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar16n24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar16n24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar24d24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar24d24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar24h24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar24h24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar24n24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar24n24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar32d24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar32d24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar32h24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar32h24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/toolbar32n24.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Makensisw/toolbar32n24.bmp -------------------------------------------------------------------------------- /Contrib/Makensisw/update.h: -------------------------------------------------------------------------------- 1 | void CheckForUpdate(); /* Check for newer version on server and show a message to the user. */ 2 | -------------------------------------------------------------------------------- /Contrib/Makensisw/version.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2002 Robert Rainwater 3 | Contributors: Justin Frankel, Fritz Elfert, Amir Szekely and 4 | Jim Park (Unicode Support) 5 | 6 | This software is provided 'as-is', without any express or implied 7 | warranty. In no event will the authors be held liable for any damages 8 | arising from the use of this software. 9 | 10 | Permission is granted to anyone to use this software for any purpose, 11 | including commercial applications, and to alter it and redistribute it 12 | freely, subject to the following restrictions: 13 | 14 | 1. The origin of this software must not be misrepresented; you must not 15 | claim that you wrote the original software. If you use this software 16 | in a product, an acknowledgment in the product documentation would be 17 | appreciated but is not required. 18 | 2. Altered source versions must be plainly marked as such, and must not be 19 | misrepresented as being the original software. 20 | 3. This notice may not be removed or altered from any source distribution. 21 | 22 | Unicode support by Jim Park -- 08/17/2007 23 | */ 24 | #include "makensisw.h" 25 | #define TSTRINGIFY_(x) _T(#x) 26 | #define TSTRINGIFY(x) TSTRINGIFY_(x) 27 | 28 | #ifdef RELEASE 29 | const TCHAR *NSISW_VERSION = TSTRINGIFY(RELEASE); 30 | #else 31 | const TCHAR *NSISW_VERSION = __TDATE__; 32 | #endif 33 | -------------------------------------------------------------------------------- /Contrib/Math/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Math' 2 | 3 | files = Split(""" 4 | Source/Math.c 5 | Source/MyMath.c 6 | Source/plugin.c 7 | """) 8 | 9 | libs = Split(""" 10 | kernel32 11 | user32 12 | """) 13 | 14 | examples = Split(""" 15 | math.nsi 16 | mathtest.nsi 17 | mathtest.ini 18 | mathtest.txt 19 | """) 20 | 21 | docs = Split(""" 22 | Math.txt 23 | """) 24 | 25 | Import('BuildPlugin env') 26 | 27 | BuildPlugin(target, files, libs, examples, docs, nodeflib = False, flags = ['$CPP_FLAG'], entry = None) 28 | -------------------------------------------------------------------------------- /Contrib/Math/Source/Math.h: -------------------------------------------------------------------------------- 1 | // Unicode support by Jim Park -- 08/22/2007 2 | 3 | #pragma once 4 | 5 | #include // nsis plugin 6 | #include 7 | 8 | #ifdef _DEBUG 9 | //#define _DEBUG_LEAKS 10 | #endif 11 | 12 | #ifdef _DEBUG_LEAKS 13 | 14 | #define dbgGlobalAlloc(a, b) watchGlobalAlloc(a, b) 15 | #define dbgGlobalFree(a) watchGlobalFree(a) 16 | #define dbgGlobalCheck() watchGlobal(); 17 | void watchGlobal(); 18 | void watchGlobalFree(HGLOBAL block); 19 | HGLOBAL watchGlobalAlloc(UINT Flags, UINT size); 20 | 21 | #else 22 | 23 | #define dbgGlobalAlloc(a, b) GlobalAlloc(a, b) 24 | #define dbgGlobalFree(a) GlobalFree(a) 25 | #define dbgGlobalCheck() {}; 26 | 27 | #endif 28 | 29 | TCHAR *AllocString(); 30 | ExpressionItem *AllocItem(); 31 | ExpressionItem *AllocArray(int size); 32 | ExpressionItem *CopyItem(ExpressionItem *item, int NeedConst = 0); 33 | -------------------------------------------------------------------------------- /Contrib/Math/math.nsi: -------------------------------------------------------------------------------- 1 | ; This is just an example of Math plugin 2 | ; 3 | ; (c) brainsucker, 2002 4 | ; (r) BSForce 5 | 6 | Name "Math Plugin Example" 7 | OutFile "math.exe" 8 | ShowInstDetails show 9 | XPStyle on 10 | 11 | Section "ThisNameIsIgnoredSoWhyBother?" 12 | Math::Script 'SaR(s,fa,ra, i,f,r,e,p) (i=0;#{i=0, (NS=s[p+4,]; NS=#[p>0,s[,p-1],'']), (NS='';NS=s)])" 16 | 17 | Math::Script "a = 'Hello \r\n World \r\n!!!'; a = SaR(a,{'\r','\n'},{'$\r','$\n'}); R0 = a" 18 | Math::Script "NS = '$\"In quotes$\"'; TQ(); R1=NS; R3=P(s(R1),'qu')" 19 | Math::Script "NS = 'No quotes'; TQ(); R2=NS" 20 | Math::Script "NS='123\r\n456\r\n789'; DL(); R4=NS; DL(); R5=NS; DL(); R6=NS; R7=NS" 21 | 22 | 23 | DetailPrint "'$R0'" 24 | DetailPrint "'$R1'" 25 | DetailPrint "'$R2'" 26 | DetailPrint "'$R3'" 27 | DetailPrint "'$R4'" 28 | DetailPrint "'$R5'" 29 | DetailPrint "'$R6'" 30 | DetailPrint "'$R7'" 31 | SectionEnd 32 | 33 | ; eof 34 | -------------------------------------------------------------------------------- /Contrib/Math/mathtest.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | NumFields=10 3 | NextButtonText=Execute 4 | CancelButtonText=Quit 5 | BackButtonText=Readme 6 | 7 | [Field 1] 8 | Type=label 9 | Text=Enter your script here: 10 | Left=0 11 | Right=-1 12 | Top=0 13 | Bottom=8 14 | 15 | [Field 2] 16 | Type=text 17 | Left=0 18 | Right=-1 19 | Top=9 20 | Bottom=55 21 | flags=MULTILINE|WANTRETURN|HSCROLL 22 | State="" 23 | 24 | [Field 3] 25 | Type=text 26 | Left=53 27 | Right=175 28 | Top=56 29 | Bottom=140 30 | flags=MULTILINE|READONLY 31 | State="" 32 | 33 | [Field 4] 34 | Type=text 35 | Left=175 36 | Right=-1 37 | Top=56 38 | Bottom=140 39 | flags=MULTILINE|READONLY 40 | State="" 41 | 42 | [Field 5] 43 | Type=RadioButton 44 | Left=0 45 | Right=-1 46 | Top=70 47 | Bottom=80 48 | flags=GROUP 49 | Text="Your script" 50 | State=1 51 | 52 | [Field 6] 53 | Type=RadioButton 54 | Left=0 55 | Right=-1 56 | Top=80 57 | Bottom=90 58 | flags= 59 | Text="Sample 1" 60 | State=0 61 | 62 | [Field 7] 63 | Type=RadioButton 64 | Left=0 65 | Right=-1 66 | Top=90 67 | Bottom=100 68 | flags= 69 | Text="Sample 2" 70 | State=0 71 | 72 | [Field 8] 73 | Type=RadioButton 74 | Left=0 75 | Right=-1 76 | Top=100 77 | Bottom=110 78 | flags= 79 | Text="Sample 3" 80 | State=0 81 | 82 | [Field 9] 83 | Type=RadioButton 84 | Left=0 85 | Right=-1 86 | Top=110 87 | Bottom=120 88 | flags= 89 | Text="Sample 4" 90 | State=0 91 | 92 | [Field 10] 93 | Type=RadioButton 94 | Left=0 95 | Right=-1 96 | Top=120 97 | Bottom=130 98 | flags= 99 | Text="Sample 5" 100 | State=0 101 | 102 | -------------------------------------------------------------------------------- /Contrib/Math/mathtest.txt: -------------------------------------------------------------------------------- 1 | Math Tester. 2 | 3 | This demo allows you to test your Math::Script expressions without need to compile anything. Just enter your expressions into multiline editbox (every single line is a separate call to Math::Script) or select one of sample expressions and press Execute. 4 | 5 | Every call to Math::Script can accept up to 1kb of script, but this demo is limited to the summ of 1 kb at all lines. And... watch your scripts. No.... Watch your errors at scripts! 6 | 7 | (c) Brainsucker, 2003. 8 | -------------------------------------------------------------------------------- /Contrib/Modern UI 2/License.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI 2/License.txt -------------------------------------------------------------------------------- /Contrib/Modern UI 2/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Modern UI 2' 2 | 3 | docs = Split(""" 4 | License.txt 5 | Readme.html 6 | """) 7 | 8 | doc_images = Split(""" 9 | closed.gif 10 | header.gif 11 | open.gif 12 | screen1.png 13 | screen2.png 14 | """) 15 | 16 | contribs = Split(""" 17 | Deprecated.nsh 18 | Interface.nsh 19 | Localization.nsh 20 | MUI2.nsh 21 | Pages.nsh 22 | """) 23 | 24 | pages = Split(""" 25 | Components.nsh 26 | Directory.nsh 27 | Finish.nsh 28 | InstallFiles.nsh 29 | License.nsh 30 | StartMenu.nsh 31 | UninstallConfirm.nsh 32 | Welcome.nsh 33 | """) 34 | 35 | Import('defenv') 36 | 37 | def join(prefix, list_): 38 | return list(map(lambda x: '%s/%s' % (prefix, x), list_)) 39 | 40 | defenv.DistributeDocs(docs, path=target) 41 | defenv.DistributeDocs(join('../Modern UI/images',doc_images), path='%s/%s'%(target,'images')) 42 | path = 'Pages' 43 | defenv.DistributeContrib(join(path,pages), path='%s/%s'%(target,path)) 44 | defenv.DistributeContrib(contribs, path=target) 45 | -------------------------------------------------------------------------------- /Contrib/Modern UI/License.txt: -------------------------------------------------------------------------------- 1 | Copyright 2002-2025 Joost Verburg 2 | 3 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 4 | 5 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 6 | 7 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. 8 | If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 9 | 2. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. 10 | 3. This notice may not be removed or altered from any distribution. 11 | -------------------------------------------------------------------------------- /Contrib/Modern UI/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Modern UI' 2 | 3 | docs = Split(""" 4 | Changelog.txt 5 | License.txt 6 | Readme.html 7 | """) 8 | 9 | doc_images = Split(""" 10 | closed.gif 11 | header.gif 12 | open.gif 13 | screen1.png 14 | screen2.png 15 | """) 16 | 17 | contribs = Split(""" 18 | ioSpecial.ini 19 | System.nsh 20 | """) 21 | 22 | 23 | Import('defenv') 24 | 25 | def join(prefix, list_): 26 | return list(map(lambda x: '%s/%s' % (prefix, x), list_)) 27 | 28 | defenv.DistributeDocs(docs, path=target) 29 | path = 'images' 30 | defenv.DistributeDocs(join(path,doc_images), path='%s/%s'%(target,path)) 31 | defenv.DistributeContrib(contribs, path=target) 32 | -------------------------------------------------------------------------------- /Contrib/Modern UI/images/closed.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI/images/closed.gif -------------------------------------------------------------------------------- /Contrib/Modern UI/images/header.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI/images/header.gif -------------------------------------------------------------------------------- /Contrib/Modern UI/images/open.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI/images/open.gif -------------------------------------------------------------------------------- /Contrib/Modern UI/images/screen1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI/images/screen1.png -------------------------------------------------------------------------------- /Contrib/Modern UI/images/screen2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/Modern UI/images/screen2.png -------------------------------------------------------------------------------- /Contrib/Modern UI/ioSpecial.ini: -------------------------------------------------------------------------------- 1 | [Settings] 2 | Rect=1044 3 | NumFields=3 4 | [Field 1] 5 | Type=bitmap 6 | Left=0 7 | Right=109 8 | Top=0 9 | Bottom=193 10 | Flags=RESIZETOFIT 11 | [Field 2] 12 | Type=label 13 | Left=120 14 | Right=315 15 | Top=10 16 | [Field 3] 17 | Type=label 18 | Left=120 19 | Right=315 -------------------------------------------------------------------------------- /Contrib/MultiUser/SConscript: -------------------------------------------------------------------------------- 1 | target = 'MultiUser' 2 | 3 | docs = Split(""" 4 | Readme.html 5 | """) 6 | 7 | includes = Split(""" 8 | MultiUser.nsh 9 | """) 10 | 11 | Import('defenv') 12 | 13 | defenv.DistributeDocs(docs, path=target) 14 | defenv.DistributeInclude(includes) 15 | -------------------------------------------------------------------------------- /Contrib/NSIS Menu/nsismenu/nsisicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/NSIS Menu/nsismenu/nsisicon.ico -------------------------------------------------------------------------------- /Contrib/NSIS Menu/nsismenu/nsismenu.rc: -------------------------------------------------------------------------------- 1 | nsisicon ICON "nsisicon.ico" 2 | WXCURSOR_HAND CURSOR DISCARDABLE "wx/msw/hand.cur" -------------------------------------------------------------------------------- /Contrib/NSIS Menu/nsismenu/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by test.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NO_MFC 1 10 | #define _APS_NEXT_RESOURCE_VALUE 104 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1000 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /Contrib/NSIS Menu/wx/build.txt: -------------------------------------------------------------------------------- 1 | 1. Install wxWidgets 2.8 2 | 2. Set WXWIN environment variable 3 | 3. Run wxbuild.bat 4 | 4. Build NSIS happily 5 | -------------------------------------------------------------------------------- /Contrib/NSIS Menu/wx/wxbuild.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | if not exist setup.h goto setup_error 3 | if not exist "%WXWIN%\build\msw\makefile.vc" goto error 4 | set OLDCD=%CD% 5 | cd /D "%WXWIN%\build\msw" 6 | rem Save the old setup.h as old_setup.h in the starting dir. 7 | copy /y "%WXWIN%\include\wx\msw\setup.h" "%OLDCD%\old_setup.h" 8 | 9 | if "%1"=="unicode" goto unicode 10 | if "%1"=="ansi" goto ansi 11 | 12 | :ansi 13 | rem Ask if we want to delete this dir. 14 | echo Deleting... 15 | rd /S ..\..\lib\vc_libnsis 16 | 17 | echo ### building ANSI version ### 18 | rem Copy the ANSI version of setup.h to WXWIN setup. 19 | copy /y "%OLDCD%\setup.h" "%WXWIN%\include\wx\msw\setup.h" 20 | echo Deleting... 21 | rd /S vc_mswnsis 22 | nmake -f makefile.vc CFG=nsis BUILD=release RUNTIME_LIBS=static SHARED=0 UNICODE=0 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0 23 | if "%1"=="" goto unicode 24 | if "%1"=="all" goto unicode 25 | goto finish 26 | 27 | :unicode 28 | rem Ask if we want to delete this dir. 29 | echo Deleting... 30 | rd /S ..\..\lib\vc_libunsis 31 | 32 | echo ### building UNICODE version ### 33 | rem Copy the UNICODE version of setup.h to WXWIN setup. 34 | copy /y "%OLDCD%\setup.h" "%WXWIN%\include\wx\msw\setup.h" 35 | echo Deleting... 36 | rd /S vc_mswuunsis 37 | nmake -f makefile.vc CFG=unsis BUILD=release RUNTIME_LIBS=static SHARED=0 UNICODE=1 WXUNIV=0 USE_OPENGL=0 USE_ODBC=0 USE_HTML=1 USE_XRC=0 38 | 39 | :finish 40 | rem Restore the setup.h 41 | copy /y "%OLDCD%\old_setup.h" "%WXWIN%\include\wx\msw\setup.h" 42 | cd /D "%OLDCD%" 43 | goto done 44 | :error 45 | echo WXWIN is not properly set 46 | goto done 47 | :setup_error 48 | echo setup.h cannot be found, wrong working directory? 49 | :done 50 | -------------------------------------------------------------------------------- /Contrib/NSISdl/License.txt: -------------------------------------------------------------------------------- 1 | NSISdl 1.1 - HTTP downloading plugin for NSIS 2 | Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel 3 | 4 | This software is provided 'as-is', without any express or implied 5 | warranty. In no event will the authors be held liable for any damages 6 | arising from the use of this software. 7 | 8 | Permission is granted to anyone to use this software for any purpose, 9 | including commercial applications, and to alter it and redistribute it 10 | freely, subject to the following restrictions: 11 | 12 | 1. The origin of this software must not be misrepresented; you must not 13 | claim that you wrote the original software. If you use this software 14 | in a product, an acknowledgment in the product documentation would be 15 | appreciated but is not required. 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 3. This notice may not be removed or altered from any source distribution. -------------------------------------------------------------------------------- /Contrib/NSISdl/SConscript: -------------------------------------------------------------------------------- 1 | target = 'NSISdl' 2 | 3 | files = Split(""" 4 | asyncdns.cpp 5 | connection.cpp 6 | httpget.cpp 7 | nsisdl.cpp 8 | util.cpp 9 | """) 10 | 11 | libs = Split(""" 12 | advapi32 13 | wsock32 14 | user32 15 | kernel32 16 | """) 17 | 18 | docs = Split(""" 19 | License.txt 20 | ReadMe.txt 21 | """) 22 | 23 | Import('BuildPlugin') 24 | 25 | BuildPlugin( 26 | target, files, libs, 27 | docs = docs, 28 | cppused = True, 29 | nodeflib = False, 30 | ) 31 | -------------------------------------------------------------------------------- /Contrib/NSISdl/asyncdns.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** JNetLib 3 | ** Copyright (C) 2000-2001 Nullsoft, Inc. 4 | ** Author: Justin Frankel 5 | ** File: asyncdns.h - JNL portable asynchronous DNS interface 6 | ** License: see License.txt 7 | ** 8 | ** Usage: 9 | ** 1. Create JNL_AsyncDNS object, optionally with the number of cache entries. 10 | ** 2. call resolve() to resolve a hostname into an address. The return value of 11 | ** resolve is 0 on success (host successfully resolved), 1 on wait (meaning 12 | ** try calling resolve() with the same hostname in a few hundred milliseconds 13 | ** or so), or -1 on error (i.e. the host can't resolve). 14 | ** 4. enjoy. 15 | ** 16 | ** Unicode support by Jim Park -- 08/24/2007 17 | */ 18 | 19 | // Jim Park: Inet host name is strictly ANSI, no UNICODE for now. 20 | 21 | #ifndef _ASYNCDNS_H_ 22 | #define _ASYNCDNS_H_ 23 | 24 | class JNL_AsyncDNS 25 | { 26 | public: 27 | JNL_AsyncDNS(); 28 | ~JNL_AsyncDNS(); 29 | 30 | int resolve(char *hostname, unsigned long *addr); // return 0 on success, 1 on wait, -1 on unresolvable 31 | 32 | private: 33 | void wait_for_thread_death(); 34 | 35 | char m_hostname[256]; 36 | unsigned long m_addr; 37 | 38 | HANDLE m_thread; 39 | static unsigned long WINAPI _threadfunc(LPVOID _d); 40 | 41 | }; 42 | 43 | #endif //_ASYNCDNS_H_ 44 | -------------------------------------------------------------------------------- /Contrib/NSISdl/netinc.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** JNetLib 3 | ** Copyright (C) 2000-2001 Nullsoft, Inc. 4 | ** Author: Justin Frankel 5 | ** File: netinc.h - network includes and portability defines (used internally) 6 | ** License: see License.txt 7 | ** 8 | ** Unicode support by Jim Park -- 08/24/2007 9 | */ 10 | 11 | #ifndef _NETINC_H_ 12 | #define _NETINC_H_ 13 | 14 | #include 15 | #include "util.h" 16 | 17 | #define strcasecmp(x,y) stricmp(x,y) 18 | #define ERRNO (WSAGetLastError()) 19 | #define SET_SOCK_BLOCK(s,block) { unsigned long __i=block?0:1; ioctlsocket(s,FIONBIO,&__i); } 20 | #ifndef EWOULDBLOCK 21 | #define EWOULDBLOCK WSAEWOULDBLOCK 22 | #endif 23 | #ifndef EINPROGRESS 24 | #define EINPROGRESS WSAEWOULDBLOCK 25 | #endif 26 | #define memset mini_memset 27 | #define memcpy mini_memcpy 28 | // Jim Park: For Unicode support, we need to distinguish whether we are working on 29 | // Unicode or ANSI. 30 | #define strcpy lstrcpyA 31 | #define strncpy lstrcpynA 32 | #define strcat lstrcatA 33 | #define strlen lstrlenA 34 | #define malloc(x) (new char[x]) 35 | #define free(x) {delete [] x;} 36 | typedef int socklen_t; 37 | 38 | #ifndef INADDR_NONE 39 | #define INADDR_NONE 0xffffffff 40 | #endif 41 | 42 | #ifndef INADDR_ANY 43 | #define INADDR_ANY 0 44 | #endif 45 | 46 | #ifndef SHUT_RDWR 47 | #define SHUT_RDWR 2 48 | #endif 49 | 50 | #ifndef INVALID_SOCKET 51 | #define INVALID_SOCKET -1 52 | #endif 53 | 54 | #define PORTABLE_SOCKET SOCKET 55 | 56 | #endif //_NETINC_H_ 57 | -------------------------------------------------------------------------------- /Contrib/NSISdl/util.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** JNetLib 3 | ** Copyright (C) 2000-2001 Nullsoft, Inc. 4 | ** Author: Justin Frankel 5 | ** File: util.h - JNL interface for basic network utilities 6 | ** License: see License.txt 7 | ** 8 | ** routines you may be interested in: 9 | ** JNL::open_socketlib(); 10 | ** opens the socket library. Call this once before using any network 11 | ** code. If you create a new thread, call this again. Only really an 12 | ** issue for Win32 support, but use it anyway for portability/ 13 | ** 14 | ** JNL::close_Socketlib(); 15 | ** closes the socketlib. Call this when you're done with the network, 16 | ** after all your JNetLib objects have been destroyed. 17 | ** 18 | ** unsigned long JNL::ipstr_to_addr(const char *cp); 19 | ** gives you the integer representation of a ip address in dotted 20 | ** decimal form. 21 | ** 22 | ** JNL::addr_to_ipstr(unsigned long addr, char *host, int maxhostlen); 23 | ** gives you the dotted decimal notation of an integer ip address. 24 | ** 25 | ** Reviewed for Unicode support by Jim Park -- 08/24/2007 26 | ** Keep the functions here strictly ANSI. 27 | */ 28 | 29 | #ifndef _UTIL_H_ 30 | #define _UTIL_H_ 31 | 32 | int my_atoi(char *p); 33 | __int64 myatoi64(const char *s); 34 | void myitoa64(__int64 i, char *buffer); 35 | void mini_memset(void *,char,int); 36 | void mini_memcpy(void *,void*,int); 37 | 38 | #endif //_UTIL_H_ 39 | -------------------------------------------------------------------------------- /Contrib/Splash/Example.nsi: -------------------------------------------------------------------------------- 1 | Name "Splash.dll test" 2 | 3 | OutFile "Splash Test.exe" 4 | 5 | XPStyle on 6 | 7 | Function .onInit 8 | # the plugins dir is automatically deleted when the installer exits 9 | InitPluginsDir 10 | File /oname=$PLUGINSDIR\splash.bmp "${NSISDIR}\Contrib\Graphics\Wizard\orange-nsis.bmp" 11 | #optional 12 | #File /oname=$PLUGINSDIR\splash.wav "C:\myprog\sound.wav" 13 | 14 | splash::show 1000 $PLUGINSDIR\splash 15 | 16 | Pop $0 ; $0 has '1' if the user closed the splash screen early, 17 | ; '0' if everything closed normally, and '-1' if some error occurred. 18 | FunctionEnd 19 | 20 | Section 21 | SectionEnd -------------------------------------------------------------------------------- /Contrib/Splash/SConscript: -------------------------------------------------------------------------------- 1 | target = 'Splash' 2 | 3 | files = Split(""" 4 | splash.c 5 | """) 6 | 7 | libs = Split(""" 8 | kernel32 9 | user32 10 | gdi32 11 | winmm 12 | """) 13 | 14 | examples = Split(""" 15 | Example.nsi 16 | """) 17 | 18 | docs = Split(""" 19 | splash.txt 20 | """) 21 | 22 | Import('BuildPlugin') 23 | 24 | BuildPlugin(target, files, libs, examples, docs) 25 | -------------------------------------------------------------------------------- /Contrib/Splash/splash.txt: -------------------------------------------------------------------------------- 1 | Splash.dll - small (4k), simple plugin that lets you throw 2 | up a splash screen in NSIS installers. 3 | 4 | --- UPDATED in 2.0b0 - will break old scripts --- 5 | 6 | To use: 7 | 8 | Create a .BMP file of your splash screen. 9 | (optional) Create a .WAV file to play while your splash screen shows. 10 | 11 | Add the following lines to your .NSI file: 12 | 13 | Function .onInit 14 | SetOutPath $TEMP 15 | File /oname=spltmp.bmp "my_splash.bmp" 16 | 17 | ; optional 18 | ; File /oname=spltmp.wav "my_splashsound.wav" 19 | 20 | splash::show 1000 $TEMP\spltmp 21 | 22 | Pop $0 ; $0 has '1' if the user closed the splash screen early, 23 | ; '0' if everything closed normally, and '-1' if some error occurred. 24 | 25 | Delete $TEMP\spltmp.bmp 26 | ; Delete $TEMP\spltmp.wav 27 | FunctionEnd 28 | 29 | Note that the first parameter to splash.exe is the length to show the 30 | screen for (in milliseconds), and the second is the splash bitmap filename (without 31 | the .bmp). The BMP file used will be this parameter.bmp, and the wave file used 32 | (if present) will be this parameter.wav. 33 | 34 | (If you already have an .onInit function, put that in it) 35 | 36 | Note: the return value of splash is 1 if the user closed the splash 37 | screen early (pop it from the stack) 38 | 39 | -Justin 40 | 41 | Converted to a plugin DLL by Amir Szekely (kichik) 42 | -------------------------------------------------------------------------------- /Contrib/StartMenu/Example.nsi: -------------------------------------------------------------------------------- 1 | Name "StartMenu.dll test" 2 | 3 | OutFile "StartMenu Test.exe" 4 | 5 | XPStyle on 6 | 7 | Page directory 8 | DirText "This installer will create some shortcuts to MakeNSIS in the start menu.$\nFor this it needs NSIS's path." \ 9 | "Please specify the path in which you have installed NSIS:" 10 | InstallDir "${NSISDIR}" 11 | Function .onVerifyInstDir 12 | IfFileExists $INSTDIR\makensis.exe +2 13 | Abort 14 | FunctionEnd 15 | 16 | Page custom StartMenuGroupSelect "" ": Start Menu Folder" 17 | Function StartMenuGroupSelect 18 | Push $R1 19 | 20 | StartMenu::Select /checknoshortcuts "Don't create a start menu folder" /autoadd /lastused $R0 "StartMenu.dll test" 21 | Pop $R1 22 | 23 | StrCmp $R1 "success" success 24 | StrCmp $R1 "cancel" done 25 | ; error 26 | MessageBox MB_OK $R1 27 | StrCpy $R0 "StartMenu.dll test" # use default 28 | Return 29 | success: 30 | Pop $R0 31 | 32 | done: 33 | Pop $R1 34 | FunctionEnd 35 | 36 | Page instfiles 37 | Section 38 | # this part is only necessary if you used /checknoshortcuts 39 | StrCpy $R1 $R0 1 40 | StrCmp $R1 ">" skip 41 | 42 | CreateDirectory $SMPROGRAMS\$R0 43 | CreateShortcut $SMPROGRAMS\$R0\MakeNSISw.lnk $INSTDIR\makensisw.exe 44 | 45 | SetShellVarContext All 46 | CreateDirectory $SMPROGRAMS\$R0 47 | CreateShortcut "$SMPROGRAMS\$R0\All users MakeNSISw.lnk" $INSTDIR\makensisw.exe 48 | 49 | skip: 50 | SectionEnd -------------------------------------------------------------------------------- /Contrib/StartMenu/SConscript: -------------------------------------------------------------------------------- 1 | target = 'StartMenu' 2 | 3 | files = Split(""" 4 | StartMenu.c 5 | """) 6 | 7 | resources = Split(""" 8 | StartMenu.rc 9 | """) 10 | 11 | libs = Split(""" 12 | kernel32 13 | user32 14 | gdi32 15 | shell32 16 | ole32 17 | """) 18 | 19 | examples = Split(""" 20 | Example.nsi 21 | """) 22 | 23 | docs = Split(""" 24 | Readme.txt 25 | """) 26 | 27 | Import('BuildPlugin') 28 | 29 | BuildPlugin(target, files, libs, examples, docs, res = resources) 30 | -------------------------------------------------------------------------------- /Contrib/StartMenu/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by StartMenu.rc 4 | // 5 | #define IDD_DIALOG 101 6 | #define IDC_NSISICON 1001 7 | #define IDC_LOCATION 1002 8 | #define IDC_TEXT 1003 9 | #define IDC_DIRLIST 1004 10 | #define IDC_CHECK 1005 11 | 12 | // Next default values for new objects 13 | // 14 | #ifdef APSTUDIO_INVOKED 15 | #ifndef APSTUDIO_READONLY_SYMBOLS 16 | #define _APS_NEXT_RESOURCE_VALUE 102 17 | #define _APS_NEXT_COMMAND_VALUE 40001 18 | #define _APS_NEXT_CONTROL_VALUE 1006 19 | #define _APS_NEXT_SYMED_VALUE 101 20 | #endif 21 | #endif 22 | -------------------------------------------------------------------------------- /Contrib/SubStart/SConscript: -------------------------------------------------------------------------------- 1 | Import('env') 2 | 3 | target = "substart" 4 | 5 | files = Split(""" 6 | substart.c 7 | """) 8 | 9 | libs = Split(""" 10 | kernel32 11 | user32 12 | """) 13 | 14 | Import('BuildUtil') 15 | 16 | substart = BuildUtil(target, files, libs, cli = True, noinstall = True, nodeflib = True) 17 | 18 | if env['PLATFORM'] == 'win32': 19 | env.DistributeBin(substart, names=['makensis.exe'], alias='install-compiler') # install as makensis 20 | -------------------------------------------------------------------------------- /Contrib/System/Resource/Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/System/Resource/Icon.ico -------------------------------------------------------------------------------- /Contrib/System/Resource/Main.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | BOOL WINAPI DllMain(HINSTANCE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) 4 | { 5 | return TRUE; 6 | } 7 | -------------------------------------------------------------------------------- /Contrib/System/Resource/Resource.h: -------------------------------------------------------------------------------- 1 | #define IDI_ICON 103 2 | -------------------------------------------------------------------------------- /Contrib/System/Resource/Resource.rc: -------------------------------------------------------------------------------- 1 | #include "Resource.h" 2 | 3 | IDI_ICON ICON "Icon.ico" 4 | -------------------------------------------------------------------------------- /Contrib/System/SConscript: -------------------------------------------------------------------------------- 1 | target = 'System' 2 | 3 | files = Split(""" 4 | Source/Buffers.c 5 | Source/Plugin.c 6 | Source/System.c 7 | """) 8 | 9 | libs = Split(""" 10 | kernel32 11 | user32 12 | ole32 13 | """) 14 | 15 | examples = Split(""" 16 | Resource.dll 17 | System.nsi 18 | System.nsh 19 | SysFunc.nsh 20 | """) 21 | 22 | docs = Split(""" 23 | System.html 24 | WhatsNew.txt 25 | """) 26 | 27 | Import('BuildPlugin env') 28 | 29 | defs = ['SYSTEM_EXPORTS'] 30 | msvc = 'msvc' in env['TOOLS'] or 'mstoolkit' in env['TOOLS'] 31 | 32 | srcsuff = '' 33 | if env['TARGET_ARCH'] != 'x86': 34 | srcsuff = '-' + env['TARGET_ARCH'] 35 | defs += ['SYSTEM_NOCALLBACKS'] # BUGBUG: Remove this when CallBack() is implemented 36 | filename = 'Call' + srcsuff 37 | 38 | src_ascpp = """ 39 | #if 0 /* a C style comment */ 40 | ERROR: assembler-with-cpp required! 41 | #else 42 | .end 43 | #endif 44 | """ 45 | conf = env.Configure() 46 | if conf.TryCompile('END', '.S'): 47 | files += ['Source/'+filename+'.S'] 48 | elif (not msvc) and conf.TryCompile(src_ascpp, '.S'): 49 | files += ['Source/'+filename+'CPP.S'] 50 | elif (not msvc) and conf.TryCompile(src_ascpp, '.sx'): 51 | files += ['Source/'+filename+'CPP.sx'] 52 | else: 53 | print('WARNING: System.dll: unable to find assembler for '+filename+'.S') 54 | conf.Finish() 55 | 56 | BuildPlugin( 57 | target, 58 | files, 59 | libs, 60 | examples, 61 | docs, 62 | nodeflib = False, 63 | defines = defs 64 | ) 65 | 66 | res = 'Resource/Resource.rc' 67 | res_obj = 'Resource/Resource-rc.o' 68 | res_target = env.RES(res_obj, res) 69 | 70 | res_main = env.Object('Resource/Main.c') 71 | 72 | resources = Split(""" 73 | Resource/Icon.ico 74 | Resource/Resource.h 75 | """) 76 | 77 | env.Depends(res_target, resources) 78 | 79 | resource = env.SharedLibrary('Resource', res_target + res_main) 80 | env.MakeReproducible(resource) 81 | -------------------------------------------------------------------------------- /Contrib/System/Source/Buffers.h: -------------------------------------------------------------------------------- 1 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 2 | #pragma once 3 | #endif 4 | 5 | #ifndef BUFFERS_H 6 | #define BUFFERS_H 7 | 8 | #endif /* BUFFERS_H */ 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/Call-amd64CPP.S: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #error "MSVC is supposed to use the plain .S file!" 3 | #endif 4 | #if 0 5 | ERROR: assembler-with-cpp required! 6 | #else 7 | #include "Call-amd64.S" 8 | #endif 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/Call-amd64CPP.sx: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #error "MSVC is supposed to use the plain .S file!" 3 | #endif 4 | #if 0 5 | ERROR: assembler-with-cpp required! 6 | #else 7 | #include "Call-amd64CPP.S" 8 | #endif 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/CallCPP.S: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #error "MSVC is supposed to use the plain .S file!" 3 | #endif 4 | #if 0 5 | ERROR: assembler-with-cpp required! 6 | #else 7 | #include "Call.S" 8 | #endif 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/CallCPP.sx: -------------------------------------------------------------------------------- 1 | #ifdef _MSC_VER 2 | #error "MSVC is supposed to use the plain .S file!" 3 | #endif 4 | #if 0 5 | ERROR: assembler-with-cpp required! 6 | #else 7 | #include "CallCPP.S" 8 | #endif 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/stdafx.c: -------------------------------------------------------------------------------- 1 | // stdafx.cpp : source file that includes just the standard includes 2 | // AnyDLL.pch will be the pre-compiled header 3 | // stdafx.obj will contain the pre-compiled type information 4 | 5 | #include "stdafx.h" 6 | 7 | // TODO: reference any additional headers you need in STDAFX.H 8 | // and not in this file 9 | -------------------------------------------------------------------------------- /Contrib/System/Source/stdafx.h: -------------------------------------------------------------------------------- 1 | // stdafx.h : include file for standard system include files, 2 | // or project specific include files that are used frequently, but 3 | // are changed infrequently 4 | // 5 | 6 | #if defined(_MSC_VER) && (_MSC_VER >= 1020) 7 | #pragma once 8 | #endif 9 | 10 | #ifndef STDAFX_H 11 | #define STDAFX_H 12 | 13 | #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers 14 | // Windows Header Files: 15 | #include 16 | 17 | // TODO: reference additional headers your program requires here 18 | //#define SYSTEM_LOG_DEBUG 19 | 20 | #endif /* STDAFX_H */ 21 | -------------------------------------------------------------------------------- /Contrib/UIs/SConscript: -------------------------------------------------------------------------------- 1 | code = 'ui.c' 2 | 3 | uis = Split(""" 4 | default 5 | modern 6 | modern_headerbmp 7 | modern_headerbmpr 8 | modern_nodesc 9 | modern_smalldesc 10 | sdbarker_tiny 11 | xl 12 | xl_headerbmp 13 | xl_headerbmpr 14 | xl_nodesc 15 | xl_smalldesc 16 | xxl 17 | xxl_headerbmp 18 | xxl_headerbmpr 19 | xxl_nodesc 20 | xxl_smalldesc 21 | """) 22 | 23 | libs = Split(""" 24 | kernel32 25 | comctl32 26 | user32 27 | gdi32 28 | """) 29 | 30 | Import('BuildUtil env') 31 | 32 | code = env.Object(code) 33 | 34 | for ui in uis: 35 | ui = BuildUtil(ui, [code], libs, res = ui + '.rc', contrib = True, path = 'UIs') 36 | env.Alias('UIs', ui) 37 | -------------------------------------------------------------------------------- /Contrib/UIs/modern_headerbmp.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 4 | 5 | IDD_INST DIALOGEX 0, 0, 331, 222 6 | STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | 7 | WS_SYSMENU 8 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 9 | BEGIN 10 | PUSHBUTTON "",3,166,201,50,14,WS_GROUP 11 | PUSHBUTTON "",1,216,201,50,14 12 | PUSHBUTTON "",2,273,201,50,14 13 | CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE | 14 | WS_GROUP,15,45,300,140 15 | CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE | 16 | WS_GROUP,0,0,331,193 17 | CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP, 18 | 5,193,321,1 19 | CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1 20 | CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE | 21 | WS_GROUP,0,193,340,1 22 | LTEXT "",1256,5,188,322,8 23 | LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED 24 | LTEXT "",IDC_LICENSEAGREE,0,0,332,35 25 | LTEXT "",1037,105,5,215,10 26 | LTEXT "",1038,110,16,210,16 27 | CONTROL "",1046,"Static",SS_BITMAP,0,0,100,35 28 | END 29 | -------------------------------------------------------------------------------- /Contrib/UIs/modern_headerbmpr.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 4 | 5 | IDD_INST DIALOGEX 0, 0, 331, 222 6 | STYLE DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | 7 | WS_SYSMENU 8 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 9 | BEGIN 10 | PUSHBUTTON "",3,166,201,50,14,WS_GROUP 11 | PUSHBUTTON "",1,216,201,50,14 12 | PUSHBUTTON "",2,273,201,50,14 13 | CONTROL "",IDC_CHILDRECT,"Static",SS_BLACKRECT | NOT WS_VISIBLE | 14 | WS_GROUP,15,45,300,140 15 | CONTROL "",1044,"Static",SS_BLACKRECT | NOT WS_VISIBLE | 16 | WS_GROUP,0,0,331,193 17 | CONTROL "",IDC_LICENSEDISAGREE,"Static",SS_ETCHEDHORZ | WS_GROUP, 18 | 5,193,321,1 19 | CONTROL "",1036,"Static",SS_ETCHEDHORZ | WS_GROUP,0,35,340,1 20 | CONTROL "",1045,"Static",SS_ETCHEDHORZ | NOT WS_VISIBLE | 21 | WS_GROUP,0,193,340,1 22 | LTEXT "",1256,5,188,322,8 23 | LTEXT "",IDC_VERSTR,5,188,322,8,WS_DISABLED 24 | LTEXT "",IDC_LICENSEAGREE,0,0,332,35 25 | LTEXT "",1037,10,5,215,10 26 | LTEXT "",1038,15,16,210,16 27 | CONTROL "",1046,"Static",SS_BITMAP,231,0,100,35 28 | END 29 | -------------------------------------------------------------------------------- /Contrib/UIs/modern_nodesc.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 4 | 5 | IDD_SELCOM DIALOGEX 0, 0, 300, 140 6 | STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD 7 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 8 | BEGIN 9 | LTEXT "",IDC_INTROTEXT,0,0,300,25,NOT WS_GROUP 10 | CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,95,8 11 | COMBOBOX IDC_COMBO1,102,25,195,104,CBS_DROPDOWNLIST | NOT 12 | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP 13 | LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP 14 | LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP 15 | CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | 16 | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | 17 | WS_BORDER | WS_TABSTOP,102,40,195,95 18 | END 19 | -------------------------------------------------------------------------------- /Contrib/UIs/modern_smalldesc.rc: -------------------------------------------------------------------------------- 1 | #include "resource.h" 2 | 3 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 4 | 5 | IDD_SELCOM DIALOGEX 0, 0, 300, 140 6 | STYLE DS_FIXEDSYS | DS_CONTROL | WS_CHILD 7 | FONT 8, "MS Shell Dlg", 0, 0, 0x1 8 | BEGIN 9 | LTEXT "",IDC_INTROTEXT,0,0,300,25,NOT WS_GROUP 10 | CONTROL "",IDC_TEXT1,"Static",SS_LEFTNOWORDWRAP,0,27,95,8 11 | COMBOBOX IDC_COMBO1,102,25,195,74,CBS_DROPDOWNLIST | NOT 12 | WS_VISIBLE | WS_VSCROLL | WS_TABSTOP 13 | LTEXT "",IDC_TEXT2,0,40,95,65,NOT WS_GROUP 14 | LTEXT "",IDC_SPACEREQUIRED,0,115,100,18,NOT WS_GROUP 15 | CONTROL "",IDC_TREE1,"SysTreeView32",TVS_HASBUTTONS | 16 | TVS_HASLINES | TVS_LINESATROOT | TVS_DISABLEDRAGDROP | 17 | WS_BORDER | WS_TABSTOP,102,40,195,65 18 | GROUPBOX "",1042,102,105,195,35 19 | LTEXT "",1043,108,117,183,18,NOT WS_GROUP 20 | END 21 | -------------------------------------------------------------------------------- /Contrib/UIs/xl.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 351 3 | #define cyMAIN 326 4 | 5 | #include "ui.rc" 6 | -------------------------------------------------------------------------------- /Contrib/UIs/xl_headerbmp.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 351 3 | #define cyMAIN 326 4 | #define RC_HEADER_BMP 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xl_headerbmpr.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 351 3 | #define cyMAIN 326 4 | #define RC_HEADER_BMP_RIGHT 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xl_nodesc.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 351 3 | #define cyMAIN 326 4 | #define RC_COMP_NODESC 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xl_smalldesc.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 351 3 | #define cyMAIN 326 4 | #define RC_COMP_SMALLDESC 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xxl.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 381 3 | #define cyMAIN 426 4 | 5 | #include "ui.rc" 6 | -------------------------------------------------------------------------------- /Contrib/UIs/xxl_headerbmp.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 381 3 | #define cyMAIN 426 4 | #define RC_HEADER_BMP 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xxl_headerbmpr.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 381 3 | #define cyMAIN 426 4 | #define RC_HEADER_BMP_RIGHT 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xxl_nodesc.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 381 3 | #define cyMAIN 426 4 | #define RC_COMP_NODESC 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UIs/xxl_smalldesc.rc: -------------------------------------------------------------------------------- 1 | 2 | #define cxMAIN 381 3 | #define cyMAIN 426 4 | #define RC_COMP_SMALLDESC 1 5 | 6 | #include "ui.rc" 7 | -------------------------------------------------------------------------------- /Contrib/UserInfo/SConscript: -------------------------------------------------------------------------------- 1 | target = 'UserInfo' 2 | 3 | files = Split(""" 4 | UserInfo.c 5 | """) 6 | 7 | libs = Split(""" 8 | advapi32 9 | user32 10 | kernel32 11 | """) 12 | 13 | examples = Split(""" 14 | UserInfo.nsi 15 | """) 16 | 17 | Import('BuildPlugin') 18 | 19 | BuildPlugin(target, files, libs, examples) 20 | -------------------------------------------------------------------------------- /Contrib/UserInfo/UserInfo.nsi: -------------------------------------------------------------------------------- 1 | Name "UserInfo.dll test" 2 | OutFile UserInfo.exe 3 | RequestExecutionLevel Highest 4 | 5 | !define REALMSG "$\nOriginal non-restricted account type: $2" 6 | 7 | Section 8 | ClearErrors 9 | UserInfo::GetName 10 | IfErrors PluginFail 11 | Pop $0 12 | StrCmp $0 "" 0 +2 ; GetName can return a empty string on Win9x 13 | StrCpy $0 "?" 14 | UserInfo::GetAccountType 15 | Pop $1 16 | # GetOriginalAccountType will check the tokens of the original user of the 17 | # current thread/process. If the user tokens were elevated or limited for 18 | # this process, GetOriginalAccountType will return the non-restricted 19 | # account type. 20 | # On Vista with UAC, for example, this is not the same value when running 21 | # with `RequestExecutionLevel user`. GetOriginalAccountType will return 22 | # "admin" while GetAccountType will return "user". 23 | UserInfo::GetOriginalAccountType 24 | Pop $2 25 | StrCmp $1 "Admin" 0 +3 ; Note: Win9x always returns "Admin" 26 | MessageBox MB_OK 'User "$0" is in the Administrators group${REALMSG}' 27 | Goto done 28 | StrCmp $1 "Power" 0 +3 29 | MessageBox MB_OK 'User "$0" is in the Power Users group${REALMSG}' 30 | Goto done 31 | StrCmp $1 "User" 0 +3 32 | MessageBox MB_OK 'User "$0" is just a regular user${REALMSG}' 33 | Goto done 34 | StrCmp $1 "Guest" 0 +3 35 | MessageBox MB_OK 'User "$0" is a guest${REALMSG}' 36 | Goto done 37 | MessageBox MB_OK "Unknown error" 38 | Goto done 39 | 40 | PluginFail: 41 | MessageBox MB_OK "Error! Unable to call plug-in!" 42 | 43 | done: 44 | SectionEnd 45 | 46 | -------------------------------------------------------------------------------- /Contrib/VPatch/SConscript: -------------------------------------------------------------------------------- 1 | target = 'VPatch' 2 | 3 | examples = Split(""" 4 | example.nsi 5 | newfile.txt 6 | oldfile.txt 7 | patch.pat 8 | """) 9 | 10 | docs = Split(""" 11 | Readme.html 12 | """) 13 | 14 | includes = Split(""" 15 | VPatchLib.nsh 16 | """) 17 | 18 | Import('defenv') 19 | 20 | defenv.DistributeExamples(examples, path=target) 21 | defenv.DistributeDocs(docs, path=target) 22 | defenv.DistributeInclude(includes) 23 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/GenPat/GlobalTypes.cpp: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // GlobalTypes.cpp 3 | //--------------------------------------------------------------------------- 4 | // -=* VPatch *=- 5 | //--------------------------------------------------------------------------- 6 | // Copyright (C) 2001-2005 Koen van de Sande / Van de Sande Productions 7 | //--------------------------------------------------------------------------- 8 | // Website: http://www.tibed.net/vpatch 9 | // 10 | // This software is provided 'as-is', without any express or implied 11 | // warranty. In no event will the authors be held liable for any damages 12 | // arising from the use of this software. 13 | // 14 | // Permission is granted to anyone to use this software for any purpose, 15 | // including commercial applications, and to alter it and redistribute it 16 | // freely, subject to the following restrictions: 17 | // 18 | // 1. The origin of this software must not be misrepresented; you must not 19 | // claim that you wrote the original software. If you use this software 20 | // in a product, an acknowledgment in the product documentation would be 21 | // appreciated but is not required. 22 | // 2. Altered source versions must be plainly marked as such, and must not be 23 | // misrepresented as being the original software. 24 | // 3. This notice may not be removed or altered from any source distribution. 25 | // 26 | // Reviewed for Unicode support by Jim Park -- 08/29/2007 27 | 28 | 29 | #include "GlobalTypes.h" 30 | 31 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/GenPat/SConscript: -------------------------------------------------------------------------------- 1 | target = "GenPat" 2 | 3 | files = Split(""" 4 | adler32.cpp 5 | Checksums.cpp 6 | ChunkedFile.cpp 7 | FileFormat1.cpp 8 | GlobalTypes.cpp 9 | main.cpp 10 | md5.c 11 | PatchGenerator.cpp 12 | POSIXUtil.cpp 13 | """) 14 | 15 | libs = Split(""" 16 | z 17 | """) 18 | 19 | Import('BuildUtil') 20 | 21 | BuildUtil(target, files, libs, flags = ['$EXCEPTION_FLAG'], cross_platform = True, cli = True) 22 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/GenPat/adler32.cpp: -------------------------------------------------------------------------------- 1 | /* adler32.c -- compute the Adler-32 checksum of a data stream 2 | * Copyright (C) 1995-2003 Mark Adler 3 | 4 | THIS IS A MODIFIED VERSION OF THE ORIGINAL ZLIB adler32.c! 5 | 6 | The following was copied from zlib.h: 7 | 8 | This software is provided 'as-is', without any express or implied 9 | warranty. In no event will the authors be held liable for any damages 10 | arising from the use of this software. 11 | 12 | Permission is granted to anyone to use this software for any purpose, 13 | including commercial applications, and to alter it and redistribute it 14 | freely, subject to the following restrictions: 15 | 16 | 1. The origin of this software must not be misrepresented; you must not 17 | claim that you wrote the original software. If you use this software 18 | in a product, an acknowledgment in the product documentation would be 19 | appreciated but is not required. 20 | 2. Altered source versions must be plainly marked as such, and must not be 21 | misrepresented as being the original software. 22 | 3. This notice may not be removed or altered from any source distribution. 23 | 24 | Reviewed for Unicode support by Jim Park -- 08/29/2007 25 | (nothing changed.) 26 | */ 27 | 28 | #include "adler32.h" 29 | #include 30 | namespace zlib { 31 | #include 32 | } 33 | 34 | namespace Checksum { 35 | 36 | /* ========================================================================= */ 37 | uLong adler32(uLong adler, const Byte *buf, uInt len) { 38 | return zlib::adler32(adler, buf, len); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/GenPat/adler32.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------- 2 | // Adler32 3 | //--------------------------------------------------------------------------- 4 | // 5 | // Reviewed for Unicode support by Jim Park -- 08/29/2007 6 | 7 | #if !defined(Adler32_H) 8 | #define Adler32_H 9 | 10 | namespace Checksum { 11 | typedef unsigned int uInt; /* 16 bits or more */ 12 | typedef unsigned long uLong; /* 32 bits or more */ 13 | typedef unsigned char Byte; /* 8 bits */ 14 | 15 | uLong adler32(uLong adler, const Byte *buf, uInt len); 16 | } 17 | 18 | #endif // Adler32_H 19 | 20 | 21 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/GenPat/tchar.h: -------------------------------------------------------------------------------- 1 | // Added for Unicode support by Jim Park -- 08/29/2007 2 | #pragma once 3 | #include 4 | #include 5 | 6 | #ifdef _UNICODE 7 | # define tout std::wcout 8 | # define terr std::wcerr 9 | # define __T(x) L ## x 10 | # define _T(x) __T(x) 11 | # define _tmain wmain 12 | # define _tunlink _wunlink 13 | # define FOPEN _wfopen 14 | 15 | typedef std::wstring tstring; 16 | typedef std::wistringstream tistringstream; 17 | 18 | typedef wchar_t TCHAR; 19 | #else 20 | # define tout std::cout 21 | # define terr std::cerr 22 | # define _T(x) x 23 | # define _tmain main 24 | # ifdef _WIN32 25 | # define _tunlink _unlink 26 | # else 27 | # define _tunlink unlink 28 | # endif 29 | # define FOPEN fopen 30 | 31 | typedef std::string tstring; 32 | typedef std::istringstream tistringstream; 33 | typedef char TCHAR; 34 | #endif 35 | -------------------------------------------------------------------------------- /Contrib/VPatch/Source/Plugin/SConscript: -------------------------------------------------------------------------------- 1 | target = 'VPatch' 2 | 3 | files = Split(""" 4 | apply_patch.c 5 | checksum.c 6 | md5.c 7 | vpatchdll.c 8 | """) 9 | 10 | libs = Split(""" 11 | kernel32 12 | user32 13 | """) 14 | 15 | Import('BuildPlugin env') 16 | 17 | BuildPlugin(target, files, libs, defines = ['DLL_CHECKSUMS']) 18 | -------------------------------------------------------------------------------- /Contrib/VPatch/VPatchLib.nsh: -------------------------------------------------------------------------------- 1 | ; PatchLib v3.0 2 | ; ============= 3 | ; 4 | ; Library with macro for use with VPatch (DLL version) in NSIS 2.0.5+ 5 | ; Created by Koen van de Sande 6 | 7 | !include LogicLib.nsh 8 | 9 | !macro VPatchFile PATCHDATA SOURCEFILE TEMPFILE 10 | 11 | Push $1 12 | Push $2 13 | Push $3 14 | Push $4 15 | 16 | Push ${SOURCEFILE} 17 | Push ${TEMPFILE} 18 | 19 | Pop $2 # temp file 20 | Pop $3 # source file 21 | 22 | InitPluginsDir 23 | GetTempFileName $1 $PLUGINSDIR 24 | File /oname=$1 ${PATCHDATA} 25 | 26 | vpatch::vpatchfile $1 $3 $2 27 | Pop $4 28 | DetailPrint $4 29 | 30 | StrCpy $4 $4 2 31 | ${Unless} $4 == "OK" 32 | SetErrors 33 | ${EndIf} 34 | 35 | ${If} ${FileExists} $2 36 | Delete $3 37 | Rename /REBOOTOK $2 $3 38 | ${EndIf} 39 | 40 | Delete $1 41 | 42 | Pop $4 43 | Pop $3 44 | Pop $2 45 | Pop $1 46 | 47 | !macroend 48 | -------------------------------------------------------------------------------- /Contrib/VPatch/example.nsi: -------------------------------------------------------------------------------- 1 | ;VPatch example 2 | ;Written by Joost Verburg 3 | 4 | ;-------------------------------- 5 | 6 | ; The name of the installer 7 | Name "VPatch Test" 8 | 9 | ; The file to write 10 | OutFile "vpatchtest.exe" 11 | 12 | ; The default installation directory 13 | InstallDir "$PROGRAMFILES\VPatch Test" 14 | 15 | ; The text to prompt the user to enter a directory 16 | DirText "Choose a folder in which to install the VPatch Test!" 17 | 18 | ; Show details 19 | ShowInstDetails show 20 | 21 | ;-------------------------------- 22 | ; The normal way to use VPatch 23 | ;-------------------------------- 24 | !include "VPatchLib.nsh" 25 | 26 | Section "Update file" 27 | ; Set output path to the installation directory 28 | SetOutPath $INSTDIR 29 | 30 | ; Extract the old file under name 'updatefile.txt' 31 | File /oname=updatefile.txt oldfile.txt 32 | 33 | ; Update the file - it will be replaced with the new version 34 | DetailPrint "Updating updatefile.txt using patch..." 35 | !insertmacro VPatchFile "patch.pat" "$INSTDIR\updatefile.txt" "$INSTDIR\temporaryfile.txt" 36 | 37 | SectionEnd 38 | 39 | ;------------------------------- 40 | ; The hard way to use VPatch 41 | ;------------------------------- 42 | Section "New version in separate file" 43 | 44 | ; Set output path to the installation directory 45 | SetOutPath $INSTDIR 46 | 47 | ; Extract the old file 48 | File oldfile.txt 49 | 50 | ; Extract the patch to the plug-ins folder (temporary) 51 | InitPluginsDir 52 | File /oname=$PLUGINSDIR\patch.pat patch.pat 53 | 54 | ; Update the old file to the new file using the patch 55 | DetailPrint "Updating oldfile.txt using patch to newfile.txt..." 56 | vpatch::vpatchfile "$PLUGINSDIR\patch.pat" "$INSTDIR\oldfile.txt" "$INSTDIR\newfile.txt" 57 | 58 | ; Show result 59 | Pop $R0 60 | DetailPrint "Result: $R0" 61 | 62 | SectionEnd -------------------------------------------------------------------------------- /Contrib/VPatch/newfile.txt: -------------------------------------------------------------------------------- 1 | *** THIS IS A TEST FILE FOR THE VPATCH EXAMPLE *** 2 | *** COMPILE EXAMPLE.NSI TO TEST *** 3 | 4 | newfile - vpatch 5 | 6 | 67890 - GHIJKL -------------------------------------------------------------------------------- /Contrib/VPatch/oldfile.txt: -------------------------------------------------------------------------------- 1 | *** THIS IS A TEST FILE FOR THE VPATCH EXAMPLE *** 2 | *** COMPILE EXAMPLE.NSI TO TEST *** 3 | 4 | oldfile - vpatch 5 | 6 | 12345 - ABCDEF -------------------------------------------------------------------------------- /Contrib/VPatch/patch.pat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/VPatch/patch.pat -------------------------------------------------------------------------------- /Contrib/nsDialogs/InstallOptions.nsi: -------------------------------------------------------------------------------- 1 | !include LogicLib.nsh 2 | !include WinMessages.nsh 3 | 4 | Name "nsDialogs IO" 5 | OutFile "nsDialogs IO.exe" 6 | 7 | Page custom nsDialogsIO UpdateINIState 8 | Page instfiles 9 | 10 | XPStyle on 11 | 12 | ShowInstDetails show 13 | 14 | !include nsDialogs.nsh 15 | !insertmacro NSD_FUNCTION_INIFILE 16 | 17 | Function nsDialogsIO 18 | 19 | InitPluginsDir 20 | File /oname=$PLUGINSDIR\io.ini "..\InstallOptions\test.ini" 21 | 22 | ${If} ${Cmd} `MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Test the right-to-left version?" IDYES` 23 | WriteINIStr $PLUGINSDIR\io.ini Settings RTL 1 24 | ${EndIf} 25 | 26 | StrCpy $0 $PLUGINSDIR\io.ini 27 | 28 | Call CreateDialogFromINI 29 | 30 | FunctionEnd 31 | 32 | Section 33 | 34 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 2" "State" 35 | DetailPrint "Install X=$0" 36 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 3" "State" 37 | DetailPrint "Install Y=$0" 38 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 4" "State" 39 | DetailPrint "Install Z=$0" 40 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 5" "State" 41 | DetailPrint "File=$0" 42 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 6" "State" 43 | DetailPrint "Dir=$0" 44 | ReadINIStr $0 "$PLUGINSDIR\io.ini" "Field 8" "State" 45 | DetailPrint "Info=$0" 46 | 47 | SectionEnd 48 | -------------------------------------------------------------------------------- /Contrib/nsDialogs/SConscript: -------------------------------------------------------------------------------- 1 | target = 'nsDialogs' 2 | 3 | files = Split(""" 4 | browse.c 5 | input.c 6 | nsDialogs.c 7 | nsDialogs.def 8 | rtl.c 9 | """) 10 | 11 | resources = Split(""" 12 | dialog.rc 13 | """) 14 | 15 | libs = Split(""" 16 | kernel32 17 | user32 18 | gdi32 19 | shell32 20 | comdlg32 21 | ole32 22 | """) 23 | 24 | docs = Split(""" 25 | Readme.html 26 | """) 27 | 28 | examples = Split(""" 29 | example.nsi 30 | InstallOptions.nsi 31 | timer.nsi 32 | welcome.nsi 33 | """) 34 | 35 | includes = Split(""" 36 | nsDialogs.nsh 37 | """) 38 | 39 | Import('BuildPlugin env PerformPluginExtrasDistOperationOnce') 40 | 41 | unicodetarget = 'UNICODE' in env['CPPDEFINES'] 42 | 43 | BuildPlugin(target, files, libs, examples, docs, res = resources) 44 | if PerformPluginExtrasDistOperationOnce(env, unicodetarget): 45 | env.DistributeInclude(includes) 46 | -------------------------------------------------------------------------------- /Contrib/nsDialogs/defs.h: -------------------------------------------------------------------------------- 1 | // Unicode support by Jim Park -- 08/24/2007 2 | 3 | #ifndef __NS_DIALOGS__DEFS_H__ 4 | #define __NS_DIALOGS__DEFS_H__ 5 | 6 | #include 7 | 8 | #define NSDFUNC WINAPI 9 | 10 | #define GetVar(vars, varlen, varid) ( (vars) + ((varid) * (varlen)) ) 11 | #define DlgRet(hDlg, val) ( SetWindowLongPtr((hDlg), DWLP_MSGRESULT, (val)) | TRUE ) 12 | #define StrToIntPtr nsishelper_str_to_ptr 13 | 14 | 15 | typedef int nsFunction; 16 | 17 | enum nsControlType 18 | { 19 | NSCTL_UNKNOWN, 20 | NSCTL_BUTTON, 21 | NSCTL_EDIT, 22 | NSCTL_COMBOBOX, 23 | NSCTL_LISTBOX, 24 | NSCTL_RICHEDIT, 25 | NSCTL_RICHEDIT2, 26 | NSCTL_STATIC, 27 | NSCTL_LINK, 28 | NSCTL_TREE 29 | }; 30 | 31 | struct nsDialogCallbacks 32 | { 33 | nsFunction onBack; 34 | }; 35 | 36 | #define DLG_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsDialogCallbacks, x)/sizeof(nsFunction)) 37 | 38 | struct nsControlCallbacks 39 | { 40 | nsFunction onClick; 41 | nsFunction onChange; 42 | nsFunction onNotify; 43 | }; 44 | 45 | #define CTL_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsControlCallbacks, x)/sizeof(nsFunction)) 46 | 47 | #define USERDATA_SIZE 1024 48 | 49 | struct nsControl 50 | { 51 | HWND window; 52 | enum nsControlType type; 53 | TCHAR userData[USERDATA_SIZE]; 54 | struct nsControlCallbacks callbacks; 55 | WNDPROC oldWndProc; 56 | }; 57 | 58 | struct nsDialog 59 | { 60 | HWND hwDialog; 61 | HWND hwParent; 62 | 63 | WNDPROC parentOriginalWndproc; 64 | 65 | BOOL rtl; 66 | 67 | struct nsDialogCallbacks callbacks; 68 | 69 | unsigned controlCount; 70 | 71 | struct nsControl* controls; 72 | }; 73 | 74 | #define NSCONTROL_ID_PROP _T("NSIS: nsControl pointer property") 75 | 76 | #endif//__NS_DIALOGS__DEFS_H__ 77 | -------------------------------------------------------------------------------- /Contrib/nsDialogs/input.c: -------------------------------------------------------------------------------- 1 | // Unicode support by Jim Park -- 08/24/2007 2 | 3 | #include 4 | 5 | #include // nsis plugin 6 | 7 | #include "input.h" 8 | #include "defs.h" 9 | #include "rtl.h" 10 | 11 | extern struct nsDialog g_dialog; 12 | 13 | static int NSDFUNC ConvertPlacement(TCHAR *str, int total, int height) 14 | { 15 | TCHAR unit = *CharPrev(str, str + lstrlen(str)); 16 | int x = myatoi(str); 17 | 18 | if (unit == _T('%')) 19 | { 20 | if (x < 0) 21 | { 22 | return MulDiv(total, 100 + x, 100); 23 | } 24 | 25 | return MulDiv(total, x, 100); 26 | } 27 | else if (unit == _T('u')) 28 | { 29 | RECT r; 30 | 31 | r.left = r.top = x; 32 | r.right = r.bottom = 0; 33 | 34 | MapDialogRect(g_dialog.hwParent, &r); 35 | 36 | if (height) 37 | return x >= 0 ? r.top : total + r.top; 38 | else 39 | return x >= 0 ? r.left : total + r.left; 40 | } 41 | 42 | if (x < 0) 43 | { 44 | return total + x; 45 | } 46 | 47 | return x; 48 | } 49 | 50 | int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height) 51 | { 52 | RECT dialogRect; 53 | int dialogWidth; 54 | int dialogHeight; 55 | TCHAR buf[1024]; 56 | 57 | GetClientRect(g_dialog.hwDialog, &dialogRect); 58 | dialogWidth = dialogRect.right; 59 | dialogHeight = dialogRect.bottom; 60 | 61 | if (popstringn(buf, 1024)) 62 | return 1; 63 | 64 | *x = ConvertPlacement(buf, dialogWidth, 0); 65 | 66 | if (popstringn(buf, 1024)) 67 | return 1; 68 | 69 | *y = ConvertPlacement(buf, dialogHeight, 1); 70 | 71 | if (popstringn(buf, 1024)) 72 | return 1; 73 | 74 | *width = ConvertPlacement(buf, dialogWidth, 0); 75 | 76 | if (popstringn(buf, 1024)) 77 | return 1; 78 | 79 | *height = ConvertPlacement(buf, dialogHeight, 1); 80 | 81 | ConvertPosToRTL(x, *width, dialogWidth); 82 | 83 | return 0; 84 | } 85 | -------------------------------------------------------------------------------- /Contrib/nsDialogs/input.h: -------------------------------------------------------------------------------- 1 | // Reviewed for Unicode support by Jim Park -- 08/24/2007 2 | 3 | #ifndef __NS_DIALOGS__INPUT_H__ 4 | #define __NS_DIALOGS__INPUT_H__ 5 | 6 | #include "defs.h" 7 | 8 | int NSDFUNC PopPlacement(int *x, int *y, int *width, int *height); 9 | 10 | #endif//__NS_DIALOGS__INPUT_H__ 11 | -------------------------------------------------------------------------------- /Contrib/nsDialogs/nsDialogs.def: -------------------------------------------------------------------------------- 1 | LIBRARY nsDialogs 2 | EXPORTS 3 | KillTimer=nsdKillTimer -------------------------------------------------------------------------------- /Contrib/nsDialogs/rtl.h: -------------------------------------------------------------------------------- 1 | #ifndef __NS_DIALOGS__RTL_H__ 2 | #define __NS_DIALOGS__RTL_H__ 3 | 4 | #include "defs.h" 5 | 6 | void NSDFUNC ConvertStyleToRTL(enum nsControlType type, LPDWORD style, LPDWORD exStyle); 7 | void NSDFUNC ConvertPosToRTL(int *x, int width, int dialogWidth); 8 | 9 | #endif//__NS_DIALOGS__RTL_H__ 10 | -------------------------------------------------------------------------------- /Contrib/nsExec/SConscript: -------------------------------------------------------------------------------- 1 | target = 'nsExec' 2 | 3 | files = Split(""" 4 | nsexec.c 5 | """) 6 | 7 | libs = Split(""" 8 | advapi32 9 | user32 10 | kernel32 11 | """) 12 | 13 | examples = Split(""" 14 | test.nsi 15 | """) 16 | 17 | docs = Split(""" 18 | nsExec.txt 19 | """) 20 | 21 | Import('BuildPlugin') 22 | 23 | BuildPlugin(target, files, libs, examples, docs) 24 | 25 | -------------------------------------------------------------------------------- /Contrib/nsExec/nsExec.txt: -------------------------------------------------------------------------------- 1 | nsExec 2 | ------ 3 | nsExec will execute command-line based programs and capture the output 4 | without opening a dos box. 5 | 6 | 7 | Usage 8 | ----- 9 | nsExec::Exec [/MBCS] [/OEM] [/TIMEOUT=x] path 10 | Pop $0 11 | 12 | -or- 13 | 14 | nsExec::ExecToLog [/MBCS] [/OEM] [/TIMEOUT=x] path 15 | Pop $0 16 | 17 | -or- 18 | 19 | nsExec::ExecToStack [/MBCS] [/OEM] [/TIMEOUT=x] path 20 | Pop $0 ; Return 21 | Pop $1 ; Output 22 | 23 | All functions are the same except ExecToLog will print the output 24 | to the log window and ExecToStack will push up to ${NSIS_MAX_STRLEN} 25 | characters of output onto the stack after the return value. 26 | 27 | Use the /MBCS switch to disable Unicode detection and always treat the text as ANSI. 28 | 29 | Use the /OEM switch to convert the output text from OEM to ANSI. 30 | 31 | The timeout value is optional. The timeout is the time in 32 | milliseconds nsExec will wait for output. If output from the 33 | process is received, the timeout value is reset and it will 34 | again wait for more output using the timeout value. See Return 35 | Value for how to check if there was a timeout. 36 | 37 | To ensure that command are executed without problems on all windows versions, 38 | is recommended to use the following syntax: 39 | 40 | nsExec::ExecToStack [OPTIONS] '"PATH" param1 param2 paramN' 41 | 42 | This way the application path may contain non 8.3 paths (with spaces) 43 | 44 | Return Value 45 | ------------ 46 | If nsExec is unable to execute the process, it will return "error" 47 | on the top of the stack, if the process timed out it will return 48 | "timeout", else it will return the return code from the 49 | executed process. 50 | 51 | 52 | Copyright Info 53 | -------------- 54 | Copyright (c) 2002 Robert Rainwater 55 | Thanks to Justin Frankel and Amir Szekely -------------------------------------------------------------------------------- /Contrib/nsExec/test.nsi: -------------------------------------------------------------------------------- 1 | Name "nsExec Test" 2 | 3 | OutFile "nsExec Test.exe" 4 | 5 | ShowInstDetails show 6 | 7 | Section "Silent MakeNSIS" 8 | nsExec::Exec '"${NSISDIR}\makensis.exe"' 9 | Pop $0 # return value/error/timeout 10 | DetailPrint "" 11 | DetailPrint " Return value: $0" 12 | DetailPrint "" 13 | SectionEnd 14 | 15 | Section "MakeNSIS commands help" 16 | nsExec::ExecToLog '"${NSISDIR}\makensis.exe" /CMDHELP' 17 | Pop $0 # return value/error/timeout 18 | DetailPrint "" 19 | DetailPrint " Return value: $0" 20 | DetailPrint "" 21 | SectionEnd 22 | 23 | Section "Output to variable" 24 | nsExec::ExecToStack '"${NSISDIR}\makensis.exe" /VERSION' 25 | Pop $0 # return value/error/timeout 26 | Pop $1 # printed text, up to ${NSIS_MAX_STRLEN} 27 | DetailPrint '"${NSISDIR}\makensis.exe" /VERSION printed: $1' 28 | DetailPrint "" 29 | DetailPrint " Return value: $0" 30 | DetailPrint "" 31 | SectionEnd -------------------------------------------------------------------------------- /Contrib/zip2exe/Classic.nsh: -------------------------------------------------------------------------------- 1 | ;Change this file to customize zip2exe generated installers with a classic interface 2 | 3 | Page directory 4 | Page instfiles -------------------------------------------------------------------------------- /Contrib/zip2exe/Modern.nsh: -------------------------------------------------------------------------------- 1 | ;Change this file to customize zip2exe generated installers with a modern interface 2 | 3 | !include "MUI2.nsh" 4 | 5 | !insertmacro MUI_PAGE_DIRECTORY 6 | !insertmacro MUI_PAGE_INSTFILES 7 | 8 | !insertmacro MUI_LANGUAGE "English" -------------------------------------------------------------------------------- /Contrib/zip2exe/SConscript: -------------------------------------------------------------------------------- 1 | target = "zip2exe" 2 | 3 | files = Split(""" 4 | main.cpp 5 | zlib/ioapi.c 6 | zlib/unzip.c 7 | """) 8 | 9 | resources = Split(""" 10 | zip2exe.xml 11 | icon.ico 12 | """) 13 | 14 | rc = 'res.rc' 15 | 16 | libs = Split(""" 17 | advapi32 18 | shell32 19 | shlwapi 20 | comctl32 21 | comdlg32 22 | user32 23 | gdi32 24 | z 25 | """) 26 | 27 | headers = Split(""" 28 | Base.nsh 29 | Classic.nsh 30 | Modern.nsh 31 | """) 32 | 33 | Import('BuildUtil defenv') 34 | 35 | BuildUtil(target, files, libs, res = rc, resources = resources) 36 | 37 | defenv.DistributeContrib(headers,path=target) 38 | -------------------------------------------------------------------------------- /Contrib/zip2exe/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/zip2exe/icon.ico -------------------------------------------------------------------------------- /Contrib/zip2exe/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Contrib/zip2exe/main.cpp -------------------------------------------------------------------------------- /Contrib/zip2exe/zip2exe.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Zip2Exe 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/LICENSE: -------------------------------------------------------------------------------- 1 | Halibut is copyright (c) 1999-2001 Simon Tatham and James Aylett. 2 | 3 | Note: This version is modified by Robert Rainwater and Amir Szekely 4 | 5 | Permission is hereby granted, free of charge, to any person 6 | obtaining a copy of this software and associated documentation files 7 | (the "Software"), to deal in the Software without restriction, 8 | including without limitation the rights to use, copy, modify, merge, 9 | publish, distribute, sublicense, and/or sell copies of the Software, 10 | and to permit persons to whom the Software is furnished to do so, 11 | subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 20 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 21 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 22 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/SConscript: -------------------------------------------------------------------------------- 1 | target = 'halibut' 2 | 3 | files = Split(""" 4 | biblio.c 5 | bk_xhtml.c 6 | contents.c 7 | error.c 8 | help.c 9 | index.c 10 | input.c 11 | keywords.c 12 | licence.c 13 | main.c 14 | malloc.c 15 | misc.c 16 | style.c 17 | tree234.c 18 | ustring.c 19 | version.c 20 | """) 21 | 22 | Import('env AddAvailableLibs') 23 | 24 | AddAvailableLibs(env, ['rt']) 25 | 26 | halibut = env.Program(target, files) 27 | 28 | Return('halibut') 29 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/help.c: -------------------------------------------------------------------------------- 1 | /* 2 | * help.c: usage instructions 3 | */ 4 | 5 | #include 6 | #include "halibut.h" 7 | 8 | static const char *const usagetext[] = { 9 | "halibut [options] file.but [file.but...]", 10 | NULL 11 | }; 12 | 13 | void usage(void) 14 | { 15 | const char *const *p; 16 | for (p = usagetext; *p; p++) 17 | puts(*p); 18 | } 19 | 20 | void showversion(void) 21 | { 22 | printf("Halibut, %s\n", version); 23 | } 24 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/licence.c: -------------------------------------------------------------------------------- 1 | /* 2 | * licence.c: licence text 3 | */ 4 | 5 | #include 6 | 7 | static char *licencetext[] = { 8 | "FIXME: licence text goes here", 9 | NULL 10 | }; 11 | 12 | void licence(void) 13 | { 14 | char **p; 15 | for (p = licencetext; *p; p++) 16 | puts(*p); 17 | } 18 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/style.c: -------------------------------------------------------------------------------- 1 | /* 2 | * style.c: load and keep track of user style preferences 3 | */ 4 | 5 | #include 6 | #include 7 | #include "halibut.h" 8 | -------------------------------------------------------------------------------- /Docs/src/bin/halibut/version.c: -------------------------------------------------------------------------------- 1 | /* 2 | * version.c: version string 3 | */ 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #ifndef VERSION 10 | #define VER "anonymous build (" __DATE__ " " __TIME__ ")" 11 | #else 12 | #define VER "version " VERSION 13 | #endif 14 | 15 | #define VERSTRFMT "v1.0 (NSIS Custom Build, %s)" 16 | #define VERSTRSCMREVMAX 20 17 | 18 | static char versionbuf[sizeof(VERSTRFMT)-2+VERSTRSCMREVMAX]; 19 | const char *const version = versionbuf; 20 | 21 | void initversionstring(void) 22 | { 23 | char scmverbuf[VERSTRSCMREVMAX+1]; 24 | int cchsvnrev = 0; 25 | /* SCM trigger 20211223 */ 26 | const char*svnproprev = "$Revision$"; 27 | if ('$' == *svnproprev++) 28 | { 29 | const char*p; 30 | while('$' != *svnproprev && !isdigit(*svnproprev)) svnproprev++; 31 | for (p = svnproprev; isdigit(*p); ++p) cchsvnrev++; 32 | } 33 | if (!cchsvnrev) 34 | { 35 | cchsvnrev = 1; 36 | svnproprev = "?"; 37 | } 38 | 39 | strcpy(scmverbuf, "SVN:r"); 40 | strncat(scmverbuf, svnproprev, cchsvnrev); 41 | sprintf(versionbuf,VERSTRFMT,scmverbuf); 42 | } 43 | 44 | -------------------------------------------------------------------------------- /Docs/src/compilerflags.but: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Docs/src/compilerflags.but -------------------------------------------------------------------------------- /Docs/src/config.but: -------------------------------------------------------------------------------- 1 | \#{**********************************************} 2 | \#{* Common config shared by all output formats *} 3 | \#{**********************************************} 4 | 5 | \cfg{html-lang}{en} 6 | 7 | \cfg{html-suppress-address}{true} 8 | 9 | \cfg{html-append-meta}{name="viewport" content="width=device-width, initial-scale=1"} 10 | 11 | \define{NsisCopyright} Copyright (C) 1999-2025 Contributors 12 | 13 | \copyright \NsisCopyright 14 | 15 | \preamble Check \W{https://nsis.sourceforge.io/}{http://nsis.sf.net} for news, information, support, examples, tutorials and more. 16 | 17 | \preamble Quick links:\\\W{https://nsis.sourceforge.io/support/faq/}{FAQ} - A list of frequently asked questions\\\W{https://nsis.sourceforge.io/wiki/}{NSIS Wiki} - Examples, functions, tutorials, plug-ins, software and more\\\W{http://forums.winamp.com/forumdisplay.php?forumid=65}{Forum} - Post questions or discuss NSIS features 18 | 19 | \define{NsisFuncReqU} This function is only available when building a \R{intro-unicode}{Unicode installer}. 20 | 21 | \define{NsisFuncReq64} This function is only available when building a 64-bit installer. 22 | 23 | \define{NsisACPcp} system default ANSI codepage (ACP) 24 | 25 | \define{NsisInputCharset} ACP|OEM|CP#|UTF8|UTF16 26 | 27 | \define{NsisOutputCharset} ACP|OEM|CP#|UTF8[SIG]|UTF16[BOM] 28 | 29 | \define{NsisWarnBlockContainerBegin} \\
30 | 31 | \define{NsisWarnBlockContainerEnd} \\ 32 | 33 | \define{NsisBlockHeaderWarning} \s{Warning:} 34 | 35 | \define{NsisBlockHeaderNote} \s{Note:} 36 | 37 | \define{NsisBlockHeaderExeheadU} \s{Unicode:} 38 | -------------------------------------------------------------------------------- /Docs/src/config_chm.but: -------------------------------------------------------------------------------- 1 | \title NSIS Users Manual 2 | 3 | 4 | \#{ Unnamed fragments should generate a smaller file (It will prevent people from making mk:@MSITStore links to named fragments) } 5 | 6 | \cfg{xhtml-keywordfragments}{false} 7 | 8 | \cfg{xhtml-leaf-level}{2} 9 | 10 | \cfg{xhtml-leaf-contains-contents}{false} 11 | 12 | \cfg{xhtml-contents-depth-0}{5} 13 | 14 | \cfg{xhtml-head-end}{} 15 | 16 | \cfg{xhtml-rlink-prefix}{#" onclick="parser('} 17 | 18 | \cfg{xhtml-rlink-suffix}{')} 19 | 20 | \cfg{chm-toc-file}{toc.hhc} 21 | 22 | \cfg{chm-ind-file}{ind.hhk} 23 | 24 | -------------------------------------------------------------------------------- /Docs/src/config_html.but: -------------------------------------------------------------------------------- 1 | \title NSIS Users Manual 2 | 3 | \preamble NSIS is a free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge. 4 | 5 | 6 | \cfg{xhtml-leaf-level}{1} 7 | 8 | \cfg{xhtml-leaf-smallest-contents}{3} 9 | 10 | \cfg{xhtml-leaf-contains-contents}{true} 11 | 12 | \cfg{xhtml-contents-depth-0}{3} 13 | 14 | \cfg{xhtml-head-end}{} 15 | 16 | -------------------------------------------------------------------------------- /Docs/src/config_htmlsingle.but: -------------------------------------------------------------------------------- 1 | \title NSIS Users Manual 2 | 3 | \preamble NSIS is a free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge. 4 | 5 | 6 | \cfg{xhtml-leaf-level}{0} 7 | 8 | 9 | \#SConscript will replace ---HTML:HEAD:STYLE:CSS--- with the CSS from style.css 10 | \#To avoid a horizontal scrollbar for the whole document, pre blocks (code samples) use overflow:auto; and the extra padding is to prevent the scrollbar from obscuring single lines (In some versions of IE?) forums.winamp.com/showthread.php?t=365132 11 | 12 | \cfg{xhtml-head-end}{} 13 | 14 | -------------------------------------------------------------------------------- /Docs/src/config_web.but: -------------------------------------------------------------------------------- 1 | \title NSIS Users Manual 2 | 3 | \preamble NSIS is a free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge. 4 | 5 | 6 | \cfg{xhtml-leaf-level}{1} 7 | 8 | \cfg{xhtml-leaf-smallest-contents}{3} 9 | 10 | \cfg{xhtml-leaf-contains-contents}{true} 11 | 12 | \cfg{xhtml-contents-depth-0}{3} 13 | 14 | \cfg{xhtml-head-end}{} 15 | 16 | \cfg{xhtml-body-end}{SourceForge Logo} 17 | -------------------------------------------------------------------------------- /Docs/src/functions.but: -------------------------------------------------------------------------------- 1 | \H{functions} Functions 2 | 3 | Functions are similar to Sections in that they contain zero or more instructions. User functions are not called by the installer directly, instead they are called from Sections using the \R{call}{Call} instruction. Callback functions will be called by the installer when a certain event occurs. 4 | 5 | Functions must be declared outside of Sections or other Functions. 6 | 7 | \S1{ffunctioncommands} Function Commands 8 | 9 | \S2{ffunction} Function 10 | 11 | \c [function_name] 12 | 13 | Begins and opens a new function. \R{ffunction}{Function} names beginning with "." (e.g. ".Whatever") are generally reserved for callback functions. \R{ffunction}{Function} names beginning with "un." are functions that will be generated in the Uninstaller. Hence, normal install Sections and functions cannot call uninstall functions, and the Uninstall Section and uninstall functions cannot call normal functions. 14 | 15 | \c Function func 16 | \c # some commands 17 | \c FunctionEnd 18 | \c 19 | \c Section 20 | \c Call func 21 | \c SectionEnd 22 | 23 | \S2{ffunctionend} FunctionEnd 24 | 25 | This command closes the current open function. -------------------------------------------------------------------------------- /Docs/src/labels.but: -------------------------------------------------------------------------------- 1 | \S0{labels} Labels 2 | 3 | Labels are the targets of \R{goto}{Goto} instructions and the various branching instructions (such as \R{iferrors}{IfErrors}, \R{messagebox}{MessageBox}, \R{iffileexists}{IfFileExists}, and \R{strcmp}{StrCmp}). Labels must be within a \R{ssection}{Section} or a \R{ffunction}{Function}. Labels are local in scope, meaning they are only accessible from within the \R{ssection}{Section} or \R{ffunction}{Function} that they reside in. 4 | To declare a label, simply use: 5 | 6 | \e{MyLabel:} 7 | 8 | Labels cannot begin with a -, +, !, $, or 0-9. When specifying labels for the various instructions that require them, remember that both an empty string ("") and 0 both represent the next instruction (meaning no \R{goto}{Goto} will occur). Labels beginning with a period (.) are global, meaning you can jump to them from any function or section (though you cannot jump to an uninstall global label from the installer, and vice versa). -------------------------------------------------------------------------------- /Docs/src/log.but: -------------------------------------------------------------------------------- 1 | \S1{installlog} Install Logging Instructions 2 | 3 | \S2{logset} LogSet 4 | 5 | \c on|\\off\\ 6 | 7 | Sets whether install logging to $INSTDIR\\install.log will happen. $INSTDIR must have a value before you call this function or it will not work. Note that the \e{NSIS_CONFIG_LOG} build setting must be set (\c{scons NSIS_CONFIG_LOG=yes}) when building (it is not set by default) to support this. See \R{build}{Building NSIS} for more information about recompiling NSIS. 8 | 9 | \S2{logtext} LogText 10 | 11 | \c text 12 | 13 | If installer logging is enabled, inserts text "text" into the log file. 14 | 15 | \c IfFileExists $WINDIR\notepad.exe 0 +2 16 | \c LogText "$$WINDIR\notepad.exe exists" 17 | -------------------------------------------------------------------------------- /Docs/src/modernui.but: -------------------------------------------------------------------------------- 1 | \A{modernui} Modern User Interface 2 | 3 | NSIS 2 makes it is possible to create installers with a custom user interface. The Modern UI is a interface with a style like the wizards of recent Windows versions. 4 | This new interface also features new pages (Welcome, Finish, Start Menu) and a description area on the components page. The interface and the graphics can be customized using the provided settings. 5 | Using the Modern UI macros and language files, writing scripts with a modern interface is easy. 6 | 7 | For more information and documentation see the \L{../Docs/Modern UI 2/Readme.html}{Modern UI 2 Readme}. 8 | 9 | NSIS 2.34 brought with it a new version of Modern UI - version 2. It is faster and more extendible. It allows plug-ins to add new types of pages and even change existing pages using a simple NSH file. It also uses \L{../Docs/nsDialogs/Readme.html}{nsDialogs} which faster than its elder sibling - InstallOptions. 10 | 11 | For more information and documentation of the old version see the \L{../Docs/Modern UI/Readme.html}{Modern UI Readme}. -------------------------------------------------------------------------------- /Docs/src/nsis.hhp: -------------------------------------------------------------------------------- 1 | [OPTIONS] 2 | Compatibility=1.1 or later 3 | Compiled file=NSIS.chm 4 | Contents file=toc.hhc 5 | Default Window=Main 6 | Default topic=Contents.html 7 | Display compile progress=Yes 8 | Full-text search=Yes 9 | Index file=ind.hhk 10 | Language=0x409 English (United States) 11 | Title=NSIS Users Manual 12 | 13 | [WINDOWS] 14 | Main="NSIS User Manual","toc.hhc","ind.hhk","Contents.html","Contents.html",,,,,0x23520,,0x387e,,0xb0000,,,,,,0 15 | 16 | 17 | [FILES] 18 | Contents.html 19 | 20 | [INFOTYPES] 21 | 22 | -------------------------------------------------------------------------------- /Docs/src/plugin.but: -------------------------------------------------------------------------------- 1 | \S0{plugindlls} Plug-in DLLs 2 | 3 | The abilities of the NSIS scripting language can be extended by utilising functionality provided in a DLL file. Probably the best known example of this is the InstallOptions.dll bundled with every NSIS release. 4 | 5 | When the NSIS compiler starts it scans the plug-ins directory for DLLs and makes a list of the plug-ins found and their exported functions. During compilation, if a sequence such as fred::flintstone is encountered where the compiler expected to find a language keyword the compiler will look through this list. If a list entry specifies that fred.dll exports function flintstone NSIS will pack the fred.dll file into the created installer binary. 6 | 7 | During execution of a plug-in command NSIS will unpack the necessary DLL to a temporary folder ($PLUGINSDIR), push all of the arguments specified (right-to-left order), and then execute the DLL function. 8 | 9 | \S1{usingplug} Using Plug-in Commands 10 | 11 | A plug-in call looks like this: 12 | 13 | \c InstallOptions::dialog "ini_file_location.ini" 14 | 15 | All parameters are pushed onto the stack (in this case, the plug-in function only needs one parameter). Some plug-in commands may not need any parameters on the stack, others might require more of them. To use a plug-in command you will need to read the documentation for the plug-in so that you know what parameters its functions require. 16 | 17 | \S1{calldiskplug} Calling plug-ins manually 18 | 19 | If you want to call a plug-in that is stored on user's hard drive or somewhere else, use \R{callinstdll}{CallInstDLL}. Almost all plug-ins provide installer functionality, so using plug-in commands is way easier. Using \R{callinstdll}{CallInstDLL} can be useful when you have created plug-ins that are linked to a certain version of your application and are being copied to the installation folder. 20 | -------------------------------------------------------------------------------- /Docs/src/reboot.but: -------------------------------------------------------------------------------- 1 | \S{rebootinst} Reboot Instructions 2 | 3 | \S2{reboot} Reboot 4 | 5 | Reboots the computer. Be careful with this one. If it fails, \R{onrebootfailed}{.onRebootFailed} is called. In any case, this instruction never returns, just like \R{quit}{Quit}. 6 | 7 | \c MessageBox MB_YESNO|MB_ICONQUESTION "Do you wish to reboot the system?" IDNO +2 8 | \c Reboot 9 | 10 | \S2{setrebootflag} SetRebootFlag 11 | 12 | \c true|false 13 | 14 | Sets the reboot flag to either true or false. The flag's value can be read using \R{ifrebootflag}{IfRebootFlag}. 15 | 16 | \c SetRebootFlag true 17 | \c IfRebootFlag 0 +2 18 | \c MessageBox MB_OK "this message box will always show" 19 | -------------------------------------------------------------------------------- /Docs/src/stack.but: -------------------------------------------------------------------------------- 1 | \S1{stackinst} Stack Support 2 | 3 | The stack is a temporary storage area useful for saving the state of registers/variables and for communicating with functions and plug-ins. See \W{https://en.wikipedia.org/wiki/Stack_(abstract_data_type)}{Wikipedia} for a general introduction to stacks. 4 | 5 | \S2{Exch} Exch 6 | 7 | \c [user_var | stack_index] 8 | 9 | When no parameter is specified, exchanges the top two elements of the stack. When a parameter is specified and is a user variable, exchanges the top element of the stack with the parameter. When a parameter is specified and is a positive integer, \R{Exch}{Exch} will swap the item on the top of the stack with the item that is specified by the offset from the top of the stack in the parameter. If there are not enough items on the stack to accomplish the exchange, a fatal error will occur (to help you debug your code :). 10 | 11 | \c Push 1 12 | \c Push 2 13 | \c Exch 14 | \c Pop $0 # = 1 15 | 16 | \c Push 1 17 | \c Push 2 18 | \c Push 3 19 | \c Exch 2 20 | \c Pop $0 # = 1 21 | 22 | \c StrCpy $0 1 23 | \c Push 2 24 | \c Exch $0 # = 2 25 | \c Pop $1 # = 1 26 | 27 | \S2{Pop} Pop 28 | 29 | \c user_var(out) 30 | 31 | Pops a string off of the stack into user variable $x. If the stack is empty, the error flag will be set. 32 | 33 | \c Push 1 34 | \c Pop $0 # = 1 35 | 36 | \S2{Push} Push 37 | 38 | \c string 39 | 40 | Pushes a string onto the stack. The string can then be Pop'ed off of the stack. 41 | 42 | \c Push "a string" 43 | -------------------------------------------------------------------------------- /Docs/src/string.but: -------------------------------------------------------------------------------- 1 | \S1{stringinst} String Manipulation Instructions 2 | 3 | \S2{StrCpy} StrCpy 4 | 5 | \c user_var(destination) str [maxlen] [start_offset] 6 | 7 | Sets the user variable $x with str. str can contain variables (including the user variable being set (concatenating strings this way is possible, etc)). If maxlen is specified, the string will be a maximum of maxlen characters (if maxlen is negative, the string will be truncated abs(maxlen) characters from the end). If start_offset is specified, the source is offset by it (if start_offset is negative, it will start abs(start_offset) from the end of the string). 8 | 9 | \c StrCpy $0 "a string" # = "a string" 10 | \c StrCpy $0 "a string" 3 # = "a s" 11 | \c StrCpy $0 "a string" -1 # = "a strin" 12 | \c StrCpy $0 "a string" "" 2 # = "string" 13 | \c StrCpy $0 "a string" "" -3 # = "ing" 14 | \c StrCpy $0 "a string" 3 -4 # = "rin" 15 | \c StrCpy $0 "$0$0" # = "rinrin" 16 | 17 | \S2{StrLen} StrLen 18 | 19 | \c user_var(length output) str 20 | 21 | Sets user variable $x to the length of str. 22 | 23 | \c StrLen $0 "123456" # = 6 24 | -------------------------------------------------------------------------------- /Docs/src/uninstall.but: -------------------------------------------------------------------------------- 1 | \S1{uninst} Uninstaller Instructions 2 | 3 | \S2{writeuninstaller} WriteUninstaller 4 | 5 | \c [Path\]exename.exe 6 | 7 | Writes the uninstaller to the filename (and optionally path) specified. Only valid from within an install section or function and requires that you have an uninstall section in your script. You can call this one or more times to write out one or more copies of the uninstaller. 8 | 9 | \c WriteUninstaller $INSTDIR\uninstaller.exe 10 | -------------------------------------------------------------------------------- /Docs/src/usection.but: -------------------------------------------------------------------------------- 1 | \S1{UninstallSection} Uninstall Section 2 | 3 | A special \R{ssection}{Section} named 'Uninstall' must be created in order to generate an uninstaller. This section should remove all files, registry keys etc etc that were installed by the installer, from the system. Here is an example of a simple uninstall section: 4 | 5 | \c Section "Uninstall" 6 | \c Delete $INSTDIR\Uninst.exe ; delete self (see explanation below why this works) 7 | \c Delete $INSTDIR\myApp.exe 8 | \c RMDir $INSTDIR 9 | \c DeleteRegKey HKLM SOFTWARE\myApp 10 | \c SectionEnd 11 | 12 | The first \R{delete}{Delete} instruction works (deleting the uninstaller), because the uninstaller is transparently copied to the system temporary directory for the uninstall. 13 | 14 | Note that in uninstaller code, $INSTDIR contains the directory where the uninstaller lies. It does \s{not} necessarily contain the same value it contained in the installer. 15 | -------------------------------------------------------------------------------- /Docs/style.css: -------------------------------------------------------------------------------- 1 | html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: #000000; background-color: #ffffff; } 2 | html { font-size: 0.8em; } 3 | body { font-size: 1em; font-size: 1rem; } 4 | 5 | p, li { 6 | font-size: 100%; 7 | } 8 | h1 { 9 | font-size: 170%; 10 | } 11 | h2 { 12 | font-size: 150%; 13 | } 14 | h3 { 15 | font-size: 130%; 16 | } 17 | h4 { 18 | font-size: 120%; 19 | } 20 | h5 { 21 | font-size: 115%; 22 | } 23 | h6 { 24 | font-size: 110%; 25 | } 26 | pre, code { 27 | font-family: Courier New, Courier, monospace,serif; /* code.iamkate.com/html-and-css/fixing-browsers-broken-monospace-font-handling/ */ 28 | } 29 | code { 30 | font-size: 100%; 31 | } 32 | pre { 33 | font-size: 100%; 34 | background-color: #F7F7F7; 35 | padding: 1px; 36 | } 37 | pre b { 38 | text-decoration: underline; 39 | } 40 | a { 41 | color: #567599; 42 | text-decoration: none; 43 | } 44 | a:hover { 45 | color: #303030; 46 | text-decoration: underline; 47 | } 48 | .btitle { 49 | color: #000000; 50 | text-decoration: none; 51 | } 52 | .btitle:hover { 53 | color: #000000; 54 | text-decoration: underline; 55 | } 56 | .wb { 57 | color: #000000; background-color: #FFFFD8; 58 | border: 1px solid #CECEAA; 59 | padding: 0.2em; 60 | } 61 | 62 | :root { color-scheme: light dark; } 63 | @media (prefers-color-scheme: dark) { 64 | html, body { color: #eee; background-color:#161616; } 65 | a, a:link, a:visited, a:active { color: #8ce; } a:hover { color: #29c; } 66 | .btitle { color: #ccc !important; } .btitle:hover { color: #aaa !important; } 67 | pre { background-color: #202020; } 68 | .wb { color: #a6a688; background-color: #454535; border-color: #3b3b30; } 69 | } -------------------------------------------------------------------------------- /Docs/unreleased.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Docs/unreleased.png -------------------------------------------------------------------------------- /Examples/Memento.nsi: -------------------------------------------------------------------------------- 1 | !include LogicLib.nsh 2 | !include Memento.nsh 3 | 4 | Name Memento 5 | OutFile Memento.exe 6 | 7 | XPStyle on 8 | 9 | ShowInstDetails show 10 | 11 | Page components 12 | Page instfiles 13 | 14 | RequestExecutionLevel user 15 | 16 | # settings 17 | 18 | !define MEMENTO_REGISTRY_ROOT HKCU 19 | !define MEMENTO_REGISTRY_KEY "Software\NSIS\Memento Test" 20 | 21 | # restore 22 | 23 | Function .onInit 24 | 25 | ${If} ${Cmd} `MessageBox MB_YESNO "Would you like to load an example state?" IDYES` 26 | 27 | DeleteRegKey HKCU "Software\NSIS\Memento Test" 28 | 29 | WriteRegStr HKCU "Software\NSIS\Memento Test" MementoSectionUsed "" 30 | WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_horse 1 31 | WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_chicken 1 32 | WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_donkey 0 33 | WriteRegDWORD HKCU "Software\NSIS\Memento Test" MementoSection_sec_croc 0 34 | 35 | ${EndIf} 36 | 37 | ${MementoSectionRestore} 38 | 39 | FunctionEnd 40 | 41 | # sections 42 | 43 | ${MementoSection} horse sec_horse 44 | ${MementoSectionEnd} 45 | 46 | ${MementoSection} donkey sec_donkey 47 | ${MementoSectionEnd} 48 | 49 | ${MementoSection} chicken sec_chicken 50 | ${MementoSectionEnd} 51 | 52 | SectionGroup /e group 53 | 54 | SectionGroup /e group 55 | 56 | ${MementoSection} croc sec_croc 57 | ${MementoSectionEnd} 58 | 59 | ${MementoSection} cow sec_cow 60 | ${MementoSectionEnd} 61 | 62 | SectionGroupEnd 63 | 64 | SectionGroupEnd 65 | 66 | ${MementoUnselectedSection} dinosaur sec_dinosaur 67 | ${MementoSectionEnd} 68 | 69 | # done... 70 | 71 | ${MementoSectionDone} 72 | 73 | # save 74 | 75 | Function .onInstSuccess 76 | 77 | ${MementoSectionSave} 78 | 79 | FunctionEnd 80 | -------------------------------------------------------------------------------- /Examples/SConscript: -------------------------------------------------------------------------------- 1 | examples = Split(""" 2 | bigtest.nsi 3 | example1.nsi 4 | example2.nsi 5 | FileFunc.ini 6 | FileFunc.nsi 7 | FileFuncTest.nsi 8 | gfx.nsi 9 | AppGen.nsi 10 | install-per-user.nsi 11 | install-shared.nsi 12 | languages.nsi 13 | Library.nsi 14 | LogicLib.nsi 15 | makensis.nsi 16 | makensis-fork.nsi 17 | Memento.nsi 18 | MultiUser.nsi 19 | ModernXL.nsi 20 | NSISMenu.nsi 21 | one-section.nsi 22 | primes.nsi 23 | rtest.nsi 24 | silent.nsi 25 | StrFunc.nsi 26 | TextFunc.ini 27 | TextFunc.nsi 28 | TextFuncTest.nsi 29 | unicode.nsi 30 | VersionInfo.nsi 31 | waplugin.nsi 32 | WordFunc.ini 33 | WordFunc.nsi 34 | WordFuncTest.nsi 35 | """) 36 | 37 | mui_examples = [ 38 | 'Modern UI/Basic.nsi', 39 | 'Modern UI/HeaderBitmap.nsi', 40 | 'Modern UI/MultiLanguage.nsi', 41 | 'Modern UI/StartMenu.nsi', 42 | 'Modern UI/WelcomeFinish.nsi' 43 | ] 44 | 45 | Import('env') 46 | 47 | env.DistributeExamples(examples) 48 | env.DistributeExamples(mui_examples, path='Modern UI') 49 | -------------------------------------------------------------------------------- /Examples/VersionInfo.nsi: -------------------------------------------------------------------------------- 1 | ; VersionInfo.nsi 2 | ; 3 | ; This script shows you how to add version information to an installer. 4 | ; Windows shows this information on the Version tab of the File properties. 5 | 6 | ;-------------------------------- 7 | 8 | Name "Version Info" 9 | 10 | OutFile "VersionInfo.exe" 11 | 12 | LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf" 13 | ;-------------------------------- 14 | ;Version Information 15 | 16 | VIProductVersion "1.2.3.4" 17 | VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Test Application" 18 | VIAddVersionKey /LANG=${LANG_ENGLISH} "Comments" "A test comment" 19 | VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Fake company" 20 | VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Test Application is a trademark of Fake company" 21 | VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright Fake company" 22 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Test Application" 23 | VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "1.2.3" 24 | 25 | ;-------------------------------- 26 | 27 | Section "" 28 | 29 | SectionEnd 30 | -------------------------------------------------------------------------------- /Examples/example1.nsi: -------------------------------------------------------------------------------- 1 | ; example1.nsi 2 | ; 3 | ; This script is perhaps one of the simplest NSIs you can make. All of the 4 | ; optional settings are left to their default settings. The installer simply 5 | ; prompts the user asking them where to install, and drops a copy of example1.nsi 6 | ; there. 7 | ; 8 | ; example2.nsi expands on this by adding a uninstaller and start menu shortcuts. 9 | 10 | ;-------------------------------- 11 | 12 | ; The name of the installer 13 | Name "Example1" 14 | 15 | ; The file to write 16 | OutFile "example1.exe" 17 | 18 | ; Request application privileges for Windows Vista 19 | RequestExecutionLevel user 20 | 21 | ; Build Unicode installer 22 | Unicode True 23 | 24 | ; The default installation directory 25 | InstallDir $DESKTOP\Example1 26 | 27 | ;-------------------------------- 28 | 29 | ; Pages 30 | 31 | Page directory 32 | Page instfiles 33 | 34 | ;-------------------------------- 35 | 36 | ; The stuff to install 37 | Section "" ;No components page, name is not important 38 | 39 | ; Set output path to the installation directory. 40 | SetOutPath $INSTDIR 41 | 42 | ; Put file there 43 | File example1.nsi 44 | 45 | SectionEnd 46 | -------------------------------------------------------------------------------- /Examples/one-section.nsi: -------------------------------------------------------------------------------- 1 | ; one-section.nsi 2 | ; 3 | ; This example demonstrates how to control section selection. 4 | ; It allows only one of the sections of a group to be selected. 5 | 6 | ;-------------------------------- 7 | 8 | ; Section define/macro header file 9 | ; See this header file for more info 10 | 11 | !include "Sections.nsh" 12 | 13 | ;-------------------------------- 14 | 15 | Name "One Section" 16 | OutFile "one-section.exe" 17 | RequestExecutionLevel user 18 | 19 | ;-------------------------------- 20 | 21 | ; Pages 22 | 23 | Page Components 24 | Page InstFiles 25 | 26 | ;-------------------------------- 27 | 28 | ; Sections 29 | 30 | Section !Required 31 | SectionIn RO 32 | SectionEnd 33 | 34 | Section "Group 1 - Option 1" g1o1 35 | SectionEnd 36 | 37 | Section /o "Group 1 - Option 2" g1o2 38 | SectionEnd 39 | 40 | Section /o "Group 1 - Option 3" g1o3 41 | SectionEnd 42 | 43 | Section "Group 2 - Option 1" g2o1 44 | SectionEnd 45 | 46 | Section /o "Group 2 - Option 2" g2o2 47 | SectionEnd 48 | 49 | Section /o "Group 2 - Option 3" g2o3 50 | SectionEnd 51 | 52 | ;-------------------------------- 53 | 54 | ; Functions 55 | 56 | ; $1 stores the status of group 1 57 | ; $2 stores the status of group 2 58 | 59 | Function .onInit 60 | 61 | StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default 62 | StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default 63 | 64 | FunctionEnd 65 | 66 | Function .onSelChange 67 | 68 | !insertmacro StartRadioButtons $1 69 | !insertmacro RadioButton ${g1o1} 70 | !insertmacro RadioButton ${g1o2} 71 | !insertmacro RadioButton ${g1o3} 72 | !insertmacro EndRadioButtons 73 | 74 | !insertmacro StartRadioButtons $2 75 | !insertmacro RadioButton ${g2o1} 76 | !insertmacro RadioButton ${g2o2} 77 | !insertmacro RadioButton ${g2o3} 78 | !insertmacro EndRadioButtons 79 | 80 | FunctionEnd -------------------------------------------------------------------------------- /Examples/primes.nsi: -------------------------------------------------------------------------------- 1 | ; primes.nsi 2 | ; 3 | ; This is an example of the possibilities of the NSIS Script language. 4 | ; It calculates prime numbers. 5 | 6 | ;-------------------------------- 7 | 8 | Name "primes" 9 | AllowRootDirInstall true 10 | OutFile "primes.exe" 11 | Caption "Prime number generator" 12 | ShowInstDetails show 13 | AllowRootDirInstall true 14 | InstallDir "$EXEDIR" 15 | RequestExecutionLevel user 16 | 17 | DirText "Select a directory to write primes.txt. $_CLICK" 18 | 19 | ;-------------------------------- 20 | 21 | ;Pages 22 | 23 | Page directory 24 | Page instfiles 25 | 26 | ;-------------------------------- 27 | 28 | Section "" 29 | SetOutPath $INSTDIR 30 | Call DoPrimes 31 | SectionEnd 32 | 33 | ;-------------------------------- 34 | 35 | Function DoPrimes 36 | 37 | ; we put this in here so it doesn't update the progress bar (faster) 38 | 39 | !define PPOS $0 ; position in prime searching 40 | !define PDIV $1 ; divisor 41 | !define PMOD $2 ; the result of the modulus 42 | !define PCNT $3 ; count of how many we've printed 43 | FileOpen $9 $INSTDIR\primes.txt w 44 | 45 | DetailPrint "2 is prime!" 46 | FileWrite $9 "2 is prime!$\r$\n" 47 | DetailPrint "3 is prime!" 48 | FileWrite $9 "3 is prime!$\r$\n" 49 | Strcpy ${PPOS} 3 50 | Strcpy ${PCNT} 2 51 | outerloop: 52 | StrCpy ${PDIV} 3 53 | innerloop: 54 | IntOp ${PMOD} ${PPOS} % ${PDIV} 55 | IntCmp ${PMOD} 0 notprime 56 | IntOp ${PDIV} ${PDIV} + 2 57 | IntCmp ${PDIV} ${PPOS} 0 innerloop 0 58 | DetailPrint "${PPOS} is prime!" 59 | FileWrite $9 "${PPOS} is prime!$\r$\n" 60 | IntOp ${PCNT} ${PCNT} + 1 61 | IntCmp ${PCNT} 100 0 innerloop 62 | StrCpy ${PCNT} 0 63 | MessageBox MB_YESNO "Process more?" IDNO stop 64 | notprime: 65 | IntOp ${PPOS} ${PPOS} + 2 66 | Goto outerloop 67 | stop: 68 | FileClose $9 69 | 70 | FunctionEnd -------------------------------------------------------------------------------- /Examples/rtest.nsi: -------------------------------------------------------------------------------- 1 | ; rtest.nsi 2 | ; 3 | ; This script tests some advanced NSIS functions. 4 | 5 | ;-------------------------------- 6 | 7 | Name "rtest" 8 | OutFile "rtest.exe" 9 | 10 | ComponentText "Select tests!" 11 | ShowInstDetails show 12 | 13 | RequestExecutionLevel user 14 | 15 | ;-------------------------------- 16 | 17 | Section "Test 1" 18 | 19 | StrCpy $R0 "a" 20 | 21 | GetFunctionAddress $R1 test1 22 | Call $R1 23 | 24 | StrCmp $R0 "a182345678" success 25 | 26 | DetailPrint "Test 1 failed (output: $R0)" 27 | Goto end 28 | 29 | success: 30 | DetailPrint "Test 1 succeeded (output: $R0)" 31 | 32 | end: 33 | 34 | SectionEnd 35 | 36 | Function test1 37 | 38 | GetLabelAddress $9 skip 39 | 40 | IntOp $9 $9 - 1 41 | StrCpy $R0 $R01 42 | 43 | Call $9 44 | 45 | StrCpy $R0 $R02 46 | StrCpy $R0 $R03 47 | StrCpy $R0 $R04 48 | StrCpy $R0 $R05 49 | StrCpy $R0 $R06 50 | StrCpy $R0 $R07 51 | StrCpy $R0 $R08 52 | 53 | skip: 54 | 55 | FunctionEnd 56 | 57 | ;-------------------------------- 58 | 59 | Section "Test 2" 60 | 61 | StrCpy $R0 "0" 62 | StrCpy $R1 "11" 63 | 64 | Call test2 65 | 66 | StrCmp $R1 "11,10,9,8,7,6,5,4,3,2,1" success 67 | 68 | DetailPrint "Test 2 failed (output: $R1)" 69 | Goto end 70 | 71 | success: 72 | DetailPrint "Test 2 succeeded (output: $R1)" 73 | 74 | end: 75 | 76 | SectionEnd 77 | 78 | Function test2 79 | 80 | IntOp $R0 $R0 + 1 81 | IntCmp $R0 10 done 82 | 83 | Push $R0 84 | 85 | GetFunctionAddress $R2 test2 86 | Call $R2 87 | 88 | Pop $R0 89 | 90 | done: 91 | StrCpy $R1 "$R1,$R0" 92 | 93 | FunctionEnd -------------------------------------------------------------------------------- /Examples/unicode.nsi: -------------------------------------------------------------------------------- 1 | ; Unicode installers will not be able to run on Windows 9x! 2 | Unicode true 3 | 4 | Name "Unicode Games" 5 | OutFile "unicode.exe" 6 | RequestExecutionLevel User 7 | ShowInstDetails show 8 | XPStyle on 9 | 10 | 11 | Section "Unicode in UI" 12 | 13 | DetailPrint "Hello World!" 14 | DetailPrint "שלום עולם!" 15 | DetailPrint "مرحبا العالم!" 16 | DetailPrint "こんにちは、世界!" 17 | DetailPrint "你好世界!" 18 | DetailPrint "привет мир!" 19 | DetailPrint "안녕하세요!" 20 | 21 | DetailPrint "${U+00A9}" # arbitrary unicode chars 22 | 23 | SectionEnd 24 | 25 | 26 | Section "Unicode in Files" 27 | 28 | Var /Global Message 29 | 30 | InitPluginsDir 31 | FileOpen $0 "$PluginsDir\Test.txt" w 32 | IfErrors done 33 | FileWriteUTF16LE /BOM $0 "Hello World " 34 | FileWriteWord $0 0xD83C # Manually write ${U+1F30D} 35 | FileWriteWord $0 0xDF0D # as surrogate-pair 36 | FileWriteUTF16LE $0 " and Sun ${U+2600}$\r$\n" 37 | FileClose $0 38 | 39 | FileOpen $0 "$PluginsDir\Test.txt" r 40 | IfErrors done 41 | FileReadUTF16LE $0 $Message 42 | FileClose $0 43 | 44 | DetailPrint "Message: $Message" 45 | done: 46 | 47 | SectionEnd 48 | -------------------------------------------------------------------------------- /Include/Integration.nsh: -------------------------------------------------------------------------------- 1 | !verbose push 3 2 | !ifndef INTEGRATION_INCLUDED 3 | !define INTEGRATION_INCLUDED 1 4 | 5 | !include "Util.nsh" 6 | 7 | 8 | !define NotifyShell_AssocChanged `System::Call 'SHELL32::SHChangeNotify(i0x8000000,i0,p0,p0)'` ; Notify the shell with SHCNE_ASSOCCHANGED 9 | 10 | 11 | !define UnpinShortcut "!insertmacro UnpinShortcut " 12 | !macro UnpinShortcut lnkpath 13 | Push "${lnkpath}" 14 | ${CallArtificialFunction} UnpinShortcut_Implementation 15 | !macroend 16 | !macro UnpinShortcut_Implementation 17 | !include "LogicLib.nsh" 18 | !include "Win\COM.nsh" 19 | Exch $0 20 | Push $1 21 | !insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} ${IID_IStartMenuPinnedList} r1 "" 22 | ${If} $1 P<> 0 23 | System::Call 'SHELL32::SHCreateItemFromParsingName(wr0,p0,g"${IID_IShellItem}",*p0r0)' 24 | ${If} $0 P<> 0 25 | ${IStartMenuPinnedList::RemoveFromList} $1 '(r0)' 26 | ${IUnknown::Release} $0 "" 27 | ${EndIf} 28 | ${IUnknown::Release} $1 "" 29 | !ifdef NSIS_IX86 | NSIS_AMD64 30 | ${Else} 31 | !insertmacro ComHlpr_CreateInProcInstance ${CLSID_StartMenuPin} "{ec35e37a-6579-4f3c-93cd-6e62c4ef7636}" r1 "" 32 | ${If} $1 P<> 0 33 | ExecShellWait /INVOKEIDLIST "unpin" $0 ; WinXP 34 | ${IUnknown::Release} $1 "" 35 | ${EndIf} 36 | !endif 37 | ${EndIf} 38 | Pop $1 39 | Pop $0 40 | !macroend 41 | 42 | 43 | !endif #!INCLUDED 44 | !verbose pop 45 | -------------------------------------------------------------------------------- /Include/MUI.nsh: -------------------------------------------------------------------------------- 1 | !include "${NSISDIR}\Contrib\Modern UI\System.nsh" -------------------------------------------------------------------------------- /Include/MUI2.nsh: -------------------------------------------------------------------------------- 1 | !include "${NSISDIR}\Contrib\Modern UI 2\MUI2.nsh" -------------------------------------------------------------------------------- /Include/ModernXL.nsh: -------------------------------------------------------------------------------- 1 | 2 | !ifdef MUI_INCLUDED 3 | !error '"ModernXL.nsh" must be included before "MUI2.nsh"' 4 | !endif 5 | 6 | !define /ifndef MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\modern-xl-install.bmp" 7 | !define /ifndef MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\modern-xl-uninstall.bmp" 8 | 9 | ;!define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCrop 10 | ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCrop 11 | 12 | !define /ifndef MUI_UI "${NSISDIR}\Contrib\UIs\xl.exe" 13 | !define /ifndef MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\xl_headerbmp.exe" 14 | !define /ifndef MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\xl_headerbmpr.exe" 15 | 16 | !define /ifndef MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\xl_smalldesc.exe" 17 | !define /ifndef MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\xl_nodesc.exe" 18 | -------------------------------------------------------------------------------- /Include/ModernXXL.nsh: -------------------------------------------------------------------------------- 1 | 2 | !ifdef MUI_INCLUDED 3 | !error '"ModernXXL.nsh" must be included before "MUI2.nsh"' 4 | !endif 5 | 6 | !define /ifndef MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\modern-xxl-install.bmp" 7 | !define /ifndef MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\modern-xxl-uninstall.bmp" 8 | 9 | ;!define MUI_WELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCrop 10 | ;!define MUI_UNWELCOMEFINISHPAGE_BITMAP_STRETCH NoStretchNoCrop 11 | 12 | !define /ifndef MUI_UI "${NSISDIR}\Contrib\UIs\xxl.exe" 13 | !define /ifndef MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\xxl_headerbmp.exe" 14 | !define /ifndef MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\xxl_headerbmpr.exe" 15 | 16 | !define /ifndef MUI_UI_COMPONENTSPAGE_SMALLDESC "${NSISDIR}\Contrib\UIs\xxl_smalldesc.exe" 17 | !define /ifndef MUI_UI_COMPONENTSPAGE_NODESC "${NSISDIR}\Contrib\UIs\xxl_nodesc.exe" 18 | -------------------------------------------------------------------------------- /Include/SConscript: -------------------------------------------------------------------------------- 1 | includes = Split(""" 2 | Colors.nsh 3 | FileFunc.nsh 4 | Integration.nsh 5 | LangFile.nsh 6 | Library.nsh 7 | LogicLib.nsh 8 | Memento.nsh 9 | ModernXL.nsh 10 | ModernXXL.nsh 11 | MUI.nsh 12 | MUI2.nsh 13 | Sections.nsh 14 | StrFunc.nsh 15 | TextFunc.nsh 16 | UpgradeDLL.nsh 17 | Util.nsh 18 | VB6RunTime.nsh 19 | WinCore.nsh 20 | WinMessages.nsh 21 | WinVer.nsh 22 | WordFunc.nsh 23 | x64.nsh 24 | """) 25 | 26 | includesWin = Split(""" 27 | Win/COM.nsh 28 | Win/Propkey.nsh 29 | Win/RestartManager.nsh 30 | Win/WinDef.nsh 31 | Win/WinError.nsh 32 | Win/WinNT.nsh 33 | Win/WinUser.nsh 34 | """) 35 | 36 | Import('env') 37 | 38 | env.DistributeInclude(includes) 39 | env.DistributeInclude(includesWin, path='Win') 40 | env.DistributeDocs('StrFunc.txt', path='StrFunc') 41 | -------------------------------------------------------------------------------- /Menu/images/header-notext.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Menu/images/header-notext.gif -------------------------------------------------------------------------------- /Menu/images/header.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Menu/images/header.gif -------------------------------------------------------------------------------- /Menu/images/line.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Menu/images/line.gif -------------------------------------------------------------------------------- /Menu/images/site.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Menu/images/site.gif -------------------------------------------------------------------------------- /Menu/notinstalled.html: -------------------------------------------------------------------------------- 1 | 2 | NSIS Menu 3 | 4 |
5 | 6 | 7 | 9 | 19 | 20 |
8 | 10 |

11 | Feature not installed

12 |

13 | The feature you selected is not installed.

14 |

15 | If you want to use this feature, run NSIS Setup again to install it.

16 |

17 | <- Back

18 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /SCons/Config/default: -------------------------------------------------------------------------------- 1 | print("Using default tools configuration") 2 | 3 | Import('defenv') 4 | 5 | ### flags 6 | 7 | defenv['ENTRY_FLAG'] = lambda x,u: '' 8 | defenv['MAP_FLAG'] = '' 9 | defenv['EXCEPTION_FLAG'] = '' 10 | defenv['NODEFLIBS_FLAG'] = '' 11 | defenv['C_FLAG'] = '' 12 | defenv['CPP_FLAG'] = '' 13 | defenv['CPP_REQUIRES_STDLIB'] = 0 14 | defenv['SUBSYS_CON'] = '' 15 | defenv['SUBSYS_WIN'] = '' 16 | defenv['MSVCRT_FLAG'] = '' 17 | defenv['STDCALL'] = '' 18 | 19 | ### defines 20 | 21 | defenv.Append(CPPDEFINES = [('NSISCALL', '$STDCALL')]) 22 | 23 | ### unicode 24 | tdefenv = defenv.Clone() 25 | if tdefenv['UNICODE']: 26 | tdefenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE']) 27 | 28 | ### stub environment 29 | 30 | stub_env = defenv.Clone() 31 | 32 | stub_env.Append(CPPPATH = ['#$BUILD_CONFIG']) 33 | 34 | stub_uenv = stub_env.Clone() 35 | stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE']) 36 | 37 | ### makensis environment 38 | 39 | makensis_env = tdefenv.Clone() 40 | 41 | makensis_env.Append(CPPPATH = ['#$BUILD_CONFIG']) 42 | 43 | ### plugin environment 44 | 45 | plugin_env = defenv.Clone(no_import_lib = 1) 46 | 47 | plugin_uenv = plugin_env.Clone() 48 | plugin_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE']) 49 | 50 | ### util environment 51 | 52 | util_env = tdefenv.Clone() 53 | 54 | ### cross-platform util environment 55 | 56 | cp_util_env = tdefenv.Clone() 57 | 58 | cp_util_env.Append(CPPPATH = ['#$BUILD_CONFIG']) 59 | 60 | ### test environment 61 | 62 | test_env = defenv.Clone() 63 | 64 | test_env.Append(CPPPATH = ['#$BUILD_CONFIG']) 65 | 66 | # return 67 | 68 | Return('stub_env makensis_env plugin_env util_env cp_util_env test_env stub_uenv plugin_uenv') 69 | -------------------------------------------------------------------------------- /SCons/Config/memcpy.c: -------------------------------------------------------------------------------- 1 | #include // for size_t 2 | void *memcpy(void *out, const void *in, size_t len) 3 | { 4 | char *c_out=(char*)out; 5 | char *c_in=(char *)in; 6 | while (len-- > 0) 7 | { 8 | *c_out++=*c_in++; 9 | } 10 | return out; 11 | } 12 | -------------------------------------------------------------------------------- /SCons/Config/memset.c: -------------------------------------------------------------------------------- 1 | #include // for size_t 2 | 3 | void *memset(void *mem, int c, size_t len) 4 | { 5 | /* 6 | ** Prevent MSVC 14.00.40310.41-AMD64 from generating a recursive call to memset 7 | ** 8 | ** #pragma optimize("", off) + #pragma optimize("ty", on) can also 9 | ** be used but it generates a lot more code. 10 | */ 11 | #if defined(_MSC_VER) && _MSC_VER > 1200 && _MSC_FULL_VER <= 140040310 12 | volatile 13 | #endif 14 | char *p=(char*)mem; 15 | while (len-- > 0) 16 | { 17 | *p++=c; 18 | } 19 | return mem; 20 | } 21 | -------------------------------------------------------------------------------- /Scripts/RegRestore.nsi: -------------------------------------------------------------------------------- 1 | Name "Restore NSIS Registry" 2 | OutFile RegRestore.exe 3 | 4 | SilentInstall silent 5 | 6 | XPStyle on 7 | 8 | Section 9 | WriteRegStr HKLM SOFTWARE\NSIS "" $PROGRAMFILES\NSIS 10 | WriteRegStr HKCR NSIS.Header\DefaultIcon "" $PROGRAMFILES\NSIS\makensisw.exe,1 11 | WriteRegStr HKCR NSIS.Script\DefaultIcon "" $PROGRAMFILES\NSIS\makensisw.exe,1 12 | WriteRegStr HKCR NSIS.Script\shell\compile\command "" '"$PROGRAMFILES\NSIS\makensisw.exe" "%1"' 13 | WriteRegStr HKCR NSIS.Script\shell\compile-compressor\command "" '"$PROGRAMFILES\NSIS\makensisw.exe" /ChooseCompressor "%1"' 14 | MessageBox MB_OK Restored! 15 | SectionEnd 16 | -------------------------------------------------------------------------------- /Source/7zip/7zGuids.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * 7zGuids.cpp 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | * 17 | * Reviewed for Unicode support by Jim Park -- 08/24/2007 18 | */ 19 | 20 | // DLLExports.cpp 21 | 22 | // #include "StdAfx.h" 23 | 24 | #ifdef _WIN32 25 | # include 26 | # include 27 | #endif 28 | 29 | #ifndef INITGUID 30 | # define INITGUID 31 | #endif 32 | 33 | #include "../Platform.h" 34 | 35 | #include "7zip/ICoder.h" 36 | #include "7zip/Compress/LZ/IMatchFinder.h" 37 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Common/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | #include "../../Common/MyWindows.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Common/StreamUtils.h: -------------------------------------------------------------------------------- 1 | /* 2 | * StreamUtils.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __STREAMUTILS_H 19 | #define __STREAMUTILS_H 20 | 21 | #include "../IStream.h" 22 | 23 | HRESULT ReadStream(ISequentialInStream *stream, void *data, UInt32 size, UInt32 *processedSize); 24 | HRESULT WriteStream(ISequentialOutStream *stream, const void *data, UInt32 size, UInt32 *processedSize); 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree2.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTree2.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE2_H 19 | #define __BINTREE2_H 20 | 21 | #define BT_NAMESPACE NBT2 22 | 23 | #include "BinTreeMain.h" 24 | 25 | #undef BT_NAMESPACE 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree3.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTree3.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE3_H 19 | #define __BINTREE3_H 20 | 21 | #define BT_NAMESPACE NBT3 22 | 23 | #define HASH_ARRAY_2 24 | 25 | #include "BinTreeMain.h" 26 | 27 | #undef HASH_ARRAY_2 28 | 29 | #undef BT_NAMESPACE 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree3Z.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTree3Z.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE3Z_H 19 | #define __BINTREE3Z_H 20 | 21 | #define BT_NAMESPACE NBT3Z 22 | 23 | #define HASH_ZIP 24 | 25 | #include "BinTreeMain.h" 26 | 27 | #undef HASH_ZIP 28 | 29 | #undef BT_NAMESPACE 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree3ZMain.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTree3ZMain.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE3ZMAIN__H 19 | #define __BINTREE3ZMAIN__H 20 | 21 | #undef BT_NAMESPACE 22 | #define BT_NAMESPACE NBT3Z 23 | 24 | #define HASH_ZIP 25 | 26 | #include "BinTreeMain.h" 27 | 28 | #undef HASH_ZIP 29 | 30 | #endif 31 | 32 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree4.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTree4.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE4_H 19 | #define __BINTREE4_H 20 | 21 | #define BT_NAMESPACE NBT4 22 | 23 | #define HASH_ARRAY_2 24 | #define HASH_ARRAY_3 25 | 26 | #include "BinTreeMain.h" 27 | 28 | #undef HASH_ARRAY_2 29 | #undef HASH_ARRAY_3 30 | 31 | #undef BT_NAMESPACE 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/BinTree/BinTree4b.h: -------------------------------------------------------------------------------- 1 | /* 2 | * BinTreeb.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __BINTREE4B__H 19 | #define __BINTREE4B__H 20 | 21 | #undef BT_CLSID 22 | #define BT_CLSID CLSID_CMatchFinderBT4b 23 | 24 | #undef BT_NAMESPACE 25 | #define BT_NAMESPACE NBT4B 26 | 27 | #define HASH_ARRAY_2 28 | #define HASH_ARRAY_3 29 | #define HASH_BIG 30 | 31 | #include "BinTreeMF.h" 32 | #include "BinTreeMFMain.h" 33 | 34 | #undef HASH_ARRAY_2 35 | #undef HASH_ARRAY_3 36 | #undef HASH_BIG 37 | 38 | #endif 39 | 40 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/IMatchFinder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * IMatchFinder.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __IMATCHFINDER_H 19 | #define __IMATCHFINDER_H 20 | 21 | struct IInWindowStream: public IUnknown 22 | { 23 | STDMETHOD(SetStream)(ISequentialInStream *inStream) PURE; 24 | STDMETHOD_(void, ReleaseStream)() PURE; 25 | STDMETHOD(Init)() PURE; 26 | STDMETHOD_(Byte, GetIndexByte)(Int32 index) PURE; 27 | STDMETHOD_(UInt32, GetMatchLen)(Int32 index, UInt32 distance, UInt32 limit) PURE; 28 | STDMETHOD_(UInt32, GetNumAvailableBytes)() PURE; 29 | STDMETHOD_(const Byte *, GetPointerToCurrentPos)() PURE; 30 | STDMETHOD_(Int32, NeedChangeBufferPos)(UInt32 numCheckBytes) PURE; 31 | STDMETHOD_(void, ChangeBufferPos)() PURE; 32 | }; 33 | 34 | struct IMatchFinder: public IInWindowStream 35 | { 36 | STDMETHOD(Create)(UInt32 historySize, UInt32 keepAddBufferBefore, 37 | UInt32 matchMaxLen, UInt32 keepAddBufferAfter) PURE; 38 | STDMETHOD(GetMatches)(UInt32 *distances) PURE; 39 | STDMETHOD(Skip)(UInt32 num) PURE; 40 | }; 41 | 42 | struct IMatchFinderSetNumPasses 43 | { 44 | virtual void SetNumPasses(UInt32 numPasses) PURE; 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/LZOutWindow.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * LZOutWindow.cpp 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #include "StdAfx.h" 19 | 20 | #include "../../../Common/Alloc.h" 21 | #include "LZOutWindow.h" 22 | 23 | void CLZOutWindow::Init(bool solid) 24 | { 25 | if(!solid) 26 | COutBuffer::Init(); 27 | #ifdef _NO_EXCEPTIONS 28 | ErrorCode = S_OK; 29 | #endif 30 | } 31 | 32 | 33 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/LZOutWindow.h: -------------------------------------------------------------------------------- 1 | /* 2 | * LZOutWindow.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __LZ_OUT_WINDOW_H 19 | #define __LZ_OUT_WINDOW_H 20 | 21 | #include "../../IStream.h" 22 | #include "../../Common/OutBuffer.h" 23 | 24 | #ifndef _NO_EXCEPTIONS 25 | typedef COutBufferException CLZOutWindowException; 26 | #endif 27 | 28 | class CLZOutWindow: public COutBuffer 29 | { 30 | public: 31 | void Init(bool solid = false); 32 | 33 | // distance >= 0, len > 0, 34 | bool CopyBlock(UInt32 distance, UInt32 len) 35 | { 36 | UInt32 pos = _pos - distance - 1; 37 | if (distance >= _pos) 38 | { 39 | if (!_overDict || distance >= _bufferSize) 40 | return false; 41 | pos += _bufferSize; 42 | } 43 | do 44 | { 45 | if (pos == _bufferSize) 46 | pos = 0; 47 | _buffer[_pos++] = _buffer[pos++]; 48 | if (_pos == _limitPos) 49 | FlushWithCheck(); 50 | } 51 | while(--len != 0); 52 | return true; 53 | } 54 | 55 | void PutByte(Byte b) 56 | { 57 | _buffer[_pos++] = b; 58 | if (_pos == _limitPos) 59 | FlushWithCheck(); 60 | } 61 | 62 | Byte GetByte(UInt32 distance) const 63 | { 64 | UInt32 pos = _pos - distance - 1; 65 | if (pos >= _bufferSize) 66 | pos += _bufferSize; 67 | return _buffer[pos]; 68 | } 69 | }; 70 | 71 | #endif 72 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZ/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/LZMA/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | #include "../../../Common/MyWindows.h" 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/RangeCoder/RangeCoderOpt.h: -------------------------------------------------------------------------------- 1 | /* 2 | * RangeCoderOpt.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __COMPRESS_RANGECODER_OPT_H 19 | #define __COMPRESS_RANGECODER_OPT_H 20 | 21 | #define RC_INIT_VAR \ 22 | UInt32 range = rangeDecoder->Range; \ 23 | UInt32 code = rangeDecoder->Code; 24 | 25 | #define RC_FLUSH_VAR \ 26 | rangeDecoder->Range = range; \ 27 | rangeDecoder->Code = code; 28 | 29 | #define RC_NORMALIZE \ 30 | if (range < NCompress::NRangeCoder::kTopValue) \ 31 | { code = (code << 8) | rangeDecoder->Stream.ReadByte(); range <<= 8; } 32 | 33 | #define RC_GETBIT2(numMoveBits, prob, mi, A0, A1) \ 34 | { UInt32 bound = (range >> NCompress::NRangeCoder::kNumBitModelTotalBits) * prob; \ 35 | if (code < bound) \ 36 | { A0; range = bound; \ 37 | prob += (NCompress::NRangeCoder::kBitModelTotal - prob) >> numMoveBits; \ 38 | mi <<= 1; } \ 39 | else \ 40 | { A1; range -= bound; code -= bound; prob -= (prob) >> numMoveBits; \ 41 | mi = (mi + mi) + 1; }} \ 42 | RC_NORMALIZE 43 | 44 | #define RC_GETBIT(numMoveBits, prob, mi) RC_GETBIT2(numMoveBits, prob, mi, ; , ;) 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Source/7zip/7zip/Compress/RangeCoder/StdAfx.h: -------------------------------------------------------------------------------- 1 | // StdAfx.h 2 | 3 | #ifndef __STDAFX_H 4 | #define __STDAFX_H 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /Source/7zip/Common/Alloc.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Alloc.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | * 17 | * Reviewed for Unicode support by Jim Park -- 08/28/2007 18 | */ 19 | 20 | #ifndef __COMMON_ALLOC_H 21 | #define __COMMON_ALLOC_H 22 | 23 | #include 24 | 25 | void *MyAlloc(size_t size) throw(); 26 | void MyFree(void *address) throw(); 27 | 28 | #ifdef _WIN32 29 | 30 | bool SetLargePageSize(); 31 | 32 | void *MidAlloc(size_t size) throw(); 33 | void MidFree(void *address) throw(); 34 | void *BigAlloc(size_t size) throw(); 35 | void BigFree(void *address) throw(); 36 | 37 | #else 38 | 39 | #define MidAlloc(size) MyAlloc(size) 40 | #define MidFree(address) MyFree(address) 41 | #define BigAlloc(size) MyAlloc(size) 42 | #define BigFree(address) MyFree(address) 43 | 44 | #endif 45 | 46 | #endif 47 | -------------------------------------------------------------------------------- /Source/7zip/Common/CRC.h: -------------------------------------------------------------------------------- 1 | /* 2 | * CRC.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | * 17 | * Reviewed for Unicode support by Jim Park -- 08/28/2007 18 | */ 19 | 20 | #ifndef __COMMON_CRC_H 21 | #define __COMMON_CRC_H 22 | 23 | #include 24 | #include "Types.h" 25 | 26 | class CCRC 27 | { 28 | UInt32 _value; 29 | public: 30 | static UInt32 Table[256]; 31 | static void InitTable(); 32 | 33 | CCRC(): _value(0xFFFFFFFF){}; 34 | void Init() { _value = 0xFFFFFFFF; } 35 | void UpdateByte(Byte v); 36 | void UpdateUInt16(UInt16 v); 37 | void UpdateUInt32(UInt32 v); 38 | void UpdateUInt64(UInt64 v); 39 | void Update(const void *data, size_t size); 40 | UInt32 GetDigest() const { return _value ^ 0xFFFFFFFF; } 41 | static UInt32 CalculateDigest(const void *data, size_t size) 42 | { 43 | CCRC crc; 44 | crc.Update(data, size); 45 | return crc.GetDigest(); 46 | } 47 | static bool VerifyDigest(UInt32 digest, const void *data, size_t size) 48 | { 49 | return (CalculateDigest(data, size) == digest); 50 | } 51 | }; 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /Source/7zip/Common/Defs.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Defs.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __COMMON_DEFS_H 19 | #define __COMMON_DEFS_H 20 | 21 | template inline T MyMin(T a, T b) 22 | { return a < b ? a : b; } 23 | template inline T MyMax(T a, T b) 24 | { return a > b ? a : b; } 25 | 26 | template inline int MyCompare(T a, T b) 27 | { return a < b ? -1 : (a == b ? 0 : 1); } 28 | 29 | inline int BoolToInt(bool value) 30 | { return (value ? 1: 0); } 31 | 32 | inline bool IntToBool(int value) 33 | { return (value != 0); } 34 | 35 | #endif 36 | -------------------------------------------------------------------------------- /Source/7zip/Common/MyUnknown.h: -------------------------------------------------------------------------------- 1 | /* 2 | * MyUnknown.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __MYUNKNOWN_H 19 | #define __MYUNKNOWN_H 20 | 21 | #ifdef _WIN32 22 | 23 | #ifdef _WIN32_WCE 24 | #if (_WIN32_WCE > 300) 25 | #include 26 | #else 27 | #define MIDL_INTERFACE(x) struct 28 | #endif 29 | #else 30 | #include 31 | #endif 32 | 33 | #include 34 | 35 | #else 36 | #include "MyWindows.h" 37 | #endif 38 | 39 | #endif 40 | -------------------------------------------------------------------------------- /Source/7zip/Common/StdAfx.h: -------------------------------------------------------------------------------- 1 | /* 2 | * StdAfx.h 3 | * 4 | * This file is a part of LZMA compression module for NSIS. 5 | * 6 | * Original LZMA SDK Copyright (C) 1999-2006 Igor Pavlov 7 | * Modifications Copyright (C) 2003-2025 Amir Szekely 8 | * 9 | * Licensed under the Common Public License version 1.0 (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | */ 17 | 18 | #ifndef __STDAFX_H 19 | #define __STDAFX_H 20 | 21 | // #include "MyWindows.h" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /Source/ShConstants.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ShConstants.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 2003 Ramon 7 | * Copyright (C) 2003-2025 NSIS Contributors 8 | * 9 | * Licensed under the zlib/libpng license (the "License"); 10 | * you may not use this file except in compliance with the License. 11 | * 12 | * Licence details can be found in the file COPYING. 13 | * 14 | * This software is provided 'as-is', without any express or implied 15 | * warranty. 16 | * 17 | * Unicode support by Jim Park -- 08/24/2007 18 | */ 19 | 20 | #ifndef ___CONSTANTS___H_____ 21 | #define ___CONSTANTS___H_____ 22 | 23 | #include "strlist.h" 24 | 25 | struct constantstring { 26 | int name; 27 | int index; 28 | int pos; 29 | int value1; 30 | int value2; 31 | }; 32 | 33 | class ConstantsStringList : public SortedStringListND 34 | { 35 | public: 36 | ConstantsStringList(); 37 | 38 | int add(const TCHAR *name, int value1, int value2); 39 | int get(const TCHAR *name, int n_chars = -1); 40 | int getnum(); 41 | int get_value1(int idx); 42 | int get_value2(int idx); 43 | TCHAR *idx2name(int idx); 44 | bool set_values(const TCHAR *name, int val1, int val2); 45 | 46 | private: 47 | int m_index; 48 | int get_internal_idx(int idx); 49 | }; 50 | 51 | #endif 52 | -------------------------------------------------------------------------------- /Source/Tests/DialogTemplate.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../DialogTemplate.h" 3 | 4 | #include 5 | 6 | class CDialogTemplateTest : public CppUnit::TestFixture { 7 | 8 | CPPUNIT_TEST_SUITE( CDialogTemplateTest ); 9 | CPPUNIT_TEST( testCorrectness ); 10 | CPPUNIT_TEST_SUITE_END(); 11 | 12 | public: 13 | void testCorrectness() { 14 | const bool unicode_classes = false; 15 | unsigned char original_dialog[184] = { 16 | 1, 0, 255, 255, 0, 0, 0, 0, 0, 0, 17 | 0, 0, 72, 4, 0, 64, 3, 0, 0, 0, 0, 18 | 0, 10, 1, 130, 0, 0, 0, 0, 0, 0, 0, 19 | 8, 0, 0, 0, 0, 1, 77, 0, 83, 0, 32, 20 | 0, 83, 0, 104, 0, 101, 0, 108, 0, 108, 0, 21 | 32, 0, 68, 0, 108, 0, 103, 0, 0, 0, 0, 22 | 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 80, 23 | 0, 0, 0, 0, 22, 0, 20, 0, 7, 4, 0, 24 | 0, 255, 255, 130, 0, 255, 255, 103, 0, 0, 0, 25 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26 | 0, 2, 80, 25, 0, 0, 0, 241, 0, 23, 0, 27 | 238, 3, 0, 0, 255, 255, 130, 0, 0, 0, 0, 28 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 29 | 161, 80, 0, 0, 24, 0, 10, 1, 105, 0, 232, 30 | 3, 0, 0, 82, 0, 105, 0, 99, 0, 104, 0, 31 | 69, 0, 100, 0, 105, 0, 116, 0, 50, 0, 48, 32 | 0, 65, 0, 0, 0, 0, 0, 0, 0 33 | }; 34 | 35 | CDialogTemplate dt(original_dialog, unicode_classes, 1252); 36 | 37 | DWORD dwSize; 38 | unsigned char *saved_dialog = dt.Save(dwSize); 39 | 40 | CPPUNIT_ASSERT_EQUAL( (DWORD) sizeof(original_dialog), dwSize ); 41 | CPPUNIT_ASSERT_EQUAL( 0, memcmp(saved_dialog, original_dialog, dwSize) ); 42 | 43 | dt.FreeSavedTemplate(saved_dialog); 44 | } 45 | 46 | }; 47 | 48 | CPPUNIT_TEST_SUITE_REGISTRATION( CDialogTemplateTest ); 49 | -------------------------------------------------------------------------------- /Source/Tests/Platform.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../Platform.h" 3 | #include "../tchar.h" 4 | #include "../util.h" 5 | 6 | class PlatformTest : public CppUnit::TestFixture { 7 | 8 | CPPUNIT_TEST_SUITE( PlatformTest ); 9 | CPPUNIT_TEST( testCore ); 10 | CPPUNIT_TEST( testCoreString ); 11 | CPPUNIT_TEST( testCoreMath ); 12 | CPPUNIT_TEST_SUITE_END(); 13 | 14 | public: 15 | void testCore() { 16 | CPPUNIT_ASSERT(sizeof(WINWCHAR) == 2); 17 | CPPUNIT_ASSERT(sizeof(wchar_t) >= sizeof(WINWCHAR)); 18 | } 19 | 20 | void testCoreString() { 21 | TCHAR tbuf[42]; 22 | 23 | CPPUNIT_ASSERT(3 == my_strncpy(tbuf, _T("abc"), 4) && tbuf[2] == _T('c') && tbuf[3] == _T('\0')); 24 | CPPUNIT_ASSERT(2 == my_strncpy(tbuf, _T("abc"), 3) && tbuf[1] == _T('b') && tbuf[2] == _T('\0')); 25 | CPPUNIT_ASSERT(ChIsHex('f')); CPPUNIT_ASSERT(ChIsHex('F')); 26 | CPPUNIT_ASSERT(ChIsHex(L'f')); CPPUNIT_ASSERT(ChIsHex(L'F')); 27 | 28 | } 29 | 30 | void testCoreMath() { 31 | 32 | unsigned int ut; 33 | CPPUNIT_ASSERT(ui_add(ut, 0, 0) != false); 34 | CPPUNIT_ASSERT(ui_add(ut, UINT_MAX, 0) != false && ut == UINT_MAX); 35 | CPPUNIT_ASSERT(ui_add(ut, UINT_MAX, 1) == false); 36 | 37 | int st; 38 | CPPUNIT_ASSERT(si_add(st, 0, 0) != false); 39 | CPPUNIT_ASSERT(si_add(st, INT_MAX, 0) != false && st == INT_MAX); 40 | CPPUNIT_ASSERT(si_add(st, INT_MAX, 1) == false); 41 | CPPUNIT_ASSERT(si_add(st, INT_MAX, -1) != false); 42 | CPPUNIT_ASSERT(si_add(st, INT_MIN, 0) != false); 43 | CPPUNIT_ASSERT(si_add(st, INT_MIN, 1) != false); 44 | CPPUNIT_ASSERT(si_add(st, INT_MIN, -1) == false); 45 | } 46 | 47 | }; 48 | 49 | CPPUNIT_TEST_SUITE_REGISTRATION( PlatformTest ); 50 | -------------------------------------------------------------------------------- /Source/Tests/decompress.h: -------------------------------------------------------------------------------- 1 | class IDecompressor { 2 | public: 3 | 4 | virtual ~IDecompressor() {}; 5 | 6 | virtual void init() = 0; 7 | virtual void setNextIn(void *buffer, int size) = 0; 8 | virtual void setNextOut(void *buffer, int size) = 0; 9 | virtual int getAvailOut() = 0; 10 | virtual int decompress() = 0; 11 | 12 | }; 13 | 14 | class lzmaDecompressor : public IDecompressor { 15 | public: 16 | 17 | lzmaDecompressor(); 18 | virtual ~lzmaDecompressor(); 19 | 20 | virtual void init(); 21 | virtual void setNextIn(void *buffer, int size); 22 | virtual void setNextOut(void *buffer, int size); 23 | virtual int getAvailOut(); 24 | virtual int decompress(); 25 | 26 | private: 27 | 28 | void *vs; 29 | 30 | }; 31 | 32 | class bzip2Decompressor : public IDecompressor { 33 | public: 34 | 35 | bzip2Decompressor(); 36 | virtual ~bzip2Decompressor(); 37 | 38 | virtual void init(); 39 | virtual void setNextIn(void *buffer, int size); 40 | virtual void setNextOut(void *buffer, int size); 41 | virtual int getAvailOut(); 42 | virtual int decompress(); 43 | 44 | private: 45 | 46 | void *vs; 47 | 48 | }; 49 | 50 | class zlibDecompressor : public IDecompressor { 51 | public: 52 | 53 | zlibDecompressor(); 54 | virtual ~zlibDecompressor(); 55 | 56 | virtual void init(); 57 | virtual void setNextIn(void *buffer, int size); 58 | virtual void setNextOut(void *buffer, int size); 59 | virtual int getAvailOut(); 60 | virtual int decompress(); 61 | 62 | private: 63 | 64 | void *vs; 65 | 66 | }; 67 | -------------------------------------------------------------------------------- /Source/Tests/endian.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../Platform.h" 3 | 4 | class EndianTest : public CppUnit::TestFixture { 5 | 6 | CPPUNIT_TEST_SUITE( EndianTest ); 7 | CPPUNIT_TEST( testSwapEndian ); 8 | CPPUNIT_TEST( testFixEndian16 ); 9 | CPPUNIT_TEST( testFixEndian32 ); 10 | CPPUNIT_TEST_SUITE_END(); 11 | 12 | public: 13 | void testSwapEndian() { 14 | CPPUNIT_ASSERT_EQUAL( (int)0x78563412, (int)SWAP_ENDIAN_INT32(0x12345678) ); 15 | CPPUNIT_ASSERT_EQUAL( (int)0xFFFFFFFF, (int)SWAP_ENDIAN_INT32(0xFFFFFFFF) ); 16 | CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT32(0) ); 17 | CPPUNIT_ASSERT_EQUAL( (int)0x3412, (int)SWAP_ENDIAN_INT16(0x1234) ); 18 | CPPUNIT_ASSERT_EQUAL( (int)0xFFFF, (int)SWAP_ENDIAN_INT16(0xFFFF) ); 19 | CPPUNIT_ASSERT_EQUAL( (int)0, (int)SWAP_ENDIAN_INT16(0) ); 20 | } 21 | 22 | void testFixEndian32() { 23 | int i=1; 24 | int actual = 0x12345678; 25 | FIX_ENDIAN_INT32_INPLACE(actual); 26 | int expected; 27 | if (((char*)&i)[0] == 1) { 28 | // little endian 29 | expected = 0x12345678; 30 | } 31 | else { 32 | // big endian 33 | expected = 0x78563412; 34 | } 35 | CPPUNIT_ASSERT_EQUAL(expected, actual); 36 | } 37 | 38 | void testFixEndian16() { 39 | int i=1; 40 | int actual = 0x1234; 41 | FIX_ENDIAN_INT16_INPLACE(actual); 42 | int expected; 43 | if (((char*)&i)[0] == 1) { 44 | // little endian 45 | expected = 0x1234; 46 | } 47 | else { 48 | // big endian 49 | expected = 0x3412; 50 | } 51 | CPPUNIT_ASSERT_EQUAL(expected, actual); 52 | } 53 | 54 | }; 55 | 56 | CPPUNIT_TEST_SUITE_REGISTRATION( EndianTest ); 57 | -------------------------------------------------------------------------------- /Source/Tests/icon1.nsi: -------------------------------------------------------------------------------- 1 | OutFile icon1.exe 2 | Name icon1 3 | 4 | Icon "${NSISDIR}\Contrib\Graphics\Icons\arrow-install.ico" 5 | UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico" 6 | 7 | Section 8 | Return 9 | WriteUninstaller $TEMP\uninst.exe 10 | SectionEnd 11 | 12 | Section uninstall 13 | SectionEnd 14 | -------------------------------------------------------------------------------- /Source/Tests/icon2.nsi: -------------------------------------------------------------------------------- 1 | OutFile icon2.exe 2 | Name icon2 3 | 4 | Icon "${NSISDIR}\Contrib\Graphics\Icons\nsis1-install.ico" 5 | UninstallIcon "${NSISDIR}\Contrib\Graphics\Icons\arrow-install.ico" 6 | 7 | Section 8 | Return 9 | WriteUninstaller $TEMP\uninst.exe 10 | SectionEnd 11 | 12 | Section uninstall 13 | SectionEnd 14 | -------------------------------------------------------------------------------- /Source/Tests/icons.py: -------------------------------------------------------------------------------- 1 | SCRIPT = """ 2 | Name icon 3 | OutFile "%(icon)s X %(unicon)s.exe" 4 | SilentInstall silent 5 | SilentUninstall silent 6 | 7 | Icon "%(icon)s" 8 | UninstallIcon "%(unicon)s" 9 | 10 | Section 11 | WriteUninstaller "$EXEDIR\%(unicon)s X %(icon)s X uninst.exe" 12 | SectionEnd 13 | 14 | Section uninstall 15 | SectionEnd 16 | """ 17 | 18 | def build(icon, unicon): 19 | from os import popen2 20 | pw, pr = popen2(r'C:\Progra~1\NSIS\makensis.exe -') 21 | pw.write(SCRIPT % locals()) 22 | pw.close() 23 | print(pr.read()) 24 | 25 | from glob import glob 26 | from os import system 27 | 28 | icons = glob('*.ico') 29 | 30 | for i in icons: 31 | for j in icons: 32 | build(i, j) 33 | system('"%s X %s.exe"' % (i, j)) 34 | -------------------------------------------------------------------------------- /Source/Tests/memcpy.c: -------------------------------------------------------------------------------- 1 | // Reviewed for Unicode support by Jim Park -- 08/24/2007 2 | 3 | #include "../Platform.h" 4 | 5 | void NSISCALL mini_memcpy(void *out, const void *in, int len) 6 | { 7 | char *c_out=(char*)out; 8 | char *c_in=(char *)in; 9 | while (len-- > 0) 10 | { 11 | *c_out++=*c_in++; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Source/Tests/root.txt: -------------------------------------------------------------------------------- 1 | this is a list of bugs related to root directories, which can not yet be tested automatically 2 | 3 | * bug #1331292 - browsing for root network directory disables next button 4 | 5 | * root with space after it, without AllowRootDirInstall 6 | http://forums.winamp.com/showthread.php?threadid=222727 7 | -------------------------------------------------------------------------------- /Source/Tests/specmatch.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "../dirreader.h" 3 | #include "../tstring.h" 4 | 5 | #ifndef TEXT 6 | #define TEXT _T 7 | #endif 8 | 9 | using namespace std; 10 | 11 | class SpecTest : public CppUnit::TestFixture { 12 | 13 | CPPUNIT_TEST_SUITE( SpecTest ); 14 | CPPUNIT_TEST( testMatches ); 15 | CPPUNIT_TEST_SUITE_END(); 16 | 17 | public: 18 | void testMatches() { 19 | testMatch(TEXT("test.exe"), TEXT("test.exe"), true); 20 | testMatch(TEXT("test"), TEXT("test"), true); 21 | testMatch(TEXT("test.exe"), TEXT("test.*"), true); 22 | testMatch(TEXT("test"), TEXT("test.*"), true); 23 | testMatch(TEXT("test"), TEXT("????"), true); 24 | testMatch(TEXT("test"), TEXT("???"), false); 25 | testMatch(TEXT("test"), TEXT("*.exe"), false); 26 | testMatch(TEXT("test.exe.bat"), TEXT("*.exe"), false); 27 | testMatch(TEXT("test.exe.bat"), TEXT("*.bat"), true); 28 | testMatch(TEXT("test.exe.bat"), TEXT("*t"), true); 29 | testMatch(TEXT("test.exe.bat"), TEXT("*"), true); 30 | testMatch(TEXT("test.exe.bat"), TEXT("*x*"), true); 31 | testMatch(TEXT("test.exe.exe"), TEXT("*.*"), true); 32 | testMatch(TEXT("test.exe.bat"), TEXT("*.b*"), true); 33 | testMatch(TEXT("test.exe.bat"), TEXT("tes?.*.bat"), true); 34 | testMatch(TEXT("test.exe.bat"), TEXT("tes?.*bat"), true); 35 | testMatch(TEXT("test.exe.bat"), TEXT("tes?.*bat***."), true); 36 | testMatch(TEXT("test.exe"), TEXT("????.*"), true); 37 | testMatch(TEXT("testing.exe"), TEXT("????.*"), false); 38 | } 39 | 40 | private: 41 | 42 | void testMatch(tstring name, tstring spec, bool result) { 43 | CPPUNIT_ASSERT_EQUAL( dir_reader::matches(name, spec), result ); 44 | } 45 | 46 | }; 47 | 48 | CPPUNIT_TEST_SUITE_REGISTRATION( SpecTest ); 49 | -------------------------------------------------------------------------------- /Source/Tests/textrunner.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "../util.h" // for NSISRT_* 5 | 6 | NSISRT_DEFINEGLOBALS(); 7 | 8 | int main(int argc, char* argv[]) 9 | { 10 | if (!NSISRT_Initialize()) return 1; 11 | 12 | // Get the top level suite from the registry 13 | CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); 14 | 15 | // Adds the test to the list of test to run 16 | CppUnit::TextUi::TestRunner runner; 17 | runner.addTest( suite ); 18 | 19 | // Change the default outputter to a compiler error format outputter 20 | runner.setOutputter( new CppUnit::CompilerOutputter( &runner.result(), 21 | std::cerr ) ); 22 | // Run the tests. 23 | bool wasSuccessful = runner.run(); 24 | 25 | // Return error code 1 if the one of test failed. 26 | return wasSuccessful ? 0 : 1; 27 | } 28 | -------------------------------------------------------------------------------- /Source/afxres.h: -------------------------------------------------------------------------------- 1 | /* 2 | * afxres.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | */ 16 | 17 | #include "Platform.h" 18 | 19 | #ifndef IDC_STATIC 20 | #define IDC_STATIC -1 21 | #endif 22 | -------------------------------------------------------------------------------- /Source/compressor.h: -------------------------------------------------------------------------------- 1 | /* 2 | * compressor.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Unicode support by Jim Park -- 08/24/2007 17 | */ 18 | 19 | #ifndef __COMPRESSOR_H__ 20 | #define __COMPRESSOR_H__ 21 | 22 | #include "tchar.h" 23 | 24 | #define C_OK 0 25 | #define C_FINISHED 1 26 | 27 | #define C_FINISH true 28 | 29 | class ICompressor { 30 | public: 31 | virtual ~ICompressor() {} 32 | 33 | virtual int Init(int level, unsigned int dict_size) = 0; 34 | virtual int End() = 0; 35 | virtual int Compress(bool finish) = 0; 36 | 37 | virtual void SetNextIn(char *in, unsigned int size) = 0; 38 | virtual void SetNextOut(char *out, unsigned int size) = 0; 39 | 40 | virtual char* GetNextOut() = 0; 41 | 42 | virtual unsigned int GetAvailIn() = 0; 43 | virtual unsigned int GetAvailOut() = 0; 44 | 45 | virtual const TCHAR* GetName() = 0; 46 | 47 | virtual const TCHAR* GetErrStr(int err) = 0; 48 | }; 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Source/crc32.c: -------------------------------------------------------------------------------- 1 | /* 2 | * crc32.c 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Unicode support by Jim Park -- 08/24/2007 17 | */ 18 | 19 | #include "Platform.h" 20 | #include "crc32.h" 21 | #include "exehead/config.h" 22 | 23 | #ifdef NSIS_CONFIG_CRC_SUPPORT 24 | 25 | // this is based on the (slow,small) CRC32 implementation from zlib. 26 | crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, size_t len) 27 | { 28 | static crc32_t crc_table[256]; 29 | 30 | if (!crc_table[1]) 31 | { 32 | crc32_t c; 33 | int n, k; 34 | 35 | for (n = 0; n < 256; n++) 36 | { 37 | c = (crc32_t)n; 38 | for (k = 0; k < 8; k++) c = (c >> 1) ^ (c & 1 ? 0xedb88320L : 0); 39 | crc_table[n] = c; 40 | } 41 | } 42 | 43 | crc = crc ^ 0xffffffffL; 44 | while (len-- > 0) { 45 | crc = crc_table[(crc ^ (*buf++)) & 0xff] ^ (crc >> 8); 46 | } 47 | return crc ^ 0xffffffffL; 48 | } 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /Source/crc32.h: -------------------------------------------------------------------------------- 1 | /* 2 | * crc32.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Reviewed for Unicode support by Jim Park -- 08/24/2007 17 | */ 18 | 19 | #ifndef ___CRC32__H___ 20 | #define ___CRC32__H___ 21 | 22 | #include "Platform.h" 23 | #include // size_t 24 | 25 | typedef UINT32 crc32_t; 26 | 27 | #ifdef __cplusplus 28 | extern "C" 29 | #endif 30 | crc32_t NSISCALL CRC32(crc32_t crc, const unsigned char *buf, size_t len); 31 | 32 | #endif//!___CRC32__H___ 33 | -------------------------------------------------------------------------------- /Source/dirreader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * dirreader.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Unicode support by Jim Park -- 08/23/2007 17 | */ 18 | 19 | #include "Platform.h" 20 | #include "tstring.h" 21 | #include 22 | 23 | class dir_reader { 24 | public: 25 | 26 | typedef std::set::const_iterator iterator; 27 | 28 | dir_reader(); 29 | virtual ~dir_reader() {} 30 | 31 | virtual void read(const tstring& dir) = 0; 32 | 33 | virtual const std::set& files(); 34 | virtual const std::set& dirs(); 35 | 36 | // dir_reader always excludes . and .. AND the exclude list is private, 37 | // use this backdoor if you need to match "." 38 | virtual std::set& hack_simpleexcluded() {return m_excluded;} 39 | 40 | virtual void exclude(const tstring& spec); 41 | virtual void exclude(const std::set& specs); 42 | 43 | static bool matches(const tstring& name, const tstring& spec); 44 | 45 | protected: 46 | 47 | virtual void add_file(const tstring& file); 48 | virtual void add_dir(const tstring& dir); 49 | 50 | virtual bool is_excluded(const tstring& name) const; 51 | 52 | private: 53 | 54 | std::set m_excluded; 55 | std::set m_wildcard_excluded; 56 | 57 | std::set m_files; 58 | std::set m_dirs; 59 | 60 | }; 61 | 62 | dir_reader* new_dir_reader(); 63 | -------------------------------------------------------------------------------- /Source/exehead/afxres.h: -------------------------------------------------------------------------------- 1 | /* 2 | * afxres.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | */ 16 | 17 | #include "../Platform.h" 18 | 19 | #ifndef IDC_STATIC 20 | #define IDC_STATIC -1 21 | #endif 22 | -------------------------------------------------------------------------------- /Source/exehead/bitmap1.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Source/exehead/bitmap1.bmp -------------------------------------------------------------------------------- /Source/exehead/components.h: -------------------------------------------------------------------------------- 1 | /* 2 | * components.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * 17 | * Reviewed for Unicode support by Jim Park -- 08/22/2007 18 | */ 19 | 20 | #ifndef ___COMPONENTS_H___ 21 | #define ___COMPONENTS_H___ 22 | 23 | void NSISCALL SectionFlagsChanged(unsigned int index); 24 | #define RefreshSectionGroups() _RefreshSectionGroups(0, 0) 25 | unsigned int NSISCALL _RefreshSectionGroups(unsigned int i, int not_first_call); 26 | #ifdef NSIS_CONFIG_COMPONENTPAGE 27 | void NSISCALL SetInstType(int inst_type); 28 | unsigned int NSISCALL GetInstType(HTREEITEM *items); 29 | #endif//NSIS_CONFIG_COMPONENTPAGE 30 | 31 | #endif//!___COMPONENTS_H___ 32 | -------------------------------------------------------------------------------- /Source/exehead/exec.h: -------------------------------------------------------------------------------- 1 | /* 2 | * exec.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Reviewed for Unicode support by Jim Park -- 08/22/2007 17 | */ 18 | 19 | #ifndef _EXEC_H_ 20 | #define _EXEC_H_ 21 | 22 | #include "api.h" 23 | 24 | int NSISCALL ExecuteCodeSegment(int pos, HWND hwndProgress); // returns 0 on success 25 | int NSISCALL ExecuteCallbackFunction(int num); // returns 0 on success 26 | 27 | #endif//_EXEC_H_ 28 | -------------------------------------------------------------------------------- /Source/exehead/nsis.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Source/exehead/nsis.ico -------------------------------------------------------------------------------- /Source/exehead/plugin.h: -------------------------------------------------------------------------------- 1 | /* 2 | * plugin.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | */ 16 | 17 | #ifndef _PLUGIN_H_ 18 | #define _PLUGIN_H_ 19 | 20 | #include "../Platform.h" 21 | #include "fileform.h" 22 | #include "api.h" 23 | 24 | #ifdef NSIS_CONFIG_PLUGIN_SUPPORT 25 | 26 | extern int NSISCALL RegisterPluginCallback(HMODULE pluginHandle, NSISPLUGINCALLBACK proc); 27 | 28 | extern void NSISCALL Plugins_SendMsgToAllPlugins(int msg); 29 | extern void NSISCALL Plugins_UnloadAll(); 30 | extern BOOL NSISCALL Plugins_CanUnload(HANDLE pluginHandle); 31 | 32 | #endif /* #ifdef NSIS_CONFIG_PLUGIN_SUPPORT */ 33 | 34 | #endif /* _PLUGIN_H_ */ 35 | -------------------------------------------------------------------------------- /Source/exehead/ui.h: -------------------------------------------------------------------------------- 1 | /* 2 | * ui.h 3 | * 4 | * This file is a part of NSIS. 5 | * 6 | * Copyright (C) 1999-2025 Nullsoft and Contributors 7 | * 8 | * Licensed under the zlib/libpng license (the "License"); 9 | * you may not use this file except in compliance with the License. 10 | * 11 | * Licence details can be found in the file COPYING. 12 | * 13 | * This software is provided 'as-is', without any express or implied 14 | * warranty. 15 | * 16 | * Unicode support by Jim Park -- 08/13/2007 17 | */ 18 | 19 | 20 | #ifndef _UI_H_ 21 | #define _UI_H_ 22 | 23 | extern int *cur_langtable; 24 | 25 | extern int NSISCALL ui_doinstall(void); 26 | void NSISCALL update_status_text(int strtab, const TCHAR *text2); 27 | 28 | extern int ui_dlg_visible; 29 | extern HWND m_curwnd; 30 | 31 | #ifdef NSIS_CONFIG_LOG 32 | void NSISCALL build_g_logfile(void); 33 | #endif 34 | 35 | // sent to the last child window to tell it that the install thread is done 36 | #define WM_NOTIFY_INSTPROC_DONE (WM_USER+0x4) 37 | 38 | // sent to every child window to tell it it can start executing NSIS code 39 | #define WM_NOTIFY_START (WM_USER+0x5) 40 | 41 | // sent to every child window to tell it it is closing soon 42 | #define WM_NOTIFY_INIGO_MONTOYA (WM_USER+0xb) 43 | 44 | // update message used by DirProc and SelProc for space display 45 | #define WM_IN_UPDATEMSG (WM_USER+0xf) 46 | 47 | // simulates clicking on the tree 48 | #define WM_TREEVIEW_KEYHACK (WM_USER+0x13) 49 | 50 | // notifies a component selection change (.onMouseOverSection) 51 | #define WM_NOTIFY_SELCHANGE (WM_USER+0x19) 52 | 53 | // Notifies the installation type has changed by the user 54 | #define WM_NOTIFY_INSTTYPE_CHANGED (WM_USER+0x20) 55 | 56 | #endif//_UI_H_ 57 | -------------------------------------------------------------------------------- /Source/exehead/uninst.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/negrutiu/nsis/46438d9ba83269bc00ca58eb34419526d5de0934/Source/exehead/uninst.ico -------------------------------------------------------------------------------- /Source/tstring.cpp: -------------------------------------------------------------------------------- 1 | // tstring.cpp 2 | // 3 | // This file is a part of Unicode NSIS. 4 | // 5 | // Copyright (C) 2007-2025 Jim Park 6 | // 7 | // Licensed under the zlib/libpng license (the "License"); 8 | // you may not use this file except in compliance with the License. 9 | // 10 | // This software is provided 'as-is', without any expressed or implied 11 | // warranty. 12 | // 13 | // Provides TSTRING support. 14 | 15 | #ifdef _UNICODE 16 | 17 | #include "tstring.h" 18 | #include "util.h" 19 | #include 20 | #include 21 | 22 | void CtoTString::Init(const char* str, UINT cp) 23 | { 24 | #if defined(_UNICODE) && !defined(_WIN32) 25 | if (CP_ACP == cp) 26 | { 27 | assert(NSISRT_free_is_STDC_free()); 28 | m_wStr = NSISRT_mbtowc(str); // Should be faster than iconv 29 | return ; 30 | } 31 | #endif 32 | int len = MultiByteToWideChar(cp, 0, str, -1, NULL, 0); 33 | m_wStr = (wchar_t*) malloc(len*sizeof(wchar_t)); 34 | if (m_wStr) MultiByteToWideChar(cp, 0, str, -1, m_wStr, len); 35 | } 36 | 37 | void CtoTString::Init(const char* str) 38 | { 39 | Init(str, CP_ACP); 40 | } 41 | 42 | CtoTString::~CtoTString() { free(m_wStr); m_wStr = 0; } 43 | 44 | 45 | 46 | void TtoCString::Init(const wchar_t* str) 47 | { 48 | #if defined(_UNICODE) && !defined(_WIN32) 49 | assert(NSISRT_free_is_STDC_free()); 50 | m_cStr = NSISRT_wctomb(str); // Should be faster than iconv 51 | return ; 52 | #endif 53 | int len = WideCharToMultiByte(CP_ACP, 0, str, -1, NULL, 0, 0, 0); 54 | m_cStr = (char*) malloc(len); 55 | if (m_cStr) WideCharToMultiByte(CP_ACP, 0, str, -1, m_cStr, len, 0, 0); 56 | } 57 | 58 | TtoCString::~TtoCString() { free(m_cStr); m_cStr = 0; } 59 | 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | TODO 2 | ---- 3 | 4 | NSIS 5 | 6 | * Compiler plug-ins 7 | 8 | * Empty subsections should not show 9 | 10 | * Option to cancel the installation process 11 | 12 | EXAMPLES 13 | 14 | * Write an advanced paging example showing multiple components page with 15 | multiple instfiles pages 16 | 17 | PLUG-INS 18 | 19 | * InstallOptions - custom class names so you can include any control 20 | you want 21 | 22 | * nsExec - live outputs -------------------------------------------------------------------------------- /nsis_cleanup.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | cd /d "%~dp0" 4 | 5 | rmdir /s /q .depend 6 | for /d %%d in (.instdist-*) do rmdir /s /q "%%~d" 7 | rmdir /s /q .sconf_temp 8 | rmdir /s /q .test 9 | rmdir /s /q __pycache__ 10 | rmdir /s /q build 11 | for /d %%d in (build-local*) do rmdir /s /q "%%~d" 12 | 13 | del /q .sconsign.dblite 14 | del /q config.log 15 | 16 | REM pause --------------------------------------------------------------------------------