Browse Source

Download using inetc instead of nsisdl

Thomas Kluyver 9 years ago
parent
commit
318390e781
3 changed files with 4 additions and 2 deletions
  1. BIN
      nsist/inetc.dll
  2. 1 0
      nsist/nsiswriter.py
  3. 3 2
      nsist/pyapp_msvcrt.nsi

BIN
nsist/inetc.dll


+ 1 - 0
nsist/nsiswriter.py

@@ -54,6 +54,7 @@ class NSISFileWriter(object):
             'arch_tag': '.amd64' if (installerbuilder.py_bitness==64) else '',
             'pjoin': ntpath.join,
             'single_shortcut': len(installerbuilder.shortcuts) == 1,
+            'pynsist_pkg_dir': _PKGDIR,
         }
 
         if installerbuilder.py_format == 'bundled':

+ 3 - 2
nsist/pyapp_msvcrt.nsi

@@ -1,6 +1,7 @@
 [% extends "pyapp.nsi" %]
 
 [% block sections %]
+!addplugindir [[ pynsist_pkg_dir ]]
 !include windowsversion.nsh
 !include x64.nsh
 
@@ -36,10 +37,10 @@ Section "-msvcrt"
 
   DetailPrint "Need to install MSVCRT 2015. This may take a few minutes."
   DetailPrint "Downloading $0"
-  NSISdl::download "$0" "$INSTDIR\msvcrt.msu"
+  inetc::get /RESUME "" "$0" "$INSTDIR\msvcrt.msu"
   Pop $2
   DetailPrint "Download finished ($2)"
-  ${If} $2 == "success"
+  ${If} $2 == "OK"
     DetailPrint "Running wusa to install update package"
     ExecWait 'wusa "$INSTDIR\msvcrt.msu" /quiet /norestart' $1
     Delete "$INSTDIR\msvcrt.msu"