Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Add section to download cURL in Windows installer #7

Merged
merged 2 commits into from about 2 years ago

2 participants

Brad Anderson Andrei Alexandrescu
Brad Anderson
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.

Andrei Alexandrescu
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.

Brad Anderson
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.

Andrei Alexandrescu andralex merged commit 05bb97c into from
Andrei Alexandrescu andralex closed this
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Deleted user 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 1 changed file with 30 additions and 1 deletion. Show diff stats Hide diff stats

  1. 31  windows/dinstaller.nsi
31  windows/dinstaller.nsi
@@ -5,19 +5,22 @@
5 5
 ; Version
6 6
 ;!define Version1 "1.046"
7 7
 ;!define Version2 "2.031"
  8
+!define VersionCurl "7.24.0"
8 9
 
9 10
 ; Download zip from website, or include the compressed zip?
10 11
 !define Download
11 12
 
12 13
 ; If Download, the urls of the dmd.zip and dmc.zip
13 14
 !define DownloadDmd1ZipUrl "http://ftp.digitalmars.com/dmd.${Version1}.zip"
14  
-!define DownloadDmd2ZipUrl "http://ftp.digitalmars.com/dmd.${Version2}.zip"
  15
+!define DownloadDmd2ZipUrl "https://github.com/downloads/D-Programming-Language/dmd/dmd.${Version2}.zip"
15 16
 !define DownloadDmcZipUrl "http://ftp.digitalmars.com/dmc.zip"
  17
+!define DownloadCurlZipUrl "https://github.com/downloads/D-Programming-Language/dmd/curl-${VersionCurl}-dmd-win32.zip" ;"http://ftp.digitalmars.com/dmc.zip"
16 18
 
17 19
 ; If not Download, the paths of dmd.zip and dmc.zip
18 20
 !define DmdZipPath1 "dmd.${Version1}.zip"
19 21
 !define DmdZipPath2 "dmd.${Version2}.zip"
20 22
 !define DmcZipPath "dmc.zip"
  23
+!define CurlZipPath "curl-${VersionCurl}-dmd-win32.zip"
21 24
 
22 25
 ;--------------------------------------------------------
23 26
 ; Includes
@@ -178,6 +181,32 @@ Section "D 2" Dmd2Files
178 181
 
179 182
 SectionEnd
180 183
 
  184
+Section "cURL support for D 2" cURLFiles
  185
+
  186
+    ; This section is mandatory
  187
+    ;SectionIn RO
  188
+    
  189
+    SetOutPath $INSTDIR
  190
+    
  191
+    ; Create installation directory
  192
+    CreateDirectory "$INSTDIR"
  193
+    
  194
+    !ifdef Download
  195
+        ; Download the zip files
  196
+        inetc::get /caption "Downloading ${CurlZipPath}..." /popup "" "${DownloadCurlZipUrl}" "$INSTDIR\curl.zip" /end
  197
+        Pop $0 # return value = exit code, "OK" means OK
  198
+    !else
  199
+        FILE "/oname=$INSTDIR\curl.zip" "${CurlZipPath}"
  200
+    !endif
  201
+    
  202
+    ; Unzip them right there
  203
+    nsisunz::Unzip "$INSTDIR\curl.zip" "$INSTDIR"
  204
+    
  205
+    ; Delete the zip files
  206
+    Delete "$INSTDIR\curl.zip"
  207
+
  208
+SectionEnd
  209
+
181 210
 Section "dmc" DmcFiles
182 211
 
183 212
     ; This section is mandatory
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.