Skip to content

Commit a03cc5a

Browse files
Backup copy of full build scripts
Because these may be changed in the near future, and it'll be good to have a record, not just in git's commit history.
1 parent f4d2dce commit a03cc5a

2 files changed

Lines changed: 167 additions & 0 deletions

File tree

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Copyright (C) 2019, 2022, 2023 David Cattermole.
4+
#
5+
# This file is part of mmSolver.
6+
#
7+
# mmSolver is free software: you can redistribute it and/or modify it
8+
# under the terms of the GNU Lesser General Public License as
9+
# published by the Free Software Foundation, either version 3 of the
10+
# License, or (at your option) any later version.
11+
#
12+
# mmSolver is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU Lesser General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU Lesser General Public License
18+
# along with mmSolver. If not, see <https://www.gnu.org/licenses/>.
19+
# ---------------------------------------------------------------------
20+
#
21+
# Builds the Maya MatchMove Solver project.
22+
23+
# Build location - where to build the project.
24+
#
25+
# Defaults to ${PROJECT_ROOT}/.. if not set.
26+
if [ -z "$BUILD_DIR_BASE" ]; then
27+
BUILD_DIR_BASE="$(pwd)/.."
28+
fi
29+
30+
# Maya
31+
MAYA_VERSION=2024
32+
MAYA_LOCATION=/usr/autodesk/maya2024/
33+
34+
# Executable names/paths used for build process.
35+
#
36+
# RockyLinux8 has Python 3.6 by default, but we use Python 3.9 because
37+
# it has better support for tools like 'ruff'.
38+
PYTHON_EXE=python3.9
39+
CMAKE_EXE=cmake3
40+
RUST_CARGO_EXE=cargo
41+
42+
# OpenColorIO specific options.
43+
OPENCOLORIO_TARBALL_NAME="OpenColorIO-2.2.1.tar.gz"
44+
OPENCOLORIO_TARBALL_EXTRACTED_DIR_NAME="OpenColorIO-2.2.1"
45+
EXPAT_RELATIVE_CMAKE_DIR=lib64/cmake/expat-2.4.1/
46+
EXPAT_RELATIVE_LIB_PATH=lib64/libexpat.a
47+
# yaml-cpp 0.7.0
48+
YAML_RELATIVE_CMAKE_DIR=share/cmake/yaml-cpp
49+
YAML_RELATIVE_LIB_PATH=lib64/libyaml-cpp.a
50+
PYSTRING_RELATIVE_LIB_PATH=lib64/libpystring.a
51+
ZLIB_RELATIVE_LIB_PATH=lib/libz.a
52+
53+
# Manually override OpenGL include headers, because CMake doesn't seem
54+
# to automatically find OpenGL headers on RockyLinux8 (which is used
55+
# in the Docker containers).
56+
OPENGL_INCLUDE_DIR=/usr/include/
57+
58+
# Which version of the VFX platform are we "using"? (Maya doesn't
59+
# currently conform to the VFX Platform.)
60+
VFX_PLATFORM=2023
61+
62+
# C++ Standard to use.
63+
CXX_STANDARD=14
64+
65+
# The -e flag causes the script to exit as soon as one command returns
66+
# a non-zero exit code.
67+
set -ev
68+
69+
CWD=`pwd`
70+
71+
# These scripts assume 'RUST_CARGO_EXE' has been set to the Rust
72+
# 'cargo' executable.
73+
source "${CWD}/scripts/internal/build_openColorIO_linux.bash"
74+
source "${CWD}/scripts/internal/build_mmSolverLibs_linux.bash"
75+
source "${CWD}/scripts/internal/build_mmSolver_linux.bash"
76+
77+
cd ${CWD}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
@ECHO OFF
2+
SETLOCAL
3+
::
4+
:: Copyright (C) 2019, 2024 David Cattermole.
5+
::
6+
:: This file is part of mmSolver.
7+
::
8+
:: mmSolver is free software: you can redistribute it and/or modify it
9+
:: under the terms of the GNU Lesser General Public License as
10+
:: published by the Free Software Foundation, either version 3 of the
11+
:: License, or (at your option) any later version.
12+
::
13+
:: mmSolver is distributed in the hope that it will be useful,
14+
:: but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
:: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
:: GNU Lesser General Public License for more details.
17+
::
18+
:: You should have received a copy of the GNU Lesser General Public License
19+
:: along with mmSolver. If not, see <https://www.gnu.org/licenses/>.
20+
:: ---------------------------------------------------------------------
21+
::
22+
:: Builds the Maya MatchMove Solver project.
23+
24+
:: Build location - where to build the project.
25+
::
26+
:: Defaults to %PROJECT_ROOT%\..\build_repro if not set.
27+
IF "%BUILD_DIR_BASE%"=="" SET BUILD_DIR_BASE=%CD%\..
28+
29+
:: Maya directories
30+
::
31+
:: Note: Do not enclose the MAYA_VERSION in quotes, it will
32+
:: lead to tears.
33+
SET MAYA_VERSION=2024
34+
SET MAYA_LOCATION="%PROGRAMFILES%\Autodesk\Maya2024"
35+
36+
:: Executable names/paths used for build process.
37+
SET PYTHON_EXE=python
38+
SET CMAKE_EXE=cmake
39+
SET RUST_CARGO_EXE=cargo
40+
41+
:: OpenColorIO specific options.
42+
::
43+
:: https://github.com/AcademySoftwareFoundation/OpenColorIO/releases/tag/v2.2.1
44+
:: https://github.com/AcademySoftwareFoundation/OpenColorIO/archive/refs/tags/v2.2.1.tar.gz
45+
SET OPENCOLORIO_TARBALL_NAME=OpenColorIO-2.2.1.tar.gz
46+
SET OPENCOLORIO_TARBALL_EXTRACTED_DIR_NAME=OpenColorIO-2.2.1
47+
SET EXPAT_RELATIVE_CMAKE_DIR=lib\cmake\expat-2.4.1\
48+
SET EXPAT_RELATIVE_LIB_PATH=lib\expatMD.lib
49+
SET ZLIB_RELATIVE_LIB_PATH=lib\zlibstatic.lib
50+
SET MINIZIP_RELATIVE_CMAKE_DIR=lib\cmake\minizip-ng
51+
:: yaml-cpp 0.7.0
52+
SET YAML_RELATIVE_CMAKE_DIR=share\cmake\yaml-cpp\
53+
SET YAML_RELATIVE_LIB_PATH=lib\yaml-cpp.lib
54+
SET PYSTRING_RELATIVE_LIB_PATH=lib\pystring.lib
55+
56+
:: Which version of the VFX platform are we "using"? (Maya doesn't
57+
:: currently conform to the VFX Platform.)
58+
SET VFX_PLATFORM=2023
59+
60+
:: C++ Standard to use.
61+
SET CXX_STANDARD=14
62+
63+
:: Setup Compiler environment. Change for your install path as needed.
64+
CALL "%PROGRAMFILES%\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
65+
66+
CALL scripts\internal\build_opencolorio_windows64.bat
67+
if errorlevel 1 goto failed_to_build_opencolorio
68+
69+
:: This script assumes 'RUST_CARGO_EXE' has been set to the Rust
70+
:: 'cargo' executable.
71+
CALL scripts\internal\build_mmSolverLibs_windows64.bat
72+
if errorlevel 1 goto failed_to_build_mmsolverlibs
73+
74+
CALL scripts\internal\build_mmSolver_windows64.bat
75+
if errorlevel 1 goto failed_to_build_mmsolver
76+
77+
:: Successful return.
78+
exit /b 0
79+
80+
:failed_to_build_opencolorio
81+
echo Failed to build OpenColorIO dependency.
82+
exit /b 1
83+
84+
:failed_to_build_mmsolverlibs
85+
echo Failed to build MM Solver Library entry point.
86+
exit /b 1
87+
88+
:failed_to_build_mmsolver
89+
echo Failed to build MM Solver.
90+
exit /b 1

0 commit comments

Comments
 (0)