-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGenerateProjectFiles.bat
More file actions
73 lines (61 loc) · 2.4 KB
/
GenerateProjectFiles.bat
File metadata and controls
73 lines (61 loc) · 2.4 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
@echo off
setlocal EnableDelayedExpansion
set ROOTPATH=%~dp0
pushd %ROOTPATH%
REM Default to the latest Unreal Engine 5 version but can be overriden by any other version, a source build from Github, or even UE4
if [%1] == [] (
set ENGINE=5.7
) else (
set ENGINE=%1
)
if "%ENGINE%" == "S" (
REM Source code Engine
set ENGINEPATH=C:\Workspace\UnrealEngine
set ROCKETENGINE=-Engine
) else (
set ENGINEPATH=C:\Program Files\Epic Games\UE_%ENGINE%
set ROCKETENGINE=-Rocket
)
set UBT="%ENGINEPATH%\Engine\Build\BatchFiles\Build.bat"
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% -ProjectFiles %UPROJECT% -game %ROCKETENGINE% -progress
@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