mirror of https://github.com/nymea/nymea.git
fix plugin path for snap
parent
4928a2a640
commit
a64441bdf5
6
guh.pri
6
guh.pri
|
|
@ -1,13 +1,17 @@
|
|||
# Parse and export GUH_VERSION_STRING
|
||||
GUH_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||
|
||||
# Install path for plugins
|
||||
GUH_PLUGINS_PATH=/usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/guh/plugins/
|
||||
|
||||
# define protocol versions
|
||||
JSON_PROTOCOL_VERSION=47
|
||||
REST_API_VERSION=1
|
||||
|
||||
DEFINES += GUH_VERSION_STRING=\\\"$${GUH_VERSION_STRING}\\\" \
|
||||
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION}\\\" \
|
||||
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\"
|
||||
REST_API_VERSION=\\\"$${REST_API_VERSION}\\\" \
|
||||
GUH_PLUGINS_PATH=\\\"$${GUH_PLUGINS_PATH}\\\"
|
||||
|
||||
QT *= network websockets bluetooth dbus
|
||||
|
||||
|
|
|
|||
1
guh.pro
1
guh.pro
|
|
@ -41,6 +41,7 @@ message("Qt version:" $$[QT_VERSION])
|
|||
message("Building guh version $${GUH_VERSION_STRING}")
|
||||
message("JSON-RPC API version $${JSON_PROTOCOL_VERSION}")
|
||||
message("REST API version $${REST_API_VERSION}")
|
||||
message("Plugin path $${GUH_PLUGINS_PATH}")
|
||||
|
||||
coverage {
|
||||
message("Building coverage.")
|
||||
|
|
|
|||
|
|
@ -183,6 +183,7 @@
|
|||
#include "plugin/deviceplugin.h"
|
||||
#include "typeutils.h"
|
||||
#include "guhsettings.h"
|
||||
#include "unistd.h"
|
||||
|
||||
#include <QPluginLoader>
|
||||
#include <QStaticPlugin>
|
||||
|
|
@ -258,6 +259,10 @@ QStringList DeviceManager::pluginSearchDirs()
|
|||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/";
|
||||
searchDirs << QCoreApplication::applicationDirPath() + "/../plugins/deviceplugins";
|
||||
searchDirs << QCoreApplication::applicationDirPath() + "/../../../plugins/deviceplugins";
|
||||
searchDirs << QString("%1").arg(GUH_PLUGINS_PATH);
|
||||
#ifdef SNAPPY
|
||||
searchDirs << QString("%1%2").arg(QString::fromUtf8(qgetenv("SNAP"))).arg(GUH_PLUGINS_PATH);
|
||||
#endif
|
||||
return searchDirs;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,6 @@ translations.path = /usr/share/guh/translations
|
|||
translations.files = $$[QT_SOURCE_TREE]/translations/*.qm
|
||||
|
||||
# Install plugin
|
||||
target.path = /usr/lib/$$system('dpkg-architecture -q DEB_HOST_MULTIARCH')/guh/plugins/
|
||||
target.path = $$GUH_PLUGINS_PATH
|
||||
INSTALLS += target translations
|
||||
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
#ifdef SNAPPY
|
||||
// http://snapcraft.io/docs/reference/env
|
||||
// Note: http://snapcraft.io/docs/reference/env
|
||||
qCDebug(dcApplication) << "Snap name :" << qgetenv("SNAP_NAME");
|
||||
qCDebug(dcApplication) << "Snap version :" << qgetenv("SNAP_VERSION");
|
||||
qCDebug(dcApplication) << "Snap directory :" << qgetenv("SNAP");
|
||||
|
|
|
|||
|
|
@ -69,13 +69,14 @@ parts:
|
|||
- avahi-daemon
|
||||
- libavahi-client3
|
||||
- libavahi-common3
|
||||
after: [ guh-cli, guh-webinterface, qt5conf]
|
||||
after: [ qt5conf ]
|
||||
|
||||
guh-cli:
|
||||
plugin: python
|
||||
python-version: python2
|
||||
source: https://github.com/guh/guh-cli.git
|
||||
source-type: git
|
||||
after: [ guh ]
|
||||
build-packages:
|
||||
- python-dev
|
||||
- python-pip
|
||||
|
|
@ -87,5 +88,6 @@ parts:
|
|||
plugin: dump
|
||||
source: https://jenkins.guh.io/view/guh-webinterface/job/guh-webinterface-all/lastBuild/artifact/guh-webinterface.tar.gz
|
||||
source-type: tar
|
||||
after: [ guh-cli ]
|
||||
organize:
|
||||
'*': guh-webinterface/
|
||||
|
|
|
|||
Loading…
Reference in New Issue