From: Marco Martin Date: Tue, 14 Mar 2017 11:02:44 +0000 (+0100) Subject: make services GHNS work with store.kde.org X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/db54c9b6ce543bab4f40f725d510e40880bc3a1a make services GHNS work with store.kde.org Summary: point the knsrc providers file to the new kde store, and port the servicemenuinstallation/servicemenudeinstallation scripts to kf5 (they still were based on kde4-config) BUG:376922 Test Plan: downloaded some service menus (send to telegram, convert svg) by the knewstuff ui available in the services page of config dialog they get installed in the proper folder and work, uninstall works Reviewers: #dolphin, emmanuelp Reviewed By: #dolphin, emmanuelp Subscribers: elvisangelaccio Differential Revision: https://phabricator.kde.org/D5035 --- diff --git a/src/settings/services/servicemenu.knsrc b/src/settings/services/servicemenu.knsrc index 7914f7c63..29364430e 100644 --- a/src/settings/services/servicemenu.knsrc +++ b/src/settings/services/servicemenu.knsrc @@ -1,5 +1,6 @@ [KNewStuff2] -ProvidersUrl=http://download.kde.org/khotnewstuff/servicemenu-providers.xml +ProvidersUrl=http://download.kde.org/ocs/providers.xml +Categories=Dolphin Service Menus ChecksumPolicy=ifpossible SignaturePolicy=ifpossible TargetDir=servicemenu-download diff --git a/src/settings/services/servicemenudeinstallation b/src/settings/services/servicemenudeinstallation index 24fd7bf10..5e4234262 100755 --- a/src/settings/services/servicemenudeinstallation +++ b/src/settings/services/servicemenudeinstallation @@ -2,7 +2,7 @@ require 'fileutils' archive = ARGV[0] if archive[(archive.length - 8)..(archive.length)] == ".desktop" - FileUtils.rm(`kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/" + File.basename(archive)) + FileUtils.rm(`qtpaths --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/" + File.basename(archive)) exit(0) end dir = archive + "-dir" diff --git a/src/settings/services/servicemenuinstallation b/src/settings/services/servicemenuinstallation index ac2cf8f1c..36b9debd2 100755 --- a/src/settings/services/servicemenuinstallation +++ b/src/settings/services/servicemenuinstallation @@ -2,7 +2,7 @@ require 'pathname' require 'fileutils' archive = ARGV[0] -$servicedir = `kde4-config --localprefix`.strip! + "share/kde4/services/ServiceMenus/" +$servicedir = `qtpaths --writable-path GenericDataLocation`.strip! + "/kservices5/ServiceMenus/" FileUtils.mkdir_p($servicedir) if !File.exist?($servicedir) if archive[(archive.length - 8)..(archive.length - 1)] == ".desktop" puts "Single-File Service-Menu"