From 0080704153c2f0b7ab23a0ed8a67b8950e2b24ed Mon Sep 17 00:00:00 2001 From: tinywrkb Date: Sun, 27 Dec 2020 13:17:41 +0200 Subject: [PATCH] boolr: saves folder workaround and manifest update --- me.boolr.boolr/me.boolr.boolr.yaml | 73 +++++++++++------- me.boolr.boolr/resources/boolr | 2 +- .../{boolr.desktop => me.boolr.boolr.desktop} | 1 + .../{boolr.png => me.boolr.boolr.png} | Bin 4 files changed, 47 insertions(+), 29 deletions(-) rename me.boolr.boolr/resources/{boolr.desktop => me.boolr.boolr.desktop} (88%) rename me.boolr.boolr/resources/{boolr.png => me.boolr.boolr.png} (100%) diff --git a/me.boolr.boolr/me.boolr.boolr.yaml b/me.boolr.boolr/me.boolr.boolr.yaml index 269412fd..f8d36f31 100644 --- a/me.boolr.boolr/me.boolr.boolr.yaml +++ b/me.boolr.boolr/me.boolr.boolr.yaml @@ -1,14 +1,11 @@ -# TODO: build from source and master branch +# TODO: build from master branch # Known issues # * no access to fllesystem -# * can't save new boards, need to go through "sandbox mode" app-id: me.boolr.boolr runtime: org.freedesktop.Platform runtime-version: '20.08' sdk: org.freedesktop.Sdk command: boolr -rename-desktop-file: boolr.desktop -rename-icon: boolr separate-locales: false cleanup: - /include @@ -17,33 +14,13 @@ cleanup: - '*.la' finish-args: - --device=dri - - --filesystem=home + - --filesystem=xdg-documents + - --filesystem=xdg-download + - --filesystem=xdg-pictures - --share=ipc - - --socket=wayland + - --share=network - --socket=x11 modules: - - name: boolr - buildsystem: simple - build-commands: - - install -D apply_extra /app/bin/apply_extra - - install -Dm755 boolr /app/bin/boolr - - install -Dm644 boolr.desktop /app/share/applications/boolr.desktop - - install -Dm644 boolr.png /app/share/icons/hicolor/128x128/apps/boolr.png - sources: - - type: script - dest-filename: apply_extra - commands: - - unzip boolr.zip - - rm -f boolr.zip - - mv BOOLR-linux-x64 boolr - - rm -f boolr/boolr.desktop - - type: extra-data - filename: boolr.zip - url: https://github.com/GGBRW/BOOLR/releases/download/v1.0.3/BOOLR-v1.0.3-linux-x86_64.zip - sha256: 94fa88d65442687aa6aa4ac2d3f5a0c76ed13d45adf98bcc6609f3118c90bb29 - size: 48267385 - - type: dir - path: resources - ../flathub-shared-modules/gtk2/gtk2.json - name: gconf build-options: @@ -58,6 +35,15 @@ modules: - type: archive url: https://gitlab.gnome.org/Archive/gconf/-/archive/3.2.6/gconf-3.2.6.tar.gz sha256: d73497412da91896a110853b5fc62f906211d0e0e61a5e535a34e55e0d445e78 + cleanup: + - /bin + - /etc + - /lib/girepository-1.0 + - /share/aclocal + - /share/dbus-1 + - /share/gir-1.0 + - /share/man + - /share/sgml modules: - name: gnome-common sources: @@ -66,10 +52,41 @@ modules: sha256: 22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf modules: - ../flathub-shared-modules/intltool/intltool-0.51.json + cleanup: + - '*' - ../flathub-shared-modules/dbus-glib/dbus-glib-0.110.json - name: pango-1_42 buildsystem: meson + config-opts: + - -Dgir=false sources: - type: git url: https://gitlab.gnome.org/GNOME/pango.git commit: a6a89818246b0b14c0fe3d00d6120929fc0a11d9 + cleanup: + - /bin + - /libexec + - /share/installed-tests + - /share/man + - name: boolr + buildsystem: simple + build-commands: + - install -D apply_extra /app/bin/apply_extra + - install -Dm755 boolr /app/bin/boolr + - install -Dm644 me.boolr.boolr.desktop -t /app/share/applications/ + - install -Dm644 me.boolr.boolr.png -t /app/share/icons/hicolor/128x128/apps/ + sources: + - type: script + dest-filename: apply_extra + commands: + - bsdtar -xf boolr.zip --strip-components=1 + - rm -f boolr.zip + - rm -f boolr.desktop + - sed -i 's#^\(const savesFolder =\).*#\1 process.env.XDG_CONFIG_HOME + "/BOOLR/saves/";\nif (!fs.existsSync(savesFolder)) fs.mkdir(savesFolder);#' resources/app/app/js/saves.js + - type: extra-data + filename: boolr.zip + url: https://github.com/GGBRW/BOOLR/releases/download/v1.0.3/BOOLR-v1.0.3-linux-x86_64.zip + sha256: 94fa88d65442687aa6aa4ac2d3f5a0c76ed13d45adf98bcc6609f3118c90bb29 + size: 48267385 + - type: dir + path: resources diff --git a/me.boolr.boolr/resources/boolr b/me.boolr.boolr/resources/boolr index b94dda91..b4d92a08 100644 --- a/me.boolr.boolr/resources/boolr +++ b/me.boolr.boolr/resources/boolr @@ -1,3 +1,3 @@ #!/bin/sh -exec /app/extra/boolr/BOOLR "$@" +exec /app/extra/BOOLR "$@" diff --git a/me.boolr.boolr/resources/boolr.desktop b/me.boolr.boolr/resources/me.boolr.boolr.desktop similarity index 88% rename from me.boolr.boolr/resources/boolr.desktop rename to me.boolr.boolr/resources/me.boolr.boolr.desktop index 7adc73aa..ec03eb23 100644 --- a/me.boolr.boolr/resources/boolr.desktop +++ b/me.boolr.boolr/resources/me.boolr.boolr.desktop @@ -4,5 +4,6 @@ Comment=A digital logic simulator Exec=boolr %U Terminal=false Type=Application +Icon=me.boolr.boolr StartupNotify=true Categories=Development diff --git a/me.boolr.boolr/resources/boolr.png b/me.boolr.boolr/resources/me.boolr.boolr.png similarity index 100% rename from me.boolr.boolr/resources/boolr.png rename to me.boolr.boolr/resources/me.boolr.boolr.png