diff --git a/CMakeLists.txt b/CMakeLists.txt
index ba7eeaceaeac7e28bf957366fca27ad6b40ab046..aba655577d0a5e0ac520f89d03e28d0002fc53f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,20 +11,18 @@ set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
-include(ECMInstallIcons)
include(FeatureSummary)
-find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
+find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core)
find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
CoreAddons
+ Service
+ Plasma
I18n
)
add_subdirectory(src)
-add_subdirectory(icons)
-# Make it possible to use the po files fetched by the fetch-translations step
-ki18n_install(po)
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
diff --git a/README b/README
index 21a8f91d4ef9b3016c34193b35582438aca87d5d..26821f546258f67b839b2ab5f4f7a004f7c9a50c 100644
--- a/README
+++ b/README
@@ -15,3 +15,8 @@ where $KDEDIRS points to your KDE installation prefix.
Note: you can use another build path. Then cd in your build dir and:
export KDE_SRC=path_to_your_src
cmake $KDE_SRC -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug
+
+Requires:
+* KDNSSD
+* youtube-dl
+* QtMultimedia
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e62d32a83cf0f0c06679c41163a41b9197e59803..093ef4154119942ea28b5cf5a79c5e731365ad29 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,18 +1,17 @@
set( simplecastengine_SRCS
- main.cpp
- simplecastenginewindow.cpp
+ simplecastengine.cpp
)
-ki18n_wrap_ui(simplecastengine_SRCS simplecastengine.ui)
+add_library( plasma_dataengine_simplecastengine ${simplecastengine_SRCS} )
-add_executable( simplecastengine ${simplecastengine_SRCS} )
+kcoreaddons_desktop_to_json(plasma_dataengine_simplecastengine plasma_dataengine_simplecastengine.desktop)
-target_link_libraries( simplecastengine
- KF5::CoreAddons
+target_link_libraries( plasma_dataengine_simplecastengine
+ Qt5::Core
+ KF5::Plasma
+ KF5::Service
KF5::I18n
- Qt5::Widgets
)
-install( TARGETS simplecastengine ${KDE_INSTALL_TARGETS_DEFAULT_ARGS} )
-install( PROGRAMS org.example.simplecastengine.desktop DESTINATION ${KDE_INSTALL_APPDIR} )
-install( FILES org.example.simplecastengine.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR} )
+install(TARGETS plasma_dataengine_simplecastengine DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/dataengine)
+install( PROGRAMS org.eyecreate.simplecastengine.desktop DESTINATION ${KDE_INSTALL_KSERVICES5DIR} )
diff --git a/src/main.cpp b/src/main.cpp
deleted file mode 100644
index 8fa82b76cf24d6d06996fe68d17a6b79b1cdb52e..0000000000000000000000000000000000000000
--- a/src/main.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- Copyright (C) %{CURRENT_YEAR} by %{AUTHOR} <%{EMAIL}>
-
- This program is free software; you can redistribute it and/or
- modify it under the terms of the GNU General Public License as
- published by the Free Software Foundation; either version 2 of
- the License or (at your option) version 3 or any later version
- accepted by the membership of KDE e.V. (or its successor approved
- by the membership of KDE e.V.), which shall act as a proxy
- defined in Section 14 of version 3 of the license.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see .
-*/
-
-// application header
-#include "simplecastenginewindow.h"
-
-// KF headers
-#include
-#include
-
-// Qt headers
-#include
-#include
-
-int main(int argc, char **argv)
-{
- QApplication application(argc, argv);
-
- KLocalizedString::setApplicationDomain("simplecastengine");
-
- KAboutData aboutData( QStringLiteral("simplecastengine"),
- i18n("SimpleCastEngine"),
- QStringLiteral("%{VERSION}"),
- i18n("A Simple Application written with KDE Frameworks"),
- KAboutLicense::GPL,
- i18n("Copyright %{CURRENT_YEAR}, %{AUTHOR} <%{EMAIL}>"));
-
- aboutData.addAuthor(i18n("%{AUTHOR}"),i18n("Author"), QStringLiteral("%{EMAIL}"));
- aboutData.setOrganizationDomain("example.org");
- aboutData.setDesktopFileName(QStringLiteral("org.example.simplecastengine"));
-
- KAboutData::setApplicationData(aboutData);
- application.setWindowIcon(QIcon::fromTheme(QStringLiteral("simplecastengine")));
-
- QCommandLineParser parser;
- aboutData.setupCommandLine(&parser);
-
- parser.process(application);
- aboutData.processCommandLine(&parser);
-
- SimpleCastEngineWindow *mainWindow = new SimpleCastEngineWindow;
- mainWindow->show();
-
- return application.exec();
-}
diff --git a/src/org.example.simplecastengine.appdata.xml b/src/org.example.simplecastengine.appdata.xml
deleted file mode 100644
index f226d0075b58cca96f94dc520d9993272fb32cae..0000000000000000000000000000000000000000
--- a/src/org.example.simplecastengine.appdata.xml
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- org.example.simplecastengine.desktop
- CC0-1.0
- https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-metadata_license
- SimpleCastEngine
- https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-summary
-
-