-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
If you're new to NScurl
here's how you set it up:
-
Use the official NSIS distribution
- Download NSIS
- Download NScurl binaries
- First script
-
Use the unofficial NSIS fork (supports native
amd64
installers)
Download and install the official NSIS (Nullsoft Scriptable Install System):
https://nsis.sourceforge.io/Download
Note
NSIS generates x86-unicode
and x86-ansi
installers
Download and extract the latest NScurl
binaries from GitHub:
https://github.com/negrutiu/nsis-nscurl/releases/latest
Tip
We'll use !AddPluginDir
NSIS directive to let the compiler know where to find NScurl
# NScurl demo
Target x86-unicode
;Target x86-ansi
;Target amd64-unicode ; Not available in official NSIS
!AddPluginDir /x86-unicode "NScurl\x86-unicode"
!AddPluginDir /x86-ansi "NScurl\x86-ansi"
!AddPluginDir /amd64-unicode "NScurl\amd64-unicode"
!include "MUI2.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Name NScurl-Demo
ShowInstDetails show
Section Download
DetailPrint 'Downloading...'
NScurl::http get "https://download.sysinternals.com/files/SysinternalsSuite.zip" "$EXEDIR\SysinternalsSuite.zip" /INSIST /CANCEL /Zone.Identifier /END
Pop $0
${If} $0 == "OK"
DetailPrint "Download successful"
${Else}
DetailPrint "Download failed with error $0"
${EndIf}
SectionEnd
Download and install the NSIS fork from Github:
https://github.com/negrutiu/nsis
Tip
This NSIS fork generates amd64-unicode
installers in addition to x86-unicode
and x86-ansi
NScurl
is already available so there's no need for additional downloads
Caution
This is an unofficial NSIS distro
Despite our best efforts to keep it in-sync with the official repository, it might lag slightly behind
# NScurl demo
;Target x86-unicode
;Target x86-ansi
Target amd64-unicode
!include "MUI2.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Name NScurl-Demo
ShowInstDetails show
Section Download
DetailPrint 'Downloading...'
NScurl::http get "https://download.sysinternals.com/files/SysinternalsSuite.zip" "$EXEDIR\SysinternalsSuite.zip" /INSIST /CANCEL /Zone.Identifier /END
Pop $0
${If} $0 == "OK"
DetailPrint "Download successful"
${Else}
DetailPrint "Download failed with error $0"
${EndIf}
SectionEnd