Compare commits
No commits in common. "4b9dcc5e99d443646fd2ae174246b594a078b9a6" and "4e7ce2cd70f2bfb3b827e5d394de8e8293ec5f71" have entirely different histories.
4b9dcc5e99
...
4e7ce2cd70
@ -34,7 +34,6 @@ DEFINES += QT_DEPRECATED_WARNINGS
|
|||||||
# too small when updating apism.
|
# too small when updating apism.
|
||||||
# Fix display of UPDATE_SUCCESS when opkg_command fails. Detected when
|
# Fix display of UPDATE_SUCCESS when opkg_command fails. Detected when
|
||||||
# updating apsim failed.
|
# updating apsim failed.
|
||||||
# 1.3.11: Integrate version of ATBUpdateTool in SendLastVersion-ISMAS-message.
|
|
||||||
|
|
||||||
win32 {
|
win32 {
|
||||||
BUILD_DATE=$$system("date /t")
|
BUILD_DATE=$$system("date /t")
|
||||||
@ -44,10 +43,7 @@ win32 {
|
|||||||
BUILD_TIME=$$system("date +%H:%M:%S")
|
BUILD_TIME=$$system("date +%H:%M:%S")
|
||||||
}
|
}
|
||||||
|
|
||||||
GIT_COMMIT=$$system("git log -1 --format=oneline | cut -d' ' -f1")
|
VERSION="1.3.10"
|
||||||
|
|
||||||
VERSION="1.3.11"
|
|
||||||
EXTENDED_VERSION="$${VERSION}-$${GIT_COMMIT}"
|
|
||||||
|
|
||||||
INCLUDEPATH += plugins
|
INCLUDEPATH += plugins
|
||||||
|
|
||||||
@ -57,7 +53,6 @@ CONFIG += c++17
|
|||||||
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
DEFINES+=APP_VERSION=\\\"$$VERSION\\\"
|
||||||
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
DEFINES+=APP_BUILD_DATE=\\\"$$BUILD_DATE\\\"
|
||||||
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
DEFINES+=APP_BUILD_TIME=\\\"$$BUILD_TIME\\\"
|
||||||
DEFINES+=APP_EXTENDED_VERSION=\\\"$$EXTENDED_VERSION\\\"
|
|
||||||
|
|
||||||
QMAKE_CXXFLAGS += -g
|
QMAKE_CXXFLAGS += -g
|
||||||
QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
QMAKE_CXXFLAGS += -Wno-deprecated-copy
|
||||||
|
@ -631,9 +631,6 @@ QString IsmasClient::updateOfPSASendVersion(PSAInstalled const &psa) {
|
|||||||
"},"
|
"},"
|
||||||
"\"ATBQT\" : {"
|
"\"ATBQT\" : {"
|
||||||
"\"VERSION\" : \"%s\""
|
"\"VERSION\" : \"%s\""
|
||||||
"},"
|
|
||||||
"\"ATB-UPDATE-TOOL\" : {"
|
|
||||||
"\"VERSION\" : \"%s\""
|
|
||||||
"}"
|
"}"
|
||||||
"},"
|
"},"
|
||||||
"\"PLUGINS\" : {"
|
"\"PLUGINS\" : {"
|
||||||
@ -761,7 +758,6 @@ QString IsmasClient::updateOfPSASendVersion(PSAInstalled const &psa) {
|
|||||||
|
|
||||||
psa.sw.apismVersion.toStdString().c_str(),
|
psa.sw.apismVersion.toStdString().c_str(),
|
||||||
psa.sw.atbQTVersion.toStdString().c_str(),
|
psa.sw.atbQTVersion.toStdString().c_str(),
|
||||||
psa.sw.atbUpdateToolVersion.toStdString().c_str(),
|
|
||||||
|
|
||||||
psa.pluginVersion.deviceController.toStdString().c_str(),
|
psa.pluginVersion.deviceController.toStdString().c_str(),
|
||||||
psa.pluginVersion.ingenicoISelfCC.toStdString().c_str(),
|
psa.pluginVersion.ingenicoISelfCC.toStdString().c_str(),
|
||||||
|
@ -48,7 +48,6 @@ struct PSAInstalled {
|
|||||||
struct SoftWare {
|
struct SoftWare {
|
||||||
QString apismVersion;
|
QString apismVersion;
|
||||||
QString atbQTVersion;
|
QString atbQTVersion;
|
||||||
QString atbUpdateToolVersion;
|
|
||||||
} sw;
|
} sw;
|
||||||
|
|
||||||
struct PluginVersion {
|
struct PluginVersion {
|
||||||
@ -99,7 +98,6 @@ struct PSAInstalled {
|
|||||||
|
|
||||||
sw.apismVersion = "N/A";
|
sw.apismVersion = "N/A";
|
||||||
sw.atbQTVersion = "N/A";
|
sw.atbQTVersion = "N/A";
|
||||||
sw.atbUpdateToolVersion = "N/A";
|
|
||||||
|
|
||||||
pluginVersion.deviceController = "N/A";
|
pluginVersion.deviceController = "N/A";
|
||||||
pluginVersion.ingenicoISelfCC = "N/A";
|
pluginVersion.ingenicoISelfCC = "N/A";
|
||||||
|
12
main.cpp
12
main.cpp
@ -112,24 +112,14 @@ int main(int argc, char *argv[]) {
|
|||||||
QCoreApplication::translate("main", "Start ATBUpdateTool in dry-run-mode. No actual actions."));
|
QCoreApplication::translate("main", "Start ATBUpdateTool in dry-run-mode. No actual actions."));
|
||||||
parser.addOption(dryRunOption);
|
parser.addOption(dryRunOption);
|
||||||
|
|
||||||
QCommandLineOption extendedVersionOption(QStringList() << "V" << "extended-version",
|
|
||||||
QCoreApplication::translate("main", "Show extended version (including last git commit)."));
|
|
||||||
parser.addOption(extendedVersionOption);
|
|
||||||
|
|
||||||
// Process the actual command line arguments given by the user
|
// Process the actual command line arguments given by the user
|
||||||
parser.process(a);
|
parser.process(a);
|
||||||
QString plugInDir = parser.value(pluginDirectoryOption);
|
QString plugInDir = parser.value(pluginDirectoryOption);
|
||||||
QString plugInName = parser.value(pluginNameOption);
|
QString plugInName = parser.value(pluginNameOption);
|
||||||
QString workingDir = parser.value(workingDirectoryOption);
|
QString workingDir = parser.value(workingDirectoryOption);
|
||||||
bool const dryRun = parser.isSet(dryRunOption);
|
bool dryRun = parser.isSet(dryRunOption);
|
||||||
bool const showExtendedVersion = parser.isSet(extendedVersionOption);
|
|
||||||
QString const rtPath = QCoreApplication::applicationDirPath();
|
QString const rtPath = QCoreApplication::applicationDirPath();
|
||||||
|
|
||||||
if (showExtendedVersion) {
|
|
||||||
printf(APP_EXTENDED_VERSION"\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!QDir(plugInDir).exists()) {
|
if (!QDir(plugInDir).exists()) {
|
||||||
qCritical() << plugInDir
|
qCritical() << plugInDir
|
||||||
<< "does not exists, but has to contain dc-library";
|
<< "does not exists, but has to contain dc-library";
|
||||||
|
16
worker.cpp
16
worker.cpp
@ -58,7 +58,6 @@ Worker::Worker(int customerNr,
|
|||||||
, m_gc(m_customerNrStr, m_customerRepository, m_workingDirectory, m_branchName, this)
|
, m_gc(m_customerNrStr, m_customerRepository, m_workingDirectory, m_branchName, this)
|
||||||
, m_osVersion(getOsVersion())
|
, m_osVersion(getOsVersion())
|
||||||
, m_atbqtVersion(getATBQTVersion())
|
, m_atbqtVersion(getATBQTVersion())
|
||||||
, m_atbUpdateToolVersion(getATBUpdateToolVersion())
|
|
||||||
, m_cpuSerial(getCPUSerial())
|
, m_cpuSerial(getCPUSerial())
|
||||||
, m_pluginVersionATBDeciceController(getPluginVersion("/opt/app/ATBAPP/plugins/libATBDeviceControllerPlugin.so"))
|
, m_pluginVersionATBDeciceController(getPluginVersion("/opt/app/ATBAPP/plugins/libATBDeviceControllerPlugin.so"))
|
||||||
, m_pluginVersionIngenicoISelf(getPluginVersion("/opt/app/ATBAPP/plugins/libIngenicoISelf_CCPlugin.so"))
|
, m_pluginVersionIngenicoISelf(getPluginVersion("/opt/app/ATBAPP/plugins/libIngenicoISelf_CCPlugin.so"))
|
||||||
@ -72,7 +71,6 @@ Worker::Worker(int customerNr,
|
|||||||
, m_filesToUpdate()
|
, m_filesToUpdate()
|
||||||
, m_updateProcessRunning(true)
|
, m_updateProcessRunning(true)
|
||||||
, m_returnCode(0)
|
, m_returnCode(0)
|
||||||
, m_mainWindow(nullptr) /* contains plugin */
|
|
||||||
, m_progressValue(0)
|
, m_progressValue(0)
|
||||||
//, m_withoutIsmasDirectPort(true) /* useful for testing */ {
|
//, m_withoutIsmasDirectPort(true) /* useful for testing */ {
|
||||||
, m_withoutIsmasDirectPort(false) /* useful for testing */ {
|
, m_withoutIsmasDirectPort(false) /* useful for testing */ {
|
||||||
@ -80,6 +78,12 @@ Worker::Worker(int customerNr,
|
|||||||
this->setObjectName("worker-object");
|
this->setObjectName("worker-object");
|
||||||
QDir::setCurrent(m_workingDirectory);
|
QDir::setCurrent(m_workingDirectory);
|
||||||
|
|
||||||
|
// restart apism to make sure it is running ?
|
||||||
|
// Command c("systemctl restart apism");
|
||||||
|
// if (c.execute("/tmp")) {
|
||||||
|
// QThread::sleep(10); // give APISM some time to reconnect
|
||||||
|
// }
|
||||||
|
|
||||||
if (std::optional<QString> v = getApismVersion()) {
|
if (std::optional<QString> v = getApismVersion()) {
|
||||||
m_apismVersion = v.value();
|
m_apismVersion = v.value();
|
||||||
}
|
}
|
||||||
@ -99,7 +103,6 @@ Worker::Worker(int customerNr,
|
|||||||
qInfo() << "PLUGIN_NAME ................" << m_pluginName;
|
qInfo() << "PLUGIN_NAME ................" << m_pluginName;
|
||||||
qInfo() << "WORKING_DIRECTORY .........." << m_workingDirectory;
|
qInfo() << "WORKING_DIRECTORY .........." << m_workingDirectory;
|
||||||
qInfo() << "APISM VERSION .............." << m_apismVersion;
|
qInfo() << "APISM VERSION .............." << m_apismVersion;
|
||||||
qInfo() << "ATB UPDATE TOOL VERSION ...." << m_atbUpdateToolVersion;
|
|
||||||
|
|
||||||
this->moveToThread(&m_workerThread);
|
this->moveToThread(&m_workerThread);
|
||||||
m_workerThread.start();
|
m_workerThread.start();
|
||||||
@ -990,10 +993,6 @@ QString Worker::getATBQTVersion() const {
|
|||||||
return "N/A";
|
return "N/A";
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Worker::getATBUpdateToolVersion() const {
|
|
||||||
return APP_EXTENDED_VERSION;
|
|
||||||
}
|
|
||||||
|
|
||||||
QString Worker::getCPUSerial() const {
|
QString Worker::getCPUSerial() const {
|
||||||
QString const cmd = QString("echo -n $(cat /proc/cpuinfo | grep -i Serial | cut -d':' -f2)");
|
QString const cmd = QString("echo -n $(cat /proc/cpuinfo | grep -i Serial | cut -d':' -f2)");
|
||||||
Command c("bash");
|
Command c("bash");
|
||||||
@ -1137,8 +1136,7 @@ PSAInstalled Worker::getPSAInstalled() {
|
|||||||
if (std::optional<QString> v = getApismVersion()) {
|
if (std::optional<QString> v = getApismVersion()) {
|
||||||
psaInstalled.sw.apismVersion = v.value();
|
psaInstalled.sw.apismVersion = v.value();
|
||||||
}
|
}
|
||||||
psaInstalled.sw.atbQTVersion = getATBQTVersion();
|
psaInstalled.sw.atbQTVersion = m_atbqtVersion;
|
||||||
psaInstalled.sw.atbUpdateToolVersion = m_atbUpdateToolVersion;
|
|
||||||
|
|
||||||
psaInstalled.pluginVersion.deviceController = m_pluginVersionATBDeciceController;
|
psaInstalled.pluginVersion.deviceController = m_pluginVersionATBDeciceController;
|
||||||
psaInstalled.pluginVersion.ingenicoISelfCC = m_pluginVersionIngenicoISelf;
|
psaInstalled.pluginVersion.ingenicoISelfCC = m_pluginVersionIngenicoISelf;
|
||||||
|
3
worker.h
3
worker.h
@ -92,7 +92,6 @@ class Worker : public QObject {
|
|||||||
GitClient m_gc;
|
GitClient m_gc;
|
||||||
QString const m_osVersion;
|
QString const m_osVersion;
|
||||||
QString const m_atbqtVersion;
|
QString const m_atbqtVersion;
|
||||||
QString const m_atbUpdateToolVersion;
|
|
||||||
QString const m_cpuSerial;
|
QString const m_cpuSerial;
|
||||||
QString const m_pluginVersionATBDeciceController;
|
QString const m_pluginVersionATBDeciceController;
|
||||||
QString const m_pluginVersionIngenicoISelf;
|
QString const m_pluginVersionIngenicoISelf;
|
||||||
@ -120,7 +119,6 @@ class Worker : public QObject {
|
|||||||
bool executeOpkgCommand(QString opkgCommand);
|
bool executeOpkgCommand(QString opkgCommand);
|
||||||
QString getOsVersion() const;
|
QString getOsVersion() const;
|
||||||
QString getATBQTVersion() const;
|
QString getATBQTVersion() const;
|
||||||
QString getATBUpdateToolVersion() const;
|
|
||||||
QString getCPUSerial() const;
|
QString getCPUSerial() const;
|
||||||
QString getRaucVersion() const;
|
QString getRaucVersion() const;
|
||||||
QString getOpkgVersion() const;
|
QString getOpkgVersion() const;
|
||||||
@ -164,7 +162,6 @@ public:
|
|||||||
int customerNr() const { return m_customerNr; }
|
int customerNr() const { return m_customerNr; }
|
||||||
int zoneNr() const { return m_zoneNr; }
|
int zoneNr() const { return m_zoneNr; }
|
||||||
QString apismVersion() const { return m_apismVersion; }
|
QString apismVersion() const { return m_apismVersion; }
|
||||||
QString atbUpdateToolVersion() const { return m_atbUpdateToolVersion; }
|
|
||||||
|
|
||||||
MainWindow *mainWindow() { return m_mainWindow; }
|
MainWindow *mainWindow() { return m_mainWindow; }
|
||||||
MainWindow const *mainWindow() const { return m_mainWindow; }
|
MainWindow const *mainWindow() const { return m_mainWindow; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user