summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Zugaldia <antonio@mapbox.com>2019-04-20 21:17:07 -0400
committerAntonio Zugaldia <antonio@mapbox.com>2019-04-20 21:17:07 -0400
commit426ee216ce56cad965b09478986bbb5669766891 (patch)
treed308b2209be0a7e9d6ba63a1ea6b12dcb6a69c6b
parent8124dab0c222ffeee372ab922756d7a4e9b51771 (diff)
downloadqtlocation-mapboxgl-426ee216ce56cad965b09478986bbb5669766891.tar.gz
add local build instructions to README
-rw-r--r--platform/linux/snap/README.md53
1 files changed, 53 insertions, 0 deletions
diff --git a/platform/linux/snap/README.md b/platform/linux/snap/README.md
new file mode 100644
index 0000000000..0bc80972ad
--- /dev/null
+++ b/platform/linux/snap/README.md
@@ -0,0 +1,53 @@
+# Mapbox GL Native snap for Linux
+
+The `snapcraft.yaml` file in this folder helps build a [snap](https://www.snapcraft.io) package for the Linux demo app (`mbgl-glfw`).
+
+`mbgl-glfw` is a simple map application and test suite for Linux, based on Mapbox GL Native and GLFW. Keyboard shortcuts for testing functionality are logged to the console when the test app is started.
+
+Please note that to run the app you need to set up a `MAPBOX_ACCESS_TOKEN` environment variable with a valid Mapbox access token.
+
+## Install it from the snap store
+
+Builds are available in the `dev` channel of the snap store:
+
+```
+sudo snap install mapbox-demo
+```
+
+## Building the snap package from source
+
+First increase the default memory available to snapcraft. The default is 2G and won't be enough to build the binary:
+
+```
+export SNAPCRAFT_BUILD_ENVIRONMENT_MEMORY=16G
+```
+
+After that, run `snapcraft` to build the package:
+
+```
+snapcraft --debug
+```
+
+(the `--debug` flag will automatically open a shell within the snap's virtual environment if something goes wrong.)
+
+## Installing the snap package
+
+You can install the snap package locally with:
+
+```
+sudo snap install my-snap-name_0.1_amd64.snap --dangerous --devmode
+```
+
+## Publishing it to the Snap Store
+
+Authenticate the snapcraft command using the Mapbox Snapcraft developer account credentials:
+
+```
+snapcraft login
+```
+
+Upload the snap and release it into the edge channel:
+
+```
+snapcraft push --release=edge mysnap_latest_amd64.snap
+```