-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathdeploy.bat
More file actions
152 lines (137 loc) · 5.98 KB
/
deploy.bat
File metadata and controls
152 lines (137 loc) · 5.98 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
144
145
146
147
148
149
150
151
152
@echo off
setlocal enabledelayedexpansion
echo.
echo ==========================================
echo UEFN TOOLBELT ^| Deploy Script
echo ==========================================
echo.
:: ── Find Fortnite Projects folder ─────────────────────────────────────────────
set "FP_ROOT=%USERPROFILE%\Documents\Fortnite Projects"
if not exist "%FP_ROOT%\" (
echo ERROR: Could not find your Fortnite Projects folder at:
echo %FP_ROOT%
echo.
echo Make sure UEFN is installed and you have created at least one project.
pause
exit /b 1
)
:: ── List available UEFN projects ───────────────────────────────────────────────
set /a count=0
echo Found UEFN projects:
echo.
for /d %%D in ("%FP_ROOT%\*") do (
set /a count+=1
set "proj_!count!=%%~nxD"
echo [!count!] %%~nxD
)
if %count%==0 (
echo No projects found. Create a project in UEFN first.
pause
exit /b 1
)
echo.
if %count%==1 (
set choice=1
echo Only one project found — selecting it automatically.
) else (
set /p choice=" Enter the number of the project to deploy to: "
)
set "PROJECT=!proj_%choice%!"
if "!PROJECT!"=="" (
echo Invalid selection.
pause
exit /b 1
)
set "DEST=%FP_ROOT%\!PROJECT!"
echo.
echo Deploying to: !DEST!
echo.
:: ── Copy files ────────────────────────────────────────────────────────────────
echo [1/4] Copying UEFN_Toolbelt package...
xcopy /E /I /Y "%~dp0Content\Python\UEFN_Toolbelt" "!DEST!\Content\Python\UEFN_Toolbelt" >nul
if errorlevel 1 ( echo FAILED & goto :error ) else ( echo OK )
echo [2/4] Copying init_unreal.py...
xcopy /Y "%~dp0init_unreal.py" "!DEST!\Content\Python\" >nul
if errorlevel 1 ( echo FAILED & goto :error ) else ( echo OK )
echo [3/4] Copying tests folder...
xcopy /E /I /Y "%~dp0tests" "!DEST!\tests" >nul
if errorlevel 1 ( echo FAILED & goto :error ) else ( echo OK )
echo [4/4] Copying verse-book spec...
xcopy /E /I /H /Y "%~dp0verse-book" "!DEST!\verse-book" >nul
if errorlevel 1 ( echo FAILED & goto :error ) else ( echo OK )
:: ── PySide6 check — tries multiple install locations ─────────────────────────
echo.
set "UE_PYTHON="
for %%P in (
"C:\Program Files\Epic Games\Fortnite\Engine\Binaries\ThirdParty\Python3\Win64\python.exe"
"C:\Program Files (x86)\Epic Games\Fortnite\Engine\Binaries\ThirdParty\Python3\Win64\python.exe"
"D:\Epic Games\Fortnite\Engine\Binaries\ThirdParty\Python3\Win64\python.exe"
"E:\Epic Games\Fortnite\Engine\Binaries\ThirdParty\Python3\Win64\python.exe"
) do (
if exist %%P (
if "!UE_PYTHON!"=="" set "UE_PYTHON=%%~P"
)
)
if not "!UE_PYTHON!"=="" (
echo UE Python: !UE_PYTHON!
"!UE_PYTHON!" -c "import PySide6" >nul 2>&1
if errorlevel 1 (
echo PySide6 not installed. Installing now...
"!UE_PYTHON!" -m pip install PySide6 --quiet
if errorlevel 1 (
echo WARNING: PySide6 install failed. Dashboard UI may not work.
) else (
echo PySide6 installed OK.
)
) else (
echo PySide6 already installed.
)
) else (
echo NOTE: Could not find UE Python — tried C:, D:, E: drives.
echo Run install.py for a full drive scan, or install manually in a terminal:
echo "^<UE_PATH^>\Engine\Binaries\ThirdParty\Python3\Win64\python.exe" -m pip install PySide6
)
:: ── Done ──────────────────────────────────────────────────────────────────────
echo.
echo ==========================================
echo All files deployed successfully!
echo ==========================================
echo.
echo HOT-RELOAD COMMANDS (paste into UEFN Python console):
echo.
echo [STANDARD] Reload + open dashboard:
echo import sys; [sys.modules.pop(k) for k in list(sys.modules) if "UEFN_Toolbelt" in k]; import UEFN_Toolbelt as tb; tb.register_all_tools(); tb.launch_qt()
echo.
echo [SMOKE TEST] Reload + verify health:
echo import sys; [sys.modules.pop(k) for k in list(sys.modules) if "UEFN_Toolbelt" in k]; import UEFN_Toolbelt as tb; tb.register_all_tools(); tb.run("toolbelt_smoke_test")
echo.
echo [INTEGRATION TEST] WARNING - invasive, use a clean template only:
echo import sys; [sys.modules.pop(k) for k in list(sys.modules) if "UEFN_Toolbelt" in k]; import UEFN_Toolbelt as tb; tb.register_all_tools(); tb.run("toolbelt_integration_test")
echo.
echo [MASTER SYNC] Reload + sync docs ^& Verse IQ:
echo import sys; [sys.modules.pop(k) for k in list(sys.modules) if "UEFN_Toolbelt" in k]; import UEFN_Toolbelt as tb; tb.register_all_tools(); tb.run("api_sync_master")
echo.
echo [VERSE GRAPH] Reload + open device graph:
echo import sys; [sys.modules.pop(k) for k in list(sys.modules) if "UEFN_Toolbelt" in k]; import UEFN_Toolbelt as tb; tb.register_all_tools(); tb.run("verse_graph_open")
echo.
echo ==========================================
echo !! BEFORE COMMITTING !!
echo ==========================================
echo 1. Run drift check (catches stale counts + versions):
echo python scripts/drift_check.py
echo 2. Run the SMOKE TEST command above in UEFN.
echo 3. Confirm the dashboard opens and your change works.
echo Only run "git commit" after you see it working live.
echo Syntax passing != working in the editor.
echo ==========================================
echo.
echo TIP: Only restart UEFN if you changed init_unreal.py.
echo New project deployment? RESTART UEFN for the menu to appear.
echo.
pause
exit /b 0
:error
echo.
echo Deploy failed. Check that UEFN is not currently open and locking the files.
pause
exit /b 1