From bc647ff26474588f1d7789aab0273faba019b258 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 20 Jul 2009 08:57:24 +0000 Subject: [PATCH] Minor fixes --- makepanda/makepanda.py | 22 +++++++++++----------- makepanda/makepandacore.py | 12 ++++++++++-- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index cb1f9cd6e4..63c3cd87a1 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2776,17 +2776,6 @@ if (PkgSkip("PYTHON")==0): OPTS=['DIR:direct/src/directbase', 'BUILDING:DIRECT'] TargetAdd('directbase_directbase.obj', opts=OPTS, input='directbase.cxx') -# -# Freeze whatever we need to freeze. -# - -if (PkgSkip("PYTHON")==0): - if (sys.platform == "darwin" or sys.platform.startswith("win") or ("PYTHONVERSION" in SDK and SDK["PYTHONVERSION"] == "python2.6")): - TargetAdd('runp3d.exe', input='direct/src/showutil/runp3d.py') - TargetAdd('packp3d.exe', input='direct/src/showutil/packp3d.py') - TargetAdd('packpanda.exe', input='direct/src/directscripts/packpanda.py') - TargetAdd('eggcacher.exe', input='direct/src/directscripts/eggcacher.py') - # # DIRECTORY: direct/src/dcparser/ # @@ -3764,6 +3753,17 @@ if (PkgSkip("PYTHON")==0): if (PkgSkip("ODE")==0): TargetAdd('PandaModules.py', input='libpandaode.dll') +# +# Freeze whatever we need to freeze. +# + +if (PkgSkip("PYTHON")==0): + if (sys.platform == "darwin" or sys.platform.startswith("win") or ("PYTHONVERSION" in SDK and SDK["PYTHONVERSION"] == "python2.6")): + TargetAdd('runp3d.exe', input='direct/src/showutil/runp3d.py') + TargetAdd('packp3d.exe', input='direct/src/showutil/packp3d.py') + TargetAdd('packpanda.exe', input='direct/src/directscripts/packpanda.py') + TargetAdd('eggcacher.exe', input='direct/src/directscripts/eggcacher.py') + # # Generate the models directory and samples directory # diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 0e434b5470..0c279262c0 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -111,7 +111,7 @@ def oscmd(cmd, ignoreError = False): print cmd sys.stdout.flush() if sys.platform == "win32": - exe = cmd.split[0] + exe = cmd.split()[0] if not (len(exe) > 4 and exe[-4:] == ".exe"): exe += ".exe" if os.path.isfile(exe)==0: @@ -1068,7 +1068,15 @@ def CheckLinkerLibraryPath(): ldpath = ldpath + os.environ["LD_LIBRARY_PATH"].split(":") if (sys.platform == "darwin" and os.environ.has_key("DYLD_LIBRARY_PATH")): dyldpath = os.environ["DYLD_LIBRARY_PATH"].split(":") - + + # Remove any potential current Panda installation lib dirs + for i in ldpath: + if i.startswith("/usr/lib/panda"): ldpath.remove(i) + for i in ldpath: + if i.startswith("/usr/local/panda"): ldpath.remove(i) + for i in dyldpath: + if i.startswith("/Applications/Panda3D"): dyldpath.remove(i) + # Add built/lib/ to (DY)LD_LIBRARY_PATH if it's not already there if (ldpath.count(builtlib)==0): if (os.environ.has_key("LD_LIBRARY_PATH")):