diff options
| author | Eran Mizrahi <erasmux@gmail.com> | 2018-01-04 20:53:24 +0200 |
|---|---|---|
| committer | Eran Mizrahi <erasmux@gmail.com> | 2018-01-04 21:01:30 +0200 |
| commit | 58ec83f8c86784b7ea1bfcc67d575c91606beca8 (patch) | |
| tree | 0b022eb6fd39fcefb8100a3d1e25d13150efba40 /src | |
| parent | d06972729d8410451266988a650633085b6441e8 (diff) | |
Log the MO version for diagnostic purposes
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp index 4c5ac75c..3e02a4a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -419,10 +419,28 @@ void setupPath() ::SetEnvironmentVariableW(L"PATH", newPath.c_str());
}
+static QString getVersionDisplayString()
+{
+ VS_FIXEDFILEINFO version = GetFileVersion(ToWString(QApplication::applicationFilePath()));
+ return VersionInfo(version.dwFileVersionMS >> 16,
+ version.dwFileVersionMS & 0xFFFF,
+ version.dwFileVersionLS >> 16,
+ version.dwFileVersionLS & 0xFFFF).displayString();
+}
+
int runApplication(MOApplication &application, SingleInstance &instance,
const QString &splashPath)
{
- qDebug("start main application");
+
+ qDebug("Starting Mod Organizer version %s revision %s", qPrintable(getVersionDisplayString()),
+#if defined(HGID)
+ HGID
+#elif defined(GITID)
+ GITID
+#else
+ "unknown"
+#endif
+ );
QString dataPath = application.property("dataPath").toString();
qDebug("data path: %s", qPrintable(dataPath));
|
