Browse Source

Find nsis in any installed SDK

rdb 15 years ago
parent
commit
d87550fd5a
1 changed files with 10 additions and 3 deletions
  1. 10 3
      direct/src/p3d/DeploymentTools.py

+ 10 - 3
direct/src/p3d/DeploymentTools.py

@@ -784,9 +784,16 @@ class Installer:
         # Check if we have makensis first
         makensis = None
         if (sys.platform.startswith("win")):
-            for p in os.defpath.split(";") + os.environ["PATH"].split(";"):
-                if os.path.isfile(os.path.join(p, "makensis.exe")):
-                    makensis = os.path.join(p, "makensis.exe")
+            syspath = os.defpath.split(";") + os.environ["PATH"].split(";")
+            for p in set(syspath):
+                p1 = os.path.join(p, "makensis.exe")
+                p2 = os.path.join(os.path.dirname(p), "nsis", "makensis.exe")
+                if os.path.isfile(p1):
+                    makensis = p1
+                    break
+                elif os.path.isfile(p2):
+                    makensis = p2
+                    break
             if not makensis:
                 import pandac
                 makensis = os.path.dirname(os.path.dirname(pandac.__file__))