-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathinstall_win.bat
More file actions
executable file
·55 lines (48 loc) · 1.48 KB
/
install_win.bat
File metadata and controls
executable file
·55 lines (48 loc) · 1.48 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
@echo off
setlocal enabledelayedexpansion
echo.
echo The 7800basic Windows Installer v2
echo -----------------------------------
echo.
REM --- Check for wasmtime ---
where wasmtime >nul 2>&1
if %ERRORLEVEL% NEQ 0 (
echo ERROR: wasmtime is not installed or not in PATH.
echo.
echo You can install it using:
echo - Windows winget: winget install BytecodeAlliance.Wasmtime.Portable
echo - Or download from: https://wasmtime.dev/
echo.
echo Installation cannot continue without wasmtime.
pause
exit /b 1
)
REM --- Set bas7800dir ---
SET bas7800dir=%~dp0
SET bas7800dir=%bas7800dir:~0,-1%
echo Permanently setting bas7800dir to:
echo %bas7800dir%
echo.
setx bas7800dir "%bas7800dir%" > install_win.log 2>&1
if %ERRORLEVEL% NEQ 0 goto FAILED
REM --- Update PATH if needed ---
for /f "tokens=2,*" %%A in ('reg query HKCU\Environment /v PATH 2^>nul') do set USERPATH=%%B
if "%USERPATH%"=="" set USERPATH=%PATH%
echo %USERPATH% | find /i "%bas7800dir%" >nul
if %ERRORLEVEL% NEQ 0 (
echo Adding bas7800dir to PATH...
setx PATH "%bas7800dir%;%USERPATH%" >> install_win.log 2>&1
)
echo.
echo Installation complete.
echo - Reopen any command prompts for changes to take effect.
echo - Run: 7800basic.bat -v to test your setup.
echo.
pause
exit /b 0
:FAILED
echo ERROR: Failed to set bas7800dir.
echo This installer requires SETX (Windows Vista or newer).
echo You may need to set environment variables manually.
pause
exit /b 1