diff --git a/externals b/externals index 1051e314b..974625705 160000 --- a/externals +++ b/externals @@ -1 +1 @@ -Subproject commit 1051e314bf7f7143223e7af5b15cfb4255164172 +Subproject commit 97462570553ae7bf517e0be272c1f7892b25d402 diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index 1aa8b8b6e..dd34882a7 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -1082,10 +1082,12 @@ namespace BlackCore static const QString extension = CBuildConfig::isRunningOnWindowsNtPlatform() ? ".exe" : QString(); static const QString handler = CDirectoryUtils::applicationDirectoryPath() + "/" + "swift_crashpad_handler" + extension; - static const QString database = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + + static const QString crashpadPath = QStandardPaths::writableLocation(QStandardPaths::GenericDataLocation) + "/org.swift-project/" + CDirectoryUtils::normalizedApplicationDirectory() + "/crashpad"; + static const QString database = crashpadPath + "/database"; + static const QString metrics = crashpadPath + "/metrics"; if (!QFileInfo::exists(handler)) { @@ -1104,9 +1106,8 @@ namespace BlackCore auto settings = m_crashReportDatabase->GetSettings(); settings->SetUploadsEnabled(CBuildConfig::isReleaseBuild() && m_crashDumpUploadEnabled.getThreadLocal()); m_crashpadClient = std::make_unique(); - m_crashpadClient->StartHandler(qstringToFilePath(handler), qstringToFilePath(database), - serverUrl.getFullUrl().toStdString(), annotations, {}, false); - m_crashpadClient->UseHandler(); + m_crashpadClient->StartHandler(qstringToFilePath(handler), qstringToFilePath(database), qstringToFilePath(metrics), + serverUrl.getFullUrl().toStdString(), annotations, {}, false, true); return CStatusMessage(this).info("Using crash handler"); #else return CStatusMessage(this).info("Not using crash handler"); diff --git a/src/blackcore/blackcore.pro b/src/blackcore/blackcore.pro index 9b8293600..9efabce67 100644 --- a/src/blackcore/blackcore.pro +++ b/src/blackcore/blackcore.pro @@ -41,8 +41,8 @@ DESTDIR = $$DestRoot/lib DLLDESTDIR = $$DestRoot/bin msvc { - CONFIG(debug, debug|release): LIBS *= -lcrashpad_clientd -lcrashpad_utild -lbased -lRpcrt4 - CONFIG(release, debug|release): LIBS *= -lcrashpad_client -lcrashpad_util -lbase -lRpcrt4 + CONFIG(debug, debug|release): LIBS *= -lcrashpad_clientd -lcrashpad_utild -lbased -lRpcrt4 -lAdvapi32 + CONFIG(release, debug|release): LIBS *= -lcrashpad_client -lcrashpad_util -lbase -lRpcrt4 -lAdvapi32 } macx: LIBS *= -lcrashpad_client -lcrashpad_util -lbase -lbsm -framework Security