瀏覽代碼

Download using inetc instead of nsisdl

Thomas Kluyver 9 年之前
父節點
當前提交
318390e781
共有 3 個文件被更改,包括 4 次插入2 次删除
  1. 二進制
      nsist/inetc.dll
  2. 1 0
      nsist/nsiswriter.py
  3. 3 2
      nsist/pyapp_msvcrt.nsi

二進制
nsist/inetc.dll


+ 1 - 0
nsist/nsiswriter.py

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

+ 3 - 2
nsist/pyapp_msvcrt.nsi

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