From 93a9fca4758ab3387b81384310f0afbf082a6494 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Sat, 3 Jun 2023 00:50:55 +0200 Subject: Try to fix flatpak build and change appid --- .gitlab-ci.yml | 4 +- CMakeLists.txt | 2 +- README.md | 2 +- im.nheko.Nheko.yaml | 237 +++++++++++++++++++++++++++++++++++++++ io.github.NhekoReborn.Nheko.yaml | 236 -------------------------------------- nheko-nightly.flatpakref | 2 +- src/main.cpp | 2 +- 7 files changed, 243 insertions(+), 242 deletions(-) create mode 100644 im.nheko.Nheko.yaml delete mode 100644 io.github.NhekoReborn.Nheko.yaml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3dfc7f59..97e1eaf2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -213,9 +213,9 @@ build-flatpak: - mkdir -p build-flatpak - cd build-flatpak - echo -e "\e[0Ksection_start:`date +%s`:build_flatpak[collapsed=true]\r\e[0K\e[1m\e[95mBuilding flatpak" - - flatpak-builder --install-deps-from=flathub --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for ${ARCH}" app ../io.github.NhekoReborn.Nheko.yaml + - flatpak-builder --install-deps-from=flathub --user --disable-rofiles-fuse --ccache --repo=repo --default-branch=${CI_COMMIT_REF_NAME//\//_} --subject="Build of Nheko ${VERSION} `date` for ${ARCH}" app ../im.nheko.Nheko.yaml - echo -e "\e[0Ksection_end:`date +%s`:build_flatpak\r\e[0K" - - flatpak build-bundle repo nheko-${ARCH}.flatpak io.github.NhekoReborn.Nheko ${CI_COMMIT_REF_NAME//\//_} + - flatpak build-bundle repo nheko-${ARCH}.flatpak im.nheko.Nheko ${CI_COMMIT_REF_NAME//\//_} after_script: - echo -e "\e[0Ksection_start:`date +%s`:upload_flatpak[collapsed=true]\r\e[0K\e[1m\e[95mUploading flatpak" - bash ./.ci/upload-nightly-gitlab.sh build-flatpak/nheko-${ARCH}.flatpak diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c7c17e2..ae91ae95 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -799,7 +799,7 @@ endif() if(UNIX AND NOT APPLE) if(FLATPAK) - set(APPID "io.github.NhekoReborn.Nheko") + set(APPID "im.nheko.Nheko") set_target_properties(nheko PROPERTIES OUTPUT_NAME "${APPID}") else() set(APPID "nheko") diff --git a/README.md b/README.md index fc20e0c9..46e6b9a2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ nheko [![Build status](https://ci.appveyor.com/api/projects/status/07qrqbfylsg4hw2h/branch/master?svg=true)](https://ci.appveyor.com/project/redsky17/nheko/branch/master) [![Stable Version](https://img.shields.io/badge/download-stable-green.svg)](https://github.com/Nheko-Reborn/nheko/releases/latest) [![Nightly](https://img.shields.io/badge/download-nightly-green.svg)](https://matrix-static.neko.dev/room/!TshDrgpBNBDmfDeEGN:neko.dev/) -Download Nightly Flatpak +Download Nightly Flatpak [![#nheko-reborn:matrix.org](https://img.shields.io/matrix/nheko-reborn:matrix.org.svg?label=%23nheko-reborn:matrix.org)](https://matrix.to/#/#nheko-reborn:matrix.org) [![Arch package](https://repology.org/badge/version-for-repo/arch/nheko.svg)](https://archlinux.org/packages/community/x86_64/nheko/) Download on Flathub diff --git a/im.nheko.Nheko.yaml b/im.nheko.Nheko.yaml new file mode 100644 index 00000000..f0357d3c --- /dev/null +++ b/im.nheko.Nheko.yaml @@ -0,0 +1,237 @@ +id: im.nheko.Nheko +command: im.nheko.Nheko +runtime: org.kde.Platform +runtime-version: '6.5' +sdk: org.kde.Sdk +finish-args: + - --device=dri + # needed for webcams, see #517 + - --device=all + - --share=ipc + - --share=network + - --socket=pulseaudio + - --socket=wayland + - --socket=x11 + - --talk-name=org.freedesktop.Notifications + - --talk-name=org.freedesktop.secrets + - --talk-name=org.freedesktop.StatusNotifierItem + - --talk-name=org.kde.* + # needed for SingleApplication to work + - --allow=per-app-dev-shm +cleanup: + - /include + - /lib/pkgconfig + - /bin/mdb* + - '*.a' + - /libexec + - /lib/cmake + - /bin/cmark + - /bin/event_rpcgen.py + - /bin/playout + - /bin/secret-tool + - /bin/gst-* + - /share/gdb + - /share/gst* + - /lib/girepository-1.0/ + - /lib/gst-validate-launcher/ + - /lib/gstreamer-1.0/include + - /lib/gstreamer-1.0/include/ + - /lib/gstreamer-1.0/libgstcoreelements.so + - /lib/gstreamer-1.0/libgstopengl* + - /lib/gstreamer-1.0/libgstximagesink.so + - /lib/gstreamer-1.0/validate/ + - /lib/libgst* +modules: + - name: lmdb + sources: + - sha256: 8c5a93ac3cc97427c54571ad5a6140b7469389d01e6d2f43df39f96d3a4ccef7 + type: archive + url: https://git.openldap.org/openldap/openldap/-/archive/LMDB_0.9.30/openldap-LMDB_0.9.30.tar.gz + make-install-args: + - prefix=/app + no-autogen: true + subdir: libraries/liblmdb + - name: libevent + buildsystem: autotools + config-opts: + - --disable-shared + - --prefix=/app + - --disable-openssl + sources: + - sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb + type: archive + url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz + make-install-args: + - prefix=/app + no-autogen: true + - name: cmark + buildsystem: cmake-ninja + builddir: true + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMARK_TESTS=OFF + sources: + - sha256: 6c7d2bcaea1433d977d8fed0b55b71c9d045a7cdf616e3cd2dce9007da753db3 + type: archive + url: https://github.com/commonmark/cmark/archive/0.30.2.tar.gz + - name: spdlog + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DSPDLOG_BUILD_EXAMPLES=0 + - -DSPDLOG_BUILD_BENCH=0 + - -DSPDLOG_BUILD_TESTING=0 + sources: + - sha256: 5197b3147cfcfaa67dd564db7b878e4a4b3d9f3443801722b3915cdeced656cb + type: archive + url: https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz + - config-opts: + - -DCMAKE_BUILD_TYPE=Release + buildsystem: cmake-ninja + name: olm + sources: + - commit: 92769cec711c604a1f682b95d6944578d2a1bb3d + disable-shallow-clone: true + tag: 3.2.12 + type: git + url: https://gitlab.matrix.org/matrix-org/olm.git + - buildsystem: meson + name: libsecret + config-opts: + - -Dmanpage=false + - -Dvapi=false + - -Dgtk_doc=false + - -Dintrospection=false + # https://gitlab.gnome.org/GNOME/libsecret/-/issues/49 + - -Dgcrypt=false + sources: + - commit: 3fe635e64efd4b8dbc9ec3548b0bc8034c7665c4 + tag: 0.20.4 + type: git + url: https://gitlab.gnome.org/GNOME/libsecret.git + #- config-opts: + # - -DCMAKE_BUILD_TYPE=Release + # - -DAVIF_CODEC_AOM=ON + # #- -DBUILD_SHARED_LIBS=OFF + # buildsystem: cmake-ninja + # name: libavif + # sources: + # - sha256: 66e82854ceb84a3e542bc140a343bc90e56c68f3ecb4fff63e636c136ed9a05e + # type: archive + # url: https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.10.1.tar.gz + #- config-opts: + # - -DCMAKE_BUILD_TYPE=Release + # - -DWITH_EXAMPLES=OFF + # #- -DBUILD_SHARED_LIBS=OFF + # buildsystem: cmake-ninja + # name: libheif + # sources: + # - sha256: e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718 + # type: archive + # url: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz + #- config-opts: + # - -DCMAKE_BUILD_TYPE=Release + # - -DKIMAGEFORMATS_HEIF=ON + # buildsystem: cmake-ninja + # name: KImageFormats + # sources: + # - commit: ae6b724824fc2fdf71d50dc7ae0052ad1551b25a + # tag: v5.93.0 + # type: git + # url: https://invent.kde.org/frameworks/kimageformats.git + - config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DBUILD_TEST_APPLICATION=OFF + - -DQTKEYCHAIN_STATIC=ON + - -DBUILD_WITH_QT6=ON + buildsystem: cmake-ninja + name: QtKeychain + sources: + - commit: 69f993c47efed7e557d79a30a367014d9a27d809 + tag: v0.14.1 + type: git + url: https://github.com/frankosterfeld/qtkeychain.git + - config-opts: + - -DJSON_BuildTests=OFF + buildsystem: cmake + name: nlohmann + sources: + - sha256: 1155fd1a83049767360e9a120c43c578145db3204d2b309eba49fbbedd0f4ed3 + type: archive + url: https://github.com/nlohmann/json/archive/v3.10.4.tar.gz + - buildsystem: simple + build-commands: + - make static + - make prefix=/app static-install + name: re2 + sources: + - sha256: f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f + type: archive + url: https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz + - buildsystem: meson + name: gstreamer + sources: + - commit: ecd471f5ea4645102b206a43d863f0f0fe7d04ec + tag: 1.22.3 + type: git + url: https://gitlab.freedesktop.org/gstreamer/gstreamer.git + config-opts: + - --auto-features=disabled + - -Dgood=enabled + - -Dgst-plugins-good:qt6=enabled + - -Dqt6=enabled + - -Dbase=enabled + - -Dgst-plugins-base:gl=enabled + - -Dgst-plugins-base:gl_platform=glx,egl + - -Dgst-plugins-base:gl_winsys=x11,wayland + - -Dgst-plugins-base:x11=enabled + - -Dgst-plugins-base:xshm=enabled + - buildsystem: qmake + name: qt-jdenticon + no-make-install: true + build-commands: + - mkdir -p /app/bin/ + - cp libqtjdenticon.so /app/bin/ + sources: + - commit: 0346c228f1d544581dfd72a4dceb84f8714570dd + tag: v0.3.0 + type: git + url: https://github.com/Nheko-Reborn/qt-jdenticon.git + - buildsystem: meson + config-opts: + - -Ddefault_library=static + name: coeurl + sources: + - commit: 2a20a129240a1a017b37b6874faab499ca4e523b + tag: v0.3.0 + type: git + url: https://nheko.im/nheko-reborn/coeurl.git + - config-opts: + - -DBUILD_LIB_TESTS=OFF + - -DBUILD_LIB_EXAMPLES=OFF + - -DCMAKE_BUILD_TYPE=Release + - -DBUILD_SHARED_LIBS=OFF + buildsystem: cmake-ninja + name: mtxclient + sources: + - commit: f4425af712afc6ad704a39b93c912432bd3c1914 + #tag: v0.9.2 + type: git + url: https://github.com/Nheko-Reborn/mtxclient.git + - config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx + - -DCOMPILE_QML=ON + - -DMAN=OFF + - -DFLATPAK=ON + buildsystem: cmake-ninja + name: nheko + sources: + - path: . + type: dir + skip: + - build-flatpak + - dest: .deps/lmdbxx + sha256: 5e12eb3aefe9050068af7df2c663edabc977ef34c9e7ba7b9d2c43e0ad47d8df + type: archive + url: https://github.com/hoytech/lmdbxx/archive/1.0.0.tar.gz diff --git a/io.github.NhekoReborn.Nheko.yaml b/io.github.NhekoReborn.Nheko.yaml deleted file mode 100644 index 0be3632f..00000000 --- a/io.github.NhekoReborn.Nheko.yaml +++ /dev/null @@ -1,236 +0,0 @@ -id: io.github.NhekoReborn.Nheko -command: io.github.NhekoReborn.Nheko -runtime: org.kde.Platform -runtime-version: '5.15-22.08' -sdk: org.kde.Sdk -finish-args: - - --device=dri - # needed for webcams, see #517 - - --device=all - - --share=ipc - - --share=network - - --socket=pulseaudio - - --socket=wayland - - --socket=x11 - - --talk-name=org.freedesktop.Notifications - - --talk-name=org.freedesktop.secrets - - --talk-name=org.freedesktop.StatusNotifierItem - - --talk-name=org.kde.* - # needed for SingleApplication to work - - --allow=per-app-dev-shm -cleanup: - - /include - - /lib/pkgconfig - - /bin/mdb* - - '*.a' - - /libexec - - /lib/cmake - - /bin/cmark - - /bin/event_rpcgen.py - - /bin/playout - - /bin/secret-tool - - /bin/gst-* - - /share/gdb - - /share/gst* - - /lib/girepository-1.0/ - - /lib/gst-validate-launcher/ - - /lib/gstreamer-1.0/include - - /lib/gstreamer-1.0/include/ - - /lib/gstreamer-1.0/libgstcoreelements.so - - /lib/gstreamer-1.0/libgstopengl* - - /lib/gstreamer-1.0/libgstximagesink.so - - /lib/gstreamer-1.0/validate/ - - /lib/libgst* -modules: - - name: lmdb - sources: - - sha256: f3927859882eb608868c8c31586bb7eb84562a40a6bf5cc3e13b6b564641ea28 - type: archive - url: https://github.com/LMDB/lmdb/archive/LMDB_0.9.22.tar.gz - make-install-args: - - prefix=/app - no-autogen: true - subdir: libraries/liblmdb - - name: libevent - buildsystem: autotools - config-opts: - - --disable-shared - - --prefix=/app - - --disable-openssl - sources: - - sha256: 92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb - type: archive - url: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz - make-install-args: - - prefix=/app - no-autogen: true - - name: cmark - buildsystem: cmake-ninja - builddir: true - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DCMARK_TESTS=OFF - sources: - - sha256: 6c7d2bcaea1433d977d8fed0b55b71c9d045a7cdf616e3cd2dce9007da753db3 - type: archive - url: https://github.com/commonmark/cmark/archive/0.30.2.tar.gz - - name: spdlog - buildsystem: cmake-ninja - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DSPDLOG_BUILD_EXAMPLES=0 - - -DSPDLOG_BUILD_BENCH=0 - - -DSPDLOG_BUILD_TESTING=0 - sources: - - sha256: 5197b3147cfcfaa67dd564db7b878e4a4b3d9f3443801722b3915cdeced656cb - type: archive - url: https://github.com/gabime/spdlog/archive/v1.8.1.tar.gz - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - buildsystem: cmake-ninja - name: olm - sources: - - commit: 92769cec711c604a1f682b95d6944578d2a1bb3d - disable-shallow-clone: true - tag: 3.2.12 - type: git - url: https://gitlab.matrix.org/matrix-org/olm.git - - buildsystem: meson - name: libsecret - config-opts: - - -Dmanpage=false - - -Dvapi=false - - -Dgtk_doc=false - - -Dintrospection=false - # https://gitlab.gnome.org/GNOME/libsecret/-/issues/49 - - -Dgcrypt=false - sources: - - commit: 3fe635e64efd4b8dbc9ec3548b0bc8034c7665c4 - tag: 0.20.4 - type: git - url: https://gitlab.gnome.org/GNOME/libsecret.git - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DAVIF_CODEC_AOM=ON - #- -DBUILD_SHARED_LIBS=OFF - buildsystem: cmake-ninja - name: libavif - sources: - - sha256: 66e82854ceb84a3e542bc140a343bc90e56c68f3ecb4fff63e636c136ed9a05e - type: archive - url: https://github.com/AOMediaCodec/libavif/archive/refs/tags/v0.10.1.tar.gz - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DWITH_EXAMPLES=OFF - #- -DBUILD_SHARED_LIBS=OFF - buildsystem: cmake-ninja - name: libheif - sources: - - sha256: e1ac2abb354fdc8ccdca71363ebad7503ad731c84022cf460837f0839e171718 - type: archive - url: https://github.com/strukturag/libheif/releases/download/v1.12.0/libheif-1.12.0.tar.gz - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DKIMAGEFORMATS_HEIF=ON - buildsystem: cmake-ninja - name: KImageFormats - sources: - - commit: ae6b724824fc2fdf71d50dc7ae0052ad1551b25a - tag: v5.93.0 - type: git - url: https://invent.kde.org/frameworks/kimageformats.git - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DBUILD_TEST_APPLICATION=OFF - - -DQTKEYCHAIN_STATIC=ON - buildsystem: cmake-ninja - name: QtKeychain - sources: - - commit: f59ac26be709fd2d8d7a062fab1cf1e67a93806c - tag: v0.13.1 - type: git - url: https://github.com/frankosterfeld/qtkeychain.git - - config-opts: - - -DJSON_BuildTests=OFF - buildsystem: cmake - name: nlohmann - sources: - - sha256: 1155fd1a83049767360e9a120c43c578145db3204d2b309eba49fbbedd0f4ed3 - type: archive - url: https://github.com/nlohmann/json/archive/v3.10.4.tar.gz - - buildsystem: simple - build-commands: - - make static - - make prefix=/app static-install - name: re2 - sources: - - sha256: f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f - type: archive - url: https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz - - buildsystem: meson - name: gstreamer - sources: - - commit: f7806a854aad960eae3288db4a67a574f92428fe - tag: 1.20.5 - type: git - url: https://gitlab.freedesktop.org/gstreamer/gstreamer.git - config-opts: - - --auto-features=disabled - - -Dgood=enabled - - -Dgst-plugins-good:qt5=enabled - - -Dqt5=enabled - - -Dbase=enabled - - -Dgst-plugins-base:gl=enabled - - -Dgst-plugins-base:gl_platform=glx,egl - - -Dgst-plugins-base:gl_winsys=x11,wayland - - -Dgst-plugins-base:x11=enabled - - -Dgst-plugins-base:xshm=enabled - - buildsystem: qmake - name: qt-jdenticon - no-make-install: true - build-commands: - - mkdir -p /app/bin/ - - cp libqtjdenticon.so /app/bin/ - sources: - - commit: 0346c228f1d544581dfd72a4dceb84f8714570dd - tag: v0.3.0 - type: git - url: https://github.com/Nheko-Reborn/qt-jdenticon.git - - buildsystem: meson - config-opts: - - -Ddefault_library=static - name: coeurl - sources: - - commit: 2a20a129240a1a017b37b6874faab499ca4e523b - tag: v0.3.0 - type: git - url: https://nheko.im/nheko-reborn/coeurl.git - - config-opts: - - -DBUILD_LIB_TESTS=OFF - - -DBUILD_LIB_EXAMPLES=OFF - - -DCMAKE_BUILD_TYPE=Release - - -DBUILD_SHARED_LIBS=OFF - buildsystem: cmake-ninja - name: mtxclient - sources: - - commit: f4425af712afc6ad704a39b93c912432bd3c1914 - #tag: v0.9.2 - type: git - url: https://github.com/Nheko-Reborn/mtxclient.git - - config-opts: - - -DCMAKE_BUILD_TYPE=Release - - -DLMDBXX_INCLUDE_DIR=.deps/lmdbxx - - -DCOMPILE_QML=ON - - -DMAN=OFF - - -DFLATPAK=ON - buildsystem: cmake-ninja - name: nheko - sources: - - path: . - type: dir - skip: - - build-flatpak - - dest: .deps/lmdbxx - sha256: 5e12eb3aefe9050068af7df2c663edabc977ef34c9e7ba7b9d2c43e0ad47d8df - type: archive - url: https://github.com/hoytech/lmdbxx/archive/1.0.0.tar.gz diff --git a/nheko-nightly.flatpakref b/nheko-nightly.flatpakref index 74e47ecd..484b5de0 100644 --- a/nheko-nightly.flatpakref +++ b/nheko-nightly.flatpakref @@ -1,6 +1,6 @@ [Flatpak Ref] Title=Nheko Nightly -Name=io.github.NhekoReborn.Nheko +Name=im.nheko.Nheko Branch=master Url=https://flatpak.neko.dev/repo/nightly SuggestRemoteName=nheko-nightlies diff --git a/src/main.cpp b/src/main.cpp index 1a7843db..951d53f0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -254,7 +254,7 @@ main(int argc, char *argv[]) app.setWindowIcon(QIcon::fromTheme(QStringLiteral("nheko"), QIcon{":/logos/nheko.png"})); #endif #ifdef NHEKO_FLATPAK - app.setDesktopFileName(QStringLiteral("io.github.NhekoReborn.Nheko")); + app.setDesktopFileName(QStringLiteral("im.nheko.Nheko")); #else app.setDesktopFileName(QStringLiteral("nheko")); #endif -- cgit 1.5.1