Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add section to download cURL in Windows installer #7

Merged
merged 2 commits into from

2 participants

@eco
Collaborator

@WalterBright This pull request relies on curl-7.24.0-dmd-win32.zip being uploaded to ftp://ftp.digitalmars.com/ before it should be merged.

@andralex
Owner

@eco, @WalterBright: that won't fly as Walter's build and upload procedures are manual and extremely error-prone as they are. Walter did introduce some automation but it's his own scripts that are not in github. We need to have Walter commit to github his scripts, and then update the scripts to upload the curl lib.

@eco
Collaborator

@andralex It's just a one time manual upload he'd need to do. I'd like to switch all the download links over to use the Github URL since it's several times faster but figured that was a different issue that could be addressed separately.

@andralex andralex merged commit 05bb97c into D-Programming-Language:master
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 30 additions and 1 deletion.
  1. +30 −1 windows/dinstaller.nsi
View
31 windows/dinstaller.nsi
@@ -5,19 +5,22 @@
; Version
;!define Version1 "1.046"
;!define Version2 "2.031"
+!define VersionCurl "7.24.0"
; Download zip from website, or include the compressed zip?
!define Download
; If Download, the urls of the dmd.zip and dmc.zip
!define DownloadDmd1ZipUrl "http://ftp.digitalmars.com/dmd.${Version1}.zip"
-!define DownloadDmd2ZipUrl "http://ftp.digitalmars.com/dmd.${Version2}.zip"
+!define DownloadDmd2ZipUrl "https://github.com/downloads/D-Programming-Language/dmd/dmd.${Version2}.zip"
!define DownloadDmcZipUrl "http://ftp.digitalmars.com/dmc.zip"
+!define DownloadCurlZipUrl "https://github.com/downloads/D-Programming-Language/dmd/curl-${VersionCurl}-dmd-win32.zip" ;"http://ftp.digitalmars.com/dmc.zip"
; If not Download, the paths of dmd.zip and dmc.zip
!define DmdZipPath1 "dmd.${Version1}.zip"
!define DmdZipPath2 "dmd.${Version2}.zip"
!define DmcZipPath "dmc.zip"
+!define CurlZipPath "curl-${VersionCurl}-dmd-win32.zip"
;--------------------------------------------------------
; Includes
@@ -178,6 +181,32 @@ Section "D 2" Dmd2Files
SectionEnd
+Section "cURL support for D 2" cURLFiles
+
+ ; This section is mandatory
+ ;SectionIn RO
+
+ SetOutPath $INSTDIR
+
+ ; Create installation directory
+ CreateDirectory "$INSTDIR"
+
+ !ifdef Download
+ ; Download the zip files
+ inetc::get /caption "Downloading ${CurlZipPath}..." /popup "" "${DownloadCurlZipUrl}" "$INSTDIR\curl.zip" /end
+ Pop $0 # return value = exit code, "OK" means OK
+ !else
+ FILE "/oname=$INSTDIR\curl.zip" "${CurlZipPath}"
+ !endif
+
+ ; Unzip them right there
+ nsisunz::Unzip "$INSTDIR\curl.zip" "$INSTDIR"
+
+ ; Delete the zip files
+ Delete "$INSTDIR\curl.zip"
+
+SectionEnd
+
Section "dmc" DmcFiles
; This section is mandatory
Something went wrong with that request. Please try again.