From a11257ee107b0f89592fda2eb6de7522098b442b Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Mon, 16 Nov 2020 18:58:13 +0200 Subject: [PATCH 1/2] fix: rename megasync.desktop to conventional desktop-id scheme https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-launchable --- .../linux/data/{megasync.desktop => nz.mega.MEGAsync.desktop} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/MEGASync/platform/linux/data/{megasync.desktop => nz.mega.MEGAsync.desktop} (100%) diff --git a/src/MEGASync/platform/linux/data/megasync.desktop b/src/MEGASync/platform/linux/data/nz.mega.MEGAsync.desktop similarity index 100% rename from src/MEGASync/platform/linux/data/megasync.desktop rename to src/MEGASync/platform/linux/data/nz.mega.MEGAsync.desktop From eb6f58034c1167ddd36b6f5726368f2b5a6eea3c Mon Sep 17 00:00:00 2001 From: Artem Polishchuk Date: Mon, 16 Nov 2020 19:24:45 +0200 Subject: [PATCH 2/2] fix: rename megasync.desktop to UUID scheme across all project --- build/templates/MEGAsync.debug/megasync-debug.spec | 6 +++--- build/templates/MEGAsync/megasync.spec | 2 +- src/MEGASync/platform/linux/LinuxPlatform.cpp | 4 ++-- src/MEGASync/platform/platform.pri | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/build/templates/MEGAsync.debug/megasync-debug.spec b/build/templates/MEGAsync.debug/megasync-debug.spec index ce9a8db266..e3ff9b9441 100644 --- a/build/templates/MEGAsync.debug/megasync-debug.spec +++ b/build/templates/MEGAsync.debug/megasync-debug.spec @@ -70,7 +70,7 @@ make %install make install DESTDIR=%{buildroot}%{_bindir} #mkdir -p %{buildroot}%{_datadir}/applications -#%{__install} MEGAsync/platform/linux/data/megasync.desktop -D %{buildroot}%{_datadir}/applications +#%{__install} MEGAsync/platform/linux/data/nz.mega.MEGAsync.desktop -D %{buildroot}%{_datadir}/applications %if 0%{?suse_version} %suse_update_desktop_file -n -i megasync Network System @@ -78,7 +78,7 @@ make install DESTDIR=%{buildroot}%{_bindir} desktop-file-install \ --add-category="Network" \ --dir %{buildroot}%{_datadir}/applications \ -%{buildroot}%{_datadir}/applications/megasync.desktop +%{buildroot}%{_datadir}/applications/nz.mega.MEGAsync.desktop %endif %post @@ -232,7 +232,7 @@ killall megasync 2> /dev/null || true %files %defattr(-,root,root) %{_bindir}/%{name} -%{_datadir}/applications/megasync.desktop +%{_datadir}/applications/nz.mega.MEGAsync.desktop %{_datadir}/icons/hicolor/*/apps/mega.png %{_datadir}/icons/hicolor/*/*/mega.png diff --git a/build/templates/MEGAsync/megasync.spec b/build/templates/MEGAsync/megasync.spec index 41155c661a..e82165dd8f 100644 --- a/build/templates/MEGAsync/megasync.spec +++ b/build/templates/MEGAsync/megasync.spec @@ -502,7 +502,7 @@ killall -s SIGUSR2 megasync 2> /dev/null || true %files %defattr(-,root,root) %{_bindir}/%{name} -%{_datadir}/applications/megasync.desktop +%{_datadir}/applications/nz.mega.MEGAsync.desktop %{_datadir}/icons/hicolor/*/*/mega.png %{_datadir}/icons/hicolor/*/*/* %{_datadir}/icons/*/*/*/* diff --git a/src/MEGASync/platform/linux/LinuxPlatform.cpp b/src/MEGASync/platform/linux/LinuxPlatform.cpp index 5f9e71705d..1e1aceaf15 100644 --- a/src/MEGASync/platform/linux/LinuxPlatform.cpp +++ b/src/MEGASync/platform/linux/LinuxPlatform.cpp @@ -23,7 +23,7 @@ NotifyServer *LinuxPlatform::notify_server = NULL; static QString autostart_dir = QDir::homePath() + QString::fromAscii("/.config/autostart/"); -QString LinuxPlatform::desktop_file = autostart_dir + QString::fromAscii("megasync.desktop"); +QString LinuxPlatform::desktop_file = autostart_dir + QString::fromAscii("nz.mega.MEGAsync.desktop"); QString LinuxPlatform::set_icon = QString::fromUtf8("gvfs-set-attribute -t string \"%1\" metadata::custom-icon file://%2"); QString LinuxPlatform::remove_icon = QString::fromUtf8("gvfs-set-attribute -t unset \"%1\" metadata::custom-icon"); QString LinuxPlatform::custom_icon = QString::fromUtf8("/usr/share/icons/hicolor/256x256/apps/mega.png"); @@ -73,7 +73,7 @@ bool LinuxPlatform::startOnStartup(bool value) return false; } } - QString app_desktop = QString::fromAscii("/usr/share/applications/megasync.desktop"); + QString app_desktop = QString::fromAscii("/usr/share/applications/nz.mega.MEGAsync.desktop"); if (QFile(app_desktop).exists()) { return QFile::copy(app_desktop, desktop_file); diff --git a/src/MEGASync/platform/platform.pri b/src/MEGASync/platform/platform.pri index 1864f41e3f..9f5fba3e74 100644 --- a/src/MEGASync/platform/platform.pri +++ b/src/MEGASync/platform/platform.pri @@ -64,7 +64,7 @@ unix:!macx { # desktop desktop.path = $$DESKTOP_DESTDIR/share/applications - desktop.files = $$PWD/linux/data/megasync.desktop + desktop.files = $$PWD/linux/data/nz.mega.MEGAsync.desktop desktop.commands = update-desktop-database &> /dev/null || true INSTALLS += desktop