diff --git a/.github/workflows/build-flatpak.yml b/.github/workflows/build-flatpak.yml new file mode 100644 index 0000000000..72068f16d3 --- /dev/null +++ b/.github/workflows/build-flatpak.yml @@ -0,0 +1,41 @@ +name: Flatpak Builder + +on: + workflow_dispatch: + +env: + FLATPAK_ID: eu.opencloud.OpenCloudDesktop + +jobs: + # from https://github.com/flatpak/flatpak-github-actions + # this builds the flatpak for testing purposes + # flathub builds from source once submitted: https://docs.flathub.org/docs/for-app-authors/requirements + # alternatively, flatpak/flatpak-github-actions/flat-manager@v6 can be used for deploying to custom flatpak repo + flatpak: + name: "Flatpak" + container: + image: ghcr.io/flathub-infra/flatpak-github-actions:kde-6.9 + options: --privileged + strategy: + matrix: + variant: + - arch: x86_64 + runner: ubuntu-24.04 + - arch: aarch64 + runner: ubuntu-24.04-arm + runs-on: ${{ matrix.variant.runner }} + steps: + - uses: actions/checkout@v6 + - name: Download libsecret only + run: | + git clone --filter=blob:none --no-checkout --depth 1 https://github.com/flathub/shared-modules + cd shared-modules + git sparse-checkout set libsecret + git checkout + - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 + with: + bundle: ${{ env.FLATPAK_ID }}.flatpak + manifest-path: ${{ env.FLATPAK_ID }}.yml + cache-key: flatpak-builder-${{ github.sha }} + arch: ${{ matrix.variant.arch }} + verbose: true diff --git a/.github/workflows/publish-flathub.yml b/.github/workflows/publish-flathub.yml new file mode 100644 index 0000000000..2874074c43 --- /dev/null +++ b/.github/workflows/publish-flathub.yml @@ -0,0 +1,49 @@ +name: Publish to Flathub + +on: + release: + types: [published] + workflow_dispatch: + +permissions: + contents: read + +env: + FLATPAK_ID: eu.opencloud.OpenCloudDesktop + +jobs: + publish: + name: "Update Flathub" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + + - name: Get version from metainfo + id: version + run: | + VERSION=$(grep -oP '> "$GITHUB_OUTPUT" + + - name: Checkout Flathub repo + uses: actions/checkout@v6 + with: + repository: flathub/${{ env.FLATPAK_ID }} + token: ${{ secrets.FLATHUB_TOKEN }} + path: flathub + + - name: Copy updated files + run: | + cp ${{ env.FLATPAK_ID }}.metainfo.xml flathub/ + cp ${{ env.FLATPAK_ID }}.yml flathub/ + + - name: Create Pull Request to Flathub + uses: peter-evans/create-pull-request@v7 + with: + token: ${{ secrets.FLATHUB_TOKEN }} + path: flathub + title: "Update to ${{ steps.version.outputs.version }}" + body: | + Automated update to [v${{ steps.version.outputs.version }}](https://github.com/opencloud-eu/desktop/releases/tag/v${{ steps.version.outputs.version }}). + branch: update-${{ steps.version.outputs.version }} + commit-message: "Update to ${{ steps.version.outputs.version }}" + delete-branch: true diff --git a/.github/workflows/update-flatpak.yml b/.github/workflows/update-flatpak.yml new file mode 100644 index 0000000000..623da74487 --- /dev/null +++ b/.github/workflows/update-flatpak.yml @@ -0,0 +1,73 @@ +name: Update Flatpak + +on: + push: + branches: + - main + paths: + - VERSION.cmake + workflow_dispatch: + +permissions: + contents: write + +env: + FLATPAK_ID: eu.opencloud.OpenCloudDesktop + +jobs: + update: + name: "Update Flatpak files" + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v6 + + - name: Read version from VERSION.cmake + id: release + run: | + MAJOR=$(grep 'MIRALL_VERSION_MAJOR' VERSION.cmake | grep -oP '\d+') + MINOR=$(grep 'MIRALL_VERSION_MINOR' VERSION.cmake | grep -oP '\d+') + PATCH=$(grep 'MIRALL_VERSION_PATCH' VERSION.cmake | grep -oP '\d+') + + VERSION="${MAJOR}.${MINOR}.${PATCH}" + TAG="v${VERSION}" + DATE=$(date +%Y-%m-%d) + COMMIT="${{ github.sha }}" + + echo "tag=$TAG" >> "$GITHUB_OUTPUT" + echo "version=$VERSION" >> "$GITHUB_OUTPUT" + echo "date=$DATE" >> "$GITHUB_OUTPUT" + echo "commit=$COMMIT" >> "$GITHUB_OUTPUT" + + echo "## Release info" >> "$GITHUB_STEP_SUMMARY" + echo "Tag: \`$TAG\`" >> "$GITHUB_STEP_SUMMARY" + echo "Version: \`$VERSION\`" >> "$GITHUB_STEP_SUMMARY" + echo "Date: \`$DATE\`" >> "$GITHUB_STEP_SUMMARY" + echo "Commit: \`$COMMIT\`" >> "$GITHUB_STEP_SUMMARY" + + - name: Update metainfo.xml + run: | + sed -i \ + -e 's|||' \ + ${{ env.FLATPAK_ID }}.metainfo.xml + + echo "Updated ${{ env.FLATPAK_ID }}.metainfo.xml:" + grep ' + + eu.opencloud.OpenCloudDesktop + Opencloud Desktop Client + GPL-2.0+ + Sync and collaborate on your desktop or laptop + CC0-1.0 + + Heinlein Group + + +

The OpenCloud desktop client keeps photos and documents always up to date, enabling you to work like you always did. +Any file you add, modify or delete in the synced folders on your desktop or laptop will show up, change or disappear on the server and all other connected devices.

+
+ eu.opencloud.OpenCloudDesktop + + Network + Utility + + eu.opencloud.OpenCloudDesktop.desktop + + + The options dialog + https://opencloud.eu/sites/default/files/styles/416x233/public/2025-01/OpenCloud_Filesharing_Desktop_mobil_Hauptscreen.webp + + + + #0082c9 + #0082c9 + + https://opencloud.eu + https://github.com/opencloud-eu/desktop/issues + https://docs.opencloud.eu/docs/user/intro/ + https://github.com/opencloud-eu/desktop + + + + + + +
diff --git a/eu.opencloud.OpenCloudDesktop.yml b/eu.opencloud.OpenCloudDesktop.yml new file mode 100644 index 0000000000..70e8ba3afb --- /dev/null +++ b/eu.opencloud.OpenCloudDesktop.yml @@ -0,0 +1,130 @@ +app-id: eu.opencloud.OpenCloudDesktop + +runtime: org.kde.Platform +runtime-version: "6.9" +sdk: org.kde.Sdk + +base: io.qt.qtwebengine.BaseApp +base-version: "6.9" + +command: opencloud + +finish-args: + - --device=dri + - --socket=wayland + - --socket=fallback-x11 + - --share=network + - --share=ipc + - --filesystem=home:rw + - --filesystem=xdg-run/opencloud:create + - --talk-name=org.freedesktop.Notifications + - --talk-name=org.freedesktop.secrets + - --talk-name=org.kde.StatusNotifierWatcher + - --own-name=eu.opencloud.OpenCloudDesktop + - --talk-name=org.kde.kwalletd5 + - --talk-name=org.kde.kwalletd6 + - --env=TMPDIR=/var/tmp + +cleanup: + - /lib/*.a + - /lib/*.la + - /lib/x86_64-linux-gnu/pkgconfig + - /share/doc + - /share/icons/hicolor/1024x1024 +cleanup-commands: + - /app/cleanup-BaseApp.sh + +modules: + - shared-modules/libsecret/libsecret.json + + - name: qtkeychain + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_TRANSLATIONS=NO + - -DBUILD_WITH_QT6=1 + cleanup: + - /include + - /mkspecs + - /lib/cmake + sources: + - type: archive + url: https://github.com/frankosterfeld/qtkeychain/archive/0.15.0.tar.gz + sha256: f4254dc8f0933b06d90672d683eab08ef770acd8336e44dfa030ce041dc2ca22 + x-checker-data: + type: anitya + url-template: https://github.com/frankosterfeld/qtkeychain/archive/$version.tar.gz + stable-only: true + project-id: 4138 + + - name: rsvg-convert-shim + buildsystem: simple + build-commands: + - ln -s /usr/bin/rsvg-convert /app/bin/inkscape + cleanup: + - "*" + + - name: libp11 + config-opts: + - --with-enginesdir=${FLATPAK_DEST}/lib/engines-3/ + - --with-modulesdir=${FLATPAK_DEST}/lib/ossl-modules/ + cleanup: + - /include + sources: + - type: archive + url: https://github.com/OpenSC/libp11/releases/download/libp11-0.4.16/libp11-0.4.16.tar.gz + sha256: 97777640492fa9e5831497e5892e291dfbf39a7b119d9cb6abb3ec8c56d17553 + + - name: libre-graph-api + buildsystem: cmake + subdir: client + config-opts: + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_SHARED_LIBS=ON + sources: + - type: git + url: https://github.com/opencloud-eu/libre-graph-api-cpp-qt-client.git + tag: v1.0.7 + commit: 72b89ddd9a5dab2a837d1ab078d6088fa0727695 + + - name: kdsingleapplication + buildsystem: cmake + config-opts: + - -DCMAKE_INSTALL_LIBDIR=lib + - -DBUILD_TRANSLATIONS=NO + - -DBUILD_WITH_QT6=1 + sources: + - type: git + url: https://github.com/KDAB/KDSingleApplication.git + tag: v1.2.0 + commit: 3186a158f8e6565e89f5983b4028c892737844ff + + - name: opencloud-desktop + buildsystem: cmake-ninja + config-opts: + - -DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_LIBDIR=lib + - -DNO_SHIBBOLETH=1 + - -DBUILD_SHELL_INTEGRATION_DOLPHIN=0 + - -DBUILD_SHELL_INTEGRATION_NAUTILUS=0 + - -DBUILD_UPDATER=OFF + - -DPLUGIN_INSTALL_DIR=/app/lib/plugins + - -DPLUGINDIR=/app/lib/plugins + - -DQT_MAJOR_VERSION=6 + cleanup: + - /include + post-install: + - install -Dm644 -t /app/share/metainfo eu.opencloud.OpenCloudDesktop.metainfo.xml + sources: + - type: git + url: https://github.com/opencloud-eu/desktop + tag: v3.0.3 + commit: 72fe8fb78e3e8b7dc9d2e54dfb497660e729cec3 + x-checker-data: + type: json + url: https://api.github.com/repos/opencloud-eu/desktop/releases/latest + tag-query: .tag_name + version-query: $tag | sub("^[vV]"; "") + timestamp-query: .published_at + - type: file + path: eu.opencloud.OpenCloudDesktop.metainfo.xml diff --git a/opencloud.desktop.in b/opencloud.desktop.in index 8137aa0213..d5c4dfb523 100644 --- a/opencloud.desktop.in +++ b/opencloud.desktop.in @@ -2,8 +2,8 @@ Categories=Utility;X-SuSE-SyncUtility; Type=Application Exec=@APPLICATION_EXECUTABLE@ --showsettings -Name=@APPLICATION_NAME@ desktop sync client -Comment=@APPLICATION_NAME@ desktop synchronization client +Name=@APPLICATION_NAME@ +Comment=Desktop synchronization client GenericName=Folder Sync Icon=@APPLICATION_ICON_NAME@ Keywords=@APPLICATION_NAME@;syncing;file;sharing; diff --git a/shell_integration/MacOSX/OpenCloudFinderExtension/FinderSyncExt/FinderSync.m b/shell_integration/MacOSX/OpenCloudFinderExtension/FinderSyncExt/FinderSync.m index b769343875..59e877eff4 100644 --- a/shell_integration/MacOSX/OpenCloudFinderExtension/FinderSyncExt/FinderSync.m +++ b/shell_integration/MacOSX/OpenCloudFinderExtension/FinderSyncExt/FinderSync.m @@ -48,7 +48,7 @@ - (instancetype)init // - Be prefixed with the code signing Team ID // - Then infixed with the sandbox App Group // - The App Group itself must be a prefix of (or equal to) the application bundle identifier - // We end up in the official signed client with: 9B5WD74GWJ.eu.opencloud.desktop.socketApi + // We end up in the official signed client with: 9B5WD74GWJ.eu.opencloud.OpenCloudDesktop.socketApi // With ad-hoc signing (the '-' signing identity) we must drop the Team ID. // When the code isn't sandboxed (e.g. the OC client or the legacy overlay icon extension) // the OS doesn't seem to put any restriction on the port name, so we just follow what diff --git a/shell_integration/MacOSX/OpenCloudFinderExtension/OpenCloudFinderExtension.xcodeproj/project.pbxproj b/shell_integration/MacOSX/OpenCloudFinderExtension/OpenCloudFinderExtension.xcodeproj/project.pbxproj index b08d5da3b3..cf3b840d23 100644 --- a/shell_integration/MacOSX/OpenCloudFinderExtension/OpenCloudFinderExtension.xcodeproj/project.pbxproj +++ b/shell_integration/MacOSX/OpenCloudFinderExtension/OpenCloudFinderExtension.xcodeproj/project.pbxproj @@ -438,7 +438,7 @@ MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; OC_APPLICATION_NAME = OpenCloud; - OC_APPLICATION_REV_DOMAIN = eu.opencloud.desktop; + OC_APPLICATION_REV_DOMAIN = eu.opencloud.OpenCloudDesktop; OC_OEM_SHARE_ICNS = ""; OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = ""; ONLY_ACTIVE_ARCH = YES; @@ -486,8 +486,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @executable_path/../../../../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; - OC_APPLICATION_NAME = OpenClud; - OC_APPLICATION_REV_DOMAIN = eu.opencloud.desktop; + OC_APPLICATION_NAME = OpenCloud; + OC_APPLICATION_REV_DOMAIN = eu.opencloud.OpenCloudDesktop; OC_OEM_SHARE_ICNS = ""; OC_SOCKETAPI_TEAM_IDENTIFIER_PREFIX = ""; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/src/cmd/CMakeLists.txt b/src/cmd/CMakeLists.txt index 8f63693cef..57d7602cb0 100644 --- a/src/cmd/CMakeLists.txt +++ b/src/cmd/CMakeLists.txt @@ -16,6 +16,9 @@ else() endif() if(UNIX AND NOT APPLE) - configure_file(${CMAKE_SOURCE_DIR}/opencloud.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}cmd.desktop) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}cmd.desktop DESTINATION ${KDE_INSTALL_DATADIR}/applications) + set(_saved_icon_name "${APPLICATION_ICON_NAME}") + set(APPLICATION_ICON_NAME "${APPLICATION_REV_DOMAIN}") + configure_file(${CMAKE_SOURCE_DIR}/opencloud.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}-cmd.desktop) + set(APPLICATION_ICON_NAME "${_saved_icon_name}") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}-cmd.desktop DESTINATION ${KDE_INSTALL_DATADIR}/applications) endif() diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 6f53259813..f3d6e9206b 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -195,7 +195,7 @@ if(NOT APPLE) foreach(_file ${_icons}) string(REPLACE "${OEM_THEME_DIR}/theme/colored/" "" _res ${_file}) string(REPLACE "-${APPLICATION_ICON_NAME}-icon.png" "" _res ${_res}) - install(FILES ${_file} RENAME ${APPLICATION_ICON_NAME}.png DESTINATION ${KDE_INSTALL_DATADIR}/icons/hicolor/${_res}x${_res}/apps) + install(FILES ${_file} RENAME ${APPLICATION_REV_DOMAIN}.png DESTINATION ${KDE_INSTALL_DATADIR}/icons/hicolor/${_res}x${_res}/apps) endforeach(_file) endif() @@ -214,7 +214,10 @@ install(TARGETS opencloud OpenCloudGui ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) ecm_finalize_qml_module(OpenCloudGui DESTINATION ${KDE_INSTALL_QMLDIR}) if(UNIX AND NOT APPLE) + set(_saved_icon_name "${APPLICATION_ICON_NAME}") + set(APPLICATION_ICON_NAME "${APPLICATION_REV_DOMAIN}") configure_file(${CMAKE_SOURCE_DIR}/opencloud.desktop.in - ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION ${KDE_INSTALL_DATADIR}/applications ) + ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}.desktop) + set(APPLICATION_ICON_NAME "${_saved_icon_name}") + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_REV_DOMAIN}.desktop DESTINATION ${KDE_INSTALL_DATADIR}/applications ) endif() diff --git a/src/gui/guiutility_mac.mm b/src/gui/guiutility_mac.mm index 3016e48794..a84768c43a 100644 --- a/src/gui/guiutility_mac.mm +++ b/src/gui/guiutility_mac.mm @@ -53,8 +53,8 @@ QString Utility::socketApiSocketPath() { // This must match the code signing Team setting of the extension - // Example for developer builds (with ad-hoc signing identity): "" "eu.opencloud.desktop" ".socketApi" - // Example for official signed packages: "9B5WD74GWJ." "eu.opencloud.desktop" ".socketApi" + // Example for developer builds (with ad-hoc signing identity): "" "eu.opencloud.OpenCloudDesktop" ".socketApi" + // Example for official signed packages: "9B5WD74GWJ." "eu.opencloud.OpenCloudDesktop" ".socketApi" return QStringLiteral("%1%2.socketApi").arg(QStringLiteral(SOCKETAPI_TEAM_IDENTIFIER_PREFIX), Theme::instance()->orgDomainName()); } diff --git a/src/gui/updater/CMakeLists.txt b/src/gui/updater/CMakeLists.txt index 71f9ec9ed6..2b2fc7826f 100644 --- a/src/gui/updater/CMakeLists.txt +++ b/src/gui/updater/CMakeLists.txt @@ -1,7 +1,7 @@ if(APPLE) if (SPARKLE_FOUND) list(APPEND OPENCLOUD_BUNDLED_RESOURCES - "${PROJECT_SOURCE_DIR}/admin/osx/deny_autoupdate_eu.opencloud.desktop.plist" + "${PROJECT_SOURCE_DIR}/admin/osx/deny_autoupdate_eu.opencloud.OpenCloudDesktop.plist" "${PROJECT_SOURCE_DIR}/admin/osx/sparkle/dsa_pub.pem") set(OPENCLOUD_BUNDLED_RESOURCES ${OPENCLOUD_BUNDLED_RESOURCES} PARENT_SCOPE) endif() diff --git a/src/gui/updater/sparkleupdater_mac.mm b/src/gui/updater/sparkleupdater_mac.mm index 26d3873b4c..89a4965543 100644 --- a/src/gui/updater/sparkleupdater_mac.mm +++ b/src/gui/updater/sparkleupdater_mac.mm @@ -87,7 +87,7 @@ - (void)updater:(SUUpdater *)updater didFinishLoadingAppcast:(SUAppcast *)appcas DelegateObject *delegate; }; -// Delete ~/Library//Preferences/eu.opencloud.desktop.plist to re-test +// Delete ~/Library//Preferences/eu.opencloud.OpenCloudDesktop.plist to re-test SparkleUpdater::SparkleUpdater(const QUrl& appCastUrl) : Updater() {