Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
windows: allow https downloads in nsis installer (fixes #18360)
  • Loading branch information
jef-n committed Dec 31, 2018
1 parent fea05d6 commit 3599842
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
17 changes: 9 additions & 8 deletions ms-windows/QGIS-Installer.nsi
Expand Up @@ -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/"

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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
9 changes: 9 additions & 0 deletions ms-windows/osgeo4w/creatensis.pl
Expand Up @@ -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;
Expand Down Expand Up @@ -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 "..";


Expand Down

0 comments on commit 3599842

Please sign in to comment.