introduce a config.pri for the overlay
This commit is contained in:
parent
4a2f4b341e
commit
c4d88bd402
@ -4,7 +4,7 @@ CONFIG += dll
|
||||
QT += core androidextras
|
||||
QT += network qml quick quickcontrols2 svg websockets bluetooth charts nfc
|
||||
|
||||
include(../config.pri)
|
||||
include(../shared.pri)
|
||||
include(../3rdParty/android/android_openssl/openssl.pri)
|
||||
|
||||
|
||||
|
||||
@ -42,6 +42,7 @@
|
||||
|
||||
#include "sigv4utils.h"
|
||||
#include "logging.h"
|
||||
#include "config.h"
|
||||
|
||||
AWSClient* AWSClient::s_instance = nullptr;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@ TARGET = nymea-app
|
||||
TEMPLATE = lib
|
||||
CONFIG += staticlib
|
||||
|
||||
include(../config.pri)
|
||||
include(../shared.pri)
|
||||
include(libnymea-app.pri)
|
||||
|
||||
LIBS += -lssl -lcrypto
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
include(config.pri)
|
||||
message("APP_VERSION: $${APP_VERSION} ($${APP_REVISION})")
|
||||
TEMPLATE=subdirs
|
||||
|
||||
include(shared.pri)
|
||||
message("APP_VERSION: $${APP_VERSION} ($${APP_REVISION})")
|
||||
|
||||
|
||||
SUBDIRS = libnymea-app nymea-app
|
||||
nymea-app.depends = libnymea-app
|
||||
|
||||
@ -15,10 +17,10 @@ withtests: {
|
||||
# $ call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||
# $ make wininstaller
|
||||
wininstaller.depends = nymea-app
|
||||
!equals(OVERLAY_PATH, "") {
|
||||
PACKAGE_BASE_DIR = $${OVERLAY_PATH}\packaging
|
||||
} else {
|
||||
equals(OVERLAY_PATH, "") {
|
||||
PACKAGE_BASE_DIR = $$shell_path($$PWD)\packaging
|
||||
} else {
|
||||
PACKAGE_BASE_DIR = $${OVERLAY_PATH}\packaging
|
||||
}
|
||||
equals(BRANDING, "") {
|
||||
APP_NAME = nymea-app
|
||||
|
||||
@ -1,3 +0,0 @@
|
||||
[General]
|
||||
organisation=nymea
|
||||
app=nymea-app
|
||||
@ -46,6 +46,7 @@
|
||||
#include "nfchelper.h"
|
||||
#include "nfcthingactionwriter.h"
|
||||
#include "platformhelper.h"
|
||||
#include "../config.h"
|
||||
|
||||
#include "logging.h"
|
||||
|
||||
@ -71,9 +72,8 @@ int main(int argc, char *argv[])
|
||||
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||
QApplication application(argc, argv);
|
||||
|
||||
QSettings config(":/config.txt", QSettings::IniFormat);
|
||||
application.setApplicationName(config.value("app").toString());
|
||||
application.setOrganizationName(config.value("organisation").toString());
|
||||
application.setApplicationName(APPLICATION_NAME);
|
||||
application.setOrganizationName(ORGANISATION_NAME);
|
||||
|
||||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
TEMPLATE=app
|
||||
TARGET=nymea-app
|
||||
include(../config.pri)
|
||||
include(../shared.pri)
|
||||
|
||||
TARGET=$${APPLICATION_NAME}
|
||||
|
||||
CONFIG += link_pkgconfig
|
||||
|
||||
@ -52,10 +53,6 @@ RESOURCES += resources.qrc \
|
||||
RESOURCES += styles.qrc
|
||||
}
|
||||
|
||||
win32 {
|
||||
QT += webview
|
||||
}
|
||||
|
||||
android {
|
||||
include(../3rdParty/android/android_openssl/openssl.pri)
|
||||
|
||||
@ -117,13 +114,6 @@ ios: {
|
||||
OBJECTIVE_SOURCES += $$PWD/../packaging/ios/platformhelperios.mm \
|
||||
$$PWD/../packaging/ios/pushnotifications.mm \
|
||||
|
||||
# Firebase CPP SDK
|
||||
# QMAKE_LFLAGS += -ObjC $(inherited)
|
||||
# INCLUDEPATH += /Users/micha/Downloads/firebase_cpp_sdk/include/
|
||||
# LIBS += -F/Users/micha/Downloads/firebase_cpp_sdk/libs/ios/arm64/
|
||||
# LIBS += -ObjC -L/Users/micha/Downloads/firebase_cpp_sdk/libs/ios/arm64/ -lfirebase_messaging -lfirebase_app
|
||||
# LIBS += -framework "FirebaseCore"
|
||||
|
||||
# Add Firebase SDK
|
||||
QMAKE_LFLAGS += -ObjC $(inherited)
|
||||
firebase_files.files += $$files(../packaging/ios/GoogleService-Info.plist)
|
||||
@ -177,13 +167,13 @@ ubports: {
|
||||
SOURCES += platformintegration/ubports/pushclient.cpp
|
||||
}
|
||||
|
||||
BR=$$BRANDING
|
||||
!equals(BR, "") {
|
||||
message("Branding the to: $${BR}")
|
||||
DEFINES += BRANDING=\\\"$${BR}\\\"
|
||||
win32:RCC_ICONS += ../packaging/windows_$${BR}/packages/io.guh.$${BR}/meta/logo.ico
|
||||
} else {
|
||||
win32:RCC_ICONS += ../packaging/windows/packages/io.guh.nymeaapp/meta/logo.ico
|
||||
win32 {
|
||||
QT += webview
|
||||
equals(OVERLAY_PATH, "") {
|
||||
win32:RCC_ICONS += ../packaging/windows/packages/io.nymea.nymeaapp/meta/logo.ico
|
||||
} else {
|
||||
win32:RCC_ICONS += $${OVERLAY_PATH}/packaging/windows/packages/io.guh.$${BR}/meta/logo.ico
|
||||
}
|
||||
}
|
||||
|
||||
target.path = /usr/bin
|
||||
|
||||
@ -32,6 +32,5 @@
|
||||
<file>styles/lime/logo-wide.svg</file>
|
||||
<file>styles/noir/logo-wide.svg</file>
|
||||
<file>ui/Configuration.qml</file>
|
||||
<file>config.txt</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
pragma Singleton
|
||||
import QtQuick 2.0
|
||||
|
||||
Item {
|
||||
ConfigurationBase {
|
||||
|
||||
}
|
||||
|
||||
@ -3,11 +3,19 @@ CONFIG += c++11
|
||||
top_srcdir=$$PWD
|
||||
top_builddir=$$shadowed($$PWD)
|
||||
|
||||
# Read version info from version.txt
|
||||
VERSION_INFO=$$cat(version.txt)
|
||||
APP_VERSION=$$member(VERSION_INFO, 0)
|
||||
APP_REVISION=$$member(VERSION_INFO, 1)
|
||||
|
||||
DEFINES+=APP_VERSION=\\\"$${APP_VERSION}\\\"
|
||||
equals(OVERLAY_PATH, "") {
|
||||
include(config.pri)
|
||||
} else {
|
||||
include($${OVERLAY_PATH}/config.pri)
|
||||
}
|
||||
|
||||
QMAKE_SUBSTITUTES += $${top_srcdir}/config.h.in
|
||||
INCLUDEPATH += $${top_builddir}
|
||||
|
||||
# We want -Wall to keep the code clean and tidy, however:
|
||||
# On Windows, -Wall goes mental, so not using it there
|
||||
Reference in New Issue
Block a user