1
0
Эх сурвалжийг харах

Install msvcrt 2015 for embeddable Python 3.5

Thomas Kluyver 9 жил өмнө
parent
commit
ac8855b170

+ 4 - 1
nsist/__init__.py

@@ -120,7 +120,7 @@ class InstallerBuilder(object):
         self.nsi_template = nsi_template
         if self.nsi_template is None:
             if self.py_format == 'bundled':
-                self.nsi_template = 'pyapp.nsi'
+                self.nsi_template = 'pyapp_msvcrt.nsi'
             elif self._py_version_tuple < (3, 3):
                 self.nsi_template = 'pyapp_w_pylauncher.nsi'
             else:
@@ -371,6 +371,9 @@ if __name__ == '__main__':
         self.install_files.sort(key=operator.itemgetter(1))
         nsis_writer.write(self.nsi_file)
 
+        if self.nsi_template == 'pyapp_msvcrt.nsi':
+            shutil.copy2(pjoin(_PKGDIR, 'windowsversion.nsh'), self.build_dir)
+
     def run_nsis(self):
         """Runs makensis using the specified .nsi file
         

+ 3 - 1
nsist/pyapp_msvcrt.nsi

@@ -36,7 +36,7 @@ Section "-msvcrt"
 
   DetailPrint "Downloading and installing MSVCRT from $0"
   NSISdl::download $0 msvcrt.msu
-  ExecWait 'wusa /quiet /norestart "$INSTDIR\msvcrt.msu"' $1
+  ExecWait 'start /wait wusa /quiet /norestart "$INSTDIR\msvcrt.msu"' $1
   Delete "$INSTDIR\msvcrt.msu"
 
   # This WUSA exit code means a reboot is needed.
@@ -46,4 +46,6 @@ Section "-msvcrt"
 
   skip_msvcrt:
 SectionEnd
+
+[[ super() ]]
 [% endblock sections %]