-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathstart-playground.bat
More file actions
37 lines (34 loc) · 1.04 KB
/
Copy pathstart-playground.bat
File metadata and controls
37 lines (34 loc) · 1.04 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
@echo off
rem ==========================================================================
rem RingScript - double-click launcher
rem Starts the embedded web server and opens the Playground in your browser.
rem First run builds the runtime (requires Zig 0.15+); after that it starts
rem instantly. Close the server window to stop.
rem ==========================================================================
cd /d "%~dp0"
if exist zig-out\bin\ringscript-serve.exe goto run
where zig >nul 2>nul
if errorlevel 1 (
echo.
echo Zig 0.15+ is needed for the first-time build ^(https://ziglang.org^).
echo After building once, this launcher starts instantly.
echo.
pause
exit /b 1
)
echo.
echo Building RingScript ^(first run only^)...
echo.
zig build -Drelease=true
if errorlevel 1 (
echo.
echo Build failed - see messages above.
echo.
pause
exit /b 1
)
:run
start "RingScript server - close this window to stop" zig-out\bin\ringscript-serve.exe
timeout /t 1 /nobreak >nul
start "" "http://localhost:8377/"
exit /b 0