Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDamien Plisson <damien.plisson@yahoo.fr>2009-10-27 16:40:41 +0300
committerDamien Plisson <damien.plisson@yahoo.fr>2009-10-27 16:40:41 +0300
commitb8a7f844ca2bf07a70b4e33ca6b28bb7312df11d (patch)
treeb832df93007e65df862fb16a0626ccbdd4cca0f1 /tools
parent54facb5cfe2134d17790a1c24f910bbaaab4e272 (diff)
Mac:
Fixed gcc-4.0 compile error (cocoa) Updated scons to build cocoa (32bit & 64bit) (Thx Jens Verwiebe for the patch): - make sure right python is unzipped to app-bundle ( printing information at the end of compiling ) - make sure arch-setting appends needed flags ( depending on OSX-version obsolete sometimes but harmless ) - link correct frameworks depending on gfx-api ( cocoa/carbon) - conscript prepared for cocoa objC-files - link to openAL-framework, using the headers from blender-lib + the symbols in framework Usage instruction: The default build is Cocoa 32bit. To change it, copy config/darwin-config.py to user-config.py in the blender folder, and edit: - WITH_GHOST_COCOA & MACOSX_ARCHITECTURE variables to select cocoa/carbon, and the arch (i386, X86_64, ppc, ..) - the libs options as usual
Diffstat (limited to 'tools')
-rw-r--r--tools/Blender.py14
-rwxr-xr-xtools/btools.py5
2 files changed, 15 insertions, 4 deletions
diff --git a/tools/Blender.py b/tools/Blender.py
index 5641104ab15..8a2ef93bb26 100644
--- a/tools/Blender.py
+++ b/tools/Blender.py
@@ -456,7 +456,13 @@ def AppIt(target=None, source=None, env=None):
a = '%s' % (target[0])
builddir, b = os.path.split(a)
libdir = env['LCGDIR'][1:]
-
+ osxarch = env['MACOSX_ARCHITECTURE']
+ print("compiled architecture: %s"%(osxarch))
+ if libdir == '../lib/darwin-9.x.universal':
+ python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
+ else:
+ python_zip = 'python.zip' # compatibility for darwin8 python.zip
+ print("unzipping to app-bundle: %s"%(python_zip))
bldroot = env.Dir('.').abspath
binary = env['BINARYKIND']
@@ -477,7 +483,7 @@ def AppIt(target=None, source=None, env=None):
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,builddir, binary, binary)
commands.getoutput(cmd)
cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/'%(builddir, binary)
- print cmd
+# print cmd
commands.getoutput(cmd)
cmd = builddir + '/%s.app/Contents/MacOS/.blender'%binary
shutil.copy(bldroot + '/bin/.blender/.bfont.ttf', cmd)
@@ -490,7 +496,7 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/python/'%(builddir,binary)
commands.getoutput(cmd)
- cmd = 'unzip -q %s/release/python.zip -d %s/%s.app/Contents/MacOS/.blender/python/'%(libdir,builddir,binary)
+ cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/.blender/python/'%(libdir,python_zip,builddir,binary)
commands.getoutput(cmd)
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary)
commands.getoutput(cmd)
@@ -504,6 +510,8 @@ def AppIt(target=None, source=None, env=None):
commands.getoutput(cmd)
cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(builddir, binary)
commands.getoutput(cmd)
+ cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(builddir, binary)
+ commands.getoutput(cmd)
# extract copy system python, be sure to update other build systems
# when making changes to the files that are copied.
diff --git a/tools/btools.py b/tools/btools.py
index b1584ae8784..cacff349dcf 100755
--- a/tools/btools.py
+++ b/tools/btools.py
@@ -63,6 +63,7 @@ def validate_arguments(args, bc):
'WITHOUT_BF_INSTALL',
'WITHOUT_BF_PYTHON_INSTALL',
'WITH_BF_OPENMP',
+ 'WITH_GHOST_COCOA',
'BF_FANCY', 'BF_QUIET',
'BF_X264_CONFIG',
'BF_XVIDCORE_CONFIG',
@@ -84,7 +85,7 @@ def validate_arguments(args, bc):
'BF_PROFILE_CFLAGS', 'BF_PROFILE_CCFLAGS', 'BF_PROFILE_CXXFLAGS', 'BF_PROFILE_LINKFLAGS',
'BF_DEBUG_CFLAGS', 'BF_DEBUG_CCFLAGS', 'BF_DEBUG_CXXFLAGS',
'C_WARN', 'CC_WARN', 'CXX_WARN',
- 'LLIBS', 'PLATFORM_LINKFLAGS',
+ 'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE',
]
@@ -311,6 +312,7 @@ def read_opts(cfg, args):
('BF_FREETYPE_LIBPATH', 'Freetype library path', ''),
(BoolVariable('WITH_BF_OPENMP', 'Use OpenMP if true', False)),
+ (BoolVariable('WITH_GHOST_COCOA', 'Use Cocoa-framework if true', False)),
(BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
('BF_QUICKTIME', 'QuickTime base path', ''),
@@ -350,6 +352,7 @@ def read_opts(cfg, args):
('LLIBS', 'Platform libs', ''),
('PLATFORM_LINKFLAGS', 'Platform linkflags', ''),
+ ('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
(BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
('BF_PROFILE_CFLAGS', 'C only profiling flags', ''),