diff --git a/config.h.in b/config.h.in index 4306598f..1df39def 100644 --- a/config.h.in +++ b/config.h.in @@ -1,30 +1,24 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io +* Copyright (C) 2013 - 2024, nymea GmbH +* Copyright (C) 2024 - 2025, chargebyte austria GmbH * -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license +* This file is part of nymea-app. * -* GNU General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU General Public License as published by the Free Software -* Foundation, GNU version 3. This project is distributed in the hope that it -* will be useful, 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. +* nymea-app 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, either version 3 of the License, or +* (at your option) any later version. * -* You should have received a copy of the GNU General Public License along with -* this project. If not, see . +* nymea-app is distributed in the hope that it will be useful, +* 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. * -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq +* You should have received a copy of the GNU General Public License +* along with nymea-app. If not, see . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -32,6 +26,7 @@ #define VERSION_H #define APP_VERSION '"$$APP_VERSION"' +#define APP_REVISION '"$$APP_REVISION"' #define APPLICATION_NAME '"$$APPLICATION_NAME"' #define ORGANISATION_NAME '"$$ORGANISATION_NAME"' diff --git a/nymea-app/main.cpp b/nymea-app/main.cpp index d598e69e..0e8a6d7a 100644 --- a/nymea-app/main.cpp +++ b/nymea-app/main.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include "utils/qhashqml.h" #include "libnymea-app-core.h" @@ -94,6 +95,7 @@ int main(int argc, char *argv[]) qCInfo(dcApplication()) << "Command line:" << application.arguments().join(" "); qCInfo(dcApplication()) << "System:" << QSysInfo::machineHostName() << QSysInfo::prettyProductName() << QSysInfo::productType() << QSysInfo::productVersion() << PlatformHelper::instance()->deviceManufacturer() << PlatformHelper::instance()->deviceModel(); qCInfo(dcApplication()) << "Locale:" << QLocale() << QLocale().name() << QLocale().language(); + qCInfo(dcApplication()) << "SSL version:" << QSslSocket::sslLibraryVersionString(); QScreen *screen = application.primaryScreen(); qCInfo(dcApplication()).noquote() << QString("Screen name: %1").arg(screen->name()); @@ -198,8 +200,10 @@ int main(int argc, char *argv[]) #endif engine->rootContext()->setContextProperty("appVersion", APP_VERSION); + engine->rootContext()->setContextProperty("appRevision", APP_REVISION); engine->rootContext()->setContextProperty("qtBuildVersion", QT_VERSION_STR); engine->rootContext()->setContextProperty("qtVersion", qVersion()); + engine->rootContext()->setContextProperty("sslLibraryVersion", QSslSocket::sslLibraryVersionString()); engine->rootContext()->setContextProperty("defaultMainViewFilter", parser.value(defaultViewsOption)); engine->rootContext()->setContextProperty("kioskMode", parser.isSet(kioskOption)); diff --git a/nymea-app/resources.qrc b/nymea-app/resources.qrc index e9bc6136..0271f7d5 100644 --- a/nymea-app/resources.qrc +++ b/nymea-app/resources.qrc @@ -321,5 +321,6 @@ ui/system/WirelessNetworksFilterSettingsPage.qml ui/system/ServerLoggingCategoriesPage.qml ui/components/BackgroundFocusHandler.qml + ui/components/LicenseInformationItem.qml diff --git a/nymea-app/ui/appsettings/AboutPage.qml b/nymea-app/ui/appsettings/AboutPage.qml index 73607581..c0338144 100644 --- a/nymea-app/ui/appsettings/AboutPage.qml +++ b/nymea-app/ui/appsettings/AboutPage.qml @@ -37,29 +37,15 @@ SettingsPageBase { id: imprint Layout.fillWidth: true title: Configuration.appName - additionalLicenses: ListModel { - ListElement { license: "CC-BY-SA-3.0"; component: "Suru icons"; infoText: qsTr("Suru icons by Ubuntu"); platforms: "*" } - ListElement { license: "CC-BY-SA-3.0"; component: "Ubuntu font"; infoText: qsTr("Ubuntu font by Ubuntu"); platforms: "*" } - ListElement { license: "LGPL3"; component: "QtZeroConf"; infoText: qsTr("QtZeroConf library by Jonathan Bagg"); platforms: "android,ios,linux,osx" } - ListElement { license: "OpenSSL"; component: "OpenSSL"; infoText: qsTr("OpenSSL libraries by Eric Young"); platforms: "android,windows" } - ListElement { license: "OFL"; component: "Oswald font"; infoText: qsTr("Oswald font by The Oswald Project"); platforms: "*" } - } - githubLink: "https://github.com/nymea/nymea-app" NymeaSwipeDelegate { Layout.fillWidth: true - text: qsTr("App version:") - subText: appVersion - progressive: false - prominentSubText: false - } - NymeaSwipeDelegate { - Layout.fillWidth: true - text: qsTr("Qt version:") - subText: qtVersion + (qtBuildVersion !== qtVersion ? " (" + qsTr("Built with %1").arg(qtBuildVersion) + ")" : "") + text: qsTr("App version:") + " " + appVersion + subText: qsTr("Revision:") + " " + appRevision progressive: false prominentSubText: false } } } + diff --git a/nymea-app/ui/components/Imprint.qml b/nymea-app/ui/components/Imprint.qml index cbd1ea76..5430fa15 100644 --- a/nymea-app/ui/components/Imprint.qml +++ b/nymea-app/ui/components/Imprint.qml @@ -27,13 +27,15 @@ import QtQuick.Controls 2.2 import QtQuick.Layouts 1.3 import Nymea 1.0 + Item { id: root implicitHeight: aboutColumn.implicitHeight property alias title: titleLabel.text property url githubLink - property var additionalLicenses: null + + property bool showOpensourceLicenses: true default property alias content: contentGrid.data @@ -121,41 +123,35 @@ Item { Repeater { visible: Configuration.additionalImrintLinks !== null && Configuration.additionalImrintLinks.count > 0 model: Configuration.additionalImrintLinks - delegate:NymeaSwipeDelegate { + delegate: NymeaSwipeDelegate { Layout.fillWidth: true iconName: "qrc:/icons/stock_website.svg" text: model.text subText: model.subText prominentSubText: false wrapTexts: false - onClicked: { - Qt.openUrlExternally(model.url) - } + onClicked: { Qt.openUrlExternally(model.url) } } } NymeaSwipeDelegate { Layout.fillWidth: true iconName: "qrc:/icons/stock_website.svg" - text: qsTr("Chargebyte") + text: qsTr("chargebyte GmbH") subText: "https://chargebyte.com" prominentSubText: false wrapTexts: false - onClicked: { - Qt.openUrlExternally("https://chargebyte.com") - } + onClicked: { Qt.openUrlExternally("https://chargebyte.com") } } NymeaSwipeDelegate { Layout.fillWidth: true iconName: "qrc:/icons/stock_website.svg" - text: qsTr("Visit the nymea website") + text: qsTr("Visit the nymea project website") subText: "https://nymea.io" prominentSubText: false wrapTexts: false - onClicked: { - Qt.openUrlExternally("https://nymea.io") - } + onClicked: { Qt.openUrlExternally("https://nymea.io") } } NymeaSwipeDelegate { @@ -165,9 +161,7 @@ Item { subText: root.githubLink prominentSubText: false wrapTexts: false - onClicked: { - Qt.openUrlExternally(root.githubLink) - } + onClicked: { Qt.openUrlExternally(root.githubLink) } } NymeaSwipeDelegate { @@ -177,8 +171,7 @@ Item { subText: Configuration.privacyPolicyUrl prominentSubText: false wrapTexts: false - onClicked: - Qt.openUrlExternally(Configuration.privacyPolicyUrl) + onClicked: Qt.openUrlExternally(Configuration.privacyPolicyUrl) } NymeaSwipeDelegate { @@ -188,19 +181,17 @@ Item { subText: "The nymea sofware license" prominentSubText: false wrapTexts: false - onClicked: { - Qt.openUrlExternally("https://nymea.io/license") - } + onClicked: { Qt.openUrlExternally("https://www.gnu.org/licenses/gpl-3.0-standalone.html") } } NymeaSwipeDelegate { Layout.fillWidth: true - text: qsTr("Additional software licenses") + text: qsTr("Open Source Licenses") iconName: "qrc:/icons/logs.svg" - subText: "Additional used software licenses" + subText: "List of all open source components used in this app." prominentSubText: false wrapTexts: false - visible: root.additionalLicenses && root.additionalLicenses.count > 0 + visible: root.showOpensourceLicenses onClicked: { pageStack.push(licensesPageComponent) } @@ -218,22 +209,267 @@ Item { onBackPressed: pageStack.pop() } - ColumnLayout { - anchors { left: parent.left; top: parent.top; right: parent.right } + Flickable { + anchors.fill: parent + contentHeight: licensesColumnLayout.implicitHeight + app.margins + clip: true - Repeater { - model: root.additionalLicenses + ColumnLayout { + id: licensesColumnLayout + anchors { left: parent.left; top: parent.top; right: parent.right } - delegate: NymeaSwipeDelegate { + LicenseInformationItem { Layout.fillWidth: true - text: model.component - subText: model.infoText - prominentSubText: false - visible: model.platforms === "*" || model.platforms.indexOf(Qt.platform.os) >= 0 - onClicked: { - pageStack.push(licenseTextComponent, {license: model.license}) - } + component: "QtCore" + description: qsTr("Qt core module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtbase" + platforms: "*" } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtGui" + description: qsTr("Qt gui module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtbase" + platforms: "*" + } + + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtNetwork" + description: qsTr("Qt network module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtbase" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtQML" + description: qsTr("Qt QML module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtdeclarative" + platforms: "*" + } + + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtQuick" + description: qsTr("Qt Quick module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtdeclarative" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtQuickControls" + description: qsTr("Qt Quick Controls module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtdeclarative" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtQuickDialogs" + description: qsTr("Qt Quick Dialogs module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtdeclarative" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtQuickLayouts" + description: qsTr("Qt Quick Layouts module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtdeclarative" + platforms: "*" + } + + + LicenseInformationItem { + Layout.fillWidth: true + component: "Qt5CoreComapitbility" + description: qsTr("Qt 5 compatibility module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "Qt Image Formats" + description: qsTr("Qt image formats module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtSvg" + description: qsTr("Qt SVG module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtsvg" + platforms: "*" + } + + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtCharts" + description: qsTr("Qt charts module") + license: "GPLv3" + version: qtBuildVersion + url: "https://github.com/qt" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtWebsockets" + description: qsTr("Qt websockets module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtwebsockets" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtBluetooth" + description: qsTr("Qt bluetooth module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtconnectivity" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtNfc" + description: qsTr("Qt NFC module") + license: "LGPLv3" + version: qtBuildVersion + url: "https://github.com/qt/qtconnectivity" + platforms: "*" + } + + + LicenseInformationItem { + Layout.fillWidth: true + component: "nymea-remoteproxy" + description: qsTr("Client library for remote connections") + license: "LGPLv3" + version: "1.14.0" + url: "https://github.com/nymea/nymea-remoteproxy" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "QtZeroConf" + description: qsTr("QtZeroConf library by Jonathan Bagg") + license: "LGPLv3" + version: "" + url: "https://github.com/jbagg/QtZeroConf" + platforms: "android,ios,linux,osx" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "FirebaseSDK"; + description: qsTr("Firebase iOS SDK") + license: "Apache 2.0" + version: "18.1.0" + url: "https://github.com/firebase/firebase-ios-sdk" + platforms: "ios" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "FirebaseSDK"; + description: qsTr("Firebase Android SDK") + license: "Apache 2.0" + version: "18.1.0" + url: "https://github.com/firebase/firebase-android-sdk" + platforms: "android" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "OpenSSL" + description: qsTr("OpenSSL libraries by Eric Young") + license: "OpenSSL" + version: sslLibraryVersion + platforms: "android,windows,linux" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "Suru icons" + description: qsTr("Suru icons by Ubuntu") + license: "CC-BY-SA-3.0" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "Ubuntu font" + description: qsTr("Ubuntu font by Ubuntu") + license: "CC-BY-SA-3.0" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "Oswald font" + description: qsTr("Oswald font by The Oswald Project") + license: "OFL" + platforms: "*" + } + + LicenseInformationItem { + Layout.fillWidth: true + component: "Material Icons" + description: qsTr("Google fonts and material icons") + license: "Apache 2.0" + url: "https://fonts.google.com/icons" + platforms: "*" + } + + + // Repeater { + // model: root.additionalLicenses + + // delegate: NymeaSwipeDelegate { + // Layout.fillWidth: true + // text: model.component + // subText: model.description + // prominentSubText: false + // visible: model.platforms === "*" || model.platforms.indexOf(Qt.platform.os) >= 0 + // onClicked: { + // pageStack.push(licenseTextComponent, {license: model.license}) + // } + // } + // } } } } @@ -276,4 +512,3 @@ Item { } } } - diff --git a/nymea-app/ui/components/LicenseInformationItem.qml b/nymea-app/ui/components/LicenseInformationItem.qml new file mode 100644 index 00000000..ce1435c0 --- /dev/null +++ b/nymea-app/ui/components/LicenseInformationItem.qml @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: GPL-3.0-or-later + +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* +* Copyright (C) 2013 - 2024, nymea GmbH +* Copyright (C) 2024 - 2025, chargebyte austria GmbH +* +* This file is part of nymea-app. +* +* nymea-app 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, either version 3 of the License, or +* (at your option) any later version. +* +* nymea-app is distributed in the hope that it will be useful, +* 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-app. If not, see . +* +* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +import QtQuick 2.9 +import QtQuick.Controls 2.2 +import QtQuick.Controls.Material 2.2 +import QtQuick.Layouts 1.3 +import Nymea 1.0 + + +NymeaSwipeDelegate { + id: root + + property string component + property string description + property string license + property string url + property string version + property string platforms + + prominentSubText: false + progressive: false + text: root.component + subText: root.description + visible: platforms === "*" || platforms.indexOf(Qt.platform.os) >= 0 + onClicked: Qt.openUrlExternally(root.url) + additionalItem: ColumnLayout { + + Label { + Layout.fillHeight: true + Layout.alignment: Qt.AlignRight + text: root.license + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignRight + } + Label { + Layout.fillHeight: true + Layout.alignment: Qt.AlignRight + text: root.version + font.pixelSize: app.extraSmallFont + color: Material.color(Material.Grey) + verticalAlignment: Text.AlignVCenter + horizontalAlignment: Text.AlignRight + visible: root.version.length > 0 + } + } +} diff --git a/nymea-app/ui/system/AboutNymeaPage.qml b/nymea-app/ui/system/AboutNymeaPage.qml index 6a046d3c..38a77e58 100644 --- a/nymea-app/ui/system/AboutNymeaPage.qml +++ b/nymea-app/ui/system/AboutNymeaPage.qml @@ -32,11 +32,11 @@ SettingsPageBase { id: root title: qsTr("About %1").arg(Configuration.systemName) - Imprint { id: imprint Layout.fillWidth: true title: Configuration.systemName + showOpensourceLicenses: false githubLink: "https://github.com/nymea/nymea" NymeaSwipeDelegate { @@ -46,6 +46,7 @@ SettingsPageBase { progressive: false prominentSubText: false } + NymeaSwipeDelegate { Layout.fillWidth: true text: qsTr("Server UUID:") @@ -57,6 +58,7 @@ SettingsPageBase { ToolTip.show(qsTr("ID copied to clipboard"), 500); } } + NymeaSwipeDelegate { Layout.fillWidth: true text: qsTr("Server version:") @@ -64,6 +66,7 @@ SettingsPageBase { progressive: false prominentSubText: false } + NymeaSwipeDelegate { Layout.fillWidth: true text: qsTr("JSON-RPC version:") @@ -71,6 +74,7 @@ SettingsPageBase { progressive: false prominentSubText: false } + NymeaSwipeDelegate { Layout.fillWidth: true text: qsTr("Qt version:") @@ -79,6 +83,7 @@ SettingsPageBase { progressive: false prominentSubText: false } + NymeaSwipeDelegate { Layout.fillWidth: true text: qsTr("Device serial number") @@ -93,3 +98,4 @@ SettingsPageBase { } } } + diff --git a/nymea-remoteproxy b/nymea-remoteproxy index 81ba9458..c8997b52 160000 --- a/nymea-remoteproxy +++ b/nymea-remoteproxy @@ -1 +1 @@ -Subproject commit 81ba94583d4873efe5110beef7240c4d229ec2c7 +Subproject commit c8997b5260d665f7b3fe988d42bdf5d4ce434f4c