Add build script

This commit is contained in:
Crypto137 2025-11-18 00:52:53 +03:00
parent e844eea45c
commit 3d294859df
2 changed files with 32 additions and 0 deletions

3
.gitignore vendored
View file

@ -402,3 +402,6 @@ FodyWeavers.xsd
.*#
.#*
# Build directory
/build

29
Build.bat Normal file
View file

@ -0,0 +1,29 @@
@echo off
set BUILD_DIR=.\src\MHServerEmu\bin\x64\Release\net8.0
set OUTPUT_DIR=.\build
echo ==================
echo Building...
echo ==================
dotnet build MHServerEmu.sln -c Release
if %errorlevel% neq 0 (
echo Build failed!
pause
exit /b %errorlevel%
)
echo ==================
echo Copying...
echo ==================
if not exist "%OUTPUT_DIR%" mkdir "%OUTPUT_DIR%"
robocopy "%BUILD_DIR%" "%OUTPUT_DIR%" *.* /s /xf *.pdb *.xml /np /njs /njh
echo ==================
echo Build Complete
echo ==================
pause