Initial
This commit is contained in:
1 parent
2cff35f215
commit
c8e6239d45
357 files changed
+253936
-74
No files matched your search
@@ -0,0 +1,42 @@
|
||||
@echo off
|
||||
setlocal EnableExtensions
|
||||
cd /d "%~dp0"
|
||||
title EonaCat.XSBOX - Build
|
||||
set "PROFILE=release"
|
||||
set "FEATURES="
|
||||
if /i "%~1"=="fast" set "PROFILE=fast"
|
||||
if /i "%~1"=="diag" (
|
||||
set "PROFILE=diag"
|
||||
set "FEATURES=--features diagnostics"
|
||||
)
|
||||
if not "%~1"=="" if /i not "%~1"=="fast" if /i not "%~1"=="diag" if /i not "%~1"=="release" (
|
||||
echo Usage: build.bat [release^|fast^|diag]
|
||||
exit /b 2
|
||||
)
|
||||
where cargo >nul 2>nul || (echo [ERROR] Install Rust from https://rustup.rs/ & exit /b 10)
|
||||
where rustc >nul 2>nul || (echo [ERROR] rustc is missing. & exit /b 11)
|
||||
where dotnet >nul 2>nul || (echo [ERROR] Install the .NET 8 SDK to build the Windows launcher. & exit /b 12)
|
||||
where cl >nul 2>nul || (
|
||||
echo [ERROR] Run from a Visual Studio Developer Command Prompt with the MSVC C++ build tools installed.
|
||||
exit /b 13
|
||||
)
|
||||
rustup target add x86_64-pc-windows-msvc
|
||||
if errorlevel 1 exit /b 14
|
||||
echo Building EonaCat.XSBOX engine (%PROFILE%)...
|
||||
cargo build --target x86_64-pc-windows-msvc --profile %PROFILE% -p eonacat-xsbox-engine %FEATURES%
|
||||
if errorlevel 1 exit /b 20
|
||||
set "OUTPUT=target\x86_64-pc-windows-msvc\%PROFILE%"
|
||||
if not exist "%OUTPUT%\eonacat-xsbox.exe" (
|
||||
echo [ERROR] Engine executable was not produced.
|
||||
exit /b 21
|
||||
)
|
||||
echo Building EonaCat.XSBOX Windows launcher...
|
||||
dotnet publish "launcher\windows\EonaCat.XSBOX.Launcher.csproj" --configuration Release --runtime win-x64 --self-contained false --output "%OUTPUT%\launcher"
|
||||
if errorlevel 1 exit /b 22
|
||||
if exist "assets\eonacat-logo.ico" copy /y "assets\eonacat-logo.ico" "%OUTPUT%\launcher\eonacat-logo.ico" >nul
|
||||
echo.
|
||||
echo BUILD SUCCESS
|
||||
echo Engine: %OUTPUT%\eonacat-xsbox.exe
|
||||
echo Launcher: %OUTPUT%\launcher\EonaCat.XSBOX.Launcher.exe
|
||||
echo Requires the .NET 8 Desktop Runtime to run the framework-dependent launcher.
|
||||
exit /b 0
|
||||
Reference in new issue
Block a user