Files
Commonwealth-Online-Server/check-setup.bat
T
2026-08-01 18:43:40 +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