From 66895b03c0fe4b48a9fd56c92440876e7cbb1ca8 Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Sat, 16 Nov 2024 22:13:00 +0100 Subject: [PATCH 1/4] Update Flatpak manifest to Qt 6.8, match beta Signed-off-by: Matthew J. Milner --- flatpak/org.openchemistry.Avogadro2.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/flatpak/org.openchemistry.Avogadro2.yaml b/flatpak/org.openchemistry.Avogadro2.yaml index 5e13f4f0..2432abb7 100644 --- a/flatpak/org.openchemistry.Avogadro2.yaml +++ b/flatpak/org.openchemistry.Avogadro2.yaml @@ -1,7 +1,7 @@ app-id: org.openchemistry.Avogadro2 runtime: org.kde.Platform sdk: org.kde.Sdk -runtime-version: "6.7" +runtime-version: "6.8" command: avogadro2 appdata-license: BSD-3-Clause AND GPL-2.0-only finish-args: @@ -11,7 +11,6 @@ finish-args: - --device=dri # OpenGL rendering - --share=network # For plugin downloads cleanup: - - /include - /lib/cmake - '*.la' - '*.a' @@ -107,5 +106,9 @@ modules: post-install: # Manually copy contents of prefix dir over into main build dir - # -a option is recursive should preserve permissions and symlinks - - cp -a prefix/* -t ${FLATPAK_DEST}/ + # -a option is recursive, should preserve permissions and symlinks + - cp -a prefix/bin -t ${FLATPAK_DEST}/ + - cp -a prefix/lib -t ${FLATPAK_DEST}/ + - cp -a prefix/lib64/* -t ${FLATPAK_DEST}/lib/ # Merge with lib + - ln -rs ${FLATPAK_DEST}/lib ${FLATPAK_DEST}/lib64 # Add a symlink so plugins get found + - cp -a prefix/share -t ${FLATPAK_DEST}/ From 0e53ebef021484d06a496c22b1c128211afe47da Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Sat, 16 Nov 2024 22:20:21 +0100 Subject: [PATCH 2/4] Use Flatpak of flatpak-builder so that we use latest build Signed-off-by: Matthew J. Milner --- .github/workflows/flatpak.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index c50b8a28..fb916331 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -14,6 +14,9 @@ jobs: - name: Configure flatpak run: flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo + - name: Install flatpak-builder + run: flatpak --user install --or-update --noninteractive flathub org.flatpak.Builder + - name: Configure git run: git config --global protocol.file.allow always # Have to do this because for a while git's handling of submodules was broken @@ -81,7 +84,7 @@ jobs: run: mv openchemistry/avogadroapp/flatpak/org.openchemistry.Avogadro2.yaml ./ - name: Build with flatpak-builder - run: flatpak-builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml + run: flatpak run org.flatpak.Builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml - name: Create bundle run: flatpak build-bundle repo Avogadro2.flatpak org.openchemistry.Avogadro2 test From efb08e5cf7c235a01219399d64aaa70c36771a86 Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Sat, 16 Nov 2024 23:08:00 +0100 Subject: [PATCH 3/4] Have to run with dbus-run-session Signed-off-by: Matthew J. Milner --- .github/workflows/flatpak.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index fb916331..bd8cb679 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -84,7 +84,7 @@ jobs: run: mv openchemistry/avogadroapp/flatpak/org.openchemistry.Avogadro2.yaml ./ - name: Build with flatpak-builder - run: flatpak run org.flatpak.Builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml + run: dbus-run-session flatpak run org.flatpak.Builder --force-clean --user --install-deps-from=flathub --arch=x86_64 --default-branch=test --repo=repo builddir org.openchemistry.Avogadro2.yaml - name: Create bundle run: flatpak build-bundle repo Avogadro2.flatpak org.openchemistry.Avogadro2 test From 84ed40c0adc50dda0341026d6994ed8c2d55d106 Mon Sep 17 00:00:00 2001 From: "Matthew J. Milner" Date: Sun, 17 Nov 2024 00:11:47 +0100 Subject: [PATCH 4/4] Turn off radpidjson tests etc., build in debug mode Signed-off-by: Matthew J. Milner --- flatpak/org.openchemistry.Avogadro2.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/flatpak/org.openchemistry.Avogadro2.yaml b/flatpak/org.openchemistry.Avogadro2.yaml index 2432abb7..ebc9ae27 100644 --- a/flatpak/org.openchemistry.Avogadro2.yaml +++ b/flatpak/org.openchemistry.Avogadro2.yaml @@ -23,6 +23,10 @@ modules: - name: rapidjson buildsystem: cmake-ninja builddir: true + config-opts: + - -DRAPIDJSON_BUILD_DOC=OFF + - -DRAPIDJSON_BUILD_EXAMPLES=OFF + - -DRAPIDJSON_BUILD_TESTS=OFF sources: - type: git url: https://github.com/Tencent/rapidjson.git @@ -37,7 +41,7 @@ modules: no-make-install: true # Superbuild doesn't have `install` command defined config-opts: # Match GitHub builds as much as possible, which generally means using defaults - - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_BUILD_TYPE=Debug - -DUSE_VTK=ON - -DBUILD_GPL_PLUGINS=ON - -DBUILD_MOLEQUEUE=OFF