57 lines
1.6 KiB
Batchfile
57 lines
1.6 KiB
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
echo.
|
|
echo ================================================================================
|
|
echo Commonwealth Online - Qt Host and C# Server Setup Check
|
|
echo ================================================================================
|
|
echo.
|
|
|
|
cmake --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo [ERROR] CMake not found.
|
|
exit /b 1
|
|
)
|
|
echo [OK] CMake found
|
|
|
|
dotnet --version >nul 2>&1
|
|
if errorlevel 1 (
|
|
echo [ERROR] .NET 8 SDK not found or dotnet is not in PATH.
|
|
exit /b 1
|
|
)
|
|
for /f "tokens=*" %%V in ('dotnet --version') do set DOTNET_VERSION=%%V
|
|
echo [OK] .NET SDK found: !DOTNET_VERSION!
|
|
|
|
if not exist "C:\Program Files\Microsoft Visual Studio\2022\Community" if not exist "C:\Program Files\Microsoft Visual Studio\2022\Professional" if not exist "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" (
|
|
echo [ERROR] Visual Studio 2022 not found.
|
|
exit /b 1
|
|
)
|
|
echo [OK] Visual Studio 2022 found
|
|
|
|
set QT6_FOUND=0
|
|
set QT_PATH=
|
|
for %%Q in (
|
|
"C:\Qt\6.11.1\msvc2022_64"
|
|
"C:\Qt\6.10.2\msvc2022_64"
|
|
"C:\Qt\6.8.0\msvc2022_64"
|
|
"C:\Qt\6.7.0\msvc2022_64"
|
|
"C:\Qt\6.6.0\msvc2022_64"
|
|
"C:\Qt\6.5.0\msvc2022_64"
|
|
"C:\Qt\6.4.0\msvc2022_64"
|
|
) do (
|
|
if exist "%%~Q\lib\cmake\Qt6" if !QT6_FOUND!==0 (
|
|
set QT6_FOUND=1
|
|
set QT_PATH=%%~Q
|
|
)
|
|
)
|
|
|
|
if %QT6_FOUND%==0 (
|
|
echo [ERROR] Qt6 MSVC 2022 package not found at the standard C:\Qt locations.
|
|
exit /b 1
|
|
)
|
|
echo [OK] Qt6 found at: %QT_PATH%
|
|
|
|
echo.
|
|
echo All prerequisites found. build.bat will build the Qt host and publish the bundled C# server.
|
|
exit /b 0
|