31 lines
1.5 KiB
Batchfile
31 lines
1.5 KiB
Batchfile
@echo off
|
|
REM Build the Windows (Desktop) target: native GDExtension + managed C# DLLs.
|
|
REM Run from the repo root.
|
|
|
|
setlocal
|
|
|
|
if not exist thirdparty\leanclr\CMakeLists.txt (
|
|
git submodule update --init --recursive
|
|
)
|
|
|
|
REM Re-apply the LeanCLR NotImplemented patch if a fresh submodule overwrote it.
|
|
findstr /C:"LEANCLR_FATAL_ON_RAISE_NOT_IMPLEMENTED_ERROR 1" thirdparty\leanclr\src\runtime\build_config.h >nul 2>&1
|
|
if %errorlevel% == 0 (
|
|
echo [build-windows] Re-applying leanclr NotImplemented patch...
|
|
powershell -Command "(Get-Content thirdparty/leanclr/src/runtime/build_config.h) -replace 'LEANCLR_FATAL_ON_RAISE_NOT_IMPLEMENTED_ERROR 1', 'LEANCLR_FATAL_ON_RAISE_NOT_IMPLEMENTED_ERROR 0' | Set-Content thirdparty/leanclr/src/runtime/build_config.h"
|
|
)
|
|
|
|
python3 tools\binding_generator\generate_bindings.py --api build-master\_deps\godot-cpp-src\gdextension\extension_api.json
|
|
cmake -S . -B build-master -DCMAKE_BUILD_TYPE=Debug || exit /b 1
|
|
if errorlevel 1 (
|
|
REM python3 not on PATH; try py launcher as a fallback.
|
|
py tools\binding_generator\generate_bindings.py --api build-master\_deps\godot-cpp-src\gdextension\extension_api.json
|
|
)
|
|
cmake -S . -B build-master -DCMAKE_BUILD_TYPE=Debug || exit /b 1
|
|
cmake --build build-master --config Debug --target leanclr_godot || exit /b 1
|
|
|
|
dotnet msbuild managed\GodotSharpCompat\GodotSharpCompat.csproj -p:Configuration=Debug || exit /b 1
|
|
dotnet msbuild project\Game.csproj -p:Configuration=Debug || exit /b 1
|
|
|
|
echo [build-windows] Done. Run with: "C:\path\to\Godot.exe" --path project
|