Browse Source

Remove silly makepanda64.bat script, and some other 64-bits fixes

rdb 16 years ago
parent
commit
d55e92ae68
3 changed files with 16 additions and 34 deletions
  1. 8 0
      makepanda/makepanda.bat
  2. 8 6
      makepanda/makepanda.py
  3. 0 28
      makepanda/makepanda64.bat

+ 8 - 0
makepanda/makepanda.bat

@@ -7,11 +7,19 @@ REM run 'makepanda'.
 REM
 
 if not exist makepanda\makepanda.py goto :missing1
+if %PROCESSOR_ARCHITECTURE% == AMD64 goto :AMD64
+
 if not exist thirdparty\win-python\python.exe goto :missing2
 thirdparty\win-python\python.exe makepanda\makepanda.py %*
 if errorlevel 1 if x%1 == x--slavebuild exit 1
 goto done
 
+:AMD64
+if not exist thirdparty\win-python-x64\python.exe goto :missing2
+thirdparty\win-python-x64\python.exe makepanda\makepanda.py %*
+if errorlevel 1 if x%1 == x--slavebuild exit 1
+goto done
+
 :missing1
   echo You need to change directory to the root of the panda source tree
   echo before invoking makepanda.  For further install instructions, read 

+ 8 - 6
makepanda/makepanda.py

@@ -244,7 +244,6 @@ else:
     VC90CRTVERSION = 0
 
 builtdir = os.path.join(os.path.abspath(GetOutputDir()))
-sys.path += [builtdir, os.path.join(builtdir, "lib")]
 AddToPathEnv("PYTHONPATH", builtdir)
 if (sys.platform.startswith("win")):
     AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "bin"))
@@ -274,7 +273,7 @@ if (RUNTIME) and (PkgSkip("PLUGIN") or PkgSkip("TINYXML")):
 
 if (COMPILER=="MSVC"):
     if (PkgSkip("PYTHON")==0):
-        if (platform.architecture() == "64bit" and os.path.isdir("thirdparty/win-python-x64")):
+        if (platform.architecture()[0]=="64bit" and os.path.isdir("thirdparty/win-python-x64")):
             IncDirectory("ALWAYS", "thirdparty/win-python-x64/include")
             LibDirectory("ALWAYS", "thirdparty/win-python-x64/libs")
         else:
@@ -4168,7 +4167,7 @@ if (RUNTIME != 0):
 #
 ##########################################################################################
 
-def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
+def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
     print "Building "+fullname+" installer. This can take up to an hour."
     if (COMPRESSOR != "lzma"):
         print("Note: you are using zlib, which is faster, but lzma gives better compression.")
@@ -4195,7 +4194,7 @@ def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
     cmd=cmd+'/DPSOURCE="'+psource+'" '
     cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" '
     cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
-    oscmd( cmd)
+    oscmd(cmd)
     os.rename("nsis-output.exe", file)
 
 
@@ -4355,8 +4354,11 @@ def MakeInstallerOSX():
     oscmd("rm -rf Panda3D-tpl-rw")
 
 if (INSTALLER != 0):
-    if (sys.platform == "win32"):
-        MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
+    if (sys.platform.startswith("win")):
+        if (platform.architecture()[0] == "64bit"):
+            MakeInstallerNSIS("Panda3D-"+VERSION+"-x64.exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
+        else:
+            MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
     elif (sys.platform == "linux2"):
         MakeInstallerLinux()
     elif (sys.platform == "darwin"):

+ 0 - 28
makepanda/makepanda64.bat

@@ -1,28 +0,0 @@
-@echo off
-
-REM
-REM Verify that we can find the 'makepanda' python script
-REM and the python interpreter.  If we can find both, then
-REM run 'makepanda'.
-REM
-
-if not exist makepanda\makepanda.py goto :missing1
-if not exist thirdparty\win64\win-python\python.exe goto :missing2
-thirdparty\win64\win-python\python.exe makepanda\makepanda.py %*
-if errorlevel 1 if x%1 == x--slavebuild exit 1
-goto done
-
-:missing1
-  echo You need to change directory to the root of the panda source tree
-  echo before invoking makepanda.  For further install instructions, read 
-  echo the installation instructions in the file doc/INSTALL-MK.
-  goto done
-
-:missing2
-  echo You seem to be missing the 'thirdparty' directory.  You probably checked
-  echo the source code out from sourceforge.  The sourceforge repository is
-  echo missing the 'thirdparty' directory.  You will need to supplement the
-  echo code by downloading the 'thirdparty' directory from panda3d.etc.cmu.edu
-  goto done
-
-:done