mirror of https://github.com/nymea/nymea.git
Merge PR #247: Generate a version.h file
commit
27ca2f3174
|
|
@ -23,6 +23,7 @@
|
|||
#include "nymeasettings.h"
|
||||
#include "nymeacore.h"
|
||||
#include "nymeaconfiguration.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "debugserverhandler.h"
|
||||
#include "nymeaconfiguration.h"
|
||||
#include "stdio.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QXmlStreamWriter>
|
||||
#include <QCoreApplication>
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
#include "loggingcategories.h"
|
||||
#include "typeutils.h"
|
||||
#include "nymeasettings.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "devices/devicediscoveryinfo.h"
|
||||
#include "devices/devicepairinginfo.h"
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
|
||||
#include "nymeasettings.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "upnpdiscoveryimplementation.h"
|
||||
#include "upnpdiscoveryreplyimplementation.h"
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@
|
|||
#include "ruleengine/ruleengine.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "platform/platform.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "devicehandler.h"
|
||||
#include "actionhandler.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ TARGET = nymea-core
|
|||
include(../nymea.pri)
|
||||
|
||||
QT += sql qml
|
||||
INCLUDEPATH += $$top_srcdir/libnymea
|
||||
INCLUDEPATH += $$top_srcdir/libnymea $$top_builddir
|
||||
LIBS += -L$$top_builddir/libnymea/ -lnymea -lssl -lcrypto -lnymea-mqtt
|
||||
|
||||
target.path = $$[QT_INSTALL_LIBS]
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
#include "nymeasettings.h"
|
||||
#include "platform/platform.h"
|
||||
#include "platform/platformzeroconfcontroller.h"
|
||||
#include "version.h"
|
||||
|
||||
#include "jsonrpc/jsonrpcserverimplementation.h"
|
||||
#include "servers/mocktcpserver.h"
|
||||
|
|
|
|||
|
|
@ -134,6 +134,7 @@
|
|||
#include "httpreply.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "nymeacore.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QPair>
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@
|
|||
#include "httpreply.h"
|
||||
#include "httprequest.h"
|
||||
#include "debugserverhandler.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QJsonDocument>
|
||||
#include <QNetworkInterface>
|
||||
|
|
|
|||
15
nymea.pri
15
nymea.pri
|
|
@ -1,20 +1,7 @@
|
|||
# Parse and export NYMEA_VERSION_STRING
|
||||
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||
|
||||
# define protocol versions
|
||||
JSON_PROTOCOL_VERSION_MAJOR=4
|
||||
JSON_PROTOCOL_VERSION_MINOR=1
|
||||
LIBNYMEA_API_VERSION_MAJOR=4
|
||||
LIBNYMEA_API_VERSION_MINOR=0
|
||||
LIBNYMEA_API_VERSION_PATCH=0
|
||||
|
||||
COPYRIGHT_YEAR_FROM=2013
|
||||
COPYRIGHT_YEAR_TO=2020
|
||||
|
||||
DEFINES += NYMEA_VERSION_STRING=\\\"$${NYMEA_VERSION_STRING}\\\" \
|
||||
JSON_PROTOCOL_VERSION=\\\"$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}\\\" \
|
||||
COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\" \
|
||||
LIBNYMEA_API_VERSION=\\\"$${LIBNYMEA_API_VERSION_MAJOR}.$${LIBNYMEA_API_VERSION_MINOR}.$${LIBNYMEA_API_VERSION_PATCH}\\\"
|
||||
DEFINES += COPYRIGHT_YEAR_STRING=\\\"$${COPYRIGHT_YEAR_FROM}-$${COPYRIGHT_YEAR_TO}\\\"
|
||||
|
||||
QT *= network websockets bluetooth dbus
|
||||
|
||||
|
|
|
|||
15
nymea.pro
15
nymea.pro
|
|
@ -1,5 +1,20 @@
|
|||
include(nymea.pri)
|
||||
|
||||
# Parse and export NYMEA_VERSION_STRING
|
||||
NYMEA_VERSION_STRING=$$system('dpkg-parsechangelog | sed -n -e "s/^Version: //p"')
|
||||
|
||||
# define protocol versions
|
||||
JSON_PROTOCOL_VERSION_MAJOR=4
|
||||
JSON_PROTOCOL_VERSION_MINOR=1
|
||||
JSON_PROTOCOL_VERSION="$${JSON_PROTOCOL_VERSION_MAJOR}.$${JSON_PROTOCOL_VERSION_MINOR}"
|
||||
LIBNYMEA_API_VERSION_MAJOR=4
|
||||
LIBNYMEA_API_VERSION_MINOR=0
|
||||
LIBNYMEA_API_VERSION_PATCH=0
|
||||
LIBNYMEA_API_VERSION="$${LIBNYMEA_API_VERSION_MAJOR}.$${LIBNYMEA_API_VERSION_MINOR}.$${LIBNYMEA_API_VERSION_PATCH}"
|
||||
|
||||
QMAKE_SUBSTITUTES += version.h.in
|
||||
|
||||
|
||||
TEMPLATE=subdirs
|
||||
|
||||
SUBDIRS += libnymea tools
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@
|
|||
#include "nymeadbusservice.h"
|
||||
#include "nymeaapplication.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
using namespace nymeaserver;
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
#include "nymeacore.h"
|
||||
#include "nymeasettings.h"
|
||||
#include "loggingcategories.h"
|
||||
#include "version.h"
|
||||
|
||||
|
||||
namespace nymeaserver {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ include(../nymea.pri)
|
|||
TARGET = nymead
|
||||
TEMPLATE = app
|
||||
|
||||
INCLUDEPATH += ../libnymea ../libnymea-core
|
||||
INCLUDEPATH += ../libnymea ../libnymea-core $$top_builddir
|
||||
|
||||
target.path = /usr/bin
|
||||
INSTALLS += target
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@ CONFIG += testcase
|
|||
|
||||
INCLUDEPATH += $$top_srcdir/libnymea \
|
||||
$$top_srcdir/libnymea-core \
|
||||
$$top_srcdir/tests/testlib/
|
||||
$$top_srcdir/tests/testlib/ \
|
||||
$$top_builddir
|
||||
|
||||
LIBS += -L$$top_builddir/libnymea/ -lnymea \
|
||||
-L$$top_builddir/libnymea-core/ -lnymea-core \
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "nymeatestbase.h"
|
||||
#include "../../utils/pushbuttonagent.h"
|
||||
#include "nymeacore.h"
|
||||
#include "version.h"
|
||||
#include "servers/mocktcpserver.h"
|
||||
#include "usermanager/usermanager.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "nymeatestbase.h"
|
||||
#include "version.h"
|
||||
|
||||
using namespace nymeaserver;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "nymeatestbase.h"
|
||||
#include "nymeacore.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QWebSocket>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ CONFIG += c++11 console
|
|||
CONFIG -= app_bundle
|
||||
|
||||
include(../../nymea.pri)
|
||||
INCLUDEPATH += $$top_srcdir/libnymea
|
||||
INCLUDEPATH += $$top_srcdir/libnymea $$top_builddir
|
||||
LIBS += -L$$top_builddir/libnymea -lnymea
|
||||
|
||||
SOURCES += \
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
#include "plugininfocompiler.h"
|
||||
#include "version.h"
|
||||
|
||||
#include <QJsonObject>
|
||||
#include <QFile>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,29 @@
|
|||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
* *
|
||||
* Copyright (C) 2020 Michael Zanetti <michael.zanetti@nymea.io> *
|
||||
* *
|
||||
* This file is part of nymea. *
|
||||
* *
|
||||
* nymea 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, version 2 of the License. *
|
||||
* *
|
||||
* 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 nymea. If not, see <http://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
|
||||
#ifndef VERSION_H
|
||||
#define VERSION_H
|
||||
|
||||
#define NYMEA_VERSION_STRING '"$$NYMEA_VERSION_STRING"'
|
||||
#define JSON_PROTOCOL_VERSION '"$$JSON_PROTOCOL_VERSION"'
|
||||
#define LIBNYMEA_API_VERSION '"$$LIBNYMEA_API_VERSION"'
|
||||
|
||||
#endif
|
||||
|
||||
Loading…
Reference in New Issue