From daf9c87a055d24034052761d1e53f07f8d0da3b8 Mon Sep 17 00:00:00 2001 From: David Rose Date: Fri, 20 Nov 2009 02:05:13 +0000 Subject: [PATCH] Description.plist --- direct/src/plugin_installer/make_installer.py | 47 +++++++++++++++---- 1 file changed, 38 insertions(+), 9 deletions(-) diff --git a/direct/src/plugin_installer/make_installer.py b/direct/src/plugin_installer/make_installer.py index 949dcf68ac..5c58f990db 100755 --- a/direct/src/plugin_installer/make_installer.py +++ b/direct/src/plugin_installer/make_installer.py @@ -132,6 +132,24 @@ Info_plist = """ """ +############################################################################## +# +# This Description.plist file is used only for the OSX 10.4 version of packagemaker. +# +############################################################################## + +Description_plist = """ + + + + IFPkgDescriptionDescription + + IFPkgDescriptionTitle + %(long_name)s + + +""" + ############################################################################## # @@ -520,7 +538,8 @@ def makeInstaller(): package_id = 'org.panda3d.pkg.runtime' #TODO: maybe more customizable? - plistFilename = None + infoFilename = None + descriptionFilename = None packagemaker = "/Developer/usr/bin/packagemaker" if os.path.exists(packagemaker): # PackageMaker 3.0 or better, e.g. OSX 10.5. @@ -537,19 +556,27 @@ def makeInstaller(): else: # PackageMaker 2.0, e.g. OSX 10.4. packagemaker = "/Developer/Tools/packagemaker" - plistFilename = '/tmp/Info_plist' - plist = open(plistFilename, 'w') - plist.write(Info_plist % { + infoFilename = '/tmp/Info_plist' + info = open(infoFilename, 'w') + info.write(Info_plist % { 'package_id' : package_id, - 'version' : options.version + 'version' : options.version, }) - plist.close() + info.close() + descriptionFilename = '/tmp/Description_plist' + description = open(descriptionFilename, 'w') + description.write(Description_plist % { + 'long_name' : options.long_name, + 'short_name' : options.short_name, + }) + description.close() CMD = packagemaker CMD += ' -build' CMD += ' -f "%s"' % tmproot CMD += ' -r "%s"' % tmpresdir CMD += ' -p p3d-setup.pkg' - CMD += ' -i "%s"' % (plistFilename) + CMD += ' -i "%s"' % (infoFilename) + CMD += ' -d "%s"' % (descriptionFilename) print "" print CMD @@ -559,8 +586,10 @@ def makeInstaller(): subprocess.call(CMD, shell = True) shutil.rmtree(tmproot) - if plistFilename: - os.unlink(plistFilename) + if infoFilename: + os.unlink(infoFilename) + if descriptionFilename: + os.unlink(descriptionFilename) if os.path.exists(tmpresdir): shutil.rmtree(tmpresdir)