Add native C++ Qt6 GUI host application
Introduce production-grade desktop GUI for hosting Commonwealth Online servers. Features: - Native C++ Qt6 application with minimal dependencies - Start/stop server buttons with live status indicator - Real-time stats display (uptime, clients, packet counts) - Live connected clients table - Server log viewer with timestamps - Fallout 4-inspired dark theme (amber/green accents) - Subprocess management (server independent of GUI) - Auto-detection of Python and server directory - Professional error handling and graceful shutdown Architecture: - MainWindow: Qt UI components and layout - ServerProcess: Manages Python relay subprocess - Subprocess spawns consumer_server_cli.py - Real-time log capture and parsing - Qt signals/slots for UI updates Build: - CMake 3.20+ configuration - Visual Studio 2022 MSVC compiler - Qt6.4+ required - Windows 10+ target - build.bat script for easy compilation Project structure: - src/main.cpp - entry point - src/MainWindow.h/cpp - main UI window - src/ServerProcess.h/cpp - subprocess and IPC layer - src/resources/ - Qt resources and icons - CMakeLists.txt - Qt6 build config - build.bat - Windows build script - README.md - user guide - DEVELOPMENT.md - developer guide Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
echo.
|
||||
echo ================================================================================
|
||||
echo Commonwealth Online - Qt GUI Build Script
|
||||
echo ================================================================================
|
||||
echo.
|
||||
|
||||
REM Check if CMake is installed
|
||||
cmake --version >nul 2>&1
|
||||
if errorlevel 1 (
|
||||
echo ERROR: CMake is not installed or not in PATH.
|
||||
echo Please install CMake from https://cmake.org/download/
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Create build directory
|
||||
if not exist "build" (
|
||||
echo Creating build directory...
|
||||
mkdir build
|
||||
)
|
||||
|
||||
cd build
|
||||
|
||||
echo Configuring Qt6 project with CMake...
|
||||
cmake .. -G "Visual Studio 17 2022" -DCMAKE_PREFIX_PATH="C:\Qt\6.4.0\msvc2019_64"
|
||||
|
||||
if errorlevel 1 (
|
||||
echo ERROR: CMake configuration failed.
|
||||
echo Make sure:
|
||||
echo 1. Qt6 is installed
|
||||
echo 2. Visual Studio 2022 is installed
|
||||
echo 3. CMAKE_PREFIX_PATH points to your Qt6 installation
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo Configuration successful!
|
||||
echo.
|
||||
echo Building project...
|
||||
cmake --build . --config Release
|
||||
|
||||
if errorlevel 1 (
|
||||
echo ERROR: Build failed.
|
||||
pause
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo.
|
||||
echo ================================================================================
|
||||
echo Build successful!
|
||||
echo ================================================================================
|
||||
echo.
|
||||
echo Executable: %cd%\bin\Release\CommonwealthOnlineHost.exe
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user