Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ jobs:
go build -trimpath -o ./builds/linux/appdir/usr/bin
ls -l builds/linux/appdir/usr/bin/

- name: Store fingertip binary
uses: actions/upload-artifact@v2
with:
name: fingertip-bin
path: ./builds/linux/appdir/usr/bin/fingertip

- name: Download hnsd binary
uses: actions/download-artifact@v2
with:
Expand All @@ -68,11 +74,25 @@ jobs:
run: |
ls -l appdir/usr/bin/
chmod +x appdir/usr/bin/hnsd
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/fingertip.desktop -appimage -executable=appdir/usr/bin/hnsd
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage

- name: Store fingertip binary
# https://bbs.archlinux.org/viewtopic.php?pid=1994258#p1994258
# Most systems don't have the latest glib and we require (2.69.1+),
# so we extract the AppImage, copy glib into it, then replace the AppImage
- name: Patch AppImage to include glib
working-directory: ./builds/linux
run: |
wget -c -nv "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod +x appimagetool-x86_64.AppImage
OUTPUT=$(ls Fingertip-*.AppImage)
./$OUTPUT --appimage-extract
wget -c -nv "https://archive.archlinux.org/packages/g/glib2/glib2-2.70.2-1-x86_64.pkg.tar.zst"
tar xvf glib2-2.70.2-1-x86_64.pkg.tar.zst -C squashfs-root --use-compress-program=unzstd
./appimagetool-x86_64.AppImage squashfs-root $OUTPUT

- name: Store fingertip AppImage
uses: actions/upload-artifact@v2
with:
name: fingertip-appimage
Expand Down
15 changes: 6 additions & 9 deletions builds/linux/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,16 @@

Make sure both `hnsd` and `fingertip` binaries are in `./appdir/usr/bin/`.

Download / install [`linuxdeployqt`](https://github.com/probonopd/linuxdeployqt). Then build AppImage.
Download / install [`linuxdeploy`](https://github.com/linuxdeploy/linuxdeploy).
Then build AppImage.

```sh
# download linuxdeployqt
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod +x linuxdeployqt-continuous-x86_64.AppImage
# download linuxdeploy
wget -c -nv "https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage"
chmod +x linuxdeploy-x86_64.AppImage

# build
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/fingertip.desktop -appimage -always-overwrite
./linuxdeploy-x86_64.AppImage --appdir appdir --output appimage
```

AppImage will be in current directory.

> **Note:** Builds depend on the glibc in your system. This build will only work on systems with glibc >= current version. This is why the CI builds in an old Ubuntu 18.04 container. [More info](https://github.com/probonopd/linuxdeployqt#a-note-on-binary-compatibility)

> `linuxdeployqt` may throw an error if glibc is too new (yes, new). Add `-unsupported-allow-new-glibc` to bypass it.