fix: Update Launch-Dev-Windows.bat with same fixes
This commit is contained in:
@@ -6,7 +6,7 @@ color 0B
|
||||
|
||||
echo.
|
||||
echo NomadArch Development Launcher (Windows)
|
||||
echo Version: 0.4.0
|
||||
echo Version: 0.5.0 - Binary-Free Mode
|
||||
echo.
|
||||
|
||||
set SCRIPT_DIR=%~dp0
|
||||
@@ -16,6 +16,7 @@ cd /d "%SCRIPT_DIR%"
|
||||
set ERRORS=0
|
||||
set WARNINGS=0
|
||||
set AUTO_FIXED=0
|
||||
set BINARY_FREE_MODE=0
|
||||
|
||||
echo [PREFLIGHT 1/7] Checking Dependencies...
|
||||
|
||||
@@ -46,29 +47,33 @@ echo [PREFLIGHT 2/7] Checking for OpenCode CLI...
|
||||
|
||||
where opencode >nul 2>&1
|
||||
if %ERRORLEVEL% equ 0 (
|
||||
echo [OK] OpenCode CLI available in PATH
|
||||
) else (
|
||||
if exist "bin\opencode.exe" (
|
||||
echo [OK] OpenCode binary found in bin/
|
||||
) else (
|
||||
echo [WARN] OpenCode CLI not found
|
||||
echo [INFO] Run Install-Windows.bat to set up OpenCode
|
||||
set /a WARNINGS+=1
|
||||
)
|
||||
echo [OK] OpenCode CLI in PATH - Full Mode
|
||||
goto :opencode_check_done
|
||||
)
|
||||
|
||||
if exist "bin\opencode.exe" (
|
||||
echo [OK] OpenCode binary in bin/ - Full Mode
|
||||
goto :opencode_check_done
|
||||
)
|
||||
|
||||
echo [INFO] OpenCode CLI not found - Using Binary-Free Mode
|
||||
echo [INFO] Free models: GPT-5 Nano, Grok Code, GLM-4.7 via OpenCode Zen
|
||||
set BINARY_FREE_MODE=1
|
||||
|
||||
:opencode_check_done
|
||||
|
||||
echo.
|
||||
echo [PREFLIGHT 3/7] Checking Dependencies...
|
||||
|
||||
if not exist "node_modules" (
|
||||
echo [INFO] Dependencies not installed. Installing now...
|
||||
call npm install
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
if !ERRORLEVEL! neq 0 (
|
||||
echo [ERROR] Dependency installation failed!
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
echo [OK] Dependencies installed (auto-fix)
|
||||
echo [OK] Dependencies installed
|
||||
set /a AUTO_FIXED+=1
|
||||
) else (
|
||||
echo [OK] Dependencies found
|
||||
@@ -111,14 +116,14 @@ if not exist "packages\ui\dist\index.html" (
|
||||
echo [INFO] Running UI build...
|
||||
pushd packages\ui
|
||||
call npm run build
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
if !ERRORLEVEL! neq 0 (
|
||||
echo [ERROR] UI build failed!
|
||||
popd
|
||||
set /a ERRORS+=1
|
||||
goto :launch_check
|
||||
)
|
||||
popd
|
||||
echo [OK] UI build completed (auto-fix)
|
||||
echo [OK] UI build completed
|
||||
set /a AUTO_FIXED+=1
|
||||
)
|
||||
|
||||
@@ -126,12 +131,12 @@ if not exist "packages\electron-app\dist\main\main.js" (
|
||||
echo [WARN] Electron build incomplete
|
||||
echo [INFO] Running full build...
|
||||
call npm run build
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
if !ERRORLEVEL! neq 0 (
|
||||
echo [ERROR] Full build failed!
|
||||
set /a ERRORS+=1
|
||||
goto :launch_check
|
||||
)
|
||||
echo [OK] Full build completed (auto-fix)
|
||||
echo [OK] Full build completed
|
||||
set /a AUTO_FIXED+=1
|
||||
)
|
||||
|
||||
@@ -142,14 +147,19 @@ echo [STATUS]
|
||||
echo.
|
||||
echo Node.js: %NODE_VERSION%
|
||||
echo npm: %NPM_VERSION%
|
||||
if !BINARY_FREE_MODE! equ 1 (
|
||||
echo Mode: Binary-Free Mode
|
||||
) else (
|
||||
echo Mode: Full Mode with OpenCode
|
||||
)
|
||||
echo Auto-fixes applied: !AUTO_FIXED!
|
||||
echo Warnings: %WARNINGS%
|
||||
echo Errors: %ERRORS%
|
||||
echo Warnings: !WARNINGS!
|
||||
echo Errors: !ERRORS!
|
||||
echo Server Port: !SERVER_PORT!
|
||||
echo UI Port: !UI_PORT!
|
||||
echo.
|
||||
|
||||
if %ERRORS% gtr 0 (
|
||||
if !ERRORS! gtr 0 (
|
||||
echo [RESULT] Cannot start due to errors!
|
||||
pause
|
||||
exit /b 1
|
||||
@@ -179,4 +189,4 @@ taskkill /F /FI "WINDOWTITLE eq NomadArch Electron*" >nul 2>&1
|
||||
|
||||
:launch_check
|
||||
pause
|
||||
exit /b %ERRORS%
|
||||
exit /b !ERRORS!
|
||||
|
||||
Reference in New Issue
Block a user