Ver código fonte

show embedded host and version

David Rose 14 anos atrás
pai
commit
c6816fa9b5
2 arquivos alterados com 17 adições e 4 exclusões
  1. 8 2
      direct/src/p3d/packp3d.py
  2. 9 2
      direct/src/p3d/ppackage.py

+ 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
 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:

+ 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
 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)