diff --git a/direct/src/p3d/panda3d.pdef b/direct/src/p3d/panda3d.pdef index fa72c90029..c3eaaffd28 100755 --- a/direct/src/p3d/panda3d.pdef +++ b/direct/src/p3d/panda3d.pdef @@ -29,11 +29,15 @@ class images(package): basename = '%s.png' % (name) filename = Filename('plugin_images/%s' % (basename)) found = filename.resolveFilename(getModelPath().getValue()) + if not found: + found = filename.resolveFilename("models") if not found: # Then try a jpeg image. basename = '%s.jpg' % (name) filename = Filename('plugin_images/%s' % (basename)) found = filename.resolveFilename(getModelPath().getValue()) + if not found: + found = filename.resolveFilename("models") if found: # Add the image file to the package diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index d7ec85c213..60cfa4436b 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -75,6 +75,7 @@ def usage(problem): print "compiled copy of Panda3D. Command-line arguments are:" print "" print " --help (print the help message you're reading now)" + print " --verbose (print out more information)" print " --installer (build an installer)" print " --optimize X (optimization level can be 1,2,3,4)" print " --version (set the panda version number)" @@ -264,6 +265,7 @@ else: builtdir = os.path.join(os.path.abspath(GetOutputDir())) AddToPathEnv("PYTHONPATH", builtdir) +AddToPathEnv("PANDA_PRC_DIR", os.path.join(builtdir, "etc")) if (sys.platform.startswith("win")): AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "bin")) else: @@ -936,6 +938,19 @@ def FreezePy(target, inputs, opts): if (not os.path.exists(target)): exit("") +########################################################################################## +# +# Package +# +########################################################################################## + +def Package(target, inputs, opts): + # Invoke the ppackage script. + command = SDK["PYTHONEXEC"] + " direct/src/p3d/ppackage.py" + command += " -i \"" + GetOutputDir() + "/stage\"" + command += " direct/src/p3d/panda3d.pdef" + oscmd(command) + ########################################################################################## # # CompileBundle @@ -993,6 +1008,9 @@ def CompileAnything(target, inputs, opts, progress = None): else: ProgressOutput(progress, "Building frozen library", target) return FreezePy(target, inputs, opts) + elif (infile.endswith(".pdef")): + ProgressOutput(progress, "Building package from pdef file", infile) + return Package(target, inputs, opts) elif SUFFIX_LIB.count(origsuffix): ProgressOutput(progress, "Linking static library", target) return CompileLib(target, inputs, opts) @@ -4007,6 +4025,14 @@ if (PkgSkip("PYTHON")==0): TargetAdd('packpanda.exe', input='direct/src/directscripts/packpanda.py') TargetAdd('eggcacher.exe', input='direct/src/directscripts/eggcacher.py') +# +# Build the runtime. +# + +if (RUNTIME): + OPTS=['DIR:direct/src/p3d'] + TargetAdd('panda3d', opts=OPTS, input='panda3d.pdef') + # # Generate the models directory and samples directory # @@ -4143,27 +4169,6 @@ except: SaveDependencyCache() raise -########################################################################################## -# -# The Runtime -# -# This is a package that can be uploaded to a web server, to host panda3d versions -# for the plugin. -# -########################################################################################## - -def MakeRuntime(): - # Invoke the ppackage script. - command = SDK["PYTHONEXEC"] + " direct/src/p3d/ppackage.py" - command += " -i \"" + GetOutputDir() + "/stage\"" - command += " direct/src/p3d/panda3d.pdef" - oscmd(command) - - print "Runtime output stored in \"" + GetOutputDir() + "/stage\"." - -if (RUNTIME != 0): - MakeRuntime() - ########################################################################################## # # The Installers diff --git a/makepanda/makepandacore.py b/makepanda/makepandacore.py index 2cab134d95..e2294fa5ff 100644 --- a/makepanda/makepandacore.py +++ b/makepanda/makepandacore.py @@ -1280,6 +1280,7 @@ def CalcLocation(fn, ipath): if (fn.endswith(".c")): return CxxFindSource(fn, ipath) if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath) if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath) + if (fn.endswith(".pdef")):return CxxFindSource(fn, ipath) if (sys.platform.startswith("win")): if (fn.endswith(".def")): return CxxFindSource(fn, ipath) if (fn.endswith(".rc")): return CxxFindSource(fn, ipath)