diff --git a/.github/workflows/Linux-pack.yml b/.github/workflows/Linux-pack.yml index 5155df7d..48e03595 100644 --- a/.github/workflows/Linux-pack.yml +++ b/.github/workflows/Linux-pack.yml @@ -366,7 +366,7 @@ jobs: cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr make -j$(nproc) DESTDIR=${APPIMAGE_DST_PATH} install - $GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/flameshot.desktop + $GITHUB_WORKSPACE/appimagetool -s deploy ${APPIMAGE_DST_PATH}/usr/share/applications/org.flameshot.Flameshot.desktop mkdir -p ${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts cp \ @@ -374,7 +374,7 @@ jobs: ${APPIMAGE_DST_PATH}/usr/plugins/platforminputcontexts/ cp \ - $GITHUB_WORKSPACE/data/img/app/flameshot.png \ + $GITHUB_WORKSPACE/data/img/app/org.flameshot.Flameshot.png \ ${APPIMAGE_DST_PATH}/ rm ${APPIMAGE_DST_PATH}/lib/x86_64-linux-gnu/libxcb-glx.so.0 @@ -438,21 +438,21 @@ jobs: flatpak install -y --noninteractive flathub org.kde.Sdk//5.15 org.kde.Platform//5.15 - name: Packaging flatpak run: | - BUNDLE="org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak" - MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.flameshot.yml + BUNDLE="org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak" + MANIFEST_PATH=$GITHUB_WORKSPACE/data/flatpak/org.flameshot.Flameshot.yml RUNTIME_REPO="https://flathub.org/repo/flathub.flatpakrepo" - APP_ID="org.flameshot.flameshot" + APP_ID="org.flameshot.Flameshot" BRANCH="master" flatpak-builder --user --disable-rofiles-fuse --repo=repo --force-clean flatpak_app ${MANIFEST_PATH} --install-deps-from=flathub flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} - mv $GITHUB_WORKSPACE/org.flameshot.flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak + mv $GITHUB_WORKSPACE/org.flameshot.Flameshot_${VERSION}_${ARCH}.flatpak $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak - name: SHA256Sum of flatpak package(daily build) run: | - sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak - sha256sum $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum + sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak + sha256sum $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak > $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum echo "================flatpak sha256sum download link====================" - echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.flameshot-${VERSION}.${ARCH}.flatpak.sha256sum) + echo $(sh $GITHUB_WORKSPACE/scripts/upload_services/${UPLOAD_SERVICE}.sh $GITHUB_WORKSPACE/org.flameshot.Flameshot-${VERSION}.${ARCH}.flatpak.sha256sum) echo "========no operation for you can see link in the log console=======" - name: Upload flatpak package(daily build) run: | @@ -464,8 +464,8 @@ jobs: with: name: Linux-distribution-artifact path: | - ${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak - ${{ github.workspace }}/org.flameshot.flameshot-*.${{ env.ARCH }}.flatpak.sha256sum + ${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak + ${{ github.workspace }}/org.flameshot.Flameshot-*.${{ env.ARCH }}.flatpak.sha256sum snap-pack: name: snap diff --git a/data/flatpak/org.flameshot.flameshot.yml b/data/flatpak/org.flameshot.Flameshot.yml similarity index 86% rename from data/flatpak/org.flameshot.flameshot.yml rename to data/flatpak/org.flameshot.Flameshot.yml index e5d9c57b..cf246772 100644 --- a/data/flatpak/org.flameshot.flameshot.yml +++ b/data/flatpak/org.flameshot.Flameshot.yml @@ -1,4 +1,4 @@ -app-id: org.flameshot.flameshot +app-id: org.flameshot.Flameshot runtime: org.kde.Platform runtime-version: '5.15' sdk: org.kde.Sdk @@ -20,7 +20,8 @@ finish-args: - --talk-name=org.freedesktop.Notifications # System Tray Icon - --talk-name=org.kde.StatusNotifierWatcher - - --own-name=org.kde.StatusNotifierItem-2-1 + - --own-name=org.kde.* + - --own-name=org.flameshot.Flameshot modules: - name: flameshot buildsystem: cmake-ninja @@ -29,4 +30,4 @@ modules: sources: - type: git url: https://github.com/flameshot-org/flameshot.git - branch: master + branch: master diff --git a/data/graphics.qrc b/data/graphics.qrc index eb4b2cb8..971b9fd5 100644 --- a/data/graphics.qrc +++ b/data/graphics.qrc @@ -1,7 +1,7 @@ - img/app/flameshot.svg - img/app/flameshot.png + img/app/org.flameshot.Flameshot.svg + img/app/org.flameshot.Flameshot.png img/material/black/undo-variant.svg img/material/black/text.svg img/material/black/square.svg diff --git a/data/img/app/flameshot.png b/data/img/app/org.flameshot.Flameshot.png similarity index 100% rename from data/img/app/flameshot.png rename to data/img/app/org.flameshot.Flameshot.png diff --git a/data/img/app/flameshot.svg b/data/img/app/org.flameshot.Flameshot.svg similarity index 100% rename from data/img/app/flameshot.svg rename to data/img/app/org.flameshot.Flameshot.svg diff --git a/data/img/hicolor/128x128/apps/flameshot.png b/data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png similarity index 100% rename from data/img/hicolor/128x128/apps/flameshot.png rename to data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png diff --git a/data/img/hicolor/48x48/apps/flameshot.png b/data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png similarity index 100% rename from data/img/hicolor/48x48/apps/flameshot.png rename to data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png diff --git a/data/img/hicolor/scalable/apps/flameshot.svg b/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg similarity index 100% rename from data/img/hicolor/scalable/apps/flameshot.svg rename to data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg diff --git a/data/rpm/flameshot.spec b/data/rpm/flameshot.spec index 7fa9439d..8acab0b3 100644 --- a/data/rpm/flameshot.spec +++ b/data/rpm/flameshot.spec @@ -71,7 +71,7 @@ make %{?_smp_mflags} %if 0%{?is_opensuse} %if 0%{?suse_version} >= 1500 -%suse_update_desktop_file %{name} Graphics +%suse_update_desktop_file org.flameshot.Flameshot Graphics %endif %endif @@ -87,9 +87,9 @@ make %{?_smp_mflags} %{_datadir}/%{name} %{_datadir}/dbus-1/interfaces/org.flameshot.Flameshot.xml %{_datadir}/dbus-1/services/org.flameshot.Flameshot.service -%{_datadir}/metainfo/flameshot.metainfo.xml +%{_datadir}/metainfo/org.flameshot.Flameshot.metainfo.xml %{_datadir}/flameshot/translations -%{_datadir}/applications/%{name}.desktop +%{_datadir}/applications/org.flameshot.Flameshot.desktop %{_datadir}/bash-completion/completions/%{name} %{_datadir}/zsh/site-functions/_%{name} %{_datadir}/icons/hicolor diff --git a/data/snap/snapcraft.yaml b/data/snap/snapcraft.yaml index 9c372cb1..a737fc9b 100644 --- a/data/snap/snapcraft.yaml +++ b/data/snap/snapcraft.yaml @@ -21,7 +21,7 @@ architectures: apps: flameshot: command: flameshot - desktop: usr/share/applications/flameshot.desktop + desktop: usr/share/applications/org.flameshot.Flameshot.desktop extensions: - kde-neon environment: @@ -62,9 +62,9 @@ parts: override-build: | snapcraftctl build # Correct the Icon path - sed -i 's|^Exec=flameshot|Exec=/snap/bin/flameshot.flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop - sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop - sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/flameshot.desktop + sed -i 's|^Exec=flameshot|Exec=/snap/bin/org.flameshot.Flameshot|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's|^Icon=.*|Icon=${SNAP}/usr/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg|' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop + sed -i 's/^\(Name\(\[.\+\]\)\?=.*\)$/\1 (Snappy Edition)/g' ${SNAPCRAFT_PART_INSTALL}/usr/share/applications/org.flameshot.Flameshot.desktop build-packages: - g++ - make diff --git a/docs/appdata/flameshot.metainfo.xml b/docs/appdata/org.flameshot.Flameshot.metainfo.xml similarity index 91% rename from docs/appdata/flameshot.metainfo.xml rename to docs/appdata/org.flameshot.Flameshot.metainfo.xml index 3f413f17..973680f5 100644 --- a/docs/appdata/flameshot.metainfo.xml +++ b/docs/appdata/org.flameshot.Flameshot.metainfo.xml @@ -1,6 +1,6 @@ - org.flameshot.flameshot + org.flameshot.Flameshot CC0-1.0 GPL-3.0-or-later Flameshot @@ -28,6 +28,6 @@ https://github.com/flameshot-org/flameshot https://github.com/flameshot-org/flameshot/issues/new - flameshot.desktop + org.flameshot.Flameshot.desktop diff --git a/docs/desktopEntry/package/flameshot.desktop b/docs/desktopEntry/package/org.flameshot.Flameshot.desktop similarity index 99% rename from docs/desktopEntry/package/flameshot.desktop rename to docs/desktopEntry/package/org.flameshot.Flameshot.desktop index d6cc9c84..94b78fb5 100644 --- a/docs/desktopEntry/package/flameshot.desktop +++ b/docs/desktopEntry/package/org.flameshot.Flameshot.desktop @@ -29,7 +29,7 @@ Keywords[ja]=flameshot;screenshot;capture;shutter;スクリーンショット; Keywords[es]=flameshot;screenshot;capture;shutter;captura; Keywords[de]=flameshot;screenshot;Bildschirmfoto;Aufnahme; Exec=flameshot -Icon=flameshot +Icon=org.flameshot.Flameshot Terminal=false Type=Application Categories=Graphics; diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 71a925a4..8ca41c96 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -143,11 +143,11 @@ install( RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) # Install desktop files, completion and dbus files -configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/flameshot.desktop - ${CMAKE_CURRENT_BINARY_DIR}/share/applications/flameshot.desktop COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/docs/desktopEntry/package/org.flameshot.Flameshot.desktop + ${CMAKE_CURRENT_BINARY_DIR}/share/applications/org.flameshot.Flameshot.desktop COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/docs/appdata/flameshot.metainfo.xml - ${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/flameshot.metainfo.xml COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/docs/appdata/org.flameshot.Flameshot.metainfo.xml + ${CMAKE_CURRENT_BINARY_DIR}/share/metainfo/org.flameshot.Flameshot.metainfo.xml COPYONLY) configure_file(${CMAKE_SOURCE_DIR}/docs/shell-completion/flameshot ${CMAKE_CURRENT_BINARY_DIR}/share/bash-completion/completions/flameshot COPYONLY) @@ -162,14 +162,14 @@ configure_file(${CMAKE_SOURCE_DIR}/data/dbus/org.flameshot.Flameshot.service.in ${CMAKE_CURRENT_BINARY_DIR}/share/dbus-1/services/org.flameshot.Flameshot.service) # Install Icons -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/flameshot.png - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/flameshot.png COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/48x48/apps/org.flameshot.Flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/48x48/apps/org.flameshot.Flameshot.png COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/flameshot.png - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/flameshot.png COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/128x128/apps/org.flameshot.Flameshot.png + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/128x128/apps/org.flameshot.Flameshot.png COPYONLY) -configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/flameshot.svg - ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/flameshot.svg COPYONLY) +configure_file(${CMAKE_SOURCE_DIR}/data/img/hicolor/scalable/apps/org.flameshot.Flameshot.svg + ${CMAKE_CURRENT_BINARY_DIR}/share/icons/hicolor/scalable/apps/org.flameshot.Flameshot.svg COPYONLY) # Install assets install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/share/ DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}) diff --git a/src/core/controller.cpp b/src/core/controller.cpp index b0cf0b3d..2f341694 100644 --- a/src/core/controller.cpp +++ b/src/core/controller.cpp @@ -224,8 +224,8 @@ void Controller::enableTrayIcon() m_trayIcon = new QSystemTrayIcon(); m_trayIcon->setToolTip(QStringLiteral("Flameshot")); m_trayIcon->setContextMenu(trayIconMenu); - QIcon trayicon = - QIcon::fromTheme("flameshot-tray", QIcon(":img/app/flameshot.png")); + QIcon trayicon = QIcon::fromTheme( + "flameshot-tray", QIcon(":img/app/org.flameshot.Flameshot.png")); m_trayIcon->setIcon(trayicon); auto trayIconActivated = [this](QSystemTrayIcon::ActivationReason r) { @@ -260,7 +260,7 @@ void Controller::sendTrayNotification(const QString& text, { if (m_trayIcon) { m_trayIcon->showMessage( - title, text, QIcon(":img/app/flameshot.svg"), timeout); + title, text, QIcon(":img/app/org.flameshot.Flameshot.svg"), timeout); } }