From 2995f65b17f2a1bc5756ba62af9734bb04f1d3aa Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 18 Sep 2009 21:17:38 +0000 Subject: [PATCH] add -A --- direct/src/p3d/packp3d.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/packp3d.py b/direct/src/p3d/packp3d.py index 3ad088eb6a..0ccb109220 100755 --- a/direct/src/p3d/packp3d.py +++ b/direct/src/p3d/packp3d.py @@ -37,6 +37,12 @@ Options: all be combined in the first file. If the private key is encrypted, the password will be required to decrypt it. + -A + Sets the auto-start flag in the application, so that the user + will not need to click the green play button before it starts, + when embedded in a web page. This can also be set on the HTML + page. + -r package Names an additional package that this application requires at startup time. The default package is 'panda3d'; you may repeat @@ -72,13 +78,14 @@ class ArgumentError(StandardError): pass def makePackedApp(args): - opts, args = getopt.getopt(args, 'd:m:S:r:s:Dh') + opts, args = getopt.getopt(args, 'd:m:S:Ar:s:Dh') packager = Packager.Packager() root = Filename('.') main = None signParams = [] + autoStart = False requires = [] allowPythonDev = False @@ -89,6 +96,8 @@ def makePackedApp(args): main = value elif option == '-S': signParams.append(value) + elif option == '-A': + autoStart = True elif option == '-r': requires.append(value) elif option == '-s': @@ -141,6 +150,8 @@ def makePackedApp(args): for requireName in requires: packager.do_require(requireName) + if autoStart: + packager.do_config(auto_start = True) if allowPythonDev: packager.do_config(allow_python_dev = True)