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
diff options
context:
space:
mode:
Diffstat (limited to 'build_files/scons/tools/btools.py')
-rw-r--r--build_files/scons/tools/btools.py30
1 files changed, 27 insertions, 3 deletions
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index accdde0d2cf..a8bee920a9b 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -134,7 +134,8 @@ def validate_arguments(args, bc):
'BF_RAYOPTIMIZATION_SSE_FLAGS',
'BF_NO_ELBEEM',
'WITH_BF_CXX_GUARDEDALLOC',
- 'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC'
+ 'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
+ 'BUILDBOT_BRANCH'
]
# Have options here that scons expects to be lists
@@ -501,7 +502,9 @@ def read_opts(env, cfg, args):
(BoolVariable('WITH_BF_RAYOPTIMIZATION', 'Enable raytracer SSE/SIMD optimization.', False)),
('BF_RAYOPTIMIZATION_SSE_FLAGS', 'SSE flags', ''),
- (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False))
+ (BoolVariable('WITH_BF_CXX_GUARDEDALLOC', 'Enable GuardedAlloc for C++ memory allocation tracking.', False)),
+
+ ('BUILDBOT_BRANCH', 'Buildbot branch name', ''),
) # end of opts.AddOptions()
return localopts
@@ -546,7 +549,7 @@ def buildslave(target=None, source=None, env=None):
Builder for buildbot integration. Used by buildslaves of http://builder.blender.org only.
"""
- if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw'):
+ if env['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'darwin'):
extension = '.zip'
else:
extension = '.tar.bz2'
@@ -560,9 +563,15 @@ def buildslave(target=None, source=None, env=None):
platform = 'linux-glibc27-x86_64'
elif bitness == '32bit':
platform = 'linux-glibc27-i686'
+ if platform == 'darwin':
+ platform = 'OSX-' + env['MACOSX_ARCHITECTURE']
+
+ branch = env['BUILDBOT_BRANCH']
outdir = os.path.abspath(env['BF_INSTALLDIR'])
package_name = 'blender-' + VERSION+'-'+REVISION + '-' + platform
+ if branch != '':
+ package_name = branch + '-' + package_name
package_dir = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name)
package_archive = os.path.normpath(outdir + os.sep + '..' + os.sep + package_name + extension)
@@ -605,9 +614,12 @@ def NSIS_Installer(target=None, source=None, env=None):
doneroot = False
rootdirconts = []
datafiles = ''
+ deldatafiles = ''
+ deldatadirs = ''
l = len(bf_installdir)
for dp,dn,df in os.walk(bf_installdir):
+ # install
if not doneroot:
for f in df:
rootdirconts.append(os.path.join(dp,f))
@@ -621,6 +633,16 @@ def NSIS_Installer(target=None, source=None, env=None):
outfile = os.path.join(dp,f)
datafiles += ' File '+outfile + "\n"
+ # uninstall
+ deldir = dp[l+1:]
+
+ if len(deldir)>0:
+ deldatadirs = "RMDir $INSTDIR\\" + deldir + "\n" + deldatadirs
+ deldatadirs = "RMDir /r $INSTDIR\\" + deldir + "\\__pycache__\n" + deldatadirs
+
+ for f in df:
+ deldatafiles += 'Delete \"$INSTDIR\\' + os.path.join(deldir, f) + "\"\n"
+
#### change to suit install dir ####
inst_dir = install_base_dir + env['BF_INSTALLDIR']
@@ -657,6 +679,8 @@ def NSIS_Installer(target=None, source=None, env=None):
ns_cnt = string.replace(ns_cnt, "[DELROOTDIRCONTS]", delrootstring)
ns_cnt = string.replace(ns_cnt, "[DODATAFILES]", datafiles)
+ ns_cnt = string.replace(ns_cnt, "[DELDATAFILES]", deldatafiles)
+ ns_cnt = string.replace(ns_cnt, "[DELDATADIRS]", deldatadirs)
tmpnsi = os.path.normpath(install_base_dir+os.sep+env['BF_BUILDDIR']+os.sep+"00.blender_tmp.nsi")
new_nsis = open(tmpnsi, 'w')