From 4ece50723bf82af2dedf99f41d761827e668ad7e Mon Sep 17 00:00:00 2001 From: Jens Verwiebe Date: Fri, 16 Nov 2012 00:43:28 +0000 Subject: [PATCH] OSX/scons/osl: ready for compile now, little hack to be resolved, todo:fix a crash with shadercompile --- build_files/scons/tools/Blender.py | 8 ++++++++ intern/cycles/kernel/shaders/SConscript | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 23e732370ce..27e8feaea80 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -652,6 +652,14 @@ def AppIt(target=None, source=None, env=None): cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir) commands.getoutput(cmd) + if env['WITH_BF_CYCLES_OSL']: + cmd = 'mkdir %s/shader' % (cinstalldir) + commands.getoutput(cmd) + cmd = 'cp -R %s/kernel/shaders/*.h %s/shader' % (croot, cinstalldir) + commands.getoutput(cmd) + cmd = 'cp -R %s/../intern/cycles/kernel/shaders/*.oso %s/shader' % (builddir, cinstalldir) + commands.getoutput(cmd) + if env['WITH_OSX_STATICPYTHON']: cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION) commands.getoutput(cmd) diff --git a/intern/cycles/kernel/shaders/SConscript b/intern/cycles/kernel/shaders/SConscript index 924aff4fc22..1d446205d92 100644 --- a/intern/cycles/kernel/shaders/SConscript +++ b/intern/cycles/kernel/shaders/SConscript @@ -14,7 +14,10 @@ if env['WITH_BF_CYCLES_OSL']: shaders = env.Clone() # osl compiler info - osl_compiler = env['BF_OSL_COMPILER'] + if env['OURPLATFORM']=='darwin': + osl_compiler = '../lib/darwin-9.x.universal/osl/bin/oslc' # temporary hack to get the leading "#" away that breaks shadercompile + else: + osl_compiler = env['BF_OSL_COMPILER'] # build directory root_build_dir = normpath(env['BF_BUILDDIR'])