Skip to content

Commit

Permalink
Fix windows build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Leinnan committed Apr 29, 2024
1 parent d41d418 commit db0850b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 2 additions & 3 deletions WinDockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ghcr.io/beamable/ue4-full:5.3.2 as builder

# use --build-arg BUILD_TYPE=-server in docker build to set it to be server build
ARG BUILD_TYPE
ARG BUILD_TYPE=" "
ENV BUILD_ARG=${BUILD_TYPE}

# by default it passes all maps, you can pass value `--build-arg MAP_ARG=-map=DefaultMap+BeamBackendTests` to override it
Expand All @@ -26,8 +26,7 @@ RUN C:\UnrealEngine\Engine\Build\BatchFiles\RunUAT.bat BuildCookRun -project=C:\
-utf8output \
-platform=Win64 \
-clientconfig=%CLIENT_CONFIG% \
-serverconfig=%SERVER_CONFIG% \
%BUILD_TYPE% \
-serverconfig=%SERVER_CONFIG% %BUILD_ARG% \
-noP4 -nodebuginfo %MAP_ARG% \
-cook -build -stage -prereqs -pak -archive \
-archivedirectory=C:\Project\PackagedProject
5 changes: 1 addition & 4 deletions clean_project.bat
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
@echo off
echo *********************************************************************************************************************
echo ******************************************** Clean Unreal Engine Project ********************************************
echo *********************************************************************************************************************
echo * Clean Unreal Engine Project *
echo.
echo Cleaning your project, please wait...
FOR /d /r %%d IN ("Binaries","Build","Intermediate","Saved","DerivedDataCache") DO @IF EXIST "%%d" rd /s /q "%%d"
del *.sln
echo.
echo Your project cleaned perfectly, you can generate Visual Studio project files now.
pause
:END
4 changes: 2 additions & 2 deletions windows_build_project.ps1
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
$buildType = $args[0]

if ($buildType -eq 'server') {
docker build --build-arg BUILD_TYPE=server -t unreal-win64-project -f WinDockerfile .
docker build --build-arg BUILD_TYPE=-server -t unreal-win64-project -f WinDockerfile .
} else {
docker build -t unreal-win64-project -f WinDockerfile --isolation=process .
docker build -t unreal-win64-project -f WinDockerfile .
}
docker run --name unreal-project -d unreal-win64-project
docker cp unreal-project:C:\Project\PackagedProject .
Expand Down

0 comments on commit db0850b

Please sign in to comment.