Browse Source

add --cab

David Rose 16 years ago
parent
commit
01ac73fc87
1 changed files with 14 additions and 10 deletions
  1. 14 10
      direct/src/plugin_installer/make_installer.py

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