mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Move system versions to platform/platform_info.
This commit is contained in:
@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "core/crash_reports.h"
|
||||
|
||||
#include "platform/platform_specific.h"
|
||||
#include "platform/platform_info.h"
|
||||
#include "core/launcher.h"
|
||||
|
||||
#include <signal.h>
|
||||
@@ -320,13 +321,32 @@ bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context,
|
||||
|
||||
} // namespace
|
||||
|
||||
QString PlatformString() {
|
||||
if (Platform::IsWindowsStoreBuild()) {
|
||||
return qsl("WinStore");
|
||||
} else if (Platform::IsWindows()) {
|
||||
return qsl("Windows");
|
||||
} else if (Platform::IsMacStoreBuild()) {
|
||||
return qsl("MacAppStore");
|
||||
} else if (Platform::IsMacOldBuild()) {
|
||||
return qsl("MacOSold");
|
||||
} else if (Platform::IsMac()) {
|
||||
return qsl("MacOS");
|
||||
} else if (Platform::IsLinux32Bit()) {
|
||||
return qsl("Linux32Bit");
|
||||
} else if (Platform::IsLinux64Bit()) {
|
||||
return qsl("Linux64bit");
|
||||
}
|
||||
Unexpected("Platform in CrashReports::PlatformString.");
|
||||
}
|
||||
|
||||
void StartCatching(not_null<Core::Launcher*> launcher) {
|
||||
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS
|
||||
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
|
||||
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData();
|
||||
ProcessAnnotations["Version"] = (cAlphaVersion() ? qsl("%1 alpha").arg(cAlphaVersion()) : (AppBetaVersion ? qsl("%1 beta") : qsl("%1")).arg(AppVersion)).toUtf8().constData();
|
||||
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
|
||||
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().constData();
|
||||
ProcessAnnotations["Platform"] = PlatformString().toUtf8().constData();
|
||||
ProcessAnnotations["UserTag"] = QString::number(launcher->installationTag(), 16).toUtf8().constData();
|
||||
|
||||
QString dumpspath = cWorkingDir() + qsl("tdata/dumps");
|
||||
|
Reference in New Issue
Block a user