Add Makefile

This commit is contained in:
lukasmartinelli
2016-09-27 20:58:08 +02:00
parent 66e3ce8743
commit 8b722fc967
5 changed files with 41 additions and 14 deletions

6
.gitignore vendored
View File

@@ -22,3 +22,9 @@ _testmain.go
*.exe
*.test
*.prof
# Bindata
bindata_assetfs.go
# Built binary
maputnik

4
.gitmodules vendored Normal file
View File

@@ -0,0 +1,4 @@
[submodule "editor"]
path = editor
url = git@github.com:maputnik/editor.git
branch = master

21
Makefile Normal file
View File

@@ -0,0 +1,21 @@
SOURCEDIR=.
SOURCES := $(shell find $(SOURCEDIR) -name '*.go')
BINARY=maputnik
all: $(BINARY)
$(BINARY): $(SOURCES)
go build -o ${BINARY}
editor/node_modules:
cd editor && npm install
editor/public: editor/node_modules
cd editor && npm run build
bindata_assetfs.go: editor/public
go-bindata-assetfs editor/public/
.PHONY: clean
clean:
rm -rf editor/public && rm -rf maputnik

View File

@@ -1,26 +1,21 @@
# desktop
A Golang based cross platform executable for integrating Maputnik locally
# Maputnik Desktop
A Golang based cross platform executable for integrating Maputnik locally.
### Build
First you need a app bundle distribution of Maptunik and copy over `public`
to the `gui` folder in this project.
Clone the repository recursively since the Maputnik editor is embedded
as submodule.
```
npm run dist
git clone --recursive git@github.com:maputnik/desktop.git
```
Package the the `gui` as binary assets.
Run `make` to build the app distribution bundle and create the `maputnik` binary
embedding the editor.
```
go get github.com/elazarl/go-bindata-assetfs/...
go-bindata-assetfs gui/...
```
Install the go package.
```
go install
make
```
You should now find the `maputnik` binary in your directory.

1
editor Submodule

Submodule editor added at 3b59e54b2a