Browse Source

Fix issue building against copy of Python that was compiled with MSVC 2010

rdb 9 years ago
parent
commit
6259feb934
1 changed files with 5 additions and 2 deletions
  1. 5 2
      makepanda/makepanda.py

+ 5 - 2
makepanda/makepanda.py

@@ -2951,9 +2951,12 @@ if GetTarget() == 'windows' and "VISUALSTUDIO" in SDK:
     crtname = "Microsoft.VC%s.CRT" % (vcver)
     dir = os.path.join(SDK["VISUALSTUDIO"], "VC", "redist", GetTargetArch(), crtname)
 
-    if os.path.isdir(dir):
-        CopyFile(GetOutputDir() + "/bin/", os.path.join(dir, "vcruntime" + vcver + ".dll"))
+    if os.path.isfile(os.path.join(dir, "msvcr" + vcver + ".dll")):
+        CopyFile(GetOutputDir() + "/bin/", os.path.join(dir, "msvcr" + vcver + ".dll"))
+    if os.path.isfile(os.path.join(dir, "msvcp" + vcver + ".dll")):
         CopyFile(GetOutputDir() + "/bin/", os.path.join(dir, "msvcp" + vcver + ".dll"))
+    if os.path.isfile(os.path.join(dir, "vcruntime" + vcver + ".dll")):
+        CopyFile(GetOutputDir() + "/bin/", os.path.join(dir, "vcruntime" + vcver + ".dll"))
 
 ########################################################################
 ##