forked from MTSR/mapserver
Merge branch 'master' into es6-modules
This commit is contained in:
commit
3d7f0d609e
11
.gitignore
vendored
11
.gitignore
vendored
@ -1,2 +1,11 @@
|
||||
output
|
||||
.releasetoken
|
||||
mapserver
|
||||
world.mt
|
||||
output
|
||||
test-output
|
||||
map.sqlite
|
||||
mapserver.tiles
|
||||
mapserver.sqlite
|
||||
mapserver.sqlite-journal
|
||||
mapserver.json
|
||||
debug.txt
|
||||
|
19
.travis.yml
19
.travis.yml
@ -1,11 +1,14 @@
|
||||
sudo: required
|
||||
language: go
|
||||
sudo: false
|
||||
|
||||
services:
|
||||
- docker
|
||||
go:
|
||||
- 1.11.x
|
||||
|
||||
install:
|
||||
- docker build -t thomasrudin-mt/mapserver ./server
|
||||
os:
|
||||
- linux
|
||||
|
||||
deploy:
|
||||
provider: script
|
||||
script: echo
|
||||
script:
|
||||
- go get github.com/mjibson/esc
|
||||
- go generate
|
||||
- go build
|
||||
- go test
|
||||
|
72
Makefile
72
Makefile
@ -1,15 +1,74 @@
|
||||
|
||||
STATIC_VFS=vfs/static.go
|
||||
OUT_DIR=output
|
||||
ENV=GO111MODULE=on
|
||||
VERSION=git-$(shell git rev-parse HEAD)
|
||||
|
||||
all: builder_image $(OUT_DIR) $(MOD_ZIP)
|
||||
|
||||
# -ldflags="-X mapserver/app.Version=1.0"
|
||||
GO_LDFLAGS=-ldflags "-linkmode external -extldflags -static -X mapserver/app.Version=$(VERSION)"
|
||||
GO_LDFLAGS_WIN=-ldflags "-X mapserver/app.Version=$(VERSION)"
|
||||
GO_BUILD=CGO_ENABLED=1 go build
|
||||
|
||||
BINARIES = $(OUT_DIR)/mapserver-linux-x86_64
|
||||
BINARIES += $(OUT_DIR)/mapserver-linux-x86
|
||||
BINARIES += $(OUT_DIR)/mapserver-windows-x86.exe
|
||||
BINARIES += $(OUT_DIR)/mapserver-windows-x86-64.exe
|
||||
BINARIES += $(OUT_DIR)/mapserver-linux-arm
|
||||
|
||||
|
||||
all: $(STATIC_VFS)
|
||||
go build
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir $@
|
||||
|
||||
fmt:
|
||||
go fmt ./...
|
||||
|
||||
test: $(OUT_DIR)
|
||||
go generate
|
||||
go build
|
||||
go vet ./...
|
||||
$(ENV) go test ./...
|
||||
|
||||
clean:
|
||||
rm -rf $(STATIC_VFS) test-output
|
||||
rm -rf $(OUT_DIR)
|
||||
|
||||
jshint:
|
||||
jshint static/js/*.js static/js/util static/js/overlays static/js/search
|
||||
|
||||
$(STATIC_VFS):
|
||||
go generate
|
||||
|
||||
$(OUT_DIR)/mapserver-linux-x86_64: $(OUT_DIR)
|
||||
# native (linux x86_64)
|
||||
GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc $(GO_BUILD) $(GO_LDFLAGS) -o $@
|
||||
|
||||
$(OUT_DIR)/mapserver-linux-x86: $(OUT_DIR)
|
||||
# apt install gcc-8-i686-linux-gnu
|
||||
GOOS=linux GOARCH=386 CC=i686-linux-gnu-gcc-7 $(GO_BUILD) $(GO_LDFLAGS) -o $@
|
||||
|
||||
$(OUT_DIR)/mapserver-windows-x86.exe: $(OUT_DIR)
|
||||
# apt install gcc-mingw-w64
|
||||
GOARCH=386 GOOS=windows CC=i686-w64-mingw32-gcc $(GO_BUILD) $(GO_LDFLAGS_WIN) -o $@
|
||||
|
||||
$(OUT_DIR)/mapserver-windows-x86-64.exe: $(OUT_DIR)
|
||||
GOARCH=amd64 GOOS=windows CC=x86_64-w64-mingw32-gcc $(GO_BUILD) $(GO_LDFLAGS_WIN) -o $@
|
||||
|
||||
$(OUT_DIR)/mapserver-linux-arm: $(OUT_DIR)
|
||||
# apt install gcc-5-arm-linux-gnueabihf
|
||||
GOARCH=arm GOARM=7 CC=arm-linux-gnueabihf-gcc-5 $(GO_BUILD) $(GO_LDFLAGS) -o $@
|
||||
|
||||
|
||||
release: builder_image $(OUT_DIR) $(MOD_ZIP)
|
||||
# build all with the docker image
|
||||
sudo docker run --rm -it\
|
||||
-v $(shell pwd)/server/:/app\
|
||||
-v mapserver-volume:/root/go\
|
||||
-w /app\
|
||||
mapserver-builder\
|
||||
make test jshint all VERSION=$(VERSION)
|
||||
make test jshint release-all VERSION=$(VERSION)
|
||||
# copy generated files to output dir
|
||||
cp server/output/* $(OUT_DIR)/
|
||||
|
||||
@ -17,9 +76,4 @@ builder_image:
|
||||
# build the docker image with all dependencies
|
||||
$(MAKE) -C docker_builder build
|
||||
|
||||
$(OUT_DIR):
|
||||
mkdir $@
|
||||
|
||||
clean:
|
||||
rm -rf $(OUT_DIR)
|
||||
$(MAKE) -C server clean
|
||||
release-all: $(STATIC_VFS) $(BINARIES)
|
||||
|
@ -11,9 +11,6 @@ Ubuntu install: https://github.com/golang/go/wiki/Ubuntu
|
||||
|
||||
## Compile
|
||||
|
||||
|
||||
Working directory: */server*
|
||||
|
||||
```bash
|
||||
# generate the static web files
|
||||
go generate
|
||||
@ -25,4 +22,3 @@ go build
|
||||
go test ./...
|
||||
|
||||
```
|
||||
|
||||
|
@ -24,6 +24,13 @@ can enable the setting in your `minetest.conf` (defaults to false)
|
||||
mapserver.enable_crafting = true
|
||||
```
|
||||
|
||||
The update interval of the players on the map can be changed with:
|
||||
```
|
||||
mapserver.send_interval = 1
|
||||
```
|
||||
|
||||
Default is `2`, means that the player, time and lag info get sent every 2 seconds.
|
||||
|
||||
## Passive mode
|
||||
|
||||
You don't have to set up anything, passive mode is the default.
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user