From c6816fa9b5219608c8cc753e0e377e4eaafef37f Mon Sep 17 00:00:00 2001 From: David Rose Date: Thu, 1 Sep 2011 22:12:44 +0000 Subject: [PATCH] show embedded host and version --- direct/src/p3d/packp3d.py | 10 ++++++++-- direct/src/p3d/ppackage.py | 11 +++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index 5edc5164bc..58d4db7026 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -7,6 +7,9 @@ tree of .py files and models, into a p3d file for convenient distribution. The resulting p3d file can be run by the Panda3D runtime executable, or by the Panda3D web browser plugin. +This command will build p3d files that reference Panda3D %s, +from host %s . + Also see ppackage, a more powerful (but more complex) tool that can also be used to build p3d applications, using a pdef description file. @@ -143,8 +146,11 @@ def makePackedApp(args): elif option == '-D': allowPythonDev = True elif option == '-h': - print usageText % (os.path.split(sys.argv[0])[1], - '%s.%s' % (sys.version_info[0], sys.version_info[1])) + print usageText % ( + PandaSystem.getPackageVersionString(), + PandaSystem.getPackageHostUrl(), + os.path.split(sys.argv[0])[1], + '%s.%s' % (sys.version_info[0], sys.version_info[1])) sys.exit(1) if not appFilename: diff --git a/direct/src/p3d/ppackage.py b/direct/src/p3d/ppackage.py index bdd65e0dde..65cca13cd4 100755 --- a/direct/src/p3d/ppackage.py +++ b/direct/src/p3d/ppackage.py @@ -12,6 +12,9 @@ file, for execution by the Panda3D plugin or runtime. (But also see packp3d, which is designed to be a simpler interface for building applications.) +This command will build p3d files that reference Panda3D %(version)s, +from host %(host)s . + This script is actually a wrapper around Panda's Packager.py, which can be invoked directly by Python code that requires a programmatic interface to building packages. @@ -110,7 +113,7 @@ Options: -H Treats a packager.setHost() call in the pdef file as if it were merely a call to packager.addHost(). This allows producing a - package for an alternate host than itsP3DSUFFIX normally configured host, + package for an alternate host than its normally configured host, which is sometimes useful in development. -a suffix @@ -132,7 +135,11 @@ from direct.p3d import Packager from pandac.PandaModules import * def usage(code, msg = ''): - print >> sys.stderr, usageText % {'prog' : os.path.split(sys.argv[0])[1]} + print >> sys.stderr, usageText % { + 'version' : PandaSystem.getPackageVersionString(), + 'host' : PandaSystem.getPackageHostUrl(), + 'prog' : os.path.split(sys.argv[0])[1] + } print >> sys.stderr, msg sys.exit(code)