Written in the frontend with Flutter for desktop using bloc as the state managment,
as well go in the backend using gorilla for websocket connections
Install flutter for your respective operating system and configure/install necessary components as per the flutter website, which are necessary for the development of desktop apps.
Make sure flutter is in your PATH
.
Navigate to client/flutter
and run flutter pub get
.
In the client/flutter
directory create a new textfile .env
.
This must contain the default URI/URL the client will connect to in the format:
URI='[URI]'
[URI]
should be replaced by the websocket URL/URI of the chess4player server, for example:
URI='ws:://localhost:8080'
Install go and have it added to your path.
Navigate to the server
directory and run go mod download
.
In the client/flutter
directory run flutter run -d [device]
where [device]
is substituted by either windows
, macos
, or linux
,
depending on your platform.
In the server
directory run PORT=[port] go run main.go
,
where [port]
is substituted by the port you want to run the server on,
for example 8080
.
In the client/flutter
directory run flutter build [device] --release
where [device]
is substituted by either windows
, macos
, or linux
,
depending on your platform.
The resulting chess44.app
can be found in client/flutter/build/macos/Build/Products/Release
.
Using inno setup
to execute client/flutter/installers/default_windows_installation.iss
for an installer, which is found in client/flutter/installers/chess44.exe
.
In the server
directory run go build main.go
.
Now execute the resulting executable,
with the PORT
environment variable, for example (for macos/linux):
PORT=8080 ./main