Commit 207a58f0 authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

runners: port to new KRunner metadata system & install location

parent 308a63c9
......@@ -10,7 +10,7 @@ if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
endif()
set(QT_MIN_VERSION 5.12.0)
set(KF5_MIN_VERSION 5.71.0)
set(KF5_MIN_VERSION 5.72.0)
include(FeatureSummary)
......
......@@ -13,6 +13,7 @@ target_link_libraries(kcm_krunner_charrunner
# Now make sure all files get to the right place
add_library(krunner_charrunner MODULE ${krunner_charrunner_SRCS})
kcoreaddons_desktop_to_json(krunner_charrunner plasma-runner-character.desktop )
target_link_libraries(krunner_charrunner
KF5::Runner
KF5::I18n
......@@ -20,5 +21,6 @@ target_link_libraries(krunner_charrunner
add_dependencies(krunner_charrunner kcm_krunner_charrunner)
# Install the library and .desktop file
install(TARGETS krunner_charrunner kcm_krunner_charrunner DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-character.desktop plasma-runner-character_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_charrunner DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
install(TARGETS kcm_krunner_charrunner DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-character_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......@@ -97,6 +97,6 @@ void CharacterRunner::run(const Plasma::RunnerContext &context, const Plasma::Qu
QGuiApplication::clipboard()->setText(match.data().toString());
}
K_EXPORT_PLASMA_RUNNER(CharacterRunner, CharacterRunner)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(CharacterRunner, "plasma-runner-character.json")
#include "charrunner.moc"
......@@ -107,8 +107,6 @@ Comment[zh_CN]=从十六进制码创建特殊字符
Comment[zh_TW]=從它們的十六進位碼建立特殊字元
Type=Service
X-KDE-ServiceTypes=Plasma/Runner
X-KDE-Library=krunner_charrunner
X-KDE-PluginInfo-Author=Anton Kreuzkamp
X-KDE-PluginInfo-Email=akreuzkamp@web.de
X-KDE-PluginInfo-Name=CharacterRunner
......
......@@ -11,10 +11,10 @@ target_link_libraries(krunner_converter_static
)
add_library(krunner_converter MODULE plugin.cpp)
kcoreaddons_desktop_to_json(krunner_converter plasma-runner-converter.desktop )
target_link_libraries(krunner_converter krunner_converter_static)
install(TARGETS krunner_converter DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-converter.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_converter DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
if(BUILD_TESTING)
add_subdirectory(autotests)
......
......@@ -117,7 +117,6 @@ Comment[zh_TW]=將數值轉換不同的單位
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
Icon=accessories-calculator
X-KDE-Library=krunner_converter
X-KDE-PluginInfo-Author=Petri Damstén
X-KDE-PluginInfo-Email=damu@iki.fi
X-KDE-PluginInfo-Name=unitconverter
......
......@@ -18,6 +18,6 @@
#include "converterrunner.h"
K_EXPORT_PLASMA_RUNNER(converterrunner, ConverterRunner)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(ConverterRunner, "plasma-runner-converter.json")
#include "plugin.moc"
......@@ -5,11 +5,11 @@ set(krunner_datetime_SRCS
)
add_library(krunner_datetime MODULE ${krunner_datetime_SRCS})
kcoreaddons_desktop_to_json(krunner_datetime plasma-runner-datetime.desktop )
target_link_libraries(krunner_datetime
KF5::Runner
KF5::KIOWidgets
KF5::I18n
)
install(TARGETS krunner_datetime DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-datetime.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_datetime DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
......@@ -119,7 +119,7 @@ void DateTimeRunner::addMatch(const QString &text, const QString &clipboardText,
context.addMatch(match);
}
K_EXPORT_PLASMA_RUNNER(krunner_datetime, DateTimeRunner)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(DateTimeRunner, "plasma-runner-datetime.json")
#include "datetimerunner.moc"
......@@ -112,7 +112,6 @@ Comment[zh_TW]=目前的日期與時間,可以是任何時區
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
Icon=clock
X-KDE-Library=krunner_datetime
X-KDE-PluginInfo-Author=Plasma Team
X-KDE-PluginInfo-Email=plasma-devel@kde.org
X-KDE-PluginInfo-Name=org.kde.datetime
......
......@@ -4,10 +4,12 @@ set(dictionaryrunner_SRCS dictionaryrunner.cpp dictionarymatchengine.cpp)
set(kcm_dictionaryrunner_SRCS dictionaryrunner_config.cpp)
add_library(krunner_dictionary MODULE ${dictionaryrunner_SRCS})
add_library(kcm_krunner_dictionary MODULE ${kcm_dictionaryrunner_SRCS})
kcoreaddons_desktop_to_json(krunner_dictionary plasma-runner-dictionary.desktop )
target_link_libraries(krunner_dictionary KF5::Runner KF5::I18n)
add_library(kcm_krunner_dictionary MODULE ${kcm_dictionaryrunner_SRCS})
target_link_libraries(kcm_krunner_dictionary KF5::Runner KF5::I18n KF5::KCMUtils)
install(TARGETS krunner_dictionary kcm_krunner_dictionary DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-dictionary.desktop plasma-runner-dictionary_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_dictionary DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
install(TARGETS kcm_krunner_dictionary DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-dictionary_config.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
......@@ -83,6 +83,6 @@ void DictionaryRunner::match(Plasma::RunnerContext &context)
context.addMatches(matches);
}
K_EXPORT_PLASMA_RUNNER(krunner_dictionary, DictionaryRunner)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(DictionaryRunner, "plasma-runner-dictionary.json")
#include "dictionaryrunner.moc"
......@@ -112,7 +112,6 @@ Comment[zh_TW]=定義單字
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
Icon=accessories-dictionary
X-KDE-Library=krunner_dictionary
X-KDE-PluginInfo-Author=Jason A. Donenfeld
X-KDE-PluginInfo-Email=Jason@zx2c4.com
X-KDE-PluginInfo-Name=Dictionary
......
......@@ -2,7 +2,7 @@ add_definitions(-DTRANSLATION_DOMAIN=\"plasma_runner_katesessions\")
set(krunner_katesessions_SRCS katesessions.cpp)
add_library(krunner_katesessions MODULE ${krunner_katesessions_SRCS})
kcoreaddons_desktop_to_json(krunner_katesessions plasma-runner-katesessions.desktop)
target_link_libraries(krunner_katesessions KF5::KIOGui KF5::Notifications KF5::I18n KF5::Runner)
install(TARGETS krunner_katesessions DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-katesessions.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_katesessions DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
......@@ -32,7 +32,7 @@
#include <KIO/CommandLauncherJob>
K_EXPORT_PLASMA_RUNNER(katesessionsrunner, KateSessions)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(KateSessions, "plasma-runner-katesessions.json")
KateSessions::KateSessions(QObject *parent, const QVariantList &args)
: Plasma::AbstractRunner(parent, args)
......
......@@ -116,7 +116,6 @@ Icon=kate
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
TryExec=kate
X-KDE-Library=krunner_katesessions
X-KDE-PluginInfo-Author=Sebastian Kügler
X-KDE-PluginInfo-Email=sebas@kde.org
X-KDE-PluginInfo-Name=katesessions
......
......@@ -5,6 +5,7 @@ set(krunner_konsoleprofiles_SRCS
)
add_library(krunner_konsoleprofiles MODULE ${krunner_konsoleprofiles_SRCS})
kcoreaddons_desktop_to_json(krunner_konsoleprofiles plasma-runner-konsoleprofiles.desktop)
target_link_libraries(krunner_konsoleprofiles
KF5::Runner
KF5::KIOGui
......@@ -12,5 +13,4 @@ target_link_libraries(krunner_konsoleprofiles
KF5::Notifications
)
install(TARGETS krunner_konsoleprofiles DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-konsoleprofiles.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
install(TARGETS krunner_konsoleprofiles DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
......@@ -136,6 +136,6 @@ void KonsoleProfiles::run(const Plasma::RunnerContext &context, const Plasma::Qu
job->start();
}
K_EXPORT_PLASMA_RUNNER(konsoleprofiles, KonsoleProfiles)
K_EXPORT_PLASMA_RUNNER_WITH_JSON(KonsoleProfiles, "plasma-runner-konsoleprofiles.json")
#include "konsoleprofiles.moc"
......@@ -92,7 +92,6 @@ Icon=utilities-terminal
X-KDE-ServiceTypes=Plasma/Runner
Type=Service
X-KDE-Library=krunner_konsoleprofiles
X-KDE-PluginInfo-Author=Laurent Montel
X-KDE-PluginInfo-Email=montel@kde.org
X-KDE-PluginInfo-Name=konsoleprofiles
......
......@@ -18,6 +18,7 @@ target_link_libraries(kcm_krunner_spellcheck
)
add_library(krunner_spellcheck MODULE ${krunner_spellcheckrunner_SRCS})
kcoreaddons_desktop_to_json(krunner_spellcheck plasma-runner-spellchecker.desktop)
target_link_libraries(krunner_spellcheck
KF5::Runner
KF5::KIOWidgets
......@@ -25,7 +26,9 @@ target_link_libraries(krunner_spellcheck
KF5::SonnetCore
)
install(TARGETS krunner_spellcheck kcm_krunner_spellcheck
install(TARGETS krunner_spellcheck
DESTINATION ${KDE_INSTALL_PLUGINDIR}/kf5/krunner)
install(TARGETS kcm_krunner_spellcheck
DESTINATION ${KDE_INSTALL_PLUGINDIR})
install(FILES plasma-runner-spellchecker.desktop plasma-runner-spellchecker_config.desktop
install(FILES plasma-runner-spellchecker_config.desktop
DESTINATION ${KDE_INSTALL_KSERVICES5DIR})
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment