[Bf-blender-cvs] [a05e90f] master: OSX/scons: fix msgfmt binary linking and locale files distribution

Jens Verwiebe noreply at git.blender.org
Sat Nov 16 21:47:03 CET 2013


Commit: a05e90f5fca40aeb0fa14211edbd80416ffc2cb3
Author: Jens Verwiebe
Date:   Sat Nov 16 21:46:35 2013 +0100
http://developer.blender.org/rBa05e90f5fca40aeb0fa14211edbd80416ffc2cb3

OSX/scons: fix msgfmt binary linking and locale files distribution

===================================================================

M	build_files/scons/tools/Blender.py
M	intern/locale/SConscript

===================================================================

diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index ca3f94a..45b65b5 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -641,7 +641,17 @@ def AppIt(target=None, source=None, env=None):
     if binary == 'blender':
         cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
         commands.getoutput(cmd)
-        cmd = 'cp -R %s/release/datafiles/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
+        cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles/locale'%(installdir, binary, VERSION)
+        commands.getoutput(cmd)
+        mo_dir = os.path.join(builddir[:-4], "locale")
+        for f in os.listdir(mo_dir):
+            cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s'%(installdir, binary, VERSION, f[:-3])
+            commands.getoutput(cmd)
+            cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s/LC_MESSAGES'%(installdir, binary, VERSION, f[:-3])
+            commands.getoutput(cmd)
+            cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
+            commands.getoutput(cmd)
+        cmd = 'cp -R %s/release/datafiles/locale/languages %s/%s.app/Contents/MacOS/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
         commands.getoutput(cmd)
         cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
         commands.getoutput(cmd)
diff --git a/intern/locale/SConscript b/intern/locale/SConscript
index 38161b4..3fb3e1f 100644
--- a/intern/locale/SConscript
+++ b/intern/locale/SConscript
@@ -59,6 +59,9 @@ if env['WITH_BF_INTERNATIONAL']:
 
         msgfmt_tool = env.Clone()
         targetpath = root_build_dir + '/msgfmt'
+        if env['OURPLATFORM'] == 'darwin':
+            msgfmt_tool.Replace( LINKFLAGS = '/usr/lib/libgcc_s.1.dylib /usr/lib/libstdc++.6.dylib /usr/lib/libSystem.B.dylib') # only need this dependencies
+
         msgfmt_target = msgfmt_tool.Program(target = targetpath, source = ['msgfmt.cc'])
 
         locale = env.Clone()




More information about the Bf-blender-cvs mailing list