Apply patch [#26660] Scons build on OSX fails to create Info.plist file fix

provided by Mike Sloman

from the patch report:

When building on Mac OSX with SCONS the Info.plist file is zero length and thus OSX cannot identify icons and file type associations.

The problems was in the execution of the "date" command to add times in the modified bundle name strings passed to sed. This failed and thus the info.plist file was overwritten with 0 length file.
This commit is contained in:
Nathan Letwory 2011-03-30 05:44:01 +00:00
parent f8b42877b0
commit 5b19ec3559

@ -489,7 +489,7 @@ def AppIt(target=None, source=None, env=None):
shutil.rmtree(cmd)
shutil.copytree(sourcedir, cmd)
cmd = "cat %s | sed s/\$\{MACOSX_BUNDLE_SHORT_VERSION_STRING\}/%s/ | "%(sourceinfo,VERSION)
cmd += "sed s/\$\{MACOSX_BUNDLE_LONG_VERSION_STRING\}/%s,\ `date +'%%Y-%%b-%%d'`/ > %s"%(VERSION,targetinfo)
cmd += "sed s/\$\{MACOSX_BUNDLE_LONG_VERSION_STRING\}/%s,\ %s/g > %s"%(VERSION,time.strftime("%Y-%b-%d"),targetinfo)
commands.getoutput(cmd)
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
commands.getoutput(cmd)