2026-01-28 14:57:30 +00:00
|
|
|
@echo off
|
2026-02-01 00:00:23 +11:00
|
|
|
setlocal enabledelayedexpansion
|
2026-01-28 14:57:30 +00:00
|
|
|
REM Quick setup script for Windows
|
2026-02-01 00:00:23 +11:00
|
|
|
REM Run as Administrator: setup.bat
|
2026-01-28 14:57:30 +00:00
|
|
|
|
|
|
|
|
echo === Host UK Developer Workspace Setup ===
|
|
|
|
|
echo.
|
|
|
|
|
|
|
|
|
|
REM Check for admin rights
|
|
|
|
|
net session >nul 2>&1
|
2026-02-01 00:00:23 +11:00
|
|
|
if !errorlevel! neq 0 (
|
2026-01-28 14:57:30 +00:00
|
|
|
echo ERROR: Please run this script as Administrator
|
|
|
|
|
echo Right-click and select "Run as administrator"
|
|
|
|
|
pause
|
|
|
|
|
exit /b 1
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
REM Install dependencies
|
|
|
|
|
echo Installing dependencies...
|
2026-02-01 00:00:23 +11:00
|
|
|
call powershell -ExecutionPolicy Bypass -File "%~dp0scripts\install-deps.ps1"
|
|
|
|
|
if !errorlevel! neq 0 goto :error
|
2026-01-28 14:57:30 +00:00
|
|
|
|
|
|
|
|
REM Install core CLI
|
|
|
|
|
echo.
|
|
|
|
|
echo Installing core CLI...
|
2026-02-01 00:00:23 +11:00
|
|
|
call powershell -ExecutionPolicy Bypass -File "%~dp0scripts\install-core.ps1"
|
|
|
|
|
if !errorlevel! neq 0 goto :error
|
2026-01-28 14:57:30 +00:00
|
|
|
|
|
|
|
|
REM Refresh PATH
|
|
|
|
|
set "PATH=%PATH%;%LOCALAPPDATA%\Programs\core"
|
|
|
|
|
|
2026-02-01 00:00:23 +11:00
|
|
|
REM Verify core.exe exists before running
|
|
|
|
|
if not exist "%LOCALAPPDATA%\Programs\core\core.exe" (
|
|
|
|
|
echo ERROR: core.exe not found at %LOCALAPPDATA%\Programs\core\core.exe
|
|
|
|
|
goto :error
|
|
|
|
|
)
|
|
|
|
|
|
2026-01-28 14:57:30 +00:00
|
|
|
REM Run doctor
|
|
|
|
|
echo.
|
|
|
|
|
echo === Verifying environment ===
|
2026-02-01 00:00:23 +11:00
|
|
|
call "%LOCALAPPDATA%\Programs\core\core.exe" doctor
|
2026-02-01 00:07:45 +11:00
|
|
|
if !errorlevel! neq 0 (
|
|
|
|
|
echo WARNING: core doctor reported issues
|
|
|
|
|
)
|
2026-01-28 14:57:30 +00:00
|
|
|
|
|
|
|
|
REM Clone repos
|
|
|
|
|
echo.
|
|
|
|
|
echo === Cloning repositories ===
|
2026-02-01 00:00:23 +11:00
|
|
|
call "%LOCALAPPDATA%\Programs\core\core.exe" setup
|
2026-02-01 00:07:45 +11:00
|
|
|
if !errorlevel! neq 0 goto :error
|
2026-01-28 14:57:30 +00:00
|
|
|
|
|
|
|
|
echo.
|
|
|
|
|
echo === Setup complete! ===
|
|
|
|
|
echo Run 'core health' to check status
|
|
|
|
|
pause
|
2026-02-01 00:00:23 +11:00
|
|
|
endlocal
|
2026-01-28 14:57:30 +00:00
|
|
|
exit /b 0
|
|
|
|
|
|
|
|
|
|
:error
|
|
|
|
|
echo.
|
|
|
|
|
echo Setup failed! Check the error above.
|
|
|
|
|
pause
|
2026-02-01 00:00:23 +11:00
|
|
|
endlocal
|
2026-01-28 14:57:30 +00:00
|
|
|
exit /b 1
|