51 lines
1.2 KiB
Markdown
51 lines
1.2 KiB
Markdown
# Setup
|
|
|
|
## Dedicated server development
|
|
|
|
Install the .NET 8 SDK.
|
|
|
|
```bash
|
|
cd server
|
|
dotnet build CommonwealthOnline.Server.csproj -c Release
|
|
dotnet run --project tests/CommonwealthOnline.Server.Tests.csproj -c Release
|
|
```
|
|
|
|
Run from source:
|
|
|
|
```bash
|
|
dotnet run --project CommonwealthOnline.Server.csproj -- serve --config commonwealth-server.json --interactive
|
|
```
|
|
|
|
## Windows Qt Host development
|
|
|
|
Required:
|
|
|
|
- Visual Studio 2022 with C++ tools
|
|
- CMake 3.20+
|
|
- Qt 6.4+ MSVC 2022 package
|
|
- .NET 8 SDK
|
|
|
|
Run:
|
|
|
|
```bat
|
|
check-setup.bat
|
|
build.bat
|
|
```
|
|
|
|
CMake builds the Qt host and publishes the bundled C# server as a self-contained Windows executable under the staged `server` directory beside the host.
|
|
|
|
## GameNetworkingSockets
|
|
|
|
The authoritative server is C#. Valve GameNetworkingSockets remains in the native C++ bridge under `server/native_transport`.
|
|
|
|
A server with `enable_gns_transport: true` needs the appropriate bridge library beside the server or a valid `gns_bridge_path`.
|
|
|
|
## Ports
|
|
|
|
- Gameplay TCP compatibility: TCP 7777 by default
|
|
- GNS gameplay: UDP 7777 by default when enabled
|
|
- LAN discovery: UDP 7778
|
|
- Admin control: TCP 127.0.0.1:7779 by default
|
|
|
|
The admin port must remain localhost-only.
|