Repository navigation
Expand file tree
/
Copy pathSetup.bat
More file actions
78 lines (67 loc) · 2.29 KB
/
Copy pathSetup.bat
File metadata and controls
78 lines (67 loc) · 2.29 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 enableextensions
rem First-time setup: check prerequisites, build LuminaBuildTool, fetch external dependencies,
rem then generate project files. Everything after the prerequisite check runs inside the tool.
cd /d "%~dp0"
set "ENGINE_DIR=%CD%"
echo.
echo ============================================================
echo LUMINA ENGINE SETUP
echo ============================================================
echo Working directory: %ENGINE_DIR%
echo.
rem SKIP_PREREQ_CHECKS=1 bypasses.
if not defined SKIP_PREREQ_CHECKS (
where powershell.exe >nul 2>&1
if errorlevel 1 (
echo [setup] WARNING: powershell.exe not found; skipping prerequisite check.
) else (
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%ENGINE_DIR%\BuildScripts\CheckPrerequisites.ps1"
if errorlevel 1 (
echo.
echo [setup] Required build prerequisites are missing ^(see above^).
echo Install them and re-run Setup.bat. To bypass anyway:
echo set SKIP_PREREQ_CHECKS=1 ^&^& Setup.bat
goto :fail
)
)
)
where dotnet >nul 2>&1
if errorlevel 1 (
echo [setup] ERROR: the .NET SDK is required to build LuminaBuildTool. Install .NET 10 or newer.
goto :fail
)
rem Extra arguments pass through, so -Force and -Yes reach the tool.
call "%ENGINE_DIR%\LuminaBuild.bat" Setup %*
if errorlevel 1 goto :fail
echo.
echo ============================================================
echo Generating project files
echo ============================================================
call "%ENGINE_DIR%\LuminaBuild.bat" GenerateProjectFiles
if errorlevel 1 goto :fail
echo.
echo ============================================================
echo ALL DONE
echo ============================================================
echo Build the editor with:
echo LuminaBuild.bat Build Lumina -TargetType=Editor
echo.
rem Opt out with -no-open or LUMINA_NO_OPEN=1.
set "DO_OPEN=1"
if defined LUMINA_NO_OPEN set "DO_OPEN=0"
echo %* | findstr /I /C:"no-open" >nul && set "DO_OPEN=0"
if "%DO_OPEN%"=="1" (
if exist "%ENGINE_DIR%\Lumina.sln" (
echo Opening Lumina.sln...
start "" "%ENGINE_DIR%\Lumina.sln"
)
)
endlocal
exit /b 0
:fail
echo.
echo Setup failed. See messages above.
echo.
endlocal
exit /b 1