on xenial help sign in
Add barebones FullLightDM plugin
commit3c9cce60b93a23cedb156d6c927bd41a081f2738 authorJosh Arenson <joshua.arenson@canonical.com> dateFri 5 Jun 2015, 15:25 (11 years ago) parent147cffa
8 files changed+97−6
debian/control+2−1 debian/unity8-private.install+1 plugins/CMakeLists.txt+1 plugins/FullLightDM/CMakeLists.txt+31 plugins/FullLightDM/plugin.cpp+26 plugins/FullLightDM/plugin.h+33 plugins/FullLightDM/qmldir+3 plugins/IntegratedLightDM/CMakeLists.txt−5
debian/control+2−1
@@ -11,7 +11,7 @@ Build-Depends: cmake,
1111# version. To allow cross-compiling to work, we also must
1212# append :native to g++-4.9 so we don't try to run armhf g++
1313# on an x86 CPU for eaxmple, when cross-compiling.
14− g++-4.9:native,
14+# g++-4.9:native,
1515 graphviz,
1616 gsettings-ubuntu-schemas (>= 0.0.2+14.10.20140815),
1717 libconnectivity-qt1-dev,
@@ -21,6 +21,7 @@ Build-Depends: cmake,
2121 libglib2.0-dev,
2222 libgsettings-qt-dev,
2323 libhardware-dev,
24+ liblightdm-qt5-3-dev,
2425 libpam0g-dev,
2526 libpay2-dev,
2627 libpulse-dev,
debian/unity8-private.install+1
@@ -2,6 +2,7 @@ usr/lib/*/libunity8-private.*
22usr/lib/*/unity8/libUbuntuGestures*
33usr/lib/*/unity8/qml/AccountsService
44usr/lib/*/unity8/qml/Dash
5+usr/lib/*/unity8/qml/FullLightDM
56usr/lib/*/unity8/qml/Greeter
67usr/lib/*/unity8/qml/IntegratedLightDM
78usr/lib/*/unity8/qml/Lights
plugins/CMakeLists.txt+1
@@ -12,6 +12,7 @@ macro(add_unity8_plugin PLUGIN VERSION PATH)
1212endmacro()
1313
1414add_subdirectory(AccountsService)
15+add_subdirectory(FullLightDM)
1516add_subdirectory(Greeter)
1617add_subdirectory(IntegratedLightDM)
1718add_subdirectory(Lights)
plugins/FullLightDM/CMakeLists.txtnew file+31
@@ -0,0 +1,31 @@
1+pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
2+pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-3)
3+
4+include_directories(
5+ ${CMAKE_CURRENT_SOURCE_DIR}
6+ ${CMAKE_CURRENT_BINARY_DIR}
7+ ${CMAKE_SOURCE_DIR}/plugins/Utils
8+ ${CMAKE_SOURCE_DIR}/tests/mocks/IntegratedLightDM
9+ ${LIBLIGHTDM_INCLUDE_DIRS}
10+ ${libunity8-private_SOURCE_DIR}
11+ ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
12+)
13+
14+set(QMLPLUGIN_SRC
15+ plugin.cpp
16+ )
17+
18+add_library(FullLightDM-qml MODULE
19+ ${QMLPLUGIN_SRC}
20+ )
21+
22+target_link_libraries(FullLightDM-qml
23+ unity8-private
24+ lightdm-qt5-3
25+ ${LIBLIGHTDM_LDFLAGS}
26+ ${LIBUSERMETRICSOUTPUT_LDFLAGS}
27+ )
28+
29+qt5_use_modules(FullLightDM-qml DBus Gui Qml)
30+
31+add_unity8_plugin(FullLightDM 0.1 FullLightDM TARGETS FullLightDM-qml)
plugins/FullLightDM/plugin.cppnew file+26
@@ -0,0 +1,26 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ */
17+
18+#include "plugin.h"
19+
20+#include <QtQml/qqml.h>
21+
22+void FullLightDMPlugin::registerTypes(const char *uri)
23+{
24+
25+ Q_ASSERT(uri == QLatin1String("FullLightDM"));
26+}
plugins/FullLightDM/plugin.hnew file+33
@@ -0,0 +1,33 @@
1+/*
2+ * Copyright (C) 2015 Canonical, Ltd.
3+ *
4+ * This program is free software; you can redistribute it and/or modify
5+ * it under the terms of the GNU General Public License as published by
6+ * the Free Software Foundation; version 3.
7+ *
8+ * This program is distributed in the hope that it will be useful,
9+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
10+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+ * GNU General Public License for more details.
12+ *
13+ * You should have received a copy of the GNU General Public License
14+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
15+ *
16+ */
17+
18+#ifndef FULL_LIGHTDM_PLUGIN_H
19+#define FULL_LIGHTDM_PLUGIN_H
20+
21+#include <QtQml/QQmlEngine>
22+#include <QtQml/QQmlExtensionPlugin>
23+
24+class FullLightDMPlugin : public QQmlExtensionPlugin
25+{
26+ Q_OBJECT
27+ Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface")
28+
29+public:
30+ void registerTypes(const char *uri) override;
31+};
32+
33+#endif /* FULL_LIGHTDM_PLUGIN_H */
plugins/FullLightDM/qmldirnew file+3
@@ -0,0 +1,3 @@
1+module FulLightDM
2+plugin FullLightDM-qml
3+typeinfo FullLightDM.qmltypes
plugins/IntegratedLightDM/CMakeLists.txt−5
@@ -1,6 +1,4 @@
11pkg_check_modules(LIBUSERMETRICSOUTPUT REQUIRED libusermetricsoutput-1)
2−# TODO: Once we split out a separate greeter process, uncomment these lines
3−#pkg_check_modules(LIBLIGHTDM REQUIRED liblightdm-qt5-2)
42
53add_subdirectory(liblightdm)
64
@@ -9,7 +7,6 @@ include_directories(
97 ${CMAKE_CURRENT_BINARY_DIR}
108 ${CMAKE_SOURCE_DIR}/plugins/Utils
119 ${CMAKE_SOURCE_DIR}/tests/mocks/IntegratedLightDM
12− #${LIBLIGHTDM_INCLUDE_DIRS}
1310 ${libunity8-private_SOURCE_DIR}
1411 ${LIBUSERMETRICSOUTPUT_INCLUDE_DIRS}
1512)
@@ -30,8 +27,6 @@ add_library(IntegratedLightDM-qml MODULE
3027target_link_libraries(IntegratedLightDM-qml
3128 integratedLightDM
3229 unity8-private
33−# TODO: Once we split out a separate greeter process, uncomment these lines
34−# ${LIBLIGHTDM_LDFLAGS}
3530 ${LIBUSERMETRICSOUTPUT_LDFLAGS}
3631 )
3732