exclude addons_contrib/ for release builds.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 17 Nov 2011 19:43:59 +0000 (19:43 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 17 Nov 2011 19:43:59 +0000 (19:43 +0000)
SConstruct
build_files/scons/tools/btools.py
source/creator/CMakeLists.txt

index b5075aa43450e0f8adf20bb5697a87725586236a..cd4e31efeff917e03ee5085a0a89ca87b26c6d59 100644 (file)
@@ -70,6 +70,7 @@ BlenderEnvironment = Blender.BlenderEnvironment
 B = Blender
 
 VERSION = btools.VERSION # This is used in creating the local config directories
+VERSION_RELEASE_CYCLE = btools.VERSION_RELEASE_CYCLE
 
 ### globals ###
 platform = sys.platform
@@ -524,6 +525,10 @@ if env['OURPLATFORM']!='darwin':
                 if '__pycache__' in dn:  # py3.2 cache dir
                     dn.remove('__pycache__')
 
+                # only for testing builds
+                if VERSION_RELEASE_CYCLE == "release" and "addons_contrib" in dn:
+                    dn.remove('addons_contrib')
+
                 dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
                 dir += os.sep + os.path.basename(scriptpath) + dp[len(scriptpath):]
 
index 856231e3c84936aa56595f1b98d02850c56b8105..4c826b12e89b850f094913d05cd57a5602b5efad 100644 (file)
@@ -52,7 +52,7 @@ def get_version():
             else:
                 ver_display = "%s%s" % (ver_base, ver_char)  # assume release
 
-            return ver_base, ver_display
+            return ver_base, ver_display, ver_cycle
 
     raise Exception("%s: missing version string" % fname)
 
@@ -80,7 +80,7 @@ def checkEndian():
 
 
 # This is used in creating the local config directories
-VERSION, VERSION_DISPLAY = get_version()
+VERSION, VERSION_DISPLAY, VERSION_RELEASE_CYCLE = get_version()
 REVISION = get_revision()
 ENDIAN = checkEndian()
 
index ff82b836981d6f8b38155792dcb78b06ee016e55..fa68704c7cd1ba65fd08e3656439b466eb8b3b0c 100644 (file)
@@ -276,12 +276,23 @@ install(
 
 if(WITH_PYTHON)
        # install(CODE "message(\"copying blender scripts...\")")
+       
+       # exclude addons_contrib if release
+       if("${BLENDER_VERSION_CYCLE}" STREQUAL "release")
+               set(ADDON_EXCLUDE_CONDITIONAL "addons_contrib/*")
+       else()
+               set(ADDON_EXCLUDE_CONDITIONAL "_addons_contrib/*")  # dummy, wont do anything
+       endif()
+
        install(
                DIRECTORY ${CMAKE_SOURCE_DIR}/release/scripts
                DESTINATION ${TARGETDIR_VER}
                PATTERN ".svn" EXCLUDE
                PATTERN "__pycache__" EXCLUDE
+               PATTERN "${ADDON_EXCLUDE_CONDITIONAL}" EXCLUDE
        )
+       
+       unset(ADDON_EXCLUDE_CONDITIONAL)
 endif()
 
 # localization