|
| 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=2026 |
| 34 | +SET MAYA_LOCATION="%PROGRAMFILES%\Autodesk\Maya2026" |
| 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=2025 |
| 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