The project implements game platform for playing Congo
locally or via network.
There are two options for client software:
For server application, please deploy Congo.Server. Server starts at
http://localhost:5153
and https://localhost:7153
depending on the protocol. A client should use
the same connection identifiers, which are specified during game initialization. The ability of the
server to run over the Internet has not been tested due to the hardware limitations.
Note that all executables in the *-exe.zip
archives are self-contained and neither require
installation, nor root
permissions for running.
Contents
- Congo.CLI
- Congo.GUI
- Congo.Server
- Compile and run in the terminal
- Compile and run in Visual Studio
- Publishing a project
- Creating .msi file
- Release archives
Congo.CLI
is currently supported on both Windows
and Linux
operating systems. We further
describe installation procedures for each platform separately.
-
Download the latest
congo-cli-win-x64-<VERSION>-msi.zip
and unpack archive. -
Double left-click on the
setup.exe
starts standard installation wizard. -
Go through the installation by clicking
Next
button. -
Relevant executable can be found in
C:\Program Files\Noname\Congo.CLI
. -
The program could be uninstalled via
Control Panel
.
To make Congo.CLI
available in the $PATH
, proceed as follows.
-
Open
Start
menu and type inEdit the system environment variables
. PressEnter
. -
Press the button
Environment Variables...
. -
Find
Path
variable in theUser variables for ...
table. Open it forEdit
. -
Add
New
row containingC:\Program Files\Noname\Congo.CLI
.
-
Download the latest
congo-cli-linux-x64-<VERSION>-exe.zip
and unpack the archive. -
Copy
Congo.CLI
executable to the/usr/bin/
folder making it available in the$PATH
. Note that copying requiresroot
permissions, but running the executable does not need escalating privileges.Congo.CLI
could be placed in any directory available in the$PATH
.
sudo cp ./Congo.CLI /usr/bin/
Congo.GUI
exploits WPF
technology making the project Windows
-dependent.
-
Download the latest
congo-gui-win-x64-<VERSION>-msi.zip
and unpack archive. -
Double left-click on the
setup.exe
starts standard installation wizard. -
Go through the installation by clicking
Next
button. -
Relevant executable can be found in
C:\Program Files\Noname\Congo.GUI
. -
Installation create a link on the user's
Desktop
and in theStart
menu underCongo
folder. -
The program could be uninstalled via
Control Panel
.
This project is treated differently than other projects. We avoid installing software, because
server executable uses additional configuration files. These files shall be placed in the same
folder, from which we start executable. Making Congo.Server
available in the $PATH
would not
work properly in all scenarios. Both Windows
and Linux
versions use similar deployment
procedure.
-
Download release archive
congo-server-<platform>-<version>-exe.zip
. -
Unpack archive into the folder of choice.
-
Navigate to this folder in the terminal and run
Congo.Server
. Ensure that the current user has rights to create directories and files. Server stores all operational data in theData/
folder, such asmain.db
and game-specific databases. -
Wait until server instance reports successful start.
info: Microsoft.Hosting.Lifetime[14]
Now listening on: http://localhost:5153
info: Microsoft.Hosting.Lifetime[14]
Now listening on: https://localhost:7153
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
Note that the user cannot interact with the server instance, but could shut it down by pressing
Ctrl+C
.
Each project can be built, run and tested directly from the terminal. dotnet should be available on the target system.
-
Clone the latest working version of the solution or download release files.
-
Navigate to the project folder of choice, e.g.
Congo.CLI
. -
Execute
dotnet build
ordotnet run ...
with relevant arguments.
For developers preferring Visual Studio
, we further describe a relevant procedure for building
and running within this specific IDE
.
- Open
Visual Studio Community 2022
. - Left click on
Clone a repository
in the upper right corner. - Insert
https://github.com/zhukovdm/Congo
intoRepository location
field. - Right click on
Clone
in the bottom right corner. Open
the solution.
- Restore
NuGet
packages.
Projects are published as a self-contained binary files. Placeholder <RID>
can be replaced by any
runtime identifier from the .NET RID Catalog.
Currently, win-x64
and linux-x64
platforms are supported.
-
Navigate to the root folder of
Congo.CLI
,Congo.GUI
orCongo.Server
. -
Execute the following command in the terminal.
dotnet
utility shall be installed on the target system.
dotnet publish -r <RID> -c Release -o publish --self-contained true -p:PublishSingleFile=true -p:PublishReadyToRun=true -p:IncludeNativeLibrariesForSelfExtract=true
- Generated files are dumped into the
./publish/
folder.
Congo.Server
is compiled into an executable with several additional files (*.json
, *.config
,
etc.). All these files should be included into release archive.
.msi
files are used for proper installation, maintenance, and removal of software within Windows
systems. Congo.CLI
and Congo.GUI
are supposed to have installation files, which are built by
a special .Installer
projects. To generate .msi
file, proceed as follows.
-
Publish a working version of a project, refer to Publishing a project for details.
-
Open
Congo
solution in theVisual Studio
and (re-)build relevant.Installer
project. -
.msi
and the correspondingsetup.exe
could be found in the./Release/
folder.
Projects are released as a separated self-contained .zip
files with structured names
<project>-<platform>-<version>-<kind>.zip
. An example of archive name is congo-cli-linux-x64-v1.0.0-exe.zip
.