12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- #!/bin/bash
- # Builds blender-legacy for testing
- #
- # Generated files/directories:
- # ./build.log
- # ./install.log
- # ./build/*
- # ./release/*
- # Define paths
- BUILD_PATH="$(realpath ./build)"
- RELEASE_PATH="$(realpath ./release)"
- # Create paths
- mkdir -p "${BUILD_PATH}"
- mkdir -p "${RELEASE_PATH}"
- # Get python version
- _pyver=$(python -c "from sys import version_info; print(\"%d.%d\" % (version_info[0],version_info[1]))")
- # CMake
- cmake -G "Ninja" -S "blender-2.79b" -B "${BUILD_PATH}" \
- -C "./blender-2.79b/build_files/cmake/config/blender_release.cmake" \
- -DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_BUILD_TYPE=Release \
- -DWITH_INSTALL_PORTABLE=OFF \
- -DWITH_GL_PROFILE_CORE=OFF \
- -DWITH_GL_PROFILE_ES20=OFF \
- -DWITH_SYSTEM_GLEW=ON \
- -DWITH_PYTHON_INSTALL=OFF \
- -DPYTHON_VERSION="${_pyver}" \
- -DWITH_LLVM=ON \
- -DWITH_CODEC_FFMPEG=ON \
- -DWITH_CYCLES=ON \
- -DWITH_OPENCOLLADA=ON \
- -DWITH_OPENCOLORIO=ON \
- -DWITH_OPENVDB=ON \
- -DWITH_OPENIMAGEIO=ON \
- -DWITH_GAMEENGINE=ON \
- -DWITH_PLAYER=ON \
- -DWITH_PYTHON_MODULE=OFF \
- -DWITH_CYCLES_OSL=NO \
- -DWITH_CYCLES_CUDA_BINARIES=OFF
- export NINJA_STATUS="[%p | %f<%r<%u | %cbps ] "
- set -o pipefail
- ninja -C "${BUILD_PATH}" 2>&1 | tee build.log;
- if [[ $? -eq 0 ]]; then
- DESTDIR="${RELEASE_PATH}" ninja -C "${BUILD_PATH}" install | tee install.log;
- if [[ $? -eq 0 ]]; then
- echo ""
- echo "You may want to try blender with command:"
- echo " BLENDER_SYSTEM_SCRIPTS=${RELEASE_PATH}/usr/2.79/scripts \\"
- echo " BLENDER_SYSTEM_DATAFILES=${RELEASE_PATH}/usr/2.79/datafiles \\"
- echo " ${RELEASE_PATH}/usr/bin/blender"
- fi
- fi
- set +o pipefail
|