-
Notifications
You must be signed in to change notification settings - Fork 8
Getting Started
Marius Negruțiu edited this page May 12, 2021
·
4 revisions
This wiki page explains the first steps you need to take to use NScurl extension in your installers.
You probably work with the official NSIS distribution, in which case you can jump to the first section.
In case you're using an unofficial NSIS fork, skip to the second section.
- Download and install the official NSIS package
- Download and unzip the latest NScurl binaries
- Optionally, you can clone the git repo and build NScurl yourself
- Use the !AddPluginDir directive in your NSIS script to point the compiler to the NScurl binaries
Example:
Target x86-unicode
;Target x86-ansi
!AddPluginDir /x86-unicode "NScurl\x86-unicode"
!AddPluginDir /x86-ansi "NScurl\x86-ansi"
!include "MUI2.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Name NScurl-Test
ShowInstDetails show
Section Download
DetailPrint 'Downloading...'
NScurl::http get "http://live.sysinternals.com/Files/SysinternalsSuite.zip" "$EXEDIR\_SysinternalsSuiteLive.zip" /CANCEL /INSIST /Zone.Identifier /END
Pop $0
DetailPrint "Status: $0"
SectionEnd
- Download and install the unofficial Negruțiu's NSIS fork
- It already includes NScurl plugin
- In addition, this NSIS fork allows you to build native
amd64
installers, so the NScurlamd64-unicode
binary comes in handy... - You don't need to include anything, just start making NScurl calls
Example:
;Target amd64-unicode
Target x86-unicode
;Target x86-ansi
!include "MUI2.nsh"
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Name NScurl-Test
ShowInstDetails show
Section Download
DetailPrint 'Downloading...'
NScurl::http get "http://live.sysinternals.com/Files/SysinternalsSuite.zip" "$EXEDIR\_SysinternalsSuiteLive.zip" /CANCEL /INSIST /Zone.Identifier /END
Pop $0
DetailPrint "Status: $0"
SectionEnd