Compare commits
48 Commits
temp-ui-wi
...
soc-2013-m
Author | SHA1 | Date | |
---|---|---|---|
9e023dc9cc | |||
9c6a60ab60 | |||
d7e23e1783 | |||
4bffc83835 | |||
2a7a733784 | |||
9fdd86106c | |||
2e9c5fd705 | |||
be42beaacb | |||
39943f1486 | |||
1fb09b9d60 | |||
e494139b59 | |||
b319768af9 | |||
b6a6aaf937 | |||
0a9163c885 | |||
78b484831d | |||
e4b201f7b7 | |||
d24a4a9b63 | |||
cb21085634 | |||
ce17c21303 | |||
8896abe995 | |||
14816b3a9c | |||
600145d273 | |||
d56589fc61 | |||
67313f607a | |||
ac183d3da0 | |||
bc875d1742 | |||
18020c064c | |||
d08a4292f1 | |||
c8c9996e54 | |||
6e83ce4b70 | |||
9dfc38fe46 | |||
cefc0dd68e | |||
9ab6dba74b | |||
1305ae3380 | |||
058985fbb9 | |||
46510ad0ea | |||
0a087e78e7 | |||
280b13c3a5 | |||
8d49700939 | |||
48f811f9d6 | |||
de6c513163 | |||
8e1cac34cb | |||
6fd3c9e2e1 | |||
0efe5d47e2 | |||
732b3720d1 | |||
0f0be925bb | |||
7d53177d57 | |||
132acfbb44 |
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"project_id" : "Blender",
|
||||
"conduit_uri" : "https://developer.blender.org/",
|
||||
"git.default-relative-commit" : "origin/master",
|
||||
"arc.land.update.default" : "rebase"
|
||||
}
|
34
.gitignore
vendored
34
.gitignore
vendored
@@ -1,34 +0,0 @@
|
||||
# generic files to ignore
|
||||
.*
|
||||
|
||||
# python temp paths
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
|
||||
# editors
|
||||
*~
|
||||
*.swp
|
||||
*.swo
|
||||
*#
|
||||
|
||||
# QtCreator
|
||||
CMakeLists.txt.user
|
||||
|
||||
# ms-windows
|
||||
Thumbs.db
|
||||
ehthumbs.db
|
||||
Desktop.ini
|
||||
|
||||
# commonly used paths in blender
|
||||
/blender.bin
|
||||
/user-config.py
|
||||
|
||||
# local patches
|
||||
/*.patch
|
||||
/*.diff
|
||||
|
||||
# in-source doc-gen
|
||||
/doc/doxygen/html/
|
||||
/doc/python_api/sphinx-in-tmp/
|
||||
/doc/python_api/sphinx-in/
|
||||
/doc/python_api/sphinx-out/
|
16
.gitmodules
vendored
16
.gitmodules
vendored
@@ -1,16 +0,0 @@
|
||||
[submodule "release/scripts/addons"]
|
||||
path = release/scripts/addons
|
||||
url = ../blender-addons.git
|
||||
ignore = all
|
||||
[submodule "release/scripts/addons_contrib"]
|
||||
path = release/scripts/addons_contrib
|
||||
url = ../blender-addons-contrib.git
|
||||
ignore = all
|
||||
[submodule "release/datafiles/locale"]
|
||||
path = release/datafiles/locale
|
||||
url = ../blender-translations.git
|
||||
ignore = all
|
||||
[submodule "scons"]
|
||||
path = scons
|
||||
url = ../scons.git
|
||||
ignore = all
|
1859
CMakeLists.txt
1859
CMakeLists.txt
File diff suppressed because it is too large
Load Diff
291
GNUmakefile
291
GNUmakefile
@@ -40,12 +40,7 @@ ifndef BUILD_CMAKE_ARGS
|
||||
endif
|
||||
|
||||
ifndef BUILD_DIR
|
||||
BUILD_DIR:=$(shell dirname "$(BLENDER_DIR)")/build_$(OS_NCASE)
|
||||
endif
|
||||
|
||||
# Allow to use alternative binary (pypy3, etc)
|
||||
ifndef PYTHON
|
||||
PYTHON:=python3
|
||||
BUILD_DIR:=$(shell dirname $(BLENDER_DIR))/build_$(OS_NCASE)
|
||||
endif
|
||||
|
||||
|
||||
@@ -57,44 +52,34 @@ ifneq "$(findstring debug, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_debug
|
||||
BUILD_TYPE:=Debug
|
||||
endif
|
||||
ifneq "$(findstring full, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_full
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_full.cmake"
|
||||
endif
|
||||
ifneq "$(findstring lite, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_lite
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake"
|
||||
endif
|
||||
ifneq "$(findstring cycles, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_cycles
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/cycles_standalone.cmake"
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_lite.cmake
|
||||
endif
|
||||
ifneq "$(findstring headless, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_headless
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake"
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/blender_headless.cmake
|
||||
endif
|
||||
ifneq "$(findstring bpy, $(MAKECMDGOALS))" ""
|
||||
BUILD_DIR:=$(BUILD_DIR)_bpy
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C"$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake"
|
||||
BUILD_CMAKE_ARGS:=$(BUILD_CMAKE_ARGS) -C$(BLENDER_DIR)/build_files/cmake/config/bpy_module.cmake
|
||||
endif
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Get the number of cores for threaded build
|
||||
ifndef NPROCS
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell nproc)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f3)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu" | cut -d" " -f2 )
|
||||
endif
|
||||
NPROCS:=1
|
||||
ifeq ($(OS), Linux)
|
||||
NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
|
||||
endif
|
||||
ifeq ($(OS), Darwin)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
|
||||
endif
|
||||
ifeq ($(OS), FreeBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
|
||||
endif
|
||||
ifeq ($(OS), NetBSD)
|
||||
NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
|
||||
endif
|
||||
|
||||
|
||||
@@ -102,8 +87,8 @@ endif
|
||||
# Macro for configuring cmake
|
||||
|
||||
CMAKE_CONFIG = cmake $(BUILD_CMAKE_ARGS) \
|
||||
-H"$(BLENDER_DIR)" \
|
||||
-B"$(BUILD_DIR)" \
|
||||
-H$(BLENDER_DIR) \
|
||||
-B$(BUILD_DIR) \
|
||||
-DCMAKE_BUILD_TYPE:STRING=$(BUILD_TYPE)
|
||||
|
||||
|
||||
@@ -120,49 +105,45 @@ endif
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Build Blender
|
||||
all: FORCE
|
||||
all:
|
||||
@echo
|
||||
@echo Configuring Blender ...
|
||||
|
||||
# # if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# # $(CMAKE_CONFIG); \
|
||||
# # fi
|
||||
# if test ! -f $(BUILD_DIR)/CMakeCache.txt ; then \
|
||||
# $(CMAKE_CONFIG); \
|
||||
# fi
|
||||
|
||||
# # do this always incase of failed initial build, could be smarter here...
|
||||
@$(CMAKE_CONFIG)
|
||||
# do this always incase of failed initial build, could be smarter here...
|
||||
$(CMAKE_CONFIG)
|
||||
|
||||
@echo
|
||||
@echo Building Blender ...
|
||||
$(MAKE) -C "$(BUILD_DIR)" -s -j $(NPROCS) install
|
||||
$(MAKE) -C $(BUILD_DIR) -s -j $(NPROCS) install
|
||||
@echo
|
||||
@echo edit build configuration with: "$(BUILD_DIR)/CMakeCache.txt" run make again to rebuild.
|
||||
@echo blender installed, run from: "$(BUILD_DIR)/bin/blender"
|
||||
@echo
|
||||
|
||||
debug: all
|
||||
full: all
|
||||
lite: all
|
||||
cycles: all
|
||||
headless: all
|
||||
bpy: all
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Configuration (save some cd'ing around)
|
||||
config: FORCE
|
||||
$(CMAKE_CONFIG_TOOL) "$(BUILD_DIR)"
|
||||
config:
|
||||
$(CMAKE_CONFIG_TOOL) $(BUILD_DIR)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Help for build targets
|
||||
help: FORCE
|
||||
help:
|
||||
@echo ""
|
||||
@echo "Convenience targets provided for building blender, (multiple at once can be used)"
|
||||
@echo " * debug - build a debug binary"
|
||||
@echo " * full - enable all supported dependencies & options"
|
||||
@echo " * lite - disable non essential features for a smaller binary and faster build"
|
||||
@echo " * headless - build without an interface (renderfarm or server automation)"
|
||||
@echo " * cycles - build Cycles standalone only, without Blender"
|
||||
@echo " * bpy - build as a python module which can be loaded from python directly"
|
||||
@echo ""
|
||||
@echo " * config - run cmake configuration tool to set build options"
|
||||
@@ -178,7 +159,7 @@ help: FORCE
|
||||
@echo ""
|
||||
@echo "Package Targets"
|
||||
@echo " * package_debian - build a debian package"
|
||||
@echo " * package_pacman - build an arch linux pacman package"
|
||||
@echo " * package_pacman - build an arch linux pacmanpackage"
|
||||
@echo " * package_archive - build an archive package"
|
||||
@echo ""
|
||||
@echo "Testing Targets (not associated with building blender)"
|
||||
@@ -201,18 +182,10 @@ help: FORCE
|
||||
@echo " * check_spelling_c_qtc - same as check_spelling_c but outputs QtCreator tasks format"
|
||||
@echo " * check_spelling_osl - check for spelling errors (OSL only)"
|
||||
@echo " * check_spelling_py - check for spelling errors (Python only)"
|
||||
@echo " * check_descriptions - check for duplicate/invalid descriptions"
|
||||
@echo ""
|
||||
@echo "Utilities (not associated with building blender)"
|
||||
@echo " * icons - updates PNG icons from SVG files."
|
||||
@echo " * tgz - create a compressed archive of the source code."
|
||||
@echo " * update - updates git and all submodules"
|
||||
@echo ""
|
||||
@echo "Environment Variables"
|
||||
@echo " * BUILD_CMAKE_ARGS - arguments passed to CMake."
|
||||
@echo " * BUILD_DIR - override default build path."
|
||||
@echo " * PYTHON - use this for the Python command (used for checking tools)."
|
||||
@echo " * NPROCS - number of processes to use building (auto-detect when omitted)."
|
||||
@echo " * tbz - create a compressed svn export 'blender_archive.tar.bz2'"
|
||||
@echo ""
|
||||
@echo "Documentation Targets (not associated with building blender)"
|
||||
@echo " * doc_py - generate sphinx python api docs"
|
||||
@@ -220,183 +193,139 @@ help: FORCE
|
||||
@echo " * doc_dna - generate blender file format reference"
|
||||
@echo " * doc_man - generate manpage"
|
||||
@echo ""
|
||||
@echo "Information"
|
||||
@echo " * help - this help message"
|
||||
@echo " * help_features - show a list of optional features when building"
|
||||
@echo ""
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Packages
|
||||
#
|
||||
package_debian: FORCE
|
||||
package_debian:
|
||||
cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
|
||||
|
||||
package_pacman: FORCE
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg
|
||||
package_pacman:
|
||||
cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
|
||||
|
||||
package_archive: FORCE
|
||||
make -C "$(BUILD_DIR)" -s package_archive
|
||||
package_archive:
|
||||
make -C $(BUILD_DIR) -s package_archive
|
||||
@echo archive in "$(BUILD_DIR)/release"
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
#
|
||||
test: FORCE
|
||||
test:
|
||||
cd $(BUILD_DIR) ; ctest . --output-on-failure
|
||||
|
||||
# run pep8 check check on scripts we distribute.
|
||||
test_pep8: FORCE
|
||||
$(PYTHON) tests/python/pep8.py > test_pep8.log 2>&1
|
||||
test_pep8:
|
||||
python3 source/tests/pep8.py > test_pep8.log 2>&1
|
||||
@echo "written: test_pep8.log"
|
||||
|
||||
# run some checks on our cmakefiles.
|
||||
test_cmake: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
test_cmake:
|
||||
python3 build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
|
||||
@echo "written: test_cmake_consistency.log"
|
||||
|
||||
# run deprecation tests, see if we have anything to remove.
|
||||
test_deprecated: FORCE
|
||||
$(PYTHON) tests/check_deprecated.py
|
||||
test_deprecated:
|
||||
python3 source/tests/check_deprecated.py
|
||||
|
||||
test_style_c: FORCE
|
||||
test_style_c:
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/source/blender" \
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator --no-length-check
|
||||
|
||||
test_style_c_qtc: FORCE
|
||||
test_style_c_qtc:
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/source/blender" \
|
||||
"$(BLENDER_DIR)/source/creator" \
|
||||
--no-length-check \
|
||||
> \
|
||||
"$(BLENDER_DIR)/test_style.tasks"
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/source/blender $(BLENDER_DIR)/source/creator --no-length-check > \
|
||||
test_style.tasks
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
|
||||
test_style_osl: FORCE
|
||||
test_style_osl:
|
||||
# run our own checks on C/C++ style
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl"
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
|
||||
|
||||
|
||||
test_style_osl_qtc: FORCE
|
||||
test_style_osl_qtc:
|
||||
# run our own checks on C/C++ style
|
||||
USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_style_c.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders" \
|
||||
"$(BLENDER_DIR)/release/scripts/templates_osl" \
|
||||
> \
|
||||
"$(BLENDER_DIR)/test_style.tasks"
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/check_style_c.py $(BLENDER_DIR)/intern/cycles/kernel/shaders > \
|
||||
test_style.tasks
|
||||
@echo "written: test_style.tasks"
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Project Files
|
||||
#
|
||||
|
||||
project_qtcreator: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_qtcreator_project.py "$(BUILD_DIR)"
|
||||
project_qtcreator:
|
||||
python3 build_files/cmake/cmake_qtcreator_project.py $(BUILD_DIR)
|
||||
|
||||
project_netbeans: FORCE
|
||||
$(PYTHON) build_files/cmake/cmake_netbeans_project.py "$(BUILD_DIR)"
|
||||
project_netbeans:
|
||||
python3 build_files/cmake/cmake_netbeans_project.py $(BUILD_DIR)
|
||||
|
||||
project_eclipse: FORCE
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H"$(BLENDER_DIR)" -B"$(BUILD_DIR)"
|
||||
project_eclipse:
|
||||
cmake -G"Eclipse CDT4 - Unix Makefiles" -H$(BLENDER_DIR) -B$(BUILD_DIR)
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Static Checking
|
||||
#
|
||||
|
||||
check_cppcheck: FORCE
|
||||
check_cppcheck:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py" 2> \
|
||||
"$(BLENDER_DIR)/check_cppcheck.txt"
|
||||
cd $(BUILD_DIR) ; \
|
||||
python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_cppcheck.py 2> \
|
||||
$(BLENDER_DIR)/check_cppcheck.txt
|
||||
@echo "written: check_cppcheck.txt"
|
||||
|
||||
check_clang_array: FORCE
|
||||
check_clang_array:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py"
|
||||
cd $(BUILD_DIR) ; \
|
||||
python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_clang_array.py
|
||||
|
||||
check_splint: FORCE
|
||||
check_splint:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py"
|
||||
cd $(BUILD_DIR) ; \
|
||||
python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_splint.py
|
||||
|
||||
check_sparse: FORCE
|
||||
check_sparse:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py"
|
||||
cd $(BUILD_DIR) ; \
|
||||
python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_sparse.py
|
||||
|
||||
check_smatch: FORCE
|
||||
check_smatch:
|
||||
$(CMAKE_CONFIG)
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
$(PYTHON) "$(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py"
|
||||
cd $(BUILD_DIR) ; \
|
||||
python3 $(BLENDER_DIR)/build_files/cmake/cmake_static_check_smatch.py
|
||||
|
||||
check_spelling_py: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/release/scripts"
|
||||
check_spelling_py:
|
||||
cd $(BUILD_DIR) ; \
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/release/scripts
|
||||
|
||||
check_spelling_c: FORCE
|
||||
cd "$(BUILD_DIR)" ; \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/source" \
|
||||
"$(BLENDER_DIR)/intern/cycles" \
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
check_spelling_c:
|
||||
cd $(BUILD_DIR) ; \
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source
|
||||
|
||||
check_spelling_c_qtc: FORCE
|
||||
cd "$(BUILD_DIR)" ; USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/source" \
|
||||
"$(BLENDER_DIR)/intern/cycles" \
|
||||
"$(BLENDER_DIR)/intern/guardedalloc" \
|
||||
"$(BLENDER_DIR)/intern/ghost" \
|
||||
> \
|
||||
"$(BLENDER_DIR)/check_spelling_c.tasks"
|
||||
check_spelling_c_qtc:
|
||||
cd $(BUILD_DIR) ; USE_QTC_TASK=1 \
|
||||
PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/source > \
|
||||
$(BLENDER_DIR)/check_spelling_c.tasks
|
||||
|
||||
check_spelling_osl: FORCE
|
||||
cd "$(BUILD_DIR)" ;\
|
||||
PYTHONIOENCODING=utf_8 $(PYTHON) \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_spelling.py" \
|
||||
"$(BLENDER_DIR)/intern/cycles/kernel/shaders"
|
||||
|
||||
check_descriptions: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python \
|
||||
"$(BLENDER_DIR)/source/tools/check_source/check_descriptions.py"
|
||||
check_spelling_osl:
|
||||
cd $(BUILD_DIR) ; PYTHONIOENCODING=utf_8 python3 $(BLENDER_DIR)/source/tools/spell_check_source.py $(BLENDER_DIR)/intern/cycles/kernel/shaders
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Utilities
|
||||
#
|
||||
|
||||
tgz: FORCE
|
||||
./build_files/utils/build_tgz.sh
|
||||
tbz:
|
||||
svn export . blender_archive
|
||||
tar cjf blender_archive.tar.bz2 blender_archive/
|
||||
rm -rf blender_archive/
|
||||
@echo "blender_archive.tar.bz2 written"
|
||||
|
||||
icons: FORCE
|
||||
"$(BLENDER_DIR)/release/datafiles/blender_icons_update.py"
|
||||
"$(BLENDER_DIR)/release/datafiles/prvicons_update.py"
|
||||
|
||||
update: FORCE
|
||||
if [ -d "../lib" ]; then \
|
||||
svn update ../lib/* ; \
|
||||
fi
|
||||
git pull --rebase
|
||||
git submodule foreach git pull --rebase origin master
|
||||
icons:
|
||||
$(BLENDER_DIR)/release/datafiles/blender_icons.sh
|
||||
$(BLENDER_DIR)/release/datafiles/prvicons.sh
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@@ -404,36 +333,24 @@ update: FORCE
|
||||
#
|
||||
|
||||
# Simple version of ./doc/python_api/sphinx_doc_gen.sh with no PDF generation.
|
||||
doc_py: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
doc_py:
|
||||
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/python_api/sphinx_doc_gen.py
|
||||
cd doc/python_api ; sphinx-build -b html sphinx-in sphinx-out
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/python_api/sphinx-out/contents.html'"
|
||||
|
||||
doc_doxy: FORCE
|
||||
doc_doxy:
|
||||
cd doc/doxygen; doxygen Doxyfile
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/doxygen/html/index.html'"
|
||||
|
||||
doc_dna: FORCE
|
||||
"$(BUILD_DIR)/bin/blender" --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
doc_dna:
|
||||
$(BUILD_DIR)/bin/blender --background -noaudio --factory-startup --python doc/blender_file_format/BlendFileDnaExporter_25.py
|
||||
@echo "docs written into: '$(BLENDER_DIR)/doc/blender_file_format/dna.html'"
|
||||
|
||||
doc_man: FORCE
|
||||
$(PYTHON) doc/manpage/blender.1.py "$(BUILD_DIR)/bin/blender"
|
||||
|
||||
help_features: FORCE
|
||||
@$(PYTHON) -c \
|
||||
"import re; \
|
||||
print('\n'.join([ \
|
||||
w for l in open('"$(BLENDER_DIR)"/CMakeLists.txt', 'r').readlines() \
|
||||
if not l.lstrip().startswith('#') \
|
||||
for w in (re.sub(\
|
||||
r'.*\boption\s*\(\s*(WITH_[a-zA-Z0-9_]+)\s+(\".*\")\s*.*', r'\g<1> - \g<2>', l).strip('() \n'),) \
|
||||
if w.startswith('WITH_')]))" | uniq
|
||||
doc_man:
|
||||
python3 doc/manpage/blender.1.py $(BUILD_DIR)/bin/blender
|
||||
|
||||
|
||||
clean: FORCE
|
||||
$(MAKE) -C "$(BUILD_DIR)" clean
|
||||
clean:
|
||||
$(MAKE) -C $(BUILD_DIR) clean
|
||||
|
||||
.PHONY: all
|
||||
|
||||
FORCE:
|
||||
|
589
SConstruct
589
SConstruct
@@ -33,6 +33,14 @@
|
||||
# TODO: directory copy functions are far too complicated, see:
|
||||
# http://wiki.blender.org/index.php/User:Ideasman42/SConsNotSimpleInstallingFiles
|
||||
|
||||
import platform as pltfrm
|
||||
|
||||
# Need a better way to do this. Automagical maybe is not the best thing, maybe it is.
|
||||
if pltfrm.architecture()[0] == '64bit':
|
||||
bitness = 64
|
||||
else:
|
||||
bitness = 32
|
||||
|
||||
import sys
|
||||
import os
|
||||
import os.path
|
||||
@@ -40,13 +48,11 @@ import string
|
||||
import shutil
|
||||
import re
|
||||
|
||||
# store path to tools and modules
|
||||
# store path to tools
|
||||
toolpath=os.path.join(".", "build_files", "scons", "tools")
|
||||
modulespath=os.path.join(".", "build_files", "scons", "Modules")
|
||||
|
||||
# needed for importing tools and modules
|
||||
# needed for importing tools
|
||||
sys.path.append(toolpath)
|
||||
sys.path.append(modulespath)
|
||||
|
||||
import Blender
|
||||
import btools
|
||||
@@ -70,7 +76,7 @@ quickdebug = None
|
||||
|
||||
##### BEGIN SETUP #####
|
||||
|
||||
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern', 'system']
|
||||
B.possible_types = ['core', 'player', 'player2', 'intern', 'extern']
|
||||
|
||||
B.binarykind = ['blender' , 'blenderplayer']
|
||||
##################################
|
||||
@@ -106,10 +112,16 @@ btools.print_targets(B.targets, B.bc)
|
||||
# handling cmd line arguments & config file
|
||||
|
||||
# bitness stuff
|
||||
tempbitness = int(B.arguments.get('BF_BITNESS', B.bitness)) # default to bitness found as per starting python
|
||||
if tempbitness in B.allowed_bitnesses.values() :
|
||||
tempbitness = int(B.arguments.get('BF_BITNESS', bitness)) # default to bitness found as per starting python
|
||||
if tempbitness in (32, 64): # only set if 32 or 64 has been given
|
||||
bitness = int(tempbitness)
|
||||
|
||||
if bitness:
|
||||
B.bitness = bitness
|
||||
else:
|
||||
B.bitness = tempbitness
|
||||
|
||||
|
||||
# first check cmdline for toolset and we create env to work on
|
||||
quickie = B.arguments.get('BF_QUICK', None)
|
||||
quickdebug = B.arguments.get('BF_QUICKDEBUG', None)
|
||||
@@ -125,7 +137,7 @@ else:
|
||||
B.quickie=[]
|
||||
|
||||
toolset = B.arguments.get('BF_TOOLSET', None)
|
||||
vcver = B.arguments.get('MSVS_VERSION', '12.0')
|
||||
vcver = B.arguments.get('MSVS_VERSION', '9.0')
|
||||
|
||||
if toolset:
|
||||
print "Using " + toolset
|
||||
@@ -137,7 +149,7 @@ if toolset:
|
||||
if env:
|
||||
btools.SetupSpawn(env)
|
||||
else:
|
||||
if B.bitness==64 and platform=='win32':
|
||||
if bitness==64 and platform=='win32':
|
||||
env = BlenderEnvironment(ENV = os.environ, MSVS_ARCH='amd64', TARGET_ARCH='x86_64', MSVC_VERSION=vcver)
|
||||
else:
|
||||
env = BlenderEnvironment(ENV = os.environ, TARGET_ARCH='x86', MSVC_VERSION=vcver)
|
||||
@@ -155,9 +167,9 @@ if cxx:
|
||||
|
||||
if sys.platform=='win32':
|
||||
if env['CC'] in ['cl', 'cl.exe']:
|
||||
platform = 'win64-vc' if B.bitness == 64 else 'win32-vc'
|
||||
platform = 'win64-vc' if bitness == 64 else 'win32-vc'
|
||||
elif env['CC'] in ['gcc']:
|
||||
platform = 'win64-mingw' if B.bitness == 64 else 'win32-mingw'
|
||||
platform = 'win64-mingw' if bitness == 64 else 'win32-mingw'
|
||||
|
||||
if 'mingw' in platform:
|
||||
print "Setting custom spawn function"
|
||||
@@ -207,19 +219,12 @@ opts = btools.read_opts(env, optfiles, B.arguments)
|
||||
opts.Update(env)
|
||||
|
||||
if sys.platform=='win32':
|
||||
if B.bitness==64:
|
||||
if bitness==64:
|
||||
env.Append(CPPFLAGS=['-DWIN64']) # -DWIN32 needed too, as it's used all over to target Windows generally
|
||||
|
||||
if env['BF_DEBUG']:
|
||||
env.Append(CPPDEFINES=['_DEBUG', 'DEBUG'])
|
||||
else:
|
||||
env.Append(CPPDEFINES=['NDEBUG'])
|
||||
|
||||
if not env['BF_FANCY']:
|
||||
B.bc.disable()
|
||||
|
||||
if env['WITH_BF_SDL_DYNLOAD']:
|
||||
env['BF_SDL_INC'] = '#extern/sdlew/include/SDL2'
|
||||
|
||||
# remove install dir so old and new files are not mixed.
|
||||
# NOTE: only do the scripts directory for now, otherwise is too disruptive for developers
|
||||
@@ -241,7 +246,6 @@ if 'blenderlite' in B.targets:
|
||||
target_env_defs['WITH_BF_CYCLES'] = False
|
||||
target_env_defs['WITH_BF_OPENAL'] = False
|
||||
target_env_defs['WITH_BF_OPENEXR'] = False
|
||||
target_env_defs['WITH_BF_PSD'] = False
|
||||
target_env_defs['WITH_BF_OPENMP'] = False
|
||||
target_env_defs['WITH_BF_ICONV'] = False
|
||||
target_env_defs['WITH_BF_INTERNATIONAL'] = False
|
||||
@@ -266,7 +270,6 @@ if 'blenderlite' in B.targets:
|
||||
target_env_defs['WITH_BF_BOOLEAN'] = False
|
||||
target_env_defs['WITH_BF_REMESH'] = False
|
||||
target_env_defs['WITH_BF_PYTHON'] = False
|
||||
target_env_defs['WITH_BF_IME'] = False
|
||||
target_env_defs['WITH_BF_3DMOUSE'] = False
|
||||
target_env_defs['WITH_BF_LIBMV'] = False
|
||||
target_env_defs['WITH_BF_FREESTYLE'] = False
|
||||
@@ -280,203 +283,50 @@ if 'cudakernels' in B.targets:
|
||||
env['WITH_BF_CYCLES'] = True
|
||||
env['WITH_BF_CYCLES_CUDA_BINARIES'] = True
|
||||
env['WITH_BF_PYTHON'] = False
|
||||
env['WITH_BF_LIBMV'] = False
|
||||
|
||||
# Configure paths for automated configuration test programs
|
||||
env['CONFIGUREDIR'] = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "sconf_temp")))
|
||||
env['CONFIGURELOG'] = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "config.log")))
|
||||
|
||||
#############################################################################
|
||||
################### Automatic configuration for OSX ##################
|
||||
#############################################################################
|
||||
|
||||
# Extended OSX_SDK and 3D_CONNEXION_CLIENT_LIBRARY and JAckOSX detection for OSX
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
|
||||
import commands
|
||||
import subprocess
|
||||
|
||||
command = ["%s"%env['CC'], "--version"]
|
||||
line = btools.get_command_output(command)
|
||||
ver = re.search(r'[0-9]+(\.[0-9]+[svn]+)+', line) or re.search(r'[0-9]+(\.[0-9]+)+', line) # read the "based on LLVM x.xsvn" version here, not the Apple version
|
||||
if ver:
|
||||
env['CCVERSION'] = ver.group(0).strip('svn')
|
||||
frontend = re.search(r'gcc', line) or re.search(r'clang', line) or re.search(r'llvm-gcc', line) or re.search(r'icc', line)
|
||||
if frontend:
|
||||
env['C_COMPILER_ID'] = frontend.group(0)
|
||||
|
||||
vendor = re.search(r'Apple', line)
|
||||
if vendor:
|
||||
C_VENDOR = vendor.group(0)
|
||||
else:
|
||||
C_VENDOR = 'Open Source'
|
||||
|
||||
print B.bc.OKGREEN + "Using Compiler: " + B.bc.ENDC + env['C_COMPILER_ID'] + '-' + env['CCVERSION'] + ' ( ' + C_VENDOR + ' )'
|
||||
|
||||
cmd = 'sw_vers -productVersion'
|
||||
MAC_CUR_VER=cmd_res=commands.getoutput(cmd)
|
||||
cmd = 'xcodebuild -version'
|
||||
cmd_xcode=commands.getoutput(cmd)
|
||||
env['XCODE_CUR_VER']=cmd_xcode[6:][:3] # truncate output to major.minor version
|
||||
cmd = 'xcodebuild -showsdks'
|
||||
cmd_sdk=commands.getoutput(cmd)
|
||||
MACOSX_SDK_CHECK=cmd_sdk
|
||||
cmd = 'xcode-select --print-path'
|
||||
XCODE_SELECT_PATH=commands.getoutput(cmd)
|
||||
if XCODE_SELECT_PATH.endswith("/Contents/Developer"):
|
||||
XCODE_BUNDLE=XCODE_SELECT_PATH[:-19]
|
||||
else:
|
||||
XCODE_BUNDLE=XCODE_SELECT_PATH
|
||||
|
||||
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
|
||||
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
|
||||
|
||||
if env['MACOSX_SDK'] == '': # no set sdk, choosing best one found
|
||||
if 'OS X 10.10' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.10.sdk'
|
||||
elif 'OS X 10.9' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.9.sdk'
|
||||
elif 'OS X 10.8' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.8.sdk'
|
||||
elif 'OS X 10.7' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.7.sdk'
|
||||
elif 'OS X 10.6' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.6'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.6.sdk'
|
||||
elif 'OS X 10.5' in MACOSX_SDK_CHECK:
|
||||
env['MACOSX_DEPLOYMENT_TARGET'] = '10.5'
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
print "Available " + env['MACOSX_SDK_CHECK']
|
||||
if not 'Mac OS X 10.6' in env['MACOSX_SDK_CHECK']:
|
||||
print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.7.sdk"
|
||||
elif not 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']:
|
||||
print B.bc.OKGREEN + "Auto-setting available MacOSX SDK -> " + B.bc.ENDC + "MacOSX10.6.sdk"
|
||||
else:
|
||||
env['MACOSX_SDK']='/Developer/SDKs/MacOSX' + env['MACOSX_SDK'] + '.sdk'
|
||||
|
||||
if env['XCODE_CUR_VER'] >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
|
||||
env['MACOSX_SDK'] = XCODE_BUNDLE + '/Contents/Developer/Platforms/MacOSX.platform' + env['MACOSX_SDK']
|
||||
|
||||
print B.bc.OKGREEN + "Using OSX SDK :" + B.bc.ENDC + env['MACOSX_SDK']
|
||||
print B.bc.OKGREEN + "Found recommended sdk :" + B.bc.ENDC + " using MacOSX10.5.sdk"
|
||||
|
||||
if not env['WITH_OSX_STATICPYTHON'] == 1:
|
||||
# python 3.3 uses Python-framework additionally installed in /Library/Frameworks
|
||||
env['BF_PYTHON'] = '/Library/Frameworks/Python.framework/Versions/'
|
||||
env['BF_PYTHON_INC'] = env['BF_PYTHON'] + env['BF_PYTHON_VERSION'] + '/include/python' + env['BF_PYTHON_VERSION'] + 'm'
|
||||
env['BF_PYTHON_BINARY'] = env['BF_PYTHON'] + env['BF_PYTHON_VERSION'] + '/bin/python' + env['BF_PYTHON_VERSION']
|
||||
env['BF_PYTHON_LIB'] = ''
|
||||
env['BF_PYTHON_LIBPATH'] = env['BF_PYTHON'] + env['BF_PYTHON_VERSION'] + '/lib/python' + env['BF_PYTHON_VERSION'] + '/config-' + env['BF_PYTHON_VERSION'] +'m'
|
||||
env['PLATFORM_LINKFLAGS'] = env['PLATFORM_LINKFLAGS']+['-framework','Python'] # link to python framework
|
||||
|
||||
#Ray trace optimization
|
||||
if env['WITH_BF_RAYOPTIMIZATION'] == 1:
|
||||
if env['MACOSX_ARCHITECTURE'] == 'x86_64' or env['MACOSX_ARCHITECTURE'] == 'i386':
|
||||
env['WITH_BF_RAYOPTIMIZATION'] = 1
|
||||
else:
|
||||
env['WITH_BF_RAYOPTIMIZATION'] = 0
|
||||
if env['MACOSX_ARCHITECTURE'] == 'i386':
|
||||
env['BF_RAYOPTIMIZATION_SSE_FLAGS'] = env['BF_RAYOPTIMIZATION_SSE_FLAGS']+['-msse']
|
||||
elif env['MACOSX_ARCHITECTURE'] == 'x86_64':
|
||||
env['BF_RAYOPTIMIZATION_SSE_FLAGS'] = env['BF_RAYOPTIMIZATION_SSE_FLAGS']+['-msse','-msse2']
|
||||
|
||||
if env['MACOSX_ARCHITECTURE'] == 'x86_64' or env['MACOSX_ARCHITECTURE'] == 'ppc64':
|
||||
ARCH_FLAGS = ['-m64']
|
||||
else:
|
||||
ARCH_FLAGS = ['-m32']
|
||||
|
||||
env.Append(CPPFLAGS=ARCH_FLAGS)
|
||||
|
||||
SDK_FLAGS=['-isysroot', env['MACOSX_SDK'],'-mmacosx-version-min='+ env['MACOSX_DEPLOYMENT_TARGET'],'-arch',env['MACOSX_ARCHITECTURE']] # always used
|
||||
env['PLATFORM_LINKFLAGS'] = ['-mmacosx-version-min='+ env['MACOSX_DEPLOYMENT_TARGET'],'-isysroot', env['MACOSX_SDK'],'-arch',env['MACOSX_ARCHITECTURE']]+ARCH_FLAGS+env['PLATFORM_LINKFLAGS']
|
||||
env['CCFLAGS']=SDK_FLAGS+env['CCFLAGS']
|
||||
env['CXXFLAGS']=SDK_FLAGS+env['CXXFLAGS']
|
||||
|
||||
#Intel Macs are CoreDuo and Up
|
||||
if env['MACOSX_ARCHITECTURE'] == 'i386' or env['MACOSX_ARCHITECTURE'] == 'x86_64':
|
||||
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-msse','-msse2','-msse3']
|
||||
if env['C_COMPILER_ID'] != 'clang' or (env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.3'):
|
||||
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-ftree-vectorize'] # clang xcode 4 does not accept flag
|
||||
else:
|
||||
env['CCFLAGS'] = env['CCFLAGS']+['-fno-strict-aliasing']
|
||||
|
||||
# Intel 64bit Macs are Core2Duo and up
|
||||
if env['MACOSX_ARCHITECTURE'] == 'x86_64':
|
||||
env['REL_CCFLAGS'] = env['REL_CCFLAGS']+['-mssse3']
|
||||
|
||||
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.3':
|
||||
if env['CXX'].startswith('clang') and env['XCODE_CUR_VER'] >= '5':
|
||||
env['CCFLAGS'].append('-ftemplate-depth=1024') # only valid for clang bundled with xcode 5
|
||||
|
||||
# 3DconnexionClient.framework, optionally install
|
||||
# for now, Mac builders must download and install the 3DxWare 10 Beta 4 driver framework from 3Dconnexion
|
||||
# necessary header file lives here when installed:
|
||||
# /Library/Frameworks/3DconnexionClient.framework/Versions/Current/Headers/ConnexionClientAPI.h
|
||||
if env['WITH_BF_3DMOUSE'] == 1:
|
||||
if not os.path.exists('/Library/Frameworks/3DconnexionClient.framework'):
|
||||
print "3D_CONNEXION_CLIENT_LIBRARY not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
|
||||
env['WITH_BF_3DMOUSE'] = 0
|
||||
print B.bc.OKGREEN + "3DconnexionClient install not found, disabling WITH_BF_3DMOUSE" # avoid build errors !
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-F/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','3DconnexionClient'])
|
||||
env['BF_3DMOUSE_INC'] = '/Library/Frameworks/3DconnexionClient.framework/Headers'
|
||||
print B.bc.OKGREEN + "Using 3Dconnexion"
|
||||
|
||||
# Jackmp.framework, optionally install
|
||||
# for now, Mac builders must download and install the JackOSX framework
|
||||
# necessary header file lives here when installed:
|
||||
# /Library/Frameworks/Jackmp.framework/Versions/A/Headers/jack.h
|
||||
if env['WITH_BF_JACK'] == 1:
|
||||
if not os.path.exists('/Library/Frameworks/Jackmp.framework'):
|
||||
print "JackOSX install not found, disabling WITH_BF_JACK" # avoid build errors !
|
||||
env['WITH_BF_JACK'] = 0
|
||||
print B.bc.OKGREEN + "JackOSX install not found, disabling WITH_BF_JACK" # avoid build errors !
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-F/Library/Frameworks','-Xlinker','-weak_framework','-Xlinker','Jackmp'])
|
||||
print B.bc.OKGREEN + "Using Jack"
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
env.Append(LINKFLAGS=['-lazy_framework','ForceFeedback'])
|
||||
|
||||
if env['WITH_BF_QUICKTIME'] == 1:
|
||||
env['PLATFORM_LINKFLAGS'] = env['PLATFORM_LINKFLAGS']+['-framework','QTKit']
|
||||
|
||||
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
|
||||
# if your compiler does not have accurate suffix you may have to enable it by hand !
|
||||
if env['WITH_BF_OPENMP'] == 1:
|
||||
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4' and C_VENDOR != 'Apple':
|
||||
env['WITH_BF_OPENMP'] = 1 # multithreading for fluids, cloth, sculpt and smoke
|
||||
print B.bc.OKGREEN + "Using OpenMP"
|
||||
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
|
||||
OSX_OMP_LIBPATH = Dir(env.subst(env['LCGDIR'])).abspath
|
||||
env.Append(BF_PROGRAM_LINKFLAGS=['-L'+OSX_OMP_LIBPATH+'/openmp/lib','-liomp5'])
|
||||
env['CCFLAGS'].append('-I'+OSX_OMP_LIBPATH+'/openmp/include') # include for omp.h
|
||||
else:
|
||||
env['WITH_BF_OPENMP'] = 0
|
||||
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
|
||||
|
||||
if env['WITH_BF_CYCLES_OSL'] == 1:
|
||||
env['WITH_BF_LLVM'] = 1
|
||||
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
|
||||
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
|
||||
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.8' or env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
|
||||
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-loslexec','-loslquery'])
|
||||
else:
|
||||
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
|
||||
env.Append(LINKFLAGS=['-L'+OSX_OSL_LIBPATH,'-loslcomp','-force_load '+ OSX_OSL_LIBPATH +'/liboslexec.a','-loslquery'])
|
||||
env.Append(BF_PROGRAM_LINKFLAGS=['-Xlinker','-force_load','-Xlinker',OSX_OSL_LIBPATH +'/liboslexec.a'])
|
||||
else:
|
||||
env['WITH_BF_LLVM'] = 0
|
||||
|
||||
if env['WITH_BF_LLVM'] == 0:
|
||||
# Due duplicated generic UTF functions, we pull them either from LLVMSupport or COLLADA
|
||||
env.Append(BF_OPENCOLLADA_LIB=' UTF')
|
||||
|
||||
# Trying to get rid of eventually clashes, we export some symbols explicite as local
|
||||
# Trying to get rid of eventually clashes, we export some explicite as local symbols
|
||||
env.Append(LINKFLAGS=['-Xlinker','-unexported_symbols_list','-Xlinker','./source/creator/osx_locals.map'])
|
||||
|
||||
#for < 10.7.sdk, SystemStubs needs to be linked
|
||||
if env['MACOSX_SDK'].endswith("10.6.sdk") or env['MACOSX_SDK'].endswith("10.5.sdk"):
|
||||
env['LLIBS'].append('SystemStubs')
|
||||
|
||||
#############################################################################
|
||||
################### End Automatic configuration for OSX ##################
|
||||
#############################################################################
|
||||
|
||||
if env['OURPLATFORM'] == 'linux' and not env['C_COMPILER_ID']:
|
||||
command = ["%s"%env['CC'], "--version"]
|
||||
line = btools.get_command_output(command)
|
||||
if line.startswith('gcc'):
|
||||
env['C_COMPILER_ID'] = 'gcc'
|
||||
elif 'clang' in line[0]:
|
||||
env['C_COMPILER_ID'] = 'clang'
|
||||
|
||||
if env['WITH_BF_OPENMP'] == 1:
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
@@ -488,12 +338,11 @@ if env['WITH_BF_OPENMP'] == 1:
|
||||
else:
|
||||
env.Append(CCFLAGS=['-fopenmp'])
|
||||
|
||||
if env['WITH_BF_CPP11']:
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'):
|
||||
# Nothing special is needed, C++11 features are available by default.
|
||||
pass
|
||||
else:
|
||||
env['CXXFLAGS'].append('-std=c++11')
|
||||
if env['WITH_GHOST_COCOA'] == True:
|
||||
env.Append(CPPFLAGS=['-DGHOST_COCOA'])
|
||||
|
||||
if env['USE_QTKIT'] == True:
|
||||
env.Append(CPPFLAGS=['-DUSE_QTKIT'])
|
||||
|
||||
#check for additional debug libnames
|
||||
|
||||
@@ -514,10 +363,6 @@ if env['WITH_BF_STATICCXX']:
|
||||
else:
|
||||
print '\tcould not remove stdc++ library from LLIBS, WITH_BF_STATICCXX may not work for your platform'
|
||||
|
||||
# audaspace is needed for the game engine
|
||||
if not env['WITH_BF_AUDASPACE']:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
|
||||
# check target for blenderplayer. Set WITH_BF_PLAYER if found on cmdline
|
||||
if 'blenderplayer' in B.targets:
|
||||
env['WITH_BF_PLAYER'] = True
|
||||
@@ -525,9 +370,6 @@ if 'blenderplayer' in B.targets:
|
||||
if 'blendernogame' in B.targets:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
|
||||
if not env['WITH_BF_GAMEENGINE']:
|
||||
env['WITH_BF_PLAYER'] = False
|
||||
|
||||
# build without elbeem (fluidsim)?
|
||||
if env['WITH_BF_FLUID'] == 1:
|
||||
env['CPPFLAGS'].append('-DWITH_MOD_FLUID')
|
||||
@@ -544,68 +386,15 @@ else:
|
||||
env['CPPFLAGS'].append('-D__LITTLE_ENDIAN__')
|
||||
|
||||
# TODO, make optional (as with CMake)
|
||||
env['CPPFLAGS'].append('-DWITH_AUDASPACE')
|
||||
env['CPPFLAGS'].append('-DWITH_AVI')
|
||||
env['CPPFLAGS'].append('-DWITH_OPENNL')
|
||||
env['CPPFLAGS'].append('-DWITH_BOOL_COMPAT')
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
|
||||
env['CPPFLAGS'].append('-D_ALLOW_KEYWORD_MACROS')
|
||||
|
||||
if env['OURPLATFORM'] not in ('win32-vc', 'win64-vc'):
|
||||
env['CPPFLAGS'].append('-DHAVE_STDBOOL_H')
|
||||
|
||||
# Audaspace
|
||||
|
||||
if env['WITH_BF_AUDASPACE']:
|
||||
env['BF_AUDASPACE_C_INC'] = '#intern/audaspace/intern'
|
||||
env['BF_AUDASPACE_PY_INC'] = '#intern/audaspace/intern'
|
||||
env['BF_AUDASPACE_DEF'] = ['WITH_AUDASPACE']
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_DEVICE_H="<AUD_C-API.h>"')
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_SPECIAL_H="<AUD_C-API.h>"')
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_SOUND_H="<AUD_C-API.h>"')
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_HANDLE_H="<AUD_C-API.h>"')
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_SEQUENCE_H="<AUD_C-API.h>"')
|
||||
env['BF_AUDASPACE_DEF'].append('AUD_TYPES_H="<AUD_Space.h>"')
|
||||
|
||||
# OpenGL
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_COMPAT']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_COMPAT')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_CORE']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_CORE')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_ES20']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GL_PROFILE_ES20')
|
||||
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_EGL')
|
||||
|
||||
# GLEW
|
||||
|
||||
if env['WITH_BF_GLEW_MX']:
|
||||
env['BF_GL_DEFINITIONS'].append('WITH_GLEW_MX')
|
||||
|
||||
if env['WITH_BF_GLEW_ES']:
|
||||
env['BF_GLEW_INC'] = '#extern/glew-es/include'
|
||||
|
||||
env['BF_GL_DEFINITIONS'] += ['GLEW_STATIC', 'WITH_GLEW_ES']
|
||||
|
||||
if not env['WITH_BF_GL_PROFILE_ES20']:
|
||||
# No ES functions are needed
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_NO_ES')
|
||||
elif not (env['WITH_BF_GL_PROFILE_CORE'] or env['WITH_BF_GL_PROFILE_COMPAT']):
|
||||
# ES is enabled, but the other functions are all disabled
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_ES_ONLY')
|
||||
|
||||
if env['WITH_BF_GL_PROFILE_ES20']:
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_USE_LIB_ES20')
|
||||
|
||||
if env['WITH_BF_GL_EGL']:
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_INC_EGL')
|
||||
|
||||
else:
|
||||
env['BF_GLEW_INC'] = '#extern/glew/include'
|
||||
|
||||
env['BF_GL_DEFINITIONS'].append('GLEW_STATIC')
|
||||
|
||||
# lastly we check for root_build_dir ( we should not do before, otherwise we might do wrong builddir
|
||||
B.root_build_dir = env['BF_BUILDDIR']
|
||||
B.doc_build_dir = os.path.join(env['BF_INSTALLDIR'], 'doc')
|
||||
@@ -691,7 +480,6 @@ if not os.path.isdir ( B.root_build_dir):
|
||||
# if not os.path.isdir(B.doc_build_dir) and env['WITH_BF_DOCS']:
|
||||
# os.makedirs ( B.doc_build_dir )
|
||||
|
||||
|
||||
###################################
|
||||
# Ensure all data files are valid #
|
||||
###################################
|
||||
@@ -707,36 +495,31 @@ def data_to_c(FILE_FROM, FILE_TO, VAR_NAME):
|
||||
FILE_FROM = FILE_FROM.replace("/", "\\")
|
||||
FILE_TO = FILE_TO.replace("/", "\\")
|
||||
|
||||
try:
|
||||
# first check if we need to bother.
|
||||
if os.path.exists(FILE_TO):
|
||||
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
|
||||
return
|
||||
# first check if we need to bother.
|
||||
if os.path.exists(FILE_TO):
|
||||
if os.path.getmtime(FILE_FROM) < os.path.getmtime(FILE_TO):
|
||||
return
|
||||
|
||||
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
|
||||
fpin = open(FILE_FROM, "rb")
|
||||
fpin.seek(0, os.SEEK_END)
|
||||
size = fpin.tell()
|
||||
fpin.seek(0)
|
||||
print(B.bc.HEADER + "Generating: " + B.bc.ENDC + "%r" % os.path.basename(FILE_TO))
|
||||
fpin = open(FILE_FROM, "rb")
|
||||
fpin.seek(0, os.SEEK_END)
|
||||
size = fpin.tell()
|
||||
fpin.seek(0)
|
||||
|
||||
fpout = open(FILE_TO, "w")
|
||||
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
|
||||
fpout.write("char %s[] = {\n" % VAR_NAME)
|
||||
fpout = open(FILE_TO, "w")
|
||||
fpout.write("int %s_size = %d;\n" % (VAR_NAME, size))
|
||||
fpout.write("char %s[] = {\n" % VAR_NAME)
|
||||
|
||||
while size > 0:
|
||||
size -= 1
|
||||
if size % 32 == 31:
|
||||
fpout.write("\n")
|
||||
while size > 0:
|
||||
size -= 1
|
||||
if size % 32 == 31:
|
||||
fpout.write("\n")
|
||||
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
fpout.write("%3d," % ord(fpin.read(1)))
|
||||
fpout.write("\n 0};\n\n")
|
||||
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
except KeyboardInterrupt:
|
||||
if os.path.exists(FILE_TO):
|
||||
os.remove(FILE_TO)
|
||||
raise KeyboardInterrupt
|
||||
fpin.close()
|
||||
fpout.close()
|
||||
|
||||
def data_to_c_simple(FILE_FROM):
|
||||
filename_only = os.path.basename(FILE_FROM)
|
||||
@@ -746,32 +529,6 @@ def data_to_c_simple(FILE_FROM):
|
||||
data_to_c(FILE_FROM, FILE_TO, VAR_NAME)
|
||||
|
||||
|
||||
def data_to_c_simple_icon(PATH_FROM):
|
||||
|
||||
# first handle import
|
||||
import sys
|
||||
path = "source/blender/datatoc"
|
||||
if path not in sys.path:
|
||||
sys.path.append(path)
|
||||
|
||||
# convert the pixmaps to a png
|
||||
import datatoc_icon
|
||||
|
||||
filename_only = os.path.basename(PATH_FROM)
|
||||
FILE_TO_PNG = os.path.join(env['DATA_SOURCES'], filename_only + ".png")
|
||||
FILE_TO = FILE_TO_PNG + ".c"
|
||||
argv = [PATH_FROM, FILE_TO_PNG]
|
||||
try:
|
||||
datatoc_icon.main_ex(argv)
|
||||
except KeyboardInterrupt:
|
||||
if os.path.exists(FILE_TO_PNG):
|
||||
os.remove(FILE_TO_PNG)
|
||||
raise KeyboardInterrupt
|
||||
|
||||
# then the png to a c file
|
||||
data_to_c_simple(FILE_TO_PNG)
|
||||
|
||||
|
||||
if B.targets != ['cudakernels']:
|
||||
data_to_c("source/blender/compositor/operations/COM_OpenCLKernels.cl",
|
||||
B.root_build_dir + "data_headers/COM_OpenCLKernels.cl.h",
|
||||
@@ -782,11 +539,6 @@ if B.targets != ['cudakernels']:
|
||||
data_to_c_simple("release/datafiles/preview_cycles.blend")
|
||||
|
||||
# --- glsl ---
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_geometry.glsl")
|
||||
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_program_smoke_color_frag.glsl")
|
||||
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_simple_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_material.glsl")
|
||||
@@ -794,20 +546,8 @@ if B.targets != ['cudakernels']:
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vertex_world.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_vsm_store_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_frag.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_vert.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_dof_hq_geo.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_lib.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_depth_resolve.glsl")
|
||||
data_to_c_simple("source/blender/gpu/shaders/gpu_shader_fx_vert.glsl")
|
||||
data_to_c_simple("intern/opencolorio/gpu_shader_display_transform.glsl")
|
||||
data_to_c_simple("intern/opensubdiv/gpu_shader_opensubd_display.glsl")
|
||||
|
||||
# --- blender ---
|
||||
data_to_c_simple("release/datafiles/bfont.pfb")
|
||||
@@ -815,13 +555,8 @@ if B.targets != ['cudakernels']:
|
||||
data_to_c_simple("release/datafiles/bmonofont.ttf")
|
||||
|
||||
data_to_c_simple("release/datafiles/splash.png")
|
||||
data_to_c_simple("release/datafiles/splash_2x.png")
|
||||
|
||||
# data_to_c_simple("release/datafiles/blender_icons16.png")
|
||||
# data_to_c_simple("release/datafiles/blender_icons32.png")
|
||||
data_to_c_simple_icon("release/datafiles/blender_icons16")
|
||||
data_to_c_simple_icon("release/datafiles/blender_icons32")
|
||||
|
||||
data_to_c_simple("release/datafiles/blender_icons16.png")
|
||||
data_to_c_simple("release/datafiles/blender_icons32.png")
|
||||
data_to_c_simple("release/datafiles/prvicons.png")
|
||||
|
||||
data_to_c_simple("release/datafiles/brushicons/add.png")
|
||||
@@ -851,8 +586,6 @@ if B.targets != ['cudakernels']:
|
||||
data_to_c_simple("release/datafiles/brushicons/soften.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/subtract.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/texdraw.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/texfill.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/texmask.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/thumb.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/twist.png")
|
||||
data_to_c_simple("release/datafiles/brushicons/vertexdraw.png")
|
||||
@@ -901,24 +634,6 @@ B.init_lib_dict()
|
||||
|
||||
##### END SETUP ##########
|
||||
|
||||
## Auto-configuration run-time tests
|
||||
|
||||
from FindSharedPtr import FindSharedPtr
|
||||
from FindUnorderedMap import FindUnorderedMap
|
||||
|
||||
conf = Configure(env)
|
||||
old_linkflags = conf.env['LINKFLAGS']
|
||||
conf.env.Append(LINKFLAGS=env['PLATFORM_LINKFLAGS'])
|
||||
|
||||
# Put all tests here
|
||||
FindSharedPtr(conf)
|
||||
FindUnorderedMap(conf)
|
||||
|
||||
conf.env['LINKFLAGS'] = old_linkflags
|
||||
env = conf.Finish()
|
||||
|
||||
# End of auto configuration
|
||||
|
||||
Export('env')
|
||||
|
||||
VariantDir(B.root_build_dir+'/source', 'source', duplicate=0)
|
||||
@@ -933,7 +648,7 @@ SConscript(B.root_build_dir+'/extern/SConscript')
|
||||
# libraries to give as objects to linking phase
|
||||
mainlist = []
|
||||
for tp in B.possible_types:
|
||||
if (not tp == 'player') and (not tp == 'player2') and (not tp == 'system'):
|
||||
if (not tp == 'player') and (not tp == 'player2'):
|
||||
mainlist += B.create_blender_liblist(env, tp)
|
||||
|
||||
if B.arguments.get('BF_PRIORITYLIST', '0')=='1':
|
||||
@@ -945,17 +660,7 @@ thestatlibs, thelibincs = B.setup_staticlibs(env)
|
||||
thesyslibs = B.setup_syslibs(env)
|
||||
|
||||
if 'blender' in B.targets or not env['WITH_BF_NOBLENDER']:
|
||||
blender_progname = "blender"
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
blender_progname = "blender-app"
|
||||
|
||||
lenv = env.Clone()
|
||||
lenv.Append(LINKFLAGS = env['PLATFORM_LINKFLAGS'])
|
||||
targetpath = B.root_build_dir + '/blender'
|
||||
launcher_obj = [env.Object(B.root_build_dir + 'source/creator/creator/creator_launch_win', ['#source/creator/creator_launch_win.c'])]
|
||||
env.BlenderProg(B.root_build_dir, 'blender', [launcher_obj] + B.resources, ['bf_utfconv'] + thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
|
||||
env.BlenderProg(B.root_build_dir, blender_progname, creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
env.BlenderProg(B.root_build_dir, "blender", creob + mainlist + thestatlibs + dobj, thesyslibs, [B.root_build_dir+'/lib'] + thelibincs, 'blender')
|
||||
if env['WITH_BF_PLAYER']:
|
||||
playerlist = B.create_blender_liblist(env, 'player')
|
||||
playerlist += B.create_blender_liblist(env, 'player2')
|
||||
@@ -979,8 +684,6 @@ if env['OURPLATFORM']=='darwin':
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
if '.git' in df:
|
||||
df.remove('.git')
|
||||
dir=env['BF_INSTALLDIR']+dp[len(bundledir):]
|
||||
source=[dp+os.sep+f for f in df]
|
||||
blenderinstall.append(env.Install(dir=dir,source=source))
|
||||
@@ -1005,17 +708,15 @@ if env['OURPLATFORM']!='darwin':
|
||||
td, tf = os.path.split(targetdir)
|
||||
dotblenderinstall.append(env.Install(dir=td, source=srcfile))
|
||||
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
scriptinstall.append(env.InstallAs(env['BF_INSTALLDIR'] + '/blender-app.exe.manifest',
|
||||
'source/icons/blender.exe.manifest'))
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
#-- local/VERSION/scripts
|
||||
scriptpaths=['release/scripts']
|
||||
for scriptpath in scriptpaths:
|
||||
for dp, dn, df in os.walk(scriptpath):
|
||||
if '.git' in df:
|
||||
df.remove('.git')
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
if '__pycache__' in dn: # py3.2 cache dir
|
||||
dn.remove('__pycache__')
|
||||
|
||||
@@ -1039,6 +740,8 @@ if env['OURPLATFORM']!='darwin':
|
||||
# cycles python code
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles')
|
||||
source=os.listdir('intern/cycles/blender/addon')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/blender/addon/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
@@ -1046,52 +749,43 @@ if env['OURPLATFORM']!='darwin':
|
||||
# cycles kernel code
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel')
|
||||
source=os.listdir('intern/cycles/kernel')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source.remove('kernel.cpp')
|
||||
source.remove('CMakeLists.txt')
|
||||
source.remove('SConscript')
|
||||
source.remove('svm')
|
||||
source.remove('closure')
|
||||
source.remove('geom')
|
||||
source.remove('shaders')
|
||||
source.remove('osl')
|
||||
source.remove('split')
|
||||
source=['intern/cycles/kernel/'+s for s in source]
|
||||
source.append('intern/cycles/util/util_atomic.h')
|
||||
source.append('intern/cycles/util/util_color.h')
|
||||
source.append('intern/cycles/util/util_half.h')
|
||||
source.append('intern/cycles/util/util_math.h')
|
||||
source.append('intern/cycles/util/util_math_fast.h')
|
||||
source.append('intern/cycles/util/util_transform.h')
|
||||
source.append('intern/cycles/util/util_types.h')
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
# svm
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'svm')
|
||||
source=os.listdir('intern/cycles/kernel/svm')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/kernel/svm/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
# closure
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'closure')
|
||||
source=os.listdir('intern/cycles/kernel/closure')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/kernel/closure/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
# geom
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'geom')
|
||||
source=os.listdir('intern/cycles/kernel/geom')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/kernel/geom/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
# split
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'kernel', 'split')
|
||||
source=os.listdir('intern/cycles/kernel/split')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source=['intern/cycles/kernel/split/'+s for s in source]
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
# licenses
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'license')
|
||||
source=os.listdir('intern/cycles/doc/license')
|
||||
if '.svn' in source: source.remove('.svn')
|
||||
if '_svn' in source: source.remove('_svn')
|
||||
if '__pycache__' in source: source.remove('__pycache__')
|
||||
source.remove('CMakeLists.txt')
|
||||
source=['intern/cycles/doc/license/'+s for s in source]
|
||||
@@ -1103,9 +797,8 @@ if env['OURPLATFORM']!='darwin':
|
||||
dir=os.path.join(env['BF_INSTALLDIR'], VERSION, 'scripts', 'addons','cycles', 'lib')
|
||||
for arch in env['BF_CYCLES_CUDA_BINARIES_ARCH']:
|
||||
kernel_build_dir = os.path.join(B.root_build_dir, 'intern/cycles/kernel')
|
||||
for suffix in ('', '_experimental'):
|
||||
cubin_file = os.path.join(kernel_build_dir, "kernel%s_%s.cubin" % (suffix, arch))
|
||||
cubininstall.append(env.Install(dir=dir,source=cubin_file))
|
||||
cubin_file = os.path.join(kernel_build_dir, "kernel_%s.cubin" % arch)
|
||||
cubininstall.append(env.Install(dir=dir,source=cubin_file))
|
||||
|
||||
# osl shaders
|
||||
if env['WITH_BF_CYCLES_OSL']:
|
||||
@@ -1127,6 +820,11 @@ if env['OURPLATFORM']!='darwin':
|
||||
colormanagement = os.path.join('release', 'datafiles', 'colormanagement')
|
||||
|
||||
for dp, dn, df in os.walk(colormanagement):
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
|
||||
dir = os.path.join(env['BF_INSTALLDIR'], VERSION, 'datafiles')
|
||||
dir += os.sep + os.path.basename(colormanagement) + dp[len(colormanagement):]
|
||||
|
||||
@@ -1144,16 +842,15 @@ if env['OURPLATFORM']!='darwin':
|
||||
def check_path(path, member):
|
||||
return (member in path.split(os.sep))
|
||||
|
||||
po_dir = os.path.join("release", "datafiles", "locale", "po")
|
||||
|
||||
# font files
|
||||
for intpath in internationalpaths:
|
||||
for dp, dn, df in os.walk(intpath):
|
||||
if '.git' in df:
|
||||
df.remove('.git')
|
||||
if '.svn' in dn:
|
||||
dn.remove('.svn')
|
||||
if '_svn' in dn:
|
||||
dn.remove('_svn')
|
||||
|
||||
# we only care about release/datafiles/fonts, release/datafiles/locales
|
||||
if check_path(dp, "fonts"):
|
||||
if check_path(dp, "fonts") or check_path(dp, "locale"):
|
||||
pass
|
||||
else:
|
||||
continue
|
||||
@@ -1167,31 +864,16 @@ if env['OURPLATFORM']!='darwin':
|
||||
env.Execute(Mkdir(dir))
|
||||
scriptinstall.append(env.Install(dir=dir,source=source))
|
||||
|
||||
# .mo files
|
||||
for f in os.listdir(po_dir):
|
||||
if not f.endswith(".po"):
|
||||
continue
|
||||
|
||||
locale_name = os.path.splitext(f)[0]
|
||||
|
||||
mo_file = os.path.join(B.root_build_dir, "locale", locale_name + ".mo")
|
||||
|
||||
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
|
||||
dir = os.path.join(dir, "datafiles", "locale", locale_name, "LC_MESSAGES")
|
||||
scriptinstall.append(env.InstallAs(os.path.join(dir, "blender.mo"), mo_file))
|
||||
|
||||
# languages file
|
||||
dir = os.path.join(env['BF_INSTALLDIR'], VERSION)
|
||||
dir = os.path.join(dir, "datafiles", "locale")
|
||||
languages_file = os.path.join("release", "datafiles", "locale", "languages")
|
||||
scriptinstall.append(env.InstallAs(os.path.join(dir, "languages"), languages_file))
|
||||
|
||||
#-- icons
|
||||
if env['OURPLATFORM']=='linux':
|
||||
iconlist = []
|
||||
icontargetlist = []
|
||||
|
||||
for tp, tn, tf in os.walk('release/freedesktop/icons'):
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
if '_svn' in tn:
|
||||
tn.remove('_svn')
|
||||
for f in tf:
|
||||
iconlist.append(os.path.join(tp, f))
|
||||
icontargetlist.append( os.path.join(*([env['BF_INSTALLDIR']] + tp.split(os.sep)[2:] + [f])) )
|
||||
@@ -1217,42 +899,13 @@ if env['OURPLATFORM']=='linuxcross':
|
||||
textlist = []
|
||||
texttargetlist = []
|
||||
for tp, tn, tf in os.walk('release/text'):
|
||||
tf.remove("readme.html")
|
||||
if '.svn' in tn:
|
||||
tn.remove('.svn')
|
||||
if '_svn' in tn:
|
||||
tn.remove('_svn')
|
||||
for f in tf:
|
||||
textlist.append(tp+os.sep+f)
|
||||
|
||||
def readme_version_patch():
|
||||
readme_src = "release/text/readme.html"
|
||||
readme_dst = os.path.abspath(os.path.normpath(os.path.join(env['BF_BUILDDIR'], "readme.html")))
|
||||
|
||||
if not os.path.exists(readme_dst) or (os.path.getmtime(readme_dst) < os.path.getmtime(readme_src)):
|
||||
f = open(readme_src, "r")
|
||||
data = f.read()
|
||||
f.close()
|
||||
|
||||
data = data.replace("BLENDER_VERSION", VERSION)
|
||||
f = open(readme_dst, "w")
|
||||
f.write(data)
|
||||
f.close()
|
||||
|
||||
textlist.append(readme_dst)
|
||||
|
||||
readme_version_patch()
|
||||
del readme_version_patch
|
||||
|
||||
|
||||
'''Command(
|
||||
"release/text/readme.html"
|
||||
|
||||
)
|
||||
Command("file.out", "file.in", Copy(env['BF_INSTALLDIR'], "release/text/readme.html"))
|
||||
'''
|
||||
|
||||
# Font licenses
|
||||
textlist.append('release/datafiles/LICENSE-bfont.ttf.txt')
|
||||
if env['WITH_BF_INTERNATIONAL']:
|
||||
textlist += ['release/datafiles/LICENSE-droidsans.ttf.txt', 'release/datafiles/LICENSE-bmonofont-i18n.ttf.txt']
|
||||
|
||||
textinstall = env.Install(dir=env['BF_INSTALLDIR'], source=textlist)
|
||||
|
||||
if env['OURPLATFORM']=='darwin':
|
||||
@@ -1274,15 +927,16 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
dllsources += ['${BF_PTHREADS_LIBPATH}/${BF_PTHREADS_LIB}.dll']
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL2.dll')
|
||||
if env['OURPLATFORM'] == 'win64-vc':
|
||||
pass # we link statically already to SDL on win64
|
||||
else:
|
||||
dllsources.append('${BF_SDL_LIBPATH}/SDL.dll')
|
||||
|
||||
if env['WITH_BF_PYTHON']:
|
||||
if env['BF_DEBUG']:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll')
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3_d.dll')
|
||||
else:
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll')
|
||||
dllsources.append('${BF_PYTHON_LIBPATH}/sqlite3.dll')
|
||||
|
||||
if env['WITH_BF_ICONV']:
|
||||
if env['OURPLATFORM'] == 'win64-vc':
|
||||
@@ -1293,6 +947,10 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
|
||||
if env['WITH_BF_OPENAL']:
|
||||
dllsources.append('${LCGDIR}/openal/lib/OpenAL32.dll')
|
||||
if env['OURPLATFORM'] in ('win32-vc', 'win64-vc') and env['MSVC_VERSION'] == '11.0':
|
||||
pass
|
||||
else:
|
||||
dllsources.append('${LCGDIR}/openal/lib/wrap_oal.dll')
|
||||
|
||||
if env['WITH_BF_SNDFILE']:
|
||||
dllsources.append('${LCGDIR}/sndfile/lib/libsndfile-1.dll')
|
||||
@@ -1303,7 +961,7 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
# Since the thumb handler is loaded by Explorer, architecture is
|
||||
# strict: the x86 build fails on x64 Windows. We need to ship
|
||||
# both builds in x86 packages.
|
||||
if B.bitness == 32:
|
||||
if bitness == 32:
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb.dll')
|
||||
dllsources.append('${LCGDIR}/thumbhandler/lib/BlendThumb64.dll')
|
||||
|
||||
@@ -1319,15 +977,6 @@ if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross'):
|
||||
windlls = env.Install(dir=env['BF_INSTALLDIR'], source = dllsources)
|
||||
allinstall += windlls
|
||||
|
||||
# TODO(sergey): For unti we've got better way to deal with python binary
|
||||
if env['WITH_BF_PYTHON']:
|
||||
py_target = os.path.join(env['BF_INSTALLDIR'], VERSION, 'python', 'bin')
|
||||
if env['BF_DEBUG']:
|
||||
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}_d.dll'])
|
||||
else:
|
||||
allinstall += env.Install(dir=py_target, source = ['${BF_PYTHON_LIBPATH}/${BF_PYTHON_DLL}.dll'])
|
||||
|
||||
|
||||
if env['OURPLATFORM'] == 'win64-mingw':
|
||||
dllsources = []
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -60,7 +60,7 @@ AMD64_PATH="$ENV_PATH/buildbot_${DEBIAN_BRANCH}_x86_64"
|
||||
I686_PATH="$ENV_PATH/buildbot_${DEBIAN_BRANCH}_i686"
|
||||
SOURCES_PATH="$ENV_PATH/sources"
|
||||
|
||||
THREADS=$(nproc)
|
||||
THREADS=`cat /proc/cpuinfo | grep cores | uniq | sed -e "s/.*: *\(.*\)/\\1/"`
|
||||
|
||||
# Force vpx be installed from the backports
|
||||
VPX_V="1.0.0-2~bpo60+1"
|
||||
|
@@ -2,5 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-i686'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
#BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = []
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
@@ -2,4 +2,4 @@ BF_BUILDDIR = '../blender-build/linux-glibc211-x86_64'
|
||||
BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 1
|
||||
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
@@ -4,11 +4,10 @@ BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
BF_PYTHON = '/opt/lib/python-3.3'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
@@ -22,7 +21,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
@@ -49,7 +48,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -79,8 +78,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -124,22 +121,20 @@ BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
WITH_BF_STATICOSL = False
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
BF_LLVM = '/opt/lib/llvm-3.1'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
@@ -159,27 +154,13 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# OpenSubdiv
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
WITH_BF_STATICOPENSUBDIV = True
|
||||
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
|
@@ -4,11 +4,10 @@ BF_NUMJOBS = 4
|
||||
WITHOUT_BF_OVERWRITE_INSTALL = True
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
BF_PYTHON = '/opt/lib/python-3.3'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
@@ -22,7 +21,7 @@ BF_OPENCOLLADA_LIB_STATIC = '${BF_OPENCOLLADA}/lib/libOpenCOLLADAStreamWriter.a
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADAFramework.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libOpenCOLLADABaseUtils.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libGeneratedSaxParser.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libUTF.a ${BF_OPENCOLLADA}/lib/libMathMLSolver.a ' + \
|
||||
'${BF_OPENCOLLADA}/lib/libbuffer.a ${BF_OPENCOLLADA}/lib/libftoa.a ' + \
|
||||
'/usr/lib/libxml2.a /usr/lib/libexpat.a /usr/lib/libpcre.a'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib /home/sources/staticlibs/lib64'
|
||||
@@ -49,7 +48,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -79,8 +78,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -124,22 +121,20 @@ BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/libOpenImageIO.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_JPEG}/lib/libjpeg.a'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
BF_IS_NEW_OSL = False
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
WITH_BF_STATICOSL = BF_IS_NEW_OSL
|
||||
WITH_BF_STATICOSL = False
|
||||
BF_OSL = '/opt/lib/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
BF_OSL_LIB = 'oslcomp oslexec oslquery'
|
||||
BF_OSL_LIB_STATIC = '${BF_OSL}/lib/liboslcomp.a ${BF_OSL}/lib/liboslexec.a ${BF_OSL}/lib/liboslquery.a'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
WITH_BF_STATICLLVM = False
|
||||
BF_LLVM = '/opt/lib/llvm-3.4.2'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMObject LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
BF_LLVM = '/opt/lib/llvm-3.1'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
@@ -159,27 +154,13 @@ BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a \
|
||||
${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_BOOST_LIB_STATIC += ' ${BF_BOOST_LIBPATH}/libboost_wave.a'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
# Ocean Simulation
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
# OpenSubdiv
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
WITH_BF_STATICOPENSUBDIV = True
|
||||
BF_OPENSUBDIV = '/opt/lib/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV}/lib/libosdCPU.a ${BF_OPENSUBDIV}/lib/libosdGPU.a'
|
||||
|
||||
# Compilation and optimization
|
||||
BF_DEBUG = False
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-msse', '-msse2'] # C & C++
|
||||
PLATFORM_LINKFLAGS = ['-lrt']
|
||||
if BF_IS_NEW_OSL:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--version-script=source/creator/blender.map']
|
||||
else:
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
BF_PROGRAM_LINKFLAGS = ['-Wl,--whole-archive', '-loslexec', '-Wl,--no-whole-archive', '-Wl,--version-script=source/creator/blender.map']
|
||||
|
@@ -1,9 +1,425 @@
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
#############################################################################
|
||||
################### Cocoa & architecture settings ##################
|
||||
#############################################################################
|
||||
WITH_GHOST_COCOA=True
|
||||
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
cmd_res=commands.getoutput(cmd)
|
||||
|
||||
if cmd_res[:1]=='7':
|
||||
MAC_CUR_VER='10.3'
|
||||
elif cmd_res[:1]=='8':
|
||||
MAC_CUR_VER='10.4'
|
||||
elif cmd_res[:1]=='9':
|
||||
MAC_CUR_VER='10.5'
|
||||
elif cmd_res[:2]=='10':
|
||||
MAC_CUR_VER='10.6'
|
||||
elif cmd_res[:2]=='11':
|
||||
MAC_CUR_VER='10.7'
|
||||
elif cmd_res[:2]=='12':
|
||||
MAC_CUR_VER='10.8'
|
||||
elif cmd_res[:2]=='13':
|
||||
MAC_CUR_VER='10.9'
|
||||
cmd = 'xcodebuild -version'
|
||||
cmd_xcode=commands.getoutput(cmd)
|
||||
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
|
||||
cmd = 'xcodebuild -showsdks'
|
||||
cmd_sdk=commands.getoutput(cmd)
|
||||
MACOSX_SDK_CHECK=cmd_sdk
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
USE_QTKIT=True # Carbon quicktime is not available for 64bit
|
||||
|
||||
|
||||
# Default target OSX settings per architecture
|
||||
# Can be customized
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc' and MAC_CUR_VER == '10.4':
|
||||
# all releases are now made for 10.5 !
|
||||
# MAC_MIN_VERS = '10.3'
|
||||
# MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
# LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
# CC = 'gcc-3.3'
|
||||
# CXX = 'g++-3.3'
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.0.0-powerpc'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
elif MACOSX_ARCHITECTURE == 'i386' and MAC_CUR_VER == '10.4':
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
else :
|
||||
if 'Mac OS X 10.5' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.5/6 with Xcode 3.x
|
||||
MAC_MIN_VERS = '10.5'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.5'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
elif 'Mac OS X 10.6' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.6/7 with Xcode 4.x
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
else:
|
||||
# OSX 10.8 with Xcode 4.4 and higher (no 10.6sdk! )
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.7.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
|
||||
MACOSX_SDK = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
|
||||
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
|
||||
# if your compiler does not have accurate suffix you may have to enable it by hand !
|
||||
if CC[:-2].endswith('4.6'):
|
||||
WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke
|
||||
else:
|
||||
WITH_BF_OPENMP = False
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
|
||||
#bz2 is a standard osx dynlib
|
||||
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_OSX_STATICPYTHON = True
|
||||
|
||||
if WITH_OSX_STATICPYTHON:
|
||||
# python 3.3 uses precompiled libraries in bf svn /lib by default
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
else:
|
||||
# python 3.2 uses Python-framework additionally installed in /Library/Frameworks
|
||||
|
||||
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
||||
#BF_PYTHON_LIB = ''
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config-${BF_PYTHON_VERSION}m'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
#different lib must be used following version of gcc
|
||||
# for gcc 3.3
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
# for gcc 3.4 and ulterior
|
||||
if MAC_PROC == 'powerpc':
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
else :
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
|
||||
#BF_OPENAL_LIB = 'openal'
|
||||
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
# we use simply jack framework
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/Library/Frameworks/Jackmp.framework'
|
||||
BF_JACK_INC = '${BF_JACK}/headers'
|
||||
#BF_JACK_LIB = 'jack' # not used due framework
|
||||
BF_JACK_LIBPATH = '${BF_JACK}'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile FLAC ogg vorbis vorbisenc'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored in ffmpeg dir
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '${LCGDIR}/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
#Color Management System
|
||||
WITH_BF_LCMS = False
|
||||
BF_LCMS = LIBDIR + '/lcms'
|
||||
BF_LCMS_INC = '${BF_LCMS}/include'
|
||||
BF_LCMS_LIB = 'lcms'
|
||||
BF_LCMS_LIBPATH = '${BF_LCMS}/lib'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = True
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = '/usr'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
|
||||
|
||||
#OpenCollada flags
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
|
||||
BF_PCRE = LIBDIR + '/opencollada'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
#BF_EXPAT = '/usr'
|
||||
#BF_EXPAT_LIB = 'expat'
|
||||
#BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
#OSL
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
BF_OSL = LIBDIR + '/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
#BF_OSL_LIB = 'oslcomp oslquery'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO tinyxml yaml-cpp'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
WITH_BF_CYCLES_OSL = False # OSL never worked on OSX 32bit !
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_COLLADA = False # we drop 32bit, newest collada is only x86_64 !
|
||||
#Ray trace optimization
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'i386':
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
else:
|
||||
WITH_BF_RAYOPTIMIZATION = False
|
||||
if MACOSX_ARCHITECTURE == 'i386':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
elif MACOSX_ARCHITECTURE == 'x86_64':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
|
||||
|
||||
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
#############################################################################
|
||||
################### various compile settings and flags ##################
|
||||
#############################################################################
|
||||
|
||||
BF_QUIET = '1' # suppress verbose output
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
ARCH_FLAGS = ['-m64']
|
||||
else:
|
||||
ARCH_FLAGS = ['-m32']
|
||||
|
||||
CFLAGS = []
|
||||
CXXFLAGS = []
|
||||
CCFLAGS = ['-pipe','-funsigned-char']
|
||||
|
||||
CPPFLAGS = list(ARCH_FLAGS)
|
||||
|
||||
if WITH_GHOST_COCOA:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
|
||||
if WITH_BF_QUICKTIME:
|
||||
if USE_QTKIT:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
|
||||
|
||||
if not WITH_OSX_STATICPYTHON:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
|
||||
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
|
||||
if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
|
||||
LLIBS = ['stdc++']
|
||||
else:
|
||||
LLIBS = ['stdc++', 'SystemStubs']
|
||||
|
||||
# some flags shuffling for different OS versions
|
||||
if MAC_MIN_VERS == '10.3':
|
||||
CCFLAGS = ['-fuse-cxa-atexit'] + CCFLAGS
|
||||
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit'] + PLATFORM_LINKFLAGS
|
||||
LLIBS.append('crt3.o')
|
||||
|
||||
if USE_SDK:
|
||||
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]
|
||||
PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
|
||||
CCFLAGS=SDK_FLAGS+CCFLAGS
|
||||
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
||||
|
||||
#Intel Macs are CoreDuo and Up
|
||||
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
||||
else:
|
||||
CCFLAGS += ['-fno-strict-aliasing']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
# Intel 64bit Macs are Core2Duo and up
|
||||
if MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CCFLAGS += ['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
#############################################################################
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
||||
|
@@ -1,6 +1,425 @@
|
||||
CC = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang"
|
||||
CXX = "../lib/darwin-9.x.universal/clang-omp-3.5/bin/clang++"
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
#############################################################################
|
||||
################### Cocoa & architecture settings ##################
|
||||
#############################################################################
|
||||
WITH_GHOST_COCOA=True
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
cmd_res=commands.getoutput(cmd)
|
||||
|
||||
if cmd_res[:1]=='7':
|
||||
MAC_CUR_VER='10.3'
|
||||
elif cmd_res[:1]=='8':
|
||||
MAC_CUR_VER='10.4'
|
||||
elif cmd_res[:1]=='9':
|
||||
MAC_CUR_VER='10.5'
|
||||
elif cmd_res[:2]=='10':
|
||||
MAC_CUR_VER='10.6'
|
||||
elif cmd_res[:2]=='11':
|
||||
MAC_CUR_VER='10.7'
|
||||
elif cmd_res[:2]=='12':
|
||||
MAC_CUR_VER='10.8'
|
||||
elif cmd_res[:2]=='13':
|
||||
MAC_CUR_VER='10.9'
|
||||
cmd = 'xcodebuild -version'
|
||||
cmd_xcode=commands.getoutput(cmd)
|
||||
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
|
||||
cmd = 'xcodebuild -showsdks'
|
||||
cmd_sdk=commands.getoutput(cmd)
|
||||
MACOSX_SDK_CHECK=cmd_sdk
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
USE_QTKIT=True # Carbon quicktime is not available for 64bit
|
||||
|
||||
|
||||
# Default target OSX settings per architecture
|
||||
# Can be customized
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc' and MAC_CUR_VER == '10.4':
|
||||
# all releases are now made for 10.5 !
|
||||
# MAC_MIN_VERS = '10.3'
|
||||
# MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
# LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
# CC = 'gcc-3.3'
|
||||
# CXX = 'g++-3.3'
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.0.0-powerpc'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
elif MACOSX_ARCHITECTURE == 'i386' and MAC_CUR_VER == '10.4':
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
else :
|
||||
if 'Mac OS X 10.5' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.5/6 with Xcode 3.x
|
||||
MAC_MIN_VERS = '10.5'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.5'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
elif 'Mac OS X 10.6' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.6/7 with Xcode 4.x
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
else:
|
||||
# OSX 10.8 with Xcode 4.4 and higher (no 10.6sdk! )
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.7.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
|
||||
MACOSX_SDK = '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
|
||||
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
|
||||
# if your compiler does not have accurate suffix you may have to enable it by hand !
|
||||
if CC[:-2].endswith('4.6'):
|
||||
WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke
|
||||
else:
|
||||
WITH_BF_OPENMP = False
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
BF_FFMPEG_INC = "${BF_FFMPEG}/include"
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
|
||||
#bz2 is a standard osx dynlib
|
||||
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_OSX_STATICPYTHON = True
|
||||
|
||||
if WITH_OSX_STATICPYTHON:
|
||||
# python 3.3 uses precompiled libraries in bf svn /lib by default
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
else:
|
||||
# python 3.2 uses Python-framework additionally installed in /Library/Frameworks
|
||||
|
||||
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
||||
#BF_PYTHON_LIB = ''
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config-${BF_PYTHON_VERSION}m'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
#different lib must be used following version of gcc
|
||||
# for gcc 3.3
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
# for gcc 3.4 and ulterior
|
||||
if MAC_PROC == 'powerpc':
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
else :
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
|
||||
#BF_OPENAL_LIB = 'openal'
|
||||
#BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
#BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
# we use simply jack framework
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/Library/Frameworks/Jackmp.framework'
|
||||
BF_JACK_INC = '${BF_JACK}/headers'
|
||||
#BF_JACK_LIB = 'jack' # not used due framework
|
||||
BF_JACK_LIBPATH = '${BF_JACK}'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile FLAC ogg vorbis vorbisenc'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored in ffmpeg dir
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '${LCGDIR}/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread'
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
#Color Management System
|
||||
WITH_BF_LCMS = False
|
||||
BF_LCMS = LIBDIR + '/lcms'
|
||||
BF_LCMS_INC = '${BF_LCMS}/include'
|
||||
BF_LCMS_LIB = 'lcms'
|
||||
BF_LCMS_LIBPATH = '${BF_LCMS}/lib'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'libfftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
BF_FREETYPE = LIBDIR + '/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = True
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = '/usr'
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
#BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = True
|
||||
BF_OPENGL_LIB = 'GL GLU'
|
||||
BF_OPENGL_LIBPATH = '/System/Library/Frameworks/OpenGL.framework/Libraries'
|
||||
BF_OPENGL_LINKFLAGS = ['-framework', 'OpenGL']
|
||||
|
||||
#OpenCollada flags
|
||||
WITH_BF_COLLADA = True
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
|
||||
BF_PCRE = LIBDIR + '/opencollada'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
#BF_EXPAT = '/usr'
|
||||
#BF_EXPAT_LIB = 'expat'
|
||||
#BF_EXPAT_LIBPATH = '/usr/lib'
|
||||
|
||||
# Cycles
|
||||
WITH_BF_CYCLES = True
|
||||
|
||||
#OSL
|
||||
|
||||
WITH_BF_CYCLES_OSL = True
|
||||
BF_OSL = LIBDIR + '/osl'
|
||||
BF_OSL_INC = '${BF_OSL}/include'
|
||||
# note oslexec would passed via program linkflags, which is needed to
|
||||
# make llvm happy with osl_allocate_closure_component
|
||||
#BF_OSL_LIB = 'oslcomp oslquery'
|
||||
BF_OSL_LIBPATH = '${BF_OSL}/lib'
|
||||
BF_OSL_COMPILER = '${BF_OSL}/bin/oslc'
|
||||
|
||||
WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIB = 'OpenImageIO'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
BF_OCIO = LIBDIR + '/opencolorio'
|
||||
BF_OCIO_INC = '${BF_OCIO}/include'
|
||||
BF_OCIO_LIB = 'OpenColorIO tinyxml yaml-cpp'
|
||||
BF_OCIO_LIBPATH = '${BF_OCIO}/lib'
|
||||
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = LIBDIR + '/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_date_time-mt boost_filesystem-mt boost_regex-mt boost_system-mt boost_thread-mt boost_wave-mt'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mt'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = True
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#Ray trace optimization
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'i386':
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
else:
|
||||
WITH_BF_RAYOPTIMIZATION = False
|
||||
if MACOSX_ARCHITECTURE == 'i386':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
elif MACOSX_ARCHITECTURE == 'x86_64':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
|
||||
|
||||
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
#############################################################################
|
||||
################### various compile settings and flags ##################
|
||||
#############################################################################
|
||||
|
||||
BF_QUIET = '1' # suppress verbose output
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
ARCH_FLAGS = ['-m64']
|
||||
else:
|
||||
ARCH_FLAGS = ['-m32']
|
||||
|
||||
CFLAGS = []
|
||||
CXXFLAGS = []
|
||||
CCFLAGS = ['-pipe','-funsigned-char']
|
||||
|
||||
CPPFLAGS = list(ARCH_FLAGS)
|
||||
|
||||
if WITH_GHOST_COCOA:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
|
||||
if WITH_BF_QUICKTIME:
|
||||
if USE_QTKIT:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
|
||||
|
||||
if not WITH_OSX_STATICPYTHON:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
|
||||
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
|
||||
if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
|
||||
LLIBS = ['stdc++']
|
||||
else:
|
||||
LLIBS = ['stdc++', 'SystemStubs']
|
||||
|
||||
# some flags shuffling for different OS versions
|
||||
if MAC_MIN_VERS == '10.3':
|
||||
CCFLAGS = ['-fuse-cxa-atexit'] + CCFLAGS
|
||||
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit'] + PLATFORM_LINKFLAGS
|
||||
LLIBS.append('crt3.o')
|
||||
|
||||
if USE_SDK:
|
||||
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]
|
||||
PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
|
||||
CCFLAGS=SDK_FLAGS+CCFLAGS
|
||||
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
||||
|
||||
#Intel Macs are CoreDuo and Up
|
||||
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
||||
else:
|
||||
CCFLAGS += ['-fno-strict-aliasing']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
# Intel 64bit Macs are Core2Duo and up
|
||||
if MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CCFLAGS += ['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g ']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
#############################################################################
|
||||
|
||||
BF_BUILDDIR='../build/darwin'
|
||||
BF_INSTALLDIR='../install/darwin'
|
||||
|
@@ -3,11 +3,10 @@ BF_INSTALLDIR = '../blender-install/linux-glibc211-i686'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
BF_PYTHON = '/opt/lib/python-3.3'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
@@ -34,7 +33,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/i486-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -64,8 +63,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
@@ -3,11 +3,10 @@ BF_INSTALLDIR = '../blender-install/linux-glibc211-x86_64'
|
||||
BF_NUMJOBS = 4
|
||||
|
||||
# Python configuration
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_ABI_FLAGS = 'm'
|
||||
BF_PYTHON = '/opt/lib/python-3.4'
|
||||
BF_PYTHON = '/opt/lib/python-3.3'
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
WITH_BF_PYTHON_INSTALL_REQUESTS = True
|
||||
|
||||
WITH_BF_STATICPYTHON = True
|
||||
|
||||
@@ -34,7 +33,7 @@ BF_CXX_LIB_STATIC = '/usr/lib/gcc/x86_64-linux-gnu/4.7.1/libstdc++.a'
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = True
|
||||
BF_OPENAL = '/opt/lib/openal'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a /opt/lib/openal/lib/libcommon.a'
|
||||
BF_OPENAL_LIB_STATIC = '/opt/lib/openal/lib/libopenal.a'
|
||||
|
||||
WITH_BF_GETTEXT_STATIC = True
|
||||
|
||||
@@ -64,8 +63,6 @@ WITH_BF_STATICZLIB = True
|
||||
BF_ZLIB_LIB_STATIC = '${BF_ZLIB}/lib/libz.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
WITH_BF_SDL_DYNLOAD = True
|
||||
|
||||
WITH_BF_OGG = False
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
@@ -3,58 +3,6 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
# List of the branches being built automatically overnight
|
||||
NIGHT_SCHEDULE_BRANCHES = [None]
|
||||
|
||||
# List of the branches available for force build
|
||||
FORCE_SCHEDULE_BRANCHES = ["master", "gooseberry", "experimental-build"]
|
||||
|
||||
"""
|
||||
Stock Twisted directory lister doesn't provide any information about last file
|
||||
modification time, we hack the class a bit in order to have such functionaliity
|
||||
:)
|
||||
"""
|
||||
|
||||
from buildbot.status.web.base import DirectoryLister
|
||||
|
||||
|
||||
def get_files_and_directories(self, directory):
|
||||
from twisted.web.static import (getTypeAndEncoding,
|
||||
formatFileSize)
|
||||
import urllib
|
||||
import cgi
|
||||
import time
|
||||
import os
|
||||
files = []
|
||||
dirs = []
|
||||
for path in directory:
|
||||
url = urllib.quote(path, "/")
|
||||
escapedPath = cgi.escape(path)
|
||||
lastmodified = time.ctime(os.path.getmtime(
|
||||
os.path.join(self.path, path)))
|
||||
if os.path.isdir(os.path.join(self.path, path)):
|
||||
url = url + '/'
|
||||
dirs.append({'text': escapedPath + "/", 'href': url,
|
||||
'size': '', 'type': '[Directory]',
|
||||
'encoding': '',
|
||||
'lastmodified': lastmodified})
|
||||
else:
|
||||
mimetype, encoding = getTypeAndEncoding(path, self.contentTypes,
|
||||
self.contentEncodings,
|
||||
self.defaultType)
|
||||
try:
|
||||
size = os.stat(os.path.join(self.path, path)).st_size
|
||||
except OSError:
|
||||
continue
|
||||
files.append({
|
||||
'text': escapedPath, "href": url,
|
||||
'type': '[%s]' % mimetype,
|
||||
'encoding': (encoding and '[%s]' % encoding or ''),
|
||||
'size': formatFileSize(size),
|
||||
'lastmodified': lastmodified})
|
||||
return dirs, files
|
||||
DirectoryLister._getFilesAndDirectories = get_files_and_directories
|
||||
|
||||
# Dictionary that the buildmaster pays attention to.
|
||||
c = BuildmasterConfig = {}
|
||||
|
||||
@@ -78,95 +26,55 @@ c['slavePortnum'] = 9989
|
||||
# CHANGE SOURCES
|
||||
|
||||
from buildbot.changes.svnpoller import SVNPoller
|
||||
from buildbot.changes.gitpoller import GitPoller
|
||||
|
||||
c['change_source'] = GitPoller(
|
||||
'git://git.blender.org/blender.git',
|
||||
c['change_source'] = SVNPoller(
|
||||
'https://svn.blender.org/svnroot/bf-blender/trunk/',
|
||||
pollinterval=1200)
|
||||
|
||||
|
||||
# CODEBASES
|
||||
#
|
||||
# Allow to controll separately things like branches for each repo and submodules.
|
||||
|
||||
all_repositories = {
|
||||
r'git://git.blender.org/blender.git': 'blender',
|
||||
r'git://git.blender.org/blender-translations.git': 'blender-translations',
|
||||
r'git://git.blender.org/blender-addons.git': 'blender-addons',
|
||||
r'git://git.blender.org/blender-addons-contrib.git': 'blender-addons-contrib',
|
||||
r'git://git.blender.org/scons.git': 'scons',
|
||||
r'https://svn.blender.org/svnroot/bf-blender/': 'lib svn',
|
||||
}
|
||||
|
||||
|
||||
def codebaseGenerator(chdict):
|
||||
return all_repositories[chdict['repository']]
|
||||
|
||||
c['codebaseGenerator'] = codebaseGenerator
|
||||
|
||||
|
||||
# SCHEDULERS
|
||||
#
|
||||
# Decide how to react to incoming changes.
|
||||
|
||||
# from buildbot.scheduler import Scheduler
|
||||
from buildbot.schedulers import timed, forcesched
|
||||
from buildbot.schedulers import timed
|
||||
|
||||
c['schedulers'] = []
|
||||
|
||||
|
||||
def schedule_force_build(name):
|
||||
c['schedulers'].append(forcesched.ForceScheduler(name='force ' + name,
|
||||
builderNames=[name],
|
||||
codebases=[forcesched.CodebaseParameter(
|
||||
codebase="blender",
|
||||
branch=forcesched.ChoiceStringParameter(
|
||||
name="branch", choices=FORCE_SCHEDULE_BRANCHES, default="master"),
|
||||
# Do not hide revision, can be handy!
|
||||
repository=forcesched.FixedParameter(name="repository", default="", hide=True),
|
||||
project=forcesched.FixedParameter(name="project", default="", hide=True)),
|
||||
# For now, hide other codebases.
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-translations"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="blender-addons-contrib"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="scons"),
|
||||
forcesched.CodebaseParameter(hide=True, codebase="lib svn")],
|
||||
properties=[]))
|
||||
|
||||
|
||||
def schedule_build(name, hour, minute=0):
|
||||
for current_branch in NIGHT_SCHEDULE_BRANCHES:
|
||||
scheduler_name = "nightly " + name
|
||||
if current_branch:
|
||||
scheduler_name += ' ' + current_branch
|
||||
c['schedulers'].append(timed.Nightly(name=scheduler_name,
|
||||
codebases={
|
||||
"blender": {"repository": ""},
|
||||
"blender-translations": {"repository": "", "branch": "master"},
|
||||
"blender-addons": {"repository": "", "branch": "master"},
|
||||
"blender-addons-contrib": {"repository": "", "branch": "master"},
|
||||
"scons": {"repository": "", "branch": "master"},
|
||||
"lib svn": {"repository": "", "branch": "trunk"}},
|
||||
branch=current_branch,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
c['schedulers'].append(timed.Nightly(name='nightly ' + name,
|
||||
builderNames=[name],
|
||||
hour=hour,
|
||||
minute=minute))
|
||||
|
||||
"""
|
||||
schedule_cycle = 4
|
||||
|
||||
for i in range(0, schedule_cycle):
|
||||
names = []
|
||||
for j in range(0, len(buildernames)):
|
||||
if j % schedule_cycle == i:
|
||||
names += [buildernames[j]]
|
||||
|
||||
print(names)
|
||||
c['schedulers'].append(timed.Nightly(name='nightly' + str(i),
|
||||
builderNames=names,
|
||||
hour=3+i,
|
||||
minute=0))
|
||||
"""
|
||||
|
||||
# BUILDERS
|
||||
#
|
||||
# The 'builders' list defines the Builders, which tell Buildbot how to
|
||||
# perform a build: what steps, and which slaves can execute them.
|
||||
# Note that any particular build will only take place on one slave.
|
||||
# The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
|
||||
# what steps, and which slaves can execute them. Note that any particular build will
|
||||
# only take place on one slave.
|
||||
|
||||
from buildbot.process.factory import BuildFactory
|
||||
from buildbot.process.properties import Interpolate
|
||||
from buildbot.steps.source import SVN
|
||||
from buildbot.steps.source import Git
|
||||
from buildbot.steps.shell import ShellCommand
|
||||
from buildbot.steps.shell import Compile
|
||||
from buildbot.steps.shell import Test
|
||||
from buildbot.steps.transfer import FileUpload
|
||||
# from buildbot.steps.transfer import FileDownload
|
||||
from buildbot.steps.master import MasterShellCommand
|
||||
from buildbot.config import BuilderConfig
|
||||
|
||||
@@ -176,8 +84,7 @@ c['builders'] = []
|
||||
buildernames = []
|
||||
|
||||
|
||||
def add_builder(c, name, libdir, factory, branch='',
|
||||
rsync=False, hour=3, minute=0):
|
||||
def add_builder(c, name, libdir, factory, branch='', rsync=False, hour=3, minute=0):
|
||||
slavenames = []
|
||||
|
||||
for slave in master_private.slaves:
|
||||
@@ -186,117 +93,52 @@ def add_builder(c, name, libdir, factory, branch='',
|
||||
|
||||
if len(slavenames) > 0:
|
||||
f = factory(name, libdir, branch, rsync)
|
||||
c['builders'].append(BuilderConfig(name=name,
|
||||
slavenames=slavenames,
|
||||
factory=f,
|
||||
category='blender'))
|
||||
c['builders'].append(BuilderConfig(name=name, slavenames=slavenames, factory=f, category='blender'))
|
||||
buildernames.append(name)
|
||||
|
||||
schedule_build(name, hour, minute)
|
||||
schedule_force_build(name)
|
||||
|
||||
# common steps
|
||||
|
||||
|
||||
def git_submodule_step(submodule):
|
||||
return Git(name=submodule + '.git',
|
||||
repourl='git://git.blender.org/' + submodule + '.git',
|
||||
mode='update',
|
||||
codebase=submodule,
|
||||
workdir=submodule + '.git')
|
||||
|
||||
|
||||
def git_step(branch=''):
|
||||
def svn_step(branch=''):
|
||||
if branch:
|
||||
return Git(name='blender.git',
|
||||
repourl='git://git.blender.org/blender.git',
|
||||
mode='update',
|
||||
branch=branch,
|
||||
codebase='blender',
|
||||
workdir='blender.git',
|
||||
submodules=True)
|
||||
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/branches/%%BRANCH%%', mode='update', defaultBranch=branch, workdir='blender')
|
||||
else:
|
||||
return Git(name='blender.git',
|
||||
repourl='git://git.blender.org/blender.git',
|
||||
mode='update',
|
||||
codebase='blender',
|
||||
workdir='blender.git',
|
||||
submodules=True)
|
||||
|
||||
|
||||
def git_submodules_update():
|
||||
command = ['git', 'submodule', 'foreach', '--recursive',
|
||||
'git', 'pull', 'origin', 'master']
|
||||
return ShellCommand(name='Submodules Update',
|
||||
command=command,
|
||||
description='updating',
|
||||
descriptionDone='up to date',
|
||||
workdir='blender.git')
|
||||
|
||||
return SVN(baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/blender', mode='update', defaultBranch='trunk', workdir='blender')
|
||||
|
||||
def lib_svn_step(dir):
|
||||
return SVN(name='lib svn',
|
||||
baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir,
|
||||
codebase='lib svn',
|
||||
mode='update',
|
||||
defaultBranch='trunk',
|
||||
workdir='lib/' + dir)
|
||||
|
||||
return SVN(name='lib svn', baseURL='https://svn.blender.org/svnroot/bf-blender/%%BRANCH%%/lib/' + dir, mode='update', defaultBranch='trunk', workdir='lib/' + dir)
|
||||
|
||||
def rsync_step(id, branch, rsync_script):
|
||||
return ShellCommand(name='rsync',
|
||||
command=['python', rsync_script, id, branch],
|
||||
description='uploading',
|
||||
descriptionDone='uploaded',
|
||||
workdir='install')
|
||||
return ShellCommand(name='rsync', command=['python', rsync_script, id, branch], description='uploading', descriptionDone='uploaded', workdir='install')
|
||||
|
||||
# generic builder
|
||||
|
||||
|
||||
def generic_builder(id, libdir='', branch='', rsync=False):
|
||||
filename = 'uploaded/buildbot_upload_' + id + '.zip'
|
||||
compile_script = '../blender.git/build_files/buildbot/slave_compile.py'
|
||||
test_script = '../blender.git/build_files/buildbot/slave_test.py'
|
||||
pack_script = '../blender.git/build_files/buildbot/slave_pack.py'
|
||||
rsync_script = '../blender.git/build_files/buildbot/slave_rsync.py'
|
||||
compile_script = '../blender/build_files/buildbot/slave_compile.py'
|
||||
test_script = '../blender/build_files/buildbot/slave_test.py'
|
||||
pack_script = '../blender/build_files/buildbot/slave_pack.py'
|
||||
rsync_script = '../blender/build_files/buildbot/slave_rsync.py'
|
||||
unpack_script = 'master_unpack.py'
|
||||
|
||||
f = BuildFactory()
|
||||
f.addStep(svn_step(branch))
|
||||
if libdir != '':
|
||||
f.addStep(lib_svn_step(libdir))
|
||||
|
||||
for submodule in ('blender-translations',
|
||||
'blender-addons',
|
||||
'blender-addons-contrib',
|
||||
'scons'):
|
||||
f.addStep(git_submodule_step(submodule))
|
||||
|
||||
f.addStep(git_step(branch))
|
||||
f.addStep(git_submodules_update())
|
||||
|
||||
f.addStep(Compile(command=['python', compile_script, id], timeout=3600))
|
||||
f.addStep(Test(command=['python', test_script, id]))
|
||||
f.addStep(ShellCommand(name='package',
|
||||
command=['python', pack_script, id, branch or Interpolate('%(src:blender:branch)s')],
|
||||
description='packaging',
|
||||
descriptionDone='packaged'))
|
||||
f.addStep(ShellCommand(name='package', command=['python', pack_script, id, branch], description='packaging', descriptionDone='packaged'))
|
||||
if rsync:
|
||||
f.addStep(rsync_step(id, branch, rsync_script))
|
||||
elif id.find('cmake') != -1:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024))
|
||||
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024))
|
||||
else:
|
||||
f.addStep(FileUpload(name='upload',
|
||||
slavesrc='buildbot_upload.zip',
|
||||
masterdest=filename,
|
||||
maxsize=150 * 1024 * 1024,
|
||||
workdir='install'))
|
||||
f.addStep(MasterShellCommand(name='unpack',
|
||||
command=['python', unpack_script, filename],
|
||||
description='unpacking',
|
||||
descriptionDone='unpacked'))
|
||||
f.addStep(FileUpload(name='upload', slavesrc='buildbot_upload.zip', masterdest=filename, maxsize=100 * 1024 * 1024, workdir='install'))
|
||||
f.addStep(MasterShellCommand(name='unpack', command=['python', unpack_script, filename], description='unpacking', descriptionDone='unpacked'))
|
||||
return f
|
||||
|
||||
# builders
|
||||
@@ -305,12 +147,10 @@ add_builder(c, 'mac_x86_64_10_6_scons', 'darwin-9.x.universal', generic_builder,
|
||||
add_builder(c, 'mac_i386_10_6_scons', 'darwin-9.x.universal', generic_builder, hour=11)
|
||||
add_builder(c, 'linux_glibc211_i386_scons', '', generic_builder, hour=1)
|
||||
add_builder(c, 'linux_glibc211_x86_64_scons', '', generic_builder, hour=2)
|
||||
#add_builder(c, 'win32_scons_vc2013', 'windows_vc12', generic_builder, hour=1)
|
||||
#add_builder(c, 'win64_scons_vc2013', 'win64_vc12', generic_builder, hour=2)
|
||||
add_builder(c, 'win32_cmake_vc2013', 'windows_vc12', generic_builder, hour=3)
|
||||
add_builder(c, 'win64_cmake_vc2013', 'win64_vc12', generic_builder, hour=4)
|
||||
add_builder(c, 'win32_scons', 'windows', generic_builder, hour=1)
|
||||
add_builder(c, 'win64_scons', 'win64', generic_builder, hour=2)
|
||||
#add_builder(c, 'mingw_win32_scons', 'mingw32', generic_builder, hour=4)
|
||||
#add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
add_builder(c, 'mingw_win64_scons', 'mingw64', generic_builder, hour=3)
|
||||
#add_builder(c, 'freebsd_i386_cmake', '', generic_builder, hour=1)
|
||||
#add_builder(c, 'freebsd_x86_64_cmake', '', generic_builder, hour=2)
|
||||
|
||||
@@ -339,16 +179,15 @@ authz_cfg = authz.Authz(
|
||||
# change any of these to True to enable; see the manual for more
|
||||
# options
|
||||
gracefulShutdown=False,
|
||||
forceBuild=True, # use this to test your slave once it is set up
|
||||
forceBuild='auth', # use this to test your slave once it is set up
|
||||
forceAllBuilds=False,
|
||||
pingBuilder=False,
|
||||
stopBuild=True,
|
||||
stopBuild='auth',
|
||||
stopAllBuilds=False,
|
||||
cancelPendingBuild=True,
|
||||
cancelPendingBuild='auth',
|
||||
)
|
||||
|
||||
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
|
||||
#c['status'].append(html.WebStatus(http_port=8010))
|
||||
|
||||
# PROJECT IDENTITY
|
||||
|
||||
|
@@ -30,12 +30,11 @@ import zipfile
|
||||
# extension stripping
|
||||
def strip_extension(filename):
|
||||
extensions = '.zip', '.tar', '.bz2', '.gz', '.tgz', '.tbz', '.exe'
|
||||
|
||||
for ext in extensions:
|
||||
if filename.endswith(ext):
|
||||
filename = filename[:-len(ext)]
|
||||
|
||||
return filename
|
||||
filename_noext, ext = os.path.splitext(filename)
|
||||
if ext in extensions:
|
||||
return strip_extension(filename_noext) # may have .tar.bz2
|
||||
else:
|
||||
return filename
|
||||
|
||||
|
||||
# extract platform from package name
|
||||
@@ -49,11 +48,12 @@ def get_platform(filename):
|
||||
tokens = filename.split("-")
|
||||
platforms = ('osx', 'mac', 'bsd',
|
||||
'win', 'linux', 'source',
|
||||
'irix', 'solaris', 'mingw')
|
||||
'solaris',
|
||||
'mingw')
|
||||
platform_tokens = []
|
||||
found = False
|
||||
|
||||
for i, token in enumerate(tokens):
|
||||
for token in tokens:
|
||||
if not found:
|
||||
for platform in platforms:
|
||||
if platform in token.lower():
|
||||
@@ -71,14 +71,14 @@ def get_branch(filename):
|
||||
branch = ""
|
||||
|
||||
for token in tokens:
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
||||
if branch == "":
|
||||
branch = token
|
||||
else:
|
||||
branch = branch + "-" + token
|
||||
|
||||
if token == "blender":
|
||||
return branch
|
||||
|
||||
return ""
|
||||
|
||||
# get filename
|
||||
@@ -95,7 +95,7 @@ if not os.path.exists(filename):
|
||||
|
||||
try:
|
||||
z = zipfile.ZipFile(filename, "r")
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to open zip file: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -112,28 +112,23 @@ branch = get_branch(packagename)
|
||||
|
||||
if platform == '':
|
||||
sys.stderr.write('Failed to detect platform ' +
|
||||
'from package: %r\n' % packagename)
|
||||
'from package: %r\n' % packagename)
|
||||
sys.exit(1)
|
||||
|
||||
# extract
|
||||
if not branch or branch == 'master':
|
||||
directory = 'public_html/download'
|
||||
elif branch == 'experimental-build':
|
||||
directory = 'public_html/download/experimental'
|
||||
else:
|
||||
directory = 'public_html/download'
|
||||
directory = 'public_html/download'
|
||||
|
||||
try:
|
||||
filename = os.path.join(directory, packagename)
|
||||
zf = z.open(package)
|
||||
f = file(filename, "wb")
|
||||
f = file(os.path.join(directory, packagename), "wb")
|
||||
|
||||
shutil.copyfileobj(zf, f)
|
||||
os.chmod(filename, 0644)
|
||||
|
||||
zf.close()
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
|
||||
os.remove(filename)
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to unzip package: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
||||
@@ -143,6 +138,6 @@ try:
|
||||
if get_platform(f) == platform and get_branch(f) == branch:
|
||||
if f != packagename:
|
||||
os.remove(os.path.join(directory, f))
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Failed to remove old packages: %s\n' % str(ex))
|
||||
sys.exit(1)
|
||||
|
@@ -31,9 +31,9 @@ if len(sys.argv) < 2:
|
||||
builder = sys.argv[1]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
blender_dir = '../blender'
|
||||
|
||||
if 'cmake' in builder:
|
||||
if builder.find('cmake') != -1:
|
||||
# cmake
|
||||
|
||||
# set build options
|
||||
@@ -46,33 +46,16 @@ if 'cmake' in builder:
|
||||
elif builder.endswith('mac_ppc_cmake'):
|
||||
cmake_options.append('-DCMAKE_OSX_ARCHITECTURES:STRING=ppc')
|
||||
|
||||
if 'win64' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013 Win64"'])
|
||||
elif 'win32' in builder:
|
||||
cmake_options.append(['-G', '"Visual Studio 12 2013"'])
|
||||
|
||||
cmake_options.append("-C../blender.git/build_files/cmake/config/blender_full.cmake")
|
||||
cmake_options.append("-DWITH_CYCLES_CUDA_BINARIES=1")
|
||||
# configure and make
|
||||
retcode = subprocess.call(['cmake', blender_dir] + cmake_options)
|
||||
if retcode != 0:
|
||||
sys.exit(retcode)
|
||||
|
||||
if 'win32' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/Property:PlatformToolset=v120_xp', '/p:Configuration=Release'])
|
||||
elif 'win64' in builder:
|
||||
retcode = subprocess.call(['msbuild', 'INSTALL.vcxproj', '/p:Configuration=Release'])
|
||||
else:
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
retcode = subprocess.call(['make', '-s', '-j4', 'install'])
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
# scons
|
||||
os.chdir(blender_dir)
|
||||
scons_cmd = [python_bin, 'scons/scons.py']
|
||||
scons_cmd = ['python', 'scons/scons.py']
|
||||
scons_options = ['BF_FANCY=False']
|
||||
|
||||
# We're using the same rules as release builder, so tweak
|
||||
@@ -81,7 +64,6 @@ else:
|
||||
install_dir = os.path.join('..', 'install', builder)
|
||||
|
||||
# Clean install directory so we'll be sure there's no
|
||||
# residual libs and files remained from the previous install.
|
||||
if os.path.isdir(install_dir):
|
||||
shutil.rmtree(install_dir)
|
||||
|
||||
@@ -119,8 +101,6 @@ else:
|
||||
|
||||
if config.find('player') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_player' % (build_dir))
|
||||
elif config.find('cuda') != -1:
|
||||
scons_options.append('BF_BUILDDIR=%s_cuda' % (build_dir))
|
||||
else:
|
||||
scons_options.append('BF_BUILDDIR=%s' % (build_dir))
|
||||
|
||||
@@ -145,7 +125,7 @@ else:
|
||||
|
||||
retcode = subprocess.call(cur_scons_cmd + scons_options)
|
||||
if retcode != 0:
|
||||
print('Error building rules with config ' + config)
|
||||
print('Error building rules wuth config ' + config)
|
||||
sys.exit(retcode)
|
||||
|
||||
sys.exit(0)
|
||||
@@ -163,11 +143,8 @@ else:
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
scons_options.append('WITH_BF_CYCLES_CUDA_BINARIES=1')
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.endswith('vc2012'):
|
||||
scons_options.append('MSVS_VERSION=11.0')
|
||||
scons_options.append('BF_NUMJOBS=1')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
@@ -181,8 +158,10 @@ else:
|
||||
if builder.find('win') != -1:
|
||||
if not os.path.exists(install_dir):
|
||||
os.makedirs(install_dir)
|
||||
if builder.endswith('vc2013'):
|
||||
dlls = ('msvcp120.dll', 'msvcr120.dll', 'vcomp120.dll')
|
||||
if builder.endswith('vc2012'):
|
||||
dlls = ('msvcp110.dll', 'msvcr110.dll', 'vcomp110.dll')
|
||||
else:
|
||||
dlls = ('msvcm90.dll', 'msvcp90.dll', 'msvcr90.dll', 'vcomp90.dll', 'Microsoft.VC90.CRT.manifest', 'Microsoft.VC90.OpenMP.manifest')
|
||||
if builder.find('win64') == -1:
|
||||
dlls_path = '..\\..\\..\\redist\\x86'
|
||||
else:
|
||||
@@ -190,6 +169,6 @@ else:
|
||||
for dll in dlls:
|
||||
shutil.copyfile(os.path.join(dlls_path, dll), os.path.join(install_dir, dll))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
|
@@ -33,16 +33,14 @@ if len(sys.argv) < 2:
|
||||
sys.exit(1)
|
||||
|
||||
builder = sys.argv[1]
|
||||
# Never write branch if it is master.
|
||||
branch = sys.argv[2] if (len(sys.argv) >= 3 and sys.argv[2] != 'master') else ''
|
||||
branch = ''
|
||||
|
||||
if len(sys.argv) >= 3:
|
||||
branch = sys.argv[2]
|
||||
|
||||
# scons does own packaging
|
||||
if builder.find('scons') != -1:
|
||||
python_bin = 'python'
|
||||
if builder.find('linux') != -1:
|
||||
python_bin = '/opt/lib/python-2.7/bin/python2.7'
|
||||
|
||||
os.chdir('../blender.git')
|
||||
os.chdir('../blender')
|
||||
scons_options = ['BF_QUICK=slnt', 'BUILDBOT_BRANCH=' + branch, 'buildslave', 'BF_FANCY=False']
|
||||
|
||||
buildbot_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
@@ -84,7 +82,7 @@ if builder.find('scons') != -1:
|
||||
os.system('cp %s %s' % (software_gl, install_dir))
|
||||
os.system('chmod 755 %s' % (os.path.join(install_dir, 'blender-softwaregl')))
|
||||
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['schroot', '-c', chroot_name, '--', 'python', 'scons/scons.py'] + scons_options)
|
||||
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
@@ -101,9 +99,8 @@ if builder.find('scons') != -1:
|
||||
scons_options.append('BF_CYCLES_CUDA_NVCC=nvcc.exe')
|
||||
if builder.find('mingw') != -1:
|
||||
scons_options.append('BF_TOOLSET=mingw')
|
||||
if builder.endswith('vc2013'):
|
||||
scons_options.append('MSVS_VERSION=12.0')
|
||||
scons_options.append('MSVC_VERSION=12.0')
|
||||
if builder.endswith('vc2012'):
|
||||
scons_options.append('MSVS_VERSION=11.0')
|
||||
|
||||
elif builder.find('mac') != -1:
|
||||
if builder.find('x86_64') != -1:
|
||||
@@ -113,42 +110,8 @@ if builder.find('scons') != -1:
|
||||
|
||||
scons_options.append('BF_CONFIG=' + os.path.join(config_dir, config))
|
||||
|
||||
retcode = subprocess.call([python_bin, 'scons/scons.py'] + scons_options)
|
||||
retcode = subprocess.call(['python', 'scons/scons.py'] + scons_options)
|
||||
sys.exit(retcode)
|
||||
else:
|
||||
# CMake
|
||||
if 'win' in builder:
|
||||
files = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')]
|
||||
for f in files:
|
||||
os.remove(f)
|
||||
retcode = subprocess.call(['cpack', '-G', 'ZIP'])
|
||||
result_file = [f for f in os.listdir('.') if os.path.isfile(f) and f.endswith('.zip')][0]
|
||||
|
||||
# TODO(sergey): Such magic usually happens in SCon's packaging bu we don't have it
|
||||
# in the CMake yet. For until then we do some magic here.
|
||||
tokens = result_file.split('-')
|
||||
blender_version = tokens[1].split('.')
|
||||
blender_full_version = '.'.join(blender_version[0:2])
|
||||
git_hash = tokens[2].split('.')[1]
|
||||
platform = builder.split('_')[0]
|
||||
builderified_name = 'blender-{}-{}-{}'.format(blender_full_version, git_hash, platform)
|
||||
if branch != '':
|
||||
builderified_name = branch + "-" + builderified_name
|
||||
|
||||
os.rename(result_file, "{}.zip".format(builderified_name))
|
||||
# create zip file
|
||||
try:
|
||||
upload_zip = "buildbot_upload.zip"
|
||||
if os.path.exists(upload_zip):
|
||||
os.remove(upload_zip)
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write("{}.zip".format(builderified_name))
|
||||
z.close()
|
||||
sys.exit(retcode)
|
||||
except Exception as ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
# clean release directory if it already exists
|
||||
release_dir = 'release'
|
||||
@@ -161,7 +124,7 @@ if os.path.exists(release_dir):
|
||||
# create release package
|
||||
try:
|
||||
subprocess.call(['make', 'package_archive'])
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Make package release failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
||||
@@ -192,6 +155,6 @@ try:
|
||||
z = zipfile.ZipFile(upload_zip, "w", compression=zipfile.ZIP_STORED)
|
||||
z.write(filepath, arcname=file)
|
||||
z.close()
|
||||
except Exception as ex:
|
||||
except Exception, ex:
|
||||
sys.stderr.write('Create buildbot_upload.zip failed' + str(ex) + '\n')
|
||||
sys.exit(1)
|
||||
|
@@ -29,7 +29,7 @@ if len(sys.argv) < 2:
|
||||
builder = sys.argv[1]
|
||||
|
||||
# we run from build/ directory
|
||||
blender_dir = '../blender.git'
|
||||
blender_dir = '../blender'
|
||||
|
||||
if "cmake" in builder:
|
||||
# cmake
|
||||
|
@@ -1,113 +0,0 @@
|
||||
# - Try to find audaspace
|
||||
# Once done, this will define
|
||||
#
|
||||
# AUDASPACE_FOUND - system has audaspace
|
||||
# AUDASPACE_INCLUDE_DIRS - the audaspace include directories
|
||||
# AUDASPACE_LIBRARIES - link these to use audaspace
|
||||
# AUDASPACE_C_FOUND - system has audaspace's C binding
|
||||
# AUDASPACE_C_INCLUDE_DIRS - the audaspace's C binding include directories
|
||||
# AUDASPACE_C_LIBRARIES - link these to use audaspace's C binding
|
||||
# AUDASPACE_PY_FOUND - system has audaspace's python binding
|
||||
# AUDASPACE_PY_INCLUDE_DIRS - the audaspace's python binding include directories
|
||||
# AUDASPACE_PY_LIBRARIES - link these to use audaspace's python binding
|
||||
|
||||
IF(NOT AUDASPACE_ROOT_DIR AND NOT $ENV{AUDASPACE_ROOT_DIR} STREQUAL "")
|
||||
SET(AUDASPACE_ROOT_DIR $ENV{AUDASPACE_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_audaspace_SEARCH_DIRS
|
||||
${AUDASPACE_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
# Use pkg-config to get hints about paths
|
||||
FIND_PACKAGE(PkgConfig)
|
||||
IF(PKG_CONFIG_FOUND)
|
||||
PKG_CHECK_MODULES(AUDASPACE_PKGCONF audaspace)
|
||||
ENDIF(PKG_CONFIG_FOUND)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_INCLUDE_DIR
|
||||
NAMES ISound.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_LIBRARY
|
||||
NAMES audaspace
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_C_INCLUDE_DIR
|
||||
NAMES AUD_Sound.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_C_LIBRARY
|
||||
NAMES audaspace-c
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
# Include dir
|
||||
FIND_PATH(AUDASPACE_PY_INCLUDE_DIR
|
||||
NAMES python/PyAPI.h
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_INCLUDE_DIRS}
|
||||
PATH_SUFFIXES include/audaspace
|
||||
)
|
||||
|
||||
# Library
|
||||
FIND_LIBRARY(AUDASPACE_PY_LIBRARY
|
||||
NAMES audaspace-py
|
||||
HINTS ${_audaspace_SEARCH_DIRS}
|
||||
PATHS ${AUDASPACE_PKGCONF_LIBRARY_DIRS}
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
FIND_PACKAGE(PackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace DEFAULT_MSG AUDASPACE_LIBRARY AUDASPACE_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_C DEFAULT_MSG AUDASPACE_C_LIBRARY AUDASPACE_C_INCLUDE_DIR)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Audaspace_Py DEFAULT_MSG AUDASPACE_PY_LIBRARY AUDASPACE_PY_INCLUDE_DIR)
|
||||
|
||||
IF(AUDASPACE_FOUND)
|
||||
SET(AUDASPACE_LIBRARIES ${AUDASPACE_LIBRARY})
|
||||
SET(AUDASPACE_INCLUDE_DIRS ${AUDASPACE_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_FOUND)
|
||||
|
||||
IF(AUDASPACE_C_FOUND)
|
||||
SET(AUDASPACE_C_LIBRARIES ${AUDASPACE_C_LIBRARY})
|
||||
SET(AUDASPACE_C_INCLUDE_DIRS ${AUDASPACE_C_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_C_FOUND)
|
||||
|
||||
IF(AUDASPACE_PY_FOUND)
|
||||
SET(AUDASPACE_PY_LIBRARIES ${AUDASPACE_PY_LIBRARY})
|
||||
SET(AUDASPACE_PY_INCLUDE_DIRS ${AUDASPACE_PY_INCLUDE_DIR})
|
||||
ENDIF(AUDASPACE_PY_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
AUDASPACE_LIBRARY
|
||||
AUDASPACE_LIBRARIES
|
||||
AUDASPACE_INCLUDE_DIR
|
||||
AUDASPACE_INCLUDE_DIRS
|
||||
AUDASPACE_C_LIBRARY
|
||||
AUDASPACE_C_LIBRARIES
|
||||
AUDASPACE_C_INCLUDE_DIR
|
||||
AUDASPACE_C_INCLUDE_DIRS
|
||||
AUDASPACE_PY_LIBRARY
|
||||
AUDASPACE_PY_LIBRARIES
|
||||
AUDASPACE_PY_INCLUDE_DIR
|
||||
AUDASPACE_PY_INCLUDE_DIRS
|
||||
)
|
@@ -1,56 +0,0 @@
|
||||
# - Find Eigen3 library
|
||||
# Find the native Eigen3 includes and library
|
||||
# This module defines
|
||||
# EIGEN3_INCLUDE_DIRS, where to find spnav.h, Set when
|
||||
# EIGEN3_INCLUDE_DIR is found.
|
||||
# EIGEN3_ROOT_DIR, The base directory to search for Eigen3.
|
||||
# This can also be an environment variable.
|
||||
# EIGEN3_FOUND, If false, do not try to use Eigen3.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If EIGEN3_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT EIGEN3_ROOT_DIR AND NOT $ENV{EIGEN3_ROOT_DIR} STREQUAL "")
|
||||
SET(EIGEN3_ROOT_DIR $ENV{EIGEN3_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_eigen3_SEARCH_DIRS
|
||||
${EIGEN3_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(EIGEN3_INCLUDE_DIR
|
||||
NAMES
|
||||
# header has no '.h' suffix
|
||||
Eigen/Eigen
|
||||
HINTS
|
||||
${_eigen3_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/eigen3
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set EIGEN3_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Eigen3 DEFAULT_MSG
|
||||
EIGEN3_INCLUDE_DIR)
|
||||
|
||||
IF(EIGEN3_FOUND)
|
||||
SET(EIGEN3_INCLUDE_DIRS ${EIGEN3_INCLUDE_DIR})
|
||||
ENDIF(EIGEN3_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
EIGEN3_INCLUDE_DIR
|
||||
)
|
@@ -1,79 +1,59 @@
|
||||
# - Find GLEW library
|
||||
# Find the native Glew includes and library
|
||||
# This module defines
|
||||
# GLEW_INCLUDE_DIRS, where to find glew.h, Set when
|
||||
# GLEW_INCLUDE_DIR is found.
|
||||
# GLEW_ROOT_DIR, The base directory to search for Glew.
|
||||
# This can also be an environment variable.
|
||||
# GLEW_FOUND, If false, do not try to use Glew.
|
||||
#
|
||||
# also defined,
|
||||
# GLEW_LIBRARY, where to find the Glew library.
|
||||
# GLEW_MX_LIBRARY, where to find the GlewMX library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
# Try to find GLEW library and include path.
|
||||
# Once done this will define
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# GLEW_FOUND
|
||||
# GLEW_INCLUDE_PATH
|
||||
# GLEW_LIBRARY
|
||||
#
|
||||
|
||||
# If GLEW_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT GLEW_ROOT_DIR AND NOT $ENV{GLEW_ROOT_DIR} STREQUAL "")
|
||||
SET(GLEW_ROOT_DIR $ENV{GLEW_ROOT_DIR})
|
||||
ENDIF()
|
||||
IF (WIN32)
|
||||
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
|
||||
$ENV{PROGRAMFILES}/GLEW/include
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/include
|
||||
DOC "The directory where GL/glew.h resides")
|
||||
IF (NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES glew64 glew64s
|
||||
PATHS
|
||||
$ENV{PROGRAMFILES}/GLEW/lib
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
|
||||
DOC "The GLEW library (64-bit)"
|
||||
)
|
||||
ELSE(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES glew GLEW glew32 glew32s
|
||||
PATHS
|
||||
$ENV{PROGRAMFILES}/GLEW/lib
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/bin
|
||||
${PROJECT_SOURCE_DIR}/src/nvgl/glew/lib
|
||||
DOC "The GLEW library"
|
||||
)
|
||||
ENDIF(NV_SYSTEM_PROCESSOR STREQUAL "AMD64")
|
||||
ELSE (WIN32)
|
||||
FIND_PATH( GLEW_INCLUDE_PATH GL/glew.h
|
||||
/usr/include
|
||||
/usr/local/include
|
||||
/sw/include
|
||||
/opt/local/include
|
||||
DOC "The directory where GL/glew.h resides")
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES GLEW glew
|
||||
PATHS
|
||||
/usr/lib64
|
||||
/usr/lib
|
||||
/usr/local/lib64
|
||||
/usr/local/lib
|
||||
/sw/lib
|
||||
/opt/local/lib
|
||||
DOC "The GLEW library")
|
||||
ENDIF (WIN32)
|
||||
|
||||
SET(_glew_SEARCH_DIRS
|
||||
${GLEW_ROOT_DIR}
|
||||
/usr/local
|
||||
)
|
||||
IF (GLEW_INCLUDE_PATH)
|
||||
SET(GLEW_FOUND TRUE)
|
||||
ELSE (GLEW_INCLUDE_PATH)
|
||||
SET(GLEW_FOUND FALSE)
|
||||
ENDIF (GLEW_INCLUDE_PATH)
|
||||
|
||||
FIND_PATH(GLEW_INCLUDE_DIR
|
||||
NAMES
|
||||
GL/glew.h
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(GLEW_LIBRARY
|
||||
NAMES
|
||||
GLEW
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
|
||||
FIND_LIBRARY(GLEW_MX_LIBRARY
|
||||
NAMES
|
||||
GLEWmx
|
||||
HINTS
|
||||
${_glew_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set GLEW_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Glew DEFAULT_MSG
|
||||
GLEW_LIBRARY GLEW_INCLUDE_DIR)
|
||||
|
||||
IF(GLEW_FOUND)
|
||||
SET(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
|
||||
ENDIF(GLEW_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
GLEW_INCLUDE_DIR
|
||||
GLEW_LIBRARY
|
||||
GLEW_MX_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_glew_SEARCH_DIRS)
|
||||
MARK_AS_ADVANCED( GLEW_FOUND )
|
||||
|
@@ -33,7 +33,6 @@ SET(_jemalloc_SEARCH_DIRS
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/jemalloc
|
||||
)
|
||||
|
||||
FIND_PATH(JEMALLOC_INCLUDE_DIR
|
||||
|
@@ -1,94 +0,0 @@
|
||||
# - Find LLVM library
|
||||
# Find the native LLVM includes and library
|
||||
# This module defines
|
||||
# LLVM_INCLUDE_DIRS, where to find LLVM.h, Set when LLVM_INCLUDE_DIR is found.
|
||||
# LLVM_LIBRARIES, libraries to link against to use LLVM.
|
||||
# LLVM_ROOT_DIR, The base directory to search for LLVM.
|
||||
# This can also be an environment variable.
|
||||
# LLVM_FOUND, If false, do not try to use LLVM.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LLVM_LIBRARY, where to find the LLVM library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
if(LLVM_ROOT_DIR)
|
||||
if(DEFINED LLVM_VERSION)
|
||||
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION} HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
|
||||
endif()
|
||||
if(NOT LLVM_CONFIG)
|
||||
find_program(LLVM_CONFIG llvm-config HINTS ${LLVM_ROOT_DIR}/bin NO_CMAKE_PATH)
|
||||
endif()
|
||||
else()
|
||||
if(DEFINED LLVM_VERSION)
|
||||
message(running llvm-config-${LLVM_VERSION})
|
||||
find_program(LLVM_CONFIG llvm-config-${LLVM_VERSION})
|
||||
endif()
|
||||
if(NOT LLVM_CONFIG)
|
||||
find_program(LLVM_CONFIG llvm-config)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED LLVM_VERSION)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --version
|
||||
OUTPUT_VARIABLE LLVM_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_VERSION ${LLVM_VERSION} CACHE STRING "Version of LLVM to use")
|
||||
endif()
|
||||
if(NOT LLVM_ROOT_DIR)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --prefix
|
||||
OUTPUT_VARIABLE LLVM_ROOT_DIR
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_ROOT_DIR ${LLVM_ROOT_DIR} CACHE PATH "Path to the LLVM installation")
|
||||
endif()
|
||||
if(NOT LLVM_LIBPATH)
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libdir
|
||||
OUTPUT_VARIABLE LLVM_LIBPATH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(LLVM_LIBPATH ${LLVM_LIBPATH} CACHE PATH "Path to the LLVM library path")
|
||||
mark_as_advanced(LLVM_LIBPATH)
|
||||
endif()
|
||||
|
||||
if(LLVM_STATIC)
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVMAnalysis # first of a whole bunch of libs to get
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
else()
|
||||
find_library(LLVM_LIBRARY
|
||||
NAMES LLVM-${LLVM_VERSION}
|
||||
PATHS ${LLVM_LIBPATH})
|
||||
endif()
|
||||
|
||||
|
||||
if(LLVM_LIBRARY AND LLVM_ROOT_DIR AND LLVM_LIBPATH)
|
||||
if(LLVM_STATIC)
|
||||
# if static LLVM libraries were requested, use llvm-config to generate
|
||||
# the list of what libraries we need, and substitute that in the right
|
||||
# way for LLVM_LIBRARY.
|
||||
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
|
||||
OUTPUT_VARIABLE LLVM_LIBRARY
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
string(REPLACE " " ";" LLVM_LIBRARY "${LLVM_LIBRARY}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LLVM DEFAULT_MSG
|
||||
LLVM_LIBRARY)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LLVM_LIBRARY
|
||||
)
|
||||
|
@@ -1,68 +0,0 @@
|
||||
# - Find LZO library
|
||||
# Find the native LZO includes and library
|
||||
# This module defines
|
||||
# LZO_INCLUDE_DIRS, where to find lzo1x.h, Set when
|
||||
# LZO_INCLUDE_DIR is found.
|
||||
# LZO_LIBRARIES, libraries to link against to use LZO.
|
||||
# LZO_ROOT_DIR, The base directory to search for LZO.
|
||||
# This can also be an environment variable.
|
||||
# LZO_FOUND, If false, do not try to use LZO.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# LZO_LIBRARY, where to find the LZO library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If LZO_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT LZO_ROOT_DIR AND NOT $ENV{LZO_ROOT_DIR} STREQUAL "")
|
||||
SET(LZO_ROOT_DIR $ENV{LZO_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_lzo_SEARCH_DIRS
|
||||
${LZO_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(LZO_INCLUDE_DIR lzo/lzo1x.h
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(LZO_LIBRARY
|
||||
NAMES
|
||||
lzo2
|
||||
HINTS
|
||||
${_lzo_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set LZO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LZO DEFAULT_MSG
|
||||
LZO_LIBRARY LZO_INCLUDE_DIR)
|
||||
|
||||
IF(LZO_FOUND)
|
||||
SET(LZO_LIBRARIES ${LZO_LIBRARY})
|
||||
SET(LZO_INCLUDE_DIRS ${LZO_INCLUDE_DIR})
|
||||
ENDIF(LZO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
LZO_INCLUDE_DIR
|
||||
LZO_LIBRARY
|
||||
)
|
@@ -140,8 +140,3 @@ IF(OPENCOLLADA_FOUND)
|
||||
SET(OPENCOLLADA_LIBRARIES ${_opencollada_LIBRARIES})
|
||||
SET(OPENCOLLADA_INCLUDE_DIRS ${_opencollada_INCLUDES})
|
||||
ENDIF(OPENCOLLADA_FOUND)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencollada_LIBRARIES)
|
||||
UNSET(_opencollada_INCLUDES)
|
||||
|
@@ -63,12 +63,11 @@ FOREACH(COMPONENT ${_opencolorio_FIND_COMPONENTS})
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
IF(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
if(OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY)
|
||||
LIST(APPEND _opencolorio_LIBRARIES "${OPENCOLORIO_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDIF()
|
||||
endif()
|
||||
ENDFOREACH()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENCOLORIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -83,13 +82,5 @@ ENDIF(OPENCOLORIO_FOUND)
|
||||
MARK_AS_ADVANCED(
|
||||
OPENCOLORIO_INCLUDE_DIR
|
||||
OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_OPENCOLORIO_LIBRARY
|
||||
OPENCOLORIO_TINYXML_LIBRARY
|
||||
OPENCOLORIO_YAML-CPP_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_opencolorio_FIND_COMPONENTS)
|
||||
UNSET(_opencolorio_LIBRARIES)
|
||||
UNSET(_opencolorio_SEARCH_DIRS)
|
||||
|
@@ -34,9 +34,6 @@ IF(NOT OPENEXR_ROOT_DIR AND NOT $ENV{OPENEXR_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENEXR_ROOT_DIR $ENV{OPENEXR_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
# Old versions (before 2.0?) do not have any version string, just assuming this should be fine though.
|
||||
SET(_openexr_libs_ver_init "2.0")
|
||||
|
||||
SET(_openexr_FIND_COMPONENTS
|
||||
Half
|
||||
Iex
|
||||
@@ -51,7 +48,6 @@ SET(_openexr_SEARCH_DIRS
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/openexr
|
||||
)
|
||||
|
||||
FIND_PATH(OPENEXR_INCLUDE_DIR
|
||||
@@ -63,51 +59,13 @@ FIND_PATH(OPENEXR_INCLUDE_DIR
|
||||
include
|
||||
)
|
||||
|
||||
# If the headers were found, get the version from config file, if not already set.
|
||||
IF(OPENEXR_INCLUDE_DIR)
|
||||
IF(NOT OPENEXR_VERSION)
|
||||
|
||||
FIND_FILE(_openexr_CONFIG
|
||||
NAMES
|
||||
OpenEXRConfig.h
|
||||
PATHS
|
||||
"${OPENEXR_INCLUDE_DIR}"
|
||||
"${OPENEXR_INCLUDE_DIR}/OpenEXR"
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
|
||||
IF(_openexr_CONFIG)
|
||||
FILE(STRINGS "${_openexr_CONFIG}" OPENEXR_BUILD_SPECIFICATION
|
||||
REGEX "^[ \t]*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"[.0-9]+\".*$")
|
||||
ELSE()
|
||||
MESSAGE(WARNING "Could not find \"OpenEXRConfig.h\" in \"${OPENEXR_INCLUDE_DIR}\"")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENEXR_BUILD_SPECIFICATION)
|
||||
MESSAGE(STATUS "${OPENEXR_BUILD_SPECIFICATION}")
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OPENEXR_VERSION_STRING[ \t]+\"([.0-9]+)\".*"
|
||||
"\\1" _openexr_libs_ver_init ${OPENEXR_BUILD_SPECIFICATION})
|
||||
ELSE()
|
||||
MESSAGE(WARNING "Could not determine ILMBase library version, assuming ${_openexr_libs_ver_init}.")
|
||||
ENDIF()
|
||||
|
||||
UNSET(_openexr_CONFIG CACHE)
|
||||
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
SET("OPENEXR_VERSION" ${_openexr_libs_ver_init} CACHE STRING "Version of OpenEXR lib")
|
||||
UNSET(_openexr_libs_ver_init)
|
||||
|
||||
STRING(REGEX REPLACE "([0-9]+)[.]([0-9]+).*" "\\1_\\2" _openexr_libs_ver ${OPENEXR_VERSION})
|
||||
|
||||
SET(_openexr_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENEXR_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}-${_openexr_libs_ver} ${COMPONENT}
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_openexr_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
@@ -116,8 +74,6 @@ FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
LIST(APPEND _openexr_LIBRARIES "${OPENEXR_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(_openexr_libs_ver)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENEXR_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -130,17 +86,8 @@ IF(OPENEXR_FOUND)
|
||||
SET(OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR} ${OPENEXR_INCLUDE_DIR}/OpenEXR)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENEXR_INCLUDE_DIR
|
||||
OPENEXR_VERSION
|
||||
)
|
||||
MARK_AS_ADVANCED(OPENEXR_INCLUDE_DIR)
|
||||
FOREACH(COMPONENT ${_openexr_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENEXR_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
||||
|
||||
UNSET(COMPONENT)
|
||||
UNSET(UPPERCOMPONENT)
|
||||
UNSET(_openexr_FIND_COMPONENTS)
|
||||
UNSET(_openexr_LIBRARIES)
|
||||
UNSET(_openexr_SEARCH_DIRS)
|
||||
|
@@ -1,78 +0,0 @@
|
||||
# - Try to find OpenGLES
|
||||
# Once done this will define
|
||||
#
|
||||
# OPENGLES_FOUND - system has OpenGLES and EGL
|
||||
# OPENGL_EGL_FOUND - system has EGL
|
||||
# OPENGLES_INCLUDE_DIR - the GLES include directory
|
||||
# OPENGLES_LIBRARY - the GLES library
|
||||
# OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
|
||||
# OPENGLES_EGL_LIBRARY - the EGL library
|
||||
# OPENGLES_LIBRARIES - all libraries needed for OpenGLES
|
||||
# OPENGLES_INCLUDES - all includes needed for OpenGLES
|
||||
|
||||
# If OPENGLES_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opengles_SEARCH_DIRS
|
||||
${OPENGLES_ROOT_DIR}
|
||||
/usr/local
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_INCLUDE_DIR
|
||||
NAMES
|
||||
GLES2/gl2.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_LIBRARY
|
||||
NAMES
|
||||
GLESv2
|
||||
PATHS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
|
||||
NAMES
|
||||
EGL/egl.h
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
)
|
||||
|
||||
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
|
||||
NAMES
|
||||
EGL
|
||||
HINTS
|
||||
${_opengles_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGL_EGL_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGL_EGL_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
|
||||
OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
|
||||
SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
|
||||
${OPENGLES_EGL_LIBRARY})
|
||||
SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
|
||||
SET(OPENGLES_FOUND "YES")
|
||||
ELSE()
|
||||
SET(OPENGLES_FOUND "NO")
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENGLES_EGL_INCLUDE_DIR
|
||||
OPENGLES_EGL_LIBRARY
|
||||
OPENGLES_LIBRARY
|
||||
OPENGLES_INCLUDE_DIR
|
||||
)
|
||||
|
||||
UNSET(_opengles_SEARCH_DIRS)
|
@@ -7,8 +7,6 @@
|
||||
# OPENIMAGEIO_ROOT_DIR, The base directory to search for OpenImageIO.
|
||||
# This can also be an environment variable.
|
||||
# OPENIMAGEIO_FOUND, If false, do not try to use OpenImageIO.
|
||||
# OPENIMAGEIO_PUGIXML_FOUND, Indicates whether OIIO has biltin PuguXML parser.
|
||||
# OPENIMAGEIO_IDIFF, full path to idiff application if found.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENIMAGEIO_LIBRARY, where to find the OpenImageIO library.
|
||||
@@ -56,15 +54,6 @@ FIND_LIBRARY(OPENIMAGEIO_LIBRARY
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
FIND_FILE(OPENIMAGEIO_IDIFF
|
||||
NAMES
|
||||
idiff
|
||||
HINTS
|
||||
${OPENIMAGEIO_ROOT_DIR}
|
||||
PATH_SUFFIXES
|
||||
bin
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENIMAGEIO_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
@@ -74,17 +63,9 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenImageIO DEFAULT_MSG
|
||||
IF(OPENIMAGEIO_FOUND)
|
||||
SET(OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY})
|
||||
SET(OPENIMAGEIO_INCLUDE_DIRS ${OPENIMAGEIO_INCLUDE_DIR})
|
||||
IF(EXISTS ${OPENIMAGEIO_INCLUDE_DIR}/OpenImageIO/pugixml.hpp)
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND TRUE)
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(OPENIMAGEIO_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
ENDIF(OPENIMAGEIO_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENIMAGEIO_INCLUDE_DIR
|
||||
OPENIMAGEIO_LIBRARY
|
||||
OPENIMAGEIO_IDIFF
|
||||
)
|
||||
|
||||
UNSET(_openimageio_SEARCH_DIRS)
|
||||
|
@@ -69,5 +69,3 @@ MARK_AS_ADVANCED(
|
||||
OPENJPEG_INCLUDE_DIR
|
||||
OPENJPEG_LIBRARY
|
||||
)
|
||||
|
||||
UNSET(_openjpeg_SEARCH_DIRS)
|
||||
|
@@ -1,98 +0,0 @@
|
||||
# - Find OpenShadingLanguage library
|
||||
# Find the native OpenShadingLanguage includes and library
|
||||
# This module defines
|
||||
# OSL_INCLUDE_DIRS, where to find OSL headers, Set when
|
||||
# OSL_INCLUDE_DIR is found.
|
||||
# OSL_LIBRARIES, libraries to link against to use OSL.
|
||||
# OSL_ROOT_DIR, the base directory to search for OSL.
|
||||
# This can also be an environment variable.
|
||||
# OSL_COMPILER, full path to OSL script compiler.
|
||||
# OSL_FOUND, if false, do not try to use OSL.
|
||||
# OSL_LIBRARY_VERSION_MAJOR, OSL_LIBRARY_VERSION_MINOR, the major
|
||||
# and minor versions of OSL library if found.
|
||||
#
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OSL_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OSL_ROOT_DIR AND NOT $ENV{OSL_ROOT_DIR} STREQUAL "")
|
||||
SET(OSL_ROOT_DIR $ENV{OSL_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_osl_FIND_COMPONENTS
|
||||
oslcomp
|
||||
oslexec
|
||||
oslquery
|
||||
)
|
||||
|
||||
SET(_osl_SEARCH_DIRS
|
||||
${OSL_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/osl
|
||||
)
|
||||
|
||||
FIND_PATH(OSL_INCLUDE_DIR
|
||||
NAMES
|
||||
OSL/oslversion.h
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_osl_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OSL_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _osl_LIBRARIES "${OSL_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
FIND_PROGRAM(OSL_COMPILER oslc
|
||||
HINTS ${_osl_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OSL_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OSL DEFAULT_MSG _osl_LIBRARIES OSL_INCLUDE_DIR OSL_COMPILER)
|
||||
|
||||
IF(OSL_FOUND)
|
||||
SET(OSL_LIBRARIES ${_osl_LIBRARIES})
|
||||
SET(OSL_INCLUDE_DIRS ${OSL_INCLUDE_DIR})
|
||||
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MAJOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+[0-9]+.*$")
|
||||
FILE(STRINGS "${OSL_INCLUDE_DIR}/OSL/oslversion.h" OSL_LIBRARY_VERSION_MINOR
|
||||
REGEX "^[ \t]*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+[0-9]+.*$")
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MAJOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MAJOR ${OSL_LIBRARY_VERSION_MAJOR})
|
||||
STRING(REGEX REPLACE ".*#define[ \t]+OSL_LIBRARY_VERSION_MINOR[ \t]+([.0-9]+).*"
|
||||
"\\1" OSL_LIBRARY_VERSION_MINOR ${OSL_LIBRARY_VERSION_MINOR})
|
||||
ENDIF(OSL_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OSL_INCLUDE_DIR
|
||||
)
|
||||
FOREACH(COMPONENT ${_osl_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OSL_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
@@ -1,111 +0,0 @@
|
||||
# - Find OpenSubdiv library
|
||||
# Find the native OpenSubdiv includes and library
|
||||
# This module defines
|
||||
# OPENSUBDIV_INCLUDE_DIRS, where to find OpenSubdiv headers, Set when
|
||||
# OPENSUBDIV_INCLUDE_DIR is found.
|
||||
# OPENSUBDIV_LIBRARIES, libraries to link against to use OpenSubdiv.
|
||||
# OPENSUBDIV_ROOT_DIR, the base directory to search for OpenSubdiv.
|
||||
# This can also be an environment variable.
|
||||
# OPENSUBDIV_FOUND, if false, do not try to use OpenSubdiv.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# OPENSUBDIV_LIBRARY, where to find the OpenSubdiv library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2013 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If OPENSUBDIV_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT OPENSUBDIV_ROOT_DIR AND NOT $ENV{OPENSUBDIV_ROOT_DIR} STREQUAL "")
|
||||
SET(OPENSUBDIV_ROOT_DIR $ENV{OPENSUBDIV_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_opensubdiv_FIND_COMPONENTS
|
||||
osdGPU
|
||||
osdCPU
|
||||
)
|
||||
|
||||
SET(_opensubdiv_SEARCH_DIRS
|
||||
${OPENSUBDIV_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/opensubdiv
|
||||
)
|
||||
|
||||
FIND_PATH(OPENSUBDIV_INCLUDE_DIR
|
||||
NAMES
|
||||
opensubdiv/osd/mesh.h
|
||||
HINTS
|
||||
${_opensubdiv_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
SET(_opensubdiv_LIBRARIES)
|
||||
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
|
||||
FIND_LIBRARY(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY
|
||||
NAMES
|
||||
${COMPONENT}
|
||||
HINTS
|
||||
${_opensubdiv_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
LIST(APPEND _opensubdiv_LIBRARIES "${OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY}")
|
||||
ENDFOREACH()
|
||||
|
||||
MACRO(OPENSUBDIV_CHECK_CONTROLLER
|
||||
controller_include_file
|
||||
variable_name)
|
||||
IF(EXISTS "${OPENSUBDIV_INCLUDE_DIR}/opensubdiv/osd/${controller_include_file}")
|
||||
SET(${variable_name} TRUE)
|
||||
ELSE()
|
||||
SET(${variable_name} FALSE)
|
||||
ENDIF()
|
||||
ENDMACRO()
|
||||
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set OPENSUBDIV_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenSubdiv DEFAULT_MSG
|
||||
_opensubdiv_LIBRARIES OPENSUBDIV_INCLUDE_DIR)
|
||||
|
||||
IF(OPENSUBDIV_FOUND)
|
||||
SET(OPENSUBDIV_LIBRARIES ${_opensubdiv_LIBRARIES})
|
||||
SET(OPENSUBDIV_INCLUDE_DIRS ${OPENSUBDIV_INCLUDE_DIR})
|
||||
|
||||
# Find available compute controllers.
|
||||
|
||||
FIND_PACKAGE(OpenMP)
|
||||
IF(OPENMP_FOUND)
|
||||
SET(OPENSUBDIV_HAS_OPENMP TRUE)
|
||||
ELSE()
|
||||
SET(OPENSUBDIV_HAS_OPENMP FALSE)
|
||||
ENDIF()
|
||||
|
||||
OPENSUBDIV_CHECK_CONTROLLER("tbbEvaluator.h" OPENSUBDIV_HAS_TBB)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("clEvaluator.h" OPENSUBDIV_HAS_OPENCL)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("cudaEvaluator.h" OPENSUBDIV_HAS_CUDA)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("glXFBEvaluator.h" OPENSUBDIV_HAS_GLSL_TRANSFORM_FEEDBACK)
|
||||
OPENSUBDIV_CHECK_CONTROLLER("glComputeEvaluator.h" OPENSUBDIV_HAS_GLSL_COMPUTE)
|
||||
ENDIF(OPENSUBDIV_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
OPENSUBDIV_INCLUDE_DIR
|
||||
)
|
||||
FOREACH(COMPONENT ${_opensubdiv_FIND_COMPONENTS})
|
||||
STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
|
||||
MARK_AS_ADVANCED(OPENSUBDIV_${UPPERCOMPONENT}_LIBRARY)
|
||||
ENDFOREACH()
|
@@ -40,6 +40,7 @@ FIND_PATH(PCRE_INCLUDE_DIR pcre.h
|
||||
${_pcre_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PCRE_LIBRARY
|
||||
|
@@ -1,73 +0,0 @@
|
||||
# - Find PugiXML library
|
||||
# Find the native PugiXML includes and library
|
||||
# This module defines
|
||||
# PUGIXML_INCLUDE_DIRS, where to find pugixml.hpp, Set when
|
||||
# PugiXML is found.
|
||||
# PUGIXML_LIBRARIES, libraries to link against to use PugiiXML.
|
||||
# PUGIXML_ROOT_DIR, The base directory to search for PugiXML.
|
||||
# This can also be an environment variable.
|
||||
# PUGIXML_FOUND, If false, do not try to use PugiXML.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# PUGIXML_LIBRARY, where to find the PugiXML library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If PUGIXML_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT PUGIXML_ROOT_DIR AND NOT $ENV{PUGIXML_ROOT_DIR} STREQUAL "")
|
||||
SET(PUGIXML_ROOT_DIR $ENV{PUGIXML_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_pugixml_SEARCH_DIRS
|
||||
${PUGIXML_ROOT_DIR}
|
||||
/usr/local
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
/opt/lib/oiio
|
||||
)
|
||||
|
||||
FIND_PATH(PUGIXML_INCLUDE_DIR
|
||||
NAMES
|
||||
pugixml.hpp
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(PUGIXML_LIBRARY
|
||||
NAMES
|
||||
pugixml
|
||||
HINTS
|
||||
${_pugixml_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set PUGIXML_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PUGIXML DEFAULT_MSG
|
||||
PUGIXML_LIBRARY PUGIXML_INCLUDE_DIR)
|
||||
|
||||
IF(PUGIXML_FOUND)
|
||||
SET(PUGIXML_LIBRARIES ${PUGIXML_LIBRARY})
|
||||
SET(PUGIXML_INCLUDE_DIRS ${PUGIXML_INCLUDE_DIR})
|
||||
ELSE()
|
||||
SET(PUGIXML_PUGIXML_FOUND FALSE)
|
||||
ENDIF()
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PUGIXML_INCLUDE_DIR
|
||||
PUGIXML_LIBRARY
|
||||
)
|
@@ -14,7 +14,6 @@
|
||||
# PYTHON_INCLUDE_CONFIG_DIRS
|
||||
# PYTHON_LIBRARIES
|
||||
# PYTHON_LIBPATH, Used for installation
|
||||
# PYTHON_SITE_PACKAGES, Used for installation (as a Python module)
|
||||
# PYTHON_LINKFLAGS
|
||||
# PYTHON_ROOT_DIR, The base directory to search for Python.
|
||||
# This can also be an environment variable.
|
||||
@@ -38,7 +37,7 @@ IF(NOT PYTHON_ROOT_DIR AND NOT $ENV{PYTHON_ROOT_DIR} STREQUAL "")
|
||||
SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(PYTHON_VERSION 3.4 CACHE STRING "Python Version (major and minor only)")
|
||||
SET(PYTHON_VERSION 3.3 CACHE STRING "Python Version (major and minor only)")
|
||||
MARK_AS_ADVANCED(PYTHON_VERSION)
|
||||
|
||||
|
||||
@@ -66,24 +65,23 @@ IF(DEFINED PYTHON_LIBPATH)
|
||||
SET(_IS_LIB_PATH_DEF ON)
|
||||
ENDIF()
|
||||
|
||||
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
||||
SET(_python_SEARCH_DIRS
|
||||
${PYTHON_ROOT_DIR}
|
||||
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/lib/python-${PYTHON_VERSION}"
|
||||
)
|
||||
|
||||
# only search for the dirs if we havn't already
|
||||
IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_LIB_PATH_DEF))
|
||||
|
||||
SET(_python_ABI_FLAGS
|
||||
"m;mu;u; " # release
|
||||
"dm;dmu;du;d" # debug
|
||||
"md;mud;ud;d" # debug
|
||||
)
|
||||
|
||||
STRING(REPLACE "." "" _PYTHON_VERSION_NO_DOTS ${PYTHON_VERSION})
|
||||
|
||||
SET(_python_SEARCH_DIRS
|
||||
${PYTHON_ROOT_DIR}
|
||||
"$ENV{HOME}/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/py${_PYTHON_VERSION_NO_DOTS}"
|
||||
"/opt/lib/python-${PYTHON_VERSION}"
|
||||
)
|
||||
|
||||
FOREACH(_CURRENT_ABI_FLAGS ${_python_ABI_FLAGS})
|
||||
#IF(CMAKE_BUILD_TYPE STREQUAL Debug)
|
||||
@@ -148,7 +146,6 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
|
||||
ENDIF()
|
||||
|
||||
IF(PYTHON_LIBRARY AND PYTHON_LIBPATH AND PYTHON_INCLUDE_DIR AND PYTHON_INCLUDE_CONFIG_DIR)
|
||||
SET(_PYTHON_ABI_FLAGS "${_CURRENT_ABI_FLAGS}")
|
||||
break()
|
||||
ELSE()
|
||||
# ensure we dont find values from 2 different ABI versions
|
||||
@@ -171,6 +168,7 @@ IF((NOT _IS_INC_DEF) OR (NOT _IS_INC_CONF_DEF) OR (NOT _IS_LIB_DEF) OR (NOT _IS_
|
||||
UNSET(_CURRENT_PATH)
|
||||
|
||||
UNSET(_python_ABI_FLAGS)
|
||||
UNSET(_python_SEARCH_DIRS)
|
||||
ENDIF()
|
||||
|
||||
UNSET(_IS_INC_DEF)
|
||||
@@ -189,41 +187,17 @@ IF(PYTHONLIBSUNIX_FOUND)
|
||||
SET(PYTHON_INCLUDE_DIRS ${PYTHON_INCLUDE_DIR} ${PYTHON_INCLUDE_CONFIG_DIR})
|
||||
SET(PYTHON_LIBRARIES ${PYTHON_LIBRARY})
|
||||
|
||||
FIND_FILE(PYTHON_SITE_PACKAGES
|
||||
NAMES
|
||||
# debian specific
|
||||
dist-packages
|
||||
site-packages
|
||||
HINTS
|
||||
${PYTHON_LIBPATH}/python${PYTHON_VERSION}
|
||||
)
|
||||
|
||||
# we need this for installation
|
||||
# XXX No more valid with debian-like py3.4 packages...
|
||||
# XXX No more valid with debian-like py3.3 packages...
|
||||
# GET_FILENAME_COMPONENT(PYTHON_LIBPATH ${PYTHON_LIBRARY} PATH)
|
||||
|
||||
# not required for build, just used when bundling Python.
|
||||
FIND_PROGRAM(
|
||||
PYTHON_EXECUTABLE
|
||||
NAMES
|
||||
"python${PYTHON_VERSION}${_PYTHON_ABI_FLAGS}"
|
||||
"python${PYTHON_VERSION}"
|
||||
"python"
|
||||
HINTS
|
||||
${_python_SEARCH_DIRS}
|
||||
PATH_SUFFIXES bin
|
||||
)
|
||||
# not used
|
||||
# SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
|
||||
ENDIF()
|
||||
|
||||
UNSET(_PYTHON_VERSION_NO_DOTS)
|
||||
UNSET(_PYTHON_ABI_FLAGS)
|
||||
UNSET(_python_SEARCH_DIRS)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
PYTHON_INCLUDE_DIR
|
||||
PYTHON_INCLUDE_CONFIG_DIR
|
||||
PYTHON_LIBRARY
|
||||
PYTHON_LIBPATH
|
||||
PYTHON_SITE_PACKAGES
|
||||
PYTHON_EXECUTABLE
|
||||
)
|
||||
|
@@ -1,72 +0,0 @@
|
||||
# - Find SDL library
|
||||
# Find the native SDL includes and library
|
||||
# This module defines
|
||||
# SDL2_INCLUDE_DIRS, where to find SDL.h, Set when SDL2_INCLUDE_DIR is found.
|
||||
# SDL2_LIBRARIES, libraries to link against to use SDL.
|
||||
# SDL2_ROOT_DIR, The base directory to search for SDL.
|
||||
# This can also be an environment variable.
|
||||
# SDL2_FOUND, If false, do not try to use SDL.
|
||||
#
|
||||
# also defined, but not for general use are
|
||||
# SDL2_LIBRARY, where to find the SDL library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2015 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
|
||||
# If SDL2_ROOT_DIR was defined in the environment, use it.
|
||||
IF(NOT SDL2_ROOT_DIR AND NOT $ENV{SDL2_ROOT_DIR} STREQUAL "")
|
||||
SET(SDL2_ROOT_DIR $ENV{SDL2_ROOT_DIR})
|
||||
ENDIF()
|
||||
|
||||
SET(_sdl2_SEARCH_DIRS
|
||||
${SDL2_ROOT_DIR}
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
/usr/local
|
||||
/usr
|
||||
/sw # Fink
|
||||
/opt/local # DarwinPorts
|
||||
/opt/csw # Blastwave
|
||||
)
|
||||
|
||||
FIND_PATH(SDL2_INCLUDE_DIR
|
||||
NAMES
|
||||
SDL.h
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
include/SDL2 include
|
||||
)
|
||||
|
||||
FIND_LIBRARY(SDL2_LIBRARY
|
||||
NAMES
|
||||
SDL2
|
||||
HINTS
|
||||
${_sdl2_SEARCH_DIRS}
|
||||
PATH_SUFFIXES
|
||||
lib64 lib
|
||||
)
|
||||
|
||||
# handle the QUIETLY and REQUIRED arguments and set SDL2_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
INCLUDE(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 DEFAULT_MSG
|
||||
SDL2_LIBRARY SDL2_INCLUDE_DIR)
|
||||
|
||||
IF(SDL2_FOUND)
|
||||
SET(SDL2_LIBRARIES ${SDL2_LIBRARY})
|
||||
SET(SDL2_INCLUDE_DIRS ${SDL2_INCLUDE_DIR})
|
||||
ENDIF(SDL2_FOUND)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
SDL2_INCLUDE_DIR
|
||||
SDL2_LIBRARY
|
||||
)
|
@@ -1,59 +0,0 @@
|
||||
#=============================================================================
|
||||
# Copyright 2014 Blender Foundation.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#
|
||||
# Inspired on the Testing.cmake from Libmv
|
||||
#
|
||||
#=============================================================================
|
||||
|
||||
macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
|
||||
if(WITH_GTESTS)
|
||||
get_property(_current_include_directories
|
||||
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
PROPERTY INCLUDE_DIRECTORIES)
|
||||
set(TEST_INC
|
||||
${_current_include_directories}
|
||||
${CMAKE_SOURCE_DIR}/tests/gtests
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/glog/src
|
||||
${CMAKE_SOURCE_DIR}/extern/libmv/third_party/gflags
|
||||
${CMAKE_SOURCE_DIR}/extern/gtest/include
|
||||
)
|
||||
unset(_current_include_directories)
|
||||
|
||||
add_executable(${NAME}_test ${SRC})
|
||||
target_link_libraries(${NAME}_test
|
||||
${EXTRA_LIBS}
|
||||
bf_testing_main
|
||||
bf_intern_guardedalloc
|
||||
extern_gtest
|
||||
# needed for glog
|
||||
${PTHREADS_LIBRARIES}
|
||||
extern_glog)
|
||||
set_target_properties(${NAME}_test PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE "${TESTS_OUTPUT_DIR}"
|
||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG "${TESTS_OUTPUT_DIR}"
|
||||
INCLUDE_DIRECTORIES "${TEST_INC}")
|
||||
if(${DO_ADD_TEST})
|
||||
add_test(${NAME}_test ${TESTS_OUTPUT_DIR}/${NAME}_test)
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_SRC_GTEST NAME SRC EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${SRC}" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "TRUE")
|
||||
endmacro()
|
||||
|
||||
macro(BLENDER_TEST_PERFORMANCE NAME EXTRA_LIBS)
|
||||
BLENDER_SRC_GTEST_EX("${NAME}" "${NAME}_test.cc" "${EXTRA_LIBS}" "FALSE")
|
||||
endmacro()
|
@@ -1,138 +1,21 @@
|
||||
# This is called by cmake as an extermal process from
|
||||
# ./source/creator/CMakeLists.txt to write ./source/creator/buildinfo.h
|
||||
|
||||
# The FindSubversion.cmake module is part of the standard distribution
|
||||
include(FindSubversion)
|
||||
|
||||
# Extract working copy information for SOURCE_DIR into MY_XXX variables
|
||||
# with a default in case anything fails, for example when using git-svn
|
||||
set(MY_WC_HASH "unknown")
|
||||
set(MY_WC_BRANCH "unknown")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
|
||||
# Guess if this is a git working copy and then look up the revision
|
||||
if(EXISTS ${SOURCE_DIR}/.git)
|
||||
# The FindGit.cmake module is part of the standard distribution
|
||||
include(FindGit)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
|
||||
execute_process(COMMAND git rev-parse --abbrev-ref HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_BRANCH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(MY_WC_BRANCH STREQUAL "HEAD")
|
||||
# Detached HEAD, check whether commit hash is reachable
|
||||
# in the master branch
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git branch --list master --contains ${MY_WC_HASH}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_contains_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
STRING(REGEX REPLACE "^[ \t]+" "" _git_contains_check "${_git_contains_check}")
|
||||
if(_git_contains_check STREQUAL "master")
|
||||
set(MY_WC_BRANCH "master")
|
||||
else()
|
||||
execute_process(COMMAND git show-ref --tags -d
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_tag_hashes
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git rev-parse HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_head_hash
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(_git_tag_hashes MATCHES "${_git_head_hash}")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_tag_hashes)
|
||||
unset(_git_head_hashs)
|
||||
endif()
|
||||
|
||||
|
||||
unset(_git_contains_check)
|
||||
else()
|
||||
execute_process(COMMAND git log HEAD..@{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_below_check
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_below_check STREQUAL "")
|
||||
# If there're commits between HEAD and upstream this means
|
||||
# that we're reset-ed to older revision. Use it's hash then.
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
else()
|
||||
execute_process(COMMAND git rev-parse --short @{u}
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
|
||||
if(MY_WC_HASH STREQUAL "")
|
||||
# Local branch, not set to upstream.
|
||||
# Well, let's use HEAD for now
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(MY_WC_BRANCH MATCHES "^blender-v")
|
||||
set(MY_WC_BRANCH "master")
|
||||
endif()
|
||||
|
||||
unset(_git_below_check)
|
||||
endif()
|
||||
|
||||
execute_process(COMMAND git log -1 --format=%ct
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_COMMIT_TIMESTAMP
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
# May fail in rare cases
|
||||
if(MY_WC_COMMIT_TIMESTAMP STREQUAL "")
|
||||
set(MY_WC_COMMIT_TIMESTAMP 0)
|
||||
endif()
|
||||
|
||||
# Update GIT index before getting dirty files
|
||||
execute_process(COMMAND git update-index -q --refresh
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
execute_process(COMMAND git diff-index --name-only HEAD --
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_changed_files
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
if(NOT _git_changed_files STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
else()
|
||||
# Unpushed commits are also considered local modifications
|
||||
execute_process(COMMAND git log @{u}..
|
||||
WORKING_DIRECTORY ${SOURCE_DIR}
|
||||
OUTPUT_VARIABLE _git_unpushed_log
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
if(NOT _git_unpushed_log STREQUAL "")
|
||||
set(MY_WC_BRANCH "${MY_WC_BRANCH} (modified)")
|
||||
endif()
|
||||
unset(_git_unpushed_log)
|
||||
endif()
|
||||
|
||||
unset(_git_changed_files)
|
||||
# with a default in case anything fails, for examble when using git-svn
|
||||
set(MY_WC_REVISION "unknown")
|
||||
# Guess if this is a SVN working copy and then look up the revision
|
||||
if(EXISTS ${SOURCE_DIR}/.svn/)
|
||||
if(Subversion_FOUND)
|
||||
Subversion_WC_INFO(${SOURCE_DIR} MY)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# BUILD_PLATFORM and BUILD_PLATFORM are taken from CMake
|
||||
# but BUILD_DATE and BUILD_TIME are platform dependent
|
||||
# but BUILD_DATE and BUILD_TIME are plataform dependant
|
||||
if(UNIX)
|
||||
execute_process(COMMAND date "+%Y-%m-%d" OUTPUT_VARIABLE BUILD_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND date "+%H:%M:%S" OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
@@ -142,23 +25,13 @@ if(WIN32)
|
||||
execute_process(COMMAND cmd /c time /t OUTPUT_VARIABLE BUILD_TIME OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
endif()
|
||||
|
||||
# Write a file with the BUILD_HASH define
|
||||
# Write a file with the SVNVERSION define
|
||||
file(WRITE buildinfo.h.txt
|
||||
"#define BUILD_HASH \"${MY_WC_HASH}\"\n"
|
||||
"#define BUILD_COMMIT_TIMESTAMP ${MY_WC_COMMIT_TIMESTAMP}\n"
|
||||
"#define BUILD_BRANCH \"${MY_WC_BRANCH}\"\n"
|
||||
"#define BUILD_REV \"${MY_WC_REVISION}\"\n"
|
||||
"#define BUILD_DATE \"${BUILD_DATE}\"\n"
|
||||
"#define BUILD_TIME \"${BUILD_TIME}\"\n"
|
||||
)
|
||||
|
||||
# cleanup
|
||||
unset(MY_WC_HASH)
|
||||
unset(MY_WC_COMMIT_TIMESTAMP)
|
||||
unset(MY_WC_BRANCH)
|
||||
unset(BUILD_DATE)
|
||||
unset(BUILD_TIME)
|
||||
|
||||
|
||||
# Copy the file to the final header only if the version changes
|
||||
# and avoid needless rebuilds
|
||||
# TODO: verify this comment is true, as BUILD_TIME probably changes
|
||||
|
@@ -41,7 +41,7 @@ defs_precalc = {
|
||||
|
||||
"glColor3dv": {0: 3},
|
||||
"glColor4dv": {0: 4},
|
||||
|
||||
|
||||
"glVertex2fv": {0: 2},
|
||||
"glVertex3fv": {0: 3},
|
||||
"glVertex4fv": {0: 4},
|
||||
@@ -50,27 +50,27 @@ defs_precalc = {
|
||||
"glEvalCoord1dv": {0: 1},
|
||||
"glEvalCoord2fv": {0: 2},
|
||||
"glEvalCoord2dv": {0: 2},
|
||||
|
||||
|
||||
"glRasterPos2dv": {0: 2},
|
||||
"glRasterPos3dv": {0: 3},
|
||||
"glRasterPos4dv": {0: 4},
|
||||
|
||||
|
||||
"glRasterPos2fv": {0: 2},
|
||||
"glRasterPos3fv": {0: 3},
|
||||
"glRasterPos4fv": {0: 4},
|
||||
|
||||
|
||||
"glRasterPos2sv": {0: 2},
|
||||
"glRasterPos3sv": {0: 3},
|
||||
"glRasterPos4sv": {0: 4},
|
||||
|
||||
|
||||
"glTexCoord2fv": {0: 2},
|
||||
"glTexCoord3fv": {0: 3},
|
||||
"glTexCoord4fv": {0: 4},
|
||||
|
||||
|
||||
"glTexCoord2dv": {0: 2},
|
||||
"glTexCoord3dv": {0: 3},
|
||||
"glTexCoord4dv": {0: 4},
|
||||
|
||||
|
||||
"glNormal3fv": {0: 3},
|
||||
"glNormal3dv": {0: 3},
|
||||
"glNormal3bv": {0: 3},
|
||||
@@ -84,17 +84,17 @@ import sys
|
||||
|
||||
if 0:
|
||||
# Examples with LLVM as the root dir: '/dsk/src/llvm'
|
||||
|
||||
|
||||
# path containing 'clang/__init__.py'
|
||||
CLANG_BIND_DIR = "/dsk/src/llvm/tools/clang/bindings/python"
|
||||
|
||||
|
||||
# path containing libclang.so
|
||||
CLANG_LIB_DIR = "/opt/llvm/lib"
|
||||
else:
|
||||
import os
|
||||
CLANG_BIND_DIR = os.environ.get("CLANG_BIND_DIR")
|
||||
CLANG_LIB_DIR = os.environ.get("CLANG_LIB_DIR")
|
||||
|
||||
|
||||
if CLANG_BIND_DIR is None:
|
||||
print("$CLANG_BIND_DIR python binding dir not set")
|
||||
if CLANG_LIB_DIR is None:
|
||||
@@ -117,7 +117,6 @@ args = sys.argv[2:]
|
||||
|
||||
tu = index.parse(sys.argv[1], args)
|
||||
# print('Translation unit: %s' % tu.spelling)
|
||||
filepath = tu.spelling
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -128,7 +127,7 @@ def function_parm_wash_tokens(parm):
|
||||
CursorKind.VAR_DECL, # XXX, double check this
|
||||
CursorKind.FIELD_DECL,
|
||||
)
|
||||
|
||||
|
||||
"""
|
||||
Return tolens without trailing commads and 'const'
|
||||
"""
|
||||
@@ -136,14 +135,14 @@ def function_parm_wash_tokens(parm):
|
||||
tokens = [t for t in parm.get_tokens()]
|
||||
if not tokens:
|
||||
return tokens
|
||||
|
||||
# if tokens[-1].kind == To
|
||||
|
||||
#if tokens[-1].kind == To
|
||||
# remove trailing char
|
||||
if tokens[-1].kind == TokenKind.PUNCTUATION:
|
||||
if tokens[-1].spelling in (",", ")", ";"):
|
||||
tokens.pop()
|
||||
# else:
|
||||
# print(tokens[-1].spelling)
|
||||
#else:
|
||||
# print(tokens[-1].spelling)
|
||||
|
||||
t_new = []
|
||||
for t in tokens:
|
||||
@@ -157,17 +156,17 @@ def function_parm_wash_tokens(parm):
|
||||
ok = False # __restrict
|
||||
elif t_kind in (TokenKind.COMMENT, ):
|
||||
ok = False
|
||||
|
||||
|
||||
# Use these
|
||||
elif t_kind in (TokenKind.LITERAL,
|
||||
TokenKind.PUNCTUATION,
|
||||
TokenKind.IDENTIFIER):
|
||||
# use but ignore
|
||||
pass
|
||||
|
||||
|
||||
else:
|
||||
print("Unknown!", t_kind, t_spelling)
|
||||
|
||||
|
||||
# if its OK we will add
|
||||
if ok:
|
||||
t_new.append(t)
|
||||
@@ -176,9 +175,9 @@ def function_parm_wash_tokens(parm):
|
||||
|
||||
def parm_size(node_child):
|
||||
tokens = function_parm_wash_tokens(node_child)
|
||||
|
||||
|
||||
# print(" ".join([t.spelling for t in tokens]))
|
||||
|
||||
|
||||
# NOT PERFECT CODE, EXTRACT SIZE FROM TOKENS
|
||||
if len(tokens) >= 3: # foo [ 1 ]
|
||||
if ((tokens[-3].kind == TokenKind.PUNCTUATION and tokens[-3].spelling == "[") and
|
||||
@@ -201,12 +200,14 @@ def function_get_arg_sizes(node):
|
||||
for i, node_child in enumerate(node_parms):
|
||||
|
||||
# print(node_child.kind, node_child.spelling)
|
||||
# print(node_child.type.kind, node_child.spelling)
|
||||
if node_child.type.kind == TypeKind.CONSTANTARRAY:
|
||||
#print(node_child.type.kind, node_child.spelling) # TypeKind.POINTER
|
||||
|
||||
if node_child.type.kind == TypeKind.POINTER:
|
||||
pointee = node_child.type.get_pointee()
|
||||
size = parm_size(node_child)
|
||||
if size != -1:
|
||||
arg_sizes[i] = size
|
||||
if pointee.is_pod():
|
||||
size = parm_size(node_child)
|
||||
if size != -1:
|
||||
arg_sizes[i] = size
|
||||
|
||||
return arg_sizes
|
||||
|
||||
@@ -228,14 +229,14 @@ def lookup_function_size_def(func_id):
|
||||
|
||||
|
||||
def file_check_arg_sizes(tu):
|
||||
|
||||
|
||||
# main checking function
|
||||
def validate_arg_size(node):
|
||||
"""
|
||||
Loop over args and validate sizes for args we KNOW the size of.
|
||||
"""
|
||||
assert node.kind == CursorKind.CALL_EXPR
|
||||
|
||||
|
||||
if 0:
|
||||
print("---",
|
||||
" <~> ".join(
|
||||
@@ -243,15 +244,15 @@ def file_check_arg_sizes(tu):
|
||||
for C in node.get_children()]
|
||||
))
|
||||
# print(node.location)
|
||||
|
||||
|
||||
# first child is the function call, skip that.
|
||||
children = list(node.get_children())
|
||||
|
||||
if not children:
|
||||
return # XXX, look into this, happens on C++
|
||||
|
||||
|
||||
func = children[0]
|
||||
|
||||
|
||||
# get the func declaration!
|
||||
# works but we can better scan for functions ahead of time.
|
||||
if 0:
|
||||
@@ -263,42 +264,42 @@ def file_check_arg_sizes(tu):
|
||||
print("AA", " ".join([t.spelling for t in node.get_tokens()]))
|
||||
else:
|
||||
args_size_definition = () # dummy
|
||||
|
||||
|
||||
# get the key
|
||||
tok = list(func.get_tokens())
|
||||
if tok:
|
||||
func_id = tok[0].spelling
|
||||
args_size_definition = lookup_function_size_def(func_id)
|
||||
|
||||
|
||||
if not args_size_definition:
|
||||
return
|
||||
|
||||
children = children[1:]
|
||||
for i, node_child in enumerate(children):
|
||||
children = list(node_child.get_children())
|
||||
|
||||
|
||||
# skip if we dont have an index...
|
||||
size_def = args_size_definition.get(i, -1)
|
||||
|
||||
if size_def == -1:
|
||||
continue
|
||||
|
||||
# print([c.kind for c in children])
|
||||
|
||||
#print([c.kind for c in children])
|
||||
# print(" ".join([t.spelling for t in node_child.get_tokens()]))
|
||||
|
||||
|
||||
if len(children) == 1:
|
||||
arg = children[0]
|
||||
if arg.kind in (CursorKind.DECL_REF_EXPR,
|
||||
CursorKind.UNEXPOSED_EXPR):
|
||||
|
||||
if arg.type.kind == TypeKind.CONSTANTARRAY:
|
||||
if arg.type.kind == TypeKind.POINTER:
|
||||
dec = arg.get_definition()
|
||||
if dec:
|
||||
size = parm_size(dec)
|
||||
|
||||
|
||||
# size == 0 is for 'float *a'
|
||||
if size != -1 and size != 0:
|
||||
|
||||
|
||||
# nice print!
|
||||
if 0:
|
||||
print("".join([t.spelling for t in func.get_tokens()]),
|
||||
@@ -323,7 +324,7 @@ def file_check_arg_sizes(tu):
|
||||
location.line,
|
||||
location.column,
|
||||
i + 1, size, size_def,
|
||||
filepath # always the same but useful when running threaded
|
||||
args[0] # always the same but useful when running threaded
|
||||
))
|
||||
|
||||
# we dont really care what we are looking at, just scan entire file for
|
||||
@@ -349,8 +350,8 @@ def recursive_arg_sizes(node, ):
|
||||
args_sizes = node
|
||||
else:
|
||||
args_sizes = function_get_arg_sizes(node)
|
||||
# if args_sizes:
|
||||
# print(node.spelling, args_sizes)
|
||||
#if args_sizes:
|
||||
# print(node.spelling, args_sizes)
|
||||
_defs[node.spelling] = args_sizes
|
||||
# print("adding", node.spelling)
|
||||
for c in node.get_children():
|
||||
|
@@ -28,17 +28,13 @@ if not sys.version.startswith("3"):
|
||||
sys.version.partition(" ")[0])
|
||||
sys.exit(1)
|
||||
|
||||
from cmake_consistency_check_config import (
|
||||
IGNORE,
|
||||
UTF8_CHECK,
|
||||
SOURCE_DIR,
|
||||
BUILD_DIR,
|
||||
)
|
||||
|
||||
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
|
||||
|
||||
import os
|
||||
from os.path import join, dirname, normpath, splitext
|
||||
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
|
||||
global_h = set()
|
||||
global_c = set()
|
||||
global_refs = {}
|
||||
@@ -62,7 +58,7 @@ def replace_line(f, i, text, keep_indent=True):
|
||||
def source_list(path, filename_check=None):
|
||||
for dirpath, dirnames, filenames in os.walk(path):
|
||||
|
||||
# skip '.git'
|
||||
# skip '.svn'
|
||||
if dirpath.startswith("."):
|
||||
continue
|
||||
|
||||
@@ -138,7 +134,6 @@ def cmake_get_src(f):
|
||||
|
||||
if found:
|
||||
cmake_base = dirname(f)
|
||||
cmake_base_bin = os.path.join(BUILD_DIR, os.path.relpath(cmake_base, SOURCE_DIR))
|
||||
|
||||
while it is not None:
|
||||
i += 1
|
||||
@@ -159,8 +154,6 @@ def cmake_get_src(f):
|
||||
|
||||
# replace dirs
|
||||
l = l.replace("${CMAKE_CURRENT_SOURCE_DIR}", cmake_base)
|
||||
l = l.replace("${CMAKE_CURRENT_BINARY_DIR}", cmake_base_bin)
|
||||
l = l.strip('"')
|
||||
|
||||
if not l:
|
||||
pass
|
||||
@@ -181,7 +174,7 @@ def cmake_get_src(f):
|
||||
elif is_c(new_file):
|
||||
sources_c.append(new_file)
|
||||
global_refs.setdefault(new_file, []).append((f, i))
|
||||
elif l in {"PARENT_SCOPE", }:
|
||||
elif l in ("PARENT_SCOPE", ):
|
||||
# cmake var, ignore
|
||||
pass
|
||||
elif new_file.endswith(".list"):
|
||||
@@ -194,26 +187,21 @@ def cmake_get_src(f):
|
||||
pass
|
||||
elif new_file.endswith(".osl"): # open shading language
|
||||
pass
|
||||
elif new_file.endswith(".glsl"):
|
||||
pass
|
||||
else:
|
||||
raise Exception("unknown file type - not c or h %s -> %s" % (f, new_file))
|
||||
|
||||
elif context_name == "INC":
|
||||
if new_file.startswith(BUILD_DIR):
|
||||
# assume generated path
|
||||
pass
|
||||
elif os.path.isdir(new_file):
|
||||
if os.path.isdir(new_file):
|
||||
new_path_rel = os.path.relpath(new_file, cmake_base)
|
||||
|
||||
if new_path_rel != l:
|
||||
print("overly relative path:\n %s:%d\n %s\n %s" % (f, i, l, new_path_rel))
|
||||
|
||||
# # Save time. just replace the line
|
||||
## Save time. just replace the line
|
||||
# replace_line(f, i - 1, new_path_rel)
|
||||
|
||||
else:
|
||||
raise Exception("non existent include %s:%d -> %s" % (f, i, new_file))
|
||||
raise Exception("non existant include %s:%d -> %s" % (f, i, new_file))
|
||||
|
||||
# print(new_file)
|
||||
|
||||
@@ -240,6 +228,10 @@ def cmake_get_src(f):
|
||||
filen.close()
|
||||
|
||||
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
|
||||
def is_ignore(f):
|
||||
for ig in IGNORE:
|
||||
if ig in f:
|
||||
@@ -247,83 +239,73 @@ def is_ignore(f):
|
||||
return False
|
||||
|
||||
|
||||
def main():
|
||||
# First do stupid check, do these files exist?
|
||||
print("\nChecking for missing references:")
|
||||
is_err = False
|
||||
errs = []
|
||||
for f in (global_h | global_c):
|
||||
if f.endswith("dna.c"):
|
||||
continue
|
||||
|
||||
print("Scanning:", SOURCE_DIR)
|
||||
if not os.path.exists(f):
|
||||
refs = global_refs[f]
|
||||
if refs:
|
||||
for cf, i in refs:
|
||||
errs.append((cf, i))
|
||||
else:
|
||||
raise Exception("CMake referenecs missing, internal error, aborting!")
|
||||
is_err = True
|
||||
|
||||
for cmake in source_list(SOURCE_DIR, is_cmake):
|
||||
cmake_get_src(cmake)
|
||||
|
||||
# First do stupid check, do these files exist?
|
||||
print("\nChecking for missing references:")
|
||||
is_err = False
|
||||
errs = []
|
||||
for f in (global_h | global_c):
|
||||
if f.startswith(BUILD_DIR):
|
||||
continue
|
||||
|
||||
if not os.path.exists(f):
|
||||
refs = global_refs[f]
|
||||
if refs:
|
||||
for cf, i in refs:
|
||||
errs.append((cf, i))
|
||||
else:
|
||||
raise Exception("CMake referenecs missing, internal error, aborting!")
|
||||
is_err = True
|
||||
|
||||
errs.sort()
|
||||
errs.reverse()
|
||||
for cf, i in errs:
|
||||
print("%s:%d" % (cf, i))
|
||||
# Write a 'sed' script, useful if we get a lot of these
|
||||
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
|
||||
errs.sort()
|
||||
errs.reverse()
|
||||
for cf, i in errs:
|
||||
print("%s:%d" % (cf, i))
|
||||
# Write a 'sed' script, useful if we get a lot of these
|
||||
# print("sed '%dd' '%s' > '%s.tmp' ; mv '%s.tmp' '%s'" % (i, cf, cf, cf, cf))
|
||||
|
||||
|
||||
if is_err:
|
||||
raise Exception("CMake referenecs missing files, aborting!")
|
||||
del is_err
|
||||
del errs
|
||||
if is_err:
|
||||
raise Exception("CMake referenecs missing files, aborting!")
|
||||
del is_err
|
||||
del errs
|
||||
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake doesnt know about...")
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore(cf):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
# now check on files not accounted for.
|
||||
print("\nC/C++ Files CMake doesnt know about...")
|
||||
for cf in sorted(source_list(SOURCE_DIR, is_c)):
|
||||
if not is_ignore(cf):
|
||||
if cf not in global_c:
|
||||
print("missing_c: ", cf)
|
||||
|
||||
# check if automake builds a corrasponding .o file.
|
||||
'''
|
||||
if cf in global_c:
|
||||
out1 = os.path.splitext(cf)[0] + ".o"
|
||||
out2 = os.path.splitext(cf)[0] + ".Po"
|
||||
out2_dir, out2_file = out2 = os.path.split(out2)
|
||||
out2 = os.path.join(out2_dir, ".deps", out2_file)
|
||||
if not os.path.exists(out1) and not os.path.exists(out2):
|
||||
print("bad_c: ", cf)
|
||||
'''
|
||||
# check if automake builds a corrasponding .o file.
|
||||
'''
|
||||
if cf in global_c:
|
||||
out1 = os.path.splitext(cf)[0] + ".o"
|
||||
out2 = os.path.splitext(cf)[0] + ".Po"
|
||||
out2_dir, out2_file = out2 = os.path.split(out2)
|
||||
out2 = os.path.join(out2_dir, ".deps", out2_file)
|
||||
if not os.path.exists(out1) and not os.path.exists(out2):
|
||||
print("bad_c: ", cf)
|
||||
'''
|
||||
|
||||
print("\nC/C++ Headers CMake doesnt know about...")
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore(hf):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
print("\nC/C++ Headers CMake doesnt know about...")
|
||||
for hf in sorted(source_list(SOURCE_DIR, is_c_header)):
|
||||
if not is_ignore(hf):
|
||||
if hf not in global_h:
|
||||
print("missing_h: ", hf)
|
||||
|
||||
if UTF8_CHECK:
|
||||
# test encoding
|
||||
import traceback
|
||||
for files in (global_c, global_h):
|
||||
for f in sorted(files):
|
||||
if os.path.exists(f):
|
||||
# ignore outside of our source tree
|
||||
if "extern" not in f:
|
||||
i = 1
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except UnicodeDecodeError:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
if UTF8_CHECK:
|
||||
# test encoding
|
||||
import traceback
|
||||
for files in (global_c, global_h):
|
||||
for f in sorted(files):
|
||||
if os.path.exists(f):
|
||||
# ignore outside of our source tree
|
||||
if "extern" not in f:
|
||||
i = 1
|
||||
try:
|
||||
for l in open(f, "r", encoding="utf8"):
|
||||
i += 1
|
||||
except:
|
||||
print("Non utf8: %s:%d" % (f, i))
|
||||
if i > 1:
|
||||
traceback.print_exc()
|
||||
|
@@ -2,7 +2,6 @@ import os
|
||||
|
||||
IGNORE = (
|
||||
"/test/",
|
||||
"/tests/gtests/",
|
||||
"/BSP_GhostTest/",
|
||||
"/release/",
|
||||
"/xembed/",
|
||||
@@ -74,6 +73,3 @@ IGNORE = (
|
||||
UTF8_CHECK = True
|
||||
|
||||
SOURCE_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(os.path.dirname(__file__), "..", ".."))))
|
||||
|
||||
# doesn't have to exist, just use as reference
|
||||
BUILD_DIR = os.path.normpath(os.path.abspath(os.path.normpath(os.path.join(SOURCE_DIR, "..", "build"))))
|
||||
|
@@ -24,25 +24,23 @@
|
||||
|
||||
"""
|
||||
Example linux usage
|
||||
python3 ~/blender-git/blender/build_files/cmake/cmake_netbeans_project.py ~/blender-git/cmake
|
||||
python3 ~/blenderSVN/blender/build_files/cmake/cmake_netbeans_project.py ~/blenderSVN/cmake
|
||||
|
||||
Windows not supported so far
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
cmake_cache_var,
|
||||
project_name_get,
|
||||
)
|
||||
from project_info import (SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
# is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
|
||||
import os
|
||||
@@ -69,12 +67,8 @@ def create_nb_project_main():
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender"
|
||||
else:
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
|
||||
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
make_exe_basename = os.path.basename(make_exe)
|
||||
# be tricky, get the project name from SVN if we can!
|
||||
PROJECT_NAME = project_name_get(SOURCE_DIR)
|
||||
|
||||
# --------------- NB spesific
|
||||
defines = [("%s=%s" % cdef) if cdef[1] else cdef[0] for cdef in defines]
|
||||
@@ -111,8 +105,8 @@ def create_nb_project_main():
|
||||
f.write(' <data xmlns="http://www.netbeans.org/ns/make-project/1">\n')
|
||||
f.write(' <name>%s</name>\n' % PROJECT_NAME)
|
||||
f.write(' <c-extensions>c,m</c-extensions>\n')
|
||||
f.write(' <cpp-extensions>cpp,cxx,cc,mm</cpp-extensions>\n')
|
||||
f.write(' <header-extensions>h,hxx,hh,hpp,inl</header-extensions>\n')
|
||||
f.write(' <cpp-extensions>cpp,mm</cpp-extensions>\n')
|
||||
f.write(' <header-extensions>h,hpp,inl</header-extensions>\n')
|
||||
f.write(' <sourceEncoding>UTF-8</sourceEncoding>\n')
|
||||
f.write(' <make-dep-projects/>\n')
|
||||
f.write(' <sourceRootList>\n')
|
||||
@@ -124,21 +118,16 @@ def create_nb_project_main():
|
||||
f.write(' <type>0</type>\n')
|
||||
f.write(' </confElem>\n')
|
||||
f.write(' </confList>\n')
|
||||
f.write(' <formatting>\n')
|
||||
f.write(' <project-formatting-style>false</project-formatting-style>\n')
|
||||
f.write(' </formatting>\n')
|
||||
f.write(' </data>\n')
|
||||
f.write(' </configuration>\n')
|
||||
f.write('</project>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
f = open(join(PROJECT_DIR_NB, "configurations.xml"), 'w')
|
||||
|
||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||
f.write('<configurationDescriptor version="95">\n')
|
||||
f.write('<configurationDescriptor version="79">\n')
|
||||
f.write(' <logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">\n')
|
||||
f.write(' <df root="%s" name="0">\n' % SOURCE_DIR) # base_root_rel
|
||||
f.write(' <df name="blender" root="%s">\n' % SOURCE_DIR) # base_root_rel
|
||||
|
||||
# write files!
|
||||
files_rel_local = [normpath(relpath(join(CMAKE_DIR, path), SOURCE_DIR)) for path in files_rel]
|
||||
@@ -156,7 +145,7 @@ def create_nb_project_main():
|
||||
|
||||
for key, item in dirs:
|
||||
f.write('%s <df name="%s">\n' % (ident, key))
|
||||
write_df(item, ident + " ")
|
||||
write_df(item, ident + " ")
|
||||
f.write('%s </df>\n' % ident)
|
||||
|
||||
for key in files:
|
||||
@@ -189,28 +178,16 @@ def create_nb_project_main():
|
||||
f.write(' <conf name="Default" type="0">\n')
|
||||
|
||||
f.write(' <toolsSet>\n')
|
||||
f.write(' <remote-sources-mode>LOCAL_SOURCES</remote-sources-mode>\n')
|
||||
f.write(' <compilerSet>default</compilerSet>\n')
|
||||
f.write(' <dependencyChecking>false</dependencyChecking>\n')
|
||||
f.write(' <rebuildPropChanged>false</rebuildPropChanged>\n')
|
||||
f.write(' </toolsSet>\n')
|
||||
f.write(' <codeAssistance>\n')
|
||||
f.write(' </codeAssistance>\n')
|
||||
f.write(' <makefileType>\n')
|
||||
|
||||
f.write(' <makeTool>\n')
|
||||
f.write(' <buildCommandWorkingDir>.</buildCommandWorkingDir>\n')
|
||||
|
||||
if make_exe_basename == "ninja":
|
||||
build_cmd = "ninja"
|
||||
clean_cmd = "ninja -t clean"
|
||||
else:
|
||||
build_cmd = "${MAKE} -f Makefile"
|
||||
clean_cmd = "${MAKE} -f Makefile clean"
|
||||
|
||||
f.write(' <buildCommand>%s</buildCommand>\n' % build_cmd)
|
||||
f.write(' <cleanCommand>%s</cleanCommand>\n' % clean_cmd)
|
||||
f.write(' <buildCommand>${MAKE} -f Makefile</buildCommand>\n')
|
||||
f.write(' <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>\n')
|
||||
f.write(' <executablePath>./bin/blender</executablePath>\n')
|
||||
del build_cmd, clean_cmd
|
||||
|
||||
def write_toolinfo():
|
||||
f.write(' <incDir>\n')
|
||||
@@ -237,11 +214,10 @@ def create_nb_project_main():
|
||||
f.write(' \n')
|
||||
|
||||
for path in files_rel_local:
|
||||
is_c = path.endswith(".c")
|
||||
f.write(' <item path="%s"\n' % path)
|
||||
f.write(' ex="false"\n')
|
||||
f.write(' tool="%d"\n' % (0 if is_c else 1))
|
||||
f.write(' flavor2="%d">\n' % (3 if is_c else 0))
|
||||
f.write(' tool="1"\n')
|
||||
f.write(' flavor="0">\n')
|
||||
f.write(' </item>\n')
|
||||
|
||||
f.write(' <runprofile version="9">\n')
|
||||
@@ -263,8 +239,6 @@ def create_nb_project_main():
|
||||
|
||||
f.write('</configurationDescriptor>\n')
|
||||
|
||||
f.close()
|
||||
|
||||
|
||||
def main():
|
||||
create_nb_project_main()
|
||||
|
@@ -22,27 +22,26 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
r"""
|
||||
Example Linux usage:
|
||||
python ~/blender-git/blender/build_files/cmake/cmake_qtcreator_project.py ~/blender-git/cmake
|
||||
|
||||
"""
|
||||
Example Win32 usage:
|
||||
c:\Python32\python.exe c:\blender_dev\blender\build_files\cmake\cmake_qtcreator_project.py c:\blender_dev\cmake_build
|
||||
|
||||
example linux usage
|
||||
python .~/blenderSVN/blender/build_files/cmake/cmake_qtcreator_project.py ~/blenderSVN/cmake
|
||||
"""
|
||||
|
||||
from project_info import (
|
||||
SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
from project_info import (SIMPLE_PROJECTFILE,
|
||||
SOURCE_DIR,
|
||||
# CMAKE_DIR,
|
||||
PROJECT_DIR,
|
||||
source_list,
|
||||
is_project_file,
|
||||
is_c_header,
|
||||
is_py,
|
||||
cmake_advanced_info,
|
||||
cmake_compiler_defines,
|
||||
project_name_get,
|
||||
)
|
||||
|
||||
import os
|
||||
import sys
|
||||
@@ -64,22 +63,21 @@ def create_qtc_project_main():
|
||||
if SIMPLE_PROJECTFILE:
|
||||
# --- qtcreator specific, simple format
|
||||
PROJECT_NAME = "Blender"
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % PROJECT_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.includes" % PROJECT_NAME), 'w')
|
||||
f.write("\n".join(sorted(list(set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f))))))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % PROJECT_NAME)
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % PROJECT_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
@@ -94,34 +92,33 @@ def create_qtc_project_main():
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender"
|
||||
else:
|
||||
# be tricky, get the project name from CMake if we can!
|
||||
PROJECT_NAME = project_name_get()
|
||||
# be tricky, get the project name from SVN if we can!
|
||||
PROJECT_NAME = project_name_get(SOURCE_DIR)
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
with open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8') as f:
|
||||
f.write("\n".join(sorted(includes)))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.includes" % FILE_NAME), 'w', encoding='utf-8')
|
||||
f.write("\n".join(sorted(includes)))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
|
||||
|
||||
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
|
||||
if os.path.exists(qtc_custom_cfg):
|
||||
with open(qtc_custom_cfg, 'r') as fc:
|
||||
f.write(fc.read())
|
||||
f.write("\n")
|
||||
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS TO %s_custom.config!\n" % FILE_NAME)
|
||||
qtc_custom_cfg = os.path.join(PROJECT_DIR, "%s_custom.config" % FILE_NAME)
|
||||
if os.path.exists(qtc_custom_cfg):
|
||||
fc = open(qtc_custom_cfg, 'r')
|
||||
f.write(fc.read())
|
||||
fc.close()
|
||||
f.write("\n")
|
||||
defines_final = [("#define %s %s" % (item[0], quote_define(item[1]))) for item in defines]
|
||||
if sys.platform != "win32":
|
||||
defines_final += cmake_compiler_defines()
|
||||
f.write("\n".join(defines_final))
|
||||
|
||||
print("Blender project file written to: %r" % qtc_prj)
|
||||
# --- end
|
||||
@@ -136,21 +133,21 @@ def create_qtc_project_python():
|
||||
if 0:
|
||||
PROJECT_NAME = "Blender_Python"
|
||||
else:
|
||||
# be tricky, get the project name from git if we can!
|
||||
PROJECT_NAME = project_name_get() + "_Python"
|
||||
# be tricky, get the project name from SVN if we can!
|
||||
PROJECT_NAME = project_name_get(SOURCE_DIR) + "_Python"
|
||||
|
||||
FILE_NAME = PROJECT_NAME.lower()
|
||||
with open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w') as f:
|
||||
f.write("\n".join(files_rel))
|
||||
f = open(os.path.join(PROJECT_DIR, "%s.files" % FILE_NAME), 'w')
|
||||
f.write("\n".join(files_rel))
|
||||
|
||||
qtc_prj = os.path.join(PROJECT_DIR, "%s.creator" % FILE_NAME)
|
||||
with open(qtc_prj, 'w') as f:
|
||||
f.write("[General]\n")
|
||||
f = open(qtc_prj, 'w')
|
||||
f.write("[General]\n")
|
||||
|
||||
qtc_cfg = os.path.join(PROJECT_DIR, "%s.config" % FILE_NAME)
|
||||
if not os.path.exists(qtc_cfg):
|
||||
with open(qtc_cfg, 'w') as f:
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
f = open(qtc_cfg, 'w')
|
||||
f.write("// ADD PREDEFINED MACROS HERE!\n")
|
||||
|
||||
print("Python project file written to: %r" % qtc_prj)
|
||||
|
||||
|
@@ -41,8 +41,6 @@ CHECKER_ARGS = [
|
||||
os.path.join(os.path.dirname(__file__), "clang_array_check.py"),
|
||||
# not sure why this is needed, but it is.
|
||||
"-I" + os.path.join(project_source_info.SOURCE_DIR, "extern", "glew", "include"),
|
||||
# stupid but needed
|
||||
"-Dbool=char"
|
||||
]
|
||||
|
||||
|
||||
|
@@ -70,7 +70,7 @@ def main():
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
|
@@ -61,7 +61,7 @@ def main():
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
|
@@ -59,7 +59,7 @@ def main():
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.flush()
|
||||
|
@@ -89,7 +89,7 @@ def main():
|
||||
|
||||
def my_process(i, c, cmd):
|
||||
if not USE_QUIET:
|
||||
percent = 100.0 * (i / len(check_commands))
|
||||
percent = 100.0 * (i / (len(check_commands) - 1))
|
||||
percent_str = "[" + ("%.2f]" % percent).rjust(7) + " %:"
|
||||
|
||||
sys.stdout.write("%s %s\n" % (percent_str, c))
|
||||
|
@@ -1,69 +0,0 @@
|
||||
# Turn everything ON thats expected for an official release builds.
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/blender_full.cmake ../blender
|
||||
#
|
||||
|
||||
set(WITH_BUILDINFO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_BULLET ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_AVI ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_FFMPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_SNDFILE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV_SCHUR_SPECIALIZATIONS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_GHOST_XDND ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_SOLVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IK_ITASC ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_CINEON ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_DDS ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_FRAMESERVER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_HDR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENEXR ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_OPENJPEG ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_REDCODE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_IMAGE_TIFF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INPUT_NDOF ON CACHE BOOL "" FORCE)
|
||||
set(WITH_INTERNATIONAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZMA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_LZO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_BOOLEAN ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_FLUID ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_REMESH ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_SMOKE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MOD_OCEANSIM ON CACHE BOOL "" FORCE)
|
||||
set(WITH_AUDASPACE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION ON CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT ON CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE ON CACHE BOOL "" FORCE)
|
||||
|
||||
set(WITH_PLAYER ON CACHE BOOL "" FORCE)
|
||||
set(WITH_MEM_JEMALLOC ON CACHE BOOL "" FORCE)
|
||||
|
||||
|
||||
# platform dependant options
|
||||
if(UNIX AND NOT APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_DOC_MANPAGE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif(WIN32)
|
||||
set(WITH_JACK OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV ON CACHE BOOL "" FORCE)
|
||||
elseif (APPLE)
|
||||
set(WITH_JACK ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CODEC_QUICKTIME ON CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENSUBDIV OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
@@ -16,7 +16,6 @@ set(WITH_CODEC_SNDFILE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FFTW3 OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LIBMV OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_LLVM OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_GAMEENGINE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_COMPOSITOR OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_FREESTYLE OFF CACHE BOOL "" FORCE)
|
||||
@@ -45,16 +44,9 @@ set(WITH_AUDASPACE OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENAL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLLADA OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENCOLORIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENIMAGEIO OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENMP OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_OPENNL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PYTHON_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_RAYOPTIMIZATION OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_SDL OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XINPUT OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_X11_XF86VMODE OFF CACHE BOOL "" FORCE)
|
||||
|
||||
if(APPLE)
|
||||
set(WITH_CODEC_QUICKTIME OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
|
@@ -1,14 +0,0 @@
|
||||
# only compile Cycles standalone, without Blender
|
||||
#
|
||||
# Example usage:
|
||||
# cmake -C../blender/build_files/cmake/config/cycles_standalone.cmake ../blender
|
||||
#
|
||||
|
||||
# disable Blender
|
||||
set(WITH_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_PLAYER OFF CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_BLENDER OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# build Cycles
|
||||
set(WITH_CYCLES_STANDALONE ON CACHE BOOL "" FORCE)
|
||||
set(WITH_CYCLES_STANDALONE_GUI ON CACHE BOOL "" FORCE)
|
@@ -1,41 +1,37 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This shell script checks out and compiles blender, tested on ubuntu 10.04
|
||||
# assumes you have dependencies installed already
|
||||
# assumes you have dependancies installed alredy
|
||||
|
||||
# See this page for more info:
|
||||
# http://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Generic_Distro/CMake
|
||||
# http://wiki.blender.org/index.php/Dev:2.5/Doc/Building_Blender/Linux/Generic_Distro/CMake
|
||||
|
||||
# grab blender
|
||||
mkdir ~/blender-git
|
||||
cd ~/blender-git
|
||||
mkdir ~/blender-svn
|
||||
cd ~/blender-svn
|
||||
svn co https://svn.blender.org/svnroot/bf-blender/trunk/blender
|
||||
|
||||
git clone http://git.blender.org/blender.git
|
||||
cd blender
|
||||
git submodule update --init --recursive
|
||||
git submodule foreach git checkout master
|
||||
git submodule foreach git pull --rebase origin master
|
||||
|
||||
# create build dir
|
||||
mkdir ~/blender-git/build-cmake
|
||||
cd ~/blender-git/build-cmake
|
||||
# create cmake dir
|
||||
mkdir ~/blender-svn/build-cmake
|
||||
cd ~/blender-svn/build-cmake
|
||||
|
||||
# cmake without copying files for fast rebuilds
|
||||
# the files from git will be used in place
|
||||
# the files from svn will be used in place
|
||||
cmake ../blender
|
||||
|
||||
# make blender, will take some time
|
||||
make -j$(nproc)
|
||||
make
|
||||
|
||||
# link the binary to blenders source directory to run quickly
|
||||
ln -s ~/blender-git/build-cmake/bin/blender ~/blender-git/blender/blender.bin
|
||||
ln -s ~/blender-svn/build-cmake/bin/blender ~/blender-svn/blender/blender.bin
|
||||
|
||||
# useful info
|
||||
echo ""
|
||||
echo "* Useful Commands *"
|
||||
echo " Run Blender: ~/blender-git/blender/blender.bin"
|
||||
echo " Update Blender: git pull --rebase; git submodule foreach git pull --rebase origin master"
|
||||
echo " Reconfigure Blender: cd ~/blender-git/build-cmake ; cmake ."
|
||||
echo " Build Blender: cd ~/blender-git/build-cmake ; make"
|
||||
echo " Run Blender: ~/blender-svn/blender/blender.bin"
|
||||
echo " Update Blender: svn up ~/blender-svn/blender"
|
||||
echo " Reconfigure Blender: cd ~/blender-svn/build-cmake ; cmake ."
|
||||
echo " Build Blender: cd ~/blender-svn/build-cmake ; make"
|
||||
echo ""
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@ set(PROJECT_DESCRIPTION "Blender is a very fast and versatile 3D modeller/rende
|
||||
set(PROJECT_COPYRIGHT "Copyright (C) 2001-2012 Blender Foundation")
|
||||
set(PROJECT_CONTACT "foundation@blender.org")
|
||||
set(PROJECT_VENDOR "Blender Foundation")
|
||||
set(ORG_WEBSITE "www.blender.org")
|
||||
|
||||
set(MAJOR_VERSION ${BLENDER_VERSION_MAJOR})
|
||||
set(MINOR_VERSION ${BLENDER_VERSION_MINOR})
|
||||
@@ -19,36 +20,29 @@ SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
|
||||
|
||||
|
||||
# Get the build revision, note that this can get out-of-sync, so for packaging run cmake first.
|
||||
set(MY_WC_HASH "unknown")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.git/)
|
||||
include(FindGit)
|
||||
if(GIT_FOUND)
|
||||
message(STATUS "-- Found Git: ${GIT_EXECUTABLE}")
|
||||
execute_process(COMMAND git rev-parse --short HEAD
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
OUTPUT_VARIABLE MY_WC_HASH
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET)
|
||||
include(FindSubversion)
|
||||
set(MY_WC_REVISION "unknown")
|
||||
if(EXISTS ${CMAKE_SOURCE_DIR}/.svn/)
|
||||
if(Subversion_FOUND)
|
||||
Subversion_WC_INFO(${CMAKE_SOURCE_DIR} MY)
|
||||
endif()
|
||||
endif()
|
||||
set(BUILD_REV ${MY_WC_HASH})
|
||||
unset(MY_WC_HASH)
|
||||
set(BUILD_REV ${MY_WC_REVISION})
|
||||
|
||||
|
||||
# Force Package Name
|
||||
execute_process(COMMAND date "+%Y%m%d" OUTPUT_VARIABLE CPACK_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-git${CPACK_DATE}.${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-1.r${BUILD_REV}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
# RPM packages
|
||||
include(build_files/cmake/RpmBuild.cmake)
|
||||
if(RPMBUILD_FOUND)
|
||||
if(RPMBUILD_FOUND AND NOT WIN32)
|
||||
set(CPACK_GENERATOR "RPM")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE "git${CPACK_DATE}.${BUILD_REV}")
|
||||
set(CPACK_RPM_PACKAGE_RELEASE "1.r${BUILD_REV}")
|
||||
set(CPACK_SET_DESTDIR "true")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
||||
set(CPACK_PACKAGE_RELOCATABLE "false")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2+ and Apache 2.0")
|
||||
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
|
||||
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Multimedia")
|
||||
set(CPACK_RPM_USER_BINARY_SPECFILE "${CMAKE_SOURCE_DIR}/build_files/package_spec/rpm/blender.spec.in")
|
||||
endif()
|
||||
@@ -62,25 +56,7 @@ if(APPLE)
|
||||
set(CPACK_COMPONENT_LIBRARIES_HIDDEN TRUE)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "Blender Foundation/Blender")
|
||||
set(CPACK_PACKAGE_INSTALL_REGISTRY_KEY "Blender Foundation/Blender")
|
||||
|
||||
set(CPACK_NSIS_MUI_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_NSIS_COMPRESSOR "/SOLID lzma")
|
||||
|
||||
set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/release/text/GPL-license.txt)
|
||||
set(CPACK_WIX_PRODUCT_ICON ${CMAKE_SOURCE_DIR}/source/icons/winblender.ico)
|
||||
set(CPACK_WIX_UPGRADE_GUID "B767E4FD-7DE7-4094-B051-3AE62E13A17A")
|
||||
|
||||
set(CPACK_WIX_UI_BANNER ${LIBDIR}/package/installer_wix/WIX_UI_BANNER.bmp)
|
||||
set(CPACK_WIX_UI_DIALOG ${LIBDIR}/package/installer_wix/WIX_UI_DIALOG.bmp)
|
||||
|
||||
#force lzma instead of deflate
|
||||
set(CPACK_WIX_LIGHT_EXTRA_FLAGS -dcl:high)
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender" "blender")
|
||||
set(CPACK_PACKAGE_EXECUTABLES "blender")
|
||||
include(CPack)
|
||||
|
||||
# Target for build_archive.py script, to automatically pass along
|
||||
@@ -95,26 +71,18 @@ macro(add_package_archive packagename extension)
|
||||
OUTPUT ${package_output}
|
||||
COMMAND ${build_archive} ${packagename} ${extension} bin release
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
|
||||
unset(build_archive)
|
||||
unset(package_output)
|
||||
endmacro()
|
||||
|
||||
if(APPLE)
|
||||
add_package_archive(
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-OSX-${CMAKE_OSX_ARCHITECTURES}"
|
||||
"zip")
|
||||
elseif(UNIX)
|
||||
# platform name could be tweaked, to include glibc, and ensure processor is correct (i386 vs i686)
|
||||
string(TOLOWER ${CMAKE_SYSTEM_NAME} PACKAGE_SYSTEM_NAME)
|
||||
|
||||
add_package_archive(
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
|
||||
"${PROJECT_NAME}-${BLENDER_VERSION}-r${BUILD_REV}-${PACKAGE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}"
|
||||
"tar.bz2")
|
||||
endif()
|
||||
|
||||
unset(MAJOR_VERSION)
|
||||
unset(MINOR_VERSION)
|
||||
unset(PATCH_VERSION)
|
||||
|
||||
unset(BUILD_REV)
|
||||
|
||||
|
@@ -130,7 +130,7 @@ def is_project_file(filename):
|
||||
|
||||
|
||||
def cmake_advanced_info():
|
||||
""" Extract includes and defines from cmake.
|
||||
""" Extracr includes and defines from cmake.
|
||||
"""
|
||||
|
||||
make_exe = cmake_cache_var("CMAKE_MAKE_PROGRAM")
|
||||
@@ -239,5 +239,26 @@ def cmake_compiler_defines():
|
||||
return lines
|
||||
|
||||
|
||||
def project_name_get():
|
||||
return cmake_cache_var("CMAKE_PROJECT_NAME")
|
||||
def project_name_get(path, fallback="Blender", prefix="Blender_"):
|
||||
if not os.path.isdir(os.path.join(path, ".svn")):
|
||||
return fallback
|
||||
|
||||
import subprocess
|
||||
try:
|
||||
info = subprocess.Popen(["svn", "info", path],
|
||||
stdout=subprocess.PIPE).communicate()[0]
|
||||
except:
|
||||
# possibly 'svn' isnt found/installed
|
||||
return fallback
|
||||
|
||||
# string version, we only want the URL
|
||||
info = info.decode(encoding="utf-8", errors="ignore")
|
||||
|
||||
for l in info.split("\n"):
|
||||
l = l.strip()
|
||||
if l.startswith("URL"):
|
||||
# https://svn.blender.org/svnroot/bf-blender/branches/bmesh/blender
|
||||
# --> bmesh
|
||||
if "/branches/" in l:
|
||||
return prefix + l.rsplit("/branches/", 1)[-1].split("/", 1)[0]
|
||||
return fallback
|
||||
|
@@ -59,21 +59,14 @@ def is_c_any(filename):
|
||||
CMAKE_DIR = "."
|
||||
|
||||
|
||||
def cmake_cache_var_iter():
|
||||
import re
|
||||
re_cache = re.compile(r'([A-Za-z0-9_\-]+)?:?([A-Za-z0-9_\-]+)?=(.*)$')
|
||||
with open(join(CMAKE_DIR, "CMakeCache.txt"), 'r', encoding='utf-8') as cache_file:
|
||||
for l in cache_file:
|
||||
match = re_cache.match(l.strip())
|
||||
if match is not None:
|
||||
var, type_, val = match.groups()
|
||||
yield (var, type_ or "", val)
|
||||
|
||||
|
||||
def cmake_cache_var(var):
|
||||
for var_iter, type_iter, value_iter in cmake_cache_var_iter():
|
||||
if var == var_iter:
|
||||
return value_iter
|
||||
cache_file = open(join(CMAKE_DIR, "CMakeCache.txt"))
|
||||
lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
|
||||
cache_file.close()
|
||||
|
||||
for l in lines:
|
||||
if l.split(":")[0] == var:
|
||||
return l.split("=", 1)[-1]
|
||||
return None
|
||||
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
|
@@ -12,12 +12,12 @@ blender_version_char=$(sed -ne 's/.*BLENDER_VERSION_CHAR.*\([a-z]\)$/\1/p' $blen
|
||||
# map the version a -> 1
|
||||
# not to be confused with blender's internal subversions
|
||||
if [ "$blender_version_char" ]; then
|
||||
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
blender_version_full=${blender_version}.$(expr index abcdefghijklmnopqrstuvwxyz $blender_version_char)
|
||||
else
|
||||
blender_version_full=${blender_version}
|
||||
blender_version_full=${blender_version}
|
||||
fi
|
||||
|
||||
blender_ver_string=$blender_version+git$blender_version_full
|
||||
blender_ver_string=$blender_version+svn$blender_version_full
|
||||
|
||||
pkgname=blender-snapshot
|
||||
pkgver=$blender_ver_string
|
||||
@@ -27,8 +27,8 @@ arch=('i686' 'x86_64')
|
||||
url="www.blender.org"
|
||||
license=('GPL')
|
||||
groups=()
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.4' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'git')
|
||||
depends=('libjpeg' 'libpng' 'openjpeg' 'libtiff' 'openexr' 'python>=3.2' 'gettext' 'libxi' 'libxmu' 'mesa' 'freetype2' 'openal' 'sdl' 'libsndfile' 'ffmpeg')
|
||||
makedepends=('cmake' 'svn')
|
||||
optdepends=()
|
||||
provides=()
|
||||
conflicts=('blender')
|
||||
@@ -36,7 +36,7 @@ replaces=('blender')
|
||||
backup=()
|
||||
options=()
|
||||
install=blender.install
|
||||
# use current git to make the package.
|
||||
# use current svn to make the package.
|
||||
# source=(http://download.blender.org/source/$pkgname-$pkgver.tar.gz)
|
||||
# md5sums=('27edb80c82c25252d43d6a01980d953a') #generate with 'makepkg -g'
|
||||
source=()
|
||||
@@ -51,7 +51,11 @@ build() {
|
||||
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||
-DWITH_INSTALL_PORTABLE:BOOL=OFF \
|
||||
-DWITH_PYTHON_INSTALL:BOOL=OFF \
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF
|
||||
-DWITH_OPENCOLLADA:BOOL=OFF \
|
||||
-DPYTHON_VERSION:STRING=3.2 \
|
||||
-DPYTHON_LIBPATH:STRING=/usr/lib \
|
||||
-DPYTHON_LIBRARY:STRING=python3.2mu \
|
||||
-DPYTHON_INCLUDE_DIRS:STRING=/usr/include/python3.2mu
|
||||
|
||||
make $MAKEFLAGS
|
||||
}
|
||||
@@ -60,7 +64,7 @@ package() {
|
||||
cd $srcdir/build
|
||||
make DESTDIR="$pkgdir" install
|
||||
python -m compileall \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/addons
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/startup \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/modules \
|
||||
$pkgdir/usr/share/blender/$blender_version/scripts/addons
|
||||
}
|
||||
|
@@ -1,42 +0,0 @@
|
||||
def FindSharedPtr(conf):
|
||||
"""
|
||||
Detect shared_ptr availability
|
||||
"""
|
||||
|
||||
found = False
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("memory"):
|
||||
# Finding the memory header doesn't mean that shared_ptr is in std
|
||||
# namespace.
|
||||
#
|
||||
# In particular, MSVC 2008 has shared_ptr declared in std::tr1. In
|
||||
# order to support this, we do an extra check to see which namespace
|
||||
# should be used.
|
||||
|
||||
if conf.CheckType('std::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std namespace using <memory> header.")
|
||||
namespace = 'std'
|
||||
header = 'memory'
|
||||
elif conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'memory'
|
||||
|
||||
if not namespace and conf.CheckCXXHeader("tr1/memory"):
|
||||
# Further, gcc defines shared_ptr in std::tr1 namespace and
|
||||
# <tr1/memory> is to be included for this. And what makes things
|
||||
# even more tricky is that gcc does have <memory> header, so
|
||||
# all the checks above wouldn't find shared_ptr.
|
||||
if conf.CheckType('std::tr1::shared_ptr<int>', language = 'C++', includes="#include <tr1/memory>"):
|
||||
print("-- Found shared_ptr in std::tr1 namespace using <tr1/memory> header..")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/memory'
|
||||
|
||||
if not namespace:
|
||||
print("-- Unable to find shared_ptrred_map>.")
|
||||
|
||||
conf.env['WITH_SHARED_PTR_SUPPORT'] = namespace and header
|
||||
conf.env['SHARED_PTR_NAMESPACE'] = namespace
|
||||
conf.env['SHARED_PTR_HEADER'] = header
|
@@ -1,38 +0,0 @@
|
||||
def FindUnorderedMap(conf):
|
||||
"""
|
||||
Detect unordered_map availability
|
||||
"""
|
||||
|
||||
namespace = None
|
||||
header = None
|
||||
|
||||
if conf.CheckCXXHeader("unordered_map"):
|
||||
# Even so we've found unordered_map header file it doesn't
|
||||
# mean unordered_map and unordered_set will be declared in
|
||||
# std namespace.
|
||||
#
|
||||
# Namely, MSVC 2008 have unordered_map header which declares
|
||||
# unordered_map class in std::tr1 namespace. In order to support
|
||||
# this, we do extra check to see which exactly namespace is
|
||||
# to be used.
|
||||
|
||||
if conf.CheckType('std::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std namespace.")
|
||||
namespace = 'std'
|
||||
header = 'unordered_map'
|
||||
elif conf.CheckType('std::tr1::unordered_map<int, int>', language = 'CXX', includes="#include <unordered_map>"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'unordered_map'
|
||||
else:
|
||||
print("-- Found <unordered_map> but can not find neither std::unordered_map nor std::tr1::unordered_map.")
|
||||
elif conf.CheckCXXHeader("tr1/unordered_map"):
|
||||
print("-- Found unordered_map/set in std::tr1 namespace.")
|
||||
namespace = 'std::tr1'
|
||||
header = 'tr1/unordered_map'
|
||||
else:
|
||||
print("-- Unable to find <unordered_map> or <tr1/unordered_map>. ")
|
||||
|
||||
conf.env['WITH_UNORDERED_MAP_SUPPORT'] = namespace and header
|
||||
conf.env['UNORDERED_MAP_NAMESPACE'] = namespace
|
||||
conf.env['UNORDERED_MAP_HEADER'] = header
|
@@ -1,14 +1,13 @@
|
||||
import os
|
||||
import platform
|
||||
|
||||
def FindPython():
|
||||
all_abi_flags = ['m', 'mu', '']
|
||||
|
||||
python = "/usr"
|
||||
abi_flags = "m" # Most common for linux distros
|
||||
version = "3.4"
|
||||
version = "3.3"
|
||||
|
||||
_arch = platform.uname()[4] + "-linux-gnu"
|
||||
_arch = "x86_64-linux-gnu"
|
||||
|
||||
# Determine ABI flags used on this system
|
||||
include = os.path.join(python, "include")
|
||||
@@ -38,6 +37,8 @@ def FindPython():
|
||||
_libpath_arch = os.path.join(python, "lib", _arch) # No lib64 stuff with recent deb-like distro afaik...
|
||||
_libs = ["libpython" + version + abi_flags + ext for ext in (".so", ".a")]
|
||||
for l in _libs:
|
||||
print os.path.join(libpath, l), os.path.exists(os.path.join(libpath, l))
|
||||
print os.path.join(_libpath_arch, l), os.path.exists(os.path.join(_libpath_arch, l))
|
||||
if not os.path.exists(os.path.join(libpath, l)) and os.path.exists(os.path.join(_libpath_arch, l)):
|
||||
libpath_arch = os.path.join(libpath, _arch)
|
||||
break
|
@@ -1,23 +1,123 @@
|
||||
#
|
||||
# Note : if you want to alter this file
|
||||
# copy it as a whole in the upper folder
|
||||
# as user-config.py
|
||||
# dont create a new file with only some
|
||||
# vars changed.
|
||||
|
||||
import commands
|
||||
|
||||
#############################################################################
|
||||
################### Compiler & architecture settings ##################
|
||||
#############################################################################
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64
|
||||
MACOSX_SDK='' # set an sdk name like '10.7' or leave empty for automatic choosing highest available
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
#############################################################################
|
||||
################### Cocoa & architecture settings ##################
|
||||
#############################################################################
|
||||
WITH_GHOST_COCOA=True
|
||||
MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64
|
||||
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
cmd_res=commands.getoutput(cmd)
|
||||
|
||||
if cmd_res[:1]=='7':
|
||||
MAC_CUR_VER='10.3'
|
||||
elif cmd_res[:1]=='8':
|
||||
MAC_CUR_VER='10.4'
|
||||
elif cmd_res[:1]=='9':
|
||||
MAC_CUR_VER='10.5'
|
||||
elif cmd_res[:2]=='10':
|
||||
MAC_CUR_VER='10.6'
|
||||
elif cmd_res[:2]=='11':
|
||||
MAC_CUR_VER='10.7'
|
||||
elif cmd_res[:2]=='12':
|
||||
MAC_CUR_VER='10.8'
|
||||
elif cmd_res[:2]=='13':
|
||||
MAC_CUR_VER='10.9'
|
||||
cmd = 'xcodebuild -version'
|
||||
cmd_xcode=commands.getoutput(cmd)
|
||||
XCODE_CUR_VER=cmd_xcode[6:][:3] # truncate output to major.minor version
|
||||
cmd = 'xcodebuild -showsdks'
|
||||
cmd_sdk=commands.getoutput(cmd)
|
||||
MACOSX_SDK_CHECK=cmd_sdk
|
||||
cmd = 'xcode-select --print-path'
|
||||
XCODE_SELECT_PATH=commands.getoutput(cmd)
|
||||
if XCODE_SELECT_PATH.endswith("/Contents/Developer"):
|
||||
XCODE_BUNDLE=XCODE_SELECT_PATH[:-19]
|
||||
else:
|
||||
XCODE_BUNDLE=XCODE_SELECT_PATH
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
USE_QTKIT=True # Carbon quicktime is not available for 64bit
|
||||
|
||||
|
||||
# Default target OSX settings per architecture
|
||||
# Can be customized
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'ppc' and MAC_CUR_VER == '10.4':
|
||||
# all releases are now made for 10.5 !
|
||||
# MAC_MIN_VERS = '10.3'
|
||||
# MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
# LCGDIR = '#../lib/darwin-6.1-powerpc'
|
||||
# CC = 'gcc-3.3'
|
||||
# CXX = 'g++-3.3'
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.0.0-powerpc'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
elif MACOSX_ARCHITECTURE == 'i386' and MAC_CUR_VER == '10.4':
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
LCGDIR = '#../lib/darwin-8.x.i386'
|
||||
CC = 'gcc-4.0'
|
||||
CXX = 'g++-4.0'
|
||||
else :
|
||||
if 'Mac OS X 10.5' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.5/6 with Xcode 3.x
|
||||
MAC_MIN_VERS = '10.5'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.5'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
elif 'Mac OS X 10.6' in MACOSX_SDK_CHECK:
|
||||
# OSX 10.6/7 with Xcode 4.x
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.6.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc-4.2'
|
||||
CXX = 'g++-4.2'
|
||||
else:
|
||||
# OSX 10.8 with Xcode 4.4 and higher (no 10.6sdk! )
|
||||
MAC_MIN_VERS = '10.6'
|
||||
MACOSX_DEPLOYMENT_TARGET = '10.6'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.7.sdk'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
# gcc always defaults to the system standard compiler linked by a shim or symlink
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
LCGDIR = '#../lib/darwin-9.x.universal'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
if XCODE_CUR_VER >= '4.3': ## since version 4.3, XCode and developer dir are bundled ##
|
||||
MACOSX_SDK = XCODE_BUNDLE + '/Contents/Developer/Platforms/MacOSX.platform' + MACOSX_SDK
|
||||
|
||||
#############################################################################
|
||||
################### Dependency settings ##################
|
||||
#############################################################################
|
||||
|
||||
#Defaults openMP to true if compiler handles it ( only gcc 4.6.1 and newer )
|
||||
# if your compiler does not have accurate suffix you may have to enable it by hand !
|
||||
if CC[:-2].endswith('4.6'):
|
||||
WITH_BF_OPENMP = True # multithreading for fluids, cloth, sculpt and smoke
|
||||
else:
|
||||
WITH_BF_OPENMP = False
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
@@ -26,19 +126,36 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
|
||||
#bz2 is a standard osx dynlib
|
||||
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_OSX_STATICPYTHON = True
|
||||
|
||||
# python 3.4 uses precompiled libraries in bf svn /lib by default
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
if WITH_OSX_STATICPYTHON:
|
||||
# python 3.3 uses precompiled libraries in bf svn /lib by default
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}m'
|
||||
# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
|
||||
# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
|
||||
else:
|
||||
# python 3.2 uses Python-framework additionally installed in /Library/Frameworks
|
||||
|
||||
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}m'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
|
||||
#BF_PYTHON_LIB = ''
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config-${BF_PYTHON_VERSION}m'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
#different lib must be used following version of gcc
|
||||
# for gcc 3.3
|
||||
#BF_OPENAL = LIBDIR + '/openal'
|
||||
# for gcc 3.4 and ulterior
|
||||
if MAC_PROC == 'powerpc':
|
||||
BF_OPENAL = '#../lib/darwin-8.0.0-powerpc/openal'
|
||||
else :
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include' # only headers from libdir needed for proper use of framework !!!!
|
||||
@@ -52,8 +169,6 @@ BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
# we use simply jack framework
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/Library/Frameworks/Jackmp.framework'
|
||||
@@ -70,7 +185,7 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib ${BF_FFMPEG}/lib' #ogg libs are stored i
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL2' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
@@ -84,18 +199,19 @@ BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
#Color Management System
|
||||
WITH_BF_LCMS = False
|
||||
BF_LCMS = LIBDIR + '/lcms'
|
||||
BF_LCMS_INC = '${BF_LCMS}/include'
|
||||
BF_LCMS_LIB = 'lcms'
|
||||
BF_LCMS_LIBPATH = '${BF_LCMS}/lib'
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
@@ -110,7 +226,7 @@ BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
#BF_ZLIB_INC = '${BF_ZLIB}/include' # don't use this, it breaks -isysroot ${MACOSX_SDK}
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
@@ -156,7 +272,7 @@ BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils OpenCOLLADAStreamWriter MathMLSolver GeneratedSaxParser UTF xml2 buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = LIBDIR + '/opencollada'
|
||||
BF_PCRE = LIBDIR + '/opencollada'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
@@ -183,7 +299,7 @@ WITH_BF_LLVM = True
|
||||
BF_LLVM = LIBDIR + '/llvm'
|
||||
BF_LLVM_LIB = 'LLVMBitReader LLVMJIT LLVMipo LLVMVectorize LLVMBitWriter LLVMX86CodeGen LLVMX86Desc LLVMX86Info LLVMX86AsmPrinter ' + \
|
||||
'LLVMX86Utils LLVMSelectionDAG LLVMCodeGen LLVMScalarOpts LLVMInstCombine LLVMTransformUtils LLVMipa LLVMAnalysis LLVMExecutionEngine ' + \
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport LLVMObject'
|
||||
'LLVMTarget LLVMMC LLVMCore LLVMSupport'
|
||||
BF_LLVM_LIBPATH = '${BF_LLVM}/lib'
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
@@ -207,23 +323,20 @@ BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#OpenMP ( will be checked for compiler support and turned off eventually )
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = []
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'i386':
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
else:
|
||||
WITH_BF_RAYOPTIMIZATION = False
|
||||
if MACOSX_ARCHITECTURE == 'i386':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
elif MACOSX_ARCHITECTURE == 'x86_64':
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
|
||||
|
||||
# SpaceNavigator and related 3D mice, driver must be 3DxWare 10 Beta 4 (Mac OS X) or later !
|
||||
WITH_BF_3DMOUSE = True
|
||||
@@ -234,18 +347,66 @@ WITH_BF_3DMOUSE = True
|
||||
|
||||
BF_QUIET = '1' # suppress verbose output
|
||||
|
||||
if MACOSX_ARCHITECTURE == 'x86_64' or MACOSX_ARCHITECTURE == 'ppc64':
|
||||
ARCH_FLAGS = ['-m64']
|
||||
else:
|
||||
ARCH_FLAGS = ['-m32']
|
||||
|
||||
CFLAGS = []
|
||||
CXXFLAGS = []
|
||||
CCFLAGS = ['-pipe','-funsigned-char']
|
||||
CPPFLAGS = []
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']
|
||||
|
||||
LLIBS = ['stdc++']
|
||||
CPPFLAGS = list(ARCH_FLAGS)
|
||||
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
if WITH_GHOST_COCOA:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Cocoa','-framework','Carbon','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = ['-fexceptions','-framework','CoreServices','-framework','Foundation','-framework','IOKit','-framework','AppKit','-framework','Carbon','-framework','AGL','-framework','AudioUnit','-framework','AudioToolbox','-framework','CoreAudio','-framework','OpenAL']+ARCH_FLAGS
|
||||
|
||||
if WITH_BF_QUICKTIME:
|
||||
if USE_QTKIT:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QTKit']
|
||||
else:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
|
||||
|
||||
if not WITH_OSX_STATICPYTHON:
|
||||
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
|
||||
|
||||
|
||||
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
|
||||
#for > 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
|
||||
if MACOSX_SDK.endswith("10.7.sdk") or MACOSX_SDK.endswith("10.8.sdk") or MACOSX_SDK.endswith("10.9.sdk"):
|
||||
LLIBS = ['stdc++']
|
||||
else:
|
||||
LLIBS = ['stdc++', 'SystemStubs']
|
||||
|
||||
# some flags shuffling for different OS versions
|
||||
if MAC_MIN_VERS == '10.3':
|
||||
CCFLAGS = ['-fuse-cxa-atexit'] + CCFLAGS
|
||||
PLATFORM_LINKFLAGS = ['-fuse-cxa-atexit'] + PLATFORM_LINKFLAGS
|
||||
LLIBS.append('crt3.o')
|
||||
|
||||
if USE_SDK:
|
||||
SDK_FLAGS=['-isysroot', MACOSX_SDK,'-mmacosx-version-min='+MAC_MIN_VERS,'-arch',MACOSX_ARCHITECTURE]
|
||||
PLATFORM_LINKFLAGS = ['-mmacosx-version-min='+MAC_MIN_VERS,'-Wl','-isysroot',MACOSX_SDK,'-arch',MACOSX_ARCHITECTURE]+PLATFORM_LINKFLAGS
|
||||
CCFLAGS=SDK_FLAGS+CCFLAGS
|
||||
CXXFLAGS=SDK_FLAGS+CXXFLAGS
|
||||
|
||||
#Intel Macs are CoreDuo and Up
|
||||
if MACOSX_ARCHITECTURE == 'i386' or MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2','-ftree-vectorize','-msse','-msse2','-msse3','-mfpmath=sse']
|
||||
else:
|
||||
CCFLAGS += ['-fno-strict-aliasing']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
# Intel 64bit Macs are Core2Duo and up
|
||||
if MACOSX_ARCHITECTURE == 'x86_64':
|
||||
REL_CCFLAGS += ['-march=core2','-mssse3','-with-tune=core2','-enable-threads']
|
||||
|
||||
CC_WARN = ['-Wall']
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wpointer-arith', '-Wcast-align', '-Wdeclaration-after-statement', '-Wno-unknown-pragmas', '-Wstrict-prototypes']
|
||||
@@ -261,7 +422,7 @@ BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
BF_PROFILE = False
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
#############################################################################
|
||||
################### Output directories ##################
|
||||
|
210
build_files/scons/config/freebsd8-config.py
Normal file
210
build_files/scons/config/freebsd8-config.py
Normal file
@@ -0,0 +1,210 @@
|
||||
CC = 'gcc44'
|
||||
CXX = 'g++44'
|
||||
|
||||
LCGDIR = '../lib/freebsd8'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = ''
|
||||
BF_PYTHON = '/usr/local'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr/local'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
BF_CXX = '/usr/local'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/usr/local'
|
||||
BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = '/usr/local'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr/local'
|
||||
# when compiling with your own openexr lib you might need to set...
|
||||
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr/local'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr/local'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = '/usr/local'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = False
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_FREETYPE = '/usr/local'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
|
||||
### XXX Find what this actually wants; it doesn't want libquicktime.
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = True
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = '/usr/local'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = True
|
||||
BF_OGG = '/usr/local'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/usr/local'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
# BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr/local'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
|
||||
|
||||
WITH_BF_COLLADA = False
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = '/usr'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
|
||||
BF_PCRE = '/usr/local'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
BF_EXPAT = '/usr/local'
|
||||
BF_EXPAT_LIB = 'expat'
|
||||
BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
WITH_GHOST_XDND = False
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
|
||||
CPPFLAGS = []
|
||||
CXXFLAGS = []
|
||||
if WITH_BF_FFMPEG:
|
||||
# libavutil needs UINT64_C()
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
BF_BUILDDIR = '../build/freebsd8'
|
||||
BF_INSTALLDIR='../install/freebsd8'
|
||||
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
210
build_files/scons/config/freebsd9-config.py
Normal file
210
build_files/scons/config/freebsd9-config.py
Normal file
@@ -0,0 +1,210 @@
|
||||
CC = 'gcc44'
|
||||
CXX = 'g++44'
|
||||
|
||||
LCGDIR = '../lib/freebsd9'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON_ABI_FLAGS = ''
|
||||
BF_PYTHON = '/usr/local'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION}${BF_PYTHON_ABI_FLAGS}.a'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = '/usr/local'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'openal'
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
BF_CXX = '/usr/local'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_JACK = True
|
||||
BF_JACK = '/usr/local'
|
||||
BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
BF_SNDFILE = '/usr/local'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include/sndfile'
|
||||
BF_SNDFILE_LIB = 'sndfile'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = '/usr/local' #$(shell sdl-config --prefix)
|
||||
BF_SDL_INC = '${BF_SDL}/include/SDL' #$(shell $(BF_SDL)/bin/sdl-config --cflags)
|
||||
BF_SDL_LIB = 'SDL' #BF_SDL #$(shell $(BF_SDL)/bin/sdl-config --libs) -lSDL_mixer
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = '/usr/local'
|
||||
# when compiling with your own openexr lib you might need to set...
|
||||
# BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR ${BF_OPENEXR}/include'
|
||||
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = 'Half IlmImf Iex Imath '
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
# BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = '/usr/local'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'jpeg'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = '/usr/local'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = '/usr/local'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = '/usr'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'z'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = False
|
||||
WITH_BF_PLAYER = True
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_FREETYPE = '/usr/local'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
|
||||
### XXX Find what this actually wants; it doesn't want libquicktime.
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = True
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = '/usr/local'
|
||||
BF_FFMPEG_LIB = 'avformat avcodec swscale avutil avdevice'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
|
||||
# enable ogg, vorbis and theora in ffmpeg
|
||||
WITH_BF_OGG = True
|
||||
BF_OGG = '/usr/local'
|
||||
BF_OGG_INC = '${BF_OGG}/include'
|
||||
BF_OGG_LIB = 'ogg vorbis vorbisenc theoraenc theoradec'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = True
|
||||
BF_FFTW3 = LIBDIR + '/usr/local'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE = '#extern/libredcode'
|
||||
BF_REDCODE_LIB = ''
|
||||
# BF_REDCODE_INC = '${BF_REDCODE}/include'
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr/local'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIB = 'GL GLU X11 Xi Xxf86vm'
|
||||
BF_OPENGL_LIBPATH = '/usr/X11R6/lib'
|
||||
BF_OPENGL_LIB_STATIC = '${BF_OPENGL_LIBPATH}/libGL.a ${BF_OPENGL_LIBPATH}/libGLU.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a ${BF_OPENGL_LIBPATH}/libX11.a ${BF_OPENGL_LIBPATH}/libXi.a ${BF_OPENGL_LIBPATH}/libXext.a ${BF_OPENGL_LIBPATH}/libXxf86vm.a'
|
||||
|
||||
WITH_BF_COLLADA = False
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
BF_OPENCOLLADA = '/usr'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib'
|
||||
BF_PCRE = '/usr/local'
|
||||
BF_PCRE_LIB = 'pcre'
|
||||
BF_PCRE_LIBPATH = '${BF_PCRE}/lib'
|
||||
BF_EXPAT = '/usr/local'
|
||||
BF_EXPAT_LIB = 'expat'
|
||||
BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
WITH_GHOST_XDND = False
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE','-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = []
|
||||
if WITH_BF_FFMPEG:
|
||||
# libavutil needs UINT64_C()
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
##BF_DEPEND = True
|
||||
##
|
||||
##AR = ar
|
||||
##ARFLAGS = ruv
|
||||
##ARFLAGSQUIET = ru
|
||||
##
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
|
||||
##FIX_STUBS_WARNINGS = -Wno-unused
|
||||
|
||||
LLIBS = ['util', 'c', 'm', 'pthread', 'stdc++']
|
||||
##LOPTS = --dynamic
|
||||
##DYNLDFLAGS = -shared $(LDFLAGS)
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
BF_BUILDDIR = '../build/freebsd9'
|
||||
BF_INSTALLDIR='../install/freebsd9'
|
||||
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
@@ -1,4 +1,4 @@
|
||||
from FindPython import FindPython
|
||||
from Modules.FindPython import FindPython
|
||||
|
||||
py = FindPython()
|
||||
|
||||
@@ -26,8 +26,6 @@ BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = '/usr'
|
||||
BF_JACK_INC = '${BF_JACK}/include/jack'
|
||||
@@ -102,6 +100,10 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
#BF_FREETYPE_LIB_STATIC = '${BF_FREETYPE}/lib/libfreetype.a'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = "/usr"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
@@ -146,7 +148,7 @@ BF_REDCODE_LIB = ''
|
||||
BF_REDCODE_INC = '${BF_REDCODE}/../' #C files request "libredcode/format.h" which is in "#extern/libredcode/format.h", stupid but compiles for now.
|
||||
BF_REDCODE_LIBPATH='${BF_REDCODE}/lib'
|
||||
|
||||
# Mesa Libs should go here if you're using them as well....
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = '/usr'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
@@ -199,7 +201,7 @@ BF_BOOST = '/usr'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'boost_filesystem boost_regex boost_system boost_thread boost_date_time'
|
||||
BF_BOOST_LIB_STATIC = '${BF_BOOST_LIBPATH}/libboost_filesystem.a ${BF_BOOST_LIBPATH}/libboost_date_time.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a ' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_regex.a ${BF_BOOST_LIBPATH}/libboost_locale.a ${BF_BOOST_LIBPATH}/libboost_system.a' + \
|
||||
'${BF_BOOST_LIBPATH}/libboost_thread.a'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
@@ -208,7 +210,7 @@ WITH_BF_CYCLES = WITH_BF_OIIO and WITH_BF_BOOST
|
||||
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = '/usr/local/cuda/bin/nvcc'
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
@@ -228,20 +230,11 @@ BF_3DMOUSE_LIB_STATIC = '${BF_3DMOUSE_LIBPATH}/libspnav.a'
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
WITH_BF_STATICOPENSUBDIV = False
|
||||
BF_OPENSUBDIV = '/usr'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIB_STATIC = '${BF_OPENSUBDIV_LIBPATH}/libosdGPU.a ${BF_OPENSUBDIV_LIBPATH}/libosdCPU.a'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
##
|
||||
CC = 'gcc'
|
||||
CXX = 'g++'
|
||||
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
CFLAGS = ['-std=gnu89']
|
||||
CCFLAGS = ['-pipe','-fPIC','-funsigned-char','-fno-strict-aliasing','-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64','-D_LARGEFILE64_SOURCE']
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = []
|
||||
@@ -252,20 +245,20 @@ if WITH_BF_FFMPEG:
|
||||
CXXFLAGS += ['-D__STDC_CONSTANT_MACROS', ]
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wunused-parameter', '-Wstrict-prototypes', '-Werror=declaration-after-statement', '-Werror=implicit-function-declaration', '-Werror=return-type']
|
||||
CC_WARN = ['-Wall']
|
||||
CXX_WARN = ['-Wno-invalid-offsetof', '-Wno-sign-compare']
|
||||
|
||||
LLIBS = ['util', 'c', 'm', 'dl', 'pthread']
|
||||
LLIBS = ['util', 'c', 'm', 'dl', 'pthread', 'stdc++']
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g']
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
BF_BUILDDIR = '../build/linux'
|
||||
BF_INSTALLDIR='../install/linux'
|
||||
@@ -273,6 +266,6 @@ BF_INSTALLDIR='../install/linux'
|
||||
#Link against pthread
|
||||
PLATFORM_LINKFLAGS = ['-pthread']
|
||||
|
||||
#Fix for LLVM conflict with Mesa llvmpipe, SDL dynload also requires symbols to be hidden.
|
||||
# TODO(sergey): Move this to SConstruct, so we can have this line depended on user config.
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
||||
#Fix for LLVM conflict with Mesa llvmpipe
|
||||
if WITH_BF_LLVM:
|
||||
PLATFORM_LINKFLAGS += ['-Wl,--version-script=source/creator/blender.map']
|
||||
|
193
build_files/scons/config/linuxcross-config.py
Normal file
193
build_files/scons/config/linuxcross-config.py
Normal file
@@ -0,0 +1,193 @@
|
||||
LCGDIR = '#../lib/windows'
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python31'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
WITH_BF_STATICOPENAL = False
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include'
|
||||
BF_OPENAL_LIB = 'OpenAL32 wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENAL_LIB_STATIC = '${BF_OPENAL}/lib/libopenal.a'
|
||||
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_CXX = '/usr'
|
||||
WITH_BF_STATICCXX = False
|
||||
BF_CXX_LIB_STATIC = '${BF_CXX}/lib/libstdc++.a'
|
||||
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
BF_JACK_LIB = 'jack'
|
||||
BF_JACK_LIBPATH = '${BF_JACK}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = False
|
||||
BF_SNDFILE = LIBDIR + '/sndfile'
|
||||
BF_SNDFILE_INC = '${BF_SNDFILE}/include'
|
||||
BF_SNDFILE_LIB = 'sndfile-1'
|
||||
BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
BF_PTHREADS_INC = '${BF_PTHREADS}/include'
|
||||
BF_PTHREADS_LIB = 'pthreadGC2'
|
||||
BF_PTHREADS_LIBPATH = '${BF_PTHREADS}/lib'
|
||||
|
||||
WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/gcc/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
|
||||
BF_OPENEXR_LIB = ' Half IlmImf Iex IlmThread '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
# Warning, this static lib configuration is untested! users of this OS please confirm.
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
WITH_BF_DDS = True
|
||||
|
||||
WITH_BF_JPEG = True
|
||||
BF_JPEG = LIBDIR + '/jpeg'
|
||||
BF_JPEG_INC = '${BF_JPEG}/include'
|
||||
BF_JPEG_LIB = 'libjpeg'
|
||||
BF_JPEG_LIBPATH = '${BF_JPEG}/lib'
|
||||
|
||||
WITH_BF_PNG = True
|
||||
BF_PNG = LIBDIR + '/png'
|
||||
BF_PNG_INC = '${BF_PNG}/include'
|
||||
BF_PNG_LIB = 'png'
|
||||
BF_PNG_LIBPATH = '${BF_PNG}/lib'
|
||||
|
||||
WITH_BF_TIFF = True
|
||||
BF_TIFF = LIBDIR + '/gcc/tiff'
|
||||
BF_TIFF_INC = '${BF_TIFF}/include'
|
||||
BF_TIFF_LIB = 'tiff'
|
||||
BF_TIFF_LIBPATH = '${BF_TIFF}/lib'
|
||||
|
||||
WITH_BF_ZLIB = True
|
||||
BF_ZLIB = LIBDIR + '/zlib'
|
||||
BF_ZLIB_INC = '${BF_ZLIB}/include'
|
||||
BF_ZLIB_LIB = 'libz_st'
|
||||
BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
|
||||
|
||||
WITH_BF_INTERNATIONAL = True
|
||||
|
||||
WITH_BF_GAMEENGINE = True
|
||||
WITH_BF_PLAYER = False
|
||||
WITH_BF_OCEANSIM = True
|
||||
|
||||
WITH_BF_BULLET = True
|
||||
BF_BULLET = '#extern/bullet2/src'
|
||||
BF_BULLET_INC = '${BF_BULLET}'
|
||||
BF_BULLET_LIB = 'extern_bullet'
|
||||
|
||||
BF_WINTAB = LIBDIR + '/wintab'
|
||||
BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
|
||||
|
||||
BF_WITH_FREETYPE = True
|
||||
BF_FREETYPE = LIBDIR + '/gcc/freetype'
|
||||
BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/gcc/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_BINRELOC = False
|
||||
|
||||
# enable ffmpeg support
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR + '/ffmpeg'
|
||||
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include'
|
||||
BF_FFMPEG_LIBPATH = '${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
BF_OPENJPEG_INC = '${BF_OPENJPEG}'
|
||||
BF_OPENJPEG_LIBPATH='${BF_OPENJPEG}/lib'
|
||||
|
||||
WITH_BF_FFTW3 = False
|
||||
BF_FFTW3 = LIBDIR + '/gcc/fftw3'
|
||||
BF_FFTW3_INC = '${BF_FFTW3}/include'
|
||||
BF_FFTW3_LIB = 'fftw3'
|
||||
BF_FFTW3_LIBPATH = '${BF_FFTW3}/lib'
|
||||
|
||||
WITH_BF_REDCODE = False
|
||||
BF_REDCODE_INC = '#extern'
|
||||
|
||||
# Mesa Libs should go here if your using them as well....
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL = 'C:\\MingW'
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
BF_OPENGL_LIB = 'opengl32 glu32'
|
||||
BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a']
|
||||
|
||||
WITH_BF_OPENMP = False
|
||||
BF_OPENMP = LIBDIR + '/gcc/gomp'
|
||||
BF_OPENMP_INC = '${BF_OPENMP}/include'
|
||||
BF_OPENMP_LIBPATH = '${BF_OPENMP}/lib'
|
||||
|
||||
WITH_BF_COLLADA = False
|
||||
BF_COLLADA = '#source/blender/collada'
|
||||
BF_COLLADA_INC = '${BF_COLLADA}'
|
||||
BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/gcc/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser UTF MathMLSolver expat pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib ${BF_ICONV_LIBPATH}'
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
|
||||
CCFLAGS = [ '-pipe', '-funsigned-char', '-fno-strict-aliasing' ]
|
||||
CXXFLAGS = []
|
||||
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
C_WARN = ['-Wall', '-Wstrict-prototypes', '-Wno-char-subscripts', '-Wdeclaration-after-statement']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = [ '-ldxguid', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++', '-luuid', '-lole32'] #'-lutil', '-lc', '-lm', '-ldl', '-lpthread' ]
|
||||
|
||||
PLATFORM_LINKFLAGS = ['--stack,2097152']
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS = ['-g', '-D_DEBUG']
|
||||
|
||||
BF_PROFILE = False
|
||||
BF_PROFILE_CCFLAGS = ['-pg','-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
||||
BF_BUILDDIR = '../build/linuxcross'
|
||||
BF_INSTALLDIR='../install/linuxcross'
|
@@ -2,12 +2,12 @@ LCGDIR = '#../lib/mingw32'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = 'python33'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
BF_PYTHON_LIB_STATIC = '${BF_PYTHON}/lib/libpython${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}.a'
|
||||
|
||||
@@ -18,12 +18,10 @@ BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG_LIB = 'avformat-55 avcodec-55 avdevice-55 avutil-52 swscale-2'
|
||||
BF_FFMPEG_LIB = 'avformat-53 avcodec-53 avdevice-53 avutil-51 swscale-2'
|
||||
BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
@@ -114,6 +112,10 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = '/usr/local'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/include'
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
@@ -147,7 +149,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
@@ -168,24 +170,16 @@ BF_BOOST_LIB = 'boost_date_time-mgw46-mt-s-1_49 boost_filesystem-mgw46-mt-s-1_49
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'boost_locale-mgw46-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30']
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
@@ -200,16 +194,13 @@ CXXFLAGS = []
|
||||
CPPFLAGS = ['-DWIN32', '-DFREE_WINDOWS', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2']
|
||||
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
@@ -218,7 +209,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
@@ -3,13 +3,12 @@ import subprocess
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/windows_vc12'
|
||||
if "17.00." in CL_STDERR:
|
||||
VC_VERSION = '11.0'
|
||||
LCGDIR = '#../lib/windows_vc11'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
VC_VERSION = '9.0'
|
||||
LCGDIR = '#../lib/windows'
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
@@ -17,23 +16,28 @@ WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc'
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
|
||||
else:
|
||||
BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIB = 'python33'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
else:
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_ICONV = True
|
||||
@@ -42,8 +46,6 @@ BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
BF_ICONV_LIB = 'iconv'
|
||||
BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc'
|
||||
@@ -59,7 +61,10 @@ BF_SNDFILE_LIBPATH = '${BF_SNDFILE}/lib'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_SDL_LIB = 'SDL.lib dxguid.lib'
|
||||
else:
|
||||
BF_SDL_LIB = 'SDL.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
@@ -71,7 +76,7 @@ WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
@@ -128,6 +133,12 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
|
||||
BF_FREETYPE_LIB = 'freetype2ST'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
BF_QUICKTIME = LIBDIR + '/QTDevWin'
|
||||
BF_QUICKTIME_INC = '${BF_QUICKTIME}/CIncludes'
|
||||
BF_QUICKTIME_LIB = 'qtmlClient'
|
||||
BF_QUICKTIME_LIBPATH = '${BF_QUICKTIME}/Libraries'
|
||||
|
||||
WITH_BF_OPENJPEG = True
|
||||
BF_OPENJPEG = '#extern/libopenjpeg'
|
||||
BF_OPENJPEG_LIB = ''
|
||||
@@ -150,11 +161,9 @@ BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -194,14 +203,23 @@ WITH_BF_STATICOCIO = True
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
|
||||
else:
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = 'libboost_locale-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
|
||||
# Workaround for ptxas.exe crash on VS2012 and cuda 5.5
|
||||
if VC_VERSION == '11.0':
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30']
|
||||
else:
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
@@ -210,12 +228,6 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['/arch:SSE']
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
@@ -227,28 +239,22 @@ BF_OPENGL_LIB_STATIC = [ '${BF_OPENGL}/lib/libGL.a', '${BF_OPENGL}/lib/libGLU.a'
|
||||
CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267', '/we4013']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast', '/arch:SSE']
|
||||
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
BF_DEBUG_CCFLAGS = ['/Zi', '/Ob0', '/Od', '/FR${TARGET}.sbr']
|
||||
|
||||
CPPFLAGS = ['-DWIN32','-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/INCREMENTAL:NO', '/LARGEADDRESSAWARE', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
@@ -259,6 +265,9 @@ PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:IX86','/STACK:2097152','/IN
|
||||
|
||||
BF_BSC=False
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_BUILDDIR = '..\\build\\win32-vc11'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc11'
|
||||
else:
|
||||
BF_BUILDDIR = '..\\build\\win32-vc'
|
||||
BF_INSTALLDIR='..\\install\\win32-vc'
|
||||
|
@@ -2,12 +2,12 @@ LCGDIR = '#../lib/mingw64'
|
||||
LIBDIR = "${LCGDIR}"
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
WITH_BF_STATICPYTHON = False
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}mw'
|
||||
BF_PYTHON_DLL = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_DLL = 'python33'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
@@ -22,8 +22,6 @@ BF_FFMPEG_LIBPATH = LIBDIR + '/ffmpeg/lib'
|
||||
BF_FFMPEG_INC = LIBDIR + '/ffmpeg/include'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll ${BF_FFMPEG_LIBPATH}/xvidcore.dll'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
BF_JACK = LIBDIR + '/jack'
|
||||
BF_JACK_INC = '${BF_JACK}/include'
|
||||
@@ -113,6 +111,8 @@ BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2/'
|
||||
BF_FREETYPE_LIB = 'freetype'
|
||||
BF_FREETYPE_LIBPATH = '${BF_FREETYPE}/lib'
|
||||
|
||||
WITH_BF_QUICKTIME = False
|
||||
|
||||
WITH_BF_ICONV = False
|
||||
BF_ICONV = LIBDIR + "/iconv"
|
||||
BF_ICONV_INC = '${BF_ICONV}/include'
|
||||
@@ -146,7 +146,7 @@ BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
WITH_BF_CYCLES = True
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
BF_CYCLES_CUDA_NVCC = "" # Path to the NVIDIA CUDA compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
WITH_BF_OIIO = True
|
||||
BF_OIIO = LIBDIR + '/openimageio'
|
||||
@@ -167,19 +167,12 @@ BF_BOOST_LIB = 'boost_date_time-mgw47-mt-s-1_49 boost_date_time-mgw47-mt-sd-1_49
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' boost_locale-mgw47-mt-s-1_49 boost_locale-mgw47-mt-sd-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
WITH_BF_OPENSUBDIV = False
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
BF_RAYOPTIMIZATION_SSE_FLAGS = ['-mmmx', '-msse', '-msse2']
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
#May produce errors with unsupported MinGW-w64 builds
|
||||
WITH_BF_OPENMP = False
|
||||
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
@@ -194,17 +187,13 @@ CXXFLAGS = [ '-fpermissive' ]
|
||||
CPPFLAGS = ['-DWIN32', '-DMS_WIN64', '-DFREE_WINDOWS', '-DFREE_WINDOWS64', '-D_LARGEFILE_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE64_SOURCE', '-DBOOST_ALL_NO_LIB', '-DBOOST_THREAD_USE_LIB', '-DGLEW_STATIC', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '-ftree-vectorize']
|
||||
REL_CCFLAGS = ['-DNDEBUG', '-O2', '-ftree-vectorize']
|
||||
|
||||
# NOTE: C_WARN seems to get ignored - at least -Wno-char-subscripts doesn't work!
|
||||
C_WARN = ['-Wno-char-subscripts', '-Wdeclaration-after-statement', '-Wstrict-prototypes']
|
||||
|
||||
CC_WARN = [ '-Wall', '-Wno-char-subscripts' ]
|
||||
CC_WARN = [ '-Wall' ]
|
||||
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread', '-ldbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('-limm32')
|
||||
LLIBS = ['-lshell32', '-lshfolder', '-lgdi32', '-lmsvcrt', '-lwinmm', '-lmingw32', '-lm', '-lws2_32', '-lz', '-lstdc++','-lole32','-luuid', '-lwsock32', '-lpsapi', '-lpthread']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
|
||||
@@ -213,7 +202,7 @@ PLATFORM_LINKFLAGS = ['-Xlinker', '--stack=2097152']
|
||||
# PLATFORM_LINKFLAGS += ["-static-libgcc", "-static-libstdc++"]
|
||||
|
||||
BF_DEBUG = False
|
||||
BF_DEBUG_CCFLAGS= ['-g']
|
||||
BF_DEBUG_CCFLAGS= ['-g', '-D_DEBUG']
|
||||
|
||||
BF_PROFILE_CCFLAGS = ['-pg', '-g']
|
||||
BF_PROFILE_LINKFLAGS = ['-pg']
|
||||
|
@@ -3,38 +3,42 @@ import subprocess
|
||||
CL_OUT = subprocess.Popen(["cl.exe"],stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||
CL_STDOUT, CL_STDERR = CL_OUT.communicate()
|
||||
|
||||
if "18.00." in CL_STDERR:
|
||||
VC_VERSION = '12.0'
|
||||
LCGDIR = '#../lib/win64_vc12'
|
||||
if "17.00." in CL_STDERR:
|
||||
VC_VERSION = '11.0'
|
||||
LCGDIR = '#../lib/win64_vc11'
|
||||
else:
|
||||
import sys
|
||||
print("Visual C version not supported {}\n".format(CL_STDERR))
|
||||
sys.exit(1)
|
||||
|
||||
VC_VERSION = '9.0'
|
||||
LCGDIR = '#../lib/win64'
|
||||
|
||||
LIBDIR = '${LCGDIR}'
|
||||
|
||||
WITH_BF_FFMPEG = True
|
||||
BF_FFMPEG = LIBDIR +'/ffmpeg'
|
||||
BF_FFMPEG_INC = '${BF_FFMPEG}/include ${BF_FFMPEG}/include/msvc '
|
||||
BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
BF_FFMPEG_LIB = 'avformat-55.lib avcodec-55.lib avdevice-55.lib avutil-52.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-55.dll ${BF_FFMPEG_LIBPATH}/avcodec-55.dll ${BF_FFMPEG_LIBPATH}/avdevice-55.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_FFMPEG_LIB = 'avformat-54.lib avcodec-54.lib avdevice-54.lib avutil-52.lib avfilter-3.lib swscale-2.lib swresample-0.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-54.dll ${BF_FFMPEG_LIBPATH}/avcodec-54.dll ${BF_FFMPEG_LIBPATH}/avdevice-54.dll ${BF_FFMPEG_LIBPATH}/avutil-52.dll ${BF_FFMPEG_LIBPATH}/avfilter-3.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll ${BF_FFMPEG_LIBPATH}/swresample-0.dll'
|
||||
else:
|
||||
BF_FFMPEG_LIB = 'avformat-53.lib avcodec-53.lib avdevice-53.lib avutil-51.lib swscale-2.lib'
|
||||
BF_FFMPEG_DLL = '${BF_FFMPEG_LIBPATH}/avformat-53.dll ${BF_FFMPEG_LIBPATH}/avcodec-53.dll ${BF_FFMPEG_LIBPATH}/avdevice-53.dll ${BF_FFMPEG_LIBPATH}/avutil-51.dll ${BF_FFMPEG_LIBPATH}/swscale-2.dll'
|
||||
|
||||
|
||||
BF_PYTHON = LIBDIR + '/python'
|
||||
BF_PYTHON_VERSION = '3.4'
|
||||
BF_PYTHON_VERSION = '3.3'
|
||||
BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
|
||||
BF_PYTHON_BINARY = 'python'
|
||||
BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION[0]}${BF_PYTHON_VERSION[2]}'
|
||||
BF_PYTHON_LIB = 'python33'
|
||||
BF_PYTHON_DLL = '${BF_PYTHON_LIB}'
|
||||
BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib'
|
||||
|
||||
WITH_BF_PYTHON_INSTALL_NUMPY = True
|
||||
|
||||
WITH_BF_OPENAL = True
|
||||
BF_OPENAL = LIBDIR + '/openal'
|
||||
BF_OPENAL_INC = '${BF_OPENAL}/include '
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_OPENAL_LIB = 'OpenAL32'
|
||||
else:
|
||||
BF_OPENAL_LIB = 'wrap_oal'
|
||||
BF_OPENAL_LIBPATH = '${BF_OPENAL}/lib'
|
||||
|
||||
WITH_BF_SNDFILE = True
|
||||
@@ -52,11 +56,12 @@ BF_ICONV_LIBPATH = '${BF_ICONV}/lib'
|
||||
WITH_BF_SDL = True
|
||||
BF_SDL = LIBDIR + '/sdl'
|
||||
BF_SDL_INC = '${BF_SDL}/include'
|
||||
BF_SDL_LIB = 'SDL2.lib'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_SDL_LIB = 'SDL.lib dxguid.lib'
|
||||
else:
|
||||
BF_SDL_LIB = 'SDL.lib'
|
||||
BF_SDL_LIBPATH = '${BF_SDL}/lib'
|
||||
|
||||
WITH_BF_AUDASPACE = True
|
||||
|
||||
WITH_BF_JACK = False
|
||||
|
||||
BF_PTHREADS = LIBDIR + '/pthreads'
|
||||
@@ -68,7 +73,7 @@ WITH_BF_OPENEXR = True
|
||||
WITH_BF_STATICOPENEXR = False
|
||||
BF_OPENEXR = LIBDIR + '/openexr'
|
||||
BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR '
|
||||
BF_OPENEXR_LIB = ' Iex-2_2 Half IlmImf-2_2 Imath-2_2 IlmThread-2_2 '
|
||||
BF_OPENEXR_LIB = ' Iex Half IlmImf Imath IlmThread '
|
||||
BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
|
||||
BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
|
||||
|
||||
@@ -153,11 +158,9 @@ BF_COLLADA_LIB = 'bf_collada'
|
||||
|
||||
BF_OPENCOLLADA = LIBDIR + '/opencollada'
|
||||
BF_OPENCOLLADA_INC = '${BF_OPENCOLLADA}/include/opencollada'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa'
|
||||
BF_OPENCOLLADA_LIB = 'OpenCOLLADAStreamWriter OpenCOLLADASaxFrameworkLoader OpenCOLLADAFramework OpenCOLLADABaseUtils GeneratedSaxParser MathMLSolver xml pcre buffer ftoa UTF'
|
||||
BF_OPENCOLLADA_LIBPATH = '${BF_OPENCOLLADA}/lib/opencollada'
|
||||
|
||||
WITH_BF_IME = True
|
||||
|
||||
WITH_BF_3DMOUSE = True
|
||||
|
||||
WITH_BF_OPENMP = True
|
||||
@@ -184,7 +187,7 @@ WITH_BF_OIIO = True
|
||||
BF_OIIO = '${LIBDIR}/openimageio'
|
||||
BF_OIIO_INC = '${BF_OIIO}/include'
|
||||
BF_OIIO_LIBPATH = '${BF_OIIO}/lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib ${BF_OIIO_LIBPATH}/OpenImageIO_Util.lib'
|
||||
BF_OIIO_LIB_STATIC = '${BF_OIIO_LIBPATH}/OpenImageIO.lib'
|
||||
WITH_BF_STATICOIIO = True
|
||||
|
||||
WITH_BF_OCIO = True
|
||||
@@ -197,14 +200,18 @@ WITH_BF_STATICOCIO = True
|
||||
WITH_BF_BOOST = True
|
||||
BF_BOOST = '${LIBDIR}/boost'
|
||||
BF_BOOST_INC = '${BF_BOOST}/include'
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc120-mt-s-1_55 libboost_filesystem-vc120-mt-s-1_55 libboost_regex-vc120-mt-s-1_55 libboost_system-vc120-mt-s-1_55 libboost_thread-vc120-mt-s-1_55 libboost_wave-vc120-mt-s-1_55'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc120-mt-s-1_55'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc110-mt-s-1_53 libboost_filesystem-vc110-mt-s-1_53 libboost_regex-vc110-mt-s-1_53 libboost_system-vc110-mt-s-1_53 libboost_thread-vc110-mt-s-1_53 libboost_wave-vc110-mt-s-1_53'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc110-mt-s-1_53'
|
||||
else:
|
||||
BF_BOOST_LIB = 'libboost_date_time-vc90-mt-s-1_49 libboost_filesystem-vc90-mt-s-1_49 libboost_regex-vc90-mt-s-1_49 libboost_system-vc90-mt-s-1_49 libboost_thread-vc90-mt-s-1_49 libboost_wave-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIB_INTERNATIONAL = ' libboost_locale-vc90-mt-s-1_49'
|
||||
BF_BOOST_LIBPATH = '${BF_BOOST}/lib'
|
||||
|
||||
#CUDA
|
||||
WITH_BF_CYCLES_CUDA_BINARIES = False
|
||||
#BF_CYCLES_CUDA_NVCC = "" # Path to the nvidia compiler
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35', 'sm_50', 'sm_52']
|
||||
BF_CYCLES_CUDA_BINARIES_ARCH = ['sm_20', 'sm_21', 'sm_30', 'sm_35']
|
||||
|
||||
#Ray trace optimization
|
||||
WITH_BF_RAYOPTIMIZATION = True
|
||||
@@ -214,12 +221,6 @@ BF_RAYOPTIMIZATION_SSE_FLAGS = ['']
|
||||
#Freestyle
|
||||
WITH_BF_FREESTYLE = True
|
||||
|
||||
WITH_BF_OPENSUBDIV = True
|
||||
BF_OPENSUBDIV = LIBDIR + '/opensubdiv'
|
||||
BF_OPENSUBDIV_INC = '${BF_OPENSUBDIV}/include'
|
||||
BF_OPENSUBDIV_LIB = 'osdCPU osdGPU'
|
||||
BF_OPENSUBDIV_LIBPATH = '${BF_OPENSUBDIV}/lib'
|
||||
|
||||
WITH_BF_STATICOPENGL = False
|
||||
BF_OPENGL_INC = '${BF_OPENGL}/include'
|
||||
BF_OPENGL_LIBINC = '${BF_OPENGL}/lib'
|
||||
@@ -231,13 +232,7 @@ CC = 'cl.exe'
|
||||
CXX = 'cl.exe'
|
||||
|
||||
CFLAGS = []
|
||||
CCFLAGS = ['/nologo', '/J', '/W3', '/Gd', '/w34062', '/wd4018', '/wd4065', '/wd4127', '/wd4181', '/wd4200', '/wd4244', '/wd4267', '/wd4305', '/wd4800', '/we4013', '/we4431']
|
||||
|
||||
# We want to support Vista level ABI for x64
|
||||
if VC_VERSION == '12.0':
|
||||
CCFLAGS.append('/D_WIN32_WINNT=0x600')
|
||||
CCFLAGS.append('/DOIIO_STATIC_BUILD') # OIIO api changed with 1.4 making this needed
|
||||
|
||||
CCFLAGS = ['/nologo', '/J', '/W1', '/Gd', '/we4013', '/wd4018', '/wd4244', '/wd4305', '/wd4800', '/wd4065', '/wd4267']
|
||||
CXXFLAGS = ['/EHsc']
|
||||
BGE_CXXFLAGS = ['/O2', '/Ob2', '/EHsc', '/GR', '/fp:fast']
|
||||
|
||||
@@ -246,19 +241,18 @@ BF_DEBUG_CCFLAGS = ['/Zi', '/FR${TARGET}.sbr', '/Od', '/Ob0']
|
||||
CPPFLAGS = ['-DWIN32', '-D_CONSOLE', '-D_LIB', '-D_CRT_SECURE_NO_DEPRECATE', '-DOPJ_STATIC']
|
||||
REL_CFLAGS = []
|
||||
REL_CXXFLAGS = []
|
||||
REL_CCFLAGS = ['-O2', '/Ob2']
|
||||
REL_CCFLAGS = ['-O2', '/Ob2', '-DNDEBUG']
|
||||
|
||||
C_WARN = []
|
||||
CC_WARN = []
|
||||
CXX_WARN = []
|
||||
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi', 'Dbghelp']
|
||||
|
||||
if WITH_BF_IME:
|
||||
LLIBS.append('imm32')
|
||||
LLIBS = ['ws2_32', 'vfw32', 'winmm', 'kernel32', 'user32', 'gdi32', 'comdlg32', 'advapi32', 'shfolder', 'shell32', 'ole32', 'oleaut32', 'uuid', 'psapi']
|
||||
|
||||
PLATFORM_LINKFLAGS = ['/SUBSYSTEM:CONSOLE','/MACHINE:X64','/STACK:2097152','/OPT:NOREF','/INCREMENTAL:NO', '/NODEFAULTLIB:msvcrt.lib', '/NODEFAULTLIB:msvcmrt.lib', '/NODEFAULTLIB:msvcurt.lib', '/NODEFAULTLIB:msvcrtd.lib']
|
||||
|
||||
BF_CYCLES_CUDA_ENV="C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\SetEnv.cmd"
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
||||
if VC_VERSION == '11.0':
|
||||
BF_BUILDDIR = '..\\build\\win64-vc11'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc11'
|
||||
else:
|
||||
BF_BUILDDIR = '..\\build\\win64-vc'
|
||||
BF_INSTALLDIR='..\\install\\win64-vc'
|
||||
|
@@ -15,8 +15,8 @@ to kill any code duplication
|
||||
"""
|
||||
|
||||
import os
|
||||
import os.path
|
||||
import string
|
||||
import ctypes as ct
|
||||
import glob
|
||||
import time
|
||||
import sys
|
||||
@@ -51,8 +51,10 @@ program_list = [] # A list holding Nodes to final binaries, used to create insta
|
||||
arguments = None
|
||||
targets = None
|
||||
resources = []
|
||||
allowed_bitnesses = {4 : 32, 8 : 64} # only expecting 32-bit or 64-bit
|
||||
bitness = allowed_bitnesses[ct.sizeof(ct.c_void_p)]
|
||||
bitness = 0
|
||||
|
||||
#some internals
|
||||
blenderdeps = [] # don't manipulate this one outside this module!
|
||||
|
||||
##### LIB STUFF ##########
|
||||
|
||||
@@ -143,7 +145,7 @@ def setup_staticlibs(lenv):
|
||||
libincs += Split(lenv['BF_FREETYPE_LIBPATH'])
|
||||
if lenv['WITH_BF_PYTHON']:
|
||||
libincs += Split(lenv['BF_PYTHON_LIBPATH'])
|
||||
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
|
||||
if lenv['WITH_BF_SDL']:
|
||||
libincs += Split(lenv['BF_SDL_LIBPATH'])
|
||||
if lenv['WITH_BF_JACK'] and not lenv['WITH_BF_JACK_DYNLOAD']:
|
||||
libincs += Split(lenv['BF_JACK_LIBPATH'])
|
||||
@@ -216,16 +218,16 @@ def setup_staticlibs(lenv):
|
||||
if lenv['WITH_BF_STATICOCIO']:
|
||||
statlibs += Split(lenv['BF_OCIO_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL']:
|
||||
libincs += Split(lenv['BF_OSL_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICOSL']:
|
||||
statlibs += Split(lenv['BF_OSL_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_BOOST']:
|
||||
libincs += Split(lenv['BF_BOOST_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICBOOST']:
|
||||
statlibs += Split(lenv['BF_BOOST_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL']:
|
||||
libincs += Split(lenv['BF_OSL_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICOSL']:
|
||||
statlibs += Split(lenv['BF_OSL_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_LLVM']:
|
||||
libincs += Split(lenv['BF_LLVM_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICLLVM']:
|
||||
@@ -242,22 +244,12 @@ def setup_staticlibs(lenv):
|
||||
if lenv['WITH_BF_STATIC3DMOUSE']:
|
||||
statlibs += Split(lenv['BF_3DMOUSE_LIB_STATIC'])
|
||||
|
||||
if lenv['WITH_BF_OPENSUBDIV']:
|
||||
libincs += Split(lenv['BF_OPENSUBDIV_LIBPATH'])
|
||||
if lenv['WITH_BF_STATICOPENSUBDIV']:
|
||||
statlibs += Split(lenv['BF_OPENSUBDIV_LIB_STATIC'])
|
||||
|
||||
# setting this last so any overriding of manually libs could be handled
|
||||
if lenv['OURPLATFORM'] not in ('win32-vc', 'win32-mingw', 'win64-vc', 'linuxcross', 'win64-mingw'):
|
||||
# We must remove any previous items defining this path, for same reason stated above!
|
||||
libincs = [e for e in libincs if SCons.Subst.scons_subst(e, lenv, gvars=lenv.Dictionary()) != "/usr/lib"]
|
||||
libincs.append('/usr/lib')
|
||||
|
||||
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
|
||||
# Here we only store library path, actual library name will be added in setup_syslibs()
|
||||
for syslib in create_blender_liblist(lenv, 'system'):
|
||||
libincs.append(os.path.dirname(syslib))
|
||||
|
||||
return statlibs, libincs
|
||||
|
||||
def setup_syslibs(lenv):
|
||||
@@ -273,7 +265,7 @@ def setup_syslibs(lenv):
|
||||
if lenv['WITH_BF_OPENAL']:
|
||||
if not lenv['WITH_BF_STATICOPENAL']:
|
||||
syslibs += Split(lenv['BF_OPENAL_LIB'])
|
||||
if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc' and lenv['C_COMPILER_ID'] != 'clang' and not lenv['WITH_BF_STATICOPENMP']:
|
||||
if lenv['WITH_BF_OPENMP'] and lenv['CC'] != 'icc' and not lenv['WITH_BF_STATICOPENMP']:
|
||||
if lenv['CC'] == 'cl.exe':
|
||||
syslibs += ['vcomp']
|
||||
else:
|
||||
@@ -308,7 +300,7 @@ def setup_syslibs(lenv):
|
||||
if lenv['WITH_BF_ELTOPO']:
|
||||
syslibs += Split(lenv['BF_LAPACK_LIB'])
|
||||
'''
|
||||
if lenv['WITH_BF_SDL'] and not lenv['WITH_BF_SDL_DYNLOAD']:
|
||||
if lenv['WITH_BF_SDL']:
|
||||
syslibs += Split(lenv['BF_SDL_LIB'])
|
||||
if not lenv['WITH_BF_STATICOPENGL']:
|
||||
syslibs += Split(lenv['BF_OPENGL_LIB'])
|
||||
@@ -330,16 +322,16 @@ def setup_syslibs(lenv):
|
||||
if lenv['WITH_BF_3DMOUSE']:
|
||||
if not lenv['WITH_BF_STATIC3DMOUSE']:
|
||||
syslibs += Split(lenv['BF_3DMOUSE_LIB'])
|
||||
|
||||
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB'])
|
||||
|
||||
if lenv['WITH_BF_INTERNATIONAL']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
|
||||
|
||||
if lenv['WITH_BF_CYCLES_OSL'] and not lenv['WITH_BF_STATICOSL']:
|
||||
syslibs += Split(lenv['BF_OSL_LIB'])
|
||||
|
||||
if lenv['WITH_BF_BOOST'] and not lenv['WITH_BF_STATICBOOST']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB'])
|
||||
|
||||
if lenv['WITH_BF_INTERNATIONAL']:
|
||||
syslibs += Split(lenv['BF_BOOST_LIB_INTERNATIONAL'])
|
||||
|
||||
if lenv['WITH_BF_LLVM'] and not lenv['WITH_BF_STATICLLVM']:
|
||||
syslibs += Split(lenv['BF_LLVM_LIB'])
|
||||
|
||||
@@ -349,17 +341,6 @@ def setup_syslibs(lenv):
|
||||
if not lenv['WITH_BF_STATICPNG']:
|
||||
syslibs += Split(lenv['BF_PNG_LIB'])
|
||||
|
||||
if lenv['WITH_BF_OPENSUBDIV']:
|
||||
if not lenv['WITH_BF_STATICOPENSUBDIV']:
|
||||
if lenv['BF_DEBUG'] and lenv['OURPLATFORM'] in ('win32-vc', 'win64-vc', 'win32-mingw', 'win64-mingw'):
|
||||
syslibs += [osdlib+'_d' for osdlib in Split(lenv['BF_OPENSUBDIV_LIB'])]
|
||||
else:
|
||||
syslibs += Split(lenv['BF_OPENSUBDIV_LIB'])
|
||||
|
||||
# Hack to pass OSD libraries to linker before extern_{clew,cuew}
|
||||
for syslib in create_blender_liblist(lenv, 'system'):
|
||||
syslibs.append(os.path.basename(syslib))
|
||||
|
||||
syslibs += lenv['LLIBS']
|
||||
|
||||
return syslibs
|
||||
@@ -384,7 +365,7 @@ def propose_priorities():
|
||||
def creator(env):
|
||||
sources = ['creator.c']# + Blender.buildinfo(env, "dynamic") + Blender.resources
|
||||
|
||||
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/depsgraph', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
|
||||
incs = ['#/intern/guardedalloc', '#/source/blender/blenlib', '#/source/blender/blenkernel', '#/source/blender/editors/include', '#/source/blender/blenloader', '#/source/blender/imbuf', '#/source/blender/renderconverter', '#/source/blender/render/extern/include', '#/source/blender/windowmanager', '#/source/blender/makesdna', '#/source/blender/makesrna', '#/source/gameengine/BlenderRoutines', '#/extern/glew/include', '#/source/blender/gpu', env['BF_OPENGL_INC']]
|
||||
|
||||
defs = []
|
||||
|
||||
@@ -393,19 +374,12 @@ def creator(env):
|
||||
defs.append('WITH_BINRELOC')
|
||||
|
||||
if env['WITH_BF_SDL']:
|
||||
if env['WITH_BF_SDL_DYNLOAD']:
|
||||
defs.append('WITH_SDL_DYNLOAD')
|
||||
incs.append('#/extern/sdlew/include')
|
||||
defs.append('WITH_SDL')
|
||||
|
||||
if env['WITH_BF_LIBMV']:
|
||||
incs.append('#/extern/libmv')
|
||||
defs.append('WITH_LIBMV')
|
||||
|
||||
if env['WITH_BF_CYCLES'] and env['WITH_BF_CYCLES_LOGGING']:
|
||||
incs.append('#/intern/cycles/blender')
|
||||
defs.append('WITH_CYCLES_LOGGING')
|
||||
|
||||
if env['WITH_BF_FFMPEG']:
|
||||
defs.append('WITH_FFMPEG')
|
||||
|
||||
@@ -434,71 +408,11 @@ def buildinfo(lenv, build_type):
|
||||
"""
|
||||
Generate a buildinfo object
|
||||
"""
|
||||
import subprocess
|
||||
|
||||
build_date = time.strftime ("%Y-%m-%d")
|
||||
build_time = time.strftime ("%H:%M:%S")
|
||||
|
||||
if os.path.isdir(os.path.abspath('.git')):
|
||||
try:
|
||||
build_commit_timestamp = btools.get_command_output(args=['git', 'log', '-1', '--format=%ct']).strip()
|
||||
except OSError:
|
||||
build_commit_timestamp = None
|
||||
if not build_commit_timestamp:
|
||||
# Git command not found
|
||||
build_hash = 'unknown'
|
||||
build_commit_timestamp = '0'
|
||||
build_branch = 'unknown'
|
||||
else:
|
||||
no_upstream = False
|
||||
|
||||
try :
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', '@{u}'], stderr=subprocess.STDOUT).strip()
|
||||
except subprocess.CalledProcessError:
|
||||
# assume branch has no upstream configured
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||
no_upstream = True
|
||||
|
||||
build_branch = btools.get_command_output(['git', 'rev-parse', '--abbrev-ref', 'HEAD']).strip()
|
||||
|
||||
if build_branch == 'HEAD':
|
||||
master_check = btools.get_command_output(['git', 'branch', '--list', 'master', '--contains', build_hash]).strip()
|
||||
if master_check == 'master':
|
||||
build_branch = 'master'
|
||||
else:
|
||||
head_hash = btools.get_command_output(['git', 'rev-parse', 'HEAD']).strip()
|
||||
tag_hashes = btools.get_command_output(['git', 'show-ref', '--tags', '-d'])
|
||||
if tag_hashes.find(head_hash) != -1:
|
||||
build_branch = 'master'
|
||||
|
||||
if not no_upstream:
|
||||
older_commits = btools.get_command_output(['git', 'log', '--oneline', 'HEAD..@{u}']).strip()
|
||||
if older_commits:
|
||||
build_hash = btools.get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||
|
||||
# ## Check for local modifications
|
||||
has_local_changes = False
|
||||
|
||||
# Update GIT index before getting dirty files
|
||||
os.system('git update-index -q --refresh')
|
||||
changed_files = btools.get_command_output(['git', 'diff-index', '--name-only', 'HEAD', '--']).strip()
|
||||
|
||||
if changed_files:
|
||||
has_local_changes = True
|
||||
elif no_upstream == False:
|
||||
unpushed_log = btools.get_command_output(['git', 'log', '--oneline', '@{u}..']).strip()
|
||||
has_local_changes = unpushed_log != ''
|
||||
|
||||
if build_branch.startswith('blender-v'):
|
||||
build_branch = 'master'
|
||||
|
||||
if has_local_changes:
|
||||
build_branch += ' (modified)'
|
||||
else:
|
||||
build_hash = 'unknown'
|
||||
build_commit_timestamp = '0'
|
||||
build_branch = 'unknown'
|
||||
|
||||
build_rev = os.popen('svnversion').read()[:-1] # remove \n
|
||||
if build_rev == '':
|
||||
build_rev = '-UNKNOWN-'
|
||||
if lenv['BF_DEBUG']:
|
||||
build_type = "Debug"
|
||||
build_cflags = ' '.join(lenv['CFLAGS'] + lenv['CCFLAGS'] + lenv['BF_DEBUG_CCFLAGS'] + lenv['CPPFLAGS'])
|
||||
@@ -515,9 +429,7 @@ def buildinfo(lenv, build_type):
|
||||
lenv.Append (CPPDEFINES = ['BUILD_TIME=\\"%s\\"'%(build_time),
|
||||
'BUILD_DATE=\\"%s\\"'%(build_date),
|
||||
'BUILD_TYPE=\\"%s\\"'%(build_type),
|
||||
'BUILD_HASH=\\"%s\\"'%(build_hash),
|
||||
'BUILD_COMMIT_TIMESTAMP=%s'%(build_commit_timestamp),
|
||||
'BUILD_BRANCH=\\"%s\\"'%(build_branch),
|
||||
'BUILD_REV=\\"%s\\"'%(build_rev),
|
||||
'WITH_BUILDINFO',
|
||||
'BUILD_PLATFORM=\\"%s:%s\\"'%(platform.system(), platform.architecture()[0]),
|
||||
'BUILD_CFLAGS=\\"%s\\"'%(build_cflags),
|
||||
@@ -635,14 +547,18 @@ def my_winpybundle_print(target, source, env):
|
||||
|
||||
def WinPyBundle(target=None, source=None, env=None):
|
||||
import re
|
||||
py_tar = env.subst(env['LCGDIR']).lstrip("#")
|
||||
py_tar= env.subst( env['LCGDIR'] )
|
||||
if py_tar[0]=='#':
|
||||
py_tar= py_tar[1:]
|
||||
if env['BF_DEBUG']:
|
||||
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_d.tar.gz'
|
||||
else:
|
||||
py_tar+= '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '.tar.gz'
|
||||
|
||||
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
|
||||
py_target = os.path.join(py_target, VERSION, 'python')
|
||||
py_target = env.subst( env['BF_INSTALLDIR'] )
|
||||
if py_target[0]=='#':
|
||||
py_target=py_target[1:]
|
||||
py_target = os.path.join(py_target, VERSION, 'python', 'lib')
|
||||
def printexception(func,path,ex):
|
||||
if os.path.exists(path): #do not report if path does not exist. eg on a fresh build.
|
||||
print str(func) + ' failed on ' + str(path)
|
||||
@@ -662,36 +578,6 @@ def WinPyBundle(target=None, source=None, env=None):
|
||||
print "Unpacking '" + py_tar + "' to '" + py_target + "'"
|
||||
untar_pybundle(py_tar,py_target,exclude_re)
|
||||
|
||||
# -------------
|
||||
# Extract Numpy
|
||||
if env['WITH_BF_PYTHON_INSTALL_NUMPY']:
|
||||
py_tar = env.subst(env['LCGDIR']).lstrip("#")
|
||||
py_tar += '/release/python' + env['BF_PYTHON_VERSION'].replace('.','') + '_numpy_1.9.tar.gz'
|
||||
|
||||
py_target = env.subst(env['BF_INSTALLDIR']).lstrip("#")
|
||||
py_target = os.path.join(py_target, VERSION, 'python', 'lib', 'site-packages')
|
||||
# rmtree handled above
|
||||
# files are cleaned up in their archive
|
||||
exclude_re = []
|
||||
print("Unpacking '" + py_tar + "' to '" + py_target + "'")
|
||||
untar_pybundle(py_tar, py_target, exclude_re)
|
||||
|
||||
# --------------------
|
||||
# Copy 'site-packages'
|
||||
py_dir = env.subst(env['LCGDIR']).lstrip("#")
|
||||
py_dir += '/release/site-packages'
|
||||
# grr, we have to do one by one because the dir exists
|
||||
for f in os.listdir(py_dir):
|
||||
if f == '.svn':
|
||||
continue
|
||||
fn_src = os.path.join(py_dir, f)
|
||||
fn_dst = os.path.join(py_target, f)
|
||||
|
||||
shutil.rmtree(fn_dst, False, printexception)
|
||||
shutil.copytree(fn_src, fn_dst)
|
||||
|
||||
|
||||
|
||||
def my_appit_print(target, source, env):
|
||||
a = '%s' % (target[0])
|
||||
d, f = os.path.split(a)
|
||||
@@ -732,37 +618,31 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,installdir, binary, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/'%(installdir, binary, VERSION)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/'%(installdir, binary, VERSION)
|
||||
commands.getoutput(cmd)
|
||||
cmd = installdir + '/%s.app/Contents/MacOS/%s'%(binary,VERSION)
|
||||
|
||||
# blenderplayer doesn't need all the files
|
||||
if binary == 'blender':
|
||||
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/datafiles'%(installdir, binary, VERSION)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/datafiles'%(installdir, binary, VERSION)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
|
||||
cmd = 'cp -R %s/release/datafiles/locale %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
mo_dir = os.path.join(builddir[:-4], "locale")
|
||||
for f in os.listdir(mo_dir):
|
||||
cmd = 'ditto %s/%s %s/%s.app/Contents/Resources/%s/datafiles/locale/%s/LC_MESSAGES/blender.mo'%(mo_dir, f, installdir, binary, VERSION, f[:-3])
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/release/datafiles/locale/languages %s/%s.app/Contents/Resources/%s/datafiles/locale/'%(bldroot, installdir, binary, VERSION)
|
||||
cmd = 'cp -R %s/release/datafiles/fonts %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
if env['WITH_BF_OCIO']:
|
||||
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/Resources/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
|
||||
cmd = 'cp -R %s/release/datafiles/colormanagement %s/%s.app/Contents/MacOS/%s/datafiles/'%(bldroot,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/Resources/%s/'%(bldroot,installdir,binary,VERSION)
|
||||
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
if VERSION_RELEASE_CYCLE == "release":
|
||||
cmd = 'rm -rf %s/%s.app/Contents/Resources/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
|
||||
cmd = 'rm -rf %s/%s.app/Contents/MacOS/%s/scripts/addons_contrib'%(installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
if env['WITH_BF_CYCLES']:
|
||||
croot = '%s/intern/cycles' % (bldroot)
|
||||
cinstalldir = '%s/%s.app/Contents/Resources/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
|
||||
cinstalldir = '%s/%s.app/Contents/MacOS/%s/scripts/addons/cycles' % (installdir,binary,VERSION)
|
||||
|
||||
cmd = 'mkdir %s' % (cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
@@ -776,7 +656,7 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/kernel/*.h %s/kernel/*.cl %s/kernel/*.cu %s/kernel/' % (croot, croot, croot, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/kernel/geom %s/kernel/split %s/kernel/kernels %s/util/util_color.h %s/util/util_half.h %s/util/util_math.h %s/util/util_math_fast.h %s/util/util_transform.h %s/util/util_types.h %s/util/util_atomic.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, croot, cinstalldir)
|
||||
cmd = 'cp -R %s/kernel/svm %s/kernel/closure %s/util/util_color.h %s/util/util_math.h %s/util/util_transform.h %s/util/util_types.h %s/kernel/' % (croot, croot, croot, croot, croot, croot, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/../intern/cycles/kernel/*.cubin %s/lib/' % (builddir, cinstalldir)
|
||||
commands.getoutput(cmd)
|
||||
@@ -790,11 +670,9 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
|
||||
if env['WITH_OSX_STATICPYTHON']:
|
||||
cmd = 'mkdir %s/%s.app/Contents/Resources/%s/python/'%(installdir,binary, VERSION)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/Resources/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/site-packages/ %s/%s.app/Contents/Resources/%s/python/lib/python%s/site-packages/'%(libdir,installdir,binary,VERSION,env['BF_PYTHON_VERSION'])
|
||||
cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
cmd = 'chmod +x %s/%s.app/Contents/MacOS/%s'%(installdir,binary, binary)
|
||||
@@ -805,33 +683,16 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(installdir, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'SetFile -d "%s)" -m "%s)" %s/%s.app'%(time.strftime("%m/%d/%Y %H:%M"),time.strftime("%m/%d/%Y %H:%M"),installdir,binary) # give the bundles actual creation/modification date
|
||||
commands.getoutput(cmd)
|
||||
if env['WITH_BF_OPENMP']:
|
||||
if env['C_COMPILER_ID'] == 'gcc' and env['CCVERSION'] >= '4.6.1': # for correct errorhandling with gcc >= 4.6.1 we need the gcc.dylib and gomp.dylib to link, thus distribute in app-bundle
|
||||
print "Bundling libgcc and libgomp"
|
||||
instname = env['BF_CXX']
|
||||
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgcc
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgcc_s.1.dylib'%(installdir, binary) # change id of libgcc
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'ditto --arch %s %s/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libgomp
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -id @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(installdir, binary) # change id of libgomp
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/Resources/lib/libgomp.1.dylib'%(instname, installdir, binary) # change ref to libgcc
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/../Resources/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgcc ( blender )
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -change %s/lib/libgomp.1.dylib @executable_path/../Resources/lib/libgomp.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary) # change ref to libgomp ( blender )
|
||||
commands.getoutput(cmd)
|
||||
if env['C_COMPILER_ID'] == 'clang' and env['CCVERSION'] >= '3.4':
|
||||
print "Bundling libiomp5"
|
||||
instname = env['LCGDIR'][1:] # made libiomp5 part of blender libs
|
||||
cmd = 'ditto --arch %s %s/openmp/lib/libiomp5.dylib %s/%s.app/Contents/Resources/lib/'%(osxarch, instname, installdir, binary) # copy libiomp5
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/openmp/LICENSE.txt %s/LICENSE-libiomp5.txt'%(instname, installdir) # copy libiomp5 license
|
||||
commands.getoutput(cmd)
|
||||
if env['CC'][:-2].endswith('4.6'): # for correct errorhandling with gcc 4.6.x we need the gcc.dylib to link, thus distribute in app-bundle
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/lib'%(installdir, binary)
|
||||
commands.getoutput(cmd)
|
||||
instname = env['BF_CXX']
|
||||
cmd = 'ditto --arch %s %s/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/'%(osxarch, instname, installdir, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -id @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/lib/libgcc_s.1.dylib'%(installdir, binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'install_name_tool -change %s/lib/libgcc_s.1.dylib @executable_path/lib/libgcc_s.1.dylib %s/%s.app/Contents/MacOS/%s'%(instname, installdir, binary, binary)
|
||||
commands.getoutput(cmd)
|
||||
|
||||
# extract copy system python, be sure to update other build systems
|
||||
# when making changes to the files that are copied.
|
||||
@@ -855,7 +716,6 @@ def UnixPyBundle(target=None, source=None, env=None):
|
||||
|
||||
py_src = env.subst( env['BF_PYTHON_LIBPATH'] + '/python'+env['BF_PYTHON_VERSION'] )
|
||||
py_target = env.subst( dir + '/python/' + target_lib + '/python'+env['BF_PYTHON_VERSION'] )
|
||||
py_target_bin = env.subst(dir + '/python/bin')
|
||||
|
||||
# This is a bit weak, but dont install if its been installed before, makes rebuilds quite slow.
|
||||
if os.path.exists(py_target):
|
||||
@@ -875,11 +735,6 @@ def UnixPyBundle(target=None, source=None, env=None):
|
||||
except:
|
||||
pass
|
||||
|
||||
# install the executable
|
||||
run("rm -rf '%s'" % py_target_bin)
|
||||
os.makedirs(py_target_bin)
|
||||
run("cp '%s' '%s'" % (env.subst(env['BF_PYTHON_BINARY']), py_target_bin))
|
||||
|
||||
run("cp -R '%s' '%s'" % (py_src, os.path.dirname(py_target)))
|
||||
run("rm -rf '%s/distutils'" % py_target)
|
||||
run("rm -rf '%s/lib2to3'" % py_target)
|
||||
@@ -917,17 +772,6 @@ def UnixPyBundle(target=None, source=None, env=None):
|
||||
run("find '%s' -type d -name '*.a' -prune -exec rm -rf {} ';'" % numpy_target)
|
||||
else:
|
||||
print 'Failed to find numpy at %s, skipping copying' % numpy_src
|
||||
del numpy_src, numpy_target
|
||||
|
||||
if env['WITH_BF_PYTHON_INSTALL_REQUESTS']:
|
||||
requests_src = py_src + "/site-packages/requests"
|
||||
requests_target = py_target + "/site-packages/requests"
|
||||
if os.path.exists(requests_src):
|
||||
run("cp -R '%s' '%s'" % (requests_src, os.path.dirname(requests_target)))
|
||||
run("find '%s' -type d -name '*.pem -prune -exec rm -rf {} ';'" % requests_target)
|
||||
else:
|
||||
print('Failed to find requests at %s, skipping copying' % requests_src)
|
||||
del requests_src, requests_target
|
||||
|
||||
run("find '%s' -type d -name 'test' -prune -exec rm -rf {} ';'" % py_target)
|
||||
run("find '%s' -type d -name '__pycache__' -exec rm -rf {} ';'" % py_target)
|
||||
|
@@ -14,21 +14,6 @@ import sys
|
||||
Variables = SCons.Variables
|
||||
BoolVariable = SCons.Variables.BoolVariable
|
||||
|
||||
def get_command_output(*popenargs, **kwargs):
|
||||
if hasattr(subprocess, "check_output"):
|
||||
return subprocess.check_output(*popenargs, **kwargs)
|
||||
if 'stdout' in kwargs:
|
||||
raise ValueError('stdout argument not allowed, it will be overridden.')
|
||||
process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs)
|
||||
output, unused_err = process.communicate()
|
||||
retcode = process.poll()
|
||||
if retcode:
|
||||
cmd = kwargs.get("args")
|
||||
if cmd is None:
|
||||
cmd = popenargs[0]
|
||||
raise subprocess.CalledProcessError(retcode, cmd)
|
||||
return output
|
||||
|
||||
def get_version():
|
||||
import re
|
||||
|
||||
@@ -70,28 +55,32 @@ def get_version():
|
||||
|
||||
raise Exception("%s: missing version string" % fname)
|
||||
|
||||
def get_hash():
|
||||
try:
|
||||
build_hash = get_command_output(['git', 'rev-parse', '--short', 'HEAD']).strip()
|
||||
except OSError:
|
||||
build_hash = None
|
||||
print("WARNING: could not use git to retrieve current Blender repository hash...")
|
||||
except subprocess.CalledProcessError as e:
|
||||
build_hash = None
|
||||
print("WARNING: git errored while retrieving current Blender repository hash (%d)..." % e.returncode)
|
||||
if build_hash == '' or build_hash == None:
|
||||
build_hash = 'UNKNOWN'
|
||||
def get_revision():
|
||||
build_rev = os.popen('svnversion').read()[:-1] # remove \n
|
||||
if build_rev == '' or build_rev==None:
|
||||
build_rev = 'UNKNOWN'
|
||||
|
||||
return build_hash
|
||||
return 'r' + build_rev
|
||||
|
||||
|
||||
# copied from: http://www.scons.org/wiki/AutoconfRecipes
|
||||
def checkEndian():
|
||||
return sys.byteorder
|
||||
import struct
|
||||
array = struct.pack('cccc', '\x01', '\x02', '\x03', '\x04')
|
||||
i = struct.unpack('i', array)
|
||||
# Little Endian
|
||||
if i == struct.unpack('<i', array):
|
||||
return "little"
|
||||
# Big Endian
|
||||
elif i == struct.unpack('>i', array):
|
||||
return "big"
|
||||
else:
|
||||
raise Exception("cant find endian")
|
||||
|
||||
|
||||
# This is used in creating the local config directories
|
||||
VERSION, VERSION_DISPLAY, VERSION_RELEASE_CYCLE = get_version()
|
||||
HASH = get_hash()
|
||||
REVISION = get_revision()
|
||||
ENDIAN = checkEndian()
|
||||
|
||||
|
||||
@@ -107,9 +96,8 @@ def print_arguments(args, bc):
|
||||
def validate_arguments(args, bc):
|
||||
opts_list = [
|
||||
'WITH_BF_FREESTYLE', 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'WITH_BF_PYTHON_SECURITY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'BF_PYTHON_LIBPATH_ARCH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS',
|
||||
'WITH_BF_AUDASPACE', 'BF_AUDASPACE_C_INC', 'BF_AUDASPACE_PY_INC', 'BF_AUDASPACE_DEF',
|
||||
'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'WITH_BF_SDL_DYNLOAD',
|
||||
'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH',
|
||||
'WITH_BF_JACK', 'BF_JACK', 'BF_JACK_INC', 'BF_JACK_LIB', 'BF_JACK_LIBPATH', 'WITH_BF_JACK_DYNLOAD',
|
||||
'WITH_BF_SNDFILE', 'BF_SNDFILE', 'BF_SNDFILE_INC', 'BF_SNDFILE_LIB', 'BF_SNDFILE_LIBPATH', 'WITH_BF_STATICSNDFILE', 'BF_SNDFILE_LIB_STATIC',
|
||||
'BF_PTHREADS', 'BF_PTHREADS_INC', 'BF_PTHREADS_LIB', 'BF_PTHREADS_LIBPATH',
|
||||
@@ -137,9 +125,6 @@ def validate_arguments(args, bc):
|
||||
'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
|
||||
'WITH_BF_FFTW3', 'BF_FFTW3', 'BF_FFTW3_INC', 'BF_FFTW3_LIB', 'BF_FFTW3_LIBPATH', 'WITH_BF_STATICFFTW3', 'BF_FFTW3_LIB_STATIC',
|
||||
'WITH_BF_STATICOPENGL', 'BF_OPENGL', 'BF_OPENGL_INC', 'BF_OPENGL_LIB', 'BF_OPENGL_LIBPATH', 'BF_OPENGL_LIB_STATIC',
|
||||
'WITH_BF_EGL', 'WITH_BF_GLEW_ES', 'BF_GLEW_INC', 'WITH_BF_GL_PROFILE_CORE', 'WITH_BF_GL_PROFILE_COMPAT', 'WITH_BF_GL_PROFILE_ES20',
|
||||
'WITH_BF_GLEW_MX', 'WITH_BF_GL_EGL', 'WITH_BF_GL_ANGLE',
|
||||
|
||||
'WITH_BF_COLLADA', 'BF_COLLADA', 'BF_COLLADA_INC', 'BF_COLLADA_LIB', 'BF_OPENCOLLADA', 'BF_OPENCOLLADA_INC', 'BF_OPENCOLLADA_LIB', 'BF_OPENCOLLADA_LIBPATH', 'BF_PCRE', 'BF_PCRE_LIB', 'BF_PCRE_LIBPATH', 'BF_EXPAT', 'BF_EXPAT_LIB', 'BF_EXPAT_LIBPATH',
|
||||
'WITH_BF_STATICOPENCOLLADA', 'BF_OPENCOLLADA_LIB_STATIC',
|
||||
'WITH_BF_PLAYER',
|
||||
@@ -150,15 +135,16 @@ def validate_arguments(args, bc):
|
||||
'BF_CXX', 'WITH_BF_STATICCXX', 'BF_CXX_LIB_STATIC',
|
||||
'BF_TWEAK_MODE', 'BF_SPLIT_SRC',
|
||||
'WITHOUT_BF_INSTALL',
|
||||
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK',
|
||||
'WITH_BF_PYTHON_INSTALL_NUMPY', 'WITH_BF_PYTHON_INSTALL_REQUESTS',
|
||||
'WITHOUT_BF_PYTHON_INSTALL', 'WITHOUT_BF_PYTHON_UNPACK', 'WITH_BF_PYTHON_INSTALL_NUMPY',
|
||||
'WITHOUT_BF_OVERWRITE_INSTALL',
|
||||
'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH', 'WITH_BF_STATICOPENMP', 'BF_OPENMP_STATIC_STATIC',
|
||||
'WITH_GHOST_COCOA',
|
||||
'WITH_GHOST_SDL',
|
||||
'WITH_GHOST_XDND',
|
||||
'WITH_X11_XINPUT',
|
||||
'WITH_X11_XF86VMODE',
|
||||
'BF_GHOST_DEBUG',
|
||||
'USE_QTKIT',
|
||||
'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
|
||||
'BF_X264_CONFIG',
|
||||
'BF_XVIDCORE_CONFIG',
|
||||
@@ -175,33 +161,28 @@ def validate_arguments(args, bc):
|
||||
'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',
|
||||
'BUILDBOT_BRANCH',
|
||||
'WITH_BF_IME',
|
||||
'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC',
|
||||
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'BF_CYCLES_CUDA_ENV',
|
||||
'WITH_BF_CYCLES', 'WITH_BF_CYCLES_CUDA_BINARIES', 'BF_CYCLES_CUDA_NVCC', 'BF_CYCLES_CUDA_NVCC', 'WITH_BF_CYCLES_CUDA_THREADED_COMPILE',
|
||||
'WITH_BF_OIIO', 'WITH_BF_STATICOIIO', 'BF_OIIO', 'BF_OIIO_INC', 'BF_OIIO_LIB', 'BF_OIIO_LIB_STATIC', 'BF_OIIO_LIBPATH',
|
||||
'WITH_BF_OCIO', 'WITH_BF_STATICOCIO', 'BF_OCIO', 'BF_OCIO_INC', 'BF_OCIO_LIB', 'BF_OCIO_LIB_STATIC', 'BF_OCIO_LIBPATH',
|
||||
'WITH_BF_BOOST', 'WITH_BF_STATICBOOST', 'BF_BOOST', 'BF_BOOST_INC', 'BF_BOOST_LIB', 'BF_BOOST_LIB_INTERNATIONAL', 'BF_BOOST_LIB_STATIC', 'BF_BOOST_LIBPATH',
|
||||
'WITH_BF_LIBMV', 'WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS',
|
||||
'WITH_BF_LIBMV',
|
||||
'WITH_BF_CYCLES_OSL', 'WITH_BF_STATICOSL', 'BF_OSL', 'BF_OSL_INC', 'BF_OSL_LIB', 'BF_OSL_LIBPATH', 'BF_OSL_LIB_STATIC', 'BF_OSL_COMPILER',
|
||||
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS',
|
||||
'WITH_BF_OPENSUBDIV', 'WITH_BF_STATICOPENSUBDIV', 'BF_OPENSUBDIV', 'BF_OPENSUBDIV_INC', 'BF_OPENSUBDIV_LIB', 'BF_OPENSUBDIV_LIBPATH', 'BF_OPENSUBDIV_LIB_STATIC'
|
||||
'WITH_BF_LLVM', 'WITH_BF_STATICLLVM', 'BF_LLVM', 'BF_LLVM_LIB', 'BF_LLVM_LIBPATH', 'BF_LLVM_LIB_STATIC', 'BF_PROGRAM_LINKFLAGS'
|
||||
]
|
||||
|
||||
# Have options here that scons expects to be lists
|
||||
opts_list_split = [
|
||||
'BF_PYTHON_LINKFLAGS',
|
||||
'BF_OPENGL_LINKFLAGS',
|
||||
'BF_GL_DEFINITIONS',
|
||||
'CFLAGS', 'CCFLAGS', 'CXXFLAGS', 'CPPFLAGS',
|
||||
'REL_CFLAGS', 'REL_CCFLAGS', 'REL_CXXFLAGS',
|
||||
'BGE_CXXFLAGS',
|
||||
'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', 'MACOSX_ARCHITECTURE', 'MACOSX_SDK', 'XCODE_CUR_VER', 'C_COMPILER_ID',
|
||||
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET',
|
||||
'WITH_BF_CYCLES_DEBUG', 'WITH_BF_CYCLES_LOGGING',
|
||||
'WITH_BF_CPP11', 'WITH_BF_LEGACY_DEPSGRAPH',
|
||||
'LLIBS', 'PLATFORM_LINKFLAGS','MACOSX_ARCHITECTURE', 'MACOSX_SDK_CHECK', 'XCODE_CUR_VER',
|
||||
'BF_CYCLES_CUDA_BINARIES_ARCH', 'BF_PROGRAM_LINKFLAGS', 'MACOSX_DEPLOYMENT_TARGET'
|
||||
]
|
||||
|
||||
|
||||
@@ -299,17 +280,11 @@ def read_opts(env, cfg, args):
|
||||
('BF_OPENAL_LIBPATH', 'Path to OpenAL library', ''),
|
||||
(BoolVariable('WITH_BF_STATICOPENAL', 'Staticly link to openal', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_AUDASPACE', 'Build with audaspace if true', True)),
|
||||
('BF_AUDASPACE_C_INC', 'audaspace-c include path', ''),
|
||||
('BF_AUDASPACE_PY_INC', 'audaspace-py include path', ''),
|
||||
('BF_AUDASPACE_DEF', 'audaspace defines', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_SDL', 'Use SDL if true', False)),
|
||||
('BF_SDL', 'SDL base path', ''),
|
||||
('BF_SDL_INC', 'SDL include path', ''),
|
||||
('BF_SDL_LIB', 'SDL library', ''),
|
||||
('BF_SDL_LIBPATH', 'SDL library path', ''),
|
||||
(BoolVariable('WITH_BF_SDL_DYNLOAD', 'Enable runtime dynamic SDL libraries loading (works only on Linux)', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_JACK', 'Enable jack support if true', True)),
|
||||
('BF_JACK', 'jack base path', ''),
|
||||
@@ -449,9 +424,11 @@ def read_opts(env, cfg, args):
|
||||
('BF_OPENMP', 'Base path to OpenMP (used when cross-compiling with older versions of WinGW)', ''),
|
||||
('BF_OPENMP_INC', 'Path to OpenMP includes (used when cross-compiling with older versions of WinGW)', ''),
|
||||
('BF_OPENMP_LIBPATH', 'Path to OpenMP libraries (used when cross-compiling with older versions of WinGW)', ''),
|
||||
(BoolVariable('WITH_GHOST_COCOA', 'Use Cocoa-framework if true', False)),
|
||||
(BoolVariable('WITH_GHOST_SDL', 'Enable building blender against SDL for windowing rather then the native APIs', False)),
|
||||
(BoolVariable('WITH_X11_XINPUT', 'Enable X11 Xinput (tablet support and unicode input)', True)),
|
||||
(BoolVariable('WITH_X11_XF86VMODE', 'Enable X11 video mode switching', True)),
|
||||
(BoolVariable('USE_QTKIT', 'Use QTKIT if true', False)),
|
||||
('BF_OPENMP_LIB_STATIC', 'OpenMP static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_QUICKTIME', 'Use QuickTime if true', False)),
|
||||
@@ -476,18 +453,6 @@ def read_opts(env, cfg, args):
|
||||
('BF_OPENGL_LIB_STATIC', 'OpenGL static libraries', ''),
|
||||
('BF_OPENGL_LINKFLAGS', 'OpenGL link flags', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_GLEW_MX', '', False)),
|
||||
(BoolVariable('WITH_BF_GLEW_ES', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_EGL', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_COMPAT', '', True)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_CORE', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_PROFILE_ES20', '', False)),
|
||||
(BoolVariable('WITH_BF_GL_ANGLE', '', False)),
|
||||
('BF_GL_DEFINITIONS', '', []),
|
||||
('BF_GLEW_INC', '', ''),
|
||||
) # end of opts.AddVariables()
|
||||
|
||||
localopts.AddVariables(
|
||||
(BoolVariable('WITH_BF_COLLADA', 'Build COLLADA import/export module if true', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENCOLLADA', 'Staticly link to OpenCollada', False)),
|
||||
('BF_COLLADA', 'COLLADA base path', ''),
|
||||
@@ -516,8 +481,6 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_BF_PLAYER', 'Build blenderplayer if true', False)),
|
||||
(BoolVariable('WITH_BF_NOBLENDER', 'Do not build blender if true', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_IME', 'Enable Input Method Editor (IME) for complex Asian character input', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_3DMOUSE', 'Build blender with support of 3D mouses', False)),
|
||||
(BoolVariable('WITH_BF_STATIC3DMOUSE', 'Staticly link to 3d mouse library', False)),
|
||||
('BF_3DMOUSE', '3d mouse library base path', ''),
|
||||
@@ -542,10 +505,9 @@ def read_opts(env, cfg, args):
|
||||
('LLIBS', 'Platform libs', []),
|
||||
('PLATFORM_LINKFLAGS', 'Platform linkflags', []),
|
||||
('MACOSX_ARCHITECTURE', 'python_arch.zip select', ''),
|
||||
('MACOSX_SDK', 'Set OS X SDK', ''),
|
||||
('MACOSX_SDK_CHECK', 'Detect available OS X SDK`s', ''),
|
||||
('XCODE_CUR_VER', 'Detect XCode version', ''),
|
||||
('MACOSX_DEPLOYMENT_TARGET', 'Detect OS X target version', ''),
|
||||
('C_COMPILER_ID', 'Detect the resolved compiler', ''),
|
||||
|
||||
(BoolVariable('BF_PROFILE', 'Add profiling information if true', False)),
|
||||
('BF_PROFILE_CFLAGS', 'C only profiling flags', []),
|
||||
@@ -572,8 +534,7 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('BF_SPLIT_SRC', 'Split src lib into several chunks if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_INSTALL', 'dont install if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_PYTHON_INSTALL', 'dont install Python modules if true', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python numpy module', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_INSTALL_REQUESTS', 'install Python requests module', False)),
|
||||
(BoolVariable('WITH_BF_PYTHON_INSTALL_NUMPY', 'install Python mumpy module', False)),
|
||||
(BoolVariable('WITHOUT_BF_PYTHON_UNPACK', 'dont remove and unpack Python modules everytime if true', False)),
|
||||
(BoolVariable('WITHOUT_BF_OVERWRITE_INSTALL', 'dont remove existing files before breating the new install directory (set to False when making packages for others)', False)),
|
||||
(BoolVariable('BF_FANCY', 'Enable fancy output if true', True)),
|
||||
@@ -585,7 +546,6 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_BF_LZMA', 'Enable best LZMA pointcache compression', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_LIBMV', 'Enable libmv structure from motion library', True)),
|
||||
(BoolVariable('WITH_BF_LIBMV_SCHUR_SPECIALIZATIONS', 'Enable fixed-size schur specializations', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_COMPOSITOR', 'Enable the tile based nodal compositor', True)),
|
||||
) # end of opts.AddOptions()
|
||||
@@ -613,13 +573,10 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_BF_CYCLES_CUDA_BINARIES', 'Build with precompiled CUDA binaries', False)),
|
||||
(BoolVariable('WITH_BF_CYCLES_CUDA_THREADED_COMPILE', 'Build several render kernels at once (using BF_NUMJOBS)', False)),
|
||||
('BF_CYCLES_CUDA_NVCC', 'CUDA nvcc compiler path', ''),
|
||||
('BF_CYCLES_CUDA_ENV', 'preset environement nvcc will execute in', ''),
|
||||
('BF_CYCLES_CUDA_BINARIES_ARCH', 'CUDA architectures to compile binaries for', []),
|
||||
(BoolVariable('WITH_BF_CYCLES_DEBUG', 'Build Cycles engine with extra debugging capabilities', False)),
|
||||
(BoolVariable('WITH_BF_CYCLES_LOGGING', 'Build Cycles engine with logging support', True)),
|
||||
|
||||
(BoolVariable('WITH_BF_OIIO', 'Build with OpenImageIO', False)),
|
||||
(BoolVariable('WITH_BF_STATICOIIO', 'Statically link to OpenImageIO', False)),
|
||||
(BoolVariable('WITH_BF_STATICOIIO', 'Staticly link to OpenImageIO', False)),
|
||||
('BF_OIIO', 'OIIO root path', ''),
|
||||
('BF_OIIO_INC', 'OIIO include path', ''),
|
||||
('BF_OIIO_LIB', 'OIIO library', ''),
|
||||
@@ -661,19 +618,7 @@ def read_opts(env, cfg, args):
|
||||
('BF_LLVM_LIBPATH', 'LLVM library path', ''),
|
||||
('BF_LLVM_LIB_STATIC', 'LLVM static library', ''),
|
||||
|
||||
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_OPENSUBDIV', 'Build with OpenSubdiv library', False)),
|
||||
(BoolVariable('WITH_BF_STATICOPENSUBDIV', 'Staticly link to OpenColorIO', False)),
|
||||
('BF_OPENSUBDIV', 'OpenSubdiv root path', ''),
|
||||
('BF_OPENSUBDIV_INC', 'OpenSubdiv include path', ''),
|
||||
('BF_OPENSUBDIV_LIB', 'OpenSubdiv library', ''),
|
||||
('BF_OPENSUBDIV_LIBPATH', 'OpenSubdiv library path', ''),
|
||||
('BF_OPENSUBDIV_LIB_STATIC', 'OpenSubdiv static library', ''),
|
||||
|
||||
(BoolVariable('WITH_BF_CPP11', '"Build with C++11 standard enabled, for development use only!', False)),
|
||||
|
||||
(BoolVariable('WITH_BF_LEGACY_DEPSGRAPH', 'Build Blender with legacy dependency graph', True)),
|
||||
('BF_PROGRAM_LINKFLAGS', 'Link flags applied only to final binaries (blender and blenderplayer, not makesrna/makesdna)', '')
|
||||
) # end of opts.AddOptions()
|
||||
|
||||
return localopts
|
||||
@@ -746,11 +691,13 @@ def buildslave(target=None, source=None, env=None):
|
||||
if platform == 'darwin':
|
||||
platform = 'OSX-' + env['MACOSX_DEPLOYMENT_TARGET'] + '-' + env['MACOSX_ARCHITECTURE']
|
||||
|
||||
if env['MSVC_VERSION'] == '11.0':
|
||||
platform = env['OURPLATFORM'] + '11'
|
||||
|
||||
branch = env['BUILDBOT_BRANCH']
|
||||
|
||||
outdir = os.path.abspath(env['BF_INSTALLDIR'])
|
||||
package_name = 'blender-' + VERSION+'-'+HASH + '-' + platform
|
||||
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)
|
||||
|
@@ -1,72 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script can run from any location,
|
||||
# output is created in the $CWD
|
||||
|
||||
BASE_DIR="$PWD"
|
||||
|
||||
blender_srcdir=$(dirname -- $0)/../..
|
||||
blender_version=$(grep "BLENDER_VERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_char=$(grep "BLENDER_VERSION_CHAR\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_version_cycle=$(grep "BLENDER_VERSION_CYCLE\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
blender_subversion=$(grep "BLENDER_SUBVERSION\s" "$blender_srcdir/source/blender/blenkernel/BKE_blender.h" | awk '{print $3}')
|
||||
|
||||
if [ "$blender_version_cycle" = "release" ] ; then
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)$blender_version_char
|
||||
SUBMODULE_EXCLUDE="^\(release/scripts/addons_contrib\)$"
|
||||
else
|
||||
VERSION=$(expr $blender_version / 100).$(expr $blender_version % 100)_$blender_subversion
|
||||
SUBMODULE_EXCLUDE="^$" # dummy regex
|
||||
fi
|
||||
|
||||
MANIFEST="blender-$VERSION-manifest.txt"
|
||||
TARBALL="blender-$VERSION.tar.gz"
|
||||
|
||||
cd "$blender_srcdir"
|
||||
|
||||
# not so nice, but works
|
||||
FILTER_FILES_PY=\
|
||||
"import os, sys; "\
|
||||
"[print(l[:-1]) for l in sys.stdin.readlines() "\
|
||||
"if os.path.isfile(l[:-1]) "\
|
||||
"if os.path.basename(l[:-1]) not in {"\
|
||||
"'.gitignore', "\
|
||||
"'.gitmodules', "\
|
||||
"'.arcconfig', "\
|
||||
"}"\
|
||||
"]"
|
||||
|
||||
# Build master list
|
||||
echo -n "Building manifest of files: \"$BASE_DIR/$MANIFEST\" ..."
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" > $BASE_DIR/$MANIFEST
|
||||
|
||||
# Enumerate submodules
|
||||
for lcv in $(git submodule | awk '{print $2}' | grep -v "$SUBMODULE_EXCLUDE"); do
|
||||
cd "$BASE_DIR"
|
||||
cd "$blender_srcdir/$lcv"
|
||||
git ls-files | python3 -c "$FILTER_FILES_PY" | awk '$0="'"$lcv"/'"$0' >> $BASE_DIR/$MANIFEST
|
||||
cd "$BASE_DIR"
|
||||
done
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create the tarball
|
||||
cd "$blender_srcdir"
|
||||
echo -n "Creating archive: \"$BASE_DIR/$TARBALL\" ..."
|
||||
GZIP=-9 tar --transform "s,^,blender-$VERSION/,g" -zcf "$BASE_DIR/$TARBALL" -T "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Create checksum file
|
||||
cd "$BASE_DIR"
|
||||
echo -n "Createing checksum: \"$BASE_DIR/$TARBALL.md5sum\" ..."
|
||||
md5sum "$TARBALL" > "$TARBALL.md5sum"
|
||||
echo "OK"
|
||||
|
||||
|
||||
# Cleanup
|
||||
echo -n "Cleaning up ..."
|
||||
rm "$BASE_DIR/$MANIFEST"
|
||||
echo "OK"
|
||||
|
||||
echo "Done!"
|
@@ -112,7 +112,7 @@ class DNACatalogHTML:
|
||||
# ${version} and ${revision}
|
||||
if bpy:
|
||||
version = '.'.join(map(str, bpy.app.version))
|
||||
revision = bpy.app.build_hash
|
||||
revision = bpy.app.build_revision[:-1]
|
||||
else:
|
||||
version = str(header.Version)
|
||||
revision = 'Unknown'
|
||||
@@ -404,7 +404,7 @@ def main():
|
||||
# Files
|
||||
if '--dna-versioned' in sys.argv:
|
||||
blender_version = '_'.join(map(str, bpy.app.version))
|
||||
filename = 'dna-{0}-{1}_endian-{2}-{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_hash)
|
||||
filename = 'dna-{0}-{1}_endian-{2}-r{3}'.format(sys.arch, sys.byteorder, blender_version, bpy.app.build_revision[2:-1])
|
||||
else:
|
||||
filename = 'dna'
|
||||
dir = os.path.dirname(__file__)
|
||||
@@ -451,7 +451,7 @@ def main():
|
||||
os.remove(Path_Blend)
|
||||
|
||||
# export dna to xhtml
|
||||
log.info("6: export sdna to xhtml file: %r" % Path_HTML)
|
||||
log.info("6: export sdna to xhtml file")
|
||||
handleHTML = open(Path_HTML, "w")
|
||||
catalog.WriteToHTML(handleHTML)
|
||||
handleHTML.close()
|
||||
|
104
doc/build_systems/cmake.txt
Normal file
104
doc/build_systems/cmake.txt
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
Blender CMake build system
|
||||
============================
|
||||
|
||||
Contents
|
||||
---------------
|
||||
|
||||
1. Introduction
|
||||
2. Obtaining CMake
|
||||
3. Building Blender
|
||||
4. Generic Setup
|
||||
5. Configuring the build after SVN updates
|
||||
|
||||
1. Introduction
|
||||
---------------
|
||||
|
||||
This document describes general usage of the new CMake scripts. The
|
||||
inner workings will be described in blender-cmake-dev.txt (TODO).
|
||||
|
||||
2. Obtaining CMake
|
||||
------------------
|
||||
|
||||
CMake for can either be downloaded using your favorite package manager
|
||||
or is also available from the CMake website at http://www.cmake.org
|
||||
The website also contains some documentation on CMake usage but I found
|
||||
the man page alone pretty helpful.
|
||||
|
||||
3. Building Blender
|
||||
-------------------
|
||||
|
||||
Building Blender requires obtaining a compiler, library dependencies,
|
||||
and correct setup depending on the system. For details on how to set
|
||||
up a build on various operating systems, see the wiki documentation:
|
||||
|
||||
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender
|
||||
|
||||
4. Generic Setup
|
||||
----------------
|
||||
|
||||
CMake allows one to generate the build project files and binary objects
|
||||
outside the source tree which can be pretty handy in working and experimenting
|
||||
with different Blender configurations (Audio/NoAudio, GameEngine/NoGameEngine etc.)
|
||||
while maintaining a clean source tree. It also makes it possible to generate files
|
||||
for different build systems on the same source tree. This also has benefits for
|
||||
general SVN management for the developer as patches and submit logs are much cleaner.
|
||||
|
||||
Create a directory outside the blender source tree where you would like to build
|
||||
Blender (from now on called $BLENDERBUILD). On the commandline you can then run
|
||||
the cmake command to generate your initial build files. First just run 'cmake' which
|
||||
will inform you what the available generators are. Thn you can run
|
||||
'cmake -G generator $BLENDERSOURCE' to generate the build files. Here is an example
|
||||
of all this for Xcode:
|
||||
|
||||
% mkdir $BLENDERBUILD
|
||||
% cd $BLENDERBUILD
|
||||
% cmake
|
||||
|
||||
...
|
||||
...
|
||||
--version [file] = Show program name/version banner and exit.
|
||||
|
||||
Generators
|
||||
|
||||
The following generators are available on this platform:
|
||||
KDevelop3 = Generates KDevelop 3 project files.
|
||||
Unix Makefiles = Generates standard UNIX makefiles.
|
||||
Xcode = Generate XCode project files.
|
||||
|
||||
|
||||
|
||||
% cmake -G Xcode $BLENDERSOURCE
|
||||
...
|
||||
...
|
||||
-- Configuring blender
|
||||
-- Configuring blenderplayer
|
||||
-- Configuring done
|
||||
-- Generating done
|
||||
-- Build files have been written to: $BLENDERBUILD
|
||||
|
||||
This will generate the build files with default values. Specific features can
|
||||
be enabled or disabled by running the ccmake "GUI" from $BLENDERBUILD as follows:
|
||||
|
||||
% ccmake $BLENDERSOURCE
|
||||
|
||||
A number of options appear which can be changed depending on your needs and
|
||||
available dependencies (e.g. setting WITH_OPENEXR to OFF will disable support
|
||||
for OpenEXR). It will also allow you to override default and detected paths
|
||||
(e.g. Python directories) and compile and link flags. When you are satisfied
|
||||
used ccmake to re-configure the build files and exit.
|
||||
|
||||
It is also possible to use the commandline of 'cmake' to override certain
|
||||
of these settings.
|
||||
|
||||
5. Configuring the build after SVN updates
|
||||
------------------------------------------
|
||||
|
||||
The $BLENDERBUILD directory maintains a file called CMakeCache.txt which
|
||||
remembers the initial run's settings for subsequent generation runs. After
|
||||
SVN updates that contain changes to the build system, rebuilding Blender will
|
||||
automatically invoke CMake to regenerate the CMakeCache.txt and other files
|
||||
as needed.
|
||||
|
||||
/Jacques Beaurain (jbinto)
|
||||
|
@@ -35,14 +35,13 @@
|
||||
defaults.
|
||||
|
||||
Much of the actual functionality can be found in the python scripts
|
||||
in the directory $BLENDERHOME/build_files/scons/tools, with
|
||||
Blender.py defining the bulk of the functionality. btools.py has some
|
||||
helper functions, and bcolors.py is for the terminal
|
||||
colors. mstoolkit.py and crossmingw.py are modules which set up SCons
|
||||
for the MS VC++ 2003 toolkit and the cross-compile toolset for
|
||||
compiling Windows binaries on Linux respectively. Note: the
|
||||
cross-compile doesn't work yet for Blender, but is added in
|
||||
preparation for having it work in the distant future.
|
||||
in the directory $BLENDERHOME/tools, with Blender.py defining the
|
||||
bulk of the functionality. btools.py has some helper functions, and
|
||||
bcolors.py is for the terminal colors. mstoolkit.py and crossmingw.py
|
||||
are modules which set up SCons for the MS VC++ 2003 toolkit and
|
||||
the cross-compile toolset for compiling Windows binaries on Linux
|
||||
respectively. Note: the cross-compile doesn't work yet for Blender,
|
||||
but is added in preparation for having it work in the distant future.
|
||||
|
||||
BlenderEnvironment
|
||||
------------------
|
||||
|
@@ -29,9 +29,9 @@
|
||||
a scons-local installation, which can be found in the scons/ subdirectory.
|
||||
This document uses the scons-local installation for its examples.
|
||||
|
||||
For build instructions, including dependencies, consult the appropriate
|
||||
section for your platform at
|
||||
http://wiki.blender.org/index.php/Dev:Doc/Building_Blender. Note that for
|
||||
Check from the page
|
||||
http://www.blender.org/development/building-blender/getting-dependencies/
|
||||
that you have all dependencies needed for building Blender. Note that for
|
||||
windows many of these dependencies already come in the lib/windows module
|
||||
from CVS.
|
||||
|
||||
@@ -53,13 +53,12 @@
|
||||
from the command-line is given, then all libraries and binaries to
|
||||
build are configured.
|
||||
|
||||
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to finally copy
|
||||
all needed files to get a proper setup. The BF_DOCDIR is used to generate
|
||||
Blender Python documentation files to. These variables have default values
|
||||
for every platform in
|
||||
$BLENDERHOME/build_files/scons/config/(platform)-config.py. See the next
|
||||
section of this document for how to customize these paths. After the build
|
||||
successfully completes, you can find everything you need in BF_INSTALLDIR.
|
||||
The build uses BF_BUILDDIR to build into and BF_INSTALLDIR to
|
||||
finally copy all needed files to get a proper setup. The BF_DOCDIR is
|
||||
used to generate Blender Python documentation files to. These
|
||||
variables have default values for every platform in
|
||||
$BLENDERHOME/config/(platform)-config.py. After the build successfully
|
||||
completes, you can find everything you need in BF_INSTALLDIR.
|
||||
|
||||
If you want to create the installer package of Blender on Windows you'll
|
||||
need to install nullsoft scriptable install system from http://nsis.sf.net.
|
||||
@@ -73,8 +72,8 @@
|
||||
---------------------
|
||||
|
||||
The default values for your platform can be found in the directory
|
||||
$BLENDERHOME/build_files/scons/config. Your platform specific defaults are
|
||||
in (platform)-config.py, where platform is one of:
|
||||
$BLENDERHOME/config. Your platform specific defaults are in
|
||||
(platform)-config.py, where platform is one of:
|
||||
|
||||
- linux, for machines running Linux
|
||||
- win32-vc, for Windows machines, compiling with a Microsoft compiler
|
||||
@@ -82,13 +81,12 @@
|
||||
- darwin, for OS X machines
|
||||
(TBD: add cygwin, solaris and freebsd support)
|
||||
|
||||
These files you will normally not change. If you need to override a
|
||||
default value, make a file called $BLENDERHOME/user-config.py, and copy
|
||||
settings from the build_files/scons/config/(platform)-config.py that you
|
||||
want to change. Don't copy the entire file (unless explicitly stated in
|
||||
the configuration file), because you may not get updated options you don't
|
||||
change yourself, which may result in build errors. You should NEVER have
|
||||
to modify $BLENDERHOME/build_files/scons/config/(platform)-config.py.
|
||||
These files you will normally not change. If you need to override
|
||||
a default value, make a file called $BLENDERHOME/user-config.py, and copy
|
||||
settings from the config/(platform)-config.py that you want to change. Don't
|
||||
copy the entire file (unless explicitely stated in the configuration file),
|
||||
because you may not get updated options you don't change yourself, which may
|
||||
result in build errors.
|
||||
|
||||
You can use BF_CONFIG argument to override the default user-config.py
|
||||
check. This is just like the user-config.py, but just with another name:
|
||||
@@ -115,6 +113,11 @@
|
||||
(unless you have overridden any of them in your
|
||||
$BLENDERHOME/user-config.py).
|
||||
|
||||
NOTE: The best way to avoid confusion is the
|
||||
copy $BLENDERHOME/config/(platform)-config.py to
|
||||
$BLENDERHOME/user-config.py. You should NEVER have to modify
|
||||
$BLENDERHOME/config/(platform)-config.py
|
||||
|
||||
Configuring the output
|
||||
----------------------
|
||||
|
||||
|
2384
doc/doxygen/Doxyfile
2384
doc/doxygen/Doxyfile
File diff suppressed because it is too large
Load Diff
@@ -10,14 +10,26 @@
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup boolop boolop
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup ctr container
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup decimation decimation
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup elbeem elbeem
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup bsp bsp
|
||||
* \ingroup intern
|
||||
*/
|
||||
|
||||
/** \defgroup iksolver iksolver
|
||||
* \ingroup intern
|
||||
*/
|
@@ -7,7 +7,7 @@
|
||||
* These pages document the source code of blender.
|
||||
*
|
||||
* \subsection implinks Important Links
|
||||
* - <a href="http://developer.blender.org">developer.blender.org</a> with bug tracker.
|
||||
* - <a href="http://projects.blender.org">projects.blender.org</a> with <a href="http://projects.blender.org/tracker/index.php?group_id=9&atid=498">bug tracker</a>
|
||||
* - <a href="http://wiki.blender.org/index.php/Dev:Contents">Development documents</a> on our wiki.
|
||||
*
|
||||
* \subsection blother Other
|
@@ -11,6 +11,7 @@
|
||||
/** \defgroup bmesh BMesh
|
||||
* \ingroup blender
|
||||
*/
|
||||
/** \defgroup texture Texturing */
|
||||
/** \defgroup compositor Compositing */
|
||||
|
||||
/** \defgroup python Python
|
||||
@@ -92,44 +93,36 @@
|
||||
|
||||
/* ================================ */
|
||||
|
||||
/** \defgroup blender Blender */
|
||||
/** \defgroup blender blender */
|
||||
|
||||
/** \defgroup blf BlenFont
|
||||
/** \defgroup blf blenfont
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup bke BlenKernel
|
||||
/** \defgroup bke blenkernel
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup bli BlenLib
|
||||
/** \defgroup bli blenlib
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup depsgraph Dependency Graph
|
||||
/** \defgroup nodes nodes
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup bph Physics
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup nodes Nodes
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup cmpnodes Nodes (Compositor)
|
||||
/** \defgroup cmpnodes cmpnodes
|
||||
* \ingroup nodes
|
||||
*/
|
||||
|
||||
/** \defgroup shdnodes Nodes (Shader)
|
||||
/** \defgroup shdnodes shdnodes
|
||||
* \ingroup nodes
|
||||
*/
|
||||
|
||||
/** \defgroup texnodes Nodes (Texture)
|
||||
/** \defgroup texnodes texnodes
|
||||
* \ingroup nodes
|
||||
*/
|
||||
/** \defgroup modifiers Object Modifiers
|
||||
/** \defgroup modifiers modifiers
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
@@ -139,29 +132,29 @@
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup ikplugin IK Plugin
|
||||
/** \defgroup ikplugin ikplugin
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
||||
/** \defgroup DNA Struct DNA (File Format)
|
||||
/** \defgroup DNA sDNA
|
||||
* \ingroup blender data
|
||||
*/
|
||||
/** \defgroup RNA RNA (Data API)
|
||||
/** \defgroup RNA RNA
|
||||
* \ingroup blender data
|
||||
*/
|
||||
|
||||
/** \defgroup blenloader Blend file IO
|
||||
/** \defgroup blenloader .blend read and write functions
|
||||
* \ingroup blender data
|
||||
* \todo check if \ref blo and \ref blenloader groups can be
|
||||
* merged in docs.
|
||||
*/
|
||||
|
||||
/** \defgroup quicktime QuickTime
|
||||
/** \defgroup quicktime quicktime
|
||||
* \ingroup blender
|
||||
|
||||
/** \defgroup gui GUI */
|
||||
|
||||
/** \defgroup wm Window Manager
|
||||
/** \defgroup wm windowmanager
|
||||
* \ingroup blender gui
|
||||
*/
|
||||
|
||||
@@ -321,7 +314,7 @@
|
||||
* \ingroup gui
|
||||
*/
|
||||
|
||||
/** \defgroup externformats External Formats */
|
||||
/** \defgroup externformats external formats */
|
||||
|
||||
/** \defgroup collada COLLADA
|
||||
* \ingroup externformats
|
||||
@@ -331,7 +324,7 @@
|
||||
* \ingroup externformats
|
||||
*/
|
||||
|
||||
/** \defgroup imbuf Image Buffer (ImBuf)
|
||||
/** \defgroup imbuf IMage Buffer
|
||||
* \ingroup blender
|
||||
*/
|
||||
|
@@ -1,674 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
457
doc/manpage/blender.1
Normal file
457
doc/manpage/blender.1
Normal file
@@ -0,0 +1,457 @@
|
||||
.TH "BLENDER" "1" "February 14, 2013" "Blender Blender 2\&.66"
|
||||
|
||||
.SH NAME
|
||||
blender \- a 3D modelling and rendering package
|
||||
.SH SYNOPSIS
|
||||
.B blender [args ...] [file] [args ...]
|
||||
.br
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.B blender
|
||||
is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
|
||||
|
||||
Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
|
||||
|
||||
http://www.blender.org
|
||||
.SH OPTIONS
|
||||
|
||||
Blender 2.66
|
||||
Usage: blender [args ...] [file] [args ...]
|
||||
.br
|
||||
.SS "Render Options:"
|
||||
|
||||
.TP
|
||||
.B \-b or \-\-background <file>
|
||||
.br
|
||||
Load <file> in background (often used for UI\-less rendering)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-a or \-\-render\-anim
|
||||
.br
|
||||
Render frames from start to end (inclusive)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-S or \-\-scene <name>
|
||||
.br
|
||||
Set the active scene <name> for rendering
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-f or \-\-render\-frame <frame>
|
||||
.br
|
||||
Render frame <frame> and save it.
|
||||
.br
|
||||
+<frame> start frame relative, \-<frame> end frame relative.
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-s or \-\-frame\-start <frame>
|
||||
.br
|
||||
Set start to frame <frame> (use before the \-a argument)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-e or \-\-frame\-end <frame>
|
||||
.br
|
||||
Set end to frame <frame> (use before the \-a argument)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-j or \-\-frame\-jump <frames>
|
||||
.br
|
||||
Set number of frames to step forward after each rendered frame
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-o or \-\-render\-output <path>
|
||||
.br
|
||||
Set the render path and file name.
|
||||
.br
|
||||
Use // at the start of the path to
|
||||
.br
|
||||
render relative to the blend file.
|
||||
.br
|
||||
The # characters are replaced by the frame number, and used to define zero padding.
|
||||
.br
|
||||
ani_##_test.png becomes ani_01_test.png
|
||||
.br
|
||||
test\-######.png becomes test\-000001.png
|
||||
.br
|
||||
When the filename does not contain #, The suffix #### is added to the filename
|
||||
.br
|
||||
The frame number will be added at the end of the filename.
|
||||
.br
|
||||
eg: blender \-b foobar.blend \-o //render_ \-F PNG \-x 1 \-a
|
||||
.br
|
||||
//render_ becomes //render_####, writing frames as //render_0001.png//
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-E or \-\-engine <engine>
|
||||
.br
|
||||
Specify the render engine
|
||||
.br
|
||||
use \-E help to list available engines
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.SS "Format Options:"
|
||||
|
||||
.TP
|
||||
.B \-F or \-\-render\-format <format>
|
||||
.br
|
||||
Set the render format, Valid options are...
|
||||
.br
|
||||
TGA IRIS JPEG MOVIE IRIZ RAWTGA
|
||||
.br
|
||||
AVIRAW AVIJPEG PNG BMP FRAMESERVER
|
||||
.br
|
||||
(formats that can be compiled into blender, not available on all systems)
|
||||
.br
|
||||
HDR TIFF EXR MULTILAYER MPEG AVICODEC QUICKTIME CINEON DPX DDS
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-x or \-\-use\-extension <bool>
|
||||
.br
|
||||
Set option to add the file extension to the end of the file
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-t or \-\-threads <threads>
|
||||
.br
|
||||
Use amount of <threads> for rendering in background
|
||||
.br
|
||||
[1\-64], 0 for systems processor count.
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.SS "Animation Playback Options:"
|
||||
|
||||
.TP
|
||||
.B \-a <options> <file(s)>
|
||||
.br
|
||||
Playback <file(s)>, only operates this way when not running in background.
|
||||
.br
|
||||
\-p <sx> <sy> Open with lower left corner at <sx>, <sy>
|
||||
.br
|
||||
\-m Read from disk (Don't buffer)
|
||||
.br
|
||||
\-f <fps> <fps\-base> Specify FPS to start with
|
||||
.br
|
||||
\-j <frame> Set frame step to <frame>
|
||||
.br
|
||||
\-s <frame> Play from <frame>
|
||||
.br
|
||||
\-e <frame> Play until <frame>
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.SS "Window Options:"
|
||||
|
||||
.TP
|
||||
.B \-w or \-\-window\-border
|
||||
.br
|
||||
Force opening with borders (default)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-W or \-\-window\-borderless
|
||||
.br
|
||||
Force opening without borders
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-p or \-\-window\-geometry <sx> <sy> <w> <h>
|
||||
.br
|
||||
Open with lower left corner at <sx>, <sy> and width and height as <w>, <h>
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-con or \-\-start\-console
|
||||
.br
|
||||
Start with the console window open (ignored if \-b is set)
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.SS "Game Engine Specific Options:"
|
||||
|
||||
.TP
|
||||
.B \-g Game Engine specific options
|
||||
.br
|
||||
\-g fixedtime Run on 50 hertz without dropping frames
|
||||
.br
|
||||
\-g vertexarrays Use Vertex Arrays for rendering (usually faster)
|
||||
.br
|
||||
\-g nomipmap No Texture Mipmapping
|
||||
.br
|
||||
\-g linearmipmap Linear Texture Mipmapping instead of Nearest (default)
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.SS "Misc Options:"
|
||||
|
||||
.TP
|
||||
.B \-d or \-\-debug
|
||||
.br
|
||||
Turn debugging on
|
||||
.br
|
||||
|
||||
.IP
|
||||
* Prints every operator call and their arguments
|
||||
.br
|
||||
* Disables mouse grab (to interact with a debugger in some cases)
|
||||
.br
|
||||
* Keeps python sys.stdin rather than setting it to None
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-fpe
|
||||
.br
|
||||
Enable floating point exceptions
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-disable\-crash\-handler
|
||||
.br
|
||||
Disable the crash handler
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-\-factory\-startup
|
||||
.br
|
||||
Skip reading the "startup.blend" in the users home directory
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-\-env\-system\-datafiles
|
||||
.br
|
||||
Set the BLENDER_SYSTEM_DATAFILES environment variable
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-env\-system\-scripts
|
||||
.br
|
||||
Set the BLENDER_SYSTEM_SCRIPTS environment variable
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-env\-system\-python
|
||||
.br
|
||||
Set the BLENDER_SYSTEM_PYTHON environment variable
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-nojoystick
|
||||
.br
|
||||
Disable joystick support
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-noglsl
|
||||
.br
|
||||
Disable GLSL shading
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-noaudio
|
||||
.br
|
||||
Force sound system to None
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-setaudio
|
||||
.br
|
||||
Force sound system to a specific device
|
||||
.br
|
||||
NULL SDL OPENAL JACK
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-h or \-\-help
|
||||
.br
|
||||
Print this help text and exit
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-y or \-\-enable\-autoexec
|
||||
.br
|
||||
Enable automatic python script execution, (default)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-Y or \-\-disable\-autoexec
|
||||
.br
|
||||
Disable automatic python script execution (pydrivers & startup scripts)
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-P or \-\-python <filename>
|
||||
.br
|
||||
Run the given Python script file
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-python\-text <name>
|
||||
.br
|
||||
Run the given Python script text block
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-python\-console
|
||||
.br
|
||||
Run blender with an interactive console
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-addons
|
||||
.br
|
||||
Comma separated list of addons (no spaces)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-v or \-\-version
|
||||
.br
|
||||
Print Blender version and exit
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-
|
||||
.br
|
||||
Ends option processing, following arguments passed unchanged. Access via python's sys.argv
|
||||
.br
|
||||
|
||||
.SS "Other Options:"
|
||||
|
||||
.TP
|
||||
.B /?
|
||||
.br
|
||||
Print this help text and exit (windows only)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-python
|
||||
.br
|
||||
Enable debug messages for python
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-events
|
||||
.br
|
||||
Enable debug messages for the event system
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-handlers
|
||||
.br
|
||||
Enable debug messages for event handling
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-wm
|
||||
.br
|
||||
Enable debug messages for the window manager
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-all
|
||||
.br
|
||||
Enable all debug messages (excludes libmv)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-value <value>
|
||||
.br
|
||||
Set debug value of <value> on startup
|
||||
.br
|
||||
|
||||
.IP
|
||||
|
||||
.TP
|
||||
.B \-\-debug\-jobs
|
||||
.br
|
||||
Enable time profiling for background jobs.
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-verbose <verbose>
|
||||
.br
|
||||
Set logging verbosity level.
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-R
|
||||
.br
|
||||
Register .blend extension, then exit (Windows only)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-r
|
||||
.br
|
||||
Silently register .blend extension, then exit (Windows only)
|
||||
.br
|
||||
|
||||
.TP
|
||||
.B \-\-no\-native\-pixels
|
||||
.br
|
||||
Do not use native pixel size, for high resolution displays (MacBook 'Retina')
|
||||
.br
|
||||
|
||||
.SS "Argument Parsing:"
|
||||
|
||||
arguments must be separated by white space. eg
|
||||
"blender \-ba test.blend"
|
||||
...will ignore the 'a'
|
||||
"blender \-b test.blend \-f8"
|
||||
...will ignore 8 because there is no space between the \-f and the frame value
|
||||
.br
|
||||
.SS "Argument Order:"
|
||||
|
||||
Arguments are executed in the order they are given. eg
|
||||
"blender \-\-background test.blend \-\-render\-frame 1 \-\-render\-output /tmp"
|
||||
...will not render to /tmp because '\-\-render\-frame 1' renders before the output path is set
|
||||
"blender \-\-background \-\-render\-output /tmp test.blend \-\-render\-frame 1"
|
||||
...will not render to /tmp because loading the blend file overwrites the render output that was set
|
||||
"blender \-\-background test.blend \-\-render\-output /tmp \-\-render\-frame 1" works as expected.
|
||||
.br
|
||||
.br
|
||||
.SH "ENVIRONMENT VARIABLES"
|
||||
\fIBLENDER_USER_CONFIG\fR Directory for user configuration files.
|
||||
\fIBLENDER_USER_SCRIPTS\fR Directory for user scripts.
|
||||
\fIBLENDER_SYSTEM_SCRIPTS\fR Directory for system wide scripts.
|
||||
\fIDirectory\fR for user data files (icons, translations, ..).
|
||||
\fIBLENDER_SYSTEM_DATAFILES\fR Directory for system wide data files.
|
||||
\fIBLENDER_SYSTEM_PYTHON\fR Directory for system python libraries.
|
||||
\fITMP\fR or \fITMPDIR\fR Store temporary files here.
|
||||
\fIPYTHONHOME\fR Path to the python directory, eg. /usr/lib/python.
|
||||
.br
|
||||
.br
|
||||
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.B yafaray(1)
|
||||
|
||||
.br
|
||||
.SH AUTHORS
|
||||
This manpage was written for a Debian GNU/Linux system by Daniel Mester
|
||||
<mester@uni-bremen.de> and updated by Cyril Brulebois
|
||||
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
|
49
doc/manpage/blender.1.py
Executable file → Normal file
49
doc/manpage/blender.1.py
Executable file → Normal file
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/python
|
||||
|
||||
# ##### BEGIN GPL LICENSE BLOCK #####
|
||||
#
|
||||
@@ -18,19 +18,10 @@
|
||||
#
|
||||
# ##### END GPL LICENSE BLOCK #####
|
||||
|
||||
'''
|
||||
This script generates the blender.1 man page, embedding the help text
|
||||
from the Blender executable itself. Invoke it as follows:
|
||||
|
||||
blender.1.py <path-to-blender> <output-filename>
|
||||
|
||||
where <path-to-blender> is the path to the Blender executable,
|
||||
and <output-filename> is where to write the generated man page.
|
||||
'''
|
||||
|
||||
# <pep8 compliant>
|
||||
|
||||
import subprocess
|
||||
import os
|
||||
import sys
|
||||
|
||||
import time
|
||||
@@ -42,23 +33,26 @@ def man_format(data):
|
||||
data = data.replace("\t", " ")
|
||||
return data
|
||||
|
||||
if len(sys.argv) != 3:
|
||||
import getopt
|
||||
raise getopt.GetoptError("Usage: %s <path-to-blender> <output-filename>" % sys.argv[0])
|
||||
|
||||
blender_bin = sys.argv[1]
|
||||
outfilename = sys.argv[2]
|
||||
# allow passing blender as argument
|
||||
if sys.argv[-1].endswith(os.sep + "blender"):
|
||||
blender_bin = sys.argv[-1]
|
||||
else:
|
||||
blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
|
||||
|
||||
cmd = [blender_bin, "--help"]
|
||||
print(" executing:", " ".join(cmd))
|
||||
blender_help = subprocess.check_output(cmd).decode(encoding="utf-8")
|
||||
blender_version = subprocess.check_output([blender_bin, "--version"]).decode(encoding="utf-8").strip()
|
||||
blender_version = blender_version.split("build")[0].rstrip()
|
||||
blender_version = blender_version.partition(" ")[2] # remove 'Blender' prefix.
|
||||
blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8")
|
||||
|
||||
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode(encoding="utf-8").strip()
|
||||
blender_version = blender_version.split("Build")[0]
|
||||
|
||||
date_string = datetime.date.fromtimestamp(time.time()).strftime("%B %d, %Y")
|
||||
|
||||
outfile = open(outfilename, "w")
|
||||
fw = outfile.write
|
||||
filepath = os.path.splitext(__file__)[0]
|
||||
|
||||
file = open(filepath, "w")
|
||||
|
||||
fw = file.write
|
||||
|
||||
fw('.TH "BLENDER" "1" "%s" "Blender %s"\n' % (date_string, blender_version.replace(".", "\\&.")))
|
||||
|
||||
@@ -75,9 +69,9 @@ fw('''
|
||||
.SH DESCRIPTION
|
||||
.PP
|
||||
.B blender
|
||||
is a 3D modelling and rendering package. Originating as the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
|
||||
is a 3D modelling and rendering package. It is the in-house software of a high quality animation studio, Blender has proven to be an extremely fast and versatile design instrument. The software has a personal touch, offering a unique approach to the world of Three Dimensions.
|
||||
|
||||
Use Blender to create TV commercials, to make technical visualizations, business graphics, to create content for games, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
|
||||
Use Blender to create TV commercials, to make technical visualizations, business graphics, to do some morphing, or design user interfaces. You can easy build and manage complex environments. The renderer is versatile and extremely fast. All basic animation principles (curves & keys) are well implemented.
|
||||
|
||||
http://www.blender.org''')
|
||||
|
||||
@@ -125,7 +119,7 @@ while lines:
|
||||
fw('''
|
||||
.br
|
||||
.SH SEE ALSO
|
||||
.B luxrender(1)
|
||||
.B yafaray(1)
|
||||
|
||||
.br
|
||||
.SH AUTHORS
|
||||
@@ -134,5 +128,4 @@ This manpage was written for a Debian GNU/Linux system by Daniel Mester
|
||||
<cyril.brulebois@enst-bretagne.fr> and Dan Eicher <dan@trollwerks.org>.
|
||||
''')
|
||||
|
||||
outfile.close()
|
||||
print("written:", outfilename)
|
||||
print("written:", filepath)
|
||||
|
@@ -20,15 +20,15 @@ constraint_type = 2
|
||||
physics_id_1 = object_1.getPhysicsId()
|
||||
physics_id_2 = object_2.getPhysicsId()
|
||||
|
||||
# use bottom right edge of Object1 for hinge position
|
||||
# Use bottom right edge of Object1 for hinge position
|
||||
edge_position_x = 1.0
|
||||
edge_position_y = 0.0
|
||||
edge_position_z = -1.0
|
||||
|
||||
# rotate the pivot z axis about 90 degrees
|
||||
# use Object1 y axis for angle to point hinge
|
||||
edge_angle_x = 0.0
|
||||
edge_angle_y = 0.0
|
||||
edge_angle_z = 90.0
|
||||
edge_angle_y = 1.0
|
||||
edge_angle_z = 0.0
|
||||
|
||||
# create an edge constraint
|
||||
constraints.createConstraint(physics_id_1, physics_id_2,
|
||||
|
@@ -2,8 +2,8 @@
|
||||
Texture Replacement
|
||||
+++++++++++++++++++
|
||||
Example of how to replace a texture in game with an external image.
|
||||
``createTexture()`` and ``removeTexture()`` are to be called from a
|
||||
module Python Controller.
|
||||
createTexture() and removeTexture() are to be called from a module Python
|
||||
Controller.
|
||||
"""
|
||||
from bge import logic
|
||||
from bge import texture
|
||||
|
@@ -1,8 +1,7 @@
|
||||
"""
|
||||
Basic Video Playback
|
||||
++++++++++++++++++++
|
||||
Example of how to replace a texture in game with a video. It needs to run
|
||||
everyframe.
|
||||
Example of how to replace a texture in game with a video. It needs to run everyframe
|
||||
"""
|
||||
import bge
|
||||
from bge import texture
|
||||
|
@@ -1,19 +1,16 @@
|
||||
"""
|
||||
.. _operator-execution_context:
|
||||
|
||||
Execution Context
|
||||
-----------------
|
||||
|
||||
When calling an operator you may want to pass the execution context.
|
||||
|
||||
This determines the context that is given for the operator to run in, and whether
|
||||
invoke() is called or only execute().
|
||||
This determines the context thats given to the operator to run in, and weather
|
||||
invoke() is called or execute().
|
||||
|
||||
'EXEC_DEFAULT' is used by default, running only the execute() method, but you may
|
||||
want the operator to take user interaction with 'INVOKE_DEFAULT' which will also
|
||||
call invoke() if existing.
|
||||
'EXEC_DEFAULT' is used by default but you may want the operator to take user
|
||||
interaction with 'INVOKE_DEFAULT'.
|
||||
|
||||
The execution context is one of:
|
||||
The execution context is as a non keyword, string argument in:
|
||||
('INVOKE_DEFAULT', 'INVOKE_REGION_WIN', 'INVOKE_REGION_CHANNELS',
|
||||
'INVOKE_REGION_PREVIEW', 'INVOKE_AREA', 'INVOKE_SCREEN', 'EXEC_DEFAULT',
|
||||
'EXEC_REGION_WIN', 'EXEC_REGION_CHANNELS', 'EXEC_REGION_PREVIEW', 'EXEC_AREA',
|
||||
|
@@ -3,7 +3,7 @@ PropertyGroup Example
|
||||
+++++++++++++++++++++
|
||||
|
||||
PropertyGroups can be used for collecting custom settings into one value
|
||||
to avoid many individual settings mixed in together.
|
||||
to avoid many indervidual settings mixed in together.
|
||||
"""
|
||||
|
||||
import bpy
|
||||
|
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Get/Set Example
|
||||
+++++++++++++++
|
||||
++++++++++++++
|
||||
|
||||
Get/Set functions can be used for boolean, int, float, string and enum properties.
|
||||
If these callbacks are defined the property will not be stored in the ID properties
|
||||
@@ -75,7 +75,7 @@ print(scene.test_float)
|
||||
scene.test_array = (True, False)
|
||||
print([x for x in scene.test_array])
|
||||
|
||||
# scene.test_date = "blah" # this would fail, property is read-only
|
||||
#scene.test_date = "blah" # this would fail, property is read-only
|
||||
print(scene.test_date)
|
||||
|
||||
scene.test_enum = 'BLUE'
|
||||
|
@@ -6,7 +6,7 @@ Custom properties can be added to any subclass of an :class:`ID`,
|
||||
:class:`Bone` and :class:`PoseBone`.
|
||||
|
||||
These properties can be animated, accessed by the user interface and python
|
||||
like Blender's existing properties.
|
||||
like blenders existing properties.
|
||||
"""
|
||||
|
||||
import bpy
|
||||
|
@@ -1,11 +1,12 @@
|
||||
"""
|
||||
Extending Menus
|
||||
+++++++++++++++
|
||||
When creating menus for addons you can't reference menus in Blender's default
|
||||
When creating menus for addons you can't reference menus in blenders default
|
||||
scripts.
|
||||
Instead, the addon can add menu items to existing menus.
|
||||
|
||||
The function menu_draw acts like :class:`Menu.draw`.
|
||||
Instead the addon can add menu items to existing menus.
|
||||
|
||||
The function menu_draw acts like Menu.draw
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
@@ -1,20 +1,21 @@
|
||||
"""
|
||||
Basic Menu Example
|
||||
++++++++++++++++++
|
||||
Here is an example of a simple menu. Menus differ from panels in that they must
|
||||
This script is a simple menu, menus differ from panels in that they must
|
||||
reference from a header, panel or another menu.
|
||||
|
||||
Notice the 'CATEGORY_MT_name' in :class:`Menu.bl_idname`, this is a naming
|
||||
Notice the 'CATEGORY_MT_name' :class:`Menu.bl_idname`, this is a naming
|
||||
convention for menus.
|
||||
|
||||
.. note::
|
||||
|
||||
Menu subclasses must be registered before referencing them from blender.
|
||||
|
||||
.. note::
|
||||
Menus have their :class:`Layout.operator_context` initialized as
|
||||
'EXEC_REGION_WIN' rather than 'INVOKE_DEFAULT' (see :ref:`Execution Context <operator-execution_context>`).
|
||||
If the operator context needs to initialize inputs from the
|
||||
:class:`Operator.invoke` function, then this needs to be explicitly set.
|
||||
Menu's have their :class:`Layout.operator_context` initialized as
|
||||
'EXEC_REGION_WIN' rather then 'INVOKE_DEFAULT', so if the operator context
|
||||
needs to initialize inputs from the :class:`Operator.invoke` function
|
||||
then this needs to be explicitly set.
|
||||
"""
|
||||
import bpy
|
||||
|
||||
|
@@ -31,7 +31,7 @@ class SimpleMouseOperator(bpy.types.Operator):
|
||||
y = bpy.props.IntProperty()
|
||||
|
||||
def execute(self, context):
|
||||
# rather than printing, use the report function,
|
||||
# rather then printing, use the report function,
|
||||
# this way the message appears in the header,
|
||||
self.report({'INFO'}, "Mouse coords are %d %d" % (self.x, self.y))
|
||||
return {'FINISHED'}
|
||||
|
@@ -39,7 +39,7 @@ class ModalOperator(bpy.types.Operator):
|
||||
self.execute(context)
|
||||
elif event.type == 'LEFTMOUSE': # Confirm
|
||||
return {'FINISHED'}
|
||||
elif event.type in {'RIGHTMOUSE', 'ESC'}: # Cancel
|
||||
elif event.type in ('RIGHTMOUSE', 'ESC'): # Cancel
|
||||
context.object.location.x = self.init_loc_x
|
||||
return {'CANCELLED'}
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user