diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42dec2b1..a8619c70 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -34,6 +34,8 @@ jobs: - uses: actions/checkout@v2 with: fetch-depth: 0 + submodules: true + - run: git clone https://github.com/flathub/shared-modules.git --branch master - uses: flatpak/flatpak-github-actions/flatpak-builder@v6.1 with: manifest-path: im.dino.Dino.json diff --git a/.gitignore b/.gitignore index 6d362804..54bba14a 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ gschemas.compiled windows-installer/win64-dist/ *.exe *.dll +.flatpak-builder \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..1e7a9909 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "shared-modules"] + path = shared-modules + url = https://github.com/flathub/shared-modules.git diff --git a/build-flatpack.sh b/build-flatpack.sh new file mode 100644 index 00000000..cff3ee96 --- /dev/null +++ b/build-flatpack.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +getFlatpackDependencies(){ + flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo + flatpak install flathub org.gnome.Sdk//44 + flatpak install flathub org.gnome.Platform//44 +} + +prepareModules(){ + git submodule init + git submodule update +} + +build(){ + FP_TEMP_BUILD_DIR=$(mktemp -d) + FP_OUTDIR="builds" + flatpak-builder ${FP_TEMP_BUILD_DIR} im.dino.Dino.json + flatpak build-export $FP_OUTDIR $FP_TEMP_BUILD_DIR + flatpak build-bundle $FP_OUTDIR dino.flatpak +} + +getFlatpackDependencies +prepareModules +build \ No newline at end of file diff --git a/im.dino.Dino.json b/im.dino.Dino.json index c754c88e..7654a2c1 100644 --- a/im.dino.Dino.json +++ b/im.dino.Dino.json @@ -16,6 +16,7 @@ "--talk-name=org.freedesktop.Notifications" ], "modules": [ + "shared-modules/libcanberra/libcanberra.json", { "name": "libsignal-protocol-c", "buildsystem": "cmake-ninja", diff --git a/shared-modules b/shared-modules new file mode 160000 index 00000000..d0229951 --- /dev/null +++ b/shared-modules @@ -0,0 +1 @@ +Subproject commit d0229951ac23967c4f5697bd7b5c1bd7e641b8c3