From 01ac73fc87b92c87c3e4bd6bcead9ae1ffcc33c9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 13 Jan 2010 21:02:30 +0000 Subject: [PATCH] add --cab --- direct/src/plugin_installer/make_installer.py | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/direct/src/plugin_installer/make_installer.py b/direct/src/plugin_installer/make_installer.py index a62baf7032..9e4176dc07 100755 --- a/direct/src/plugin_installer/make_installer.py +++ b/direct/src/plugin_installer/make_installer.py @@ -44,7 +44,7 @@ parser.add_option('-w', '--website', dest = 'website', default = 'http://www.panda3d.org') parser.add_option('', '--start', dest = 'start', help = 'Specify this option to add a start menu', - action = 'store_false', default = False) + action = 'store_true', default = False) parser.add_option('', '--welcome_image', dest = 'welcome_image', help = 'The image to display on the installer, 170x312 BMP', default = None) @@ -54,8 +54,11 @@ parser.add_option('', '--install_icon', dest = 'install_icon', parser.add_option('', '--nsis', dest = 'nsis', help = 'The path to the makensis executable', default = None) +parser.add_option('', '--cab', dest = 'cab', + help = 'Generate an ActiveX CAB file (Windows only). If --spc and --pvk are not also specified, the CAB file will be unsigned.', + action = 'store_true', default = False) parser.add_option('', '--spc', dest = 'spc', - help = 'Generate an ActiveX CAB file, then sign it with the indicated spc file (Windows only). You must also specify --pvk.', + help = 'Sign the CAB file generated by --cab with the indicated spc file (Windows only). You must also specify --pvk.', default = None) parser.add_option('', '--pvk', dest = 'pvk', help = 'Specifies the private key to be used in conjuction with --spc to sign a CAB file (Windows only).', @@ -511,12 +514,13 @@ def makeCabFile(ocx, pluginDependencies): print "Successfully generated %s" % (cabFilename) - # Now we have to sign the cab file. - cmd = '"%s" -spc "%s" -k "%s" "%s"' % (signcode, options.spc, options.pvk, cabFilename) - print cmd - result = subprocess.call(cmd) - if result: - sys.exit(result) + if options.spc and options.pvk: + # Now we have to sign the cab file. + cmd = '"%s" -spc "%s" -k "%s" "%s"' % (signcode, options.spc, options.pvk, cabFilename) + print cmd + result = subprocess.call(cmd) + if result: + sys.exit(result) def makeInstaller(): # Locate the plugin(s). @@ -725,8 +729,8 @@ def makeInstaller(): if result: sys.exit(result) - if options.spc and options.pvk: - # Generate a CAB file and sign it. + if options.cab: + # Generate a CAB file and optionally sign it. makeCabFile(ocx, pluginDependencies) if options.plugin_root: