@echo off REM ============================================ REM SSHClient Windows build script REM Double-click to produce dist\SSHClient.exe REM ============================================ REM Force UTF-8 console so non-ASCII paths work chcp 65001 >nul 2>&1 setlocal echo. echo ============================================ echo SSHClient Windows Build Script echo ============================================ echo. REM 1. Check Python python --version >nul 2>&1 if errorlevel 1 goto :no_python echo [OK] Python found: python --version echo. REM 2. Create venv if missing if not exist "venv\Scripts\python.exe" goto :create_venv goto :venv_ready :create_venv echo [1/4] Creating virtual environment venv\ ... python -m venv venv if errorlevel 1 goto :venv_fail :venv_ready call venv\Scripts\activate.bat if errorlevel 1 goto :activate_fail echo [OK] venv activated echo. REM 3. Install dependencies echo [2/4] Installing dependencies (first run takes 1-2 minutes)... python -m pip install --upgrade pip --quiet if errorlevel 1 goto :pip_fail pip install -r requirements.txt --quiet if errorlevel 1 goto :pip_fail echo [OK] Dependencies ready echo. REM 4. Build echo [3/4] Running PyInstaller... pyinstaller build.spec --clean --noconfirm if errorlevel 1 goto :build_fail REM 5. Done echo. echo [4/4] Build complete. echo. echo ============================================ echo Output: dist\SSHClient.exe if exist "dist\SSHClient.exe" ( echo Size: for %%I in ("dist\SSHClient.exe") do echo %%~zI bytes ) else ( echo WARNING: SSHClient.exe not found in dist\ ) echo ============================================ echo. echo Copy dist\SSHClient.exe to any Windows PC and double-click to run. echo. goto :end :no_python echo. echo [ERROR] Python not found in PATH. echo Please install Python 3.10+ from: echo https://www.python.org/downloads/windows/ echo IMPORTANT: Check "Add Python to PATH" during install. echo. pause exit /b 1 :venv_fail echo. echo [ERROR] Failed to create venv. echo. pause exit /b 1 :activate_fail echo. echo [ERROR] Failed to activate venv. echo. pause exit /b 1 :pip_fail echo. echo [ERROR] Failed to install dependencies. echo Check your network connection and try again. echo. pause exit /b 1 :build_fail echo. echo [ERROR] PyInstaller build failed. echo Scroll up to see the error details. echo. pause exit /b 1 :end pause endlocal