2
0
Эх сурвалжийг харах

show embedded host and version

David Rose 14 жил өмнө
parent
commit
c6816fa9b5

+ 8 - 2
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
 distribution.  The resulting p3d file can be run by the Panda3D
 runtime executable, or by the Panda3D web browser plugin.
 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 see ppackage, a more powerful (but more complex) tool that can
 also be used to build p3d applications, using a pdef description file.
 also be used to build p3d applications, using a pdef description file.
 
 
@@ -143,8 +146,11 @@ def makePackedApp(args):
         elif option == '-D':
         elif option == '-D':
             allowPythonDev = True
             allowPythonDev = True
         elif option == '-h':
         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)
             sys.exit(1)
 
 
     if not appFilename:
     if not appFilename:

+ 9 - 2
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
 packp3d, which is designed to be a simpler interface for building
 applications.)
 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
 This script is actually a wrapper around Panda's Packager.py, which
 can be invoked directly by Python code that requires a programmatic
 can be invoked directly by Python code that requires a programmatic
 interface to building packages.
 interface to building packages.
@@ -110,7 +113,7 @@ Options:
   -H
   -H
      Treats a packager.setHost() call in the pdef file as if it were
      Treats a packager.setHost() call in the pdef file as if it were
      merely a call to packager.addHost().  This allows producing a
      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.
      which is sometimes useful in development.
 
 
   -a suffix
   -a suffix
@@ -132,7 +135,11 @@ from direct.p3d import Packager
 from pandac.PandaModules import *
 from pandac.PandaModules import *
 
 
 def usage(code, msg = ''):
 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
     print >> sys.stderr, msg
     sys.exit(code)
     sys.exit(code)