forked from SRombauts/UE4PlasticPluginDev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Build.bat
47 lines (37 loc) · 1.13 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@echo off
setlocal EnableDelayedExpansion
set ROOTPATH=%~dp0
pushd %ROOTPATH%
REM Default to Unreal Engine 4, but can be overriden by any version of UE5, or a source build from Github
if [%1] == [] (
set ENGINE=4.27
) else (
set ENGINE=%1
)
if "%ENGINE%" == "4.27" (
set ENGINEPATH="C:\Program Files\Epic Games\UE_%ENGINE%"
set UBT=!ENGINEPATH!\Engine\Binaries\DotNET\UnrealBuildTool.exe
) else if "%ENGINE%" == "S" (
set ENGINEPATH="C:\Workspace\UnrealEngine"
set UBT=!ENGINEPATH!\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe
) else (
set ENGINEPATH="C:\Program Files\Epic Games\UE_%ENGINE%"
set UBT=!ENGINEPATH!\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe
)
if not exist %UBT% (
echo %UBT% not found
exit /b
)
echo Unsing Unreal Engine %ENGINE% from %ENGINEPATH%
for %%a in (*.uproject) do set "UPROJECT=%CD%\%%a"
if not defined UPROJECT (
echo *.uproject file not found
exit /b
)
for %%i in ("%UPROJECT%") do (
set PROJECT=%%~ni
)
echo Build %UPROJECT% (project '%PROJECT%')
echo on
%UBT% %UPROJECT% Win64 Development %PROJECT%Editor
@echo off