1
0
mirror of synced 2025-01-18 00:56:49 +01:00

build: Add support for flatpaks

Based on the original work of @Calinou
This commit is contained in:
WerWolv 2021-08-25 14:52:07 +02:00
parent e6c150c586
commit 2eb7825e69
2 changed files with 88 additions and 0 deletions

View File

@ -12,6 +12,9 @@ jobs:
linux:
runs-on: ubuntu-20.04
name: 🐧 Ubuntu 20.04
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-40
options: --privileged
steps:
- name: 🧰 Checkout
@ -39,6 +42,13 @@ jobs:
..
make -j 4 install
- name: ✋ Bundle Flatpak
uses: bilelmoussaoui/flatpak-github-actions/flatpak-builder@v4
with:
bundle: imhex.flatpak
manifest-path: dist/net.werwolv.ImHex.yaml
cache-key: flatpak-builder-${{ github.sha }}
- name: 📦 Upload ELF
uses: actions/upload-artifact@v2
with:
@ -46,6 +56,13 @@ jobs:
path: |
build/install/*
- name: 📦 Upload Flatpak
uses: actions/upload-artifact@v2
with:
name: Linux Flatpak
path: |
build/*.flatpak
win:
runs-on: windows-latest
name: 🟦 Windows MINGW64

71
dist/net.werwolv.ImHex.yaml vendored Normal file
View File

@ -0,0 +1,71 @@
app-id: net.werwolv.ImHex
runtime: org.freedesktop.Platform
runtime-version: '20.08'
default-branch: stable
sdk: org.freedesktop.Sdk
command: imhex
finish-args:
- --share=ipc
- --socket=x11
- --filesystem=host
- --device=all
modules:
- name: capstone
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
sources:
- type: archive
url: https://github.com/aquynh/capstone/archive/4.0.2.tar.gz
sha256: 7c81d798022f81e7507f1a60d6817f63aa76e489aa4e7055255f21a22f5e526a
- name: libiconv
sources:
- type: archive
url: https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
sha256: e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
- name: glfw
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_SHARED_LIBS:BOOL=ON
sources:
- type: archive
url: https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.zip
sha256: 08a33a512f29d7dbf78eab39bd7858576adcc95228c9efe8e4bc5f0f3261efc7
cleanup:
- /include
- /lib/pkgconfig
- name: mbedtls
buildsystem: cmake-ninja
config-opts:
- -DCMAKE_C_FLAGS=-fPIC
sources:
- type: archive
url: https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.27.0.tar.gz
sha256: 2a07856e541f0e5f6eaee4f78018c52f25bd244ed76f9020dea54a8b02cac6ea
- name: nlohmann-json
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_TESTING=OFF
sources:
- type: archive
url: https://github.com/nlohmann/json/archive/v3.9.1.tar.gz
sha256: 4cf0df69731494668bdd6460ed8cb269b68de9c19ad8c27abc24cd72605b2d5b
- name: imhex
buildsystem: cmake-ninja
sources:
- type: git
url: https://github.com/WerWolv/ImHex.git