experimenting with new snappy version
This commit is contained in:
parent
aedfbefbe1
commit
c45a5a994c
10
guh.pri
10
guh.pri
@ -14,10 +14,12 @@ QT+= network
|
|||||||
QMAKE_CXXFLAGS += -Werror -std=c++11
|
QMAKE_CXXFLAGS += -Werror -std=c++11
|
||||||
QMAKE_LFLAGS += -std=c++11
|
QMAKE_LFLAGS += -std=c++11
|
||||||
|
|
||||||
# Check for Bluetoot LE support (Qt >= 5.4.0)
|
!snappy {
|
||||||
!contains(QT_VERSION, ^5\\.[0-3]\\..*) {
|
# Check for Bluetoot LE support (Qt >= 5.4)
|
||||||
QT += bluetooth
|
equals(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 3) {
|
||||||
DEFINES += BLUETOOTH_LE
|
QT += bluetooth
|
||||||
|
DEFINES += BLUETOOTH_LE
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Enable coverage option
|
# Enable coverage option
|
||||||
|
|||||||
45
guh.pro
45
guh.pro
@ -35,7 +35,7 @@ test.commands = LD_LIBRARY_PATH=$$top_builddir/libguh:$$top_builddir/tests/libgu
|
|||||||
QMAKE_EXTRA_TARGETS += licensecheck doc test
|
QMAKE_EXTRA_TARGETS += licensecheck doc test
|
||||||
|
|
||||||
# Inform about guh build
|
# Inform about guh build
|
||||||
message(============================================)
|
message("--------------------------------------")
|
||||||
message(Qt version: $$[QT_VERSION])
|
message(Qt version: $$[QT_VERSION])
|
||||||
message("Building guh version $${GUH_VERSION_STRING}")
|
message("Building guh version $${GUH_VERSION_STRING}")
|
||||||
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION}")
|
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION}")
|
||||||
@ -45,15 +45,6 @@ coverage {
|
|||||||
message("Building coverage.")
|
message("Building coverage.")
|
||||||
}
|
}
|
||||||
|
|
||||||
# Build tests
|
|
||||||
!disabletesting {
|
|
||||||
message("Building guh tests enabled")
|
|
||||||
SUBDIRS += tests
|
|
||||||
DEFINES += TESTING_ENABLED
|
|
||||||
} else {
|
|
||||||
message("Building guh tests disabled")
|
|
||||||
}
|
|
||||||
|
|
||||||
# Bluetooth LE support
|
# Bluetooth LE support
|
||||||
contains(DEFINES, BLUETOOTH_LE) {
|
contains(DEFINES, BLUETOOTH_LE) {
|
||||||
message("Bluetooth LE enabled.")
|
message("Bluetooth LE enabled.")
|
||||||
@ -82,6 +73,9 @@ contains(DEFINES, GPIO433){
|
|||||||
|
|
||||||
contains(DEFINES, SNAPPY){
|
contains(DEFINES, SNAPPY){
|
||||||
message("Building Ubuntu snappy package.")
|
message("Building Ubuntu snappy package.")
|
||||||
|
|
||||||
|
CONFIG += disabletesting
|
||||||
|
|
||||||
isEmpty(PREFIX) {
|
isEmpty(PREFIX) {
|
||||||
INSTALLDIR = ""
|
INSTALLDIR = ""
|
||||||
} else {
|
} else {
|
||||||
@ -102,11 +96,31 @@ contains(DEFINES, SNAPPY){
|
|||||||
sqlplugin.files = /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlite.so
|
sqlplugin.files = /usr/lib/arm-linux-gnueabihf/qt5/plugins/sqldrivers/libqsqlite.so
|
||||||
sqlplugin.path = $$INSTALLDIR/usr/lib/qt5/plugins/sqldrivers/
|
sqlplugin.path = $$INSTALLDIR/usr/lib/qt5/plugins/sqldrivers/
|
||||||
|
|
||||||
|
# We need to bring our own Qt libs, at least for now
|
||||||
|
qtlibs.files = /usr/lib/arm-linux-gnueabihf/libQt5Network.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libQt5Sql.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libQt5Test.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libQt5Gui.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libQt5WebSockets.so.5 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libicui18n.so.52 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libicuuc.so.52 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libpng12.so.0 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libharfbuzz.so.0 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libicudata.so.52 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2.0.0 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/mesa-egl/libGLESv2.so.2 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libfreetype.so.6 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libgraphite2.so.3 \
|
||||||
|
/usr/lib/arm-linux-gnueabihf/libglapi.so.0
|
||||||
|
qtlibs.path = /usr/lib/
|
||||||
|
|
||||||
# install guhd.conf
|
# install guhd.conf
|
||||||
guhdconf.files = data/config/guhd.conf
|
guhdconf.files = data/config/guhd.conf
|
||||||
guhdconf.path = $$INSTALLDIR/config/
|
guhdconf.path = $$INSTALLDIR/config/
|
||||||
|
|
||||||
INSTALLS += meta wrapper guhdconf sqlplugin
|
INSTALLS += meta wrapper guhdconf qtlibs sqlplugin
|
||||||
|
|
||||||
# command to pack libs for snappy package
|
# command to pack libs for snappy package
|
||||||
packlibs.depends = libguh server
|
packlibs.depends = libguh server
|
||||||
@ -114,3 +128,12 @@ contains(DEFINES, SNAPPY){
|
|||||||
|
|
||||||
QMAKE_EXTRA_TARGETS += packlibs
|
QMAKE_EXTRA_TARGETS += packlibs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Build tests
|
||||||
|
!disabletesting {
|
||||||
|
message("Building guh tests enabled")
|
||||||
|
SUBDIRS += tests
|
||||||
|
DEFINES += TESTING_ENABLED
|
||||||
|
} else {
|
||||||
|
message("Building guh tests disabled")
|
||||||
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export QT_PLUGIN_PATH=$SNAPP_APP_PATH/usr/lib/qt5/plugins
|
export QT_PLUGIN_PATH=/apps/guh.sideload/current/usr/lib/qt5/plugins
|
||||||
export LD_LIBRARY_PATH=$SNAPP_APP_PATH/usr/lib:$LD_LIBRARY_PATH
|
export LD_LIBRARY_PATH=/apps/guh.sideload/current/usr/lib:$LD_LIBRARY_PATH
|
||||||
$SNAPP_APP_PATH/usr/bin/guhd -n
|
/apps/guh.sideload/current/usr/bin/guhd -n
|
||||||
|
|||||||
@ -320,7 +320,7 @@ void DevicePluginOpenweathermap::processGeoSearchResponse(QByteArray data)
|
|||||||
|
|
||||||
void DevicePluginOpenweathermap::processSearchResults(const QList<QVariantMap> &cityList)
|
void DevicePluginOpenweathermap::processSearchResults(const QList<QVariantMap> &cityList)
|
||||||
{
|
{
|
||||||
QList<DeviceDescriptor> retList;
|
QList<DeviceDescriptor> retList;
|
||||||
foreach (QVariantMap elemant, cityList) {
|
foreach (QVariantMap elemant, cityList) {
|
||||||
DeviceDescriptor descriptor(openweathermapDeviceClassId, elemant.value("name").toString(), elemant.value("country").toString());
|
DeviceDescriptor descriptor(openweathermapDeviceClassId, elemant.value("name").toString(), elemant.value("country").toString());
|
||||||
ParamList params;
|
ParamList params;
|
||||||
|
|||||||
@ -112,6 +112,10 @@ WebServer::WebServer(const QSslConfiguration &sslConfiguration, QObject *parent)
|
|||||||
m_webinterfaceDir = QDir(settings.value("publicFolder", "/usr/share/guh-webinterface/public/").toString());
|
m_webinterfaceDir = QDir(settings.value("publicFolder", "/usr/share/guh-webinterface/public/").toString());
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
|
#ifdef SNAPPY
|
||||||
|
m_webinterfaceDir = QDir("/apps/guh.sideload/current/public/");
|
||||||
|
#endif
|
||||||
|
|
||||||
// check public directory
|
// check public directory
|
||||||
qCDebug(dcWebServer) << "Publish webinterface folder" << m_webinterfaceDir.path();
|
qCDebug(dcWebServer) << "Publish webinterface folder" << m_webinterfaceDir.path();
|
||||||
if (!m_webinterfaceDir.exists())
|
if (!m_webinterfaceDir.exists())
|
||||||
|
|||||||
Reference in New Issue
Block a user