diff options
Diffstat (limited to 'build_files/buildbot/slave_compile.py')
-rw-r--r-- | build_files/buildbot/slave_compile.py | 46 |
1 files changed, 32 insertions, 14 deletions
diff --git a/build_files/buildbot/slave_compile.py b/build_files/buildbot/slave_compile.py index dab8a8e6483..caa4acc4ecd 100644 --- a/build_files/buildbot/slave_compile.py +++ b/build_files/buildbot/slave_compile.py @@ -21,6 +21,7 @@ import os import subprocess import sys +import shutil # get builder name if len(sys.argv) < 2: @@ -57,9 +58,19 @@ else: scons_cmd = ['python', 'scons/scons.py'] scons_options = ['BF_FANCY=False'] - if builder.find('linux') != -1: - import shutil + # We're using the same rules as release builder, so tweak + # build and install dirs + build_dir = os.path.join('..', 'build', builder) + install_dir = os.path.join('..', 'install', builder) + + # Clean install directory so we'll be sure there's no + if os.path.isdir(install_dir): + shutil.rmtree(install_dir) + buildbot_dir = os.path.dirname(os.path.realpath(__file__)) + config_dir = os.path.join(buildbot_dir, 'config') + + if builder.find('linux') != -1: configs = [] if builder.endswith('linux_glibc211_x86_64_scons'): configs = ['user-config-player-glibc211-x86_64.py', @@ -81,20 +92,8 @@ else: prog_scons_cmd = ['schroot', '-c', chroot_name, '--'] + scons_cmd cuda_scons_cmd = ['schroot', '-c', cuda_chroot, '--'] + scons_cmd - # We're using the same rules as release builder, so tweak - # build and install dirs - build_dir = os.path.join('..', 'build', builder) - install_dir = os.path.join('..', 'install', builder) - common_options = ['BF_INSTALLDIR=' + install_dir] + scons_options - # Clean install directory so we'll be sure there's no - if os.path.isdir(install_dir): - shutil.rmtree(install_dir) - - buildbot_dir = os.path.dirname(os.path.realpath(__file__)) - config_dir = os.path.join(buildbot_dir, 'config') - for config in configs: config_fpath = os.path.join(config_dir, config) @@ -137,11 +136,30 @@ else: if builder.find('win64') != -1: bitness = '64' + scons_options.append('BF_INSTALLDIR=' + install_dir) + scons_options.append('BF_BUILDDIR=' + build_dir) scons_options.append('BF_BITNESS=' + bitness) scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=True') scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe') if builder.find('mingw') != -1: scons_options.append('BF_TOOLSET=mingw') + elif builder.find('mac') != -1: + if builder.find('x86_64') != -1: + config = 'user-config-mac-x86_64.py' + else: + config = 'user-config-mac-i386.py' + + scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config)) retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options) + + if builder.find('win') != -1: + dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest') + if builder.find('win64') == -1: + dlls_path = 'C:\\b\\redist\\x86' + else: + dlls_path = 'C:\\b\\redist\\amd64' + for dll in dlls: + shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll)) + sys.exit(retcode) |