2019-01-24 17:56:37 +03:00
|
|
|
|
2019-02-08 00:30:31 +03:00
|
|
|
# System overview
|
|
|
|
|
2019-02-15 15:02:32 +03:00
|
|
|
<img src="./Overview.png">
|
|
|
|
|
|
|
|
# Build dependencies
|
|
|
|
|
|
|
|
## Basic
|
|
|
|
* go >= 1.11
|
|
|
|
* make
|
|
|
|
|
|
|
|
## With crosscompiling (optional)
|
|
|
|
Either apt-get:
|
|
|
|
* gcc-mingw-w64
|
|
|
|
* gcc-5-arm-linux-gnueabihf
|
|
|
|
* gcc-i686-linux-gnu
|
|
|
|
|
2019-03-29 11:07:06 +03:00
|
|
|
Or use the docker-builder image in `/docker-builder`
|
2019-02-15 15:02:32 +03:00
|
|
|
|
|
|
|
# Development setup
|
|
|
|
|
|
|
|
Working directory: `./server`
|
|
|
|
|
|
|
|
## Preparing the files and map
|
|
|
|
|
|
|
|
Copy your `map.sqlite` into the working directory if you want to test with
|
|
|
|
a sqlite map database
|
|
|
|
|
|
|
|
### world.mt
|
|
|
|
|
|
|
|
You need a `world.mt` too in order to make the connection to the database.
|
|
|
|
In the sqlite case:
|
|
|
|
|
|
|
|
```
|
|
|
|
gameid = minetest
|
|
|
|
backend = sqlite3
|
|
|
|
creative_mode = false
|
|
|
|
enable_damage = false
|
|
|
|
player_backend = files
|
|
|
|
```
|
|
|
|
|
|
|
|
For postgres:
|
|
|
|
```
|
|
|
|
gameid = minetest
|
|
|
|
backend = postgresql
|
|
|
|
creative_mode = true
|
|
|
|
enable_damage = true
|
|
|
|
player_backend = postgresql
|
|
|
|
pgsql_connection = host=localhost port=5432 user=postgres password=enter dbname=postgres
|
|
|
|
pgsql_player_connection = host=localhost port=5432 user=postgres password=enter dbname=postgres
|
|
|
|
```
|
|
|
|
|
|
|
|
## Generate the static files (webserver vfs)
|
|
|
|
|
|
|
|
* Create the vfs (in `vfs/static.go`) with `go generate`
|
|
|
|
|
|
|
|
## Running the server
|
|
|
|
|
|
|
|
* Create a `mapserver.json` with `go run . -createconfig`
|
|
|
|
* Change the value `webdev` in the `mapserver.json` to `true`
|
|
|
|
* Start the server with `go run .` or with debug output: `go run . -debug`
|
|
|
|
* The web files in `static/` can now be changed on the fly without restarting the server
|
|
|
|
|
2019-03-29 11:07:06 +03:00
|
|
|
# All platform build
|
2019-02-15 15:02:32 +03:00
|
|
|
|
|
|
|
Prerequisites:
|
|
|
|
* docker
|
2019-03-29 11:07:06 +03:00
|
|
|
* make
|
2019-02-15 15:02:32 +03:00
|
|
|
|
|
|
|
Building:
|
2019-03-29 11:07:06 +03:00
|
|
|
* Run `make clean all` to build for all supported targets
|
2019-02-15 15:02:32 +03:00
|
|
|
|
|
|
|
The artifacts should now be in the `output` directory
|
2019-03-29 11:07:06 +03:00
|
|
|
|
|
|
|
# Release build
|
|
|
|
|
|
|
|
Prerequisites:
|
|
|
|
* docker
|
|
|
|
* make
|
|
|
|
|
|
|
|
Building:
|
2019-04-04 12:21:30 +03:00
|
|
|
* Run `make all VERSION=X.Y.Z` in the root directory
|