forked from SRombauts/UE4PlasticPluginDev
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenerateProjectFiles.bat
More file actions
78 lines (67 loc) · 2.76 KB
/
GenerateProjectFiles.bat
File metadata and controls
78 lines (67 loc) · 2.76 KB
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@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
REM Legacy "Rocket" binary build of Unreal Engine 4 (using -Engine would try and fail to build the tools)
set ROCKETENGINE=-Rocket
) else if "%ENGINE%" == "S" (
set ENGINEPATH="C:\Workspace\UnrealEngine"
set UBT=!ENGINEPATH!\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe
REM Source code Engine
set ROCKETENGINE=-Engine
) else (
set ENGINEPATH="C:\Program Files\Epic Games\UE_%ENGINE%"
set UBT=!ENGINEPATH!\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe
set ROCKETENGINE=-Engine
)
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 Generate Project Files for %UPROJECT% (project '%PROJECT%')
REM See Engine\Source\Programs\UnrealBuildTool\Modes\GenerateProjectFilesMode.cs
REM extract:
REM [CommandLine("-2019", Value = nameof(ProjectFileFormat.VisualStudio2019))] // + override compiler
REM [CommandLine("-2022", Value = nameof(ProjectFileFormat.VisualStudio2022))] // + override compiler
REM [CommandLine("-Makefile", Value = nameof(ProjectFileFormat.Make))]
REM [CommandLine("-CMakefile", Value = nameof(ProjectFileFormat.CMake))]
REM [CommandLine("-QMakefile", Value = nameof(ProjectFileFormat.QMake))]
REM [CommandLine("-KDevelopfile", Value = nameof(ProjectFileFormat.KDevelop))]
REM [CommandLine("-CodeLiteFiles", Value = nameof(ProjectFileFormat.CodeLite))]
REM [CommandLine("-XCodeProjectFiles", Value = nameof(ProjectFileFormat.XCode))]
REM [CommandLine("-EddieProjectFiles", Value = nameof(ProjectFileFormat.Eddie))]
REM [CommandLine("-VSCode", Value = nameof(ProjectFileFormat.VisualStudioCode))]
REM [CommandLine("-VSMac", Value = nameof(ProjectFileFormat.VisualStudioMac))]
REM [CommandLine("-CLion", Value = nameof(ProjectFileFormat.CLion))]
REM [CommandLine("-Rider", Value = nameof(ProjectFileFormat.Rider))]
echo on
@echo.
@echo ## Visual Studio 2019/2022:
%UBT% %UPROJECT% -ProjectFiles -Game %ROCKETENGINE%
@echo.
@REM @echo ## Visual Studio Code:
@REM %UBT% %UPROJECT% -ProjectFiles -Game %ROCKETENGINE% -VSCode
@REM @echo.
@REM @echo ## Rider:
@REM %UBT% %UPROJECT% -ProjectFiles -Game %ROCKETENGINE% -Rider
@REM @echo.
@echo Done
@echo off