fix: update all installers to robust ASCII-only versions for maximum compatibility
Some checks failed
Release Binaries / release (push) Has been cancelled

This commit is contained in:
Gemini AI
2025-12-29 03:53:27 +04:00
Unverified
parent f84b02d910
commit eb863bdde7
3 changed files with 318 additions and 657 deletions

View File

@@ -1,14 +1,16 @@
@echo off
chcp 65001 >nul 2>&1
REM NomadArch Windows Installer - ASCII Safe Version
REM This installer uses only ASCII characters for maximum compatibility
setlocal enabledelayedexpansion
title NomadArch Installer - Windows
echo.
echo ╔═══════════════════════════════════════════════════════════════╗
echo NomadArch Installer for Windows
echo Version: 0.6.0 - Robust Edition ║
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo NomadArch Installer for Windows
echo Version: 0.6.1 - Universal Edition
echo ===============================================================
echo.
set SCRIPT_DIR=%~dp0
@@ -25,9 +27,9 @@ set NODE_INSTALLED_NOW=0
echo [%date% %time%] ========== Installer started ========== >> "%LOG_FILE%"
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 1: OS and Architecture Detection
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo [STEP 1/8] Detecting System...
for /f "tokens=2 delims==" %%a in ('wmic os get osarchitecture /value 2^>nul ^| find "="') do set ARCH_RAW=%%a
@@ -45,9 +47,9 @@ echo [OK] Windows Version: !WIN_VER!
echo [OK] Architecture: !ARCH!
echo [%date% %time%] OS: Windows !WIN_VER!, Arch: !ARCH! >> "%LOG_FILE%"
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 2: Check Write Permissions
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 2/8] Checking Write Permissions...
@@ -72,9 +74,9 @@ if !ERRORLEVEL! neq 0 (
)
echo [%date% %time%] Install target: %TARGET_DIR% >> "%LOG_FILE%"
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 3: Check and Install Node.js
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 3/8] Checking Node.js...
@@ -98,7 +100,7 @@ if !NODE_OK! equ 0 (
where winget >nul 2>&1
if !ERRORLEVEL! equ 0 (
echo [INFO] Installing Node.js via winget...
winget install -e --id OpenJS.NodeJS.LTS --accept-source-agreements --accept-package-agreements --silent
winget install -e --id OpenJS.NodeJS.LTS --accept-source-agreements --accept-package-agreements --silent 2>nul
if !ERRORLEVEL! equ 0 (
set NODE_INSTALLED_NOW=1
echo [OK] Node.js installed via winget
@@ -112,7 +114,7 @@ if !NODE_OK! equ 0 (
where choco >nul 2>&1
if !ERRORLEVEL! equ 0 (
echo [INFO] Installing Node.js via Chocolatey...
choco install nodejs-lts -y
choco install nodejs-lts -y 2>nul
if !ERRORLEVEL! equ 0 (
set NODE_INSTALLED_NOW=1
echo [OK] Node.js installed via Chocolatey
@@ -125,17 +127,12 @@ if !NODE_OK! equ 0 (
echo [INFO] Downloading Node.js installer directly...
set NODE_INSTALLER=%TEMP_DIR%\node-installer.msi
REM Download using PowerShell
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
"$ProgressPreference = 'SilentlyContinue'; " ^
"try { " ^
" Invoke-WebRequest -Uri 'https://nodejs.org/dist/v20.10.0/node-v20.10.0-x64.msi' -OutFile '%TEMP_DIR%\node-installer.msi' -UseBasicParsing; " ^
" exit 0 " ^
"} catch { exit 1 }"
REM Download using PowerShell with proper error handling
powershell -NoProfile -ExecutionPolicy Bypass -Command "$ProgressPreference = 'SilentlyContinue'; try { Invoke-WebRequest -Uri 'https://nodejs.org/dist/v20.10.0/node-v20.10.0-x64.msi' -OutFile '%TEMP_DIR%\node-installer.msi' -UseBasicParsing; exit 0 } catch { exit 1 }" 2>nul
if exist "%TEMP_DIR%\node-installer.msi" (
echo [INFO] Running Node.js installer...
msiexec /i "%TEMP_DIR%\node-installer.msi" /qn /norestart
msiexec /i "%TEMP_DIR%\node-installer.msi" /qn /norestart 2>nul
if !ERRORLEVEL! equ 0 (
set NODE_INSTALLED_NOW=1
echo [OK] Node.js installed successfully
@@ -150,11 +147,11 @@ if !NODE_OK! equ 0 (
if !NODE_INSTALLED_NOW! equ 1 (
echo.
echo ╔═══════════════════════════════════════════════════════════════╗
echo IMPORTANT: Node.js was just installed!
echo Please CLOSE this window and run Install-Windows.bat again.
echo This is required for the PATH to update.
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo IMPORTANT: Node.js was just installed!
echo Please CLOSE this window and run Install-Windows.bat again.
echo This is required for the PATH to update.
echo ===============================================================
echo.
echo [%date% %time%] Node.js installed, restart required >> "%LOG_FILE%"
pause
@@ -191,9 +188,9 @@ if !NPM_OK! equ 0 (
goto :SUMMARY
)
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 4: Check Git (optional)
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 4/8] Checking Git (optional)...
@@ -206,9 +203,9 @@ if !ERRORLEVEL! equ 0 (
set /a WARNINGS+=1
)
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 5: Install npm Dependencies
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 5/8] Installing Dependencies...
@@ -238,26 +235,26 @@ if !ERRORLEVEL! neq 0 (
)
echo [OK] Dependencies installed
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 6: OpenCode Binary (OPTIONAL)
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 6/8] OpenCode Binary Setup...
echo.
echo ╔═══════════════════════════════════════════════════════════════╗
echo NomadArch supports Binary-Free Mode!
echo You can skip the OpenCode binary and use free cloud models:
echo - GPT-5 Nano, Grok Code, GLM-4.7, Doubao, and more
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo NomadArch supports Binary-Free Mode!
echo You can skip the OpenCode binary and use free cloud models:
echo - GPT-5 Nano, Grok Code, GLM-4.7, Doubao, and more
echo ===============================================================
echo.
set SKIP_OPENCODE=1
echo [OK] Using Binary-Free Mode (default)
echo [%date% %time%] Using Binary-Free Mode >> "%LOG_FILE%"
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 7: Build UI Assets
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 7/8] Building UI Assets...
@@ -278,9 +275,9 @@ if exist "%SCRIPT_DIR%\packages\ui\dist\index.html" (
echo [OK] UI assets built successfully
)
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
REM STEP 8: Health Check and Summary
REM ═══════════════════════════════════════════════════════════════
REM ---------------------------------------------------------------
echo.
echo [STEP 8/8] Running Health Check...
@@ -320,9 +317,9 @@ if !HEALTH_OK! equ 1 (
:SUMMARY
echo.
echo ╔═══════════════════════════════════════════════════════════════╗
echo INSTALLATION SUMMARY
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo INSTALLATION SUMMARY
echo ===============================================================
echo.
echo Install Directory: %TARGET_DIR%
echo Architecture: !ARCH!
@@ -335,9 +332,9 @@ echo Log File: %LOG_FILE%
echo.
if !ERRORS! gtr 0 (
echo ╔═══════════════════════════════════════════════════════════════╗
echo INSTALLATION FAILED
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo INSTALLATION FAILED
echo ===============================================================
echo.
echo Review the errors above and check the log file: %LOG_FILE%
echo.
@@ -349,9 +346,9 @@ if !ERRORS! gtr 0 (
echo.
echo [%date% %time%] Installation FAILED with !ERRORS! errors >> "%LOG_FILE%"
) else (
echo ╔═══════════════════════════════════════════════════════════════╗
echo INSTALLATION SUCCESSFUL!
echo ╚═══════════════════════════════════════════════════════════════╝
echo ===============================================================
echo INSTALLATION SUCCESSFUL!
echo ===============================================================
echo.
echo To start NomadArch, run:
echo Launch-Windows.bat