From a6fb49a9e79866205ca4ebbc96f938fc63e11b81 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Tue, 28 Feb 2012 21:11:19 -0700 Subject: [PATCH 1/2] Add section to download cURL in Windows installer --- windows/dinstaller.nsi | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/windows/dinstaller.nsi b/windows/dinstaller.nsi index 6d8769cd..e47d8a5f 100644 --- a/windows/dinstaller.nsi +++ b/windows/dinstaller.nsi @@ -5,6 +5,7 @@ ; 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 @@ -13,11 +14,13 @@ !define DownloadDmd1ZipUrl "http://ftp.digitalmars.com/dmd.${Version1}.zip" !define DownloadDmd2ZipUrl "http://ftp.digitalmars.com/dmd.${Version2}.zip" !define DownloadDmcZipUrl "http://ftp.digitalmars.com/dmc.zip" +!define DownloadCurlZipUrl "http://ftp.digitalmars.com/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 From cd7a802bfed4ed66fef2289836757705aed32540 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 29 Feb 2012 12:29:58 -0700 Subject: [PATCH 2/2] Use GitHub download link for DMD2 and curl binary. --- windows/dinstaller.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/dinstaller.nsi b/windows/dinstaller.nsi index e47d8a5f..c2ba64d0 100644 --- a/windows/dinstaller.nsi +++ b/windows/dinstaller.nsi @@ -12,9 +12,9 @@ ; 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 "http://ftp.digitalmars.com/curl-${VersionCurl}-dmd-win32.zip" ;"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"