-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.bat
26 lines (19 loc) · 1.1 KB
/
build.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@echo off
:: Set the paths and configurations
set "rootDir=%cd%"
set "buildsDir=%rootDir%\builds"
set "gameServerBuildsDir=%buildsDir%\gameServerBuilds"
set "masterServerBuildsDir=%buildsDir%\masterServerBuilds"
:: Clean previous build directories
if exist "%gameServerBuildsDir%" rmdir /s /q "%gameServerBuildsDir%"
if exist "%masterServerBuildsDir%" rmdir /s /q "%masterServerBuildsDir%"
:: Build GameServer for x86 platform
dotnet publish -c Release -r win-x86 --self-contained true -o "%gameServerBuildsDir%\x86" "%rootDir%\GameServer\GameServer.csproj"
:: Build GameServer for x64 platform
dotnet publish -c Release -r win-x64 --self-contained true -o "%gameServerBuildsDir%\x64" "%rootDir%\GameServer\GameServer.csproj"
:: Build MasterServer for x86 platform
dotnet publish -c Release -r win-x86 --self-contained true -o "%masterServerBuildsDir%\x86" "%rootDir%\MasterServer\MasterServer.csproj"
:: Build MasterServer for x64 platform
dotnet publish -c Release -r win-x64 --self-contained true -o "%masterServerBuildsDir%\x64" "%rootDir%\MasterServer\MasterServer.csproj"
echo Build completed successfully.
pause