Files
Commonwealth-Online-Public/host-gui/find-qt.bat
T
andrewandCursor 2487bb282d Fix Qt6.11 compatibility and complete GUI build
- Updated build.bat to detect Qt6.11.1 and Qt6.10.2 installations
- Added find-qt.bat helper script to locate Qt6 on system
- Fixed CMakeLists.txt to remove app.rc requirement
- Fixed QDateTime::currentTime() -> currentDateTime() for Qt6
- Added missing #include <QCloseEvent> in MainWindow.cpp
- Fixed QFileInfo includes in ServerProcess.cpp
- Replaced complex QOverload signal connections with SIGNAL/SLOT macros
- Fixed emit error() ambiguity by using this->error()
- Successfully builds CommonwealthOnlineHost.exe with Qt6.11.1

Build was blocked because:
1. CMake couldn't find Qt6 at standard locations
2. Qt6.11.1 uses different signal/slot APIs than documented
3. Missing header includes for Qt6 compatibility

Solutions applied:
- Auto-detection now checks C:\Qt\6.11.1 and 6.10.2
- Simplified connections to use SIGNAL/SLOT string-based syntax
- All missing headers now included
- Added find-qt.bat for manual Qt discovery

Executable now builds successfully!

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 21:18:08 +12:00

70 lines
1.6 KiB
Batchfile

@echo off
setlocal enabledelayedexpansion
echo.
echo ================================================================================
echo Qt Installation Finder
echo ================================================================================
echo.
REM Check common locations
echo Searching for Qt6 installation...
echo.
set FOUND=0
echo Checking C:\Qt...
if exist "C:\Qt" (
echo Found C:\Qt directory
dir /b "C:\Qt" | findstr /R "^[0-9]"
set FOUND=1
)
echo.
echo Checking C:\Program Files...
if exist "C:\Program Files\Qt" (
echo Found C:\Program Files\Qt
dir /b "C:\Program Files\Qt"
set FOUND=1
)
echo.
echo Checking C:\Program Files ^(x86^)...
if exist "C:\Program Files (x86)\Qt" (
echo Found C:\Program Files (x86)\Qt
dir /b "C:\Program Files (x86)\Qt"
set FOUND=1
)
echo.
echo Checking AppData...
if exist "%APPDATA%\Qt" (
echo Found %APPDATA%\Qt
dir /b "%APPDATA%\Qt"
set FOUND=1
)
if %FOUND%==0 (
echo.
echo [WARNING] Qt6 not found in common locations!
echo.
echo Please try one of the following:
echo.
echo 1. Install Qt6 from https://www.qt.io/download-open-source
echo Use default installation path: C:\Qt\6.8.0\
echo.
echo 2. If Qt is installed elsewhere, manually edit build.bat
echo and add your Qt path to the PATHS_TO_CHECK list
echo.
echo 3. Or run CMake manually with explicit path:
echo cmake .. -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH="path\to\your\Qt"
echo.
pause
exit /b 1
)
echo.
echo Installation search complete!
echo.
pause