Files
Commonwealth-Online-Public/host-gui/check-setup.bat
T
andrewandCursor 22bbfceeb8 Add Qt6 setup helpers and comprehensive build instructions
- Improved build.bat with auto-detection of Qt6 installation
  - Checks common Qt6 paths automatically
  - Provides helpful error messages with paths to check
  - Works with Qt6.4 through Qt6.8

- Added check-setup.bat verification script
  - Verifies CMake, Visual Studio 2022, and Qt6 installation
  - Reports found/missing prerequisites
  - Quick setup validation before building

- Added comprehensive SETUP.md documentation
  - Quick 3-step setup guide
  - Detailed manual setup instructions
  - Qt6 download and installation steps
  - Troubleshooting for common issues
  - Manual CMake command reference
  - Environment variable setup

- Updated README.md
  - Links to SETUP.md for first-time users
  - Quick build instructions
  - Clear prerequisites with download links
  - Better organized for both quick and manual builds

Fixes CMake Qt6 detection errors by:
1. Auto-searching common Qt6 installation paths
2. Providing fallback manual build instructions
3. Detecting missing prerequisites with helpful links

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 20:55:44 +12:00

67 lines
2.1 KiB
Batchfile

@echo off
setlocal enabledelayedexpansion
echo.
echo ================================================================================
echo Commonwealth Online - Qt GUI Setup Helper
echo ================================================================================
echo.
echo This script will help you set up Qt6 for building the GUI.
echo.
REM Check CMake
cmake --version >nul 2>&1
if errorlevel 1 (
echo [ERROR] CMake not found. Please install from https://cmake.org/download
pause
exit /b 1
)
echo [OK] CMake found
REM Check Visual Studio
if not exist "C:\Program Files\Microsoft Visual Studio\2022\Community" (
if not exist "C:\Program Files\Microsoft Visual Studio\2022\Professional" (
echo.
echo [ERROR] Visual Studio 2022 not found
echo Please install from https://visualstudio.microsoft.com/downloads/
pause
exit /b 1
)
)
echo [OK] Visual Studio 2022 found
REM Check Qt6
set QT6_FOUND=0
if exist "C:\Qt\6.8.0\msvc2022_64\lib\cmake\Qt6" set QT6_FOUND=1 & set QT_PATH=C:\Qt\6.8.0\msvc2022_64
if exist "C:\Qt\6.7.0\msvc2022_64\lib\cmake\Qt6" set QT6_FOUND=1 & set QT_PATH=C:\Qt\6.7.0\msvc2022_64
if exist "C:\Qt\6.6.0\msvc2022_64\lib\cmake\Qt6" set QT6_FOUND=1 & set QT_PATH=C:\Qt\6.6.0\msvc2022_64
if exist "C:\Qt\6.5.0\msvc2022_64\lib\cmake\Qt6" set QT6_FOUND=1 & set QT_PATH=C:\Qt\6.5.0\msvc2022_64
if exist "C:\Qt\6.4.0\msvc2022_64\lib\cmake\Qt6" set QT6_FOUND=1 & set QT_PATH=C:\Qt\6.4.0\msvc2022_64
if %QT6_FOUND%==0 (
echo.
echo [ERROR] Qt6 not found at standard locations
echo.
echo Qt6 installation required! Download from: https://www.qt.io/download-open-source
echo.
echo Installation paths checked:
echo - C:\Qt\6.8.0\msvc2022_64
echo - C:\Qt\6.7.0\msvc2022_64
echo - C:\Qt\6.6.0\msvc2022_64
echo - C:\Qt\6.5.0\msvc2022_64
echo - C:\Qt\6.4.0\msvc2022_64
echo.
echo If Qt6 is installed elsewhere, manually edit build.bat
echo and update the Qt6 search paths.
echo.
pause
exit /b 1
)
echo [OK] Qt6 found at: %QT_PATH%
echo.
echo All prerequisites found! You can now run build.bat
echo.
pause