Add support for plymouth
This commit is contained in:
parent
952d37f478
commit
b8aba4b4ce
@ -2,6 +2,8 @@ TEMPLATE=app
|
|||||||
TARGET=nymea-app
|
TARGET=nymea-app
|
||||||
include(../config.pri)
|
include(../config.pri)
|
||||||
|
|
||||||
|
CONFIG += link_pkgconfig
|
||||||
|
|
||||||
QT += network qml quick quickcontrols2 svg websockets bluetooth charts gui-private nfc
|
QT += network qml quick quickcontrols2 svg websockets bluetooth charts gui-private nfc
|
||||||
|
|
||||||
INCLUDEPATH += $$top_srcdir/libnymea-app
|
INCLUDEPATH += $$top_srcdir/libnymea-app
|
||||||
@ -52,6 +54,10 @@ win32 {
|
|||||||
QT += webview
|
QT += webview
|
||||||
}
|
}
|
||||||
|
|
||||||
|
linux:!android: {
|
||||||
|
PKGCONFIG += ply-boot-client
|
||||||
|
}
|
||||||
|
|
||||||
android {
|
android {
|
||||||
include(../3rdParty/android/android_openssl/openssl.pri)
|
include(../3rdParty/android/android_openssl/openssl.pri)
|
||||||
|
|
||||||
@ -182,11 +188,3 @@ BR=$$BRANDING
|
|||||||
target.path = /usr/bin
|
target.path = /usr/bin
|
||||||
INSTALLS += target
|
INSTALLS += target
|
||||||
|
|
||||||
ANDROID_ABIS = armeabi-v7a arm64-v8a
|
|
||||||
|
|
||||||
contains(ANDROID_TARGET_ARCH,) {
|
|
||||||
ANDROID_ABIS = \
|
|
||||||
armeabi-v7a \
|
|
||||||
arm64-v8a
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
@ -32,7 +32,11 @@
|
|||||||
|
|
||||||
#include "logging.h"
|
#include "logging.h"
|
||||||
|
|
||||||
Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntergration)
|
extern "C" {
|
||||||
|
#include <ply-boot-client.h>
|
||||||
|
}
|
||||||
|
|
||||||
|
Q_DECLARE_LOGGING_CATEGORY(dcPlatformIntegration)
|
||||||
|
|
||||||
PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent)
|
PlatformHelperGeneric::PlatformHelperGeneric(QObject *parent) : PlatformHelper(parent)
|
||||||
{
|
{
|
||||||
@ -69,3 +73,19 @@ void PlatformHelperGeneric::setScreenBrightness(int percent)
|
|||||||
emit screenTimeoutChanged();
|
emit screenTimeoutChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PlatformHelperGeneric::hideSplashScreen()
|
||||||
|
{
|
||||||
|
ply_event_loop_t *loop = ply_event_loop_new();
|
||||||
|
ply_boot_client_t *client = ply_boot_client_new();
|
||||||
|
bool status = ply_boot_client_connect(client, [] (void* data, ply_boot_client_t *) -> void {
|
||||||
|
PlatformHelperGeneric *thiz = reinterpret_cast<PlatformHelperGeneric*>(data);
|
||||||
|
// ply_event_loop_exit(this.loop, 0);
|
||||||
|
// ply_boot_client_free(client);
|
||||||
|
}, this);
|
||||||
|
if (!status) {
|
||||||
|
qCCritical(dcPlatformIntegration()) << "Cannot deactivate splash screen";
|
||||||
|
}
|
||||||
|
ply_boot_client_attach_to_event_loop(client, loop);
|
||||||
|
ply_boot_client_tell_daemon_to_deactivate(client, nullptr, nullptr, nullptr);
|
||||||
|
}
|
||||||
|
|||||||
@ -47,6 +47,7 @@ public:
|
|||||||
virtual int screenBrightness() const override;
|
virtual int screenBrightness() const override;
|
||||||
virtual void setScreenBrightness(int percent) override;
|
virtual void setScreenBrightness(int percent) override;
|
||||||
|
|
||||||
|
virtual void hideSplashScreen() override;
|
||||||
private:
|
private:
|
||||||
ScreenHelper *m_piHelper = nullptr;
|
ScreenHelper *m_piHelper = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -17,6 +17,7 @@ Build-Depends: debhelper (>= 9.0.0),
|
|||||||
qtconnectivity5-dev,
|
qtconnectivity5-dev,
|
||||||
qtdeclarative5-dev,
|
qtdeclarative5-dev,
|
||||||
qtquickcontrols2-5-dev,
|
qtquickcontrols2-5-dev,
|
||||||
|
libplymouth-dev,
|
||||||
|
|
||||||
Package: nymea-app
|
Package: nymea-app
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
|||||||
Reference in New Issue
Block a user