|
23 | 23 | #include "shared/updates/updates.h" |
24 | 24 | #include "shared/utils/container.h" |
25 | 25 | #include "shared/utils/preferences.h" |
| 26 | +#include "shared/utils/consolecapture.h" |
26 | 27 |
|
27 | 28 | #include <QApplication> |
28 | 29 | #include <QQmlApplicationEngine> |
|
34 | 35 | #include <QTemporaryDir> |
35 | 36 | #include <QRegularExpression> |
36 | 37 | #include <QQuickStyle> |
| 38 | +#include <QStandardPaths> |
37 | 39 |
|
38 | 40 | #include <QDebug> |
39 | 41 |
|
@@ -74,11 +76,6 @@ QStringList showUpdater(int argc, char *argv[]) |
74 | 76 | QStringLiteral(R"(\1)")); |
75 | 77 | auto exe = unquotedArguments.at(0); |
76 | 78 |
|
77 | | - QApplication::setOrganizationName(QStringLiteral("Graphia")); |
78 | | - QApplication::setOrganizationDomain(QStringLiteral("graphia.app")); |
79 | | - QApplication::setApplicationName(QStringLiteral(PRODUCT_NAME)); |
80 | | - QApplication::setApplicationVersion(QStringLiteral(VERSION)); |
81 | | - |
82 | 79 | Q_INIT_RESOURCE(shared); |
83 | 80 | Q_INIT_RESOURCE(update_keys); |
84 | 81 |
|
@@ -156,6 +153,15 @@ QStringList showUpdater(int argc, char *argv[]) |
156 | 153 | // NOLINTNEXTLINE bugprone-exception-escape |
157 | 154 | int main(int argc, char *argv[]) |
158 | 155 | { |
| 156 | + QApplication::setOrganizationName(QStringLiteral("Graphia")); |
| 157 | + QApplication::setOrganizationDomain(QStringLiteral("graphia.app")); |
| 158 | + QApplication::setApplicationName(QStringLiteral(PRODUCT_NAME)); |
| 159 | + QApplication::setApplicationVersion(QStringLiteral(VERSION)); |
| 160 | + |
| 161 | + auto consoleOutputFiles = captureConsoleOutput( |
| 162 | + QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation), |
| 163 | + QStringLiteral("updater")); |
| 164 | + |
159 | 165 | QStringList arguments = showUpdater(argc, argv); |
160 | 166 | if(arguments.isEmpty()) |
161 | 167 | { |
|
0 commit comments