mirror of
https://github.com/maputnik/editor.git
synced 2026-08-26 06:57:26 +00:00
Add Makefile
This commit is contained in:
@@ -22,3 +22,9 @@ _testmain.go
|
|||||||
*.exe
|
*.exe
|
||||||
*.test
|
*.test
|
||||||
*.prof
|
*.prof
|
||||||
|
|
||||||
|
# Bindata
|
||||||
|
bindata_assetfs.go
|
||||||
|
|
||||||
|
# Built binary
|
||||||
|
maputnik
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[submodule "editor"]
|
||||||
|
path = editor
|
||||||
|
url = git@github.com:maputnik/editor.git
|
||||||
|
branch = master
|
||||||
@@ -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
|
||||||
@@ -1,26 +1,21 @@
|
|||||||
# desktop
|
# Maputnik Desktop
|
||||||
A Golang based cross platform executable for integrating Maputnik locally
|
|
||||||
|
|
||||||
|
A Golang based cross platform executable for integrating Maputnik locally.
|
||||||
|
|
||||||
### Build
|
### Build
|
||||||
|
|
||||||
First you need a app bundle distribution of Maptunik and copy over `public`
|
Clone the repository recursively since the Maputnik editor is embedded
|
||||||
to the `gui` folder in this project.
|
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/...
|
make
|
||||||
go-bindata-assetfs gui/...
|
|
||||||
```
|
|
||||||
|
|
||||||
Install the go package.
|
|
||||||
|
|
||||||
```
|
|
||||||
go install
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
You should now find the `maputnik` binary in your directory.
|
||||||
|
|||||||
Submodule
+1
Submodule editor added at 3b59e54b2a
Reference in New Issue
Block a user