### Show Configuration Help with python3 ../configure -h Source: https://github.com/alliedmodders/metamod-source/blob/master/samples/s2_sample_mm/README.md Run this command from within the build folder to see additional configuration arguments not covered in the guide. ```bash python3 ../configure -h ``` -------------------------------- ### Configure build with python3 ../configure.py Source: https://github.com/alliedmodders/metamod-source/blob/master/samples/s2_sample_mm/README.md Example command to configure the build for CS2 and Dota 2 on x86_64, pointing to the metamod-source and hl2sdk roots. Run from the build directory after creating it. ```bash python3 ../configure.py -s cs2,dota --targets=x86_64 --mms_path=D:\mmsource-1.12 --hl2sdk-root=D:\hl2sdks ``` -------------------------------- ### Run all supported game backend tests Source: https://github.com/alliedmodders/metamod-source/blob/master/loader/test/README.md Runs the test_determinebackends1.ps1 script to test all supported games in Steam. Pass the Steam installation path as an argument. ```powershell .\loader\test\test_determinebackends1.ps1 "C:\Program Files (x86)\Steam" ``` -------------------------------- ### Configure build on Windows Source: https://github.com/alliedmodders/metamod-source/blob/master/samples/s1_sample_mm/README.md Configure the build for Metamod: Source on Windows. Use Command Prompt because Gitbash does not handle path arguments correctly. The --hl2sdk-root specifies the path where all SDKs are installed by support/checkout-deps.sh, and --mms_path is the path to Metamod: Source. ```bash mkdir build cd build python ../configure.py --hl2sdk-root C:\Users\user\Documents\GitHub --mms_path C:\Users\user\Documents\GitHub\metamod-source ``` -------------------------------- ### Generate Visual Studio Solution with python3 ../configure Source: https://github.com/alliedmodders/metamod-source/blob/master/samples/s2_sample_mm/README.md Run this command from the build folder to generate a Visual Studio 2022 solution for the plugin. Replace {CONFIGURE_OPTIONS} with your default configuring options. This creates .vcxproj files for each SDK game provided. ```bash python3 ../configure {CONFIGURE_OPTIONS} --gen=vs --vs-version=2022 ``` -------------------------------- ### Build with tests enabled Source: https://github.com/alliedmodders/metamod-source/blob/master/loader/test/README.md Builds the project with tests enabled for the episode1 SDK. Run from the project root; creates a build directory, configures with --enable-tests, and invokes ambuild. ```bash mkdir build cd build/ python ../configure.py --sdks episode1 --enable-tests ambuild ``` -------------------------------- ### Build with ambuild Source: https://github.com/alliedmodders/metamod-source/blob/master/samples/s1_sample_mm/README.md Build the project after configuration. This command is run from the build directory. ```bash ambuild ``` -------------------------------- ### Configure the build Source: https://github.com/alliedmodders/metamod-source/blob/master/README.md Creates a build directory and configures the build using the configure.py script. Run from the metamod-source directory. ```bash mkdir build cd build python ../configure.py ``` -------------------------------- ### Configure build for an individual SDK Source: https://github.com/alliedmodders/metamod-source/blob/master/README.md Configures the build for a specific SDK (e.g., episode1) using the --sdks flag. Run from the metamod-source directory. ```bash mkdir build cd build python ../configure.py --sdks episode1 ``` -------------------------------- ### Clone SDK dependencies Source: https://github.com/alliedmodders/metamod-source/blob/master/README.md Checks out the SDK dependencies needed for the build. Run from the parent directory of the metamod-source checkout. ```bash cd .. metamod-source/support/checkout-deps.sh cd metamod-source ``` -------------------------------- ### Clone an individual SDK Source: https://github.com/alliedmodders/metamod-source/blob/master/README.md Checks out a specific SDK (e.g., episode1) instead of all SDKs. Run from the parent directory of the metamod-source checkout. ```bash cd .. metamod-source/support/checkout-deps.sh -s episode1 cd metamod-source ``` -------------------------------- ### Run loader tests on Windows Source: https://github.com/alliedmodders/metamod-source/blob/master/loader/test/README.md Runs the loader tests on Windows for both 32-bit and 64-bit architectures. Execute from the build directory. ```bash cd build/ loader/test/test_loader/windows-x86/test_loader.exe loader/test/test_loader/windows-x86_64/test_loader.exe ``` -------------------------------- ### Run mm_DetermineBackendS1 tests with PowerShell Source: https://github.com/alliedmodders/metamod-source/blob/master/loader/test/README.md Runs the mm_DetermineBackendS1 loader test for Black Mesa (32-bit) and Counter-Strike Source (64-bit) using PowerShell. Prepends game binaries to PATH and passes -testdbs1, -gamedir, and -expectedbackend flags. ```powershell powershell -Command { $env:Path="C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bin;" + "C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bms\bin;" + $env:Path; .\loader\test\test_loader\windows-x86\test_loader.exe -testdbs1 -gamedir bms -expectedbackend 21 } powershell -Command { $env:Path="C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\bin\x64;" + "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\bin\x64;" + $env:Path; .\loader\test\test_loader\windows-x86_64\test_loader.exe -testdbs1 -gamedir cstrike -expectedbackend 5 } ``` -------------------------------- ### Run mm_DetermineBackendS1 tests with GitBash Source: https://github.com/alliedmodders/metamod-source/blob/master/loader/test/README.md Runs the mm_DetermineBackendS1 loader test for Black Mesa (32-bit) and Counter-Strike Source (64-bit) using GitBash. Prepends game binaries to PATH and passes -testdbs1, -gamedir, and -expectedbackend flags. ```bash PATH="C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bin":"C:\Program Files (x86)\Steam\steamapps\common\Black Mesa\bms\bin":$PATH loader/test/test_loader/windows-x86/test_loader.exe -testdbs1 -gamedir bms -expectedbackend 21 PATH="C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\bin\x64":"C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Source\cstrike\bin\x64":$PATH loader/test/test_loader/windows-x86_64/test_loader.exe -testdbs1 -gamedir cstrike -expectedbackend 5 ``` -------------------------------- ### Clone repository with submodules Source: https://github.com/alliedmodders/metamod-source/blob/master/README.md Clones the Metamod:Source repository including all submodules. Requires git and is the first step in the build process. ```bash git clone --recurse-submodules https://github.com/alliedmodders/metamod-source ```