|
OpenCoD2-Plus
Call of Duty 2 client & server, rebuilt
|
Functions | |
| win_path (path) | |
| claim_mirror (src) | |
| sync (src) | |
| main () | |
Variables | |
| ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| DEFAULT_SRC = os.environ.get('COD2_MSVC_SRC', '/mnt/e/opencod2-msvc-src') | |
| str | VS2019 = r'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools' |
| str | VCVARS = VS2019 + r'\VC\Auxiliary\Build\vcvars32.bat' |
| str | CMAKE_BIN = VS2019 + r'\Common7\IDE\CommonExtensions\Microsoft\CMake' |
| str | MARKER = '.cod2_msvc_mirror' |
Builds the MSVC-ABI Windows client from WSL, on a copy of the tree on a Windows drive.
python3 scripts/msvc_build.py [--src /mnt/e/opencod2-msvc-src] [--variant msvc-client] [cmake -D options ...]
The MSVC tools cannot build from \\\\wsl$, so the tracked and untracked (not
ignored) files are mirrored to --src with rsync; the copy keeps what it holds
besides (its build/ and third_party/SDL2-*/, the SDL2 VC package). Then
cmd.exe runs VS 2019 Build Tools' vcvars32.bat, configures
build/check-<variant> there with cmake/toolchain-msvc-clang.cmake and builds
cod2_win32. The exe, its map and the build log are copied back to
build/check-<variant>/ here. Exits with the build's status.
| msvc_build.claim_mirror | ( | src | ) |
src is this script's copy: new or empty (then marked), or marked before. Anything else (a mistyped --src: a game folder, a drive) stops the build before sync prunes it.
| msvc_build.main | ( | ) |
| msvc_build.sync | ( | src | ) |
Mirrors the working tree (tracked and untracked, not ignored) to src; files gone here go there too.
| msvc_build.win_path | ( | path | ) |
| str msvc_build.CMAKE_BIN = VS2019 + r'\Common7\IDE\CommonExtensions\Microsoft\CMake' |
| msvc_build.DEFAULT_SRC = os.environ.get('COD2_MSVC_SRC', '/mnt/e/opencod2-msvc-src') |
| str msvc_build.MARKER = '.cod2_msvc_mirror' |
| msvc_build.ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) |
| str msvc_build.VCVARS = VS2019 + r'\VC\Auxiliary\Build\vcvars32.bat' |
| str msvc_build.VS2019 = r'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools' |