Repository navigation
Expand file tree
/
Copy pathgui.cmd
More file actions
29 lines (29 loc) · 1.31 KB
/
Copy pathgui.cmd
File metadata and controls
29 lines (29 loc) · 1.31 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
@echo off
rem gui.cmd - start the Yonabe GUI (read-only by default) from this repository checkout.
rem gui.cmd spool = <YONABE_ROOT>\spool (YONABE_ROOT from the environment or admin\site.local.cmd)
rem gui.cmd \\nas\yonabe\spool spool given explicitly
rem gui.cmd ... --allow-writes only when you mean to edit control/load.json / control/host_policy.json
rem Needs py -3.14 with PySide6 (py -3.14 -m pip install PySide6). Errors stay on screen (pause) so they can be read.
rem ASCII only, CRLF (cmd.exe).
setlocal
set "HERE=%~dp0"
rem (HERE is taken before shift: a bare shift moves %0 too, so %~dp0 would become the first argument.)
set "SPOOL="
if not "%~1"=="" if not "%~1"=="--allow-writes" (set "SPOOL=%~1" & shift /1)
if "%SPOOL%"=="" if not "%YONABE_ROOT%"=="" set "SPOOL=%YONABE_ROOT%\spool"
if "%SPOOL%"=="" if exist "%HERE%admin\site.local.cmd" call "%HERE%admin\site.local.cmd"
if "%SPOOL%"=="" if not "%YONABE_ROOT%"=="" set "SPOOL=%YONABE_ROOT%\spool"
if "%SPOOL%"=="" (
echo gui: give the spool path as the first argument, or set YONABE_ROOT, or create admin\site.local.cmd
pause
exit /b 2
)
echo gui: spool = %SPOOL% %1 %2 %3
cd /d "%HERE%"
py -3.14 -m gui "%SPOOL%" %1 %2 %3
set "RC=%ERRORLEVEL%"
if not "%RC%"=="0" (
echo gui: exited with %RC%
pause
)
exit /b %RC%