2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

instructions updated for zlib

This commit is contained in:
John Preston
2016-02-02 15:50:12 +03:00
parent 3e1362628f
commit f7f041f11d
7 changed files with 64 additions and 18 deletions

View File

@@ -715,7 +715,8 @@ namespace SignalHandlers {
if (!LoggingCrashHeaderWritten) {
LoggingCrashHeaderWritten = true;
for (AnnotationsMap::const_iterator i = ProcessAnnotations.cbegin(), e = ProcessAnnotations.cend(); i != e; ++i) {
const AnnotationsMap c_ProcessAnnotations(ProcessAnnotations);
for (AnnotationsMap::const_iterator i = c_ProcessAnnotations.begin(), e = c_ProcessAnnotations.end(); i != e; ++i) {
dump() << i->first.c_str() << ": " << i->second.c_str() << "\n";
}
psWriteDump();
@@ -839,11 +840,11 @@ namespace SignalHandlers {
#endif
void StartBreakpad() {
ProcessAnnotations["Binary"] = cExeName().toUtf8().toStdString();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().toStdString();
ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cDevVersion() ? qsl("%1 dev") : qsl("%1")).arg(AppVersion)).toUtf8().toStdString();
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().toStdString();
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().toStdString();
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData();
ProcessAnnotations["Version"] = (cBetaVersion() ? qsl("%1 beta").arg(cBetaVersion()) : (cDevVersion() ? qsl("%1 dev") : qsl("%1")).arg(AppVersion)).toUtf8().constData();
ProcessAnnotations["Launched"] = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8().constData();
ProcessAnnotations["Platform"] = cPlatformString().toUtf8().constData();
QString dumpspath = cWorkingDir() + qsl("tdata/dumps");
QDir().mkpath(dumpspath);
@@ -870,8 +871,8 @@ namespace SignalHandlers {
SetSignalHandlers = false;
#else
crashpad::CrashpadClient crashpad_client;
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().toStdString();
std::string database = dumpspath.toUtf8().toStdString();
std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData();
std::string database = dumpspath.toUtf8().constData();
if (crashpad_client.StartHandler(base::FilePath(handler),
base::FilePath(database),
std::string(),

View File

@@ -61,9 +61,7 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) {
return i.value();
}
InterfaceWrapStruct InterfaceWraps[64] = {
{ 0, 0, 0 }
};
InterfaceWrapStruct InterfaceWraps[64];
QAtomicInt InterfaceIndexLast(0);

View File

@@ -25,6 +25,13 @@ typedef void(*InterfaceConstruct)(void *location, Interfaces *interfaces);
typedef void(*InterfaceDestruct)(void *location);
struct InterfaceWrapStruct {
InterfaceWrapStruct() : Size(0), Construct(0), Destruct(0) {
}
InterfaceWrapStruct(int size, InterfaceConstruct construct, InterfaceDestruct destruct)
: Size(size)
, Construct(construct)
, Destruct(destruct) {
}
int Size;
InterfaceConstruct Construct;
InterfaceDestruct Destruct;
@@ -62,7 +69,7 @@ public:
if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) {
t_assert(last < 64);
if (_index.testAndSetOrdered(0, last + 1)) {
InterfaceWraps[last] = { InterfaceWrapTemplate<Type>::Size, InterfaceWrapTemplate<Type>::Construct, InterfaceWrapTemplate<Type>::Destruct };
InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate<Type>::Size, InterfaceWrapTemplate<Type>::Construct, InterfaceWrapTemplate<Type>::Destruct);
}
break;
}