-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBuild.bat
More file actions
143 lines (131 loc) · 3.33 KB
/
Copy pathBuild.bat
File metadata and controls
143 lines (131 loc) · 3.33 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
@echo off
setlocal enabledelayedexpansion
REM ============================================
REM UnrealEngine_Bridge Build Script
REM Builds the UE5.7 C++ project
REM ============================================
set "UE_ROOT=C:\Program Files\Epic Games\UE_5.7"
set "PROJECT_PATH=%~dp0UnrealEngine_Bridge.uproject"
set "UBT=%UE_ROOT%\Engine\Binaries\DotNET\UnrealBuildTool\UnrealBuildTool.exe"
set "BUILD_BAT=%UE_ROOT%\Engine\Build\BatchFiles\Build.bat"
echo.
echo ============================================
echo UnrealEngine_Bridge Build Script
echo ============================================
echo.
echo Project: %PROJECT_PATH%
echo UE5 Path: %UE_ROOT%
echo.
REM Check if UE5 exists
if not exist "%UE_ROOT%" (
echo ERROR: UE5.7 not found at %UE_ROOT%
echo Please edit this script and set UE_ROOT to your UE5 installation path.
pause
exit /b 1
)
REM Check if project exists
if not exist "%PROJECT_PATH%" (
echo ERROR: Project file not found: %PROJECT_PATH%
pause
exit /b 1
)
echo What would you like to do?
echo.
echo 1. Generate Visual Studio project files
echo 2. Build project (Development Editor)
echo 3. Both (Generate + Build)
echo 4. Clean and Rebuild
echo 5. Exit
echo.
set /p CHOICE="Enter choice (1-5): "
if "%CHOICE%"=="1" goto :generate
if "%CHOICE%"=="2" goto :build
if "%CHOICE%"=="3" goto :both
if "%CHOICE%"=="4" goto :clean
if "%CHOICE%"=="5" exit /b 0
echo Invalid choice.
pause
exit /b 1
:generate
echo.
echo Generating Visual Studio project files...
echo.
"%UBT%" -projectfiles -project="%PROJECT_PATH%" -game -engine -progress
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Failed to generate project files.
echo Check the log above for details.
pause
exit /b 1
)
echo.
echo SUCCESS: Project files generated.
echo You can now open UnrealEngine_Bridge.sln in Visual Studio.
pause
exit /b 0
:build
echo.
echo Building UnrealEngine_BridgeEditor (Development, Win64)...
echo.
call "%BUILD_BAT%" UnrealEngine_BridgeEditor Win64 Development "%PROJECT_PATH%" -waitmutex -progress
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Build failed.
echo Check the errors above.
pause
exit /b 1
)
echo.
echo SUCCESS: Build completed.
echo You can now open the project in UE5.
pause
exit /b 0
:both
echo.
echo Step 1/2: Generating Visual Studio project files...
echo.
"%UBT%" -projectfiles -project="%PROJECT_PATH%" -game -engine -progress
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Failed to generate project files.
pause
exit /b 1
)
echo.
echo Step 2/2: Building UnrealEngine_BridgeEditor...
echo.
call "%BUILD_BAT%" UnrealEngine_BridgeEditor Win64 Development "%PROJECT_PATH%" -waitmutex -progress
if %ERRORLEVEL% NEQ 0 (
echo.
echo ERROR: Build failed.
pause
exit /b 1
)
echo.
echo SUCCESS: Project generated and built.
echo You can now open UnrealEngine_Bridge.uproject in UE5.
pause
exit /b 0
:clean
echo.
echo Cleaning intermediate files...
echo.
if exist "%~dp0Intermediate" (
echo Removing Intermediate folder...
rmdir /s /q "%~dp0Intermediate"
)
if exist "%~dp0Binaries" (
echo Removing Binaries folder...
rmdir /s /q "%~dp0Binaries"
)
if exist "%~dp0.vs" (
echo Removing .vs folder...
rmdir /s /q "%~dp0.vs"
)
if exist "%~dp0*.sln" (
echo Removing solution files...
del /q "%~dp0*.sln"
)
echo.
echo Clean complete. Now rebuilding...
goto :both