@echo off setlocal enabledelayedexpansion echo. echo ================================================================================ echo Commonwealth Online GUI - Qt6 DLL Deployment echo ================================================================================ echo. REM Find Qt6 installation set QT6_PATH= if exist "C:\Qt\6.11.1\msvc2022_64\bin" set QT6_PATH=C:\Qt\6.11.1\msvc2022_64 if exist "C:\Qt\6.10.2\msvc2022_64\bin" set QT6_PATH=C:\Qt\6.10.2\msvc2022_64 if exist "C:\Qt\6.8.0\msvc2022_64\bin" set QT6_PATH=C:\Qt\6.8.0\msvc2022_64 if "!QT6_PATH!"=="" ( echo ERROR: Could not find Qt6 installation. echo Please ensure Qt6 is installed to one of these paths: echo - C:\Qt\6.11.1\msvc2022_64 echo - C:\Qt\6.10.2\msvc2022_64 echo - C:\Qt\6.8.0\msvc2022_64 pause exit /b 1 ) echo Found Qt6 at: !QT6_PATH! echo. echo Deploying Qt6 DLLs to release directory... echo. set DEPLOY_DIR=%cd%\build\bin\Release REM Required DLLs set DLLs=^ Qt6Core.dll ^ Qt6Gui.dll ^ Qt6Widgets.dll ^ Qt6Network.dll ^ Qt6Concurrent.dll ^ Qt6DBus.dll ^ Qt6Xml.dll REM Copy DLLs for %%D in (%DLLs%) do ( if exist "!QT6_PATH!\bin\%%D" ( echo Copying %%D... copy /Y "!QT6_PATH!\bin\%%D" "!DEPLOY_DIR!\%%D" >nul ) else ( echo WARNING: %%D not found (may not be required) ) ) REM Copy plugins directory if not exist "!DEPLOY_DIR!\plugins" mkdir "!DEPLOY_DIR!\plugins" echo Copying Qt plugins... xcopy /Y /Q "!QT6_PATH!\plugins\platforms" "!DEPLOY_DIR!\plugins\platforms\" xcopy /Y /Q "!QT6_PATH!\plugins\styles" "!DEPLOY_DIR!\plugins\styles\" 2>nul xcopy /Y /Q "!QT6_PATH!\plugins\imageformats" "!DEPLOY_DIR!\plugins\imageformats\" 2>nul echo. echo ================================================================================ echo Deployment Complete! echo ================================================================================ echo. echo Executable is now ready to run: echo !DEPLOY_DIR!\CommonwealthOnlineHost.exe echo. echo You can now: echo 1. Double-click CommonwealthOnlineHost.exe to run echo 2. Or copy the entire Release folder to another machine echo 3. Include all DLLs and plugins folder when distributing echo. pause