Apply patch [#26660] Scons build on OSX fails to create Info.plist file fix
authorNathan Letwory <nathan@letworyinteractive.com>
Wed, 30 Mar 2011 05:44:01 +0000 (05:44 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Wed, 30 Mar 2011 05:44:01 +0000 (05:44 +0000)
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.

build_files/scons/tools/Blender.py

index 1d276d77466081652c556f2b8cac1e4b20072da2..ad4df1a60c1fe61c0fe49cb4a30bb1b4dc1e26e2 100644 (file)
@@ -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)