Skip to content
Permalink
Browse files

windows: allow https downloads in nsis installer (fixes #18360)

  • Loading branch information
jef-n committed Dec 31, 2018
1 parent fea05d6 commit 3599842575183afb97f7e2f8d7d8e4b805a6df02
Showing with 18 additions and 8 deletions.
  1. +9 −8 ms-windows/QGIS-Installer.nsi
  2. +9 −0 ms-windows/osgeo4w/creatensis.pl
@@ -37,14 +37,15 @@ RequestExecutionLevel admin

!addplugindir osgeo4w/untgz
!addplugindir osgeo4w/nsis
!addplugindir osgeo4w/inetc

;----------------------------------------------------------------------------------------------------------------------------

;Publisher variables

!define PUBLISHER "QGIS Development Team"
!define WEB_SITE "http://qgis.org"
!define WIKI_PAGE "http://qgis.org/en/docs/"
!define WEB_SITE "https://qgis.org"
!define WIKI_PAGE "https://qgis.org/en/docs/"

;----------------------------------------------------------------------------------------------------------------------------

@@ -404,9 +405,9 @@ Function DownloadDataSet
download:
SetShellVarContext current
InitPluginsDir
NSISdl::download "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME"
Pop $0
StrCmp $0 "success" download_ok download_failed
inetc::get /caption "$ARCHIVE_NAME" /canceltext "Cancel" "$HTTP_PATH/$ARCHIVE_NAME" "$TEMP\$ARCHIVE_NAME" /end
Pop $0 # return value = exit code, "OK" means OK
StrCmp $0 "OK" download_ok download_failed

download_ok:
InitPluginsDir
@@ -443,7 +444,7 @@ Section /O "North Carolina Data Set" SecNorthCarolinaSDB
;Set the size (in KB) of the unpacked archive file
AddSize 293314

StrCpy $HTTP_PATH "http://grass.osgeo.org/sampledata"
StrCpy $HTTP_PATH "https://grass.osgeo.org/sampledata"
StrCpy $ARCHIVE_NAME "nc_spm_latest.tar.gz"
StrCpy $EXTENDED_ARCHIVE_NAME "North Carolina"
StrCpy $ORIGINAL_UNTAR_FOLDER "nc_spm_08"
@@ -461,7 +462,7 @@ Section /O "South Dakota (Spearfish) Data Set" SecSpearfishSDB
;Set the size (in KB) of the unpacked archive file
AddSize 42171

StrCpy $HTTP_PATH "http://grass.osgeo.org/sampledata"
StrCpy $HTTP_PATH "https://grass.osgeo.org/sampledata"
StrCpy $ARCHIVE_NAME "spearfish_grass60data-0.3.tar.gz"
StrCpy $EXTENDED_ARCHIVE_NAME "South Dakota (Spearfish)"
StrCpy $ORIGINAL_UNTAR_FOLDER "spearfish60"
@@ -479,7 +480,7 @@ Section /O "Alaska Data Set" SecAlaskaSDB
;Set the size (in KB) of the unpacked archive file
AddSize 33914

StrCpy $HTTP_PATH "http://qgis.org/downloads/data"
StrCpy $HTTP_PATH "https://qgis.org/downloads/data"
StrCpy $ARCHIVE_NAME "qgis_sample_data.tar.gz"
StrCpy $EXTENDED_ARCHIVE_NAME "Alaska"
StrCpy $ORIGINAL_UNTAR_FOLDER "qgis_sample_data"
@@ -78,6 +78,9 @@ BEGIN
system "wget $wgetopt -c http://qgis.org/downloads/Untgz.zip" unless -f "Untgz.zip";
die "download of Untgz.zip failed" if $?;

system "wget $wgetopt -c https://qgis.org/downloads/Inetc.zip" unless -f "Inetc.zip";
die "download of Inetc.zip failed" if $?;

my %dep;
my %file;
my %lic;
@@ -386,6 +389,12 @@ sub getDeps {
die "unpacking Untgz.zip failed" if $?;
}

unless(-d "inetc") {
mkdir "inetc", 0755;
system "unzip -p $packages/Inetc.zip Plugins/x86-ansi/INetC.dll >inetc/INetC.dll";
die "unpacking Inetc.zip failed" if $?;
}

chdir "..";


0 comments on commit 3599842

Please sign in to comment.
You can’t perform that action at this time.