Fully working Flatpak build!
This commit is contained in:
parent
a0a7147624
commit
1e1a69d77b
8
Makefile
8
Makefile
|
@ -2,6 +2,10 @@
|
||||||
clean:
|
clean:
|
||||||
rm -rf .flatpak-builder build
|
rm -rf .flatpak-builder build
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: install
|
||||||
build: clean
|
install: clean
|
||||||
flatpak-builder --user --install build com.sketchymaze.Doodle.json
|
flatpak-builder --user --install build com.sketchymaze.Doodle.json
|
||||||
|
|
||||||
|
.PHONY: repo
|
||||||
|
repo: clean
|
||||||
|
flatpak-builder --repo=repo build com.sketchymaze.Doodle.json
|
||||||
|
|
18
README.md
18
README.md
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
This repo contains Flatpak manifests to distribute Sketchy Maze to Linux users.
|
This repo contains Flatpak manifests to distribute Sketchy Maze to Linux users.
|
||||||
|
|
||||||
It's a work in progress. It builds the game in the Flatpak SDK but doesn't yet
|
The game source is required. If you're not the developer, you won't have
|
||||||
handle copying the runtime environment (SFX) and things in.
|
access to the source, but the rest of the Flatpak goodness is available for
|
||||||
|
you to read and learn from in case you're also looking to package a
|
||||||
|
Go SDL2 application for Linux.
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
|
@ -12,7 +14,8 @@ to this flatpak repo. A symlink can work. For best results, the Doodle source
|
||||||
folder should be "fully initialized" and ready to simply `go build` the app
|
folder should be "fully initialized" and ready to simply `go build` the app
|
||||||
and be done; this means `make doodads` has already been run, and `make bindata`
|
and be done; this means `make doodads` has already been run, and `make bindata`
|
||||||
to embed them in the Go sources. Generally, if you had run a `make dist` in
|
to embed them in the Go sources. Generally, if you had run a `make dist` in
|
||||||
Doodle recently you're good to go.
|
Doodle recently you're good to go. The `guidebook/` and `rtp/` directories
|
||||||
|
should also be included.
|
||||||
|
|
||||||
The `source/go.mod` file should have "replace" directives pointing to the
|
The `source/go.mod` file should have "replace" directives pointing to the
|
||||||
appropriate path as seen in the Flatpak build environment, like:
|
appropriate path as seen in the Flatpak build environment, like:
|
||||||
|
@ -30,4 +33,11 @@ in case they had bugs, will prevent the app from building.
|
||||||
|
|
||||||
## Makefile
|
## Makefile
|
||||||
|
|
||||||
`make build` will attempt to build and install the Flatpak.
|
`make install` will attempt to build and install the Flatpak.
|
||||||
|
|
||||||
|
`make repo` will build it and create the Flatpak repo in the directory `./repo`
|
||||||
|
|
||||||
|
## To Do
|
||||||
|
|
||||||
|
* GPG signature for the Flatpak.
|
||||||
|
* Upload the repo to `download.sketchymaze.com` for public access.
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
"--socket=x11",
|
"--socket=x11",
|
||||||
"--socket=pulseaudio"
|
"--socket=pulseaudio"
|
||||||
],
|
],
|
||||||
"command": "doodle",
|
"command": "launcher.sh",
|
||||||
"rename-icon": "doodle",
|
"rename-icon": "doodle",
|
||||||
"cleanup": [
|
"cleanup": [
|
||||||
"/include",
|
"/include",
|
||||||
|
@ -38,8 +38,9 @@
|
||||||
". /usr/lib/sdk/golang/enable.sh; env GOPATH=\"$(pwd)\"; make build",
|
". /usr/lib/sdk/golang/enable.sh; env GOPATH=\"$(pwd)\"; make build",
|
||||||
"install -Dm755 ./bin/doodle /app/bin/doodle",
|
"install -Dm755 ./bin/doodle /app/bin/doodle",
|
||||||
"install -Dm755 ./bin/doodad /app/bin/doodad",
|
"install -Dm755 ./bin/doodad /app/bin/doodad",
|
||||||
|
"install -Dm755 ./launcher.sh /app/bin/launcher.sh",
|
||||||
"mkdir -p /app/share/doodle /app/share/icons /app/extra/export/share",
|
"mkdir -p /app/share/doodle /app/share/icons /app/extra/export/share",
|
||||||
"cp -ra guidebook rtp *.md /app/extra/export/share/",
|
"cp -ra guidebook rtp *.md /app/share/doodle",
|
||||||
"cp -ra 256.png /app/share/icons/doodle.png",
|
"cp -ra 256.png /app/share/icons/doodle.png",
|
||||||
"install -Dm644 com.sketchymaze.Doodle.desktop /app/share/applications/com.sketchymaze.Doodle.desktop",
|
"install -Dm644 com.sketchymaze.Doodle.desktop /app/share/applications/com.sketchymaze.Doodle.desktop",
|
||||||
"install -Dm644 com.sketchymaze.Doodle.appdata.xml /app/share/appdata/com.sketchymaze.Doodle.appdata.xml",
|
"install -Dm644 com.sketchymaze.Doodle.appdata.xml /app/share/appdata/com.sketchymaze.Doodle.appdata.xml",
|
||||||
|
@ -64,11 +65,8 @@
|
||||||
"path": "com.sketchymaze.Doodle.appdata.xml"
|
"path": "com.sketchymaze.Doodle.appdata.xml"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "extra-data",
|
"type": "file",
|
||||||
"filename": "doodle",
|
"path": "launcher.sh"
|
||||||
"url": "https://download.sketchymaze.com/extra-data.tar.gz",
|
|
||||||
"sha256": "4ff48d57e6329f2638f3fcdca93a9b65a0fc9cbc057fe0446083a6a8a87088d1",
|
|
||||||
"size": 7159771
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
6
launcher.sh
Executable file
6
launcher.sh
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# XXX: to be run as the Flatpak executable
|
||||||
|
if [[ "$1" == "doodad" ]]; then
|
||||||
|
exec $@;
|
||||||
|
fi
|
||||||
|
doodle --chdir /app/share/doodle $@
|
Loading…
Reference in New Issue
Block a user