From 42d9537ad13c0a9446dfa150c22fd214552e92aa Mon Sep 17 00:00:00 2001 From: Heejune Kim Date: Sun, 13 Dec 2015 20:40:57 +0900 Subject: [PATCH 001/133] Resolving a bug #1247 (Sending files to channels) Signed-off-by: Heejune Kim (github: heejune) --- Telegram/SourceFiles/historywidget.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 02762346c98d22..afe6316dfd48df 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4575,6 +4575,8 @@ void HistoryWidget::onDocumentSelect() { void HistoryWidget::dragEnterEvent(QDragEnterEvent *e) { if (!_history) return; + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + _attachDrag = getDragState(e->mimeData()); updateDragAreas(); @@ -4876,6 +4878,8 @@ void HistoryWidget::onPhotoDrop(const QMimeData *data) { void HistoryWidget::onDocumentDrop(const QMimeData *data) { if (!_history) return; + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + QStringList files = getMediasFromMime(data); if (files.isEmpty()) return; @@ -4883,6 +4887,9 @@ void HistoryWidget::onDocumentDrop(const QMimeData *data) { } void HistoryWidget::onFilesDrop(const QMimeData *data) { + + if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + QStringList files = getMediasFromMime(data); if (files.isEmpty()) { if (data->hasImage()) { From 4ee52afc4d0c408d870dd2799435372084e19ed1 Mon Sep 17 00:00:00 2001 From: Heejune Kim Date: Fri, 18 Dec 2015 10:48:29 +0900 Subject: [PATCH 002/133] Fix a build error when TDESKTOP_DISABLE_AUTOUPDATE preprocessor defined Signed-off-by: Heejune Kim (github: heejune) --- Telegram/SourceFiles/autoupdater.cpp | 3 ++- Telegram/SourceFiles/autoupdater.h | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index d560cfbc60822f..a34a471c6e1f8e 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -569,6 +569,8 @@ bool checkReadyUpdate() { return true; } +#endif + QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp if (cBetaPrivateKey().isEmpty()) { LOG(("Error: Trying to count beta version signature without beta private key!")); @@ -613,4 +615,3 @@ QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp return QString::fromUtf8(signature.mid(19, 32)); } -#endif diff --git a/Telegram/SourceFiles/autoupdater.h b/Telegram/SourceFiles/autoupdater.h index 0bee6fae304c7c..e15d7fe09e41b6 100644 --- a/Telegram/SourceFiles/autoupdater.h +++ b/Telegram/SourceFiles/autoupdater.h @@ -66,6 +66,11 @@ public slots: bool checkReadyUpdate(); -QString countBetaVersionSignature(uint64 version); +#else +class UpdateDownloader : public QObject { + Q_OBJECT +}; #endif + +QString countBetaVersionSignature(uint64 version); From 58777dbc21b39f5dd4b0b19e01470514bf37e84a Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 11 Jan 2016 23:43:29 +0800 Subject: [PATCH 003/133] moved almost all Application to AppClass (autoupdate and singleinstance left), logs rewritten --- Telegram/SourceFiles/app.cpp | 10 +- Telegram/SourceFiles/app.h | 4 +- Telegram/SourceFiles/application.cpp | 1215 +++++++++-------- Telegram/SourceFiles/application.h | 190 ++- Telegram/SourceFiles/audio.cpp | 2 +- Telegram/SourceFiles/autoupdater.cpp | 59 +- Telegram/SourceFiles/autoupdater.h | 8 +- Telegram/SourceFiles/boxes/aboutbox.cpp | 2 +- Telegram/SourceFiles/boxes/addcontactbox.cpp | 2 +- Telegram/SourceFiles/boxes/confirmbox.cpp | 4 +- Telegram/SourceFiles/boxes/usernamebox.cpp | 2 +- Telegram/SourceFiles/facades.cpp | 139 +- Telegram/SourceFiles/facades.h | 29 +- Telegram/SourceFiles/gui/button.cpp | 1 - Telegram/SourceFiles/gui/popupmenu.cpp | 2 +- Telegram/SourceFiles/gui/text.cpp | 9 - Telegram/SourceFiles/history.cpp | 4 +- Telegram/SourceFiles/intro/intro.cpp | 2 +- Telegram/SourceFiles/intro/introphone.cpp | 6 +- Telegram/SourceFiles/intro/introsteps.cpp | 2 +- Telegram/SourceFiles/localstorage.cpp | 21 +- Telegram/SourceFiles/localstorage.h | 2 +- Telegram/SourceFiles/logs.cpp | 578 ++++---- Telegram/SourceFiles/logs.h | 107 +- Telegram/SourceFiles/main.cpp | 65 +- Telegram/SourceFiles/mainwidget.cpp | 2 +- Telegram/SourceFiles/mediaview.cpp | 8 +- Telegram/SourceFiles/mtproto/generate.py | 5 +- Telegram/SourceFiles/mtproto/mtpAuthKey.h | 2 +- .../SourceFiles/mtproto/mtpConnection.cpp | 152 +-- Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp | 8 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 9 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 3 - Telegram/SourceFiles/mtproto/mtpScheme.h | 4 - Telegram/SourceFiles/mtproto/mtpSession.cpp | 8 +- Telegram/SourceFiles/pspecific.h | 9 + Telegram/SourceFiles/pspecific_linux.cpp | 90 +- Telegram/SourceFiles/pspecific_linux.h | 27 +- Telegram/SourceFiles/pspecific_mac.cpp | 29 +- Telegram/SourceFiles/pspecific_mac.h | 24 +- Telegram/SourceFiles/pspecific_mac_p.mm | 48 +- Telegram/SourceFiles/pspecific_wnd.cpp | 86 +- Telegram/SourceFiles/pspecific_wnd.h | 15 +- Telegram/SourceFiles/settings.cpp | 17 +- Telegram/SourceFiles/settings.h | 14 +- Telegram/SourceFiles/settingswidget.cpp | 22 +- Telegram/SourceFiles/stdafx.h | 2 + Telegram/SourceFiles/sysbuttons.cpp | 4 +- Telegram/SourceFiles/title.cpp | 12 +- Telegram/SourceFiles/types.cpp | 64 +- Telegram/SourceFiles/types.h | 18 +- Telegram/SourceFiles/window.cpp | 2 +- Telegram/Telegram.pro | 4 +- Telegram/Telegram.vcxproj | 260 ++-- Telegram/Telegram.xcodeproj/project.pbxproj | 2 - 55 files changed, 1773 insertions(+), 1642 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index c375fea478e435..e12b643c21d3b9 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -151,12 +151,12 @@ namespace App { return result; } - Application *app() { - return Application::app(); + AppClass *app() { + return AppClass::app(); } Window *wnd() { - return Application::wnd(); + return AppClass::wnd(); } MainWidget *main() { @@ -2279,9 +2279,7 @@ namespace App { if (wnd()) { wnd()->quit(); } - if (app()) { - app()->quit(); - } + Application::quit(); } bool quiting() { diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index c01fdf9802445c..4e556473404a7b 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -22,7 +22,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "types.h" -class Application; +class AppClass; class Window; class MainWidget; class SettingsWidget; @@ -59,7 +59,7 @@ struct ReplyMarkup { class LayeredWidget; namespace App { - Application *app(); + AppClass *app(); Window *wnd(); MainWidget *main(); SettingsWidget *settings(); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 856174b53f8e66..794503b956999b 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -35,10 +35,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "autoupdater.h" namespace { - Application *mainApp = 0; - FileUploader *uploader = 0; - QString lng; - void mtpStateChanged(int32 dc, int32 state) { if (App::wnd()) { App::wnd()->mtpStateChanged(dc, state); @@ -55,7 +51,6 @@ namespace { public: EventFilterForKeys(QObject *parent) : QObject(parent) { - } bool eventFilter(QObject *o, QEvent *e) { if (e->type() == QEvent::KeyPress) { @@ -94,121 +89,292 @@ namespace { } }; + + QChar _toHex(ushort v) { + v = v & 0x000F; + return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v)); + } + ushort _fromHex(QChar c) { + return ((c.unicode() >= uchar('a')) ? (c.unicode() - uchar('a') + 10) : (c.unicode() - uchar('0'))) & 0x000F; + } + + QString _escapeTo7bit(const QString &str) { + QString result; + result.reserve(str.size() * 2); + for (int i = 0, l = str.size(); i != l; ++i) { + QChar ch(str.at(i)); + ushort uch(ch.unicode()); + if (uch < 32 || uch > 127 || uch == ushort(uchar('%'))) { + result.append('%').append(_toHex(uch >> 12)).append(_toHex(uch >> 8)).append(_toHex(uch >> 4)).append(_toHex(uch)); + } else { + result.append(ch); + } + } + return result; + } + + QString _escapeFrom7bit(const QString &str) { + QString result; + result.reserve(str.size()); + for (int i = 0, l = str.size(); i != l; ++i) { + QChar ch(str.at(i)); + if (ch == QChar::fromLatin1('%') && i + 4 < l) { + result.append(QChar(ushort((_fromHex(str.at(i + 1)) << 12) | (_fromHex(str.at(i + 2)) << 8) | (_fromHex(str.at(i + 3)) << 4) | _fromHex(str.at(i + 4))))); + i += 4; + } else { + result.append(ch); + } + } + return result; + } } -Application::Application(int &argc, char **argv) : PsApplication(argc, argv), - serverName(psServerPrefix() + cGUIDStr()), closing(false), - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - updateRequestId(0), updateReply(0), updateThread(0), updateDownloader(0), - #endif - _translator(0) { +AppClass *AppObject = 0; - DEBUG_LOG(("Application Info: creation..")); +Application::Application(int &argc, char **argv) : QApplication(argc, argv) +, _secondInstance(false) +#ifndef TDESKTOP_DISABLE_AUTOUPDATE +, _updateReply(0) +, _updateThread(0) +, _updateChecker(0) +#endif +{ + if (!Logs::started()) { + // show error window + quit(); + return; + } - QByteArray d(QDir((cPlatform() == dbipWindows ? cExeDir() : cWorkingDir()).toLower()).absolutePath().toUtf8()); + QByteArray d(QDir(cWorkingDir()).absolutePath().toUtf8()); char h[33] = { 0 }; hashMd5Hex(d.constData(), d.size(), h); - serverName = psServerPrefix() + h + '-' + cGUIDStr(); + _localServerName = psServerPrefix() + h + '-' + cGUIDStr(); + + connect(&_localSocket, SIGNAL(connected()), this, SLOT(socketConnected())); + connect(&_localSocket, SIGNAL(disconnected()), this, SLOT(socketDisconnected())); + connect(&_localSocket, SIGNAL(error(QLocalSocket::LocalSocketError)), this, SLOT(socketError(QLocalSocket::LocalSocketError))); + connect(&_localSocket, SIGNAL(bytesWritten(qint64)), this, SLOT(socketWritten(qint64))); + connect(&_localSocket, SIGNAL(readyRead()), this, SLOT(socketReading())); + connect(&_localSocket, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + connect(&_updateCheckTimer, SIGNAL(timeout()), this, SLOT(updateCheck())); + connect(this, SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + connect(this, SIGNAL(updateReady()), this, SLOT(onUpdateReady())); +#endif - if (mainApp) { - DEBUG_LOG(("Application Error: another Application was created, terminating..")); - exit(0); + if (cManyInstance()) { + singleInstanceChecked(); + } else { + DEBUG_LOG(("Application Info: connecting local socket to %1..").arg(_localServerName)); + _localSocket.connectToServer(_localServerName); } - mainApp = this; +} - installEventFilter(new EventFilterForKeys(this)); +Application::~Application() { + App::setQuiting(); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Regular.ttf")); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Bold.ttf")); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Semibold.ttf")); + Global::finish(); - float64 dpi = primaryScreen()->logicalDotsPerInch(); - if (dpi <= 108) { // 0-96-108 - cSetScreenScale(dbisOne); - } else if (dpi <= 132) { // 108-120-132 - cSetScreenScale(dbisOneAndQuarter); - } else if (dpi <= 168) { // 132-144-168 - cSetScreenScale(dbisOneAndHalf); - } else { // 168-192-inf - cSetScreenScale(dbisTwo); + delete AppObject; + + _localSocket.close(); + closeApplication(); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + delete _updateReply; + _updateReply = 0; + if (_updateChecker) _updateChecker->deleteLater(); + _updateChecker = 0; + if (_updateThread) _updateThread->quit(); + _updateThread = 0; +#endif +} + + +void Application::socketConnected() { + DEBUG_LOG(("Application Info: socket connected, this is not the first application instance, sending show command..")); + _secondInstance = true; + + QString commands; + const QStringList &lst(cSendPaths()); + for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { + commands += qsl("SEND:") + _escapeTo7bit(*i) + ';'; + } + if (!cStartUrl().isEmpty()) { + commands += qsl("OPEN:") + _escapeTo7bit(cStartUrl()) + ';'; } + commands += qsl("CMD:show;"); - if (devicePixelRatio() > 1) { - cSetRetina(true); - cSetRetinaFactor(devicePixelRatio()); - cSetIntRetinaFactor(int32(cRetinaFactor())); - cSetConfigScale(dbisOne); - cSetRealScale(dbisOne); - } + DEBUG_LOG(("Application Info: writing commands %1").arg(commands)); + _localSocket.write(commands.toLatin1()); +} - if (cLang() < languageTest) { - cSetLang(languageId()); +void Application::socketWritten(qint64/* bytes*/) { + if (_localSocket.state() != QLocalSocket::ConnectedState) { + DEBUG_LOG(("Application Error: socket is not connected %1").arg(_localSocket.state())); + return; } - if (cLang() == languageTest) { - if (QFileInfo(cLangFile()).exists()) { - LangLoaderPlain loader(cLangFile()); - cSetLangErrors(loader.errors()); - if (!cLangErrors().isEmpty()) { - LOG(("Lang load errors: %1").arg(cLangErrors())); - } else if (!loader.warnings().isEmpty()) { - LOG(("Lang load warnings: %1").arg(loader.warnings())); - } - } else { - cSetLang(languageDefault); - } - } else if (cLang() > languageDefault && cLang() < languageCount) { - LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[cLang()] + qsl(".strings")); - if (!loader.errors().isEmpty()) { - LOG(("Lang load errors: %1").arg(loader.errors())); - } else if (!loader.warnings().isEmpty()) { - LOG(("Lang load warnings: %1").arg(loader.warnings())); - } + if (_localSocket.bytesToWrite()) { + return; } + DEBUG_LOG(("Application Info: show command written, waiting response..")); +} - installTranslator(_translator = new Translator()); +void Application::socketReading() { + if (_localSocket.state() != QLocalSocket::ConnectedState) { + DEBUG_LOG(("Application Error: socket is not connected %1").arg(_localSocket.state())); + return; + } + _localSocketReadData.append(_localSocket.readAll()); + if (QRegularExpression("RES:(\\d+);").match(_localSocketReadData).hasMatch()) { + uint64 pid = _localSocketReadData.mid(4, _localSocketReadData.length() - 5).toULongLong(); + psActivateProcess(pid); + DEBUG_LOG(("Application Info: show command response received, pid = %1, activating and quiting..").arg(pid)); + return App::quit(); + } +} - style::startManager(); - anim::startManager(); - historyInit(); +void Application::socketError(QLocalSocket::LocalSocketError e) { + if (_secondInstance) { + DEBUG_LOG(("Application Error: could not write show command, error %1, quiting..").arg(e)); + return App::quit(); + } - DEBUG_LOG(("Application Info: inited..")); + if (e == QLocalSocket::ServerNotFoundError) { + DEBUG_LOG(("Application Info: this is the only instance of Telegram, starting server and app..")); + } else { + DEBUG_LOG(("Application Info: socket connect error %1, starting server and app..").arg(e)); + } + _localSocket.close(); - window = new Window(); + psCheckLocalSocket(_localServerName); - psInstallEventFilter(); + if (!_localServer.listen(_localServerName)) { + DEBUG_LOG(("Application Error: failed to start listening to %1 server, error %2").arg(_localServerName).arg(int(_localServer.serverError()))); + return App::quit(); + } - connect(&socket, SIGNAL(connected()), this, SLOT(socketConnected())); - connect(&socket, SIGNAL(disconnected()), this, SLOT(socketDisconnected())); - connect(&socket, SIGNAL(error(QLocalSocket::LocalSocketError)), this, SLOT(socketError(QLocalSocket::LocalSocketError))); - connect(&socket, SIGNAL(bytesWritten(qint64)), this, SLOT(socketWritten(qint64))); - connect(&socket, SIGNAL(readyRead()), this, SLOT(socketReading())); - connect(&server, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(closeApplication())); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - connect(&updateCheckTimer, SIGNAL(timeout()), this, SLOT(startUpdateCheck())); - connect(this, SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); - connect(this, SIGNAL(updateReady()), this, SLOT(onUpdateReady())); - #endif - connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + if (!cNoStartUpdate() && checkReadyUpdate()) { + cSetRestartingUpdate(true); + DEBUG_LOG(("Application Info: installing update instead of starting app..")); + return App::quit(); + } +#endif - connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); + singleInstanceChecked(); +} - connect(&killDownloadSessionsTimer, SIGNAL(timeout()), this, SLOT(killDownloadSessions())); +void Application::singleInstanceChecked() { + Global::start(); - if (cManyInstance()) { - startApp(); - } else { - DEBUG_LOG(("Application Info: connecting local socket to %1..").arg(serverName)); - socket.connectToServer(serverName); + // if crashed, show window and try to autoupdate + + new AppClass(); +} + +void Application::socketDisconnected() { + if (_secondInstance) { + DEBUG_LOG(("Application Error: socket disconnected before command response received, quiting..")); + return App::quit(); + } +} + +void Application::newInstanceConnected() { + DEBUG_LOG(("Application Info: new local socket connected")); + for (QLocalSocket *client = _localServer.nextPendingConnection(); client; client = _localServer.nextPendingConnection()) { + _localClients.push_back(LocalClient(client, QByteArray())); + connect(client, SIGNAL(readyRead()), this, SLOT(readClients())); + connect(client, SIGNAL(disconnected()), this, SLOT(removeClients())); + } +} + +void Application::readClients() { + QString startUrl; + QStringList toSend; + for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) { + i->second.append(i->first->readAll()); + if (i->second.size()) { + QString cmds(QString::fromLatin1(i->second)); + int32 from = 0, l = cmds.length(); + for (int32 to = cmds.indexOf(QChar(';'), from); to >= from; to = (from < l) ? cmds.indexOf(QChar(';'), from) : -1) { + QStringRef cmd(&cmds, from, to - from); + if (cmd.startsWith(qsl("CMD:"))) { + App::app()->execExternal(cmds.mid(from + 4, to - from - 4)); + QByteArray response(qsl("RES:%1;").arg(QCoreApplication::applicationPid()).toLatin1()); + i->first->write(response.data(), response.size()); + } else if (cmd.startsWith(qsl("SEND:"))) { + if (cSendPaths().isEmpty()) { + toSend.append(_escapeFrom7bit(cmds.mid(from + 5, to - from - 5))); + } + } else if (cmd.startsWith(qsl("OPEN:"))) { + if (cStartUrl().isEmpty()) { + startUrl = _escapeFrom7bit(cmds.mid(from + 5, to - from - 5)); + } + } else { + LOG(("Application Error: unknown command %1 passed in local socket").arg(QString(cmd.constData(), cmd.length()))); + } + from = to + 1; + } + if (from > 0) { + i->second = i->second.mid(from); + } + } + } + if (!toSend.isEmpty()) { + QStringList paths(cSendPaths()); + paths.append(toSend); + cSetSendPaths(paths); + } + if (!cSendPaths().isEmpty()) { + if (App::wnd()) { + App::wnd()->sendPaths(); + } + } + if (!startUrl.isEmpty()) { + cSetStartUrl(startUrl); + } + if (!cStartUrl().isEmpty() && App::main() && App::self()) { + App::main()->openLocalUrl(cStartUrl()); + cSetStartUrl(QString()); + } +} + +void Application::removeClients() { + DEBUG_LOG(("Application Info: remove clients slot called, clients %1").arg(_localClients.size())); + for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e;) { + if (i->first->state() != QLocalSocket::ConnectedState) { + DEBUG_LOG(("Application Info: removing client")); + i = _localClients.erase(i); + e = _localClients.end(); + } else { + ++i; + } + } +} + +void Application::closeApplication() { + _localServer.close(); + for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) { + disconnect(i->first, SIGNAL(disconnected()), this, SLOT(removeClients())); + i->first->close(); } + _localClients.clear(); + + MTP::stop(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE +void Application::updateCheck() { + startUpdateCheck(false); +} + void Application::updateGotCurrent() { - if (!updateReply || updateThread) return; + if (!_updateReply || _updateThread) return; cSetLastUpdateCheck(unixtime()); - QRegularExpressionMatch m = QRegularExpression(qsl("^\\s*(\\d+)\\s*:\\s*([\\x21-\\x7f]+)\\s*$")).match(QString::fromLatin1(updateReply->readAll())); + QRegularExpressionMatch m = QRegularExpression(qsl("^\\s*(\\d+)\\s*:\\s*([\\x21-\\x7f]+)\\s*$")).match(QString::fromLatin1(_updateReply->readAll())); if (m.hasMatch()) { uint64 currentVersion = m.captured(1).toULongLong(); QString url = m.captured(2); @@ -218,15 +384,15 @@ void Application::updateGotCurrent() { url = url.mid(5) + '_' + countBetaVersionSignature(currentVersion); } if ((!betaVersion || cBetaVersion()) && currentVersion > (betaVersion ? cBetaVersion() : uint64(AppVersion))) { - updateThread = new QThread(); - connect(updateThread, SIGNAL(finished()), updateThread, SLOT(deleteLater())); - updateDownloader = new UpdateDownloader(updateThread, url); - updateThread->start(); + _updateThread = new QThread(); + connect(_updateThread, SIGNAL(finished()), _updateThread, SLOT(deleteLater())); + _updateChecker = new UpdateChecker(_updateThread, url); + _updateThread->start(); } } - if (updateReply) updateReply->deleteLater(); - updateReply = 0; - if (!updateThread) { + if (_updateReply) _updateReply->deleteLater(); + _updateReply = 0; + if (!_updateThread) { QDir updates(cWorkingDir() + "tupdates"); if (updates.exists()) { QFileInfoList list = updates.entryInfoList(QDir::Files); @@ -244,84 +410,410 @@ void Application::updateGotCurrent() { void Application::updateFailedCurrent(QNetworkReply::NetworkError e) { LOG(("App Error: could not get current version (update check): %1").arg(e)); - if (updateReply) updateReply->deleteLater(); - updateReply = 0; + if (_updateReply) _updateReply->deleteLater(); + _updateReply = 0; emit updateFailed(); startUpdateCheck(true); } void Application::onUpdateReady() { - if (updateDownloader) { - updateDownloader->deleteLater(); - updateDownloader = 0; + if (_updateChecker) { + _updateChecker->deleteLater(); + _updateChecker = 0; } - updateCheckTimer.stop(); + _updateCheckTimer.stop(); cSetLastUpdateCheck(unixtime()); Local::writeSettings(); } void Application::onUpdateFailed() { - if (updateDownloader) { - updateDownloader->deleteLater(); - updateDownloader = 0; - if (updateThread) updateThread->quit(); - updateThread = 0; + if (_updateChecker) { + _updateChecker->deleteLater(); + _updateChecker = 0; + if (_updateThread) _updateThread->quit(); + _updateThread = 0; } cSetLastUpdateCheck(unixtime()); Local::writeSettings(); } -#endif -void Application::regPhotoUpdate(const PeerId &peer, const FullMsgId &msgId) { - photoUpdates.insert(msgId, peer); +Application::UpdatingState Application::updatingState() { + if (!_updateThread) return Application::UpdatingNone; + if (!_updateChecker) return Application::UpdatingReady; + return Application::UpdatingDownload; } -void Application::clearPhotoUpdates() { - photoUpdates.clear(); +int32 Application::updatingSize() { + if (!_updateChecker) return 0; + return _updateChecker->size(); } -bool Application::isPhotoUpdating(const PeerId &peer) { - for (QMap::iterator i = photoUpdates.begin(), e = photoUpdates.end(); i != e; ++i) { - if (i.value() == peer) { - return true; - } - } - return false; +int32 Application::updatingReady() { + if (!_updateChecker) return 0; + return _updateChecker->ready(); } -void Application::cancelPhotoUpdate(const PeerId &peer) { - for (QMap::iterator i = photoUpdates.begin(), e = photoUpdates.end(); i != e;) { - if (i.value() == peer) { - i = photoUpdates.erase(i); - } else { - ++i; - } +void Application::stopUpdate() { + if (_updateReply) { + _updateReply->abort(); + _updateReply->deleteLater(); + _updateReply = 0; + } + if (_updateChecker) { + _updateChecker->deleteLater(); + _updateChecker = 0; + if (_updateThread) _updateThread->quit(); + _updateThread = 0; } } -void Application::mtpPause() { - MTP::pause(); - _mtpUnpauseTimer.start(st::slideDuration * 2); -} +void Application::startUpdateCheck(bool forceWait) { + _updateCheckTimer.stop(); + if (_updateThread || _updateReply || !cAutoUpdate()) return; -void Application::mtpUnpause() { + int32 constDelay = cBetaVersion() ? 600 : UpdateDelayConstPart, randDelay = cBetaVersion() ? 300 : UpdateDelayRandPart; + int32 updateInSecs = cLastUpdateCheck() + constDelay + int32(MTP::nonce() % randDelay) - unixtime(); + bool sendRequest = (updateInSecs <= 0 || updateInSecs > (constDelay + randDelay)); + if (!sendRequest && !forceWait) { + QDir updates(cWorkingDir() + "tupdates"); + if (updates.exists()) { + QFileInfoList list = updates.entryInfoList(QDir::Files); + for (QFileInfoList::iterator i = list.begin(), e = list.end(); i != e; ++i) { + if (QRegularExpression("^(tupdate|tmacupd|tmac32upd|tlinuxupd|tlinux32upd)\\d+(_[a-z\\d]+)?$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) { + sendRequest = true; + } + } + } + } + if (cManyInstance() && !cDebug()) return; // only main instance is updating + + if (sendRequest) { + QUrl url(cUpdateURL()); + if (cBetaVersion()) { + url.setQuery(qsl("version=%1&beta=%2").arg(AppVersion).arg(cBetaVersion())); + } else if (cDevVersion()) { + url.setQuery(qsl("version=%1&dev=1").arg(AppVersion)); + } else { + url.setQuery(qsl("version=%1").arg(AppVersion)); + } + QString u = url.toString(); + QNetworkRequest checkVersion(url); + if (_updateReply) _updateReply->deleteLater(); + + App::setProxySettings(_updateManager); + _updateReply = _updateManager.get(checkVersion); + connect(_updateReply, SIGNAL(finished()), this, SLOT(updateGotCurrent())); + connect(_updateReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(updateFailedCurrent(QNetworkReply::NetworkError))); + emit updateChecking(); + } else { + _updateCheckTimer.start((updateInSecs + 5) * 1000); + } +} + +#endif + +inline Application *application() { + return qobject_cast(QApplication::instance()); +} + +namespace Sandboxer { + + void setClipboardText(const QString &text) { + if (Application *a = application()) { + a->clipboard()->setText(text); + } + } + + QRect availableGeometry() { + if (Application *a = application()) { + return a->desktop()->availableGeometry(); + } + return QDesktopWidget().availableGeometry(); + } + + QRect screenGeometry(const QPoint &p) { + if (Application *a = application()) { + return a->desktop()->screenGeometry(p); + } + return QDesktopWidget().screenGeometry(p); + } + + void setActiveWindow(QWidget *window) { + if (Application *a = application()) { + a->setActiveWindow(window); + } + } + + bool isSavingSession() { + if (Application *a = application()) { + return a->isSavingSession(); + } + return false; + } + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + + void startUpdateCheck() { + if (Application *a = application()) { + return a->startUpdateCheck(false); + } + } + + void stopUpdate() { + if (Application *a = application()) { + return a->stopUpdate(); + } + } + + Application::UpdatingState updatingState() { + if (Application *a = application()) { + return a->updatingState(); + } + return Application::UpdatingNone; + } + + int32 updatingSize() { + if (Application *a = application()) { + return a->updatingSize(); + } + return 0; + } + + int32 updatingReady() { + if (Application *a = application()) { + return a->updatingReady(); + } + return 0; + } + + void updateChecking() { + if (Application *a = application()) { + emit a->updateChecking(); + } + } + + void updateLatest() { + if (Application *a = application()) { + emit a->updateLatest(); + } + } + + void updateProgress(qint64 ready, qint64 total) { + if (Application *a = application()) { + emit a->updateProgress(ready, total); + } + } + + void updateFailed() { + if (Application *a = application()) { + emit a->updateFailed(); + } + } + + void updateReady() { + if (Application *a = application()) { + emit a->updateReady(); + } + } + + void connect(const char *signal, QObject *object, const char *method) { + if (Application *a = application()) { + a->connect(a, signal, object, method); + } + } + +#endif + +} + +AppClass::AppClass() : QObject() +, _uploader(0) { + AppObject = this; + + installSignalHandlers(); + + ThirdParty::start(); + Sandbox::start(); + Local::start(); + if (Local::oldSettingsVersion() < AppVersion) { + psNewVersion(); + } + + if (cLaunchMode() == LaunchModeAutoStart && !cAutoStart()) { + psAutoStart(false, true); + application()->quit(); + return; + } + + application()->installEventFilter(new EventFilterForKeys(this)); + + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Regular.ttf")); + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Bold.ttf")); + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Semibold.ttf")); + + float64 dpi = QApplication::primaryScreen()->logicalDotsPerInch(); + if (dpi <= 108) { // 0-96-108 + cSetScreenScale(dbisOne); + } else if (dpi <= 132) { // 108-120-132 + cSetScreenScale(dbisOneAndQuarter); + } else if (dpi <= 168) { // 132-144-168 + cSetScreenScale(dbisOneAndHalf); + } else { // 168-192-inf + cSetScreenScale(dbisTwo); + } + + if (application()->devicePixelRatio() > 1) { + cSetRetina(true); + cSetRetinaFactor(application()->devicePixelRatio()); + cSetIntRetinaFactor(int32(cRetinaFactor())); + cSetConfigScale(dbisOne); + cSetRealScale(dbisOne); + } + + if (cLang() < languageTest) { + cSetLang(Global::LangSystem()); + } + if (cLang() == languageTest) { + if (QFileInfo(cLangFile()).exists()) { + LangLoaderPlain loader(cLangFile()); + cSetLangErrors(loader.errors()); + if (!cLangErrors().isEmpty()) { + LOG(("Lang load errors: %1").arg(cLangErrors())); + } else if (!loader.warnings().isEmpty()) { + LOG(("Lang load warnings: %1").arg(loader.warnings())); + } + } else { + cSetLang(languageDefault); + } + } else if (cLang() > languageDefault && cLang() < languageCount) { + LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[cLang()] + qsl(".strings")); + if (!loader.errors().isEmpty()) { + LOG(("Lang load errors: %1").arg(loader.errors())); + } else if (!loader.warnings().isEmpty()) { + LOG(("Lang load warnings: %1").arg(loader.warnings())); + } + } + + application()->installTranslator(_translator = new Translator()); + + style::startManager(); + anim::startManager(); + historyInit(); + + DEBUG_LOG(("Application Info: inited..")); + + application()->installNativeEventFilter(psNativeEventFilter()); + + connect(this, SIGNAL(aboutToQuit()), this, SLOT(closeApplication())); + connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); + + connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); + + connect(&killDownloadSessionsTimer, SIGNAL(timeout()), this, SLOT(killDownloadSessions())); + + cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat)); + + DEBUG_LOG(("Application Info: starting app..")); + + QMimeDatabase().mimeTypeForName(qsl("text/plain")); // create mime database + + _window.createWinId(); + _window.init(); + + DEBUG_LOG(("Application Info: window created..")); + + initImageLinkManager(); + App::initMedia(); + + Local::ReadMapState state = Local::readMap(QByteArray()); + if (state == Local::ReadMapPassNeeded) { + cSetHasPasscode(true); + DEBUG_LOG(("Application Info: passcode nneded..")); + } else { + DEBUG_LOG(("Application Info: local map read..")); + MTP::start(); + } + + MTP::setStateChangedHandler(mtpStateChanged); + MTP::setSessionResetHandler(mtpSessionReset); + + DEBUG_LOG(("Application Info: MTP started..")); + + DEBUG_LOG(("Application Info: showing.")); + if (state == Local::ReadMapPassNeeded) { + _window.setupPasscode(false); + } else { + if (MTP::authedId()) { + _window.setupMain(false); + } else { + _window.setupIntro(false); + } + } + _window.firstShow(); + + if (cStartToSettings()) { + _window.showSettings(); + } + + QNetworkProxyFactory::setUseSystemConfiguration(true); + + if (state != Local::ReadMapPassNeeded) { + checkMapVersion(); + } + + _window.updateIsActive(cOnlineFocusTimeout()); +} + +void AppClass::regPhotoUpdate(const PeerId &peer, const FullMsgId &msgId) { + photoUpdates.insert(msgId, peer); +} + +void AppClass::clearPhotoUpdates() { + photoUpdates.clear(); +} + +bool AppClass::isPhotoUpdating(const PeerId &peer) { + for (QMap::iterator i = photoUpdates.begin(), e = photoUpdates.end(); i != e; ++i) { + if (i.value() == peer) { + return true; + } + } + return false; +} + +void AppClass::cancelPhotoUpdate(const PeerId &peer) { + for (QMap::iterator i = photoUpdates.begin(), e = photoUpdates.end(); i != e;) { + if (i.value() == peer) { + i = photoUpdates.erase(i); + } else { + ++i; + } + } +} + +void AppClass::mtpPause() { + MTP::pause(); + _mtpUnpauseTimer.start(st::slideDuration * 2); +} + +void AppClass::mtpUnpause() { _mtpUnpauseTimer.start(1); } -void Application::doMtpUnpause() { +void AppClass::doMtpUnpause() { MTP::unpause(); } -void Application::selfPhotoCleared(const MTPUserProfilePhoto &result) { +void AppClass::selfPhotoCleared(const MTPUserProfilePhoto &result) { if (!App::self()) return; App::self()->setPhoto(result); emit peerPhotoDone(App::self()->id); } -void Application::chatPhotoCleared(PeerId peer, const MTPUpdates &updates) { +void AppClass::chatPhotoCleared(PeerId peer, const MTPUpdates &updates) { if (App::main()) { App::main()->sentUpdatesReceived(updates); } @@ -329,7 +821,7 @@ void Application::chatPhotoCleared(PeerId peer, const MTPUpdates &updates) { emit peerPhotoDone(peer); } -void Application::selfPhotoDone(const MTPphotos_Photo &result) { +void AppClass::selfPhotoDone(const MTPphotos_Photo &result) { if (!App::self()) return; const MTPDphotos_photo &photo(result.c_photos_photo()); App::feedPhoto(photo.vphoto); @@ -338,7 +830,7 @@ void Application::selfPhotoDone(const MTPphotos_Photo &result) { emit peerPhotoDone(App::self()->id); } -void Application::chatPhotoDone(PeerId peer, const MTPUpdates &updates) { +void AppClass::chatPhotoDone(PeerId peer, const MTPUpdates &updates) { if (App::main()) { App::main()->sentUpdatesReceived(updates); } @@ -346,7 +838,7 @@ void Application::chatPhotoDone(PeerId peer, const MTPUpdates &updates) { emit peerPhotoDone(peer); } -bool Application::peerPhotoFail(PeerId peer, const RPCError &error) { +bool AppClass::peerPhotoFail(PeerId peer, const RPCError &error) { if (mtpIsFlood(error)) return false; LOG(("Application Error: update photo failed %1: %2").arg(error.type()).arg(error.description())); @@ -355,19 +847,19 @@ bool Application::peerPhotoFail(PeerId peer, const RPCError &error) { return true; } -void Application::peerClearPhoto(PeerId id) { +void AppClass::peerClearPhoto(PeerId id) { if (MTP::authedId() && peerToUser(id) == MTP::authedId()) { - MTP::send(MTPphotos_UpdateProfilePhoto(MTP_inputPhotoEmpty(), MTP_inputPhotoCropAuto()), rpcDone(&Application::selfPhotoCleared), rpcFail(&Application::peerPhotoFail, id)); + MTP::send(MTPphotos_UpdateProfilePhoto(MTP_inputPhotoEmpty(), MTP_inputPhotoCropAuto()), rpcDone(&AppClass::selfPhotoCleared), rpcFail(&AppClass::peerPhotoFail, id)); } else if (peerIsChat(id)) { - MTP::send(MTPmessages_EditChatPhoto(peerToBareMTPInt(id), MTP_inputChatPhotoEmpty()), rpcDone(&Application::chatPhotoCleared, id), rpcFail(&Application::peerPhotoFail, id)); + MTP::send(MTPmessages_EditChatPhoto(peerToBareMTPInt(id), MTP_inputChatPhotoEmpty()), rpcDone(&AppClass::chatPhotoCleared, id), rpcFail(&AppClass::peerPhotoFail, id)); } else if (peerIsChannel(id)) { if (ChannelData *channel = App::channelLoaded(id)) { - MTP::send(MTPchannels_EditPhoto(channel->inputChannel, MTP_inputChatPhotoEmpty()), rpcDone(&Application::chatPhotoCleared, id), rpcFail(&Application::peerPhotoFail, id)); + MTP::send(MTPchannels_EditPhoto(channel->inputChannel, MTP_inputChatPhotoEmpty()), rpcDone(&AppClass::chatPhotoCleared, id), rpcFail(&AppClass::peerPhotoFail, id)); } } } -void Application::killDownloadSessionsStart(int32 dc) { +void AppClass::killDownloadSessionsStart(int32 dc) { if (killDownloadSessionTimes.constFind(dc) == killDownloadSessionTimes.cend()) { killDownloadSessionTimes.insert(dc, getms() + MTPAckSendWaiting + MTPKillFileSessionTimeout); } @@ -376,23 +868,23 @@ void Application::killDownloadSessionsStart(int32 dc) { } } -void Application::killDownloadSessionsStop(int32 dc) { +void AppClass::killDownloadSessionsStop(int32 dc) { killDownloadSessionTimes.remove(dc); if (killDownloadSessionTimes.isEmpty() && killDownloadSessionsTimer.isActive()) { killDownloadSessionsTimer.stop(); } } -void Application::checkLocalTime() { +void AppClass::checkLocalTime() { if (App::main()) App::main()->checkLastUpdate(checkms()); } -void Application::onAppStateChanged(Qt::ApplicationState state) { +void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); - if (window) window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + _window.updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); } -void Application::killDownloadSessions() { +void AppClass::killDownloadSessions() { uint64 ms = getms(), left = MTPAckSendWaiting + MTPKillFileSessionTimeout; for (QMap::iterator i = killDownloadSessionTimes.begin(); i != killDownloadSessionTimes.end(); ) { if (i.value() <= ms) { @@ -412,25 +904,25 @@ void Application::killDownloadSessions() { } } -void Application::photoUpdated(const FullMsgId &msgId, const MTPInputFile &file) { +void AppClass::photoUpdated(const FullMsgId &msgId, const MTPInputFile &file) { if (!App::self()) return; QMap::iterator i = photoUpdates.find(msgId); if (i != photoUpdates.end()) { PeerId id = i.value(); if (MTP::authedId() && peerToUser(id) == MTP::authedId()) { - MTP::send(MTPphotos_UploadProfilePhoto(file, MTP_string(""), MTP_inputGeoPointEmpty(), MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100))), rpcDone(&Application::selfPhotoDone), rpcFail(&Application::peerPhotoFail, id)); + MTP::send(MTPphotos_UploadProfilePhoto(file, MTP_string(""), MTP_inputGeoPointEmpty(), MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100))), rpcDone(&AppClass::selfPhotoDone), rpcFail(&AppClass::peerPhotoFail, id)); } else if (peerIsChat(id)) { History *hist = App::history(id); - hist->sendRequestId = MTP::send(MTPmessages_EditChatPhoto(hist->peer->asChat()->inputChat, MTP_inputChatUploadedPhoto(file, MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100)))), rpcDone(&Application::chatPhotoDone, id), rpcFail(&Application::peerPhotoFail, id), 0, 0, hist->sendRequestId); + hist->sendRequestId = MTP::send(MTPmessages_EditChatPhoto(hist->peer->asChat()->inputChat, MTP_inputChatUploadedPhoto(file, MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100)))), rpcDone(&AppClass::chatPhotoDone, id), rpcFail(&AppClass::peerPhotoFail, id), 0, 0, hist->sendRequestId); } else if (peerIsChannel(id)) { History *hist = App::history(id); - hist->sendRequestId = MTP::send(MTPchannels_EditPhoto(hist->peer->asChannel()->inputChannel, MTP_inputChatUploadedPhoto(file, MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100)))), rpcDone(&Application::chatPhotoDone, id), rpcFail(&Application::peerPhotoFail, id), 0, 0, hist->sendRequestId); + hist->sendRequestId = MTP::send(MTPchannels_EditPhoto(hist->peer->asChannel()->inputChannel, MTP_inputChatUploadedPhoto(file, MTP_inputPhotoCrop(MTP_double(0), MTP_double(0), MTP_double(100)))), rpcDone(&AppClass::chatPhotoDone, id), rpcFail(&AppClass::peerPhotoFail, id), 0, 0, hist->sendRequestId); } } } -void Application::onSwitchDebugMode() { +void AppClass::onSwitchDebugMode() { if (cDebug()) { QFile(cWorkingDir() + qsl("tdata/withdebug")).remove(); cSetDebug(false); @@ -438,8 +930,8 @@ void Application::onSwitchDebugMode() { cSetRestartingToSettings(true); App::quit(); } else { - logsInitDebug(); cSetDebug(true); + DEBUG_LOG(("Debug logs started.")); QFile f(cWorkingDir() + qsl("tdata/withdebug")); if (f.open(QIODevice::WriteOnly)) { f.write("1"); @@ -449,7 +941,7 @@ void Application::onSwitchDebugMode() { } } -void Application::onSwitchTestMode() { +void AppClass::onSwitchTestMode() { if (cTestMode()) { QFile(cWorkingDir() + qsl("tdata/withtestmode")).remove(); cSetTestMode(false); @@ -466,34 +958,12 @@ void Application::onSwitchTestMode() { App::quit(); } -Application::UpdatingState Application::updatingState() { - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - if (!updateThread) return Application::UpdatingNone; - if (!updateDownloader) return Application::UpdatingReady; - return Application::UpdatingDownload; - #else - return Application::UpdatingNone; - #endif -} - -#ifndef TDESKTOP_DISABLE_AUTOUPDATE -int32 Application::updatingSize() { - if (!updateDownloader) return 0; - return updateDownloader->size(); -} - -int32 Application::updatingReady() { - if (!updateDownloader) return 0; - return updateDownloader->ready(); -} -#endif - -FileUploader *Application::uploader() { - if (!::uploader && !App::quiting()) ::uploader = new FileUploader(); - return ::uploader; +FileUploader *AppClass::uploader() { + if (!_uploader && !App::quiting()) _uploader = new FileUploader(); + return _uploader; } -void Application::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) { +void AppClass::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) { PreparedPhotoThumbs photoThumbs; QVector photoSizes; @@ -530,178 +1000,7 @@ void Application::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) App::uploader()->uploadMedia(newId, ready); } -#ifndef TDESKTOP_DISABLE_AUTOUPDATE -void Application::stopUpdate() { - if (updateReply) { - updateReply->abort(); - updateReply->deleteLater(); - updateReply = 0; - } - if (updateDownloader) { - updateDownloader->deleteLater(); - updateDownloader = 0; - if (updateThread) updateThread->quit(); - updateThread = 0; - } -} - -void Application::startUpdateCheck(bool forceWait) { - updateCheckTimer.stop(); - if (updateRequestId || updateThread || updateReply || !cAutoUpdate()) return; - - int32 constDelay = cBetaVersion() ? 600 : UpdateDelayConstPart, randDelay = cBetaVersion() ? 300 : UpdateDelayRandPart; - int32 updateInSecs = cLastUpdateCheck() + constDelay + int32(MTP::nonce() % randDelay) - unixtime(); - bool sendRequest = (updateInSecs <= 0 || updateInSecs > (constDelay + randDelay)); - if (!sendRequest && !forceWait) { - QDir updates(cWorkingDir() + "tupdates"); - if (updates.exists()) { - QFileInfoList list = updates.entryInfoList(QDir::Files); - for (QFileInfoList::iterator i = list.begin(), e = list.end(); i != e; ++i) { - if (QRegularExpression("^(tupdate|tmacupd|tmac32upd|tlinuxupd|tlinux32upd)\\d+(_[a-z\\d]+)?$", QRegularExpression::CaseInsensitiveOption).match(i->fileName()).hasMatch()) { - sendRequest = true; - } - } - } - } - if (cManyInstance() && !cDebug()) return; // only main instance is updating - - if (sendRequest) { - QUrl url(cUpdateURL()); - if (cBetaVersion()) { - url.setQuery(qsl("version=%1&beta=%2").arg(AppVersion).arg(cBetaVersion())); - } else if (cDevVersion()) { - url.setQuery(qsl("version=%1&dev=1").arg(AppVersion)); - } else { - url.setQuery(qsl("version=%1").arg(AppVersion)); - } - QString u = url.toString(); - QNetworkRequest checkVersion(url); - if (updateReply) updateReply->deleteLater(); - - App::setProxySettings(updateManager); - updateReply = updateManager.get(checkVersion); - connect(updateReply, SIGNAL(finished()), this, SLOT(updateGotCurrent())); - connect(updateReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(updateFailedCurrent(QNetworkReply::NetworkError))); - emit updateChecking(); - } else { - updateCheckTimer.start((updateInSecs + 5) * 1000); - } -} -#endif - -namespace { - QChar _toHex(ushort v) { - v = v & 0x000F; - return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v)); - } - ushort _fromHex(QChar c) { - return ((c.unicode() >= uchar('a')) ? (c.unicode() - uchar('a') + 10) : (c.unicode() - uchar('0'))) & 0x000F; - } - - QString _escapeTo7bit(const QString &str) { - QString result; - result.reserve(str.size() * 2); - for (int i = 0, l = str.size(); i != l; ++i) { - QChar ch(str.at(i)); - ushort uch(ch.unicode()); - if (uch < 32 || uch > 127 || uch == ushort(uchar('%'))) { - result.append('%').append(_toHex(uch >> 12)).append(_toHex(uch >> 8)).append(_toHex(uch >> 4)).append(_toHex(uch)); - } else { - result.append(ch); - } - } - return result; - } - - QString _escapeFrom7bit(const QString &str) { - QString result; - result.reserve(str.size()); - for (int i = 0, l = str.size(); i != l; ++i) { - QChar ch(str.at(i)); - if (ch == QChar::fromLatin1('%') && i + 4 < l) { - result.append(QChar(ushort((_fromHex(str.at(i + 1)) << 12) | (_fromHex(str.at(i + 2)) << 8) | (_fromHex(str.at(i + 3)) << 4) | _fromHex(str.at(i + 4))))); - i += 4; - } else { - result.append(ch); - } - } - return result; - } -} - -void Application::socketConnected() { - DEBUG_LOG(("Application Info: socket connected, this is not the first application instance, sending show command..")); - closing = true; - QString commands; - const QStringList &lst(cSendPaths()); - for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { - commands += qsl("SEND:") + _escapeTo7bit(*i) + ';'; - } - if (!cStartUrl().isEmpty()) { - commands += qsl("OPEN:") + _escapeTo7bit(cStartUrl()) + ';'; - } - commands += qsl("CMD:show;"); - DEBUG_LOG(("Application Info: writing commands %1").arg(commands)); - socket.write(commands.toLatin1()); -} - -void Application::socketWritten(qint64/* bytes*/) { - if (socket.state() != QLocalSocket::ConnectedState) { - DEBUG_LOG(("Application Error: socket is not connected %1").arg(socket.state())); - return; - } - if (socket.bytesToWrite()) { - return; - } - DEBUG_LOG(("Application Info: show command written, waiting response..")); -} - -void Application::socketReading() { - if (socket.state() != QLocalSocket::ConnectedState) { - DEBUG_LOG(("Application Error: socket is not connected %1").arg(socket.state())); - return; - } - socketRead.append(socket.readAll()); - if (QRegularExpression("RES:(\\d+);").match(socketRead).hasMatch()) { - uint64 pid = socketRead.mid(4, socketRead.length() - 5).toULongLong(); - psActivateProcess(pid); - DEBUG_LOG(("Application Info: show command response received, pid = %1, activating and quiting..").arg(pid)); - return App::quit(); - } -} - -void Application::socketError(QLocalSocket::LocalSocketError e) { - if (closing) { - DEBUG_LOG(("Application Error: could not write show command, error %1, quiting..").arg(e)); - return App::quit(); - } - - if (e == QLocalSocket::ServerNotFoundError) { - DEBUG_LOG(("Application Info: this is the only instance of Telegram, starting server and app..")); - } else { - DEBUG_LOG(("Application Info: socket connect error %1, starting server and app..").arg(e)); - } - socket.close(); - - psCheckLocalSocket(serverName); - - if (!server.listen(serverName)) { - DEBUG_LOG(("Application Error: failed to start listening to %1 server, error %2").arg(serverName).arg(int(server.serverError()))); - return App::quit(); - } - - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - if (!cNoStartUpdate() && checkReadyUpdate()) { - cSetRestartingUpdate(true); - DEBUG_LOG(("Application Info: installing update instead of starting app..")); - return App::quit(); - } - #endif - - startApp(); -} - -void Application::checkMapVersion() { +void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; @@ -714,7 +1013,7 @@ void Application::checkMapVersion() { } if (!versionFeatures.isEmpty()) { versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); - window->serviceNotification(versionFeatures); + _window.serviceNotification(versionFeatures); } } } @@ -723,187 +1022,25 @@ void Application::checkMapVersion() { } } -void Application::startApp() { - cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat)); - - DEBUG_LOG(("Application Info: starting app..")); - - QMimeDatabase().mimeTypeForName(qsl("text/plain")); // create mime database - - window->createWinId(); - window->init(); - - DEBUG_LOG(("Application Info: window created..")); - - initImageLinkManager(); - App::initMedia(); - - Local::ReadMapState state = Local::readMap(QByteArray()); - if (state == Local::ReadMapPassNeeded) { - cSetHasPasscode(true); - DEBUG_LOG(("Application Info: passcode nneded..")); - } else { - DEBUG_LOG(("Application Info: local map read..")); - MTP::start(); - } - - MTP::setStateChangedHandler(mtpStateChanged); - MTP::setSessionResetHandler(mtpSessionReset); - - DEBUG_LOG(("Application Info: MTP started..")); - - DEBUG_LOG(("Application Info: showing.")); - if (state == Local::ReadMapPassNeeded) { - window->setupPasscode(false); - } else { - if (MTP::authedId()) { - window->setupMain(false); - } else { - window->setupIntro(false); - } - } - window->firstShow(); - - if (cStartToSettings()) { - window->showSettings(); - } - - QNetworkProxyFactory::setUseSystemConfiguration(true); - - if (state != Local::ReadMapPassNeeded) { - checkMapVersion(); - } - - window->updateIsActive(cOnlineFocusTimeout()); -} - -void Application::socketDisconnected() { - if (closing) { - DEBUG_LOG(("Application Error: socket disconnected before command response received, quiting..")); - return App::quit(); - } -} - -void Application::newInstanceConnected() { - DEBUG_LOG(("Application Info: new local socket connected")); - for (QLocalSocket *client = server.nextPendingConnection(); client; client = server.nextPendingConnection()) { - clients.push_back(ClientSocket(client, QByteArray())); - connect(client, SIGNAL(readyRead()), this, SLOT(readClients())); - connect(client, SIGNAL(disconnected()), this, SLOT(removeClients())); - } -} - -void Application::readClients() { - QString startUrl; - QStringList toSend; - for (ClientSockets::iterator i = clients.begin(), e = clients.end(); i != e; ++i) { - i->second.append(i->first->readAll()); - if (i->second.size()) { - QString cmds(QString::fromLatin1(i->second)); - int32 from = 0, l = cmds.length(); - for (int32 to = cmds.indexOf(QChar(';'), from); to >= from; to = (from < l) ? cmds.indexOf(QChar(';'), from) : -1) { - QStringRef cmd(&cmds, from, to - from); - if (cmd.startsWith(qsl("CMD:"))) { - execExternal(cmds.mid(from + 4, to - from - 4)); - QByteArray response(qsl("RES:%1;").arg(QCoreApplication::applicationPid()).toLatin1()); - i->first->write(response.data(), response.size()); - } else if (cmd.startsWith(qsl("SEND:"))) { - if (cSendPaths().isEmpty()) { - toSend.append(_escapeFrom7bit(cmds.mid(from + 5, to - from - 5))); - } - } else if (cmd.startsWith(qsl("OPEN:"))) { - if (cStartUrl().isEmpty()) { - startUrl = _escapeFrom7bit(cmds.mid(from + 5, to - from - 5)); - } - } else { - LOG(("Application Error: unknown command %1 passed in local socket").arg(QString(cmd.constData(), cmd.length()))); - } - from = to + 1; - } - if (from > 0) { - i->second = i->second.mid(from); - } - } - } - if (!toSend.isEmpty()) { - QStringList paths(cSendPaths()); - paths.append(toSend); - cSetSendPaths(paths); - } - if (!cSendPaths().isEmpty()) { - if (App::wnd()) { - App::wnd()->sendPaths(); - } - } - if (!startUrl.isEmpty()) { - cSetStartUrl(startUrl); - } - if (!cStartUrl().isEmpty() && App::main() && App::self()) { - App::main()->openLocalUrl(cStartUrl()); - cSetStartUrl(QString()); - } -} - -void Application::removeClients() { - DEBUG_LOG(("Application Info: remove clients slot called, clients %1").arg(clients.size())); - for (ClientSockets::iterator i = clients.begin(), e = clients.end(); i != e;) { - if (i->first->state() != QLocalSocket::ConnectedState) { - DEBUG_LOG(("Application Info: removing client")); - i = clients.erase(i); - e = clients.end(); - } else { - ++i; - } - } -} - -void Application::execExternal(const QString &cmd) { +void AppClass::execExternal(const QString &cmd) { DEBUG_LOG(("Application Info: executing external command '%1'").arg(cmd)); if (cmd == "show") { - window->activate(); + _window.activate(); } } -void Application::closeApplication() { - // close server - server.close(); - for (ClientSockets::iterator i = clients.begin(), e = clients.end(); i != e; ++i) { - disconnect(i->first, SIGNAL(disconnected()), this, SLOT(removeClients())); - i->first->close(); - } - clients.clear(); - - MTP::stop(); -} - -Application::~Application() { - App::setQuiting(); - - window->setParent(0); +AppClass::~AppClass() { + _window.setParent(0); anim::stopManager(); - socket.close(); - closeApplication(); stopWebLoadManager(); App::deinitMedia(); deinitImageLinkManager(); - mainApp = 0; - delete ::uploader; - - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - delete updateReply; - updateReply = 0; - if (updateDownloader) updateDownloader->deleteLater(); - updateDownloader = 0; - if (updateThread) updateThread->quit(); - updateThread = 0; - #endif - - Window *w = window; - window = 0; - delete w; + AppObject = 0; + deleteAndMark(_uploader); + deleteAndMark(_translator); delete cChatBackground(); cSetChatBackground(0); @@ -913,37 +1050,19 @@ Application::~Application() { style::stopManager(); - delete _translator; + Local::finish(); + Sandbox::finish(); + ThirdParty::finish(); } -Application *Application::app() { - return mainApp; +AppClass *AppClass::app() { + return AppObject; } -Window *Application::wnd() { - return mainApp ? mainApp->window : 0; -} - -QString Application::language() { - if (!lng.length()) { - lng = psCurrentLanguage(); - } - if (!lng.length()) { - lng = "en"; - } - return lng; -} - -int32 Application::languageId() { - QByteArray l = language().toLatin1(); - for (int32 i = 0; i < languageCount; ++i) { - if (l.at(0) == LanguageCodes[i][0] && l.at(1) == LanguageCodes[i][1]) { - return i; - } - } - return languageDefault; +Window *AppClass::wnd() { + return AppObject ? &AppObject->_window : 0; } -MainWidget *Application::main() { - return mainApp ? mainApp->window->mainWidget() : 0; +MainWidget *AppClass::main() { + return AppObject ? AppObject->_window.mainWidget() : 0; } diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 21866e49fa749a..f1671f2dd05cd4 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -20,31 +20,52 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #pragma once -#include -#include -#include - #include "window.h" #include "pspecific.h" -class MainWidget; -class FileUploader; -class Translator; -class UpdateDownloader; - -class Application : public PsApplication, public RPCSender { +class UpdateChecker; +class Application : public QApplication { Q_OBJECT public: Application(int &argc, char **argv); ~Application(); - - static Application *app(); - static Window *wnd(); - static QString language(); - static int32 languageId(); - static MainWidget *main(); + +// Single instance application +public slots: + + void socketConnected(); + void socketError(QLocalSocket::LocalSocketError e); + void socketDisconnected(); + void socketWritten(qint64 bytes); + void socketReading(); + void newInstanceConnected(); + void closeApplication(); + + void readClients(); + void removeClients(); + +private: + + typedef QPair LocalClient; + typedef QList LocalClients; + + QString _localServerName, _localSocketReadData; + QLocalServer _localServer; + QLocalSocket _localSocket; + LocalClients _localClients; + bool _secondInstance; + + void singleInstanceChecked(); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + +// Autoupdating +public: + + void startUpdateCheck(bool forceWait); + void stopUpdate(); enum UpdatingState { UpdatingNone, @@ -52,11 +73,81 @@ class Application : public PsApplication, public RPCSender { UpdatingReady, }; UpdatingState updatingState(); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE int32 updatingSize(); int32 updatingReady(); + +signals: + + void updateChecking(); + void updateLatest(); + void updateProgress(qint64 ready, qint64 total); + void updateReady(); + void updateFailed(); + +public slots: + + void updateCheck(); + + void updateGotCurrent(); + void updateFailedCurrent(QNetworkReply::NetworkError e); + + void onUpdateReady(); + void onUpdateFailed(); + +private: + + SingleTimer _updateCheckTimer; + QNetworkReply *_updateReply; + QNetworkAccessManager _updateManager; + QThread *_updateThread; + UpdateChecker *_updateChecker; + +#endif +}; + +namespace Sandboxer { + + void setClipboardText(const QString &text); + QRect availableGeometry(); + QRect screenGeometry(const QPoint &p); + void setActiveWindow(QWidget *window); + bool isSavingSession(); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + + void startUpdateCheck(); void stopUpdate(); - #endif + + Application::UpdatingState updatingState(); + int32 updatingSize(); + int32 updatingReady(); + + void updateChecking(); + void updateLatest(); + void updateProgress(qint64 ready, qint64 total); + void updateFailed(); + void updateReady(); + void connect(const char *signal, QObject *object, const char *method); + +#endif + +} + +class MainWidget; +class FileUploader; +class Translator; + +class AppClass : public QObject, public RPCSender { + Q_OBJECT + +public: + + AppClass(); + ~AppClass(); + + static AppClass *app(); + static Window *wnd(); + static MainWidget *main(); FileUploader *uploader(); void uploadProfilePhoto(const QImage &tosend, const PeerId &peerId); @@ -83,15 +174,9 @@ class Application : public PsApplication, public RPCSender { void checkLocalTime(); void checkMapVersion(); -signals: + void execExternal(const QString &cmd); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - void updateChecking(); - void updateLatest(); - void updateDownloading(qint64 ready, qint64 total); - void updateReady(); - void updateFailed(); - #endif +signals: void peerPhotoDone(PeerId peer); void peerPhotoFail(PeerId peer); @@ -100,30 +185,8 @@ class Application : public PsApplication, public RPCSender { public slots: - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - void startUpdateCheck(bool forceWait = false); - #endif - void socketConnected(); - void socketError(QLocalSocket::LocalSocketError e); - void socketDisconnected(); - void socketWritten(qint64 bytes); - void socketReading(); - void newInstanceConnected(); - void closeApplication(); - void doMtpUnpause(); - void readClients(); - void removeClients(); - - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - void updateGotCurrent(); - void updateFailedCurrent(QNetworkReply::NetworkError e); - - void onUpdateReady(); - void onUpdateFailed(); - #endif - void photoUpdated(const FullMsgId &msgId, const MTPInputFile &file); void onSwitchDebugMode(); @@ -139,35 +202,12 @@ public slots: QMap killDownloadSessionTimes; SingleTimer killDownloadSessionsTimer; - void startApp(); - - typedef QPair ClientSocket; - typedef QVector ClientSockets; - - QString serverName; - QLocalSocket socket; - QString socketRead; - QLocalServer server; - ClientSockets clients; - bool closing; - - uint64 lastActionTime; + uint64 _lastActionTime; - void execExternal(const QString &cmd); - - Window *window; - - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - mtpRequestId updateRequestId; - QNetworkAccessManager updateManager; - QNetworkReply *updateReply; - SingleTimer updateCheckTimer; - QThread *updateThread; - UpdateDownloader *updateDownloader; - #endif + Window _window; + FileUploader *_uploader; + Translator *_translator; SingleTimer _mtpUnpauseTimer; - Translator *_translator; - }; diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index 1f86108be007f1..57bf5f9f6b8297 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -2059,7 +2059,7 @@ void AudioCaptureInner::onStop(bool needResult) { } } } - DEBUG_LOG(("Audio Capture: stopping (need result: %1), size: %2, samples: %3").arg(logBool(needResult)).arg(d->data.size()).arg(d->fullSamples)); + DEBUG_LOG(("Audio Capture: stopping (need result: %1), size: %2, samples: %3").arg(Logs::b(needResult)).arg(d->data.size()).arg(d->fullSamples)); _captured = QByteArray(); // Finish stream diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index a1a77a4ff0ae72..7c4796585c482a 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -34,7 +34,7 @@ typedef int VerInt; typedef wchar_t VerChar; #endif -UpdateDownloader::UpdateDownloader(QThread *thread, const QString &url) : reply(0), already(0), full(0) { +UpdateChecker::UpdateChecker(QThread *thread, const QString &url) : reply(0), already(0), full(0) { updateUrl = url; moveToThread(thread); manager.moveToThread(thread); @@ -44,7 +44,7 @@ UpdateDownloader::UpdateDownloader(QThread *thread, const QString &url) : reply( initOutput(); } -void UpdateDownloader::initOutput() { +void UpdateChecker::initOutput() { QString fileName; QRegularExpressionMatch m = QRegularExpression(qsl("/([^/\\?]+)(\\?|$)")).match(updateUrl); if (m.hasMatch()) { @@ -99,11 +99,11 @@ void UpdateDownloader::initOutput() { } } -void UpdateDownloader::start() { +void UpdateChecker::start() { sendRequest(); } -void UpdateDownloader::sendRequest() { +void UpdateChecker::sendRequest() { QNetworkRequest req(updateUrl); QByteArray rangeHeaderValue = "bytes=" + QByteArray::number(already) + "-"; req.setRawHeader("Range", rangeHeaderValue); @@ -115,7 +115,7 @@ void UpdateDownloader::sendRequest() { connect(reply, SIGNAL(metaDataChanged()), this, SLOT(partMetaGot())); } -void UpdateDownloader::partMetaGot() { +void UpdateChecker::partMetaGot() { typedef QList Pairs; Pairs pairs = reply->rawHeaderPairs(); for (Pairs::iterator i = pairs.begin(), e = pairs.end(); i != e; ++i) { @@ -126,23 +126,24 @@ void UpdateDownloader::partMetaGot() { QMutexLocker lock(&mutex); full = m.captured(1).toInt(); } - emit App::app()->updateDownloading(already, full); + + Sandboxer::updateProgress(already, full); } } } } -int32 UpdateDownloader::ready() { +int32 UpdateChecker::ready() { QMutexLocker lock(&mutex); return already; } -int32 UpdateDownloader::size() { +int32 UpdateChecker::size() { QMutexLocker lock(&mutex); return full; } -void UpdateDownloader::partFinished(qint64 got, qint64 total) { +void UpdateChecker::partFinished(qint64 got, qint64 total) { if (!reply) return; QVariant statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute); @@ -179,11 +180,11 @@ void UpdateDownloader::partFinished(qint64 got, qint64 total) { outputFile.close(); unpackUpdate(); } else { - emit App::app()->updateDownloading(already, full); + Sandboxer::updateProgress(already, full); } } -void UpdateDownloader::partFailed(QNetworkReply::NetworkError e) { +void UpdateChecker::partFailed(QNetworkReply::NetworkError e) { if (!reply) return; QVariant statusCode = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute); @@ -198,15 +199,15 @@ void UpdateDownloader::partFailed(QNetworkReply::NetworkError e) { } } LOG(("Update Error: failed to download part starting from %1, error %2").arg(already).arg(e)); - emit App::app()->updateFailed(); + Sandboxer::updateFailed(); } -void UpdateDownloader::fatalFail() { +void UpdateChecker::fatalFail() { clearAll(); - emit App::app()->updateFailed(); + Sandboxer::updateFailed(); } -void UpdateDownloader::clearAll() { +void UpdateChecker::clearAll() { psDeleteDir(cWorkingDir() + qsl("tupdates")); } @@ -225,7 +226,7 @@ void UpdateDownloader::clearAll() { // return QString::fromWCharArray(errMsg); //} -void UpdateDownloader::unpackUpdate() { +void UpdateChecker::unpackUpdate() { QByteArray packed; if (!outputFile.open(QIODevice::ReadOnly)) { LOG(("Update Error: cant read updates file!")); @@ -465,10 +466,10 @@ void UpdateDownloader::unpackUpdate() { } outputFile.remove(); - emit App::app()->updateReady(); + Sandboxer::updateReady(); } -UpdateDownloader::~UpdateDownloader() { +UpdateChecker::~UpdateChecker() { delete reply; reply = 0; } @@ -477,7 +478,7 @@ bool checkReadyUpdate() { QString readyFilePath = cWorkingDir() + qsl("tupdates/temp/ready"), readyPath = cWorkingDir() + qsl("tupdates/temp"); if (!QFile(readyFilePath).exists()) { if (QDir(cWorkingDir() + qsl("tupdates/ready")).exists() || QDir(cWorkingDir() + qsl("tupdates/temp")).exists()) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); } return false; } @@ -488,30 +489,30 @@ bool checkReadyUpdate() { QFile fVersion(versionPath); if (!fVersion.open(QIODevice::ReadOnly)) { LOG(("Update Error: cant read version file '%1'").arg(versionPath)); - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } VerInt versionNum; if (fVersion.read((char*)&versionNum, sizeof(VerInt)) != sizeof(VerInt)) { LOG(("Update Error: cant read version from file '%1'").arg(versionPath)); - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } if (versionNum == 0x7FFFFFFF) { // beta version quint64 betaVersion = 0; if (fVersion.read((char*)&betaVersion, sizeof(quint64)) != sizeof(quint64)) { LOG(("Update Error: cant read beta version from file '%1'").arg(versionPath)); - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } if (!cBetaVersion() || betaVersion <= cBetaVersion()) { LOG(("Update Error: cant install beta version %1 having beta version %2").arg(betaVersion).arg(cBetaVersion())); - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } } else if (versionNum <= AppVersion) { LOG(("Update Error: cant install version %1 having version %2").arg(versionNum).arg(AppVersion)); - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } fVersion.close(); @@ -530,11 +531,11 @@ bool checkReadyUpdate() { if (!updater.exists()) { QFileInfo current(curUpdater); if (!current.exists()) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } if (!QFile(current.absoluteFilePath()).copy(updater.absoluteFilePath())) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } } @@ -545,12 +546,12 @@ bool checkReadyUpdate() { cSetWriteProtected(true); return true; } else { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } } if (DeleteFile(updater.absoluteFilePath().toStdWString().c_str()) == FALSE) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } #elif defined Q_OS_MAC @@ -578,7 +579,7 @@ QString countBetaVersionSignature(uint64 version) { // duplicated in packer.cpp } QByteArray signedData = (qstr("TelegramBeta_") + QString::number(version, 16).toLower()).toUtf8(); - + static const int32 shaSize = 20, keySize = 128; uchar sha1Buffer[shaSize]; diff --git a/Telegram/SourceFiles/autoupdater.h b/Telegram/SourceFiles/autoupdater.h index e15d7fe09e41b6..7394035ddd9799 100644 --- a/Telegram/SourceFiles/autoupdater.h +++ b/Telegram/SourceFiles/autoupdater.h @@ -26,11 +26,11 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include -class UpdateDownloader : public QObject { +class UpdateChecker : public QObject { Q_OBJECT public: - UpdateDownloader(QThread *thread, const QString &url); + UpdateChecker(QThread *thread, const QString &url); void unpackUpdate(); @@ -39,7 +39,7 @@ class UpdateDownloader : public QObject { static void clearAll(); - ~UpdateDownloader(); + ~UpdateChecker(); public slots: @@ -67,7 +67,7 @@ public slots: bool checkReadyUpdate(); #else -class UpdateDownloader : public QObject { +class UpdateChecker : public QObject { Q_OBJECT }; diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index a6bad679e46270..357410b5efe5e8 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -82,7 +82,7 @@ void AboutBox::onVersion() { } url = url.arg(qsl("tbeta%1_%2").arg(cRealBetaVersion()).arg(countBetaVersionSignature(cRealBetaVersion()))); - App::app()->clipboard()->setText(url); + Sandboxer::setClipboardText(url); Ui::showLayer(new InformBox("The link to the current private beta version of Telegram Desktop was copied to the clipboard.")); } else { diff --git a/Telegram/SourceFiles/boxes/addcontactbox.cpp b/Telegram/SourceFiles/boxes/addcontactbox.cpp index 3ba4eac434383c..7db72e9a697d20 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.cpp +++ b/Telegram/SourceFiles/boxes/addcontactbox.cpp @@ -750,7 +750,7 @@ void SetupChannelBox::mouseMoveEvent(QMouseEvent *e) { void SetupChannelBox::mousePressEvent(QMouseEvent *e) { mouseMoveEvent(e); if (_linkOver) { - App::app()->clipboard()->setText(_channel->invitationUrl); + Sandboxer::setClipboardText(_channel->invitationUrl); _goodTextLink = lang(lng_create_channel_link_copied); a_goodOpacity = anim::fvalue(1, 0); _a_goodFade.start(); diff --git a/Telegram/SourceFiles/boxes/confirmbox.cpp b/Telegram/SourceFiles/boxes/confirmbox.cpp index e6dd0269a9f834..af570091d52a4f 100644 --- a/Telegram/SourceFiles/boxes/confirmbox.cpp +++ b/Telegram/SourceFiles/boxes/confirmbox.cpp @@ -34,7 +34,7 @@ TextParseOptions _confirmBoxTextOptions = { Qt::LayoutDirectionAuto, // dir }; -ConfirmBox::ConfirmBox(const QString &text, const QString &doneText, const style::BoxButton &doneStyle, const QString &cancelText, const style::BoxButton &cancelStyle) : AbstractBox(st::boxWidth), +ConfirmBox::ConfirmBox(const QString &text, const QString &doneText, const style::BoxButton &doneStyle, const QString &cancelText, const style::BoxButton &cancelStyle) : AbstractBox(st::boxWidth), _informative(false), _text(100), _confirm(this, doneText.isEmpty() ? lang(lng_box_ok) : doneText, doneStyle), @@ -212,7 +212,7 @@ void MaxInviteBox::mouseMoveEvent(QMouseEvent *e) { void MaxInviteBox::mousePressEvent(QMouseEvent *e) { mouseMoveEvent(e); if (_linkOver) { - App::app()->clipboard()->setText(_link); + Sandboxer::setClipboardText(_link); _goodTextLink = lang(lng_create_channel_link_copied); a_goodOpacity = anim::fvalue(1, 0); _a_good.start(); diff --git a/Telegram/SourceFiles/boxes/usernamebox.cpp b/Telegram/SourceFiles/boxes/usernamebox.cpp index 71e0a994814f77..fa40dcfe9ada19 100644 --- a/Telegram/SourceFiles/boxes/usernamebox.cpp +++ b/Telegram/SourceFiles/boxes/usernamebox.cpp @@ -191,7 +191,7 @@ void UsernameBox::onChanged() { } void UsernameBox::onLinkClick() { - App::app()->clipboard()->setText(qsl("https://telegram.me/") + getName()); + Sandboxer::setClipboardText(qsl("https://telegram.me/") + getName()); _copiedTextLink = lang(lng_username_copied); update(); } diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 683b3cd277760d..1be6560e19c89f 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -24,6 +24,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "mainwidget.h" #include "layerwidget.h" +#include "lang.h" namespace App { @@ -175,39 +176,143 @@ namespace Notify { } +struct GlobalDataStruct { + QString LangSystemISO; + int32 LangSystem = languageDefault; +}; +GlobalDataStruct *GlobalData = 0; + namespace Global { - struct Data { - uint64 LaunchId = 0; - }; + bool CheckBetaVersionDir() { + QFile beta(cExeDir() + qsl("TelegramBeta_data/tdata/beta")); + if (cBetaVersion()) { + cForceWorkingDir(cExeDir() + qsl("TelegramBeta_data/")); + if (*BetaPrivateKey) { + cSetBetaPrivateKey(QByteArray(BetaPrivateKey)); + } + if (beta.open(QIODevice::WriteOnly)) { + QDataStream dataStream(&beta); + dataStream.setVersion(QDataStream::Qt_5_3); + dataStream << quint64(cRealBetaVersion()) << cBetaPrivateKey(); + } else { + LOG(("Error: could not open '%1' for writing private key!").arg(beta.fileName())); + return false; + } + } else if (beta.exists()) { + cForceWorkingDir(cExeDir() + qsl("TelegramBeta_data/")); + if (beta.open(QIODevice::ReadOnly)) { + QDataStream dataStream(&beta); + dataStream.setVersion(QDataStream::Qt_5_3); + + quint64 v; + QByteArray k; + dataStream >> v >> k; + if (dataStream.status() == QDataStream::Ok) { + cSetBetaVersion(qMax(v, AppVersion * 1000ULL)); + cSetBetaPrivateKey(k); + cSetRealBetaVersion(v); + } else { + LOG(("Error: '%1' is corrupted, reinstall private beta!").arg(beta.fileName())); + return false; + } + } else { + LOG(("Error: could not open '%1' for reading private key!").arg(beta.fileName())); + return false; + } + } + return true; + } - Data *_data = 0; + void WorkingDirReady() { + if (QFile(cWorkingDir() + qsl("tdata/withtestmode")).exists()) { + cSetTestMode(true); + } + if (!cDebug() && QFile(cWorkingDir() + qsl("tdata/withdebug")).exists()) { + cSetDebug(true); + } + if (cBetaVersion()) { + cSetDevVersion(false); + } else if (!cDevVersion() && QFile(cWorkingDir() + qsl("tdata/devversion")).exists()) { + cSetDevVersion(true); + } else if (DevVersion) { + QFile f(cWorkingDir() + qsl("tdata/devversion")); + if (!f.exists() && f.open(QIODevice::WriteOnly)) { + f.write("1"); + } + } + } - Initializer::Initializer() { - initThirdParty(); - _data = new Data(); + void start() { + GlobalData = new GlobalDataStruct(); - memset_rand(&_data->LaunchId, sizeof(_data->LaunchId)); + GlobalData->LangSystemISO = psCurrentLanguage(); + if (GlobalData->LangSystemISO.isEmpty()) GlobalData->LangSystemISO = qstr("en"); + QByteArray l = LangSystemISO().toLatin1(); + for (int32 i = 0; i < languageCount; ++i) { + if (l.at(0) == LanguageCodes[i][0] && l.at(1) == LanguageCodes[i][1]) { + GlobalData->LangSystem = i; + break; + } + } } - Initializer::~Initializer() { - deinitThirdParty(); + void finish() { + delete GlobalData; + GlobalData = 0; } #define DefineGlobalReadOnly(Type, Name) const Type &Name() { \ - t_assert_full(_data != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ - return _data->Name; \ + t_assert_full(GlobalData != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ + return GlobalData->Name; \ } #define DefineGlobal(Type, Name) DefineGlobalReadOnly(Type, Name) \ void Set##Name(const Type &Name) { \ - t_assert_full(_data != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ - _data->Name = Name; \ + t_assert_full(GlobalData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ + GlobalData->Name = Name; \ +} \ +Type &Ref##Name() { \ + t_assert_full(GlobalData != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ + return GlobalData->Name; \ +} + + DefineGlobalReadOnly(QString, LangSystemISO); + DefineGlobalReadOnly(int32, LangSystem); + +} + +struct SandboxDataStruct { + uint64 LaunchId = 0; +}; +SandboxDataStruct *SandboxData = 0; + +namespace Sandbox { + + void start() { + SandboxData = new SandboxDataStruct(); + + memset_rand(&SandboxData->LaunchId, sizeof(SandboxData->LaunchId)); + } + + void finish() { + delete SandboxData; + SandboxData = 0; + } + +#define DefineSandboxReadOnly(Type, Name) const Type &Name() { \ + t_assert_full(SandboxData != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ + return SandboxData->Name; \ +} +#define DefineSandbox(Type, Name) DefineSandboxReadOnly(Type, Name) \ +void Set##Name(const Type &Name) { \ + t_assert_full(SandboxData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ + SandboxData->Name = Name; \ } \ Type &Ref##Name() { \ - t_assert_full(_data != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ - return _data->Name; \ + t_assert_full(SandboxData != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ + return SandboxData->Name; \ } - DefineGlobalReadOnly(uint64, LaunchId); + DefineSandboxReadOnly(uint64, LaunchId); }; diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 1a80278c758ead..70749a67f23e10 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -37,7 +37,7 @@ namespace App { }; -namespace Ui { // openssl doesn't allow me to use UI :( +namespace Ui { void showStickerPreview(DocumentData *sticker); void hideStickerPreview(); @@ -98,17 +98,32 @@ namespace Notify { namespace Global { - class Initializer { - public: - Initializer(); - ~Initializer(); - }; + bool CheckBetaVersionDir(); + void WorkingDirReady(); + + void start(); + void finish(); #define DeclareGlobalReadOnly(Type, Name) const Type &Name(); #define DeclareGlobal(Type, Name) DeclareGlobalReadOnly(Type, Name) \ void Set##Name(const Type &Name); \ Type &Ref##Name(); - DeclareGlobalReadOnly(uint64, LaunchId); + DeclareGlobalReadOnly(QString, LangSystemISO); + DeclareGlobalReadOnly(int32, LangSystem); + +} + +namespace Sandbox { + + void start(); + void finish(); + +#define DeclareSandboxReadOnly(Type, Name) const Type &Name(); +#define DeclareSandbox(Type, Name) DeclareSandboxReadOnly(Type, Name) \ + void Set##Name(const Type &Name); \ + Type &Ref##Name(); + + DeclareSandboxReadOnly(uint64, LaunchId); }; diff --git a/Telegram/SourceFiles/gui/button.cpp b/Telegram/SourceFiles/gui/button.cpp index 53f0e195074b51..05217d585e938f 100644 --- a/Telegram/SourceFiles/gui/button.cpp +++ b/Telegram/SourceFiles/gui/button.cpp @@ -80,7 +80,6 @@ void Button::mouseReleaseEvent(QMouseEvent *e) { } void Button::setOver(bool over, ButtonStateChangeSource source) { -// LOG(("Set over: %1, by: %2 AT %3").arg(logBool(over)).arg(source).arg(dynamic_cast(this) ? dynamic_cast(this)->getText() : qsl("Unknown"))); if (over && !(_state & StateOver)) { int oldState = _state; _state |= StateOver; diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index 21fefa3e1d960a..349fec1af37eec 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -464,7 +464,7 @@ void PopupMenu::showMenu(const QPoint &p, PopupMenu *parent, PressSource source) _parent = parent; QPoint w = p - QPoint(0, _padding.top()); - QRect r = App::app() ? App::app()->desktop()->screenGeometry(p) : QDesktopWidget().screenGeometry(p); + QRect r = Sandboxer::screenGeometry(p); if (rtl()) { if (w.x() - width() < r.x() - _padding.left()) { if (_parent && w.x() + _parent->width() - _padding.left() - _padding.right() + width() - _padding.right() <= r.x() + r.width()) { diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 0dad2f9f4c0658..466c3321feea4c 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -2571,15 +2571,6 @@ void Text::setMarkedText(style::font font, const QString &text, const EntitiesIn _font = font; clean(); { -// QByteArray ba = text.toUtf8(); // chars for OS X crash investigation -// const char *ch = ba.constData(); -// LOG(("STR: %1").arg(text)); -// LOG(("BYTES: %1").arg(mb(ba.constData(), ba.size()).str())); -// for (int32 i = 0; i < text.size(); ++i) { -// LOG(("LETTER %1: '%2' - %3").arg(i).arg(text.at(i)).arg(text.at(i).unicode())); -// } -// int32 w = _font->width(text); - // QString newText; // utf16 of the text for emoji // newText.reserve(8 * text.size()); // for (const QChar *ch = text.constData(), *e = ch + text.size(); ch != e; ++ch) { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index ef73e71ac36836..4cd226f2db99c0 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2601,10 +2601,10 @@ void History::overviewSliceDone(int32 overviewIndex, const MTPmessages_Messages if (peer->isChannel()) { peer->asChannel()->ptsReceived(d.vpts.v); } else { - LOG(("API Error: received messages.channelMessages when no channel was passed! (History::overviewSliceDone, onlyCounts %1)").arg(logBool(onlyCounts))); + LOG(("API Error: received messages.channelMessages when no channel was passed! (History::overviewSliceDone, onlyCounts %1)").arg(Logs::b(onlyCounts))); } if (d.has_collapsed()) { // should not be returned - LOG(("API Error: channels.getMessages and messages.getMessages should not return collapsed groups! (History::overviewSliceDone, onlyCounts %1)").arg(logBool(onlyCounts))); + LOG(("API Error: channels.getMessages and messages.getMessages should not return collapsed groups! (History::overviewSliceDone, onlyCounts %1)").arg(Logs::b(onlyCounts))); } App::feedUsers(d.vusers); diff --git a/Telegram/SourceFiles/intro/intro.cpp b/Telegram/SourceFiles/intro/intro.cpp index e1fff2962973af..b921672f4f0096 100644 --- a/Telegram/SourceFiles/intro/intro.cpp +++ b/Telegram/SourceFiles/intro/intro.cpp @@ -47,7 +47,7 @@ namespace { emit signalEmitOn->countryChanged(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE - if (App::app()) App::app()->startUpdateCheck(); + Sandboxer::startUpdateCheck(); #endif } } diff --git a/Telegram/SourceFiles/intro/introphone.cpp b/Telegram/SourceFiles/intro/introphone.cpp index 21ea020ee1b2e8..ccd5f227ee259e 100644 --- a/Telegram/SourceFiles/intro/introphone.cpp +++ b/Telegram/SourceFiles/intro/introphone.cpp @@ -230,7 +230,7 @@ void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) { checkRequest.start(1000); - sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Application::language())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); + sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Global::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); } else { showError(lang(lng_bad_phone_noreg), true); enableAll(true); @@ -240,7 +240,7 @@ void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) { void IntroPhone::phoneSubmitDone(const MTPauth_SentCode &result) { stopCheck(); enableAll(false); - + if (result.type() == mtpc_auth_sentCode) { const MTPDauth_sentCode &d(result.c_auth_sentCode()); intro()->setPhone(sentPhone, d.vphone_code_hash.c_string().v.c_str(), mtpIsTrue(d.vphone_registered)); @@ -260,7 +260,7 @@ void IntroPhone::toSignUp() { checkRequest.start(1000); - sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(0), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Application::language())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); + sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(0), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Global::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); } bool IntroPhone::phoneSubmitFail(const RPCError &error) { diff --git a/Telegram/SourceFiles/intro/introsteps.cpp b/Telegram/SourceFiles/intro/introsteps.cpp index 69ec1d1cc76771..eb33f2a3d93b6b 100644 --- a/Telegram/SourceFiles/intro/introsteps.cpp +++ b/Telegram/SourceFiles/intro/introsteps.cpp @@ -36,7 +36,7 @@ _next(this, lang(lng_start_msgs), st::btnIntroNext) { _changeLang.hide(); if (cLang() == languageDefault) { - int32 l = App::app()->languageId(); + int32 l = Global::LangSystem(); if (l != languageDefault) { LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[l] + qsl(".strings"), LangLoaderRequest(lng_switch_to_this)); QString text = loader.found().value(lng_switch_to_this); diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 6aaa61710a61b1..e37284d513df52 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -412,7 +412,7 @@ namespace { continue; } if (memcmp(magic, tdfMagic, tdfMagicLen)) { - DEBUG_LOG(("App Info: bad magic %1 in '%2'").arg(mb(magic, tdfMagicLen).str()).arg(name)); + DEBUG_LOG(("App Info: bad magic %1 in '%2'").arg(Logs::mb(magic, tdfMagicLen).str()).arg(name)); continue; } @@ -863,7 +863,7 @@ namespace { stream.readRawData((char*)key, 256); if (!_checkStreamStatus(stream)) return false; - DEBUG_LOG(("MTP Info: key found, dc %1, key: %2").arg(dcId).arg(mb(key, 256).str())); + DEBUG_LOG(("MTP Info: key found, dc %1, key: %2").arg(dcId).arg(Logs::mb(key, 256).str())); dcId = dcId % _mtp_internal::dcShift; mtpAuthKeyPtr keyPtr(new mtpAuthKey()); keyPtr->setKey(key); @@ -1983,15 +1983,7 @@ namespace _local_inner { namespace Local { - void start() { - if (!_started) { - _started = true; - _manager = new _local_inner::Manager(); - _localLoader = new TaskQueue(0, FileLoaderQueueStopTimeout); - } - } - - void stop() { + void finish() { if (_manager) { _writeMap(WriteMapNow); _manager->finish(); @@ -2002,8 +1994,11 @@ namespace Local { } } - void readSettings() { - Local::start(); + void start() { + t_assert(_manager == 0); + + _manager = new _local_inner::Manager(); + _localLoader = new TaskQueue(0, FileLoaderQueueStopTimeout); _basePath = cWorkingDir() + qsl("tdata/"); if (!QDir().exists(_basePath)) QDir().mkpath(_basePath); diff --git a/Telegram/SourceFiles/localstorage.h b/Telegram/SourceFiles/localstorage.h index 6bf8e7c9dd523e..30ed83b629334b 100644 --- a/Telegram/SourceFiles/localstorage.h +++ b/Telegram/SourceFiles/localstorage.h @@ -54,7 +54,7 @@ namespace _local_inner { namespace Local { void start(); - void stop(); + void finish(); void readSettings(); void writeSettings(); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 9004d46abbbe7c..69817a2c41a4e9 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -22,111 +22,313 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include "pspecific.h" -namespace { - QFile debugLog, tcpLog, mtpLog, mainLog; - QTextStream *debugLogStream = 0, *tcpLogStream = 0, *mtpLogStream = 0, *mainLogStream = 0; - int32 part = -1; - QChar zero('0'); - - QMutex debugLogMutex, mainLogMutex; - - QString debugLogEntryStart() { - static uint32 logEntry = 0; +enum LogDataType { + LogDataMain, + LogDataDebug, + LogDataTcp, + LogDataMtp, + + LogDataCount +}; + +QMutex *LogsMutexes = 0; +QMutex *_logsMutex(LogDataType type) { + if (!LogsMutexes) { + LogsMutexes = new QMutex[LogDataCount]; + } + return &LogsMutexes[type]; +} +QString _logsFilePath(LogDataType type, const QString &postfix = QString()) { + QString path(cWorkingDir()); + switch (type) { + case LogDataMain: path += qstr("log.txt"); break; + case LogDataDebug: path += qstr("DebugLogs/log") + postfix + qstr(".txt"); break; + case LogDataTcp: path += qstr("DebugLogs/tcp") + postfix + qstr(".txt"); break; + case LogDataMtp: path += qstr("DebugLogs/mtp") + postfix + qstr(".txt"); break; + } + return path; +} +class LogsDataFields { +public: + QString entryStart() { QDateTime tm(QDateTime::currentDateTime()); QThread *thread = QThread::currentThread(); MTPThread *mtpThread = qobject_cast(thread); - uint32 threadId = mtpThread ? mtpThread->getThreadId() : 0; + uint threadId = mtpThread ? mtpThread->getThreadId() : 0; - return QString("[%1 %2-%3]").arg(tm.toString("hh:mm:ss.zzz")).arg(QString("%1").arg(threadId, 2, 10, zero)).arg(++logEntry, 7, 10, zero); + return QString("[%1 %2-%3]").arg(tm.toString("hh:mm:ss.zzz")).arg(QString("%1").arg(threadId, 2, 10, QChar('0'))).arg(++index, 7, 10, QChar('0')); + } + + bool openMain() { + QMutexLocker lock(_logsMutex(LogDataMain)); + return reopen(LogDataMain, 0, QString()); } -} -void debugLogWrite(const char *file, int32 line, const QString &v) { - if (!cDebug() || !debugLogStream) return; + void write(LogDataType type, const QString &msg) { + QMutexLocker lock(_logsMutex(type)); + if (type != LogDataMain) reopenDebug(); + if (!streams[type].device()) return; - const char *last = strstr(file, "/"), *found = 0; - while (last) { - found = last; - last = strstr(last + 1, "/"); + streams[type] << msg; + streams[type].flush(); } - last = strstr(file, "\\"); - while (last) { - found = last; - last = strstr(last + 1, "\\"); + +private: + + QFile files[LogDataCount]; + QTextStream streams[LogDataCount]; + + int32 part = -1, index = 0; + + bool reopen(LogDataType type, int32 dayIndex, const QString &postfix) { + if (streams[type].device()) { + if (type == LogDataMain) { + return true; + } + streams[type].setDevice(0); + files[type].close(); + } + + files[type].setFileName(_logsFilePath(type, postfix)); + QFlags mode = QIODevice::WriteOnly | QIODevice::Text; + if (type != LogDataMain) { + if (files[type].exists()) { + if (files[type].open(QIODevice::ReadOnly | QIODevice::Text)) { + if (QString::fromUtf8(files[type].readLine()).toInt() == dayIndex) { + mode |= QIODevice::Append; + } + files[type].close(); + } + } else { + QDir().mkdir(cWorkingDir() + qstr("DebugLogs")); + } + } + if (files[type].open(mode)) { + streams[type].setDevice(&files[type]); + streams[type].setCodec("UTF-8"); + + if (type != LogDataMain) { + streams[type] << ((mode & QIODevice::Append) ? qsl("----------------------------------------------------------------\nNEW LOGGING INSTANCE STARTED!!!\n----------------------------------------------------------------\n") : qsl("%1\n").arg(dayIndex)); + streams[type].flush(); + } + + return true; + } + return false; } - if (found) { - file = found + 1; + + void reopenDebug() { + time_t t = time(NULL); + struct tm tm; + mylocaltime(&tm, &t); + + static const int switchEach = 15; // minutes + int32 newPart = (tm.tm_min + tm.tm_hour * 60) / switchEach; + if (newPart == part) return; + + part = newPart; + + int32 dayIndex = (tm.tm_year + 1900) * 10000 + (tm.tm_mon + 1) * 100 + tm.tm_mday; + QString postfix = QString("_%4_%5").arg((part * switchEach) / 60, 2, 10, QChar('0')).arg((part * switchEach) % 60, 2, 10, QChar('0')); + + reopen(LogDataDebug, dayIndex, postfix); + reopen(LogDataTcp, dayIndex, postfix); + reopen(LogDataMtp, dayIndex, postfix); } - { - QMutexLocker lock(&debugLogMutex); - if (!cDebug() || !debugLogStream) return; +}; - logsInitDebug(); // maybe need to reopen new file +LogsDataFields *LogsData = 0; - QString msg(QString("%1 %2 (%3 : %4)\n").arg(debugLogEntryStart()).arg(v).arg(file).arg(line)); - (*debugLogStream) << msg; - debugLogStream->flush(); -#ifdef Q_OS_WIN -// OutputDebugString(reinterpret_cast(msg.utf16())); -#elif defined Q_OS_MAC - objc_outputDebugString(msg); -#elif defined Q_OS_LINUX && defined _DEBUG -// std::cout << msg.toUtf8().constData(); -#endif +typedef QList > LogsInMemoryList; +LogsInMemoryList *LogsInMemory = 0; +LogsInMemoryList *DeletedLogsInMemory = SharedMemoryLocation(); +void _logsWrite(LogDataType type, const QString &msg) { + if (LogsData) { + if (type == LogDataMain || cDebug()) { + LogsData->write(type, msg); + } + } else if (LogsInMemory != DeletedLogsInMemory) { + if (!LogsInMemory) { + LogsInMemory = new LogsInMemoryList; + } + LogsInMemory->push_back(qMakePair(LogDataMain, msg)); } } -void tcpLogWrite(const QString &v) { - if (!cDebug() || !tcpLogStream) return; +void _moveOldDataFiles(const QString &from); + +namespace Logs { + + Initializer::Initializer() { + t_assert(LogsData == 0); + + if (!Global::CheckBetaVersionDir()) { + return; + } + bool workingDirChosen = cBetaVersion(); + + QString moveOldDataFrom; + if (cBetaVersion()) { + cSetDebug(true); +#if (defined Q_OS_MAC || defined Q_OS_LINUX) + } else { + QString wasDir = QDir(cWorkingDir()).absolutePath() + '/'; - { - QMutexLocker lock(&debugLogMutex); - if (!cDebug() || !tcpLogStream) return; +#ifdef _DEBUG + cForceWorkingDir(cExeDir()); +#else + if (cWorkingDir().isEmpty()) { + cForceWorkingDir(psAppDataPath()); + } +#endif + workingDirChosen = true; - logsInitDebug(); // maybe need to reopen new file +#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version + moveOldDataFrom = wasDir; +#endif + +#endif + } - (*tcpLogStream) << QString("%1 %2\n").arg(debugLogEntryStart()).arg(v); - tcpLogStream->flush(); + LogsData = new LogsDataFields(); + if (!workingDirChosen) { + cForceWorkingDir(cWorkingDir()); + if (!LogsData->openMain()) { + cForceWorkingDir(cExeDir()); + if (!LogsData->openMain()) { + cForceWorkingDir(psAppDataPath()); + } + } + } + + cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/'); + QDir().setCurrent(cWorkingDir()); + + Global::WorkingDirReady(); + + LOG(("Launched version: %1, dev: %2, beta: %3, debug mode: %4, test dc: %5").arg(AppVersion).arg(Logs::b(cDevVersion())).arg(cBetaVersion()).arg(Logs::b(cDebug())).arg(Logs::b(cTestMode()))); + LOG(("Executable dir: %1, name: %2").arg(cExeDir()).arg(cExeName())); + LOG(("Working dir: %1").arg(cWorkingDir())); + LOG(("Arguments: %1").arg(cArguments())); + + if (!LogsData->openMain()) { + delete LogsData; + LogsData = 0; + LOG(("Error: could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain))); + return; + } + +#ifdef Q_OS_WIN + if (cWorkingDir() == psAppDataPath()) { // fix old "Telegram Win (Unofficial)" version + moveOldDataFrom = psAppDataPathOld(); + } +#endif + if (!moveOldDataFrom.isEmpty()) { + _moveOldDataFiles(moveOldDataFrom); + } + + if (LogsInMemory) { + t_assert(LogsInMemory != DeletedLogsInMemory); + LogsInMemoryList list = *LogsInMemory; + for (LogsInMemoryList::const_iterator i = list.cbegin(), e = list.cend(); i != e; ++i) { + _logsWrite(i->first, i->second); + } + } + if (LogsInMemory) { + t_assert(LogsInMemory != DeletedLogsInMemory); + delete LogsInMemory; + LogsInMemory = DeletedLogsInMemory; + } + + LOG(("Logs started.")); + DEBUG_LOG(("Debug logs started.")); } -} -void mtpLogWrite(int32 dc, const QString &v) { - if (!cDebug() || !mtpLogStream) return; + Initializer::~Initializer() { + delete LogsData; + LogsData = 0; + + delete[] LogsMutexes; + LogsMutexes = 0; + } + + bool started() { + return LogsData != 0; + } - { - QMutexLocker lock(&debugLogMutex); - if (!cDebug() || !mtpLogStream) return; + void writeMain(const QString &v) { + time_t t = time(NULL); + struct tm tm; + mylocaltime(&tm, &t); - logsInitDebug(); // maybe need to reopen new file + QString msg(QString("[%1.%2.%3 %4:%5:%6] %7\n").arg(tm.tm_year + 1900).arg(tm.tm_mon + 1, 2, 10, QChar('0')).arg(tm.tm_mday, 2, 10, QChar('0')).arg(tm.tm_hour, 2, 10, QChar('0')).arg(tm.tm_min, 2, 10, QChar('0')).arg(tm.tm_sec, 2, 10, QChar('0')).arg(v)); + _logsWrite(LogDataMain, msg); - (*mtpLogStream) << QString("%1 (dc:%2) %3\n").arg(debugLogEntryStart()).arg(dc).arg(v); - mtpLogStream->flush(); + QString debugmsg(QString("%1 %2\n").arg(LogsData->entryStart()).arg(v)); + _logsWrite(LogDataDebug, debugmsg); + } + + void writeDebug(const char *file, int32 line, const QString &v) { + const char *last = strstr(file, "/"), *found = 0; + while (last) { + found = last; + last = strstr(last + 1, "/"); + } + last = strstr(file, "\\"); + while (last) { + found = last; + last = strstr(last + 1, "\\"); + } + if (found) { + file = found + 1; + } + + QString msg(QString("%1 %2 (%3 : %4)\n").arg(LogsData->entryStart()).arg(v).arg(file).arg(line)); + _logsWrite(LogDataDebug, msg); + +#ifdef Q_OS_WIN + //OutputDebugString(reinterpret_cast(msg.utf16())); +#elif defined Q_OS_MAC + //objc_outputDebugString(msg); +#elif defined Q_OS_LINUX && defined _DEBUG + //std::cout << msg.toUtf8().constData(); +#endif } -} -void logWrite(const QString &v) { - if (!mainLogStream) return; + void writeTcp(const QString &v) { + QString msg(QString("%1 %2\n").arg(LogsData->entryStart()).arg(v)); + _logsWrite(LogDataTcp, msg); + } - time_t t = time(NULL); - struct tm tm; - mylocaltime(&tm, &t); + void writeMtp(int32 dc, const QString &v) { + QString msg(QString("%1 (dc:%2) %3\n").arg(LogsData->entryStart()).arg(dc).arg(v)); + _logsWrite(LogDataMtp, msg); + } - { - QMutexLocker lock(&mainLogMutex); - if (!mainLogStream) return; + QString vector(const QVector &ids) { + if (!ids.size()) return "[]"; + QString idsStr = QString("[%1").arg(ids.cbegin()->v); + for (QVector::const_iterator i = ids.cbegin() + 1, e = ids.cend(); i != e; ++i) { + idsStr += QString(", %2").arg(i->v); + } + return idsStr + "]"; + } - QString msg(QString("[%1.%2.%3 %4:%5:%6] %7\n").arg(tm.tm_year + 1900).arg(tm.tm_mon + 1, 2, 10, zero).arg(tm.tm_mday, 2, 10, zero).arg(tm.tm_hour, 2, 10, zero).arg(tm.tm_min, 2, 10, zero).arg(tm.tm_sec, 2, 10, zero).arg(v)); - (*mainLogStream) << msg; - mainLogStream->flush(); + QString vector(const QVector &ids) { + if (!ids.size()) return "[]"; + QString idsStr = QString("[%1").arg(*ids.cbegin()); + for (QVector::const_iterator i = ids.cbegin() + 1, e = ids.cend(); i != e; ++i) { + idsStr += QString(", %2").arg(*i); + } + return idsStr + "]"; } - if (cDebug()) debugLogWrite("logs", 0, v); } -void moveOldDataFiles(const QString &wasDir) { +void _moveOldDataFiles(const QString &wasDir) { QFile data(wasDir + "data"), dataConfig(wasDir + "data_config"), tdataConfig(wasDir + "tdata/config"); if (data.exists() && dataConfig.exists() && !QFileInfo(cWorkingDir() + "data").exists() && !QFileInfo(cWorkingDir() + "data_config").exists()) { // move to home dir LOG(("Copying data to home dir '%1' from '%2'").arg(cWorkingDir()).arg(wasDir)); @@ -171,239 +373,3 @@ void moveOldDataFiles(const QString &wasDir) { } } } - -bool logsInit() { - t_assert(mainLogStream == 0); - - QFile beta(cExeDir() + qsl("TelegramBeta_data/tdata/beta")); - if (cBetaVersion()) { - cForceWorkingDir(cExeDir() + qsl("TelegramBeta_data/")); - if (*BetaPrivateKey) { - cSetBetaPrivateKey(QByteArray(BetaPrivateKey)); - } - if (beta.open(QIODevice::WriteOnly)) { - QDataStream dataStream(&beta); - dataStream.setVersion(QDataStream::Qt_5_3); - dataStream << quint64(cRealBetaVersion()) << cBetaPrivateKey(); - } else { - LOG(("Error: could not open \"beta\" file for writing private key!")); - } - } else if (beta.exists()) { - if (beta.open(QIODevice::ReadOnly)) { - QDataStream dataStream(&beta); - dataStream.setVersion(QDataStream::Qt_5_3); - - quint64 v; - QByteArray k; - dataStream >> v >> k; - if (dataStream.status() == QDataStream::Ok) { - cSetBetaVersion(qMax(v, AppVersion * 1000ULL)); - cSetBetaPrivateKey(k); - cSetRealBetaVersion(v); - - cForceWorkingDir(cExeDir() + qsl("TelegramBeta_data/")); - } - } - } - - if (cBetaVersion()) { - cSetDebug(true); - } else { - QString wasDir = cWorkingDir(); -#if (defined Q_OS_MAC || defined Q_OS_LINUX) - -#ifdef _DEBUG - cForceWorkingDir(cExeDir()); -#else - if(cWorkingDir().isEmpty()){ - cForceWorkingDir(psAppDataPath()); - } -#endif - -#if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version - moveOldDataFiles(wasDir); -#endif - -#endif - } - - QString rightDir = cWorkingDir(); - cForceWorkingDir(rightDir); - mainLog.setFileName(cWorkingDir() + "log.txt"); - mainLog.open(QIODevice::WriteOnly | QIODevice::Text); - if (!cBetaVersion() && !mainLog.isOpen()) { - cForceWorkingDir(cExeDir()); - mainLog.setFileName(cWorkingDir() + "log.txt"); - mainLog.open(QIODevice::WriteOnly | QIODevice::Text); - if (!mainLog.isOpen()) { - cForceWorkingDir(psAppDataPath()); - mainLog.setFileName(cWorkingDir() + "log.txt"); - mainLog.open(QIODevice::WriteOnly | QIODevice::Text); - } - } - if (mainLog.isOpen()) { - mainLogStream = new QTextStream(); - mainLogStream->setDevice(&mainLog); - mainLogStream->setCodec("UTF-8"); - } else { - cForceWorkingDir(rightDir); - } - cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/'); - - if (QFile(cWorkingDir() + qsl("tdata/withtestmode")).exists()) { - cSetTestMode(true); - LOG(("Switched to test mode!")); - } - -#ifdef Q_OS_WIN - if (cWorkingDir() == psAppDataPath()) { // fix old "Telegram Win (Unofficial)" version - moveOldDataFiles(psAppDataPathOld()); - } -#endif - - if (cDebug()) { - logsInitDebug(); - } else if (QFile(cWorkingDir() + qsl("tdata/withdebug")).exists()) { - logsInitDebug(); - cSetDebug(true); - } - - if (cBetaVersion()) { - cSetDevVersion(false); - } else if (!cDevVersion() && QFile(cWorkingDir() + qsl("tdata/devversion")).exists()) { - cSetDevVersion(true); - } - - QDir().setCurrent(cWorkingDir()); - return true; -} - -void logsInitDebug() { - time_t t = time(NULL); - struct tm tm; - mylocaltime(&tm, &t); - - static const int switchEach = 15; // minutes - int32 newPart = (tm.tm_min + tm.tm_hour * 60) / switchEach; - if (newPart == part) return; - - part = newPart; - - int32 dayIndex = (tm.tm_year + 1900) * 10000 + (tm.tm_mon + 1) * 100 + tm.tm_mday; - QString logPostfix = QString("_%4_%5").arg((part * switchEach) / 60, 2, 10, zero).arg((part * switchEach) % 60, 2, 10, zero); - - if (debugLogStream) { - delete debugLogStream; - debugLogStream = 0; - debugLog.close(); - } - debugLog.setFileName(cWorkingDir() + qsl("DebugLogs/log") + logPostfix + qsl(".txt")); - QIODevice::OpenMode debugLogMode = QIODevice::WriteOnly | QIODevice::Text; - if (debugLog.exists()) { - if (debugLog.open(QIODevice::ReadOnly | QIODevice::Text)) { - if (QString::fromUtf8(debugLog.readLine()).toInt() == dayIndex) { - debugLogMode |= QIODevice::Append; - } - debugLog.close(); - } - } - if (!debugLog.open(debugLogMode)) { - QDir dir(QDir::current()); - dir.mkdir(cWorkingDir() + qsl("DebugLogs")); - debugLog.open(debugLogMode); - } - if (debugLog.isOpen()) { - debugLogStream = new QTextStream(); - debugLogStream->setDevice(&debugLog); - debugLogStream->setCodec("UTF-8"); - (*debugLogStream) << ((debugLogMode & QIODevice::Append) ? qsl("----------------------------------------------------------------\nNEW LOGGING INSTANCE STARTED!!!\n----------------------------------------------------------------\n") : qsl("%1\n").arg(dayIndex)); - debugLogStream->flush(); - } - if (tcpLogStream) { - delete tcpLogStream; - tcpLogStream = 0; - tcpLog.close(); - } - tcpLog.setFileName(cWorkingDir() + qsl("DebugLogs/tcp") + logPostfix + qsl(".txt")); - QIODevice::OpenMode tcpLogMode = QIODevice::WriteOnly | QIODevice::Text; - if (tcpLog.exists()) { - if (tcpLog.open(QIODevice::ReadOnly | QIODevice::Text)) { - if (QString::fromUtf8(tcpLog.readLine()).toInt() == dayIndex) { - tcpLogMode |= QIODevice::Append; - } - tcpLog.close(); - } - } - if (tcpLog.open(tcpLogMode)) { - tcpLogStream = new QTextStream(); - tcpLogStream->setDevice(&tcpLog); - tcpLogStream->setCodec("UTF-8"); - (*tcpLogStream) << ((tcpLogMode & QIODevice::Append) ? qsl("----------------------------------------------------------------\nNEW LOGGING INSTANCE STARTED!!!\n----------------------------------------------------------------\n") : qsl("%1\n").arg(dayIndex)); - tcpLogStream->flush(); - } - if (mtpLogStream) { - delete mtpLogStream; - mtpLogStream = 0; - mtpLog.close(); - } - mtpLog.setFileName(cWorkingDir() + qsl("DebugLogs/mtp") + logPostfix + qsl(".txt")); - QIODevice::OpenMode mtpLogMode = QIODevice::WriteOnly | QIODevice::Text; - if (mtpLog.exists()) { - if (mtpLog.open(QIODevice::ReadOnly | QIODevice::Text)) { - if (QString::fromUtf8(mtpLog.readLine()).toInt() == dayIndex) { - mtpLogMode |= QIODevice::Append; - } - mtpLog.close(); - } - } - if (mtpLog.open(mtpLogMode)) { - mtpLogStream = new QTextStream(); - mtpLogStream->setDevice(&mtpLog); - mtpLogStream->setCodec("UTF-8"); - (*mtpLogStream) << ((mtpLogMode & QIODevice::Append) ? qsl("----------------------------------------------------------------\nNEW LOGGING INSTANCE STARTED!!!\n----------------------------------------------------------------\n") : qsl("%1\n").arg(dayIndex)); - mtpLogStream->flush(); - } -} - -void logsClose() { - if (cDebug()) { - if (debugLogStream) { - delete debugLogStream; - debugLogStream = 0; - debugLog.close(); - } - if (tcpLogStream) { - delete tcpLogStream; - tcpLogStream = 0; - tcpLog.close(); - } - if (mtpLogStream) { - delete mtpLogStream; - mtpLogStream = 0; - mtpLog.close(); - } - } - if (mainLogStream) { - delete mainLogStream; - mainLogStream = 0; - mainLog.close(); - } -} - -QString logVectorLong(const QVector &ids) { - if (!ids.size()) return "[]"; - QString idsStr = QString("[%1").arg(ids.cbegin()->v); - for (QVector::const_iterator i = ids.cbegin() + 1, e = ids.cend(); i != e; ++i) { - idsStr += QString(", %2").arg(i->v); - } - return idsStr + "]"; -} - -QString logVectorLong(const QVector &ids) { - if (!ids.size()) return "[]"; - QString idsStr = QString("[%1").arg(*ids.cbegin()); - for (QVector::const_iterator i = ids.cbegin() + 1, e = ids.cend(); i != e; ++i) { - idsStr += QString(", %2").arg(*i); - } - return idsStr + "]"; -} diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index ff75a6f21d7bdc..d50a93f5cda95a 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -20,78 +20,63 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #pragma once -#ifdef Q_OS_WIN -#define OUTPUT_LOG(msg) (OutputDebugString((QString msg + "\n").toStdWString().c_str())) -#endif +class MTPlong; +namespace Logs { -#if (defined _DEBUG || defined _WITH_DEBUG) + struct Initializer { + Initializer(); + ~Initializer(); + }; + bool started(); -struct DebugLogMemoryBuffer { - DebugLogMemoryBuffer(const void *ptr, uint32 size) : p(ptr), s(size) { - } - QString str() const { - QString result; - const uchar *buf((const uchar*)p); - const char *hex = "0123456789ABCDEF"; - result.reserve(s * 3); - for (uint32 i = 0; i < s; ++i) { - result += hex[(buf[i] >> 4)]; - result += hex[buf[i] & 0x0F]; - result += ' '; - } - result.chop(1); - return result; - } + void writeMain(const QString &v); - const void *p; - uint32 s; -}; + void writeDebug(const char *file, int32 line, const QString &v); + void writeTcp(const QString &v); + void writeMtp(int32 dc, const QString &v); -inline DebugLogMemoryBuffer mb(const void *ptr, uint32 size) { - return DebugLogMemoryBuffer(ptr, size); -} + inline const char *b(bool v) { + return v ? "[TRUE]" : "[FALSE]"; + } -void debugLogWrite(const char *file, int32 line, const QString &v); -#define DEBUG_LOG(msg) { if (cDebug()) debugLogWrite(__FILE__, __LINE__, QString msg); } -//usage DEBUG_LOG(("log: %1 %2").arg(1).arg(2)) + struct MemoryBuffer { + MemoryBuffer(const void *ptr, uint32 size) : p(ptr), s(size) { + } + QString str() const { + QString result; + const uchar *buf((const uchar*)p); + const char *hex = "0123456789ABCDEF"; + result.reserve(s * 3); + for (uint32 i = 0; i < s; ++i) { + result += hex[(buf[i] >> 4)]; + result += hex[buf[i] & 0x0F]; + result += ' '; + } + result.chop(1); + return result; + } -void tcpLogWrite(const QString &v); -#define TCP_LOG(msg) { if (cDebug()) tcpLogWrite(QString msg); } -//usage TCP_LOG(("log: %1 %2").arg(1).arg(2)) + const void *p; + uint32 s; + }; -void mtpLogWrite(int32 dc, const QString &v); -#define MTP_LOG(dc, msg) { if (cDebug()) mtpLogWrite(dc, QString msg); } -//usage MTP_LOG(dc, ("log: %1 %2").arg(1).arg(2)) + inline MemoryBuffer mb(const void *ptr, uint32 size) { + return MemoryBuffer(ptr, size); + } -#else -#define DEBUG_LOG(msg) (void(0)) -#define TCP_LOG(msg) (void(0)) -#define MTP_LOG(dc, msg) (void(0)) -#endif + QString vector(const QVector &ids); + QString vector(const QVector &ids); -inline const char *logBool(bool v) { - return v ? "[TRUE]" : "[FALSE]"; } -class MTPlong; -QString logVectorLong(const QVector &ids); -QString logVectorLong(const QVector &ids); - -void logWrite(const QString &v); - -#define LOG(msg) (logWrite(QString msg)) +#define LOG(msg) (Logs::writeMain(QString msg)) //usage LOG(("log: %1 %2").arg(1).arg(2)) -static volatile int *t_assert_nullptr = 0; -inline void t_noop() {} -inline void t_assert_fail(const char *message, const char *file, int32 line) { - LOG(("Assertion Failed! %1 %2:%3").arg(message).arg(file).arg(line)); - *t_assert_nullptr = 0; -} -#define t_assert_full(condition, message, file, line) ((!(condition)) ? t_assert_fail(message, file, line) : t_noop()) -#define t_assert_c(condition, comment) t_assert_full(condition, "\"" #condition "\" (" comment ")", __FILE__, __LINE__) -#define t_assert(condition) t_assert_full(condition, "\"" #condition "\"", __FILE__, __LINE__) +#define DEBUG_LOG(msg) { if (cDebug() || !Logs::started()) Logs::writeDebug(__FILE__, __LINE__, QString msg); } +//usage DEBUG_LOG(("log: %1 %2").arg(1).arg(2)) -bool logsInit(); -void logsInitDebug(); -void logsClose(); +#define TCP_LOG(msg) { if (cDebug() || !Logs::started()) Logs::writeTcp(QString msg); } +//usage TCP_LOG(("log: %1 %2").arg(1).arg(2)) + +#define MTP_LOG(dc, msg) { if (cDebug() || !Logs::started()) Logs::writeMtp(dc, QString msg); } +//usage MTP_LOG(dc, ("log: %1 %2").arg(1).arg(2)) diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index 13e86c4d159e16..dde5bfaa69694e 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -25,56 +25,25 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "localstorage.h" int main(int argc, char *argv[]) { + int result = 0; + #ifdef Q_OS_WIN _oldWndExceptionFilter = SetUnhandledExceptionFilter(_exceptionFilter); // CAPIHook apiHook("kernel32.dll", "SetUnhandledExceptionFilter", (PROC)RedirectedSetUnhandledExceptionFilter); #endif settingsParseArgs(argc, argv); - for (int32 i = 0; i < argc; ++i) { - if (string("-fixprevious") == argv[i]) { - return psFixPrevious(); - } else if (string("-cleanup") == argv[i]) { - return psCleanup(); - } - } - if (!logsInit()) { - return 0; - } - - installSignalHandlers(); - - Global::Initializer _init; - - Local::readSettings(); - if (Local::oldSettingsVersion() < AppVersion) { - psNewVersion(); + if (cLaunchMode() == LaunchModeFixPrevious) { + return psFixPrevious(); + } else if (cLaunchMode() == LaunchModeCleanup) { + return psCleanup(); } - if (cFromAutoStart() && !cAutoStart()) { - psAutoStart(false, true); - Local::stop(); - return 0; - } - - DEBUG_LOG(("Application Info: Telegram started, test mode: %1, exe dir: %2").arg(logBool(cTestMode())).arg(cExeDir())); - if (cDebug()) { - LOG(("Application Info: Telegram started in debug mode")); - for (int32 i = 0; i < argc; ++i) { - LOG(("Argument: %1").arg(fromUtf8Safe(argv[i]))); - } - QStringList logs = psInitLogs(); - for (int32 i = 0, l = logs.size(); i < l; ++i) { - LOG(("Init Log: %1").arg(logs.at(i))); - } - } - psClearInitLogs(); - - DEBUG_LOG(("Application Info: ideal thread count: %1, using %2 connections per session").arg(QThread::idealThreadCount()).arg(cConnectionsInSession())); - psStart(); - int result = 0; + Logs::Initializer _logs; { - QByteArray args[] = { "-style=0" }; // prepare fake args + PlatformSpecific::Initializer _ps; + + QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable static const int a_cnt = sizeof(args) / sizeof(args[0]); int a_argc = a_cnt + 1; char *a_argv[a_cnt + 1] = { argv[0], args[0].data() }; @@ -84,22 +53,11 @@ int main(int argc, char *argv[]) { result = app.exec(); } } - psFinish(); - Local::stop(); - DEBUG_LOG(("Application Info: Telegram done, result: %1").arg(result)); + DEBUG_LOG(("Telegram finished, result: %1").arg(result)); #ifndef TDESKTOP_DISABLE_AUTOUPDATE if (cRestartingUpdate()) { - if (!cBetaVersion() && DevVersion) { - LOG(("Writing 'devversion' file before launching the Updater!")); - QFile f(cWorkingDir() + qsl("tdata/devversion")); - if (!f.exists() && f.open(QIODevice::WriteOnly)) { - f.write("1"); - f.close(); - } - } - DEBUG_LOG(("Application Info: executing updater to install update..")); psExecUpdater(); } else @@ -109,6 +67,5 @@ int main(int argc, char *argv[]) { psExecTelegram(); } - logsClose(); return result; } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index c1b69b3c2bdbc8..e27a7cfab48434 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -3459,7 +3459,7 @@ void MainWidget::start(const MTPUser &user) { cSetOtherOnline(0); App::feedUsers(MTP_vector(1, user)); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - App::app()->startUpdateCheck(); + Sandboxer::startUpdateCheck(); #endif MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState)); update(); diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 11875e5435cbf0..18a4fec4979c21 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -179,7 +179,7 @@ void MediaView::moveToScreen() { } QPoint wndCenter(App::wnd()->x() + App::wnd()->width() / 2, App::wnd()->y() + App::wnd()->height() / 2); - QRect avail = App::app() ? App::app()->desktop()->screenGeometry(wndCenter) : QDesktopWidget().screenGeometry(wndCenter); + QRect avail = Sandboxer::screenGeometry(wndCenter); if (avail != geometry()) { setGeometry(avail); } @@ -586,7 +586,7 @@ void MediaView::onSaveAs() { } } activateWindow(); - App::app()->setActiveWindow(this); + Sandboxer::setActiveWindow(this); setFocus(); } @@ -1074,7 +1074,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty show(); psShowOverAll(this); activateWindow(); - App::app()->setActiveWindow(this); + Sandboxer::setActiveWindow(this); setFocus(); } } @@ -1990,7 +1990,7 @@ void MediaView::onCheckActive() { if (App::wnd() && isVisible()) { if (App::wnd()->isActiveWindow() && App::wnd()->hasFocus()) { activateWindow(); - App::app()->setActiveWindow(this); + Sandboxer::setActiveWindow(this); setFocus(); } } diff --git a/Telegram/SourceFiles/mtproto/generate.py b/Telegram/SourceFiles/mtproto/generate.py index 8947014417cfff..017eca81a608a4 100644 --- a/Telegram/SourceFiles/mtproto/generate.py +++ b/Telegram/SourceFiles/mtproto/generate.py @@ -793,7 +793,7 @@ def addTextSerializeInit(lst, dct): out.write('\n// Type constructors with data\n' + dataTexts); out.write('\n// RPC methods\n' + funcsText); out.write('\n// Inline methods definition\n' + inlineMethods); -out.write('\n// Human-readable text serialization\n#if (defined _DEBUG || defined _WITH_DEBUG)\n\nvoid mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons);\n\n#endif\n'); +out.write('\n// Human-readable text serialization\nvoid mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons);\n'); outCpp = open('mtpScheme.cpp', 'w'); outCpp.write('/*\n'); @@ -816,7 +816,6 @@ def addTextSerializeInit(lst, dct): outCpp.write('Copyright (c) 2014 John Preston, https://desktop.telegram.org\n'); outCpp.write('*/\n'); outCpp.write('#include "stdafx.h"\n#include "mtpScheme.h"\n\n'); -outCpp.write('#if (defined _DEBUG || defined _WITH_DEBUG)\n\n'); outCpp.write('typedef QVector Types;\ntypedef QVector StagesFlags;\n\n'); outCpp.write(textSerializeMethods); outCpp.write('namespace {\n'); @@ -825,7 +824,7 @@ def addTextSerializeInit(lst, dct): outCpp.write('\tvoid initTextSerializers() {\n'); outCpp.write(textSerializeInit); outCpp.write('\t}\n}\n'); -outCpp.write(textSerializeFull + '\n#endif\n'); +outCpp.write(textSerializeFull + '\n'); print('Done, written {0} constructors, {1} functions.'.format(consts, funcs)); diff --git a/Telegram/SourceFiles/mtproto/mtpAuthKey.h b/Telegram/SourceFiles/mtproto/mtpAuthKey.h index 1b0d71f7b22abc..aff25083df7ecd 100644 --- a/Telegram/SourceFiles/mtproto/mtpAuthKey.h +++ b/Telegram/SourceFiles/mtproto/mtpAuthKey.h @@ -52,7 +52,7 @@ class mtpAuthKey { } void prepareAES(const MTPint128 &msgKey, MTPint256 &aesKey, MTPint256 &aesIV, bool send = true) const { - if (!_isset) throw mtpErrorKeyNotReady(QString("prepareAES(.., %1)").arg(logBool(send))); + if (!_isset) throw mtpErrorKeyNotReady(QString("prepareAES(.., %1)").arg(Logs::b(send))); uint32 x = send ? 0 : 8; diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 90d1f8e7190f5b..9ae550360a2d7e 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -78,14 +78,14 @@ namespace { ) { ERR_load_crypto_strings(); LOG(("BigNum Error: BN_bin2bn failed, error: %1").arg(ERR_error_string(ERR_get_error(), 0))); - DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(mb(&g_be, sizeof(uint32)).str()).arg(mb(power, 64 * sizeof(uint32)).str()).arg(mb(modul, 64 * sizeof(uint32)).str())); + DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(Logs::mb(&g_be, sizeof(uint32)).str()).arg(Logs::mb(power, 64 * sizeof(uint32)).str()).arg(Logs::mb(modul, 64 * sizeof(uint32)).str())); return false; } if (!BN_mod_exp(&bnResult, &bn_g, &bnPower, &bnModul, ctx)) { ERR_load_crypto_strings(); LOG(("BigNum Error: BN_mod_exp failed, error: %1").arg(ERR_error_string(ERR_get_error(), 0))); - DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(mb(&g_be, sizeof(uint32)).str()).arg(mb(power, 64 * sizeof(uint32)).str()).arg(mb(modul, 64 * sizeof(uint32)).str())); + DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(Logs::mb(&g_be, sizeof(uint32)).str()).arg(Logs::mb(power, 64 * sizeof(uint32)).str()).arg(Logs::mb(modul, 64 * sizeof(uint32)).str())); return false; } @@ -109,7 +109,7 @@ namespace { if (!BN_mod_exp(&bnResult, &bn_g_a, &bnPower, &bnModul, ctx)) { ERR_load_crypto_strings(); LOG(("BigNum Error: BN_mod_exp failed, error: %1").arg(ERR_error_string(ERR_get_error(), 0))); - DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(mb(&g_be, sizeof(uint32)).str()).arg(mb(power, 64 * sizeof(uint32)).str()).arg(mb(modul, 64 * sizeof(uint32)).str())); + DEBUG_LOG(("BigNum Error: base %1, power %2, modul %3").arg(Logs::mb(&g_be, sizeof(uint32)).str()).arg(Logs::mb(power, 64 * sizeof(uint32)).str()).arg(Logs::mb(modul, 64 * sizeof(uint32)).str())); return false; } @@ -123,7 +123,7 @@ namespace { DEBUG_LOG(("BigNum Error: bad g_aResult export len (%1)").arg(resultLen)); return false; } - + BN_add_word(&bn_g_a, 1); // check g_a < dh_prime - 1 if (BN_cmp(&bn_g_a, &bnModul) >= 0) { DEBUG_LOG(("BigNum Error: bad g_a >= dh_prime - 1")); @@ -169,7 +169,7 @@ namespace { ) { ERR_load_crypto_strings(); LOG(("BigNum PT Error: BN_bin2bn failed, error: %1").arg(ERR_error_string(ERR_get_error(), 0))); - DEBUG_LOG(("BigNum PT Error: prime %1").arg(mb(pData, 64 * sizeof(uint32)).str())); + DEBUG_LOG(("BigNum PT Error: prime %1").arg(Logs::mb(pData, 64 * sizeof(uint32)).str())); return false; } @@ -412,12 +412,12 @@ namespace { } if (packet[0] != int32(size * sizeof(mtpPrime))) { LOG(("TCP Error: bad packet header")); - TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(mb(packet, size * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(Logs::mb(packet, size * sizeof(mtpPrime)).str())); return mtpBuffer(1, -500); } if (packet[size - 1] != hashCrc32(packet, (size - 1) * sizeof(mtpPrime))) { LOG(("TCP Error: bad packet checksum")); - TCP_LOG(("TCP Error: bad packet checksum, packet: %1").arg(mb(packet, size * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad packet checksum, packet: %1").arg(Logs::mb(packet, size * sizeof(mtpPrime)).str())); return mtpBuffer(1, -500); } TCP_LOG(("TCP Info: packet received, num = %1, size = %2").arg(packet[1]).arg(size * sizeof(mtpPrime))); @@ -500,18 +500,18 @@ namespace { uint32 len = buffer.size(); if (len < 5) { LOG(("Fake PQ Error: bad request answer, len = %1").arg(len * sizeof(mtpPrime))); - DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); throw Exception("bad pq reply"); } if (answer[0] != 0 || answer[1] != 0 || (((uint32)answer[2]) & 0x03) != 1/* || (unixtime() - answer[3] > 300) || (answer[3] - unixtime() > 60)*/) { // didnt sync time yet LOG(("Fake PQ Error: bad request answer start (%1 %2 %3)").arg(answer[0]).arg(answer[1]).arg(answer[2])); - DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); throw Exception("bad pq reply"); } uint32 answerLen = (uint32)answer[4]; if (answerLen != (len - 5) * sizeof(mtpPrime)) { LOG(("Fake PQ Error: bad request answer %1 <> %2").arg(answerLen).arg((len - 5) * sizeof(mtpPrime))); - DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("Fake PQ Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); throw Exception("bad pq reply"); } const mtpPrime *from(answer + 5), *end(from + len - 5); @@ -692,7 +692,7 @@ void MTPautoConnection::sendData(mtpBuffer &buffer) { if (buffer.size() < 3) { LOG(("TCP Error: writing bad packet, len = %1").arg(buffer.size() * sizeof(mtpPrime))); - TCP_LOG(("TCP Error: bad packet %1").arg(mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad packet %1").arg(Logs::mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); emit error(); return; } @@ -979,7 +979,7 @@ void MTPtcpConnection::sendData(mtpBuffer &buffer) { if (buffer.size() < 3) { LOG(("TCP Error: writing bad packet, len = %1").arg(buffer.size() * sizeof(mtpPrime))); - TCP_LOG(("TCP Error: bad packet %1").arg(mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad packet %1").arg(Logs::mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); emit error(); return; } @@ -989,7 +989,7 @@ void MTPtcpConnection::sendData(mtpBuffer &buffer) { buffer[0] = len; buffer[1] = packetNum++; buffer[size - 1] = hashCrc32(&buffer[0], len - 4); - TCP_LOG(("TCP Info: write %1 packet %2 bytes %3").arg(packetNum).arg(len).arg(mb(&buffer[0], len).str())); + TCP_LOG(("TCP Info: write %1 packet %2 bytes %3").arg(packetNum).arg(len).arg(Logs::mb(&buffer[0], len).str())); sock.write((const char*)&buffer[0], len); } @@ -1068,18 +1068,18 @@ void MTPhttpConnection::sendData(mtpBuffer &buffer) { if (buffer.size() < 3) { LOG(("TCP Error: writing bad packet, len = %1").arg(buffer.size() * sizeof(mtpPrime))); - TCP_LOG(("TCP Error: bad packet %1").arg(mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad packet %1").arg(Logs::mb(&buffer[0], buffer.size() * sizeof(mtpPrime)).str())); emit error(); return; } - + int32 requestSize = (buffer.size() - 3) * sizeof(mtpPrime); QNetworkRequest request(address); request.setHeader(QNetworkRequest::ContentLengthHeader, QVariant(requestSize)); request.setHeader(QNetworkRequest::ContentTypeHeader, QVariant(qsl("application/x-www-form-urlencoded"))); - TCP_LOG(("HTTP Info: sending %1 len request %2").arg(requestSize).arg(mb(&buffer[2], requestSize).str())); + TCP_LOG(("HTTP Info: sending %1 len request %2").arg(requestSize).arg(Logs::mb(&buffer[2], requestSize).str())); requests.insert(manager.post(request, QByteArray((const char*)(&buffer[2]), requestSize))); } @@ -1521,7 +1521,7 @@ mtpMsgId MTProtoConnectionPrivate::replaceMsgId(mtpRequest &request, mtpMsgId ne } mtpMsgId m = msgid(); if (m <= newId) break; // wtf - + newId = m; } @@ -1956,7 +1956,7 @@ void MTProtoConnectionPrivate::restart(bool mayBeBadKey) { QReadLocker lockFinished(&sessionDataMutex); if (!sessionData) return; - DEBUG_LOG(("MTP Info: restarting MTProtoConnection, maybe bad key = %1").arg(logBool(mayBeBadKey))); + DEBUG_LOG(("MTP Info: restarting MTProtoConnection, maybe bad key = %1").arg(Logs::b(mayBeBadKey))); _waitForReceivedTimer.stop(); _waitForConnectedTimer.stop(); @@ -2083,7 +2083,7 @@ void MTProtoConnectionPrivate::onWaitConnectedFailed() { void MTProtoConnectionPrivate::onWaitIPv4Failed() { _conn = _conn6; destroyConn(&_conn4); - + if (_conn) { DEBUG_LOG(("MTP Info: can't connect through IPv4, using IPv6 connection.")); @@ -2144,14 +2144,14 @@ void MTProtoConnectionPrivate::handleReceived() { const mtpPrime *encrypted(encryptedBuf.data()); if (len < 18) { // 2 auth_key_id, 4 msg_key, 2 salt, 2 session, 2 msg_id, 1 seq_no, 1 length, (1 data + 3 padding) min LOG(("TCP Error: bad message received, len %1").arg(len * sizeof(mtpPrime))); - TCP_LOG(("TCP Error: bad message %1").arg(mb(encrypted, len * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad message %1").arg(Logs::mb(encrypted, len * sizeof(mtpPrime)).str())); lockFinished.unlock(); return restart(); } if (keyId != *(uint64*)encrypted) { LOG(("TCP Error: bad auth_key_id %1 instead of %2 received").arg(keyId).arg(*(uint64*)encrypted)); - TCP_LOG(("TCP Error: bad message %1").arg(mb(encrypted, len * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad message %1").arg(Logs::mb(encrypted, len * sizeof(mtpPrime)).str())); lockFinished.unlock(); return restart(); @@ -2161,7 +2161,7 @@ void MTProtoConnectionPrivate::handleReceived() { mtpPrime *data((mtpPrime*)dataBuffer.data()), *msg = data + 8; const mtpPrime *from(msg), *end; MTPint128 msgKey(*(MTPint128*)(encrypted + 2)); - + aesDecrypt(encrypted + 6, data, dataBuffer.size(), key, msgKey); uint64 serverSalt = *(uint64*)&data[0], session = *(uint64*)&data[2], msgId = *(uint64*)&data[4]; @@ -2170,7 +2170,7 @@ void MTProtoConnectionPrivate::handleReceived() { if (uint32(dataBuffer.size()) < msgLen + 8 * sizeof(mtpPrime) || (msgLen & 0x03)) { LOG(("TCP Error: bad msg_len received %1, data size: %2").arg(msgLen).arg(dataBuffer.size())); - TCP_LOG(("TCP Error: bad message %1").arg(mb(encrypted, len * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad message %1").arg(Logs::mb(encrypted, len * sizeof(mtpPrime)).str())); _conn->received().pop_front(); lockFinished.unlock(); @@ -2179,13 +2179,13 @@ void MTProtoConnectionPrivate::handleReceived() { uchar sha1Buffer[20]; if (memcmp(&msgKey, hashSha1(data, msgLen + 8 * sizeof(mtpPrime), sha1Buffer) + 1, sizeof(msgKey))) { LOG(("TCP Error: bad SHA1 hash after aesDecrypt in message")); - TCP_LOG(("TCP Error: bad message %1").arg(mb(encrypted, len * sizeof(mtpPrime)).str())); + TCP_LOG(("TCP Error: bad message %1").arg(Logs::mb(encrypted, len * sizeof(mtpPrime)).str())); _conn->received().pop_front(); lockFinished.unlock(); return restart(); } - TCP_LOG(("TCP Info: decrypted message %1,%2,%3 is %4 len").arg(msgId).arg(seqNo).arg(logBool(needAck)).arg(msgLen + 8 * sizeof(mtpPrime))); + TCP_LOG(("TCP Info: decrypted message %1,%2,%3 is %4 len").arg(msgId).arg(seqNo).arg(Logs::b(needAck)).arg(msgLen + 8 * sizeof(mtpPrime))); uint64 serverSession = sessionData->getSession(); if (session != serverSession) { @@ -2261,7 +2261,7 @@ void MTProtoConnectionPrivate::handleReceived() { // send acks uint32 toAckSize = ackRequestData.size(); if (toAckSize) { - DEBUG_LOG(("MTP Info: will send %1 acks, ids: %2").arg(toAckSize).arg(logVectorLong(ackRequestData))); + DEBUG_LOG(("MTP Info: will send %1 acks, ids: %2").arg(toAckSize).arg(Logs::vector(ackRequestData))); emit sendAnythingAsync(MTPAckSendWaiting); } @@ -2273,7 +2273,7 @@ void MTProtoConnectionPrivate::handleReceived() { DEBUG_LOG(("MTP Info: emitting needToReceive() - need to parse in another thread, haveReceivedMap.size() = %1").arg(sessionData->haveReceivedMap().size())); } } - + if (emitSignal) { emit needToReceive(); } @@ -2344,7 +2344,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt bool needAck = (inSeqNo.v & 0x01); if (needAck) ackRequestData.push_back(inMsgId); - DEBUG_LOG(("Message Info: message from container, msg_id: %1, needAck: %2").arg(inMsgId.v).arg(logBool(needAck))); + DEBUG_LOG(("Message Info: message from container, msg_id: %1, needAck: %2").arg(inMsgId.v).arg(Logs::b(needAck))); otherEnd = from + (bytes.v >> 2); if (otherEnd > end) throw mtpErrorInsufficient(); @@ -2373,7 +2373,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt const QVector &ids(msg.c_msgs_ack().vmsg_ids.c_vector().v); uint32 idsCount = ids.size(); - DEBUG_LOG(("Message Info: acks received, ids: %1").arg(logVectorLong(ids))); + DEBUG_LOG(("Message Info: acks received, ids: %1").arg(Logs::vector(ids))); if (!idsCount) return (badTime ? 0 : 1); if (badTime) { @@ -2500,7 +2500,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt MTPMsgsStateReq msg(from, end); const QVector ids(msg.c_msgs_state_req().vmsg_ids.c_vector().v); uint32 idsCount = ids.size(); - DEBUG_LOG(("Message Info: msgs_state_req received, ids: %1").arg(logVectorLong(ids))); + DEBUG_LOG(("Message Info: msgs_state_req received, ids: %1").arg(Logs::vector(ids))); if (!idsCount) return 1; QByteArray info(idsCount, Qt::Uninitialized); @@ -2546,11 +2546,11 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt case mtpc_msgs_state_info: { MTPMsgsStateInfo msg(from, end); const MTPDmsgs_state_info &data(msg.c_msgs_state_info()); - + uint64 reqMsgId = data.vreq_msg_id.v; const string &states(data.vinfo.c_string().v); - DEBUG_LOG(("Message Info: msg state received, msgId %1, reqMsgId: %2, HEX states %3").arg(msgId).arg(reqMsgId).arg(mb(states.data(), states.length()).str())); + DEBUG_LOG(("Message Info: msg state received, msgId %1, reqMsgId: %2, HEX states %3").arg(msgId).arg(reqMsgId).arg(Logs::mb(states.data(), states.length()).str())); mtpRequest requestBuffer; { // find this request in session-shared sent requests map QReadLocker locker(sessionData->haveSentMutex()); @@ -2607,7 +2607,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt QVector toAck; - DEBUG_LOG(("Message Info: msgs all info received, msgId %1, reqMsgIds: %2, states %3").arg(msgId).arg(logVectorLong(ids)).arg(mb(states.data(), states.length()).str())); + DEBUG_LOG(("Message Info: msgs all info received, msgId %1, reqMsgIds: %2, states %3").arg(msgId).arg(Logs::vector(ids)).arg(Logs::mb(states.data(), states.length()).str())); handleMsgsStates(ids, states, toAck); requestsAcked(toAck); @@ -2669,13 +2669,13 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt resendRequestData.push_back(resMsgId); } } return 1; - + case mtpc_msg_resend_req: { MTPMsgResendReq msg(from, end); const QVector &ids(msg.c_msg_resend_req().vmsg_ids.c_vector().v); uint32 idsCount = ids.size(); - DEBUG_LOG(("Message Info: resend of msgs requested, ids: %1").arg(logVectorLong(ids))); + DEBUG_LOG(("Message Info: resend of msgs requested, ids: %1").arg(Logs::vector(ids))); if (!idsCount) return (badTime ? 0 : 1); QVector toResend(ids.size(), Qt::Uninitialized); @@ -2762,7 +2762,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt mtpBuffer update(from - start); if (from > start) memcpy(update.data(), start, (from - start) * sizeof(mtpPrime)); - + QWriteLocker locker(sessionData->haveReceivedMutex()); mtpResponseMap &haveReceived(sessionData->haveReceivedMap()); mtpRequestId fakeRequestId = sessionData->nextFakeRequestId(); @@ -2782,7 +2782,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt MTPPong msg(from, end); const MTPDpong &data(msg.c_pong()); DEBUG_LOG(("Message Info: pong received, msg_id: %1, ping_id: %2").arg(data.vmsg_id.v).arg(data.vping_id.v)); - + if (!wasSent(data.vmsg_id.v)) { DEBUG_LOG(("Message Error: such msg_id %1 ping_id %2 was not sent recently").arg(data.vmsg_id.v).arg(data.vping_id.v)); return 0; @@ -2817,7 +2817,7 @@ int32 MTProtoConnectionPrivate::handleOneReceived(const mtpPrime *from, const mt mtpBuffer update(end - from); if (end > from) memcpy(update.data(), from, (end - from) * sizeof(mtpPrime)); - + QWriteLocker locker(sessionData->haveReceivedMutex()); mtpResponseMap &haveReceived(sessionData->haveReceivedMap()); mtpRequestId fakeRequestId = sessionData->nextFakeRequestId(); @@ -2859,14 +2859,14 @@ mtpBuffer MTProtoConnectionPrivate::ungzip(const mtpPrime *from, const mtpPrime if (res != Z_OK && res != Z_STREAM_END) { inflateEnd(&stream); LOG(("RPC Error: could not unpack gziped data, code: %1").arg(res)); - DEBUG_LOG(("RPC Error: bad gzip: %1").arg(mb(&packed.c_string().v[0], packedLen).str())); + DEBUG_LOG(("RPC Error: bad gzip: %1").arg(Logs::mb(&packed.c_string().v[0], packedLen).str())); return mtpBuffer(); } } if (stream.avail_out & 0x03) { uint32 badSize = result.size() * sizeof(mtpPrime) - stream.avail_out; LOG(("RPC Error: bad length of unpacked data %1").arg(badSize)); - DEBUG_LOG(("RPC Error: bad unpacked data %1").arg(mb(result.data(), badSize).str())); + DEBUG_LOG(("RPC Error: bad unpacked data %1").arg(Logs::mb(result.data(), badSize).str())); return mtpBuffer(); } result.resize(result.size() - (stream.avail_out >> 2)); @@ -2893,7 +2893,7 @@ bool MTProtoConnectionPrivate::requestsFixTimeSalt(const QVector &ids, void MTProtoConnectionPrivate::requestsAcked(const QVector &ids, bool byResponse) { uint32 idsCount = ids.size(); - DEBUG_LOG(("Message Info: requests acked, ids %1").arg(logVectorLong(ids))); + DEBUG_LOG(("Message Info: requests acked, ids %1").arg(Logs::vector(ids))); RPCCallbackClears clearedAcked; QVector toAckMore; @@ -2995,7 +2995,7 @@ void MTProtoConnectionPrivate::handleMsgsStates(const QVector &ids, con DEBUG_LOG(("Message Info: void ids vector in handleMsgsStates()")); return; } - + acked.reserve(acked.size() + idsCount); for (uint32 i = 0, count = idsCount; i < count; ++i) { @@ -3137,7 +3137,7 @@ void MTProtoConnectionPrivate::updateAuthKey() { clearMessages(); keyId = newKeyId; } - DEBUG_LOG(("AuthKey Info: MTProtoConnection update key from MTProtoSession, dc %1 result: %2").arg(dc).arg(mb(&keyId, sizeof(keyId)).str())); + DEBUG_LOG(("AuthKey Info: MTProtoConnection update key from MTProtoSession, dc %1 result: %2").arg(dc).arg(Logs::mb(&keyId, sizeof(keyId)).str())); if (keyId) { return authKeyCreated(); } @@ -3186,7 +3186,7 @@ void MTProtoConnectionPrivate::pqAnswered() { const MTPDresPQ &res_pq_data(res_pq.c_resPQ()); if (res_pq_data.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in res_pq)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&res_pq_data.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&res_pq_data.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); return restart(); } @@ -3225,7 +3225,7 @@ void MTProtoConnectionPrivate::pqAnswered() { if (!parsePQ(pq, p, q)) { LOG(("AuthKey Error: could not factor pq!")); - DEBUG_LOG(("AuthKey Error: problematic pq: %1").arg(mb(&pq[0], pq.length()).str())); + DEBUG_LOG(("AuthKey Error: problematic pq: %1").arg(Logs::mb(&pq[0], pq.length()).str())); return restart(); } @@ -3247,7 +3247,7 @@ void MTProtoConnectionPrivate::pqAnswered() { tmp.reserve(encSize); p_q_inner.write(tmp); LOG(("AuthKey Error: too large data for RSA encrypt, size %1").arg(encSize * sizeof(mtpPrime))); - DEBUG_LOG(("AuthKey Error: bad data for RSA encrypt %1").arg(mb(&tmp[0], tmp.size() * 4).str())); + DEBUG_LOG(("AuthKey Error: bad data for RSA encrypt %1").arg(Logs::mb(&tmp[0], tmp.size() * 4).str())); return restart(); // can't be 255-byte string } @@ -3291,12 +3291,12 @@ void MTProtoConnectionPrivate::dhParamsAnswered() { const MTPDserver_DH_params_ok &encDH(res_DH_params.c_server_DH_params_ok()); if (encDH.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in server_DH_params_ok)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&encDH.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&encDH.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); return restart(); } if (encDH.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in server_DH_params_ok)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&encDH.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&encDH.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); return restart(); } @@ -3304,7 +3304,7 @@ void MTProtoConnectionPrivate::dhParamsAnswered() { uint32 encDHLen = encDHStr.length(), encDHBufLen = encDHLen >> 2; if ((encDHLen & 0x03) || encDHBufLen < 6) { LOG(("AuthKey Error: bad encrypted data length %1 (in server_DH_params_ok)!").arg(encDHLen)); - DEBUG_LOG(("AuthKey Error: received encrypted data %1").arg(mb(&encDHStr[0], encDHLen).str())); + DEBUG_LOG(("AuthKey Error: received encrypted data %1").arg(Logs::mb(&encDHStr[0], encDHLen).str())); return restart(); } @@ -3334,18 +3334,18 @@ void MTProtoConnectionPrivate::dhParamsAnswered() { const MTPDserver_DH_inner_data &dh_inner_data(dh_inner.c_server_DH_inner_data()); if (dh_inner_data.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in server_DH_inner_data)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&dh_inner_data.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&dh_inner_data.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); return restart(); } if (dh_inner_data.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in server_DH_inner_data)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&dh_inner_data.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&dh_inner_data.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); return restart(); } uchar sha1Buffer[20]; if (memcmp(&decBuffer[0], hashSha1(&decBuffer[5], (to - from) * sizeof(mtpPrime), sha1Buffer), 20)) { LOG(("AuthKey Error: sha1 hash of encrypted part did not match!")); - DEBUG_LOG(("AuthKey Error: sha1 did not match, server_nonce: %1, new_nonce %2, encrypted data %3").arg(mb(&authKeyData->server_nonce, 16).str()).arg(mb(&authKeyData->new_nonce, 16).str()).arg(mb(&encDHStr[0], encDHLen).str())); + DEBUG_LOG(("AuthKey Error: sha1 did not match, server_nonce: %1, new_nonce %2, encrypted data %3").arg(Logs::mb(&authKeyData->server_nonce, 16).str()).arg(Logs::mb(&authKeyData->new_nonce, 16).str()).arg(Logs::mb(&encDHStr[0], encDHLen).str())); return restart(); } unixtimeSet(dh_inner_data.vserver_time.v); @@ -3353,15 +3353,15 @@ void MTProtoConnectionPrivate::dhParamsAnswered() { const string &dhPrime(dh_inner_data.vdh_prime.c_string().v), &g_a(dh_inner_data.vg_a.c_string().v); if (dhPrime.length() != 256 || g_a.length() != 256) { LOG(("AuthKey Error: bad dh_prime len (%1) or g_a len (%2)").arg(dhPrime.length()).arg(g_a.length())); - DEBUG_LOG(("AuthKey Error: dh_prime %1, g_a %2").arg(mb(&dhPrime[0], dhPrime.length()).str()).arg(mb(&g_a[0], g_a.length()).str())); + DEBUG_LOG(("AuthKey Error: dh_prime %1, g_a %2").arg(Logs::mb(&dhPrime[0], dhPrime.length()).str()).arg(Logs::mb(&g_a[0], g_a.length()).str())); return restart(); } - + // check that dhPrime and (dhPrime - 1) / 2 are really prime using openssl BIGNUM methods _BigNumPrimeTest bnPrimeTest; if (!bnPrimeTest.isPrimeAndGood(&dhPrime[0], MTPMillerRabinIterCount, dh_inner_data.vg.v)) { LOG(("AuthKey Error: bad dh_prime primality!").arg(dhPrime.length()).arg(g_a.length())); - DEBUG_LOG(("AuthKey Error: dh_prime %1").arg(mb(&dhPrime[0], dhPrime.length()).str())); + DEBUG_LOG(("AuthKey Error: dh_prime %1").arg(Logs::mb(&dhPrime[0], dhPrime.length()).str())); return restart(); } @@ -3376,18 +3376,18 @@ void MTProtoConnectionPrivate::dhParamsAnswered() { const MTPDserver_DH_params_fail &encDH(res_DH_params.c_server_DH_params_fail()); if (encDH.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in server_DH_params_fail)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&encDH.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&encDH.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); return restart(); } if (encDH.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in server_DH_params_fail)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&encDH.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&encDH.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); return restart(); } uchar sha1Buffer[20]; if (encDH.vnew_nonce_hash != *(MTPint128*)(hashSha1(&authKeyData->new_nonce, 32, sha1Buffer) + 1)) { LOG(("AuthKey Error: received new_nonce_hash did not match!")); - DEBUG_LOG(("AuthKey Error: received new_nonce_hash: %1, new_nonce: %2").arg(mb(&encDH.vnew_nonce_hash, 16).str()).arg(mb(&authKeyData->new_nonce, 32).str())); + DEBUG_LOG(("AuthKey Error: received new_nonce_hash: %1, new_nonce: %2").arg(Logs::mb(&encDH.vnew_nonce_hash, 16).str()).arg(Logs::mb(&authKeyData->new_nonce, 32).str())); return restart(); } LOG(("AuthKey Error: server_DH_params_fail received!")); @@ -3430,7 +3430,7 @@ void MTProtoConnectionPrivate::dhClientParamsSend() { MTPSet_client_DH_params req_client_DH_params; req_client_DH_params.vnonce = authKeyData->nonce; req_client_DH_params.vserver_nonce = authKeyData->server_nonce; - + string &sdhEncString(req_client_DH_params.vencrypted_data._string().v); uint32 client_dh_inner_size = client_dh_inner.innerLength(), encSize = (client_dh_inner_size >> 2) + 5, encFullSize = encSize; @@ -3477,14 +3477,14 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { const MTPDdh_gen_ok &resDH(res_client_DH_params.c_dh_gen_ok()); if (resDH.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in dh_gen_ok)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&resDH.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&resDH.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); lockFinished.unlock(); return restart(); } if (resDH.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in dh_gen_ok)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&resDH.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&resDH.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); lockFinished.unlock(); return restart(); @@ -3493,7 +3493,7 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { uchar sha1Buffer[20]; if (resDH.vnew_nonce_hash1 != *(MTPint128*)(hashSha1(authKeyData->new_nonce_buf, 41, sha1Buffer) + 1)) { LOG(("AuthKey Error: received new_nonce_hash1 did not match!")); - DEBUG_LOG(("AuthKey Error: received new_nonce_hash1: %1, new_nonce_buf: %2").arg(mb(&resDH.vnew_nonce_hash1, 16).str()).arg(mb(authKeyData->new_nonce_buf, 41).str())); + DEBUG_LOG(("AuthKey Error: received new_nonce_hash1: %1, new_nonce_buf: %2").arg(Logs::mb(&resDH.vnew_nonce_hash1, 16).str()).arg(Logs::mb(authKeyData->new_nonce_buf, 41).str())); lockFinished.unlock(); return restart(); @@ -3506,7 +3506,7 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { authKey->setKey(authKeyData->auth_key); authKey->setDC(dc % _mtp_internal::dcShift); - DEBUG_LOG(("AuthKey Info: auth key gen succeed, id: %1, server salt: %2, auth key: %3").arg(authKey->keyId()).arg(serverSalt).arg(mb(authKeyData->auth_key, 256).str())); + DEBUG_LOG(("AuthKey Info: auth key gen succeed, id: %1, server salt: %2, auth key: %3").arg(authKey->keyId()).arg(serverSalt).arg(Logs::mb(authKeyData->auth_key, 256).str())); sessionData->owner()->notifyKeyCreated(authKey); // slot will call authKeyCreated() sessionData->clear(); @@ -3517,14 +3517,14 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { const MTPDdh_gen_retry &resDH(res_client_DH_params.c_dh_gen_retry()); if (resDH.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in dh_gen_retry)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&resDH.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&resDH.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); lockFinished.unlock(); return restart(); } if (resDH.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in dh_gen_retry)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&resDH.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&resDH.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); lockFinished.unlock(); return restart(); @@ -3533,7 +3533,7 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { uchar sha1Buffer[20]; if (resDH.vnew_nonce_hash2 != *(MTPint128*)(hashSha1(authKeyData->new_nonce_buf, 41, sha1Buffer) + 1)) { LOG(("AuthKey Error: received new_nonce_hash2 did not match!")); - DEBUG_LOG(("AuthKey Error: received new_nonce_hash2: %1, new_nonce_buf: %2").arg(mb(&resDH.vnew_nonce_hash2, 16).str()).arg(mb(authKeyData->new_nonce_buf, 41).str())); + DEBUG_LOG(("AuthKey Error: received new_nonce_hash2: %1, new_nonce_buf: %2").arg(Logs::mb(&resDH.vnew_nonce_hash2, 16).str()).arg(Logs::mb(authKeyData->new_nonce_buf, 41).str())); lockFinished.unlock(); return restart(); @@ -3545,14 +3545,14 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { const MTPDdh_gen_fail &resDH(res_client_DH_params.c_dh_gen_fail()); if (resDH.vnonce != authKeyData->nonce) { LOG(("AuthKey Error: received nonce <> sent nonce (in dh_gen_fail)!")); - DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(mb(&resDH.vnonce, 16).str()).arg(mb(&authKeyData->nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received nonce: %1, sent nonce: %2").arg(Logs::mb(&resDH.vnonce, 16).str()).arg(Logs::mb(&authKeyData->nonce, 16).str())); lockFinished.unlock(); return restart(); } if (resDH.vserver_nonce != authKeyData->server_nonce) { LOG(("AuthKey Error: received server_nonce <> sent server_nonce (in dh_gen_fail)!")); - DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(mb(&resDH.vserver_nonce, 16).str()).arg(mb(&authKeyData->server_nonce, 16).str())); + DEBUG_LOG(("AuthKey Error: received server_nonce: %1, sent server_nonce: %2").arg(Logs::mb(&resDH.vserver_nonce, 16).str()).arg(Logs::mb(&authKeyData->server_nonce, 16).str())); lockFinished.unlock(); return restart(); @@ -3561,7 +3561,7 @@ void MTProtoConnectionPrivate::dhClientParamsAnswered() { uchar sha1Buffer[20]; if (resDH.vnew_nonce_hash3 != *(MTPint128*)(hashSha1(authKeyData->new_nonce_buf, 41, sha1Buffer) + 1)) { LOG(("AuthKey Error: received new_nonce_hash3 did not match!")); - DEBUG_LOG(("AuthKey Error: received new_nonce_hash3: %1, new_nonce_buf: %2").arg(mb(&resDH.vnew_nonce_hash3, 16).str()).arg(mb(authKeyData->new_nonce_buf, 41).str())); + DEBUG_LOG(("AuthKey Error: received new_nonce_hash3: %1, new_nonce_buf: %2").arg(Logs::mb(&resDH.vnew_nonce_hash3, 16).str()).arg(Logs::mb(authKeyData->new_nonce_buf, 41).str())); lockFinished.unlock(); return restart(); @@ -3622,7 +3622,7 @@ void MTProtoConnectionPrivate::onError4(bool mayBeBadKey) { destroyConn(); _waitForConnectedTimer.stop(); - MTP_LOG(dc, ("Restarting after error in IPv4 connection, maybe bad key: %1..").arg(logBool(mayBeBadKey))); + MTP_LOG(dc, ("Restarting after error in IPv4 connection, maybe bad key: %1..").arg(Logs::b(mayBeBadKey))); return restart(mayBeBadKey); } else { destroyConn(&_conn4); @@ -3636,7 +3636,7 @@ void MTProtoConnectionPrivate::onError6(bool mayBeBadKey) { destroyConn(); _waitForConnectedTimer.stop(); - MTP_LOG(dc, ("Restarting after error in IPv6 connection, maybe bad key: %1..").arg(logBool(mayBeBadKey))); + MTP_LOG(dc, ("Restarting after error in IPv6 connection, maybe bad key: %1..").arg(Logs::b(mayBeBadKey))); return restart(mayBeBadKey); } else { destroyConn(&_conn6); @@ -3692,18 +3692,18 @@ bool MTProtoConnectionPrivate::readResponseNotSecure(TResponse &response) { uint32 len = buffer.size(); if (len < 5) { LOG(("AuthKey Error: bad request answer, len = %1").arg(len * sizeof(mtpPrime))); - DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); return false; } if (answer[0] != 0 || answer[1] != 0 || (((uint32)answer[2]) & 0x03) != 1/* || (unixtime() - answer[3] > 300) || (answer[3] - unixtime() > 60)*/) { // didnt sync time yet LOG(("AuthKey Error: bad request answer start (%1 %2 %3)").arg(answer[0]).arg(answer[1]).arg(answer[2])); - DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); return false; } uint32 answerLen = (uint32)answer[4]; if (answerLen != (len - 5) * sizeof(mtpPrime)) { LOG(("AuthKey Error: bad request answer %1 <> %2").arg(answerLen).arg((len - 5) * sizeof(mtpPrime))); - DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(mb(answer, len * sizeof(mtpPrime)).str())); + DEBUG_LOG(("AuthKey Error: answer bytes %1").arg(Logs::mb(answer, len * sizeof(mtpPrime)).str())); return false; } const mtpPrime *from(answer + 5), *end(from + len - 5); @@ -3720,7 +3720,7 @@ bool MTProtoConnectionPrivate::sendRequest(mtpRequest &request, bool needAnyResp uint32 messageSize = mtpRequestData::messageSize(request); if (messageSize < 5 || fullSize < messageSize + 4) return false; - + ReadLockerAttempt lock(sessionData->keyMutex()); if (!lock) { DEBUG_LOG(("MTP Info: could not lock key for read in sendBuffer(), dc %1, restarting..").arg(dc)); @@ -3758,7 +3758,7 @@ bool MTProtoConnectionPrivate::sendRequest(mtpRequest &request, bool needAnyResp *((MTPint128*)&result[4]) = msgKey; aesEncrypt(request->constData(), &result[8], fullSize * sizeof(mtpPrime), key, msgKey); - + DEBUG_LOG(("MTP Info: sending request, size: %1, num: %2, time: %3").arg(fullSize + 6).arg((*request)[4]).arg((*request)[5])); _conn->setSentEncrypted(); diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp index b1d00fb1ea2f93..dd0a82ae4ebe65 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp @@ -23,8 +23,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "lang.h" -#if defined _DEBUG || defined _WITH_DEBUG - QString mtpWrapNumber(float64 number) { return QString::number(number); } @@ -63,9 +61,9 @@ void mtpTextSerializeCore(MTPStringLogger &to, const mtpPrime *&from, const mtpP if (str.toUtf8() == strUtf8) { to.add("\"").add(str.replace('\\', "\\\\").replace('"', "\\\"").replace('\n', "\\n")).add("\" [STRING]"); } else if (strUtf8.size() < 64) { - to.add(mb(strUtf8.constData(), strUtf8.size()).str()).add(" [").add(mtpWrapNumber(strUtf8.size())).add(" BYTES]"); + to.add(Logs::mb(strUtf8.constData(), strUtf8.size()).str()).add(" [").add(mtpWrapNumber(strUtf8.size())).add(" BYTES]"); } else { - to.add(mb(strUtf8.constData(), 16).str()).add(".. [").add(mtpWrapNumber(strUtf8.size())).add(" BYTES]"); + to.add(Logs::mb(strUtf8.constData(), 16).str()).add(".. [").add(mtpWrapNumber(strUtf8.size())).add(" BYTES]"); } } break; @@ -151,8 +149,6 @@ void mtpTextSerializeCore(MTPStringLogger &to, const mtpPrime *&from, const mtpP } } -#endif - QString stickerSetTitle(const MTPDstickerSet &s) { QString title = qs(s.vtitle); if ((s.vflags.v & MTPDstickerSet::flag_official) && !title.compare(qstr("Great Minds"), Qt::CaseInsensitive)) { diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index d0ed98c4dba65a..abdb10eb29c562 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -162,7 +162,7 @@ typedef QMap mtpPreRequestMap; typedef QMap mtpRequestMap; typedef QMap mtpMsgIdsSet; class mtpMsgIdsMap : public QMap { -public: +public: typedef QMap ParentType; bool insert(const mtpMsgId &k, bool v) { @@ -595,7 +595,7 @@ inline bool operator!=(const MTPint256 &a, const MTPint256 &b) { class MTPdouble { public: float64 v; - + MTPdouble() { } MTPdouble(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_double) { @@ -702,7 +702,7 @@ class MTPstring : private mtpDataOwner { from += ((l + 1) >> 2) + (((l + 1) & 0x03) ? 1 : 0); } if (from > end) throw mtpErrorInsufficient(); - + if (!data) setData(new MTPDstring()); MTPDstring &v(_string()); v.v.resize(l); @@ -895,7 +895,6 @@ inline bool operator!=(const MTPvector &a, const MTPvector &b) { } // Human-readable text serialization -#if (defined _DEBUG || defined _WITH_DEBUG) template QString mtpWrapNumber(Type number, int32 base = 10) { @@ -965,8 +964,6 @@ inline QString mtpTextSerialize(const mtpPrime *&from, const mtpPrime *end) { return QString::fromUtf8(to.p, to.size); } -#endif - #include "mtpScheme.h" inline MTPbool MTP_bool(bool v) { diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index 6693765ba6b91c..aa213c7edaea4f 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -22,8 +22,6 @@ Copyright (c) 2014 John Preston, https://desktop.telegram.org #include "stdafx.h" #include "mtpScheme.h" -#if (defined _DEBUG || defined _WITH_DEBUG) - typedef QVector Types; typedef QVector StagesFlags; @@ -8266,4 +8264,3 @@ void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpP } } -#endif diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index bb52437c2851b1..09450332c47d5b 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -31439,8 +31439,4 @@ inline MTPmessages_botResults MTP_messages_botResults(MTPint _flags, const MTPlo } // Human-readable text serialization -#if (defined _DEBUG || defined _WITH_DEBUG) - void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons); - -#endif diff --git a/Telegram/SourceFiles/mtproto/mtpSession.cpp b/Telegram/SourceFiles/mtproto/mtpSession.cpp index ddb3a8db8b7a91..ee49811a8c1d1e 100644 --- a/Telegram/SourceFiles/mtproto/mtpSession.cpp +++ b/Telegram/SourceFiles/mtproto/mtpSession.cpp @@ -86,7 +86,7 @@ void MTProtoSession::start(int32 dcenter) { DEBUG_LOG(("Session Info: MTProtoSession::start called on already started session")); return; } - + msSendCall = msWait = 0; connect(&timeouter, SIGNAL(timeout()), this, SLOT(checkRequestsByTimer())); @@ -265,7 +265,7 @@ void MTProtoSession::checkRequestsByTimer() { } if (stateRequestIds.size()) { - DEBUG_LOG(("MTP Info: requesting state of msgs: %1").arg(logVectorLong(stateRequestIds))); + DEBUG_LOG(("MTP Info: requesting state of msgs: %1").arg(Logs::vector(stateRequestIds))); { QWriteLocker locker(data.stateRequestMutex()); for (uint32 i = 0, l = stateRequestIds.size(); i < l; ++i) { @@ -398,7 +398,7 @@ mtpRequestId MTProtoSession::resend(quint64 msgId, quint64 msCanWait, bool force if (sendMsgStateInfo) { char cantResend[2] = {1, 0}; DEBUG_LOG(("Message Info: cant resend %1, request not found").arg(msgId)); - + return send(MTP_msgs_state_info(MTP_long(msgId), MTP_string(string(cantResend, cantResend + 1)))); } return 0; @@ -485,7 +485,7 @@ void MTProtoSession::layerWasInitedForDC(bool wasInited) { } void MTProtoSession::notifyLayerInited(bool wasInited) { - DEBUG_LOG(("MTP Info: emitting MTProtoDC::layerWasInited(%1), dcWithShift %2").arg(logBool(wasInited)).arg(dcWithShift)); + DEBUG_LOG(("MTP Info: emitting MTProtoDC::layerWasInited(%1), dcWithShift %2").arg(Logs::b(wasInited)).arg(dcWithShift)); dc->setConnectionInited(wasInited); emit dc->layerWasInited(wasInited); } diff --git a/Telegram/SourceFiles/pspecific.h b/Telegram/SourceFiles/pspecific.h index 47927ca8e59a82..0b1442ad631667 100644 --- a/Telegram/SourceFiles/pspecific.h +++ b/Telegram/SourceFiles/pspecific.h @@ -35,3 +35,12 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #ifdef Q_OS_WIN #include "pspecific_wnd.h" #endif + +namespace PlatformSpecific { + + struct Initializer { + Initializer(); + ~Initializer(); + }; + +} diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 35e208f8ab947d..5696398934a745 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -197,8 +197,6 @@ namespace { typedef UnityLauncherEntry* (*f_unity_launcher_entry_get_for_desktop_id)(const gchar* desktop_id); f_unity_launcher_entry_get_for_desktop_id ps_unity_launcher_entry_get_for_desktop_id = 0; - QStringList _initLogs; - template bool loadFunction(QLibrary &lib, const char *name, TFunction &func) { if (!lib.isLoaded()) return false; @@ -207,7 +205,7 @@ namespace { if (func) { return true; } else { - _initLogs.push_back(QString("Init Error: Failed to load '%1' function!").arg(name)); + LOG(("Error: failed to load '%1' function!").arg(name)); return false; } } @@ -362,26 +360,24 @@ namespace { if (noQtTrayIcon) cSetSupportTray(false); - std::cout << "libs init..\n"; + DEBUG_LOG(("Loading libraries")); setupGtk(); setupUnity(); } bool loadLibrary(QLibrary &lib, const char *name, int version) { - std::cout << "loading " << name << " with version " << version << "..\n"; + DEBUG_LOG(("Loading '%1' with version %2..").arg(QLatin1String(name)).arg(version)); lib.setFileNameAndVersion(QLatin1String(name), version); if (lib.load()) { - std::cout << "loaded " << name << " with version " << version << "!\n"; - _initLogs.push_back(QString("Loaded '%1' version %2 library").arg(name).arg(version)); + DEBUG_LOG(("Loaded '%1' with version %2!").arg(QLatin1String(name)).arg(version)); return true; - } + } lib.setFileNameAndVersion(QLatin1String(name), QString()); if (lib.load()) { - std::cout << "loaded " << name << " without version!\n"; - _initLogs.push_back(QString("Loaded '%1' without version library").arg(name)); + DEBUG_LOG(("Loaded '%1' without version!").arg(QLatin1String(name))); return true; - } - std::cout << "could not load " << name << " without version.\n"; + } + LOG(("Could not load '%1' with version %2 :(").arg(QLatin1String(name)).arg(version)); return false; } @@ -406,7 +402,7 @@ namespace { if (!loadFunction(lib_gtk, "g_object_unref", ps_g_object_unref)) return; useGtkBase = true; - std::cout << "loaded gtk funcs!\n"; + DEBUG_LOG(("Library gtk functions loaded!")); } void setupAppIndicator(QLibrary &lib_indicator) { @@ -415,7 +411,7 @@ namespace { if (!loadFunction(lib_indicator, "app_indicator_set_menu", ps_app_indicator_set_menu)) return; if (!loadFunction(lib_indicator, "app_indicator_set_icon_full", ps_app_indicator_set_icon_full)) return; useAppIndicator = true; - std::cout << "loaded appindicator funcs!\n"; + DEBUG_LOG(("Library appindicator functions loaded!")); } void setupGtk() { @@ -461,13 +457,12 @@ namespace { } if (!useGtkBase && lib_gtk.isLoaded()) { - std::cout << "no appindicator, trying to load gtk..\n"; + LOG(("Could not load appindicator, trying to load gtk..")); setupGtkBase(lib_gtk); } if (!useGtkBase) { useAppIndicator = false; - _initLogs.push_back(QString("Init Error: Failed to load 'gtk-x11-2.0' library!")); - std::cout << "no appindicator :(\n"; + LOG(("Could not load gtk-x11-2.0!")); return; } @@ -485,8 +480,8 @@ namespace { if (!loadFunction(lib_gtk, "gtk_get_current_event_time", ps_gtk_get_current_event_time)) return; if (!loadFunction(lib_gtk, "g_idle_add", ps_g_idle_add)) return; useStatusIcon = true; - std::cout << "status icon api loaded\n"; - } + DEBUG_LOG(("Status icon api loaded!")); + } void setupUnity() { if (noTryUnity) return; @@ -498,7 +493,7 @@ namespace { if (!loadFunction(lib_unity, "unity_launcher_entry_set_count", ps_unity_launcher_entry_set_count)) return; if (!loadFunction(lib_unity, "unity_launcher_entry_set_count_visible", ps_unity_launcher_entry_set_count_visible)) return; useUnityCount = true; - std::cout << "unity count api loaded\n"; + DEBUG_LOG(("Unity count api loaded!")); } }; @@ -508,7 +503,7 @@ namespace { } bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) { - Window *wnd = Application::wnd(); + Window *wnd = App::wnd(); if (!wnd) return false; return false; @@ -889,7 +884,7 @@ void PsMainWindow::psFirstShow() { setWindowState(Qt::WindowMaximized); } - if ((cFromAutoStart() && cStartMinimized()) || cStartInTray()) { + if ((cLaunchMode() == LaunchModeAutoStart && cStartMinimized()) || cStartInTray()) { setWindowState(Qt::WindowMinimized); if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { hide(); @@ -972,20 +967,10 @@ void PsMainWindow::psNotifyShown(NotifyWindow *w) { void PsMainWindow::psPlatformNotify(HistoryItem *item, int32 fwdCount) { } -PsApplication::PsApplication(int &argc, char **argv) : QApplication(argc, argv) { - _PsInitializer _psInitializer; - Q_UNUSED(_psInitializer); -} - -void PsApplication::psInstallEventFilter() { +QAbstractNativeEventFilter *psNativeEventFilter() { delete _psEventFilter; _psEventFilter = new _PsEventFilter(); - installNativeEventFilter(_psEventFilter); -} - -PsApplication::~PsApplication() { - delete _psEventFilter; - _psEventFilter = 0; + return _psEventFilter; } bool _removeDirectory(const QString &path) { // from http://stackoverflow.com/questions/2256945/removing-a-non-empty-directory-programmatically-in-c-or-c @@ -1047,14 +1032,6 @@ bool psSkipDesktopNotify() { return false; } -QStringList psInitLogs() { - return _initLogs; -} - -void psClearInitLogs() { - _initLogs = QStringList(); -} - void psActivateProcess(uint64 pid) { // objc_activateProgram(); } @@ -1146,10 +1123,16 @@ void psShowInFolder(const QString &name) { system((qsl("xdg-open ") + escapeShell(QFileInfo(name).absoluteDir().absolutePath())).toUtf8().constData()); } -void psStart() { -} +namespace PlatformSpecific { + + Initializer::Initializer() { + } + + Initializer::~Initializer() { + delete _psEventFilter; + _psEventFilter = 0; + } -void psFinish() { } namespace { @@ -1275,7 +1258,7 @@ bool _execUpdater(bool update = true) { args[argIndex++] = p_noupdate; args[argIndex++] = p_tosettings; } - if (cFromAutoStart()) args[argIndex++] = p_autostart; + if (cLaunchMode() == LaunchModeAutoStart) args[argIndex++] = p_autostart; if (cDebug()) args[argIndex++] = p_debug; if (cStartInTray()) args[argIndex++] = p_startintray; if (cTestMode()) args[argIndex++] = p_testmode; @@ -1370,18 +1353,3 @@ bool linuxMoveFile(const char *from, const char *to) { return true; } - -#ifdef _NEED_LINUX_GENERATE_DUMP -void _sigsegvHandler(int sig) { - void *array[50] = {0}; - size_t size; - - // get void*'s for all entries on the stack - size = backtrace(array, 50); - - // print out all the frames to stderr - fprintf(stderr, "Error: signal %d:\n", sig); - backtrace_symbols_fd(array, size, STDERR_FILENO); - exit(1); -} -#endif diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index 4aac22c2185018..6fd33565156e92 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -1,17 +1,17 @@ /* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org - + Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ @@ -113,27 +113,12 @@ public slots: uint64 _psLastIndicatorUpdate; }; -#ifdef _NEED_LINUX_GENERATE_DUMP -void _sigsegvHandler(int sig); -#endif - -class PsApplication : public QApplication { - Q_OBJECT - -public: - - PsApplication(int &argc, char **argv); - void psInstallEventFilter(); - ~PsApplication(); - -}; - void psDeleteDir(const QString &dir); void psUserActionDone(); bool psIdleSupported(); uint64 psIdleTime(); - + bool psSkipAudioNotify(); bool psSkipDesktopNotify(); @@ -166,8 +151,8 @@ bool psShowOpenWithMenu(int x, int y, const QString &file); void psPostprocessFile(const QString &name); void psOpenFile(const QString &name, bool openWith = false); void psShowInFolder(const QString &name); -void psStart(); -void psFinish(); + +QAbstractNativeEventFilter *psNativeEventFilter(); void psNewVersion(); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 266da76f12053c..f27e29dd3b2afd 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -307,7 +307,7 @@ void PsMainWindow::psFirstShow() { setWindowState(Qt::WindowMaximized); } - if ((cFromAutoStart() && cStartMinimized()) || cStartInTray()) { + if ((cLaunchMode() == LaunchModeAutoStart && cStartMinimized()) || cStartInTray()) { setWindowState(Qt::WindowMinimized); if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { hide(); @@ -516,20 +516,12 @@ bool PsMainWindow::eventFilter(QObject *obj, QEvent *evt) { return QMainWindow::eventFilter(obj, evt); } -PsApplication::PsApplication(int &argc, char **argv) : QApplication(argc, argv) { -} - -void PsApplication::psInstallEventFilter() { +QAbstractNativeEventFilter *psNativeEventFilter() { delete _psEventFilter; _psEventFilter = new _PsEventFilter(); installNativeEventFilter(_psEventFilter); } -PsApplication::~PsApplication() { - delete _psEventFilter; - _psEventFilter = 0; -} - void psDeleteDir(const QString &dir) { objc_deleteDir(dir); } @@ -649,12 +641,19 @@ void psShowInFolder(const QString &name) { objc_showInFinder(name, QFileInfo(name).absolutePath()); } -void psStart() { - objc_start(); -} +namespace PlatformSpecific { + + Initializer::Initializer() { + objc_start(); + } + + Initializer::~Initializer() { + delete _psEventFilter; + _psEventFilter = 0; + + objc_finish(); + } -void psFinish() { - objc_finish(); } void psNewVersion() { diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index 1ac5a4294168a2..19082eedd2be06 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -1,17 +1,17 @@ /* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org - + Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ @@ -31,7 +31,7 @@ inline void psCheckLocalSocket(const QString &serverName) { class MacPrivate : public PsMacWindowPrivate { public: - + void activeSpaceChanged(); void darkModeChanged(); void notifyClicked(unsigned long long peer, int msgid); @@ -140,18 +140,6 @@ public slots: }; - -class PsApplication : public QApplication { - Q_OBJECT - -public: - - PsApplication(int &argc, char **argv); - void psInstallEventFilter(); - ~PsApplication(); - -}; - void psDeleteDir(const QString &dir); void psUserActionDone(); @@ -190,8 +178,8 @@ bool psShowOpenWithMenu(int x, int y, const QString &file); void psPostprocessFile(const QString &name); void psOpenFile(const QString &name, bool openWith = false); void psShowInFolder(const QString &name); -void psStart(); -void psFinish(); + +QAbstractNativeEventFilter *psNativeEventFilter(); void psNewVersion(); diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index f5013dd7812c60..0de2db7f8e141e 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -1,17 +1,17 @@ /* This file is part of Telegram Desktop, the official desktop version of Telegram messaging app, see https://telegram.org - + Telegram Desktop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ @@ -142,7 +142,7 @@ - (BOOL)userNotificationCenter:(NSUserNotificationCenter *)center shouldPresentN class PsMacWindowData { public: - + PsMacWindowData(PsMacWindowPrivate *wnd) : wnd(wnd), observerHelper([[ObserverHelper alloc] init:wnd]), @@ -156,7 +156,7 @@ void onNotifyClick(NSUserNotification *notification) { int msgId = msgObj ? [msgObj intValue] : 0; wnd->notifyClicked(peerLong, msgId); } - + void onNotifyReply(NSUserNotification *notification) { NSDictionary *dict = [notification userInfo]; NSNumber *peerObj = [dict objectForKey:@"peer"], *msgObj = [dict objectForKey:@"msgid"]; @@ -164,12 +164,12 @@ void onNotifyReply(NSUserNotification *notification) { int msgId = msgObj ? [msgObj intValue] : 0; wnd->notifyReplied(peerLong, msgId, [[[notification response] string] UTF8String]); } - + ~PsMacWindowData() { [observerHelper release]; [notifyHandler release]; } - + PsMacWindowPrivate *wnd; ObserverHelper *observerHelper; NotifyHandler *notifyHandler; @@ -384,9 +384,9 @@ bool objc_idleTime(int64 &idleTime) { // taken from https://github.com/trueinter mach_port_t masterPort; io_iterator_t iter; io_registry_entry_t curObj; - + IOMasterPort(MACH_PORT_NULL, &masterPort); - + /* Get IOHIDSystem */ IOServiceGetMatchingServices(masterPort, IOServiceMatching("IOHIDSystem"), &iter); if (iter == 0) { @@ -400,11 +400,11 @@ bool objc_idleTime(int64 &idleTime) { // taken from https://github.com/trueinter } else { return false; } - + uint64 err = ~0L, result = err; if (obj) { CFTypeID type = CFGetTypeID(obj); - + if (type == CFDataGetTypeID()) { CFDataGetBytes((CFDataRef) obj, CFRangeMake(0, sizeof(result)), (UInt8*)&result); } else if (type == CFNumberGetTypeID()) { @@ -412,16 +412,16 @@ bool objc_idleTime(int64 &idleTime) { // taken from https://github.com/trueinter } else { // error } - + CFRelease(obj); - + if (result != err) { result /= 1000000; // return as ms } } else { // error } - + CFRelease((CFTypeRef)properties); IOObjectRelease(curObj); IOObjectRelease(iter); @@ -761,7 +761,7 @@ - (BOOL) refreshDataInViews: (NSArray*)subviews { } } } - + return NO; } @@ -790,20 +790,20 @@ void objc_openFile(const QString &f, bool openwith) { NSArray *names =[url pathComponents]; NSString *name = [names count] ? [names lastObject] : @""; NSArray *apps = (NSArray*)LSCopyApplicationURLsForURL(CFURLRef(url), kLSRolesAll); - + NSOpenPanel *openPanel = [NSOpenPanel openPanel]; NSRect fullRect = { { 0., 0. }, { st::macAccessory.width() * 1., st::macAccessory.height() * 1. } }; NSView *accessory = [[NSView alloc] initWithFrame:fullRect]; - + [accessory setAutoresizesSubviews:YES]; - + NSPopUpButton *selector = [[NSPopUpButton alloc] init]; [accessory addSubview:selector]; [selector addItemWithTitle:objc_lang(lng_mac_recommended_apps).s()]; [selector addItemWithTitle:objc_lang(lng_mac_all_apps).s()]; [selector sizeToFit]; - + NSTextField *enableLabel = [[NSTextField alloc] init]; [accessory addSubview:enableLabel]; [enableLabel setStringValue:objc_lang(lng_mac_enable_filter).s()]; @@ -848,7 +848,7 @@ void objc_openFile(const QString &f, bool openwith) { goodFrame.origin.x = (fullRect.size.width - goodFrame.size.width) / 2.; goodFrame.origin.y = alwaysRect.origin.y - goodFrame.size.height - st::macAppHintTop; [goodLabel setFrame:goodFrame]; - + NSTextField *badLabel = [[NSTextField alloc] init]; [badLabel setStringValue:QNSString(lng_mac_not_known_app(lt_file, objcString(name))).s()]; [badLabel setFont:[goodLabel font]]; @@ -861,7 +861,7 @@ void objc_openFile(const QString &f, bool openwith) { NSImage *badImage = [NSImage imageNamed:NSImageNameCaution]; [badIcon setImage:badImage]; [badIcon setFrame:NSMakeRect(0, 0, st::macCautionIconSize.width(), st::macCautionIconSize.height())]; - + NSRect badFrame = [badLabel frame], badIconFrame = [badIcon frame]; badFrame.origin.x = (fullRect.size.width - badFrame.size.width + badIconFrame.size.width) / 2.; badIconFrame.origin.x = (fullRect.size.width - badFrame.size.width - badIconFrame.size.width) / 2.; @@ -874,14 +874,14 @@ void objc_openFile(const QString &f, bool openwith) { ChooseApplicationDelegate *delegate = [[ChooseApplicationDelegate alloc] init:apps withPanel:openPanel withSelector:selector withGood:goodLabel withBad:badLabel withIcon:badIcon withAccessory:accessory]; [openPanel setDelegate:delegate]; - + [openPanel setCanChooseDirectories:NO]; [openPanel setCanChooseFiles:YES]; [openPanel setAllowsMultipleSelection:NO]; [openPanel setResolvesAliases:YES]; [openPanel setTitle:objc_lang(lng_mac_choose_app).s()]; [openPanel setMessage:QNSString(lng_mac_choose_text(lt_file, objcString(name))).s()]; - + NSArray *appsPaths = [[NSFileManager defaultManager] URLsForDirectory:NSApplicationDirectory inDomains:NSLocalDomainMask]; if ([appsPaths count]) [openPanel setDirectoryURL:[appsPaths firstObject]]; [openPanel beginWithCompletionHandler:^(NSInteger result){ @@ -964,7 +964,7 @@ BOOL _execUpdater(BOOL update = YES) { [args addObject:[NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]]]; if (cRestartingToSettings()) [args addObject:@"-tosettings"]; if (!update) [args addObject:@"-noupdate"]; - if (cFromAutoStart()) [args addObject:@"-autostart"]; + if (cLaunchMode() == LaunchModeAutoStart) [args addObject:@"-autostart"]; if (cDebug()) [args addObject:@"-debug"]; if (cStartInTray()) [args addObject:@"-startintray"]; if (cTestMode()) [args addObject:@"-testmode"]; diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 9db1afd2926362..847cb761f5f819 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -127,7 +127,7 @@ namespace { }; typedef QMap ToastImages; ToastImages toastImages; - bool toastImageSaved = false; + bool ToastImageSavedFlag = false; HWND createTaskbarHider() { HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0); @@ -267,14 +267,14 @@ namespace { return false; } - QRect avail(App::app() ? App::app()->desktop()->availableGeometry() : QDesktopWidget().availableGeometry()); + QRect avail(Sandboxer::availableGeometry()); max_w = avail.width(); if (max_w < st::wndMinWidth) max_w = st::wndMinWidth; max_h = avail.height(); if (max_h < st::wndMinHeight) max_h = st::wndMinHeight; HINSTANCE appinst = (HINSTANCE)GetModuleHandle(0); - HWND hwnd = Application::wnd() ? Application::wnd()->psHwnd() : 0; + HWND hwnd = App::wnd() ? App::wnd()->psHwnd() : 0; for (int i = 0; i < 4; ++i) { QString cn = QString("TelegramShadow%1").arg(i); @@ -402,7 +402,7 @@ namespace { } void update(int changes, WINDOWPOS *pos = 0) { - HWND hwnd = Application::wnd() ? Application::wnd()->psHwnd() : 0; + HWND hwnd = App::wnd() ? App::wnd()->psHwnd() : 0; if (!hwnd || !hwnds[0]) return; if (changes == _PsShadowActivate) { @@ -421,7 +421,7 @@ namespace { } return; } - if (!Application::wnd()->psPosInited()) return; + if (!App::wnd()->psPosInited()) return; int x = _x, y = _y, w = _w, h = _h; if (pos && (!(pos->flags & SWP_NOMOVE) || !(pos->flags & SWP_NOSIZE) || !(pos->flags & SWP_NOREPOSITION))) { @@ -614,7 +614,7 @@ namespace { switch (msg) { case WM_CLOSE: - Application::wnd()->close(); + App::wnd()->close(); break; case WM_NCHITTEST: { int32 xPos = GET_X_LPARAM(lParam), yPos = GET_Y_LPARAM(lParam); @@ -797,7 +797,7 @@ namespace { } bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) { - Window *wnd = Application::wnd(); + Window *wnd = App::wnd(); if (!wnd) return false; MSG *msg = (MSG*)message; @@ -846,8 +846,8 @@ namespace { } else { _psShadowWindows.setColor(_shInactive); } - QTimer::singleShot(0, Application::wnd(), SLOT(updateCounter())); - Application::wnd()->update(); + QTimer::singleShot(0, App::wnd(), SLOT(updateCounter())); + App::wnd()->update(); } return false; case WM_NCPAINT: if (QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS8) return false; *result = 0; return true; @@ -922,7 +922,7 @@ namespace { POINTS p = MAKEPOINTS(lParam); RECT r; GetWindowRect(hWnd, &r); - HitTestType res = Application::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); + HitTestType res = App::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); switch (res) { case HitTestClient: case HitTestSysButton: *result = HTCLIENT; break; @@ -949,22 +949,22 @@ namespace { POINTS p = MAKEPOINTS(lParam); RECT r; GetWindowRect(hWnd, &r); - HitTestType res = Application::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); + HitTestType res = App::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); switch (res) { case HitTestIcon: if (menuHidden && getms() < menuHidden + 10) { menuHidden = 0; if (getms() < menuShown + GetDoubleClickTime()) { - Application::wnd()->close(); + App::wnd()->close(); } } else { - QRect icon = Application::wnd()->iconRect(); + QRect icon = App::wnd()->iconRect(); p.x = r.left - dleft + icon.left(); p.y = r.top - dtop + icon.top() + icon.height(); - Application::wnd()->psUpdateSysMenu(Application::wnd()->windowHandle()->windowState()); + App::wnd()->psUpdateSysMenu(App::wnd()->windowHandle()->windowState()); menuShown = getms(); menuHidden = 0; - TrackPopupMenu(Application::wnd()->psMenu(), TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON, p.x, p.y, 0, hWnd, 0); + TrackPopupMenu(App::wnd()->psMenu(), TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON, p.x, p.y, 0, hWnd, 0); menuHidden = getms(); } return true; @@ -975,17 +975,17 @@ namespace { POINTS p = MAKEPOINTS(lParam); RECT r; GetWindowRect(hWnd, &r); - HitTestType res = Application::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); + HitTestType res = App::wnd()->hitTest(QPoint(p.x - r.left + dleft, p.y - r.top + dtop)); switch (res) { - case HitTestIcon: Application::wnd()->close(); return true; + case HitTestIcon: App::wnd()->close(); return true; }; } return false; case WM_SYSCOMMAND: { if (wParam == SC_MOUSEMENU) { POINTS p = MAKEPOINTS(lParam); - Application::wnd()->psUpdateSysMenu(Application::wnd()->windowHandle()->windowState()); - TrackPopupMenu(Application::wnd()->psMenu(), TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON, p.x, p.y, 0, hWnd, 0); + App::wnd()->psUpdateSysMenu(App::wnd()->windowHandle()->windowState()); + TrackPopupMenu(App::wnd()->psMenu(), TPM_LEFTALIGN | TPM_TOPALIGN | TPM_LEFTBUTTON, p.x, p.y, 0, hWnd, 0); } } return false; @@ -993,10 +993,10 @@ namespace { if (HIWORD(wParam)) return false; int cmd = LOWORD(wParam); switch (cmd) { - case SC_CLOSE: Application::wnd()->close(); return true; - case SC_MINIMIZE: Application::wnd()->setWindowState(Qt::WindowMinimized); return true; - case SC_MAXIMIZE: Application::wnd()->setWindowState(Qt::WindowMaximized); return true; - case SC_RESTORE: Application::wnd()->setWindowState(Qt::WindowNoState); return true; + case SC_CLOSE: App::wnd()->close(); return true; + case SC_MINIMIZE: App::wnd()->setWindowState(Qt::WindowMinimized); return true; + case SC_MAXIMIZE: App::wnd()->setWindowState(Qt::WindowMaximized); return true; + case SC_RESTORE: App::wnd()->setWindowState(Qt::WindowNoState); return true; } } return true; @@ -1190,7 +1190,7 @@ void PsMainWindow::psInitSize() { setMinimumHeight(st::wndMinHeight); TWindowPos pos(cWindowPos()); - QRect avail(App::app() ? App::app()->desktop()->availableGeometry() : QDesktopWidget().availableGeometry()); + QRect avail(Sandboxer::availableGeometry()); bool maximized = false; QRect geom(avail.x() + (avail.width() - st::wndDefWidth) / 2, avail.y() + (avail.height() - st::wndDefHeight) / 2, st::wndDefWidth, st::wndDefHeight); if (pos.w && pos.h) { @@ -1309,7 +1309,7 @@ void PsMainWindow::psFirstShow() { setWindowState(Qt::WindowMaximized); } - if ((cFromAutoStart() && cStartMinimized()) || cStartInTray()) { + if ((cLaunchMode() == LaunchModeAutoStart && cStartMinimized()) || cStartInTray()) { setWindowState(Qt::WindowMinimized); if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { hide(); @@ -1553,18 +1553,10 @@ void PsMainWindow::psPlatformNotify(HistoryItem *item, int32 fwdCount) { CreateToast(item->history()->peer, item->id, showpix, title, subtitle, msg); } -PsApplication::PsApplication(int &argc, char **argv) : QApplication(argc, argv) { -} - -void PsApplication::psInstallEventFilter() { +QAbstractNativeEventFilter *psNativeEventFilter() { delete _psEventFilter; _psEventFilter = new _PsEventFilter(); - installNativeEventFilter(_psEventFilter); -} - -PsApplication::~PsApplication() { - delete _psEventFilter; - _psEventFilter = 0; + return _psEventFilter; } void psDeleteDir(const QString &dir) { @@ -2159,13 +2151,21 @@ void psShowInFolder(const QString &name) { ShellExecute(0, 0, qsl("explorer").toStdWString().c_str(), (qsl("/select,") + nameEscaped).toStdWString().c_str(), 0, SW_SHOWNORMAL); } -void psStart() { -} -void psFinish() { - if (toastImageSaved) { - psDeleteDir(cWorkingDir() + qsl("tdata/temp")); +namespace PlatformSpecific { + + Initializer::Initializer() { + } + + Initializer::~Initializer() { + delete _psEventFilter; + _psEventFilter = 0; + + if (ToastImageSavedFlag) { + psDeleteDir(cWorkingDir() + qsl("tdata/temp")); + } } + } namespace { @@ -2250,7 +2250,7 @@ void psNewVersion() { void psExecUpdater() { QString targs = qsl("-update"); - if (cFromAutoStart()) targs += qsl(" -autostart"); + if (cLaunchMode() == LaunchModeAutoStart) targs += qsl(" -autostart"); if (cDebug()) targs += qsl(" -debug"); if (cStartInTray()) targs += qsl(" -startintray"); if (cWriteProtected()) targs += qsl(" -writeprotected \"") + cExeDir() + '"'; @@ -2270,7 +2270,7 @@ void psExecUpdater() { void psExecTelegram() { QString targs = qsl("-noupdate"); if (cRestartingToSettings()) targs += qsl(" -tosettings"); - if (cFromAutoStart()) targs += qsl(" -autostart"); + if (cLaunchMode() == LaunchModeAutoStart) targs += qsl(" -autostart"); if (cDebug()) targs += qsl(" -debug"); if (cStartInTray()) targs += qsl(" -startintray"); if (cTestMode()) targs += qsl(" -testmode"); @@ -2741,7 +2741,7 @@ QString toastImage(const StorageKey &key, PeerData *peer) { App::wnd()->iconLarge().save(v.path, "PNG"); } i = toastImages.insert(key, v); - toastImageSaved = true; + ToastImageSavedFlag = true; } return i->path; } diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 2d4232bf10c94a..b5f09d427d4d6e 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -117,17 +117,6 @@ extern LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter; LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers); LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); -class PsApplication : public QApplication { - Q_OBJECT - -public: - - PsApplication(int &argc, char **argv); - void psInstallEventFilter(); - ~PsApplication(); - -}; - void psDeleteDir(const QString &dir); void psUserActionDone(); @@ -167,8 +156,8 @@ bool psShowOpenWithMenu(int x, int y, const QString &file); void psPostprocessFile(const QString &name); void psOpenFile(const QString &name, bool openWith = false); void psShowInFolder(const QString &name); -void psStart(); -void psFinish(); + +QAbstractNativeEventFilter *psNativeEventFilter(); void psNewVersion(); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 0992e6a9fe6680..d025443e972878 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -26,6 +26,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org bool gRtl = false; Qt::LayoutDirection gLangDir = gRtl ? Qt::RightToLeft : Qt::LeftToRight; +QString gArguments; + mtpDcOptions gDcOptions; bool gDevVersion = DevVersion; @@ -57,7 +59,7 @@ bool gAutoStart = false; bool gSendToMenu = false; bool gAutoUpdate = true; TWindowPos gWindowPos; -bool gFromAutoStart = false; +LaunchMode gLaunchMode = LaunchModeNormal; bool gSupportTray = true; DBIWorkMode gWorkMode = dbiwmWindowAndTray; DBIConnectionType gConnectionType = dbictAuto; @@ -189,6 +191,13 @@ void settingsParseArgs(int argc, char *argv[]) { gCustomNotifies = false; } #endif + + QStringList args; + for (int32 i = 0; i < argc; ++i) { + args.push_back('"' + fromUtf8Safe(argv[i]) + '"'); + } + gArguments = args.join(' '); + gExeDir = psCurrentExeDirectory(argc, argv); gExeName = psCurrentExeName(argc, argv); for (int32 i = 0; i < argc; ++i) { @@ -201,7 +210,11 @@ void settingsParseArgs(int argc, char *argv[]) { } else if (string("-key") == argv[i] && i + 1 < argc) { gKeyFile = fromUtf8Safe(argv[++i]); } else if (string("-autostart") == argv[i]) { - gFromAutoStart = true; + gLaunchMode = LaunchModeAutoStart; + } else if (string("-fixprevious") == argv[i]) { + gLaunchMode = LaunchModeFixPrevious; + } else if (string("-cleanup") == argv[i]) { + gLaunchMode = LaunchModeCleanup; } else if (string("-noupdate") == argv[i]) { gNoStartUpdate = true; } else if (string("-tosettings") == argv[i]) { diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index e14f92ddc0e8f0..ffbb8ea3a4de4c 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -24,10 +24,8 @@ extern bool gDebug; inline bool cDebug() { #if defined _DEBUG return true; -#elif defined _WITH_DEBUG - return gDebug; #else - return false; + return gDebug; #endif } inline void cSetDebug(bool debug) { @@ -55,6 +53,8 @@ inline bool rtl() { return cRtl(); } +DeclareReadSetting(QString, Arguments); + struct mtpDcOption { mtpDcOption(int id, int flags, const string &ip, int port) : id(id), flags(flags), ip(ip), port(port) { } @@ -82,7 +82,13 @@ DeclareSetting(bool, AutoStart); DeclareSetting(bool, StartMinimized); DeclareSetting(bool, StartInTray); DeclareSetting(bool, SendToMenu); -DeclareReadSetting(bool, FromAutoStart); +enum LaunchMode { + LaunchModeNormal = 0, + LaunchModeAutoStart, + LaunchModeFixPrevious, + LaunchModeCleanup, +}; +DeclareReadSetting(LaunchMode, LaunchMode); DeclareSetting(QString, WorkingDir); inline void cForceWorkingDir(const QString &newDir) { cSetWorkingDir(newDir); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index ea3cfe7e858f2e..7294a6c4ad7cd3 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -269,11 +269,11 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) _newVersionWidth = st::linkFont->width(_newVersionText); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - connect(App::app(), SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); - connect(App::app(), SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); - connect(App::app(), SIGNAL(updateDownloading(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); - connect(App::app(), SIGNAL(updateReady()), this, SLOT(onUpdateReady())); - connect(App::app(), SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + Sandboxer::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); + Sandboxer::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); + Sandboxer::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); + Sandboxer::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); #endif // chat options @@ -330,10 +330,10 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) updateOnlineDisplay(); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - switch (App::app()->updatingState()) { + switch (Sandboxer::updatingState()) { case Application::UpdatingDownload: setUpdatingState(UpdatingDownload, true); - setDownloadProgress(App::app()->updatingReady(), App::app()->updatingSize()); + setDownloadProgress(Sandboxer::updatingReady(), Sandboxer::updatingSize()); break; case Application::UpdatingReady: setUpdatingState(UpdatingReady, true); break; default: setUpdatingState(UpdatingNone, true); break; @@ -1261,14 +1261,14 @@ void SettingsInner::onAutoUpdate() { Local::writeSettings(); resizeEvent(0); if (cAutoUpdate()) { - App::app()->startUpdateCheck(); + Sandboxer::startUpdateCheck(); if (_updatingState == UpdatingNone) { _checkNow.show(); } else if (_updatingState == UpdatingReady) { _restartNow.show(); } } else { - App::app()->stopUpdate(); + Sandboxer::stopUpdate(); _restartNow.hide(); _checkNow.hide(); } @@ -1279,7 +1279,7 @@ void SettingsInner::onCheckNow() { if (!cAutoUpdate()) return; cSetLastUpdateCheck(0); - App::app()->startUpdateCheck(); + Sandboxer::startUpdateCheck(); } #endif @@ -1785,7 +1785,7 @@ SettingsWidget::SettingsWidget(Window *parent) : TWidget(parent) connect(App::wnd(), SIGNAL(resized(const QSize&)), this, SLOT(onParentResize(const QSize&))); connect(&_close, SIGNAL(clicked()), App::wnd(), SLOT(showSettings())); - setGeometry(QRect(0, st::titleHeight, Application::wnd()->width(), Application::wnd()->height() - st::titleHeight)); + setGeometry(QRect(0, st::titleHeight, App::wnd()->width(), App::wnd()->height() - st::titleHeight)); showAll(); } diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index bc67e11838981e..44098d9e14b030 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -38,6 +38,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include #include +#include +#include #ifdef Q_OS_WIN // use Lzma SDK for win #include diff --git a/Telegram/SourceFiles/sysbuttons.cpp b/Telegram/SourceFiles/sysbuttons.cpp index 5aad225969b4a0..163ba004e4546a 100644 --- a/Telegram/SourceFiles/sysbuttons.cpp +++ b/Telegram/SourceFiles/sysbuttons.cpp @@ -79,7 +79,7 @@ void SysBtn::paintEvent(QPaintEvent *e) { } p.fillRect(x, y, _st.img.pxWidth(), _st.img.pxHeight(), c); p.drawPixmap(QPoint(x, y), App::sprite(), _st.img); - + if (!_text.isEmpty()) { p.setFont(st::titleTextButton.font->f); p.setPen(c); @@ -151,7 +151,7 @@ void UpdateBtn::onClick() { #ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); #endif - if (App::app()->updatingState() == Application::UpdatingReady) { + if (Sandboxer::updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); } else { cSetRestarting(true); diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 58a7c5506e57c7..83cb6909009855 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -73,7 +73,7 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) _update.hide(); _cancel.hide(); _back.hide(); - if (App::app()->updatingState() == Application::UpdatingReady || cHasPasscode()) { + if (Sandboxer::updatingState() == Application::UpdatingReady || cHasPasscode()) { showUpdateBtn(); } stateChanged(); @@ -87,7 +87,7 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) #ifndef TDESKTOP_DISABLE_AUTOUPDATE connect(App::app(), SIGNAL(updateReady()), this, SLOT(showUpdateBtn())); #endif - + if (cPlatform() != dbipWindows) { _minimize.hide(); _maximize.hide(); @@ -173,10 +173,10 @@ void TitleWidget::resizeEvent(QResizeEvent *e) { if (cPlatform() == dbipWindows) { p.setX(p.x() - _close.width()); _close.move(p); - + p.setX(p.x() - _maximize.width()); _restore.move(p); _maximize.move(p); - + p.setX(p.x() - _minimize.width()); _minimize.move(p); } @@ -264,7 +264,7 @@ void TitleWidget::updateCounter() { bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; style::color bg = muted ? st::counterMuteBG : st::counterBG; - + if (counter > 0) { int32 size = cRetina() ? -32 : -16; switch (cScale()) { @@ -322,7 +322,7 @@ void TitleWidget::showUpdateBtn() { } else { _lock.hide(); } - bool updateReady = App::app()->updatingState() == Application::UpdatingReady; + bool updateReady = (Sandboxer::updatingState() == Application::UpdatingReady); if (updateReady || cEvalScale(cConfigScale()) != cEvalScale(cRealScale())) { _update.setText(lang(updateReady ? lng_menu_update : lng_menu_restart)); _update.show(); diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index ca7c917b409374..6835e4956fdd8d 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -266,43 +266,47 @@ namespace { _MsStarter _msStarter; } -void initThirdParty() { - if (!RAND_status()) { // should be always inited in all modern OS - char buf[16]; - memcpy(buf, &_msStart, 8); - memcpy(buf + 8, &_msFreq, 8); - uchar sha256Buffer[32]; - RAND_seed(hashSha256(buf, 16, sha256Buffer), 32); - if (!RAND_status()) { - LOG(("MTP Error: Could not init OpenSSL rand, RAND_status() is 0..")); +namespace ThirdParty { + + void start() { + if (!RAND_status()) { // should be always inited in all modern OS + char buf[16]; + memcpy(buf, &_msStart, 8); + memcpy(buf + 8, &_msFreq, 8); + uchar sha256Buffer[32]; + RAND_seed(hashSha256(buf, 16, sha256Buffer), 32); + if (!RAND_status()) { + LOG(("MTP Error: Could not init OpenSSL rand, RAND_status() is 0..")); + } } - } - int32 numLocks = CRYPTO_num_locks(); - if (numLocks) { - _sslLocks = new QMutex[numLocks]; - CRYPTO_set_locking_callback(_sslLockingCallback); - } else { - LOG(("MTP Error: Could not init OpenSSL threads, CRYPTO_num_locks() returned zero!")); - } - CRYPTO_THREADID_set_callback(_sslThreadId); - CRYPTO_set_dynlock_create_callback(_sslCreateFunction); - CRYPTO_set_dynlock_lock_callback(_sslLockFunction); - CRYPTO_set_dynlock_destroy_callback(_sslDestroyFunction); + int32 numLocks = CRYPTO_num_locks(); + if (numLocks) { + _sslLocks = new QMutex[numLocks]; + CRYPTO_set_locking_callback(_sslLockingCallback); + } else { + LOG(("MTP Error: Could not init OpenSSL threads, CRYPTO_num_locks() returned zero!")); + } + CRYPTO_THREADID_set_callback(_sslThreadId); + CRYPTO_set_dynlock_create_callback(_sslCreateFunction); + CRYPTO_set_dynlock_lock_callback(_sslLockFunction); + CRYPTO_set_dynlock_destroy_callback(_sslDestroyFunction); - av_register_all(); - avcodec_register_all(); + av_register_all(); + avcodec_register_all(); - av_lockmgr_register(_ffmpegLockManager); + av_lockmgr_register(_ffmpegLockManager); - _sslInited = true; -} + _sslInited = true; + } -void deinitThirdParty() { - av_lockmgr_register(0); + void finish() { + av_lockmgr_register(0); + + delete[] _sslLocks; + _sslLocks = 0; + } - delete[] _sslLocks; - _sslLocks = 0; } namespace { diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 3406ef1f088536..50ddd51e99ca71 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -84,6 +84,16 @@ using std::swap; #include "logs.h" +static volatile int *t_assert_nullptr = 0; +inline void t_noop() {} +inline void t_assert_fail(const char *message, const char *file, int32 line) { + LOG(("Assertion Failed! %1 %2:%3").arg(message).arg(file).arg(line)); + *t_assert_nullptr = 0; +} +#define t_assert_full(condition, message, file, line) ((!(condition)) ? t_assert_fail(message, file, line) : t_noop()) +#define t_assert_c(condition, comment) t_assert_full(condition, "\"" #condition "\" (" comment ")", __FILE__, __LINE__) +#define t_assert(condition) t_assert_full(condition, "\"" #condition "\"", __FILE__, __LINE__) + class Exception : public exception { public: @@ -135,8 +145,12 @@ inline void mylocaltime(struct tm * _Tm, const time_t * _Time) { void installSignalHandlers(); -void initThirdParty(); // called by Global::Initializer -void deinitThirdParty(); +namespace ThirdParty { + + void start(); + void finish(); + +} bool checkms(); // returns true if time has changed uint64 getms(bool checked = false); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9a35a4ef6847fd..004a88fee0745f 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1212,7 +1212,7 @@ void Window::toggleDisplayNotifyFromTray() { } void Window::closeEvent(QCloseEvent *e) { - if (MTP::authedId() && !App::app()->isSavingSession() && minimizeToTray()) { + if (MTP::authedId() && !Sandboxer::isSavingSession() && minimizeToTray()) { e->ignore(); } else { App::quit(); diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 6712fba13b21fc..e99dd40d4ca11f 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -10,7 +10,7 @@ CONFIG(debug, debug|release) { DESTDIR = ./../Debug } CONFIG(release, debug|release) { - DEFINES += _WITH_DEBUG CUSTOM_API_ID + DEFINES += CUSTOM_API_ID OBJECTS_DIR = ./../ReleaseIntermediate MOC_DIR = ./GenFiles/Release RCC_DIR = ./GenFiles @@ -47,7 +47,7 @@ style_classes_h.depends = ./../../Telegram/Resources/style_classes.txt numbers_cpp.target = ./GeneratedFiles/numbers.cpp numbers_cpp.depends = FORCE numbers_cpp.commands = mkdir -p ./../../Telegram/GeneratedFiles && ./../DebugStyle/MetaStyle -classes_in ./../../Telegram/Resources/style_classes.txt -classes_out ./../../Telegram/GeneratedFiles/style_classes.h -styles_in ./../../Telegram/Resources/style.txt -styles_out ./../../Telegram/GeneratedFiles/style_auto.h -path_to_sprites ./../../Telegram/SourceFiles/art/ -numbers_cpp.depends = ./../../Telegram/Resources/numbers.txt +numbers_cpp.depends = ./../../Telegram/Resources/numbers.txt lang_auto_cpp.target = ./GeneratedFiles/lang_auto.cpp lang_auto_cpp.depends = FORCE diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 598fe1ae4fd1b9..5530f46a48109c 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -95,7 +95,7 @@ - AL_LIBTYPE_STATIC;UNICODE;_WITH_DEBUG;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + AL_LIBTYPE_STATIC;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded @@ -125,7 +125,7 @@ - AL_LIBTYPE_STATIC;CUSTOM_API_ID;UNICODE;_WITH_DEBUG;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + AL_LIBTYPE_STATIC;CUSTOM_API_ID;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded @@ -1059,7 +1059,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1067,7 +1067,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" Moc%27ing window.h... @@ -1077,8 +1077,8 @@ Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1109,8 +1109,8 @@ Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1123,7 +1123,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1131,7 +1131,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" @@ -1142,8 +1142,8 @@ Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1156,8 +1156,8 @@ Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1170,8 +1170,8 @@ Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1184,8 +1184,8 @@ Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1198,8 +1198,8 @@ Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1212,8 +1212,8 @@ Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1226,8 +1226,8 @@ Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1240,8 +1240,8 @@ Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1254,8 +1254,8 @@ Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1264,7 +1264,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1272,13 +1272,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1286,13 +1286,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1300,13 +1300,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1314,13 +1314,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1328,13 +1328,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1342,13 +1342,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1356,13 +1356,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1370,13 +1370,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1384,13 +1384,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1398,7 +1398,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" @@ -1409,8 +1409,8 @@ Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1423,8 +1423,8 @@ Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1437,8 +1437,8 @@ Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1451,8 +1451,8 @@ Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1465,8 +1465,8 @@ Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1480,8 +1480,8 @@ Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1494,8 +1494,8 @@ Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1508,8 +1508,8 @@ Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1522,8 +1522,8 @@ Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1536,8 +1536,8 @@ Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1548,7 +1548,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1556,7 +1556,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" @@ -1567,8 +1567,8 @@ Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1602,8 +1602,8 @@ Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1616,8 +1616,8 @@ Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1627,13 +1627,13 @@ Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/history.h" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/history.h" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/history.h" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1646,8 +1646,8 @@ Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1660,8 +1660,8 @@ Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1674,8 +1674,8 @@ Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1688,8 +1688,8 @@ Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1702,8 +1702,8 @@ Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1712,7 +1712,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1720,7 +1720,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" @@ -1731,8 +1731,8 @@ Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1745,8 +1745,8 @@ Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1757,7 +1757,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1765,7 +1765,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" @@ -1796,8 +1796,8 @@ Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1810,8 +1810,8 @@ Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1824,8 +1824,8 @@ Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1834,7 +1834,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1842,7 +1842,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" @@ -1853,8 +1853,8 @@ Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1869,8 +1869,8 @@ Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1885,8 +1885,8 @@ Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1899,8 +1899,8 @@ Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1913,8 +1913,8 @@ Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1927,8 +1927,8 @@ Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1938,7 +1938,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1946,13 +1946,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1960,13 +1960,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1974,7 +1974,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" @@ -1982,7 +1982,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1990,7 +1990,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" true true true @@ -1999,7 +1999,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2007,7 +2007,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" true true true @@ -2047,8 +2047,8 @@ Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -2061,8 +2061,8 @@ Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -D_WITH_DEBUG -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 336683034d6dbb..4f7b75747118bc 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1806,7 +1806,6 @@ "-Wall", "-W", "-fPIE", - "-D_WITH_DEBUG", "-DQT_WIDGETS_LIB", "-DQT_NETWORK_LIB", "-DQT_GUI_LIB", @@ -1827,7 +1826,6 @@ "-Wall", "-W", "-fPIE", - "-D_WITH_DEBUG", "-DQT_WIDGETS_LIB", "-DQT_NETWORK_LIB", "-DQT_GUI_LIB", From d2f3fbe3f70e27e8c1edc5ae6ab8c16ee1a2a8b3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 17 Jan 2016 07:28:54 +0800 Subject: [PATCH 004/133] mentions regexp start with one letter instead of three --- Telegram/SourceFiles/gui/text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 466c3321feea4c..9fe984d736d01f 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -36,7 +36,7 @@ namespace { const QRegularExpression _reMailName(qsl("[a-zA-Z\\-_\\.0-9]{1,256}$")); const QRegularExpression _reMailStart(qsl("^[a-zA-Z\\-_\\.0-9]{1,256}\\@")); const QRegularExpression _reHashtag(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])#[\\w]{2,64}([\\W]|$)"), QRegularExpression::UseUnicodePropertiesOption); - const QRegularExpression _reMention(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])@[A-Za-z_0-9]{3,32}([\\W]|$)"), QRegularExpression::UseUnicodePropertiesOption); + const QRegularExpression _reMention(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])@[A-Za-z_0-9]{1,32}([\\W]|$)"), QRegularExpression::UseUnicodePropertiesOption); const QRegularExpression _reBotCommand(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\%\\^\\*\\(\\)\\-\\+=\\x10])/[A-Za-z_0-9]{1,64}(@[A-Za-z_0-9]{5,32})?([\\W]|$)")); const QRegularExpression _rePre(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\?\\%\\^\\*\\(\\)\\-\\+=\\x10])(````?)[\\s\\S]+?(````?)([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\?\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)"), QRegularExpression::UseUnicodePropertiesOption); const QRegularExpression _reCode(qsl("(^|[\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\?\\%\\^\\*\\(\\)\\-\\+=\\x10])(`)[^\\n]+?(`)([\\s\\.,:;<>|'\"\\[\\]\\{\\}`\\~\\!\\?\\%\\^\\*\\(\\)\\-\\+=\\x10]|$)"), QRegularExpression::UseUnicodePropertiesOption); From 5f84567bbb348e675de02c29468db8c199fb22a1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 17 Jan 2016 13:01:14 +0800 Subject: [PATCH 005/133] initial logging improved, debug logs disabled for -many instance param --- Telegram/SourceFiles/application.cpp | 37 ++-- Telegram/SourceFiles/logs.cpp | 246 ++++++++++++++++++++++----- Telegram/SourceFiles/logs.h | 5 + 3 files changed, 232 insertions(+), 56 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 794503b956999b..60f831665a1755 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -139,12 +139,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) , _updateChecker(0) #endif { - if (!Logs::started()) { - // show error window - quit(); - return; - } - QByteArray d(QDir(cWorkingDir()).absolutePath().toUtf8()); char h[33] = { 0 }; hashMd5Hex(d.constData(), d.size(), h); @@ -164,9 +158,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) #endif if (cManyInstance()) { + LOG(("Many instance allowed, starting..")); singleInstanceChecked(); } else { - DEBUG_LOG(("Application Info: connecting local socket to %1..").arg(_localServerName)); + LOG(("Connecting local socket to %1..").arg(_localServerName)); _localSocket.connectToServer(_localServerName); } } @@ -193,7 +188,7 @@ Application::~Application() { void Application::socketConnected() { - DEBUG_LOG(("Application Info: socket connected, this is not the first application instance, sending show command..")); + LOG(("Socket connected, this is not the first application instance, sending show command..")); _secondInstance = true; QString commands; @@ -212,46 +207,46 @@ void Application::socketConnected() { void Application::socketWritten(qint64/* bytes*/) { if (_localSocket.state() != QLocalSocket::ConnectedState) { - DEBUG_LOG(("Application Error: socket is not connected %1").arg(_localSocket.state())); + LOG(("Socket is not connected %1").arg(_localSocket.state())); return; } if (_localSocket.bytesToWrite()) { return; } - DEBUG_LOG(("Application Info: show command written, waiting response..")); + LOG(("Show command written, waiting response..")); } void Application::socketReading() { if (_localSocket.state() != QLocalSocket::ConnectedState) { - DEBUG_LOG(("Application Error: socket is not connected %1").arg(_localSocket.state())); + LOG(("Socket is not connected %1").arg(_localSocket.state())); return; } _localSocketReadData.append(_localSocket.readAll()); if (QRegularExpression("RES:(\\d+);").match(_localSocketReadData).hasMatch()) { uint64 pid = _localSocketReadData.mid(4, _localSocketReadData.length() - 5).toULongLong(); psActivateProcess(pid); - DEBUG_LOG(("Application Info: show command response received, pid = %1, activating and quiting..").arg(pid)); + LOG(("Show command response received, pid = %1, activating and quiting..").arg(pid)); return App::quit(); } } void Application::socketError(QLocalSocket::LocalSocketError e) { if (_secondInstance) { - DEBUG_LOG(("Application Error: could not write show command, error %1, quiting..").arg(e)); + LOG(("Could not write show command, error %1, quiting..").arg(e)); return App::quit(); } if (e == QLocalSocket::ServerNotFoundError) { - DEBUG_LOG(("Application Info: this is the only instance of Telegram, starting server and app..")); + LOG(("This is the only instance of Telegram, starting server and app..")); } else { - DEBUG_LOG(("Application Info: socket connect error %1, starting server and app..").arg(e)); + LOG(("Socket connect error %1, starting server and app..").arg(e)); } _localSocket.close(); psCheckLocalSocket(_localServerName); if (!_localServer.listen(_localServerName)) { - DEBUG_LOG(("Application Error: failed to start listening to %1 server, error %2").arg(_localServerName).arg(int(_localServer.serverError()))); + LOG(("Failed to start listening to %1 server, error %2").arg(_localServerName).arg(int(_localServer.serverError()))); return App::quit(); } @@ -267,6 +262,16 @@ void Application::socketError(QLocalSocket::LocalSocketError e) { } void Application::singleInstanceChecked() { + if (cManyInstance()) { + Logs::multipleInstances(); + } + if ((!cManyInstance() && !Logs::instanceChecked()) || !Logs::started()) { + MessageBox(0, (QString::fromStdWString(L"Could not initialize logs!\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); + // show error window + App::quit(); + return; + } + Global::start(); // if crashed, show window and try to autoupdate diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 69817a2c41a4e9..d957bdd13190cf 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -31,17 +31,21 @@ enum LogDataType { LogDataCount }; -QMutex *LogsMutexes = 0; -QMutex *_logsMutex(LogDataType type) { - if (!LogsMutexes) { +QMutex *_logsMutex(LogDataType type, bool clear = false) { + static QMutex *LogsMutexes = 0; + if (clear) { + delete[] LogsMutexes; + LogsMutexes = 0; + } else if (!LogsMutexes) { LogsMutexes = new QMutex[LogDataCount]; } return &LogsMutexes[type]; } + QString _logsFilePath(LogDataType type, const QString &postfix = QString()) { QString path(cWorkingDir()); switch (type) { - case LogDataMain: path += qstr("log.txt"); break; + case LogDataMain: path += qstr("log") + postfix + qstr(".txt"); break; case LogDataDebug: path += qstr("DebugLogs/log") + postfix + qstr(".txt"); break; case LogDataTcp: path += qstr("DebugLogs/tcp") + postfix + qstr(".txt"); break; case LogDataMtp: path += qstr("DebugLogs/mtp") + postfix + qstr(".txt"); break; @@ -49,23 +53,47 @@ QString _logsFilePath(LogDataType type, const QString &postfix = QString()) { return path; } +int32 LogsStartIndexChosen = -1; +QString _logsEntryStart() { + static int32 index = 0; + QDateTime tm(QDateTime::currentDateTime()); + + QThread *thread = QThread::currentThread(); + MTPThread *mtpThread = qobject_cast(thread); + uint threadId = mtpThread ? mtpThread->getThreadId() : 0; + + return QString("[%1 %2-%3]").arg(tm.toString("hh:mm:ss.zzz")).arg(QString("%1").arg(threadId, 2, 10, QChar('0'))).arg(++index, 7, 10, QChar('0')); +} + class LogsDataFields { public: - QString entryStart() { - QDateTime tm(QDateTime::currentDateTime()); - - QThread *thread = QThread::currentThread(); - MTPThread *mtpThread = qobject_cast(thread); - uint threadId = mtpThread ? mtpThread->getThreadId() : 0; - return QString("[%1 %2-%3]").arg(tm.toString("hh:mm:ss.zzz")).arg(QString("%1").arg(threadId, 2, 10, QChar('0'))).arg(++index, 7, 10, QChar('0')); + LogsDataFields() { + for (int32 i = 0; i < LogDataCount; ++i) { + files[i].reset(new QFile()); + } } bool openMain() { - QMutexLocker lock(_logsMutex(LogDataMain)); + return reopen(LogDataMain, 0, qsl("start")); + } + + bool instanceChecked() { return reopen(LogDataMain, 0, QString()); } + QString full() { + if (!streams[LogDataMain].device()) { + return QString(); + } + + QFile out(files[LogDataMain]->fileName()); + if (out.open(QIODevice::ReadOnly)) { + return QString::fromUtf8(out.readAll()); + } + return QString(); + } + void write(LogDataType type, const QString &msg) { QMutexLocker lock(_logsMutex(type)); if (type != LogDataMain) reopenDebug(); @@ -77,7 +105,7 @@ class LogsDataFields { private: - QFile files[LogDataCount]; + QSharedPointer files[LogDataCount]; QTextStream streams[LogDataCount]; int32 part = -1, index = 0; @@ -85,28 +113,90 @@ class LogsDataFields { bool reopen(LogDataType type, int32 dayIndex, const QString &postfix) { if (streams[type].device()) { if (type == LogDataMain) { - return true; + if (!postfix.isEmpty()) { + return true; + } + } else { + streams[type].setDevice(0); + files[type]->close(); } - streams[type].setDevice(0); - files[type].close(); } - files[type].setFileName(_logsFilePath(type, postfix)); QFlags mode = QIODevice::WriteOnly | QIODevice::Text; - if (type != LogDataMain) { - if (files[type].exists()) { - if (files[type].open(QIODevice::ReadOnly | QIODevice::Text)) { - if (QString::fromUtf8(files[type].readLine()).toInt() == dayIndex) { + if (type == LogDataMain) { // we can call LOG() in LogDataMain reopen - mutex not locked + if (postfix.isEmpty()) { // instance checked, need to move to log.txt + t_assert(!files[type]->fileName().isEmpty()); // one of log_startXX.txt should've been opened already + + QSharedPointer to(new QFile(_logsFilePath(type, postfix))); + if (to->exists() && !to->remove()) { + LOG(("Could not delete '%1' file to start new logging!").arg(to->fileName())); + return false; + } + if (!QFile(files[type]->fileName()).copy(to->fileName())) { // don't close files[type] yet + LOG(("Could not copy '%1' to '%2' to start new logging!").arg(files[type]->fileName()).arg(to->fileName())); + return false; + } + if (to->open(mode | QIODevice::Append)) { + qSwap(files[type], to); + streams[type].setDevice(files[type].data()); + streams[type].setCodec("UTF-8"); + LOG(("Moved logging from '%1' to '%2'!").arg(to->fileName()).arg(files[type]->fileName())); + to->remove(); + + LogsStartIndexChosen = -1; + + QDir working(cWorkingDir()); // delete all other log_startXX.txt that we can + QStringList oldlogs = working.entryList(QStringList("log_start*.txt"), QDir::Files); + for (QStringList::const_iterator i = oldlogs.cbegin(), e = oldlogs.cend(); i != e; ++i) { + QString oldlog = cWorkingDir() + *i, oldlogend = i->mid(qstr("log_start").size()); + if (oldlogend.size() == 1 + qstr(".txt").size() && oldlogend.at(0).isDigit() && oldlogend.midRef(1) == qstr(".txt")) { + bool removed = QFile(*i).remove(); + LOG(("Old start log '%1' found, deleted: %2").arg(*i).arg(Logs::b(removed))); + } + } + + return true; + } + LOG(("Could not open '%1' file to start new logging!").arg(to->fileName())); + return false; + } else { + bool found = false; + int32 oldest = -1; // find not existing log_startX.txt or pick the oldest one (by lastModified) + QDateTime oldestLastModified; + for (int32 i = 0; i < 10; ++i) { + QString trying = _logsFilePath(type, qsl("_start%1").arg(i)); + files[type]->setFileName(trying); + if (!files[type]->exists()) { + LogsStartIndexChosen = i; + found = true; + break; + } + QDateTime lastModified = QFileInfo(trying).lastModified(); + if (oldest < 0 || lastModified < oldestLastModified) { + oldestLastModified = lastModified; + oldest = i; + } + } + if (!found) { + files[type]->setFileName(_logsFilePath(type, qsl("_start%1").arg(oldest))); + LogsStartIndexChosen = oldest; + } + } + } else { + files[type]->setFileName(_logsFilePath(type, postfix)); + if (files[type]->exists()) { + if (files[type]->open(QIODevice::ReadOnly | QIODevice::Text)) { + if (QString::fromUtf8(files[type]->readLine()).toInt() == dayIndex) { mode |= QIODevice::Append; } - files[type].close(); + files[type]->close(); } } else { QDir().mkdir(cWorkingDir() + qstr("DebugLogs")); } } - if (files[type].open(mode)) { - streams[type].setDevice(&files[type]); + if (files[type]->open(mode)) { + streams[type].setDevice(files[type].data()); streams[type].setCodec("UTF-8"); if (type != LogDataMain) { @@ -115,6 +205,8 @@ class LogsDataFields { } return true; + } else if (type != LogDataMain) { + LOG(("Could not open debug log '%1'!").arg(files[type]->fileName())); } return false; } @@ -145,8 +237,11 @@ LogsDataFields *LogsData = 0; typedef QList > LogsInMemoryList; LogsInMemoryList *LogsInMemory = 0; LogsInMemoryList *DeletedLogsInMemory = SharedMemoryLocation(); + +QString LogsBeforeSingleInstanceChecked; // LogsInMemory already dumped in LogsData, but LogsData is about to be deleted + void _logsWrite(LogDataType type, const QString &msg) { - if (LogsData) { + if (LogsData && (type == LogDataMain || LogsStartIndexChosen < 0)) { if (type == LogDataMain || cDebug()) { LogsData->write(type, msg); } @@ -154,7 +249,9 @@ void _logsWrite(LogDataType type, const QString &msg) { if (!LogsInMemory) { LogsInMemory = new LogsInMemoryList; } - LogsInMemory->push_back(qMakePair(LogDataMain, msg)); + LogsInMemory->push_back(qMakePair(type, msg)); + } else if (!LogsBeforeSingleInstanceChecked.isEmpty() && type == LogDataMain) { + LogsBeforeSingleInstanceChecked += msg; } } @@ -217,7 +314,7 @@ namespace Logs { if (!LogsData->openMain()) { delete LogsData; LogsData = 0; - LOG(("Error: could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain))); + LOG(("Could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain, qsl("_startXX")))); return; } @@ -234,31 +331,76 @@ namespace Logs { t_assert(LogsInMemory != DeletedLogsInMemory); LogsInMemoryList list = *LogsInMemory; for (LogsInMemoryList::const_iterator i = list.cbegin(), e = list.cend(); i != e; ++i) { - _logsWrite(i->first, i->second); + if (i->first == LogDataMain) { + _logsWrite(i->first, i->second); + } } } - if (LogsInMemory) { - t_assert(LogsInMemory != DeletedLogsInMemory); - delete LogsInMemory; - LogsInMemory = DeletedLogsInMemory; - } LOG(("Logs started.")); - DEBUG_LOG(("Debug logs started.")); } Initializer::~Initializer() { delete LogsData; LogsData = 0; - delete[] LogsMutexes; - LogsMutexes = 0; + if (LogsInMemory && LogsInMemory != DeletedLogsInMemory) { + delete LogsInMemory; + } + LogsInMemory = DeletedLogsInMemory; + + _logsMutex(LogDataMain, true); } bool started() { return LogsData != 0; } + bool instanceChecked() { + if (!LogsData) return false; + + if (!LogsData->instanceChecked()) { + LogsBeforeSingleInstanceChecked = Logs::full(); + + delete LogsData; + LogsData = 0; + LOG(("Could not move logging to '%1'!").arg(_logsFilePath(LogDataMain))); + return false; + } + + if (LogsInMemory) { + t_assert(LogsInMemory != DeletedLogsInMemory); + LogsInMemoryList list = *LogsInMemory; + for (LogsInMemoryList::const_iterator i = list.cbegin(), e = list.cend(); i != e; ++i) { + if (i->first != LogDataMain) { + _logsWrite(i->first, i->second); + } + } + } + if (LogsInMemory) { + t_assert(LogsInMemory != DeletedLogsInMemory); + delete LogsInMemory; + } + LogsInMemory = DeletedLogsInMemory; + + DEBUG_LOG(("Debug logs started.")); + LogsBeforeSingleInstanceChecked.clear(); + return true; + } + + void multipleInstances() { + if (LogsInMemory) { + t_assert(LogsInMemory != DeletedLogsInMemory); + delete LogsInMemory; + } + LogsInMemory = DeletedLogsInMemory; + + if (cDebug()) { + LOG(("WARNING: debug logs are not written in multiple instances mode!")); + } + LogsBeforeSingleInstanceChecked.clear(); + } + void writeMain(const QString &v) { time_t t = time(NULL); struct tm tm; @@ -267,7 +409,7 @@ namespace Logs { QString msg(QString("[%1.%2.%3 %4:%5:%6] %7\n").arg(tm.tm_year + 1900).arg(tm.tm_mon + 1, 2, 10, QChar('0')).arg(tm.tm_mday, 2, 10, QChar('0')).arg(tm.tm_hour, 2, 10, QChar('0')).arg(tm.tm_min, 2, 10, QChar('0')).arg(tm.tm_sec, 2, 10, QChar('0')).arg(v)); _logsWrite(LogDataMain, msg); - QString debugmsg(QString("%1 %2\n").arg(LogsData->entryStart()).arg(v)); + QString debugmsg(QString("%1 %2\n").arg(_logsEntryStart()).arg(v)); _logsWrite(LogDataDebug, debugmsg); } @@ -286,7 +428,7 @@ namespace Logs { file = found + 1; } - QString msg(QString("%1 %2 (%3 : %4)\n").arg(LogsData->entryStart()).arg(v).arg(file).arg(line)); + QString msg(QString("%1 %2 (%3 : %4)\n").arg(_logsEntryStart()).arg(v).arg(file).arg(line)); _logsWrite(LogDataDebug, msg); #ifdef Q_OS_WIN @@ -299,15 +441,39 @@ namespace Logs { } void writeTcp(const QString &v) { - QString msg(QString("%1 %2\n").arg(LogsData->entryStart()).arg(v)); + QString msg(QString("%1 %2\n").arg(_logsEntryStart()).arg(v)); _logsWrite(LogDataTcp, msg); } void writeMtp(int32 dc, const QString &v) { - QString msg(QString("%1 (dc:%2) %3\n").arg(LogsData->entryStart()).arg(dc).arg(v)); + QString msg(QString("%1 (dc:%2) %3\n").arg(_logsEntryStart()).arg(dc).arg(v)); _logsWrite(LogDataMtp, msg); } + QString full() { + if (LogsData) { + return LogsData->full(); + } + if (!LogsInMemory || LogsInMemory == DeletedLogsInMemory) { + return LogsBeforeSingleInstanceChecked; + } + + int32 size = 0; + for (LogsInMemoryList::const_iterator i = LogsInMemory->cbegin(), e = LogsInMemory->cend(); i != e; ++i) { + if (i->first == LogDataMain) { + size += i->second.size(); + } + } + QString result; + result.reserve(size); + for (LogsInMemoryList::const_iterator i = LogsInMemory->cbegin(), e = LogsInMemory->cend(); i != e; ++i) { + if (i->first == LogDataMain) { + result += i->second; + } + } + return result; + } + QString vector(const QVector &ids) { if (!ids.size()) return "[]"; QString idsStr = QString("[%1").arg(ids.cbegin()->v); diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index d50a93f5cda95a..bbfbc46abbd4d0 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -29,12 +29,17 @@ namespace Logs { }; bool started(); + bool instanceChecked(); + void multipleInstances(); + void writeMain(const QString &v); void writeDebug(const char *file, int32 line, const QString &v); void writeTcp(const QString &v); void writeMtp(int32 dc, const QString &v); + QString full(); + inline const char *b(bool v) { return v ? "[TRUE]" : "[FALSE]"; } From d672353ff9788e14ab260587cc95845948b7f12d Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 17 Jan 2016 13:03:57 +0800 Subject: [PATCH 006/133] fixed single instance checking --- Telegram/SourceFiles/application.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 60f831665a1755..686db06b7b34ec 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -149,7 +149,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) connect(&_localSocket, SIGNAL(error(QLocalSocket::LocalSocketError)), this, SLOT(socketError(QLocalSocket::LocalSocketError))); connect(&_localSocket, SIGNAL(bytesWritten(qint64)), this, SLOT(socketWritten(qint64))); connect(&_localSocket, SIGNAL(readyRead()), this, SLOT(socketReading())); - connect(&_localSocket, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); + connect(&_localServer, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); #ifndef TDESKTOP_DISABLE_AUTOUPDATE connect(&_updateCheckTimer, SIGNAL(timeout()), this, SLOT(updateCheck())); From 0f4405dbaf93e9cb9397b03a950c8a58c6e88a06 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 21 Jan 2016 14:58:58 +0800 Subject: [PATCH 007/133] backtrace output for win platform added, testing with abort() call in ~AppClass() --- Telegram/SourceFiles/application.cpp | 39 ++- Telegram/SourceFiles/facades.cpp | 3 + Telegram/SourceFiles/facades.h | 1 + Telegram/SourceFiles/logs.cpp | 145 ++++++++++- Telegram/SourceFiles/logs.h | 19 ++ Telegram/SourceFiles/main.cpp | 1 + Telegram/SourceFiles/pspecific_wnd.cpp | 318 ++++++++++++++++++++++++- Telegram/SourceFiles/pspecific_wnd.h | 2 + Telegram/SourceFiles/stdafx.h | 2 + Telegram/SourceFiles/types.cpp | 43 ---- Telegram/SourceFiles/types.h | 2 - 11 files changed, 505 insertions(+), 70 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 686db06b7b34ec..d8137a1136933c 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -231,6 +231,8 @@ void Application::socketReading() { } void Application::socketError(QLocalSocket::LocalSocketError e) { + if (App::quiting()) return; + if (_secondInstance) { LOG(("Could not write show command, error %1, quiting..").arg(e)); return App::quit(); @@ -265,18 +267,33 @@ void Application::singleInstanceChecked() { if (cManyInstance()) { Logs::multipleInstances(); } - if ((!cManyInstance() && !Logs::instanceChecked()) || !Logs::started()) { - MessageBox(0, (QString::fromStdWString(L"Could not initialize logs!\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); - // show error window - App::quit(); - return; - } Global::start(); - // if crashed, show window and try to autoupdate - - new AppClass(); + if (!Logs::started() || (!cManyInstance() && !Logs::instanceChecked())) { + // show error window + MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); + App::quit(); + } else { + SignalHandlers::Status status = SignalHandlers::start(); + if (status == SignalHandlers::CantOpen) { + // show error window + MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); + App::quit(); + } else { + if (status == SignalHandlers::LastCrashed) { + // show error window + MessageBox(0, (QString::fromStdWString(L"Last time Telegram Dekstop crashed! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); + if (SignalHandlers::restart() == SignalHandlers::CantOpen) { + // show error window + MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); + App::quit(); + return; + } + } + new AppClass(); + } + } } void Application::socketDisconnected() { @@ -638,8 +655,6 @@ AppClass::AppClass() : QObject() , _uploader(0) { AppObject = this; - installSignalHandlers(); - ThirdParty::start(); Sandbox::start(); Local::start(); @@ -1035,6 +1050,8 @@ void AppClass::execExternal(const QString &cmd) { } AppClass::~AppClass() { + abort(); + _window.setParent(0); anim::stopManager(); diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 1be6560e19c89f..2c3fd675fb8663 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -179,6 +179,8 @@ namespace Notify { struct GlobalDataStruct { QString LangSystemISO; int32 LangSystem = languageDefault; + + QByteArray LastCrashDump; }; GlobalDataStruct *GlobalData = 0; @@ -278,6 +280,7 @@ Type &Ref##Name() { \ DefineGlobalReadOnly(QString, LangSystemISO); DefineGlobalReadOnly(int32, LangSystem); + DefineGlobal(QByteArray, LastCrashDump); } diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 70749a67f23e10..e86c125d923a7e 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -111,6 +111,7 @@ namespace Global { DeclareGlobalReadOnly(QString, LangSystemISO); DeclareGlobalReadOnly(int32, LangSystem); + DeclareGlobal(QByteArray, LastCrashDump); } diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index d957bdd13190cf..4869f079db4a5d 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -267,13 +267,11 @@ namespace Logs { } bool workingDirChosen = cBetaVersion(); - QString moveOldDataFrom; + QString initialWorkingDir = QDir(cWorkingDir()).absolutePath() + '/', moveOldDataFrom; if (cBetaVersion()) { cSetDebug(true); #if (defined Q_OS_MAC || defined Q_OS_LINUX) } else { - QString wasDir = QDir(cWorkingDir()).absolutePath() + '/'; - #ifdef _DEBUG cForceWorkingDir(cExeDir()); #else @@ -284,7 +282,7 @@ namespace Logs { workingDirChosen = true; #if (defined Q_OS_LINUX && !defined _DEBUG) // fix first version - moveOldDataFrom = wasDir; + moveOldDataFrom = initialWorkingDir; #endif #endif @@ -303,17 +301,22 @@ namespace Logs { cForceWorkingDir(QDir(cWorkingDir()).absolutePath() + '/'); QDir().setCurrent(cWorkingDir()); + QDir().mkpath(cWorkingDir() + qstr("tdata")); Global::WorkingDirReady(); + if (!LogsData->openMain()) { + delete LogsData; + LogsData = 0; + } + LOG(("Launched version: %1, dev: %2, beta: %3, debug mode: %4, test dc: %5").arg(AppVersion).arg(Logs::b(cDevVersion())).arg(cBetaVersion()).arg(Logs::b(cDebug())).arg(Logs::b(cTestMode()))); LOG(("Executable dir: %1, name: %2").arg(cExeDir()).arg(cExeName())); + LOG(("Initial working dir: %1").arg(initialWorkingDir)); LOG(("Working dir: %1").arg(cWorkingDir())); LOG(("Arguments: %1").arg(cArguments())); - if (!LogsData->openMain()) { - delete LogsData; - LogsData = 0; + if (!LogsData) { LOG(("Could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain, qsl("_startXX")))); return; } @@ -333,11 +336,12 @@ namespace Logs { for (LogsInMemoryList::const_iterator i = list.cbegin(), e = list.cend(); i != e; ++i) { if (i->first == LogDataMain) { _logsWrite(i->first, i->second); + LOG(("First: %1, %2").arg(i->first).arg(i->second)); } } } - LOG(("Logs started.")); + LOG(("Logs started")); } Initializer::~Initializer() { @@ -368,6 +372,8 @@ namespace Logs { return false; } + + if (LogsInMemory) { t_assert(LogsInMemory != DeletedLogsInMemory); LogsInMemoryList list = *LogsInMemory; @@ -539,3 +545,126 @@ void _moveOldDataFiles(const QString &wasDir) { } } } + +namespace SignalHandlers { + + QByteArray CrashDumpPath; + FILE *CrashDumpFile = 0; + int CrashDumpFileNo = 0; + + void _writeChar(char ch) { + fwrite(&ch, 1, 1, CrashDumpFile); + } + + dump::~dump() { + if (CrashDumpFile) { + fflush(CrashDumpFile); + } + } + + const dump &operator<<(const dump &stream, const char *str) { + if (!CrashDumpFile) return stream; + + fwrite(str, 1, strlen(str), CrashDumpFile); + return stream; + } + + const dump &operator<<(const dump &stream, int num) { + if (!CrashDumpFile) return stream; + + if (num < 0) { + _writeChar('-'); + num = -num; + } + int upper = 1, prev = num / 10; + while (prev >= upper) { + upper *= 10; + } + while (upper > 0) { + int digit = (num / upper); + _writeChar('0' + digit); + num -= digit * upper; + upper /= 10; + } + return stream; + } + + void Handler(int signum) { + const char* name = 0; + switch (signum) { + case SIGABRT: name = "SIGABRT"; break; + case SIGSEGV: name = "SIGSEGV"; break; + case SIGILL: name = "SIGILL"; break; + case SIGFPE: name = "SIGFPE"; break; +#ifndef Q_OS_WIN + case SIGBUS: name = "SIGBUS"; break; + case SIGSYS: name = "SIGSYS"; break; +#endif + } + + if (name) { + dump() << "Caught signal " << signum << " (" << name << ")\n"; + } else { + dump() << "Caught signal " << signum << "\n"; + } + dump() << "Platform: "; + switch (cPlatform()) { + case dbipWindows: dump() << "win"; break; + case dbipMac: dump() << "mac"; break; + case dbipMacOld: dump() << "macold"; break; + case dbipLinux64: dump() << "linux64"; break; + case dbipLinux32: dump() << "linux32"; break; + } + dump() << "\n\nBacktrace:\n"; + psWriteStackTrace(CrashDumpFileNo); + } + + Status start() { + CrashDumpPath = (cWorkingDir() + qsl("tdata/working")).toUtf8(); + if (FILE *f = fopen(CrashDumpPath.constData(), "rb")) { + QByteArray lastdump; + char buffer[64 * 1024] = { 0 }; + int32 read = 0; + while ((read = fread(buffer, 1, 64 * 1024, f)) > 0) { + lastdump.append(buffer, read); + } + fclose(f); + + Global::SetLastCrashDump(lastdump); + + LOG(("Opened '%1' for reading, the previous Telegram Desktop launch was not finished properly :( Crash log size: %2").arg(QString::fromUtf8(CrashDumpPath)).arg(lastdump.size())); + + return LastCrashed; + } + return restart(); + } + + Status restart() { + CrashDumpFile = fopen(CrashDumpPath.constData(), "wb"); + if (CrashDumpFile) { + CrashDumpFileNo = fileno(CrashDumpFile); + + signal(SIGABRT, SignalHandlers::Handler); + signal(SIGSEGV, SignalHandlers::Handler); + signal(SIGILL, SignalHandlers::Handler); + signal(SIGFPE, SignalHandlers::Handler); +#ifndef Q_OS_WIN + signal(SIGBUS, SignalHandlers::Handler); + signal(SIGSYS, SignalHandlers::Handler); +#endif + return Started; + } + + LOG(("Could not open '%1' for writing!").arg(QString::fromUtf8(CrashDumpPath))); + + return CantOpen; + } + + void finish() { + if (CrashDumpFile) { + fclose(CrashDumpFile); + unlink(CrashDumpPath.constData()); + } + } + +} diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index bbfbc46abbd4d0..d706ba289c1854 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -85,3 +85,22 @@ namespace Logs { #define MTP_LOG(dc, msg) { if (cDebug() || !Logs::started()) Logs::writeMtp(dc, QString msg); } //usage MTP_LOG(dc, ("log: %1 %2").arg(1).arg(2)) + +namespace SignalHandlers { + + struct dump { + ~dump(); + }; + const dump &operator<<(const dump &stream, const char *str); + const dump &operator<<(const dump &stream, int num); + + enum Status { + CantOpen, + LastCrashed, + Started + }; + Status start(); + Status restart(); // can be only CantOpen or Started + void finish(); + +} diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index dde5bfaa69694e..e98700fdac35a2 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -67,5 +67,6 @@ int main(int argc, char *argv[]) { psExecTelegram(); } + SignalHandlers::finish(); return result; } diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 847cb761f5f819..3aa0aaef02cb68 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2368,6 +2368,88 @@ typedef BOOL (FAR STDAPICALLTYPE *t_miniDumpWriteDump)( ); t_miniDumpWriteDump miniDumpWriteDump = 0; +//// SymCleanup() +//typedef BOOL(__stdcall *tSC)(IN HANDLE hProcess); +//tSC pSC; +// +// SymFunctionTableAccess64() +typedef PVOID (FAR STDAPICALLTYPE *t_SymFunctionTableAccess64)(HANDLE hProcess, DWORD64 AddrBase); +t_SymFunctionTableAccess64 symFunctionTableAccess64 = 0; + +//// SymGetLineFromAddr64() +//typedef BOOL(__stdcall *tSGLFA)(IN HANDLE hProcess, IN DWORD64 dwAddr, +// OUT PDWORD pdwDisplacement, OUT PIMAGEHLP_LINE64 Line); +//tSGLFA pSGLFA; +// +// SymGetModuleBase64() +typedef DWORD64 (FAR STDAPICALLTYPE *t_SymGetModuleBase64)(IN HANDLE hProcess, IN DWORD64 dwAddr); +t_SymGetModuleBase64 symGetModuleBase64 = 0; + +//// SymGetModuleInfo64() +//typedef BOOL(__stdcall *tSGMI)(IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V2 *ModuleInfo); +//tSGMI pSGMI; + +// // SymGetModuleInfo64() +// typedef BOOL (__stdcall *tSGMI_V3)( IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V3 *ModuleInfo ); +// tSGMI_V3 pSGMI_V3; + +//// SymGetOptions() +//typedef DWORD(__stdcall *tSGO)(VOID); +//tSGO pSGO; +// +//// SymGetSymFromAddr64() +//typedef BOOL(__stdcall *tSGSFA)(IN HANDLE hProcess, IN DWORD64 dwAddr, +// OUT PDWORD64 pdwDisplacement, OUT PIMAGEHLP_SYMBOL64 Symbol); +//tSGSFA pSGSFA; +// +//// SymInitialize() +//typedef BOOL(__stdcall *tSI)(IN HANDLE hProcess, IN PSTR UserSearchPath, IN BOOL fInvadeProcess); +//tSI pSI; +// +//// SymLoadModule64() +//typedef DWORD64(__stdcall *tSLM)(IN HANDLE hProcess, IN HANDLE hFile, +// IN PSTR ImageName, IN PSTR ModuleName, IN DWORD64 BaseOfDll, IN DWORD SizeOfDll); +//tSLM pSLM; +// +//// SymSetOptions() +//typedef DWORD(__stdcall *tSSO)(IN DWORD SymOptions); +//tSSO pSSO; + +typedef BOOL (FAR STDAPICALLTYPE *t_StackWalk64)( + _In_ DWORD MachineType, + _In_ HANDLE hProcess, + _In_ HANDLE hThread, + _Inout_ LPSTACKFRAME64 StackFrame, + _Inout_ PVOID ContextRecord, + _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine, + _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine, + _In_opt_ PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine, + _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress +); +t_StackWalk64 stackWalk64 = 0; + +//// UnDecorateSymbolName() +//typedef DWORD(__stdcall WINAPI *tUDSN)(PCSTR DecoratedName, PSTR UnDecoratedName, +// DWORD UndecoratedLength, DWORD Flags); +//tUDSN pUDSN; +// +//typedef BOOL(__stdcall WINAPI *tSGSP)(HANDLE hProcess, PSTR SearchPath, DWORD SearchPathLength); +//tSGSP pSGSP; + +BOOL __stdcall ReadProcessMemoryRoutine64( + _In_ HANDLE hProcess, + _In_ DWORD64 qwBaseAddress, + _Out_writes_bytes_(nSize) PVOID lpBuffer, + _In_ DWORD nSize, + _Out_ LPDWORD lpNumberOfBytesRead + ) { + SIZE_T st; + BOOL bRet = ReadProcessMemory(hProcess, (LPVOID)qwBaseAddress, lpBuffer, nSize, &st); + *lpNumberOfBytesRead = (DWORD)st; + //printf("ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n", hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, (DWORD) st, (DWORD) bRet); + return bRet; +} + HANDLE _generateDumpFileAtPath(const WCHAR *path) { static const int maxFileLen = MAX_PATH * 10; @@ -2381,7 +2463,7 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) { } } - WCHAR szFileName[maxFileLen]; + WCHAR szFileName[maxFileLen]; WCHAR szExeName[maxFileLen]; wcscpy_s(szExeName, _exeName); @@ -2410,14 +2492,94 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) { return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0); } -void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) { - static const int maxFileLen = MAX_PATH * 10; +bool LoadDbgHelp() { + if (miniDumpWriteDump) return true; - HMODULE hDll = LoadLibrary(L"DBGHELP.DLL"); - if (!hDll) return; + HMODULE hDll = 0; + + WCHAR szTemp[4096]; + if (GetModuleFileName(NULL, szTemp, 4096) > 0) { + wcscat(szTemp, L".local"); + if (GetFileAttributes(szTemp) == INVALID_FILE_ATTRIBUTES) { + // ".local" file does not exist, so we can try to load the dbghelp.dll from the "Debugging Tools for Windows" + if (GetEnvironmentVariable(L"ProgramFiles", szTemp, 4096) > 0) { + wcscat(szTemp, L"\\Debugging Tools for Windows\\dbghelp.dll"); + // now check if the file exists: + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) { + hDll = LoadLibrary(szTemp); + } + } + // Still not found? Then try to load the 64-Bit version: + if (!hDll && (GetEnvironmentVariable(L"ProgramFiles", szTemp, 4096) > 0)) { + wcscat(szTemp, L"\\Debugging Tools for Windows 64-Bit\\dbghelp.dll"); + if (GetFileAttributes(szTemp) != INVALID_FILE_ATTRIBUTES) { + hDll = LoadLibrary(szTemp); + } + } + } + } + if (!hDll) { + hDll = LoadLibrary(L"DBGHELP.DLL"); + } + + if (!hDll) return false; miniDumpWriteDump = (t_miniDumpWriteDump)GetProcAddress(hDll, "MiniDumpWriteDump"); - if (!miniDumpWriteDump) return; + + //pSI = (tSI)GetProcAddress(m_hDbhHelp, "SymInitialize"); + //pSC = (tSC)GetProcAddress(m_hDbhHelp, "SymCleanup"); + + stackWalk64 = (t_StackWalk64)GetProcAddress(hDll, "StackWalk64"); + //pSGO = (tSGO)GetProcAddress(m_hDbhHelp, "SymGetOptions"); + //pSSO = (tSSO)GetProcAddress(m_hDbhHelp, "SymSetOptions"); + + symFunctionTableAccess64 = (t_SymFunctionTableAccess64)GetProcAddress(hDll, "SymFunctionTableAccess64"); + //pSGLFA = (tSGLFA)GetProcAddress(m_hDbhHelp, "SymGetLineFromAddr64"); + symGetModuleBase64 = (t_SymGetModuleBase64)GetProcAddress(hDll, "SymGetModuleBase64"); + //pSGMI = (tSGMI)GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64"); + ////pSGMI_V3 = (tSGMI_V3) GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64" ); + //pSGSFA = (tSGSFA)GetProcAddress(m_hDbhHelp, "SymGetSymFromAddr64"); + //pUDSN = (tUDSN)GetProcAddress(m_hDbhHelp, "UnDecorateSymbolName"); + //pSLM = (tSLM)GetProcAddress(m_hDbhHelp, "SymLoadModule64"); + //pSGSP = (tSGSP)GetProcAddress(m_hDbhHelp, "SymGetSearchPath"); + + if (!miniDumpWriteDump || + !stackWalk64) { + miniDumpWriteDump = 0; + return false; + } + + //// SymInitialize + //if (szSymPath != NULL) + // m_szSymPath = _strdup(szSymPath); + //if (this->pSI(m_hProcess, m_szSymPath, FALSE) == FALSE) + // this->m_parent->OnDbgHelpErr("SymInitialize", GetLastError(), 0); + + //DWORD symOptions = this->pSGO(); // SymGetOptions + //symOptions |= SYMOPT_LOAD_LINES; + //symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS; + ////symOptions |= SYMOPT_NO_PROMPTS; + //// SymSetOptions + //symOptions = this->pSSO(symOptions); + + //char buf[StackWalker::STACKWALK_MAX_NAMELEN] = { 0 }; + //if (this->pSGSP != NULL) + //{ + // if (this->pSGSP(m_hProcess, buf, StackWalker::STACKWALK_MAX_NAMELEN) == FALSE) + // this->m_parent->OnDbgHelpErr("SymGetSearchPath", GetLastError(), 0); + //} + //char szUserName[1024] = { 0 }; + //DWORD dwSize = 1024; + //GetUserNameA(szUserName, &dwSize); + //this->m_parent->OnSymInit(buf, symOptions, szUserName); + + return true; +} + +void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) { + static const int maxFileLen = MAX_PATH * 10; + + if (!LoadDbgHelp()) return; HANDLE hDumpFile = 0; @@ -2465,6 +2627,150 @@ LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_op return 0; } +// stack walking code taken from StackWalker +static const int StackEntryMaxNameLength = 1024; +struct StackEntry { + DWORD64 offset; // if 0, we have no valid entry + CHAR name[StackEntryMaxNameLength]; + CHAR undName[StackEntryMaxNameLength]; + CHAR undFullName[StackEntryMaxNameLength]; + DWORD64 offsetFromSmybol; + DWORD offsetFromLine; + DWORD lineNumber; + CHAR lineFileName[StackEntryMaxNameLength]; + DWORD symType; + LPCSTR symTypeString; + CHAR moduleName[StackEntryMaxNameLength]; + DWORD64 baseOfImage; + CHAR loadedImageName[StackEntryMaxNameLength]; +}; + +enum StackEntryType { + StackEntryFirst, + StackEntryNext, + StackEntryLast, +}; + +struct IMAGEHLP_MODULE64_V2 { + DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) + DWORD64 BaseOfImage; // base load address of module + DWORD ImageSize; // virtual size of the loaded module + DWORD TimeDateStamp; // date/time stamp from pe header + DWORD CheckSum; // checksum from the pe header + DWORD NumSyms; // number of symbols in the symbol table + SYM_TYPE SymType; // type of symbols loaded + CHAR ModuleName[32]; // module name + CHAR ImageName[256]; // image name + CHAR LoadedImageName[256]; // symbol file name +}; + +char ImageHlpSymbol64[sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength]; + +void psWriteStackTrace(int n) { + if (!LoadDbgHelp()) return; + + HANDLE hThread = GetCurrentThread(), hProcess = GetCurrentProcess(); + const CONTEXT *context = NULL; + LPVOID pUserData = NULL; + + CONTEXT c; + StackEntry csEntry; + IMAGEHLP_SYMBOL64 *pSym = NULL; + IMAGEHLP_MODULE64_V2 Module; + IMAGEHLP_LINE64 Line; + int frameNum; + + if (!LoadDbgHelp()) { + SignalHandlers::dump() << "ERROR: Could not load dbghelp.dll!\n"; + return; + } + + memset(&c, 0, sizeof(CONTEXT)); + c.ContextFlags = CONTEXT_FULL; + RtlCaptureContext(&c); + + // init STACKFRAME for first call + STACKFRAME64 s; // in/out stackframe + memset(&s, 0, sizeof(s)); + DWORD imageType; +#ifdef _M_IX86 + // normally, call ImageNtHeader() and use machine info from PE header + imageType = IMAGE_FILE_MACHINE_I386; + s.AddrPC.Offset = c.Eip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Ebp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Esp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_X64 + imageType = IMAGE_FILE_MACHINE_AMD64; + s.AddrPC.Offset = c.Rip; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.Rsp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrStack.Offset = c.Rsp; + s.AddrStack.Mode = AddrModeFlat; +#elif _M_IA64 + imageType = IMAGE_FILE_MACHINE_IA64; + s.AddrPC.Offset = c.StIIP; + s.AddrPC.Mode = AddrModeFlat; + s.AddrFrame.Offset = c.IntSp; + s.AddrFrame.Mode = AddrModeFlat; + s.AddrBStore.Offset = c.RsBSP; + s.AddrBStore.Mode = AddrModeFlat; + s.AddrStack.Offset = c.IntSp; + s.AddrStack.Mode = AddrModeFlat; +#else +#error "Platform not supported!" +#endif + + pSym = (IMAGEHLP_SYMBOL64 *)ImageHlpSymbol64; + memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength); + pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); + pSym->MaxNameLength = StackEntryMaxNameLength; + + memset(&Line, 0, sizeof(Line)); + Line.SizeOfStruct = sizeof(Line); + + memset(&Module, 0, sizeof(Module)); + Module.SizeOfStruct = sizeof(Module); + + for (frameNum = 0; ; ++frameNum) { + // get next stack frame (StackWalk64(), SymFunctionTableAccess64(), SymGetModuleBase64()) + // if this returns ERROR_INVALID_ADDRESS (487) or ERROR_NOACCESS (998), you can + // assume that either you are done, or that the stack is so hosed that the next + // deeper frame could not be found. + // CONTEXT need not to be suplied if imageTyp is IMAGE_FILE_MACHINE_I386! + if (!stackWalk64(imageType, hProcess, hThread, &s, &c, ReadProcessMemoryRoutine64, symFunctionTableAccess64, symGetModuleBase64, NULL)) { + SignalHandlers::dump() << "ERROR: Call to StackWalk64() failed!\n"; + return; + } + + csEntry.offset = s.AddrPC.Offset; + csEntry.name[0] = 0; + csEntry.undName[0] = 0; + csEntry.undFullName[0] = 0; + csEntry.offsetFromSmybol = 0; + csEntry.offsetFromLine = 0; + csEntry.lineFileName[0] = 0; + csEntry.lineNumber = 0; + csEntry.loadedImageName[0] = 0; + csEntry.moduleName[0] = 0; + if (s.AddrPC.Offset == s.AddrReturn.Offset) { + SignalHandlers::dump() << s.AddrPC.Offset << "\n"; + SignalHandlers::dump() << "ERROR: StackWalk64() endless callstack!"; + return; + } + if (s.AddrPC.Offset != 0) { // we seem to have a valid PC + SignalHandlers::dump() << s.AddrPC.Offset << "\n"; + } + + if (s.AddrReturn.Offset == 0) { + break; + } + } +} + class StringReferenceWrapper { public: diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index b5f09d427d4d6e..cbda8dc02d3e40 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -117,6 +117,8 @@ extern LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter; LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers); LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); +void psWriteStackTrace(int n); + void psDeleteDir(const QString &dir); void psUserActionDone(); diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index 44098d9e14b030..8f285ba2013897 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -22,6 +22,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #define PSAPI_VERSION 1 // fix WinXP //#define Q_NO_TEMPLATE_FRIENDS // fix some compiler difference issues +#include + #include #include #include diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 6835e4956fdd8d..7a1bdd17015831 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -22,8 +22,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "application.h" -#include - uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 }; #ifdef Q_OS_WIN @@ -309,47 +307,6 @@ namespace ThirdParty { } -namespace { - FILE *_crashDump = 0; - int _crashDumpNo = 0; -} - -void _signalHandler(int signum) { - const char* name = 0; - switch (signum) { - case SIGABRT: name = "SIGABRT"; break; - case SIGSEGV: name = "SIGSEGV"; break; - case SIGILL: name = "SIGILL"; break; - case SIGFPE: name = "SIGFPE"; break; -#ifndef Q_OS_WIN - case SIGBUS: name = "SIGBUS"; break; - case SIGSYS: name = "SIGSYS"; break; -#endif - } - LOG(("Caught signal %1").arg(name)); - if (name) - fprintf(stdout, "Caught signal %d (%s)\n", signum, name); - else - fprintf(stdout, "Caught signal %d\n", signum); - - - //printStackTrace(); -} - -void installSignalHandlers() { - _crashDump = fopen((cWorkingDir() + qsl("tdata/working")).toUtf8().constData(), "wb"); - if (_crashDump) _crashDumpNo = fileno(_crashDump); - - signal(SIGABRT, _signalHandler); - signal(SIGSEGV, _signalHandler); - signal(SIGILL, _signalHandler); - signal(SIGFPE, _signalHandler); -#ifndef Q_OS_WIN - signal(SIGBUS, _signalHandler); - signal(SIGSYS, _signalHandler); -#endif -} - bool checkms() { int64 unixms = (myunixtime() - _timeStart) * 1000LL + _msAddToUnixtime; int64 ms = int64(getms(true)); diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 50ddd51e99ca71..d7043d70bb47b3 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -143,8 +143,6 @@ inline void mylocaltime(struct tm * _Tm, const time_t * _Time) { #endif } -void installSignalHandlers(); - namespace ThirdParty { void start(); From c8d7d23ee6b9a1ebe0e705583075aa8eca1ed3b6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 25 Jan 2016 13:22:58 +0300 Subject: [PATCH 008/133] windows backtrace logging done, showing error when cant start telegram or previous launch was not finished properly --- Telegram/SourceFiles/application.cpp | 23 +- Telegram/SourceFiles/history.cpp | 4 +- Telegram/SourceFiles/logs.cpp | 83 +++- Telegram/SourceFiles/logs.h | 2 + Telegram/SourceFiles/main.cpp | 2 + Telegram/SourceFiles/pspecific_wnd.cpp | 623 +++++++++++++++++++------ Telegram/SourceFiles/pspecific_wnd.h | 4 +- Telegram/SourceFiles/settings.cpp | 3 + Telegram/SourceFiles/settings.h | 1 + Telegram/SourceFiles/types.cpp | 2 +- Telegram/SourceFiles/window.cpp | 59 +++ Telegram/SourceFiles/window.h | 41 +- 12 files changed, 665 insertions(+), 182 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index d8137a1136933c..49baf5714c1ae6 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -271,26 +271,14 @@ void Application::singleInstanceChecked() { Global::start(); if (!Logs::started() || (!cManyInstance() && !Logs::instanceChecked())) { - // show error window - MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); - App::quit(); + new NotStartedWindow(); } else { SignalHandlers::Status status = SignalHandlers::start(); if (status == SignalHandlers::CantOpen) { - // show error window - MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); - App::quit(); + new NotStartedWindow(); + } else if (status == SignalHandlers::LastCrashed) { + new LastCrashedWindow(); } else { - if (status == SignalHandlers::LastCrashed) { - // show error window - MessageBox(0, (QString::fromStdWString(L"Last time Telegram Dekstop crashed! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); - if (SignalHandlers::restart() == SignalHandlers::CantOpen) { - // show error window - MessageBox(0, (QString::fromStdWString(L"Could not start Telegram Dekstop! Log:\n\n") + Logs::full()).toStdWString().c_str(), L"Error!", MB_ICONERROR); - App::quit(); - return; - } - } new AppClass(); } } @@ -1050,10 +1038,7 @@ void AppClass::execExternal(const QString &cmd) { } AppClass::~AppClass() { - abort(); - _window.setParent(0); - anim::stopManager(); stopWebLoadManager(); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 4cd226f2db99c0..2168eaccafb943 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -4000,7 +4000,8 @@ HistoryDocument::HistoryDocument(const HistoryDocument &other) : HistoryFileMedi , _linkcancell(new DocumentCancelLink(_data)) , _name(other._name) , _namew(other._namew) -, _thumbw(other._thumbw) { +, _thumbw(other._thumbw) +, _caption(other._caption) { setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); setStatusSize(other._statusSize); @@ -4378,6 +4379,7 @@ HistoryGif::HistoryGif(const HistoryGif &other) : HistoryFileMedia() , _data(other._data) , _thumbw(other._thumbw) , _thumbh(other._thumbh) +, _caption(other._caption) , _gif(0) { setLinks(new GifOpenLink(_data), new GifOpenLink(_data), new DocumentCancelLink(_data)); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 4869f079db4a5d..46c8cc9df0a95a 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -551,6 +551,7 @@ namespace SignalHandlers { QByteArray CrashDumpPath; FILE *CrashDumpFile = 0; int CrashDumpFileNo = 0; + char LaunchedDateTimeStr[32] = { 0 }; void _writeChar(char ch) { fwrite(&ch, 1, 1, CrashDumpFile); @@ -569,26 +570,43 @@ namespace SignalHandlers { return stream; } - const dump &operator<<(const dump &stream, int num) { + template + const dump &_writeNumber(const dump &stream, Type number) { if (!CrashDumpFile) return stream; - if (num < 0) { + if (number < 0) { _writeChar('-'); - num = -num; + number = -number; } - int upper = 1, prev = num / 10; + Type upper = 1, prev = number / 10; while (prev >= upper) { upper *= 10; } while (upper > 0) { - int digit = (num / upper); + int digit = (number / upper); _writeChar('0' + digit); - num -= digit * upper; + number -= digit * upper; upper /= 10; } return stream; } + const dump &operator<<(const dump &stream, int num) { + return _writeNumber(stream, num); + } + + const dump &operator<<(const dump &stream, DWORD num) { + return _writeNumber(stream, num); + } + + const dump &operator<<(const dump &stream, DWORD64 num) { + return _writeNumber(stream, num); + } + + Qt::HANDLE LoggingCrashThreadId = 0; + bool LoggingCrashHeaderWritten = false; + QMutex LoggingCrashMutex; + void Handler(int signum) { const char* name = 0; switch (signum) { @@ -602,21 +620,48 @@ namespace SignalHandlers { #endif } + Qt::HANDLE thread = QThread::currentThreadId(); + if (thread == LoggingCrashThreadId) return; + + QMutexLocker lock(&LoggingCrashMutex); + LoggingCrashThreadId = thread; + + if (!LoggingCrashHeaderWritten) { + LoggingCrashHeaderWritten = true; + if (cBetaVersion()) { + dump() << "Version: " << cBetaVersion() << " beta\n"; + } else { + dump() << "Version: " << AppVersion; + if (cDevVersion()) { + dump() << " dev\n"; + } else { + dump() << "\n"; + } + } + dump() << "Launched: " << LaunchedDateTimeStr << "\n"; + dump() << "Platform: "; + switch (cPlatform()) { + case dbipWindows: dump() << "win"; break; + case dbipMac: dump() << "mac"; break; + case dbipMacOld: dump() << "macold"; break; + case dbipLinux64: dump() << "linux64"; break; + case dbipLinux32: dump() << "linux32"; break; + } + dump() << "\n"; + psWriteDump(); + dump() << "\n"; + } if (name) { - dump() << "Caught signal " << signum << " (" << name << ")\n"; + dump() << "Caught signal " << signum << " (" << name << ") in thread " << uint64(thread) << "\n"; } else { - dump() << "Caught signal " << signum << "\n"; - } - dump() << "Platform: "; - switch (cPlatform()) { - case dbipWindows: dump() << "win"; break; - case dbipMac: dump() << "mac"; break; - case dbipMacOld: dump() << "macold"; break; - case dbipLinux64: dump() << "linux64"; break; - case dbipLinux32: dump() << "linux32"; break; + dump() << "Caught signal " << signum << " in thread " << uint64(thread) << "\n"; } - dump() << "\n\nBacktrace:\n"; + + dump() << "\nBacktrace:\n"; psWriteStackTrace(CrashDumpFileNo); + dump() << "\n"; + + LoggingCrashThreadId = 0; } Status start() { @@ -644,6 +689,10 @@ namespace SignalHandlers { if (CrashDumpFile) { CrashDumpFileNo = fileno(CrashDumpFile); + QByteArray launchedDateTime = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8(); + t_assert(launchedDateTime.size() < sizeof(LaunchedDateTimeStr)); + memcpy(LaunchedDateTimeStr, launchedDateTime.constData(), launchedDateTime.size()); + signal(SIGABRT, SignalHandlers::Handler); signal(SIGSEGV, SignalHandlers::Handler); signal(SIGILL, SignalHandlers::Handler); diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index d706ba289c1854..80282ef4c31eea 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -93,6 +93,8 @@ namespace SignalHandlers { }; const dump &operator<<(const dump &stream, const char *str); const dump &operator<<(const dump &stream, int num); + const dump &operator<<(const dump &stream, DWORD num); + const dump &operator<<(const dump &stream, DWORD64 num); enum Status { CantOpen, diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index e98700fdac35a2..b70d2faff70420 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -37,6 +37,8 @@ int main(int argc, char *argv[]) { return psFixPrevious(); } else if (cLaunchMode() == LaunchModeCleanup) { return psCleanup(); + } else if (cLaunchMode() == LaunchModeShowCrash) { + return psShowCrash(QFileInfo(cStartUrl()).absoluteFilePath()); } Logs::Initializer _logs; diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 3aa0aaef02cb68..61c6043c74d535 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2368,52 +2368,76 @@ typedef BOOL (FAR STDAPICALLTYPE *t_miniDumpWriteDump)( ); t_miniDumpWriteDump miniDumpWriteDump = 0; -//// SymCleanup() -//typedef BOOL(__stdcall *tSC)(IN HANDLE hProcess); -//tSC pSC; -// -// SymFunctionTableAccess64() -typedef PVOID (FAR STDAPICALLTYPE *t_SymFunctionTableAccess64)(HANDLE hProcess, DWORD64 AddrBase); +// Stack walk code is inspired by http://www.codeproject.com/Articles/11132/Walking-the-callstack + +static const int StackEntryMaxNameLength = MAX_SYM_NAME + 1; + +typedef BOOL(FAR STDAPICALLTYPE *t_SymCleanup)( + _In_ HANDLE hProcess +); +t_SymCleanup symCleanup = 0; + +typedef PVOID (FAR STDAPICALLTYPE *t_SymFunctionTableAccess64)( + _In_ HANDLE hProcess, + _In_ DWORD64 AddrBase +); t_SymFunctionTableAccess64 symFunctionTableAccess64 = 0; -//// SymGetLineFromAddr64() -//typedef BOOL(__stdcall *tSGLFA)(IN HANDLE hProcess, IN DWORD64 dwAddr, -// OUT PDWORD pdwDisplacement, OUT PIMAGEHLP_LINE64 Line); -//tSGLFA pSGLFA; -// -// SymGetModuleBase64() -typedef DWORD64 (FAR STDAPICALLTYPE *t_SymGetModuleBase64)(IN HANDLE hProcess, IN DWORD64 dwAddr); +typedef BOOL (FAR STDAPICALLTYPE *t_SymGetLineFromAddr64)( + _In_ HANDLE hProcess, + _In_ DWORD64 dwAddr, + _Out_ PDWORD pdwDisplacement, + _Out_ PIMAGEHLP_LINEW64 Line +); +t_SymGetLineFromAddr64 symGetLineFromAddr64 = 0; + +typedef DWORD64 (FAR STDAPICALLTYPE *t_SymGetModuleBase64)( + _In_ HANDLE hProcess, + _In_ DWORD64 qwAddr +); t_SymGetModuleBase64 symGetModuleBase64 = 0; -//// SymGetModuleInfo64() -//typedef BOOL(__stdcall *tSGMI)(IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V2 *ModuleInfo); -//tSGMI pSGMI; - -// // SymGetModuleInfo64() -// typedef BOOL (__stdcall *tSGMI_V3)( IN HANDLE hProcess, IN DWORD64 dwAddr, OUT IMAGEHLP_MODULE64_V3 *ModuleInfo ); -// tSGMI_V3 pSGMI_V3; - -//// SymGetOptions() -//typedef DWORD(__stdcall *tSGO)(VOID); -//tSGO pSGO; -// -//// SymGetSymFromAddr64() -//typedef BOOL(__stdcall *tSGSFA)(IN HANDLE hProcess, IN DWORD64 dwAddr, -// OUT PDWORD64 pdwDisplacement, OUT PIMAGEHLP_SYMBOL64 Symbol); -//tSGSFA pSGSFA; -// -//// SymInitialize() -//typedef BOOL(__stdcall *tSI)(IN HANDLE hProcess, IN PSTR UserSearchPath, IN BOOL fInvadeProcess); -//tSI pSI; -// -//// SymLoadModule64() -//typedef DWORD64(__stdcall *tSLM)(IN HANDLE hProcess, IN HANDLE hFile, -// IN PSTR ImageName, IN PSTR ModuleName, IN DWORD64 BaseOfDll, IN DWORD SizeOfDll); -//tSLM pSLM; -// -//// SymSetOptions() -//typedef DWORD(__stdcall *tSSO)(IN DWORD SymOptions); -//tSSO pSSO; +typedef BOOL (FAR STDAPICALLTYPE *t_SymGetModuleInfo64)( + _In_ HANDLE hProcess, + _In_ DWORD64 qwAddr, + _Out_ PIMAGEHLP_MODULEW64 ModuleInfo +); +t_SymGetModuleInfo64 symGetModuleInfo64 = 0; + +typedef DWORD (FAR STDAPICALLTYPE *t_SymGetOptions)( + VOID +); +t_SymGetOptions symGetOptions = 0; + +typedef DWORD (FAR STDAPICALLTYPE *t_SymSetOptions)( + _In_ DWORD SymOptions +); +t_SymSetOptions symSetOptions = 0; + +typedef BOOL (FAR STDAPICALLTYPE *t_SymGetSymFromAddr64)( + IN HANDLE hProcess, + IN DWORD64 dwAddr, + OUT PDWORD64 pdwDisplacement, + OUT PIMAGEHLP_SYMBOL64 Symbol +); +t_SymGetSymFromAddr64 symGetSymFromAddr64 = 0; + +typedef BOOL (FAR STDAPICALLTYPE *t_SymInitialize)( + _In_ HANDLE hProcess, + _In_opt_ PCWSTR UserSearchPath, + _In_ BOOL fInvadeProcess +); +t_SymInitialize symInitialize = 0; + +typedef DWORD64 (FAR STDAPICALLTYPE *t_SymLoadModule64)( + _In_ HANDLE hProcess, + _In_opt_ HANDLE hFile, + _In_opt_ PCSTR ImageName, + _In_opt_ PCSTR ModuleName, + _In_ DWORD64 BaseOfDll, + _In_ DWORD SizeOfDll +); +t_SymLoadModule64 symLoadModule64; typedef BOOL (FAR STDAPICALLTYPE *t_StackWalk64)( _In_ DWORD MachineType, @@ -2428,13 +2452,20 @@ typedef BOOL (FAR STDAPICALLTYPE *t_StackWalk64)( ); t_StackWalk64 stackWalk64 = 0; -//// UnDecorateSymbolName() -//typedef DWORD(__stdcall WINAPI *tUDSN)(PCSTR DecoratedName, PSTR UnDecoratedName, -// DWORD UndecoratedLength, DWORD Flags); -//tUDSN pUDSN; -// -//typedef BOOL(__stdcall WINAPI *tSGSP)(HANDLE hProcess, PSTR SearchPath, DWORD SearchPathLength); -//tSGSP pSGSP; +typedef DWORD (FAR STDAPICALLTYPE *t_UnDecorateSymbolName)( + PCSTR DecoratedName, + PSTR UnDecoratedName, + DWORD UndecoratedLength, + DWORD Flags +); +t_UnDecorateSymbolName unDecorateSymbolName = 0; + +typedef BOOL(FAR STDAPICALLTYPE *t_SymGetSearchPath)( + _In_ HANDLE hProcess, + _Out_writes_(SearchPathLength) PWSTR SearchPath, + _In_ DWORD SearchPathLength +); +t_SymGetSearchPath symGetSearchPath = 0; BOOL __stdcall ReadProcessMemoryRoutine64( _In_ HANDLE hProcess, @@ -2442,11 +2473,11 @@ BOOL __stdcall ReadProcessMemoryRoutine64( _Out_writes_bytes_(nSize) PVOID lpBuffer, _In_ DWORD nSize, _Out_ LPDWORD lpNumberOfBytesRead - ) { +) { SIZE_T st; BOOL bRet = ReadProcessMemory(hProcess, (LPVOID)qwBaseAddress, lpBuffer, nSize, &st); *lpNumberOfBytesRead = (DWORD)st; - //printf("ReadMemory: hProcess: %p, baseAddr: %p, buffer: %p, size: %d, read: %d, result: %d\n", hProcess, (LPVOID) qwBaseAddress, lpBuffer, nSize, (DWORD) st, (DWORD) bRet); + return bRet; } @@ -2492,8 +2523,38 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) { return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0); } -bool LoadDbgHelp() { - if (miniDumpWriteDump) return true; +// **************************************** ToolHelp32 ************************ +#define MAX_MODULE_NAME32 255 +#define TH32CS_SNAPMODULE 0x00000008 +#pragma pack( push, 8 ) +typedef struct tagMODULEENTRY32 +{ + DWORD dwSize; + DWORD th32ModuleID; // This module + DWORD th32ProcessID; // owning process + DWORD GlblcntUsage; // Global usage count on the module + DWORD ProccntUsage; // Module usage count in th32ProcessID's context + BYTE * modBaseAddr; // Base address of module in th32ProcessID's context + DWORD modBaseSize; // Size in bytes of module starting at modBaseAddr + HMODULE hModule; // The hModule of this module in th32ProcessID's context + char szModule[MAX_MODULE_NAME32 + 1]; + char szExePath[MAX_PATH]; +} MODULEENTRY32; +typedef MODULEENTRY32 *PMODULEENTRY32; +typedef MODULEENTRY32 *LPMODULEENTRY32; +#pragma pack( pop ) + +typedef HANDLE (FAR STDAPICALLTYPE *t_CreateToolhelp32Snapshot)(DWORD dwFlags, DWORD th32ProcessID); +t_CreateToolhelp32Snapshot createToolhelp32Snapshot = 0; + +typedef BOOL (FAR STDAPICALLTYPE *t_Module32First)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); +t_Module32First module32First = 0; + +typedef BOOL (FAR STDAPICALLTYPE *t_Module32Next)(HANDLE hSnapshot, LPMODULEENTRY32 lpme); +t_Module32Next module32Next = 0; + +bool LoadDbgHelp(bool extended = false) { + if (miniDumpWriteDump && (!extended || symInitialize)) return true; HMODULE hDll = 0; @@ -2526,52 +2587,158 @@ bool LoadDbgHelp() { miniDumpWriteDump = (t_miniDumpWriteDump)GetProcAddress(hDll, "MiniDumpWriteDump"); - //pSI = (tSI)GetProcAddress(m_hDbhHelp, "SymInitialize"); - //pSC = (tSC)GetProcAddress(m_hDbhHelp, "SymCleanup"); - stackWalk64 = (t_StackWalk64)GetProcAddress(hDll, "StackWalk64"); - //pSGO = (tSGO)GetProcAddress(m_hDbhHelp, "SymGetOptions"); - //pSSO = (tSSO)GetProcAddress(m_hDbhHelp, "SymSetOptions"); - symFunctionTableAccess64 = (t_SymFunctionTableAccess64)GetProcAddress(hDll, "SymFunctionTableAccess64"); - //pSGLFA = (tSGLFA)GetProcAddress(m_hDbhHelp, "SymGetLineFromAddr64"); symGetModuleBase64 = (t_SymGetModuleBase64)GetProcAddress(hDll, "SymGetModuleBase64"); - //pSGMI = (tSGMI)GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64"); - ////pSGMI_V3 = (tSGMI_V3) GetProcAddress(m_hDbhHelp, "SymGetModuleInfo64" ); - //pSGSFA = (tSGSFA)GetProcAddress(m_hDbhHelp, "SymGetSymFromAddr64"); - //pUDSN = (tUDSN)GetProcAddress(m_hDbhHelp, "UnDecorateSymbolName"); - //pSLM = (tSLM)GetProcAddress(m_hDbhHelp, "SymLoadModule64"); - //pSGSP = (tSGSP)GetProcAddress(m_hDbhHelp, "SymGetSearchPath"); if (!miniDumpWriteDump || - !stackWalk64) { + !stackWalk64 || + !symFunctionTableAccess64 || + !symGetModuleBase64) { miniDumpWriteDump = 0; return false; } - //// SymInitialize - //if (szSymPath != NULL) - // m_szSymPath = _strdup(szSymPath); - //if (this->pSI(m_hProcess, m_szSymPath, FALSE) == FALSE) - // this->m_parent->OnDbgHelpErr("SymInitialize", GetLastError(), 0); - - //DWORD symOptions = this->pSGO(); // SymGetOptions - //symOptions |= SYMOPT_LOAD_LINES; - //symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS; - ////symOptions |= SYMOPT_NO_PROMPTS; - //// SymSetOptions - //symOptions = this->pSSO(symOptions); - - //char buf[StackWalker::STACKWALK_MAX_NAMELEN] = { 0 }; - //if (this->pSGSP != NULL) - //{ - // if (this->pSGSP(m_hProcess, buf, StackWalker::STACKWALK_MAX_NAMELEN) == FALSE) - // this->m_parent->OnDbgHelpErr("SymGetSearchPath", GetLastError(), 0); - //} - //char szUserName[1024] = { 0 }; - //DWORD dwSize = 1024; - //GetUserNameA(szUserName, &dwSize); - //this->m_parent->OnSymInit(buf, symOptions, szUserName); + if (extended) { + HANDLE hProcess = GetCurrentProcess(); + DWORD dwProcessId = GetCurrentProcessId(); + + symGetLineFromAddr64 = (t_SymGetLineFromAddr64)GetProcAddress(hDll, "SymGetLineFromAddrW64"); + symGetModuleInfo64 = (t_SymGetModuleInfo64)GetProcAddress(hDll, "SymGetModuleInfoW64"); + symGetSymFromAddr64 = (t_SymGetSymFromAddr64)GetProcAddress(hDll, "SymGetSymFromAddr64"); + unDecorateSymbolName = (t_UnDecorateSymbolName)GetProcAddress(hDll, "UnDecorateSymbolName"); + symInitialize = (t_SymInitialize)GetProcAddress(hDll, "SymInitializeW"); + symCleanup = (t_SymCleanup)GetProcAddress(hDll, "SymCleanup"); + symGetSearchPath = (t_SymGetSearchPath)GetProcAddress(hDll, "SymGetSearchPathW"); + symGetOptions = (t_SymGetOptions)GetProcAddress(hDll, "SymGetOptions"); + symSetOptions = (t_SymSetOptions)GetProcAddress(hDll, "SymSetOptions"); + symLoadModule64 = (t_SymLoadModule64)GetProcAddress(hDll, "SymLoadModule64"); + if (!symGetModuleInfo64 || + !symGetLineFromAddr64 || + !symGetSymFromAddr64 || + !unDecorateSymbolName || + !symInitialize || + !symCleanup || + !symGetOptions || + !symSetOptions || + !symLoadModule64) { + symInitialize = 0; + return false; + } + + const size_t nSymPathLen = 10 * MAX_PATH; + WCHAR szSymPath[nSymPathLen] = { 0 }; + + wcscat_s(szSymPath, nSymPathLen, L".;..;"); + + WCHAR szTemp[MAX_PATH + 1] = { 0 }; + if (GetCurrentDirectory(MAX_PATH, szTemp) > 0) { + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + } + + if (GetModuleFileName(NULL, szTemp, MAX_PATH) > 0) { + for (WCHAR *p = (szTemp + wcslen(szTemp) - 1); p >= szTemp; --p) { + if ((*p == '\\') || (*p == '/') || (*p == ':')) { + *p = 0; + break; + } + } + if (wcslen(szTemp) > 0) { + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + } + } + if (GetEnvironmentVariable(L"_NT_SYMBOL_PATH", szTemp, MAX_PATH) > 0) { + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + } + if (GetEnvironmentVariable(L"_NT_ALTERNATE_SYMBOL_PATH", szTemp, MAX_PATH) > 0) { + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + } + if (GetEnvironmentVariable(L"SYSTEMROOT", szTemp, MAX_PATH) > 0) { + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + + // also add the "system32"-directory: + wcscat_s(szTemp, MAX_PATH, L"\\system32"); + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L";"); + } + + if (GetEnvironmentVariable(L"SYSTEMDRIVE", szTemp, MAX_PATH) > 0) { + wcscat_s(szSymPath, nSymPathLen, L"SRV*"); + wcscat_s(szSymPath, nSymPathLen, szTemp); + wcscat_s(szSymPath, nSymPathLen, L"\\websymbols*http://msdl.microsoft.com/download/symbols;"); + } else { + wcscat_s(szSymPath, nSymPathLen, L"SRV*c:\\websymbols*http://msdl.microsoft.com/download/symbols;"); + } + + if (symInitialize(hProcess, szSymPath, FALSE) == FALSE) { + symInitialize = 0; + return false; + } + + DWORD symOptions = symGetOptions(); + symOptions |= SYMOPT_LOAD_LINES; + symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS; + symOptions = symSetOptions(symOptions); + + //WCHAR buf[StackEntryMaxNameLength] = { 0 }; + //if (symGetSearchPath) { + // if (symGetSearchPath(hProcess, buf, StackEntryMaxNameLength) == FALSE) { + // return false; + // } + //} + + //WCHAR szUserName[1024] = { 0 }; + //DWORD dwSize = 1024; + //GetUserName(szUserName, &dwSize); + + const WCHAR *dllname[] = { L"kernel32.dll", L"tlhelp32.dll" }; + HINSTANCE hToolhelp = NULL; + + HANDLE hSnap; + MODULEENTRY32 me; + me.dwSize = sizeof(me); + BOOL keepGoing; + size_t i; + + for (i = 0; i < (sizeof(dllname) / sizeof(dllname[0])); i++) { + hToolhelp = LoadLibrary(dllname[i]); + if (!hToolhelp) continue; + + createToolhelp32Snapshot = (t_CreateToolhelp32Snapshot)GetProcAddress(hToolhelp, "CreateToolhelp32Snapshot"); + module32First = (t_Module32First)GetProcAddress(hToolhelp, "Module32First"); + module32Next = (t_Module32Next)GetProcAddress(hToolhelp, "Module32Next"); + if (createToolhelp32Snapshot && module32First && module32Next) { + break; // found the functions! + } + FreeLibrary(hToolhelp); + hToolhelp = NULL; + } + + if (hToolhelp == NULL) { + return false; + } + + hSnap = createToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId); + if (hSnap == (HANDLE)-1) + return FALSE; + + keepGoing = !!module32First(hSnap, &me); + int cnt = 0; + while (keepGoing) { + symLoadModule64(hProcess, 0, me.szExePath, me.szModule, (DWORD64)me.modBaseAddr, me.modBaseSize); + ++cnt; + keepGoing = !!module32Next(hSnap, &me); + } + CloseHandle(hSnap); + FreeLibrary(hToolhelp); + + return (cnt > 0); + } return true; } @@ -2627,8 +2794,6 @@ LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_op return 0; } -// stack walking code taken from StackWalker -static const int StackEntryMaxNameLength = 1024; struct StackEntry { DWORD64 offset; // if 0, we have no valid entry CHAR name[StackEntryMaxNameLength]; @@ -2637,12 +2802,12 @@ struct StackEntry { DWORD64 offsetFromSmybol; DWORD offsetFromLine; DWORD lineNumber; - CHAR lineFileName[StackEntryMaxNameLength]; + WCHAR lineFileName[StackEntryMaxNameLength]; DWORD symType; LPCSTR symTypeString; - CHAR moduleName[StackEntryMaxNameLength]; + WCHAR moduleName[StackEntryMaxNameLength]; DWORD64 baseOfImage; - CHAR loadedImageName[StackEntryMaxNameLength]; + WCHAR loadedImageName[StackEntryMaxNameLength]; }; enum StackEntryType { @@ -2651,40 +2816,204 @@ enum StackEntryType { StackEntryLast, }; -struct IMAGEHLP_MODULE64_V2 { - DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64) - DWORD64 BaseOfImage; // base load address of module - DWORD ImageSize; // virtual size of the loaded module - DWORD TimeDateStamp; // date/time stamp from pe header - DWORD CheckSum; // checksum from the pe header - DWORD NumSyms; // number of symbols in the symbol table - SYM_TYPE SymType; // type of symbols loaded - CHAR ModuleName[32]; // module name - CHAR ImageName[256]; // image name - CHAR LoadedImageName[256]; // symbol file name -}; +char GetModuleInfoData[2 * sizeof(IMAGEHLP_MODULEW64)]; +BOOL _getModuleInfo(HANDLE hProcess, DWORD64 baseAddr, IMAGEHLP_MODULEW64 *pModuleInfo) { + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULEW64); + + memcpy(GetModuleInfoData, pModuleInfo, sizeof(IMAGEHLP_MODULEW64)); + if (symGetModuleInfo64(hProcess, baseAddr, (IMAGEHLP_MODULEW64*)GetModuleInfoData) != FALSE) { + // only copy as much memory as is reserved... + memcpy(pModuleInfo, GetModuleInfoData, sizeof(IMAGEHLP_MODULEW64)); + pModuleInfo->SizeOfStruct = sizeof(IMAGEHLP_MODULEW64); + return TRUE; + } + return FALSE; +} + +void psWriteDump() { + OSVERSIONINFOEXA version; + ZeroMemory(&version, sizeof(OSVERSIONINFOEXA)); + version.dwOSVersionInfoSize = sizeof(version); + if (GetVersionExA((OSVERSIONINFOA*)&version) != FALSE) { + SignalHandlers::dump() << "OS-Version: " << version.dwMajorVersion << "." << version.dwMinorVersion << "." << version.dwBuildNumber << "\n"; + } +} char ImageHlpSymbol64[sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength]; +QString _showCrashDump(const QByteArray &crashdump) { + HANDLE hProcess = GetCurrentProcess(); + + QString initial = QString::fromUtf8(crashdump), result; + QStringList lines = initial.split('\n'); + result.reserve(initial.size()); + int32 i = 0, l = lines.size(); + QString versionstr; + uint64 version = 0, betaversion = 0; + for (; i < l; ++i) { + result.append(lines.at(i)).append('\n'); + QString line = lines.at(i).trimmed(); + if (line.startsWith(qstr("Version: "))) { + versionstr = line.mid(qstr("Version: ").size()).trimmed(); + version = versionstr.toULongLong(); + if (versionstr.endsWith(qstr("beta"))) { + if (version % 1000) { + betaversion = version; + } else { + version /= 1000; + } + } + break; + } + } -void psWriteStackTrace(int n) { - if (!LoadDbgHelp()) return; + // maybe need to launch another executable + QString tolaunch; + if ((betaversion && betaversion != cBetaVersion()) || (!betaversion && version && version != AppVersion)) { + QString path = cExeDir(); + QRegularExpressionMatch m = QRegularExpression("deploy/\\d+\\.\\d+/\\d+\\.\\d+\\.\\d+(/|\\.dev/|_\\d+/)(Telegram/)?$").match(path); + if (m.hasMatch()) { + QString base = path.mid(0, m.capturedStart()) + qstr("deploy/"); + int32 major = version / 1000000, minor = (version % 1000000) / 1000, micro = (version % 1000); + base += qsl("%1.%2/%3.%4.%5").arg(major).arg(minor).arg(major).arg(minor).arg(micro); + if (betaversion) { + base += qsl("_%1").arg(betaversion); + } else if (QDir(base + qstr(".dev")).exists()) { + base += qstr(".dev"); + } + if (QFile(base + qstr("/Telegram/Telegram.exe")).exists()) { + base += qstr("/Telegram"); + } + tolaunch = base + qstr("Telegram.exe"); + } + } + if (!tolaunch.isEmpty()) { + if (QFile(tolaunch).exists()) { + // run it + return QString(); + } else { + result.append(qsl("ERROR: executable '%1' for this crashdump was not found!").arg(tolaunch)); + } + } - HANDLE hThread = GetCurrentThread(), hProcess = GetCurrentProcess(); - const CONTEXT *context = NULL; - LPVOID pUserData = NULL; + while (i < l) { + for (; i < l; ++i) { + result.append(lines.at(i)).append('\n'); + QString line = lines.at(i).trimmed(); + if (line == qstr("Backtrace:")) { + ++i; + break; + } + } - CONTEXT c; - StackEntry csEntry; - IMAGEHLP_SYMBOL64 *pSym = NULL; - IMAGEHLP_MODULE64_V2 Module; - IMAGEHLP_LINE64 Line; - int frameNum; + IMAGEHLP_SYMBOL64 *pSym = NULL; + IMAGEHLP_MODULEW64 Module; + IMAGEHLP_LINEW64 Line; + + pSym = (IMAGEHLP_SYMBOL64*)ImageHlpSymbol64; + memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength); + pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); + pSym->MaxNameLength = StackEntryMaxNameLength; + + memset(&Line, 0, sizeof(Line)); + Line.SizeOfStruct = sizeof(Line); + + memset(&Module, 0, sizeof(Module)); + Module.SizeOfStruct = sizeof(Module); + + StackEntry csEntry; + for (int32 start = i; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + + result.append(qsl("%1. ").arg(i + 1 - start)); + if (!QRegularExpression(qsl("^\\d+$")).match(line).hasMatch()) { + if (!lines.at(i).startsWith(qstr("ERROR: "))) { + result.append(qstr("BAD LINE: ")); + } + result.append(line).append('\n'); + continue; + } + + DWORD64 address = line.toULongLong(); + + csEntry.offset = address; + csEntry.name[0] = 0; + csEntry.undName[0] = 0; + csEntry.undFullName[0] = 0; + csEntry.offsetFromSmybol = 0; + csEntry.offsetFromLine = 0; + csEntry.lineFileName[0] = 0; + csEntry.lineNumber = 0; + csEntry.loadedImageName[0] = 0; + csEntry.moduleName[0] = 0; + + if (symGetSymFromAddr64(hProcess, address, &(csEntry.offsetFromSmybol), pSym) != FALSE) { + // TODO: Mache dies sicher...! + strcpy_s(csEntry.name, pSym->Name); + + unDecorateSymbolName(pSym->Name, csEntry.undName, StackEntryMaxNameLength, UNDNAME_NAME_ONLY); + unDecorateSymbolName(pSym->Name, csEntry.undFullName, StackEntryMaxNameLength, UNDNAME_COMPLETE); + + if (symGetLineFromAddr64) { + if (symGetLineFromAddr64(hProcess, address, &(csEntry.offsetFromLine), &Line) != FALSE) { + csEntry.lineNumber = Line.LineNumber; + + // TODO: Mache dies sicher...! + wcscpy_s(csEntry.lineFileName, Line.FileName); + } + } + } else { + result.append("ERROR: could not get Sym from Addr! for ").append(QString::number(address)).append('\n'); + continue; + } + if (_getModuleInfo(hProcess, address, &Module) != FALSE) { + // TODO: Mache dies sicher...! + wcscpy_s(csEntry.moduleName, Module.ModuleName); + } + if (csEntry.name[0] == 0) { + strcpy_s(csEntry.name, "(function-name not available)"); + } + if (csEntry.undName[0] != 0) { + strcpy_s(csEntry.name, csEntry.undName); + } + if (csEntry.undFullName[0] != 0) { + strcpy_s(csEntry.name, csEntry.undFullName); + } + if (csEntry.lineFileName[0] == 0) { + if (csEntry.moduleName[0] == 0) { + wcscpy_s(csEntry.moduleName, L"module-name not available"); + } + result.append(csEntry.name).append(qsl(" (%1) 0x%3").arg(QString::fromWCharArray(csEntry.moduleName)).arg(address, 0, 16)).append('\n'); + } else { + QString file = QString::fromWCharArray(csEntry.lineFileName).toLower(); + int32 index = file.indexOf(qstr("tbuild\\tdesktop\\telegram\\")); + if (index >= 0) { + file = file.mid(index + qstr("tbuild\\tdesktop\\telegram\\").size()); + if (file.startsWith(qstr("sourcefiles\\"))) { + file = file.mid(qstr("sourcefiles\\").size()); + } + } + result.append(csEntry.name).append(qsl(" (%1 - %2) 0x%3").arg(file).arg(csEntry.lineNumber).arg(address, 0, 16)).append('\n'); + } + } + } + return result; +} + +void psWriteStackTrace(int file) { if (!LoadDbgHelp()) { SignalHandlers::dump() << "ERROR: Could not load dbghelp.dll!\n"; return; } + HANDLE hThread = GetCurrentThread(), hProcess = GetCurrentProcess(); + const CONTEXT *context = NULL; + LPVOID pUserData = NULL; + + CONTEXT c; + int frameNum; + memset(&c, 0, sizeof(CONTEXT)); c.ContextFlags = CONTEXT_FULL; RtlCaptureContext(&c); @@ -2724,18 +3053,7 @@ void psWriteStackTrace(int n) { #error "Platform not supported!" #endif - pSym = (IMAGEHLP_SYMBOL64 *)ImageHlpSymbol64; - memset(pSym, 0, sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength); - pSym->SizeOfStruct = sizeof(IMAGEHLP_SYMBOL64); - pSym->MaxNameLength = StackEntryMaxNameLength; - - memset(&Line, 0, sizeof(Line)); - Line.SizeOfStruct = sizeof(Line); - - memset(&Module, 0, sizeof(Module)); - Module.SizeOfStruct = sizeof(Module); - - for (frameNum = 0; ; ++frameNum) { + for (frameNum = 0; frameNum < 1000; ++frameNum) { // get next stack frame (StackWalk64(), SymFunctionTableAccess64(), SymGetModuleBase64()) // if this returns ERROR_INVALID_ADDRESS (487) or ERROR_NOACCESS (998), you can // assume that either you are done, or that the stack is so hosed that the next @@ -2746,16 +3064,6 @@ void psWriteStackTrace(int n) { return; } - csEntry.offset = s.AddrPC.Offset; - csEntry.name[0] = 0; - csEntry.undName[0] = 0; - csEntry.undFullName[0] = 0; - csEntry.offsetFromSmybol = 0; - csEntry.offsetFromLine = 0; - csEntry.lineFileName[0] = 0; - csEntry.lineNumber = 0; - csEntry.loadedImageName[0] = 0; - csEntry.moduleName[0] = 0; if (s.AddrPC.Offset == s.AddrReturn.Offset) { SignalHandlers::dump() << s.AddrPC.Offset << "\n"; SignalHandlers::dump() << "ERROR: StackWalk64() endless callstack!"; @@ -2771,6 +3079,41 @@ void psWriteStackTrace(int n) { } } +int psShowCrash(const QString &crashdump) { + QString text; + + QFile dump(crashdump); + if (dump.open(QIODevice::ReadOnly)) { + text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); + if (!LoadDbgHelp(true)) { + text += qsl("ERROR: could not init dbghelp.dll!"); + } else { + text += _showCrashDump(dump.readAll()); + symCleanup(GetCurrentProcess()); + } + } else { + text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); + } + + WCHAR szTemp[MAX_PATH + 1] = { 0 }; + GetModuleFileName(NULL, szTemp, MAX_PATH); + + QByteArray args[] = { QString::fromWCharArray(szTemp).toUtf8() }; + int a_argc = 1; + char *a_argv[1] = { args[0].data() }; + QApplication app(a_argc, a_argv); + + QTextEdit wnd; + wnd.setReadOnly(true); + wnd.setPlainText(text); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + wnd.setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + wnd.show(); + + return app.exec(); +} + class StringReferenceWrapper { public: diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index cbda8dc02d3e40..053945f3b06c9d 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -117,7 +117,9 @@ extern LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter; LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers); LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); -void psWriteStackTrace(int n); +void psWriteDump(); +void psWriteStackTrace(int file); +int psShowCrash(const QString &crashdump); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index d025443e972878..f539a3a0372c9d 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -215,6 +215,9 @@ void settingsParseArgs(int argc, char *argv[]) { gLaunchMode = LaunchModeFixPrevious; } else if (string("-cleanup") == argv[i]) { gLaunchMode = LaunchModeCleanup; + } else if (string("-crash") == argv[i] && i + 1 < argc) { + gLaunchMode = LaunchModeShowCrash; + gStartUrl = fromUtf8Safe(argv[++i]); } else if (string("-noupdate") == argv[i]) { gNoStartUpdate = true; } else if (string("-tosettings") == argv[i]) { diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index ffbb8ea3a4de4c..3272b833644ee9 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -87,6 +87,7 @@ enum LaunchMode { LaunchModeAutoStart, LaunchModeFixPrevious, LaunchModeCleanup, + LaunchModeShowCrash, }; DeclareReadSetting(LaunchMode, LaunchMode); DeclareSetting(QString, WorkingDir); diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 7a1bdd17015831..18ffcc395aeec3 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -293,7 +293,7 @@ namespace ThirdParty { av_register_all(); avcodec_register_all(); - av_lockmgr_register(_ffmpegLockManager); +// av_lockmgr_register(_ffmpegLockManager); _sslInited = true; } diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 004a88fee0745f..7c6ad727e770f3 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1825,3 +1825,62 @@ Window::~Window() { delete main; delete settings; } + +NotStartedWindow::NotStartedWindow() : TWidget(0) +, _label(this) +, _log(this) { + _label.setText(qsl("Could not start Telegram Desktop! Log:")); + _label.show(); + + _log.setReadOnly(true); + _log.setPlainText(Logs::full()); + _log.show(); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + show(); +} + +void NotStartedWindow::closeEvent(QCloseEvent *e) { + deleteLater(); +} + +void NotStartedWindow::resizeEvent(QResizeEvent *e) { + int padding = _label.sizeHint().height() / 2; + _label.setGeometry(padding, padding, width() - 2 * padding, _label.sizeHint().height()); + _log.setGeometry(padding, padding * 2 + _label.sizeHint().height(), width() - 2 * padding, height() - 3 * padding - _label.sizeHint().height()); +} + +LastCrashedWindow::LastCrashedWindow() : TWidget(0) +, _label(this) +, _log(this) +, _send(this) { + _label.setText(qsl("Could not start Telegram Desktop! Log:")); + _label.show(); + + _log.setReadOnly(true); + _log.setPlainText(Logs::full()); + _log.show(); + + _send.setText(qsl("Send Crash Report")); + _send.show(); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + show(); +} + +void LastCrashedWindow::closeEvent(QCloseEvent *e) { + deleteLater(); + if (SignalHandlers::restart() == SignalHandlers::CantOpen) { + new NotStartedWindow(); + } else { + new AppClass(); + } +} + +void LastCrashedWindow::resizeEvent(QResizeEvent *e) { + int padding = _label.sizeHint().height() / 2; + _label.setGeometry(padding, padding, width() - 2 * padding, _label.sizeHint().height()); + _log.setGeometry(padding, padding * 2 + _label.sizeHint().height(), width() - 2 * padding, height() - 3 * padding - _label.sizeHint().height()); +} diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index 9d514387b0ddb9..535ec3f4ed3a64 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -169,7 +169,7 @@ class Window : public PsMainWindow { QRect clientRect() const; QRect photoRect() const; - + IntroWidget *introWidget(); MainWidget *mainWidget(); SettingsWidget *settingsWidget(); @@ -245,12 +245,12 @@ public slots: void updateIsActive(int timeout = 0); void stateChanged(Qt::WindowState state); - + void checkHistoryActivation(); void updateCounter(); void checkAutoLock(); - + void showSettings(); void hideSettings(bool fast = false); void layerHidden(); @@ -353,4 +353,39 @@ public slots: MediaView *_mediaView; }; +class NotStartedWindow : public TWidget { +public: + + NotStartedWindow(); + +protected: + + void closeEvent(QCloseEvent *e); + void resizeEvent(QResizeEvent *e); + +private: + + QLabel _label; + QTextEdit _log; + +}; + +class LastCrashedWindow : public TWidget { +public: + + LastCrashedWindow(); + +protected: + + void closeEvent(QCloseEvent *e); + void resizeEvent(QResizeEvent *e); + +private: + + QLabel _label; + QTextEdit _log; + QPushButton _send; + +}; + #endif // MAINWINDOW_H From a677f784f5748bb9e9244f0b6b71bbbfc9e283ad Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 25 Jan 2016 18:18:07 +0300 Subject: [PATCH 009/133] up to 64 realtime combinated interfaces --- Telegram/SourceFiles/layout.cpp | 20 ++-- Telegram/SourceFiles/layout.h | 52 +------- Telegram/SourceFiles/overviewwidget.cpp | 28 ++--- Telegram/SourceFiles/structs.cpp | 33 +++++ Telegram/SourceFiles/structs.h | 153 ++++++++++++++++++++++++ 5 files changed, 216 insertions(+), 70 deletions(-) diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index e987cb60e3364b..6ae5e528585f44 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -293,9 +293,9 @@ void LayoutAbstractFileItem::setStatusSize(int32 newSize, int32 fullSize, int32 } } -LayoutOverviewDate::LayoutOverviewDate(const QDate &date, bool month) - : _date(date) - , _text(month ? langMonthFull(date) : langDayOfMonthFull(date)) { +LayoutOverviewDate::LayoutOverviewDate(const QDate &date, bool month) : LayoutItem(OverviewItemInfo::Bit()) +, _date(date) +, _text(month ? langMonthFull(date) : langDayOfMonthFull(date)) { } void LayoutOverviewDate::initDimensions() { @@ -311,7 +311,7 @@ void LayoutOverviewDate::paint(Painter &p, const QRect &clip, uint32 selection, } } -LayoutOverviewPhoto::LayoutOverviewPhoto(PhotoData *photo, HistoryItem *parent) : LayoutMediaItem(parent) +LayoutOverviewPhoto::LayoutOverviewPhoto(PhotoData *photo, HistoryItem *parent) : LayoutMediaItem(0, parent) , _data(photo) , _link(new PhotoLink(photo)) , _goodLoaded(false) { @@ -385,7 +385,7 @@ void LayoutOverviewPhoto::getState(TextLinkPtr &link, HistoryCursorState &cursor } } -LayoutOverviewVideo::LayoutOverviewVideo(VideoData *video, HistoryItem *parent) : LayoutAbstractFileItem(parent) +LayoutOverviewVideo::LayoutOverviewVideo(VideoData *video, HistoryItem *parent) : LayoutAbstractFileItem(0, parent) , _data(video) , _duration(formatDurationText(_data->duration)) , _thumbLoaded(false) { @@ -550,7 +550,7 @@ void LayoutOverviewVideo::updateStatusText() const { } } -LayoutOverviewAudio::LayoutOverviewAudio(AudioData *audio, HistoryItem *parent) : LayoutAbstractFileItem(parent) +LayoutOverviewAudio::LayoutOverviewAudio(AudioData *audio, HistoryItem *parent) : LayoutAbstractFileItem(OverviewItemInfo::Bit(), parent) , _data(audio) , _namel(new AudioOpenLink(_data)) { setLinks(new AudioOpenLink(_data), new AudioOpenLink(_data), new AudioCancelLink(_data)); @@ -738,7 +738,7 @@ bool LayoutOverviewAudio::updateStatusText() const { return showPause; } -LayoutOverviewDocument::LayoutOverviewDocument(DocumentData *document, HistoryItem *parent) : LayoutAbstractFileItem(parent) +LayoutOverviewDocument::LayoutOverviewDocument(DocumentData *document, HistoryItem *parent) : LayoutAbstractFileItem(OverviewItemInfo::Bit(), parent) , _data(document) , _msgl(new MessageLink(parent)) , _namel(new DocumentOpenLink(_data)) @@ -1061,7 +1061,7 @@ namespace { } } -LayoutOverviewLink::LayoutOverviewLink(HistoryMedia *media, HistoryItem *parent) : LayoutMediaItem(parent) +LayoutOverviewLink::LayoutOverviewLink(HistoryMedia *media, HistoryItem *parent) : LayoutMediaItem(OverviewItemInfo::Bit(), parent) , _titlew(0) , _page(0) , _pixw(0) @@ -1319,8 +1319,8 @@ LayoutOverviewLink::Link::Link(const QString &url, const QString &text) , lnk(linkFromUrl(url)) { } -LayoutInlineItem::LayoutInlineItem(InlineResult *result, DocumentData *doc, PhotoData *photo) -: _result(result) +LayoutInlineItem::LayoutInlineItem(InlineResult *result, DocumentData *doc, PhotoData *photo) : LayoutItem(0) +, _result(result) , _doc(doc) , _photo(photo) , _position(0) { diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index 0b346456c62421..c7303adc950b77 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -101,11 +101,9 @@ class PaintContext { }; class LayoutMediaItem; -class OverviewItemInfo; - -class LayoutItem { +class LayoutItem : public Interfaces { public: - LayoutItem() : _maxw(0), _minh(0) { + LayoutItem(uint64 i_mask) : Interfaces(i_mask), _maxw(0), _minh(0) { } int32 maxWidth() const { @@ -163,12 +161,6 @@ class LayoutItem { virtual DocumentData *getDocument() const { return 0; } - virtual OverviewItemInfo *getOverviewItemInfo() { - return 0; - } - virtual const OverviewItemInfo *getOverviewItemInfo() const { - return 0; - } MsgId msgId() const { const HistoryItem *item = getItem(); return item ? item->id : 0; @@ -182,7 +174,7 @@ class LayoutItem { class LayoutMediaItem : public LayoutItem { public: - LayoutMediaItem(HistoryItem *parent) : _parent(parent) { + LayoutMediaItem(uint64 i_mask, HistoryItem *parent) : LayoutItem(i_mask), _parent(parent) { } virtual LayoutMediaItem *toLayoutMediaItem() { @@ -202,7 +194,7 @@ class LayoutMediaItem : public LayoutItem { class LayoutRadialProgressItem : public LayoutMediaItem { public: - LayoutRadialProgressItem(HistoryItem *parent) : LayoutMediaItem(parent) + LayoutRadialProgressItem(uint64 i_mask, HistoryItem *parent) : LayoutMediaItem(i_mask, parent) , _radial(0) , a_iconOver(0, 0) , _a_iconOver(animation(this, &LayoutRadialProgressItem::step_iconOver)) { @@ -248,7 +240,7 @@ class LayoutRadialProgressItem : public LayoutMediaItem { class LayoutAbstractFileItem : public LayoutRadialProgressItem { public: - LayoutAbstractFileItem(HistoryItem *parent) : LayoutRadialProgressItem(parent) { + LayoutAbstractFileItem(uint64 i_mask, HistoryItem *parent) : LayoutRadialProgressItem(i_mask, parent) { } protected: @@ -276,7 +268,7 @@ class OverviewPaintContext : public PaintContext { }; -class OverviewItemInfo { +class OverviewItemInfo : public BasicInterface { public: OverviewItemInfo() : _top(0) { } @@ -299,16 +291,7 @@ class LayoutOverviewDate : public LayoutItem { virtual void initDimensions(); virtual void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const; - virtual OverviewItemInfo *getOverviewItemInfo() { - return &_info; - } - virtual const OverviewItemInfo *getOverviewItemInfo() const { - return &_info; - } - private: - OverviewItemInfo _info; - QDate _date; QString _text; @@ -374,13 +357,6 @@ class LayoutOverviewAudio : public LayoutAbstractFileItem { virtual void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const; virtual void getState(TextLinkPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const; - virtual OverviewItemInfo *getOverviewItemInfo() { - return &_info; - } - virtual const OverviewItemInfo *getOverviewItemInfo() const { - return &_info; - } - protected: virtual float64 dataProgress() const { return _data->progress(); @@ -396,7 +372,6 @@ class LayoutOverviewAudio : public LayoutAbstractFileItem { } private: - OverviewItemInfo _info; AudioData *_data; TextLinkPtr _namel; @@ -419,12 +394,6 @@ class LayoutOverviewDocument : public LayoutAbstractFileItem { virtual DocumentData *getDocument() const { return _data; } - virtual OverviewItemInfo *getOverviewItemInfo() { - return &_info; - } - virtual const OverviewItemInfo *getOverviewItemInfo() const { - return &_info; - } protected: virtual float64 dataProgress() const { @@ -441,7 +410,6 @@ class LayoutOverviewDocument : public LayoutAbstractFileItem { } private: - OverviewItemInfo _info; DocumentData *_data; TextLinkPtr _msgl, _namel; @@ -468,15 +436,7 @@ class LayoutOverviewLink : public LayoutMediaItem { virtual void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const; virtual void getState(TextLinkPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const; - virtual OverviewItemInfo *getOverviewItemInfo() { - return &_info; - } - virtual const OverviewItemInfo *getOverviewItemInfo() const { - return &_info; - } - private: - OverviewItemInfo _info; TextLinkPtr _photol; QString _title, _letter; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 4f8f6dd03c1c9f..4c13164d4ac6fa 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -355,7 +355,7 @@ void OverviewInner::repaintItem(MsgId itemId, int32 itemIndex) { int32 row = (_photosToAdd + shownAtIndex) / _photosInRow, col = (_photosToAdd + shownAtIndex) % _photosInRow; update(int32(col * w), _marginTop + int32(row * vsize), qCeil(w), vsize); } else { - int32 top = _items.at(itemIndex)->getOverviewItemInfo()->top(); + int32 top = _items.at(itemIndex)->Get()->top(); if (_reversed) top = _height - top; update(_rowsLeft, _marginTop + top, _rowWidth, _items.at(itemIndex)->height()); } @@ -729,7 +729,7 @@ QPoint OverviewInner::mapMouseToItem(QPoint p, MsgId itemId, int32 itemIndex) { p.setX(p.x() - int32(col * w) - st::overviewPhotoSkip); p.setY(p.y() - _marginTop - row * (_rowWidth + st::overviewPhotoSkip) - st::overviewPhotoSkip); } else { - int32 top = _items.at(itemIndex)->getOverviewItemInfo()->top(); + int32 top = _items.at(itemIndex)->Get()->top(); if (_reversed) top = _height - top; p.setY(p.y() - _marginTop - top); } @@ -765,7 +765,7 @@ int32 OverviewInner::itemTop(const FullMsgId &msgId) const { int32 itemIndex = -1; fixItemIndex(itemIndex, (msgId.channel == _channel) ? msgId.msg : ((_migrated && msgId.channel == _migrated->channelId()) ? -msgId.msg : 0)); if (itemIndex >= 0) { - int32 top = _items.at(itemIndex)->getOverviewItemInfo()->top(); + int32 top = _items.at(itemIndex)->Get()->top(); if (_reversed) top = _height - top; return _marginTop + top; } @@ -879,10 +879,10 @@ void OverviewInner::paintEvent(QPaintEvent *e) { int32 y = 0, w = _rowWidth; for (int32 j = 0, l = _items.size(); j < l; ++j) { int32 i = _reversed ? (l - j - 1) : j, nexti = _reversed ? (i - 1) : (i + 1); - int32 nextItemTop = (j + 1 == l) ? (_reversed ? 0 : _height) : _items.at(nexti)->getOverviewItemInfo()->top(); + int32 nextItemTop = (j + 1 == l) ? (_reversed ? 0 : _height) : _items.at(nexti)->Get()->top(); if (_reversed) nextItemTop = _height - nextItemTop; if (_marginTop + nextItemTop > r.top()) { - OverviewItemInfo *info = _items.at(i)->getOverviewItemInfo(); + OverviewItemInfo *info = _items.at(i)->Get(); int32 curY = info->top(); if (_reversed) curY = _height - curY; if (_marginTop + curY >= r.y() + r.height()) break; @@ -944,10 +944,10 @@ void OverviewInner::onUpdateSelected() { for (int32 j = 0, l = _items.size(); j < l; ++j) { bool lastItem = (j + 1 == l); int32 i = _reversed ? (l - j - 1) : j, nexti = _reversed ? (i - 1) : (i + 1); - int32 nextItemTop = lastItem ? (_reversed ? 0 : _height) : _items.at(nexti)->getOverviewItemInfo()->top(); + int32 nextItemTop = lastItem ? (_reversed ? 0 : _height) : _items.at(nexti)->Get()->top(); if (_reversed) nextItemTop = _height - nextItemTop; if (_marginTop + nextItemTop > m.y() || lastItem) { - int32 top = _items.at(i)->getOverviewItemInfo()->top(); + int32 top = _items.at(i)->Get()->top(); if (_reversed) top = _height - top; if (!_items.at(i)->toLayoutMediaItem()) { // day item int32 h = _items.at(i)->height(); @@ -956,11 +956,11 @@ void OverviewInner::onUpdateSelected() { if (i > 0 && (beforeItem || i == _items.size() - 1)) { --i; if (!_items.at(i)->toLayoutMediaItem()) break; // wtf - top = _items.at(i)->getOverviewItemInfo()->top(); + top = _items.at(i)->Get()->top(); } else if (i < _items.size() - 1 && (!beforeItem || !i)) { ++i; if (!_items.at(i)->toLayoutMediaItem()) break; // wtf - top = _items.at(i)->getOverviewItemInfo()->top(); + top = _items.at(i)->Get()->top(); } else { break; // wtf } @@ -1385,7 +1385,7 @@ int32 OverviewInner::resizeToWidth(int32 nwidth, int32 scrollTop, int32 minHeigh for (int32 i = 0, l = _items.size(); i < l; ++i) { int32 h = _items.at(i)->resizeGetHeight(_rowWidth); if (resize) { - _items.at(i)->getOverviewItemInfo()->setTop(_height + (_reversed ? h : 0)); + _items.at(i)->Get()->setTop(_height + (_reversed ? h : 0)); _height += h; } } @@ -1746,7 +1746,7 @@ void OverviewInner::mediaOverviewUpdated() { if (allGood) { if (_items.size() > index && complexMsgId(_items.at(index)->getItem()) == msgid) { if (withDates) prevDate = _items.at(index)->getItem()->date.date(); - top = _items.at(index)->getOverviewItemInfo()->top(); + top = _items.at(index)->Get()->top(); if (!_reversed) { top += _items.at(index)->height(); } @@ -1756,7 +1756,7 @@ void OverviewInner::mediaOverviewUpdated() { if (_items.size() > index + 1 && !_items.at(index)->toLayoutMediaItem() && complexMsgId(_items.at(index + 1)->getItem()) == msgid) { // day item ++index; if (withDates) prevDate = _items.at(index)->getItem()->date.date(); - top = _items.at(index)->getOverviewItemInfo()->top(); + top = _items.at(index)->Get()->top(); if (!_reversed) { top += _items.at(index)->height(); } @@ -1877,7 +1877,7 @@ void OverviewInner::repaintItem(const HistoryItem *msg) { if (history == _migrated) msgid = -msgid; for (int32 i = 0, l = _items.size(); i != l; ++i) { if (complexMsgId(_items.at(i)->getItem()) == msgid) { - int32 top = _items.at(i)->getOverviewItemInfo()->top(); + int32 top = _items.at(i)->Get()->top(); if (_reversed) top = _height - top; update(_rowsLeft, _marginTop + top, _rowWidth, _items.at(i)->height()); break; @@ -1982,7 +1982,7 @@ int32 OverviewInner::setLayoutItem(int32 index, LayoutItem *item, int32 top) { _items.push_back(item); } int32 h = item->resizeGetHeight(_rowWidth); - if (OverviewItemInfo *info = item->getOverviewItemInfo()) { + if (OverviewItemInfo *info = item->Get()) { info->setTop(top + (_reversed ? h : 0)); } return h; diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 34bd47fba4bbc3..1660203d189a33 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -34,6 +34,39 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "audio.h" #include "localstorage.h" +class InterfacesMetadatasMap : public QMap { +public: + ~InterfacesMetadatasMap() { + for (const_iterator i = cbegin(), e = cend(); i != e; ++i) { + delete i.value(); + } + } +}; + +const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) { + typedef QMap InterfacesMetadatasMap; + static InterfacesMetadatasMap InterfacesMetadatas; + static QMutex InterfacesMetadatasMutex; + + QMutexLocker lock(&InterfacesMetadatasMutex); + InterfacesMetadatasMap::const_iterator i = InterfacesMetadatas.constFind(mask); + if (i == InterfacesMetadatas.cend()) { + InterfacesMetadata *meta = new InterfacesMetadata(mask); + if (!meta) { // terminate if we can't allocate memory + throw "Can't allocate memory!"; + } + + i = InterfacesMetadatas.insert(mask, meta); + } + return i.value(); +} + +InterfaceWrapStruct InterfaceWraps[64] = { + { 0, 0, 0 } +}; + +QAtomicInt InterfaceIndexLast(0); + namespace { int32 peerColorIndex(const PeerId &peer) { int32 myId(MTP::authedId()), peerId(peerToBareInt(peer)); diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 8de9bf0c5d7812..cdb0fe83b3d52f 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -20,6 +20,159 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #pragma once +class Interfaces; +typedef void(*InterfaceConstruct)(void *location, Interfaces *interfaces); +typedef void(*InterfaceDestruct)(void *location); + +struct InterfaceWrapStruct { + int Size; + InterfaceConstruct Construct; + InterfaceDestruct Destruct; +}; + +template +struct CeilDivideMinimumOne { + static const int Result = ((Value / Denominator) + ((!Value || (Value % Denominator)) ? 1 : 0)); +}; + +template +struct InterfaceWrapTemplate { + static const int Size = CeilDivideMinimumOne::Result * sizeof(uint64); + static void Construct(void *location, Interfaces *interfaces) { + (new (location) Type())->interfaces = interfaces; + } + static void Destruct(void *location) { + ((Type*)location)->~Type(); + } +}; + +extern InterfaceWrapStruct InterfaceWraps[64]; +extern QAtomicInt InterfaceIndexLast; + +template +class BasicInterface { +public: + static int Index() { + static QAtomicInt _index(0); + if (int index = _index.loadAcquire()) { + return index - 1; + } + while (true) { + int last = InterfaceIndexLast.loadAcquire(); + if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) { + t_assert(last < 64); + if (_index.testAndSetOrdered(0, last + 1)) { + InterfaceWraps[last] = { InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct }; + } + break; + } + } + return _index.loadAcquire() - 1; + } + static const uint64 Bit() { + return (1 << Index()); + } + Interfaces *interfaces = 0; +}; + +class InterfacesMetadata { +public: + + InterfacesMetadata(uint64 mask) : _mask(mask), size(0), last(64) { + for (int i = 0; i < 64; ++i) { + uint64 m = (1 << i); + if (_mask & m) { + int s = InterfaceWraps[i].Size; + if (s) { + offsets[i] = size; + size += s; + } else { + offsets[i] = -1; + } + } else if (_mask < m) { + last = i; + for (; i < 64; ++i) { + offsets[i] = -1; + } + } else { + offsets[i] = -1; + } + } + } + + int size, last; + int offsets[64]; + +private: + uint64 _mask; + +}; + +const InterfacesMetadata *GetInterfacesMetadata(uint64 mask); + +class Interfaces { +public: + + Interfaces(uint64 mask = 0) : _meta(GetInterfacesMetadata(mask)), _data(0) { + if (_meta->size) { + _data = malloc(_meta->size); + if (!_data) { // terminate if we can't allocate memory + throw "Can't allocate memory!"; + } + + for (int i = 0; i < _meta->last; ++i) { + int offset = _meta->offsets[i]; + if (offset >= 0) { + try { + InterfaceWraps[i].Construct(_dataptrunsafe(offset), this); + } catch (...) { + while (i > 0) { + --i; + offset = _meta->offsets[--i]; + if (offset >= 0) { + InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); + } + } + throw; + } + } + } + } + } + ~Interfaces() { + if (_data) { + for (int i = 0; i < _meta->last; ++i) { + int offset = _meta->offsets[i]; + if (offset >= 0) { + InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); + } + } + free(_data); + } + } + + template + Type *Get() { + return (Type*)_dataptr(_meta->offsets[Type::Index()]); + } + template + const Type *Get() const { + return (const Type*)_dataptr(_meta->offsets[Type::Index()]); + } + +private: + + void *_dataptrunsafe(int skip) const { + return (char*)_data + skip; + } + void *_dataptr(int skip) const { + return (skip >= 0) ? _dataptrunsafe(skip) : 0; + } + const InterfacesMetadata *_meta; + void *_data; + +}; + typedef int32 ChannelId; static const ChannelId NoChannel = 0; From 07c81db79a3a6fe917007444f0d4fb9559ea40bf Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 26 Jan 2016 13:24:15 +0300 Subject: [PATCH 010/133] removed interfaces pointer by default from BasicInterface --- Telegram/SourceFiles/layout.h | 2 +- Telegram/SourceFiles/structs.h | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index c7303adc950b77..f4bead1ec0b0b2 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -270,7 +270,7 @@ class OverviewPaintContext : public PaintContext { class OverviewItemInfo : public BasicInterface { public: - OverviewItemInfo() : _top(0) { + OverviewItemInfo(Interfaces *) : _top(0) { } int32 top() const { return _top; diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index cdb0fe83b3d52f..6bfa3bb701878a 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -39,7 +39,7 @@ template struct InterfaceWrapTemplate { static const int Size = CeilDivideMinimumOne::Result * sizeof(uint64); static void Construct(void *location, Interfaces *interfaces) { - (new (location) Type())->interfaces = interfaces; + new (location) Type(interfaces); } static void Destruct(void *location) { ((Type*)location)->~Type(); @@ -72,6 +72,14 @@ class BasicInterface { static const uint64 Bit() { return (1 << Index()); } + +}; + +template +class BasicInterfaceWithPointer : public BasicInterface { +public: + BasicInterfaceWithPointer(Interfaces *interfaces) : interfaces(interfaces) { + } Interfaces *interfaces = 0; }; From 62c28cb58b69498a41d20a99f6547dee39eb742d Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 26 Jan 2016 14:01:15 +0300 Subject: [PATCH 011/133] fixed possible crash in History::addOlderSlice --- Telegram/SourceFiles/history.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 2168eaccafb943..c2c9e796494814 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -1918,11 +1918,6 @@ void History::addOlderSlice(const QVector &slice, const QVectorconstData() : 0, *groupsIt = groupsBegin, *groupsEnd = (isChannel() && collapsed) ? (groupsBegin + collapsed->size()) : 0; HistoryItem *oldFirst = 0, *last = 0; - if (!blocks.isEmpty()) { - t_assert(blocks.size() > 1); - oldFirst = blocks.at(1)->items.front(); - } - HistoryBlock *block = new HistoryBlock(this); block->items.reserve(slice.size() + (collapsed ? collapsed->size() : 0)); for (QVector::const_iterator i = slice.cend(), e = slice.cbegin(); i != e;) { @@ -1947,6 +1942,10 @@ void History::addOlderSlice(const QVector &slice, const QVector 1); + oldFirst = blocks.at(1)->items.front(); + } while (oldFirst && last && oldFirst->type() == HistoryItemGroup && last->type() == HistoryItemGroup) { static_cast(last)->uniteWith(static_cast(oldFirst)); oldFirst->destroy(); From 8eef239b457ea15aa5868413ee73a29470757793 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 Jan 2016 19:31:10 +0300 Subject: [PATCH 012/133] crash catch + report added for Windows version --- Telegram/SourceFiles/_other/crypt.h | 131 ++ Telegram/SourceFiles/_other/ioapi.h | 208 +++ Telegram/SourceFiles/_other/zip.c | 2007 +++++++++++++++++++++++ Telegram/SourceFiles/_other/zip.h | 362 ++++ Telegram/SourceFiles/app.cpp | 11 +- Telegram/SourceFiles/application.cpp | 28 +- Telegram/SourceFiles/application.h | 4 +- Telegram/SourceFiles/dropdown.cpp | 2 +- Telegram/SourceFiles/facades.cpp | 8 + Telegram/SourceFiles/facades.h | 2 + Telegram/SourceFiles/gui/images.cpp | 8 +- Telegram/SourceFiles/gui/images.h | 34 +- Telegram/SourceFiles/gui/twidget.cpp | 17 +- Telegram/SourceFiles/gui/twidget.h | 4 + Telegram/SourceFiles/logs.cpp | 11 + Telegram/SourceFiles/pspecific_wnd.cpp | 27 +- Telegram/SourceFiles/settings.cpp | 4 + Telegram/SourceFiles/settingswidget.cpp | 12 +- Telegram/SourceFiles/settingswidget.h | 10 +- Telegram/SourceFiles/stdafx.h | 1 + Telegram/SourceFiles/sysbuttons.cpp | 7 +- Telegram/SourceFiles/title.cpp | 11 +- Telegram/SourceFiles/window.cpp | 1042 +++++++++++- Telegram/SourceFiles/window.h | 184 ++- Telegram/Telegram.vcxproj | 8 +- Telegram/Telegram.vcxproj.filters | 12 + 26 files changed, 4051 insertions(+), 104 deletions(-) create mode 100644 Telegram/SourceFiles/_other/crypt.h create mode 100644 Telegram/SourceFiles/_other/ioapi.h create mode 100644 Telegram/SourceFiles/_other/zip.c create mode 100644 Telegram/SourceFiles/_other/zip.h diff --git a/Telegram/SourceFiles/_other/crypt.h b/Telegram/SourceFiles/_other/crypt.h new file mode 100644 index 00000000000000..1e9e8200b201ff --- /dev/null +++ b/Telegram/SourceFiles/_other/crypt.h @@ -0,0 +1,131 @@ +/* crypt.h -- base code for crypt/uncrypt ZIPfile + + + Version 1.01e, February 12th, 2005 + + Copyright (C) 1998-2005 Gilles Vollant + + This code is a modified version of crypting code in Infozip distribution + + The encryption/decryption parts of this source code (as opposed to the + non-echoing password parts) were originally written in Europe. The + whole source package can be freely distributed, including from the USA. + (Prior to January 2000, re-export from the US was a violation of US law.) + + This encryption code is a direct transcription of the algorithm from + Roger Schlafly, described by Phil Katz in the file appnote.txt. This + file (appnote.txt) is distributed with the PKZIP program (even in the + version without encryption capabilities). + + If you don't need crypting in your application, just define symbols + NOCRYPT and NOUNCRYPT. + + This code support the "Traditional PKWARE Encryption". + + The new AES encryption added on Zip format by Winzip (see the page + http://www.winzip.com/aes_info.htm ) and PKWare PKZip 5.x Strong + Encryption is not supported. +*/ + +#define CRC32(c, b) ((*(pcrc_32_tab+(((int)(c) ^ (b)) & 0xff))) ^ ((c) >> 8)) + +/*********************************************************************** + * Return the next byte in the pseudo-random sequence + */ +static int decrypt_byte(unsigned long* pkeys, const z_crc_t* pcrc_32_tab) +{ + unsigned temp; /* POTENTIAL BUG: temp*(temp^1) may overflow in an + * unpredictable manner on 16-bit systems; not a problem + * with any known compiler so far, though */ + + temp = ((unsigned)(*(pkeys+2)) & 0xffff) | 2; + return (int)(((temp * (temp ^ 1)) >> 8) & 0xff); +} + +/*********************************************************************** + * Update the encryption keys with the next byte of plain text + */ +static int update_keys(unsigned long* pkeys,const z_crc_t* pcrc_32_tab,int c) +{ + (*(pkeys+0)) = CRC32((*(pkeys+0)), c); + (*(pkeys+1)) += (*(pkeys+0)) & 0xff; + (*(pkeys+1)) = (*(pkeys+1)) * 134775813L + 1; + { + register int keyshift = (int)((*(pkeys+1)) >> 24); + (*(pkeys+2)) = CRC32((*(pkeys+2)), keyshift); + } + return c; +} + + +/*********************************************************************** + * Initialize the encryption keys and the random header according to + * the given password. + */ +static void init_keys(const char* passwd,unsigned long* pkeys,const z_crc_t* pcrc_32_tab) +{ + *(pkeys+0) = 305419896L; + *(pkeys+1) = 591751049L; + *(pkeys+2) = 878082192L; + while (*passwd != '\0') { + update_keys(pkeys,pcrc_32_tab,(int)*passwd); + passwd++; + } +} + +#define zdecode(pkeys,pcrc_32_tab,c) \ + (update_keys(pkeys,pcrc_32_tab,c ^= decrypt_byte(pkeys,pcrc_32_tab))) + +#define zencode(pkeys,pcrc_32_tab,c,t) \ + (t=decrypt_byte(pkeys,pcrc_32_tab), update_keys(pkeys,pcrc_32_tab,c), t^(c)) + +#ifdef INCLUDECRYPTINGCODE_IFCRYPTALLOWED + +#define RAND_HEAD_LEN 12 + /* "last resort" source for second part of crypt seed pattern */ +# ifndef ZCR_SEED2 +# define ZCR_SEED2 3141592654UL /* use PI as default pattern */ +# endif + +static int crypthead(const char* passwd, /* password string */ + unsigned char* buf, /* where to write header */ + int bufSize, + unsigned long* pkeys, + const z_crc_t* pcrc_32_tab, + unsigned long crcForCrypting) +{ + int n; /* index in random header */ + int t; /* temporary */ + int c; /* random byte */ + unsigned char header[RAND_HEAD_LEN-2]; /* random header */ + static unsigned calls = 0; /* ensure different random header each time */ + + if (bufSize> 7) & 0xff; + header[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, c, t); + } + /* Encrypt random header (last two bytes is high word of crc) */ + init_keys(passwd, pkeys, pcrc_32_tab); + for (n = 0; n < RAND_HEAD_LEN-2; n++) + { + buf[n] = (unsigned char)zencode(pkeys, pcrc_32_tab, header[n], t); + } + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 16) & 0xff, t); + buf[n++] = (unsigned char)zencode(pkeys, pcrc_32_tab, (int)(crcForCrypting >> 24) & 0xff, t); + return n; +} + +#endif diff --git a/Telegram/SourceFiles/_other/ioapi.h b/Telegram/SourceFiles/_other/ioapi.h new file mode 100644 index 00000000000000..8dcbdb06e35ad5 --- /dev/null +++ b/Telegram/SourceFiles/_other/ioapi.h @@ -0,0 +1,208 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + + Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) + Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. + More if/def section may be needed to support other platforms + Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. + (but you should use iowin32.c for windows instead) + +*/ + +#ifndef _ZLIBIOAPI64_H +#define _ZLIBIOAPI64_H + +#if (!defined(_WIN32)) && (!defined(WIN32)) && (!defined(__APPLE__)) + + // Linux needs this to support file operation on files larger then 4+GB + // But might need better if/def to select just the platforms that needs them. + + #ifndef __USE_FILE_OFFSET64 + #define __USE_FILE_OFFSET64 + #endif + #ifndef __USE_LARGEFILE64 + #define __USE_LARGEFILE64 + #endif + #ifndef _LARGEFILE64_SOURCE + #define _LARGEFILE64_SOURCE + #endif + #ifndef _FILE_OFFSET_BIT + #define _FILE_OFFSET_BIT 64 + #endif + +#endif + +#include +#include +#include "zlib.h" + +#if defined(USE_FILE32API) +#define fopen64 fopen +#define ftello64 ftell +#define fseeko64 fseek +#else +#ifdef __FreeBSD__ +#define fopen64 fopen +#define ftello64 ftello +#define fseeko64 fseeko +#endif +#ifdef _MSC_VER + #define fopen64 fopen + #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) + #define ftello64 _ftelli64 + #define fseeko64 _fseeki64 + #else // old MSC + #define ftello64 ftell + #define fseeko64 fseek + #endif +#endif +#endif + +/* +#ifndef ZPOS64_T + #ifdef _WIN32 + #define ZPOS64_T fpos_t + #else + #include + #define ZPOS64_T uint64_t + #endif +#endif +*/ + +#ifdef HAVE_MINIZIP64_CONF_H +#include "mz64conf.h" +#endif + +/* a type choosen by DEFINE */ +#ifdef HAVE_64BIT_INT_CUSTOM +typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; +#else +#ifdef HAS_STDINT_H +#include "stdint.h" +typedef uint64_t ZPOS64_T; +#else + +/* Maximum unsigned 32-bit value used as placeholder for zip64 */ +#define MAXU32 0xffffffff + +#if defined(_MSC_VER) || defined(__BORLANDC__) +typedef unsigned __int64 ZPOS64_T; +#else +typedef unsigned long long int ZPOS64_T; +#endif +#endif +#endif + + + +#ifdef __cplusplus +extern "C" { +#endif + + +#define ZLIB_FILEFUNC_SEEK_CUR (1) +#define ZLIB_FILEFUNC_SEEK_END (2) +#define ZLIB_FILEFUNC_SEEK_SET (0) + +#define ZLIB_FILEFUNC_MODE_READ (1) +#define ZLIB_FILEFUNC_MODE_WRITE (2) +#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) + +#define ZLIB_FILEFUNC_MODE_EXISTING (4) +#define ZLIB_FILEFUNC_MODE_CREATE (8) + + +#ifndef ZCALLBACK + #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) + #define ZCALLBACK CALLBACK + #else + #define ZCALLBACK + #endif +#endif + + + + +typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); +typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); +typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); +typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); + +typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); + + +/* here is the "old" 32 bits structure structure */ +typedef struct zlib_filefunc_def_s +{ + open_file_func zopen_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell_file_func ztell_file; + seek_file_func zseek_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc_def; + +typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); +typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); + +typedef struct zlib_filefunc64_def_s +{ + open64_file_func zopen64_file; + read_file_func zread_file; + write_file_func zwrite_file; + tell64_file_func ztell64_file; + seek64_file_func zseek64_file; + close_file_func zclose_file; + testerror_file_func zerror_file; + voidpf opaque; +} zlib_filefunc64_def; + +void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); +void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); + +/* now internal definition, only for zip.c and unzip.h */ +typedef struct zlib_filefunc64_32_def_s +{ + zlib_filefunc64_def zfile_func64; + open_file_func zopen32_file; + tell_file_func ztell32_file; + seek_file_func zseek32_file; +} zlib_filefunc64_32_def; + + +#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) +//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) +//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) +#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) +#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) + +voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); +long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); +ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); + +#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) +#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) +#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/Telegram/SourceFiles/_other/zip.c b/Telegram/SourceFiles/_other/zip.c new file mode 100644 index 00000000000000..ea54853e858a7f --- /dev/null +++ b/Telegram/SourceFiles/_other/zip.c @@ -0,0 +1,2007 @@ +/* zip.c -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + Changes + Oct-2009 - Mathias Svensson - Remove old C style function prototypes + Oct-2009 - Mathias Svensson - Added Zip64 Support when creating new file archives + Oct-2009 - Mathias Svensson - Did some code cleanup and refactoring to get better overview of some functions. + Oct-2009 - Mathias Svensson - Added zipRemoveExtraInfoBlock to strip extra field data from its ZIP64 data + It is used when recreting zip archive with RAW when deleting items from a zip. + ZIP64 data is automaticly added to items that needs it, and existing ZIP64 data need to be removed. + Oct-2009 - Mathias Svensson - Added support for BZIP2 as compression mode (bzip2 lib is required) + Jan-2010 - back to unzip and minizip 1.0 name scheme, with compatibility layer + +*/ + + +#include +#include +#include +#include +#include "zlib.h" +#include "zip.h" + +#ifdef STDC +# include +# include +# include +#endif +#ifdef NO_ERRNO_H + extern int errno; +#else +# include +#endif + + +#ifndef local +# define local static +#endif +/* compile with -Dlocal if your debugger can't find static symbols */ + +#ifndef VERSIONMADEBY +# define VERSIONMADEBY (0x0) /* platform depedent */ +#endif + +#ifndef Z_BUFSIZE +#define Z_BUFSIZE (64*1024) //(16384) +#endif + +#ifndef Z_MAXFILENAMEINZIP +#define Z_MAXFILENAMEINZIP (256) +#endif + +#ifndef ALLOC +# define ALLOC(size) (malloc(size)) +#endif +#ifndef TRYFREE +# define TRYFREE(p) {if (p) free(p);} +#endif + +/* +#define SIZECENTRALDIRITEM (0x2e) +#define SIZEZIPLOCALHEADER (0x1e) +*/ + +/* I've found an old Unix (a SunOS 4.1.3_U1) without all SEEK_* defined.... */ + + +// NOT sure that this work on ALL platform +#define MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) + +#ifndef SEEK_CUR +#define SEEK_CUR 1 +#endif + +#ifndef SEEK_END +#define SEEK_END 2 +#endif + +#ifndef SEEK_SET +#define SEEK_SET 0 +#endif + +#ifndef DEF_MEM_LEVEL +#if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +#else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +#endif +#endif +const char zip_copyright[] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll"; + + +#define SIZEDATA_INDATABLOCK (4096-(4*4)) + +#define LOCALHEADERMAGIC (0x04034b50) +#define CENTRALHEADERMAGIC (0x02014b50) +#define ENDHEADERMAGIC (0x06054b50) +#define ZIP64ENDHEADERMAGIC (0x6064b50) +#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) + +#define FLAG_LOCALHEADER_OFFSET (0x06) +#define CRC_LOCALHEADER_OFFSET (0x0e) + +#define SIZECENTRALHEADER (0x2e) /* 46 */ + +typedef struct linkedlist_datablock_internal_s +{ + struct linkedlist_datablock_internal_s* next_datablock; + uLong avail_in_this_block; + uLong filled_in_this_block; + uLong unused; /* for future use and alignement */ + unsigned char data[SIZEDATA_INDATABLOCK]; +} linkedlist_datablock_internal; + +typedef struct linkedlist_data_s +{ + linkedlist_datablock_internal* first_block; + linkedlist_datablock_internal* last_block; +} linkedlist_data; + + +typedef struct +{ + z_stream stream; /* zLib stream structure for inflate */ +#ifdef HAVE_BZIP2 + bz_stream bstream; /* bzLib stream structure for bziped */ +#endif + + int stream_initialised; /* 1 is stream is initialised */ + uInt pos_in_buffered_data; /* last written byte in buffered_data */ + + ZPOS64_T pos_local_header; /* offset of the local header of the file + currenty writing */ + char* central_header; /* central header data for the current file */ + uLong size_centralExtra; + uLong size_centralheader; /* size of the central header for cur file */ + uLong size_centralExtraFree; /* Extra bytes allocated to the centralheader but that are not used */ + uLong flag; /* flag of the file currently writing */ + + int method; /* compression method of file currenty wr.*/ + int raw; /* 1 for directly writing raw data */ + Byte buffered_data[Z_BUFSIZE];/* buffer contain compressed data to be writ*/ + uLong dosDate; + uLong crc32; + int encrypt; + int zip64; /* Add ZIP64 extened information in the extra field */ + ZPOS64_T pos_zip64extrainfo; + ZPOS64_T totalCompressedData; + ZPOS64_T totalUncompressedData; +#ifndef NOCRYPT + unsigned long keys[3]; /* keys defining the pseudo-random sequence */ + const z_crc_t* pcrc_32_tab; + int crypt_header_size; +#endif +} curfile64_info; + +typedef struct +{ + zlib_filefunc64_32_def z_filefunc; + voidpf filestream; /* io structore of the zipfile */ + linkedlist_data central_dir;/* datablock with central dir in construction*/ + int in_opened_file_inzip; /* 1 if a file in the zip is currently writ.*/ + curfile64_info ci; /* info on the file curretly writing */ + + ZPOS64_T begin_pos; /* position of the beginning of the zipfile */ + ZPOS64_T add_position_when_writting_offset; + ZPOS64_T number_entry; + +#ifndef NO_ADDFILEINEXISTINGZIP + char *globalcomment; +#endif + +} zip64_internal; + + +#ifndef NOCRYPT +#define INCLUDECRYPTINGCODE_IFCRYPTALLOWED +#include "crypt.h" +#endif + +local linkedlist_datablock_internal* allocate_new_datablock() +{ + linkedlist_datablock_internal* ldi; + ldi = (linkedlist_datablock_internal*) + ALLOC(sizeof(linkedlist_datablock_internal)); + if (ldi!=NULL) + { + ldi->next_datablock = NULL ; + ldi->filled_in_this_block = 0 ; + ldi->avail_in_this_block = SIZEDATA_INDATABLOCK ; + } + return ldi; +} + +local void free_datablock(linkedlist_datablock_internal* ldi) +{ + while (ldi!=NULL) + { + linkedlist_datablock_internal* ldinext = ldi->next_datablock; + TRYFREE(ldi); + ldi = ldinext; + } +} + +local void init_linkedlist(linkedlist_data* ll) +{ + ll->first_block = ll->last_block = NULL; +} + +local void free_linkedlist(linkedlist_data* ll) +{ + free_datablock(ll->first_block); + ll->first_block = ll->last_block = NULL; +} + + +local int add_data_in_datablock(linkedlist_data* ll, const void* buf, uLong len) +{ + linkedlist_datablock_internal* ldi; + const unsigned char* from_copy; + + if (ll==NULL) + return ZIP_INTERNALERROR; + + if (ll->last_block == NULL) + { + ll->first_block = ll->last_block = allocate_new_datablock(); + if (ll->first_block == NULL) + return ZIP_INTERNALERROR; + } + + ldi = ll->last_block; + from_copy = (unsigned char*)buf; + + while (len>0) + { + uInt copy_this; + uInt i; + unsigned char* to_copy; + + if (ldi->avail_in_this_block==0) + { + ldi->next_datablock = allocate_new_datablock(); + if (ldi->next_datablock == NULL) + return ZIP_INTERNALERROR; + ldi = ldi->next_datablock ; + ll->last_block = ldi; + } + + if (ldi->avail_in_this_block < len) + copy_this = (uInt)ldi->avail_in_this_block; + else + copy_this = (uInt)len; + + to_copy = &(ldi->data[ldi->filled_in_this_block]); + + for (i=0;ifilled_in_this_block += copy_this; + ldi->avail_in_this_block -= copy_this; + from_copy += copy_this ; + len -= copy_this; + } + return ZIP_OK; +} + + + +/****************************************************************************/ + +#ifndef NO_ADDFILEINEXISTINGZIP +/* =========================================================================== + Inputs a long in LSB order to the given file + nbByte == 1, 2 ,4 or 8 (byte, short or long, ZPOS64_T) +*/ + +local int zip64local_putValue OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)); +local int zip64local_putValue (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) +{ + unsigned char buf[8]; + int n; + for (n = 0; n < nbByte; n++) + { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + if (x != 0) + { /* data overflow - hack for ZIP64 (X Roche) */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } + + if (ZWRITE64(*pzlib_filefunc_def,filestream,buf,nbByte)!=(uLong)nbByte) + return ZIP_ERRNO; + else + return ZIP_OK; +} + +local void zip64local_putValue_inmemory OF((void* dest, ZPOS64_T x, int nbByte)); +local void zip64local_putValue_inmemory (void* dest, ZPOS64_T x, int nbByte) +{ + unsigned char* buf=(unsigned char*)dest; + int n; + for (n = 0; n < nbByte; n++) { + buf[n] = (unsigned char)(x & 0xff); + x >>= 8; + } + + if (x != 0) + { /* data overflow - hack for ZIP64 */ + for (n = 0; n < nbByte; n++) + { + buf[n] = 0xff; + } + } +} + +/****************************************************************************/ + + +local uLong zip64local_TmzDateToDosDate(const tm_zip* ptm) +{ + uLong year = (uLong)ptm->tm_year; + if (year>=1980) + year-=1980; + else if (year>=80) + year-=80; + return + (uLong) (((ptm->tm_mday) + (32 * (ptm->tm_mon+1)) + (512 * year)) << 16) | + ((ptm->tm_sec/2) + (32* ptm->tm_min) + (2048 * (uLong)ptm->tm_hour)); +} + + +/****************************************************************************/ + +local int zip64local_getByte OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, int *pi)); + +local int zip64local_getByte(const zlib_filefunc64_32_def* pzlib_filefunc_def,voidpf filestream,int* pi) +{ + unsigned char c; + int err = (int)ZREAD64(*pzlib_filefunc_def,filestream,&c,1); + if (err==1) + { + *pi = (int)c; + return ZIP_OK; + } + else + { + if (ZERROR64(*pzlib_filefunc_def,filestream)) + return ZIP_ERRNO; + else + return ZIP_EOF; + } +} + + +/* =========================================================================== + Reads a long in LSB order from the given gz_stream. Sets +*/ +local int zip64local_getShort OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getShort (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong *pX)); + +local int zip64local_getLong (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, uLong* pX) +{ + uLong x ; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (uLong)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((uLong)i)<<24; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + return err; +} + +local int zip64local_getLong64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)); + + +local int zip64local_getLong64 (const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) +{ + ZPOS64_T x; + int i = 0; + int err; + + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x = (ZPOS64_T)i; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<8; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<16; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<24; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<32; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<40; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<48; + + if (err==ZIP_OK) + err = zip64local_getByte(pzlib_filefunc_def,filestream,&i); + x += ((ZPOS64_T)i)<<56; + + if (err==ZIP_OK) + *pX = x; + else + *pX = 0; + + return err; +} + +#ifndef BUFREADCOMMENT +#define BUFREADCOMMENT (0x400) +#endif +/* + Locate the Central directory of a zipfile (at the end, just before + the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && + ((*(buf+i+2))==0x05) && ((*(buf+i+3))==0x06)) + { + uPosFound = uReadPos+i; + break; + } + + if (uPosFound!=0) + break; + } + TRYFREE(buf); + return uPosFound; +} + +/* +Locate the End of Zip64 Central directory locator and from there find the CD of a zipfile (at the end, just before +the global comment) +*/ +local ZPOS64_T zip64local_SearchCentralDir64 OF((const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream)); + +local ZPOS64_T zip64local_SearchCentralDir64(const zlib_filefunc64_32_def* pzlib_filefunc_def, voidpf filestream) +{ + unsigned char* buf; + ZPOS64_T uSizeFile; + ZPOS64_T uBackRead; + ZPOS64_T uMaxBack=0xffff; /* maximum size of global comment */ + ZPOS64_T uPosFound=0; + uLong uL; + ZPOS64_T relativeOffset; + + if (ZSEEK64(*pzlib_filefunc_def,filestream,0,ZLIB_FILEFUNC_SEEK_END) != 0) + return 0; + + uSizeFile = ZTELL64(*pzlib_filefunc_def,filestream); + + if (uMaxBack>uSizeFile) + uMaxBack = uSizeFile; + + buf = (unsigned char*)ALLOC(BUFREADCOMMENT+4); + if (buf==NULL) + return 0; + + uBackRead = 4; + while (uBackReaduMaxBack) + uBackRead = uMaxBack; + else + uBackRead+=BUFREADCOMMENT; + uReadPos = uSizeFile-uBackRead ; + + uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? + (BUFREADCOMMENT+4) : (uLong)(uSizeFile-uReadPos); + if (ZSEEK64(*pzlib_filefunc_def,filestream,uReadPos,ZLIB_FILEFUNC_SEEK_SET)!=0) + break; + + if (ZREAD64(*pzlib_filefunc_def,filestream,buf,uReadSize)!=uReadSize) + break; + + for (i=(int)uReadSize-3; (i--)>0;) + { + // Signature "0x07064b50" Zip64 end of central directory locater + if (((*(buf+i))==0x50) && ((*(buf+i+1))==0x4b) && ((*(buf+i+2))==0x06) && ((*(buf+i+3))==0x07)) + { + uPosFound = uReadPos+i; + break; + } + } + + if (uPosFound!=0) + break; + } + + TRYFREE(buf); + if (uPosFound == 0) + return 0; + + /* Zip64 end of central directory locator */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, uPosFound,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature, already checked */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + /* number of the disk with the start of the zip64 end of central directory */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 0) + return 0; + + /* relative offset of the zip64 end of central directory record */ + if (zip64local_getLong64(pzlib_filefunc_def,filestream,&relativeOffset)!=ZIP_OK) + return 0; + + /* total number of disks */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + if (uL != 1) + return 0; + + /* Goto Zip64 end of central directory record */ + if (ZSEEK64(*pzlib_filefunc_def,filestream, relativeOffset,ZLIB_FILEFUNC_SEEK_SET)!=0) + return 0; + + /* the signature */ + if (zip64local_getLong(pzlib_filefunc_def,filestream,&uL)!=ZIP_OK) + return 0; + + if (uL != 0x06064b50) // signature of 'Zip64 end of central directory' + return 0; + + return relativeOffset; +} + +int LoadCentralDirectoryRecord(zip64_internal* pziinit) +{ + int err=ZIP_OK; + ZPOS64_T byte_before_the_zipfile;/* byte before the zipfile, (>0 for sfx)*/ + + ZPOS64_T size_central_dir; /* size of the central directory */ + ZPOS64_T offset_central_dir; /* offset of start of central directory */ + ZPOS64_T central_pos; + uLong uL; + + uLong number_disk; /* number of the current dist, used for + spaning ZIP, unsupported, always 0*/ + uLong number_disk_with_CD; /* number the the disk with central dir, used + for spaning ZIP, unsupported, always 0*/ + ZPOS64_T number_entry; + ZPOS64_T number_entry_CD; /* total number of entries in + the central dir + (same than number_entry on nospan) */ + uLong VersionMadeBy; + uLong VersionNeeded; + uLong size_comment; + + int hasZIP64Record = 0; + + // check first if we find a ZIP64 record + central_pos = zip64local_SearchCentralDir64(&pziinit->z_filefunc,pziinit->filestream); + if(central_pos > 0) + { + hasZIP64Record = 1; + } + else if(central_pos == 0) + { + central_pos = zip64local_SearchCentralDir(&pziinit->z_filefunc,pziinit->filestream); + } + +/* disable to allow appending to empty ZIP archive + if (central_pos==0) + err=ZIP_ERRNO; +*/ + + if(hasZIP64Record) + { + ZPOS64_T sizeEndOfCentralDirectory; + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* size of zip64 end of central directory record */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &sizeEndOfCentralDirectory)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version made by */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionMadeBy)!=ZIP_OK) + err=ZIP_ERRNO; + + /* version needed to extract */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &VersionNeeded)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory on this disk */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream, &number_entry)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&number_entry_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&size_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + /* offset of start of central directory with respect to the + starting disk number */ + if (zip64local_getLong64(&pziinit->z_filefunc, pziinit->filestream,&offset_central_dir)!=ZIP_OK) + err=ZIP_ERRNO; + + // TODO.. + // read the comment from the standard central header. + size_comment = 0; + } + else + { + // Read End of central Directory info + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, central_pos,ZLIB_FILEFUNC_SEEK_SET)!=0) + err=ZIP_ERRNO; + + /* the signature, already checked */ + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream,&uL)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of this disk */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk)!=ZIP_OK) + err=ZIP_ERRNO; + + /* number of the disk with the start of the central directory */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream,&number_disk_with_CD)!=ZIP_OK) + err=ZIP_ERRNO; + + /* total number of entries in the central dir on this disk */ + number_entry = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry = uL; + + /* total number of entries in the central dir */ + number_entry_CD = 0; + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + number_entry_CD = uL; + + if ((number_entry_CD!=number_entry) || (number_disk_with_CD!=0) || (number_disk!=0)) + err=ZIP_BADZIPFILE; + + /* size of the central directory */ + size_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + size_central_dir = uL; + + /* offset of start of central directory with respect to the starting disk number */ + offset_central_dir = 0; + if (zip64local_getLong(&pziinit->z_filefunc, pziinit->filestream, &uL)!=ZIP_OK) + err=ZIP_ERRNO; + else + offset_central_dir = uL; + + + /* zipfile global comment length */ + if (zip64local_getShort(&pziinit->z_filefunc, pziinit->filestream, &size_comment)!=ZIP_OK) + err=ZIP_ERRNO; + } + + if ((central_posz_filefunc, pziinit->filestream); + return ZIP_ERRNO; + } + + if (size_comment>0) + { + pziinit->globalcomment = (char*)ALLOC(size_comment+1); + if (pziinit->globalcomment) + { + size_comment = ZREAD64(pziinit->z_filefunc, pziinit->filestream, pziinit->globalcomment,size_comment); + pziinit->globalcomment[size_comment]=0; + } + } + + byte_before_the_zipfile = central_pos - (offset_central_dir+size_central_dir); + pziinit->add_position_when_writting_offset = byte_before_the_zipfile; + + { + ZPOS64_T size_central_dir_to_read = size_central_dir; + size_t buf_size = SIZEDATA_INDATABLOCK; + void* buf_read = (void*)ALLOC(buf_size); + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir + byte_before_the_zipfile, ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + while ((size_central_dir_to_read>0) && (err==ZIP_OK)) + { + ZPOS64_T read_this = SIZEDATA_INDATABLOCK; + if (read_this > size_central_dir_to_read) + read_this = size_central_dir_to_read; + + if (ZREAD64(pziinit->z_filefunc, pziinit->filestream,buf_read,(uLong)read_this) != read_this) + err=ZIP_ERRNO; + + if (err==ZIP_OK) + err = add_data_in_datablock(&pziinit->central_dir,buf_read, (uLong)read_this); + + size_central_dir_to_read-=read_this; + } + TRYFREE(buf_read); + } + pziinit->begin_pos = byte_before_the_zipfile; + pziinit->number_entry = number_entry_CD; + + if (ZSEEK64(pziinit->z_filefunc, pziinit->filestream, offset_central_dir+byte_before_the_zipfile,ZLIB_FILEFUNC_SEEK_SET) != 0) + err=ZIP_ERRNO; + + return err; +} + + +#endif /* !NO_ADDFILEINEXISTINGZIP*/ + + +/************************************************************/ +extern zipFile ZEXPORT zipOpen3 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_32_def* pzlib_filefunc64_32_def) +{ + zip64_internal ziinit; + zip64_internal* zi; + int err=ZIP_OK; + + ziinit.z_filefunc.zseek32_file = NULL; + ziinit.z_filefunc.ztell32_file = NULL; + if (pzlib_filefunc64_32_def==NULL) + fill_fopen64_filefunc(&ziinit.z_filefunc.zfile_func64); + else + ziinit.z_filefunc = *pzlib_filefunc64_32_def; + + ziinit.filestream = ZOPEN64(ziinit.z_filefunc, + pathname, + (append == APPEND_STATUS_CREATE) ? + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_CREATE) : + (ZLIB_FILEFUNC_MODE_READ | ZLIB_FILEFUNC_MODE_WRITE | ZLIB_FILEFUNC_MODE_EXISTING)); + + if (ziinit.filestream == NULL) + return NULL; + + if (append == APPEND_STATUS_CREATEAFTER) + ZSEEK64(ziinit.z_filefunc,ziinit.filestream,0,SEEK_END); + + ziinit.begin_pos = ZTELL64(ziinit.z_filefunc,ziinit.filestream); + ziinit.in_opened_file_inzip = 0; + ziinit.ci.stream_initialised = 0; + ziinit.number_entry = 0; + ziinit.add_position_when_writting_offset = 0; + init_linkedlist(&(ziinit.central_dir)); + + + + zi = (zip64_internal*)ALLOC(sizeof(zip64_internal)); + if (zi==NULL) + { + ZCLOSE64(ziinit.z_filefunc,ziinit.filestream); + return NULL; + } + + /* now we add file in a zipfile */ +# ifndef NO_ADDFILEINEXISTINGZIP + ziinit.globalcomment = NULL; + if (append == APPEND_STATUS_ADDINZIP) + { + // Read and Cache Central Directory Records + err = LoadCentralDirectoryRecord(&ziinit); + } + + if (globalcomment) + { + *globalcomment = ziinit.globalcomment; + } +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + + if (err != ZIP_OK) + { +# ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(ziinit.globalcomment); +# endif /* !NO_ADDFILEINEXISTINGZIP*/ + TRYFREE(zi); + return NULL; + } + else + { + *zi = ziinit; + return (zipFile)zi; + } +} + +extern zipFile ZEXPORT zipOpen2 (const char *pathname, int append, zipcharpc* globalcomment, zlib_filefunc_def* pzlib_filefunc32_def) +{ + if (pzlib_filefunc32_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + fill_zlib_filefunc64_32_def_from_filefunc32(&zlib_filefunc64_32_def_fill,pzlib_filefunc32_def); + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + +extern zipFile ZEXPORT zipOpen2_64 (const void *pathname, int append, zipcharpc* globalcomment, zlib_filefunc64_def* pzlib_filefunc_def) +{ + if (pzlib_filefunc_def != NULL) + { + zlib_filefunc64_32_def zlib_filefunc64_32_def_fill; + zlib_filefunc64_32_def_fill.zfile_func64 = *pzlib_filefunc_def; + zlib_filefunc64_32_def_fill.ztell32_file = NULL; + zlib_filefunc64_32_def_fill.zseek32_file = NULL; + return zipOpen3(pathname, append, globalcomment, &zlib_filefunc64_32_def_fill); + } + else + return zipOpen3(pathname, append, globalcomment, NULL); +} + + + +extern zipFile ZEXPORT zipOpen (const char* pathname, int append) +{ + return zipOpen3((const void*)pathname,append,NULL,NULL); +} + +extern zipFile ZEXPORT zipOpen64 (const void* pathname, int append) +{ + return zipOpen3(pathname,append,NULL,NULL); +} + +int Write_LocalFileHeader(zip64_internal* zi, const char* filename, uInt size_extrafield_local, const void* extrafield_local) +{ + /* write the local header */ + int err; + uInt size_filename = (uInt)strlen(filename); + uInt size_extrafield = size_extrafield_local; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)LOCALHEADERMAGIC, 4); + + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2);/* version needed to extract */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)20,2);/* version needed to extract */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.flag,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.method,2); + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->ci.dosDate,4); + + // CRC / Compressed size / Uncompressed size will be filled in later and rewritten later + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* crc 32, unknown */ + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* compressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* compressed size, unknown */ + } + if (err==ZIP_OK) + { + if(zi->ci.zip64) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xFFFFFFFF,4); /* uncompressed size, unknown */ + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); /* uncompressed size, unknown */ + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_filename,2); + + if(zi->ci.zip64) + { + size_extrafield += 20; + } + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_extrafield,2); + + if ((err==ZIP_OK) && (size_filename > 0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream,filename,size_filename)!=size_filename) + err = ZIP_ERRNO; + } + + if ((err==ZIP_OK) && (size_extrafield_local > 0)) + { + if (ZWRITE64(zi->z_filefunc, zi->filestream, extrafield_local, size_extrafield_local) != size_extrafield_local) + err = ZIP_ERRNO; + } + + + if ((err==ZIP_OK) && (zi->ci.zip64)) + { + // write the Zip64 extended info + short HeaderID = 1; + short DataSize = 16; + ZPOS64_T CompressedSize = 0; + ZPOS64_T UncompressedSize = 0; + + // Remember position of Zip64 extended info for the local file header. (needed when we update size after done with file) + zi->ci.pos_zip64extrainfo = ZTELL64(zi->z_filefunc,zi->filestream); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)HeaderID,2); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (short)DataSize,2); + + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)UncompressedSize,8); + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, (ZPOS64_T)CompressedSize,8); + } + + return err; +} + +/* + NOTE. + When writing RAW the ZIP64 extended information in extrafield_local and extrafield_global needs to be stripped + before calling this function it can be done with zipRemoveExtraInfoBlock + + It is not done here because then we need to realloc a new buffer since parameters are 'const' and I want to minimize + unnecessary allocations. + */ +extern int ZEXPORT zipOpenNewFileInZip4_64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase, int zip64) +{ + zip64_internal* zi; + uInt size_filename; + uInt size_comment; + uInt i; + int err = ZIP_OK; + +# ifdef NOCRYPT + (crcForCrypting); + if (password != NULL) + return ZIP_PARAMERROR; +# endif + + if (file == NULL) + return ZIP_PARAMERROR; + +#ifdef HAVE_BZIP2 + if ((method!=0) && (method!=Z_DEFLATED) && (method!=Z_BZIP2ED)) + return ZIP_PARAMERROR; +#else + if ((method!=0) && (method!=Z_DEFLATED)) + return ZIP_PARAMERROR; +#endif + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + if (err != ZIP_OK) + return err; + } + + if (filename==NULL) + filename="-"; + + if (comment==NULL) + size_comment = 0; + else + size_comment = (uInt)strlen(comment); + + size_filename = (uInt)strlen(filename); + + if (zipfi == NULL) + zi->ci.dosDate = 0; + else + { + if (zipfi->dosDate != 0) + zi->ci.dosDate = zipfi->dosDate; + else + zi->ci.dosDate = zip64local_TmzDateToDosDate(&zipfi->tmz_date); + } + + zi->ci.flag = flagBase; + if ((level==8) || (level==9)) + zi->ci.flag |= 2; + if (level==2) + zi->ci.flag |= 4; + if (level==1) + zi->ci.flag |= 6; + if (password != NULL) + zi->ci.flag |= 1; + + zi->ci.crc32 = 0; + zi->ci.method = method; + zi->ci.encrypt = 0; + zi->ci.stream_initialised = 0; + zi->ci.pos_in_buffered_data = 0; + zi->ci.raw = raw; + zi->ci.pos_local_header = ZTELL64(zi->z_filefunc,zi->filestream); + + zi->ci.size_centralheader = SIZECENTRALHEADER + size_filename + size_extrafield_global + size_comment; + zi->ci.size_centralExtraFree = 32; // Extra space we have reserved in case we need to add ZIP64 extra info data + + zi->ci.central_header = (char*)ALLOC((uInt)zi->ci.size_centralheader + zi->ci.size_centralExtraFree); + + zi->ci.size_centralExtra = size_extrafield_global; + zip64local_putValue_inmemory(zi->ci.central_header,(uLong)CENTRALHEADERMAGIC,4); + /* version info */ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)versionMadeBy,2); + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)20,2); + zip64local_putValue_inmemory(zi->ci.central_header+8,(uLong)zi->ci.flag,2); + zip64local_putValue_inmemory(zi->ci.central_header+10,(uLong)zi->ci.method,2); + zip64local_putValue_inmemory(zi->ci.central_header+12,(uLong)zi->ci.dosDate,4); + zip64local_putValue_inmemory(zi->ci.central_header+16,(uLong)0,4); /*crc*/ + zip64local_putValue_inmemory(zi->ci.central_header+20,(uLong)0,4); /*compr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+24,(uLong)0,4); /*uncompr size*/ + zip64local_putValue_inmemory(zi->ci.central_header+28,(uLong)size_filename,2); + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)size_extrafield_global,2); + zip64local_putValue_inmemory(zi->ci.central_header+32,(uLong)size_comment,2); + zip64local_putValue_inmemory(zi->ci.central_header+34,(uLong)0,2); /*disk nm start*/ + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)0,2); + else + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)zipfi->internal_fa,2); + + if (zipfi==NULL) + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)0,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+38,(uLong)zipfi->external_fa,4); + + if(zi->ci.pos_local_header >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)0xffffffff,4); + else + zip64local_putValue_inmemory(zi->ci.central_header+42,(uLong)zi->ci.pos_local_header - zi->add_position_when_writting_offset,4); + + for (i=0;ici.central_header+SIZECENTRALHEADER+i) = *(filename+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+i) = + *(((const char*)extrafield_global)+i); + + for (i=0;ici.central_header+SIZECENTRALHEADER+size_filename+ + size_extrafield_global+i) = *(comment+i); + if (zi->ci.central_header == NULL) + return ZIP_INTERNALERROR; + + zi->ci.zip64 = zip64; + zi->ci.totalCompressedData = 0; + zi->ci.totalUncompressedData = 0; + zi->ci.pos_zip64extrainfo = 0; + + err = Write_LocalFileHeader(zi, filename, size_extrafield_local, extrafield_local); + +#ifdef HAVE_BZIP2 + zi->ci.bstream.avail_in = (uInt)0; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + zi->ci.bstream.total_in_hi32 = 0; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_out_hi32 = 0; + zi->ci.bstream.total_out_lo32 = 0; +#endif + + zi->ci.stream.avail_in = (uInt)0; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + zi->ci.stream.total_in = 0; + zi->ci.stream.total_out = 0; + zi->ci.stream.data_type = Z_BINARY; + +#ifdef HAVE_BZIP2 + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED || zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) +#else + if ((err==ZIP_OK) && (zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) +#endif + { + if(zi->ci.method == Z_DEFLATED) + { + zi->ci.stream.zalloc = (alloc_func)0; + zi->ci.stream.zfree = (free_func)0; + zi->ci.stream.opaque = (voidpf)0; + + if (windowBits>0) + windowBits = -windowBits; + + err = deflateInit2(&zi->ci.stream, level, Z_DEFLATED, windowBits, memLevel, strategy); + + if (err==Z_OK) + zi->ci.stream_initialised = Z_DEFLATED; + } + else if(zi->ci.method == Z_BZIP2ED) + { +#ifdef HAVE_BZIP2 + // Init BZip stuff here + zi->ci.bstream.bzalloc = 0; + zi->ci.bstream.bzfree = 0; + zi->ci.bstream.opaque = (voidpf)0; + + err = BZ2_bzCompressInit(&zi->ci.bstream, level, 0,35); + if(err == BZ_OK) + zi->ci.stream_initialised = Z_BZIP2ED; +#endif + } + + } + +# ifndef NOCRYPT + zi->ci.crypt_header_size = 0; + if ((err==Z_OK) && (password != NULL)) + { + unsigned char bufHead[RAND_HEAD_LEN]; + unsigned int sizeHead; + zi->ci.encrypt = 1; + zi->ci.pcrc_32_tab = get_crc_table(); + /*init_keys(password,zi->ci.keys,zi->ci.pcrc_32_tab);*/ + + sizeHead=crypthead(password,bufHead,RAND_HEAD_LEN,zi->ci.keys,zi->ci.pcrc_32_tab,crcForCrypting); + zi->ci.crypt_header_size = sizeHead; + + if (ZWRITE64(zi->z_filefunc,zi->filestream,bufHead,sizeHead) != sizeHead) + err = ZIP_ERRNO; + } +# endif + + if (err==Z_OK) + zi->in_opened_file_inzip = 1; + return err; +} + +extern int ZEXPORT zipOpenNewFileInZip4 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, + uLong versionMadeBy, uLong flagBase) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, versionMadeBy, flagBase, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip3_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, + int windowBits,int memLevel, int strategy, + const char* password, uLong crcForCrypting, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + windowBits, memLevel, strategy, + password, crcForCrypting, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip2(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +extern int ZEXPORT zipOpenNewFileInZip2_64(zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void* extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int raw, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, raw, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip64 (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level, int zip64) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, zip64); +} + +extern int ZEXPORT zipOpenNewFileInZip (zipFile file, const char* filename, const zip_fileinfo* zipfi, + const void* extrafield_local, uInt size_extrafield_local, + const void*extrafield_global, uInt size_extrafield_global, + const char* comment, int method, int level) +{ + return zipOpenNewFileInZip4_64 (file, filename, zipfi, + extrafield_local, size_extrafield_local, + extrafield_global, size_extrafield_global, + comment, method, level, 0, + -MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY, + NULL, 0, VERSIONMADEBY, 0, 0); +} + +local int zip64FlushWriteBuffer(zip64_internal* zi) +{ + int err=ZIP_OK; + + if (zi->ci.encrypt != 0) + { +#ifndef NOCRYPT + uInt i; + int t; + for (i=0;ici.pos_in_buffered_data;i++) + zi->ci.buffered_data[i] = zencode(zi->ci.keys, zi->ci.pcrc_32_tab, zi->ci.buffered_data[i],t); +#endif + } + + if (ZWRITE64(zi->z_filefunc,zi->filestream,zi->ci.buffered_data,zi->ci.pos_in_buffered_data) != zi->ci.pos_in_buffered_data) + err = ZIP_ERRNO; + + zi->ci.totalCompressedData += zi->ci.pos_in_buffered_data; + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED) + { + zi->ci.totalUncompressedData += zi->ci.bstream.total_in_lo32; + zi->ci.bstream.total_in_lo32 = 0; + zi->ci.bstream.total_in_hi32 = 0; + } + else +#endif + { + zi->ci.totalUncompressedData += zi->ci.stream.total_in; + zi->ci.stream.total_in = 0; + } + + + zi->ci.pos_in_buffered_data = 0; + + return err; +} + +extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned int len) +{ + zip64_internal* zi; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + + zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); + +#ifdef HAVE_BZIP2 + if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) + { + zi->ci.bstream.next_in = (void*)buf; + zi->ci.bstream.avail_in = len; + err = BZ_RUN_OK; + + while ((err==BZ_RUN_OK) && (zi->ci.bstream.avail_in>0)) + { + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + + + if(err != BZ_RUN_OK) + break; + + if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore_lo = zi->ci.bstream.total_out_lo32; +// uLong uTotalOutBefore_hi = zi->ci.bstream.total_out_hi32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_RUN); + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore_lo) ; + } + } + + if(err == BZ_RUN_OK) + err = ZIP_OK; + } + else +#endif + { + zi->ci.stream.next_in = (Bytef*)buf; + zi->ci.stream.avail_in = len; + + while ((err==ZIP_OK) && (zi->ci.stream.avail_in>0)) + { + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + + + if(err != ZIP_OK) + break; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + uLong uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_NO_FLUSH); + if(uTotalOutBefore > zi->ci.stream.total_out) + { + int bBreak = 0; + bBreak++; + } + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + else + { + uInt copy_this,i; + if (zi->ci.stream.avail_in < zi->ci.stream.avail_out) + copy_this = zi->ci.stream.avail_in; + else + copy_this = zi->ci.stream.avail_out; + + for (i = 0; i < copy_this; i++) + *(((char*)zi->ci.stream.next_out)+i) = + *(((const char*)zi->ci.stream.next_in)+i); + { + zi->ci.stream.avail_in -= copy_this; + zi->ci.stream.avail_out-= copy_this; + zi->ci.stream.next_in+= copy_this; + zi->ci.stream.next_out+= copy_this; + zi->ci.stream.total_in+= copy_this; + zi->ci.stream.total_out+= copy_this; + zi->ci.pos_in_buffered_data += copy_this; + } + } + }// while(...) + } + + return err; +} + +extern int ZEXPORT zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) +{ + return zipCloseFileInZipRaw64 (file, uncompressed_size, crc32); +} + +extern int ZEXPORT zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) +{ + zip64_internal* zi; + ZPOS64_T compressed_size; + uLong invalidValue = 0xffffffff; + short datasize = 0; + int err=ZIP_OK; + + if (file == NULL) + return ZIP_PARAMERROR; + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 0) + return ZIP_PARAMERROR; + zi->ci.stream.avail_in = 0; + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + while (err==ZIP_OK) + { + uLong uTotalOutBefore; + if (zi->ci.stream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.stream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.stream.next_out = zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.stream.total_out; + err=deflate(&zi->ci.stream, Z_FINISH); + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.stream.total_out - uTotalOutBefore) ; + } + } + else if ((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { +#ifdef HAVE_BZIP2 + err = BZ_FINISH_OK; + while (err==BZ_FINISH_OK) + { + uLong uTotalOutBefore; + if (zi->ci.bstream.avail_out == 0) + { + if (zip64FlushWriteBuffer(zi) == ZIP_ERRNO) + err = ZIP_ERRNO; + zi->ci.bstream.avail_out = (uInt)Z_BUFSIZE; + zi->ci.bstream.next_out = (char*)zi->ci.buffered_data; + } + uTotalOutBefore = zi->ci.bstream.total_out_lo32; + err=BZ2_bzCompress(&zi->ci.bstream, BZ_FINISH); + if(err == BZ_STREAM_END) + err = Z_STREAM_END; + + zi->ci.pos_in_buffered_data += (uInt)(zi->ci.bstream.total_out_lo32 - uTotalOutBefore); + } + + if(err == BZ_FINISH_OK) + err = ZIP_OK; +#endif + } + + if (err==Z_STREAM_END) + err=ZIP_OK; /* this is normal */ + + if ((zi->ci.pos_in_buffered_data>0) && (err==ZIP_OK)) + { + if (zip64FlushWriteBuffer(zi)==ZIP_ERRNO) + err = ZIP_ERRNO; + } + + if ((zi->ci.method == Z_DEFLATED) && (!zi->ci.raw)) + { + int tmp_err = deflateEnd(&zi->ci.stream); + if (err == ZIP_OK) + err = tmp_err; + zi->ci.stream_initialised = 0; + } +#ifdef HAVE_BZIP2 + else if((zi->ci.method == Z_BZIP2ED) && (!zi->ci.raw)) + { + int tmperr = BZ2_bzCompressEnd(&zi->ci.bstream); + if (err==ZIP_OK) + err = tmperr; + zi->ci.stream_initialised = 0; + } +#endif + + if (!zi->ci.raw) + { + crc32 = (uLong)zi->ci.crc32; + uncompressed_size = zi->ci.totalUncompressedData; + } + compressed_size = zi->ci.totalCompressedData; + +# ifndef NOCRYPT + compressed_size += zi->ci.crypt_header_size; +# endif + + // update Current Item crc and sizes, + if(compressed_size >= 0xffffffff || uncompressed_size >= 0xffffffff || zi->ci.pos_local_header >= 0xffffffff) + { + /*version Made by*/ + zip64local_putValue_inmemory(zi->ci.central_header+4,(uLong)45,2); + /*version needed*/ + zip64local_putValue_inmemory(zi->ci.central_header+6,(uLong)45,2); + + } + + zip64local_putValue_inmemory(zi->ci.central_header+16,crc32,4); /*crc*/ + + + if(compressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+20, invalidValue,4); /*compr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+20, compressed_size,4); /*compr size*/ + + /// set internal file attributes field + if (zi->ci.stream.data_type == Z_ASCII) + zip64local_putValue_inmemory(zi->ci.central_header+36,(uLong)Z_ASCII,2); + + if(uncompressed_size >= 0xffffffff) + zip64local_putValue_inmemory(zi->ci.central_header+24, invalidValue,4); /*uncompr size*/ + else + zip64local_putValue_inmemory(zi->ci.central_header+24, uncompressed_size,4); /*uncompr size*/ + + // Add ZIP64 extra info field for uncompressed size + if(uncompressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for compressed size + if(compressed_size >= 0xffffffff) + datasize += 8; + + // Add ZIP64 extra info field for relative offset to local file header of current file + if(zi->ci.pos_local_header >= 0xffffffff) + datasize += 8; + + if(datasize > 0) + { + char* p = NULL; + + if((uLong)(datasize + 4) > zi->ci.size_centralExtraFree) + { + // we can not write more data to the buffer that we have room for. + return ZIP_BADZIPFILE; + } + + p = zi->ci.central_header + zi->ci.size_centralheader; + + // Add Extra Information Header for 'ZIP64 information' + zip64local_putValue_inmemory(p, 0x0001, 2); // HeaderID + p += 2; + zip64local_putValue_inmemory(p, datasize, 2); // DataSize + p += 2; + + if(uncompressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, uncompressed_size, 8); + p += 8; + } + + if(compressed_size >= 0xffffffff) + { + zip64local_putValue_inmemory(p, compressed_size, 8); + p += 8; + } + + if(zi->ci.pos_local_header >= 0xffffffff) + { + zip64local_putValue_inmemory(p, zi->ci.pos_local_header, 8); + p += 8; + } + + // Update how much extra free space we got in the memory buffer + // and increase the centralheader size so the new ZIP64 fields are included + // ( 4 below is the size of HeaderID and DataSize field ) + zi->ci.size_centralExtraFree -= datasize + 4; + zi->ci.size_centralheader += datasize + 4; + + // Update the extra info size field + zi->ci.size_centralExtra += datasize + 4; + zip64local_putValue_inmemory(zi->ci.central_header+30,(uLong)zi->ci.size_centralExtra,2); + } + + if (err==ZIP_OK) + err = add_data_in_datablock(&zi->central_dir, zi->ci.central_header, (uLong)zi->ci.size_centralheader); + + free(zi->ci.central_header); + + if (err==ZIP_OK) + { + // Update the LocalFileHeader with the new values. + + ZPOS64_T cur_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_local_header + 14,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,crc32,4); /* crc 32, unknown */ + + if(uncompressed_size >= 0xffffffff || compressed_size >= 0xffffffff ) + { + if(zi->ci.pos_zip64extrainfo > 0) + { + // Update the size in the ZIP64 extended field. + if (ZSEEK64(zi->z_filefunc,zi->filestream, zi->ci.pos_zip64extrainfo + 4,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, uncompressed_size, 8); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, compressed_size, 8); + } + else + err = ZIP_BADZIPFILE; // Caller passed zip64 = 0, so no room for zip64 info -> fatal + } + else + { + if (err==ZIP_OK) /* compressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,compressed_size,4); + + if (err==ZIP_OK) /* uncompressed size, unknown */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,uncompressed_size,4); + } + + if (ZSEEK64(zi->z_filefunc,zi->filestream, cur_pos_inzip,ZLIB_FILEFUNC_SEEK_SET)!=0) + err = ZIP_ERRNO; + } + + zi->number_entry ++; + zi->in_opened_file_inzip = 0; + + return err; +} + +extern int ZEXPORT zipCloseFileInZip (zipFile file) +{ + return zipCloseFileInZipRaw (file,0,0); +} + +int Write_Zip64EndOfCentralDirectoryLocator(zip64_internal* zi, ZPOS64_T zip64eocd_pos_inzip) +{ + int err = ZIP_OK; + ZPOS64_T pos = zip64eocd_pos_inzip - zi->add_position_when_writting_offset; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDLOCHEADERMAGIC,4); + + /*num disks*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + /*relative offset*/ + if (err==ZIP_OK) /* Relative offset to the Zip64EndOfCentralDirectory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, pos,8); + + /*total disks*/ /* Do not support spawning of disk so always say 1 here*/ + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)1,4); + + return err; +} + +int Write_Zip64EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + uLong Zip64DataSize = 44; + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ZIP64ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* size of this 'zip64 end of central directory' */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)Zip64DataSize,8); // why ZPOS64_T of this ? + + if (err==ZIP_OK) /* version made by */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* version needed */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)45,2); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,4); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* total number of entries in the central dir */ + err = zip64local_putValue(&zi->z_filefunc, zi->filestream, zi->number_entry, 8); + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(ZPOS64_T)size_centraldir,8); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (ZPOS64_T)pos,8); + } + return err; +} +int Write_EndOfCentralDirectoryRecord(zip64_internal* zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) +{ + int err = ZIP_OK; + + /*signature*/ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)ENDHEADERMAGIC,4); + + if (err==ZIP_OK) /* number of this disk */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* number of the disk with the start of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0,2); + + if (err==ZIP_OK) /* total number of entries in the central dir on this disk */ + { + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + } + + if (err==ZIP_OK) /* total number of entries in the central dir */ + { + if(zi->number_entry >= 0xFFFF) + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)0xffff,2); // use value in ZIP64 record + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)zi->number_entry,2); + } + + if (err==ZIP_OK) /* size of the central directory */ + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_centraldir,4); + + if (err==ZIP_OK) /* offset of start of central directory with respect to the starting disk number */ + { + ZPOS64_T pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff) + { + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)0xffffffff,4); + } + else + err = zip64local_putValue(&zi->z_filefunc,zi->filestream, (uLong)(centraldir_pos_inzip - zi->add_position_when_writting_offset),4); + } + + return err; +} + +int Write_GlobalComment(zip64_internal* zi, const char* global_comment) +{ + int err = ZIP_OK; + uInt size_global_comment = 0; + + if(global_comment != NULL) + size_global_comment = (uInt)strlen(global_comment); + + err = zip64local_putValue(&zi->z_filefunc,zi->filestream,(uLong)size_global_comment,2); + + if (err == ZIP_OK && size_global_comment > 0) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, global_comment, size_global_comment) != size_global_comment) + err = ZIP_ERRNO; + } + return err; +} + +extern int ZEXPORT zipClose (zipFile file, const char* global_comment) +{ + zip64_internal* zi; + int err = 0; + uLong size_centraldir = 0; + ZPOS64_T centraldir_pos_inzip; + ZPOS64_T pos; + + if (file == NULL) + return ZIP_PARAMERROR; + + zi = (zip64_internal*)file; + + if (zi->in_opened_file_inzip == 1) + { + err = zipCloseFileInZip (file); + } + +#ifndef NO_ADDFILEINEXISTINGZIP + if (global_comment==NULL) + global_comment = zi->globalcomment; +#endif + + centraldir_pos_inzip = ZTELL64(zi->z_filefunc,zi->filestream); + + if (err==ZIP_OK) + { + linkedlist_datablock_internal* ldi = zi->central_dir.first_block; + while (ldi!=NULL) + { + if ((err==ZIP_OK) && (ldi->filled_in_this_block>0)) + { + if (ZWRITE64(zi->z_filefunc,zi->filestream, ldi->data, ldi->filled_in_this_block) != ldi->filled_in_this_block) + err = ZIP_ERRNO; + } + + size_centraldir += ldi->filled_in_this_block; + ldi = ldi->next_datablock; + } + } + free_linkedlist(&(zi->central_dir)); + + pos = centraldir_pos_inzip - zi->add_position_when_writting_offset; + if(pos >= 0xffffffff || zi->number_entry > 0xFFFF) + { + ZPOS64_T Zip64EOCDpos = ZTELL64(zi->z_filefunc,zi->filestream); + Write_Zip64EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + Write_Zip64EndOfCentralDirectoryLocator(zi, Zip64EOCDpos); + } + + if (err==ZIP_OK) + err = Write_EndOfCentralDirectoryRecord(zi, size_centraldir, centraldir_pos_inzip); + + if(err == ZIP_OK) + err = Write_GlobalComment(zi, global_comment); + + if (ZCLOSE64(zi->z_filefunc,zi->filestream) != 0) + if (err == ZIP_OK) + err = ZIP_ERRNO; + +#ifndef NO_ADDFILEINEXISTINGZIP + TRYFREE(zi->globalcomment); +#endif + TRYFREE(zi); + + return err; +} + +extern int ZEXPORT zipRemoveExtraInfoBlock (char* pData, int* dataLen, short sHeader) +{ + char* p = pData; + int size = 0; + char* pNewHeader; + char* pTmp; + short header; + short dataSize; + + int retVal = ZIP_OK; + + if(pData == NULL || *dataLen < 4) + return ZIP_PARAMERROR; + + pNewHeader = (char*)ALLOC(*dataLen); + pTmp = pNewHeader; + + while(p < (pData + *dataLen)) + { + header = *(short*)p; + dataSize = *(((short*)p)+1); + + if( header == sHeader ) // Header found. + { + p += dataSize + 4; // skip it. do not copy to temp buffer + } + else + { + // Extra Info block should not be removed, So copy it to the temp buffer. + memcpy(pTmp, p, dataSize + 4); + p += dataSize + 4; + size += dataSize + 4; + } + + } + + if(size < *dataLen) + { + // clean old extra info block. + memset(pData,0, *dataLen); + + // copy the new extra info block over the old + if(size > 0) + memcpy(pData, pNewHeader, size); + + // set the new extra info size + *dataLen = size; + + retVal = ZIP_OK; + } + else + retVal = ZIP_ERRNO; + + TRYFREE(pNewHeader); + + return retVal; +} diff --git a/Telegram/SourceFiles/_other/zip.h b/Telegram/SourceFiles/_other/zip.h new file mode 100644 index 00000000000000..8aaebb623430fc --- /dev/null +++ b/Telegram/SourceFiles/_other/zip.h @@ -0,0 +1,362 @@ +/* zip.h -- IO on .zip files using zlib + Version 1.1, February 14h, 2010 + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + + --------------------------------------------------------------------------- + + Condition of use and distribution are the same than zlib : + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + --------------------------------------------------------------------------- + + Changes + + See header of zip.h + +*/ + +#ifndef _zip12_H +#define _zip12_H + +#ifdef __cplusplus +extern "C" { +#endif + +//#define HAVE_BZIP2 + +#ifndef _ZLIB_H +#include "zlib.h" +#endif + +#ifndef _ZLIBIOAPI_H +#include "ioapi.h" +#endif + +#ifdef HAVE_BZIP2 +#include "bzlib.h" +#endif + +#define Z_BZIP2ED 12 + +#if defined(STRICTZIP) || defined(STRICTZIPUNZIP) +/* like the STRICT of WIN32, we define a pointer that cannot be converted + from (void*) without cast */ +typedef struct TagzipFile__ { int unused; } zipFile__; +typedef zipFile__ *zipFile; +#else +typedef voidp zipFile; +#endif + +#define ZIP_OK (0) +#define ZIP_EOF (0) +#define ZIP_ERRNO (Z_ERRNO) +#define ZIP_PARAMERROR (-102) +#define ZIP_BADZIPFILE (-103) +#define ZIP_INTERNALERROR (-104) + +#ifndef DEF_MEM_LEVEL +# if MAX_MEM_LEVEL >= 8 +# define DEF_MEM_LEVEL 8 +# else +# define DEF_MEM_LEVEL MAX_MEM_LEVEL +# endif +#endif +/* default memLevel */ + +/* tm_zip contain date/time info */ +typedef struct tm_zip_s +{ + uInt tm_sec; /* seconds after the minute - [0,59] */ + uInt tm_min; /* minutes after the hour - [0,59] */ + uInt tm_hour; /* hours since midnight - [0,23] */ + uInt tm_mday; /* day of the month - [1,31] */ + uInt tm_mon; /* months since January - [0,11] */ + uInt tm_year; /* years - [1980..2044] */ +} tm_zip; + +typedef struct +{ + tm_zip tmz_date; /* date in understandable format */ + uLong dosDate; /* if dos_date == 0, tmu_date is used */ +/* uLong flag; */ /* general purpose bit flag 2 bytes */ + + uLong internal_fa; /* internal file attributes 2 bytes */ + uLong external_fa; /* external file attributes 4 bytes */ +} zip_fileinfo; + +typedef const char* zipcharpc; + + +#define APPEND_STATUS_CREATE (0) +#define APPEND_STATUS_CREATEAFTER (1) +#define APPEND_STATUS_ADDINZIP (2) + +extern zipFile ZEXPORT zipOpen OF((const char *pathname, int append)); +extern zipFile ZEXPORT zipOpen64 OF((const void *pathname, int append)); +/* + Create a zipfile. + pathname contain on Windows XP a filename like "c:\\zlib\\zlib113.zip" or on + an Unix computer "zlib/zlib113.zip". + if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip + will be created at the end of the file. + (useful if the file contain a self extractor code) + if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will + add files in existing zip (be sure you don't add file that doesn't exist) + If the zipfile cannot be opened, the return value is NULL. + Else, the return value is a zipFile Handle, usable with other function + of this zip package. +*/ + +/* Note : there is no delete function into a zipfile. + If you want delete file into a zipfile, you must open a zipfile, and create another + Of couse, you can use RAW reading and writing to copy the file you did not want delte +*/ + +extern zipFile ZEXPORT zipOpen2 OF((const char *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc_def* pzlib_filefunc_def)); + +extern zipFile ZEXPORT zipOpen2_64 OF((const void *pathname, + int append, + zipcharpc* globalcomment, + zlib_filefunc64_def* pzlib_filefunc_def)); + +extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level)); + +extern int ZEXPORT zipOpenNewFileInZip64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int zip64)); + +/* + Open a file in the ZIP for writing. + filename : the filename in zip (if NULL, '-' without quote will be used + *zipfi contain supplemental information + if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local + contains the extrafield data the the local header + if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global + contains the extrafield data the the local header + if comment != NULL, comment contain the comment string + method contain the compression method (0 for store, Z_DEFLATED for deflate) + level contain the level of compression (can be Z_DEFAULT_COMPRESSION) + zip64 is set to 1 if a zip64 extended information block should be added to the local file header. + this MUST be '1' if the uncompressed size is >= 0xffffffff. + +*/ + + +extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw)); + + +extern int ZEXPORT zipOpenNewFileInZip2_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int zip64)); +/* + Same than zipOpenNewFileInZip, except if raw=1, we write raw file + */ + +extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting)); + +extern int ZEXPORT zipOpenNewFileInZip3_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + int zip64 + )); + +/* + Same than zipOpenNewFileInZip2, except + windowBits,memLevel,,strategy : see parameter strategy in deflateInit2 + password : crypting password (NULL for no crypting) + crcForCrypting : crc of file to compress (needed for crypting) + */ + +extern int ZEXPORT zipOpenNewFileInZip4 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase + )); + + +extern int ZEXPORT zipOpenNewFileInZip4_64 OF((zipFile file, + const char* filename, + const zip_fileinfo* zipfi, + const void* extrafield_local, + uInt size_extrafield_local, + const void* extrafield_global, + uInt size_extrafield_global, + const char* comment, + int method, + int level, + int raw, + int windowBits, + int memLevel, + int strategy, + const char* password, + uLong crcForCrypting, + uLong versionMadeBy, + uLong flagBase, + int zip64 + )); +/* + Same than zipOpenNewFileInZip4, except + versionMadeBy : value for Version made by field + flag : value for flag field (compression level info will be added) + */ + + +extern int ZEXPORT zipWriteInFileInZip OF((zipFile file, + const void* buf, + unsigned len)); +/* + Write data in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZip OF((zipFile file)); +/* + Close the current file in the zipfile +*/ + +extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file, + uLong uncompressed_size, + uLong crc32)); + +extern int ZEXPORT zipCloseFileInZipRaw64 OF((zipFile file, + ZPOS64_T uncompressed_size, + uLong crc32)); + +/* + Close the current file in the zipfile, for file opened with + parameter raw=1 in zipOpenNewFileInZip2 + uncompressed_size and crc32 are value for the uncompressed size +*/ + +extern int ZEXPORT zipClose OF((zipFile file, + const char* global_comment)); +/* + Close the zipfile +*/ + + +extern int ZEXPORT zipRemoveExtraInfoBlock OF((char* pData, int* dataLen, short sHeader)); +/* + zipRemoveExtraInfoBlock - Added by Mathias Svensson + + Remove extra information block from a extra information data for the local file header or central directory header + + It is needed to remove ZIP64 extra information blocks when before data is written if using RAW mode. + + 0x0001 is the signature header for the ZIP64 extra information blocks + + usage. + Remove ZIP64 Extra information from a central director extra field data + zipRemoveExtraInfoBlock(pCenDirExtraFieldData, &nCenDirExtraFieldDataLen, 0x0001); + + Remove ZIP64 Extra information from a Local File Header extra field data + zipRemoveExtraInfoBlock(pLocalHeaderExtraFieldData, &nLocalHeaderExtraFieldDataLen, 0x0001); +*/ + +#ifdef __cplusplus +} +#endif + +#endif /* _zip64_H */ diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index e12b643c21d3b9..3a992e7065b84a 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -2610,9 +2610,14 @@ namespace App { } QNetworkProxy getHttpProxySettings() { - if (cConnectionType() == dbictHttpProxy) { - const ConnectionProxy &p(cConnectionProxy()); - return QNetworkProxy(QNetworkProxy::HttpProxy, p.host, p.port, p.user, p.password); + const ConnectionProxy *proxy = 0; + if (Sandbox::started()) { + proxy = (cConnectionType() == dbictHttpProxy) ? (&cConnectionProxy()) : 0; + } else { + proxy = Global::PreLaunchProxy().host.isEmpty() ? 0 : (&Global::PreLaunchProxy()); + } + if (proxy) { + return QNetworkProxy(QNetworkProxy::HttpProxy, proxy->host, proxy->port, proxy->user, proxy->password); } return QNetworkProxy(QNetworkProxy::DefaultProxy); } diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 49baf5714c1ae6..6149620a9b3aef 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -311,7 +311,7 @@ void Application::readClients() { for (int32 to = cmds.indexOf(QChar(';'), from); to >= from; to = (from < l) ? cmds.indexOf(QChar(';'), from) : -1) { QStringRef cmd(&cmds, from, to - from); if (cmd.startsWith(qsl("CMD:"))) { - App::app()->execExternal(cmds.mid(from + 4, to - from - 4)); + Sandboxer::execExternal(cmds.mid(from + 4, to - from - 4)); QByteArray response(qsl("RES:%1;").arg(QCoreApplication::applicationPid()).toLatin1()); i->first->write(response.data(), response.size()); } else if (cmd.startsWith(qsl("SEND:"))) { @@ -485,7 +485,7 @@ void Application::startUpdateCheck(bool forceWait) { if (_updateThread || _updateReply || !cAutoUpdate()) return; int32 constDelay = cBetaVersion() ? 600 : UpdateDelayConstPart, randDelay = cBetaVersion() ? 300 : UpdateDelayRandPart; - int32 updateInSecs = cLastUpdateCheck() + constDelay + int32(MTP::nonce() % randDelay) - unixtime(); + int32 updateInSecs = cLastUpdateCheck() + constDelay + int32(rand() % randDelay) - unixtime(); bool sendRequest = (updateInSecs <= 0 || updateInSecs > (constDelay + randDelay)); if (!sendRequest && !forceWait) { QDir updates(cWorkingDir() + "tupdates"); @@ -564,6 +564,17 @@ namespace Sandboxer { return false; } + void execExternal(const QString &cmd) { + DEBUG_LOG(("Application Info: executing external command '%1'").arg(cmd)); + if (cmd == "show") { + if (App::wnd()) { + App::wnd()->activate(); + } else if (PreLaunchWindow::instance()) { + PreLaunchWindow::instance()->activate(); + } + } + } + #ifndef TDESKTOP_DISABLE_AUTOUPDATE void startUpdateCheck() { @@ -643,6 +654,8 @@ AppClass::AppClass() : QObject() , _uploader(0) { AppObject = this; + Fonts::start(); + ThirdParty::start(); Sandbox::start(); Local::start(); @@ -658,10 +671,6 @@ AppClass::AppClass() : QObject() application()->installEventFilter(new EventFilterForKeys(this)); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Regular.ttf")); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Bold.ttf")); - QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Semibold.ttf")); - float64 dpi = QApplication::primaryScreen()->logicalDotsPerInch(); if (dpi <= 108) { // 0-96-108 cSetScreenScale(dbisOne); @@ -1030,13 +1039,6 @@ void AppClass::checkMapVersion() { } } -void AppClass::execExternal(const QString &cmd) { - DEBUG_LOG(("Application Info: executing external command '%1'").arg(cmd)); - if (cmd == "show") { - _window.activate(); - } -} - AppClass::~AppClass() { _window.setParent(0); anim::stopManager(); diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index f1671f2dd05cd4..940f83819be365 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -113,6 +113,8 @@ namespace Sandboxer { void setActiveWindow(QWidget *window); bool isSavingSession(); + void execExternal(const QString &cmd); + #ifndef TDESKTOP_DISABLE_AUTOUPDATE void startUpdateCheck(); @@ -174,8 +176,6 @@ class AppClass : public QObject, public RPCSender { void checkLocalTime(); void checkMapVersion(); - void execExternal(const QString &cmd); - signals: void peerPhotoDone(PeerId peer); diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 2ee10cd55f3a0a..129ec45cc07b07 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -4320,7 +4320,7 @@ void MentionsDropdown::updateFiltered(bool resetScroll) { if (it->emoji.isEmpty()) { setsToRequest.insert(it->id, it->access); it->flags |= MTPDstickerSet_flag_NOT_LOADED; - } else { + } else if (!(it->flags & MTPDstickerSet::flag_disabled)) { StickersByEmojiMap::const_iterator i = it->emoji.constFind(emojiGetNoColor(_emoji)); if (i != it->emoji.cend()) { srows += *i; diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 2c3fd675fb8663..5023c7ed7a0f06 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -181,6 +181,7 @@ struct GlobalDataStruct { int32 LangSystem = languageDefault; QByteArray LastCrashDump; + ConnectionProxy PreLaunchProxy; }; GlobalDataStruct *GlobalData = 0; @@ -257,6 +258,8 @@ namespace Global { break; } } + + srand((int32)time(NULL)); } void finish() { @@ -281,6 +284,7 @@ Type &Ref##Name() { \ DefineGlobalReadOnly(QString, LangSystemISO); DefineGlobalReadOnly(int32, LangSystem); DefineGlobal(QByteArray, LastCrashDump); + DefineGlobal(ConnectionProxy, PreLaunchProxy); } @@ -291,6 +295,10 @@ SandboxDataStruct *SandboxData = 0; namespace Sandbox { + bool started() { + return SandboxData != 0; + } + void start() { SandboxData = new SandboxDataStruct(); diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index e86c125d923a7e..9797a95f3d46c4 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -112,11 +112,13 @@ namespace Global { DeclareGlobalReadOnly(QString, LangSystemISO); DeclareGlobalReadOnly(int32, LangSystem); DeclareGlobal(QByteArray, LastCrashDump); + DeclareGlobal(ConnectionProxy, PreLaunchProxy); } namespace Sandbox { + bool started(); void start(); void finish(); diff --git a/Telegram/SourceFiles/gui/images.cpp b/Telegram/SourceFiles/gui/images.cpp index 6437abf3f2c8d7..7f97ef7d497b91 100644 --- a/Telegram/SourceFiles/gui/images.cpp +++ b/Telegram/SourceFiles/gui/images.cpp @@ -787,11 +787,11 @@ StorageImage::StorageImage(const StorageImageLocation &location, QByteArray &byt } } -int32 StorageImage::width() const { +int32 StorageImage::countWidth() const { return _location.width(); } -int32 StorageImage::height() const { +int32 StorageImage::countHeight() const { return _location.height(); } @@ -917,11 +917,11 @@ StorageImage *getImage(const StorageImageLocation &location, const QByteArray &b WebImage::WebImage(const QString &url) : _url(url), _size(0), _width(0), _height(0) { } -int32 WebImage::width() const { +int32 WebImage::countWidth() const { return _width; } -int32 WebImage::height() const { +int32 WebImage::countHeight() const { return _height; } diff --git a/Telegram/SourceFiles/gui/images.h b/Telegram/SourceFiles/gui/images.h index 5ef9d932828af0..a79890f5c65aff 100644 --- a/Telegram/SourceFiles/gui/images.h +++ b/Telegram/SourceFiles/gui/images.h @@ -154,14 +154,12 @@ class Image { QPixmap pixColoredNoCache(const style::color &add, int32 w = 0, int32 h = 0, bool smooth = false) const; QPixmap pixBlurredColoredNoCache(const style::color &add, int32 w, int32 h = 0) const; - virtual int32 width() const { - restore(); - return _data.width(); + int32 width() const { + return qMax(countWidth(), 1); } - virtual int32 height() const { - restore(); - return _data.height(); + int32 height() const { + return qMax(countHeight(), 1); } virtual void load(bool loadFirst = false, bool prior = true) { @@ -203,6 +201,16 @@ class Image { } void invalidateSizeCache() const; + virtual int32 countWidth() const { + restore(); + return _data.width(); + } + + virtual int32 countHeight() const { + restore(); + return _data.height(); + } + mutable QByteArray _saved, _format; mutable bool _forgot; mutable QPixmap _data; @@ -283,9 +291,6 @@ class StorageImage : public RemoteImage { StorageImage(const StorageImageLocation &location, int32 size = 0); StorageImage(const StorageImageLocation &location, QByteArray &bytes); - int32 width() const; - int32 height() const; - virtual void setInformation(int32 size, int32 width, int32 height); virtual FileLoader *createLoader(LoadFromCloudSetting fromCloud, bool autoLoading); @@ -297,6 +302,9 @@ class StorageImage : public RemoteImage { StorageImageLocation _location; int32 _size; + virtual int32 countWidth() const; + virtual int32 countHeight() const; + }; class DelayedStorageImage : public StorageImage { @@ -341,12 +349,14 @@ class WebImage : public RemoteImage { WebImage(const QString &url); - int32 width() const; - int32 height() const; - virtual void setInformation(int32 size, int32 width, int32 height); virtual FileLoader *createLoader(LoadFromCloudSetting fromCloud, bool autoLoading); +protected: + + virtual int32 countWidth() const; + virtual int32 countHeight() const; + private: QString _url; int32 _size, _width, _height; diff --git a/Telegram/SourceFiles/gui/twidget.cpp b/Telegram/SourceFiles/gui/twidget.cpp index edd21afcd68f2d..8606aece7c27d2 100644 --- a/Telegram/SourceFiles/gui/twidget.cpp +++ b/Telegram/SourceFiles/gui/twidget.cpp @@ -22,6 +22,21 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "application.h" +namespace Fonts { + + bool Started = false; + void start() { + if (!Started) { + Started = true; + + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Regular.ttf")); + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Bold.ttf")); + QFontDatabase::addApplicationFont(qsl(":/gui/art/fonts/OpenSans-Semibold.ttf")); + } + } + +} + namespace { void _sendResizeEvents(QWidget *target) { QResizeEvent e(target->size(), QSize()); @@ -44,7 +59,7 @@ void myEnsureResized(QWidget *target) { } QPixmap myGrab(TWidget *target, QRect rect) { - myEnsureResized(target); + myEnsureResized(target); if (rect.isNull()) rect = target->rect(); QPixmap result(rect.size() * cRetinaFactor()); diff --git a/Telegram/SourceFiles/gui/twidget.h b/Telegram/SourceFiles/gui/twidget.h index d01504c2b793fe..d1eaeb1478312e 100644 --- a/Telegram/SourceFiles/gui/twidget.h +++ b/Telegram/SourceFiles/gui/twidget.h @@ -24,6 +24,10 @@ namespace App { const QPixmap &sprite(); } +namespace Fonts { + void start(); +} + class Painter : public QPainter { public: explicit Painter(QPaintDevice *device) : QPainter(device) { diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 46c8cc9df0a95a..94a7e5addc5481 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -552,6 +552,7 @@ namespace SignalHandlers { FILE *CrashDumpFile = 0; int CrashDumpFileNo = 0; char LaunchedDateTimeStr[32] = { 0 }; + char LaunchedBinaryName[256] = { 0 }; void _writeChar(char ch) { fwrite(&ch, 1, 1, CrashDumpFile); @@ -628,6 +629,8 @@ namespace SignalHandlers { if (!LoggingCrashHeaderWritten) { LoggingCrashHeaderWritten = true; + dump() << "Binary: " << LaunchedBinaryName << "\n"; + dump() << "ApiId: " << ApiId << "\n"; if (cBetaVersion()) { dump() << "Version: " << cBetaVersion() << " beta\n"; } else { @@ -685,6 +688,10 @@ namespace SignalHandlers { } Status restart() { + if (CrashDumpFile) { + return Started; + } + CrashDumpFile = fopen(CrashDumpPath.constData(), "wb"); if (CrashDumpFile) { CrashDumpFileNo = fileno(CrashDumpFile); @@ -693,6 +700,10 @@ namespace SignalHandlers { t_assert(launchedDateTime.size() < sizeof(LaunchedDateTimeStr)); memcpy(LaunchedDateTimeStr, launchedDateTime.constData(), launchedDateTime.size()); + QByteArray launchedBinaryName = cExeName().toUtf8(); + t_assert(launchedBinaryName.size() < sizeof(LaunchedBinaryName)); + memcpy(LaunchedBinaryName, launchedBinaryName.constData(), launchedBinaryName.size()); + signal(SIGABRT, SignalHandlers::Handler); signal(SIGSEGV, SignalHandlers::Handler); signal(SIGILL, SignalHandlers::Handler); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 61c6043c74d535..3407fc421e6187 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2221,7 +2221,7 @@ namespace { } void RegisterCustomScheme() { - #ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME +#ifndef TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME DEBUG_LOG(("App Info: Checking custom scheme 'tg'..")); HKEY rkey; @@ -2238,7 +2238,7 @@ void RegisterCustomScheme() { if (!_psOpenRegKey(L"Software\\Classes\\tg\\shell\\open", &rkey)) return; if (!_psOpenRegKey(L"Software\\Classes\\tg\\shell\\open\\command", &rkey)) return; if (!_psSetKeyValue(rkey, 0, '"' + exe + qsl("\" -workdir \"") + cWorkingDir() + qsl("\" -- \"%1\""))) return; - #endif +#endif } void psNewVersion() { @@ -2840,7 +2840,7 @@ void psWriteDump() { } char ImageHlpSymbol64[sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength]; -QString _showCrashDump(const QByteArray &crashdump) { +QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { HANDLE hProcess = GetCurrentProcess(); QString initial = QString::fromUtf8(crashdump), result; @@ -2862,6 +2862,7 @@ QString _showCrashDump(const QByteArray &crashdump) { version /= 1000; } } + ++i; break; } } @@ -2888,8 +2889,13 @@ QString _showCrashDump(const QByteArray &crashdump) { } if (!tolaunch.isEmpty()) { if (QFile(tolaunch).exists()) { - // run it - return QString(); + QString targs = qsl("-crash \"%1\"").arg(dumpfile.replace('"', qsl("\"\""))); + HINSTANCE r = ShellExecute(0, 0, QDir::toNativeSeparators(tolaunch).toStdWString().c_str(), targs.toStdWString().c_str(), 0, SW_SHOWNORMAL); + if (long(r) < 32) { + result.append(qsl("ERROR: executable '%1' with args '%2' for this crashdump could not be launched! Result: %3").arg(tolaunch).arg(targs).arg(long(r))); + } else { + return QString(); + } } else { result.append(qsl("ERROR: executable '%1' for this crashdump was not found!").arg(tolaunch)); } @@ -3088,7 +3094,7 @@ int psShowCrash(const QString &crashdump) { if (!LoadDbgHelp(true)) { text += qsl("ERROR: could not init dbghelp.dll!"); } else { - text += _showCrashDump(dump.readAll()); + text += _showCrashDump(dump.readAll(), crashdump); symCleanup(GetCurrentProcess()); } } else { @@ -3103,14 +3109,7 @@ int psShowCrash(const QString &crashdump) { char *a_argv[1] = { args[0].data() }; QApplication app(a_argc, a_argv); - QTextEdit wnd; - wnd.setReadOnly(true); - wnd.setPlainText(text); - - QRect scr(QApplication::primaryScreen()->availableGeometry()); - wnd.setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); - wnd.show(); - + ShowCrashReportWindow wnd(text); return app.exec(); } diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index f539a3a0372c9d..7d77c05eef6dc7 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -200,6 +200,10 @@ void settingsParseArgs(int argc, char *argv[]) { gExeDir = psCurrentExeDirectory(argc, argv); gExeName = psCurrentExeName(argc, argv); + if (argc == 2 && fromUtf8Safe(argv[1]).endsWith(qstr(".telegramcrash")) && QFile(fromUtf8Safe(argv[1])).exists()) { + gLaunchMode = LaunchModeShowCrash; + gStartUrl = fromUtf8Safe(argv[1]); + } for (int32 i = 0; i < argc; ++i) { if (string("-testmode") == argv[i]) { gTestMode = true; diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index 7294a6c4ad7cd3..ecb5d2468db515 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -329,7 +329,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) updateOnlineDisplay(); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE +#ifndef TDESKTOP_DISABLE_AUTOUPDATE switch (Sandboxer::updatingState()) { case Application::UpdatingDownload: setUpdatingState(UpdatingDownload, true); @@ -338,9 +338,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) case Application::UpdatingReady: setUpdatingState(UpdatingReady, true); break; default: setUpdatingState(UpdatingNone, true); break; } - #else - _updatingState = UpdatingNone; - #endif +#endif updateConnectionType(); @@ -1284,7 +1282,7 @@ void SettingsInner::onCheckNow() { #endif void SettingsInner::onRestartNow() { - #ifndef TDESKTOP_DISABLE_AUTOUPDATE +#ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); if (_updatingState == UpdatingReady) { cSetRestartingUpdate(true); @@ -1292,10 +1290,10 @@ void SettingsInner::onRestartNow() { cSetRestarting(true); cSetRestartingToSettings(true); } - #else +#else cSetRestarting(true); cSetRestartingToSettings(true); - #endif +#endif App::quit(); } diff --git a/Telegram/SourceFiles/settingswidget.h b/Telegram/SourceFiles/settingswidget.h index 821ce2a67d89af..c8a9c841f028c2 100644 --- a/Telegram/SourceFiles/settingswidget.h +++ b/Telegram/SourceFiles/settingswidget.h @@ -233,6 +233,7 @@ public slots: QString _curVersionText, _newVersionText; int32 _curVersionWidth, _newVersionWidth; +#ifndef TDESKTOP_DISABLE_AUTOUPDATE enum UpdatingState { UpdatingNone, UpdatingCheck, @@ -243,6 +244,7 @@ public slots: }; UpdatingState _updatingState; QString _newVersionDownload; +#endif // chat options FlatCheckbox _replaceEmojis; @@ -296,12 +298,10 @@ public slots: void offPasswordDone(const MTPBool &result); bool offPasswordFail(const RPCError &error); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE +#ifndef TDESKTOP_DISABLE_AUTOUPDATE void setUpdatingState(UpdatingState state, bool force = false); void setDownloadProgress(qint64 ready, qint64 total); - #endif - - +#endif }; class SettingsWidget : public TWidget { @@ -338,7 +338,7 @@ class SettingsWidget : public TWidget { public slots: void onParentResize(const QSize &newSize); - + private: void showAll(); diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index 8f285ba2013897..58a1c065b10ac4 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -42,6 +42,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include #include +#include #ifdef Q_OS_WIN // use Lzma SDK for win #include diff --git a/Telegram/SourceFiles/sysbuttons.cpp b/Telegram/SourceFiles/sysbuttons.cpp index 163ba004e4546a..8b618dfd7543c1 100644 --- a/Telegram/SourceFiles/sysbuttons.cpp +++ b/Telegram/SourceFiles/sysbuttons.cpp @@ -148,12 +148,13 @@ UpdateBtn::UpdateBtn(QWidget *parent, Window *window, const QString &text) : Sys } void UpdateBtn::onClick() { - #ifndef TDESKTOP_DISABLE_AUTOUPDATE +#ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); - #endif if (Sandboxer::updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); - } else { + } else +#endif + { cSetRestarting(true); cSetRestartingToSettings(false); } diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 83cb6909009855..86c55de51d7004 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -73,7 +73,12 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) _update.hide(); _cancel.hide(); _back.hide(); - if (Sandboxer::updatingState() == Application::UpdatingReady || cHasPasscode()) { + if ( +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + Sandboxer::updatingState() == Application::UpdatingReady || +#endif + cHasPasscode() + ) { showUpdateBtn(); } stateChanged(); @@ -322,7 +327,11 @@ void TitleWidget::showUpdateBtn() { } else { _lock.hide(); } +#ifndef TDESKTOP_DISABLE_AUTOUPDATE bool updateReady = (Sandboxer::updatingState() == Application::UpdatingReady); +#else + bool updateReady = false; +#endif if (updateReady || cEvalScale(cConfigScale()) != cEvalScale(cRealScale())) { _update.setText(lang(updateReady ? lng_menu_update : lng_menu_restart)); _update.show(); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 7c6ad727e770f3..e54c8e274135c9 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -36,9 +36,13 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "boxes/contactsbox.h" #include "boxes/addcontactbox.h" +#include "autoupdater.h" + #include "mediaview.h" #include "localstorage.h" +#include "_other/zip.h" + ConnectingWidget::ConnectingWidget(QWidget *parent, const QString &text, const QString &reconnect) : QWidget(parent), _shadow(st::boxShadow), _reconnect(this, QString()) { set(text, reconnect); connect(&_reconnect, SIGNAL(clicked()), this, SLOT(onReconnect())); @@ -451,7 +455,6 @@ void Window::firstShow() { trayIconMenu->deleteOnHide(false); #else trayIconMenu = new QMenu(this); - trayIconMenu->setFont(QFont("Tahoma")); #endif QString notificationItem = lang(cDesktopNotify() ? lng_disable_notifications_from_tray : lng_enable_notifications_from_tray); @@ -1826,61 +1829,1046 @@ Window::~Window() { delete settings; } -NotStartedWindow::NotStartedWindow() : TWidget(0) -, _label(this) -, _log(this) { - _label.setText(qsl("Could not start Telegram Desktop! Log:")); - _label.show(); +PreLaunchWindow *PreLaunchWindowInstance = 0; + +PreLaunchWindow::PreLaunchWindow(QString title) : TWidget(0) { + Fonts::start(); + + QIcon icon(QPixmap::fromImage(QImage(cPlatform() == dbipMac ? qsl(":/gui/art/iconbig256.png") : qsl(":/gui/art/icon256.png")), Qt::ColorOnly)); + if (cPlatform() == dbipLinux32 || cPlatform() == dbipLinux64) { + icon = QIcon::fromTheme("telegram", icon); + } + setWindowIcon(icon); + setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | Qt::WindowCloseButtonHint); + + setWindowTitle(title.isEmpty() ? qsl("Telegram") : title); + + QPalette p(palette()); + p.setColor(QPalette::Background, QColor(255, 255, 255)); + setPalette(p); + + QLabel tmp(this); + tmp.setText(qsl("Tmp")); + _size = tmp.sizeHint().height(); + + setStyleSheet(qsl("QPushButton { padding: %1px %2px; background-color: #ffffff; border-radius: %3px; }\nQPushButton#confirm:hover, QPushButton#cancel:hover { background-color: #edf7ff; color: #2f9fea; }\nQPushButton#confirm { color: #2f9fea; }\nQPushButton#cancel { color: #aeaeae; }\nQLineEdit { border: 1px solid #e0e0e0; padding: 5px; }\nQLineEdit:focus { border: 2px solid #62c0f7; padding: 4px; }").arg(qFloor(_size / 2)).arg(qFloor(_size)).arg(qFloor(_size / 5))); + if (!PreLaunchWindowInstance) { + PreLaunchWindowInstance = this; + } +} + +void PreLaunchWindow::activate() { + setWindowState(windowState() & ~Qt::WindowMinimized); + setVisible(true); + psActivateProcess(); + activateWindow(); +} + +PreLaunchWindow *PreLaunchWindow::instance() { + return PreLaunchWindowInstance; +} + +PreLaunchWindow::~PreLaunchWindow() { + if (PreLaunchWindowInstance == this) { + PreLaunchWindowInstance = 0; + } +} + +PreLaunchLabel::PreLaunchLabel(QWidget *parent) : QLabel(parent) { + QFont labelFont(font()); + labelFont.setFamily(qsl("Open Sans Semibold")); + labelFont.setPixelSize(static_cast(parent)->basicSize()); + setFont(labelFont); + + QPalette p(palette()); + p.setColor(QPalette::Foreground, QColor(0, 0, 0)); + setPalette(p); + show(); +}; + +void PreLaunchLabel::setText(const QString &text) { + QLabel::setText(text); + updateGeometry(); + resize(sizeHint()); +} + +PreLaunchInput::PreLaunchInput(QWidget *parent, bool password) : QLineEdit(parent) { + QFont logFont(font()); + logFont.setFamily(qsl("Open Sans")); + logFont.setPixelSize(static_cast(parent)->basicSize()); + setFont(logFont); + + QPalette p(palette()); + p.setColor(QPalette::Foreground, QColor(0, 0, 0)); + setPalette(p); + + QLineEdit::setTextMargins(0, 0, 0, 0); + setContentsMargins(0, 0, 0, 0); + if (password) { + setEchoMode(QLineEdit::Password); + } + show(); +}; + +PreLaunchLog::PreLaunchLog(QWidget *parent) : QTextEdit(parent) { + QFont logFont(font()); + logFont.setFamily(qsl("Open Sans")); + logFont.setPixelSize(static_cast(parent)->basicSize()); + setFont(logFont); + + QPalette p(palette()); + p.setColor(QPalette::Foreground, QColor(96, 96, 96)); + setPalette(p); + + setReadOnly(true); + setFrameStyle(QFrame::NoFrame | QFrame::Plain); + viewport()->setAutoFillBackground(false); + setContentsMargins(0, 0, 0, 0); + document()->setDocumentMargin(0); + show(); +}; + +PreLaunchButton::PreLaunchButton(QWidget *parent, bool confirm) : QPushButton(parent) { + setFlat(true); + + setObjectName(confirm ? "confirm" : "cancel"); + + QFont closeFont(font()); + closeFont.setFamily(qsl("Open Sans Semibold")); + closeFont.setPixelSize(static_cast(parent)->basicSize()); + setFont(closeFont); + + setCursor(Qt::PointingHandCursor); + show(); +}; + +void PreLaunchButton::setText(const QString &text) { + QPushButton::setText(text); + updateGeometry(); + resize(sizeHint()); +} + +NotStartedWindow::NotStartedWindow() +: _label(this) +, _log(this) +, _close(this) { + _label.setText(qsl("Could not start Telegram Desktop!\nYou can see complete log below:")); - _log.setReadOnly(true); _log.setPlainText(Logs::full()); - _log.show(); + + connect(&_close, SIGNAL(clicked()), this, SLOT(close())); + _close.setText(qsl("CLOSE")); QRect scr(QApplication::primaryScreen()->availableGeometry()); - setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + move(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6)); + updateControls(); show(); } +void NotStartedWindow::updateControls() { + _label.show(); + _log.show(); + _close.show(); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + QSize s(scr.width() / 2, scr.height() / 2); + if (s == size()) { + resizeEvent(0); + } else { + resize(s); + } +} + void NotStartedWindow::closeEvent(QCloseEvent *e) { deleteLater(); } void NotStartedWindow::resizeEvent(QResizeEvent *e) { - int padding = _label.sizeHint().height() / 2; + int padding = _size; _label.setGeometry(padding, padding, width() - 2 * padding, _label.sizeHint().height()); - _log.setGeometry(padding, padding * 2 + _label.sizeHint().height(), width() - 2 * padding, height() - 3 * padding - _label.sizeHint().height()); + _log.setGeometry(padding, padding * 2 + _label.sizeHint().height(), width() - 2 * padding, height() - 4 * padding - _label.height() - _close.height()); + _close.setGeometry(width() - padding - _close.width(), height() - padding - _close.height(), _close.width(), _close.height()); } -LastCrashedWindow::LastCrashedWindow() : TWidget(0) +LastCrashedWindow::LastCrashedWindow() +: _port(80) , _label(this) -, _log(this) -, _send(this) { - _label.setText(qsl("Could not start Telegram Desktop! Log:")); - _label.show(); +, _pleaseSendReport(this) +, _minidump(this) +, _report(this) +, _send(this) +, _sendSkip(this, false) +, _networkSettings(this) +, _continue(this) +, _showReport(this) +, _saveReport(this) +, _getApp(this) +, _reportText(QString::fromUtf8(Global::LastCrashDump())) +, _reportShown(false) +, _reportSaved(false) +, _sendingState(Global::LastCrashDump().isEmpty() ? SendingNoReport : SendingUpdateCheck) +, _updating(this) +, _sendingProgress(0) +, _sendingTotal(0) +, _checkReply(0) +, _sendReply(0) +#ifndef TDESKTOP_DISABLE_AUTOUPDATE +, _updatingCheck(this) +, _updatingSkip(this, false) +#endif +{ - _log.setReadOnly(true); - _log.setPlainText(Logs::full()); - _log.show(); +#ifdef Q_OS_WIN + if (_sendingState != SendingNoReport) { + QString maxDump, maxDumpFull; + QDateTime maxDumpModified; + qint64 maxDumpSize = 0; + QFileInfoList list = QDir(cWorkingDir() + qsl("tdumps")).entryInfoList(); + for (int32 i = 0, l = list.size(); i < l; ++i) { + if (maxDump.isEmpty() || maxDumpModified < list.at(i).lastModified()) { + maxDump = list.at(i).fileName(); + maxDumpFull = list.at(i).absoluteFilePath(); + maxDumpModified = list.at(i).lastModified(); + maxDumpSize = list.at(i).size(); + } + } + if (!maxDump.isEmpty()) { + if (qAbs(QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified().secsTo(maxDumpModified)) < 10) { + _minidumpName = maxDump; + _minidumpFull = maxDumpFull; + } + } - _send.setText(qsl("Send Crash Report")); - _send.show(); + _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(maxDumpSize / 1024)); + } +#endif + + _networkSettings.setText(qsl("NETWORK SETTINGS")); + connect(&_networkSettings, SIGNAL(clicked()), this, SLOT(onNetworkSettings())); + + if (_sendingState == SendingNoReport) { + _label.setText(qsl("Last time Telegram Desktop was not closed properly.")); + } else { + _label.setText(qsl("Last time Telegram Desktop crashed :(")); + } + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + _updatingCheck.setText(qsl("TRY AGAIN")); + connect(&_updatingCheck, SIGNAL(clicked()), this, SLOT(onUpdateRetry())); + _updatingSkip.setText(qsl("SKIP")); + connect(&_updatingSkip, SIGNAL(clicked()), this, SLOT(onUpdateSkip())); + + Sandboxer::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); + Sandboxer::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); + Sandboxer::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); + Sandboxer::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); + + switch (Sandboxer::updatingState()) { + case Application::UpdatingDownload: + setUpdatingState(UpdatingDownload, true); + setDownloadProgress(Sandboxer::updatingReady(), Sandboxer::updatingSize()); + break; + case Application::UpdatingReady: setUpdatingState(UpdatingReady, true); break; + default: setUpdatingState(UpdatingCheck, true); break; + } + + cSetLastUpdateCheck(0); + Sandboxer::startUpdateCheck(); +#else + _updating.setText(qsl("Please check if there is a new version available.")); + if (_sendingState != SendingNoReport) { + _sendingState = SendingNone; + } +#endif + + _pleaseSendReport.setText(qsl("Please send us a crash report.")); + + _report.setPlainText(_reportText); + + _showReport.setText(qsl("VIEW REPORT")); + connect(&_showReport, SIGNAL(clicked()), this, SLOT(onViewReport())); + _saveReport.setText(qsl("SAVE TO FILE")); + connect(&_saveReport, SIGNAL(clicked()), this, SLOT(onSaveReport())); + _getApp.setText(qsl("GET THE LATEST OFFICIAL VERSION OF TELEGRAM DESKTOP")); + connect(&_getApp, SIGNAL(clicked()), this, SLOT(onGetApp())); + + _send.setText(qsl("SEND CRASH REPORT")); + connect(&_send, SIGNAL(clicked()), this, SLOT(onSendReport())); + + _sendSkip.setText(qsl("SKIP")); + connect(&_sendSkip, SIGNAL(clicked()), this, SLOT(onContinue())); + _continue.setText(qsl("CONTINUE")); + connect(&_continue, SIGNAL(clicked()), this, SLOT(onContinue())); QRect scr(QApplication::primaryScreen()->availableGeometry()); - setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + move(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6)); + updateControls(); show(); } -void LastCrashedWindow::closeEvent(QCloseEvent *e) { - deleteLater(); +void LastCrashedWindow::onViewReport() { + _reportShown = !_reportShown; + updateControls(); +} + +void LastCrashedWindow::onSaveReport() { + QString to = QFileDialog::getSaveFileName(0, qsl("Telegram Crash Report"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + qsl("/report"), qsl("Telegram crash report (*.telegramcrash)")); + if (!to.isEmpty()) { + QFile file(to); + if (file.open(QIODevice::WriteOnly)) { + file.write(Global::LastCrashDump()); + _reportSaved = true; + updateControls(); + } + } +} + +void LastCrashedWindow::onGetApp() { + QDesktopServices::openUrl(qsl("https://desktop.telegram.org")); +} + +QString LastCrashedWindow::getReportField(const QLatin1String &name, const QLatin1String &prefix) { + QStringList lines = _reportText.split('\n'); + for (int32 i = 0, l = lines.size(); i < l; ++i) { + if (lines.at(i).trimmed().startsWith(prefix)) { + QString data = lines.at(i).trimmed().mid(prefix.size()).trimmed(); + + if (name == qstr("version")) { + if (data.endsWith(qstr(" beta"))) { + data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").mid(0, data.size() - 5).toLongLong()); + } else { + data = QString::number(data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong()); + } + } + + return data; + } + } + return QString(); +} + +void LastCrashedWindow::addReportFieldPart(const QLatin1String &name, const QLatin1String &prefix, QHttpMultiPart *multipart) { + QString data = getReportField(name, prefix); + if (!data.isEmpty()) { + QHttpPart reportPart; + reportPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant(qsl("form-data; name=\"%1\"").arg(name))); + reportPart.setBody(data.toUtf8()); + multipart->append(reportPart); + } +} + +void LastCrashedWindow::onSendReport() { + if (_checkReply) { + _checkReply->deleteLater(); + _checkReply = 0; + } + if (_sendReply) { + _sendReply->deleteLater(); + _sendReply = 0; + } + App::setProxySettings(_sendManager); + + QString apiid = getReportField(qstr("apiid"), qstr("ApiId:")), version = getReportField(qstr("version"), qstr("Version:")); + _checkReply = _sendManager.get(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=query_report&apiid=%1&version=%2").arg(apiid).arg(version))); + + connect(_checkReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onSendingError(QNetworkReply::NetworkError))); + connect(_checkReply, SIGNAL(finished()), this, SLOT(onCheckingFinished())); + + _pleaseSendReport.setText(qsl("Sending crash report..")); + _sendingState = SendingProgress; + _reportShown = false; + updateControls(); +} + +namespace { + struct zByteArray { + zByteArray() : pos(0), err(0) { + } + uLong pos; + int err; + QByteArray data; + }; + + voidpf zByteArrayOpenFile(voidpf opaque, const char* filename, int mode) { + zByteArray *ba = (zByteArray*)opaque; + if (mode & ZLIB_FILEFUNC_MODE_WRITE) { + if (mode & ZLIB_FILEFUNC_MODE_CREATE) { + ba->data.clear(); + } + ba->pos = ba->data.size(); + ba->data.reserve(2 * 1024 * 1024); + } else if (mode & ZLIB_FILEFUNC_MODE_READ) { + ba->pos = 0; + } + ba->err = 0; + return opaque; + } + + uLong zByteArrayReadFile(voidpf opaque, voidpf stream, void* buf, uLong size) { + zByteArray *ba = (zByteArray*)opaque; + uLong toRead = 0; + if (!ba->err) { + if (ba->data.size() > ba->pos) { + toRead = qMin(size, uLong(ba->data.size() - ba->pos)); + memcpy(buf, ba->data.constData() + ba->pos, toRead); + ba->pos += toRead; + } + if (toRead < size) { + ba->err = -1; + } + } + return toRead; + } + + uLong zByteArrayWriteFile(voidpf opaque, voidpf stream, const void* buf, uLong size) { + zByteArray *ba = (zByteArray*)opaque; + if (ba->data.size() < ba->pos + size) { + ba->data.resize(ba->pos + size); + } + memcpy(ba->data.data() + ba->pos, buf, size); + ba->pos += size; + return size; + } + + int zByteArrayCloseFile(voidpf opaque, voidpf stream) { + zByteArray *ba = (zByteArray*)opaque; + int result = ba->err; + ba->pos = 0; + ba->err = 0; + return result; + } + + int zByteArrayErrorFile(voidpf opaque, voidpf stream) { + zByteArray *ba = (zByteArray*)opaque; + return ba->err; + } + + long zByteArrayTellFile(voidpf opaque, voidpf stream) { + zByteArray *ba = (zByteArray*)opaque; + return ba->pos; + } + + long zByteArraySeekFile(voidpf opaque, voidpf stream, uLong offset, int origin) { + zByteArray *ba = (zByteArray*)opaque; + if (!ba->err) { + switch (origin) { + case ZLIB_FILEFUNC_SEEK_SET: ba->pos = offset; break; + case ZLIB_FILEFUNC_SEEK_CUR: ba->pos += offset; break; + case ZLIB_FILEFUNC_SEEK_END: ba->pos = ba->data.size() + offset; break; + } + if (ba->pos > ba->data.size()) { + ba->err = -1; + } + } + return ba->err; + } + +} + +void LastCrashedWindow::onCheckingFinished() { + if (!_checkReply || _sendReply) return; + + QByteArray result = _checkReply->readAll().trimmed(); + _checkReply->deleteLater(); + _checkReply = 0; + + LOG(("Crash report check for sending done, result: %1").arg(QString::fromUtf8(result))); + + if (result == "Many") { + _pleaseSendReport.setText(qsl("Too many crash reports at this moment :(")); + _sendingState = SendingTooMany; + updateControls(); + return; + } else if (result == "Unofficial") { + _pleaseSendReport.setText(qsl("You use some custom version of Telegram Desktop.")); + _sendingState = SendingUnofficial; + updateControls(); + return; + } else if (result != "Report") { + _pleaseSendReport.setText(qsl("This report is about some old version of Telegram Desktop.")); + _sendingState = SendingTooOld; + updateControls(); + return; + } + + QHttpMultiPart *multipart = new QHttpMultiPart(QHttpMultiPart::FormDataType); + + addReportFieldPart(qstr("platform"), qstr("Platform:"), multipart); + addReportFieldPart(qstr("version"), qstr("Version:"), multipart); + + QHttpPart reportPart; + reportPart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/octet-stream")); + reportPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"report\"; filename=\"report.telegramcrash\"")); + reportPart.setBody(Global::LastCrashDump()); + multipart->append(reportPart); + + QFileInfo dmpFile(_minidumpFull); + if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && + QRegularExpression(qsl("^Telegram\\-[\\d\\.\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { + QFile file(_minidumpFull); + if (file.open(QIODevice::ReadOnly)) { + QByteArray minidump = file.readAll(); + file.close(); + + QString zipName = dmpFile.fileName().replace(qstr(".dmp"), qstr(".zip")); + zByteArray minidumpZip; + + bool failed = false; + zlib_filefunc_def zfuncs; + zfuncs.opaque = &minidumpZip; + zfuncs.zopen_file = zByteArrayOpenFile; + zfuncs.zerror_file = zByteArrayErrorFile; + zfuncs.zread_file = zByteArrayReadFile; + zfuncs.zwrite_file = zByteArrayWriteFile; + zfuncs.zclose_file = zByteArrayCloseFile; + zfuncs.zseek_file = zByteArraySeekFile; + zfuncs.ztell_file = zByteArrayTellFile; + + if (zipFile zf = zipOpen2(0, APPEND_STATUS_CREATE, 0, &zfuncs)) { + zip_fileinfo zfi = { 0 }; + std::wstring fileName = dmpFile.fileName().toStdWString(); + if (zipOpenNewFileInZip(zf, std::string(fileName.begin(), fileName.end()).c_str(), &zfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) != S_OK) { + failed = true; + } else if (zipWriteInFileInZip(zf, minidump.constData(), minidump.size()) != 0) { + failed = true; + } else if (zipCloseFileInZip(zf) != 0) { + failed = true; + } + if (zipClose(zf, NULL) != 0) { + failed = true; + } + if (failed) { + minidumpZip.err = -1; + } + } + + if (!minidumpZip.err) { + QHttpPart dumpPart; + dumpPart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/octet-stream")); + dumpPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant(qsl("form-data; name=\"dump\"; filename=\"%1\"").arg(zipName))); + dumpPart.setBody(minidumpZip.data); + multipart->append(dumpPart); + + _minidump.setText(qsl("+ %1 (%2 KB)").arg(zipName).arg(minidumpZip.data.size() / 1024)); + } + } + } + + _sendReply = _sendManager.post(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=report")), multipart); + multipart->setParent(_sendReply); + + connect(_sendReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onSendingError(QNetworkReply::NetworkError))); + connect(_sendReply, SIGNAL(finished()), this, SLOT(onSendingFinished())); + connect(_sendReply, SIGNAL(uploadProgress(qint64,qint64)), this, SLOT(onSendingProgress(qint64,qint64))); + + updateControls(); +} + +void LastCrashedWindow::updateControls() { + int padding = _size, h = padding + _networkSettings.height() + padding; + + _label.show(); +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + h += _networkSettings.height() + padding; + if (_updatingState == UpdatingFail && (_sendingState == SendingNoReport || _sendingState == SendingUpdateCheck)) { + _networkSettings.show(); + _updatingCheck.show(); + _updatingSkip.show(); + _send.hide(); + _sendSkip.hide(); + _continue.hide(); + _pleaseSendReport.hide(); + _getApp.hide(); + _showReport.hide(); + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + h += padding + _updatingCheck.height() + padding; + } else { + if (_updatingState == UpdatingCheck || _sendingState == SendingFail || _sendingState == SendingProgress) { + _networkSettings.show(); + } else { + _networkSettings.hide(); + } + if (_updatingState == UpdatingNone || _updatingState == UpdatingLatest || _updatingState == UpdatingFail) { + h += padding + _updatingCheck.height() + padding; + if (_sendingState == SendingNoReport) { + _pleaseSendReport.hide(); + _getApp.hide(); + _showReport.hide(); + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + _send.hide(); + _sendSkip.hide(); + _continue.show(); + } else { + h += _showReport.height() + padding; + _pleaseSendReport.show(); + if (_sendingState == SendingTooOld || _sendingState == SendingUnofficial) { + QString verStr = getReportField(qstr("version"), qstr("Version:")); + qint64 ver = verStr.isEmpty() ? 0 : verStr.toLongLong(); + if (!ver || (ver == AppVersion) || (ver < 0 && (-ver / 1000) == AppVersion)) { + h += _getApp.height() + padding; + _getApp.show(); + } else { + _getApp.hide(); + } + _showReport.hide(); + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + _send.hide(); + _sendSkip.hide(); + _continue.show(); + } else { + _getApp.hide(); + if (_reportShown) { + h += (_pleaseSendReport.height() * 12.5) + padding + (_minidumpName.isEmpty() ? 0 : (_minidump.height() + padding)); + _report.show(); + if (_minidumpName.isEmpty()) { + _minidump.hide(); + } else { + _minidump.show(); + } + if (_reportSaved || _sendingState == SendingFail || _sendingState == SendingProgress || _sendingState == SendingUploading) { + _saveReport.hide(); + } else { + _saveReport.show(); + } + _showReport.hide(); + } else { + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + if (_sendingState == SendingFail || _sendingState == SendingProgress || _sendingState == SendingUploading) { + _showReport.hide(); + } else { + _showReport.show(); + } + } + if (_sendingState == SendingTooMany || _sendingState == SendingDone) { + _send.hide(); + _sendSkip.hide(); + _continue.show(); + } else { + if (_sendingState == SendingProgress || _sendingState == SendingUploading) { + _send.hide(); + } else { + _send.show(); + } + _sendSkip.show(); + _continue.hide(); + } + } + } + } else { + _getApp.hide(); + _pleaseSendReport.hide(); + _showReport.hide(); + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + _send.hide(); + _sendSkip.hide(); + _continue.hide(); + } + _updatingCheck.hide(); + if (_updatingState == UpdatingCheck || _updatingState == UpdatingDownload) { + h += padding + _updatingSkip.height() + padding; + _updatingSkip.show(); + } else { + _updatingSkip.hide(); + } + } +#else + h += _networkSettings.height() + padding; + h += padding + _send.height() + padding; + if (_sendingState == SendingNoReport) { + _pleaseSendReport.hide(); + _showReport.hide(); + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + _send.hide(); + _sendSkip.hide(); + _continue.show(); + _networkSettings.hide(); + } else { + h += _showReport.height() + padding; + _pleaseSendReport.show(); + if (_reportShown) { + h += (_pleaseSendReport.height() * 12.5) + padding + (_minidumpName.isEmpty() ? 0 : (_minidump.height() + padding)); + _report.show(); + if (_minidumpName.isEmpty()) { + _minidump.hide(); + } else { + _minidump.show(); + } + _showReport.hide(); + if (_reportSaved || _sendingState == SendingFail || _sendingState == SendingProgress || _sendingState == SendingUploading) { + _saveReport.hide(); + } else { + _saveReport.show(); + } + } else { + _report.hide(); + _minidump.hide(); + _saveReport.hide(); + if (_sendingState == SendingFail || _sendingState == SendingProgress || _sendingState == SendingUploading) { + _showReport.hide(); + } else { + _showReport.show(); + } + } + if (_sendingState == SendingDone) { + _send.hide(); + _sendSkip.hide(); + _continue.show(); + _networkSettings.hide(); + } else { + if (_sendingState == SendingProgress || _sendingState == SendingUploading) { + _send.hide(); + } else { + _send.show(); + } + _sendSkip.show(); + if (_sendingState == SendingFail) { + _networkSettings.show(); + } else { + _networkSettings.hide(); + } + _continue.hide(); + } + } + + _getApp.show(); + h += _networkSettings.height() + padding; +#endif + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + QSize s(2 * padding + QFontMetrics(_label.font()).width(qsl("Last time Telegram Desktop was not closed properly.")) + padding + _networkSettings.width(), h); + if (s == size()) { + resizeEvent(0); + } else { + resize(s); + } +} + +void LastCrashedWindow::onNetworkSettings() { + const ConnectionProxy &p(Global::PreLaunchProxy()); + NetworkSettingsWindow *box = new NetworkSettingsWindow(this, p.host, p.port ? p.port : 80, p.user, p.password); + connect(box, SIGNAL(saved(QString, quint32, QString, QString)), this, SLOT(onNetworkSettingsSaved(QString, quint32, QString, QString))); + box->show(); +} + +void LastCrashedWindow::onNetworkSettingsSaved(QString host, quint32 port, QString username, QString password) { + Global::RefPreLaunchProxy().host = host; + Global::RefPreLaunchProxy().port = port ? port : 80; + Global::RefPreLaunchProxy().user = username; + Global::RefPreLaunchProxy().password = password; +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + if ((_updatingState == UpdatingFail && (_sendingState == SendingNoReport || _sendingState == SendingUpdateCheck)) || (_updatingState == UpdatingCheck)) { + Sandboxer::stopUpdate(); + cSetLastUpdateCheck(0); + Sandboxer::startUpdateCheck(); + } else +#endif + if (_sendingState == SendingFail || _sendingState == SendingProgress) { + onSendReport(); + } + activate(); +} + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE +void LastCrashedWindow::setUpdatingState(UpdatingState state, bool force) { + if (_updatingState != state || force) { + _updatingState = state; + switch (state) { + case UpdatingLatest: + _updating.setText(qsl("Latest version is installed.")); + if (_sendingState == SendingNoReport) { + QTimer::singleShot(0, this, SLOT(onContinue())); + } else { + _sendingState = SendingNone; + } + break; + case UpdatingReady: + if (checkReadyUpdate()) { + cSetRestartingUpdate(true); + App::quit(); + return; + } else { + setUpdatingState(UpdatingFail); + return; + } + break; + case UpdatingCheck: + _updating.setText(qsl("Checking for updates..")); + break; + case UpdatingFail: + _updating.setText(qsl("Update check failed :(")); + break; + } + updateControls(); + } +} + +void LastCrashedWindow::setDownloadProgress(qint64 ready, qint64 total) { + qint64 readyTenthMb = (ready * 10 / (1024 * 1024)), totalTenthMb = (total * 10 / (1024 * 1024)); + QString readyStr = QString::number(readyTenthMb / 10) + '.' + QString::number(readyTenthMb % 10); + QString totalStr = QString::number(totalTenthMb / 10) + '.' + QString::number(totalTenthMb % 10); + QString res = qsl("Downloading update {ready} / {total} MB..").replace(qstr("{ready}"), readyStr).replace(qstr("{total}"), totalStr); + if (_newVersionDownload != res) { + _newVersionDownload = res; + _updating.setText(_newVersionDownload); + updateControls(); + } +} + +void LastCrashedWindow::onUpdateRetry() { + cSetLastUpdateCheck(0); + Sandboxer::startUpdateCheck(); +} + +void LastCrashedWindow::onUpdateSkip() { + if (_sendingState == SendingNoReport) { + onContinue(); + } else { + if (_updatingState == UpdatingCheck || _updatingState == UpdatingDownload) { + Sandboxer::stopUpdate(); + setUpdatingState(UpdatingFail); + } + _sendingState = SendingNone; + updateControls(); + } +} + +void LastCrashedWindow::onUpdateChecking() { + setUpdatingState(UpdatingCheck); +} + +void LastCrashedWindow::onUpdateLatest() { + setUpdatingState(UpdatingLatest); +} + +void LastCrashedWindow::onUpdateDownloading(qint64 ready, qint64 total) { + setUpdatingState(UpdatingDownload); + setDownloadProgress(ready, total); +} + +void LastCrashedWindow::onUpdateReady() { + setUpdatingState(UpdatingReady); +} + +void LastCrashedWindow::onUpdateFailed() { + setUpdatingState(UpdatingFail); +} +#endif + +void LastCrashedWindow::onContinue() { if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); } else { new AppClass(); } + close(); +} + +void LastCrashedWindow::onSendingError(QNetworkReply::NetworkError e) { + LOG(("Crash report sending error: %1").arg(e)); + + _pleaseSendReport.setText(qsl("Sending crash report failed :(")); + _sendingState = SendingFail; + if (_checkReply) { + _checkReply->deleteLater(); + _checkReply = 0; + } + if (_sendReply) { + _sendReply->deleteLater(); + _sendReply = 0; + } + updateControls(); +} + +void LastCrashedWindow::onSendingFinished() { + if (_sendReply) { + QByteArray result = _sendReply->readAll(); + LOG(("Crash report sending done, result: %1").arg(QString::fromUtf8(result))); + + _sendReply->deleteLater(); + _sendReply = 0; + _pleaseSendReport.setText(qsl("Thank you for your report!")); + _sendingState = SendingDone; + updateControls(); + + SignalHandlers::restart(); + } +} + +void LastCrashedWindow::onSendingProgress(qint64 uploaded, qint64 total) { + if (_sendingState != SendingProgress && _sendingState != SendingUploading) return; + _sendingState = SendingUploading; + + if (total < 0) { + _pleaseSendReport.setText(qsl("Sending crash report %1 KB..").arg(uploaded / 1024)); + } else { + _pleaseSendReport.setText(qsl("Sending crash report %1 / %2 KB..").arg(uploaded / 1024).arg(total / 1024)); + } + updateControls(); +} + +void LastCrashedWindow::closeEvent(QCloseEvent *e) { + deleteLater(); } void LastCrashedWindow::resizeEvent(QResizeEvent *e) { - int padding = _label.sizeHint().height() / 2; - _label.setGeometry(padding, padding, width() - 2 * padding, _label.sizeHint().height()); - _log.setGeometry(padding, padding * 2 + _label.sizeHint().height(), width() - 2 * padding, height() - 3 * padding - _label.sizeHint().height()); + int padding = _size; + _label.move(padding, padding + (_networkSettings.height() - _label.height()) / 2); + + _send.move(width() - padding - _send.width(), height() - padding - _send.height()); + if (_sendingState == SendingProgress || _sendingState == SendingUploading) { + _sendSkip.move(width() - padding - _sendSkip.width(), height() - padding - _sendSkip.height()); + } else { + _sendSkip.move(width() - padding - _send.width() - padding - _sendSkip.width(), height() - padding - _sendSkip.height()); + } + + _updating.move(padding, padding * 2 + _networkSettings.height() + (_networkSettings.height() - _updating.height()) / 2); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + _pleaseSendReport.move(padding, padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + (_showReport.height() - _pleaseSendReport.height()) / 2); + _showReport.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding); + _getApp.move((width() - _getApp.width()) / 2, _showReport.y() + _showReport.height() + padding); + + if (_sendingState == SendingFail || _sendingState == SendingProgress) { + _networkSettings.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding); + } else { + _networkSettings.move(padding * 2 + _updating.width(), padding * 2 + _networkSettings.height()); + } + + if (_updatingState == UpdatingCheck || _updatingState == UpdatingDownload) { + _updatingCheck.move(width() - padding - _updatingCheck.width(), height() - padding - _updatingCheck.height()); + _updatingSkip.move(width() - padding - _updatingSkip.width(), height() - padding - _updatingSkip.height()); + } else { + _updatingCheck.move(width() - padding - _updatingCheck.width(), height() - padding - _updatingCheck.height()); + _updatingSkip.move(width() - padding - _updatingCheck.width() - padding - _updatingSkip.width(), height() - padding - _updatingSkip.height()); + } +#else + _getApp.move((width() - _getApp.width()) / 2, _updating.y() + _updating.height() + padding); + + _pleaseSendReport.move(padding, padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding + (_showReport.height() - _pleaseSendReport.height()) / 2); + _showReport.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding); + + _networkSettings.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding); +#endif + + _report.setGeometry(padding, _showReport.y() + _showReport.height() + padding, width() - 2 * padding, _pleaseSendReport.height() * 12.5); + _minidump.move(padding, _report.y() + _report.height() + padding); + _saveReport.move(_showReport.x(), _showReport.y()); + + _continue.move(width() - padding - _continue.width(), height() - padding - _continue.height()); +} + +NetworkSettingsWindow::NetworkSettingsWindow(QWidget *parent, QString host, quint32 port, QString username, QString password) +: PreLaunchWindow(qsl("HTTP Proxy Settings")) +, _hostLabel(this) +, _portLabel(this) +, _usernameLabel(this) +, _passwordLabel(this) +, _hostInput(this) +, _portInput(this) +, _usernameInput(this) +, _passwordInput(this, true) +, _save(this) +, _cancel(this, false) +, _parent(parent) { + setWindowModality(Qt::ApplicationModal); + + _hostLabel.setText(qsl("Hostname")); + _portLabel.setText(qsl("Port")); + _usernameLabel.setText(qsl("Username")); + _passwordLabel.setText(qsl("Password")); + + _save.setText(qsl("SAVE")); + connect(&_save, SIGNAL(clicked()), this, SLOT(onSave())); + _cancel.setText(qsl("CANCEL")); + connect(&_cancel, SIGNAL(clicked()), this, SLOT(close())); + + _hostInput.setText(host); + _portInput.setText(QString::number(port)); + _usernameInput.setText(username); + _passwordInput.setText(password); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + move(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6)); + updateControls(); + show(); + + _hostInput.setFocus(); + _hostInput.setCursorPosition(_hostInput.text().size()); +} + +void NetworkSettingsWindow::resizeEvent(QResizeEvent *e) { + int padding = _size; + _hostLabel.move(padding, padding); + _hostInput.setGeometry(_hostLabel.x(), _hostLabel.y() + _hostLabel.height(), 2 * _hostLabel.width(), _hostInput.height()); + _portLabel.move(padding + _hostInput.width() + padding, padding); + _portInput.setGeometry(_portLabel.x(), _portLabel.y() + _portLabel.height(), width() - padding - _portLabel.x(), _portInput.height()); + _usernameLabel.move(padding, _hostInput.y() + _hostInput.height() + padding); + _usernameInput.setGeometry(_usernameLabel.x(), _usernameLabel.y() + _usernameLabel.height(), (width() - 3 * padding) / 2, _usernameInput.height()); + _passwordLabel.move(padding + _usernameInput.width() + padding, _usernameLabel.y()); + _passwordInput.setGeometry(_passwordLabel.x(), _passwordLabel.y() + _passwordLabel.height(), width() - padding - _passwordLabel.x(), _passwordInput.height()); + + _save.move(width() - padding - _save.width(), height() - padding - _save.height()); + _cancel.move(_save.x() - padding - _cancel.width(), _save.y()); +} + +void NetworkSettingsWindow::onSave() { + QString host = _hostInput.text().trimmed(), port = _portInput.text().trimmed(), username = _usernameInput.text().trimmed(), password = _passwordInput.text().trimmed(); + if (!port.isEmpty() && !port.toUInt()) { + _portInput.setFocus(); + return; + } else if (!host.isEmpty() && port.isEmpty()) { + _portInput.setFocus(); + return; + } + emit saved(host, port.toUInt(), username, password); + close(); +} + +void NetworkSettingsWindow::closeEvent(QCloseEvent *e) { +} + +void NetworkSettingsWindow::updateControls() { + _hostInput.updateGeometry(); + _hostInput.resize(_hostInput.sizeHint()); + _portInput.updateGeometry(); + _portInput.resize(_portInput.sizeHint()); + _usernameInput.updateGeometry(); + _usernameInput.resize(_usernameInput.sizeHint()); + _passwordInput.updateGeometry(); + _passwordInput.resize(_passwordInput.sizeHint()); + + int padding = _size; + int w = 2 * padding + _hostLabel.width() * 2 + padding + _portLabel.width() * 2 + padding; + int h = padding + _hostLabel.height() + _hostInput.height() + padding + _usernameLabel.height() + _usernameInput.height() + padding + _save.height() + padding; + if (w == width() && h == height()) { + resizeEvent(0); + } else { + setGeometry(_parent->x() + (_parent->width() - w) / 2, _parent->y() + (_parent->height() - h) / 2, w, h); + } +} + +ShowCrashReportWindow::ShowCrashReportWindow(const QString &text) +: _log(this) { + _log.setPlainText(text); + + QRect scr(QApplication::primaryScreen()->availableGeometry()); + setGeometry(scr.x() + (scr.width() / 6), scr.y() + (scr.height() / 6), scr.width() / 2, scr.height() / 2); + show(); +} + +void ShowCrashReportWindow::resizeEvent(QResizeEvent *e) { + _log.setGeometry(rect().marginsRemoved(QMargins(basicSize(), basicSize(), basicSize(), basicSize()))); } diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index 535ec3f4ed3a64..f7c968ce84476a 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -18,8 +18,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ -#ifndef MAINWINDOW_H -#define MAINWINDOW_H +#pragma once #include "title.h" #include "pspecific.h" @@ -353,7 +352,47 @@ public slots: MediaView *_mediaView; }; -class NotStartedWindow : public TWidget { +class PreLaunchWindow : public TWidget { +public: + + PreLaunchWindow(QString title = QString()); + void activate(); + float64 basicSize() const { + return _size; + } + ~PreLaunchWindow(); + + static PreLaunchWindow *instance(); + +protected: + + float64 _size; + +}; + +class PreLaunchLabel : public QLabel { +public: + PreLaunchLabel(QWidget *parent); + void setText(const QString &text); +}; + +class PreLaunchInput : public QLineEdit { +public: + PreLaunchInput(QWidget *parent, bool password = false); +}; + +class PreLaunchLog : public QTextEdit { +public: + PreLaunchLog(QWidget *parent); +}; + +class PreLaunchButton : public QPushButton { +public: + PreLaunchButton(QWidget *parent, bool confirm = true); + void setText(const QString &text); +}; + +class NotStartedWindow : public PreLaunchWindow { public: NotStartedWindow(); @@ -365,16 +404,124 @@ class NotStartedWindow : public TWidget { private: - QLabel _label; - QTextEdit _log; + void updateControls(); + + PreLaunchLabel _label; + PreLaunchLog _log; + PreLaunchButton _close; }; -class LastCrashedWindow : public TWidget { +class LastCrashedWindow : public PreLaunchWindow { + Q_OBJECT + public: LastCrashedWindow(); +public slots: + + void onViewReport(); + void onSaveReport(); + void onSendReport(); + void onGetApp(); + + void onNetworkSettings(); + void onNetworkSettingsSaved(QString host, quint32 port, QString username, QString password); + void onContinue(); + + void onCheckingFinished(); + void onSendingError(QNetworkReply::NetworkError e); + void onSendingFinished(); + void onSendingProgress(qint64 uploaded, qint64 total); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + void onUpdateRetry(); + void onUpdateSkip(); + + void onUpdateChecking(); + void onUpdateLatest(); + void onUpdateDownloading(qint64 ready, qint64 total); + void onUpdateReady(); + void onUpdateFailed(); +#endif + +protected: + + void closeEvent(QCloseEvent *e); + void resizeEvent(QResizeEvent *e); + +private: + + void updateControls(); + + QString _host, _username, _password; + quint32 _port; + + PreLaunchLabel _label, _pleaseSendReport, _minidump; + PreLaunchLog _report; + PreLaunchButton _send, _sendSkip, _networkSettings, _continue, _showReport, _saveReport, _getApp; + + QString _minidumpName, _minidumpFull, _reportText; + bool _reportShown, _reportSaved; + + enum SendingState { + SendingNoReport, + SendingUpdateCheck, + SendingNone, + SendingTooOld, + SendingTooMany, + SendingUnofficial, + SendingProgress, + SendingUploading, + SendingFail, + SendingDone, + }; + SendingState _sendingState; + + PreLaunchLabel _updating; + qint64 _sendingProgress, _sendingTotal; + + QNetworkAccessManager _sendManager; + QNetworkReply *_checkReply, *_sendReply; + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + PreLaunchButton _updatingCheck, _updatingSkip; + enum UpdatingState { + UpdatingNone, + UpdatingCheck, + UpdatingLatest, + UpdatingDownload, + UpdatingFail, + UpdatingReady + }; + UpdatingState _updatingState; + QString _newVersionDownload; + + void setUpdatingState(UpdatingState state, bool force = false); + void setDownloadProgress(qint64 ready, qint64 total); +#endif + + QString getReportField(const QLatin1String &name, const QLatin1String &prefix); + void addReportFieldPart(const QLatin1String &name, const QLatin1String &prefix, QHttpMultiPart *multipart); + +}; + +class NetworkSettingsWindow : public PreLaunchWindow { + Q_OBJECT + +public: + + NetworkSettingsWindow(QWidget *parent, QString host, quint32 port, QString username, QString password); + +signals: + + void saved(QString host, quint32 port, QString username, QString password); + +public slots: + + void onSave(); + protected: void closeEvent(QCloseEvent *e); @@ -382,10 +529,27 @@ class LastCrashedWindow : public TWidget { private: - QLabel _label; - QTextEdit _log; - QPushButton _send; + void updateControls(); + + PreLaunchLabel _hostLabel, _portLabel, _usernameLabel, _passwordLabel; + PreLaunchInput _hostInput, _portInput, _usernameInput, _passwordInput; + PreLaunchButton _save, _cancel; + + QWidget *_parent; }; -#endif // MAINWINDOW_H +class ShowCrashReportWindow : public PreLaunchWindow { +public: + + ShowCrashReportWindow(const QString &text); + +protected: + + void resizeEvent(QResizeEvent *e); + +private: + + PreLaunchLog _log; + +}; diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 5530f46a48109c..44ffbe14dd3b38 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -1053,8 +1053,14 @@ + + NotUsing + + + + $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... @@ -1630,7 +1636,7 @@ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-fstdafx.h" "-f../../SourceFiles/history.h" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters index a5652079ea3c24..f58dc5f4233802 100644 --- a/Telegram/Telegram.vcxproj.filters +++ b/Telegram/Telegram.vcxproj.filters @@ -897,6 +897,9 @@ Generated Files\Release + + Generated Files + @@ -986,6 +989,15 @@ Source Files + + Generated Files + + + Generated Files + + + Generated Files + From 340246367dc6256aafa2220aeed7d8fcee0a6ef6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 Jan 2016 21:24:18 +0300 Subject: [PATCH 013/133] crash report and show done for os x --- Telegram/SourceFiles/_other/updater_osx.m | 25 ++-- Telegram/SourceFiles/application.cpp | 11 +- Telegram/SourceFiles/application.h | 1 - Telegram/SourceFiles/autoupdater.cpp | 4 +- Telegram/SourceFiles/boxes/aboutbox.cpp | 2 +- Telegram/SourceFiles/boxes/addcontactbox.cpp | 2 +- Telegram/SourceFiles/boxes/confirmbox.cpp | 2 +- Telegram/SourceFiles/boxes/usernamebox.cpp | 2 +- Telegram/SourceFiles/historywidget.cpp | 21 ++++ Telegram/SourceFiles/logs.cpp | 31 ++++- Telegram/SourceFiles/logs.h | 5 +- Telegram/SourceFiles/pspecific_mac.cpp | 126 +++++++++++++++++-- Telegram/SourceFiles/pspecific_mac.h | 6 +- Telegram/SourceFiles/pspecific_mac_p.h | 4 +- Telegram/SourceFiles/pspecific_mac_p.mm | 22 ++-- Telegram/SourceFiles/structs.h | 4 +- Telegram/SourceFiles/title.cpp | 7 +- Telegram/SourceFiles/window.cpp | 8 +- 18 files changed, 227 insertions(+), 56 deletions(-) diff --git a/Telegram/SourceFiles/_other/updater_osx.m b/Telegram/SourceFiles/_other/updater_osx.m index 4c3e7c4fbb90b8..ea34527f439cfe 100644 --- a/Telegram/SourceFiles/_other/updater_osx.m +++ b/Telegram/SourceFiles/_other/updater_osx.m @@ -23,6 +23,7 @@ NSString *appName = @"Telegram.app"; NSString *appDir = nil; NSString *workDir = nil; +NSString *crashReportArg = nil; #ifdef _DEBUG BOOL _debug = YES; @@ -101,6 +102,10 @@ int main(int argc, const char * argv[]) { [formatter setNumberStyle:NSNumberFormatterDecimalStyle]; procId = [[formatter numberFromString:[NSString stringWithUTF8String:argv[i]]] intValue]; } + } else if ([@"-crashreport" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { + if (++i < argc) { + crashReportArg = [NSString stringWithUTF8String:argv[i]]; + } } else if ([@"-noupdate" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { update = NO; } else if ([@"-tosettings" isEqualToString:[NSString stringWithUTF8String:argv[i]]]) { @@ -214,15 +219,17 @@ int main(int argc, const char * argv[]) { } NSString *appPath = [[NSArray arrayWithObjects:appDir, appRealName, nil] componentsJoinedByString:@""]; - NSMutableArray *args = [[NSMutableArray alloc] initWithObjects:@"-noupdate", nil]; - if (toSettings) [args addObject:@"-tosettings"]; - if (_debug) [args addObject:@"-debug"]; - if (startInTray) [args addObject:@"-startintray"]; - if (testMode) [args addObject:@"-testmode"]; - if (autoStart) [args addObject:@"-autostart"]; - if (key) { - [args addObject:@"-key"]; - [args addObject:key]; + NSMutableArray *args = [[NSMutableArray alloc] initWithObjects: crashReportArg ? crashReportArg : @"-noupdate", nil]; + if (!crashReportArg) { + if (toSettings) [args addObject:@"-tosettings"]; + if (_debug) [args addObject:@"-debug"]; + if (startInTray) [args addObject:@"-startintray"]; + if (testMode) [args addObject:@"-testmode"]; + if (autoStart) [args addObject:@"-autostart"]; + if (key) { + [args addObject:@"-key"]; + [args addObject:key]; + } } writeLog([[NSArray arrayWithObjects:@"Running application '", appPath, @"' with args '", [args componentsJoinedByString:@"' '"], @"'..", nil] componentsJoinedByString:@""]); NSError *error = nil; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 6149620a9b3aef..6ac2a77b67ec5e 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -151,6 +151,8 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) connect(&_localSocket, SIGNAL(readyRead()), this, SLOT(socketReading())); connect(&_localServer, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); + connect(this, SIGNAL(aboutToQuit()), this, SLOT(closeApplication())); + #ifndef TDESKTOP_DISABLE_AUTOUPDATE connect(&_updateCheckTimer, SIGNAL(timeout()), this, SLOT(updateCheck())); connect(this, SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); @@ -531,12 +533,6 @@ inline Application *application() { namespace Sandboxer { - void setClipboardText(const QString &text) { - if (Application *a = application()) { - a->clipboard()->setText(text); - } - } - QRect availableGeometry() { if (Application *a = application()) { return a->desktop()->availableGeometry(); @@ -724,8 +720,7 @@ AppClass::AppClass() : QObject() application()->installNativeEventFilter(psNativeEventFilter()); - connect(this, SIGNAL(aboutToQuit()), this, SLOT(closeApplication())); - connect(this, SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); + connect(application(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 940f83819be365..26b443955f4787 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -107,7 +107,6 @@ public slots: namespace Sandboxer { - void setClipboardText(const QString &text); QRect availableGeometry(); QRect screenGeometry(const QPoint &p); void setActiveWindow(QWidget *window); diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index 7c4796585c482a..17528d79f07558 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -558,12 +558,12 @@ bool checkReadyUpdate() { QDir().mkpath(QFileInfo(curUpdater).absolutePath()); DEBUG_LOG(("Update Info: moving %1 to %2..").arg(updater.absoluteFilePath()).arg(curUpdater)); if (!objc_moveFile(updater.absoluteFilePath(), curUpdater)) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } #elif defined Q_OS_LINUX if (!linuxMoveFile(QFile::encodeName(updater.absoluteFilePath()).constData(), QFile::encodeName(curUpdater).constData())) { - UpdateDownloader::clearAll(); + UpdateChecker::clearAll(); return false; } #endif diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index 357410b5efe5e8..79b8c724921f16 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -82,7 +82,7 @@ void AboutBox::onVersion() { } url = url.arg(qsl("tbeta%1_%2").arg(cRealBetaVersion()).arg(countBetaVersionSignature(cRealBetaVersion()))); - Sandboxer::setClipboardText(url); + Application::clipboard()->setText(url); Ui::showLayer(new InformBox("The link to the current private beta version of Telegram Desktop was copied to the clipboard.")); } else { diff --git a/Telegram/SourceFiles/boxes/addcontactbox.cpp b/Telegram/SourceFiles/boxes/addcontactbox.cpp index 7db72e9a697d20..c2d94321a0163a 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.cpp +++ b/Telegram/SourceFiles/boxes/addcontactbox.cpp @@ -750,7 +750,7 @@ void SetupChannelBox::mouseMoveEvent(QMouseEvent *e) { void SetupChannelBox::mousePressEvent(QMouseEvent *e) { mouseMoveEvent(e); if (_linkOver) { - Sandboxer::setClipboardText(_channel->invitationUrl); + Application::clipboard()->setText(_channel->invitationUrl); _goodTextLink = lang(lng_create_channel_link_copied); a_goodOpacity = anim::fvalue(1, 0); _a_goodFade.start(); diff --git a/Telegram/SourceFiles/boxes/confirmbox.cpp b/Telegram/SourceFiles/boxes/confirmbox.cpp index af570091d52a4f..b619af2657c2a4 100644 --- a/Telegram/SourceFiles/boxes/confirmbox.cpp +++ b/Telegram/SourceFiles/boxes/confirmbox.cpp @@ -212,7 +212,7 @@ void MaxInviteBox::mouseMoveEvent(QMouseEvent *e) { void MaxInviteBox::mousePressEvent(QMouseEvent *e) { mouseMoveEvent(e); if (_linkOver) { - Sandboxer::setClipboardText(_link); + Application::clipboard()->setText(_link); _goodTextLink = lang(lng_create_channel_link_copied); a_goodOpacity = anim::fvalue(1, 0); _a_good.start(); diff --git a/Telegram/SourceFiles/boxes/usernamebox.cpp b/Telegram/SourceFiles/boxes/usernamebox.cpp index fa40dcfe9ada19..b0f11ba74669b6 100644 --- a/Telegram/SourceFiles/boxes/usernamebox.cpp +++ b/Telegram/SourceFiles/boxes/usernamebox.cpp @@ -191,7 +191,7 @@ void UsernameBox::onChanged() { } void UsernameBox::onLinkClick() { - Sandboxer::setClipboardText(qsl("https://telegram.me/") + getName()); + Application::clipboard()->setText(qsl("https://telegram.me/") + getName()); _copiedTextLink = lang(lng_username_copied); update(); } diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index e58661c29b8312..66eb870688d816 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4804,8 +4804,22 @@ void HistoryWidget::onDocumentSelect() { } } +QString _getCrashReportFile(const QMimeData *m) { + if (!m || m->urls().size() != 1) return QString(); + + QString file(m->urls().at(0).toLocalFile()); + if (file.startsWith(qsl("/.file/id="))) file = psConvertFileUrl(file); + + return file.endsWith(qstr(".telegramcrash"), Qt::CaseInsensitive) ? file : QString(); +} void HistoryWidget::dragEnterEvent(QDragEnterEvent *e) { + if (!_peer && !_getCrashReportFile(e->mimeData()).isEmpty()) { + e->setDropAction(Qt::CopyAction); + e->accept(); + return; + } + if (!_history) return; if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; @@ -5127,6 +5141,13 @@ bool HistoryWidget::kbWasHidden() const { } void HistoryWidget::dropEvent(QDropEvent *e) { + if (!_peer && !_getCrashReportFile(e->mimeData()).isEmpty()) { + e->acceptProposedAction(); + psExecTelegram(_getCrashReportFile(e->mimeData())); + App::quit(); + return; + } + _attachDrag = DragStateNone; updateDragAreas(); e->acceptProposedAction(); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 94a7e5addc5481..24aa69849562c2 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -108,7 +108,7 @@ class LogsDataFields { QSharedPointer files[LogDataCount]; QTextStream streams[LogDataCount]; - int32 part = -1, index = 0; + int32 part = -1; bool reopen(LogDataType type, int32 dayIndex, const QString &postfix) { if (streams[type].device()) { @@ -596,14 +596,31 @@ namespace SignalHandlers { return _writeNumber(stream, num); } - const dump &operator<<(const dump &stream, DWORD num) { + const dump &operator<<(const dump &stream, uint32 num) { return _writeNumber(stream, num); } - const dump &operator<<(const dump &stream, DWORD64 num) { + const dump &operator<<(const dump &stream, uint64 num) { return _writeNumber(stream, num); } + const dump &operator<<(const dump &stream, double num) { + if (num < 0) { + _writeChar('-'); + num = -num; + } + _writeNumber(stream, uint64(floor(num))); + _writeChar('.'); + num -= floor(num); + for (int i = 0; i < 4; ++i) { + num *= 10; + int digit = int(floor(num)); + _writeChar('0' + digit); + num -= digit; + } + return stream; + } + Qt::HANDLE LoggingCrashThreadId = 0; bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; @@ -665,6 +682,10 @@ namespace SignalHandlers { dump() << "\n"; LoggingCrashThreadId = 0; + +#ifndef Q_OS_WIN + exit(1); +#endif } Status start() { @@ -697,11 +718,11 @@ namespace SignalHandlers { CrashDumpFileNo = fileno(CrashDumpFile); QByteArray launchedDateTime = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8(); - t_assert(launchedDateTime.size() < sizeof(LaunchedDateTimeStr)); + t_assert(launchedDateTime.size() < int(sizeof(LaunchedDateTimeStr))); memcpy(LaunchedDateTimeStr, launchedDateTime.constData(), launchedDateTime.size()); QByteArray launchedBinaryName = cExeName().toUtf8(); - t_assert(launchedBinaryName.size() < sizeof(LaunchedBinaryName)); + t_assert(launchedBinaryName.size() < int(sizeof(LaunchedBinaryName))); memcpy(LaunchedBinaryName, launchedBinaryName.constData(), launchedBinaryName.size()); signal(SIGABRT, SignalHandlers::Handler); diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 80282ef4c31eea..422110709e5ffc 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -93,8 +93,9 @@ namespace SignalHandlers { }; const dump &operator<<(const dump &stream, const char *str); const dump &operator<<(const dump &stream, int num); - const dump &operator<<(const dump &stream, DWORD num); - const dump &operator<<(const dump &stream, DWORD64 num); + const dump &operator<<(const dump &stream, uint32 num); + const dump &operator<<(const dump &stream, uint64 num); + const dump &operator<<(const dump &stream, double num); enum Status { CantOpen, diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index f27e29dd3b2afd..a07e044257fac9 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -26,6 +26,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "localstorage.h" #include "passcodewidget.h" +#include + namespace { QStringList _initLogs; @@ -38,7 +40,7 @@ namespace { } bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) { - Window *wnd = Application::wnd(); + Window *wnd = AppClass::wnd(); if (!wnd) return false; return wnd->psFilterNativeEvent(message); @@ -213,7 +215,7 @@ void PsMainWindow::psInitSize() { bool maximized = false; QRect geom(avail.x() + (avail.width() - st::wndDefWidth) / 2, avail.y() + (avail.height() - st::wndDefHeight) / 2, st::wndDefWidth, st::wndDefHeight); if (pos.w && pos.h) { - QList screens = App::app()->screens(); + QList screens = Application::screens(); for (QList::const_iterator i = screens.cbegin(), e = screens.cend(); i != e; ++i) { QByteArray name = (*i)->name().toUtf8(); if (pos.moncrc == hashCrc32(name.constData(), name.size())) { @@ -266,7 +268,7 @@ void PsMainWindow::psSavePosition(Qt::WindowState state) { int px = curPos.x + curPos.w / 2, py = curPos.y + curPos.h / 2, d = 0; QScreen *chosen = 0; - QList screens = App::app()->screens(); + QList screens = Application::screens(); for (QList::const_iterator i = screens.cbegin(), e = screens.cend(); i != e; ++i) { int dx = (*i)->geometry().x() + (*i)->geometry().width() / 2 - px; if (dx < 0) dx = -dx; int dy = (*i)->geometry().y() + (*i)->geometry().height() / 2 - py; if (dy < 0) dy = -dy; @@ -422,13 +424,13 @@ void PsMainWindow::psMacUpdateMenu() { canSelectAll = !edit->text().isEmpty(); canUndo = edit->isUndoAvailable(); canRedo = edit->isRedoAvailable(); - canPaste = !App::app()->clipboard()->text().isEmpty(); + canPaste = !Application::clipboard()->text().isEmpty(); } else if (FlatTextarea *edit = qobject_cast(focused)) { canCut = canCopy = canDelete = edit->textCursor().hasSelection(); canSelectAll = !edit->getLastText().isEmpty(); canUndo = edit->isUndoAvailable(); canRedo = edit->isRedoAvailable(); - canPaste = !App::app()->clipboard()->text().isEmpty(); + canPaste = !Application::clipboard()->text().isEmpty(); } else if (HistoryInner *list = qobject_cast(focused)) { canCopy = list->canCopySelected(); canDelete = list->canDeleteSelected(); @@ -519,7 +521,115 @@ bool PsMainWindow::eventFilter(QObject *obj, QEvent *evt) { QAbstractNativeEventFilter *psNativeEventFilter() { delete _psEventFilter; _psEventFilter = new _PsEventFilter(); - installNativeEventFilter(_psEventFilter); + return _psEventFilter; +} + +void psWriteDump() { + double v = objc_appkitVersion(); + SignalHandlers::dump() << "OS-Version: " << v; +} + +void psWriteStackTrace(int file) { + void *addresses[1024] = { 0 }; + + size_t size = backtrace(addresses, 1024); + + backtrace_symbols_fd(addresses, size, file); +} + +QString demanglestr(const QString &mangled) { + QByteArray cmd = ("c++filt -n " + mangled).toUtf8(); + FILE *f = popen(cmd.constData(), "r"); + if (!f) return "BAD_SYMBOL_" + mangled; + + QString result; + char buffer[4096] = {0}; + while (!feof(f)) { + if (fgets(buffer, 4096, f) != NULL) { + result += buffer; + } + } + pclose(f); + return result.trimmed(); +} + +QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { + QString initial = QString::fromUtf8(crashdump), result; + QStringList lines = initial.split('\n'); + result.reserve(initial.size()); + int32 i = 0, l = lines.size(); + + while (i < l) { + for (; i < l; ++i) { + result.append(lines.at(i)).append('\n'); + QString line = lines.at(i).trimmed(); + if (line == qstr("Backtrace:")) { + ++i; + break; + } + } + + for (int32 start = i; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + + if (!QRegularExpression(qsl("^\\d+")).match(line).hasMatch()) { + if (!lines.at(i).startsWith(qstr("ERROR: "))) { + result.append(qstr("BAD LINE: ")); + } + result.append(line).append('\n'); + continue; + } + QStringList lst = line.split(' ', QString::SkipEmptyParts); + result.append(lst.at(0)).append(' '); + for (int j = 1, s = lst.size();;) { + if (lst.at(j).startsWith('_')) { + result.append(demanglestr(lst.at(j))); + if (++j < s) { + result.append(' '); + for (;;) { + result.append(lst.at(j)); + if (++j < s) { + result.append(' '); + } else { + break; + } + } + } + break; + } else if (j > 2) { + result.append(lst.at(j)); + } + if (++j < s) { + result.append(' '); + } else { + break; + } + } + result.append('\n'); + } + } + return result; +} + +int psShowCrash(const QString &crashdump) { + QString text; + + QFile dump(crashdump); + if (dump.open(QIODevice::ReadOnly)) { + text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); + text += _showCrashDump(dump.readAll(), crashdump); + } else { + text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); + } + + QByteArray args[] = { "" }; + int a_argc = 1; + char *a_argv[1] = { args[0].data() }; + QApplication app(a_argc, a_argv); + + ShowCrashReportWindow wnd(text); + return app.exec(); } void psDeleteDir(const QString &dir) { @@ -666,8 +776,8 @@ void psExecUpdater() { } } -void psExecTelegram() { - objc_execTelegram(); +void psExecTelegram(const QString &crashreport) { + objc_execTelegram(crashreport); } void psAutoStart(bool start, bool silent) { diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index 19082eedd2be06..c7b4793e94aa54 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -140,6 +140,10 @@ public slots: }; +void psWriteDump(); +void psWriteStackTrace(int file); +int psShowCrash(const QString &crashdump); + void psDeleteDir(const QString &dir); void psUserActionDone(); @@ -171,7 +175,7 @@ int psCleanup(); int psFixPrevious(); void psExecUpdater(); -void psExecTelegram(); +void psExecTelegram(const QString &crashreport = QString()); bool psShowOpenWithMenu(int x, int y, const QString &file); diff --git a/Telegram/SourceFiles/pspecific_mac_p.h b/Telegram/SourceFiles/pspecific_mac_p.h index b55366c0ade806..9b0d3aaeebf78d 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.h +++ b/Telegram/SourceFiles/pspecific_mac_p.h @@ -69,7 +69,7 @@ void objc_openFile(const QString &file, bool openwith); void objc_start(); void objc_finish(); bool objc_execUpdater(); -void objc_execTelegram(); +void objc_execTelegram(const QString &crashreport); void objc_registerCustomScheme(); @@ -77,6 +77,8 @@ void objc_activateProgram(WId winId); bool objc_moveFile(const QString &from, const QString &to); void objc_deleteDir(const QString &dir); +double objc_appkitVersion(); + QString objc_appDataPath(); QString objc_downloadPath(); QString objc_currentCountry(); diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index 0de2db7f8e141e..ca7db5d832ca93 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -211,7 +211,7 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo NSNumber *instObj = [[notification userInfo] objectForKey:@"launch"]; unsigned long long instLong = instObj ? [instObj unsignedLongLongValue] : 0; DEBUG_LOG(("Received notification with instance %1").arg(instLong)); - if (instLong != Global::LaunchId()) { // other app instance notification + if (instLong != Sandbox::LaunchId()) { // other app instance notification return; } if (notification.activationType == NSUserNotificationActivationTypeReplied) { @@ -283,8 +283,8 @@ void objc_activateWnd(WId winId) { NSUserNotification *notification = [[NSUserNotification alloc] init]; NSImage *img = qt_mac_create_nsimage(pix); - DEBUG_LOG(("Sending notification with userinfo: peer %1, msgId %2 and instance %3").arg(peer).arg(msgId).arg(Global::LaunchId())); - [notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:Global::LaunchId()],@"launch",nil]]; + DEBUG_LOG(("Sending notification with userinfo: peer %1, msgId %2 and instance %3").arg(peer).arg(msgId).arg(Sandbox::LaunchId())); + [notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:Sandbox::LaunchId()],@"launch",nil]]; [notification setTitle:QNSString(title).s()]; [notification setSubtitle:QNSString(subtitle).s()]; @@ -352,7 +352,7 @@ void objc_activateWnd(WId winId) { NSArray *notifies = [center deliveredNotifications]; for (id notify in notifies) { NSDictionary *dict = [notify userInfo]; - if ([[dict objectForKey:@"peer"] unsignedLongLongValue] == peer && [[dict objectForKey:@"launch"] unsignedLongLongValue] == Global::LaunchId()) { + if ([[dict objectForKey:@"peer"] unsignedLongLongValue] == peer && [[dict objectForKey:@"launch"] unsignedLongLongValue] == Sandbox::LaunchId()) { [center removeDeliveredNotification:notify]; } } @@ -950,7 +950,7 @@ void objc_registerCustomScheme() { #endif } -BOOL _execUpdater(BOOL update = YES) { +BOOL _execUpdater(BOOL update = YES, const QString &crashreport = QString()) { NSString *path = @"", *args = @""; @try { path = [[NSBundle mainBundle] bundlePath]; @@ -972,6 +972,10 @@ BOOL _execUpdater(BOOL update = YES) { [args addObject:@"-key"]; [args addObject:QNSString(cDataFile()).s()]; } + if (!crashreport.isEmpty()) { + [args addObject:@"-crashreport"]; + [args addObject:QNSString(crashreport).s()]; + } DEBUG_LOG(("Application Info: executing %1 %2").arg(objcString(path)).arg(objcString([args componentsJoinedByString:@" "]))); if (![NSTask launchedTaskWithLaunchPath:path arguments:args]) { @@ -992,8 +996,8 @@ bool objc_execUpdater() { return !!_execUpdater(); } -void objc_execTelegram() { - _execUpdater(NO); +void objc_execTelegram(const QString &crashreport) { + _execUpdater(NO, crashreport); } void objc_activateProgram(WId winId) { @@ -1027,6 +1031,10 @@ void objc_deleteDir(const QString &dir) { [[NSFileManager defaultManager] removeItemAtPath:QNSString(dir).s() error:nil]; } +double objc_appkitVersion() { + return NSAppKitVersionNumber; +} + QString objc_appDataPath() { NSURL *url = [[NSFileManager defaultManager] URLForDirectory:NSApplicationSupportDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil]; if (url) { diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 6bfa3bb701878a..66d2d647357734 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -69,7 +69,7 @@ class BasicInterface { } return _index.loadAcquire() - 1; } - static const uint64 Bit() { + static uint64 Bit() { return (1 << Index()); } @@ -86,7 +86,7 @@ class BasicInterfaceWithPointer : public BasicInterface { class InterfacesMetadata { public: - InterfacesMetadata(uint64 mask) : _mask(mask), size(0), last(64) { + InterfacesMetadata(uint64 mask) : size(0), last(64), _mask(mask) { for (int i = 0; i < 64; ++i) { uint64 m = (1 << i); if (_mask & m) { diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 86c55de51d7004..081c05f5adfb31 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -89,9 +89,10 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) connect(&_contacts, SIGNAL(clicked()), this, SLOT(onContacts())); connect(&_about, SIGNAL(clicked()), this, SLOT(onAbout())); connect(wnd->windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(stateChanged(Qt::WindowState))); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - connect(App::app(), SIGNAL(updateReady()), this, SLOT(showUpdateBtn())); - #endif + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(showUpdateBtn())); +#endif if (cPlatform() != dbipWindows) { _minimize.hide(); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index e54c8e274135c9..e3c2fe3fb2f602 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2209,7 +2209,7 @@ namespace { zByteArray *ba = (zByteArray*)opaque; uLong toRead = 0; if (!ba->err) { - if (ba->data.size() > ba->pos) { + if (ba->data.size() > int(ba->pos)) { toRead = qMin(size, uLong(ba->data.size() - ba->pos)); memcpy(buf, ba->data.constData() + ba->pos, toRead); ba->pos += toRead; @@ -2223,7 +2223,7 @@ namespace { uLong zByteArrayWriteFile(voidpf opaque, voidpf stream, const void* buf, uLong size) { zByteArray *ba = (zByteArray*)opaque; - if (ba->data.size() < ba->pos + size) { + if (ba->data.size() < int(ba->pos + size)) { ba->data.resize(ba->pos + size); } memcpy(ba->data.data() + ba->pos, buf, size); @@ -2257,7 +2257,7 @@ namespace { case ZLIB_FILEFUNC_SEEK_CUR: ba->pos += offset; break; case ZLIB_FILEFUNC_SEEK_END: ba->pos = ba->data.size() + offset; break; } - if (ba->pos > ba->data.size()) { + if (int(ba->pos) > ba->data.size()) { ba->err = -1; } } @@ -2303,6 +2303,7 @@ void LastCrashedWindow::onCheckingFinished() { reportPart.setBody(Global::LastCrashDump()); multipart->append(reportPart); +#ifdef Q_OS_WIN QFileInfo dmpFile(_minidumpFull); if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && QRegularExpression(qsl("^Telegram\\-[\\d\\.\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { @@ -2354,6 +2355,7 @@ void LastCrashedWindow::onCheckingFinished() { } } } +#endif _sendReply = _sendManager.post(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=report")), multipart); multipart->setParent(_sendReply); From 52c29bac5d67e299b181c34e6a9407a838ae182f Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 Jan 2016 21:24:42 +0300 Subject: [PATCH 014/133] started crash reporting for linux --- Telegram/SourceFiles/_other/updater_linux.cpp | 31 +++-- Telegram/SourceFiles/pspecific_linux.cpp | 124 +++++++++++++++++- Telegram/SourceFiles/pspecific_linux.h | 6 +- Telegram/SourceFiles/pspecific_wnd.cpp | 21 +-- Telegram/SourceFiles/pspecific_wnd.h | 2 +- 5 files changed, 154 insertions(+), 30 deletions(-) diff --git a/Telegram/SourceFiles/_other/updater_linux.cpp b/Telegram/SourceFiles/_other/updater_linux.cpp index 35d67072c99f7e..f65ad09448130c 100644 --- a/Telegram/SourceFiles/_other/updater_linux.cpp +++ b/Telegram/SourceFiles/_other/updater_linux.cpp @@ -324,7 +324,7 @@ bool update() { int main(int argc, char *argv[]) { bool needupdate = true, autostart = false, debug = false, tosettings = false, startintray = false, testmode = false; - char *key = 0; + char *key = 0, *crashreport = 0; for (int i = 1; i < argc; ++i) { if (equal(argv[i], "-noupdate")) { needupdate = false; @@ -342,7 +342,9 @@ int main(int argc, char *argv[]) { key = argv[i]; } else if (equal(argv[i], "-workpath") && ++i < argc) { workDir = argv[i]; - } + } else if (equal(argv[i], "-crashreport") && ++i < argc) { + crashreport = argv[i]; + } } openLog(); @@ -408,17 +410,20 @@ int main(int argc, char *argv[]) { char *args[MaxArgsCount] = {0}, p_noupdate[] = "-noupdate", p_autostart[] = "-autostart", p_debug[] = "-debug", p_tosettings[] = "-tosettings", p_key[] = "-key", p_startintray[] = "-startintray", p_testmode[] = "-testmode"; int argIndex = 0; args[argIndex++] = path; - args[argIndex++] = p_noupdate; - if (autostart) args[argIndex++] = p_autostart; - if (debug) args[argIndex++] = p_debug; - if (startintray) args[argIndex++] = p_startintray; - if (testmode) args[argIndex++] = p_testmode; - if (tosettings) args[argIndex++] = p_tosettings; - if (key) { - args[argIndex++] = p_key; - args[argIndex++] = key; - } - + if (crashreport) { + args[argIndex++] = crashreport; + } else { + args[argIndex++] = p_noupdate; + if (autostart) args[argIndex++] = p_autostart; + if (debug) args[argIndex++] = p_debug; + if (startintray) args[argIndex++] = p_startintray; + if (testmode) args[argIndex++] = p_testmode; + if (tosettings) args[argIndex++] = p_tosettings; + if (key) { + args[argIndex++] = p_key; + args[argIndex++] = key; + } + } pid_t pid = fork(); switch (pid) { case -1: writeLog("fork() failed!"); return 1; diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 5696398934a745..675091fe9bcba0 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -973,6 +973,112 @@ QAbstractNativeEventFilter *psNativeEventFilter() { return _psEventFilter; } +void psWriteDump() { +} + +void psWriteStackTrace(int file) { + void *addresses[1024] = { 0 }; + + size_t size = backtrace(addresses, 1024); + + backtrace_symbols_fd(addresses, size, file); +} + +QString demanglestr(const QString &mangled) { + QByteArray cmd = ("c++filt -n " + mangled).toUtf8(); + FILE *f = popen(cmd.constData(), "r"); + if (!f) return "BAD_SYMBOL_" + mangled; + + QString result; + char buffer[4096] = { 0 }; + while (!feof(f)) { + if (fgets(buffer, 4096, f) != NULL) { + result += buffer; + } + } + pclose(f); + return result.trimmed(); +} + +QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { + QString initial = QString::fromUtf8(crashdump), result; + QStringList lines = initial.split('\n'); + result.reserve(initial.size()); + int32 i = 0, l = lines.size(); + + while (i < l) { + for (; i < l; ++i) { + result.append(lines.at(i)).append('\n'); + QString line = lines.at(i).trimmed(); + if (line == qstr("Backtrace:")) { + ++i; + break; + } + } + + for (int32 start = i; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + + if (!QRegularExpression(qsl("^\\d+")).match(line).hasMatch()) { + if (!lines.at(i).startsWith(qstr("ERROR: "))) { + result.append(qstr("BAD LINE: ")); + } + result.append(line).append('\n'); + continue; + } + QStringList lst = line.split(' ', QString::SkipEmptyParts); + result.append(lst.at(0)).append(' '); + for (int j = 1, s = lst.size();;) { + if (lst.at(j).startsWith('_')) { + result.append(demanglestr(lst.at(j))); + if (++j < s) { + result.append(' '); + for (;;) { + result.append(lst.at(j)); + if (++j < s) { + result.append(' '); + } else { + break; + } + } + } + break; + } else if (j > 2) { + result.append(lst.at(j)); + } + if (++j < s) { + result.append(' '); + } else { + break; + } + } + result.append('\n'); + } + } + return result; +} + +int psShowCrash(const QString &crashdump) { + QString text; + + QFile dump(crashdump); + if (dump.open(QIODevice::ReadOnly)) { + text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); + text += _showCrashDump(dump.readAll(), crashdump); + } else { + text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); + } + + QByteArray args[] = { "" }; + int a_argc = 1; + char *a_argv[1] = { args[0].data() }; + QApplication app(a_argc, a_argv); + + ShowCrashReportWindow wnd(text); + return app.exec(); +} + bool _removeDirectory(const QString &path) { // from http://stackoverflow.com/questions/2256945/removing-a-non-empty-directory-programmatically-in-c-or-c QByteArray pathRaw = QFile::encodeName(path); DIR *d = opendir(pathRaw.constData()); @@ -1243,15 +1349,15 @@ void psNewVersion() { psRegisterCustomScheme(); } -bool _execUpdater(bool update = true) { +bool _execUpdater(bool update = true, const QString &crashreport = QString()) { static const int MaxLen = 65536, MaxArgsCount = 128; char path[MaxLen] = {0}; QByteArray data(QFile::encodeName(cExeDir() + "Updater")); memcpy(path, data.constData(), data.size()); - char *args[MaxArgsCount] = {0}, p_noupdate[] = "-noupdate", p_autostart[] = "-autostart", p_debug[] = "-debug", p_tosettings[] = "-tosettings", p_key[] = "-key", p_path[] = "-workpath", p_startintray[] = "-startintray", p_testmode[] = "-testmode"; - char p_datafile[MaxLen] = {0}, p_pathbuf[MaxLen] = {0}; + char *args[MaxArgsCount] = {0}, p_noupdate[] = "-noupdate", p_autostart[] = "-autostart", p_debug[] = "-debug", p_tosettings[] = "-tosettings", p_key[] = "-key", p_path[] = "-workpath", p_startintray[] = "-startintray", p_testmode[] = "-testmode", p_crashreport[] = "-crashreport"; + char p_datafile[MaxLen] = {0}, p_pathbuf[MaxLen] = {0}, p_crashreportbuf[MaxLen] = {0}; int argIndex = 0; args[argIndex++] = path; if (!update) { @@ -1276,6 +1382,14 @@ bool _execUpdater(bool update = true) { args[argIndex++] = p_path; args[argIndex++] = p_pathbuf; } + if (!crashreport.isEmpty()) { + QByteArray crashreportf = crashreport.toUtf8(); + if (crashreportf.size() < MaxLen) { + memcpy(p_crashreportbuf, crashreportf.constData(), crashreportf.size()); + args[argIndex++] = p_crashreport; + args[argIndex++] = p_crashreportbuf; + } + } pid_t pid = fork(); switch (pid) { @@ -1291,8 +1405,8 @@ void psExecUpdater() { } } -void psExecTelegram() { - _execUpdater(false); +void psExecTelegram(const QString &crashreport) { + _execUpdater(false, crashreport); } bool psShowOpenWithMenu(int x, int y, const QString &file) { diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index 6fd33565156e92..6248cc072d6911 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -113,6 +113,10 @@ public slots: uint64 _psLastIndicatorUpdate; }; +void psWriteDump(); +void psWriteStackTrace(int file); +int psShowCrash(const QString &crashdump); + void psDeleteDir(const QString &dir); void psUserActionDone(); @@ -144,7 +148,7 @@ int psCleanup(); int psFixPrevious(); void psExecUpdater(); -void psExecTelegram(); +void psExecTelegram(const QString &arg = QString()); bool psShowOpenWithMenu(int x, int y, const QString &file); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 3407fc421e6187..effea155951c5e 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2267,15 +2267,16 @@ void psExecUpdater() { } } -void psExecTelegram() { - QString targs = qsl("-noupdate"); - if (cRestartingToSettings()) targs += qsl(" -tosettings"); - if (cLaunchMode() == LaunchModeAutoStart) targs += qsl(" -autostart"); - if (cDebug()) targs += qsl(" -debug"); - if (cStartInTray()) targs += qsl(" -startintray"); - if (cTestMode()) targs += qsl(" -testmode"); - if (cDataFile() != qsl("data")) targs += qsl(" -key \"") + cDataFile() + '"'; - +void psExecTelegram(const QString &crashreport) { + QString targs = crashreport.isEmpty() ? qsl("-noupdate") : ('"' + crashreport + '"'); + if (crashreport.isEmpty()) { + if (cRestartingToSettings()) targs += qsl(" -tosettings"); + if (cLaunchMode() == LaunchModeAutoStart) targs += qsl(" -autostart"); + if (cDebug()) targs += qsl(" -debug"); + if (cStartInTray()) targs += qsl(" -startintray"); + if (cTestMode()) targs += qsl(" -testmode"); + if (cDataFile() != qsl("data")) targs += qsl(" -key \"") + cDataFile() + '"'; + } QString telegram(QDir::toNativeSeparators(cExeDir() + cExeName())), wdir(QDir::toNativeSeparators(cWorkingDir())); DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + cExeName()).arg(targs)); @@ -3059,7 +3060,7 @@ void psWriteStackTrace(int file) { #error "Platform not supported!" #endif - for (frameNum = 0; frameNum < 1000; ++frameNum) { + for (frameNum = 0; frameNum < 1024; ++frameNum) { // get next stack frame (StackWalk64(), SymFunctionTableAccess64(), SymGetModuleBase64()) // if this returns ERROR_INVALID_ADDRESS (487) or ERROR_NOACCESS (998), you can // assume that either you are done, or that the stack is so hosed that the next diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 053945f3b06c9d..3d46e615f902fc 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -153,7 +153,7 @@ int psCleanup(); int psFixPrevious(); void psExecUpdater(); -void psExecTelegram(); +void psExecTelegram(const QString &arg = QString()); bool psShowOpenWithMenu(int x, int y, const QString &file); From d28483fad4a197a8b63dfa005882f6ef8e7e4834 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 Jan 2016 21:38:33 +0300 Subject: [PATCH 015/133] windows and os x crash reports sent and shown --- Telegram/SourceFiles/boxes/aboutbox.cpp | 26 +++++++++++++++++++++++++ Telegram/SourceFiles/boxes/aboutbox.h | 5 ++++- Telegram/SourceFiles/historywidget.cpp | 22 --------------------- Telegram/SourceFiles/logs.cpp | 8 ++++++-- Telegram/SourceFiles/logs.h | 6 +++--- 5 files changed, 39 insertions(+), 28 deletions(-) diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index 79b8c724921f16..a9bc2e0adf4764 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -44,6 +44,8 @@ AboutBox::AboutBox() : AbstractBox(st::aboutWidth) connect(&_done, SIGNAL(clicked()), this, SLOT(onClose())); prepare(); + + setAcceptDrops(true); } void AboutBox::hideAll() { @@ -105,6 +107,30 @@ void AboutBox::paintEvent(QPaintEvent *e) { paintTitle(p, qsl("Telegram Desktop")); } +QString _getCrashReportFile(const QMimeData *m) { + if (!m || m->urls().size() != 1) return QString(); + + QString file(m->urls().at(0).toLocalFile()); + if (file.startsWith(qsl("/.file/id="))) file = psConvertFileUrl(file); + + return file.endsWith(qstr(".telegramcrash"), Qt::CaseInsensitive) ? file : QString(); +} + +void AboutBox::dragEnterEvent(QDragEnterEvent *e) { + if (!_getCrashReportFile(e->mimeData()).isEmpty()) { + e->setDropAction(Qt::CopyAction); + e->accept(); + } +} + +void AboutBox::dropEvent(QDropEvent *e) { + if (!_getCrashReportFile(e->mimeData()).isEmpty()) { + e->acceptProposedAction(); + psExecTelegram(_getCrashReportFile(e->mimeData())); + App::quit(); + } +} + QString telegramFaqLink() { QString result = qsl("https://telegram.org/faq"); if (cLang() > languageDefault && cLang() < languageCount) { diff --git a/Telegram/SourceFiles/boxes/aboutbox.h b/Telegram/SourceFiles/boxes/aboutbox.h index 533ab0323382c8..6be8c2ed4caae2 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.h +++ b/Telegram/SourceFiles/boxes/aboutbox.h @@ -31,7 +31,10 @@ class AboutBox : public AbstractBox { void resizeEvent(QResizeEvent *e); void keyPressEvent(QKeyEvent *e); void paintEvent(QPaintEvent *e); - + + void dragEnterEvent(QDragEnterEvent *e); + void dropEvent(QDropEvent *e); + public slots: void onVersion(); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 66eb870688d816..95830b4e86be11 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4804,22 +4804,7 @@ void HistoryWidget::onDocumentSelect() { } } -QString _getCrashReportFile(const QMimeData *m) { - if (!m || m->urls().size() != 1) return QString(); - - QString file(m->urls().at(0).toLocalFile()); - if (file.startsWith(qsl("/.file/id="))) file = psConvertFileUrl(file); - - return file.endsWith(qstr(".telegramcrash"), Qt::CaseInsensitive) ? file : QString(); -} - void HistoryWidget::dragEnterEvent(QDragEnterEvent *e) { - if (!_peer && !_getCrashReportFile(e->mimeData()).isEmpty()) { - e->setDropAction(Qt::CopyAction); - e->accept(); - return; - } - if (!_history) return; if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; @@ -5141,13 +5126,6 @@ bool HistoryWidget::kbWasHidden() const { } void HistoryWidget::dropEvent(QDropEvent *e) { - if (!_peer && !_getCrashReportFile(e->mimeData()).isEmpty()) { - e->acceptProposedAction(); - psExecTelegram(_getCrashReportFile(e->mimeData())); - App::quit(); - return; - } - _attachDrag = DragStateNone; updateDragAreas(); e->acceptProposedAction(); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 24aa69849562c2..3570e3b2549562 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -596,11 +596,15 @@ namespace SignalHandlers { return _writeNumber(stream, num); } - const dump &operator<<(const dump &stream, uint32 num) { + const dump &operator<<(const dump &stream, unsigned int num) { return _writeNumber(stream, num); } - const dump &operator<<(const dump &stream, uint64 num) { + const dump &operator<<(const dump &stream, unsigned long num) { + return _writeNumber(stream, num); + } + + const dump &operator<<(const dump &stream, unsigned long long num) { return _writeNumber(stream, num); } diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 422110709e5ffc..9deebadb1ca5fc 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -93,10 +93,10 @@ namespace SignalHandlers { }; const dump &operator<<(const dump &stream, const char *str); const dump &operator<<(const dump &stream, int num); - const dump &operator<<(const dump &stream, uint32 num); - const dump &operator<<(const dump &stream, uint64 num); + const dump &operator<<(const dump &stream, unsigned int num); + const dump &operator<<(const dump &stream, unsigned long num); + const dump &operator<<(const dump &stream, unsigned long long num); const dump &operator<<(const dump &stream, double num); - enum Status { CantOpen, LastCrashed, From b0681bc582dce03503ace5c1af417844e733418f Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 30 Jan 2016 22:21:18 +0300 Subject: [PATCH 016/133] crash reports done in linux --- Telegram/SourceFiles/pspecific_linux.cpp | 51 +++++++----------------- Telegram/Telegram.pro | 5 ++- 2 files changed, 19 insertions(+), 37 deletions(-) diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 675091fe9bcba0..195fe98bef29a1 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -516,6 +516,8 @@ namespace { PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent), posInited(false), trayIcon(0), trayIconMenu(0), icon256(qsl(":/gui/art/icon256.png")), iconbig256(icon256), wndIcon(QIcon::fromTheme("telegram", QIcon(QPixmap::fromImage(icon256, Qt::ColorOnly)))), _psCheckStatusIconLeft(100), _psLastIndicatorUpdate(0) { + _PsInitializer initializer; + connect(&_psCheckStatusIconTimer, SIGNAL(timeout()), this, SLOT(psStatusIconCheck())); _psCheckStatusIconTimer.setSingleShot(false); @@ -683,7 +685,7 @@ void PsMainWindow::psInitSize() { bool maximized = false; QRect geom(avail.x() + (avail.width() - st::wndDefWidth) / 2, avail.y() + (avail.height() - st::wndDefHeight) / 2, st::wndDefWidth, st::wndDefHeight); if (pos.w && pos.h) { - QList screens = App::app()->screens(); + QList screens = Application::screens(); for (QList::const_iterator i = screens.cbegin(), e = screens.cend(); i != e; ++i) { QByteArray name = (*i)->name().toUtf8(); if (pos.moncrc == hashCrc32(name.constData(), name.size())) { @@ -736,7 +738,7 @@ void PsMainWindow::psSavePosition(Qt::WindowState state) { int px = curPos.x + curPos.w / 2, py = curPos.y + curPos.h / 2, d = 0; QScreen *chosen = 0; - QList screens = App::app()->screens(); + QList screens = Application::screens(); for (QList::const_iterator i = screens.cbegin(), e = screens.cend(); i != e; ++i) { int dx = (*i)->geometry().x() + (*i)->geometry().width() / 2 - px; if (dx < 0) dx = -dx; int dy = (*i)->geometry().y() + (*i)->geometry().height() / 2 - py; if (dy < 0) dy = -dy; @@ -1020,40 +1022,17 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { QString line = lines.at(i).trimmed(); if (line.isEmpty()) break; - if (!QRegularExpression(qsl("^\\d+")).match(line).hasMatch()) { - if (!lines.at(i).startsWith(qstr("ERROR: "))) { - result.append(qstr("BAD LINE: ")); - } - result.append(line).append('\n'); - continue; - } - QStringList lst = line.split(' ', QString::SkipEmptyParts); - result.append(lst.at(0)).append(' '); - for (int j = 1, s = lst.size();;) { - if (lst.at(j).startsWith('_')) { - result.append(demanglestr(lst.at(j))); - if (++j < s) { - result.append(' '); - for (;;) { - result.append(lst.at(j)); - if (++j < s) { - result.append(' '); - } else { - break; - } - } - } - break; - } else if (j > 2) { - result.append(lst.at(j)); - } - if (++j < s) { - result.append(' '); - } else { - break; - } - } - result.append('\n'); + result.append(qsl("%1. ").arg(i + 1 - start)); + if (line.startsWith(qstr("ERROR: "))) { + result.append(line).append('\n'); + continue; + } + QRegularExpressionMatch m = QRegularExpression(qsl("^(.+)\\(([^+]+)\\+([^\\)]+)\\)(.+)$")).match(line); + if (!m.hasMatch()) { + result.append(qstr("BAD LINE: ")).append(line).append('\n'); + continue; + } + result.append(demanglestr(m.captured(2))).append(qsl(" + ")).append(m.captured(3)).append(qsl(" (")).append(m.captured(1)).append(qsl(") ")).append(m.captured(4)).append('\n'); } } return result; diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index e99dd40d4ca11f..96ede807181a08 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -283,7 +283,10 @@ CONFIG(release, debug|release) { QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing QMAKE_LFLAGS_RELEASE -= -O1 - QMAKE_LFLAGS_RELEASE += -Ofast -flto + QMAKE_LFLAGS_RELEASE += -Ofast -flto -rdynamic +} +CONFIG(debug, debug|release) { + QMAKE_LFLAGS_DEBUG += -rdynamic } INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ From 74248b0284e2d4c018e3540fae7e0218f03002c7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 31 Jan 2016 14:32:29 +0300 Subject: [PATCH 017/133] improved os x crash reports, possible linux (and windows) broken --- Telegram/SourceFiles/logs.cpp | 106 ++++++++++++++++-- Telegram/SourceFiles/pspecific_linux.cpp | 8 -- Telegram/SourceFiles/pspecific_linux.h | 1 - Telegram/SourceFiles/pspecific_mac.cpp | 135 +++++++++++++++++++++-- Telegram/SourceFiles/pspecific_mac.h | 1 - Telegram/SourceFiles/pspecific_wnd.cpp | 2 +- Telegram/SourceFiles/pspecific_wnd.h | 2 +- 7 files changed, 224 insertions(+), 31 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 3570e3b2549562..c660f77b349d85 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -546,6 +546,21 @@ void _moveOldDataFiles(const QString &wasDir) { } } +#if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 +#include +#include +#include + +#ifdef Q_OS_MAC + +#include +#include +#include + +#endif + +#endif + namespace SignalHandlers { QByteArray CrashDumpPath; @@ -629,7 +644,17 @@ namespace SignalHandlers { bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; +// see https://github.com/benbjohnson/bandicoot +#if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 + struct sigaction SIG_def[32]; + + void Handler(int signum, siginfo_t *info, void *ucontext) { + sigaction(signum, &SIG_def[signum], 0); + +#else void Handler(int signum) { +#endif + const char* name = 0; switch (signum) { case SIGABRT: name = "SIGABRT"; break; @@ -681,15 +706,69 @@ namespace SignalHandlers { dump() << "Caught signal " << signum << " in thread " << uint64(thread) << "\n"; } +#if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 + ucontext_t *uc = (ucontext_t*)ucontext; + + void *addresses[128] = { 0 }; + void *caller = 0; + +#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) + /* OSX < 10.6 */ +#if defined(__x86_64__) + caller = (void*)uap->uc_mcontext->__ss.__rip; +#elif defined(__i386__) + caller = (void*)uap->uc_mcontext->__ss.__eip; +#else + caller = (void*)uap->uc_mcontext->__ss.__srr0; +#endif +#elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6) + /* OSX >= 10.6 */ +#if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__) + caller = (void*)uc->uc_mcontext->__ss.__rip; +#else + caller = (void*)uap->uc_mcontext->__ss.__eip; +#endif +#elif defined(__linux__) + /* Linux */ +#if defined(__i386__) + caller = (void*)uap->uc_mcontext.gregs[14]; /* Linux 32 */ +#elif defined(__X86_64__) || defined(__x86_64__) + caller = (void*)uap->uc_mcontext.gregs[16]; /* Linux 64 */ +#elif defined(__ia64__) /* Linux IA64 */ + caller = (void*)uap->uc_mcontext.sc_ip; +#endif + +#endif + + size_t size = backtrace(addresses, 128); + + /* overwrite sigaction with caller's address */ + if (caller) addresses[1] = caller; + +#ifdef Q_OS_MAC + dump() << "\nBase image addresses:\n"; + for (size_t i = 0; i < size; ++i) { + Dl_info info; + dump() << i << " "; + if (dladdr(addresses[i], &info)) { + dump() << uint64(info.dli_fbase) << " (" << info.dli_fname << ")\n"; + } else { + dump() << "_unknown_module_\n"; + } + } +#endif + dump() << "\nBacktrace:\n"; - psWriteStackTrace(CrashDumpFileNo); - dump() << "\n"; - LoggingCrashThreadId = 0; + backtrace_symbols_fd(addresses, size, CrashDumpFileNo); -#ifndef Q_OS_WIN - exit(1); +#else + psWriteStackTrace(); #endif + + dump() << "\n"; + + LoggingCrashThreadId = 0; } Status start() { @@ -729,13 +808,24 @@ namespace SignalHandlers { t_assert(launchedBinaryName.size() < int(sizeof(LaunchedBinaryName))); memcpy(LaunchedBinaryName, launchedBinaryName.constData(), launchedBinaryName.size()); +#ifndef Q_OS_WIN + struct sigaction sigact; + + sigact.sa_sigaction = SignalHandlers::Handler; + sigemptyset(&sigact.sa_mask); + sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; + + sigaction(SIGABRT, &sigact, &SIG_def[SIGABRT]); + sigaction(SIGSEGV, &sigact, &SIG_def[SIGSEGV]); + sigaction(SIGILL, &sigact, &SIG_def[SIGILL]); + sigaction(SIGFPE, &sigact, &SIG_def[SIGFPE]); + sigaction(SIGBUS, &sigact, &SIG_def[SIGBUS]); + sigaction(SIGSYS, &sigact, &SIG_def[SIGSYS]); +#else signal(SIGABRT, SignalHandlers::Handler); signal(SIGSEGV, SignalHandlers::Handler); signal(SIGILL, SignalHandlers::Handler); signal(SIGFPE, SignalHandlers::Handler); -#ifndef Q_OS_WIN - signal(SIGBUS, SignalHandlers::Handler); - signal(SIGSYS, SignalHandlers::Handler); #endif return Started; } diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 675091fe9bcba0..e70b79d6ee4582 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -976,14 +976,6 @@ QAbstractNativeEventFilter *psNativeEventFilter() { void psWriteDump() { } -void psWriteStackTrace(int file) { - void *addresses[1024] = { 0 }; - - size_t size = backtrace(addresses, 1024); - - backtrace_symbols_fd(addresses, size, file); -} - QString demanglestr(const QString &mangled) { QByteArray cmd = ("c++filt -n " + mangled).toUtf8(); FILE *f = popen(cmd.constData(), "r"); diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index 6248cc072d6911..ebc3e122882cd0 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -114,7 +114,6 @@ public slots: }; void psWriteDump(); -void psWriteStackTrace(int file); int psShowCrash(const QString &crashdump); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index a07e044257fac9..6602167031a61f 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -529,14 +529,6 @@ void psWriteDump() { SignalHandlers::dump() << "OS-Version: " << v; } -void psWriteStackTrace(int file) { - void *addresses[1024] = { 0 }; - - size_t size = backtrace(addresses, 1024); - - backtrace_symbols_fd(addresses, size, file); -} - QString demanglestr(const QString &mangled) { QByteArray cmd = ("c++filt -n " + mangled).toUtf8(); FILE *f = popen(cmd.constData(), "r"); @@ -553,6 +545,69 @@ QString demanglestr(const QString &mangled) { return result.trimmed(); } +QString escapeShell(const QString &str) { + QString result; + const QChar *b = str.constData(), *e = str.constEnd(); + for (const QChar *ch = b; ch != e; ++ch) { + if (*ch == ' ' || *ch == '"' || *ch == '\'' || *ch == '\\') { + if (result.isEmpty()) { + result.reserve(str.size() * 2); + } + if (ch > b) { + result.append(b, ch - b); + } + result.append('\\'); + b = ch; + } + } + if (result.isEmpty()) return str; + + if (e > b) { + result.append(b, e - b); + } + return result; +} + +QStringList atosstr(uint64 *addresses, int count, uint64 base) { + QStringList result; + if (!count) return result; + + result.reserve(count); + QString cmdstr = "atos -o " + escapeShell(cExeDir() + cExeName()) + qsl("/Contents/MacOS/Telegram -l 0x%1").arg(base, 0, 16); + for (int i = 0; i < count; ++i) { + if (addresses[i]) { + cmdstr += qsl(" 0x%1").arg(addresses[i], 0, 16); + } + } + QByteArray cmd = cmdstr.toUtf8(); + FILE *f = popen(cmd.constData(), "r"); + + QStringList atosResult; + if (f) { + char buffer[4096] = {0}; + while (!feof(f)) { + if (fgets(buffer, 4096, f) != NULL) { + atosResult.push_back(QString::fromUtf8(buffer)); + } + } + pclose(f); + } + for (int i = 0, j = 0; i < count; ++i) { + if (addresses[i]) { + if (j < atosResult.size() && !atosResult.at(j).isEmpty() && !atosResult.at(j).startsWith(qstr("0x"))) { + result.push_back(atosResult.at(j).trimmed()); + } else { + result.push_back(QString()); + } + ++j; + } else { + result.push_back(QString()); + } + } + return result; + +} + QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { QString initial = QString::fromUtf8(crashdump), result; QStringList lines = initial.split('\n'); @@ -560,19 +615,66 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { int32 i = 0, l = lines.size(); while (i < l) { + uint64 addresses[1024] = { 0 }; for (; i < l; ++i) { result.append(lines.at(i)).append('\n'); QString line = lines.at(i).trimmed(); - if (line == qstr("Backtrace:")) { + if (line == qstr("Base image addresses:")) { ++i; break; } } + uint64 base = 0; for (int32 start = i; i < l; ++i) { QString line = lines.at(i).trimmed(); if (line.isEmpty()) break; + if (!base) { + QRegularExpressionMatch m = QRegularExpression(qsl("^\\d+ (\\d+) \\((.+)\\)")).match(line); + if (m.hasMatch()) { + if (uint64 address = m.captured(1).toULongLong()) { + if (m.captured(2).endsWith(qstr("Contents/MacOS/Telegram"))) { + base = address; + } + } + } + } + } + if (base) { + result.append(qsl("(base address read: 0x%1)\n").arg(base, 0, 16)); + } else { + result.append(qsl("ERROR: base address not read!\n")); + } + + for (; i < l; ++i) { + result.append(lines.at(i)).append('\n'); + QString line = lines.at(i).trimmed(); + if (line == qstr("Backtrace:")) { + ++i; + break; + } + } + + int32 start = i; + for (; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + + if (QRegularExpression(qsl("^\\d+")).match(line).hasMatch()) { + QStringList lst = line.split(' ', QString::SkipEmptyParts); + if (lst.size() > 2) { + uint64 addr = lst.at(2).startsWith(qstr("0x")) ? lst.at(2).mid(2).toULongLong(0, 16) : lst.at(2).toULongLong(); + addresses[i - start] = addr; + } + } + } + + QStringList atos = atosstr(addresses, i - start, base); + for (i = start; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + if (!QRegularExpression(qsl("^\\d+")).match(line).hasMatch()) { if (!lines.at(i).startsWith(qstr("ERROR: "))) { result.append(qstr("BAD LINE: ")); @@ -581,7 +683,18 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { continue; } QStringList lst = line.split(' ', QString::SkipEmptyParts); - result.append(lst.at(0)).append(' '); + result.append('\n').append(lst.at(0)).append(qsl(". ")); + if (lst.size() < 3) { + result.append(qstr("BAD LINE: ")).append(line).append('\n'); + continue; + } + if (i - start < atos.size()) { + if (!atos.at(i - start).isEmpty()) { + result.append(atos.at(i - start)).append('\n'); + continue; + } + } + for (int j = 1, s = lst.size();;) { if (lst.at(j).startsWith('_')) { result.append(demanglestr(lst.at(j))); @@ -606,7 +719,7 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { break; } } - result.append('\n'); + result.append(qsl(" [demangled]")).append('\n'); } } return result; diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index c7b4793e94aa54..a0dc5330d8e3e8 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -141,7 +141,6 @@ public slots: }; void psWriteDump(); -void psWriteStackTrace(int file); int psShowCrash(const QString &crashdump); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index effea155951c5e..aa42c0e91a48b6 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -3008,7 +3008,7 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { return result; } -void psWriteStackTrace(int file) { +void psWriteStackTrace() { if (!LoadDbgHelp()) { SignalHandlers::dump() << "ERROR: Could not load dbghelp.dll!\n"; return; diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 3d46e615f902fc..43c79ca32c2793 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -118,7 +118,7 @@ LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers); LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); void psWriteDump(); -void psWriteStackTrace(int file); +void psWriteStackTrace(); int psShowCrash(const QString &crashdump); void psDeleteDir(const QString &dir); From 17a319fdb3120c7891a0f3a85b9e7dabd906a70f Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 31 Jan 2016 19:13:51 +0300 Subject: [PATCH 018/133] improved crash reports for linux --- Telegram/SourceFiles/boxes/aboutbox.cpp | 5 +- Telegram/SourceFiles/logs.cpp | 26 ++++-- Telegram/SourceFiles/pspecific_linux.cpp | 113 ++++++++++++++++++++--- Telegram/SourceFiles/window.cpp | 6 +- Telegram/SourceFiles/window.h | 1 + Telegram/Telegram.pro | 6 +- 6 files changed, 129 insertions(+), 28 deletions(-) diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index a9bc2e0adf4764..396d515f486e56 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -126,8 +126,7 @@ void AboutBox::dragEnterEvent(QDragEnterEvent *e) { void AboutBox::dropEvent(QDropEvent *e) { if (!_getCrashReportFile(e->mimeData()).isEmpty()) { e->acceptProposedAction(); - psExecTelegram(_getCrashReportFile(e->mimeData())); - App::quit(); + psShowCrash(_getCrashReportFile(e->mimeData())); } } @@ -142,4 +141,4 @@ QString telegramFaqLink() { } } return result; -} \ No newline at end of file +} diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index c660f77b349d85..6d117dc61ad19c 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -709,41 +709,47 @@ namespace SignalHandlers { #if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 ucontext_t *uc = (ucontext_t*)ucontext; - void *addresses[128] = { 0 }; void *caller = 0; - #if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) /* OSX < 10.6 */ #if defined(__x86_64__) - caller = (void*)uap->uc_mcontext->__ss.__rip; + caller = (void*)uc->uc_mcontext->__ss.__rip; #elif defined(__i386__) - caller = (void*)uap->uc_mcontext->__ss.__eip; + caller = (void*)uc->uc_mcontext->__ss.__eip; #else - caller = (void*)uap->uc_mcontext->__ss.__srr0; + caller = (void*)uc->uc_mcontext->__ss.__srr0; #endif #elif defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_6) /* OSX >= 10.6 */ #if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__) caller = (void*)uc->uc_mcontext->__ss.__rip; #else - caller = (void*)uap->uc_mcontext->__ss.__eip; + caller = (void*)uc->uc_mcontext->__ss.__eip; #endif #elif defined(__linux__) /* Linux */ #if defined(__i386__) - caller = (void*)uap->uc_mcontext.gregs[14]; /* Linux 32 */ + caller = (void*)uc->uc_mcontext.gregs[14]; /* Linux 32 */ #elif defined(__X86_64__) || defined(__x86_64__) - caller = (void*)uap->uc_mcontext.gregs[16]; /* Linux 64 */ + caller = (void*)uc->uc_mcontext.gregs[16]; /* Linux 64 */ #elif defined(__ia64__) /* Linux IA64 */ - caller = (void*)uap->uc_mcontext.sc_ip; + caller = (void*)uc->uc_mcontext.sc_ip; #endif #endif + void *addresses[132] = { 0 }; size_t size = backtrace(addresses, 128); /* overwrite sigaction with caller's address */ - if (caller) addresses[1] = caller; + if (caller) { + for (int i = size; i > 1; --i) { + addresses[i + 3] = addresses[i]; + } + addresses[2] = (void*)0x1; + addresses[3] = caller; + addresses[4] = (void*)0x1; + } #ifdef Q_OS_MAC dump() << "\nBase image addresses:\n"; diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 5134efeaf5227c..54b0227bf15232 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -979,6 +979,8 @@ void psWriteDump() { } QString demanglestr(const QString &mangled) { + if (mangled.isEmpty()) return mangled; + QByteArray cmd = ("c++filt -n " + mangled).toUtf8(); FILE *f = popen(cmd.constData(), "r"); if (!f) return "BAD_SYMBOL_" + mangled; @@ -994,6 +996,51 @@ QString demanglestr(const QString &mangled) { return result.trimmed(); } +QStringList addr2linestr(uint64 *addresses, int count) { + QStringList result; + if (!count) return result; + + result.reserve(count); + QString cmdstr = "addr2line -e " + escapeShell(cExeDir() + cExeName()); + for (int i = 0; i < count; ++i) { + if (addresses[i]) { + cmdstr += qsl(" 0x%1").arg(addresses[i], 0, 16); + } + } + QByteArray cmd = cmdstr.toUtf8(); + FILE *f = popen(cmd.constData(), "r"); + + QStringList addr2lineResult; + if (f) { + char buffer[4096] = {0}; + while (!feof(f)) { + if (fgets(buffer, 4096, f) != NULL) { + addr2lineResult.push_back(QString::fromUtf8(buffer)); + } + } + pclose(f); + } + for (int i = 0, j = 0; i < count; ++i) { + if (addresses[i]) { + if (j < addr2lineResult.size() && !addr2lineResult.at(j).isEmpty() && !addr2lineResult.at(j).startsWith(qstr("0x"))) { + QString res = addr2lineResult.at(j).trimmed(); + if (int index = res.indexOf(qstr("/Telegram/"))) { + if (index > 0) { + res = res.mid(index + qstr("/Telegram/").size()); + } + } + result.push_back(res); + } else { + result.push_back(QString()); + } + ++j; + } else { + result.push_back(QString()); + } + } + return result; +} + QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { QString initial = QString::fromUtf8(crashdump), result; QStringList lines = initial.split('\n'); @@ -1001,6 +1048,7 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { int32 i = 0, l = lines.size(); while (i < l) { + uint64 addresses[1024] = { 0 }; for (; i < l; ++i) { result.append(lines.at(i)).append('\n'); QString line = lines.at(i).trimmed(); @@ -1010,21 +1058,59 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { } } - for (int32 start = i; i < l; ++i) { + int32 start = i; + for (; i < l; ++i) { + QString line = lines.at(i).trimmed(); + if (line.isEmpty()) break; + + QRegularExpressionMatch m1 = QRegularExpression(qsl("^(.+)\\(([^+]+)\\+([^\\)]+)\\)\\[(.+)\\]$")).match(line); + QRegularExpressionMatch m2 = QRegularExpression(qsl("^(.+)\\[(.+)\\]$")).match(line); + QString addrstr = m1.hasMatch() ? m1.captured(4) : (m2.hasMatch() ? m2.captured(2) : QString()); + if (!addrstr.isEmpty()) { + uint64 addr = addrstr.startsWith(qstr("0x")) ? addrstr.mid(2).toULongLong(0, 16) : addrstr.toULongLong(); + if (addr > 1) { + addresses[i - start] = addr; + } + } + } + + QStringList addr2line = addr2linestr(addresses, i - start); + for (i = start; i < l; ++i) { QString line = lines.at(i).trimmed(); if (line.isEmpty()) break; - result.append(qsl("%1. ").arg(i + 1 - start)); + result.append(qsl("\n%1. ").arg(i - start)); if (line.startsWith(qstr("ERROR: "))) { result.append(line).append('\n'); continue; } - QRegularExpressionMatch m = QRegularExpression(qsl("^(.+)\\(([^+]+)\\+([^\\)]+)\\)(.+)$")).match(line); - if (!m.hasMatch()) { + if (line == qstr("[0x1]")) { + result.append(qsl("(0x1 separator)\n")); + continue; + } + + QRegularExpressionMatch m1 = QRegularExpression(qsl("^(.+)\\(([^+]*)\\+([^\\)]+)\\)(.+)$")).match(line); + QRegularExpressionMatch m2 = QRegularExpression(qsl("^(.+)\\[(.+)\\]$")).match(line); + if (!m1.hasMatch() && !m2.hasMatch()) { result.append(qstr("BAD LINE: ")).append(line).append('\n'); continue; } - result.append(demanglestr(m.captured(2))).append(qsl(" + ")).append(m.captured(3)).append(qsl(" (")).append(m.captured(1)).append(qsl(") ")).append(m.captured(4)).append('\n'); + + if (m1.hasMatch()) { + result.append(demanglestr(m1.captured(2))).append(qsl(" + ")).append(m1.captured(3)).append(qsl(" [")).append(m1.captured(1)).append(qsl("] ")); + if (!addr2line.at(i - start).isEmpty() && addr2line.at(i - start) != qsl("??:0")) { + result.append(qsl(" (")).append(addr2line.at(i - start)).append(qsl(")\n")); + } else { + result.append(m1.captured(4)).append(qsl(" (demangled)")).append('\n'); + } + } else { + result.append('[').append(m2.captured(1)).append(']'); + if (!addr2line.at(i - start).isEmpty() && addr2line.at(i - start) != qsl("??:0")) { + result.append(qsl(" (")).append(addr2line.at(i - start)).append(qsl(")\n")); + } else { + result.append(' ').append(m2.captured(2)).append('\n'); + } + } } } return result; @@ -1041,13 +1127,18 @@ int psShowCrash(const QString &crashdump) { text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); } - QByteArray args[] = { "" }; - int a_argc = 1; - char *a_argv[1] = { args[0].data() }; - QApplication app(a_argc, a_argv); + if (Sandbox::started()) { + ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); + return 0; + } + + QByteArray args[] = { "" }; + int a_argc = 1; + char *a_argv[1] = { args[0].data() }; + QApplication app(a_argc, a_argv); - ShowCrashReportWindow wnd(text); - return app.exec(); + ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); + return app.exec(); } bool _removeDirectory(const QString &path) { // from http://stackoverflow.com/questions/2256945/removing-a-non-empty-directory-programmatically-in-c-or-c diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index e3c2fe3fb2f602..18950d868520ab 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2113,7 +2113,7 @@ void LastCrashedWindow::onViewReport() { } void LastCrashedWindow::onSaveReport() { - QString to = QFileDialog::getSaveFileName(0, qsl("Telegram Crash Report"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + qsl("/report"), qsl("Telegram crash report (*.telegramcrash)")); + QString to = QFileDialog::getSaveFileName(0, qsl("Telegram Crash Report"), QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation) + qsl("/report.telegramcrash"), qsl("Telegram crash report (*.telegramcrash)")); if (!to.isEmpty()) { QFile file(to); if (file.open(QIODevice::WriteOnly)) { @@ -2874,3 +2874,7 @@ ShowCrashReportWindow::ShowCrashReportWindow(const QString &text) void ShowCrashReportWindow::resizeEvent(QResizeEvent *e) { _log.setGeometry(rect().marginsRemoved(QMargins(basicSize(), basicSize(), basicSize(), basicSize()))); } + +void ShowCrashReportWindow::closeEvent(QCloseEvent *e) { + deleteLater(); +} diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index f7c968ce84476a..fe3d2da2c67322 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -547,6 +547,7 @@ class ShowCrashReportWindow : public PreLaunchWindow { protected: void resizeEvent(QResizeEvent *e); + void closeEvent(QCloseEvent *e); private: diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 96ede807181a08..64d4739b0b8def 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -281,12 +281,12 @@ QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-result -Wno-unused-parameter -Wno-unused-v CONFIG(release, debug|release) { QMAKE_CXXFLAGS_RELEASE -= -O2 - QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing + QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g QMAKE_LFLAGS_RELEASE -= -O1 - QMAKE_LFLAGS_RELEASE += -Ofast -flto -rdynamic + QMAKE_LFLAGS_RELEASE += -Ofast -flto -rdynamic -g } CONFIG(debug, debug|release) { - QMAKE_LFLAGS_DEBUG += -rdynamic + QMAKE_LFLAGS_DEBUG += -rdynamic -g } INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ From fb4ee55ffa02d731cc7bf78f2745ac2e5d131754 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 31 Jan 2016 21:01:01 +0300 Subject: [PATCH 019/133] removed unused headers in mac --- Telegram/SourceFiles/logs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index c660f77b349d85..1d850194d412a5 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -547,6 +547,7 @@ void _moveOldDataFiles(const QString &wasDir) { } #if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 + #include #include #include @@ -554,8 +555,6 @@ void _moveOldDataFiles(const QString &wasDir) { #ifdef Q_OS_MAC #include -#include -#include #endif From a0d171bb492bfaad4381708e498304de3139fb9d Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 31 Jan 2016 21:01:43 +0300 Subject: [PATCH 020/133] moved minizip to ThirdParty, added google breakpad to ThirdParty for windows (mac, linux broken) --- Telegram/SourceFiles/boxes/aboutbox.cpp | 2 +- Telegram/SourceFiles/logs.cpp | 77 + Telegram/SourceFiles/main.cpp | 7 +- Telegram/SourceFiles/pspecific_linux.cpp | 27 +- Telegram/SourceFiles/pspecific_linux.h | 2 +- Telegram/SourceFiles/pspecific_mac.cpp | 22 +- Telegram/SourceFiles/pspecific_mac.h | 2 +- Telegram/SourceFiles/pspecific_wnd.cpp | 132 +- Telegram/SourceFiles/pspecific_wnd.h | 6 +- Telegram/SourceFiles/window.cpp | 54 +- Telegram/SourceFiles/window.h | 2 + Telegram/Telegram.vcxproj | 168 +- Telegram/Telegram.vcxproj.filters | 124 +- .../client/linux/handler/exception_handler.cc | 765 ++++++ .../client/linux/handler/exception_handler.h | 278 ++ .../client/mac/handler/exception_handler.cc | 855 +++++++ .../client/mac/handler/exception_handler.h | 281 ++ .../client/windows/common/ipc_protocol.h | 181 ++ .../crash_generation_client.cc | 405 +++ .../crash_generation_client.h | 182 ++ .../windows/handler/exception_handler.cc | 1073 ++++++++ .../windows/handler/exception_handler.h | 522 ++++ .../ThirdParty/breakpad/common/scoped_ptr.h | 404 +++ .../breakpad/common/windows/guid_string.cc | 76 + .../breakpad/common/windows/guid_string.h | 58 + .../common/windows/string_utils-inl.h | 142 ++ .../google_breakpad/common/breakpad_types.h | 68 + .../common/minidump_cpu_amd64.h | 235 ++ .../google_breakpad/common/minidump_cpu_arm.h | 151 ++ .../common/minidump_cpu_arm64.h | 140 + .../common/minidump_cpu_mips.h | 160 ++ .../google_breakpad/common/minidump_cpu_ppc.h | 168 ++ .../common/minidump_cpu_ppc64.h | 134 + .../common/minidump_cpu_sparc.h | 163 ++ .../google_breakpad/common/minidump_cpu_x86.h | 174 ++ .../common/minidump_exception_linux.h | 87 + .../common/minidump_exception_mac.h | 205 ++ .../common/minidump_exception_ps3.h | 67 + .../common/minidump_exception_solaris.h | 94 + .../common/minidump_exception_win32.h | 2261 +++++++++++++++++ .../google_breakpad/common/minidump_format.h | 972 +++++++ .../_other => ThirdParty/minizip}/crypt.h | 0 .../_other => ThirdParty/minizip}/ioapi.h | 0 .../_other => ThirdParty/minizip}/zip.c | 0 .../_other => ThirdParty/minizip}/zip.h | 0 45 files changed, 10654 insertions(+), 272 deletions(-) create mode 100644 Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc create mode 100644 Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h create mode 100644 Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h create mode 100644 Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc create mode 100644 Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h create mode 100644 Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc create mode 100644 Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h create mode 100644 Telegram/ThirdParty/breakpad/common/scoped_ptr.h create mode 100644 Telegram/ThirdParty/breakpad/common/windows/guid_string.cc create mode 100644 Telegram/ThirdParty/breakpad/common/windows/guid_string.h create mode 100644 Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h rename Telegram/{SourceFiles/_other => ThirdParty/minizip}/crypt.h (100%) rename Telegram/{SourceFiles/_other => ThirdParty/minizip}/ioapi.h (100%) rename Telegram/{SourceFiles/_other => ThirdParty/minizip}/zip.c (100%) rename Telegram/{SourceFiles/_other => ThirdParty/minizip}/zip.h (100%) diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index 396d515f486e56..e593541d9348a6 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -126,7 +126,7 @@ void AboutBox::dragEnterEvent(QDragEnterEvent *e) { void AboutBox::dropEvent(QDropEvent *e) { if (!_getCrashReportFile(e->mimeData()).isEmpty()) { e->acceptProposedAction(); - psShowCrash(_getCrashReportFile(e->mimeData())); + showCrashReportWindow(_getCrashReportFile(e->mimeData())); } } diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 6d117dc61ad19c..d4bf9ea751b122 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -22,6 +22,15 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include "pspecific.h" +// see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/ +#ifdef Q_OS_WIN +#include "client/windows/handler/exception_handler.h" +#elif defined Q_OS_MAC +#include "client/mac/handler/exception_handler.h" +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 +#include "client/linux/handler/exception_handler.h" +#endif + enum LogDataType { LogDataMain, LogDataDebug, @@ -257,6 +266,11 @@ void _logsWrite(LogDataType type, const QString &msg) { void _moveOldDataFiles(const QString &from); +namespace SignalHandlers { + void StartBreakpad(); + void FinishBreakpad(); +} + namespace Logs { Initializer::Initializer() { @@ -304,6 +318,7 @@ namespace Logs { QDir().mkpath(cWorkingDir() + qstr("tdata")); Global::WorkingDirReady(); + SignalHandlers::StartBreakpad(); if (!LogsData->openMain()) { delete LogsData; @@ -354,6 +369,8 @@ namespace Logs { LogsInMemory = DeletedLogsInMemory; _logsMutex(LogDataMain, true); + + SignalHandlers::FinishBreakpad(); } bool started() { @@ -640,6 +657,60 @@ namespace SignalHandlers { return stream; } + google_breakpad::ExceptionHandler* BreakpadExceptionHandler = 0; + +#ifdef Q_OS_WIN + bool DumpCallback(const wchar_t* _dump_dir, const wchar_t* _minidump_id, void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion, bool success) +#elif defined Q_OS_MAC + bool DumpCallback(const char* _dump_dir, const char* _minidump_id, void *context, bool success) +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 + bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, bool success) +#endif + { + return success; + } + + void StartBreakpad() { + QString dumpPath = cWorkingDir() + qsl("tdumps"); + QDir().mkpath(dumpPath); + +#ifdef Q_OS_WIN + BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( + dumpPath.toStdWString(), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true + ); +#elif defined Q_OS_MAC + pHandler = new google_breakpad::ExceptionHandler( + dumpPath.toStdString(), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true, + 0 + ); +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 + pHandler = new google_breakpad::ExceptionHandler( + google_breakpad::MinidumpDescriptor(dumpPath.toStdString()), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true, + -1 + ); +#endif + } + + void FinishBreakpad() { + if (BreakpadExceptionHandler) { + google_breakpad::ExceptionHandler *h = BreakpadExceptionHandler; + BreakpadExceptionHandler = 0; + delete h; + } + } + Qt::HANDLE LoggingCrashThreadId = 0; bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; @@ -769,6 +840,8 @@ namespace SignalHandlers { backtrace_symbols_fd(addresses, size, CrashDumpFileNo); #else + dump() << "\nBacktrace:\n"; + psWriteStackTrace(); #endif @@ -842,6 +915,10 @@ namespace SignalHandlers { } void finish() { + if (BreakpadExceptionHandler) { + delete BreakpadExceptionHandler; + BreakpadExceptionHandler = 0; + } if (CrashDumpFile) { fclose(CrashDumpFile); unlink(CrashDumpPath.constData()); diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index b70d2faff70420..fc5d8029917f89 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -27,18 +27,13 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org int main(int argc, char *argv[]) { int result = 0; -#ifdef Q_OS_WIN - _oldWndExceptionFilter = SetUnhandledExceptionFilter(_exceptionFilter); -// CAPIHook apiHook("kernel32.dll", "SetUnhandledExceptionFilter", (PROC)RedirectedSetUnhandledExceptionFilter); -#endif - settingsParseArgs(argc, argv); if (cLaunchMode() == LaunchModeFixPrevious) { return psFixPrevious(); } else if (cLaunchMode() == LaunchModeCleanup) { return psCleanup(); } else if (cLaunchMode() == LaunchModeShowCrash) { - return psShowCrash(QFileInfo(cStartUrl()).absoluteFilePath()); + return showCrashReportWindow(QFileInfo(cStartUrl()).absoluteFilePath()); } Logs::Initializer _logs; diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 54b0227bf15232..47429e862edb5b 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -1041,7 +1041,7 @@ QStringList addr2linestr(uint64 *addresses, int count) { return result; } -QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) { QString initial = QString::fromUtf8(crashdump), result; QStringList lines = initial.split('\n'); result.reserve(initial.size()); @@ -1116,31 +1116,6 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { return result; } -int psShowCrash(const QString &crashdump) { - QString text; - - QFile dump(crashdump); - if (dump.open(QIODevice::ReadOnly)) { - text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); - text += _showCrashDump(dump.readAll(), crashdump); - } else { - text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); - } - - if (Sandbox::started()) { - ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); - return 0; - } - - QByteArray args[] = { "" }; - int a_argc = 1; - char *a_argv[1] = { args[0].data() }; - QApplication app(a_argc, a_argv); - - ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); - return app.exec(); -} - bool _removeDirectory(const QString &path) { // from http://stackoverflow.com/questions/2256945/removing-a-non-empty-directory-programmatically-in-c-or-c QByteArray pathRaw = QFile::encodeName(path); DIR *d = opendir(pathRaw.constData()); diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index ebc3e122882cd0..b4380165b53ec4 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -114,7 +114,7 @@ public slots: }; void psWriteDump(); -int psShowCrash(const QString &crashdump); +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 6602167031a61f..e86334561ff8f5 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -608,7 +608,7 @@ QStringList atosstr(uint64 *addresses, int count, uint64 base) { } -QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) { QString initial = QString::fromUtf8(crashdump), result; QStringList lines = initial.split('\n'); result.reserve(initial.size()); @@ -725,26 +725,6 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { return result; } -int psShowCrash(const QString &crashdump) { - QString text; - - QFile dump(crashdump); - if (dump.open(QIODevice::ReadOnly)) { - text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); - text += _showCrashDump(dump.readAll(), crashdump); - } else { - text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); - } - - QByteArray args[] = { "" }; - int a_argc = 1; - char *a_argv[1] = { args[0].data() }; - QApplication app(a_argc, a_argv); - - ShowCrashReportWindow wnd(text); - return app.exec(); -} - void psDeleteDir(const QString &dir) { objc_deleteDir(dir); } diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index a0dc5330d8e3e8..154fee8f684035 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -141,7 +141,7 @@ public slots: }; void psWriteDump(); -int psShowCrash(const QString &crashdump); +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index aa42c0e91a48b6..d871085c597103 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2356,19 +2356,6 @@ void psUpdateOverlayed(TWidget *widget) { static const WCHAR *_programName = AppName; // folder in APPDATA, if current path is unavailable for writing static const WCHAR *_exeName = L"Telegram.exe"; -LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter = 0; - -typedef BOOL (FAR STDAPICALLTYPE *t_miniDumpWriteDump)( - _In_ HANDLE hProcess, - _In_ DWORD ProcessId, - _In_ HANDLE hFile, - _In_ MINIDUMP_TYPE DumpType, - _In_opt_ PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - _In_opt_ PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - _In_opt_ PMINIDUMP_CALLBACK_INFORMATION CallbackParam -); -t_miniDumpWriteDump miniDumpWriteDump = 0; - // Stack walk code is inspired by http://www.codeproject.com/Articles/11132/Walking-the-callstack static const int StackEntryMaxNameLength = MAX_SYM_NAME + 1; @@ -2555,7 +2542,7 @@ typedef BOOL (FAR STDAPICALLTYPE *t_Module32Next)(HANDLE hSnapshot, LPMODULEENTR t_Module32Next module32Next = 0; bool LoadDbgHelp(bool extended = false) { - if (miniDumpWriteDump && (!extended || symInitialize)) return true; + if (stackWalk64 && (!extended || symInitialize)) return true; HMODULE hDll = 0; @@ -2586,17 +2573,14 @@ bool LoadDbgHelp(bool extended = false) { if (!hDll) return false; - miniDumpWriteDump = (t_miniDumpWriteDump)GetProcAddress(hDll, "MiniDumpWriteDump"); - stackWalk64 = (t_StackWalk64)GetProcAddress(hDll, "StackWalk64"); symFunctionTableAccess64 = (t_SymFunctionTableAccess64)GetProcAddress(hDll, "SymFunctionTableAccess64"); symGetModuleBase64 = (t_SymGetModuleBase64)GetProcAddress(hDll, "SymGetModuleBase64"); - if (!miniDumpWriteDump || - !stackWalk64 || + if (!stackWalk64 || !symFunctionTableAccess64 || !symGetModuleBase64) { - miniDumpWriteDump = 0; + stackWalk64 = 0; return false; } @@ -2686,17 +2670,6 @@ bool LoadDbgHelp(bool extended = false) { symOptions |= SYMOPT_FAIL_CRITICAL_ERRORS; symOptions = symSetOptions(symOptions); - //WCHAR buf[StackEntryMaxNameLength] = { 0 }; - //if (symGetSearchPath) { - // if (symGetSearchPath(hProcess, buf, StackEntryMaxNameLength) == FALSE) { - // return false; - // } - //} - - //WCHAR szUserName[1024] = { 0 }; - //DWORD dwSize = 1024; - //GetUserName(szUserName, &dwSize); - const WCHAR *dllname[] = { L"kernel32.dll", L"tlhelp32.dll" }; HINSTANCE hToolhelp = NULL; @@ -2744,57 +2717,6 @@ bool LoadDbgHelp(bool extended = false) { return true; } -void _generateDump(EXCEPTION_POINTERS* pExceptionPointers) { - static const int maxFileLen = MAX_PATH * 10; - - if (!LoadDbgHelp()) return; - - HANDLE hDumpFile = 0; - - WCHAR szPath[maxFileLen]; - DWORD len = GetModuleFileName(GetModuleHandle(0), szPath, maxFileLen); - if (!len) return; - - WCHAR *pathEnd = szPath + len; - - if (!_wcsicmp(pathEnd - wcslen(_exeName), _exeName)) { - wsprintf(pathEnd - wcslen(_exeName), L""); - hDumpFile = _generateDumpFileAtPath(szPath); - } - if (!hDumpFile || hDumpFile == INVALID_HANDLE_VALUE) { - WCHAR wstrPath[maxFileLen]; - DWORD wstrPathLen; - if (wstrPathLen = GetEnvironmentVariable(L"APPDATA", wstrPath, maxFileLen)) { - wsprintf(wstrPath + wstrPathLen, L"\\%s\\", _programName); - hDumpFile = _generateDumpFileAtPath(wstrPath); - } - } - - if (!hDumpFile || hDumpFile == INVALID_HANDLE_VALUE) { - return; - } - - MINIDUMP_EXCEPTION_INFORMATION ExpParam = {0}; - ExpParam.ThreadId = GetCurrentThreadId(); - ExpParam.ExceptionPointers = pExceptionPointers; - ExpParam.ClientPointers = TRUE; - - miniDumpWriteDump(GetCurrentProcess(), GetCurrentProcessId(), hDumpFile, MiniDumpWithDataSegs, &ExpParam, NULL, NULL); -} - -LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers) { - _generateDump(pExceptionPointers); - return _oldWndExceptionFilter ? (*_oldWndExceptionFilter)(pExceptionPointers) : EXCEPTION_CONTINUE_SEARCH; -} - -// see http://www.codeproject.com/Articles/154686/SetUnhandledExceptionFilter-and-the-C-C-Runtime-Li -LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter) { - // When the CRT calls SetUnhandledExceptionFilter with NULL parameter - // our handler will not get removed. - _oldWndExceptionFilter = lpTopLevelExceptionFilter; - return 0; -} - struct StackEntry { DWORD64 offset; // if 0, we have no valid entry CHAR name[StackEntryMaxNameLength]; @@ -2841,7 +2763,11 @@ void psWriteDump() { } char ImageHlpSymbol64[sizeof(IMAGEHLP_SYMBOL64) + StackEntryMaxNameLength]; -QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) { + if (!LoadDbgHelp(true)) { + return qsl("ERROR: could not init dbghelp.dll!"); + } + HANDLE hProcess = GetCurrentProcess(); QString initial = QString::fromUtf8(crashdump), result; @@ -2889,17 +2815,7 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { } } if (!tolaunch.isEmpty()) { - if (QFile(tolaunch).exists()) { - QString targs = qsl("-crash \"%1\"").arg(dumpfile.replace('"', qsl("\"\""))); - HINSTANCE r = ShellExecute(0, 0, QDir::toNativeSeparators(tolaunch).toStdWString().c_str(), targs.toStdWString().c_str(), 0, SW_SHOWNORMAL); - if (long(r) < 32) { - result.append(qsl("ERROR: executable '%1' with args '%2' for this crashdump could not be launched! Result: %3").arg(tolaunch).arg(targs).arg(long(r))); - } else { - return QString(); - } - } else { - result.append(qsl("ERROR: executable '%1' for this crashdump was not found!").arg(tolaunch)); - } + result.append(qsl("ERROR: for this crashdump executable '%1' should be used!").arg(tolaunch)); } while (i < l) { @@ -3005,6 +2921,8 @@ QString _showCrashDump(const QByteArray &crashdump, QString dumpfile) { } } } + + symCleanup(hProcess); return result; } @@ -3086,34 +3004,6 @@ void psWriteStackTrace() { } } -int psShowCrash(const QString &crashdump) { - QString text; - - QFile dump(crashdump); - if (dump.open(QIODevice::ReadOnly)) { - text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); - if (!LoadDbgHelp(true)) { - text += qsl("ERROR: could not init dbghelp.dll!"); - } else { - text += _showCrashDump(dump.readAll(), crashdump); - symCleanup(GetCurrentProcess()); - } - } else { - text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); - } - - WCHAR szTemp[MAX_PATH + 1] = { 0 }; - GetModuleFileName(NULL, szTemp, MAX_PATH); - - QByteArray args[] = { QString::fromWCharArray(szTemp).toUtf8() }; - int a_argc = 1; - char *a_argv[1] = { args[0].data() }; - QApplication app(a_argc, a_argv); - - ShowCrashReportWindow wnd(text); - return app.exec(); -} - class StringReferenceWrapper { public: diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 43c79ca32c2793..2f6d14af03b5ac 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -113,13 +113,9 @@ public slots: void psDestroyIcons(); }; -extern LPTOP_LEVEL_EXCEPTION_FILTER _oldWndExceptionFilter; -LONG CALLBACK _exceptionFilter(EXCEPTION_POINTERS* pExceptionPointers); -LPTOP_LEVEL_EXCEPTION_FILTER WINAPI RedirectedSetUnhandledExceptionFilter(_In_opt_ LPTOP_LEVEL_EXCEPTION_FILTER lpTopLevelExceptionFilter); - void psWriteDump(); void psWriteStackTrace(); -int psShowCrash(const QString &crashdump); +QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile); void psDeleteDir(const QString &dir); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 18950d868520ab..77158620e4ddb0 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -41,7 +41,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "mediaview.h" #include "localstorage.h" -#include "_other/zip.h" +#include "zip.h" ConnectingWidget::ConnectingWidget(QWidget *parent, const QString &text, const QString &reconnect) : QWidget(parent), _shadow(st::boxShadow), _reconnect(this, QString()) { set(text, reconnect); @@ -63,6 +63,7 @@ void ConnectingWidget::set(const QString &text, const QString &reconnect) { resize(st::connectingPadding.left() + _textWidth + _reconnectWidth + st::connectingPadding.right() + st::boxShadow.pxWidth(), st::boxShadow.pxHeight() + st::connectingPadding.top() + st::linkFont->height + st::connectingPadding.bottom()); update(); } + void ConnectingWidget::paintEvent(QPaintEvent *e) { QPainter p(this); @@ -2021,22 +2022,24 @@ LastCrashedWindow::LastCrashedWindow() #ifdef Q_OS_WIN if (_sendingState != SendingNoReport) { QString maxDump, maxDumpFull; - QDateTime maxDumpModified; + QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified(); qint64 maxDumpSize = 0; QFileInfoList list = QDir(cWorkingDir() + qsl("tdumps")).entryInfoList(); for (int32 i = 0, l = list.size(); i < l; ++i) { - if (maxDump.isEmpty() || maxDumpModified < list.at(i).lastModified()) { - maxDump = list.at(i).fileName(); - maxDumpFull = list.at(i).absoluteFilePath(); - maxDumpModified = list.at(i).lastModified(); - maxDumpSize = list.at(i).size(); + QString name = list.at(i).fileName(); + if (name.endsWith(qstr(".dmp"))) { + QDateTime modified = list.at(i).lastModified(); + if (maxDump.isEmpty() || qAbs(workingModified.secsTo(modified)) < qAbs(workingModified.secsTo(maxDumpModified))) { + maxDump = name; + maxDumpModified = modified; + maxDumpFull = list.at(i).absoluteFilePath(); + maxDumpSize = list.at(i).size(); + } } } - if (!maxDump.isEmpty()) { - if (qAbs(QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified().secsTo(maxDumpModified)) < 10) { - _minidumpName = maxDump; - _minidumpFull = maxDumpFull; - } + if (!maxDump.isEmpty() && qAbs(workingModified.secsTo(maxDumpModified)) < 10) { + _minidumpName = maxDump; + _minidumpFull = maxDumpFull; } _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(maxDumpSize / 1024)); @@ -2306,7 +2309,7 @@ void LastCrashedWindow::onCheckingFinished() { #ifdef Q_OS_WIN QFileInfo dmpFile(_minidumpFull); if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && - QRegularExpression(qsl("^Telegram\\-[\\d\\.\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { + QRegularExpression(qsl("^[a-z0-9\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { QFile file(_minidumpFull); if (file.open(QIODevice::ReadOnly)) { QByteArray minidump = file.readAll(); @@ -2878,3 +2881,28 @@ void ShowCrashReportWindow::resizeEvent(QResizeEvent *e) { void ShowCrashReportWindow::closeEvent(QCloseEvent *e) { deleteLater(); } + +int showCrashReportWindow(const QString &crashdump) { + QString text; + + QFile dump(crashdump); + if (dump.open(QIODevice::ReadOnly)) { + text = qsl("Crash dump file '%1':\n\n").arg(QFileInfo(crashdump).absoluteFilePath()); + text += psPrepareCrashDump(dump.readAll(), crashdump); + } else { + text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); + } + + if (Sandbox::started()) { + ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); + return 0; + } + + QByteArray args[] = { QDir::toNativeSeparators(cExeDir() + cExeName()).toUtf8() }; + int a_argc = 1; + char *a_argv[1] = { args[0].data() }; + QApplication app(a_argc, a_argv); + + ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); + return app.exec(); +} diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index fe3d2da2c67322..ef715b23757b0d 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -554,3 +554,5 @@ class ShowCrashReportWindow : public PreLaunchWindow { PreLaunchLog _log; }; + +int showCrashReportWindow(const QString &crashdump); diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 44ffbe14dd3b38..21af719fa8934a 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -69,7 +69,7 @@ AL_LIBTYPE_STATIC;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl_debug\Debug\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl_debug\Debug\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\ThirdParty\breakpad;.\ThirdParty\minizip;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase false Use @@ -1053,14 +1053,44 @@ - + + NotUsing + + + NotUsing + + + NotUsing + + NotUsing - - - + + + + + + + + + + + + + + + + + + + + + + + + $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... @@ -1069,7 +1099,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1078,7 +1108,7 @@ Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" Moc%27ing window.h... Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1110,7 +1140,7 @@ Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" Moc%27ing application.h... Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1133,7 +1163,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1143,7 +1173,7 @@ Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" Moc%27ing aboutbox.h... Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1157,7 +1187,7 @@ Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" Moc%27ing addcontactbox.h... Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1171,7 +1201,7 @@ Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" Moc%27ing confirmbox.h... Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1185,7 +1215,7 @@ Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" Moc%27ing connectionbox.h... Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1199,7 +1229,7 @@ Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" Moc%27ing contactsbox.h... Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1213,7 +1243,7 @@ Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" Moc%27ing photocropbox.h... Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1227,7 +1257,7 @@ Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" Moc%27ing photosendbox.h... Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1241,7 +1271,7 @@ Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" Moc%27ing emojibox.h... Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1255,7 +1285,7 @@ Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" Moc%27ing downloadpathbox.h... Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1274,7 +1304,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1288,7 +1318,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1302,7 +1332,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1316,7 +1346,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1330,7 +1360,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1344,7 +1374,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1358,7 +1388,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1372,7 +1402,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1386,7 +1416,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1400,7 +1430,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1410,7 +1440,7 @@ Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" Moc%27ing animation.h... Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1424,7 +1454,7 @@ Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" Moc%27ing button.h... Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1438,7 +1468,7 @@ Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" Moc%27ing flatbutton.h... Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1452,7 +1482,7 @@ Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" Moc%27ing flatinput.h... Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1466,7 +1496,7 @@ Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" Moc%27ing countryinput.h... Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1481,7 +1511,7 @@ Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" Moc%27ing scrollarea.h... Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1495,7 +1525,7 @@ Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" Moc%27ing dialogswidget.h... Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1509,7 +1539,7 @@ Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" Moc%27ing flattextarea.h... Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1523,7 +1553,7 @@ Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" Moc%27ing fileuploader.h... Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1537,7 +1567,7 @@ Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" Moc%27ing dropdown.h... Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1558,7 +1588,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1568,7 +1598,7 @@ Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" Moc%27ing flatcheckbox.h... Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1603,7 +1633,7 @@ Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" Moc%27ing flatlabel.h... Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1617,7 +1647,7 @@ Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" Moc%27ing twidget.h... Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1636,7 +1666,7 @@ "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" @@ -1647,7 +1677,7 @@ Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" Moc%27ing historywidget.h... Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1661,7 +1691,7 @@ Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" Moc%27ing intro.h... Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1675,7 +1705,7 @@ Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" Moc%27ing introcode.h... Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1689,7 +1719,7 @@ Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" Moc%27ing introphone.h... Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1703,7 +1733,7 @@ Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" Moc%27ing introsignup.h... Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1722,7 +1752,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1732,7 +1762,7 @@ Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" Moc%27ing layerwidget.h... Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1746,7 +1776,7 @@ Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" Moc%27ing localimageloader.h... Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1767,7 +1797,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1797,7 +1827,7 @@ Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" Moc%27ing mtpConnection.h... Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1811,7 +1841,7 @@ Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" Moc%27ing mainwidget.h... Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1825,7 +1855,7 @@ Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" Moc%27ing mtp.h... Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1844,7 +1874,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1854,7 +1884,7 @@ Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" Moc%27ing mtpFileLoader.h... Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1870,7 +1900,7 @@ Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" Moc%27ing mtpDC.h... Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1886,7 +1916,7 @@ Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" Moc%27ing mtpSession.h... Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1900,7 +1930,7 @@ Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" Moc%27ing settingswidget.h... Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1914,7 +1944,7 @@ Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" Moc%27ing profilewidget.h... Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1928,7 +1958,7 @@ Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" Moc%27ing pspecific_wnd.h... Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1948,7 +1978,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1962,7 +1992,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1976,7 +2006,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1992,7 +2022,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2009,7 +2039,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2048,7 +2078,7 @@ Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" Moc%27ing sysbuttons.h... Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2062,7 +2092,7 @@ Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" Moc%27ing title.h... Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters index f58dc5f4233802..394abb94be5c3f 100644 --- a/Telegram/Telegram.vcxproj.filters +++ b/Telegram/Telegram.vcxproj.filters @@ -46,6 +46,42 @@ {9d7bbb7d-817b-4f19-a719-74e674bdc84b} + + {cda95767-f353-4a6b-a124-73632e61028a} + + + {1abe710c-3c36-484c-b2a5-881c29a051c2} + + + {7bd3aaf0-4c45-4177-841d-e09b420f969b} + + + {7e91af88-3ca1-43f3-b213-ae3a6e9adbe3} + + + {729af6c6-f616-40f3-86d8-7a177a4ca581} + + + {6ebf64cf-1373-4c85-bc7c-a334da36957d} + + + {342ef107-8d0a-4518-a4ef-186706a51186} + + + {ea350daa-d09f-4e6a-a31d-46c971c7e117} + + + {22eae21d-0b6e-4c24-b12a-cad8538b25cf} + + + {6a602fc1-ef90-4276-ad51-e68e520a750d} + + + {8c8b7809-73e8-4074-986d-39cfda2961a0} + + + {1a35c875-fa31-4146-9555-1443abb58026} + @@ -897,8 +933,17 @@ Generated Files\Release - - Generated Files + + ThirdParty\minizip + + + ThirdParty\breakpad\client\windows\handler + + + ThirdParty\breakpad\client\windows\crash_generation + + + ThirdParty\breakpad\common\windows @@ -989,14 +1034,77 @@ Source Files - - Generated Files + + ThirdParty\minizip - - Generated Files + + ThirdParty\minizip - - Generated Files + + ThirdParty\minizip + + + ThirdParty\breakpad\client\windows\handler + + + ThirdParty\breakpad\client\windows\common + + + ThirdParty\breakpad\client\windows\crash_generation + + + ThirdParty\breakpad\common\windows + + + ThirdParty\breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\common\windows + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common + + + ThirdParty\breakpad\google_breakpad\common diff --git a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc new file mode 100644 index 00000000000000..148d61f9f3d95e --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc @@ -0,0 +1,765 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// The ExceptionHandler object installs signal handlers for a number of +// signals. We rely on the signal handler running on the thread which crashed +// in order to identify it. This is true of the synchronous signals (SEGV etc), +// but not true of ABRT. Thus, if you send ABRT to yourself in a program which +// uses ExceptionHandler, you need to use tgkill to direct it to the current +// thread. +// +// The signal flow looks like this: +// +// SignalHandler (uses a global stack of ExceptionHandler objects to find +// | one to handle the signal. If the first rejects it, try +// | the second etc...) +// V +// HandleSignal ----------------------------| (clones a new process which +// | | shares an address space with +// (wait for cloned | the crashed process. This +// process) | allows us to ptrace the crashed +// | | process) +// V V +// (set signal handler to ThreadEntry (static function to bounce +// SIG_DFL and rethrow, | back into the object) +// killing the crashed | +// process) V +// DoDump (writes minidump) +// | +// V +// sys_exit +// + +// This code is a little fragmented. Different functions of the ExceptionHandler +// class run in a number of different contexts. Some of them run in a normal +// context and are easy to code, others run in a compromised context and the +// restrictions at the top of minidump_writer.cc apply: no libc and use the +// alternative malloc. Each function should have comment above it detailing the +// context which it runs in. + +#include "client/linux/handler/exception_handler.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include + +#include "common/basictypes.h" +#include "common/linux/linux_libc_support.h" +#include "common/memory.h" +#include "client/linux/log/log.h" +#include "client/linux/microdump_writer/microdump_writer.h" +#include "client/linux/minidump_writer/linux_dumper.h" +#include "client/linux/minidump_writer/minidump_writer.h" +#include "common/linux/eintr_wrapper.h" +#include "third_party/lss/linux_syscall_support.h" + +#if defined(__ANDROID__) +#include "linux/sched.h" +#endif + +#ifndef PR_SET_PTRACER +#define PR_SET_PTRACER 0x59616d61 +#endif + +// A wrapper for the tgkill syscall: send a signal to a specific thread. +static int tgkill(pid_t tgid, pid_t tid, int sig) { + return syscall(__NR_tgkill, tgid, tid, sig); + return 0; +} + +namespace google_breakpad { + +namespace { +// The list of signals which we consider to be crashes. The default action for +// all these signals must be Core (see man 7 signal) because we rethrow the +// signal after handling it and expect that it'll be fatal. +const int kExceptionSignals[] = { + SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS +}; +const int kNumHandledSignals = + sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]); +struct sigaction old_handlers[kNumHandledSignals]; +bool handlers_installed = false; + +// InstallAlternateStackLocked will store the newly installed stack in new_stack +// and (if it exists) the previously installed stack in old_stack. +stack_t old_stack; +stack_t new_stack; +bool stack_installed = false; + +// Create an alternative stack to run the signal handlers on. This is done since +// the signal might have been caused by a stack overflow. +// Runs before crashing: normal context. +void InstallAlternateStackLocked() { + if (stack_installed) + return; + + memset(&old_stack, 0, sizeof(old_stack)); + memset(&new_stack, 0, sizeof(new_stack)); + + // SIGSTKSZ may be too small to prevent the signal handlers from overrunning + // the alternative stack. Ensure that the size of the alternative stack is + // large enough. + static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); + + // Only set an alternative stack if there isn't already one, or if the current + // one is too small. + if (sys_sigaltstack(NULL, &old_stack) == -1 || !old_stack.ss_sp || + old_stack.ss_size < kSigStackSize) { + new_stack.ss_sp = calloc(1, kSigStackSize); + new_stack.ss_size = kSigStackSize; + + if (sys_sigaltstack(&new_stack, NULL) == -1) { + free(new_stack.ss_sp); + return; + } + stack_installed = true; + } +} + +// Runs before crashing: normal context. +void RestoreAlternateStackLocked() { + if (!stack_installed) + return; + + stack_t current_stack; + if (sys_sigaltstack(NULL, ¤t_stack) == -1) + return; + + // Only restore the old_stack if the current alternative stack is the one + // installed by the call to InstallAlternateStackLocked. + if (current_stack.ss_sp == new_stack.ss_sp) { + if (old_stack.ss_sp) { + if (sys_sigaltstack(&old_stack, NULL) == -1) + return; + } else { + stack_t disable_stack; + disable_stack.ss_flags = SS_DISABLE; + if (sys_sigaltstack(&disable_stack, NULL) == -1) + return; + } + } + + free(new_stack.ss_sp); + stack_installed = false; +} + +void InstallDefaultHandler(int sig) { +#if defined(__ANDROID__) + // Android L+ expose signal and sigaction symbols that override the system + // ones. There is a bug in these functions where a request to set the handler + // to SIG_DFL is ignored. In that case, an infinite loop is entered as the + // signal is repeatedly sent to breakpad's signal handler. + // To work around this, directly call the system's sigaction. + struct kernel_sigaction sa; + memset(&sa, 0, sizeof(sa)); + sys_sigemptyset(&sa.sa_mask); + sa.sa_handler_ = SIG_DFL; + sa.sa_flags = SA_RESTART; + sys_rt_sigaction(sig, &sa, NULL, sizeof(kernel_sigset_t)); +#else + signal(sig, SIG_DFL); +#endif +} + +// The global exception handler stack. This is needed because there may exist +// multiple ExceptionHandler instances in a process. Each will have itself +// registered in this stack. +std::vector* g_handler_stack_ = NULL; +pthread_mutex_t g_handler_stack_mutex_ = PTHREAD_MUTEX_INITIALIZER; + +// sizeof(CrashContext) can be too big w.r.t the size of alternatate stack +// for SignalHandler(). Keep the crash context as a .bss field. Exception +// handlers are serialized by the |g_handler_stack_mutex_| and at most one at a +// time can use |g_crash_context_|. +ExceptionHandler::CrashContext g_crash_context_; + +} // namespace + +// Runs before crashing: normal context. +ExceptionHandler::ExceptionHandler(const MinidumpDescriptor& descriptor, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + bool install_handler, + const int server_fd) + : filter_(filter), + callback_(callback), + callback_context_(callback_context), + minidump_descriptor_(descriptor), + crash_handler_(NULL) { + if (server_fd >= 0) + crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); + + if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && + !minidump_descriptor_.IsMicrodumpOnConsole()) + minidump_descriptor_.UpdatePath(); + +#if defined(__ANDROID__) + if (minidump_descriptor_.IsMicrodumpOnConsole()) + logger::initializeCrashLogWriter(); +#endif + + pthread_mutex_lock(&g_handler_stack_mutex_); + + // Pre-fault the crash context struct. This is to avoid failing due to OOM + // if handling an exception when the process ran out of virtual memory. + memset(&g_crash_context_, 0, sizeof(g_crash_context_)); + + if (!g_handler_stack_) + g_handler_stack_ = new std::vector; + if (install_handler) { + InstallAlternateStackLocked(); + InstallHandlersLocked(); + } + g_handler_stack_->push_back(this); + pthread_mutex_unlock(&g_handler_stack_mutex_); +} + +// Runs before crashing: normal context. +ExceptionHandler::~ExceptionHandler() { + pthread_mutex_lock(&g_handler_stack_mutex_); + std::vector::iterator handler = + std::find(g_handler_stack_->begin(), g_handler_stack_->end(), this); + g_handler_stack_->erase(handler); + if (g_handler_stack_->empty()) { + delete g_handler_stack_; + g_handler_stack_ = NULL; + RestoreAlternateStackLocked(); + RestoreHandlersLocked(); + } + pthread_mutex_unlock(&g_handler_stack_mutex_); +} + +// Runs before crashing: normal context. +// static +bool ExceptionHandler::InstallHandlersLocked() { + if (handlers_installed) + return false; + + // Fail if unable to store all the old handlers. + for (int i = 0; i < kNumHandledSignals; ++i) { + if (sigaction(kExceptionSignals[i], NULL, &old_handlers[i]) == -1) + return false; + } + + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sigemptyset(&sa.sa_mask); + + // Mask all exception signals when we're handling one of them. + for (int i = 0; i < kNumHandledSignals; ++i) + sigaddset(&sa.sa_mask, kExceptionSignals[i]); + + sa.sa_sigaction = SignalHandler; + sa.sa_flags = SA_ONSTACK | SA_SIGINFO; + + for (int i = 0; i < kNumHandledSignals; ++i) { + if (sigaction(kExceptionSignals[i], &sa, NULL) == -1) { + // At this point it is impractical to back out changes, and so failure to + // install a signal is intentionally ignored. + } + } + handlers_installed = true; + return true; +} + +// This function runs in a compromised context: see the top of the file. +// Runs on the crashing thread. +// static +void ExceptionHandler::RestoreHandlersLocked() { + if (!handlers_installed) + return; + + for (int i = 0; i < kNumHandledSignals; ++i) { + if (sigaction(kExceptionSignals[i], &old_handlers[i], NULL) == -1) { + InstallDefaultHandler(kExceptionSignals[i]); + } + } + handlers_installed = false; +} + +// void ExceptionHandler::set_crash_handler(HandlerCallback callback) { +// crash_handler_ = callback; +// } + +// This function runs in a compromised context: see the top of the file. +// Runs on the crashing thread. +// static +void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { + // All the exception signals are blocked at this point. + pthread_mutex_lock(&g_handler_stack_mutex_); + + // Sometimes, Breakpad runs inside a process where some other buggy code + // saves and restores signal handlers temporarily with 'signal' + // instead of 'sigaction'. This loses the SA_SIGINFO flag associated + // with this function. As a consequence, the values of 'info' and 'uc' + // become totally bogus, generally inducing a crash. + // + // The following code tries to detect this case. When it does, it + // resets the signal handlers with sigaction + SA_SIGINFO and returns. + // This forces the signal to be thrown again, but this time the kernel + // will call the function with the right arguments. + struct sigaction cur_handler; + if (sigaction(sig, NULL, &cur_handler) == 0 && + (cur_handler.sa_flags & SA_SIGINFO) == 0) { + // Reset signal handler with the right flags. + sigemptyset(&cur_handler.sa_mask); + sigaddset(&cur_handler.sa_mask, sig); + + cur_handler.sa_sigaction = SignalHandler; + cur_handler.sa_flags = SA_ONSTACK | SA_SIGINFO; + + if (sigaction(sig, &cur_handler, NULL) == -1) { + // When resetting the handler fails, try to reset the + // default one to avoid an infinite loop here. + InstallDefaultHandler(sig); + } + pthread_mutex_unlock(&g_handler_stack_mutex_); + return; + } + + bool handled = false; + for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) { + handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc); + } + + // Upon returning from this signal handler, sig will become unmasked and then + // it will be retriggered. If one of the ExceptionHandlers handled it + // successfully, restore the default handler. Otherwise, restore the + // previously installed handler. Then, when the signal is retriggered, it will + // be delivered to the appropriate handler. + if (handled) { + InstallDefaultHandler(sig); + } else { + RestoreHandlersLocked(); + } + + pthread_mutex_unlock(&g_handler_stack_mutex_); + + // info->si_code <= 0 iff SI_FROMUSER (SI_FROMKERNEL otherwise). + if (info->si_code <= 0 || sig == SIGABRT) { + // This signal was triggered by somebody sending us the signal with kill(). + // In order to retrigger it, we have to queue a new signal by calling + // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is + // due to the kernel sending a SIGABRT from a user request via SysRQ. + if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) { + // If we failed to kill ourselves (e.g. because a sandbox disallows us + // to do so), we instead resort to terminating our process. This will + // result in an incorrect exit code. + _exit(1); + } + } else { + // This was a synchronous signal triggered by a hard fault (e.g. SIGSEGV). + // No need to reissue the signal. It will automatically trigger again, + // when we return from the signal handler. + } +} + +struct ThreadArgument { + pid_t pid; // the crashing process + const MinidumpDescriptor* minidump_descriptor; + ExceptionHandler* handler; + const void* context; // a CrashContext structure + size_t context_size; +}; + +// This is the entry function for the cloned process. We are in a compromised +// context here: see the top of the file. +// static +int ExceptionHandler::ThreadEntry(void *arg) { + const ThreadArgument *thread_arg = reinterpret_cast(arg); + + // Block here until the crashing process unblocks us when + // we're allowed to use ptrace + thread_arg->handler->WaitForContinueSignal(); + + return thread_arg->handler->DoDump(thread_arg->pid, thread_arg->context, + thread_arg->context_size) == false; +} + +// This function runs in a compromised context: see the top of the file. +// Runs on the crashing thread. +bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) { + if (filter_ && !filter_(callback_context_)) + return false; + + // Allow ourselves to be dumped if the signal is trusted. + bool signal_trusted = info->si_code > 0; + bool signal_pid_trusted = info->si_code == SI_USER || + info->si_code == SI_TKILL; + if (signal_trusted || (signal_pid_trusted && info->si_pid == getpid())) { + sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + } + + // Fill in all the holes in the struct to make Valgrind happy. + memset(&g_crash_context_, 0, sizeof(g_crash_context_)); + memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); + memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); +#if defined(__aarch64__) + struct ucontext* uc_ptr = (struct ucontext*)uc; + struct fpsimd_context* fp_ptr = + (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; + if (fp_ptr->head.magic == FPSIMD_MAGIC) { + memcpy(&g_crash_context_.float_state, fp_ptr, + sizeof(g_crash_context_.float_state)); + } +#elif !defined(__ARM_EABI__) && !defined(__mips__) + // FP state is not part of user ABI on ARM Linux. + // In case of MIPS Linux FP state is already part of struct ucontext + // and 'float_state' is not a member of CrashContext. + struct ucontext* uc_ptr = (struct ucontext*)uc; + if (uc_ptr->uc_mcontext.fpregs) { + memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, + sizeof(g_crash_context_.float_state)); + } +#endif + g_crash_context_.tid = syscall(__NR_gettid); + if (crash_handler_ != NULL) { + if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_), + callback_context_)) { + return true; + } + } + return GenerateDump(&g_crash_context_); +} + +// This is a public interface to HandleSignal that allows the client to +// generate a crash dump. This function may run in a compromised context. +bool ExceptionHandler::SimulateSignalDelivery(int sig) { + siginfo_t siginfo = {}; + // Mimic a trusted signal to allow tracing the process (see + // ExceptionHandler::HandleSignal(). + siginfo.si_code = SI_USER; + siginfo.si_pid = getpid(); + struct ucontext context; + getcontext(&context); + return HandleSignal(sig, &siginfo, &context); +} + +// This function may run in a compromised context: see the top of the file. +bool ExceptionHandler::GenerateDump(CrashContext *context) { + if (IsOutOfProcess()) + return crash_generation_client_->RequestDump(context, sizeof(*context)); + + // Allocating too much stack isn't a problem, and better to err on the side + // of caution than smash it into random locations. + static const unsigned kChildStackSize = 16000; + PageAllocator allocator; + uint8_t* stack = reinterpret_cast(allocator.Alloc(kChildStackSize)); + if (!stack) + return false; + // clone() needs the top-most address. (scrub just to be safe) + stack += kChildStackSize; + my_memset(stack - 16, 0, 16); + + ThreadArgument thread_arg; + thread_arg.handler = this; + thread_arg.minidump_descriptor = &minidump_descriptor_; + thread_arg.pid = getpid(); + thread_arg.context = context; + thread_arg.context_size = sizeof(*context); + + // We need to explicitly enable ptrace of parent processes on some + // kernels, but we need to know the PID of the cloned process before we + // can do this. Create a pipe here which we can use to block the + // cloned process after creating it, until we have explicitly enabled ptrace + if (sys_pipe(fdes) == -1) { + // Creating the pipe failed. We'll log an error but carry on anyway, + // as we'll probably still get a useful crash report. All that will happen + // is the write() and read() calls will fail with EBADF + static const char no_pipe_msg[] = "ExceptionHandler::GenerateDump " + "sys_pipe failed:"; + logger::write(no_pipe_msg, sizeof(no_pipe_msg) - 1); + logger::write(strerror(errno), strlen(strerror(errno))); + logger::write("\n", 1); + + // Ensure fdes[0] and fdes[1] are invalid file descriptors. + fdes[0] = fdes[1] = -1; + } + + const pid_t child = sys_clone( + ThreadEntry, stack, CLONE_FILES | CLONE_FS | CLONE_UNTRACED, + &thread_arg, NULL, NULL, NULL); + if (child == -1) { + sys_close(fdes[0]); + sys_close(fdes[1]); + return false; + } + + // Allow the child to ptrace us + sys_prctl(PR_SET_PTRACER, child, 0, 0, 0); + SendContinueSignalToChild(); + int status; + const int r = HANDLE_EINTR(sys_waitpid(child, &status, __WALL)); + + sys_close(fdes[0]); + sys_close(fdes[1]); + + if (r == -1) { + static const char msg[] = "ExceptionHandler::GenerateDump waitpid failed:"; + logger::write(msg, sizeof(msg) - 1); + logger::write(strerror(errno), strlen(strerror(errno))); + logger::write("\n", 1); + } + + bool success = r != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0; + if (callback_) + success = callback_(minidump_descriptor_, callback_context_, success); + return success; +} + +// This function runs in a compromised context: see the top of the file. +void ExceptionHandler::SendContinueSignalToChild() { + static const char okToContinueMessage = 'a'; + int r; + r = HANDLE_EINTR(sys_write(fdes[1], &okToContinueMessage, sizeof(char))); + if (r == -1) { + static const char msg[] = "ExceptionHandler::SendContinueSignalToChild " + "sys_write failed:"; + logger::write(msg, sizeof(msg) - 1); + logger::write(strerror(errno), strlen(strerror(errno))); + logger::write("\n", 1); + } +} + +// This function runs in a compromised context: see the top of the file. +// Runs on the cloned process. +void ExceptionHandler::WaitForContinueSignal() { + int r; + char receivedMessage; + r = HANDLE_EINTR(sys_read(fdes[0], &receivedMessage, sizeof(char))); + if (r == -1) { + static const char msg[] = "ExceptionHandler::WaitForContinueSignal " + "sys_read failed:"; + logger::write(msg, sizeof(msg) - 1); + logger::write(strerror(errno), strlen(strerror(errno))); + logger::write("\n", 1); + } +} + +// This function runs in a compromised context: see the top of the file. +// Runs on the cloned process. +bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, + size_t context_size) { + if (minidump_descriptor_.IsMicrodumpOnConsole()) { + return google_breakpad::WriteMicrodump( + crashing_process, + context, + context_size, + mapping_list_, + *minidump_descriptor_.microdump_extra_info()); + } + if (minidump_descriptor_.IsFD()) { + return google_breakpad::WriteMinidump(minidump_descriptor_.fd(), + minidump_descriptor_.size_limit(), + crashing_process, + context, + context_size, + mapping_list_, + app_memory_list_); + } + return google_breakpad::WriteMinidump(minidump_descriptor_.path(), + minidump_descriptor_.size_limit(), + crashing_process, + context, + context_size, + mapping_list_, + app_memory_list_); +} + +// static +bool ExceptionHandler::WriteMinidump(const string& dump_path, + MinidumpCallback callback, + void* callback_context) { + MinidumpDescriptor descriptor(dump_path); + ExceptionHandler eh(descriptor, NULL, callback, callback_context, false, -1); + return eh.WriteMinidump(); +} + +// In order to making using EBP to calculate the desired value for ESP +// a valid operation, ensure that this function is compiled with a +// frame pointer using the following attribute. This attribute +// is supported on GCC but not on clang. +#if defined(__i386__) && defined(__GNUC__) && !defined(__clang__) +__attribute__((optimize("no-omit-frame-pointer"))) +#endif +bool ExceptionHandler::WriteMinidump() { + if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && + !minidump_descriptor_.IsMicrodumpOnConsole()) { + // Update the path of the minidump so that this can be called multiple times + // and new files are created for each minidump. This is done before the + // generation happens, as clients may want to access the MinidumpDescriptor + // after this call to find the exact path to the minidump file. + minidump_descriptor_.UpdatePath(); + } else if (minidump_descriptor_.IsFD()) { + // Reposition the FD to its beginning and resize it to get rid of the + // previous minidump info. + lseek(minidump_descriptor_.fd(), 0, SEEK_SET); + ignore_result(ftruncate(minidump_descriptor_.fd(), 0)); + } + + // Allow this process to be dumped. + sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); + + CrashContext context; + int getcontext_result = getcontext(&context.context); + if (getcontext_result) + return false; + +#if defined(__i386__) + // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved + // from REG_UESP instead of from REG_ESP. REG_UESP is the user stack pointer + // and it only makes sense when running in kernel mode with a different stack + // pointer. When WriteMiniDump is called during normal processing REG_UESP is + // zero which leads to bad minidump files. + if (!context.context.uc_mcontext.gregs[REG_UESP]) { + // If REG_UESP is set to REG_ESP then that includes the stack space for the + // CrashContext object in this function, which is about 128 KB. Since the + // Linux dumper only records 32 KB of stack this would mean that nothing + // useful would be recorded. A better option is to set REG_UESP to REG_EBP, + // perhaps with a small negative offset in case there is any code that + // objects to them being equal. + context.context.uc_mcontext.gregs[REG_UESP] = + context.context.uc_mcontext.gregs[REG_EBP] - 16; + // The stack saving is based off of REG_ESP so it must be set to match the + // new REG_UESP. + context.context.uc_mcontext.gregs[REG_ESP] = + context.context.uc_mcontext.gregs[REG_UESP]; + } +#endif + +#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) + // FPU state is not part of ARM EABI ucontext_t. + memcpy(&context.float_state, context.context.uc_mcontext.fpregs, + sizeof(context.float_state)); +#endif + context.tid = sys_gettid(); + + // Add an exception stream to the minidump for better reporting. + memset(&context.siginfo, 0, sizeof(context.siginfo)); + context.siginfo.si_signo = MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED; +#if defined(__i386__) + context.siginfo.si_addr = + reinterpret_cast(context.context.uc_mcontext.gregs[REG_EIP]); +#elif defined(__x86_64__) + context.siginfo.si_addr = + reinterpret_cast(context.context.uc_mcontext.gregs[REG_RIP]); +#elif defined(__arm__) + context.siginfo.si_addr = + reinterpret_cast(context.context.uc_mcontext.arm_pc); +#elif defined(__aarch64__) + context.siginfo.si_addr = + reinterpret_cast(context.context.uc_mcontext.pc); +#elif defined(__mips__) + context.siginfo.si_addr = + reinterpret_cast(context.context.uc_mcontext.pc); +#else +#error "This code has not been ported to your platform yet." +#endif + + return GenerateDump(&context); +} + +void ExceptionHandler::AddMappingInfo(const string& name, + const uint8_t identifier[sizeof(MDGUID)], + uintptr_t start_address, + size_t mapping_size, + size_t file_offset) { + MappingInfo info; + info.start_addr = start_address; + info.size = mapping_size; + info.offset = file_offset; + strncpy(info.name, name.c_str(), sizeof(info.name) - 1); + info.name[sizeof(info.name) - 1] = '\0'; + + MappingEntry mapping; + mapping.first = info; + memcpy(mapping.second, identifier, sizeof(MDGUID)); + mapping_list_.push_back(mapping); +} + +void ExceptionHandler::RegisterAppMemory(void* ptr, size_t length) { + AppMemoryList::iterator iter = + std::find(app_memory_list_.begin(), app_memory_list_.end(), ptr); + if (iter != app_memory_list_.end()) { + // Don't allow registering the same pointer twice. + return; + } + + AppMemory app_memory; + app_memory.ptr = ptr; + app_memory.length = length; + app_memory_list_.push_back(app_memory); +} + +void ExceptionHandler::UnregisterAppMemory(void* ptr) { + AppMemoryList::iterator iter = + std::find(app_memory_list_.begin(), app_memory_list_.end(), ptr); + if (iter != app_memory_list_.end()) { + app_memory_list_.erase(iter); + } +} + +// static +bool ExceptionHandler::WriteMinidumpForChild(pid_t child, + pid_t child_blamed_thread, + const string& dump_path, + MinidumpCallback callback, + void* callback_context) { + // This function is not run in a compromised context. + MinidumpDescriptor descriptor(dump_path); + descriptor.UpdatePath(); + if (!google_breakpad::WriteMinidump(descriptor.path(), + child, + child_blamed_thread)) + return false; + + return callback ? callback(descriptor, callback_context, true) : true; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h new file mode 100644 index 00000000000000..591c310855702c --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h @@ -0,0 +1,278 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ +#define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ + +#include +#include +#include +#include + +#include + +#include "client/linux/crash_generation/crash_generation_client.h" +#include "client/linux/handler/minidump_descriptor.h" +#include "client/linux/minidump_writer/minidump_writer.h" +#include "common/scoped_ptr.h" +#include "common/using_std_string.h" +#include "google_breakpad/common/minidump_format.h" + +namespace google_breakpad { + +// ExceptionHandler +// +// ExceptionHandler can write a minidump file when an exception occurs, +// or when WriteMinidump() is called explicitly by your program. +// +// To have the exception handler write minidumps when an uncaught exception +// (crash) occurs, you should create an instance early in the execution +// of your program, and keep it around for the entire time you want to +// have crash handling active (typically, until shutdown). +// (NOTE): There should be only be one this kind of exception handler +// object per process. +// +// If you want to write minidumps without installing the exception handler, +// you can create an ExceptionHandler with install_handler set to false, +// then call WriteMinidump. You can also use this technique if you want to +// use different minidump callbacks for different call sites. +// +// In either case, a callback function is called when a minidump is written, +// which receives the full path or file descriptor of the minidump. The +// caller can collect and write additional application state to that minidump, +// and launch an external crash-reporting application. +// +// Caller should try to make the callbacks as crash-friendly as possible, +// it should avoid use heap memory allocation as much as possible. + +class ExceptionHandler { + public: + // A callback function to run before Breakpad performs any substantial + // processing of an exception. A FilterCallback is called before writing + // a minidump. |context| is the parameter supplied by the user as + // callback_context when the handler was created. + // + // If a FilterCallback returns true, Breakpad will continue processing, + // attempting to write a minidump. If a FilterCallback returns false, + // Breakpad will immediately report the exception as unhandled without + // writing a minidump, allowing another handler the opportunity to handle it. + typedef bool (*FilterCallback)(void *context); + + // A callback function to run after the minidump has been written. + // |descriptor| contains the file descriptor or file path containing the + // minidump. |context| is the parameter supplied by the user as + // callback_context when the handler was created. |succeeded| indicates + // whether a minidump file was successfully written. + // + // If an exception occurred and the callback returns true, Breakpad will + // treat the exception as fully-handled, suppressing any other handlers from + // being notified of the exception. If the callback returns false, Breakpad + // will treat the exception as unhandled, and allow another handler to handle + // it. If there are no other handlers, Breakpad will report the exception to + // the system as unhandled, allowing a debugger or native crash dialog the + // opportunity to handle the exception. Most callback implementations + // should normally return the value of |succeeded|, or when they wish to + // not report an exception of handled, false. Callbacks will rarely want to + // return true directly (unless |succeeded| is true). + typedef bool (*MinidumpCallback)(const MinidumpDescriptor& descriptor, + void* context, + bool succeeded); + + // In certain cases, a user may wish to handle the generation of the minidump + // themselves. In this case, they can install a handler callback which is + // called when a crash has occurred. If this function returns true, no other + // processing of occurs and the process will shortly be crashed. If this + // returns false, the normal processing continues. + typedef bool (*HandlerCallback)(const void* crash_context, + size_t crash_context_size, + void* context); + + // Creates a new ExceptionHandler instance to handle writing minidumps. + // Before writing a minidump, the optional |filter| callback will be called. + // Its return value determines whether or not Breakpad should write a + // minidump. The minidump content will be written to the file path or file + // descriptor from |descriptor|, and the optional |callback| is called after + // writing the dump file, as described above. + // If install_handler is true, then a minidump will be written whenever + // an unhandled exception occurs. If it is false, minidumps will only + // be written when WriteMinidump is called. + // If |server_fd| is valid, the minidump is generated out-of-process. If it + // is -1, in-process generation will always be used. + ExceptionHandler(const MinidumpDescriptor& descriptor, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + bool install_handler, + const int server_fd); + ~ExceptionHandler(); + + const MinidumpDescriptor& minidump_descriptor() const { + return minidump_descriptor_; + } + + void set_minidump_descriptor(const MinidumpDescriptor& descriptor) { + minidump_descriptor_ = descriptor; + } + + void set_crash_handler(HandlerCallback callback) { + crash_handler_ = callback; + } + + void set_crash_generation_client(CrashGenerationClient* client) { + crash_generation_client_.reset(client); + } + + // Writes a minidump immediately. This can be used to capture the execution + // state independently of a crash. + // Returns true on success. + // If the ExceptionHandler has been created with a path, a new file is + // generated for each minidump. The file path can be retrieved in the + // MinidumpDescriptor passed to the MinidumpCallback or by accessing the + // MinidumpDescriptor directly from the ExceptionHandler (with + // minidump_descriptor()). + // If the ExceptionHandler has been created with a file descriptor, the file + // descriptor is repositioned to its beginning and the previous generated + // minidump is overwritten. + // Note that this method is not supposed to be called from a compromised + // context as it uses the heap. + bool WriteMinidump(); + + // Convenience form of WriteMinidump which does not require an + // ExceptionHandler instance. + static bool WriteMinidump(const string& dump_path, + MinidumpCallback callback, + void* callback_context); + + // Write a minidump of |child| immediately. This can be used to + // capture the execution state of |child| independently of a crash. + // Pass a meaningful |child_blamed_thread| to make that thread in + // the child process the one from which a crash signature is + // extracted. + // + // WARNING: the return of this function *must* happen before + // the code that will eventually reap |child| executes. + // Otherwise there's a pernicious race condition in which |child| + // exits, is reaped, another process created with its pid, then that + // new process dumped. + static bool WriteMinidumpForChild(pid_t child, + pid_t child_blamed_thread, + const string& dump_path, + MinidumpCallback callback, + void* callback_context); + + // This structure is passed to minidump_writer.h:WriteMinidump via an opaque + // blob. It shouldn't be needed in any user code. + struct CrashContext { + siginfo_t siginfo; + pid_t tid; // the crashing thread. + struct ucontext context; +#if !defined(__ARM_EABI__) && !defined(__mips__) + // #ifdef this out because FP state is not part of user ABI for Linux ARM. + // In case of MIPS Linux FP state is already part of struct + // ucontext so 'float_state' is not required. + fpstate_t float_state; +#endif + }; + + // Returns whether out-of-process dump generation is used or not. + bool IsOutOfProcess() const { + return crash_generation_client_.get() != NULL; + } + + // Add information about a memory mapping. This can be used if + // a custom library loader is used that maps things in a way + // that the linux dumper can't handle by reading the maps file. + void AddMappingInfo(const string& name, + const uint8_t identifier[sizeof(MDGUID)], + uintptr_t start_address, + size_t mapping_size, + size_t file_offset); + + // Register a block of memory of length bytes starting at address ptr + // to be copied to the minidump when a crash happens. + void RegisterAppMemory(void* ptr, size_t length); + + // Unregister a block of memory that was registered with RegisterAppMemory. + void UnregisterAppMemory(void* ptr); + + // Force signal handling for the specified signal. + bool SimulateSignalDelivery(int sig); + + // Report a crash signal from an SA_SIGINFO signal handler. + bool HandleSignal(int sig, siginfo_t* info, void* uc); + + private: + // Save the old signal handlers and install new ones. + static bool InstallHandlersLocked(); + // Restore the old signal handlers. + static void RestoreHandlersLocked(); + + void PreresolveSymbols(); + bool GenerateDump(CrashContext *context); + void SendContinueSignalToChild(); + void WaitForContinueSignal(); + + static void SignalHandler(int sig, siginfo_t* info, void* uc); + static int ThreadEntry(void* arg); + bool DoDump(pid_t crashing_process, const void* context, + size_t context_size); + + const FilterCallback filter_; + const MinidumpCallback callback_; + void* const callback_context_; + + scoped_ptr crash_generation_client_; + + MinidumpDescriptor minidump_descriptor_; + + // Must be volatile. The compiler is unaware of the code which runs in + // the signal handler which reads this variable. Without volatile the + // compiler is free to optimise away writes to this variable which it + // believes are never read. + volatile HandlerCallback crash_handler_; + + // We need to explicitly enable ptrace of parent processes on some + // kernels, but we need to know the PID of the cloned process before we + // can do this. We create a pipe which we can use to block the + // cloned process after creating it, until we have explicitly enabled + // ptrace. This is used to store the file descriptors for the pipe + int fdes[2]; + + // Callers can add extra info about mappings for cases where the + // dumper code cannot extract enough information from /proc//maps. + MappingList mapping_list_; + + // Callers can request additional memory regions to be included in + // the dump. + AppMemoryList app_memory_list_; +}; + +} // namespace google_breakpad + +#endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc new file mode 100644 index 00000000000000..6928e98472b519 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc @@ -0,0 +1,855 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include +#include +#include +#include +#include + +#include + +#include "client/mac/handler/exception_handler.h" +#include "client/mac/handler/minidump_generator.h" +#include "common/mac/macho_utilities.h" +#include "common/mac/scoped_task_suspend-inl.h" +#include "google_breakpad/common/minidump_exception_mac.h" + +#ifndef __EXCEPTIONS +// This file uses C++ try/catch (but shouldn't). Duplicate the macros from +// allowing this file to work properly with +// exceptions disabled even when other C++ libraries are used. #undef the try +// and catch macros first in case libstdc++ is in use and has already provided +// its own definitions. +#undef try +#define try if (true) +#undef catch +#define catch(X) if (false) +#endif // __EXCEPTIONS + +#ifndef USE_PROTECTED_ALLOCATIONS +#if TARGET_OS_IPHONE +#define USE_PROTECTED_ALLOCATIONS 1 +#else +#define USE_PROTECTED_ALLOCATIONS 0 +#endif +#endif + +// If USE_PROTECTED_ALLOCATIONS is activated then the +// gBreakpadAllocator needs to be setup in other code +// ahead of time. Please see ProtectedMemoryAllocator.h +// for more details. +#if USE_PROTECTED_ALLOCATIONS + #include "protected_memory_allocator.h" + extern ProtectedMemoryAllocator *gBreakpadAllocator; +#endif + +namespace google_breakpad { + +static union { +#if USE_PROTECTED_ALLOCATIONS +#if defined PAGE_MAX_SIZE + char protected_buffer[PAGE_MAX_SIZE] __attribute__((aligned(PAGE_MAX_SIZE))); +#else + char protected_buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); +#endif // defined PAGE_MAX_SIZE +#endif // USE_PROTECTED_ALLOCATIONS + google_breakpad::ExceptionHandler *handler; +} gProtectedData; + +using std::map; + +// These structures and techniques are illustrated in +// Mac OS X Internals, Amit Singh, ch 9.7 +struct ExceptionMessage { + mach_msg_header_t header; + mach_msg_body_t body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + NDR_record_t ndr; + exception_type_t exception; + mach_msg_type_number_t code_count; + integer_t code[EXCEPTION_CODE_MAX]; + char padding[512]; +}; + +struct ExceptionParameters { + ExceptionParameters() : count(0) {} + mach_msg_type_number_t count; + exception_mask_t masks[EXC_TYPES_COUNT]; + mach_port_t ports[EXC_TYPES_COUNT]; + exception_behavior_t behaviors[EXC_TYPES_COUNT]; + thread_state_flavor_t flavors[EXC_TYPES_COUNT]; +}; + +struct ExceptionReplyMessage { + mach_msg_header_t header; + NDR_record_t ndr; + kern_return_t return_code; +}; + +// Only catch these three exceptions. The other ones are nebulously defined +// and may result in treating a non-fatal exception as fatal. +exception_mask_t s_exception_mask = EXC_MASK_BAD_ACCESS | +EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | EXC_MASK_BREAKPOINT; + +#if !TARGET_OS_IPHONE +extern "C" { + // Forward declarations for functions that need "C" style compilation + boolean_t exc_server(mach_msg_header_t* request, + mach_msg_header_t* reply); + + // This symbol must be visible to dlsym() - see + // http://code.google.com/p/google-breakpad/issues/detail?id=345 for details. + kern_return_t catch_exception_raise(mach_port_t target_port, + mach_port_t failed_thread, + mach_port_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t code_count) + __attribute__((visibility("default"))); +} +#endif + +kern_return_t ForwardException(mach_port_t task, + mach_port_t failed_thread, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t code_count); + +#if TARGET_OS_IPHONE +// Implementation is based on the implementation generated by mig. +boolean_t breakpad_exc_server(mach_msg_header_t* InHeadP, + mach_msg_header_t* OutHeadP) { + OutHeadP->msgh_bits = + MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InHeadP->msgh_bits), 0); + OutHeadP->msgh_remote_port = InHeadP->msgh_remote_port; + /* Minimal size: routine() will update it if different */ + OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); + OutHeadP->msgh_local_port = MACH_PORT_NULL; + OutHeadP->msgh_id = InHeadP->msgh_id + 100; + + if (InHeadP->msgh_id != 2401) { + ((mig_reply_error_t*)OutHeadP)->NDR = NDR_record; + ((mig_reply_error_t*)OutHeadP)->RetCode = MIG_BAD_ID; + return FALSE; + } + +#ifdef __MigPackStructs +#pragma pack(4) +#endif + typedef struct { + mach_msg_header_t Head; + /* start of the kernel processed data */ + mach_msg_body_t msgh_body; + mach_msg_port_descriptor_t thread; + mach_msg_port_descriptor_t task; + /* end of the kernel processed data */ + NDR_record_t NDR; + exception_type_t exception; + mach_msg_type_number_t codeCnt; + integer_t code[2]; + mach_msg_trailer_t trailer; + } Request; + + typedef struct { + mach_msg_header_t Head; + NDR_record_t NDR; + kern_return_t RetCode; + } Reply; +#ifdef __MigPackStructs +#pragma pack() +#endif + + Request* In0P = (Request*)InHeadP; + Reply* OutP = (Reply*)OutHeadP; + + if (In0P->task.name != mach_task_self()) { + return FALSE; + } + OutP->RetCode = ForwardException(In0P->task.name, + In0P->thread.name, + In0P->exception, + In0P->code, + In0P->codeCnt); + OutP->NDR = NDR_record; + return TRUE; +} +#else +boolean_t breakpad_exc_server(mach_msg_header_t* request, + mach_msg_header_t* reply) { + return exc_server(request, reply); +} + +// Callback from exc_server() +kern_return_t catch_exception_raise(mach_port_t port, mach_port_t failed_thread, + mach_port_t task, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t code_count) { + if (task != mach_task_self()) { + return KERN_FAILURE; + } + return ForwardException(task, failed_thread, exception, code, code_count); +} +#endif + +ExceptionHandler::ExceptionHandler(const string &dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + bool install_handler, + const char* port_name) + : dump_path_(), + filter_(filter), + callback_(callback), + callback_context_(callback_context), + directCallback_(NULL), + handler_thread_(NULL), + handler_port_(MACH_PORT_NULL), + previous_(NULL), + installed_exception_handler_(false), + is_in_teardown_(false), + last_minidump_write_result_(false), + use_minidump_write_mutex_(false) { + // This will update to the ID and C-string pointers + set_dump_path(dump_path); + MinidumpGenerator::GatherSystemInformation(); +#if !TARGET_OS_IPHONE + if (port_name) + crash_generation_client_.reset(new CrashGenerationClient(port_name)); +#endif + Setup(install_handler); +} + +// special constructor if we want to bypass minidump writing and +// simply get a callback with the exception information +ExceptionHandler::ExceptionHandler(DirectCallback callback, + void* callback_context, + bool install_handler) + : dump_path_(), + filter_(NULL), + callback_(NULL), + callback_context_(callback_context), + directCallback_(callback), + handler_thread_(NULL), + handler_port_(MACH_PORT_NULL), + previous_(NULL), + installed_exception_handler_(false), + is_in_teardown_(false), + last_minidump_write_result_(false), + use_minidump_write_mutex_(false) { + MinidumpGenerator::GatherSystemInformation(); + Setup(install_handler); +} + +ExceptionHandler::~ExceptionHandler() { + Teardown(); +} + +bool ExceptionHandler::WriteMinidump(bool write_exception_stream) { + // If we're currently writing, just return + if (use_minidump_write_mutex_) + return false; + + use_minidump_write_mutex_ = true; + last_minidump_write_result_ = false; + + // Lock the mutex. Since we just created it, this will return immediately. + if (pthread_mutex_lock(&minidump_write_mutex_) == 0) { + // Send an empty message to the handle port so that a minidump will + // be written + bool result = SendMessageToHandlerThread(write_exception_stream ? + kWriteDumpWithExceptionMessage : + kWriteDumpMessage); + if (!result) { + pthread_mutex_unlock(&minidump_write_mutex_); + return false; + } + + // Wait for the minidump writer to complete its writing. It will unlock + // the mutex when completed + pthread_mutex_lock(&minidump_write_mutex_); + } + + use_minidump_write_mutex_ = false; + UpdateNextID(); + return last_minidump_write_result_; +} + +// static +bool ExceptionHandler::WriteMinidump(const string &dump_path, + bool write_exception_stream, + MinidumpCallback callback, + void* callback_context) { + ExceptionHandler handler(dump_path, NULL, callback, callback_context, false, + NULL); + return handler.WriteMinidump(write_exception_stream); +} + +// static +bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child, + mach_port_t child_blamed_thread, + const string &dump_path, + MinidumpCallback callback, + void* callback_context) { + ScopedTaskSuspend suspend(child); + + MinidumpGenerator generator(child, MACH_PORT_NULL); + string dump_id; + string dump_filename = generator.UniqueNameInDirectory(dump_path, &dump_id); + + generator.SetExceptionInformation(EXC_BREAKPOINT, +#if defined(__i386__) || defined(__x86_64__) + EXC_I386_BPT, +#elif defined(__ppc__) || defined(__ppc64__) + EXC_PPC_BREAKPOINT, +#elif defined(__arm__) || defined(__aarch64__) + EXC_ARM_BREAKPOINT, +#else +#error architecture not supported +#endif + 0, + child_blamed_thread); + bool result = generator.Write(dump_filename.c_str()); + + if (callback) { + return callback(dump_path.c_str(), dump_id.c_str(), + callback_context, result); + } + return result; +} + +bool ExceptionHandler::WriteMinidumpWithException( + int exception_type, + int exception_code, + int exception_subcode, + breakpad_ucontext_t* task_context, + mach_port_t thread_name, + bool exit_after_write, + bool report_current_thread) { + bool result = false; + + if (directCallback_) { + if (directCallback_(callback_context_, + exception_type, + exception_code, + exception_subcode, + thread_name) ) { + if (exit_after_write) + _exit(exception_type); + } +#if !TARGET_OS_IPHONE + } else if (IsOutOfProcess()) { + if (exception_type && exception_code) { + // If this is a real exception, give the filter (if any) a chance to + // decide if this should be sent. + if (filter_ && !filter_(callback_context_)) + return false; + result = crash_generation_client_->RequestDumpForException( + exception_type, + exception_code, + exception_subcode, + thread_name); + if (result && exit_after_write) { + _exit(exception_type); + } + } +#endif + } else { + string minidump_id; + + // Putting the MinidumpGenerator in its own context will ensure that the + // destructor is executed, closing the newly created minidump file. + if (!dump_path_.empty()) { + MinidumpGenerator md(mach_task_self(), + report_current_thread ? MACH_PORT_NULL : + mach_thread_self()); + md.SetTaskContext(task_context); + if (exception_type && exception_code) { + // If this is a real exception, give the filter (if any) a chance to + // decide if this should be sent. + if (filter_ && !filter_(callback_context_)) + return false; + + md.SetExceptionInformation(exception_type, exception_code, + exception_subcode, thread_name); + } + + result = md.Write(next_minidump_path_c_); + } + + // Call user specified callback (if any) + if (callback_) { + // If the user callback returned true and we're handling an exception + // (rather than just writing out the file), then we should exit without + // forwarding the exception to the next handler. + if (callback_(dump_path_c_, next_minidump_id_c_, callback_context_, + result)) { + if (exit_after_write) + _exit(exception_type); + } + } + } + + return result; +} + +kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread, + exception_type_t exception, + exception_data_t code, + mach_msg_type_number_t code_count) { + // At this time, we should have called Uninstall() on the exception handler + // so that the current exception ports are the ones that we should be + // forwarding to. + ExceptionParameters current; + + current.count = EXC_TYPES_COUNT; + mach_port_t current_task = mach_task_self(); + task_get_exception_ports(current_task, + s_exception_mask, + current.masks, + ¤t.count, + current.ports, + current.behaviors, + current.flavors); + + // Find the first exception handler that matches the exception + unsigned int found; + for (found = 0; found < current.count; ++found) { + if (current.masks[found] & (1 << exception)) { + break; + } + } + + // Nothing to forward + if (found == current.count) { + fprintf(stderr, "** No previous ports for forwarding!! \n"); + exit(KERN_FAILURE); + } + + mach_port_t target_port = current.ports[found]; + exception_behavior_t target_behavior = current.behaviors[found]; + + kern_return_t result; + // TODO: Handle the case where |target_behavior| has MACH_EXCEPTION_CODES + // set. https://code.google.com/p/google-breakpad/issues/detail?id=551 + switch (target_behavior) { + case EXCEPTION_DEFAULT: + result = exception_raise(target_port, failed_thread, task, exception, + code, code_count); + break; + default: + fprintf(stderr, "** Unknown exception behavior: %d\n", target_behavior); + result = KERN_FAILURE; + break; + } + + return result; +} + +// static +void* ExceptionHandler::WaitForMessage(void* exception_handler_class) { + ExceptionHandler* self = + reinterpret_cast(exception_handler_class); + ExceptionMessage receive; + + // Wait for the exception info + while (1) { + receive.header.msgh_local_port = self->handler_port_; + receive.header.msgh_size = static_cast(sizeof(receive)); + kern_return_t result = mach_msg(&(receive.header), + MACH_RCV_MSG | MACH_RCV_LARGE, 0, + receive.header.msgh_size, + self->handler_port_, + MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + + + if (result == KERN_SUCCESS) { + // Uninstall our handler so that we don't get in a loop if the process of + // writing out a minidump causes an exception. However, if the exception + // was caused by a fork'd process, don't uninstall things + + // If the actual exception code is zero, then we're calling this handler + // in a way that indicates that we want to either exit this thread or + // generate a minidump + // + // While reporting, all threads (except this one) must be suspended + // to avoid misleading stacks. If appropriate they will be resumed + // afterwards. + if (!receive.exception) { + // Don't touch self, since this message could have been sent + // from its destructor. + if (receive.header.msgh_id == kShutdownMessage) + return NULL; + + self->SuspendThreads(); + +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Unprotect(); +#endif + + mach_port_t thread = MACH_PORT_NULL; + int exception_type = 0; + int exception_code = 0; + if (receive.header.msgh_id == kWriteDumpWithExceptionMessage) { + thread = receive.thread.name; + exception_type = EXC_BREAKPOINT; +#if defined(__i386__) || defined(__x86_64__) + exception_code = EXC_I386_BPT; +#elif defined(__ppc__) || defined(__ppc64__) + exception_code = EXC_PPC_BREAKPOINT; +#elif defined(__arm__) || defined(__aarch64__) + exception_code = EXC_ARM_BREAKPOINT; +#else +#error architecture not supported +#endif + } + + // Write out the dump and save the result for later retrieval + self->last_minidump_write_result_ = + self->WriteMinidumpWithException(exception_type, exception_code, + 0, NULL, thread, + false, false); + +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Protect(); +#endif + + self->ResumeThreads(); + + if (self->use_minidump_write_mutex_) + pthread_mutex_unlock(&self->minidump_write_mutex_); + } else { + // When forking a child process with the exception handler installed, + // if the child crashes, it will send the exception back to the parent + // process. The check for task == self_task() ensures that only + // exceptions that occur in the parent process are caught and + // processed. If the exception was not caused by this task, we + // still need to call into the exception server and have it return + // KERN_FAILURE (see catch_exception_raise) in order for the kernel + // to move onto the host exception handler for the child task + if (receive.task.name == mach_task_self()) { + self->SuspendThreads(); + +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Unprotect(); +#endif + + int subcode = 0; + if (receive.exception == EXC_BAD_ACCESS && receive.code_count > 1) + subcode = receive.code[1]; + + // Generate the minidump with the exception data. + self->WriteMinidumpWithException(receive.exception, receive.code[0], + subcode, NULL, receive.thread.name, + true, false); + +#if USE_PROTECTED_ALLOCATIONS + // This may have become protected again within + // WriteMinidumpWithException, but it needs to be unprotected for + // UninstallHandler. + if (gBreakpadAllocator) + gBreakpadAllocator->Unprotect(); +#endif + + self->UninstallHandler(true); + +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Protect(); +#endif + } + // Pass along the exception to the server, which will setup the + // message and call catch_exception_raise() and put the return + // code into the reply. + ExceptionReplyMessage reply; + if (!breakpad_exc_server(&receive.header, &reply.header)) + exit(1); + + // Send a reply and exit + mach_msg(&(reply.header), MACH_SEND_MSG, + reply.header.msgh_size, 0, MACH_PORT_NULL, + MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + } + } + } + + return NULL; +} + +// static +void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Unprotect(); +#endif + gProtectedData.handler->WriteMinidumpWithException( + EXC_SOFTWARE, + MD_EXCEPTION_CODE_MAC_ABORT, + 0, + static_cast(uc), + mach_thread_self(), + true, + true); +#if USE_PROTECTED_ALLOCATIONS + if (gBreakpadAllocator) + gBreakpadAllocator->Protect(); +#endif +} + +bool ExceptionHandler::InstallHandler() { + // If a handler is already installed, something is really wrong. + if (gProtectedData.handler != NULL) { + return false; + } + if (!IsOutOfProcess()) { + struct sigaction sa; + memset(&sa, 0, sizeof(sa)); + sigemptyset(&sa.sa_mask); + sigaddset(&sa.sa_mask, SIGABRT); + sa.sa_sigaction = ExceptionHandler::SignalHandler; + sa.sa_flags = SA_SIGINFO; + + scoped_ptr old(new struct sigaction); + if (sigaction(SIGABRT, &sa, old.get()) == -1) { + return false; + } + old_handler_.swap(old); + gProtectedData.handler = this; +#if USE_PROTECTED_ALLOCATIONS + assert(((size_t)(gProtectedData.protected_buffer) & PAGE_MASK) == 0); + mprotect(gProtectedData.protected_buffer, PAGE_SIZE, PROT_READ); +#endif + } + + try { +#if USE_PROTECTED_ALLOCATIONS + previous_ = new (gBreakpadAllocator->Allocate(sizeof(ExceptionParameters)) ) + ExceptionParameters(); +#else + previous_ = new ExceptionParameters(); +#endif + } + catch (std::bad_alloc) { + return false; + } + + // Save the current exception ports so that we can forward to them + previous_->count = EXC_TYPES_COUNT; + mach_port_t current_task = mach_task_self(); + kern_return_t result = task_get_exception_ports(current_task, + s_exception_mask, + previous_->masks, + &previous_->count, + previous_->ports, + previous_->behaviors, + previous_->flavors); + + // Setup the exception ports on this task + if (result == KERN_SUCCESS) + result = task_set_exception_ports(current_task, s_exception_mask, + handler_port_, EXCEPTION_DEFAULT, + THREAD_STATE_NONE); + + installed_exception_handler_ = (result == KERN_SUCCESS); + + return installed_exception_handler_; +} + +bool ExceptionHandler::UninstallHandler(bool in_exception) { + kern_return_t result = KERN_SUCCESS; + + if (old_handler_.get()) { + sigaction(SIGABRT, old_handler_.get(), NULL); +#if USE_PROTECTED_ALLOCATIONS + mprotect(gProtectedData.protected_buffer, PAGE_SIZE, + PROT_READ | PROT_WRITE); +#endif + old_handler_.reset(); + gProtectedData.handler = NULL; + } + + if (installed_exception_handler_) { + mach_port_t current_task = mach_task_self(); + + // Restore the previous ports + for (unsigned int i = 0; i < previous_->count; ++i) { + result = task_set_exception_ports(current_task, previous_->masks[i], + previous_->ports[i], + previous_->behaviors[i], + previous_->flavors[i]); + if (result != KERN_SUCCESS) + return false; + } + + // this delete should NOT happen if an exception just occurred! + if (!in_exception) { +#if USE_PROTECTED_ALLOCATIONS + previous_->~ExceptionParameters(); +#else + delete previous_; +#endif + } + + previous_ = NULL; + installed_exception_handler_ = false; + } + + return result == KERN_SUCCESS; +} + +bool ExceptionHandler::Setup(bool install_handler) { + if (pthread_mutex_init(&minidump_write_mutex_, NULL)) + return false; + + // Create a receive right + mach_port_t current_task = mach_task_self(); + kern_return_t result = mach_port_allocate(current_task, + MACH_PORT_RIGHT_RECEIVE, + &handler_port_); + // Add send right + if (result == KERN_SUCCESS) + result = mach_port_insert_right(current_task, handler_port_, handler_port_, + MACH_MSG_TYPE_MAKE_SEND); + + if (install_handler && result == KERN_SUCCESS) + if (!InstallHandler()) + return false; + + if (result == KERN_SUCCESS) { + // Install the handler in its own thread, detached as we won't be joining. + pthread_attr_t attr; + pthread_attr_init(&attr); + pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); + int thread_create_result = pthread_create(&handler_thread_, &attr, + &WaitForMessage, this); + pthread_attr_destroy(&attr); + result = thread_create_result ? KERN_FAILURE : KERN_SUCCESS; + } + + return result == KERN_SUCCESS; +} + +bool ExceptionHandler::Teardown() { + kern_return_t result = KERN_SUCCESS; + is_in_teardown_ = true; + + if (!UninstallHandler(false)) + return false; + + // Send an empty message so that the handler_thread exits + if (SendMessageToHandlerThread(kShutdownMessage)) { + mach_port_t current_task = mach_task_self(); + result = mach_port_deallocate(current_task, handler_port_); + if (result != KERN_SUCCESS) + return false; + } else { + return false; + } + + handler_thread_ = NULL; + handler_port_ = MACH_PORT_NULL; + pthread_mutex_destroy(&minidump_write_mutex_); + + return result == KERN_SUCCESS; +} + +bool ExceptionHandler::SendMessageToHandlerThread( + HandlerThreadMessage message_id) { + ExceptionMessage msg; + memset(&msg, 0, sizeof(msg)); + msg.header.msgh_id = message_id; + if (message_id == kWriteDumpMessage || + message_id == kWriteDumpWithExceptionMessage) { + // Include this thread's port. + msg.thread.name = mach_thread_self(); + msg.thread.disposition = MACH_MSG_TYPE_PORT_SEND; + msg.thread.type = MACH_MSG_PORT_DESCRIPTOR; + } + msg.header.msgh_size = sizeof(msg) - sizeof(msg.padding); + msg.header.msgh_remote_port = handler_port_; + msg.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, + MACH_MSG_TYPE_MAKE_SEND_ONCE); + kern_return_t result = mach_msg(&(msg.header), + MACH_SEND_MSG | MACH_SEND_TIMEOUT, + msg.header.msgh_size, 0, 0, + MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); + + return result == KERN_SUCCESS; +} + +void ExceptionHandler::UpdateNextID() { + next_minidump_path_ = + (MinidumpGenerator::UniqueNameInDirectory(dump_path_, &next_minidump_id_)); + + next_minidump_path_c_ = next_minidump_path_.c_str(); + next_minidump_id_c_ = next_minidump_id_.c_str(); +} + +bool ExceptionHandler::SuspendThreads() { + thread_act_port_array_t threads_for_task; + mach_msg_type_number_t thread_count; + + if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) + return false; + + // suspend all of the threads except for this one + for (unsigned int i = 0; i < thread_count; ++i) { + if (threads_for_task[i] != mach_thread_self()) { + if (thread_suspend(threads_for_task[i])) + return false; + } + } + + return true; +} + +bool ExceptionHandler::ResumeThreads() { + thread_act_port_array_t threads_for_task; + mach_msg_type_number_t thread_count; + + if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) + return false; + + // resume all of the threads except for this one + for (unsigned int i = 0; i < thread_count; ++i) { + if (threads_for_task[i] != mach_thread_self()) { + if (thread_resume(threads_for_task[i])) + return false; + } + } + + return true; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h new file mode 100644 index 00000000000000..f1d9ae92dee230 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h @@ -0,0 +1,281 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// exception_handler.h: MacOS exception handler +// This class can install a Mach exception port handler to trap most common +// programming errors. If an exception occurs, a minidump file will be +// generated which contains detailed information about the process and the +// exception. + +#ifndef CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ +#define CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ + +#include +#include + +#include + +#include "client/mac/handler/ucontext_compat.h" +#include "common/scoped_ptr.h" + +#if !TARGET_OS_IPHONE +#include "client/mac/crash_generation/crash_generation_client.h" +#endif + +namespace google_breakpad { + +using std::string; + +struct ExceptionParameters; + +enum HandlerThreadMessage { + // Message ID telling the handler thread to write a dump. + kWriteDumpMessage = 0, + // Message ID telling the handler thread to write a dump and include + // an exception stream. + kWriteDumpWithExceptionMessage = 1, + // Message ID telling the handler thread to quit. + kShutdownMessage = 2 +}; + +class ExceptionHandler { + public: + // A callback function to run before Breakpad performs any substantial + // processing of an exception. A FilterCallback is called before writing + // a minidump. context is the parameter supplied by the user as + // callback_context when the handler was created. + // + // If a FilterCallback returns true, Breakpad will continue processing, + // attempting to write a minidump. If a FilterCallback returns false, Breakpad + // will immediately report the exception as unhandled without writing a + // minidump, allowing another handler the opportunity to handle it. + typedef bool (*FilterCallback)(void *context); + + // A callback function to run after the minidump has been written. + // |minidump_id| is a unique id for the dump, so the minidump + // file is /.dmp. + // |context| is the value passed into the constructor. + // |succeeded| indicates whether a minidump file was successfully written. + // Return true if the exception was fully handled and breakpad should exit. + // Return false to allow any other exception handlers to process the + // exception. + typedef bool (*MinidumpCallback)(const char *dump_dir, + const char *minidump_id, + void *context, bool succeeded); + + // A callback function which will be called directly if an exception occurs. + // This bypasses the minidump file writing and simply gives the client + // the exception information. + typedef bool (*DirectCallback)( void *context, + int exception_type, + int exception_code, + int exception_subcode, + mach_port_t thread_name); + + // Creates a new ExceptionHandler instance to handle writing minidumps. + // Minidump files will be written to dump_path, and the optional callback + // is called after writing the dump file, as described above. + // If install_handler is true, then a minidump will be written whenever + // an unhandled exception occurs. If it is false, minidumps will only + // be written when WriteMinidump is called. + // If port_name is non-NULL, attempt to perform out-of-process dump generation + // If port_name is NULL, in-process dump generation will be used. + ExceptionHandler(const string &dump_path, + FilterCallback filter, MinidumpCallback callback, + void *callback_context, bool install_handler, + const char *port_name); + + // A special constructor if we want to bypass minidump writing and + // simply get a callback with the exception information. + ExceptionHandler(DirectCallback callback, + void *callback_context, + bool install_handler); + + ~ExceptionHandler(); + + // Get and set the minidump path. + string dump_path() const { return dump_path_; } + void set_dump_path(const string &dump_path) { + dump_path_ = dump_path; + dump_path_c_ = dump_path_.c_str(); + UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. + } + + // Writes a minidump immediately. This can be used to capture the + // execution state independently of a crash. Returns true on success. + bool WriteMinidump() { + return WriteMinidump(false); + } + + bool WriteMinidump(bool write_exception_stream); + + // Convenience form of WriteMinidump which does not require an + // ExceptionHandler instance. + static bool WriteMinidump(const string &dump_path, MinidumpCallback callback, + void *callback_context) { + return WriteMinidump(dump_path, false, callback, callback_context); + } + + static bool WriteMinidump(const string &dump_path, + bool write_exception_stream, + MinidumpCallback callback, + void *callback_context); + + // Write a minidump of child immediately. This can be used to capture + // the execution state of a child process independently of a crash. + static bool WriteMinidumpForChild(mach_port_t child, + mach_port_t child_blamed_thread, + const std::string &dump_path, + MinidumpCallback callback, + void *callback_context); + + // Returns whether out-of-process dump generation is used or not. + bool IsOutOfProcess() const { +#if TARGET_OS_IPHONE + return false; +#else + return crash_generation_client_.get() != NULL; +#endif + } + + private: + // Install the mach exception handler + bool InstallHandler(); + + // Uninstall the mach exception handler (if any) + bool UninstallHandler(bool in_exception); + + // Setup the handler thread, and if |install_handler| is true, install the + // mach exception port handler + bool Setup(bool install_handler); + + // Uninstall the mach exception handler (if any) and terminate the helper + // thread + bool Teardown(); + + // Send a mach message to the exception handler. Return true on + // success, false otherwise. + bool SendMessageToHandlerThread(HandlerThreadMessage message_id); + + // All minidump writing goes through this one routine. + // |task_context| can be NULL. If not, it will be used to retrieve the + // context of the current thread, instead of using |thread_get_state|. + bool WriteMinidumpWithException(int exception_type, + int exception_code, + int exception_subcode, + breakpad_ucontext_t *task_context, + mach_port_t thread_name, + bool exit_after_write, + bool report_current_thread); + + // When installed, this static function will be call from a newly created + // pthread with |this| as the argument + static void *WaitForMessage(void *exception_handler_class); + + // Signal handler for SIGABRT. + static void SignalHandler(int sig, siginfo_t* info, void* uc); + + // disallow copy ctor and operator= + explicit ExceptionHandler(const ExceptionHandler &); + void operator=(const ExceptionHandler &); + + // Generates a new ID and stores it in next_minidump_id_, and stores the + // path of the next minidump to be written in next_minidump_path_. + void UpdateNextID(); + + // These functions will suspend/resume all threads except for the + // reporting thread + bool SuspendThreads(); + bool ResumeThreads(); + + // The destination directory for the minidump + string dump_path_; + + // The basename of the next minidump w/o extension + string next_minidump_id_; + + // The full path to the next minidump to be written, including extension + string next_minidump_path_; + + // Pointers to the UTF-8 versions of above + const char *dump_path_c_; + const char *next_minidump_id_c_; + const char *next_minidump_path_c_; + + // The callback function and pointer to be passed back after the minidump + // has been written + FilterCallback filter_; + MinidumpCallback callback_; + void *callback_context_; + + // The callback function to be passed back when we don't want a minidump + // file to be written + DirectCallback directCallback_; + + // The thread that is created for the handler + pthread_t handler_thread_; + + // The port that is waiting on an exception message to be sent, if the + // handler is installed + mach_port_t handler_port_; + + // These variables save the previous exception handler's data so that it + // can be re-installed when this handler is uninstalled + ExceptionParameters *previous_; + + // True, if we've installed the exception handler + bool installed_exception_handler_; + + // True, if we're in the process of uninstalling the exception handler and + // the thread. + bool is_in_teardown_; + + // Save the last result of the last minidump + bool last_minidump_write_result_; + + // A mutex for use when writing out a minidump that was requested on a + // thread other than the exception handler. + pthread_mutex_t minidump_write_mutex_; + + // True, if we're using the mutext to indicate when mindump writing occurs + bool use_minidump_write_mutex_; + + // Old signal handler for SIGABRT. Used to be able to restore it when + // uninstalling. + scoped_ptr old_handler_; + +#if !TARGET_OS_IPHONE + // Client for out-of-process dump generation. + scoped_ptr crash_generation_client_; +#endif +}; + +} // namespace google_breakpad + +#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h b/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h new file mode 100644 index 00000000000000..c74868198c6095 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h @@ -0,0 +1,181 @@ +// Copyright (c) 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ +#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ + +#include +#include +#include +#include +#include "common/windows/string_utils-inl.h" +#include "google_breakpad/common/minidump_format.h" + +namespace google_breakpad { + +// Name/value pair for custom client information. +struct CustomInfoEntry { + // Maximum length for name and value for client custom info. + static const int kNameMaxLength = 64; + static const int kValueMaxLength = 64; + + CustomInfoEntry() { + // Putting name and value in initializer list makes VC++ show warning 4351. + set_name(NULL); + set_value(NULL); + } + + CustomInfoEntry(const wchar_t* name_arg, const wchar_t* value_arg) { + set_name(name_arg); + set_value(value_arg); + } + + void set_name(const wchar_t* name_arg) { + if (!name_arg) { + name[0] = L'\0'; + return; + } + WindowsStringUtils::safe_wcscpy(name, kNameMaxLength, name_arg); + } + + void set_value(const wchar_t* value_arg) { + if (!value_arg) { + value[0] = L'\0'; + return; + } + + WindowsStringUtils::safe_wcscpy(value, kValueMaxLength, value_arg); + } + + void set(const wchar_t* name_arg, const wchar_t* value_arg) { + set_name(name_arg); + set_value(value_arg); + } + + wchar_t name[kNameMaxLength]; + wchar_t value[kValueMaxLength]; +}; + +// Constants for the protocol between client and the server. + +// Tags sent with each message indicating the purpose of +// the message. +enum MessageTag { + MESSAGE_TAG_NONE = 0, + MESSAGE_TAG_REGISTRATION_REQUEST = 1, + MESSAGE_TAG_REGISTRATION_RESPONSE = 2, + MESSAGE_TAG_REGISTRATION_ACK = 3, + MESSAGE_TAG_UPLOAD_REQUEST = 4 +}; + +struct CustomClientInfo { + const CustomInfoEntry* entries; + size_t count; +}; + +// Message structure for IPC between crash client and crash server. +struct ProtocolMessage { + ProtocolMessage() + : tag(MESSAGE_TAG_NONE), + id(0), + dump_type(MiniDumpNormal), + thread_id(0), + exception_pointers(NULL), + assert_info(NULL), + custom_client_info(), + dump_request_handle(NULL), + dump_generated_handle(NULL), + server_alive_handle(NULL) { + } + + // Creates an instance with the given parameters. + ProtocolMessage(MessageTag arg_tag, + DWORD arg_id, + MINIDUMP_TYPE arg_dump_type, + DWORD* arg_thread_id, + EXCEPTION_POINTERS** arg_exception_pointers, + MDRawAssertionInfo* arg_assert_info, + const CustomClientInfo& custom_info, + HANDLE arg_dump_request_handle, + HANDLE arg_dump_generated_handle, + HANDLE arg_server_alive) + : tag(arg_tag), + id(arg_id), + dump_type(arg_dump_type), + thread_id(arg_thread_id), + exception_pointers(arg_exception_pointers), + assert_info(arg_assert_info), + custom_client_info(custom_info), + dump_request_handle(arg_dump_request_handle), + dump_generated_handle(arg_dump_generated_handle), + server_alive_handle(arg_server_alive) { + } + + // Tag in the message. + MessageTag tag; + + // The id for this message. This may be either a process id or a crash id + // depending on the type of message. + DWORD id; + + // Dump type requested. + MINIDUMP_TYPE dump_type; + + // Client thread id pointer. + DWORD* thread_id; + + // Exception information. + EXCEPTION_POINTERS** exception_pointers; + + // Assert information in case of an invalid parameter or + // pure call failure. + MDRawAssertionInfo* assert_info; + + // Custom client information. + CustomClientInfo custom_client_info; + + // Handle to signal the crash event. + HANDLE dump_request_handle; + + // Handle to check if server is done generating crash. + HANDLE dump_generated_handle; + + // Handle to a mutex that becomes signaled (WAIT_ABANDONED) + // if server process goes down. + HANDLE server_alive_handle; + + private: + // Disable copy ctor and operator=. + ProtocolMessage(const ProtocolMessage& msg); + ProtocolMessage& operator=(const ProtocolMessage& msg); +}; + +} // namespace google_breakpad + +#endif // CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ diff --git a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc new file mode 100644 index 00000000000000..3ba5d4e4fbde9a --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc @@ -0,0 +1,405 @@ +// Copyright (c) 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "client/windows/crash_generation/crash_generation_client.h" +#include +#include +#include "client/windows/common/ipc_protocol.h" + +namespace google_breakpad { + +const int kPipeBusyWaitTimeoutMs = 2000; + +#ifdef _DEBUG +const DWORD kWaitForServerTimeoutMs = INFINITE; +#else +const DWORD kWaitForServerTimeoutMs = 15000; +#endif + +const int kPipeConnectMaxAttempts = 2; + +const DWORD kPipeDesiredAccess = FILE_READ_DATA | + FILE_WRITE_DATA | + FILE_WRITE_ATTRIBUTES; + +const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION | + SECURITY_SQOS_PRESENT; + +const DWORD kPipeMode = PIPE_READMODE_MESSAGE; + +const size_t kWaitEventCount = 2; + +// This function is orphan for production code. It can be used +// for debugging to help repro some scenarios like the client +// is slow in writing to the pipe after connecting, the client +// is slow in reading from the pipe after writing, etc. The parameter +// overlapped below is not used and it is present to match the signature +// of this function to TransactNamedPipe Win32 API. Uncomment if needed +// for debugging. +/** +static bool TransactNamedPipeDebugHelper(HANDLE pipe, + const void* in_buffer, + DWORD in_size, + void* out_buffer, + DWORD out_size, + DWORD* bytes_count, + LPOVERLAPPED) { + // Uncomment the next sleep to create a gap before writing + // to pipe. + // Sleep(5000); + + if (!WriteFile(pipe, + in_buffer, + in_size, + bytes_count, + NULL)) { + return false; + } + + // Uncomment the next sleep to create a gap between write + // and read. + // Sleep(5000); + + return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; +} +**/ + +CrashGenerationClient::CrashGenerationClient( + const wchar_t* pipe_name, + MINIDUMP_TYPE dump_type, + const CustomClientInfo* custom_info) + : pipe_name_(pipe_name), + pipe_handle_(NULL), + custom_info_(), + dump_type_(dump_type), + crash_event_(NULL), + crash_generated_(NULL), + server_alive_(NULL), + server_process_id_(0), + thread_id_(0), + exception_pointers_(NULL) { + memset(&assert_info_, 0, sizeof(assert_info_)); + if (custom_info) { + custom_info_ = *custom_info; + } +} + +CrashGenerationClient::CrashGenerationClient( + HANDLE pipe_handle, + MINIDUMP_TYPE dump_type, + const CustomClientInfo* custom_info) + : pipe_name_(), + pipe_handle_(pipe_handle), + custom_info_(), + dump_type_(dump_type), + crash_event_(NULL), + crash_generated_(NULL), + server_alive_(NULL), + server_process_id_(0), + thread_id_(0), + exception_pointers_(NULL) { + memset(&assert_info_, 0, sizeof(assert_info_)); + if (custom_info) { + custom_info_ = *custom_info; + } +} + +CrashGenerationClient::~CrashGenerationClient() { + if (crash_event_) { + CloseHandle(crash_event_); + } + + if (crash_generated_) { + CloseHandle(crash_generated_); + } + + if (server_alive_) { + CloseHandle(server_alive_); + } +} + +// Performs the registration step with the server process. +// The registration step involves communicating with the server +// via a named pipe. The client sends the following pieces of +// data to the server: +// +// * Message tag indicating the client is requesting registration. +// * Process id of the client process. +// * Address of a DWORD variable in the client address space +// that will contain the thread id of the client thread that +// caused the crash. +// * Address of a EXCEPTION_POINTERS* variable in the client +// address space that will point to an instance of EXCEPTION_POINTERS +// when the crash happens. +// * Address of an instance of MDRawAssertionInfo that will contain +// relevant information in case of non-exception crashes like assertion +// failures and pure calls. +// +// In return the client expects the following information from the server: +// +// * Message tag indicating successful registration. +// * Server process id. +// * Handle to an object that client can signal to request dump +// generation from the server. +// * Handle to an object that client can wait on after requesting +// dump generation for the server to finish dump generation. +// * Handle to a mutex object that client can wait on to make sure +// server is still alive. +// +// If any step of the expected behavior mentioned above fails, the +// registration step is not considered successful and hence out-of-process +// dump generation service is not available. +// +// Returns true if the registration is successful; false otherwise. +bool CrashGenerationClient::Register() { + if (IsRegistered()) { + return true; + } + + HANDLE pipe = ConnectToServer(); + if (!pipe) { + return false; + } + + bool success = RegisterClient(pipe); + CloseHandle(pipe); + return success; +} + +bool CrashGenerationClient::RequestUpload(DWORD crash_id) { + HANDLE pipe = ConnectToServer(); + if (!pipe) { + return false; + } + + CustomClientInfo custom_info = {NULL, 0}; + ProtocolMessage msg(MESSAGE_TAG_UPLOAD_REQUEST, crash_id, + static_cast(NULL), NULL, NULL, NULL, + custom_info, NULL, NULL, NULL); + DWORD bytes_count = 0; + bool success = WriteFile(pipe, &msg, sizeof(msg), &bytes_count, NULL) != 0; + + CloseHandle(pipe); + return success; +} + +HANDLE CrashGenerationClient::ConnectToServer() { + HANDLE pipe = ConnectToPipe(pipe_name_.c_str(), + kPipeDesiredAccess, + kPipeFlagsAndAttributes); + if (!pipe) { + return NULL; + } + + DWORD mode = kPipeMode; + if (!SetNamedPipeHandleState(pipe, &mode, NULL, NULL)) { + CloseHandle(pipe); + pipe = NULL; + } + + return pipe; +} + +bool CrashGenerationClient::RegisterClient(HANDLE pipe) { + ProtocolMessage msg(MESSAGE_TAG_REGISTRATION_REQUEST, + GetCurrentProcessId(), + dump_type_, + &thread_id_, + &exception_pointers_, + &assert_info_, + custom_info_, + NULL, + NULL, + NULL); + ProtocolMessage reply; + DWORD bytes_count = 0; + // The call to TransactNamedPipe below can be changed to a call + // to TransactNamedPipeDebugHelper to help repro some scenarios. + // For details see comments for TransactNamedPipeDebugHelper. + if (!TransactNamedPipe(pipe, + &msg, + sizeof(msg), + &reply, + sizeof(ProtocolMessage), + &bytes_count, + NULL)) { + return false; + } + + if (!ValidateResponse(reply)) { + return false; + } + + ProtocolMessage ack_msg; + ack_msg.tag = MESSAGE_TAG_REGISTRATION_ACK; + + if (!WriteFile(pipe, &ack_msg, sizeof(ack_msg), &bytes_count, NULL)) { + return false; + } + crash_event_ = reply.dump_request_handle; + crash_generated_ = reply.dump_generated_handle; + server_alive_ = reply.server_alive_handle; + server_process_id_ = reply.id; + + return true; +} + +HANDLE CrashGenerationClient::ConnectToPipe(const wchar_t* pipe_name, + DWORD pipe_access, + DWORD flags_attrs) { + if (pipe_handle_) { + HANDLE t = pipe_handle_; + pipe_handle_ = NULL; + return t; + } + + for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { + HANDLE pipe = CreateFile(pipe_name, + pipe_access, + 0, + NULL, + OPEN_EXISTING, + flags_attrs, + NULL); + if (pipe != INVALID_HANDLE_VALUE) { + return pipe; + } + + // Cannot continue retrying if error is something other than + // ERROR_PIPE_BUSY. + if (GetLastError() != ERROR_PIPE_BUSY) { + break; + } + + // Cannot continue retrying if wait on pipe fails. + if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { + break; + } + } + + return NULL; +} + +bool CrashGenerationClient::ValidateResponse( + const ProtocolMessage& msg) const { + return (msg.tag == MESSAGE_TAG_REGISTRATION_RESPONSE) && + (msg.id != 0) && + (msg.dump_request_handle != NULL) && + (msg.dump_generated_handle != NULL) && + (msg.server_alive_handle != NULL); +} + +bool CrashGenerationClient::IsRegistered() const { + return crash_event_ != NULL; +} + +bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info, + MDRawAssertionInfo* assert_info) { + if (!IsRegistered()) { + return false; + } + + exception_pointers_ = ex_info; + thread_id_ = GetCurrentThreadId(); + + if (assert_info) { + memcpy(&assert_info_, assert_info, sizeof(assert_info_)); + } else { + memset(&assert_info_, 0, sizeof(assert_info_)); + } + + return SignalCrashEventAndWait(); +} + +bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info) { + return RequestDump(ex_info, NULL); +} + +bool CrashGenerationClient::RequestDump(MDRawAssertionInfo* assert_info) { + return RequestDump(NULL, assert_info); +} + +bool CrashGenerationClient::SignalCrashEventAndWait() { + assert(crash_event_); + assert(crash_generated_); + assert(server_alive_); + + // Reset the dump generated event before signaling the crash + // event so that the server can set the dump generated event + // once it is done generating the event. + if (!ResetEvent(crash_generated_)) { + return false; + } + + if (!SetEvent(crash_event_)) { + return false; + } + + HANDLE wait_handles[kWaitEventCount] = {crash_generated_, server_alive_}; + + DWORD result = WaitForMultipleObjects(kWaitEventCount, + wait_handles, + FALSE, + kWaitForServerTimeoutMs); + + // Crash dump was successfully generated only if the server + // signaled the crash generated event. + return result == WAIT_OBJECT_0; +} + +HANDLE CrashGenerationClient::DuplicatePipeToClientProcess(const wchar_t* pipe_name, + HANDLE hProcess) { + for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { + HANDLE local_pipe = CreateFile(pipe_name, kPipeDesiredAccess, + 0, NULL, OPEN_EXISTING, + kPipeFlagsAndAttributes, NULL); + if (local_pipe != INVALID_HANDLE_VALUE) { + HANDLE remotePipe = INVALID_HANDLE_VALUE; + if (DuplicateHandle(GetCurrentProcess(), local_pipe, + hProcess, &remotePipe, 0, FALSE, + DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) { + return remotePipe; + } else { + return INVALID_HANDLE_VALUE; + } + } + + // Cannot continue retrying if the error wasn't a busy pipe. + if (GetLastError() != ERROR_PIPE_BUSY) { + return INVALID_HANDLE_VALUE; + } + + if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { + return INVALID_HANDLE_VALUE; + } + } + return INVALID_HANDLE_VALUE; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h new file mode 100644 index 00000000000000..457f731957264f --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h @@ -0,0 +1,182 @@ +// Copyright (c) 2008, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ +#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ + +#include +#include +#include +#include +#include "client/windows/common/ipc_protocol.h" +#include "common/scoped_ptr.h" + +namespace google_breakpad { + +struct CustomClientInfo; + +// Abstraction of client-side implementation of out of process +// crash generation. +// +// The process that desires to have out-of-process crash dump +// generation service can use this class in the following way: +// +// * Create an instance. +// * Call Register method so that the client tries to register +// with the server process and check the return value. If +// registration is not successful, out-of-process crash dump +// generation will not be available +// * Request dump generation by calling either of the two +// overloaded RequestDump methods - one in case of exceptions +// and the other in case of assertion failures +// +// Note that it is the responsibility of the client code of +// this class to set the unhandled exception filter with the +// system by calling the SetUnhandledExceptionFilter function +// and the client code should explicitly request dump generation. +class CrashGenerationClient { + public: + CrashGenerationClient(const wchar_t* pipe_name, + MINIDUMP_TYPE dump_type, + const CustomClientInfo* custom_info); + + CrashGenerationClient(HANDLE pipe_handle, + MINIDUMP_TYPE dump_type, + const CustomClientInfo* custom_info); + + ~CrashGenerationClient(); + + // Registers the client process with the crash server. + // + // Returns true if the registration is successful; false otherwise. + bool Register(); + + // Requests the crash server to upload a previous dump with the + // given crash id. + bool RequestUpload(DWORD crash_id); + + bool RequestDump(EXCEPTION_POINTERS* ex_info, + MDRawAssertionInfo* assert_info); + + // Requests the crash server to generate a dump with the given + // exception information. + // + // Returns true if the dump was successful; false otherwise. Note that + // if the registration step was not performed or it was not successful, + // false will be returned. + bool RequestDump(EXCEPTION_POINTERS* ex_info); + + // Requests the crash server to generate a dump with the given + // assertion information. + // + // Returns true if the dump was successful; false otherwise. Note that + // if the registration step was not performed or it was not successful, + // false will be returned. + bool RequestDump(MDRawAssertionInfo* assert_info); + + // If the crash generation client is running in a sandbox that prevents it + // from opening the named pipe directly, the server process may open the + // handle and duplicate it into the client process with this helper method. + // Returns INVALID_HANDLE_VALUE on failure. The process must have been opened + // with the PROCESS_DUP_HANDLE access right. + static HANDLE DuplicatePipeToClientProcess(const wchar_t* pipe_name, + HANDLE hProcess); + + private: + // Connects to the appropriate pipe and sets the pipe handle state. + // + // Returns the pipe handle if everything goes well; otherwise Returns NULL. + HANDLE ConnectToServer(); + + // Performs a handshake with the server over the given pipe which should be + // already connected to the server. + // + // Returns true if handshake with the server was successful; false otherwise. + bool RegisterClient(HANDLE pipe); + + // Validates the given server response. + bool ValidateResponse(const ProtocolMessage& msg) const; + + // Returns true if the registration step succeeded; false otherwise. + bool IsRegistered() const; + + // Connects to the given named pipe with given parameters. + // + // Returns true if the connection is successful; false otherwise. + HANDLE ConnectToPipe(const wchar_t* pipe_name, + DWORD pipe_access, + DWORD flags_attrs); + + // Signals the crash event and wait for the server to generate crash. + bool SignalCrashEventAndWait(); + + // Pipe name to use to talk to server. + std::wstring pipe_name_; + + // Pipe handle duplicated from server process. Only valid before + // Register is called. + HANDLE pipe_handle_; + + // Custom client information + CustomClientInfo custom_info_; + + // Type of dump to generate. + MINIDUMP_TYPE dump_type_; + + // Event to signal in case of a crash. + HANDLE crash_event_; + + // Handle to wait on after signaling a crash for the server + // to finish generating crash dump. + HANDLE crash_generated_; + + // Handle to a mutex that will become signaled with WAIT_ABANDONED + // if the server process goes down. + HANDLE server_alive_; + + // Server process id. + DWORD server_process_id_; + + // Id of the thread that caused the crash. + DWORD thread_id_; + + // Exception pointers for an exception crash. + EXCEPTION_POINTERS* exception_pointers_; + + // Assertion info for an invalid parameter or pure call crash. + MDRawAssertionInfo assert_info_; + + // Disable copy ctor and operator=. + CrashGenerationClient(const CrashGenerationClient& crash_client); + CrashGenerationClient& operator=(const CrashGenerationClient& crash_client); +}; + +} // namespace google_breakpad + +#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc new file mode 100644 index 00000000000000..b78075dec5a179 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc @@ -0,0 +1,1073 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include +#include +#include + +#include "common/windows/string_utils-inl.h" + +#include "client/windows/common/ipc_protocol.h" +#include "client/windows/handler/exception_handler.h" +#include "common/windows/guid_string.h" + +namespace google_breakpad { + +static const int kWaitForHandlerThreadMs = 60000; +static const int kExceptionHandlerThreadInitialStackSize = 64 * 1024; + +// As documented on MSDN, on failure SuspendThread returns (DWORD) -1 +static const DWORD kFailedToSuspendThread = static_cast(-1); + +// This is passed as the context to the MinidumpWriteDump callback. +typedef struct { + AppMemoryList::const_iterator iter; + AppMemoryList::const_iterator end; +} MinidumpCallbackContext; + +vector* ExceptionHandler::handler_stack_ = NULL; +LONG ExceptionHandler::handler_stack_index_ = 0; +CRITICAL_SECTION ExceptionHandler::handler_stack_critical_section_; +volatile LONG ExceptionHandler::instance_count_ = 0; + +ExceptionHandler::ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + const wchar_t* pipe_name, + const CustomClientInfo* custom_info) { + Initialize(dump_path, + filter, + callback, + callback_context, + handler_types, + dump_type, + pipe_name, + NULL, // pipe_handle + NULL, // crash_generation_client + custom_info); +} + +ExceptionHandler::ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + HANDLE pipe_handle, + const CustomClientInfo* custom_info) { + Initialize(dump_path, + filter, + callback, + callback_context, + handler_types, + dump_type, + NULL, // pipe_name + pipe_handle, + NULL, // crash_generation_client + custom_info); +} + +ExceptionHandler::ExceptionHandler( + const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + CrashGenerationClient* crash_generation_client) { + // The dump_type, pipe_name and custom_info that are passed in to Initialize() + // are not used. The ones set in crash_generation_client are used instead. + Initialize(dump_path, + filter, + callback, + callback_context, + handler_types, + MiniDumpNormal, // dump_type - not used + NULL, // pipe_name - not used + NULL, // pipe_handle + crash_generation_client, + NULL); // custom_info - not used +} + +ExceptionHandler::ExceptionHandler(const wstring &dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types) { + Initialize(dump_path, + filter, + callback, + callback_context, + handler_types, + MiniDumpNormal, + NULL, // pipe_name + NULL, // pipe_handle + NULL, // crash_generation_client + NULL); // custom_info +} + +void ExceptionHandler::Initialize( + const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + const wchar_t* pipe_name, + HANDLE pipe_handle, + CrashGenerationClient* crash_generation_client, + const CustomClientInfo* custom_info) { + LONG instance_count = InterlockedIncrement(&instance_count_); + filter_ = filter; + callback_ = callback; + callback_context_ = callback_context; + dump_path_c_ = NULL; + next_minidump_id_c_ = NULL; + next_minidump_path_c_ = NULL; + dbghelp_module_ = NULL; + minidump_write_dump_ = NULL; + dump_type_ = dump_type; + rpcrt4_module_ = NULL; + uuid_create_ = NULL; + handler_types_ = handler_types; + previous_filter_ = NULL; +#if _MSC_VER >= 1400 // MSVC 2005/8 + previous_iph_ = NULL; +#endif // _MSC_VER >= 1400 + previous_pch_ = NULL; + handler_thread_ = NULL; + is_shutdown_ = false; + handler_start_semaphore_ = NULL; + handler_finish_semaphore_ = NULL; + requesting_thread_id_ = 0; + exception_info_ = NULL; + assertion_ = NULL; + handler_return_value_ = false; + handle_debug_exceptions_ = false; + consume_invalid_handle_exceptions_ = false; + + // Attempt to use out-of-process if user has specified a pipe or a + // crash generation client. + scoped_ptr client; + if (crash_generation_client) { + client.reset(crash_generation_client); + } else if (pipe_name) { + client.reset( + new CrashGenerationClient(pipe_name, dump_type_, custom_info)); + } else if (pipe_handle) { + client.reset( + new CrashGenerationClient(pipe_handle, dump_type_, custom_info)); + } + + if (client.get() != NULL) { + // If successful in registering with the monitoring process, + // there is no need to setup in-process crash generation. + if (client->Register()) { + crash_generation_client_.reset(client.release()); + } + } + + if (!IsOutOfProcess()) { + // Either client did not ask for out-of-process crash generation + // or registration with the server process failed. In either case, + // setup to do in-process crash generation. + + // Set synchronization primitives and the handler thread. Each + // ExceptionHandler object gets its own handler thread because that's the + // only way to reliably guarantee sufficient stack space in an exception, + // and it allows an easy way to get a snapshot of the requesting thread's + // context outside of an exception. + InitializeCriticalSection(&handler_critical_section_); + handler_start_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); + assert(handler_start_semaphore_ != NULL); + + handler_finish_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); + assert(handler_finish_semaphore_ != NULL); + + // Don't attempt to create the thread if we could not create the semaphores. + if (handler_finish_semaphore_ != NULL && handler_start_semaphore_ != NULL) { + DWORD thread_id; + handler_thread_ = CreateThread(NULL, // lpThreadAttributes + kExceptionHandlerThreadInitialStackSize, + ExceptionHandlerThreadMain, + this, // lpParameter + 0, // dwCreationFlags + &thread_id); + assert(handler_thread_ != NULL); + } + + dbghelp_module_ = LoadLibrary(L"dbghelp.dll"); + if (dbghelp_module_) { + minidump_write_dump_ = reinterpret_cast( + GetProcAddress(dbghelp_module_, "MiniDumpWriteDump")); + } + + // Load this library dynamically to not affect existing projects. Most + // projects don't link against this directly, it's usually dynamically + // loaded by dependent code. + rpcrt4_module_ = LoadLibrary(L"rpcrt4.dll"); + if (rpcrt4_module_) { + uuid_create_ = reinterpret_cast( + GetProcAddress(rpcrt4_module_, "UuidCreate")); + } + + // set_dump_path calls UpdateNextID. This sets up all of the path and id + // strings, and their equivalent c_str pointers. + set_dump_path(dump_path); + } + + // Reserve one element for the instruction memory + AppMemory instruction_memory; + instruction_memory.ptr = NULL; + instruction_memory.length = 0; + app_memory_info_.push_back(instruction_memory); + + // There is a race condition here. If the first instance has not yet + // initialized the critical section, the second (and later) instances may + // try to use uninitialized critical section object. The feature of multiple + // instances in one module is not used much, so leave it as is for now. + // One way to solve this in the current design (that is, keeping the static + // handler stack) is to use spin locks with volatile bools to synchronize + // the handler stack. This works only if the compiler guarantees to generate + // cache coherent code for volatile. + // TODO(munjal): Fix this in a better way by changing the design if possible. + + // Lazy initialization of the handler_stack_critical_section_ + if (instance_count == 1) { + InitializeCriticalSection(&handler_stack_critical_section_); + } + + if (handler_types != HANDLER_NONE) { + EnterCriticalSection(&handler_stack_critical_section_); + + // The first time an ExceptionHandler that installs a handler is + // created, set up the handler stack. + if (!handler_stack_) { + handler_stack_ = new vector(); + } + handler_stack_->push_back(this); + + if (handler_types & HANDLER_EXCEPTION) + previous_filter_ = SetUnhandledExceptionFilter(HandleException); + +#if _MSC_VER >= 1400 // MSVC 2005/8 + if (handler_types & HANDLER_INVALID_PARAMETER) + previous_iph_ = _set_invalid_parameter_handler(HandleInvalidParameter); +#endif // _MSC_VER >= 1400 + + if (handler_types & HANDLER_PURECALL) + previous_pch_ = _set_purecall_handler(HandlePureVirtualCall); + + LeaveCriticalSection(&handler_stack_critical_section_); + } +} + +ExceptionHandler::~ExceptionHandler() { + if (dbghelp_module_) { + FreeLibrary(dbghelp_module_); + } + + if (rpcrt4_module_) { + FreeLibrary(rpcrt4_module_); + } + + if (handler_types_ != HANDLER_NONE) { + EnterCriticalSection(&handler_stack_critical_section_); + + if (handler_types_ & HANDLER_EXCEPTION) + SetUnhandledExceptionFilter(previous_filter_); + +#if _MSC_VER >= 1400 // MSVC 2005/8 + if (handler_types_ & HANDLER_INVALID_PARAMETER) + _set_invalid_parameter_handler(previous_iph_); +#endif // _MSC_VER >= 1400 + + if (handler_types_ & HANDLER_PURECALL) + _set_purecall_handler(previous_pch_); + + if (handler_stack_->back() == this) { + handler_stack_->pop_back(); + } else { + // TODO(mmentovai): use advapi32!ReportEvent to log the warning to the + // system's application event log. + fprintf(stderr, "warning: removing Breakpad handler out of order\n"); + vector::iterator iterator = handler_stack_->begin(); + while (iterator != handler_stack_->end()) { + if (*iterator == this) { + iterator = handler_stack_->erase(iterator); + } else { + ++iterator; + } + } + } + + if (handler_stack_->empty()) { + // When destroying the last ExceptionHandler that installed a handler, + // clean up the handler stack. + delete handler_stack_; + handler_stack_ = NULL; + } + + LeaveCriticalSection(&handler_stack_critical_section_); + } + + // Some of the objects were only initialized if out of process + // registration was not done. + if (!IsOutOfProcess()) { +#ifdef BREAKPAD_NO_TERMINATE_THREAD + // Clean up the handler thread and synchronization primitives. The handler + // thread is either waiting on the semaphore to handle a crash or it is + // handling a crash. Coming out of the wait is fast but wait more in the + // eventuality a crash is handled. This compilation option results in a + // deadlock if the exception handler is destroyed while executing code + // inside DllMain. + is_shutdown_ = true; + ReleaseSemaphore(handler_start_semaphore_, 1, NULL); + WaitForSingleObject(handler_thread_, kWaitForHandlerThreadMs); +#else + TerminateThread(handler_thread_, 1); +#endif // BREAKPAD_NO_TERMINATE_THREAD + + CloseHandle(handler_thread_); + handler_thread_ = NULL; + DeleteCriticalSection(&handler_critical_section_); + CloseHandle(handler_start_semaphore_); + CloseHandle(handler_finish_semaphore_); + } + + // There is a race condition in the code below: if this instance is + // deleting the static critical section and a new instance of the class + // is created, then there is a possibility that the critical section be + // initialized while the same critical section is being deleted. Given the + // usage pattern for the code, this race condition is unlikely to hit, but it + // is a race condition nonetheless. + if (InterlockedDecrement(&instance_count_) == 0) { + DeleteCriticalSection(&handler_stack_critical_section_); + } +} + +bool ExceptionHandler::RequestUpload(DWORD crash_id) { + return crash_generation_client_->RequestUpload(crash_id); +} + +// static +DWORD ExceptionHandler::ExceptionHandlerThreadMain(void* lpParameter) { + ExceptionHandler* self = reinterpret_cast(lpParameter); + assert(self); + assert(self->handler_start_semaphore_ != NULL); + assert(self->handler_finish_semaphore_ != NULL); + + while (true) { + if (WaitForSingleObject(self->handler_start_semaphore_, INFINITE) == + WAIT_OBJECT_0) { + // Perform the requested action. + if (self->is_shutdown_) { + // The instance of the exception handler is being destroyed. + break; + } else { + self->handler_return_value_ = + self->WriteMinidumpWithException(self->requesting_thread_id_, + self->exception_info_, + self->assertion_); + } + + // Allow the requesting thread to proceed. + ReleaseSemaphore(self->handler_finish_semaphore_, 1, NULL); + } + } + + // This statement is not reached when the thread is unconditionally + // terminated by the ExceptionHandler destructor. + return 0; +} + +// HandleException and HandleInvalidParameter must create an +// AutoExceptionHandler object to maintain static state and to determine which +// ExceptionHandler instance to use. The constructor locates the correct +// instance, and makes it available through get_handler(). The destructor +// restores the state in effect prior to allocating the AutoExceptionHandler. +class AutoExceptionHandler { + public: + AutoExceptionHandler() { + // Increment handler_stack_index_ so that if another Breakpad handler is + // registered using this same HandleException function, and it needs to be + // called while this handler is running (either because this handler + // declines to handle the exception, or an exception occurs during + // handling), HandleException will find the appropriate ExceptionHandler + // object in handler_stack_ to deliver the exception to. + // + // Because handler_stack_ is addressed in reverse (as |size - index|), + // preincrementing handler_stack_index_ avoids needing to subtract 1 from + // the argument to |at|. + // + // The index is maintained instead of popping elements off of the handler + // stack and pushing them at the end of this method. This avoids ruining + // the order of elements in the stack in the event that some other thread + // decides to manipulate the handler stack (such as creating a new + // ExceptionHandler object) while an exception is being handled. + EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); + handler_ = ExceptionHandler::handler_stack_->at( + ExceptionHandler::handler_stack_->size() - + ++ExceptionHandler::handler_stack_index_); + + // In case another exception occurs while this handler is doing its thing, + // it should be delivered to the previous filter. + SetUnhandledExceptionFilter(handler_->previous_filter_); +#if _MSC_VER >= 1400 // MSVC 2005/8 + _set_invalid_parameter_handler(handler_->previous_iph_); +#endif // _MSC_VER >= 1400 + _set_purecall_handler(handler_->previous_pch_); + } + + ~AutoExceptionHandler() { + // Put things back the way they were before entering this handler. + SetUnhandledExceptionFilter(ExceptionHandler::HandleException); +#if _MSC_VER >= 1400 // MSVC 2005/8 + _set_invalid_parameter_handler(ExceptionHandler::HandleInvalidParameter); +#endif // _MSC_VER >= 1400 + _set_purecall_handler(ExceptionHandler::HandlePureVirtualCall); + + --ExceptionHandler::handler_stack_index_; + LeaveCriticalSection(&ExceptionHandler::handler_stack_critical_section_); + } + + ExceptionHandler* get_handler() const { return handler_; } + + private: + ExceptionHandler* handler_; +}; + +// static +LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) { + AutoExceptionHandler auto_exception_handler; + ExceptionHandler* current_handler = auto_exception_handler.get_handler(); + + // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions. This + // logic will short-circuit before calling WriteMinidumpOnHandlerThread, + // allowing something else to handle the breakpoint without incurring the + // overhead transitioning to and from the handler thread. This behavior + // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions. + DWORD code = exinfo->ExceptionRecord->ExceptionCode; + LONG action; + bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || + (code == EXCEPTION_SINGLE_STEP); + + if (code == EXCEPTION_INVALID_HANDLE && + current_handler->consume_invalid_handle_exceptions_) { + return EXCEPTION_CONTINUE_EXECUTION; + } + + bool success = false; + + if (!is_debug_exception || + current_handler->get_handle_debug_exceptions()) { + // If out-of-proc crash handler client is available, we have to use that + // to generate dump and we cannot fall back on in-proc dump generation + // because we never prepared for an in-proc dump generation + + // In case of out-of-process dump generation, directly call + // WriteMinidumpWithException since there is no separate thread running. + if (current_handler->IsOutOfProcess()) { + success = current_handler->WriteMinidumpWithException( + GetCurrentThreadId(), + exinfo, + NULL); + } else { + success = current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL); + } + } + + // The handler fully handled the exception. Returning + // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually + // results in the application being terminated. + // + // Note: If the application was launched from within the Cygwin + // environment, returning EXCEPTION_EXECUTE_HANDLER seems to cause the + // application to be restarted. + if (success) { + action = EXCEPTION_EXECUTE_HANDLER; + } else { + // There was an exception, it was a breakpoint or something else ignored + // above, or it was passed to the handler, which decided not to handle it. + // This could be because the filter callback didn't want it, because + // minidump writing failed for some reason, or because the post-minidump + // callback function indicated failure. Give the previous handler a + // chance to do something with the exception. If there is no previous + // handler, return EXCEPTION_CONTINUE_SEARCH, which will allow a debugger + // or native "crashed" dialog to handle the exception. + if (current_handler->previous_filter_) { + action = current_handler->previous_filter_(exinfo); + } else { + action = EXCEPTION_CONTINUE_SEARCH; + } + } + + return action; +} + +#if _MSC_VER >= 1400 // MSVC 2005/8 +// static +void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression, + const wchar_t* function, + const wchar_t* file, + unsigned int line, + uintptr_t reserved) { + // This is an invalid parameter, not an exception. It's safe to play with + // sprintf here. + AutoExceptionHandler auto_exception_handler; + ExceptionHandler* current_handler = auto_exception_handler.get_handler(); + + MDRawAssertionInfo assertion; + memset(&assertion, 0, sizeof(assertion)); + _snwprintf_s(reinterpret_cast(assertion.expression), + sizeof(assertion.expression) / sizeof(assertion.expression[0]), + _TRUNCATE, L"%s", expression); + _snwprintf_s(reinterpret_cast(assertion.function), + sizeof(assertion.function) / sizeof(assertion.function[0]), + _TRUNCATE, L"%s", function); + _snwprintf_s(reinterpret_cast(assertion.file), + sizeof(assertion.file) / sizeof(assertion.file[0]), + _TRUNCATE, L"%s", file); + assertion.line = line; + assertion.type = MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER; + + // Make up an exception record for the current thread and CPU context + // to make it possible for the crash processor to classify these + // as do regular crashes, and to make it humane for developers to + // analyze them. + EXCEPTION_RECORD exception_record = {}; + CONTEXT exception_context = {}; + EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; + + ::RtlCaptureContext(&exception_context); + + exception_record.ExceptionCode = STATUS_INVALID_PARAMETER; + + // We store pointers to the the expression and function strings, + // and the line as exception parameters to make them easy to + // access by the developer on the far side. + exception_record.NumberParameters = 3; + exception_record.ExceptionInformation[0] = + reinterpret_cast(&assertion.expression); + exception_record.ExceptionInformation[1] = + reinterpret_cast(&assertion.file); + exception_record.ExceptionInformation[2] = assertion.line; + + bool success = false; + // In case of out-of-process dump generation, directly call + // WriteMinidumpWithException since there is no separate thread running. + if (current_handler->IsOutOfProcess()) { + success = current_handler->WriteMinidumpWithException( + GetCurrentThreadId(), + &exception_ptrs, + &assertion); + } else { + success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs, + &assertion); + } + + if (!success) { + if (current_handler->previous_iph_) { + // The handler didn't fully handle the exception. Give it to the + // previous invalid parameter handler. + current_handler->previous_iph_(expression, + function, + file, + line, + reserved); + } else { + // If there's no previous handler, pass the exception back in to the + // invalid parameter handler's core. That's the routine that called this + // function, but now, since this function is no longer registered (and in + // fact, no function at all is registered), this will result in the + // default code path being taken: _CRT_DEBUGGER_HOOK and _invoke_watson. + // Use _invalid_parameter where it exists (in _DEBUG builds) as it passes + // more information through. In non-debug builds, it is not available, + // so fall back to using _invalid_parameter_noinfo. See invarg.c in the + // CRT source. +#ifdef _DEBUG + _invalid_parameter(expression, function, file, line, reserved); +#else // _DEBUG + _invalid_parameter_noinfo(); +#endif // _DEBUG + } + } + + // The handler either took care of the invalid parameter problem itself, + // or passed it on to another handler. "Swallow" it by exiting, paralleling + // the behavior of "swallowing" exceptions. + exit(0); +} +#endif // _MSC_VER >= 1400 + +// static +void ExceptionHandler::HandlePureVirtualCall() { + // This is an pure virtual function call, not an exception. It's safe to + // play with sprintf here. + AutoExceptionHandler auto_exception_handler; + ExceptionHandler* current_handler = auto_exception_handler.get_handler(); + + MDRawAssertionInfo assertion; + memset(&assertion, 0, sizeof(assertion)); + assertion.type = MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL; + + // Make up an exception record for the current thread and CPU context + // to make it possible for the crash processor to classify these + // as do regular crashes, and to make it humane for developers to + // analyze them. + EXCEPTION_RECORD exception_record = {}; + CONTEXT exception_context = {}; + EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; + + ::RtlCaptureContext(&exception_context); + + exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; + + // We store pointers to the the expression and function strings, + // and the line as exception parameters to make them easy to + // access by the developer on the far side. + exception_record.NumberParameters = 3; + exception_record.ExceptionInformation[0] = + reinterpret_cast(&assertion.expression); + exception_record.ExceptionInformation[1] = + reinterpret_cast(&assertion.file); + exception_record.ExceptionInformation[2] = assertion.line; + + bool success = false; + // In case of out-of-process dump generation, directly call + // WriteMinidumpWithException since there is no separate thread running. + + if (current_handler->IsOutOfProcess()) { + success = current_handler->WriteMinidumpWithException( + GetCurrentThreadId(), + &exception_ptrs, + &assertion); + } else { + success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs, + &assertion); + } + + if (!success) { + if (current_handler->previous_pch_) { + // The handler didn't fully handle the exception. Give it to the + // previous purecall handler. + current_handler->previous_pch_(); + } else { + // If there's no previous handler, return and let _purecall handle it. + // This will just put up an assertion dialog. + return; + } + } + + // The handler either took care of the invalid parameter problem itself, + // or passed it on to another handler. "Swallow" it by exiting, paralleling + // the behavior of "swallowing" exceptions. + exit(0); +} + +bool ExceptionHandler::WriteMinidumpOnHandlerThread( + EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion) { + EnterCriticalSection(&handler_critical_section_); + + // There isn't much we can do if the handler thread + // was not successfully created. + if (handler_thread_ == NULL) { + LeaveCriticalSection(&handler_critical_section_); + return false; + } + + // The handler thread should only be created when the semaphores are valid. + assert(handler_start_semaphore_ != NULL); + assert(handler_finish_semaphore_ != NULL); + + // Set up data to be passed in to the handler thread. + requesting_thread_id_ = GetCurrentThreadId(); + exception_info_ = exinfo; + assertion_ = assertion; + + // This causes the handler thread to call WriteMinidumpWithException. + ReleaseSemaphore(handler_start_semaphore_, 1, NULL); + + // Wait until WriteMinidumpWithException is done and collect its return value. + WaitForSingleObject(handler_finish_semaphore_, INFINITE); + bool status = handler_return_value_; + + // Clean up. + requesting_thread_id_ = 0; + exception_info_ = NULL; + assertion_ = NULL; + + LeaveCriticalSection(&handler_critical_section_); + + return status; +} + +bool ExceptionHandler::WriteMinidump() { + // Make up an exception record for the current thread and CPU context + // to make it possible for the crash processor to classify these + // as do regular crashes, and to make it humane for developers to + // analyze them. + EXCEPTION_RECORD exception_record = {}; + CONTEXT exception_context = {}; + EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; + + ::RtlCaptureContext(&exception_context); + exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; + + return WriteMinidumpForException(&exception_ptrs); +} + +bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) { + // In case of out-of-process dump generation, directly call + // WriteMinidumpWithException since there is no separate thread running. + if (IsOutOfProcess()) { + return WriteMinidumpWithException(GetCurrentThreadId(), + exinfo, + NULL); + } + + bool success = WriteMinidumpOnHandlerThread(exinfo, NULL); + UpdateNextID(); + return success; +} + +// static +bool ExceptionHandler::WriteMinidump(const wstring &dump_path, + MinidumpCallback callback, + void* callback_context) { + ExceptionHandler handler(dump_path, NULL, callback, callback_context, + HANDLER_NONE); + return handler.WriteMinidump(); +} + +// static +bool ExceptionHandler::WriteMinidumpForChild(HANDLE child, + DWORD child_blamed_thread, + const wstring& dump_path, + MinidumpCallback callback, + void* callback_context) { + EXCEPTION_RECORD ex; + CONTEXT ctx; + EXCEPTION_POINTERS exinfo = { NULL, NULL }; + DWORD last_suspend_count = kFailedToSuspendThread; + HANDLE child_thread_handle = OpenThread(THREAD_GET_CONTEXT | + THREAD_QUERY_INFORMATION | + THREAD_SUSPEND_RESUME, + FALSE, + child_blamed_thread); + // This thread may have died already, so not opening the handle is a + // non-fatal error. + if (child_thread_handle != NULL) { + last_suspend_count = SuspendThread(child_thread_handle); + if (last_suspend_count != kFailedToSuspendThread) { + ctx.ContextFlags = CONTEXT_ALL; + if (GetThreadContext(child_thread_handle, &ctx)) { + memset(&ex, 0, sizeof(ex)); + ex.ExceptionCode = EXCEPTION_BREAKPOINT; +#if defined(_M_IX86) + ex.ExceptionAddress = reinterpret_cast(ctx.Eip); +#elif defined(_M_X64) + ex.ExceptionAddress = reinterpret_cast(ctx.Rip); +#endif + exinfo.ExceptionRecord = &ex; + exinfo.ContextRecord = &ctx; + } + } + } + + ExceptionHandler handler(dump_path, NULL, callback, callback_context, + HANDLER_NONE); + bool success = handler.WriteMinidumpWithExceptionForProcess( + child_blamed_thread, + exinfo.ExceptionRecord ? &exinfo : NULL, + NULL, child, false); + + if (last_suspend_count != kFailedToSuspendThread) { + ResumeThread(child_thread_handle); + } + + CloseHandle(child_thread_handle); + + if (callback) { + success = callback(handler.dump_path_c_, handler.next_minidump_id_c_, + callback_context, NULL, NULL, success); + } + + return success; +} + +bool ExceptionHandler::WriteMinidumpWithException( + DWORD requesting_thread_id, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion) { + // Give user code a chance to approve or prevent writing a minidump. If the + // filter returns false, don't handle the exception at all. If this method + // was called as a result of an exception, returning false will cause + // HandleException to call any previous handler or return + // EXCEPTION_CONTINUE_SEARCH on the exception thread, allowing it to appear + // as though this handler were not present at all. + if (filter_ && !filter_(callback_context_, exinfo, assertion)) { + return false; + } + + bool success = false; + if (IsOutOfProcess()) { + success = crash_generation_client_->RequestDump(exinfo, assertion); + } else { + success = WriteMinidumpWithExceptionForProcess(requesting_thread_id, + exinfo, + assertion, + GetCurrentProcess(), + true); + } + + if (callback_) { + // TODO(munjal): In case of out-of-process dump generation, both + // dump_path_c_ and next_minidump_id_ will be NULL. For out-of-process + // scenario, the server process ends up creating the dump path and dump + // id so they are not known to the client. + success = callback_(dump_path_c_, next_minidump_id_c_, callback_context_, + exinfo, assertion, success); + } + + return success; +} + +// static +BOOL CALLBACK ExceptionHandler::MinidumpWriteDumpCallback( + PVOID context, + const PMINIDUMP_CALLBACK_INPUT callback_input, + PMINIDUMP_CALLBACK_OUTPUT callback_output) { + switch (callback_input->CallbackType) { + case MemoryCallback: { + MinidumpCallbackContext* callback_context = + reinterpret_cast(context); + if (callback_context->iter == callback_context->end) + return FALSE; + + // Include the specified memory region. + callback_output->MemoryBase = callback_context->iter->ptr; + callback_output->MemorySize = callback_context->iter->length; + callback_context->iter++; + return TRUE; + } + + // Include all modules. + case IncludeModuleCallback: + case ModuleCallback: + return TRUE; + + // Include all threads. + case IncludeThreadCallback: + case ThreadCallback: + return TRUE; + + // Stop receiving cancel callbacks. + case CancelCallback: + callback_output->CheckCancel = FALSE; + callback_output->Cancel = FALSE; + return TRUE; + } + // Ignore other callback types. + return FALSE; +} + +bool ExceptionHandler::WriteMinidumpWithExceptionForProcess( + DWORD requesting_thread_id, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + HANDLE process, + bool write_requester_stream) { + bool success = false; + if (minidump_write_dump_) { + HANDLE dump_file = CreateFile(next_minidump_path_c_, + GENERIC_WRITE, + 0, // no sharing + NULL, + CREATE_NEW, // fail if exists + FILE_ATTRIBUTE_NORMAL, + NULL); + if (dump_file != INVALID_HANDLE_VALUE) { + MINIDUMP_EXCEPTION_INFORMATION except_info; + except_info.ThreadId = requesting_thread_id; + except_info.ExceptionPointers = exinfo; + except_info.ClientPointers = FALSE; + + // Leave room in user_stream_array for possible breakpad and + // assertion info streams. + MINIDUMP_USER_STREAM user_stream_array[2]; + MINIDUMP_USER_STREAM_INFORMATION user_streams; + user_streams.UserStreamCount = 0; + user_streams.UserStreamArray = user_stream_array; + + if (write_requester_stream) { + // Add an MDRawBreakpadInfo stream to the minidump, to provide + // additional information about the exception handler to the Breakpad + // processor. The information will help the processor determine which + // threads are relevant. The Breakpad processor does not require this + // information but can function better with Breakpad-generated dumps + // when it is present. The native debugger is not harmed by the + // presence of this information. + MDRawBreakpadInfo breakpad_info; + breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | + MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; + breakpad_info.dump_thread_id = GetCurrentThreadId(); + breakpad_info.requesting_thread_id = requesting_thread_id; + + int index = user_streams.UserStreamCount; + user_stream_array[index].Type = MD_BREAKPAD_INFO_STREAM; + user_stream_array[index].BufferSize = sizeof(breakpad_info); + user_stream_array[index].Buffer = &breakpad_info; + ++user_streams.UserStreamCount; + } + + if (assertion) { + int index = user_streams.UserStreamCount; + user_stream_array[index].Type = MD_ASSERTION_INFO_STREAM; + user_stream_array[index].BufferSize = sizeof(MDRawAssertionInfo); + user_stream_array[index].Buffer = assertion; + ++user_streams.UserStreamCount; + } + + // Older versions of DbgHelp.dll don't correctly put the memory around + // the faulting instruction pointer into the minidump. This + // callback will ensure that it gets included. + if (exinfo) { + // Find a memory region of 256 bytes centered on the + // faulting instruction pointer. + const ULONG64 instruction_pointer = +#if defined(_M_IX86) + exinfo->ContextRecord->Eip; +#elif defined(_M_AMD64) + exinfo->ContextRecord->Rip; +#else +#error Unsupported platform +#endif + + MEMORY_BASIC_INFORMATION info; + if (VirtualQueryEx(process, + reinterpret_cast(instruction_pointer), + &info, + sizeof(MEMORY_BASIC_INFORMATION)) != 0 && + info.State == MEM_COMMIT) { + // Attempt to get 128 bytes before and after the instruction + // pointer, but settle for whatever's available up to the + // boundaries of the memory region. + const ULONG64 kIPMemorySize = 256; + ULONG64 base = + (std::max)(reinterpret_cast(info.BaseAddress), + instruction_pointer - (kIPMemorySize / 2)); + ULONG64 end_of_range = + (std::min)(instruction_pointer + (kIPMemorySize / 2), + reinterpret_cast(info.BaseAddress) + + info.RegionSize); + ULONG size = static_cast(end_of_range - base); + + AppMemory& elt = app_memory_info_.front(); + elt.ptr = base; + elt.length = size; + } + } + + MinidumpCallbackContext context; + context.iter = app_memory_info_.begin(); + context.end = app_memory_info_.end(); + + // Skip the reserved element if there was no instruction memory + if (context.iter->ptr == 0) { + context.iter++; + } + + MINIDUMP_CALLBACK_INFORMATION callback; + callback.CallbackRoutine = MinidumpWriteDumpCallback; + callback.CallbackParam = reinterpret_cast(&context); + + // The explicit comparison to TRUE avoids a warning (C4800). + success = (minidump_write_dump_(process, + GetProcessId(process), + dump_file, + dump_type_, + exinfo ? &except_info : NULL, + &user_streams, + &callback) == TRUE); + + CloseHandle(dump_file); + } + } + + return success; +} + +void ExceptionHandler::UpdateNextID() { + assert(uuid_create_); + UUID id = {0}; + if (uuid_create_) { + uuid_create_(&id); + } + next_minidump_id_ = GUIDString::GUIDToWString(&id); + next_minidump_id_c_ = next_minidump_id_.c_str(); + + wchar_t minidump_path[MAX_PATH]; + swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp", + dump_path_c_, next_minidump_id_c_); + + // remove when VC++7.1 is no longer supported + minidump_path[MAX_PATH - 1] = L'\0'; + + next_minidump_path_ = minidump_path; + next_minidump_path_c_ = next_minidump_path_.c_str(); +} + +void ExceptionHandler::RegisterAppMemory(void* ptr, size_t length) { + AppMemoryList::iterator iter = + std::find(app_memory_info_.begin(), app_memory_info_.end(), ptr); + if (iter != app_memory_info_.end()) { + // Don't allow registering the same pointer twice. + return; + } + + AppMemory app_memory; + app_memory.ptr = reinterpret_cast(ptr); + app_memory.length = static_cast(length); + app_memory_info_.push_back(app_memory); +} + +void ExceptionHandler::UnregisterAppMemory(void* ptr) { + AppMemoryList::iterator iter = + std::find(app_memory_info_.begin(), app_memory_info_.end(), ptr); + if (iter != app_memory_info_.end()) { + app_memory_info_.erase(iter); + } +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h new file mode 100644 index 00000000000000..e3cd8146b3b0dc --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h @@ -0,0 +1,522 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// ExceptionHandler can write a minidump file when an exception occurs, +// or when WriteMinidump() is called explicitly by your program. +// +// To have the exception handler write minidumps when an uncaught exception +// (crash) occurs, you should create an instance early in the execution +// of your program, and keep it around for the entire time you want to +// have crash handling active (typically, until shutdown). +// +// If you want to write minidumps without installing the exception handler, +// you can create an ExceptionHandler with install_handler set to false, +// then call WriteMinidump. You can also use this technique if you want to +// use different minidump callbacks for different call sites. +// +// In either case, a callback function is called when a minidump is written, +// which receives the unqiue id of the minidump. The caller can use this +// id to collect and write additional application state, and to launch an +// external crash-reporting application. +// +// It is important that creation and destruction of ExceptionHandler objects +// be nested cleanly, when using install_handler = true. +// Avoid the following pattern: +// ExceptionHandler *e = new ExceptionHandler(...); +// ExceptionHandler *f = new ExceptionHandler(...); +// delete e; +// This will put the exception filter stack into an inconsistent state. + +#ifndef CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ +#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ + +#include +#include +#include +#include + +#pragma warning(push) +// Disable exception handler warnings. +#pragma warning(disable:4530) + +#include +#include +#include + +#include "client/windows/common/ipc_protocol.h" +#include "client/windows/crash_generation/crash_generation_client.h" +#include "common/scoped_ptr.h" +#include "google_breakpad/common/minidump_format.h" + +namespace google_breakpad { + +using std::vector; +using std::wstring; + +// These entries store a list of memory regions that the client wants included +// in the minidump. +struct AppMemory { + ULONG64 ptr; + ULONG length; + + bool operator==(const struct AppMemory& other) const { + return ptr == other.ptr; + } + + bool operator==(const void* other) const { + return ptr == reinterpret_cast(other); + } +}; +typedef std::list AppMemoryList; + +class ExceptionHandler { + public: + // A callback function to run before Breakpad performs any substantial + // processing of an exception. A FilterCallback is called before writing + // a minidump. context is the parameter supplied by the user as + // callback_context when the handler was created. exinfo points to the + // exception record, if any; assertion points to assertion information, + // if any. + // + // If a FilterCallback returns true, Breakpad will continue processing, + // attempting to write a minidump. If a FilterCallback returns false, + // Breakpad will immediately report the exception as unhandled without + // writing a minidump, allowing another handler the opportunity to handle it. + typedef bool (*FilterCallback)(void* context, EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion); + + // A callback function to run after the minidump has been written. + // minidump_id is a unique id for the dump, so the minidump + // file is \.dmp. context is the parameter supplied + // by the user as callback_context when the handler was created. exinfo + // points to the exception record, or NULL if no exception occurred. + // succeeded indicates whether a minidump file was successfully written. + // assertion points to information about an assertion if the handler was + // invoked by an assertion. + // + // If an exception occurred and the callback returns true, Breakpad will treat + // the exception as fully-handled, suppressing any other handlers from being + // notified of the exception. If the callback returns false, Breakpad will + // treat the exception as unhandled, and allow another handler to handle it. + // If there are no other handlers, Breakpad will report the exception to the + // system as unhandled, allowing a debugger or native crash dialog the + // opportunity to handle the exception. Most callback implementations + // should normally return the value of |succeeded|, or when they wish to + // not report an exception of handled, false. Callbacks will rarely want to + // return true directly (unless |succeeded| is true). + // + // For out-of-process dump generation, dump path and minidump ID will always + // be NULL. In case of out-of-process dump generation, the dump path and + // minidump id are controlled by the server process and are not communicated + // back to the crashing process. + typedef bool (*MinidumpCallback)(const wchar_t* dump_path, + const wchar_t* minidump_id, + void* context, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + bool succeeded); + + // HandlerType specifies which types of handlers should be installed, if + // any. Use HANDLER_NONE for an ExceptionHandler that remains idle, + // without catching any failures on its own. This type of handler may + // still be triggered by calling WriteMinidump. Otherwise, use a + // combination of the other HANDLER_ values, or HANDLER_ALL to install + // all handlers. + enum HandlerType { + HANDLER_NONE = 0, + HANDLER_EXCEPTION = 1 << 0, // SetUnhandledExceptionFilter + HANDLER_INVALID_PARAMETER = 1 << 1, // _set_invalid_parameter_handler + HANDLER_PURECALL = 1 << 2, // _set_purecall_handler + HANDLER_ALL = HANDLER_EXCEPTION | + HANDLER_INVALID_PARAMETER | + HANDLER_PURECALL + }; + + // Creates a new ExceptionHandler instance to handle writing minidumps. + // Before writing a minidump, the optional filter callback will be called. + // Its return value determines whether or not Breakpad should write a + // minidump. Minidump files will be written to dump_path, and the optional + // callback is called after writing the dump file, as described above. + // handler_types specifies the types of handlers that should be installed. + ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types); + + // Creates a new ExceptionHandler instance that can attempt to perform + // out-of-process dump generation if pipe_name is not NULL. If pipe_name is + // NULL, or if out-of-process dump generation registration step fails, + // in-process dump generation will be used. This also allows specifying + // the dump type to generate. + ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + const wchar_t* pipe_name, + const CustomClientInfo* custom_info); + + // As above, creates a new ExceptionHandler instance to perform + // out-of-process dump generation if the given pipe_handle is not NULL. + ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + HANDLE pipe_handle, + const CustomClientInfo* custom_info); + + // ExceptionHandler that ENSURES out-of-process dump generation. Expects a + // crash generation client that is already registered with a crash generation + // server. Takes ownership of the passed-in crash_generation_client. + // + // Usage example: + // crash_generation_client = new CrashGenerationClient(..); + // if (crash_generation_client->Register()) { + // // Registration with the crash generation server succeeded. + // // Out-of-process dump generation is guaranteed. + // g_handler = new ExceptionHandler(.., crash_generation_client, ..); + // return true; + // } + ExceptionHandler(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + CrashGenerationClient* crash_generation_client); + + ~ExceptionHandler(); + + // Get and set the minidump path. + wstring dump_path() const { return dump_path_; } + void set_dump_path(const wstring &dump_path) { + dump_path_ = dump_path; + dump_path_c_ = dump_path_.c_str(); + UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. + } + + // Requests that a previously reported crash be uploaded. + bool RequestUpload(DWORD crash_id); + + // Writes a minidump immediately. This can be used to capture the + // execution state independently of a crash. Returns true on success. + bool WriteMinidump(); + + // Writes a minidump immediately, with the user-supplied exception + // information. + bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); + + // Convenience form of WriteMinidump which does not require an + // ExceptionHandler instance. + static bool WriteMinidump(const wstring &dump_path, + MinidumpCallback callback, void* callback_context); + + // Write a minidump of |child| immediately. This can be used to + // capture the execution state of |child| independently of a crash. + // Pass a meaningful |child_blamed_thread| to make that thread in + // the child process the one from which a crash signature is + // extracted. + static bool WriteMinidumpForChild(HANDLE child, + DWORD child_blamed_thread, + const wstring& dump_path, + MinidumpCallback callback, + void* callback_context); + + // Get the thread ID of the thread requesting the dump (either the exception + // thread or any other thread that called WriteMinidump directly). This + // may be useful if you want to include additional thread state in your + // dumps. + DWORD get_requesting_thread_id() const { return requesting_thread_id_; } + + // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. + bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } + void set_handle_debug_exceptions(bool handle_debug_exceptions) { + handle_debug_exceptions_ = handle_debug_exceptions; + } + + // Controls behavior of EXCEPTION_INVALID_HANDLE. + bool get_consume_invalid_handle_exceptions() const { + return consume_invalid_handle_exceptions_; + } + void set_consume_invalid_handle_exceptions( + bool consume_invalid_handle_exceptions) { + consume_invalid_handle_exceptions_ = consume_invalid_handle_exceptions; + } + + // Returns whether out-of-process dump generation is used or not. + bool IsOutOfProcess() const { return crash_generation_client_.get() != NULL; } + + // Calling RegisterAppMemory(p, len) causes len bytes starting + // at address p to be copied to the minidump when a crash happens. + void RegisterAppMemory(void* ptr, size_t length); + void UnregisterAppMemory(void* ptr); + + private: + friend class AutoExceptionHandler; + + // Initializes the instance with given values. + void Initialize(const wstring& dump_path, + FilterCallback filter, + MinidumpCallback callback, + void* callback_context, + int handler_types, + MINIDUMP_TYPE dump_type, + const wchar_t* pipe_name, + HANDLE pipe_handle, + CrashGenerationClient* crash_generation_client, + const CustomClientInfo* custom_info); + + // Function pointer type for MiniDumpWriteDump, which is looked up + // dynamically. + typedef BOOL (WINAPI *MiniDumpWriteDump_type)( + HANDLE hProcess, + DWORD dwPid, + HANDLE hFile, + MINIDUMP_TYPE DumpType, + CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, + CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, + CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); + + // Function pointer type for UuidCreate, which is looked up dynamically. + typedef RPC_STATUS (RPC_ENTRY *UuidCreate_type)(UUID* Uuid); + + // Runs the main loop for the exception handler thread. + static DWORD WINAPI ExceptionHandlerThreadMain(void* lpParameter); + + // Called on the exception thread when an unhandled exception occurs. + // Signals the exception handler thread to handle the exception. + static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo); + +#if _MSC_VER >= 1400 // MSVC 2005/8 + // This function will be called by some CRT functions when they detect + // that they were passed an invalid parameter. Note that in _DEBUG builds, + // the CRT may display an assertion dialog before calling this function, + // and the function will not be called unless the assertion dialog is + // dismissed by clicking "Ignore." + static void HandleInvalidParameter(const wchar_t* expression, + const wchar_t* function, + const wchar_t* file, + unsigned int line, + uintptr_t reserved); +#endif // _MSC_VER >= 1400 + + // This function will be called by the CRT when a pure virtual + // function is called. + static void HandlePureVirtualCall(); + + // This is called on the exception thread or on another thread that + // the user wishes to produce a dump from. It calls + // WriteMinidumpWithException on the handler thread, avoiding stack + // overflows and inconsistent dumps due to writing the dump from + // the exception thread. If the dump is requested as a result of an + // exception, exinfo contains exception information, otherwise, it + // is NULL. If the dump is requested as a result of an assertion + // (such as an invalid parameter being passed to a CRT function), + // assertion contains data about the assertion, otherwise, it is NULL. + bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion); + + // This function is called on the handler thread. It calls into + // WriteMinidumpWithExceptionForProcess() with a handle to the + // current process. requesting_thread_id is the ID of the thread + // that requested the dump. If the dump is requested as a result of + // an exception, exinfo contains exception information, otherwise, + // it is NULL. + bool WriteMinidumpWithException(DWORD requesting_thread_id, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion); + + // This function is used as a callback when calling MinidumpWriteDump, + // in order to add additional memory regions to the dump. + static BOOL CALLBACK MinidumpWriteDumpCallback( + PVOID context, + const PMINIDUMP_CALLBACK_INPUT callback_input, + PMINIDUMP_CALLBACK_OUTPUT callback_output); + + // This function does the actual writing of a minidump. It is + // called on the handler thread. requesting_thread_id is the ID of + // the thread that requested the dump, if that information is + // meaningful. If the dump is requested as a result of an + // exception, exinfo contains exception information, otherwise, it + // is NULL. process is the one that will be dumped. If + // requesting_thread_id is meaningful and should be added to the + // minidump, write_requester_stream is |true|. + bool WriteMinidumpWithExceptionForProcess(DWORD requesting_thread_id, + EXCEPTION_POINTERS* exinfo, + MDRawAssertionInfo* assertion, + HANDLE process, + bool write_requester_stream); + + // Generates a new ID and stores it in next_minidump_id_, and stores the + // path of the next minidump to be written in next_minidump_path_. + void UpdateNextID(); + + FilterCallback filter_; + MinidumpCallback callback_; + void* callback_context_; + + scoped_ptr crash_generation_client_; + + // The directory in which a minidump will be written, set by the dump_path + // argument to the constructor, or set_dump_path. + wstring dump_path_; + + // The basename of the next minidump to be written, without the extension. + wstring next_minidump_id_; + + // The full pathname of the next minidump to be written, including the file + // extension. + wstring next_minidump_path_; + + // Pointers to C-string representations of the above. These are set when + // the above wstring versions are set in order to avoid calling c_str during + // an exception, as c_str may attempt to allocate heap memory. These + // pointers are not owned by the ExceptionHandler object, but their lifetimes + // should be equivalent to the lifetimes of the associated wstring, provided + // that the wstrings are not altered. + const wchar_t* dump_path_c_; + const wchar_t* next_minidump_id_c_; + const wchar_t* next_minidump_path_c_; + + HMODULE dbghelp_module_; + MiniDumpWriteDump_type minidump_write_dump_; + MINIDUMP_TYPE dump_type_; + + HMODULE rpcrt4_module_; + UuidCreate_type uuid_create_; + + // Tracks the handler types that were installed according to the + // handler_types constructor argument. + int handler_types_; + + // When installed_handler_ is true, previous_filter_ is the unhandled + // exception filter that was set prior to installing ExceptionHandler as + // the unhandled exception filter and pointing it to |this|. NULL indicates + // that there is no previous unhandled exception filter. + LPTOP_LEVEL_EXCEPTION_FILTER previous_filter_; + +#if _MSC_VER >= 1400 // MSVC 2005/8 + // Beginning in VC 8, the CRT provides an invalid parameter handler that will + // be called when some CRT functions are passed invalid parameters. In + // earlier CRTs, the same conditions would cause unexpected behavior or + // crashes. + _invalid_parameter_handler previous_iph_; +#endif // _MSC_VER >= 1400 + + // The CRT allows you to override the default handler for pure + // virtual function calls. + _purecall_handler previous_pch_; + + // The exception handler thread. + HANDLE handler_thread_; + + // True if the exception handler is being destroyed. + // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars. + // It has release semantics on write and acquire semantics on reads. + // See the msdn documentation. + volatile bool is_shutdown_; + + // The critical section enforcing the requirement that only one exception be + // handled by a handler at a time. + CRITICAL_SECTION handler_critical_section_; + + // Semaphores used to move exception handling between the exception thread + // and the handler thread. handler_start_semaphore_ is signalled by the + // exception thread to wake up the handler thread when an exception occurs. + // handler_finish_semaphore_ is signalled by the handler thread to wake up + // the exception thread when handling is complete. + HANDLE handler_start_semaphore_; + HANDLE handler_finish_semaphore_; + + // The next 2 fields contain data passed from the requesting thread to + // the handler thread. + + // The thread ID of the thread requesting the dump (either the exception + // thread or any other thread that called WriteMinidump directly). + DWORD requesting_thread_id_; + + // The exception info passed to the exception handler on the exception + // thread, if an exception occurred. NULL for user-requested dumps. + EXCEPTION_POINTERS* exception_info_; + + // If the handler is invoked due to an assertion, this will contain a + // pointer to the assertion information. It is NULL at other times. + MDRawAssertionInfo* assertion_; + + // The return value of the handler, passed from the handler thread back to + // the requesting thread. + bool handler_return_value_; + + // If true, the handler will intercept EXCEPTION_BREAKPOINT and + // EXCEPTION_SINGLE_STEP exceptions. Leave this false (the default) + // to not interfere with debuggers. + bool handle_debug_exceptions_; + + // If true, the handler will consume any EXCEPTION_INVALID_HANDLE exceptions. + // Leave this false (the default) to handle these exceptions as normal. + bool consume_invalid_handle_exceptions_; + + // Callers can request additional memory regions to be included in + // the dump. + AppMemoryList app_memory_info_; + + // A stack of ExceptionHandler objects that have installed unhandled + // exception filters. This vector is used by HandleException to determine + // which ExceptionHandler object to route an exception to. When an + // ExceptionHandler is created with install_handler true, it will append + // itself to this list. + static vector* handler_stack_; + + // The index of the ExceptionHandler in handler_stack_ that will handle the + // next exception. Note that 0 means the last entry in handler_stack_, 1 + // means the next-to-last entry, and so on. This is used by HandleException + // to support multiple stacked Breakpad handlers. + static LONG handler_stack_index_; + + // handler_stack_critical_section_ guards operations on handler_stack_ and + // handler_stack_index_. The critical section is initialized by the + // first instance of the class and destroyed by the last instance of it. + static CRITICAL_SECTION handler_stack_critical_section_; + + // The number of instances of this class. + static volatile LONG instance_count_; + + // disallow copy ctor and operator= + explicit ExceptionHandler(const ExceptionHandler &); + void operator=(const ExceptionHandler &); +}; + +} // namespace google_breakpad + +#pragma warning(pop) + +#endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/Telegram/ThirdParty/breakpad/common/scoped_ptr.h b/Telegram/ThirdParty/breakpad/common/scoped_ptr.h new file mode 100644 index 00000000000000..d137c186811cc5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/scoped_ptr.h @@ -0,0 +1,404 @@ +// Copyright 2013 Google Inc. All Rights Reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Scopers help you manage ownership of a pointer, helping you easily manage the +// a pointer within a scope, and automatically destroying the pointer at the +// end of a scope. There are two main classes you will use, which correspond +// to the operators new/delete and new[]/delete[]. +// +// Example usage (scoped_ptr): +// { +// scoped_ptr foo(new Foo("wee")); +// } // foo goes out of scope, releasing the pointer with it. +// +// { +// scoped_ptr foo; // No pointer managed. +// foo.reset(new Foo("wee")); // Now a pointer is managed. +// foo.reset(new Foo("wee2")); // Foo("wee") was destroyed. +// foo.reset(new Foo("wee3")); // Foo("wee2") was destroyed. +// foo->Method(); // Foo::Method() called. +// foo.get()->Method(); // Foo::Method() called. +// SomeFunc(foo.release()); // SomeFunc takes ownership, foo no longer +// // manages a pointer. +// foo.reset(new Foo("wee4")); // foo manages a pointer again. +// foo.reset(); // Foo("wee4") destroyed, foo no longer +// // manages a pointer. +// } // foo wasn't managing a pointer, so nothing was destroyed. +// +// Example usage (scoped_array): +// { +// scoped_array foo(new Foo[100]); +// foo.get()->Method(); // Foo::Method on the 0th element. +// foo[10].Method(); // Foo::Method on the 10th element. +// } + +#ifndef COMMON_SCOPED_PTR_H_ +#define COMMON_SCOPED_PTR_H_ + +// This is an implementation designed to match the anticipated future TR2 +// implementation of the scoped_ptr class, and its closely-related brethren, +// scoped_array, scoped_ptr_malloc. + +#include +#include +#include + +namespace google_breakpad { + +// A scoped_ptr is like a T*, except that the destructor of scoped_ptr +// automatically deletes the pointer it holds (if any). +// That is, scoped_ptr owns the T object that it points to. +// Like a T*, a scoped_ptr may hold either NULL or a pointer to a T object. +// Also like T*, scoped_ptr is thread-compatible, and once you +// dereference it, you get the threadsafety guarantees of T. +// +// The size of a scoped_ptr is small: +// sizeof(scoped_ptr) == sizeof(C*) +template +class scoped_ptr { + public: + + // The element type + typedef C element_type; + + // Constructor. Defaults to initializing with NULL. + // There is no way to create an uninitialized scoped_ptr. + // The input parameter must be allocated with new. + explicit scoped_ptr(C* p = NULL) : ptr_(p) { } + + // Destructor. If there is a C object, delete it. + // We don't need to test ptr_ == NULL because C++ does that for us. + ~scoped_ptr() { + enum { type_must_be_complete = sizeof(C) }; + delete ptr_; + } + + // Reset. Deletes the current owned object, if any. + // Then takes ownership of a new object, if given. + // this->reset(this->get()) works. + void reset(C* p = NULL) { + if (p != ptr_) { + enum { type_must_be_complete = sizeof(C) }; + delete ptr_; + ptr_ = p; + } + } + + // Accessors to get the owned object. + // operator* and operator-> will assert() if there is no current object. + C& operator*() const { + assert(ptr_ != NULL); + return *ptr_; + } + C* operator->() const { + assert(ptr_ != NULL); + return ptr_; + } + C* get() const { return ptr_; } + + // Comparison operators. + // These return whether two scoped_ptr refer to the same object, not just to + // two different but equal objects. + bool operator==(C* p) const { return ptr_ == p; } + bool operator!=(C* p) const { return ptr_ != p; } + + // Swap two scoped pointers. + void swap(scoped_ptr& p2) { + C* tmp = ptr_; + ptr_ = p2.ptr_; + p2.ptr_ = tmp; + } + + // Release a pointer. + // The return value is the current pointer held by this object. + // If this object holds a NULL pointer, the return value is NULL. + // After this operation, this object will hold a NULL pointer, + // and will not own the object any more. + C* release() { + C* retVal = ptr_; + ptr_ = NULL; + return retVal; + } + + private: + C* ptr_; + + // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't + // make sense, and if C2 == C, it still doesn't make sense because you should + // never have the same object owned by two different scoped_ptrs. + template bool operator==(scoped_ptr const& p2) const; + template bool operator!=(scoped_ptr const& p2) const; + + // Disallow evil constructors + scoped_ptr(const scoped_ptr&); + void operator=(const scoped_ptr&); +}; + +// Free functions +template +void swap(scoped_ptr& p1, scoped_ptr& p2) { + p1.swap(p2); +} + +template +bool operator==(C* p1, const scoped_ptr& p2) { + return p1 == p2.get(); +} + +template +bool operator!=(C* p1, const scoped_ptr& p2) { + return p1 != p2.get(); +} + +// scoped_array is like scoped_ptr, except that the caller must allocate +// with new [] and the destructor deletes objects with delete []. +// +// As with scoped_ptr, a scoped_array either points to an object +// or is NULL. A scoped_array owns the object that it points to. +// scoped_array is thread-compatible, and once you index into it, +// the returned objects have only the threadsafety guarantees of T. +// +// Size: sizeof(scoped_array) == sizeof(C*) +template +class scoped_array { + public: + + // The element type + typedef C element_type; + + // Constructor. Defaults to intializing with NULL. + // There is no way to create an uninitialized scoped_array. + // The input parameter must be allocated with new []. + explicit scoped_array(C* p = NULL) : array_(p) { } + + // Destructor. If there is a C object, delete it. + // We don't need to test ptr_ == NULL because C++ does that for us. + ~scoped_array() { + enum { type_must_be_complete = sizeof(C) }; + delete[] array_; + } + + // Reset. Deletes the current owned object, if any. + // Then takes ownership of a new object, if given. + // this->reset(this->get()) works. + void reset(C* p = NULL) { + if (p != array_) { + enum { type_must_be_complete = sizeof(C) }; + delete[] array_; + array_ = p; + } + } + + // Get one element of the current object. + // Will assert() if there is no current object, or index i is negative. + C& operator[](ptrdiff_t i) const { + assert(i >= 0); + assert(array_ != NULL); + return array_[i]; + } + + // Get a pointer to the zeroth element of the current object. + // If there is no current object, return NULL. + C* get() const { + return array_; + } + + // Comparison operators. + // These return whether two scoped_array refer to the same object, not just to + // two different but equal objects. + bool operator==(C* p) const { return array_ == p; } + bool operator!=(C* p) const { return array_ != p; } + + // Swap two scoped arrays. + void swap(scoped_array& p2) { + C* tmp = array_; + array_ = p2.array_; + p2.array_ = tmp; + } + + // Release an array. + // The return value is the current pointer held by this object. + // If this object holds a NULL pointer, the return value is NULL. + // After this operation, this object will hold a NULL pointer, + // and will not own the object any more. + C* release() { + C* retVal = array_; + array_ = NULL; + return retVal; + } + + private: + C* array_; + + // Forbid comparison of different scoped_array types. + template bool operator==(scoped_array const& p2) const; + template bool operator!=(scoped_array const& p2) const; + + // Disallow evil constructors + scoped_array(const scoped_array&); + void operator=(const scoped_array&); +}; + +// Free functions +template +void swap(scoped_array& p1, scoped_array& p2) { + p1.swap(p2); +} + +template +bool operator==(C* p1, const scoped_array& p2) { + return p1 == p2.get(); +} + +template +bool operator!=(C* p1, const scoped_array& p2) { + return p1 != p2.get(); +} + +// This class wraps the c library function free() in a class that can be +// passed as a template argument to scoped_ptr_malloc below. +class ScopedPtrMallocFree { + public: + inline void operator()(void* x) const { + free(x); + } +}; + +// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a +// second template argument, the functor used to free the object. + +template +class scoped_ptr_malloc { + public: + + // The element type + typedef C element_type; + + // Constructor. Defaults to initializing with NULL. + // There is no way to create an uninitialized scoped_ptr. + // The input parameter must be allocated with an allocator that matches the + // Free functor. For the default Free functor, this is malloc, calloc, or + // realloc. + explicit scoped_ptr_malloc(C* p = NULL): ptr_(p) {} + + // Destructor. If there is a C object, call the Free functor. + ~scoped_ptr_malloc() { + reset(); + } + + // Reset. Calls the Free functor on the current owned object, if any. + // Then takes ownership of a new object, if given. + // this->reset(this->get()) works. + void reset(C* p = NULL) { + if (ptr_ != p) { + FreeProc free_proc; + free_proc(ptr_); + ptr_ = p; + } + } + + // Get the current object. + // operator* and operator-> will cause an assert() failure if there is + // no current object. + C& operator*() const { + assert(ptr_ != NULL); + return *ptr_; + } + + C* operator->() const { + assert(ptr_ != NULL); + return ptr_; + } + + C* get() const { + return ptr_; + } + + // Comparison operators. + // These return whether a scoped_ptr_malloc and a plain pointer refer + // to the same object, not just to two different but equal objects. + // For compatibility with the boost-derived implementation, these + // take non-const arguments. + bool operator==(C* p) const { + return ptr_ == p; + } + + bool operator!=(C* p) const { + return ptr_ != p; + } + + // Swap two scoped pointers. + void swap(scoped_ptr_malloc & b) { + C* tmp = b.ptr_; + b.ptr_ = ptr_; + ptr_ = tmp; + } + + // Release a pointer. + // The return value is the current pointer held by this object. + // If this object holds a NULL pointer, the return value is NULL. + // After this operation, this object will hold a NULL pointer, + // and will not own the object any more. + C* release() { + C* tmp = ptr_; + ptr_ = NULL; + return tmp; + } + + private: + C* ptr_; + + // no reason to use these: each scoped_ptr_malloc should have its own object + template + bool operator==(scoped_ptr_malloc const& p) const; + template + bool operator!=(scoped_ptr_malloc const& p) const; + + // Disallow evil constructors + scoped_ptr_malloc(const scoped_ptr_malloc&); + void operator=(const scoped_ptr_malloc&); +}; + +template inline +void swap(scoped_ptr_malloc& a, scoped_ptr_malloc& b) { + a.swap(b); +} + +template inline +bool operator==(C* p, const scoped_ptr_malloc& b) { + return p == b.get(); +} + +template inline +bool operator!=(C* p, const scoped_ptr_malloc& b) { + return p != b.get(); +} + +} // namespace google_breakpad + +#endif // COMMON_SCOPED_PTR_H_ diff --git a/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc b/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc new file mode 100644 index 00000000000000..b7f877e66e7e55 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc @@ -0,0 +1,76 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// guid_string.cc: Convert GUIDs to strings. +// +// See guid_string.h for documentation. + +#include + +#include "common/windows/string_utils-inl.h" + +#include "common/windows/guid_string.h" + +namespace google_breakpad { + +// static +wstring GUIDString::GUIDToWString(GUID *guid) { + wchar_t guid_string[37]; + swprintf( + guid_string, sizeof(guid_string) / sizeof(guid_string[0]), + L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], + guid->Data4[3], guid->Data4[4], guid->Data4[5], + guid->Data4[6], guid->Data4[7]); + + // remove when VC++7.1 is no longer supported + guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; + + return wstring(guid_string); +} + +// static +wstring GUIDString::GUIDToSymbolServerWString(GUID *guid) { + wchar_t guid_string[33]; + swprintf( + guid_string, sizeof(guid_string) / sizeof(guid_string[0]), + L"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X", + guid->Data1, guid->Data2, guid->Data3, + guid->Data4[0], guid->Data4[1], guid->Data4[2], + guid->Data4[3], guid->Data4[4], guid->Data4[5], + guid->Data4[6], guid->Data4[7]); + + // remove when VC++7.1 is no longer supported + guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; + + return wstring(guid_string); +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/windows/guid_string.h b/Telegram/ThirdParty/breakpad/common/windows/guid_string.h new file mode 100644 index 00000000000000..48a5c1d3708f93 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/windows/guid_string.h @@ -0,0 +1,58 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// guid_string.cc: Convert GUIDs to strings. + +#ifndef COMMON_WINDOWS_GUID_STRING_H_ +#define COMMON_WINDOWS_GUID_STRING_H_ + +#include + +#include + +namespace google_breakpad { + +using std::wstring; + +class GUIDString { + public: + // Converts guid to a string in the format recommended by RFC 4122 and + // returns the string. + static wstring GUIDToWString(GUID *guid); + + // Converts guid to a string formatted as uppercase hexadecimal, with + // no separators, and returns the string. This is the format used for + // symbol server identifiers, although identifiers have an age tacked + // on to the string. + static wstring GUIDToSymbolServerWString(GUID *guid); +}; + +} // namespace google_breakpad + +#endif // COMMON_WINDOWS_GUID_STRING_H_ diff --git a/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h b/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h new file mode 100644 index 00000000000000..9b636072681ada --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h @@ -0,0 +1,142 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// string_utils-inl.h: Safer string manipulation on Windows, supporting +// pre-MSVC8 environments. + +#ifndef COMMON_WINDOWS_STRING_UTILS_INL_H_ +#define COMMON_WINDOWS_STRING_UTILS_INL_H_ + +#include +#include + +#include + +// The "ll" printf format size specifier corresponding to |long long| was +// intrudced in MSVC8. Earlier versions did not provide this size specifier, +// but "I64" can be used to print 64-bit types. Don't use "I64" where "ll" +// is available, in the event of oddball systems where |long long| is not +// 64 bits wide. +#if _MSC_VER >= 1400 // MSVC 2005/8 +#define WIN_STRING_FORMAT_LL "ll" +#else // MSC_VER >= 1400 +#define WIN_STRING_FORMAT_LL "I64" +#endif // MSC_VER >= 1400 + +// A nonconforming version of swprintf, without the length argument, was +// included with the CRT prior to MSVC8. Although a conforming version was +// also available via an overload, it is not reliably chosen. _snwprintf +// behaves as a standards-confirming swprintf should, so force the use of +// _snwprintf when using older CRTs. +#if _MSC_VER < 1400 // MSVC 2005/8 +#define swprintf _snwprintf +#else +// For MSVC8 and newer, swprintf_s is the recommended method. Conveniently, +// it takes the same argument list as swprintf. +#define swprintf swprintf_s +#endif // MSC_VER < 1400 + +namespace google_breakpad { + +using std::string; +using std::wstring; + +class WindowsStringUtils { + public: + // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does + // not fail if source is longer than destination_size. The destination + // buffer is always 0-terminated. + static void safe_wcscpy(wchar_t *destination, size_t destination_size, + const wchar_t *source); + + // Roughly equivalent to MSVC8's wcsncpy_s, except that _TRUNCATE cannot + // be passed directly, and pre-MSVC8, this will not fail if source or count + // are longer than destination_size. The destination buffer is always + // 0-terminated. + static void safe_wcsncpy(wchar_t *destination, size_t destination_size, + const wchar_t *source, size_t count); + + // Performs multi-byte to wide character conversion on C++ strings, using + // mbstowcs_s (MSVC8) or mbstowcs (pre-MSVC8). Returns false on failure, + // without setting wcs. + static bool safe_mbstowcs(const string &mbs, wstring *wcs); + + // The inverse of safe_mbstowcs. + static bool safe_wcstombs(const wstring &wcs, string *mbs); + + // Returns the base name of a file, e.g. strips off the path. + static wstring GetBaseName(const wstring &filename); + + private: + // Disallow instantiation and other object-based operations. + WindowsStringUtils(); + WindowsStringUtils(const WindowsStringUtils&); + ~WindowsStringUtils(); + void operator=(const WindowsStringUtils&); +}; + +// static +inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination, + size_t destination_size, + const wchar_t *source) { +#if _MSC_VER >= 1400 // MSVC 2005/8 + wcscpy_s(destination, destination_size, source); +#else // _MSC_VER >= 1400 + // Pre-MSVC 2005/8 doesn't have wcscpy_s. Simulate it with wcsncpy. + // wcsncpy doesn't 0-terminate the destination buffer if the source string + // is longer than size. Ensure that the destination is 0-terminated. + wcsncpy(destination, source, destination_size); + if (destination && destination_size) + destination[destination_size - 1] = 0; +#endif // _MSC_VER >= 1400 +} + +// static +inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination, + size_t destination_size, + const wchar_t *source, + size_t count) { +#if _MSC_VER >= 1400 // MSVC 2005/8 + wcsncpy_s(destination, destination_size, source, count); +#else // _MSC_VER >= 1400 + // Pre-MSVC 2005/8 doesn't have wcsncpy_s. Simulate it with wcsncpy. + // wcsncpy doesn't 0-terminate the destination buffer if the source string + // is longer than size. Ensure that the destination is 0-terminated. + if (destination_size < count) + count = destination_size; + + wcsncpy(destination, source, count); + if (destination && count) + destination[count - 1] = 0; +#endif // _MSC_VER >= 1400 +} + +} // namespace google_breakpad + +#endif // COMMON_WINDOWS_STRING_UTILS_INL_H_ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h new file mode 100644 index 00000000000000..d8828043ff382b --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h @@ -0,0 +1,68 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* breakpad_types.h: Precise-width types + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file ensures that types uintN_t are defined for N = 8, 16, 32, and + * 64. Types of precise widths are crucial to the task of writing data + * structures on one platform and reading them on another. + * + * Author: Mark Mentovai */ + +#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ +#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ + +#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && \ + !defined(__STDC_FORMAT_MACROS) +#error "inttypes.h has already been included before this header file, but " +#error "without __STDC_FORMAT_MACROS defined." +#endif + +#ifndef __STDC_FORMAT_MACROS +#define __STDC_FORMAT_MACROS +#endif /* __STDC_FORMAT_MACROS */ +#include + +typedef struct { + uint64_t high; + uint64_t low; +} uint128_struct; + +typedef uint64_t breakpad_time_t; + +/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to + * llx, which is the format string for "long long" - this is a 64-bit + * integral type on many systems. */ +#ifndef PRIx64 +#define PRIx64 "llx" +#endif /* !PRIx64 */ + +#endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h new file mode 100644 index 00000000000000..4256706d77978f --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h @@ -0,0 +1,235 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on amd64. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by ensuring + * ensuring that all members are aligned on their natural boundaries. In + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Mark Mentovai + * Change to split into its own file: Neal Sidhwaney */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ + + +/* + * AMD64 support, see WINNT.H + */ + +typedef struct { + uint16_t control_word; + uint16_t status_word; + uint8_t tag_word; + uint8_t reserved1; + uint16_t error_opcode; + uint32_t error_offset; + uint16_t error_selector; + uint16_t reserved2; + uint32_t data_offset; + uint16_t data_selector; + uint16_t reserved3; + uint32_t mx_csr; + uint32_t mx_csr_mask; + uint128_struct float_registers[8]; + uint128_struct xmm_registers[16]; + uint8_t reserved4[96]; +} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */ + +#define MD_CONTEXT_AMD64_VR_COUNT 26 + +typedef struct { + /* + * Register parameter home addresses. + */ + uint64_t p1_home; + uint64_t p2_home; + uint64_t p3_home; + uint64_t p4_home; + uint64_t p5_home; + uint64_t p6_home; + + /* The next field determines the layout of the structure, and which parts + * of it are populated */ + uint32_t context_flags; + uint32_t mx_csr; + + /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ + uint16_t cs; + + /* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */ + uint16_t ds; + uint16_t es; + uint16_t fs; + uint16_t gs; + + /* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */ + uint16_t ss; + uint32_t eflags; + + /* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ + uint64_t dr0; + uint64_t dr1; + uint64_t dr2; + uint64_t dr3; + uint64_t dr6; + uint64_t dr7; + + /* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */ + uint64_t rax; + uint64_t rcx; + uint64_t rdx; + uint64_t rbx; + + /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ + uint64_t rsp; + + /* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */ + uint64_t rbp; + uint64_t rsi; + uint64_t rdi; + uint64_t r8; + uint64_t r9; + uint64_t r10; + uint64_t r11; + uint64_t r12; + uint64_t r13; + uint64_t r14; + uint64_t r15; + + /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ + uint64_t rip; + + /* The next set of registers are included with + * MD_CONTEXT_AMD64_FLOATING_POINT + */ + union { + MDXmmSaveArea32AMD64 flt_save; + struct { + uint128_struct header[2]; + uint128_struct legacy[8]; + uint128_struct xmm0; + uint128_struct xmm1; + uint128_struct xmm2; + uint128_struct xmm3; + uint128_struct xmm4; + uint128_struct xmm5; + uint128_struct xmm6; + uint128_struct xmm7; + uint128_struct xmm8; + uint128_struct xmm9; + uint128_struct xmm10; + uint128_struct xmm11; + uint128_struct xmm12; + uint128_struct xmm13; + uint128_struct xmm14; + uint128_struct xmm15; + } sse_registers; + }; + + uint128_struct vector_register[MD_CONTEXT_AMD64_VR_COUNT]; + uint64_t vector_control; + + /* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ + uint64_t debug_control; + uint64_t last_branch_to_rip; + uint64_t last_branch_from_rip; + uint64_t last_exception_to_rip; + uint64_t last_exception_from_rip; + +} MDRawContextAMD64; /* CONTEXT */ + +/* For (MDRawContextAMD64).context_flags. These values indicate the type of + * context stored in the structure. The high 24 bits identify the CPU, the + * low 8 bits identify the type of context saved. */ +#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */ +#define MD_CONTEXT_AMD64_CONTROL (MD_CONTEXT_AMD64 | 0x00000001) + /* CONTEXT_CONTROL */ +#define MD_CONTEXT_AMD64_INTEGER (MD_CONTEXT_AMD64 | 0x00000002) + /* CONTEXT_INTEGER */ +#define MD_CONTEXT_AMD64_SEGMENTS (MD_CONTEXT_AMD64 | 0x00000004) + /* CONTEXT_SEGMENTS */ +#define MD_CONTEXT_AMD64_FLOATING_POINT (MD_CONTEXT_AMD64 | 0x00000008) + /* CONTEXT_FLOATING_POINT */ +#define MD_CONTEXT_AMD64_DEBUG_REGISTERS (MD_CONTEXT_AMD64 | 0x00000010) + /* CONTEXT_DEBUG_REGISTERS */ +#define MD_CONTEXT_AMD64_XSTATE (MD_CONTEXT_AMD64 | 0x00000040) + /* CONTEXT_XSTATE */ + +/* WinNT.h refers to CONTEXT_MMX_REGISTERS but doesn't appear to define it + * I think it really means CONTEXT_FLOATING_POINT. + */ + +#define MD_CONTEXT_AMD64_FULL (MD_CONTEXT_AMD64_CONTROL | \ + MD_CONTEXT_AMD64_INTEGER | \ + MD_CONTEXT_AMD64_FLOATING_POINT) + /* CONTEXT_FULL */ + +#define MD_CONTEXT_AMD64_ALL (MD_CONTEXT_AMD64_FULL | \ + MD_CONTEXT_AMD64_SEGMENTS | \ + MD_CONTEXT_X86_DEBUG_REGISTERS) + /* CONTEXT_ALL */ + + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h new file mode 100644 index 00000000000000..6a71138337b6d8 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h @@ -0,0 +1,151 @@ +/* Copyright (c) 2009, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on ARM. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by + * ensuring that all members are aligned on their natural boundaries. + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. + * + * Author: Julian Seward + */ + +/* + * ARM support + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ + +#define MD_FLOATINGSAVEAREA_ARM_FPR_COUNT 32 +#define MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT 8 + +/* + * Note that these structures *do not* map directly to the CONTEXT + * structure defined in WinNT.h in the Windows Mobile SDK. That structure + * does not accomodate VFPv3, and I'm unsure if it was ever used in the + * wild anyway, as Windows CE only seems to produce "cedumps" which + * are not exactly minidumps. + */ +typedef struct { + uint64_t fpscr; /* FPU status register */ + + /* 32 64-bit floating point registers, d0 .. d31. */ + uint64_t regs[MD_FLOATINGSAVEAREA_ARM_FPR_COUNT]; + + /* Miscellaneous control words */ + uint32_t extra[MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT]; +} MDFloatingSaveAreaARM; + +#define MD_CONTEXT_ARM_GPR_COUNT 16 + +typedef struct { + /* The next field determines the layout of the structure, and which parts + * of it are populated + */ + uint32_t context_flags; + + /* 16 32-bit integer registers, r0 .. r15 + * Note the following fixed uses: + * r13 is the stack pointer + * r14 is the link register + * r15 is the program counter + */ + uint32_t iregs[MD_CONTEXT_ARM_GPR_COUNT]; + + /* CPSR (flags, basically): 32 bits: + bit 31 - N (negative) + bit 30 - Z (zero) + bit 29 - C (carry) + bit 28 - V (overflow) + bit 27 - Q (saturation flag, sticky) + All other fields -- ignore */ + uint32_t cpsr; + + /* The next field is included with MD_CONTEXT_ARM_FLOATING_POINT */ + MDFloatingSaveAreaARM float_save; + +} MDRawContextARM; + +/* Indices into iregs for registers with a dedicated or conventional + * purpose. + */ +enum MDARMRegisterNumbers { + MD_CONTEXT_ARM_REG_IOS_FP = 7, + MD_CONTEXT_ARM_REG_FP = 11, + MD_CONTEXT_ARM_REG_SP = 13, + MD_CONTEXT_ARM_REG_LR = 14, + MD_CONTEXT_ARM_REG_PC = 15 +}; + +/* For (MDRawContextARM).context_flags. These values indicate the type of + * context stored in the structure. */ +/* CONTEXT_ARM from the Windows CE 5.0 SDK. This value isn't correct + * because this bit can be used for flags. Presumably this value was + * never actually used in minidumps, but only in "CEDumps" which + * are a whole parallel minidump file format for Windows CE. + * Therefore, Breakpad defines its own value for ARM CPUs. + */ +#define MD_CONTEXT_ARM_OLD 0x00000040 +/* This value was chosen to avoid likely conflicts with MD_CONTEXT_* + * for other CPUs. */ +#define MD_CONTEXT_ARM 0x40000000 +#define MD_CONTEXT_ARM_INTEGER (MD_CONTEXT_ARM | 0x00000002) +#define MD_CONTEXT_ARM_FLOATING_POINT (MD_CONTEXT_ARM | 0x00000004) + +#define MD_CONTEXT_ARM_FULL (MD_CONTEXT_ARM_INTEGER | \ + MD_CONTEXT_ARM_FLOATING_POINT) + +#define MD_CONTEXT_ARM_ALL (MD_CONTEXT_ARM_INTEGER | \ + MD_CONTEXT_ARM_FLOATING_POINT) + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h new file mode 100644 index 00000000000000..5ace0d9de470c9 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h @@ -0,0 +1,140 @@ +/* Copyright 2013 Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on ARM. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by + * ensuring that all members are aligned on their natural boundaries. + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. + * + * Author: Colin Blundell + */ + +/* + * ARM64 support + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ + +#define MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT 32 + +typedef struct { + uint32_t fpsr; /* FPU status register */ + uint32_t fpcr; /* FPU control register */ + + /* 32 128-bit floating point registers, d0 .. d31. */ + uint128_struct regs[MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT]; +} MDFloatingSaveAreaARM64; + +#define MD_CONTEXT_ARM64_GPR_COUNT 33 + +/* Use the same 32-bit alignment when accessing this structure from 64-bit code + * as is used natively in 32-bit code. */ +#pragma pack(push, 4) + +typedef struct { + /* The next field determines the layout of the structure, and which parts + * of it are populated + */ + uint64_t context_flags; + + /* 33 64-bit integer registers, x0 .. x31 + the PC + * Note the following fixed uses: + * x29 is the frame pointer + * x30 is the link register + * x31 is the stack pointer + * The PC is effectively x32. + */ + uint64_t iregs[MD_CONTEXT_ARM64_GPR_COUNT]; + + /* CPSR (flags, basically): 32 bits: + bit 31 - N (negative) + bit 30 - Z (zero) + bit 29 - C (carry) + bit 28 - V (overflow) + bit 27 - Q (saturation flag, sticky) + All other fields -- ignore */ + uint32_t cpsr; + + /* The next field is included with MD_CONTEXT64_ARM_FLOATING_POINT */ + MDFloatingSaveAreaARM64 float_save; + +} MDRawContextARM64; + +#pragma pack(pop) + +/* Indices into iregs for registers with a dedicated or conventional + * purpose. + */ +enum MDARM64RegisterNumbers { + MD_CONTEXT_ARM64_REG_FP = 29, + MD_CONTEXT_ARM64_REG_LR = 30, + MD_CONTEXT_ARM64_REG_SP = 31, + MD_CONTEXT_ARM64_REG_PC = 32 +}; + +/* For (MDRawContextARM64).context_flags. These values indicate the type of + * context stored in the structure. MD_CONTEXT_ARM64 is Breakpad-defined. + * This value was chosen to avoid likely conflicts with MD_CONTEXT_* + * for other CPUs. */ +#define MD_CONTEXT_ARM64 0x80000000 +#define MD_CONTEXT_ARM64_INTEGER (MD_CONTEXT_ARM64 | 0x00000002) +#define MD_CONTEXT_ARM64_FLOATING_POINT (MD_CONTEXT_ARM64 | 0x00000004) + +#define MD_CONTEXT_ARM64_FULL (MD_CONTEXT_ARM64_INTEGER | \ + MD_CONTEXT_ARM64_FLOATING_POINT) + +#define MD_CONTEXT_ARM64_ALL (MD_CONTEXT_ARM64_INTEGER | \ + MD_CONTEXT_ARM64_FLOATING_POINT) + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h new file mode 100644 index 00000000000000..6cbe3023f9c1ce --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h @@ -0,0 +1,160 @@ +/* Copyright (c) 2013, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on MIPS. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by + * ensuring that all members are aligned on their natural boundaries. + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. + * + * Author: Chris Dearman + */ + +/* + * MIPS support + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ + +#define MD_CONTEXT_MIPS_GPR_COUNT 32 +#define MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT 32 +#define MD_CONTEXT_MIPS_DSP_COUNT 3 + +/* + * Note that these structures *do not* map directly to the CONTEXT + * structure defined in WinNT.h in the Windows Mobile SDK. That structure + * does not accomodate VFPv3, and I'm unsure if it was ever used in the + * wild anyway, as Windows CE only seems to produce "cedumps" which + * are not exactly minidumps. + */ +typedef struct { + /* 32 64-bit floating point registers, f0..f31 */ + uint64_t regs[MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT]; + + uint32_t fpcsr; /* FPU status register. */ + uint32_t fir; /* FPU implementation register. */ +} MDFloatingSaveAreaMIPS; + +typedef struct { + /* The next field determines the layout of the structure, and which parts + * of it are populated. + */ + uint32_t context_flags; + uint32_t _pad0; + + /* 32 64-bit integer registers, r0..r31. + * Note the following fixed uses: + * r29 is the stack pointer. + * r31 is the return address. + */ + uint64_t iregs[MD_CONTEXT_MIPS_GPR_COUNT]; + + /* multiply/divide result. */ + uint64_t mdhi, mdlo; + + /* DSP accumulators. */ + uint32_t hi[MD_CONTEXT_MIPS_DSP_COUNT]; + uint32_t lo[MD_CONTEXT_MIPS_DSP_COUNT]; + uint32_t dsp_control; + uint32_t _pad1; + + uint64_t epc; + uint64_t badvaddr; + uint32_t status; + uint32_t cause; + + /* The next field is included with MD_CONTEXT_MIPS_FLOATING_POINT. */ + MDFloatingSaveAreaMIPS float_save; + +} MDRawContextMIPS; + +/* Indices into iregs for registers with a dedicated or conventional + * purpose. + */ +enum MDMIPSRegisterNumbers { + MD_CONTEXT_MIPS_REG_S0 = 16, + MD_CONTEXT_MIPS_REG_S1 = 17, + MD_CONTEXT_MIPS_REG_S2 = 18, + MD_CONTEXT_MIPS_REG_S3 = 19, + MD_CONTEXT_MIPS_REG_S4 = 20, + MD_CONTEXT_MIPS_REG_S5 = 21, + MD_CONTEXT_MIPS_REG_S6 = 22, + MD_CONTEXT_MIPS_REG_S7 = 23, + MD_CONTEXT_MIPS_REG_GP = 28, + MD_CONTEXT_MIPS_REG_SP = 29, + MD_CONTEXT_MIPS_REG_FP = 30, + MD_CONTEXT_MIPS_REG_RA = 31, +}; + +/* For (MDRawContextMIPS).context_flags. These values indicate the type of + * context stored in the structure. */ +/* CONTEXT_MIPS from the Windows CE 5.0 SDK. This value isn't correct + * because this bit can be used for flags. Presumably this value was + * never actually used in minidumps, but only in "CEDumps" which + * are a whole parallel minidump file format for Windows CE. + * Therefore, Breakpad defines its own value for MIPS CPUs. + */ +#define MD_CONTEXT_MIPS 0x00040000 +#define MD_CONTEXT_MIPS_INTEGER (MD_CONTEXT_MIPS | 0x00000002) +#define MD_CONTEXT_MIPS_FLOATING_POINT (MD_CONTEXT_MIPS | 0x00000004) +#define MD_CONTEXT_MIPS_DSP (MD_CONTEXT_MIPS | 0x00000008) + +#define MD_CONTEXT_MIPS_FULL (MD_CONTEXT_MIPS_INTEGER | \ + MD_CONTEXT_MIPS_FLOATING_POINT | \ + MD_CONTEXT_MIPS_DSP) + +#define MD_CONTEXT_MIPS_ALL (MD_CONTEXT_MIPS_INTEGER | \ + MD_CONTEXT_MIPS_FLOATING_POINT \ + MD_CONTEXT_MIPS_DSP) + +#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h new file mode 100644 index 00000000000000..b24cc42438e407 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h @@ -0,0 +1,168 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on ppc. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by ensuring + * ensuring that all members are aligned on their natural boundaries. In + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Mark Mentovai + * Change to split into its own file: Neal Sidhwaney */ + +/* + * Breakpad minidump extension for PowerPC support. Based on Darwin/Mac OS X' + * mach/ppc/_types.h + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ + +#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32 + +typedef struct { + /* fpregs is a double[32] in mach/ppc/_types.h, but a uint64_t is used + * here for precise sizing. */ + uint64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT]; + uint32_t fpscr_pad; + uint32_t fpscr; /* Status/control */ +} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */ + + +#define MD_VECTORSAVEAREA_PPC_VR_COUNT 32 + +typedef struct { + /* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h + * exposes them as four 32-bit quantities. */ + uint128_struct save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT]; + uint128_struct save_vscr; /* Status/control */ + uint32_t save_pad5[4]; + uint32_t save_vrvalid; /* Indicates which vector registers are saved */ + uint32_t save_pad6[7]; +} MDVectorSaveAreaPPC; /* ppc_vector_state */ + + +#define MD_CONTEXT_PPC_GPR_COUNT 32 + +/* Use the same 32-bit alignment when accessing this structure from 64-bit code + * as is used natively in 32-bit code. #pragma pack is a MSVC extension + * supported by gcc. */ +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#pragma pack(4) +#else +#pragma pack(push, 4) +#endif + +typedef struct { + /* context_flags is not present in ppc_thread_state, but it aids + * identification of MDRawContextPPC among other raw context types, + * and it guarantees alignment when we get to float_save. */ + uint32_t context_flags; + + uint32_t srr0; /* Machine status save/restore: stores pc + * (instruction) */ + uint32_t srr1; /* Machine status save/restore: stores msr + * (ps, program/machine state) */ + /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is + * used for brevity. */ + uint32_t gpr[MD_CONTEXT_PPC_GPR_COUNT]; + uint32_t cr; /* Condition */ + uint32_t xer; /* Integer (fiXed-point) exception */ + uint32_t lr; /* Link */ + uint32_t ctr; /* Count */ + uint32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */ + uint32_t vrsave; /* Vector save */ + + /* float_save and vector_save aren't present in ppc_thread_state, but + * are represented in separate structures that still define a thread's + * context. */ + MDFloatingSaveAreaPPC float_save; + MDVectorSaveAreaPPC vector_save; +} MDRawContextPPC; /* Based on ppc_thread_state */ + +/* Indices into gpr for registers with a dedicated or conventional purpose. */ +enum MDPPCRegisterNumbers { + MD_CONTEXT_PPC_REG_SP = 1 +}; + +#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) +#pragma pack(0) +#else +#pragma pack(pop) +#endif + +/* For (MDRawContextPPC).context_flags. These values indicate the type of + * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its + * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other + * CPUs. */ +#define MD_CONTEXT_PPC 0x20000000 +#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) +#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) +#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) + +#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE +#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ + MD_CONTEXT_PPC_FLOATING_POINT | \ + MD_CONTEXT_PPC_VECTOR) + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h new file mode 100644 index 00000000000000..61f41938655e83 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h @@ -0,0 +1,134 @@ +/* Copyright (c) 2008, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on ppc64. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by ensuring + * ensuring that all members are aligned on their natural boundaries. In + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Neal Sidhwaney */ + + +/* + * Breakpad minidump extension for PPC64 support. Based on Darwin/Mac OS X' + * mach/ppc/_types.h + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ + +#include "minidump_cpu_ppc.h" + +// these types are the same in ppc64 & ppc +typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; +typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; + +#define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT + +typedef struct { + /* context_flags is not present in ppc_thread_state, but it aids + * identification of MDRawContextPPC among other raw context types, + * and it guarantees alignment when we get to float_save. */ + uint64_t context_flags; + + uint64_t srr0; /* Machine status save/restore: stores pc + * (instruction) */ + uint64_t srr1; /* Machine status save/restore: stores msr + * (ps, program/machine state) */ + /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is + * used for brevity. */ + uint64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; + uint64_t cr; /* Condition */ + uint64_t xer; /* Integer (fiXed-point) exception */ + uint64_t lr; /* Link */ + uint64_t ctr; /* Count */ + uint64_t vrsave; /* Vector save */ + + /* float_save and vector_save aren't present in ppc_thread_state, but + * are represented in separate structures that still define a thread's + * context. */ + MDFloatingSaveAreaPPC float_save; + MDVectorSaveAreaPPC vector_save; +} MDRawContextPPC64; /* Based on ppc_thread_state */ + +/* Indices into gpr for registers with a dedicated or conventional purpose. */ +enum MDPPC64RegisterNumbers { + MD_CONTEXT_PPC64_REG_SP = 1 +}; + +/* For (MDRawContextPPC).context_flags. These values indicate the type of + * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its + * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other + * CPUs. */ +#define MD_CONTEXT_PPC64 0x01000000 +#define MD_CONTEXT_PPC64_BASE (MD_CONTEXT_PPC64 | 0x00000001) +#define MD_CONTEXT_PPC64_FLOATING_POINT (MD_CONTEXT_PPC64 | 0x00000008) +#define MD_CONTEXT_PPC64_VECTOR (MD_CONTEXT_PPC64 | 0x00000020) + +#define MD_CONTEXT_PPC64_FULL MD_CONTEXT_PPC64_BASE +#define MD_CONTEXT_PPC64_ALL (MD_CONTEXT_PPC64_FULL | \ + MD_CONTEXT_PPC64_FLOATING_POINT | \ + MD_CONTEXT_PPC64_VECTOR) + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h new file mode 100644 index 00000000000000..95c08b1743e7e5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h @@ -0,0 +1,163 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on sparc. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by ensuring + * ensuring that all members are aligned on their natural boundaries. In + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Mark Mentovai + * Change to split into its own file: Neal Sidhwaney */ + +/* + * SPARC support, see (solaris)sys/procfs_isa.h also + */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ + +#define MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT 32 + +typedef struct { + + /* FPU floating point regs */ + uint64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT]; + + uint64_t filler; + uint64_t fsr; /* FPU status register */ +} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */ + +#define MD_CONTEXT_SPARC_GPR_COUNT 32 + +typedef struct { + /* The next field determines the layout of the structure, and which parts + * of it are populated + */ + uint32_t context_flags; + uint32_t flag_pad; + /* + * General register access (SPARC). + * Don't confuse definitions here with definitions in . + * Registers are 32 bits for ILP32, 64 bits for LP64. + * SPARC V7/V8 is for 32bit, SPARC V9 is for 64bit + */ + + /* 32 Integer working registers */ + + /* g_r[0-7] global registers(g0-g7) + * g_r[8-15] out registers(o0-o7) + * g_r[16-23] local registers(l0-l7) + * g_r[24-31] in registers(i0-i7) + */ + uint64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT]; + + /* several control registers */ + + /* Processor State register(PSR) for SPARC V7/V8 + * Condition Code register (CCR) for SPARC V9 + */ + uint64_t ccr; + + uint64_t pc; /* Program Counter register (PC) */ + uint64_t npc; /* Next Program Counter register (nPC) */ + uint64_t y; /* Y register (Y) */ + + /* Address Space Identifier register (ASI) for SPARC V9 + * WIM for SPARC V7/V8 + */ + uint64_t asi; + + /* Floating-Point Registers State register (FPRS) for SPARC V9 + * TBR for for SPARC V7/V8 + */ + uint64_t fprs; + + /* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */ + MDFloatingSaveAreaSPARC float_save; + +} MDRawContextSPARC; /* CONTEXT_SPARC */ + +/* Indices into g_r for registers with a dedicated or conventional purpose. */ +enum MDSPARCRegisterNumbers { + MD_CONTEXT_SPARC_REG_SP = 14 +}; + +/* For (MDRawContextSPARC).context_flags. These values indicate the type of + * context stored in the structure. MD_CONTEXT_SPARC is Breakpad-defined. Its + * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other + * CPUs. */ +#define MD_CONTEXT_SPARC 0x10000000 +#define MD_CONTEXT_SPARC_CONTROL (MD_CONTEXT_SPARC | 0x00000001) +#define MD_CONTEXT_SPARC_INTEGER (MD_CONTEXT_SPARC | 0x00000002) +#define MD_CONTEXT_SAPARC_FLOATING_POINT (MD_CONTEXT_SPARC | 0x00000004) +#define MD_CONTEXT_SAPARC_EXTRA (MD_CONTEXT_SPARC | 0x00000008) + +#define MD_CONTEXT_SPARC_FULL (MD_CONTEXT_SPARC_CONTROL | \ + MD_CONTEXT_SPARC_INTEGER) + +#define MD_CONTEXT_SPARC_ALL (MD_CONTEXT_SPARC_FULL | \ + MD_CONTEXT_SAPARC_FLOATING_POINT | \ + MD_CONTEXT_SAPARC_EXTRA) + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h new file mode 100644 index 00000000000000..e09cb7cb527ddc --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h @@ -0,0 +1,174 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * This file contains the necessary definitions to read minidump files + * produced on x86. These files may be read on any platform provided + * that the alignments of these structures on the processing system are + * identical to the alignments of these structures on the producing system. + * For this reason, precise-sized types are used. The structures defined + * by this file have been laid out to minimize alignment problems by ensuring + * ensuring that all members are aligned on their natural boundaries. In + * In some cases, tail-padding may be significant when different ABIs specify + * different tail-padding behaviors. To avoid problems when reading or + * writing affected structures, MD_*_SIZE macros are provided where needed, + * containing the useful size of the structures without padding. + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Mark Mentovai */ + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ + +#define MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE 80 + /* SIZE_OF_80387_REGISTERS */ + +typedef struct { + uint32_t control_word; + uint32_t status_word; + uint32_t tag_word; + uint32_t error_offset; + uint32_t error_selector; + uint32_t data_offset; + uint32_t data_selector; + + /* register_area contains eight 80-bit (x87 "long double") quantities for + * floating-point registers %st0 (%mm0) through %st7 (%mm7). */ + uint8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE]; + uint32_t cr0_npx_state; +} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */ + + +#define MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE 512 + /* MAXIMUM_SUPPORTED_EXTENSION */ + +typedef struct { + /* The next field determines the layout of the structure, and which parts + * of it are populated */ + uint32_t context_flags; + + /* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */ + uint32_t dr0; + uint32_t dr1; + uint32_t dr2; + uint32_t dr3; + uint32_t dr6; + uint32_t dr7; + + /* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */ + MDFloatingSaveAreaX86 float_save; + + /* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */ + uint32_t gs; + uint32_t fs; + uint32_t es; + uint32_t ds; + /* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */ + uint32_t edi; + uint32_t esi; + uint32_t ebx; + uint32_t edx; + uint32_t ecx; + uint32_t eax; + + /* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */ + uint32_t ebp; + uint32_t eip; + uint32_t cs; /* WinNT.h says "must be sanitized" */ + uint32_t eflags; /* WinNT.h says "must be sanitized" */ + uint32_t esp; + uint32_t ss; + + /* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS. + * It contains vector (MMX/SSE) registers. It it laid out in the + * format used by the fxsave and fsrstor instructions, so it includes + * a copy of the x87 floating-point registers as well. See FXSAVE in + * "Intel Architecture Software Developer's Manual, Volume 2." */ + uint8_t extended_registers[ + MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE]; +} MDRawContextX86; /* CONTEXT */ + +/* For (MDRawContextX86).context_flags. These values indicate the type of + * context stored in the structure. The high 24 bits identify the CPU, the + * low 8 bits identify the type of context saved. */ +#define MD_CONTEXT_X86 0x00010000 + /* CONTEXT_i386, CONTEXT_i486: identifies CPU */ +#define MD_CONTEXT_X86_CONTROL (MD_CONTEXT_X86 | 0x00000001) + /* CONTEXT_CONTROL */ +#define MD_CONTEXT_X86_INTEGER (MD_CONTEXT_X86 | 0x00000002) + /* CONTEXT_INTEGER */ +#define MD_CONTEXT_X86_SEGMENTS (MD_CONTEXT_X86 | 0x00000004) + /* CONTEXT_SEGMENTS */ +#define MD_CONTEXT_X86_FLOATING_POINT (MD_CONTEXT_X86 | 0x00000008) + /* CONTEXT_FLOATING_POINT */ +#define MD_CONTEXT_X86_DEBUG_REGISTERS (MD_CONTEXT_X86 | 0x00000010) + /* CONTEXT_DEBUG_REGISTERS */ +#define MD_CONTEXT_X86_EXTENDED_REGISTERS (MD_CONTEXT_X86 | 0x00000020) + /* CONTEXT_EXTENDED_REGISTERS */ +#define MD_CONTEXT_X86_XSTATE (MD_CONTEXT_X86 | 0x00000040) + /* CONTEXT_XSTATE */ + +#define MD_CONTEXT_X86_FULL (MD_CONTEXT_X86_CONTROL | \ + MD_CONTEXT_X86_INTEGER | \ + MD_CONTEXT_X86_SEGMENTS) + /* CONTEXT_FULL */ + +#define MD_CONTEXT_X86_ALL (MD_CONTEXT_X86_FULL | \ + MD_CONTEXT_X86_FLOATING_POINT | \ + MD_CONTEXT_X86_DEBUG_REGISTERS | \ + MD_CONTEXT_X86_EXTENDED_REGISTERS) + /* CONTEXT_ALL */ + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h new file mode 100644 index 00000000000000..9e7e4f1e12ae2b --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h @@ -0,0 +1,87 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_exception_linux.h: A definition of exception codes for + * Linux + * + * (This is C99 source, please don't corrupt it with C++.) + * + * Author: Mark Mentovai + * Split into its own file: Neal Sidhwaney */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + + +/* For (MDException).exception_code. These values come from bits/signum.h. + */ +typedef enum { + MD_EXCEPTION_CODE_LIN_SIGHUP = 1, /* Hangup (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGINT = 2, /* Interrupt (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGQUIT = 3, /* Quit (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGILL = 4, /* Illegal instruction (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGTRAP = 5, /* Trace trap (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGABRT = 6, /* Abort (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGBUS = 7, /* BUS error (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGFPE = 8, /* Floating-point exception (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGKILL = 9, /* Kill, unblockable (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGUSR1 = 10, /* User-defined signal 1 (POSIX). */ + MD_EXCEPTION_CODE_LIN_SIGSEGV = 11, /* Segmentation violation (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGUSR2 = 12, /* User-defined signal 2 (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGPIPE = 13, /* Broken pipe (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGALRM = 14, /* Alarm clock (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGTERM = 15, /* Termination (ANSI) */ + MD_EXCEPTION_CODE_LIN_SIGSTKFLT = 16, /* Stack faultd */ + MD_EXCEPTION_CODE_LIN_SIGCHLD = 17, /* Child status has changed (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGCONT = 18, /* Continue (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGSTOP = 19, /* Stop, unblockable (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGTSTP = 20, /* Keyboard stop (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGTTIN = 21, /* Background read from tty (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGTTOU = 22, /* Background write to tty (POSIX) */ + MD_EXCEPTION_CODE_LIN_SIGURG = 23, + /* Urgent condition on socket (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGXCPU = 24, /* CPU limit exceeded (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGXFSZ = 25, + /* File size limit exceeded (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGVTALRM = 26, /* Virtual alarm clock (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGPROF = 27, /* Profiling alarm clock (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGWINCH = 28, /* Window size change (4.3 BSD, Sun) */ + MD_EXCEPTION_CODE_LIN_SIGIO = 29, /* I/O now possible (4.2 BSD) */ + MD_EXCEPTION_CODE_LIN_SIGPWR = 30, /* Power failure restart (System V) */ + MD_EXCEPTION_CODE_LIN_SIGSYS = 31, /* Bad system call */ + MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED = 0xFFFFFFFF /* No exception, + dump requested. */ +} MDExceptionCodeLinux; + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h new file mode 100644 index 00000000000000..91c1c097467c7a --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h @@ -0,0 +1,205 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_exception_mac.h: A definition of exception codes for Mac + * OS X + * + * (This is C99 source, please don't corrupt it with C++.) + * + * Author: Mark Mentovai + * Split into its own file: Neal Sidhwaney */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + +/* For (MDException).exception_code. Breakpad minidump extension for Mac OS X + * support. Based on Darwin/Mac OS X' mach/exception_types.h. This is + * what Mac OS X calls an "exception", not a "code". */ +typedef enum { + /* Exception code. The high 16 bits of exception_code contains one of + * these values. */ + MD_EXCEPTION_MAC_BAD_ACCESS = 1, /* code can be a kern_return_t */ + /* EXC_BAD_ACCESS */ + MD_EXCEPTION_MAC_BAD_INSTRUCTION = 2, /* code is CPU-specific */ + /* EXC_BAD_INSTRUCTION */ + MD_EXCEPTION_MAC_ARITHMETIC = 3, /* code is CPU-specific */ + /* EXC_ARITHMETIC */ + MD_EXCEPTION_MAC_EMULATION = 4, /* code is CPU-specific */ + /* EXC_EMULATION */ + MD_EXCEPTION_MAC_SOFTWARE = 5, + /* EXC_SOFTWARE */ + MD_EXCEPTION_MAC_BREAKPOINT = 6, /* code is CPU-specific */ + /* EXC_BREAKPOINT */ + MD_EXCEPTION_MAC_SYSCALL = 7, + /* EXC_SYSCALL */ + MD_EXCEPTION_MAC_MACH_SYSCALL = 8, + /* EXC_MACH_SYSCALL */ + MD_EXCEPTION_MAC_RPC_ALERT = 9 + /* EXC_RPC_ALERT */ +} MDExceptionMac; + +/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X + * support. Based on Darwin/Mac OS X' mach/ppc/exception.h and + * mach/i386/exception.h. This is what Mac OS X calls a "code". */ +typedef enum { + /* With MD_EXCEPTION_BAD_ACCESS. These are relevant kern_return_t values + * from mach/kern_return.h. */ + MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS = 1, + /* KERN_INVALID_ADDRESS */ + MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE = 2, + /* KERN_PROTECTION_FAILURE */ + MD_EXCEPTION_CODE_MAC_NO_ACCESS = 8, + /* KERN_NO_ACCESS */ + MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE = 9, + /* KERN_MEMORY_FAILURE */ + MD_EXCEPTION_CODE_MAC_MEMORY_ERROR = 10, + /* KERN_MEMORY_ERROR */ + + /* With MD_EXCEPTION_SOFTWARE */ + MD_EXCEPTION_CODE_MAC_BAD_SYSCALL = 0x00010000, /* Mach SIGSYS */ + MD_EXCEPTION_CODE_MAC_BAD_PIPE = 0x00010001, /* Mach SIGPIPE */ + MD_EXCEPTION_CODE_MAC_ABORT = 0x00010002, /* Mach SIGABRT */ + /* Custom values */ + MD_EXCEPTION_CODE_MAC_NS_EXCEPTION = 0xDEADC0DE, /* uncaught NSException */ + + /* With MD_EXCEPTION_MAC_BAD_ACCESS on arm */ + MD_EXCEPTION_CODE_MAC_ARM_DA_ALIGN = 0x0101, /* EXC_ARM_DA_ALIGN */ + MD_EXCEPTION_CODE_MAC_ARM_DA_DEBUG = 0x0102, /* EXC_ARM_DA_DEBUG */ + + /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on arm */ + MD_EXCEPTION_CODE_MAC_ARM_UNDEFINED = 1, /* EXC_ARM_UNDEFINED */ + + /* With MD_EXCEPTION_MAC_BREAKPOINT on arm */ + MD_EXCEPTION_CODE_MAC_ARM_BREAKPOINT = 1, /* EXC_ARM_BREAKPOINT */ + + /* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101, + /* EXC_PPC_VM_PROT_READ */ + MD_EXCEPTION_CODE_MAC_PPC_BADSPACE = 0x0102, + /* EXC_PPC_BADSPACE */ + MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED = 0x0103, + /* EXC_PPC_UNALIGNED */ + + /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL = 1, + /* EXC_PPC_INVALID_SYSCALL */ + MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION = 2, + /* EXC_PPC_UNIPL_INST */ + MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION = 3, + /* EXC_PPC_PRIVINST */ + MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER = 4, + /* EXC_PPC_PRIVREG */ + MD_EXCEPTION_CODE_MAC_PPC_TRACE = 5, + /* EXC_PPC_TRACE */ + MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR = 6, + /* EXC_PPC_PERFMON */ + + /* With MD_EXCEPTION_MAC_ARITHMETIC on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW = 1, + /* EXC_PPC_OVERFLOW */ + MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE = 2, + /* EXC_PPC_ZERO_DIVIDE */ + MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT = 3, + /* EXC_FLT_INEXACT */ + MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE = 4, + /* EXC_PPC_FLT_ZERO_DIVIDE */ + MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW = 5, + /* EXC_PPC_FLT_UNDERFLOW */ + MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW = 6, + /* EXC_PPC_FLT_OVERFLOW */ + MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER = 7, + /* EXC_PPC_FLT_NOT_A_NUMBER */ + + /* With MD_EXCEPTION_MAC_EMULATION on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION = 8, + /* EXC_PPC_NOEMULATION */ + MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST = 9, + /* EXC_PPC_ALTIVECASSIST */ + + /* With MD_EXCEPTION_MAC_SOFTWARE on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_TRAP = 0x00000001, /* EXC_PPC_TRAP */ + MD_EXCEPTION_CODE_MAC_PPC_MIGRATE = 0x00010100, /* EXC_PPC_MIGRATE */ + + /* With MD_EXCEPTION_MAC_BREAKPOINT on ppc */ + MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT = 1, /* EXC_PPC_BREAKPOINT */ + + /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86, see also x86 interrupt + * values below. */ + MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION = 1, /* EXC_I386_INVOP */ + + /* With MD_EXCEPTION_MAC_ARITHMETIC on x86 */ + MD_EXCEPTION_CODE_MAC_X86_DIV = 1, /* EXC_I386_DIV */ + MD_EXCEPTION_CODE_MAC_X86_INTO = 2, /* EXC_I386_INTO */ + MD_EXCEPTION_CODE_MAC_X86_NOEXT = 3, /* EXC_I386_NOEXT */ + MD_EXCEPTION_CODE_MAC_X86_EXTOVR = 4, /* EXC_I386_EXTOVR */ + MD_EXCEPTION_CODE_MAC_X86_EXTERR = 5, /* EXC_I386_EXTERR */ + MD_EXCEPTION_CODE_MAC_X86_EMERR = 6, /* EXC_I386_EMERR */ + MD_EXCEPTION_CODE_MAC_X86_BOUND = 7, /* EXC_I386_BOUND */ + MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR = 8, /* EXC_I386_SSEEXTERR */ + + /* With MD_EXCEPTION_MAC_BREAKPOINT on x86 */ + MD_EXCEPTION_CODE_MAC_X86_SGL = 1, /* EXC_I386_SGL */ + MD_EXCEPTION_CODE_MAC_X86_BPT = 2, /* EXC_I386_BPT */ + + /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86. These are the raw + * x86 interrupt codes. Most of these are mapped to other Mach + * exceptions and codes, are handled, or should not occur in user space. + * A few of these will do occur with MD_EXCEPTION_MAC_BAD_INSTRUCTION. */ + /* EXC_I386_DIVERR = 0: mapped to EXC_ARITHMETIC/EXC_I386_DIV */ + /* EXC_I386_SGLSTP = 1: mapped to EXC_BREAKPOINT/EXC_I386_SGL */ + /* EXC_I386_NMIFLT = 2: should not occur in user space */ + /* EXC_I386_BPTFLT = 3: mapped to EXC_BREAKPOINT/EXC_I386_BPT */ + /* EXC_I386_INTOFLT = 4: mapped to EXC_ARITHMETIC/EXC_I386_INTO */ + /* EXC_I386_BOUNDFLT = 5: mapped to EXC_ARITHMETIC/EXC_I386_BOUND */ + /* EXC_I386_INVOPFLT = 6: mapped to EXC_BAD_INSTRUCTION/EXC_I386_INVOP */ + /* EXC_I386_NOEXTFLT = 7: should be handled by the kernel */ + /* EXC_I386_DBLFLT = 8: should be handled (if possible) by the kernel */ + /* EXC_I386_EXTOVRFLT = 9: mapped to EXC_BAD_ACCESS/(PROT_READ|PROT_EXEC) */ + MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT = 10, + /* EXC_INVTSSFLT */ + MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT = 11, + /* EXC_SEGNPFLT */ + MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT = 12, + /* EXC_STKFLT */ + MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT = 13, + /* EXC_GPFLT */ + /* EXC_I386_PGFLT = 14: should not occur in user space */ + /* EXC_I386_EXTERRFLT = 16: mapped to EXC_ARITHMETIC/EXC_I386_EXTERR */ + MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT = 17 + /* EXC_ALIGNFLT (for vector operations) */ + /* EXC_I386_ENOEXTFLT = 32: should be handled by the kernel */ + /* EXC_I386_ENDPERR = 33: should not occur */ +} MDExceptionCodeMac; + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_OSX_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h new file mode 100644 index 00000000000000..adff5a6bbc6dcf --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h @@ -0,0 +1,67 @@ +/* Copyright (c) 2013, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_exception_ps3.h: A definition of exception codes for + * PS3 */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + +typedef enum { + MD_EXCEPTION_CODE_PS3_UNKNOWN = 0, + MD_EXCEPTION_CODE_PS3_TRAP_EXCEP = 1, + MD_EXCEPTION_CODE_PS3_PRIV_INSTR = 2, + MD_EXCEPTION_CODE_PS3_ILLEGAL_INSTR = 3, + MD_EXCEPTION_CODE_PS3_INSTR_STORAGE = 4, + MD_EXCEPTION_CODE_PS3_INSTR_SEGMENT = 5, + MD_EXCEPTION_CODE_PS3_DATA_STORAGE = 6, + MD_EXCEPTION_CODE_PS3_DATA_SEGMENT = 7, + MD_EXCEPTION_CODE_PS3_FLOAT_POINT = 8, + MD_EXCEPTION_CODE_PS3_DABR_MATCH = 9, + MD_EXCEPTION_CODE_PS3_ALIGN_EXCEP = 10, + MD_EXCEPTION_CODE_PS3_MEMORY_ACCESS = 11, + MD_EXCEPTION_CODE_PS3_COPRO_ALIGN = 12, + MD_EXCEPTION_CODE_PS3_COPRO_INVALID_COM = 13, + MD_EXCEPTION_CODE_PS3_COPRO_ERR = 14, + MD_EXCEPTION_CODE_PS3_COPRO_FIR = 15, + MD_EXCEPTION_CODE_PS3_COPRO_DATA_SEGMENT = 16, + MD_EXCEPTION_CODE_PS3_COPRO_DATA_STORAGE = 17, + MD_EXCEPTION_CODE_PS3_COPRO_STOP_INSTR = 18, + MD_EXCEPTION_CODE_PS3_COPRO_HALT_INSTR = 19, + MD_EXCEPTION_CODE_PS3_COPRO_HALTINST_UNKNOWN = 20, + MD_EXCEPTION_CODE_PS3_COPRO_MEMORY_ACCESS = 21, + MD_EXCEPTION_CODE_PS3_GRAPHIC = 22 +} MDExceptionCodePS3; + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h new file mode 100644 index 00000000000000..f18ddf42472ccf --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h @@ -0,0 +1,94 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_exception_solaris.h: A definition of exception codes for + * Solaris + * + * (This is C99 source, please don't corrupt it with C++.) + * + * Author: Mark Mentovai + * Split into its own file: Neal Sidhwaney */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + +/* For (MDException).exception_code. These values come from sys/iso/signal_iso.h + */ +typedef enum { + MD_EXCEPTION_CODE_SOL_SIGHUP = 1, /* Hangup */ + MD_EXCEPTION_CODE_SOL_SIGINT = 2, /* interrupt (rubout) */ + MD_EXCEPTION_CODE_SOL_SIGQUIT = 3, /* quit (ASCII FS) */ + MD_EXCEPTION_CODE_SOL_SIGILL = 4, /* illegal instruction (not reset when caught) */ + MD_EXCEPTION_CODE_SOL_SIGTRAP = 5, /* trace trap (not reset when caught) */ + MD_EXCEPTION_CODE_SOL_SIGIOT = 6, /* IOT instruction */ + MD_EXCEPTION_CODE_SOL_SIGABRT = 6, /* used by abort, replace SIGIOT in the future */ + MD_EXCEPTION_CODE_SOL_SIGEMT = 7, /* EMT instruction */ + MD_EXCEPTION_CODE_SOL_SIGFPE = 8, /* floating point exception */ + MD_EXCEPTION_CODE_SOL_SIGKILL = 9, /* kill (cannot be caught or ignored) */ + MD_EXCEPTION_CODE_SOL_SIGBUS = 10, /* bus error */ + MD_EXCEPTION_CODE_SOL_SIGSEGV = 11, /* segmentation violation */ + MD_EXCEPTION_CODE_SOL_SIGSYS = 12, /* bad argument to system call */ + MD_EXCEPTION_CODE_SOL_SIGPIPE = 13, /* write on a pipe with no one to read it */ + MD_EXCEPTION_CODE_SOL_SIGALRM = 14, /* alarm clock */ + MD_EXCEPTION_CODE_SOL_SIGTERM = 15, /* software termination signal from kill */ + MD_EXCEPTION_CODE_SOL_SIGUSR1 = 16, /* user defined signal 1 */ + MD_EXCEPTION_CODE_SOL_SIGUSR2 = 17, /* user defined signal 2 */ + MD_EXCEPTION_CODE_SOL_SIGCLD = 18, /* child status change */ + MD_EXCEPTION_CODE_SOL_SIGCHLD = 18, /* child status change alias (POSIX) */ + MD_EXCEPTION_CODE_SOL_SIGPWR = 19, /* power-fail restart */ + MD_EXCEPTION_CODE_SOL_SIGWINCH = 20, /* window size change */ + MD_EXCEPTION_CODE_SOL_SIGURG = 21, /* urgent socket condition */ + MD_EXCEPTION_CODE_SOL_SIGPOLL = 22, /* pollable event occurred */ + MD_EXCEPTION_CODE_SOL_SIGIO = 22, /* socket I/O possible (SIGPOLL alias) */ + MD_EXCEPTION_CODE_SOL_SIGSTOP = 23, /* stop (cannot be caught or ignored) */ + MD_EXCEPTION_CODE_SOL_SIGTSTP = 24, /* user stop requested from tty */ + MD_EXCEPTION_CODE_SOL_SIGCONT = 25, /* stopped process has been continued */ + MD_EXCEPTION_CODE_SOL_SIGTTIN = 26, /* background tty read attempted */ + MD_EXCEPTION_CODE_SOL_SIGTTOU = 27, /* background tty write attempted */ + MD_EXCEPTION_CODE_SOL_SIGVTALRM = 28, /* virtual timer expired */ + MD_EXCEPTION_CODE_SOL_SIGPROF = 29, /* profiling timer expired */ + MD_EXCEPTION_CODE_SOL_SIGXCPU = 30, /* exceeded cpu limit */ + MD_EXCEPTION_CODE_SOL_SIGXFSZ = 31, /* exceeded file size limit */ + MD_EXCEPTION_CODE_SOL_SIGWAITING = 32, /* reserved signal no longer used by threading code */ + MD_EXCEPTION_CODE_SOL_SIGLWP = 33, /* reserved signal no longer used by threading code */ + MD_EXCEPTION_CODE_SOL_SIGFREEZE = 34, /* special signal used by CPR */ + MD_EXCEPTION_CODE_SOL_SIGTHAW = 35, /* special signal used by CPR */ + MD_EXCEPTION_CODE_SOL_SIGCANCEL = 36, /* reserved signal for thread cancellation */ + MD_EXCEPTION_CODE_SOL_SIGLOST = 37, /* resource lost (eg, record-lock lost) */ + MD_EXCEPTION_CODE_SOL_SIGXRES = 38, /* resource control exceeded */ + MD_EXCEPTION_CODE_SOL_SIGJVM1 = 39, /* reserved signal for Java Virtual Machine */ + MD_EXCEPTION_CODE_SOL_SIGJVM2 = 40 /* reserved signal for Java Virtual Machine */ +} MDExceptionCodeSolaris; + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h new file mode 100644 index 00000000000000..e4cd59edd5f116 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h @@ -0,0 +1,2261 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_exception_win32.h: Definitions of exception codes for + * Win32 platform + * + * (This is C99 source, please don't corrupt it with C++.) + * + * Author: Mark Mentovai + * Split into its own file: Neal Sidhwaney */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + + +/* For (MDException).exception_code. These values come from WinBase.h + * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h, + * they are STATUS_ in WinNT.h). */ +typedef enum { + MD_EXCEPTION_CODE_WIN_CONTROL_C = 0x40010005, + /* DBG_CONTROL_C */ + MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION = 0x80000001, + /* EXCEPTION_GUARD_PAGE */ + MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT = 0x80000002, + /* EXCEPTION_DATATYPE_MISALIGNMENT */ + MD_EXCEPTION_CODE_WIN_BREAKPOINT = 0x80000003, + /* EXCEPTION_BREAKPOINT */ + MD_EXCEPTION_CODE_WIN_SINGLE_STEP = 0x80000004, + /* EXCEPTION_SINGLE_STEP */ + MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION = 0xc0000005, + /* EXCEPTION_ACCESS_VIOLATION */ + MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR = 0xc0000006, + /* EXCEPTION_IN_PAGE_ERROR */ + MD_EXCEPTION_CODE_WIN_INVALID_HANDLE = 0xc0000008, + /* EXCEPTION_INVALID_HANDLE */ + MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION = 0xc000001d, + /* EXCEPTION_ILLEGAL_INSTRUCTION */ + MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025, + /* EXCEPTION_NONCONTINUABLE_EXCEPTION */ + MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION = 0xc0000026, + /* EXCEPTION_INVALID_DISPOSITION */ + MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED = 0xc000008c, + /* EXCEPTION_BOUNDS_EXCEEDED */ + MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND = 0xc000008d, + /* EXCEPTION_FLT_DENORMAL_OPERAND */ + MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO = 0xc000008e, + /* EXCEPTION_FLT_DIVIDE_BY_ZERO */ + MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT = 0xc000008f, + /* EXCEPTION_FLT_INEXACT_RESULT */ + MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION = 0xc0000090, + /* EXCEPTION_FLT_INVALID_OPERATION */ + MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW = 0xc0000091, + /* EXCEPTION_FLT_OVERFLOW */ + MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK = 0xc0000092, + /* EXCEPTION_FLT_STACK_CHECK */ + MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW = 0xc0000093, + /* EXCEPTION_FLT_UNDERFLOW */ + MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO = 0xc0000094, + /* EXCEPTION_INT_DIVIDE_BY_ZERO */ + MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW = 0xc0000095, + /* EXCEPTION_INT_OVERFLOW */ + MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION = 0xc0000096, + /* EXCEPTION_PRIV_INSTRUCTION */ + MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW = 0xc00000fd, + /* EXCEPTION_STACK_OVERFLOW */ + MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194, + /* EXCEPTION_POSSIBLE_DEADLOCK */ + MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN = 0xc0000409, + /* STATUS_STACK_BUFFER_OVERRUN */ + MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION = 0xc0000374, + /* STATUS_HEAP_CORRUPTION */ + MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363 + /* Per http://support.microsoft.com/kb/185294, + generated by Visual C++ compiler */ +} MDExceptionCodeWin; + + +/* For (MDException).exception_information[2], when (MDException).exception_code + * is MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR. This describes the underlying reason + * for the error. These values come from ntstatus.h. + * + * The content of this enum was created from ntstatus.h in the 8.1 SDK with + * + * egrep '#define [A-Z_0-9]+\s+\(\(NTSTATUS\)0xC[0-9A-F]+L\)' ntstatus.h + * | tr -d '\r' + * | sed -r 's@#define ([A-Z_0-9]+)\s+\(\(NTSTATUS\)(0xC[0-9A-F]+)L\).*@\2 \1@' + * | sort + * | sed -r 's@(0xC[0-9A-F]+) ([A-Z_0-9]+)@ MD_NTSTATUS_WIN_\2 = \1,@' + * + * With easy copy to clipboard with + * | xclip -selection c # on linux + * | clip # on windows + * | pbcopy # on mac + * + * and then the last comma manually removed. */ +typedef enum { + MD_NTSTATUS_WIN_STATUS_UNSUCCESSFUL = 0xC0000001, + MD_NTSTATUS_WIN_STATUS_NOT_IMPLEMENTED = 0xC0000002, + MD_NTSTATUS_WIN_STATUS_INVALID_INFO_CLASS = 0xC0000003, + MD_NTSTATUS_WIN_STATUS_INFO_LENGTH_MISMATCH = 0xC0000004, + MD_NTSTATUS_WIN_STATUS_ACCESS_VIOLATION = 0xC0000005, + MD_NTSTATUS_WIN_STATUS_IN_PAGE_ERROR = 0xC0000006, + MD_NTSTATUS_WIN_STATUS_PAGEFILE_QUOTA = 0xC0000007, + MD_NTSTATUS_WIN_STATUS_INVALID_HANDLE = 0xC0000008, + MD_NTSTATUS_WIN_STATUS_BAD_INITIAL_STACK = 0xC0000009, + MD_NTSTATUS_WIN_STATUS_BAD_INITIAL_PC = 0xC000000A, + MD_NTSTATUS_WIN_STATUS_INVALID_CID = 0xC000000B, + MD_NTSTATUS_WIN_STATUS_TIMER_NOT_CANCELED = 0xC000000C, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER = 0xC000000D, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_DEVICE = 0xC000000E, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_FILE = 0xC000000F, + MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_REQUEST = 0xC0000010, + MD_NTSTATUS_WIN_STATUS_END_OF_FILE = 0xC0000011, + MD_NTSTATUS_WIN_STATUS_WRONG_VOLUME = 0xC0000012, + MD_NTSTATUS_WIN_STATUS_NO_MEDIA_IN_DEVICE = 0xC0000013, + MD_NTSTATUS_WIN_STATUS_UNRECOGNIZED_MEDIA = 0xC0000014, + MD_NTSTATUS_WIN_STATUS_NONEXISTENT_SECTOR = 0xC0000015, + MD_NTSTATUS_WIN_STATUS_MORE_PROCESSING_REQUIRED = 0xC0000016, + MD_NTSTATUS_WIN_STATUS_NO_MEMORY = 0xC0000017, + MD_NTSTATUS_WIN_STATUS_CONFLICTING_ADDRESSES = 0xC0000018, + MD_NTSTATUS_WIN_STATUS_NOT_MAPPED_VIEW = 0xC0000019, + MD_NTSTATUS_WIN_STATUS_UNABLE_TO_FREE_VM = 0xC000001A, + MD_NTSTATUS_WIN_STATUS_UNABLE_TO_DELETE_SECTION = 0xC000001B, + MD_NTSTATUS_WIN_STATUS_INVALID_SYSTEM_SERVICE = 0xC000001C, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_INSTRUCTION = 0xC000001D, + MD_NTSTATUS_WIN_STATUS_INVALID_LOCK_SEQUENCE = 0xC000001E, + MD_NTSTATUS_WIN_STATUS_INVALID_VIEW_SIZE = 0xC000001F, + MD_NTSTATUS_WIN_STATUS_INVALID_FILE_FOR_SECTION = 0xC0000020, + MD_NTSTATUS_WIN_STATUS_ALREADY_COMMITTED = 0xC0000021, + MD_NTSTATUS_WIN_STATUS_ACCESS_DENIED = 0xC0000022, + MD_NTSTATUS_WIN_STATUS_BUFFER_TOO_SMALL = 0xC0000023, + MD_NTSTATUS_WIN_STATUS_OBJECT_TYPE_MISMATCH = 0xC0000024, + MD_NTSTATUS_WIN_STATUS_NONCONTINUABLE_EXCEPTION = 0xC0000025, + MD_NTSTATUS_WIN_STATUS_INVALID_DISPOSITION = 0xC0000026, + MD_NTSTATUS_WIN_STATUS_UNWIND = 0xC0000027, + MD_NTSTATUS_WIN_STATUS_BAD_STACK = 0xC0000028, + MD_NTSTATUS_WIN_STATUS_INVALID_UNWIND_TARGET = 0xC0000029, + MD_NTSTATUS_WIN_STATUS_NOT_LOCKED = 0xC000002A, + MD_NTSTATUS_WIN_STATUS_PARITY_ERROR = 0xC000002B, + MD_NTSTATUS_WIN_STATUS_UNABLE_TO_DECOMMIT_VM = 0xC000002C, + MD_NTSTATUS_WIN_STATUS_NOT_COMMITTED = 0xC000002D, + MD_NTSTATUS_WIN_STATUS_INVALID_PORT_ATTRIBUTES = 0xC000002E, + MD_NTSTATUS_WIN_STATUS_PORT_MESSAGE_TOO_LONG = 0xC000002F, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_MIX = 0xC0000030, + MD_NTSTATUS_WIN_STATUS_INVALID_QUOTA_LOWER = 0xC0000031, + MD_NTSTATUS_WIN_STATUS_DISK_CORRUPT_ERROR = 0xC0000032, + MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_INVALID = 0xC0000033, + MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_NOT_FOUND = 0xC0000034, + MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_COLLISION = 0xC0000035, + MD_NTSTATUS_WIN_STATUS_PORT_DISCONNECTED = 0xC0000037, + MD_NTSTATUS_WIN_STATUS_DEVICE_ALREADY_ATTACHED = 0xC0000038, + MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_INVALID = 0xC0000039, + MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_NOT_FOUND = 0xC000003A, + MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_SYNTAX_BAD = 0xC000003B, + MD_NTSTATUS_WIN_STATUS_DATA_OVERRUN = 0xC000003C, + MD_NTSTATUS_WIN_STATUS_DATA_LATE_ERROR = 0xC000003D, + MD_NTSTATUS_WIN_STATUS_DATA_ERROR = 0xC000003E, + MD_NTSTATUS_WIN_STATUS_CRC_ERROR = 0xC000003F, + MD_NTSTATUS_WIN_STATUS_SECTION_TOO_BIG = 0xC0000040, + MD_NTSTATUS_WIN_STATUS_PORT_CONNECTION_REFUSED = 0xC0000041, + MD_NTSTATUS_WIN_STATUS_INVALID_PORT_HANDLE = 0xC0000042, + MD_NTSTATUS_WIN_STATUS_SHARING_VIOLATION = 0xC0000043, + MD_NTSTATUS_WIN_STATUS_QUOTA_EXCEEDED = 0xC0000044, + MD_NTSTATUS_WIN_STATUS_INVALID_PAGE_PROTECTION = 0xC0000045, + MD_NTSTATUS_WIN_STATUS_MUTANT_NOT_OWNED = 0xC0000046, + MD_NTSTATUS_WIN_STATUS_SEMAPHORE_LIMIT_EXCEEDED = 0xC0000047, + MD_NTSTATUS_WIN_STATUS_PORT_ALREADY_SET = 0xC0000048, + MD_NTSTATUS_WIN_STATUS_SECTION_NOT_IMAGE = 0xC0000049, + MD_NTSTATUS_WIN_STATUS_SUSPEND_COUNT_EXCEEDED = 0xC000004A, + MD_NTSTATUS_WIN_STATUS_THREAD_IS_TERMINATING = 0xC000004B, + MD_NTSTATUS_WIN_STATUS_BAD_WORKING_SET_LIMIT = 0xC000004C, + MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_FILE_MAP = 0xC000004D, + MD_NTSTATUS_WIN_STATUS_SECTION_PROTECTION = 0xC000004E, + MD_NTSTATUS_WIN_STATUS_EAS_NOT_SUPPORTED = 0xC000004F, + MD_NTSTATUS_WIN_STATUS_EA_TOO_LARGE = 0xC0000050, + MD_NTSTATUS_WIN_STATUS_NONEXISTENT_EA_ENTRY = 0xC0000051, + MD_NTSTATUS_WIN_STATUS_NO_EAS_ON_FILE = 0xC0000052, + MD_NTSTATUS_WIN_STATUS_EA_CORRUPT_ERROR = 0xC0000053, + MD_NTSTATUS_WIN_STATUS_FILE_LOCK_CONFLICT = 0xC0000054, + MD_NTSTATUS_WIN_STATUS_LOCK_NOT_GRANTED = 0xC0000055, + MD_NTSTATUS_WIN_STATUS_DELETE_PENDING = 0xC0000056, + MD_NTSTATUS_WIN_STATUS_CTL_FILE_NOT_SUPPORTED = 0xC0000057, + MD_NTSTATUS_WIN_STATUS_UNKNOWN_REVISION = 0xC0000058, + MD_NTSTATUS_WIN_STATUS_REVISION_MISMATCH = 0xC0000059, + MD_NTSTATUS_WIN_STATUS_INVALID_OWNER = 0xC000005A, + MD_NTSTATUS_WIN_STATUS_INVALID_PRIMARY_GROUP = 0xC000005B, + MD_NTSTATUS_WIN_STATUS_NO_IMPERSONATION_TOKEN = 0xC000005C, + MD_NTSTATUS_WIN_STATUS_CANT_DISABLE_MANDATORY = 0xC000005D, + MD_NTSTATUS_WIN_STATUS_NO_LOGON_SERVERS = 0xC000005E, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_LOGON_SESSION = 0xC000005F, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_PRIVILEGE = 0xC0000060, + MD_NTSTATUS_WIN_STATUS_PRIVILEGE_NOT_HELD = 0xC0000061, + MD_NTSTATUS_WIN_STATUS_INVALID_ACCOUNT_NAME = 0xC0000062, + MD_NTSTATUS_WIN_STATUS_USER_EXISTS = 0xC0000063, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_USER = 0xC0000064, + MD_NTSTATUS_WIN_STATUS_GROUP_EXISTS = 0xC0000065, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_GROUP = 0xC0000066, + MD_NTSTATUS_WIN_STATUS_MEMBER_IN_GROUP = 0xC0000067, + MD_NTSTATUS_WIN_STATUS_MEMBER_NOT_IN_GROUP = 0xC0000068, + MD_NTSTATUS_WIN_STATUS_LAST_ADMIN = 0xC0000069, + MD_NTSTATUS_WIN_STATUS_WRONG_PASSWORD = 0xC000006A, + MD_NTSTATUS_WIN_STATUS_ILL_FORMED_PASSWORD = 0xC000006B, + MD_NTSTATUS_WIN_STATUS_PASSWORD_RESTRICTION = 0xC000006C, + MD_NTSTATUS_WIN_STATUS_LOGON_FAILURE = 0xC000006D, + MD_NTSTATUS_WIN_STATUS_ACCOUNT_RESTRICTION = 0xC000006E, + MD_NTSTATUS_WIN_STATUS_INVALID_LOGON_HOURS = 0xC000006F, + MD_NTSTATUS_WIN_STATUS_INVALID_WORKSTATION = 0xC0000070, + MD_NTSTATUS_WIN_STATUS_PASSWORD_EXPIRED = 0xC0000071, + MD_NTSTATUS_WIN_STATUS_ACCOUNT_DISABLED = 0xC0000072, + MD_NTSTATUS_WIN_STATUS_NONE_MAPPED = 0xC0000073, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_LUIDS_REQUESTED = 0xC0000074, + MD_NTSTATUS_WIN_STATUS_LUIDS_EXHAUSTED = 0xC0000075, + MD_NTSTATUS_WIN_STATUS_INVALID_SUB_AUTHORITY = 0xC0000076, + MD_NTSTATUS_WIN_STATUS_INVALID_ACL = 0xC0000077, + MD_NTSTATUS_WIN_STATUS_INVALID_SID = 0xC0000078, + MD_NTSTATUS_WIN_STATUS_INVALID_SECURITY_DESCR = 0xC0000079, + MD_NTSTATUS_WIN_STATUS_PROCEDURE_NOT_FOUND = 0xC000007A, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_FORMAT = 0xC000007B, + MD_NTSTATUS_WIN_STATUS_NO_TOKEN = 0xC000007C, + MD_NTSTATUS_WIN_STATUS_BAD_INHERITANCE_ACL = 0xC000007D, + MD_NTSTATUS_WIN_STATUS_RANGE_NOT_LOCKED = 0xC000007E, + MD_NTSTATUS_WIN_STATUS_DISK_FULL = 0xC000007F, + MD_NTSTATUS_WIN_STATUS_SERVER_DISABLED = 0xC0000080, + MD_NTSTATUS_WIN_STATUS_SERVER_NOT_DISABLED = 0xC0000081, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_GUIDS_REQUESTED = 0xC0000082, + MD_NTSTATUS_WIN_STATUS_GUIDS_EXHAUSTED = 0xC0000083, + MD_NTSTATUS_WIN_STATUS_INVALID_ID_AUTHORITY = 0xC0000084, + MD_NTSTATUS_WIN_STATUS_AGENTS_EXHAUSTED = 0xC0000085, + MD_NTSTATUS_WIN_STATUS_INVALID_VOLUME_LABEL = 0xC0000086, + MD_NTSTATUS_WIN_STATUS_SECTION_NOT_EXTENDED = 0xC0000087, + MD_NTSTATUS_WIN_STATUS_NOT_MAPPED_DATA = 0xC0000088, + MD_NTSTATUS_WIN_STATUS_RESOURCE_DATA_NOT_FOUND = 0xC0000089, + MD_NTSTATUS_WIN_STATUS_RESOURCE_TYPE_NOT_FOUND = 0xC000008A, + MD_NTSTATUS_WIN_STATUS_RESOURCE_NAME_NOT_FOUND = 0xC000008B, + MD_NTSTATUS_WIN_STATUS_ARRAY_BOUNDS_EXCEEDED = 0xC000008C, + MD_NTSTATUS_WIN_STATUS_FLOAT_DENORMAL_OPERAND = 0xC000008D, + MD_NTSTATUS_WIN_STATUS_FLOAT_DIVIDE_BY_ZERO = 0xC000008E, + MD_NTSTATUS_WIN_STATUS_FLOAT_INEXACT_RESULT = 0xC000008F, + MD_NTSTATUS_WIN_STATUS_FLOAT_INVALID_OPERATION = 0xC0000090, + MD_NTSTATUS_WIN_STATUS_FLOAT_OVERFLOW = 0xC0000091, + MD_NTSTATUS_WIN_STATUS_FLOAT_STACK_CHECK = 0xC0000092, + MD_NTSTATUS_WIN_STATUS_FLOAT_UNDERFLOW = 0xC0000093, + MD_NTSTATUS_WIN_STATUS_INTEGER_DIVIDE_BY_ZERO = 0xC0000094, + MD_NTSTATUS_WIN_STATUS_INTEGER_OVERFLOW = 0xC0000095, + MD_NTSTATUS_WIN_STATUS_PRIVILEGED_INSTRUCTION = 0xC0000096, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_PAGING_FILES = 0xC0000097, + MD_NTSTATUS_WIN_STATUS_FILE_INVALID = 0xC0000098, + MD_NTSTATUS_WIN_STATUS_ALLOTTED_SPACE_EXCEEDED = 0xC0000099, + MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_RESOURCES = 0xC000009A, + MD_NTSTATUS_WIN_STATUS_DFS_EXIT_PATH_FOUND = 0xC000009B, + MD_NTSTATUS_WIN_STATUS_DEVICE_DATA_ERROR = 0xC000009C, + MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_CONNECTED = 0xC000009D, + MD_NTSTATUS_WIN_STATUS_DEVICE_POWER_FAILURE = 0xC000009E, + MD_NTSTATUS_WIN_STATUS_FREE_VM_NOT_AT_BASE = 0xC000009F, + MD_NTSTATUS_WIN_STATUS_MEMORY_NOT_ALLOCATED = 0xC00000A0, + MD_NTSTATUS_WIN_STATUS_WORKING_SET_QUOTA = 0xC00000A1, + MD_NTSTATUS_WIN_STATUS_MEDIA_WRITE_PROTECTED = 0xC00000A2, + MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_READY = 0xC00000A3, + MD_NTSTATUS_WIN_STATUS_INVALID_GROUP_ATTRIBUTES = 0xC00000A4, + MD_NTSTATUS_WIN_STATUS_BAD_IMPERSONATION_LEVEL = 0xC00000A5, + MD_NTSTATUS_WIN_STATUS_CANT_OPEN_ANONYMOUS = 0xC00000A6, + MD_NTSTATUS_WIN_STATUS_BAD_VALIDATION_CLASS = 0xC00000A7, + MD_NTSTATUS_WIN_STATUS_BAD_TOKEN_TYPE = 0xC00000A8, + MD_NTSTATUS_WIN_STATUS_BAD_MASTER_BOOT_RECORD = 0xC00000A9, + MD_NTSTATUS_WIN_STATUS_INSTRUCTION_MISALIGNMENT = 0xC00000AA, + MD_NTSTATUS_WIN_STATUS_INSTANCE_NOT_AVAILABLE = 0xC00000AB, + MD_NTSTATUS_WIN_STATUS_PIPE_NOT_AVAILABLE = 0xC00000AC, + MD_NTSTATUS_WIN_STATUS_INVALID_PIPE_STATE = 0xC00000AD, + MD_NTSTATUS_WIN_STATUS_PIPE_BUSY = 0xC00000AE, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_FUNCTION = 0xC00000AF, + MD_NTSTATUS_WIN_STATUS_PIPE_DISCONNECTED = 0xC00000B0, + MD_NTSTATUS_WIN_STATUS_PIPE_CLOSING = 0xC00000B1, + MD_NTSTATUS_WIN_STATUS_PIPE_CONNECTED = 0xC00000B2, + MD_NTSTATUS_WIN_STATUS_PIPE_LISTENING = 0xC00000B3, + MD_NTSTATUS_WIN_STATUS_INVALID_READ_MODE = 0xC00000B4, + MD_NTSTATUS_WIN_STATUS_IO_TIMEOUT = 0xC00000B5, + MD_NTSTATUS_WIN_STATUS_FILE_FORCED_CLOSED = 0xC00000B6, + MD_NTSTATUS_WIN_STATUS_PROFILING_NOT_STARTED = 0xC00000B7, + MD_NTSTATUS_WIN_STATUS_PROFILING_NOT_STOPPED = 0xC00000B8, + MD_NTSTATUS_WIN_STATUS_COULD_NOT_INTERPRET = 0xC00000B9, + MD_NTSTATUS_WIN_STATUS_FILE_IS_A_DIRECTORY = 0xC00000BA, + MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED = 0xC00000BB, + MD_NTSTATUS_WIN_STATUS_REMOTE_NOT_LISTENING = 0xC00000BC, + MD_NTSTATUS_WIN_STATUS_DUPLICATE_NAME = 0xC00000BD, + MD_NTSTATUS_WIN_STATUS_BAD_NETWORK_PATH = 0xC00000BE, + MD_NTSTATUS_WIN_STATUS_NETWORK_BUSY = 0xC00000BF, + MD_NTSTATUS_WIN_STATUS_DEVICE_DOES_NOT_EXIST = 0xC00000C0, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_COMMANDS = 0xC00000C1, + MD_NTSTATUS_WIN_STATUS_ADAPTER_HARDWARE_ERROR = 0xC00000C2, + MD_NTSTATUS_WIN_STATUS_INVALID_NETWORK_RESPONSE = 0xC00000C3, + MD_NTSTATUS_WIN_STATUS_UNEXPECTED_NETWORK_ERROR = 0xC00000C4, + MD_NTSTATUS_WIN_STATUS_BAD_REMOTE_ADAPTER = 0xC00000C5, + MD_NTSTATUS_WIN_STATUS_PRINT_QUEUE_FULL = 0xC00000C6, + MD_NTSTATUS_WIN_STATUS_NO_SPOOL_SPACE = 0xC00000C7, + MD_NTSTATUS_WIN_STATUS_PRINT_CANCELLED = 0xC00000C8, + MD_NTSTATUS_WIN_STATUS_NETWORK_NAME_DELETED = 0xC00000C9, + MD_NTSTATUS_WIN_STATUS_NETWORK_ACCESS_DENIED = 0xC00000CA, + MD_NTSTATUS_WIN_STATUS_BAD_DEVICE_TYPE = 0xC00000CB, + MD_NTSTATUS_WIN_STATUS_BAD_NETWORK_NAME = 0xC00000CC, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_NAMES = 0xC00000CD, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_SESSIONS = 0xC00000CE, + MD_NTSTATUS_WIN_STATUS_SHARING_PAUSED = 0xC00000CF, + MD_NTSTATUS_WIN_STATUS_REQUEST_NOT_ACCEPTED = 0xC00000D0, + MD_NTSTATUS_WIN_STATUS_REDIRECTOR_PAUSED = 0xC00000D1, + MD_NTSTATUS_WIN_STATUS_NET_WRITE_FAULT = 0xC00000D2, + MD_NTSTATUS_WIN_STATUS_PROFILING_AT_LIMIT = 0xC00000D3, + MD_NTSTATUS_WIN_STATUS_NOT_SAME_DEVICE = 0xC00000D4, + MD_NTSTATUS_WIN_STATUS_FILE_RENAMED = 0xC00000D5, + MD_NTSTATUS_WIN_STATUS_VIRTUAL_CIRCUIT_CLOSED = 0xC00000D6, + MD_NTSTATUS_WIN_STATUS_NO_SECURITY_ON_OBJECT = 0xC00000D7, + MD_NTSTATUS_WIN_STATUS_CANT_WAIT = 0xC00000D8, + MD_NTSTATUS_WIN_STATUS_PIPE_EMPTY = 0xC00000D9, + MD_NTSTATUS_WIN_STATUS_CANT_ACCESS_DOMAIN_INFO = 0xC00000DA, + MD_NTSTATUS_WIN_STATUS_CANT_TERMINATE_SELF = 0xC00000DB, + MD_NTSTATUS_WIN_STATUS_INVALID_SERVER_STATE = 0xC00000DC, + MD_NTSTATUS_WIN_STATUS_INVALID_DOMAIN_STATE = 0xC00000DD, + MD_NTSTATUS_WIN_STATUS_INVALID_DOMAIN_ROLE = 0xC00000DE, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_DOMAIN = 0xC00000DF, + MD_NTSTATUS_WIN_STATUS_DOMAIN_EXISTS = 0xC00000E0, + MD_NTSTATUS_WIN_STATUS_DOMAIN_LIMIT_EXCEEDED = 0xC00000E1, + MD_NTSTATUS_WIN_STATUS_OPLOCK_NOT_GRANTED = 0xC00000E2, + MD_NTSTATUS_WIN_STATUS_INVALID_OPLOCK_PROTOCOL = 0xC00000E3, + MD_NTSTATUS_WIN_STATUS_INTERNAL_DB_CORRUPTION = 0xC00000E4, + MD_NTSTATUS_WIN_STATUS_INTERNAL_ERROR = 0xC00000E5, + MD_NTSTATUS_WIN_STATUS_GENERIC_NOT_MAPPED = 0xC00000E6, + MD_NTSTATUS_WIN_STATUS_BAD_DESCRIPTOR_FORMAT = 0xC00000E7, + MD_NTSTATUS_WIN_STATUS_INVALID_USER_BUFFER = 0xC00000E8, + MD_NTSTATUS_WIN_STATUS_UNEXPECTED_IO_ERROR = 0xC00000E9, + MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_CREATE_ERR = 0xC00000EA, + MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_MAP_ERROR = 0xC00000EB, + MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_EXTEND_ERR = 0xC00000EC, + MD_NTSTATUS_WIN_STATUS_NOT_LOGON_PROCESS = 0xC00000ED, + MD_NTSTATUS_WIN_STATUS_LOGON_SESSION_EXISTS = 0xC00000EE, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_1 = 0xC00000EF, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_2 = 0xC00000F0, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_3 = 0xC00000F1, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_4 = 0xC00000F2, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_5 = 0xC00000F3, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_6 = 0xC00000F4, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_7 = 0xC00000F5, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_8 = 0xC00000F6, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_9 = 0xC00000F7, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_10 = 0xC00000F8, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_11 = 0xC00000F9, + MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_12 = 0xC00000FA, + MD_NTSTATUS_WIN_STATUS_REDIRECTOR_NOT_STARTED = 0xC00000FB, + MD_NTSTATUS_WIN_STATUS_REDIRECTOR_STARTED = 0xC00000FC, + MD_NTSTATUS_WIN_STATUS_STACK_OVERFLOW = 0xC00000FD, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_PACKAGE = 0xC00000FE, + MD_NTSTATUS_WIN_STATUS_BAD_FUNCTION_TABLE = 0xC00000FF, + MD_NTSTATUS_WIN_STATUS_VARIABLE_NOT_FOUND = 0xC0000100, + MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_EMPTY = 0xC0000101, + MD_NTSTATUS_WIN_STATUS_FILE_CORRUPT_ERROR = 0xC0000102, + MD_NTSTATUS_WIN_STATUS_NOT_A_DIRECTORY = 0xC0000103, + MD_NTSTATUS_WIN_STATUS_BAD_LOGON_SESSION_STATE = 0xC0000104, + MD_NTSTATUS_WIN_STATUS_LOGON_SESSION_COLLISION = 0xC0000105, + MD_NTSTATUS_WIN_STATUS_NAME_TOO_LONG = 0xC0000106, + MD_NTSTATUS_WIN_STATUS_FILES_OPEN = 0xC0000107, + MD_NTSTATUS_WIN_STATUS_CONNECTION_IN_USE = 0xC0000108, + MD_NTSTATUS_WIN_STATUS_MESSAGE_NOT_FOUND = 0xC0000109, + MD_NTSTATUS_WIN_STATUS_PROCESS_IS_TERMINATING = 0xC000010A, + MD_NTSTATUS_WIN_STATUS_INVALID_LOGON_TYPE = 0xC000010B, + MD_NTSTATUS_WIN_STATUS_NO_GUID_TRANSLATION = 0xC000010C, + MD_NTSTATUS_WIN_STATUS_CANNOT_IMPERSONATE = 0xC000010D, + MD_NTSTATUS_WIN_STATUS_IMAGE_ALREADY_LOADED = 0xC000010E, + MD_NTSTATUS_WIN_STATUS_ABIOS_NOT_PRESENT = 0xC000010F, + MD_NTSTATUS_WIN_STATUS_ABIOS_LID_NOT_EXIST = 0xC0000110, + MD_NTSTATUS_WIN_STATUS_ABIOS_LID_ALREADY_OWNED = 0xC0000111, + MD_NTSTATUS_WIN_STATUS_ABIOS_NOT_LID_OWNER = 0xC0000112, + MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_COMMAND = 0xC0000113, + MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_LID = 0xC0000114, + MD_NTSTATUS_WIN_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE = 0xC0000115, + MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_SELECTOR = 0xC0000116, + MD_NTSTATUS_WIN_STATUS_NO_LDT = 0xC0000117, + MD_NTSTATUS_WIN_STATUS_INVALID_LDT_SIZE = 0xC0000118, + MD_NTSTATUS_WIN_STATUS_INVALID_LDT_OFFSET = 0xC0000119, + MD_NTSTATUS_WIN_STATUS_INVALID_LDT_DESCRIPTOR = 0xC000011A, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_NE_FORMAT = 0xC000011B, + MD_NTSTATUS_WIN_STATUS_RXACT_INVALID_STATE = 0xC000011C, + MD_NTSTATUS_WIN_STATUS_RXACT_COMMIT_FAILURE = 0xC000011D, + MD_NTSTATUS_WIN_STATUS_MAPPED_FILE_SIZE_ZERO = 0xC000011E, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_OPENED_FILES = 0xC000011F, + MD_NTSTATUS_WIN_STATUS_CANCELLED = 0xC0000120, + MD_NTSTATUS_WIN_STATUS_CANNOT_DELETE = 0xC0000121, + MD_NTSTATUS_WIN_STATUS_INVALID_COMPUTER_NAME = 0xC0000122, + MD_NTSTATUS_WIN_STATUS_FILE_DELETED = 0xC0000123, + MD_NTSTATUS_WIN_STATUS_SPECIAL_ACCOUNT = 0xC0000124, + MD_NTSTATUS_WIN_STATUS_SPECIAL_GROUP = 0xC0000125, + MD_NTSTATUS_WIN_STATUS_SPECIAL_USER = 0xC0000126, + MD_NTSTATUS_WIN_STATUS_MEMBERS_PRIMARY_GROUP = 0xC0000127, + MD_NTSTATUS_WIN_STATUS_FILE_CLOSED = 0xC0000128, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_THREADS = 0xC0000129, + MD_NTSTATUS_WIN_STATUS_THREAD_NOT_IN_PROCESS = 0xC000012A, + MD_NTSTATUS_WIN_STATUS_TOKEN_ALREADY_IN_USE = 0xC000012B, + MD_NTSTATUS_WIN_STATUS_PAGEFILE_QUOTA_EXCEEDED = 0xC000012C, + MD_NTSTATUS_WIN_STATUS_COMMITMENT_LIMIT = 0xC000012D, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_LE_FORMAT = 0xC000012E, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_NOT_MZ = 0xC000012F, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_PROTECT = 0xC0000130, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_16 = 0xC0000131, + MD_NTSTATUS_WIN_STATUS_LOGON_SERVER_CONFLICT = 0xC0000132, + MD_NTSTATUS_WIN_STATUS_TIME_DIFFERENCE_AT_DC = 0xC0000133, + MD_NTSTATUS_WIN_STATUS_SYNCHRONIZATION_REQUIRED = 0xC0000134, + MD_NTSTATUS_WIN_STATUS_DLL_NOT_FOUND = 0xC0000135, + MD_NTSTATUS_WIN_STATUS_OPEN_FAILED = 0xC0000136, + MD_NTSTATUS_WIN_STATUS_IO_PRIVILEGE_FAILED = 0xC0000137, + MD_NTSTATUS_WIN_STATUS_ORDINAL_NOT_FOUND = 0xC0000138, + MD_NTSTATUS_WIN_STATUS_ENTRYPOINT_NOT_FOUND = 0xC0000139, + MD_NTSTATUS_WIN_STATUS_CONTROL_C_EXIT = 0xC000013A, + MD_NTSTATUS_WIN_STATUS_LOCAL_DISCONNECT = 0xC000013B, + MD_NTSTATUS_WIN_STATUS_REMOTE_DISCONNECT = 0xC000013C, + MD_NTSTATUS_WIN_STATUS_REMOTE_RESOURCES = 0xC000013D, + MD_NTSTATUS_WIN_STATUS_LINK_FAILED = 0xC000013E, + MD_NTSTATUS_WIN_STATUS_LINK_TIMEOUT = 0xC000013F, + MD_NTSTATUS_WIN_STATUS_INVALID_CONNECTION = 0xC0000140, + MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS = 0xC0000141, + MD_NTSTATUS_WIN_STATUS_DLL_INIT_FAILED = 0xC0000142, + MD_NTSTATUS_WIN_STATUS_MISSING_SYSTEMFILE = 0xC0000143, + MD_NTSTATUS_WIN_STATUS_UNHANDLED_EXCEPTION = 0xC0000144, + MD_NTSTATUS_WIN_STATUS_APP_INIT_FAILURE = 0xC0000145, + MD_NTSTATUS_WIN_STATUS_PAGEFILE_CREATE_FAILED = 0xC0000146, + MD_NTSTATUS_WIN_STATUS_NO_PAGEFILE = 0xC0000147, + MD_NTSTATUS_WIN_STATUS_INVALID_LEVEL = 0xC0000148, + MD_NTSTATUS_WIN_STATUS_WRONG_PASSWORD_CORE = 0xC0000149, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_FLOAT_CONTEXT = 0xC000014A, + MD_NTSTATUS_WIN_STATUS_PIPE_BROKEN = 0xC000014B, + MD_NTSTATUS_WIN_STATUS_REGISTRY_CORRUPT = 0xC000014C, + MD_NTSTATUS_WIN_STATUS_REGISTRY_IO_FAILED = 0xC000014D, + MD_NTSTATUS_WIN_STATUS_NO_EVENT_PAIR = 0xC000014E, + MD_NTSTATUS_WIN_STATUS_UNRECOGNIZED_VOLUME = 0xC000014F, + MD_NTSTATUS_WIN_STATUS_SERIAL_NO_DEVICE_INITED = 0xC0000150, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_ALIAS = 0xC0000151, + MD_NTSTATUS_WIN_STATUS_MEMBER_NOT_IN_ALIAS = 0xC0000152, + MD_NTSTATUS_WIN_STATUS_MEMBER_IN_ALIAS = 0xC0000153, + MD_NTSTATUS_WIN_STATUS_ALIAS_EXISTS = 0xC0000154, + MD_NTSTATUS_WIN_STATUS_LOGON_NOT_GRANTED = 0xC0000155, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_SECRETS = 0xC0000156, + MD_NTSTATUS_WIN_STATUS_SECRET_TOO_LONG = 0xC0000157, + MD_NTSTATUS_WIN_STATUS_INTERNAL_DB_ERROR = 0xC0000158, + MD_NTSTATUS_WIN_STATUS_FULLSCREEN_MODE = 0xC0000159, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_CONTEXT_IDS = 0xC000015A, + MD_NTSTATUS_WIN_STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015B, + MD_NTSTATUS_WIN_STATUS_NOT_REGISTRY_FILE = 0xC000015C, + MD_NTSTATUS_WIN_STATUS_NT_CROSS_ENCRYPTION_REQUIRED = 0xC000015D, + MD_NTSTATUS_WIN_STATUS_DOMAIN_CTRLR_CONFIG_ERROR = 0xC000015E, + MD_NTSTATUS_WIN_STATUS_FT_MISSING_MEMBER = 0xC000015F, + MD_NTSTATUS_WIN_STATUS_ILL_FORMED_SERVICE_ENTRY = 0xC0000160, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_CHARACTER = 0xC0000161, + MD_NTSTATUS_WIN_STATUS_UNMAPPABLE_CHARACTER = 0xC0000162, + MD_NTSTATUS_WIN_STATUS_UNDEFINED_CHARACTER = 0xC0000163, + MD_NTSTATUS_WIN_STATUS_FLOPPY_VOLUME = 0xC0000164, + MD_NTSTATUS_WIN_STATUS_FLOPPY_ID_MARK_NOT_FOUND = 0xC0000165, + MD_NTSTATUS_WIN_STATUS_FLOPPY_WRONG_CYLINDER = 0xC0000166, + MD_NTSTATUS_WIN_STATUS_FLOPPY_UNKNOWN_ERROR = 0xC0000167, + MD_NTSTATUS_WIN_STATUS_FLOPPY_BAD_REGISTERS = 0xC0000168, + MD_NTSTATUS_WIN_STATUS_DISK_RECALIBRATE_FAILED = 0xC0000169, + MD_NTSTATUS_WIN_STATUS_DISK_OPERATION_FAILED = 0xC000016A, + MD_NTSTATUS_WIN_STATUS_DISK_RESET_FAILED = 0xC000016B, + MD_NTSTATUS_WIN_STATUS_SHARED_IRQ_BUSY = 0xC000016C, + MD_NTSTATUS_WIN_STATUS_FT_ORPHANING = 0xC000016D, + MD_NTSTATUS_WIN_STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT = 0xC000016E, + MD_NTSTATUS_WIN_STATUS_PARTITION_FAILURE = 0xC0000172, + MD_NTSTATUS_WIN_STATUS_INVALID_BLOCK_LENGTH = 0xC0000173, + MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_PARTITIONED = 0xC0000174, + MD_NTSTATUS_WIN_STATUS_UNABLE_TO_LOCK_MEDIA = 0xC0000175, + MD_NTSTATUS_WIN_STATUS_UNABLE_TO_UNLOAD_MEDIA = 0xC0000176, + MD_NTSTATUS_WIN_STATUS_EOM_OVERFLOW = 0xC0000177, + MD_NTSTATUS_WIN_STATUS_NO_MEDIA = 0xC0000178, + MD_NTSTATUS_WIN_STATUS_NO_SUCH_MEMBER = 0xC000017A, + MD_NTSTATUS_WIN_STATUS_INVALID_MEMBER = 0xC000017B, + MD_NTSTATUS_WIN_STATUS_KEY_DELETED = 0xC000017C, + MD_NTSTATUS_WIN_STATUS_NO_LOG_SPACE = 0xC000017D, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_SIDS = 0xC000017E, + MD_NTSTATUS_WIN_STATUS_LM_CROSS_ENCRYPTION_REQUIRED = 0xC000017F, + MD_NTSTATUS_WIN_STATUS_KEY_HAS_CHILDREN = 0xC0000180, + MD_NTSTATUS_WIN_STATUS_CHILD_MUST_BE_VOLATILE = 0xC0000181, + MD_NTSTATUS_WIN_STATUS_DEVICE_CONFIGURATION_ERROR = 0xC0000182, + MD_NTSTATUS_WIN_STATUS_DRIVER_INTERNAL_ERROR = 0xC0000183, + MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_STATE = 0xC0000184, + MD_NTSTATUS_WIN_STATUS_IO_DEVICE_ERROR = 0xC0000185, + MD_NTSTATUS_WIN_STATUS_DEVICE_PROTOCOL_ERROR = 0xC0000186, + MD_NTSTATUS_WIN_STATUS_BACKUP_CONTROLLER = 0xC0000187, + MD_NTSTATUS_WIN_STATUS_LOG_FILE_FULL = 0xC0000188, + MD_NTSTATUS_WIN_STATUS_TOO_LATE = 0xC0000189, + MD_NTSTATUS_WIN_STATUS_NO_TRUST_LSA_SECRET = 0xC000018A, + MD_NTSTATUS_WIN_STATUS_NO_TRUST_SAM_ACCOUNT = 0xC000018B, + MD_NTSTATUS_WIN_STATUS_TRUSTED_DOMAIN_FAILURE = 0xC000018C, + MD_NTSTATUS_WIN_STATUS_TRUSTED_RELATIONSHIP_FAILURE = 0xC000018D, + MD_NTSTATUS_WIN_STATUS_EVENTLOG_FILE_CORRUPT = 0xC000018E, + MD_NTSTATUS_WIN_STATUS_EVENTLOG_CANT_START = 0xC000018F, + MD_NTSTATUS_WIN_STATUS_TRUST_FAILURE = 0xC0000190, + MD_NTSTATUS_WIN_STATUS_MUTANT_LIMIT_EXCEEDED = 0xC0000191, + MD_NTSTATUS_WIN_STATUS_NETLOGON_NOT_STARTED = 0xC0000192, + MD_NTSTATUS_WIN_STATUS_ACCOUNT_EXPIRED = 0xC0000193, + MD_NTSTATUS_WIN_STATUS_POSSIBLE_DEADLOCK = 0xC0000194, + MD_NTSTATUS_WIN_STATUS_NETWORK_CREDENTIAL_CONFLICT = 0xC0000195, + MD_NTSTATUS_WIN_STATUS_REMOTE_SESSION_LIMIT = 0xC0000196, + MD_NTSTATUS_WIN_STATUS_EVENTLOG_FILE_CHANGED = 0xC0000197, + MD_NTSTATUS_WIN_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 0xC0000198, + MD_NTSTATUS_WIN_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 0xC0000199, + MD_NTSTATUS_WIN_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT = 0xC000019A, + MD_NTSTATUS_WIN_STATUS_DOMAIN_TRUST_INCONSISTENT = 0xC000019B, + MD_NTSTATUS_WIN_STATUS_FS_DRIVER_REQUIRED = 0xC000019C, + MD_NTSTATUS_WIN_STATUS_IMAGE_ALREADY_LOADED_AS_DLL = 0xC000019D, + MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 0xC000019E, + MD_NTSTATUS_WIN_STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 0xC000019F, + MD_NTSTATUS_WIN_STATUS_SECURITY_STREAM_IS_INCONSISTENT = 0xC00001A0, + MD_NTSTATUS_WIN_STATUS_INVALID_LOCK_RANGE = 0xC00001A1, + MD_NTSTATUS_WIN_STATUS_INVALID_ACE_CONDITION = 0xC00001A2, + MD_NTSTATUS_WIN_STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT = 0xC00001A3, + MD_NTSTATUS_WIN_STATUS_NOTIFICATION_GUID_ALREADY_DEFINED = 0xC00001A4, + MD_NTSTATUS_WIN_STATUS_INVALID_EXCEPTION_HANDLER = 0xC00001A5, + MD_NTSTATUS_WIN_STATUS_DUPLICATE_PRIVILEGES = 0xC00001A6, + MD_NTSTATUS_WIN_STATUS_NOT_ALLOWED_ON_SYSTEM_FILE = 0xC00001A7, + MD_NTSTATUS_WIN_STATUS_REPAIR_NEEDED = 0xC00001A8, + MD_NTSTATUS_WIN_STATUS_QUOTA_NOT_ENABLED = 0xC00001A9, + MD_NTSTATUS_WIN_STATUS_NO_APPLICATION_PACKAGE = 0xC00001AA, + MD_NTSTATUS_WIN_STATUS_NETWORK_OPEN_RESTRICTION = 0xC0000201, + MD_NTSTATUS_WIN_STATUS_NO_USER_SESSION_KEY = 0xC0000202, + MD_NTSTATUS_WIN_STATUS_USER_SESSION_DELETED = 0xC0000203, + MD_NTSTATUS_WIN_STATUS_RESOURCE_LANG_NOT_FOUND = 0xC0000204, + MD_NTSTATUS_WIN_STATUS_INSUFF_SERVER_RESOURCES = 0xC0000205, + MD_NTSTATUS_WIN_STATUS_INVALID_BUFFER_SIZE = 0xC0000206, + MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS_COMPONENT = 0xC0000207, + MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS_WILDCARD = 0xC0000208, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_ADDRESSES = 0xC0000209, + MD_NTSTATUS_WIN_STATUS_ADDRESS_ALREADY_EXISTS = 0xC000020A, + MD_NTSTATUS_WIN_STATUS_ADDRESS_CLOSED = 0xC000020B, + MD_NTSTATUS_WIN_STATUS_CONNECTION_DISCONNECTED = 0xC000020C, + MD_NTSTATUS_WIN_STATUS_CONNECTION_RESET = 0xC000020D, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_NODES = 0xC000020E, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_ABORTED = 0xC000020F, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_TIMED_OUT = 0xC0000210, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_RELEASE = 0xC0000211, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_MATCH = 0xC0000212, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_RESPONDED = 0xC0000213, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_ID = 0xC0000214, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_TYPE = 0xC0000215, + MD_NTSTATUS_WIN_STATUS_NOT_SERVER_SESSION = 0xC0000216, + MD_NTSTATUS_WIN_STATUS_NOT_CLIENT_SESSION = 0xC0000217, + MD_NTSTATUS_WIN_STATUS_CANNOT_LOAD_REGISTRY_FILE = 0xC0000218, + MD_NTSTATUS_WIN_STATUS_DEBUG_ATTACH_FAILED = 0xC0000219, + MD_NTSTATUS_WIN_STATUS_SYSTEM_PROCESS_TERMINATED = 0xC000021A, + MD_NTSTATUS_WIN_STATUS_DATA_NOT_ACCEPTED = 0xC000021B, + MD_NTSTATUS_WIN_STATUS_NO_BROWSER_SERVERS_FOUND = 0xC000021C, + MD_NTSTATUS_WIN_STATUS_VDM_HARD_ERROR = 0xC000021D, + MD_NTSTATUS_WIN_STATUS_DRIVER_CANCEL_TIMEOUT = 0xC000021E, + MD_NTSTATUS_WIN_STATUS_REPLY_MESSAGE_MISMATCH = 0xC000021F, + MD_NTSTATUS_WIN_STATUS_MAPPED_ALIGNMENT = 0xC0000220, + MD_NTSTATUS_WIN_STATUS_IMAGE_CHECKSUM_MISMATCH = 0xC0000221, + MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA = 0xC0000222, + MD_NTSTATUS_WIN_STATUS_CLIENT_SERVER_PARAMETERS_INVALID = 0xC0000223, + MD_NTSTATUS_WIN_STATUS_PASSWORD_MUST_CHANGE = 0xC0000224, + MD_NTSTATUS_WIN_STATUS_NOT_FOUND = 0xC0000225, + MD_NTSTATUS_WIN_STATUS_NOT_TINY_STREAM = 0xC0000226, + MD_NTSTATUS_WIN_STATUS_RECOVERY_FAILURE = 0xC0000227, + MD_NTSTATUS_WIN_STATUS_STACK_OVERFLOW_READ = 0xC0000228, + MD_NTSTATUS_WIN_STATUS_FAIL_CHECK = 0xC0000229, + MD_NTSTATUS_WIN_STATUS_DUPLICATE_OBJECTID = 0xC000022A, + MD_NTSTATUS_WIN_STATUS_OBJECTID_EXISTS = 0xC000022B, + MD_NTSTATUS_WIN_STATUS_CONVERT_TO_LARGE = 0xC000022C, + MD_NTSTATUS_WIN_STATUS_RETRY = 0xC000022D, + MD_NTSTATUS_WIN_STATUS_FOUND_OUT_OF_SCOPE = 0xC000022E, + MD_NTSTATUS_WIN_STATUS_ALLOCATE_BUCKET = 0xC000022F, + MD_NTSTATUS_WIN_STATUS_PROPSET_NOT_FOUND = 0xC0000230, + MD_NTSTATUS_WIN_STATUS_MARSHALL_OVERFLOW = 0xC0000231, + MD_NTSTATUS_WIN_STATUS_INVALID_VARIANT = 0xC0000232, + MD_NTSTATUS_WIN_STATUS_DOMAIN_CONTROLLER_NOT_FOUND = 0xC0000233, + MD_NTSTATUS_WIN_STATUS_ACCOUNT_LOCKED_OUT = 0xC0000234, + MD_NTSTATUS_WIN_STATUS_HANDLE_NOT_CLOSABLE = 0xC0000235, + MD_NTSTATUS_WIN_STATUS_CONNECTION_REFUSED = 0xC0000236, + MD_NTSTATUS_WIN_STATUS_GRACEFUL_DISCONNECT = 0xC0000237, + MD_NTSTATUS_WIN_STATUS_ADDRESS_ALREADY_ASSOCIATED = 0xC0000238, + MD_NTSTATUS_WIN_STATUS_ADDRESS_NOT_ASSOCIATED = 0xC0000239, + MD_NTSTATUS_WIN_STATUS_CONNECTION_INVALID = 0xC000023A, + MD_NTSTATUS_WIN_STATUS_CONNECTION_ACTIVE = 0xC000023B, + MD_NTSTATUS_WIN_STATUS_NETWORK_UNREACHABLE = 0xC000023C, + MD_NTSTATUS_WIN_STATUS_HOST_UNREACHABLE = 0xC000023D, + MD_NTSTATUS_WIN_STATUS_PROTOCOL_UNREACHABLE = 0xC000023E, + MD_NTSTATUS_WIN_STATUS_PORT_UNREACHABLE = 0xC000023F, + MD_NTSTATUS_WIN_STATUS_REQUEST_ABORTED = 0xC0000240, + MD_NTSTATUS_WIN_STATUS_CONNECTION_ABORTED = 0xC0000241, + MD_NTSTATUS_WIN_STATUS_BAD_COMPRESSION_BUFFER = 0xC0000242, + MD_NTSTATUS_WIN_STATUS_USER_MAPPED_FILE = 0xC0000243, + MD_NTSTATUS_WIN_STATUS_AUDIT_FAILED = 0xC0000244, + MD_NTSTATUS_WIN_STATUS_TIMER_RESOLUTION_NOT_SET = 0xC0000245, + MD_NTSTATUS_WIN_STATUS_CONNECTION_COUNT_LIMIT = 0xC0000246, + MD_NTSTATUS_WIN_STATUS_LOGIN_TIME_RESTRICTION = 0xC0000247, + MD_NTSTATUS_WIN_STATUS_LOGIN_WKSTA_RESTRICTION = 0xC0000248, + MD_NTSTATUS_WIN_STATUS_IMAGE_MP_UP_MISMATCH = 0xC0000249, + MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_LOGON_INFO = 0xC0000250, + MD_NTSTATUS_WIN_STATUS_BAD_DLL_ENTRYPOINT = 0xC0000251, + MD_NTSTATUS_WIN_STATUS_BAD_SERVICE_ENTRYPOINT = 0xC0000252, + MD_NTSTATUS_WIN_STATUS_LPC_REPLY_LOST = 0xC0000253, + MD_NTSTATUS_WIN_STATUS_IP_ADDRESS_CONFLICT1 = 0xC0000254, + MD_NTSTATUS_WIN_STATUS_IP_ADDRESS_CONFLICT2 = 0xC0000255, + MD_NTSTATUS_WIN_STATUS_REGISTRY_QUOTA_LIMIT = 0xC0000256, + MD_NTSTATUS_WIN_STATUS_PATH_NOT_COVERED = 0xC0000257, + MD_NTSTATUS_WIN_STATUS_NO_CALLBACK_ACTIVE = 0xC0000258, + MD_NTSTATUS_WIN_STATUS_LICENSE_QUOTA_EXCEEDED = 0xC0000259, + MD_NTSTATUS_WIN_STATUS_PWD_TOO_SHORT = 0xC000025A, + MD_NTSTATUS_WIN_STATUS_PWD_TOO_RECENT = 0xC000025B, + MD_NTSTATUS_WIN_STATUS_PWD_HISTORY_CONFLICT = 0xC000025C, + MD_NTSTATUS_WIN_STATUS_PLUGPLAY_NO_DEVICE = 0xC000025E, + MD_NTSTATUS_WIN_STATUS_UNSUPPORTED_COMPRESSION = 0xC000025F, + MD_NTSTATUS_WIN_STATUS_INVALID_HW_PROFILE = 0xC0000260, + MD_NTSTATUS_WIN_STATUS_INVALID_PLUGPLAY_DEVICE_PATH = 0xC0000261, + MD_NTSTATUS_WIN_STATUS_DRIVER_ORDINAL_NOT_FOUND = 0xC0000262, + MD_NTSTATUS_WIN_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263, + MD_NTSTATUS_WIN_STATUS_RESOURCE_NOT_OWNED = 0xC0000264, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_LINKS = 0xC0000265, + MD_NTSTATUS_WIN_STATUS_QUOTA_LIST_INCONSISTENT = 0xC0000266, + MD_NTSTATUS_WIN_STATUS_FILE_IS_OFFLINE = 0xC0000267, + MD_NTSTATUS_WIN_STATUS_EVALUATION_EXPIRATION = 0xC0000268, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_DLL_RELOCATION = 0xC0000269, + MD_NTSTATUS_WIN_STATUS_LICENSE_VIOLATION = 0xC000026A, + MD_NTSTATUS_WIN_STATUS_DLL_INIT_FAILED_LOGOFF = 0xC000026B, + MD_NTSTATUS_WIN_STATUS_DRIVER_UNABLE_TO_LOAD = 0xC000026C, + MD_NTSTATUS_WIN_STATUS_DFS_UNAVAILABLE = 0xC000026D, + MD_NTSTATUS_WIN_STATUS_VOLUME_DISMOUNTED = 0xC000026E, + MD_NTSTATUS_WIN_STATUS_WX86_INTERNAL_ERROR = 0xC000026F, + MD_NTSTATUS_WIN_STATUS_WX86_FLOAT_STACK_CHECK = 0xC0000270, + MD_NTSTATUS_WIN_STATUS_VALIDATE_CONTINUE = 0xC0000271, + MD_NTSTATUS_WIN_STATUS_NO_MATCH = 0xC0000272, + MD_NTSTATUS_WIN_STATUS_NO_MORE_MATCHES = 0xC0000273, + MD_NTSTATUS_WIN_STATUS_NOT_A_REPARSE_POINT = 0xC0000275, + MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_INVALID = 0xC0000276, + MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_MISMATCH = 0xC0000277, + MD_NTSTATUS_WIN_STATUS_IO_REPARSE_DATA_INVALID = 0xC0000278, + MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_NOT_HANDLED = 0xC0000279, + MD_NTSTATUS_WIN_STATUS_PWD_TOO_LONG = 0xC000027A, + MD_NTSTATUS_WIN_STATUS_STOWED_EXCEPTION = 0xC000027B, + MD_NTSTATUS_WIN_STATUS_REPARSE_POINT_NOT_RESOLVED = 0xC0000280, + MD_NTSTATUS_WIN_STATUS_DIRECTORY_IS_A_REPARSE_POINT = 0xC0000281, + MD_NTSTATUS_WIN_STATUS_RANGE_LIST_CONFLICT = 0xC0000282, + MD_NTSTATUS_WIN_STATUS_SOURCE_ELEMENT_EMPTY = 0xC0000283, + MD_NTSTATUS_WIN_STATUS_DESTINATION_ELEMENT_FULL = 0xC0000284, + MD_NTSTATUS_WIN_STATUS_ILLEGAL_ELEMENT_ADDRESS = 0xC0000285, + MD_NTSTATUS_WIN_STATUS_MAGAZINE_NOT_PRESENT = 0xC0000286, + MD_NTSTATUS_WIN_STATUS_REINITIALIZATION_NEEDED = 0xC0000287, + MD_NTSTATUS_WIN_STATUS_ENCRYPTION_FAILED = 0xC000028A, + MD_NTSTATUS_WIN_STATUS_DECRYPTION_FAILED = 0xC000028B, + MD_NTSTATUS_WIN_STATUS_RANGE_NOT_FOUND = 0xC000028C, + MD_NTSTATUS_WIN_STATUS_NO_RECOVERY_POLICY = 0xC000028D, + MD_NTSTATUS_WIN_STATUS_NO_EFS = 0xC000028E, + MD_NTSTATUS_WIN_STATUS_WRONG_EFS = 0xC000028F, + MD_NTSTATUS_WIN_STATUS_NO_USER_KEYS = 0xC0000290, + MD_NTSTATUS_WIN_STATUS_FILE_NOT_ENCRYPTED = 0xC0000291, + MD_NTSTATUS_WIN_STATUS_NOT_EXPORT_FORMAT = 0xC0000292, + MD_NTSTATUS_WIN_STATUS_FILE_ENCRYPTED = 0xC0000293, + MD_NTSTATUS_WIN_STATUS_WMI_GUID_NOT_FOUND = 0xC0000295, + MD_NTSTATUS_WIN_STATUS_WMI_INSTANCE_NOT_FOUND = 0xC0000296, + MD_NTSTATUS_WIN_STATUS_WMI_ITEMID_NOT_FOUND = 0xC0000297, + MD_NTSTATUS_WIN_STATUS_WMI_TRY_AGAIN = 0xC0000298, + MD_NTSTATUS_WIN_STATUS_SHARED_POLICY = 0xC0000299, + MD_NTSTATUS_WIN_STATUS_POLICY_OBJECT_NOT_FOUND = 0xC000029A, + MD_NTSTATUS_WIN_STATUS_POLICY_ONLY_IN_DS = 0xC000029B, + MD_NTSTATUS_WIN_STATUS_VOLUME_NOT_UPGRADED = 0xC000029C, + MD_NTSTATUS_WIN_STATUS_REMOTE_STORAGE_NOT_ACTIVE = 0xC000029D, + MD_NTSTATUS_WIN_STATUS_REMOTE_STORAGE_MEDIA_ERROR = 0xC000029E, + MD_NTSTATUS_WIN_STATUS_NO_TRACKING_SERVICE = 0xC000029F, + MD_NTSTATUS_WIN_STATUS_SERVER_SID_MISMATCH = 0xC00002A0, + MD_NTSTATUS_WIN_STATUS_DS_NO_ATTRIBUTE_OR_VALUE = 0xC00002A1, + MD_NTSTATUS_WIN_STATUS_DS_INVALID_ATTRIBUTE_SYNTAX = 0xC00002A2, + MD_NTSTATUS_WIN_STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED = 0xC00002A3, + MD_NTSTATUS_WIN_STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS = 0xC00002A4, + MD_NTSTATUS_WIN_STATUS_DS_BUSY = 0xC00002A5, + MD_NTSTATUS_WIN_STATUS_DS_UNAVAILABLE = 0xC00002A6, + MD_NTSTATUS_WIN_STATUS_DS_NO_RIDS_ALLOCATED = 0xC00002A7, + MD_NTSTATUS_WIN_STATUS_DS_NO_MORE_RIDS = 0xC00002A8, + MD_NTSTATUS_WIN_STATUS_DS_INCORRECT_ROLE_OWNER = 0xC00002A9, + MD_NTSTATUS_WIN_STATUS_DS_RIDMGR_INIT_ERROR = 0xC00002AA, + MD_NTSTATUS_WIN_STATUS_DS_OBJ_CLASS_VIOLATION = 0xC00002AB, + MD_NTSTATUS_WIN_STATUS_DS_CANT_ON_NON_LEAF = 0xC00002AC, + MD_NTSTATUS_WIN_STATUS_DS_CANT_ON_RDN = 0xC00002AD, + MD_NTSTATUS_WIN_STATUS_DS_CANT_MOD_OBJ_CLASS = 0xC00002AE, + MD_NTSTATUS_WIN_STATUS_DS_CROSS_DOM_MOVE_FAILED = 0xC00002AF, + MD_NTSTATUS_WIN_STATUS_DS_GC_NOT_AVAILABLE = 0xC00002B0, + MD_NTSTATUS_WIN_STATUS_DIRECTORY_SERVICE_REQUIRED = 0xC00002B1, + MD_NTSTATUS_WIN_STATUS_REPARSE_ATTRIBUTE_CONFLICT = 0xC00002B2, + MD_NTSTATUS_WIN_STATUS_CANT_ENABLE_DENY_ONLY = 0xC00002B3, + MD_NTSTATUS_WIN_STATUS_FLOAT_MULTIPLE_FAULTS = 0xC00002B4, + MD_NTSTATUS_WIN_STATUS_FLOAT_MULTIPLE_TRAPS = 0xC00002B5, + MD_NTSTATUS_WIN_STATUS_DEVICE_REMOVED = 0xC00002B6, + MD_NTSTATUS_WIN_STATUS_JOURNAL_DELETE_IN_PROGRESS = 0xC00002B7, + MD_NTSTATUS_WIN_STATUS_JOURNAL_NOT_ACTIVE = 0xC00002B8, + MD_NTSTATUS_WIN_STATUS_NOINTERFACE = 0xC00002B9, + MD_NTSTATUS_WIN_STATUS_DS_RIDMGR_DISABLED = 0xC00002BA, + MD_NTSTATUS_WIN_STATUS_DS_ADMIN_LIMIT_EXCEEDED = 0xC00002C1, + MD_NTSTATUS_WIN_STATUS_DRIVER_FAILED_SLEEP = 0xC00002C2, + MD_NTSTATUS_WIN_STATUS_MUTUAL_AUTHENTICATION_FAILED = 0xC00002C3, + MD_NTSTATUS_WIN_STATUS_CORRUPT_SYSTEM_FILE = 0xC00002C4, + MD_NTSTATUS_WIN_STATUS_DATATYPE_MISALIGNMENT_ERROR = 0xC00002C5, + MD_NTSTATUS_WIN_STATUS_WMI_READ_ONLY = 0xC00002C6, + MD_NTSTATUS_WIN_STATUS_WMI_SET_FAILURE = 0xC00002C7, + MD_NTSTATUS_WIN_STATUS_COMMITMENT_MINIMUM = 0xC00002C8, + MD_NTSTATUS_WIN_STATUS_REG_NAT_CONSUMPTION = 0xC00002C9, + MD_NTSTATUS_WIN_STATUS_TRANSPORT_FULL = 0xC00002CA, + MD_NTSTATUS_WIN_STATUS_DS_SAM_INIT_FAILURE = 0xC00002CB, + MD_NTSTATUS_WIN_STATUS_ONLY_IF_CONNECTED = 0xC00002CC, + MD_NTSTATUS_WIN_STATUS_DS_SENSITIVE_GROUP_VIOLATION = 0xC00002CD, + MD_NTSTATUS_WIN_STATUS_PNP_RESTART_ENUMERATION = 0xC00002CE, + MD_NTSTATUS_WIN_STATUS_JOURNAL_ENTRY_DELETED = 0xC00002CF, + MD_NTSTATUS_WIN_STATUS_DS_CANT_MOD_PRIMARYGROUPID = 0xC00002D0, + MD_NTSTATUS_WIN_STATUS_SYSTEM_IMAGE_BAD_SIGNATURE = 0xC00002D1, + MD_NTSTATUS_WIN_STATUS_PNP_REBOOT_REQUIRED = 0xC00002D2, + MD_NTSTATUS_WIN_STATUS_POWER_STATE_INVALID = 0xC00002D3, + MD_NTSTATUS_WIN_STATUS_DS_INVALID_GROUP_TYPE = 0xC00002D4, + MD_NTSTATUS_WIN_STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 0xC00002D5, + MD_NTSTATUS_WIN_STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 0xC00002D6, + MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D7, + MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 0xC00002D8, + MD_NTSTATUS_WIN_STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D9, + MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 0xC00002DA, + MD_NTSTATUS_WIN_STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 0xC00002DB, + MD_NTSTATUS_WIN_STATUS_DS_HAVE_PRIMARY_MEMBERS = 0xC00002DC, + MD_NTSTATUS_WIN_STATUS_WMI_NOT_SUPPORTED = 0xC00002DD, + MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_POWER = 0xC00002DE, + MD_NTSTATUS_WIN_STATUS_SAM_NEED_BOOTKEY_PASSWORD = 0xC00002DF, + MD_NTSTATUS_WIN_STATUS_SAM_NEED_BOOTKEY_FLOPPY = 0xC00002E0, + MD_NTSTATUS_WIN_STATUS_DS_CANT_START = 0xC00002E1, + MD_NTSTATUS_WIN_STATUS_DS_INIT_FAILURE = 0xC00002E2, + MD_NTSTATUS_WIN_STATUS_SAM_INIT_FAILURE = 0xC00002E3, + MD_NTSTATUS_WIN_STATUS_DS_GC_REQUIRED = 0xC00002E4, + MD_NTSTATUS_WIN_STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 0xC00002E5, + MD_NTSTATUS_WIN_STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 0xC00002E6, + MD_NTSTATUS_WIN_STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 0xC00002E7, + MD_NTSTATUS_WIN_STATUS_MULTIPLE_FAULT_VIOLATION = 0xC00002E8, + MD_NTSTATUS_WIN_STATUS_CURRENT_DOMAIN_NOT_ALLOWED = 0xC00002E9, + MD_NTSTATUS_WIN_STATUS_CANNOT_MAKE = 0xC00002EA, + MD_NTSTATUS_WIN_STATUS_SYSTEM_SHUTDOWN = 0xC00002EB, + MD_NTSTATUS_WIN_STATUS_DS_INIT_FAILURE_CONSOLE = 0xC00002EC, + MD_NTSTATUS_WIN_STATUS_DS_SAM_INIT_FAILURE_CONSOLE = 0xC00002ED, + MD_NTSTATUS_WIN_STATUS_UNFINISHED_CONTEXT_DELETED = 0xC00002EE, + MD_NTSTATUS_WIN_STATUS_NO_TGT_REPLY = 0xC00002EF, + MD_NTSTATUS_WIN_STATUS_OBJECTID_NOT_FOUND = 0xC00002F0, + MD_NTSTATUS_WIN_STATUS_NO_IP_ADDRESSES = 0xC00002F1, + MD_NTSTATUS_WIN_STATUS_WRONG_CREDENTIAL_HANDLE = 0xC00002F2, + MD_NTSTATUS_WIN_STATUS_CRYPTO_SYSTEM_INVALID = 0xC00002F3, + MD_NTSTATUS_WIN_STATUS_MAX_REFERRALS_EXCEEDED = 0xC00002F4, + MD_NTSTATUS_WIN_STATUS_MUST_BE_KDC = 0xC00002F5, + MD_NTSTATUS_WIN_STATUS_STRONG_CRYPTO_NOT_SUPPORTED = 0xC00002F6, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_PRINCIPALS = 0xC00002F7, + MD_NTSTATUS_WIN_STATUS_NO_PA_DATA = 0xC00002F8, + MD_NTSTATUS_WIN_STATUS_PKINIT_NAME_MISMATCH = 0xC00002F9, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_LOGON_REQUIRED = 0xC00002FA, + MD_NTSTATUS_WIN_STATUS_KDC_INVALID_REQUEST = 0xC00002FB, + MD_NTSTATUS_WIN_STATUS_KDC_UNABLE_TO_REFER = 0xC00002FC, + MD_NTSTATUS_WIN_STATUS_KDC_UNKNOWN_ETYPE = 0xC00002FD, + MD_NTSTATUS_WIN_STATUS_SHUTDOWN_IN_PROGRESS = 0xC00002FE, + MD_NTSTATUS_WIN_STATUS_SERVER_SHUTDOWN_IN_PROGRESS = 0xC00002FF, + MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED_ON_SBS = 0xC0000300, + MD_NTSTATUS_WIN_STATUS_WMI_GUID_DISCONNECTED = 0xC0000301, + MD_NTSTATUS_WIN_STATUS_WMI_ALREADY_DISABLED = 0xC0000302, + MD_NTSTATUS_WIN_STATUS_WMI_ALREADY_ENABLED = 0xC0000303, + MD_NTSTATUS_WIN_STATUS_MFT_TOO_FRAGMENTED = 0xC0000304, + MD_NTSTATUS_WIN_STATUS_COPY_PROTECTION_FAILURE = 0xC0000305, + MD_NTSTATUS_WIN_STATUS_CSS_AUTHENTICATION_FAILURE = 0xC0000306, + MD_NTSTATUS_WIN_STATUS_CSS_KEY_NOT_PRESENT = 0xC0000307, + MD_NTSTATUS_WIN_STATUS_CSS_KEY_NOT_ESTABLISHED = 0xC0000308, + MD_NTSTATUS_WIN_STATUS_CSS_SCRAMBLED_SECTOR = 0xC0000309, + MD_NTSTATUS_WIN_STATUS_CSS_REGION_MISMATCH = 0xC000030A, + MD_NTSTATUS_WIN_STATUS_CSS_RESETS_EXHAUSTED = 0xC000030B, + MD_NTSTATUS_WIN_STATUS_PASSWORD_CHANGE_REQUIRED = 0xC000030C, + MD_NTSTATUS_WIN_STATUS_PKINIT_FAILURE = 0xC0000320, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_SUBSYSTEM_FAILURE = 0xC0000321, + MD_NTSTATUS_WIN_STATUS_NO_KERB_KEY = 0xC0000322, + MD_NTSTATUS_WIN_STATUS_HOST_DOWN = 0xC0000350, + MD_NTSTATUS_WIN_STATUS_UNSUPPORTED_PREAUTH = 0xC0000351, + MD_NTSTATUS_WIN_STATUS_EFS_ALG_BLOB_TOO_BIG = 0xC0000352, + MD_NTSTATUS_WIN_STATUS_PORT_NOT_SET = 0xC0000353, + MD_NTSTATUS_WIN_STATUS_DEBUGGER_INACTIVE = 0xC0000354, + MD_NTSTATUS_WIN_STATUS_DS_VERSION_CHECK_FAILURE = 0xC0000355, + MD_NTSTATUS_WIN_STATUS_AUDITING_DISABLED = 0xC0000356, + MD_NTSTATUS_WIN_STATUS_PRENT4_MACHINE_ACCOUNT = 0xC0000357, + MD_NTSTATUS_WIN_STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 0xC0000358, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_32 = 0xC0000359, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_64 = 0xC000035A, + MD_NTSTATUS_WIN_STATUS_BAD_BINDINGS = 0xC000035B, + MD_NTSTATUS_WIN_STATUS_NETWORK_SESSION_EXPIRED = 0xC000035C, + MD_NTSTATUS_WIN_STATUS_APPHELP_BLOCK = 0xC000035D, + MD_NTSTATUS_WIN_STATUS_ALL_SIDS_FILTERED = 0xC000035E, + MD_NTSTATUS_WIN_STATUS_NOT_SAFE_MODE_DRIVER = 0xC000035F, + MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT = 0xC0000361, + MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_PATH = 0xC0000362, + MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER = 0xC0000363, + MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_OTHER = 0xC0000364, + MD_NTSTATUS_WIN_STATUS_FAILED_DRIVER_ENTRY = 0xC0000365, + MD_NTSTATUS_WIN_STATUS_DEVICE_ENUMERATION_ERROR = 0xC0000366, + MD_NTSTATUS_WIN_STATUS_MOUNT_POINT_NOT_RESOLVED = 0xC0000368, + MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_OBJECT_PARAMETER = 0xC0000369, + MD_NTSTATUS_WIN_STATUS_MCA_OCCURED = 0xC000036A, + MD_NTSTATUS_WIN_STATUS_DRIVER_BLOCKED_CRITICAL = 0xC000036B, + MD_NTSTATUS_WIN_STATUS_DRIVER_BLOCKED = 0xC000036C, + MD_NTSTATUS_WIN_STATUS_DRIVER_DATABASE_ERROR = 0xC000036D, + MD_NTSTATUS_WIN_STATUS_SYSTEM_HIVE_TOO_LARGE = 0xC000036E, + MD_NTSTATUS_WIN_STATUS_INVALID_IMPORT_OF_NON_DLL = 0xC000036F, + MD_NTSTATUS_WIN_STATUS_NO_SECRETS = 0xC0000371, + MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 0xC0000372, + MD_NTSTATUS_WIN_STATUS_FAILED_STACK_SWITCH = 0xC0000373, + MD_NTSTATUS_WIN_STATUS_HEAP_CORRUPTION = 0xC0000374, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_WRONG_PIN = 0xC0000380, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_CARD_BLOCKED = 0xC0000381, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED = 0xC0000382, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_CARD = 0xC0000383, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_KEY_CONTAINER = 0xC0000384, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_CERTIFICATE = 0xC0000385, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_KEYSET = 0xC0000386, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_IO_ERROR = 0xC0000387, + MD_NTSTATUS_WIN_STATUS_DOWNGRADE_DETECTED = 0xC0000388, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_CERT_REVOKED = 0xC0000389, + MD_NTSTATUS_WIN_STATUS_ISSUING_CA_UNTRUSTED = 0xC000038A, + MD_NTSTATUS_WIN_STATUS_REVOCATION_OFFLINE_C = 0xC000038B, + MD_NTSTATUS_WIN_STATUS_PKINIT_CLIENT_FAILURE = 0xC000038C, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_CERT_EXPIRED = 0xC000038D, + MD_NTSTATUS_WIN_STATUS_DRIVER_FAILED_PRIOR_UNLOAD = 0xC000038E, + MD_NTSTATUS_WIN_STATUS_SMARTCARD_SILENT_CONTEXT = 0xC000038F, + MD_NTSTATUS_WIN_STATUS_PER_USER_TRUST_QUOTA_EXCEEDED = 0xC0000401, + MD_NTSTATUS_WIN_STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED = 0xC0000402, + MD_NTSTATUS_WIN_STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED = 0xC0000403, + MD_NTSTATUS_WIN_STATUS_DS_NAME_NOT_UNIQUE = 0xC0000404, + MD_NTSTATUS_WIN_STATUS_DS_DUPLICATE_ID_FOUND = 0xC0000405, + MD_NTSTATUS_WIN_STATUS_DS_GROUP_CONVERSION_ERROR = 0xC0000406, + MD_NTSTATUS_WIN_STATUS_VOLSNAP_PREPARE_HIBERNATE = 0xC0000407, + MD_NTSTATUS_WIN_STATUS_USER2USER_REQUIRED = 0xC0000408, + MD_NTSTATUS_WIN_STATUS_STACK_BUFFER_OVERRUN = 0xC0000409, + MD_NTSTATUS_WIN_STATUS_NO_S4U_PROT_SUPPORT = 0xC000040A, + MD_NTSTATUS_WIN_STATUS_CROSSREALM_DELEGATION_FAILURE = 0xC000040B, + MD_NTSTATUS_WIN_STATUS_REVOCATION_OFFLINE_KDC = 0xC000040C, + MD_NTSTATUS_WIN_STATUS_ISSUING_CA_UNTRUSTED_KDC = 0xC000040D, + MD_NTSTATUS_WIN_STATUS_KDC_CERT_EXPIRED = 0xC000040E, + MD_NTSTATUS_WIN_STATUS_KDC_CERT_REVOKED = 0xC000040F, + MD_NTSTATUS_WIN_STATUS_PARAMETER_QUOTA_EXCEEDED = 0xC0000410, + MD_NTSTATUS_WIN_STATUS_HIBERNATION_FAILURE = 0xC0000411, + MD_NTSTATUS_WIN_STATUS_DELAY_LOAD_FAILED = 0xC0000412, + MD_NTSTATUS_WIN_STATUS_AUTHENTICATION_FIREWALL_FAILED = 0xC0000413, + MD_NTSTATUS_WIN_STATUS_VDM_DISALLOWED = 0xC0000414, + MD_NTSTATUS_WIN_STATUS_HUNG_DISPLAY_DRIVER_THREAD = 0xC0000415, + MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 0xC0000416, + MD_NTSTATUS_WIN_STATUS_INVALID_CRUNTIME_PARAMETER = 0xC0000417, + MD_NTSTATUS_WIN_STATUS_NTLM_BLOCKED = 0xC0000418, + MD_NTSTATUS_WIN_STATUS_DS_SRC_SID_EXISTS_IN_FOREST = 0xC0000419, + MD_NTSTATUS_WIN_STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST = 0xC000041A, + MD_NTSTATUS_WIN_STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST = 0xC000041B, + MD_NTSTATUS_WIN_STATUS_INVALID_USER_PRINCIPAL_NAME = 0xC000041C, + MD_NTSTATUS_WIN_STATUS_FATAL_USER_CALLBACK_EXCEPTION = 0xC000041D, + MD_NTSTATUS_WIN_STATUS_ASSERTION_FAILURE = 0xC0000420, + MD_NTSTATUS_WIN_STATUS_VERIFIER_STOP = 0xC0000421, + MD_NTSTATUS_WIN_STATUS_CALLBACK_POP_STACK = 0xC0000423, + MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_DRIVER_BLOCKED = 0xC0000424, + MD_NTSTATUS_WIN_STATUS_HIVE_UNLOADED = 0xC0000425, + MD_NTSTATUS_WIN_STATUS_COMPRESSION_DISABLED = 0xC0000426, + MD_NTSTATUS_WIN_STATUS_FILE_SYSTEM_LIMITATION = 0xC0000427, + MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_HASH = 0xC0000428, + MD_NTSTATUS_WIN_STATUS_NOT_CAPABLE = 0xC0000429, + MD_NTSTATUS_WIN_STATUS_REQUEST_OUT_OF_SEQUENCE = 0xC000042A, + MD_NTSTATUS_WIN_STATUS_IMPLEMENTATION_LIMIT = 0xC000042B, + MD_NTSTATUS_WIN_STATUS_ELEVATION_REQUIRED = 0xC000042C, + MD_NTSTATUS_WIN_STATUS_NO_SECURITY_CONTEXT = 0xC000042D, + MD_NTSTATUS_WIN_STATUS_PKU2U_CERT_FAILURE = 0xC000042F, + MD_NTSTATUS_WIN_STATUS_BEYOND_VDL = 0xC0000432, + MD_NTSTATUS_WIN_STATUS_ENCOUNTERED_WRITE_IN_PROGRESS = 0xC0000433, + MD_NTSTATUS_WIN_STATUS_PTE_CHANGED = 0xC0000434, + MD_NTSTATUS_WIN_STATUS_PURGE_FAILED = 0xC0000435, + MD_NTSTATUS_WIN_STATUS_CRED_REQUIRES_CONFIRMATION = 0xC0000440, + MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 0xC0000441, + MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER = 0xC0000442, + MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 0xC0000443, + MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 0xC0000444, + MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_FILE_NOT_CSE = 0xC0000445, + MD_NTSTATUS_WIN_STATUS_INVALID_LABEL = 0xC0000446, + MD_NTSTATUS_WIN_STATUS_DRIVER_PROCESS_TERMINATED = 0xC0000450, + MD_NTSTATUS_WIN_STATUS_AMBIGUOUS_SYSTEM_DEVICE = 0xC0000451, + MD_NTSTATUS_WIN_STATUS_SYSTEM_DEVICE_NOT_FOUND = 0xC0000452, + MD_NTSTATUS_WIN_STATUS_RESTART_BOOT_APPLICATION = 0xC0000453, + MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_NVRAM_RESOURCES = 0xC0000454, + MD_NTSTATUS_WIN_STATUS_INVALID_SESSION = 0xC0000455, + MD_NTSTATUS_WIN_STATUS_THREAD_ALREADY_IN_SESSION = 0xC0000456, + MD_NTSTATUS_WIN_STATUS_THREAD_NOT_IN_SESSION = 0xC0000457, + MD_NTSTATUS_WIN_STATUS_INVALID_WEIGHT = 0xC0000458, + MD_NTSTATUS_WIN_STATUS_REQUEST_PAUSED = 0xC0000459, + MD_NTSTATUS_WIN_STATUS_NO_RANGES_PROCESSED = 0xC0000460, + MD_NTSTATUS_WIN_STATUS_DISK_RESOURCES_EXHAUSTED = 0xC0000461, + MD_NTSTATUS_WIN_STATUS_NEEDS_REMEDIATION = 0xC0000462, + MD_NTSTATUS_WIN_STATUS_DEVICE_FEATURE_NOT_SUPPORTED = 0xC0000463, + MD_NTSTATUS_WIN_STATUS_DEVICE_UNREACHABLE = 0xC0000464, + MD_NTSTATUS_WIN_STATUS_INVALID_TOKEN = 0xC0000465, + MD_NTSTATUS_WIN_STATUS_SERVER_UNAVAILABLE = 0xC0000466, + MD_NTSTATUS_WIN_STATUS_FILE_NOT_AVAILABLE = 0xC0000467, + MD_NTSTATUS_WIN_STATUS_DEVICE_INSUFFICIENT_RESOURCES = 0xC0000468, + MD_NTSTATUS_WIN_STATUS_PACKAGE_UPDATING = 0xC0000469, + MD_NTSTATUS_WIN_STATUS_NOT_READ_FROM_COPY = 0xC000046A, + MD_NTSTATUS_WIN_STATUS_FT_WRITE_FAILURE = 0xC000046B, + MD_NTSTATUS_WIN_STATUS_FT_DI_SCAN_REQUIRED = 0xC000046C, + MD_NTSTATUS_WIN_STATUS_OBJECT_NOT_EXTERNALLY_BACKED = 0xC000046D, + MD_NTSTATUS_WIN_STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN = 0xC000046E, + MD_NTSTATUS_WIN_STATUS_DATA_CHECKSUM_ERROR = 0xC0000470, + MD_NTSTATUS_WIN_STATUS_INTERMIXED_KERNEL_EA_OPERATION = 0xC0000471, + MD_NTSTATUS_WIN_STATUS_TRIM_READ_ZERO_NOT_SUPPORTED = 0xC0000472, + MD_NTSTATUS_WIN_STATUS_TOO_MANY_SEGMENT_DESCRIPTORS = 0xC0000473, + MD_NTSTATUS_WIN_STATUS_INVALID_OFFSET_ALIGNMENT = 0xC0000474, + MD_NTSTATUS_WIN_STATUS_INVALID_FIELD_IN_PARAMETER_LIST = 0xC0000475, + MD_NTSTATUS_WIN_STATUS_OPERATION_IN_PROGRESS = 0xC0000476, + MD_NTSTATUS_WIN_STATUS_INVALID_INITIATOR_TARGET_PATH = 0xC0000477, + MD_NTSTATUS_WIN_STATUS_SCRUB_DATA_DISABLED = 0xC0000478, + MD_NTSTATUS_WIN_STATUS_NOT_REDUNDANT_STORAGE = 0xC0000479, + MD_NTSTATUS_WIN_STATUS_RESIDENT_FILE_NOT_SUPPORTED = 0xC000047A, + MD_NTSTATUS_WIN_STATUS_COMPRESSED_FILE_NOT_SUPPORTED = 0xC000047B, + MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_SUPPORTED = 0xC000047C, + MD_NTSTATUS_WIN_STATUS_IO_OPERATION_TIMEOUT = 0xC000047D, + MD_NTSTATUS_WIN_STATUS_SYSTEM_NEEDS_REMEDIATION = 0xC000047E, + MD_NTSTATUS_WIN_STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN = 0xC000047F, + MD_NTSTATUS_WIN_STATUS_SHARE_UNAVAILABLE = 0xC0000480, + MD_NTSTATUS_WIN_STATUS_APISET_NOT_HOSTED = 0xC0000481, + MD_NTSTATUS_WIN_STATUS_APISET_NOT_PRESENT = 0xC0000482, + MD_NTSTATUS_WIN_STATUS_DEVICE_HARDWARE_ERROR = 0xC0000483, + MD_NTSTATUS_WIN_STATUS_INVALID_TASK_NAME = 0xC0000500, + MD_NTSTATUS_WIN_STATUS_INVALID_TASK_INDEX = 0xC0000501, + MD_NTSTATUS_WIN_STATUS_THREAD_ALREADY_IN_TASK = 0xC0000502, + MD_NTSTATUS_WIN_STATUS_CALLBACK_BYPASS = 0xC0000503, + MD_NTSTATUS_WIN_STATUS_UNDEFINED_SCOPE = 0xC0000504, + MD_NTSTATUS_WIN_STATUS_INVALID_CAP = 0xC0000505, + MD_NTSTATUS_WIN_STATUS_NOT_GUI_PROCESS = 0xC0000506, + MD_NTSTATUS_WIN_STATUS_FAIL_FAST_EXCEPTION = 0xC0000602, + MD_NTSTATUS_WIN_STATUS_IMAGE_CERT_REVOKED = 0xC0000603, + MD_NTSTATUS_WIN_STATUS_DYNAMIC_CODE_BLOCKED = 0xC0000604, + MD_NTSTATUS_WIN_STATUS_PORT_CLOSED = 0xC0000700, + MD_NTSTATUS_WIN_STATUS_MESSAGE_LOST = 0xC0000701, + MD_NTSTATUS_WIN_STATUS_INVALID_MESSAGE = 0xC0000702, + MD_NTSTATUS_WIN_STATUS_REQUEST_CANCELED = 0xC0000703, + MD_NTSTATUS_WIN_STATUS_RECURSIVE_DISPATCH = 0xC0000704, + MD_NTSTATUS_WIN_STATUS_LPC_RECEIVE_BUFFER_EXPECTED = 0xC0000705, + MD_NTSTATUS_WIN_STATUS_LPC_INVALID_CONNECTION_USAGE = 0xC0000706, + MD_NTSTATUS_WIN_STATUS_LPC_REQUESTS_NOT_ALLOWED = 0xC0000707, + MD_NTSTATUS_WIN_STATUS_RESOURCE_IN_USE = 0xC0000708, + MD_NTSTATUS_WIN_STATUS_HARDWARE_MEMORY_ERROR = 0xC0000709, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_HANDLE_EXCEPTION = 0xC000070A, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED = 0xC000070B, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED = 0xC000070C, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED = 0xC000070D, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED = 0xC000070E, + MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASED_DURING_OPERATION = 0xC000070F, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING = 0xC0000710, + MD_NTSTATUS_WIN_STATUS_APC_RETURNED_WHILE_IMPERSONATING = 0xC0000711, + MD_NTSTATUS_WIN_STATUS_PROCESS_IS_PROTECTED = 0xC0000712, + MD_NTSTATUS_WIN_STATUS_MCA_EXCEPTION = 0xC0000713, + MD_NTSTATUS_WIN_STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE = 0xC0000714, + MD_NTSTATUS_WIN_STATUS_SYMLINK_CLASS_DISABLED = 0xC0000715, + MD_NTSTATUS_WIN_STATUS_INVALID_IDN_NORMALIZATION = 0xC0000716, + MD_NTSTATUS_WIN_STATUS_NO_UNICODE_TRANSLATION = 0xC0000717, + MD_NTSTATUS_WIN_STATUS_ALREADY_REGISTERED = 0xC0000718, + MD_NTSTATUS_WIN_STATUS_CONTEXT_MISMATCH = 0xC0000719, + MD_NTSTATUS_WIN_STATUS_PORT_ALREADY_HAS_COMPLETION_LIST = 0xC000071A, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_THREAD_PRIORITY = 0xC000071B, + MD_NTSTATUS_WIN_STATUS_INVALID_THREAD = 0xC000071C, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_TRANSACTION = 0xC000071D, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_LDR_LOCK = 0xC000071E, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_LANG = 0xC000071F, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_PRI_BACK = 0xC0000720, + MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_THREAD_AFFINITY = 0xC0000721, + MD_NTSTATUS_WIN_STATUS_DISK_REPAIR_DISABLED = 0xC0000800, + MD_NTSTATUS_WIN_STATUS_DS_DOMAIN_RENAME_IN_PROGRESS = 0xC0000801, + MD_NTSTATUS_WIN_STATUS_DISK_QUOTA_EXCEEDED = 0xC0000802, + MD_NTSTATUS_WIN_STATUS_CONTENT_BLOCKED = 0xC0000804, + MD_NTSTATUS_WIN_STATUS_BAD_CLUSTERS = 0xC0000805, + MD_NTSTATUS_WIN_STATUS_VOLUME_DIRTY = 0xC0000806, + MD_NTSTATUS_WIN_STATUS_DISK_REPAIR_UNSUCCESSFUL = 0xC0000808, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_OVERFULL = 0xC0000809, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_CORRUPTED = 0xC000080A, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_UNAVAILABLE = 0xC000080B, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_DELETED_FULL = 0xC000080C, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_CLEARED = 0xC000080D, + MD_NTSTATUS_WIN_STATUS_ORPHAN_NAME_EXHAUSTED = 0xC000080E, + MD_NTSTATUS_WIN_STATUS_PROACTIVE_SCAN_IN_PROGRESS = 0xC000080F, + MD_NTSTATUS_WIN_STATUS_ENCRYPTED_IO_NOT_POSSIBLE = 0xC0000810, + MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_UPLEVEL_RECORDS = 0xC0000811, + MD_NTSTATUS_WIN_STATUS_FILE_CHECKED_OUT = 0xC0000901, + MD_NTSTATUS_WIN_STATUS_CHECKOUT_REQUIRED = 0xC0000902, + MD_NTSTATUS_WIN_STATUS_BAD_FILE_TYPE = 0xC0000903, + MD_NTSTATUS_WIN_STATUS_FILE_TOO_LARGE = 0xC0000904, + MD_NTSTATUS_WIN_STATUS_FORMS_AUTH_REQUIRED = 0xC0000905, + MD_NTSTATUS_WIN_STATUS_VIRUS_INFECTED = 0xC0000906, + MD_NTSTATUS_WIN_STATUS_VIRUS_DELETED = 0xC0000907, + MD_NTSTATUS_WIN_STATUS_BAD_MCFG_TABLE = 0xC0000908, + MD_NTSTATUS_WIN_STATUS_CANNOT_BREAK_OPLOCK = 0xC0000909, + MD_NTSTATUS_WIN_STATUS_BAD_KEY = 0xC000090A, + MD_NTSTATUS_WIN_STATUS_BAD_DATA = 0xC000090B, + MD_NTSTATUS_WIN_STATUS_NO_KEY = 0xC000090C, + MD_NTSTATUS_WIN_STATUS_FILE_HANDLE_REVOKED = 0xC0000910, + MD_NTSTATUS_WIN_STATUS_WOW_ASSERTION = 0xC0009898, + MD_NTSTATUS_WIN_STATUS_INVALID_SIGNATURE = 0xC000A000, + MD_NTSTATUS_WIN_STATUS_HMAC_NOT_SUPPORTED = 0xC000A001, + MD_NTSTATUS_WIN_STATUS_AUTH_TAG_MISMATCH = 0xC000A002, + MD_NTSTATUS_WIN_STATUS_INVALID_STATE_TRANSITION = 0xC000A003, + MD_NTSTATUS_WIN_STATUS_INVALID_KERNEL_INFO_VERSION = 0xC000A004, + MD_NTSTATUS_WIN_STATUS_INVALID_PEP_INFO_VERSION = 0xC000A005, + MD_NTSTATUS_WIN_STATUS_IPSEC_QUEUE_OVERFLOW = 0xC000A010, + MD_NTSTATUS_WIN_STATUS_ND_QUEUE_OVERFLOW = 0xC000A011, + MD_NTSTATUS_WIN_STATUS_HOPLIMIT_EXCEEDED = 0xC000A012, + MD_NTSTATUS_WIN_STATUS_PROTOCOL_NOT_SUPPORTED = 0xC000A013, + MD_NTSTATUS_WIN_STATUS_FASTPATH_REJECTED = 0xC000A014, + MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 0xC000A080, + MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 0xC000A081, + MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 0xC000A082, + MD_NTSTATUS_WIN_STATUS_XML_PARSE_ERROR = 0xC000A083, + MD_NTSTATUS_WIN_STATUS_XMLDSIG_ERROR = 0xC000A084, + MD_NTSTATUS_WIN_STATUS_WRONG_COMPARTMENT = 0xC000A085, + MD_NTSTATUS_WIN_STATUS_AUTHIP_FAILURE = 0xC000A086, + MD_NTSTATUS_WIN_STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS = 0xC000A087, + MD_NTSTATUS_WIN_STATUS_DS_OID_NOT_FOUND = 0xC000A088, + MD_NTSTATUS_WIN_STATUS_INCORRECT_ACCOUNT_TYPE = 0xC000A089, + MD_NTSTATUS_WIN_STATUS_HASH_NOT_SUPPORTED = 0xC000A100, + MD_NTSTATUS_WIN_STATUS_HASH_NOT_PRESENT = 0xC000A101, + MD_NTSTATUS_WIN_STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED = 0xC000A121, + MD_NTSTATUS_WIN_STATUS_GPIO_CLIENT_INFORMATION_INVALID = 0xC000A122, + MD_NTSTATUS_WIN_STATUS_GPIO_VERSION_NOT_SUPPORTED = 0xC000A123, + MD_NTSTATUS_WIN_STATUS_GPIO_INVALID_REGISTRATION_PACKET = 0xC000A124, + MD_NTSTATUS_WIN_STATUS_GPIO_OPERATION_DENIED = 0xC000A125, + MD_NTSTATUS_WIN_STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE = 0xC000A126, + MD_NTSTATUS_WIN_STATUS_CANNOT_SWITCH_RUNLEVEL = 0xC000A141, + MD_NTSTATUS_WIN_STATUS_INVALID_RUNLEVEL_SETTING = 0xC000A142, + MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_TIMEOUT = 0xC000A143, + MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT = 0xC000A145, + MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_IN_PROGRESS = 0xC000A146, + MD_NTSTATUS_WIN_STATUS_NOT_APPCONTAINER = 0xC000A200, + MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED_IN_APPCONTAINER = 0xC000A201, + MD_NTSTATUS_WIN_STATUS_INVALID_PACKAGE_SID_LENGTH = 0xC000A202, + MD_NTSTATUS_WIN_STATUS_APP_DATA_NOT_FOUND = 0xC000A281, + MD_NTSTATUS_WIN_STATUS_APP_DATA_EXPIRED = 0xC000A282, + MD_NTSTATUS_WIN_STATUS_APP_DATA_CORRUPT = 0xC000A283, + MD_NTSTATUS_WIN_STATUS_APP_DATA_LIMIT_EXCEEDED = 0xC000A284, + MD_NTSTATUS_WIN_STATUS_APP_DATA_REBOOT_REQUIRED = 0xC000A285, + MD_NTSTATUS_WIN_STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED = 0xC000A2A1, + MD_NTSTATUS_WIN_STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED = 0xC000A2A2, + MD_NTSTATUS_WIN_STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED = 0xC000A2A3, + MD_NTSTATUS_WIN_STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED = 0xC000A2A4, + MD_NTSTATUS_WIN_DBG_NO_STATE_CHANGE = 0xC0010001, + MD_NTSTATUS_WIN_DBG_APP_NOT_IDLE = 0xC0010002, + MD_NTSTATUS_WIN_RPC_NT_INVALID_STRING_BINDING = 0xC0020001, + MD_NTSTATUS_WIN_RPC_NT_WRONG_KIND_OF_BINDING = 0xC0020002, + MD_NTSTATUS_WIN_RPC_NT_INVALID_BINDING = 0xC0020003, + MD_NTSTATUS_WIN_RPC_NT_PROTSEQ_NOT_SUPPORTED = 0xC0020004, + MD_NTSTATUS_WIN_RPC_NT_INVALID_RPC_PROTSEQ = 0xC0020005, + MD_NTSTATUS_WIN_RPC_NT_INVALID_STRING_UUID = 0xC0020006, + MD_NTSTATUS_WIN_RPC_NT_INVALID_ENDPOINT_FORMAT = 0xC0020007, + MD_NTSTATUS_WIN_RPC_NT_INVALID_NET_ADDR = 0xC0020008, + MD_NTSTATUS_WIN_RPC_NT_NO_ENDPOINT_FOUND = 0xC0020009, + MD_NTSTATUS_WIN_RPC_NT_INVALID_TIMEOUT = 0xC002000A, + MD_NTSTATUS_WIN_RPC_NT_OBJECT_NOT_FOUND = 0xC002000B, + MD_NTSTATUS_WIN_RPC_NT_ALREADY_REGISTERED = 0xC002000C, + MD_NTSTATUS_WIN_RPC_NT_TYPE_ALREADY_REGISTERED = 0xC002000D, + MD_NTSTATUS_WIN_RPC_NT_ALREADY_LISTENING = 0xC002000E, + MD_NTSTATUS_WIN_RPC_NT_NO_PROTSEQS_REGISTERED = 0xC002000F, + MD_NTSTATUS_WIN_RPC_NT_NOT_LISTENING = 0xC0020010, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_MGR_TYPE = 0xC0020011, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_IF = 0xC0020012, + MD_NTSTATUS_WIN_RPC_NT_NO_BINDINGS = 0xC0020013, + MD_NTSTATUS_WIN_RPC_NT_NO_PROTSEQS = 0xC0020014, + MD_NTSTATUS_WIN_RPC_NT_CANT_CREATE_ENDPOINT = 0xC0020015, + MD_NTSTATUS_WIN_RPC_NT_OUT_OF_RESOURCES = 0xC0020016, + MD_NTSTATUS_WIN_RPC_NT_SERVER_UNAVAILABLE = 0xC0020017, + MD_NTSTATUS_WIN_RPC_NT_SERVER_TOO_BUSY = 0xC0020018, + MD_NTSTATUS_WIN_RPC_NT_INVALID_NETWORK_OPTIONS = 0xC0020019, + MD_NTSTATUS_WIN_RPC_NT_NO_CALL_ACTIVE = 0xC002001A, + MD_NTSTATUS_WIN_RPC_NT_CALL_FAILED = 0xC002001B, + MD_NTSTATUS_WIN_RPC_NT_CALL_FAILED_DNE = 0xC002001C, + MD_NTSTATUS_WIN_RPC_NT_PROTOCOL_ERROR = 0xC002001D, + MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_TRANS_SYN = 0xC002001F, + MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_TYPE = 0xC0020021, + MD_NTSTATUS_WIN_RPC_NT_INVALID_TAG = 0xC0020022, + MD_NTSTATUS_WIN_RPC_NT_INVALID_BOUND = 0xC0020023, + MD_NTSTATUS_WIN_RPC_NT_NO_ENTRY_NAME = 0xC0020024, + MD_NTSTATUS_WIN_RPC_NT_INVALID_NAME_SYNTAX = 0xC0020025, + MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_NAME_SYNTAX = 0xC0020026, + MD_NTSTATUS_WIN_RPC_NT_UUID_NO_ADDRESS = 0xC0020028, + MD_NTSTATUS_WIN_RPC_NT_DUPLICATE_ENDPOINT = 0xC0020029, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_TYPE = 0xC002002A, + MD_NTSTATUS_WIN_RPC_NT_MAX_CALLS_TOO_SMALL = 0xC002002B, + MD_NTSTATUS_WIN_RPC_NT_STRING_TOO_LONG = 0xC002002C, + MD_NTSTATUS_WIN_RPC_NT_PROTSEQ_NOT_FOUND = 0xC002002D, + MD_NTSTATUS_WIN_RPC_NT_PROCNUM_OUT_OF_RANGE = 0xC002002E, + MD_NTSTATUS_WIN_RPC_NT_BINDING_HAS_NO_AUTH = 0xC002002F, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_SERVICE = 0xC0020030, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_LEVEL = 0xC0020031, + MD_NTSTATUS_WIN_RPC_NT_INVALID_AUTH_IDENTITY = 0xC0020032, + MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHZ_SERVICE = 0xC0020033, + MD_NTSTATUS_WIN_EPT_NT_INVALID_ENTRY = 0xC0020034, + MD_NTSTATUS_WIN_EPT_NT_CANT_PERFORM_OP = 0xC0020035, + MD_NTSTATUS_WIN_EPT_NT_NOT_REGISTERED = 0xC0020036, + MD_NTSTATUS_WIN_RPC_NT_NOTHING_TO_EXPORT = 0xC0020037, + MD_NTSTATUS_WIN_RPC_NT_INCOMPLETE_NAME = 0xC0020038, + MD_NTSTATUS_WIN_RPC_NT_INVALID_VERS_OPTION = 0xC0020039, + MD_NTSTATUS_WIN_RPC_NT_NO_MORE_MEMBERS = 0xC002003A, + MD_NTSTATUS_WIN_RPC_NT_NOT_ALL_OBJS_UNEXPORTED = 0xC002003B, + MD_NTSTATUS_WIN_RPC_NT_INTERFACE_NOT_FOUND = 0xC002003C, + MD_NTSTATUS_WIN_RPC_NT_ENTRY_ALREADY_EXISTS = 0xC002003D, + MD_NTSTATUS_WIN_RPC_NT_ENTRY_NOT_FOUND = 0xC002003E, + MD_NTSTATUS_WIN_RPC_NT_NAME_SERVICE_UNAVAILABLE = 0xC002003F, + MD_NTSTATUS_WIN_RPC_NT_INVALID_NAF_ID = 0xC0020040, + MD_NTSTATUS_WIN_RPC_NT_CANNOT_SUPPORT = 0xC0020041, + MD_NTSTATUS_WIN_RPC_NT_NO_CONTEXT_AVAILABLE = 0xC0020042, + MD_NTSTATUS_WIN_RPC_NT_INTERNAL_ERROR = 0xC0020043, + MD_NTSTATUS_WIN_RPC_NT_ZERO_DIVIDE = 0xC0020044, + MD_NTSTATUS_WIN_RPC_NT_ADDRESS_ERROR = 0xC0020045, + MD_NTSTATUS_WIN_RPC_NT_FP_DIV_ZERO = 0xC0020046, + MD_NTSTATUS_WIN_RPC_NT_FP_UNDERFLOW = 0xC0020047, + MD_NTSTATUS_WIN_RPC_NT_FP_OVERFLOW = 0xC0020048, + MD_NTSTATUS_WIN_RPC_NT_CALL_IN_PROGRESS = 0xC0020049, + MD_NTSTATUS_WIN_RPC_NT_NO_MORE_BINDINGS = 0xC002004A, + MD_NTSTATUS_WIN_RPC_NT_GROUP_MEMBER_NOT_FOUND = 0xC002004B, + MD_NTSTATUS_WIN_EPT_NT_CANT_CREATE = 0xC002004C, + MD_NTSTATUS_WIN_RPC_NT_INVALID_OBJECT = 0xC002004D, + MD_NTSTATUS_WIN_RPC_NT_NO_INTERFACES = 0xC002004F, + MD_NTSTATUS_WIN_RPC_NT_CALL_CANCELLED = 0xC0020050, + MD_NTSTATUS_WIN_RPC_NT_BINDING_INCOMPLETE = 0xC0020051, + MD_NTSTATUS_WIN_RPC_NT_COMM_FAILURE = 0xC0020052, + MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_AUTHN_LEVEL = 0xC0020053, + MD_NTSTATUS_WIN_RPC_NT_NO_PRINC_NAME = 0xC0020054, + MD_NTSTATUS_WIN_RPC_NT_NOT_RPC_ERROR = 0xC0020055, + MD_NTSTATUS_WIN_RPC_NT_SEC_PKG_ERROR = 0xC0020057, + MD_NTSTATUS_WIN_RPC_NT_NOT_CANCELLED = 0xC0020058, + MD_NTSTATUS_WIN_RPC_NT_INVALID_ASYNC_HANDLE = 0xC0020062, + MD_NTSTATUS_WIN_RPC_NT_INVALID_ASYNC_CALL = 0xC0020063, + MD_NTSTATUS_WIN_RPC_NT_PROXY_ACCESS_DENIED = 0xC0020064, + MD_NTSTATUS_WIN_RPC_NT_COOKIE_AUTH_FAILED = 0xC0020065, + MD_NTSTATUS_WIN_RPC_NT_NO_MORE_ENTRIES = 0xC0030001, + MD_NTSTATUS_WIN_RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = 0xC0030002, + MD_NTSTATUS_WIN_RPC_NT_SS_CHAR_TRANS_SHORT_FILE = 0xC0030003, + MD_NTSTATUS_WIN_RPC_NT_SS_IN_NULL_CONTEXT = 0xC0030004, + MD_NTSTATUS_WIN_RPC_NT_SS_CONTEXT_MISMATCH = 0xC0030005, + MD_NTSTATUS_WIN_RPC_NT_SS_CONTEXT_DAMAGED = 0xC0030006, + MD_NTSTATUS_WIN_RPC_NT_SS_HANDLES_MISMATCH = 0xC0030007, + MD_NTSTATUS_WIN_RPC_NT_SS_CANNOT_GET_CALL_HANDLE = 0xC0030008, + MD_NTSTATUS_WIN_RPC_NT_NULL_REF_POINTER = 0xC0030009, + MD_NTSTATUS_WIN_RPC_NT_ENUM_VALUE_OUT_OF_RANGE = 0xC003000A, + MD_NTSTATUS_WIN_RPC_NT_BYTE_COUNT_TOO_SMALL = 0xC003000B, + MD_NTSTATUS_WIN_RPC_NT_BAD_STUB_DATA = 0xC003000C, + MD_NTSTATUS_WIN_RPC_NT_INVALID_ES_ACTION = 0xC0030059, + MD_NTSTATUS_WIN_RPC_NT_WRONG_ES_VERSION = 0xC003005A, + MD_NTSTATUS_WIN_RPC_NT_WRONG_STUB_VERSION = 0xC003005B, + MD_NTSTATUS_WIN_RPC_NT_INVALID_PIPE_OBJECT = 0xC003005C, + MD_NTSTATUS_WIN_RPC_NT_INVALID_PIPE_OPERATION = 0xC003005D, + MD_NTSTATUS_WIN_RPC_NT_WRONG_PIPE_VERSION = 0xC003005E, + MD_NTSTATUS_WIN_RPC_NT_PIPE_CLOSED = 0xC003005F, + MD_NTSTATUS_WIN_RPC_NT_PIPE_DISCIPLINE_ERROR = 0xC0030060, + MD_NTSTATUS_WIN_RPC_NT_PIPE_EMPTY = 0xC0030061, + MD_NTSTATUS_WIN_STATUS_PNP_BAD_MPS_TABLE = 0xC0040035, + MD_NTSTATUS_WIN_STATUS_PNP_TRANSLATION_FAILED = 0xC0040036, + MD_NTSTATUS_WIN_STATUS_PNP_IRQ_TRANSLATION_FAILED = 0xC0040037, + MD_NTSTATUS_WIN_STATUS_PNP_INVALID_ID = 0xC0040038, + MD_NTSTATUS_WIN_STATUS_IO_REISSUE_AS_CACHED = 0xC0040039, + MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NAME_INVALID = 0xC00A0001, + MD_NTSTATUS_WIN_STATUS_CTX_INVALID_PD = 0xC00A0002, + MD_NTSTATUS_WIN_STATUS_CTX_PD_NOT_FOUND = 0xC00A0003, + MD_NTSTATUS_WIN_STATUS_CTX_CLOSE_PENDING = 0xC00A0006, + MD_NTSTATUS_WIN_STATUS_CTX_NO_OUTBUF = 0xC00A0007, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_INF_NOT_FOUND = 0xC00A0008, + MD_NTSTATUS_WIN_STATUS_CTX_INVALID_MODEMNAME = 0xC00A0009, + MD_NTSTATUS_WIN_STATUS_CTX_RESPONSE_ERROR = 0xC00A000A, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_TIMEOUT = 0xC00A000B, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_NO_CARRIER = 0xC00A000C, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE = 0xC00A000D, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_BUSY = 0xC00A000E, + MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_VOICE = 0xC00A000F, + MD_NTSTATUS_WIN_STATUS_CTX_TD_ERROR = 0xC00A0010, + MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_CLIENT_INVALID = 0xC00A0012, + MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_NOT_AVAILABLE = 0xC00A0013, + MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_EXPIRED = 0xC00A0014, + MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NOT_FOUND = 0xC00A0015, + MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NAME_COLLISION = 0xC00A0016, + MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_BUSY = 0xC00A0017, + MD_NTSTATUS_WIN_STATUS_CTX_BAD_VIDEO_MODE = 0xC00A0018, + MD_NTSTATUS_WIN_STATUS_CTX_GRAPHICS_INVALID = 0xC00A0022, + MD_NTSTATUS_WIN_STATUS_CTX_NOT_CONSOLE = 0xC00A0024, + MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_QUERY_TIMEOUT = 0xC00A0026, + MD_NTSTATUS_WIN_STATUS_CTX_CONSOLE_DISCONNECT = 0xC00A0027, + MD_NTSTATUS_WIN_STATUS_CTX_CONSOLE_CONNECT = 0xC00A0028, + MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_DENIED = 0xC00A002A, + MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_ACCESS_DENIED = 0xC00A002B, + MD_NTSTATUS_WIN_STATUS_CTX_INVALID_WD = 0xC00A002E, + MD_NTSTATUS_WIN_STATUS_CTX_WD_NOT_FOUND = 0xC00A002F, + MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_INVALID = 0xC00A0030, + MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_DISABLED = 0xC00A0031, + MD_NTSTATUS_WIN_STATUS_RDP_PROTOCOL_ERROR = 0xC00A0032, + MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_LICENSE_NOT_SET = 0xC00A0033, + MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_LICENSE_IN_USE = 0xC00A0034, + MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 0xC00A0035, + MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_NOT_RUNNING = 0xC00A0036, + MD_NTSTATUS_WIN_STATUS_CTX_LOGON_DISABLED = 0xC00A0037, + MD_NTSTATUS_WIN_STATUS_CTX_SECURITY_LAYER_ERROR = 0xC00A0038, + MD_NTSTATUS_WIN_STATUS_TS_INCOMPATIBLE_SESSIONS = 0xC00A0039, + MD_NTSTATUS_WIN_STATUS_TS_VIDEO_SUBSYSTEM_ERROR = 0xC00A003A, + MD_NTSTATUS_WIN_STATUS_MUI_FILE_NOT_FOUND = 0xC00B0001, + MD_NTSTATUS_WIN_STATUS_MUI_INVALID_FILE = 0xC00B0002, + MD_NTSTATUS_WIN_STATUS_MUI_INVALID_RC_CONFIG = 0xC00B0003, + MD_NTSTATUS_WIN_STATUS_MUI_INVALID_LOCALE_NAME = 0xC00B0004, + MD_NTSTATUS_WIN_STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME = 0xC00B0005, + MD_NTSTATUS_WIN_STATUS_MUI_FILE_NOT_LOADED = 0xC00B0006, + MD_NTSTATUS_WIN_STATUS_RESOURCE_ENUM_USER_STOP = 0xC00B0007, + MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NODE = 0xC0130001, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_EXISTS = 0xC0130002, + MD_NTSTATUS_WIN_STATUS_CLUSTER_JOIN_IN_PROGRESS = 0xC0130003, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_FOUND = 0xC0130004, + MD_NTSTATUS_WIN_STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND = 0xC0130005, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_EXISTS = 0xC0130006, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_NOT_FOUND = 0xC0130007, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NETINTERFACE_EXISTS = 0xC0130008, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NETINTERFACE_NOT_FOUND = 0xC0130009, + MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_REQUEST = 0xC013000A, + MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NETWORK_PROVIDER = 0xC013000B, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_DOWN = 0xC013000C, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_UNREACHABLE = 0xC013000D, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_MEMBER = 0xC013000E, + MD_NTSTATUS_WIN_STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS = 0xC013000F, + MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NETWORK = 0xC0130010, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NO_NET_ADAPTERS = 0xC0130011, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_UP = 0xC0130012, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_PAUSED = 0xC0130013, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_PAUSED = 0xC0130014, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NO_SECURITY_CONTEXT = 0xC0130015, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_NOT_INTERNAL = 0xC0130016, + MD_NTSTATUS_WIN_STATUS_CLUSTER_POISONED = 0xC0130017, + MD_NTSTATUS_WIN_STATUS_CLUSTER_NON_CSV_PATH = 0xC0130018, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL = 0xC0130019, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS = 0xC0130020, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR = 0xC0130021, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_REDIRECTED = 0xC0130022, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_NOT_REDIRECTED = 0xC0130023, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_DRAINING = 0xC0130024, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS = 0xC0130025, + MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL = 0xC0130026, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_OPCODE = 0xC0140001, + MD_NTSTATUS_WIN_STATUS_ACPI_STACK_OVERFLOW = 0xC0140002, + MD_NTSTATUS_WIN_STATUS_ACPI_ASSERT_FAILED = 0xC0140003, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_INDEX = 0xC0140004, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ARGUMENT = 0xC0140005, + MD_NTSTATUS_WIN_STATUS_ACPI_FATAL = 0xC0140006, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_SUPERNAME = 0xC0140007, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ARGTYPE = 0xC0140008, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_OBJTYPE = 0xC0140009, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_TARGETTYPE = 0xC014000A, + MD_NTSTATUS_WIN_STATUS_ACPI_INCORRECT_ARGUMENT_COUNT = 0xC014000B, + MD_NTSTATUS_WIN_STATUS_ACPI_ADDRESS_NOT_MAPPED = 0xC014000C, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_EVENTTYPE = 0xC014000D, + MD_NTSTATUS_WIN_STATUS_ACPI_HANDLER_COLLISION = 0xC014000E, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_DATA = 0xC014000F, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_REGION = 0xC0140010, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ACCESS_SIZE = 0xC0140011, + MD_NTSTATUS_WIN_STATUS_ACPI_ACQUIRE_GLOBAL_LOCK = 0xC0140012, + MD_NTSTATUS_WIN_STATUS_ACPI_ALREADY_INITIALIZED = 0xC0140013, + MD_NTSTATUS_WIN_STATUS_ACPI_NOT_INITIALIZED = 0xC0140014, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_MUTEX_LEVEL = 0xC0140015, + MD_NTSTATUS_WIN_STATUS_ACPI_MUTEX_NOT_OWNED = 0xC0140016, + MD_NTSTATUS_WIN_STATUS_ACPI_MUTEX_NOT_OWNER = 0xC0140017, + MD_NTSTATUS_WIN_STATUS_ACPI_RS_ACCESS = 0xC0140018, + MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_TABLE = 0xC0140019, + MD_NTSTATUS_WIN_STATUS_ACPI_REG_HANDLER_FAILED = 0xC0140020, + MD_NTSTATUS_WIN_STATUS_ACPI_POWER_REQUEST_FAILED = 0xC0140021, + MD_NTSTATUS_WIN_STATUS_SXS_SECTION_NOT_FOUND = 0xC0150001, + MD_NTSTATUS_WIN_STATUS_SXS_CANT_GEN_ACTCTX = 0xC0150002, + MD_NTSTATUS_WIN_STATUS_SXS_INVALID_ACTCTXDATA_FORMAT = 0xC0150003, + MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_NOT_FOUND = 0xC0150004, + MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_FORMAT_ERROR = 0xC0150005, + MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_PARSE_ERROR = 0xC0150006, + MD_NTSTATUS_WIN_STATUS_SXS_ACTIVATION_CONTEXT_DISABLED = 0xC0150007, + MD_NTSTATUS_WIN_STATUS_SXS_KEY_NOT_FOUND = 0xC0150008, + MD_NTSTATUS_WIN_STATUS_SXS_VERSION_CONFLICT = 0xC0150009, + MD_NTSTATUS_WIN_STATUS_SXS_WRONG_SECTION_TYPE = 0xC015000A, + MD_NTSTATUS_WIN_STATUS_SXS_THREAD_QUERIES_DISABLED = 0xC015000B, + MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_MISSING = 0xC015000C, + MD_NTSTATUS_WIN_STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET = 0xC015000E, + MD_NTSTATUS_WIN_STATUS_SXS_EARLY_DEACTIVATION = 0xC015000F, + MD_NTSTATUS_WIN_STATUS_SXS_INVALID_DEACTIVATION = 0xC0150010, + MD_NTSTATUS_WIN_STATUS_SXS_MULTIPLE_DEACTIVATION = 0xC0150011, + MD_NTSTATUS_WIN_STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 0xC0150012, + MD_NTSTATUS_WIN_STATUS_SXS_PROCESS_TERMINATION_REQUESTED = 0xC0150013, + MD_NTSTATUS_WIN_STATUS_SXS_CORRUPT_ACTIVATION_STACK = 0xC0150014, + MD_NTSTATUS_WIN_STATUS_SXS_CORRUPTION = 0xC0150015, + MD_NTSTATUS_WIN_STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 0xC0150016, + MD_NTSTATUS_WIN_STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 0xC0150017, + MD_NTSTATUS_WIN_STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 0xC0150018, + MD_NTSTATUS_WIN_STATUS_SXS_IDENTITY_PARSE_ERROR = 0xC0150019, + MD_NTSTATUS_WIN_STATUS_SXS_COMPONENT_STORE_CORRUPT = 0xC015001A, + MD_NTSTATUS_WIN_STATUS_SXS_FILE_HASH_MISMATCH = 0xC015001B, + MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 0xC015001C, + MD_NTSTATUS_WIN_STATUS_SXS_IDENTITIES_DIFFERENT = 0xC015001D, + MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 0xC015001E, + MD_NTSTATUS_WIN_STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY = 0xC015001F, + MD_NTSTATUS_WIN_STATUS_ADVANCED_INSTALLER_FAILED = 0xC0150020, + MD_NTSTATUS_WIN_STATUS_XML_ENCODING_MISMATCH = 0xC0150021, + MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_TOO_BIG = 0xC0150022, + MD_NTSTATUS_WIN_STATUS_SXS_SETTING_NOT_REGISTERED = 0xC0150023, + MD_NTSTATUS_WIN_STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 0xC0150024, + MD_NTSTATUS_WIN_STATUS_SMI_PRIMITIVE_INSTALLER_FAILED = 0xC0150025, + MD_NTSTATUS_WIN_STATUS_GENERIC_COMMAND_FAILED = 0xC0150026, + MD_NTSTATUS_WIN_STATUS_SXS_FILE_HASH_MISSING = 0xC0150027, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONAL_CONFLICT = 0xC0190001, + MD_NTSTATUS_WIN_STATUS_INVALID_TRANSACTION = 0xC0190002, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ACTIVE = 0xC0190003, + MD_NTSTATUS_WIN_STATUS_TM_INITIALIZATION_FAILED = 0xC0190004, + MD_NTSTATUS_WIN_STATUS_RM_NOT_ACTIVE = 0xC0190005, + MD_NTSTATUS_WIN_STATUS_RM_METADATA_CORRUPT = 0xC0190006, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_JOINED = 0xC0190007, + MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_RM = 0xC0190008, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE = 0xC019000A, + MD_NTSTATUS_WIN_STATUS_LOG_RESIZE_INVALID_SIZE = 0xC019000B, + MD_NTSTATUS_WIN_STATUS_REMOTE_FILE_VERSION_MISMATCH = 0xC019000C, + MD_NTSTATUS_WIN_STATUS_CRM_PROTOCOL_ALREADY_EXISTS = 0xC019000F, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_PROPAGATION_FAILED = 0xC0190010, + MD_NTSTATUS_WIN_STATUS_CRM_PROTOCOL_NOT_FOUND = 0xC0190011, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_SUPERIOR_EXISTS = 0xC0190012, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_REQUEST_NOT_VALID = 0xC0190013, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_REQUESTED = 0xC0190014, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_ALREADY_ABORTED = 0xC0190015, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_ALREADY_COMMITTED = 0xC0190016, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER = 0xC0190017, + MD_NTSTATUS_WIN_STATUS_CURRENT_TRANSACTION_NOT_VALID = 0xC0190018, + MD_NTSTATUS_WIN_STATUS_LOG_GROWTH_FAILED = 0xC0190019, + MD_NTSTATUS_WIN_STATUS_OBJECT_NO_LONGER_EXISTS = 0xC0190021, + MD_NTSTATUS_WIN_STATUS_STREAM_MINIVERSION_NOT_FOUND = 0xC0190022, + MD_NTSTATUS_WIN_STATUS_STREAM_MINIVERSION_NOT_VALID = 0xC0190023, + MD_NTSTATUS_WIN_STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 0xC0190024, + MD_NTSTATUS_WIN_STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 0xC0190025, + MD_NTSTATUS_WIN_STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS = 0xC0190026, + MD_NTSTATUS_WIN_STATUS_HANDLE_NO_LONGER_VALID = 0xC0190028, + MD_NTSTATUS_WIN_STATUS_LOG_CORRUPTION_DETECTED = 0xC0190030, + MD_NTSTATUS_WIN_STATUS_RM_DISCONNECTED = 0xC0190032, + MD_NTSTATUS_WIN_STATUS_ENLISTMENT_NOT_SUPERIOR = 0xC0190033, + MD_NTSTATUS_WIN_STATUS_FILE_IDENTITY_NOT_PERSISTENT = 0xC0190036, + MD_NTSTATUS_WIN_STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 0xC0190037, + MD_NTSTATUS_WIN_STATUS_CANT_CROSS_RM_BOUNDARY = 0xC0190038, + MD_NTSTATUS_WIN_STATUS_TXF_DIR_NOT_EMPTY = 0xC0190039, + MD_NTSTATUS_WIN_STATUS_INDOUBT_TRANSACTIONS_EXIST = 0xC019003A, + MD_NTSTATUS_WIN_STATUS_TM_VOLATILE = 0xC019003B, + MD_NTSTATUS_WIN_STATUS_ROLLBACK_TIMER_EXPIRED = 0xC019003C, + MD_NTSTATUS_WIN_STATUS_TXF_ATTRIBUTE_CORRUPT = 0xC019003D, + MD_NTSTATUS_WIN_STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION = 0xC019003E, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED = 0xC019003F, + MD_NTSTATUS_WIN_STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 0xC0190040, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_REQUIRED_PROMOTION = 0xC0190043, + MD_NTSTATUS_WIN_STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION = 0xC0190044, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONS_NOT_FROZEN = 0xC0190045, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_FREEZE_IN_PROGRESS = 0xC0190046, + MD_NTSTATUS_WIN_STATUS_NOT_SNAPSHOT_VOLUME = 0xC0190047, + MD_NTSTATUS_WIN_STATUS_NO_SAVEPOINT_WITH_OPEN_FILES = 0xC0190048, + MD_NTSTATUS_WIN_STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION = 0xC0190049, + MD_NTSTATUS_WIN_STATUS_TM_IDENTITY_MISMATCH = 0xC019004A, + MD_NTSTATUS_WIN_STATUS_FLOATED_SECTION = 0xC019004B, + MD_NTSTATUS_WIN_STATUS_CANNOT_ACCEPT_TRANSACTED_WORK = 0xC019004C, + MD_NTSTATUS_WIN_STATUS_CANNOT_ABORT_TRANSACTIONS = 0xC019004D, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_FOUND = 0xC019004E, + MD_NTSTATUS_WIN_STATUS_RESOURCEMANAGER_NOT_FOUND = 0xC019004F, + MD_NTSTATUS_WIN_STATUS_ENLISTMENT_NOT_FOUND = 0xC0190050, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_NOT_FOUND = 0xC0190051, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_NOT_ONLINE = 0xC0190052, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 0xC0190053, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ROOT = 0xC0190054, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_OBJECT_EXPIRED = 0xC0190055, + MD_NTSTATUS_WIN_STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 0xC0190056, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED = 0xC0190057, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_RECORD_TOO_LONG = 0xC0190058, + MD_NTSTATUS_WIN_STATUS_NO_LINK_TRACKING_IN_TRANSACTION = 0xC0190059, + MD_NTSTATUS_WIN_STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 0xC019005A, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_INTEGRITY_VIOLATED = 0xC019005B, + MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH = 0xC019005C, + MD_NTSTATUS_WIN_STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT = 0xC019005D, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_MUST_WRITETHROUGH = 0xC019005E, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_SUPERIOR = 0xC019005F, + MD_NTSTATUS_WIN_STATUS_EXPIRED_HANDLE = 0xC0190060, + MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ENLISTED = 0xC0190061, + MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_INVALID = 0xC01A0001, + MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_PARITY_INVALID = 0xC01A0002, + MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_REMAPPED = 0xC01A0003, + MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_INCOMPLETE = 0xC01A0004, + MD_NTSTATUS_WIN_STATUS_LOG_INVALID_RANGE = 0xC01A0005, + MD_NTSTATUS_WIN_STATUS_LOG_BLOCKS_EXHAUSTED = 0xC01A0006, + MD_NTSTATUS_WIN_STATUS_LOG_READ_CONTEXT_INVALID = 0xC01A0007, + MD_NTSTATUS_WIN_STATUS_LOG_RESTART_INVALID = 0xC01A0008, + MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_VERSION = 0xC01A0009, + MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_INVALID = 0xC01A000A, + MD_NTSTATUS_WIN_STATUS_LOG_READ_MODE_INVALID = 0xC01A000B, + MD_NTSTATUS_WIN_STATUS_LOG_METADATA_CORRUPT = 0xC01A000D, + MD_NTSTATUS_WIN_STATUS_LOG_METADATA_INVALID = 0xC01A000E, + MD_NTSTATUS_WIN_STATUS_LOG_METADATA_INCONSISTENT = 0xC01A000F, + MD_NTSTATUS_WIN_STATUS_LOG_RESERVATION_INVALID = 0xC01A0010, + MD_NTSTATUS_WIN_STATUS_LOG_CANT_DELETE = 0xC01A0011, + MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_LIMIT_EXCEEDED = 0xC01A0012, + MD_NTSTATUS_WIN_STATUS_LOG_START_OF_LOG = 0xC01A0013, + MD_NTSTATUS_WIN_STATUS_LOG_POLICY_ALREADY_INSTALLED = 0xC01A0014, + MD_NTSTATUS_WIN_STATUS_LOG_POLICY_NOT_INSTALLED = 0xC01A0015, + MD_NTSTATUS_WIN_STATUS_LOG_POLICY_INVALID = 0xC01A0016, + MD_NTSTATUS_WIN_STATUS_LOG_POLICY_CONFLICT = 0xC01A0017, + MD_NTSTATUS_WIN_STATUS_LOG_PINNED_ARCHIVE_TAIL = 0xC01A0018, + MD_NTSTATUS_WIN_STATUS_LOG_RECORD_NONEXISTENT = 0xC01A0019, + MD_NTSTATUS_WIN_STATUS_LOG_RECORDS_RESERVED_INVALID = 0xC01A001A, + MD_NTSTATUS_WIN_STATUS_LOG_SPACE_RESERVED_INVALID = 0xC01A001B, + MD_NTSTATUS_WIN_STATUS_LOG_TAIL_INVALID = 0xC01A001C, + MD_NTSTATUS_WIN_STATUS_LOG_FULL = 0xC01A001D, + MD_NTSTATUS_WIN_STATUS_LOG_MULTIPLEXED = 0xC01A001E, + MD_NTSTATUS_WIN_STATUS_LOG_DEDICATED = 0xC01A001F, + MD_NTSTATUS_WIN_STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS = 0xC01A0020, + MD_NTSTATUS_WIN_STATUS_LOG_ARCHIVE_IN_PROGRESS = 0xC01A0021, + MD_NTSTATUS_WIN_STATUS_LOG_EPHEMERAL = 0xC01A0022, + MD_NTSTATUS_WIN_STATUS_LOG_NOT_ENOUGH_CONTAINERS = 0xC01A0023, + MD_NTSTATUS_WIN_STATUS_LOG_CLIENT_ALREADY_REGISTERED = 0xC01A0024, + MD_NTSTATUS_WIN_STATUS_LOG_CLIENT_NOT_REGISTERED = 0xC01A0025, + MD_NTSTATUS_WIN_STATUS_LOG_FULL_HANDLER_IN_PROGRESS = 0xC01A0026, + MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_READ_FAILED = 0xC01A0027, + MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_WRITE_FAILED = 0xC01A0028, + MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_OPEN_FAILED = 0xC01A0029, + MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_STATE_INVALID = 0xC01A002A, + MD_NTSTATUS_WIN_STATUS_LOG_STATE_INVALID = 0xC01A002B, + MD_NTSTATUS_WIN_STATUS_LOG_PINNED = 0xC01A002C, + MD_NTSTATUS_WIN_STATUS_LOG_METADATA_FLUSH_FAILED = 0xC01A002D, + MD_NTSTATUS_WIN_STATUS_LOG_INCONSISTENT_SECURITY = 0xC01A002E, + MD_NTSTATUS_WIN_STATUS_LOG_APPENDED_FLUSH_FAILED = 0xC01A002F, + MD_NTSTATUS_WIN_STATUS_LOG_PINNED_RESERVATION = 0xC01A0030, + MD_NTSTATUS_WIN_STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD = 0xC01B00EA, + MD_NTSTATUS_WIN_STATUS_FLT_NO_HANDLER_DEFINED = 0xC01C0001, + MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALREADY_DEFINED = 0xC01C0002, + MD_NTSTATUS_WIN_STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST = 0xC01C0003, + MD_NTSTATUS_WIN_STATUS_FLT_DISALLOW_FAST_IO = 0xC01C0004, + MD_NTSTATUS_WIN_STATUS_FLT_INVALID_NAME_REQUEST = 0xC01C0005, + MD_NTSTATUS_WIN_STATUS_FLT_NOT_SAFE_TO_POST_OPERATION = 0xC01C0006, + MD_NTSTATUS_WIN_STATUS_FLT_NOT_INITIALIZED = 0xC01C0007, + MD_NTSTATUS_WIN_STATUS_FLT_FILTER_NOT_READY = 0xC01C0008, + MD_NTSTATUS_WIN_STATUS_FLT_POST_OPERATION_CLEANUP = 0xC01C0009, + MD_NTSTATUS_WIN_STATUS_FLT_INTERNAL_ERROR = 0xC01C000A, + MD_NTSTATUS_WIN_STATUS_FLT_DELETING_OBJECT = 0xC01C000B, + MD_NTSTATUS_WIN_STATUS_FLT_MUST_BE_NONPAGED_POOL = 0xC01C000C, + MD_NTSTATUS_WIN_STATUS_FLT_DUPLICATE_ENTRY = 0xC01C000D, + MD_NTSTATUS_WIN_STATUS_FLT_CBDQ_DISABLED = 0xC01C000E, + MD_NTSTATUS_WIN_STATUS_FLT_DO_NOT_ATTACH = 0xC01C000F, + MD_NTSTATUS_WIN_STATUS_FLT_DO_NOT_DETACH = 0xC01C0010, + MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_ALTITUDE_COLLISION = 0xC01C0011, + MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_NAME_COLLISION = 0xC01C0012, + MD_NTSTATUS_WIN_STATUS_FLT_FILTER_NOT_FOUND = 0xC01C0013, + MD_NTSTATUS_WIN_STATUS_FLT_VOLUME_NOT_FOUND = 0xC01C0014, + MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_NOT_FOUND = 0xC01C0015, + MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0xC01C0016, + MD_NTSTATUS_WIN_STATUS_FLT_INVALID_CONTEXT_REGISTRATION = 0xC01C0017, + MD_NTSTATUS_WIN_STATUS_FLT_NAME_CACHE_MISS = 0xC01C0018, + MD_NTSTATUS_WIN_STATUS_FLT_NO_DEVICE_OBJECT = 0xC01C0019, + MD_NTSTATUS_WIN_STATUS_FLT_VOLUME_ALREADY_MOUNTED = 0xC01C001A, + MD_NTSTATUS_WIN_STATUS_FLT_ALREADY_ENLISTED = 0xC01C001B, + MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALREADY_LINKED = 0xC01C001C, + MD_NTSTATUS_WIN_STATUS_FLT_NO_WAITER_FOR_REPLY = 0xC01C0020, + MD_NTSTATUS_WIN_STATUS_FLT_REGISTRATION_BUSY = 0xC01C0023, + MD_NTSTATUS_WIN_STATUS_MONITOR_NO_DESCRIPTOR = 0xC01D0001, + MD_NTSTATUS_WIN_STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0xC01D0002, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC01D0003, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC01D0004, + MD_NTSTATUS_WIN_STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC01D0005, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC01D0006, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC01D0007, + MD_NTSTATUS_WIN_STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC01D0008, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC01D0009, + MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_MANUFACTURE_DATE = 0xC01D000A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC01E0000, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC01E0001, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC01E0002, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_WAS_RESET = 0xC01E0003, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_DRIVER_MODEL = 0xC01E0004, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_MODE_CHANGED = 0xC01E0005, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_OCCLUDED = 0xC01E0006, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_DENIED = 0xC01E0007, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANNOTCOLORCONVERT = 0xC01E0008, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DRIVER_MISMATCH = 0xC01E0009, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED = 0xC01E000B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_UNOCCLUDED = 0xC01E000C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE = 0xC01E000D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED = 0xC01E000E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_VIDEO_MEMORY = 0xC01E0100, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_LOCK_MEMORY = 0xC01E0101, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_BUSY = 0xC01E0102, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TOO_MANY_REFERENCES = 0xC01E0103, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TRY_AGAIN_LATER = 0xC01E0104, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TRY_AGAIN_NOW = 0xC01E0105, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_INVALID = 0xC01E0106, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC01E0107, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC01E0108, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC01E0109, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC01E0110, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC01E0111, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_CLOSED = 0xC01E0112, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC01E0113, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC01E0114, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC01E0115, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC01E0116, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC01E0200, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC01E0300, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC01E0301, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC01E0302, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN = 0xC01E0303, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC01E0304, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC01E0305, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC01E0306, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC01E0308, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC01E0309, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_FREQUENCY = 0xC01E030A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ACTIVE_REGION = 0xC01E030B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_TOTAL_REGION = 0xC01E030C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC01E0310, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC01E0311, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC01E0312, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC01E0313, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC01E0314, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC01E0315, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC01E0316, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC01E0317, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_ALREADY_IN_SET = 0xC01E0318, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC01E0319, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC01E031A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC01E031B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC01E031C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC01E031D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC01E031F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_STALE_MODESET = 0xC01E0320, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC01E0321, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC01E0322, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC01E0323, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC01E0324, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC01E0325, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC01E0326, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC01E0327, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC01E0328, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC01E0329, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC01E032A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC01E032B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC01E032C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC01E032D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC01E032E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC01E032F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_RESOURCES_NOT_RELATED = 0xC01E0330, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC01E0331, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC01E0332, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC01E0333, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC01E0334, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_VIDPNMGR = 0xC01E0335, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_ACTIVE_VIDPN = 0xC01E0336, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC01E0337, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_NOT_CONNECTED = 0xC01E0338, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC01E0339, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC01E033A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC01E033B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_STRIDE = 0xC01E033C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PIXELFORMAT = 0xC01E033D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_COLORBASIS = 0xC01E033E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC01E033F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC01E0340, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC01E0341, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC01E0342, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC01E0343, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC01E0344, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC01E0345, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC01E0346, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_GAMMA_RAMP = 0xC01E0347, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC01E0348, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC01E0349, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_NOT_IN_MODESET = 0xC01E034A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC01E034D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC01E034E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC01E034F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC01E0350, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC01E0352, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC01E0353, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC01E0354, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC01E0355, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC01E0356, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC01E0357, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC01E0358, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC01E0359, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC01E035A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_CLIENT_TYPE = 0xC01E035B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC01E035C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC01E0400, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC01E0401, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC01E0430, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC01E0431, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC01E0432, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC01E0433, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC01E0434, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC01E0435, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC01E0436, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC01E0438, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC01E043B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_NOT_SUPPORTED = 0xC01E0500, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_COPP_NOT_SUPPORTED = 0xC01E0501, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_UAB_NOT_SUPPORTED = 0xC01E0502, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC01E0503, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST = 0xC01E0505, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INTERNAL_ERROR = 0xC01E050B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_HANDLE = 0xC01E050C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC01E050E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC01E050F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC01E0510, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PVP_HFS_FAILED = 0xC01E0511, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_SRM = 0xC01E0512, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC01E0513, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC01E0514, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC01E0515, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC01E0516, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC01E0517, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC01E0518, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS = 0xC01E051A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC01E051C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC01E051D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC01E051E, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC01E051F, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC01E0520, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC01E0521, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_NOT_SUPPORTED = 0xC01E0580, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC01E0581, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC01E0582, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC01E0583, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC01E0584, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_DATA = 0xC01E0585, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC01E0586, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING = 0xC01E0587, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MCA_INTERNAL_ERROR = 0xC01E0588, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC01E0589, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC01E058A, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC01E058B, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC01E058C, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC01E058D, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC01E05E0, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E05E1, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E05E2, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E05E3, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_POINTER = 0xC01E05E4, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E05E5, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC01E05E6, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_INTERNAL_ERROR = 0xC01E05E7, + MD_NTSTATUS_WIN_STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E05E8, + MD_NTSTATUS_WIN_STATUS_FVE_LOCKED_VOLUME = 0xC0210000, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_ENCRYPTED = 0xC0210001, + MD_NTSTATUS_WIN_STATUS_FVE_BAD_INFORMATION = 0xC0210002, + MD_NTSTATUS_WIN_STATUS_FVE_TOO_SMALL = 0xC0210003, + MD_NTSTATUS_WIN_STATUS_FVE_FAILED_WRONG_FS = 0xC0210004, + MD_NTSTATUS_WIN_STATUS_FVE_BAD_PARTITION_SIZE = 0xC0210005, + MD_NTSTATUS_WIN_STATUS_FVE_FS_NOT_EXTENDED = 0xC0210006, + MD_NTSTATUS_WIN_STATUS_FVE_FS_MOUNTED = 0xC0210007, + MD_NTSTATUS_WIN_STATUS_FVE_NO_LICENSE = 0xC0210008, + MD_NTSTATUS_WIN_STATUS_FVE_ACTION_NOT_ALLOWED = 0xC0210009, + MD_NTSTATUS_WIN_STATUS_FVE_BAD_DATA = 0xC021000A, + MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_NOT_BOUND = 0xC021000B, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_DATA_VOLUME = 0xC021000C, + MD_NTSTATUS_WIN_STATUS_FVE_CONV_READ_ERROR = 0xC021000D, + MD_NTSTATUS_WIN_STATUS_FVE_CONV_WRITE_ERROR = 0xC021000E, + MD_NTSTATUS_WIN_STATUS_FVE_OVERLAPPED_UPDATE = 0xC021000F, + MD_NTSTATUS_WIN_STATUS_FVE_FAILED_SECTOR_SIZE = 0xC0210010, + MD_NTSTATUS_WIN_STATUS_FVE_FAILED_AUTHENTICATION = 0xC0210011, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_OS_VOLUME = 0xC0210012, + MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_NOT_FOUND = 0xC0210013, + MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_INVALID = 0xC0210014, + MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_NO_VMK = 0xC0210015, + MD_NTSTATUS_WIN_STATUS_FVE_TPM_DISABLED = 0xC0210016, + MD_NTSTATUS_WIN_STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO = 0xC0210017, + MD_NTSTATUS_WIN_STATUS_FVE_TPM_INVALID_PCR = 0xC0210018, + MD_NTSTATUS_WIN_STATUS_FVE_TPM_NO_VMK = 0xC0210019, + MD_NTSTATUS_WIN_STATUS_FVE_PIN_INVALID = 0xC021001A, + MD_NTSTATUS_WIN_STATUS_FVE_AUTH_INVALID_APPLICATION = 0xC021001B, + MD_NTSTATUS_WIN_STATUS_FVE_AUTH_INVALID_CONFIG = 0xC021001C, + MD_NTSTATUS_WIN_STATUS_FVE_DEBUGGER_ENABLED = 0xC021001D, + MD_NTSTATUS_WIN_STATUS_FVE_DRY_RUN_FAILED = 0xC021001E, + MD_NTSTATUS_WIN_STATUS_FVE_BAD_METADATA_POINTER = 0xC021001F, + MD_NTSTATUS_WIN_STATUS_FVE_OLD_METADATA_COPY = 0xC0210020, + MD_NTSTATUS_WIN_STATUS_FVE_REBOOT_REQUIRED = 0xC0210021, + MD_NTSTATUS_WIN_STATUS_FVE_RAW_ACCESS = 0xC0210022, + MD_NTSTATUS_WIN_STATUS_FVE_RAW_BLOCKED = 0xC0210023, + MD_NTSTATUS_WIN_STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY = 0xC0210024, + MD_NTSTATUS_WIN_STATUS_FVE_MOR_FAILED = 0xC0210025, + MD_NTSTATUS_WIN_STATUS_FVE_NO_FEATURE_LICENSE = 0xC0210026, + MD_NTSTATUS_WIN_STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED = 0xC0210027, + MD_NTSTATUS_WIN_STATUS_FVE_CONV_RECOVERY_FAILED = 0xC0210028, + MD_NTSTATUS_WIN_STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG = 0xC0210029, + MD_NTSTATUS_WIN_STATUS_FVE_INVALID_DATUM_TYPE = 0xC021002A, + MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_TOO_SMALL = 0xC0210030, + MD_NTSTATUS_WIN_STATUS_FVE_ENH_PIN_INVALID = 0xC0210031, + MD_NTSTATUS_WIN_STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE = 0xC0210032, + MD_NTSTATUS_WIN_STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE = 0xC0210033, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK = 0xC0210034, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_ON_CLUSTER = 0xC0210035, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING = 0xC0210036, + MD_NTSTATUS_WIN_STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE = 0xC0210037, + MD_NTSTATUS_WIN_STATUS_FVE_EDRIVE_DRY_RUN_FAILED = 0xC0210038, + MD_NTSTATUS_WIN_STATUS_FVE_SECUREBOOT_DISABLED = 0xC0210039, + MD_NTSTATUS_WIN_STATUS_FVE_SECUREBOOT_CONFIG_CHANGE = 0xC021003A, + MD_NTSTATUS_WIN_STATUS_FVE_DEVICE_LOCKEDOUT = 0xC021003B, + MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT = 0xC021003C, + MD_NTSTATUS_WIN_STATUS_FVE_NOT_DE_VOLUME = 0xC021003D, + MD_NTSTATUS_WIN_STATUS_FVE_PROTECTION_DISABLED = 0xC021003E, + MD_NTSTATUS_WIN_STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED = 0xC021003F, + MD_NTSTATUS_WIN_STATUS_FWP_CALLOUT_NOT_FOUND = 0xC0220001, + MD_NTSTATUS_WIN_STATUS_FWP_CONDITION_NOT_FOUND = 0xC0220002, + MD_NTSTATUS_WIN_STATUS_FWP_FILTER_NOT_FOUND = 0xC0220003, + MD_NTSTATUS_WIN_STATUS_FWP_LAYER_NOT_FOUND = 0xC0220004, + MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_NOT_FOUND = 0xC0220005, + MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND = 0xC0220006, + MD_NTSTATUS_WIN_STATUS_FWP_SUBLAYER_NOT_FOUND = 0xC0220007, + MD_NTSTATUS_WIN_STATUS_FWP_NOT_FOUND = 0xC0220008, + MD_NTSTATUS_WIN_STATUS_FWP_ALREADY_EXISTS = 0xC0220009, + MD_NTSTATUS_WIN_STATUS_FWP_IN_USE = 0xC022000A, + MD_NTSTATUS_WIN_STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS = 0xC022000B, + MD_NTSTATUS_WIN_STATUS_FWP_WRONG_SESSION = 0xC022000C, + MD_NTSTATUS_WIN_STATUS_FWP_NO_TXN_IN_PROGRESS = 0xC022000D, + MD_NTSTATUS_WIN_STATUS_FWP_TXN_IN_PROGRESS = 0xC022000E, + MD_NTSTATUS_WIN_STATUS_FWP_TXN_ABORTED = 0xC022000F, + MD_NTSTATUS_WIN_STATUS_FWP_SESSION_ABORTED = 0xC0220010, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_TXN = 0xC0220011, + MD_NTSTATUS_WIN_STATUS_FWP_TIMEOUT = 0xC0220012, + MD_NTSTATUS_WIN_STATUS_FWP_NET_EVENTS_DISABLED = 0xC0220013, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_LAYER = 0xC0220014, + MD_NTSTATUS_WIN_STATUS_FWP_KM_CLIENTS_ONLY = 0xC0220015, + MD_NTSTATUS_WIN_STATUS_FWP_LIFETIME_MISMATCH = 0xC0220016, + MD_NTSTATUS_WIN_STATUS_FWP_BUILTIN_OBJECT = 0xC0220017, + MD_NTSTATUS_WIN_STATUS_FWP_TOO_MANY_CALLOUTS = 0xC0220018, + MD_NTSTATUS_WIN_STATUS_FWP_NOTIFICATION_DROPPED = 0xC0220019, + MD_NTSTATUS_WIN_STATUS_FWP_TRAFFIC_MISMATCH = 0xC022001A, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_SA_STATE = 0xC022001B, + MD_NTSTATUS_WIN_STATUS_FWP_NULL_POINTER = 0xC022001C, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_ENUMERATOR = 0xC022001D, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_FLAGS = 0xC022001E, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_NET_MASK = 0xC022001F, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_RANGE = 0xC0220020, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_INTERVAL = 0xC0220021, + MD_NTSTATUS_WIN_STATUS_FWP_ZERO_LENGTH_ARRAY = 0xC0220022, + MD_NTSTATUS_WIN_STATUS_FWP_NULL_DISPLAY_NAME = 0xC0220023, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_ACTION_TYPE = 0xC0220024, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_WEIGHT = 0xC0220025, + MD_NTSTATUS_WIN_STATUS_FWP_MATCH_TYPE_MISMATCH = 0xC0220026, + MD_NTSTATUS_WIN_STATUS_FWP_TYPE_MISMATCH = 0xC0220027, + MD_NTSTATUS_WIN_STATUS_FWP_OUT_OF_BOUNDS = 0xC0220028, + MD_NTSTATUS_WIN_STATUS_FWP_RESERVED = 0xC0220029, + MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_CONDITION = 0xC022002A, + MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_KEYMOD = 0xC022002B, + MD_NTSTATUS_WIN_STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER = 0xC022002C, + MD_NTSTATUS_WIN_STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0xC022002D, + MD_NTSTATUS_WIN_STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0xC022002E, + MD_NTSTATUS_WIN_STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0xC022002F, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_AUTH_METHOD = 0xC0220030, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_DH_GROUP = 0xC0220031, + MD_NTSTATUS_WIN_STATUS_FWP_EM_NOT_SUPPORTED = 0xC0220032, + MD_NTSTATUS_WIN_STATUS_FWP_NEVER_MATCH = 0xC0220033, + MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_CONTEXT_MISMATCH = 0xC0220034, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_PARAMETER = 0xC0220035, + MD_NTSTATUS_WIN_STATUS_FWP_TOO_MANY_SUBLAYERS = 0xC0220036, + MD_NTSTATUS_WIN_STATUS_FWP_CALLOUT_NOTIFICATION_FAILED = 0xC0220037, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_AUTH_TRANSFORM = 0xC0220038, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_CIPHER_TRANSFORM = 0xC0220039, + MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM = 0xC022003A, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_TRANSFORM_COMBINATION = 0xC022003B, + MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_AUTH_METHOD = 0xC022003C, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_TUNNEL_ENDPOINT = 0xC022003D, + MD_NTSTATUS_WIN_STATUS_FWP_L2_DRIVER_NOT_READY = 0xC022003E, + MD_NTSTATUS_WIN_STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED = 0xC022003F, + MD_NTSTATUS_WIN_STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL = 0xC0220040, + MD_NTSTATUS_WIN_STATUS_FWP_CONNECTIONS_DISABLED = 0xC0220041, + MD_NTSTATUS_WIN_STATUS_FWP_INVALID_DNS_NAME = 0xC0220042, + MD_NTSTATUS_WIN_STATUS_FWP_STILL_ON = 0xC0220043, + MD_NTSTATUS_WIN_STATUS_FWP_IKEEXT_NOT_RUNNING = 0xC0220044, + MD_NTSTATUS_WIN_STATUS_FWP_TCPIP_NOT_READY = 0xC0220100, + MD_NTSTATUS_WIN_STATUS_FWP_INJECT_HANDLE_CLOSING = 0xC0220101, + MD_NTSTATUS_WIN_STATUS_FWP_INJECT_HANDLE_STALE = 0xC0220102, + MD_NTSTATUS_WIN_STATUS_FWP_CANNOT_PEND = 0xC0220103, + MD_NTSTATUS_WIN_STATUS_FWP_DROP_NOICMP = 0xC0220104, + MD_NTSTATUS_WIN_STATUS_NDIS_CLOSING = 0xC0230002, + MD_NTSTATUS_WIN_STATUS_NDIS_BAD_VERSION = 0xC0230004, + MD_NTSTATUS_WIN_STATUS_NDIS_BAD_CHARACTERISTICS = 0xC0230005, + MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_NOT_FOUND = 0xC0230006, + MD_NTSTATUS_WIN_STATUS_NDIS_OPEN_FAILED = 0xC0230007, + MD_NTSTATUS_WIN_STATUS_NDIS_DEVICE_FAILED = 0xC0230008, + MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_FULL = 0xC0230009, + MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_EXISTS = 0xC023000A, + MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_NOT_FOUND = 0xC023000B, + MD_NTSTATUS_WIN_STATUS_NDIS_REQUEST_ABORTED = 0xC023000C, + MD_NTSTATUS_WIN_STATUS_NDIS_RESET_IN_PROGRESS = 0xC023000D, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PACKET = 0xC023000F, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_DEVICE_REQUEST = 0xC0230010, + MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_NOT_READY = 0xC0230011, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_LENGTH = 0xC0230014, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_DATA = 0xC0230015, + MD_NTSTATUS_WIN_STATUS_NDIS_BUFFER_TOO_SHORT = 0xC0230016, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_OID = 0xC0230017, + MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_REMOVED = 0xC0230018, + MD_NTSTATUS_WIN_STATUS_NDIS_UNSUPPORTED_MEDIA = 0xC0230019, + MD_NTSTATUS_WIN_STATUS_NDIS_GROUP_ADDRESS_IN_USE = 0xC023001A, + MD_NTSTATUS_WIN_STATUS_NDIS_FILE_NOT_FOUND = 0xC023001B, + MD_NTSTATUS_WIN_STATUS_NDIS_ERROR_READING_FILE = 0xC023001C, + MD_NTSTATUS_WIN_STATUS_NDIS_ALREADY_MAPPED = 0xC023001D, + MD_NTSTATUS_WIN_STATUS_NDIS_RESOURCE_CONFLICT = 0xC023001E, + MD_NTSTATUS_WIN_STATUS_NDIS_MEDIA_DISCONNECTED = 0xC023001F, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_ADDRESS = 0xC0230022, + MD_NTSTATUS_WIN_STATUS_NDIS_PAUSED = 0xC023002A, + MD_NTSTATUS_WIN_STATUS_NDIS_INTERFACE_NOT_FOUND = 0xC023002B, + MD_NTSTATUS_WIN_STATUS_NDIS_UNSUPPORTED_REVISION = 0xC023002C, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PORT = 0xC023002D, + MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PORT_STATE = 0xC023002E, + MD_NTSTATUS_WIN_STATUS_NDIS_LOW_POWER_STATE = 0xC023002F, + MD_NTSTATUS_WIN_STATUS_NDIS_REINIT_REQUIRED = 0xC0230030, + MD_NTSTATUS_WIN_STATUS_NDIS_NOT_SUPPORTED = 0xC02300BB, + MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_POLICY = 0xC023100F, + MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED = 0xC0231012, + MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_PATH_REJECTED = 0xC0231013, + MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED = 0xC0232000, + MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_MEDIA_IN_USE = 0xC0232001, + MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_POWER_STATE_INVALID = 0xC0232002, + MD_NTSTATUS_WIN_STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL = 0xC0232003, + MD_NTSTATUS_WIN_STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL = 0xC0232004, + MD_NTSTATUS_WIN_STATUS_TPM_ERROR_MASK = 0xC0290000, + MD_NTSTATUS_WIN_STATUS_TPM_AUTHFAIL = 0xC0290001, + MD_NTSTATUS_WIN_STATUS_TPM_BADINDEX = 0xC0290002, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_PARAMETER = 0xC0290003, + MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAILURE = 0xC0290004, + MD_NTSTATUS_WIN_STATUS_TPM_CLEAR_DISABLED = 0xC0290005, + MD_NTSTATUS_WIN_STATUS_TPM_DEACTIVATED = 0xC0290006, + MD_NTSTATUS_WIN_STATUS_TPM_DISABLED = 0xC0290007, + MD_NTSTATUS_WIN_STATUS_TPM_DISABLED_CMD = 0xC0290008, + MD_NTSTATUS_WIN_STATUS_TPM_FAIL = 0xC0290009, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_ORDINAL = 0xC029000A, + MD_NTSTATUS_WIN_STATUS_TPM_INSTALL_DISABLED = 0xC029000B, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_KEYHANDLE = 0xC029000C, + MD_NTSTATUS_WIN_STATUS_TPM_KEYNOTFOUND = 0xC029000D, + MD_NTSTATUS_WIN_STATUS_TPM_INAPPROPRIATE_ENC = 0xC029000E, + MD_NTSTATUS_WIN_STATUS_TPM_MIGRATEFAIL = 0xC029000F, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_PCR_INFO = 0xC0290010, + MD_NTSTATUS_WIN_STATUS_TPM_NOSPACE = 0xC0290011, + MD_NTSTATUS_WIN_STATUS_TPM_NOSRK = 0xC0290012, + MD_NTSTATUS_WIN_STATUS_TPM_NOTSEALED_BLOB = 0xC0290013, + MD_NTSTATUS_WIN_STATUS_TPM_OWNER_SET = 0xC0290014, + MD_NTSTATUS_WIN_STATUS_TPM_RESOURCES = 0xC0290015, + MD_NTSTATUS_WIN_STATUS_TPM_SHORTRANDOM = 0xC0290016, + MD_NTSTATUS_WIN_STATUS_TPM_SIZE = 0xC0290017, + MD_NTSTATUS_WIN_STATUS_TPM_WRONGPCRVAL = 0xC0290018, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_PARAM_SIZE = 0xC0290019, + MD_NTSTATUS_WIN_STATUS_TPM_SHA_THREAD = 0xC029001A, + MD_NTSTATUS_WIN_STATUS_TPM_SHA_ERROR = 0xC029001B, + MD_NTSTATUS_WIN_STATUS_TPM_FAILEDSELFTEST = 0xC029001C, + MD_NTSTATUS_WIN_STATUS_TPM_AUTH2FAIL = 0xC029001D, + MD_NTSTATUS_WIN_STATUS_TPM_BADTAG = 0xC029001E, + MD_NTSTATUS_WIN_STATUS_TPM_IOERROR = 0xC029001F, + MD_NTSTATUS_WIN_STATUS_TPM_ENCRYPT_ERROR = 0xC0290020, + MD_NTSTATUS_WIN_STATUS_TPM_DECRYPT_ERROR = 0xC0290021, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_AUTHHANDLE = 0xC0290022, + MD_NTSTATUS_WIN_STATUS_TPM_NO_ENDORSEMENT = 0xC0290023, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_KEYUSAGE = 0xC0290024, + MD_NTSTATUS_WIN_STATUS_TPM_WRONG_ENTITYTYPE = 0xC0290025, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_POSTINIT = 0xC0290026, + MD_NTSTATUS_WIN_STATUS_TPM_INAPPROPRIATE_SIG = 0xC0290027, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_KEY_PROPERTY = 0xC0290028, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_MIGRATION = 0xC0290029, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_SCHEME = 0xC029002A, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_DATASIZE = 0xC029002B, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_MODE = 0xC029002C, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_PRESENCE = 0xC029002D, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_VERSION = 0xC029002E, + MD_NTSTATUS_WIN_STATUS_TPM_NO_WRAP_TRANSPORT = 0xC029002F, + MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAIL_UNSUCCESSFUL = 0xC0290030, + MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAIL_SUCCESSFUL = 0xC0290031, + MD_NTSTATUS_WIN_STATUS_TPM_NOTRESETABLE = 0xC0290032, + MD_NTSTATUS_WIN_STATUS_TPM_NOTLOCAL = 0xC0290033, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_TYPE = 0xC0290034, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_RESOURCE = 0xC0290035, + MD_NTSTATUS_WIN_STATUS_TPM_NOTFIPS = 0xC0290036, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_FAMILY = 0xC0290037, + MD_NTSTATUS_WIN_STATUS_TPM_NO_NV_PERMISSION = 0xC0290038, + MD_NTSTATUS_WIN_STATUS_TPM_REQUIRES_SIGN = 0xC0290039, + MD_NTSTATUS_WIN_STATUS_TPM_KEY_NOTSUPPORTED = 0xC029003A, + MD_NTSTATUS_WIN_STATUS_TPM_AUTH_CONFLICT = 0xC029003B, + MD_NTSTATUS_WIN_STATUS_TPM_AREA_LOCKED = 0xC029003C, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_LOCALITY = 0xC029003D, + MD_NTSTATUS_WIN_STATUS_TPM_READ_ONLY = 0xC029003E, + MD_NTSTATUS_WIN_STATUS_TPM_PER_NOWRITE = 0xC029003F, + MD_NTSTATUS_WIN_STATUS_TPM_FAMILYCOUNT = 0xC0290040, + MD_NTSTATUS_WIN_STATUS_TPM_WRITE_LOCKED = 0xC0290041, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_ATTRIBUTES = 0xC0290042, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_STRUCTURE = 0xC0290043, + MD_NTSTATUS_WIN_STATUS_TPM_KEY_OWNER_CONTROL = 0xC0290044, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_COUNTER = 0xC0290045, + MD_NTSTATUS_WIN_STATUS_TPM_NOT_FULLWRITE = 0xC0290046, + MD_NTSTATUS_WIN_STATUS_TPM_CONTEXT_GAP = 0xC0290047, + MD_NTSTATUS_WIN_STATUS_TPM_MAXNVWRITES = 0xC0290048, + MD_NTSTATUS_WIN_STATUS_TPM_NOOPERATOR = 0xC0290049, + MD_NTSTATUS_WIN_STATUS_TPM_RESOURCEMISSING = 0xC029004A, + MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_LOCK = 0xC029004B, + MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_FAMILY = 0xC029004C, + MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_ADMIN = 0xC029004D, + MD_NTSTATUS_WIN_STATUS_TPM_TRANSPORT_NOTEXCLUSIVE = 0xC029004E, + MD_NTSTATUS_WIN_STATUS_TPM_OWNER_CONTROL = 0xC029004F, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_RESOURCES = 0xC0290050, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_INPUT_DATA0 = 0xC0290051, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_INPUT_DATA1 = 0xC0290052, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_ISSUER_SETTINGS = 0xC0290053, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_TPM_SETTINGS = 0xC0290054, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_STAGE = 0xC0290055, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_ISSUER_VALIDITY = 0xC0290056, + MD_NTSTATUS_WIN_STATUS_TPM_DAA_WRONG_W = 0xC0290057, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_HANDLE = 0xC0290058, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_DELEGATE = 0xC0290059, + MD_NTSTATUS_WIN_STATUS_TPM_BADCONTEXT = 0xC029005A, + MD_NTSTATUS_WIN_STATUS_TPM_TOOMANYCONTEXTS = 0xC029005B, + MD_NTSTATUS_WIN_STATUS_TPM_MA_TICKET_SIGNATURE = 0xC029005C, + MD_NTSTATUS_WIN_STATUS_TPM_MA_DESTINATION = 0xC029005D, + MD_NTSTATUS_WIN_STATUS_TPM_MA_SOURCE = 0xC029005E, + MD_NTSTATUS_WIN_STATUS_TPM_MA_AUTHORITY = 0xC029005F, + MD_NTSTATUS_WIN_STATUS_TPM_PERMANENTEK = 0xC0290061, + MD_NTSTATUS_WIN_STATUS_TPM_BAD_SIGNATURE = 0xC0290062, + MD_NTSTATUS_WIN_STATUS_TPM_NOCONTEXTSPACE = 0xC0290063, + MD_NTSTATUS_WIN_STATUS_TPM_COMMAND_BLOCKED = 0xC0290400, + MD_NTSTATUS_WIN_STATUS_TPM_INVALID_HANDLE = 0xC0290401, + MD_NTSTATUS_WIN_STATUS_TPM_DUPLICATE_VHANDLE = 0xC0290402, + MD_NTSTATUS_WIN_STATUS_TPM_EMBEDDED_COMMAND_BLOCKED = 0xC0290403, + MD_NTSTATUS_WIN_STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED = 0xC0290404, + MD_NTSTATUS_WIN_STATUS_TPM_RETRY = 0xC0290800, + MD_NTSTATUS_WIN_STATUS_TPM_NEEDS_SELFTEST = 0xC0290801, + MD_NTSTATUS_WIN_STATUS_TPM_DOING_SELFTEST = 0xC0290802, + MD_NTSTATUS_WIN_STATUS_TPM_DEFEND_LOCK_RUNNING = 0xC0290803, + MD_NTSTATUS_WIN_STATUS_TPM_COMMAND_CANCELED = 0xC0291001, + MD_NTSTATUS_WIN_STATUS_TPM_TOO_MANY_CONTEXTS = 0xC0291002, + MD_NTSTATUS_WIN_STATUS_TPM_NOT_FOUND = 0xC0291003, + MD_NTSTATUS_WIN_STATUS_TPM_ACCESS_DENIED = 0xC0291004, + MD_NTSTATUS_WIN_STATUS_TPM_INSUFFICIENT_BUFFER = 0xC0291005, + MD_NTSTATUS_WIN_STATUS_TPM_PPI_FUNCTION_UNSUPPORTED = 0xC0291006, + MD_NTSTATUS_WIN_STATUS_PCP_ERROR_MASK = 0xC0292000, + MD_NTSTATUS_WIN_STATUS_PCP_DEVICE_NOT_READY = 0xC0292001, + MD_NTSTATUS_WIN_STATUS_PCP_INVALID_HANDLE = 0xC0292002, + MD_NTSTATUS_WIN_STATUS_PCP_INVALID_PARAMETER = 0xC0292003, + MD_NTSTATUS_WIN_STATUS_PCP_FLAG_NOT_SUPPORTED = 0xC0292004, + MD_NTSTATUS_WIN_STATUS_PCP_NOT_SUPPORTED = 0xC0292005, + MD_NTSTATUS_WIN_STATUS_PCP_BUFFER_TOO_SMALL = 0xC0292006, + MD_NTSTATUS_WIN_STATUS_PCP_INTERNAL_ERROR = 0xC0292007, + MD_NTSTATUS_WIN_STATUS_PCP_AUTHENTICATION_FAILED = 0xC0292008, + MD_NTSTATUS_WIN_STATUS_PCP_AUTHENTICATION_IGNORED = 0xC0292009, + MD_NTSTATUS_WIN_STATUS_PCP_POLICY_NOT_FOUND = 0xC029200A, + MD_NTSTATUS_WIN_STATUS_PCP_PROFILE_NOT_FOUND = 0xC029200B, + MD_NTSTATUS_WIN_STATUS_PCP_VALIDATION_FAILED = 0xC029200C, + MD_NTSTATUS_WIN_STATUS_PCP_DEVICE_NOT_FOUND = 0xC029200D, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_HYPERCALL_CODE = 0xC0350002, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_HYPERCALL_INPUT = 0xC0350003, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_ALIGNMENT = 0xC0350004, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARAMETER = 0xC0350005, + MD_NTSTATUS_WIN_STATUS_HV_ACCESS_DENIED = 0xC0350006, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARTITION_STATE = 0xC0350007, + MD_NTSTATUS_WIN_STATUS_HV_OPERATION_DENIED = 0xC0350008, + MD_NTSTATUS_WIN_STATUS_HV_UNKNOWN_PROPERTY = 0xC0350009, + MD_NTSTATUS_WIN_STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE = 0xC035000A, + MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_MEMORY = 0xC035000B, + MD_NTSTATUS_WIN_STATUS_HV_PARTITION_TOO_DEEP = 0xC035000C, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARTITION_ID = 0xC035000D, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_VP_INDEX = 0xC035000E, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_PORT_ID = 0xC0350011, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_CONNECTION_ID = 0xC0350012, + MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_BUFFERS = 0xC0350013, + MD_NTSTATUS_WIN_STATUS_HV_NOT_ACKNOWLEDGED = 0xC0350014, + MD_NTSTATUS_WIN_STATUS_HV_ACKNOWLEDGED = 0xC0350016, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_SAVE_RESTORE_STATE = 0xC0350017, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_SYNIC_STATE = 0xC0350018, + MD_NTSTATUS_WIN_STATUS_HV_OBJECT_IN_USE = 0xC0350019, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO = 0xC035001A, + MD_NTSTATUS_WIN_STATUS_HV_NO_DATA = 0xC035001B, + MD_NTSTATUS_WIN_STATUS_HV_INACTIVE = 0xC035001C, + MD_NTSTATUS_WIN_STATUS_HV_NO_RESOURCES = 0xC035001D, + MD_NTSTATUS_WIN_STATUS_HV_FEATURE_UNAVAILABLE = 0xC035001E, + MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_BUFFER = 0xC0350033, + MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS = 0xC0350038, + MD_NTSTATUS_WIN_STATUS_HV_INVALID_LP_INDEX = 0xC0350041, + MD_NTSTATUS_WIN_STATUS_HV_NOT_PRESENT = 0xC0351000, + MD_NTSTATUS_WIN_STATUS_IPSEC_BAD_SPI = 0xC0360001, + MD_NTSTATUS_WIN_STATUS_IPSEC_SA_LIFETIME_EXPIRED = 0xC0360002, + MD_NTSTATUS_WIN_STATUS_IPSEC_WRONG_SA = 0xC0360003, + MD_NTSTATUS_WIN_STATUS_IPSEC_REPLAY_CHECK_FAILED = 0xC0360004, + MD_NTSTATUS_WIN_STATUS_IPSEC_INVALID_PACKET = 0xC0360005, + MD_NTSTATUS_WIN_STATUS_IPSEC_INTEGRITY_CHECK_FAILED = 0xC0360006, + MD_NTSTATUS_WIN_STATUS_IPSEC_CLEAR_TEXT_DROP = 0xC0360007, + MD_NTSTATUS_WIN_STATUS_IPSEC_AUTH_FIREWALL_DROP = 0xC0360008, + MD_NTSTATUS_WIN_STATUS_IPSEC_THROTTLE_DROP = 0xC0360009, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_BLOCK = 0xC0368000, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_RECEIVED_MULTICAST = 0xC0368001, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_INVALID_PACKET = 0xC0368002, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED = 0xC0368003, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_MAX_ENTRIES = 0xC0368004, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 0xC0368005, + MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 0xC0368006, + MD_NTSTATUS_WIN_STATUS_VID_DUPLICATE_HANDLER = 0xC0370001, + MD_NTSTATUS_WIN_STATUS_VID_TOO_MANY_HANDLERS = 0xC0370002, + MD_NTSTATUS_WIN_STATUS_VID_QUEUE_FULL = 0xC0370003, + MD_NTSTATUS_WIN_STATUS_VID_HANDLER_NOT_PRESENT = 0xC0370004, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_OBJECT_NAME = 0xC0370005, + MD_NTSTATUS_WIN_STATUS_VID_PARTITION_NAME_TOO_LONG = 0xC0370006, + MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG = 0xC0370007, + MD_NTSTATUS_WIN_STATUS_VID_PARTITION_ALREADY_EXISTS = 0xC0370008, + MD_NTSTATUS_WIN_STATUS_VID_PARTITION_DOES_NOT_EXIST = 0xC0370009, + MD_NTSTATUS_WIN_STATUS_VID_PARTITION_NAME_NOT_FOUND = 0xC037000A, + MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS = 0xC037000B, + MD_NTSTATUS_WIN_STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT = 0xC037000C, + MD_NTSTATUS_WIN_STATUS_VID_MB_STILL_REFERENCED = 0xC037000D, + MD_NTSTATUS_WIN_STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED = 0xC037000E, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_NUMA_SETTINGS = 0xC037000F, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_NUMA_NODE_INDEX = 0xC0370010, + MD_NTSTATUS_WIN_STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED = 0xC0370011, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE = 0xC0370012, + MD_NTSTATUS_WIN_STATUS_VID_PAGE_RANGE_OVERFLOW = 0xC0370013, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE = 0xC0370014, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_GPA_RANGE_HANDLE = 0xC0370015, + MD_NTSTATUS_WIN_STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE = 0xC0370016, + MD_NTSTATUS_WIN_STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED = 0xC0370017, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_PPM_HANDLE = 0xC0370018, + MD_NTSTATUS_WIN_STATUS_VID_MBPS_ARE_LOCKED = 0xC0370019, + MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_CLOSED = 0xC037001A, + MD_NTSTATUS_WIN_STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED = 0xC037001B, + MD_NTSTATUS_WIN_STATUS_VID_STOP_PENDING = 0xC037001C, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_PROCESSOR_STATE = 0xC037001D, + MD_NTSTATUS_WIN_STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT = 0xC037001E, + MD_NTSTATUS_WIN_STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED = 0xC037001F, + MD_NTSTATUS_WIN_STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET = 0xC0370020, + MD_NTSTATUS_WIN_STATUS_VID_MMIO_RANGE_DESTROYED = 0xC0370021, + MD_NTSTATUS_WIN_STATUS_VID_INVALID_CHILD_GPA_PAGE_SET = 0xC0370022, + MD_NTSTATUS_WIN_STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED = 0xC0370023, + MD_NTSTATUS_WIN_STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL = 0xC0370024, + MD_NTSTATUS_WIN_STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE = 0xC0370025, + MD_NTSTATUS_WIN_STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT = 0xC0370026, + MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_CORRUPT = 0xC0370027, + MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM = 0xC0370028, + MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_INCOMPATIBLE = 0xC0370029, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DATABASE_FULL = 0xC0380001, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED = 0xC0380002, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC = 0xC0380003, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED = 0xC0380004, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME = 0xC0380005, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_DUPLICATE = 0xC0380006, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_DYNAMIC = 0xC0380007, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_ID_INVALID = 0xC0380008, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_INVALID = 0xC0380009, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAST_VOTER = 0xC038000A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_INVALID = 0xC038000B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS = 0xC038000C, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED = 0xC038000D, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL = 0xC038000E, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS = 0xC038000F, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS = 0xC0380010, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_MISSING = 0xC0380011, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_NOT_EMPTY = 0xC0380012, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE = 0xC0380013, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_REVECTORING_FAILED = 0xC0380014, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID = 0xC0380015, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_SET_NOT_CONTAINED = 0xC0380016, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS = 0xC0380017, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES = 0xC0380018, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED = 0xC0380019, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_ALREADY_USED = 0xC038001A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS = 0xC038001B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION = 0xC038001C, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED = 0xC038001D, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION = 0xC038001E, + MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH = 0xC038001F, + MD_NTSTATUS_WIN_STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED = 0xC0380020, + MD_NTSTATUS_WIN_STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID = 0xC0380021, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS = 0xC0380022, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_IN_SYNC = 0xC0380023, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE = 0xC0380024, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_INDEX_INVALID = 0xC0380025, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_MISSING = 0xC0380026, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_NOT_DETACHED = 0xC0380027, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_REGENERATING = 0xC0380028, + MD_NTSTATUS_WIN_STATUS_VOLMGR_ALL_DISKS_FAILED = 0xC0380029, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_REGISTERED_USERS = 0xC038002A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_SUCH_USER = 0xC038002B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NOTIFICATION_RESET = 0xC038002C, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID = 0xC038002D, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID = 0xC038002E, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_DUPLICATE = 0xC038002F, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_ID_INVALID = 0xC0380030, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_INVALID = 0xC0380031, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_NAME_INVALID = 0xC0380032, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_OFFLINE = 0xC0380033, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_HAS_QUORUM = 0xC0380034, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_WITHOUT_QUORUM = 0xC0380035, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PARTITION_STYLE_INVALID = 0xC0380036, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PARTITION_UPDATE_FAILED = 0xC0380037, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_IN_SYNC = 0xC0380038, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_INDEX_DUPLICATE = 0xC0380039, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_INDEX_INVALID = 0xC038003A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_LAST_ACTIVE = 0xC038003B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_MISSING = 0xC038003C, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_REGENERATING = 0xC038003D, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_TYPE_INVALID = 0xC038003E, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_RAID5 = 0xC038003F, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_SIMPLE = 0xC0380040, + MD_NTSTATUS_WIN_STATUS_VOLMGR_STRUCTURE_SIZE_INVALID = 0xC0380041, + MD_NTSTATUS_WIN_STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS = 0xC0380042, + MD_NTSTATUS_WIN_STATUS_VOLMGR_TRANSACTION_IN_PROGRESS = 0xC0380043, + MD_NTSTATUS_WIN_STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE = 0xC0380044, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK = 0xC0380045, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_ID_INVALID = 0xC0380046, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_LENGTH_INVALID = 0xC0380047, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE = 0xC0380048, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_NOT_MIRRORED = 0xC0380049, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_NOT_RETAINED = 0xC038004A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_OFFLINE = 0xC038004B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_RETAINED = 0xC038004C, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID = 0xC038004D, + MD_NTSTATUS_WIN_STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE = 0xC038004E, + MD_NTSTATUS_WIN_STATUS_VOLMGR_BAD_BOOT_DISK = 0xC038004F, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_OFFLINE = 0xC0380050, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_ONLINE = 0xC0380051, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NOT_PRIMARY_PACK = 0xC0380052, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED = 0xC0380053, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID = 0xC0380054, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID = 0xC0380055, + MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_MIRRORED = 0xC0380056, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED = 0xC0380057, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_VALID_LOG_COPIES = 0xC0380058, + MD_NTSTATUS_WIN_STATUS_VOLMGR_PRIMARY_PACK_PRESENT = 0xC0380059, + MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID = 0xC038005A, + MD_NTSTATUS_WIN_STATUS_VOLMGR_MIRROR_NOT_SUPPORTED = 0xC038005B, + MD_NTSTATUS_WIN_STATUS_VOLMGR_RAID5_NOT_SUPPORTED = 0xC038005C, + MD_NTSTATUS_WIN_STATUS_BCD_TOO_MANY_ELEMENTS = 0xC0390002, + MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_MISSING = 0xC03A0001, + MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH = 0xC03A0002, + MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_CORRUPT = 0xC03A0003, + MD_NTSTATUS_WIN_STATUS_VHD_FORMAT_UNKNOWN = 0xC03A0004, + MD_NTSTATUS_WIN_STATUS_VHD_FORMAT_UNSUPPORTED_VERSION = 0xC03A0005, + MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH = 0xC03A0006, + MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION = 0xC03A0007, + MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_CORRUPT = 0xC03A0008, + MD_NTSTATUS_WIN_STATUS_VHD_BLOCK_ALLOCATION_FAILURE = 0xC03A0009, + MD_NTSTATUS_WIN_STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT = 0xC03A000A, + MD_NTSTATUS_WIN_STATUS_VHD_INVALID_BLOCK_SIZE = 0xC03A000B, + MD_NTSTATUS_WIN_STATUS_VHD_BITMAP_MISMATCH = 0xC03A000C, + MD_NTSTATUS_WIN_STATUS_VHD_PARENT_VHD_NOT_FOUND = 0xC03A000D, + MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_ID_MISMATCH = 0xC03A000E, + MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH = 0xC03A000F, + MD_NTSTATUS_WIN_STATUS_VHD_METADATA_READ_FAILURE = 0xC03A0010, + MD_NTSTATUS_WIN_STATUS_VHD_METADATA_WRITE_FAILURE = 0xC03A0011, + MD_NTSTATUS_WIN_STATUS_VHD_INVALID_SIZE = 0xC03A0012, + MD_NTSTATUS_WIN_STATUS_VHD_INVALID_FILE_SIZE = 0xC03A0013, + MD_NTSTATUS_WIN_STATUS_VIRTDISK_PROVIDER_NOT_FOUND = 0xC03A0014, + MD_NTSTATUS_WIN_STATUS_VIRTDISK_NOT_VIRTUAL_DISK = 0xC03A0015, + MD_NTSTATUS_WIN_STATUS_VHD_PARENT_VHD_ACCESS_DENIED = 0xC03A0016, + MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH = 0xC03A0017, + MD_NTSTATUS_WIN_STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED = 0xC03A0018, + MD_NTSTATUS_WIN_STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT = 0xC03A0019, + MD_NTSTATUS_WIN_STATUS_VIRTUAL_DISK_LIMITATION = 0xC03A001A, + MD_NTSTATUS_WIN_STATUS_VHD_INVALID_TYPE = 0xC03A001B, + MD_NTSTATUS_WIN_STATUS_VHD_INVALID_STATE = 0xC03A001C, + MD_NTSTATUS_WIN_STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE = 0xC03A001D, + MD_NTSTATUS_WIN_STATUS_VIRTDISK_DISK_ALREADY_OWNED = 0xC03A001E, + MD_NTSTATUS_WIN_STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE = 0xC03A001F, + MD_NTSTATUS_WIN_STATUS_CTLOG_TRACKING_NOT_INITIALIZED = 0xC03A0020, + MD_NTSTATUS_WIN_STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE = 0xC03A0021, + MD_NTSTATUS_WIN_STATUS_CTLOG_VHD_CHANGED_OFFLINE = 0xC03A0022, + MD_NTSTATUS_WIN_STATUS_CTLOG_INVALID_TRACKING_STATE = 0xC03A0023, + MD_NTSTATUS_WIN_STATUS_CTLOG_INCONSISTENT_TRACKING_FILE = 0xC03A0024, + MD_NTSTATUS_WIN_STATUS_VHD_METADATA_FULL = 0xC03A0028, + MD_NTSTATUS_WIN_STATUS_RKF_KEY_NOT_FOUND = 0xC0400001, + MD_NTSTATUS_WIN_STATUS_RKF_DUPLICATE_KEY = 0xC0400002, + MD_NTSTATUS_WIN_STATUS_RKF_BLOB_FULL = 0xC0400003, + MD_NTSTATUS_WIN_STATUS_RKF_STORE_FULL = 0xC0400004, + MD_NTSTATUS_WIN_STATUS_RKF_FILE_BLOCKED = 0xC0400005, + MD_NTSTATUS_WIN_STATUS_RKF_ACTIVE_KEY = 0xC0400006, + MD_NTSTATUS_WIN_STATUS_RDBSS_RESTART_OPERATION = 0xC0410001, + MD_NTSTATUS_WIN_STATUS_RDBSS_CONTINUE_OPERATION = 0xC0410002, + MD_NTSTATUS_WIN_STATUS_RDBSS_POST_OPERATION = 0xC0410003, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_HANDLE = 0xC0420001, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_READ_NOT_PERMITTED = 0xC0420002, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_WRITE_NOT_PERMITTED = 0xC0420003, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_PDU = 0xC0420004, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION = 0xC0420005, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED = 0xC0420006, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_OFFSET = 0xC0420007, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION = 0xC0420008, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_PREPARE_QUEUE_FULL = 0xC0420009, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND = 0xC042000A, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG = 0xC042000B, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE = 0xC042000C, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH = 0xC042000D, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNLIKELY = 0xC042000E, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION = 0xC042000F, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE = 0xC0420010, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_RESOURCES = 0xC0420011, + MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNKNOWN_ERROR = 0xC0421000, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_ROLLBACK_DETECTED = 0xC0430001, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_VIOLATION = 0xC0430002, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_INVALID_POLICY = 0xC0430003, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND = 0xC0430004, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_NOT_SIGNED = 0xC0430005, + MD_NTSTATUS_WIN_STATUS_SECUREBOOT_FILE_REPLACED = 0xC0430007, + MD_NTSTATUS_WIN_STATUS_AUDIO_ENGINE_NODE_NOT_FOUND = 0xC0440001, + MD_NTSTATUS_WIN_STATUS_HDAUDIO_EMPTY_CONNECTION_LIST = 0xC0440002, + MD_NTSTATUS_WIN_STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED = 0xC0440003, + MD_NTSTATUS_WIN_STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED = 0xC0440004, + MD_NTSTATUS_WIN_STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY = 0xC0440005, + MD_NTSTATUS_WIN_STATUS_VOLSNAP_BOOTFILE_NOT_VALID = 0xC0500003, + MD_NTSTATUS_WIN_STATUS_IO_PREEMPTED = 0xC0510001, + MD_NTSTATUS_WIN_STATUS_SVHDX_ERROR_STORED = 0xC05C0000, + MD_NTSTATUS_WIN_STATUS_SVHDX_ERROR_NOT_AVAILABLE = 0xC05CFF00, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE = 0xC05CFF01, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED = 0xC05CFF02, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED = 0xC05CFF03, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED = 0xC05CFF04, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED = 0xC05CFF05, + MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED = 0xC05CFF06, + MD_NTSTATUS_WIN_STATUS_SVHDX_RESERVATION_CONFLICT = 0xC05CFF07, + MD_NTSTATUS_WIN_STATUS_SVHDX_WRONG_FILE_TYPE = 0xC05CFF08, + MD_NTSTATUS_WIN_STATUS_SVHDX_VERSION_MISMATCH = 0xC05CFF09, + MD_NTSTATUS_WIN_STATUS_VHD_SHARED = 0xC05CFF0A, + MD_NTSTATUS_WIN_STATUS_SPACES_RESILIENCY_TYPE_INVALID = 0xC0E70003, + MD_NTSTATUS_WIN_STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID = 0xC0E70004, + MD_NTSTATUS_WIN_STATUS_SPACES_INTERLEAVE_LENGTH_INVALID = 0xC0E70009, + MD_NTSTATUS_WIN_STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID = 0xC0E7000A, + MD_NTSTATUS_WIN_STATUS_SPACES_NOT_ENOUGH_DRIVES = 0xC0E7000B +} MDNTStatusCodeWin; + +// These constants are defined in the MSDN documentation of +// the EXCEPTION_RECORD structure. +typedef enum { + MD_ACCESS_VIOLATION_WIN_READ = 0, + MD_ACCESS_VIOLATION_WIN_WRITE = 1, + MD_ACCESS_VIOLATION_WIN_EXEC = 8 +} MDAccessViolationTypeWin; + +// These constants are defined in the MSDN documentation of +// the EXCEPTION_RECORD structure. +typedef enum { + MD_IN_PAGE_ERROR_WIN_READ = 0, + MD_IN_PAGE_ERROR_WIN_WRITE = 1, + MD_IN_PAGE_ERROR_WIN_EXEC = 8 +} MDInPageErrorTypeWin; + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h new file mode 100644 index 00000000000000..17a5abba33f4a1 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h @@ -0,0 +1,972 @@ +/* Copyright (c) 2006, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +/* minidump_format.h: A cross-platform reimplementation of minidump-related + * portions of DbgHelp.h from the Windows Platform SDK. + * + * (This is C99 source, please don't corrupt it with C++.) + * + * Structures that are defined by Microsoft to contain a zero-length array + * are instead defined here to contain an array with one element, as + * zero-length arrays are forbidden by standard C and C++. In these cases, + * *_minsize constants are provided to be used in place of sizeof. For a + * cleaner interface to these sizes when using C++, see minidump_size.h. + * + * These structures are also sufficient to populate minidump files. + * + * These definitions may be extended to support handling minidump files + * for other CPUs and other operating systems. + * + * Because precise data type sizes are crucial for this implementation to + * function properly and portably in terms of interoperability with minidumps + * produced by DbgHelp on Windows, a set of primitive types with known sizes + * are used as the basis of each structure defined by this file. DbgHelp + * on Windows is assumed to be the reference implementation; this file + * seeks to provide a cross-platform compatible implementation. To avoid + * collisions with the types and values defined and used by DbgHelp in the + * event that this implementation is used on Windows, each type and value + * defined here is given a new name, beginning with "MD". Names of the + * equivalent types and values in the Windows Platform SDK are given in + * comments. + * + * Author: Mark Mentovai */ + + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ + +#include + +#include "google_breakpad/common/breakpad_types.h" + + +#if defined(_MSC_VER) +/* Disable "zero-sized array in struct/union" warnings when compiling in + * MSVC. DbgHelp.h does this too. */ +#pragma warning(push) +#pragma warning(disable:4200) +#endif /* _MSC_VER */ + + +/* + * guiddef.h + */ + +typedef struct { + uint32_t data1; + uint16_t data2; + uint16_t data3; + uint8_t data4[8]; +} MDGUID; /* GUID */ + + +/* + * WinNT.h + */ + +/* Non-x86 CPU identifiers found in the high 24 bits of + * (MDRawContext*).context_flags. These aren't used by Breakpad, but are + * defined here for reference, to avoid assigning values that conflict + * (although some values already conflict). */ +#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */ +/* Additional values from winnt.h in the Windows CE 5.0 SDK: */ +#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */ +#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */ + +/* As of Windows 7 SP1, the number of flag bits has increased to + * include 0x40 (CONTEXT_XSTATE): + * http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx */ +#define MD_CONTEXT_CPU_MASK 0xffffff00 + + +/* This is a base type for MDRawContextX86 and MDRawContextPPC. This + * structure should never be allocated directly. The actual structure type + * can be determined by examining the context_flags field. */ +typedef struct { + uint32_t context_flags; +} MDRawContextBase; + +#include "minidump_cpu_amd64.h" +#include "minidump_cpu_arm.h" +#include "minidump_cpu_arm64.h" +#include "minidump_cpu_mips.h" +#include "minidump_cpu_ppc.h" +#include "minidump_cpu_ppc64.h" +#include "minidump_cpu_sparc.h" +#include "minidump_cpu_x86.h" + +/* + * WinVer.h + */ + + +typedef struct { + uint32_t signature; + uint32_t struct_version; + uint32_t file_version_hi; + uint32_t file_version_lo; + uint32_t product_version_hi; + uint32_t product_version_lo; + uint32_t file_flags_mask; /* Identifies valid bits in fileFlags */ + uint32_t file_flags; + uint32_t file_os; + uint32_t file_type; + uint32_t file_subtype; + uint32_t file_date_hi; + uint32_t file_date_lo; +} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */ + +/* For (MDVSFixedFileInfo).signature */ +#define MD_VSFIXEDFILEINFO_SIGNATURE 0xfeef04bd + /* VS_FFI_SIGNATURE */ + +/* For (MDVSFixedFileInfo).version */ +#define MD_VSFIXEDFILEINFO_VERSION 0x00010000 + /* VS_FFI_STRUCVERSION */ + +/* For (MDVSFixedFileInfo).file_flags_mask and + * (MDVSFixedFileInfo).file_flags */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG 0x00000001 + /* VS_FF_DEBUG */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRERELEASE 0x00000002 + /* VS_FF_PRERELEASE */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PATCHED 0x00000004 + /* VS_FF_PATCHED */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRIVATEBUILD 0x00000008 + /* VS_FF_PRIVATEBUILD */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_INFOINFERRED 0x00000010 + /* VS_FF_INFOINFERRED */ +#define MD_VSFIXEDFILEINFO_FILE_FLAGS_SPECIALBUILD 0x00000020 + /* VS_FF_SPECIALBUILD */ + +/* For (MDVSFixedFileInfo).file_os: high 16 bits */ +#define MD_VSFIXEDFILEINFO_FILE_OS_UNKNOWN 0 /* VOS_UNKNOWN */ +#define MD_VSFIXEDFILEINFO_FILE_OS_DOS (1 << 16) /* VOS_DOS */ +#define MD_VSFIXEDFILEINFO_FILE_OS_OS216 (2 << 16) /* VOS_OS216 */ +#define MD_VSFIXEDFILEINFO_FILE_OS_OS232 (3 << 16) /* VOS_OS232 */ +#define MD_VSFIXEDFILEINFO_FILE_OS_NT (4 << 16) /* VOS_NT */ +#define MD_VSFIXEDFILEINFO_FILE_OS_WINCE (5 << 16) /* VOS_WINCE */ +/* Low 16 bits */ +#define MD_VSFIXEDFILEINFO_FILE_OS__BASE 0 /* VOS__BASE */ +#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS16 1 /* VOS__WINDOWS16 */ +#define MD_VSFIXEDFILEINFO_FILE_OS__PM16 2 /* VOS__PM16 */ +#define MD_VSFIXEDFILEINFO_FILE_OS__PM32 3 /* VOS__PM32 */ +#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32 4 /* VOS__WINDOWS32 */ + +/* For (MDVSFixedFileInfo).file_type */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_UNKNOWN 0 /* VFT_UNKNOWN */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_APP 1 /* VFT_APP */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_DLL 2 /* VFT_DLL */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_DRV 3 /* VFT_DLL */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_FONT 4 /* VFT_FONT */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_VXD 5 /* VFT_VXD */ +#define MD_VSFIXEDFILEINFO_FILE_TYPE_STATIC_LIB 7 /* VFT_STATIC_LIB */ + +/* For (MDVSFixedFileInfo).file_subtype */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN 0 + /* VFT2_UNKNOWN */ +/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_DRV */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_PRINTER 1 + /* VFT2_DRV_PRINTER */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_KEYBOARD 2 + /* VFT2_DRV_KEYBOARD */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_LANGUAGE 3 + /* VFT2_DRV_LANGUAGE */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_DISPLAY 4 + /* VFT2_DRV_DISPLAY */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_MOUSE 5 + /* VFT2_DRV_MOUSE */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_NETWORK 6 + /* VFT2_DRV_NETWORK */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SYSTEM 7 + /* VFT2_DRV_SYSTEM */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INSTALLABLE 8 + /* VFT2_DRV_INSTALLABLE */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SOUND 9 + /* VFT2_DRV_SOUND */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_COMM 10 + /* VFT2_DRV_COMM */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INPUTMETHOD 11 + /* VFT2_DRV_INPUTMETHOD */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_VERSIONED_PRINTER 12 + /* VFT2_DRV_VERSIONED_PRINTER */ +/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_FONT */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_RASTER 1 + /* VFT2_FONT_RASTER */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_VECTOR 2 + /* VFT2_FONT_VECTOR */ +#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_TRUETYPE 3 + /* VFT2_FONT_TRUETYPE */ + + +/* + * DbgHelp.h + */ + + +/* An MDRVA is an offset into the minidump file. The beginning of the + * MDRawHeader is at offset 0. */ +typedef uint32_t MDRVA; /* RVA */ + +typedef struct { + uint32_t data_size; + MDRVA rva; +} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */ + + +typedef struct { + /* The base address of the memory range on the host that produced the + * minidump. */ + uint64_t start_of_memory_range; + + MDLocationDescriptor memory; +} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */ + + +typedef struct { + uint32_t signature; + uint32_t version; + uint32_t stream_count; + MDRVA stream_directory_rva; /* A |stream_count|-sized array of + * MDRawDirectory structures. */ + uint32_t checksum; /* Can be 0. In fact, that's all that's + * been found in minidump files. */ + uint32_t time_date_stamp; /* time_t */ + uint64_t flags; +} MDRawHeader; /* MINIDUMP_HEADER */ + +/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the + * low 16 bits of (MDRawHeader).version are MD_HEADER_VERSION. Per the + * documentation, the high 16 bits are implementation-specific. */ +#define MD_HEADER_SIGNATURE 0x504d444d /* 'PMDM' */ + /* MINIDUMP_SIGNATURE */ +#define MD_HEADER_VERSION 0x0000a793 /* 42899 */ + /* MINIDUMP_VERSION */ + +/* For (MDRawHeader).flags: */ +typedef enum { + /* MD_NORMAL is the standard type of minidump. It includes full + * streams for the thread list, module list, exception, system info, + * and miscellaneous info. A memory list stream is also present, + * pointing to the same stack memory contained in the thread list, + * as well as a 256-byte region around the instruction address that + * was executing when the exception occurred. Stack memory is from + * 4 bytes below a thread's stack pointer up to the top of the + * memory region encompassing the stack. */ + MD_NORMAL = 0x00000000, + MD_WITH_DATA_SEGS = 0x00000001, + MD_WITH_FULL_MEMORY = 0x00000002, + MD_WITH_HANDLE_DATA = 0x00000004, + MD_FILTER_MEMORY = 0x00000008, + MD_SCAN_MEMORY = 0x00000010, + MD_WITH_UNLOADED_MODULES = 0x00000020, + MD_WITH_INDIRECTLY_REFERENCED_MEMORY = 0x00000040, + MD_FILTER_MODULE_PATHS = 0x00000080, + MD_WITH_PROCESS_THREAD_DATA = 0x00000100, + MD_WITH_PRIVATE_READ_WRITE_MEMORY = 0x00000200, + MD_WITHOUT_OPTIONAL_DATA = 0x00000400, + MD_WITH_FULL_MEMORY_INFO = 0x00000800, + MD_WITH_THREAD_INFO = 0x00001000, + MD_WITH_CODE_SEGS = 0x00002000, + MD_WITHOUT_AUXILLIARY_SEGS = 0x00004000, + MD_WITH_FULL_AUXILLIARY_STATE = 0x00008000, + MD_WITH_PRIVATE_WRITE_COPY_MEMORY = 0x00010000, + MD_IGNORE_INACCESSIBLE_MEMORY = 0x00020000, + MD_WITH_TOKEN_INFORMATION = 0x00040000 +} MDType; /* MINIDUMP_TYPE */ + + +typedef struct { + uint32_t stream_type; + MDLocationDescriptor location; +} MDRawDirectory; /* MINIDUMP_DIRECTORY */ + +/* For (MDRawDirectory).stream_type */ +typedef enum { + MD_UNUSED_STREAM = 0, + MD_RESERVED_STREAM_0 = 1, + MD_RESERVED_STREAM_1 = 2, + MD_THREAD_LIST_STREAM = 3, /* MDRawThreadList */ + MD_MODULE_LIST_STREAM = 4, /* MDRawModuleList */ + MD_MEMORY_LIST_STREAM = 5, /* MDRawMemoryList */ + MD_EXCEPTION_STREAM = 6, /* MDRawExceptionStream */ + MD_SYSTEM_INFO_STREAM = 7, /* MDRawSystemInfo */ + MD_THREAD_EX_LIST_STREAM = 8, + MD_MEMORY_64_LIST_STREAM = 9, + MD_COMMENT_STREAM_A = 10, + MD_COMMENT_STREAM_W = 11, + MD_HANDLE_DATA_STREAM = 12, + MD_FUNCTION_TABLE_STREAM = 13, + MD_UNLOADED_MODULE_LIST_STREAM = 14, + MD_MISC_INFO_STREAM = 15, /* MDRawMiscInfo */ + MD_MEMORY_INFO_LIST_STREAM = 16, /* MDRawMemoryInfoList */ + MD_THREAD_INFO_LIST_STREAM = 17, + MD_HANDLE_OPERATION_LIST_STREAM = 18, + MD_LAST_RESERVED_STREAM = 0x0000ffff, + + /* Breakpad extension types. 0x4767 = "Gg" */ + MD_BREAKPAD_INFO_STREAM = 0x47670001, /* MDRawBreakpadInfo */ + MD_ASSERTION_INFO_STREAM = 0x47670002, /* MDRawAssertionInfo */ + /* These are additional minidump stream values which are specific to + * the linux breakpad implementation. */ + MD_LINUX_CPU_INFO = 0x47670003, /* /proc/cpuinfo */ + MD_LINUX_PROC_STATUS = 0x47670004, /* /proc/$x/status */ + MD_LINUX_LSB_RELEASE = 0x47670005, /* /etc/lsb-release */ + MD_LINUX_CMD_LINE = 0x47670006, /* /proc/$x/cmdline */ + MD_LINUX_ENVIRON = 0x47670007, /* /proc/$x/environ */ + MD_LINUX_AUXV = 0x47670008, /* /proc/$x/auxv */ + MD_LINUX_MAPS = 0x47670009, /* /proc/$x/maps */ + MD_LINUX_DSO_DEBUG = 0x4767000A /* MDRawDebug{32,64} */ +} MDStreamType; /* MINIDUMP_STREAM_TYPE */ + + +typedef struct { + uint32_t length; /* Length of buffer in bytes (not characters), + * excluding 0-terminator */ + uint16_t buffer[1]; /* UTF-16-encoded, 0-terminated */ +} MDString; /* MINIDUMP_STRING */ + +static const size_t MDString_minsize = offsetof(MDString, buffer[0]); + + +typedef struct { + uint32_t thread_id; + uint32_t suspend_count; + uint32_t priority_class; + uint32_t priority; + uint64_t teb; /* Thread environment block */ + MDMemoryDescriptor stack; + MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ +} MDRawThread; /* MINIDUMP_THREAD */ + + +typedef struct { + uint32_t number_of_threads; + MDRawThread threads[1]; +} MDRawThreadList; /* MINIDUMP_THREAD_LIST */ + +static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList, + threads[0]); + + +typedef struct { + uint64_t base_of_image; + uint32_t size_of_image; + uint32_t checksum; /* 0 if unknown */ + uint32_t time_date_stamp; /* time_t */ + MDRVA module_name_rva; /* MDString, pathname or filename */ + MDVSFixedFileInfo version_info; + + /* The next field stores a CodeView record and is populated when a module's + * debug information resides in a PDB file. It identifies the PDB file. */ + MDLocationDescriptor cv_record; + + /* The next field is populated when a module's debug information resides + * in a DBG file. It identifies the DBG file. This field is effectively + * obsolete with modules built by recent toolchains. */ + MDLocationDescriptor misc_record; + + /* Alignment problem: reserved0 and reserved1 are defined by the platform + * SDK as 64-bit quantities. However, that results in a structure whose + * alignment is unpredictable on different CPUs and ABIs. If the ABI + * specifies full alignment of 64-bit quantities in structures (as ppc + * does), there will be padding between miscRecord and reserved0. If + * 64-bit quantities can be aligned on 32-bit boundaries (as on x86), + * this padding will not exist. (Note that the structure up to this point + * contains 1 64-bit member followed by 21 32-bit members.) + * As a workaround, reserved0 and reserved1 are instead defined here as + * four 32-bit quantities. This should be harmless, as there are + * currently no known uses for these fields. */ + uint32_t reserved0[2]; + uint32_t reserved1[2]; +} MDRawModule; /* MINIDUMP_MODULE */ + +/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to + * be tail-padded out to a multiple of 64 bits under some ABIs (such as PPC). + * This doesn't occur on systems that don't tail-pad in this manner. Define + * this macro to be the usable size of the MDRawModule struct, and use it in + * place of sizeof(MDRawModule). */ +#define MD_MODULE_SIZE 108 + + +/* (MDRawModule).cv_record can reference MDCVInfoPDB20 or MDCVInfoPDB70. + * Ref.: http://www.debuginfo.com/articles/debuginfomatch.html + * MDCVInfoPDB70 is the expected structure type with recent toolchains. */ + +typedef struct { + uint32_t signature; + uint32_t offset; /* Offset to debug data (expect 0 in minidump) */ +} MDCVHeader; + +typedef struct { + MDCVHeader cv_header; + uint32_t signature; /* time_t debug information created */ + uint32_t age; /* revision of PDB file */ + uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file */ +} MDCVInfoPDB20; + +static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20, + pdb_file_name[0]); + +#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */ + +typedef struct { + uint32_t cv_signature; + MDGUID signature; /* GUID, identifies PDB file */ + uint32_t age; /* Identifies incremental changes to PDB file */ + uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file, + * 0-terminated 8-bit character data (UTF-8?) */ +} MDCVInfoPDB70; + +static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70, + pdb_file_name[0]); + +#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */ + +typedef struct { + uint32_t data1[2]; + uint32_t data2; + uint32_t data3; + uint32_t data4; + uint32_t data5[3]; + uint8_t extra[2]; +} MDCVInfoELF; + +/* In addition to the two CodeView record formats above, used for linking + * to external pdb files, it is possible for debugging data to be carried + * directly in the CodeView record itself. These signature values will + * be found in the first 4 bytes of the CodeView record. Additional values + * not commonly experienced in the wild are given by "Microsoft Symbol and + * Type Information", http://www.x86.org/ftp/manuals/tools/sym.pdf, section + * 7.2. An in-depth description of the CodeView 4.1 format is given by + * "Undocumented Windows 2000 Secrets", Windows 2000 Debugging Support/ + * Microsoft Symbol File Internals/CodeView Subsections, + * http://www.rawol.com/features/undocumented/sbs-w2k-1-windows-2000-debugging-support.pdf + */ +#define MD_CVINFOCV41_SIGNATURE 0x3930424e /* '90BN', CodeView 4.10. */ +#define MD_CVINFOCV50_SIGNATURE 0x3131424e /* '11BN', CodeView 5.0, + * MS C7-format (/Z7). */ + +#define MD_CVINFOUNKNOWN_SIGNATURE 0xffffffff /* An unlikely value. */ + +/* (MDRawModule).miscRecord can reference MDImageDebugMisc. The Windows + * structure is actually defined in WinNT.h. This structure is effectively + * obsolete with modules built by recent toolchains. */ + +typedef struct { + uint32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because + * this debug record type is mostly obsolete. */ + uint32_t length; /* Length of entire MDImageDebugMisc structure */ + uint8_t unicode; /* True if data is multibyte */ + uint8_t reserved[3]; + uint8_t data[1]; +} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */ + +static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc, + data[0]); + + +typedef struct { + uint32_t number_of_modules; + MDRawModule modules[1]; +} MDRawModuleList; /* MINIDUMP_MODULE_LIST */ + +static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList, + modules[0]); + + +typedef struct { + uint32_t number_of_memory_ranges; + MDMemoryDescriptor memory_ranges[1]; +} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */ + +static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList, + memory_ranges[0]); + + +#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15 + +typedef struct { + uint32_t exception_code; /* Windows: MDExceptionCodeWin, + * Mac OS X: MDExceptionMac, + * Linux: MDExceptionCodeLinux. */ + uint32_t exception_flags; /* Windows: 1 if noncontinuable, + Mac OS X: MDExceptionCodeMac. */ + uint64_t exception_record; /* Address (in the minidump-producing host's + * memory) of another MDException, for + * nested exceptions. */ + uint64_t exception_address; /* The address that caused the exception. + * Mac OS X: exception subcode (which is + * typically the address). */ + uint32_t number_parameters; /* Number of valid elements in + * exception_information. */ + uint32_t __align; + uint64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS]; +} MDException; /* MINIDUMP_EXCEPTION */ + +#include "minidump_exception_linux.h" +#include "minidump_exception_mac.h" +#include "minidump_exception_ps3.h" +#include "minidump_exception_solaris.h" +#include "minidump_exception_win32.h" + +typedef struct { + uint32_t thread_id; /* Thread in which the exception + * occurred. Corresponds to + * (MDRawThread).thread_id. */ + uint32_t __align; + MDException exception_record; + MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ +} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */ + + +typedef union { + struct { + uint32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ + uint32_t version_information; /* cpuid 1: eax */ + uint32_t feature_information; /* cpuid 1: edx */ + uint32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ + } x86_cpu_info; + struct { + uint32_t cpuid; + uint32_t elf_hwcaps; /* linux specific, 0 otherwise */ + } arm_cpu_info; + struct { + uint64_t processor_features[2]; + } other_cpu_info; +} MDCPUInformation; /* CPU_INFORMATION */ + +/* For (MDCPUInformation).arm_cpu_info.elf_hwcaps. + * This matches the Linux kernel definitions from */ +typedef enum { + MD_CPU_ARM_ELF_HWCAP_SWP = (1 << 0), + MD_CPU_ARM_ELF_HWCAP_HALF = (1 << 1), + MD_CPU_ARM_ELF_HWCAP_THUMB = (1 << 2), + MD_CPU_ARM_ELF_HWCAP_26BIT = (1 << 3), + MD_CPU_ARM_ELF_HWCAP_FAST_MULT = (1 << 4), + MD_CPU_ARM_ELF_HWCAP_FPA = (1 << 5), + MD_CPU_ARM_ELF_HWCAP_VFP = (1 << 6), + MD_CPU_ARM_ELF_HWCAP_EDSP = (1 << 7), + MD_CPU_ARM_ELF_HWCAP_JAVA = (1 << 8), + MD_CPU_ARM_ELF_HWCAP_IWMMXT = (1 << 9), + MD_CPU_ARM_ELF_HWCAP_CRUNCH = (1 << 10), + MD_CPU_ARM_ELF_HWCAP_THUMBEE = (1 << 11), + MD_CPU_ARM_ELF_HWCAP_NEON = (1 << 12), + MD_CPU_ARM_ELF_HWCAP_VFPv3 = (1 << 13), + MD_CPU_ARM_ELF_HWCAP_VFPv3D16 = (1 << 14), + MD_CPU_ARM_ELF_HWCAP_TLS = (1 << 15), + MD_CPU_ARM_ELF_HWCAP_VFPv4 = (1 << 16), + MD_CPU_ARM_ELF_HWCAP_IDIVA = (1 << 17), + MD_CPU_ARM_ELF_HWCAP_IDIVT = (1 << 18), +} MDCPUInformationARMElfHwCaps; + +typedef struct { + /* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO + * structure as returned by GetSystemInfo */ + uint16_t processor_architecture; + uint16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */ + /* ARM: 6 = ARMv6, 7 = ARMv7 ... */ + uint16_t processor_revision; /* x86: 0xMMSS, where MM=model, + * SS=stepping */ + /* ARM: 0 */ + + uint8_t number_of_processors; + uint8_t product_type; /* Windows: VER_NT_* from WinNT.h */ + + /* The next 5 fields are from the OSVERSIONINFO structure as returned + * by GetVersionEx */ + uint32_t major_version; + uint32_t minor_version; + uint32_t build_number; + uint32_t platform_id; + MDRVA csd_version_rva; /* MDString further identifying the + * host OS. + * Windows: name of the installed OS + * service pack. + * Mac OS X: the Apple OS build number + * (sw_vers -buildVersion). + * Linux: uname -srvmo */ + + uint16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */ + uint16_t reserved2; + + MDCPUInformation cpu; +} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */ + +/* For (MDRawSystemInfo).processor_architecture: */ +typedef enum { + MD_CPU_ARCHITECTURE_X86 = 0, /* PROCESSOR_ARCHITECTURE_INTEL */ + MD_CPU_ARCHITECTURE_MIPS = 1, /* PROCESSOR_ARCHITECTURE_MIPS */ + MD_CPU_ARCHITECTURE_ALPHA = 2, /* PROCESSOR_ARCHITECTURE_ALPHA */ + MD_CPU_ARCHITECTURE_PPC = 3, /* PROCESSOR_ARCHITECTURE_PPC */ + MD_CPU_ARCHITECTURE_SHX = 4, /* PROCESSOR_ARCHITECTURE_SHX + * (Super-H) */ + MD_CPU_ARCHITECTURE_ARM = 5, /* PROCESSOR_ARCHITECTURE_ARM */ + MD_CPU_ARCHITECTURE_IA64 = 6, /* PROCESSOR_ARCHITECTURE_IA64 */ + MD_CPU_ARCHITECTURE_ALPHA64 = 7, /* PROCESSOR_ARCHITECTURE_ALPHA64 */ + MD_CPU_ARCHITECTURE_MSIL = 8, /* PROCESSOR_ARCHITECTURE_MSIL + * (Microsoft Intermediate Language) */ + MD_CPU_ARCHITECTURE_AMD64 = 9, /* PROCESSOR_ARCHITECTURE_AMD64 */ + MD_CPU_ARCHITECTURE_X86_WIN64 = 10, + /* PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 (WoW64) */ + MD_CPU_ARCHITECTURE_SPARC = 0x8001, /* Breakpad-defined value for SPARC */ + MD_CPU_ARCHITECTURE_PPC64 = 0x8002, /* Breakpad-defined value for PPC64 */ + MD_CPU_ARCHITECTURE_ARM64 = 0x8003, /* Breakpad-defined value for ARM64 */ + MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ +} MDCPUArchitecture; + +/* For (MDRawSystemInfo).platform_id: */ +typedef enum { + MD_OS_WIN32S = 0, /* VER_PLATFORM_WIN32s (Windows 3.1) */ + MD_OS_WIN32_WINDOWS = 1, /* VER_PLATFORM_WIN32_WINDOWS (Windows 95-98-Me) */ + MD_OS_WIN32_NT = 2, /* VER_PLATFORM_WIN32_NT (Windows NT, 2000+) */ + MD_OS_WIN32_CE = 3, /* VER_PLATFORM_WIN32_CE, VER_PLATFORM_WIN32_HH + * (Windows CE, Windows Mobile, "Handheld") */ + + /* The following values are Breakpad-defined. */ + MD_OS_UNIX = 0x8000, /* Generic Unix-ish */ + MD_OS_MAC_OS_X = 0x8101, /* Mac OS X/Darwin */ + MD_OS_IOS = 0x8102, /* iOS */ + MD_OS_LINUX = 0x8201, /* Linux */ + MD_OS_SOLARIS = 0x8202, /* Solaris */ + MD_OS_ANDROID = 0x8203, /* Android */ + MD_OS_PS3 = 0x8204, /* PS3 */ + MD_OS_NACL = 0x8205 /* Native Client (NaCl) */ +} MDOSPlatform; + +typedef struct { + uint16_t year; + uint16_t month; + uint16_t day_of_week; + uint16_t day; + uint16_t hour; + uint16_t minute; + uint16_t second; + uint16_t milliseconds; +} MDSystemTime; /* SYSTEMTIME */ + +typedef struct { + /* Required field. The bias is the difference, in minutes, between + * Coordinated Universal Time (UTC) and local time. + * Formula: UTC = local time + bias */ + int32_t bias; + /* A description for standard time. For example, "EST" could indicate Eastern + * Standard Time. In practice this contains the full time zone names. This + * string can be empty. */ + uint16_t standard_name[32]; /* UTF-16-encoded, 0-terminated */ + /* A MDSystemTime structure that contains a date and local time when the + * transition from daylight saving time to standard time occurs on this + * operating system. If the time zone does not support daylight saving time, + * the month member in the MDSystemTime structure is zero. */ + MDSystemTime standard_date; + /* The bias value to be used during local time translations that occur during + * standard time. */ + int32_t standard_bias; + /* A description for daylight saving time. For example, "PDT" could indicate + * Pacific Daylight Time. In practice this contains the full time zone names. + * This string can be empty. */ + uint16_t daylight_name[32]; /* UTF-16-encoded, 0-terminated */ + /* A MDSystemTime structure that contains a date and local time when the + * transition from standard time to daylight saving time occurs on this + * operating system. If the time zone does not support daylight saving time, + * the month member in the MDSystemTime structure is zero.*/ + MDSystemTime daylight_date; + /* The bias value to be used during local time translations that occur during + * daylight saving time. */ + int32_t daylight_bias; +} MDTimeZoneInformation; /* TIME_ZONE_INFORMATION */ + +/* MAX_PATH from windef.h */ +#define MD_MAX_PATH 260 + +/* The miscellaneous information stream contains a variety + * of small pieces of information. A member is valid if + * it's within the available size and its corresponding + * bit is set. */ +typedef struct { + uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ + uint32_t flags1; + + /* The next field is only valid if flags1 contains + * MD_MISCINFO_FLAGS1_PROCESS_ID. */ + uint32_t process_id; + + /* The next 3 fields are only valid if flags1 contains + * MD_MISCINFO_FLAGS1_PROCESS_TIMES. */ + uint32_t process_create_time; /* time_t process started */ + uint32_t process_user_time; /* seconds of user CPU time */ + uint32_t process_kernel_time; /* seconds of kernel CPU time */ + + /* The following fields are not present in MINIDUMP_MISC_INFO but are + * in MINIDUMP_MISC_INFO_2. When this struct is populated, these values + * may not be set. Use flags1 and size_of_info to determine whether these + * values are present. These are only valid when flags1 contains + * MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */ + uint32_t processor_max_mhz; + uint32_t processor_current_mhz; + uint32_t processor_mhz_limit; + uint32_t processor_max_idle_state; + uint32_t processor_current_idle_state; + + /* The following fields are not present in MINIDUMP_MISC_INFO_2 but are + * in MINIDUMP_MISC_INFO_3. When this struct is populated, these values + * may not be set. Use flags1 and size_of_info to determine whether these + * values are present. */ + + /* The following field is only valid if flags1 contains + * MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY. */ + uint32_t process_integrity_level; + + /* The following field is only valid if flags1 contains + * MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS. */ + uint32_t process_execute_flags; + + /* The following field is only valid if flags1 contains + * MD_MISCINFO_FLAGS1_PROTECTED_PROCESS. */ + uint32_t protected_process; + + /* The following 2 fields are only valid if flags1 contains + * MD_MISCINFO_FLAGS1_TIMEZONE. */ + uint32_t time_zone_id; + MDTimeZoneInformation time_zone; + + /* The following fields are not present in MINIDUMP_MISC_INFO_3 but are + * in MINIDUMP_MISC_INFO_4. When this struct is populated, these values + * may not be set. Use flags1 and size_of_info to determine whether these + * values are present. */ + + /* The following 2 fields are only valid if flags1 contains + * MD_MISCINFO_FLAGS1_BUILDSTRING. */ + uint16_t build_string[MD_MAX_PATH]; /* UTF-16-encoded, 0-terminated */ + uint16_t dbg_bld_str[40]; /* UTF-16-encoded, 0-terminated */ +} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, + * MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4, + * MINIDUMP_MISC_INFO_N */ + +static const size_t MD_MISCINFO_SIZE = + offsetof(MDRawMiscInfo, processor_max_mhz); +static const size_t MD_MISCINFO2_SIZE = + offsetof(MDRawMiscInfo, process_integrity_level); +static const size_t MD_MISCINFO3_SIZE = + offsetof(MDRawMiscInfo, build_string[0]); +static const size_t MD_MISCINFO4_SIZE = sizeof(MDRawMiscInfo); + +/* For (MDRawMiscInfo).flags1. These values indicate which fields in the + * MDRawMiscInfoStructure are valid. */ +typedef enum { + MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, + /* MINIDUMP_MISC1_PROCESS_ID */ + MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, + /* MINIDUMP_MISC1_PROCESS_TIMES */ + MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004, + /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ + MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY = 0x00000010, + /* MINIDUMP_MISC3_PROCESS_INTEGRITY */ + MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS = 0x00000020, + /* MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS */ + MD_MISCINFO_FLAGS1_TIMEZONE = 0x00000040, + /* MINIDUMP_MISC3_TIMEZONE */ + MD_MISCINFO_FLAGS1_PROTECTED_PROCESS = 0x00000080, + /* MINIDUMP_MISC3_PROTECTED_PROCESS */ + MD_MISCINFO_FLAGS1_BUILDSTRING = 0x00000100, + /* MINIDUMP_MISC4_BUILDSTRING */ +} MDMiscInfoFlags1; + +/* + * Around DbgHelp version 6.0, the style of new LIST structures changed + * from including an array of length 1 at the end of the struct to + * represent the variable-length data to including explicit + * "size of header", "size of entry" and "number of entries" fields + * in the header, presumably to allow backwards-compatibly-extending + * the structures in the future. The actual list entries follow the + * header data directly in this case. + */ + +typedef struct { + uint32_t size_of_header; /* sizeof(MDRawMemoryInfoList) */ + uint32_t size_of_entry; /* sizeof(MDRawMemoryInfo) */ + uint64_t number_of_entries; +} MDRawMemoryInfoList; /* MINIDUMP_MEMORY_INFO_LIST */ + +typedef struct { + uint64_t base_address; /* Base address of a region of pages */ + uint64_t allocation_base; /* Base address of a range of pages + * within this region. */ + uint32_t allocation_protection; /* Memory protection when this region + * was originally allocated: + * MDMemoryProtection */ + uint32_t __alignment1; + uint64_t region_size; + uint32_t state; /* MDMemoryState */ + uint32_t protection; /* MDMemoryProtection */ + uint32_t type; /* MDMemoryType */ + uint32_t __alignment2; +} MDRawMemoryInfo; /* MINIDUMP_MEMORY_INFO */ + +/* For (MDRawMemoryInfo).state */ +typedef enum { + MD_MEMORY_STATE_COMMIT = 0x1000, /* physical storage has been allocated */ + MD_MEMORY_STATE_RESERVE = 0x2000, /* reserved, but no physical storage */ + MD_MEMORY_STATE_FREE = 0x10000 /* available to be allocated */ +} MDMemoryState; + +/* For (MDRawMemoryInfo).allocation_protection and .protection */ +typedef enum { + MD_MEMORY_PROTECT_NOACCESS = 0x01, /* PAGE_NOACCESS */ + MD_MEMORY_PROTECT_READONLY = 0x02, /* PAGE_READONLY */ + MD_MEMORY_PROTECT_READWRITE = 0x04, /* PAGE_READWRITE */ + MD_MEMORY_PROTECT_WRITECOPY = 0x08, /* PAGE_WRITECOPY */ + MD_MEMORY_PROTECT_EXECUTE = 0x10, /* PAGE_EXECUTE */ + MD_MEMORY_PROTECT_EXECUTE_READ = 0x20, /* PAGE_EXECUTE_READ */ + MD_MEMORY_PROTECT_EXECUTE_READWRITE = 0x40, /* PAGE_EXECUTE_READWRITE */ + MD_MEMORY_PROTECT_EXECUTE_WRITECOPY = 0x80, /* PAGE_EXECUTE_WRITECOPY */ + /* These options can be combined with the previous flags. */ + MD_MEMORY_PROTECT_GUARD = 0x100, /* PAGE_GUARD */ + MD_MEMORY_PROTECT_NOCACHE = 0x200, /* PAGE_NOCACHE */ + MD_MEMORY_PROTECT_WRITECOMBINE = 0x400, /* PAGE_WRITECOMBINE */ +} MDMemoryProtection; + +/* Used to mask the mutually exclusive options from the combinable flags. */ +const uint32_t MD_MEMORY_PROTECTION_ACCESS_MASK = 0xFF; + +/* For (MDRawMemoryInfo).type */ +typedef enum { + MD_MEMORY_TYPE_PRIVATE = 0x20000, /* not shared by other processes */ + MD_MEMORY_TYPE_MAPPED = 0x40000, /* mapped into the view of a section */ + MD_MEMORY_TYPE_IMAGE = 0x1000000 /* mapped into the view of an image */ +} MDMemoryType; + +/* + * Breakpad extension types + */ + + +typedef struct { + /* validity is a bitmask with values from MDBreakpadInfoValidity, indicating + * which of the other fields in the structure are valid. */ + uint32_t validity; + + /* Thread ID of the handler thread. dump_thread_id should correspond to + * the thread_id of an MDRawThread in the minidump's MDRawThreadList if + * a dedicated thread in that list was used to produce the minidump. If + * the MDRawThreadList does not contain a dedicated thread used to produce + * the minidump, this field should be set to 0 and the validity field + * must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */ + uint32_t dump_thread_id; + + /* Thread ID of the thread that requested the minidump be produced. As + * with dump_thread_id, requesting_thread_id should correspond to the + * thread_id of an MDRawThread in the minidump's MDRawThreadList. For + * minidumps produced as a result of an exception, requesting_thread_id + * will be the same as the MDRawExceptionStream's thread_id field. For + * minidumps produced "manually" at the program's request, + * requesting_thread_id will indicate which thread caused the dump to be + * written. If the minidump was produced at the request of something + * other than a thread in the MDRawThreadList, this field should be set + * to 0 and the validity field must not contain + * MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */ + uint32_t requesting_thread_id; +} MDRawBreakpadInfo; + +/* For (MDRawBreakpadInfo).validity: */ +typedef enum { + /* When set, the dump_thread_id field is valid. */ + MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID = 1 << 0, + + /* When set, the requesting_thread_id field is valid. */ + MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID = 1 << 1 +} MDBreakpadInfoValidity; + +typedef struct { + /* expression, function, and file are 0-terminated UTF-16 strings. They + * may be truncated if necessary, but should always be 0-terminated when + * written to a file. + * Fixed-length strings are used because MiniDumpWriteDump doesn't offer + * a way for user streams to point to arbitrary RVAs for strings. */ + uint16_t expression[128]; /* Assertion that failed... */ + uint16_t function[128]; /* ...within this function... */ + uint16_t file[128]; /* ...in this file... */ + uint32_t line; /* ...at this line. */ + uint32_t type; +} MDRawAssertionInfo; + +/* For (MDRawAssertionInfo).type: */ +typedef enum { + MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, + + /* Used for assertions that would be raised by the MSVC CRT but are + * directed to an invalid parameter handler instead. */ + MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, + + /* Used for assertions that would be raised by the MSVC CRT but are + * directed to a pure virtual call handler instead. */ + MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL +} MDAssertionInfoData; + +/* These structs are used to store the DSO debug data in Linux minidumps, + * which is necessary for converting minidumps to usable coredumps. + * Because of a historical accident, several fields are variably encoded + * according to client word size, so tools potentially need to support both. */ + +typedef struct { + uint32_t addr; + MDRVA name; + uint32_t ld; +} MDRawLinkMap32; + +typedef struct { + uint32_t version; + MDRVA map; /* array of MDRawLinkMap32 */ + uint32_t dso_count; + uint32_t brk; + uint32_t ldbase; + uint32_t dynamic; +} MDRawDebug32; + +typedef struct { + uint64_t addr; + MDRVA name; + uint64_t ld; +} MDRawLinkMap64; + +typedef struct { + uint32_t version; + MDRVA map; /* array of MDRawLinkMap64 */ + uint32_t dso_count; + uint64_t brk; + uint64_t ldbase; + uint64_t dynamic; +} MDRawDebug64; + +#if defined(_MSC_VER) +#pragma warning(pop) +#endif /* _MSC_VER */ + + +#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ diff --git a/Telegram/SourceFiles/_other/crypt.h b/Telegram/ThirdParty/minizip/crypt.h similarity index 100% rename from Telegram/SourceFiles/_other/crypt.h rename to Telegram/ThirdParty/minizip/crypt.h diff --git a/Telegram/SourceFiles/_other/ioapi.h b/Telegram/ThirdParty/minizip/ioapi.h similarity index 100% rename from Telegram/SourceFiles/_other/ioapi.h rename to Telegram/ThirdParty/minizip/ioapi.h diff --git a/Telegram/SourceFiles/_other/zip.c b/Telegram/ThirdParty/minizip/zip.c similarity index 100% rename from Telegram/SourceFiles/_other/zip.c rename to Telegram/ThirdParty/minizip/zip.c diff --git a/Telegram/SourceFiles/_other/zip.h b/Telegram/ThirdParty/minizip/zip.h similarity index 100% rename from Telegram/SourceFiles/_other/zip.h rename to Telegram/ThirdParty/minizip/zip.h From daa0adfff9fed6e497890eb5a26e50b076455ff8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Feb 2016 13:12:37 +0300 Subject: [PATCH 021/133] added breakpad support for os x --- Telegram/SourceFiles/logs.cpp | 119 +- Telegram/SourceFiles/stdafx.h | 12 +- Telegram/SourceFiles/window.cpp | 12 +- Telegram/Telegram.xcodeproj/project.pbxproj | 289 ++- .../client/mac/crash_generation/client_info.h | 47 + .../crash_generation_client.cc | 72 + .../crash_generation_client.h | 65 + .../crash_generation_server.cc | 166 ++ .../crash_generation_server.h | 150 ++ .../client/mac/handler/breakpad_nlist_64.cc | 402 +++++ .../client/mac/handler/breakpad_nlist_64.h | 47 + .../client/mac/handler/dynamic_images.cc | 573 ++++++ .../client/mac/handler/dynamic_images.h | 319 ++++ .../client/mac/handler/mach_vm_compat.h | 48 + .../client/mac/handler/minidump_generator.cc | 1591 +++++++++++++++++ .../client/mac/handler/minidump_generator.h | 236 +++ .../client/mac/handler/ucontext_compat.h | 47 + .../client/minidump_file_writer-inl.h | 97 + .../breakpad/client/minidump_file_writer.cc | 350 ++++ .../breakpad/client/minidump_file_writer.h | 272 +++ .../ThirdParty/breakpad/common/convert_UTF.c | 554 ++++++ .../ThirdParty/breakpad/common/convert_UTF.h | 164 ++ .../common/linux/linux_libc_support.h | 96 + .../ThirdParty/breakpad/common/mac/MachIPC.h | 301 ++++ .../ThirdParty/breakpad/common/mac/MachIPC.mm | 306 ++++ .../breakpad/common/mac/bootstrap_compat.cc | 42 + .../breakpad/common/mac/bootstrap_compat.h | 54 + .../ThirdParty/breakpad/common/mac/byteswap.h | 73 + .../ThirdParty/breakpad/common/mac/file_id.cc | 106 ++ .../ThirdParty/breakpad/common/mac/file_id.h | 81 + .../breakpad/common/mac/macho_id.cc | 369 ++++ .../ThirdParty/breakpad/common/mac/macho_id.h | 131 ++ .../breakpad/common/mac/macho_utilities.cc | 155 ++ .../breakpad/common/mac/macho_utilities.h | 95 + .../breakpad/common/mac/macho_walker.cc | 268 +++ .../breakpad/common/mac/macho_walker.h | 119 ++ .../common/mac/scoped_task_suspend-inl.h | 56 + .../breakpad/common/mac/string_utilities.cc | 84 + .../breakpad/common/mac/string_utilities.h | 52 + Telegram/ThirdParty/breakpad/common/md5.cc | 251 +++ Telegram/ThirdParty/breakpad/common/md5.h | 27 + Telegram/ThirdParty/breakpad/common/memory.h | 212 +++ .../breakpad/common/string_conversion.cc | 155 ++ .../breakpad/common/string_conversion.h | 68 + .../breakpad/common/using_std_string.h | 65 + .../google_breakpad/common/minidump_size.h | 107 ++ Telegram/ThirdParty/minizip/ioapi.c | 247 +++ Telegram/ThirdParty/minizip/zip.c | 2 +- 48 files changed, 9082 insertions(+), 72 deletions(-) create mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h create mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h create mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h create mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc create mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer.h create mode 100644 Telegram/ThirdParty/breakpad/common/convert_UTF.c create mode 100644 Telegram/ThirdParty/breakpad/common/convert_UTF.h create mode 100644 Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/MachIPC.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm create mode 100644 Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/byteswap.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/file_id.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/file_id.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_id.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_id.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_walker.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h create mode 100644 Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc create mode 100644 Telegram/ThirdParty/breakpad/common/mac/string_utilities.h create mode 100644 Telegram/ThirdParty/breakpad/common/md5.cc create mode 100644 Telegram/ThirdParty/breakpad/common/md5.h create mode 100644 Telegram/ThirdParty/breakpad/common/memory.h create mode 100644 Telegram/ThirdParty/breakpad/common/string_conversion.cc create mode 100644 Telegram/ThirdParty/breakpad/common/string_conversion.h create mode 100644 Telegram/ThirdParty/breakpad/common/using_std_string.h create mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h create mode 100644 Telegram/ThirdParty/minizip/ioapi.c diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 121dc35a64e094..086c7b46125f83 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -656,60 +656,6 @@ namespace SignalHandlers { return stream; } - google_breakpad::ExceptionHandler* BreakpadExceptionHandler = 0; - -#ifdef Q_OS_WIN - bool DumpCallback(const wchar_t* _dump_dir, const wchar_t* _minidump_id, void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion, bool success) -#elif defined Q_OS_MAC - bool DumpCallback(const char* _dump_dir, const char* _minidump_id, void *context, bool success) -#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 - bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, bool success) -#endif - { - return success; - } - - void StartBreakpad() { - QString dumpPath = cWorkingDir() + qsl("tdumps"); - QDir().mkpath(dumpPath); - -#ifdef Q_OS_WIN - BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - dumpPath.toStdWString(), - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ 0, - true - ); -#elif defined Q_OS_MAC - pHandler = new google_breakpad::ExceptionHandler( - dumpPath.toStdString(), - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ 0, - true, - 0 - ); -#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 - pHandler = new google_breakpad::ExceptionHandler( - google_breakpad::MinidumpDescriptor(dumpPath.toStdString()), - /*FilterCallback*/ 0, - DumpCallback, - /*context*/ 0, - true, - -1 - ); -#endif - } - - void FinishBreakpad() { - if (BreakpadExceptionHandler) { - google_breakpad::ExceptionHandler *h = BreakpadExceptionHandler; - BreakpadExceptionHandler = 0; - delete h; - } - } - Qt::HANDLE LoggingCrashThreadId = 0; bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; @@ -719,7 +665,9 @@ namespace SignalHandlers { struct sigaction SIG_def[32]; void Handler(int signum, siginfo_t *info, void *ucontext) { - sigaction(signum, &SIG_def[signum], 0); + if (signum > 0) { + sigaction(signum, &SIG_def[signum], 0); + } #else void Handler(int signum) { @@ -780,6 +728,7 @@ namespace SignalHandlers { ucontext_t *uc = (ucontext_t*)ucontext; void *caller = 0; + if (uc) { #if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_6) /* OSX < 10.6 */ #if defined(__x86_64__) @@ -807,6 +756,7 @@ namespace SignalHandlers { #endif #endif + } void *addresses[132] = { 0 }; size_t size = backtrace(addresses, 128); @@ -849,6 +799,63 @@ namespace SignalHandlers { LoggingCrashThreadId = 0; } + google_breakpad::ExceptionHandler* BreakpadExceptionHandler = 0; + +#ifdef Q_OS_WIN + bool DumpCallback(const wchar_t* _dump_dir, const wchar_t* _minidump_id, void* context, EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion, bool success) +#elif defined Q_OS_MAC + bool DumpCallback(const char* _dump_dir, const char* _minidump_id, void *context, bool success) +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 + bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, bool success) +#endif + { +#ifdef Q_OS_MAC + Handler(-1, 0, 0); +#endif + return success; + } + + void StartBreakpad() { + QString dumpPath = cWorkingDir() + qsl("tdumps"); + QDir().mkpath(dumpPath); + +#ifdef Q_OS_WIN + BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( + dumpPath.toStdWString(), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true + ); +#elif defined Q_OS_MAC + BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( + dumpPath.toStdString(), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true, + 0 + ); +#elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 + BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( + google_breakpad::MinidumpDescriptor(dumpPath.toStdString()), + /*FilterCallback*/ 0, + DumpCallback, + /*context*/ 0, + true, + -1 + ); +#endif + } + + void FinishBreakpad() { + if (BreakpadExceptionHandler) { + google_breakpad::ExceptionHandler *h = BreakpadExceptionHandler; + BreakpadExceptionHandler = 0; + delete h; + } + } + Status start() { CrashDumpPath = (cWorkingDir() + qsl("tdata/working")).toUtf8(); if (FILE *f = fopen(CrashDumpPath.constData(), "rb")) { @@ -893,7 +900,9 @@ namespace SignalHandlers { sigemptyset(&sigact.sa_mask); sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; +#ifndef Q_OS_MAC // let breakpad handle this sigaction(SIGABRT, &sigact, &SIG_def[SIGABRT]); +#endif sigaction(SIGSEGV, &sigact, &SIG_def[SIGSEGV]); sigaction(SIGILL, &sigact, &SIG_def[SIGILL]); sigaction(SIGFPE, &sigact, &SIG_def[SIGFPE]); diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index 58a1c065b10ac4..8a97b226ec4414 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -22,7 +22,9 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #define PSAPI_VERSION 1 // fix WinXP //#define Q_NO_TEMPLATE_FRIENDS // fix some compiler difference issues -#include +#define __STDC_FORMAT_MACROS // fix breakpad for mac + +#ifdef __cplusplus #include #include @@ -52,12 +54,18 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org extern "C" { +#endif + +#include "zip.h" + #include #include #include #include #include +#ifdef __cplusplus + } #include "types.h" @@ -79,3 +87,5 @@ extern "C" { #include "gui/flatlabel.h" #include "app.h" + +#endif diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 77158620e4ddb0..d4ae8fc39839da 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -41,8 +41,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "mediaview.h" #include "localstorage.h" -#include "zip.h" - ConnectingWidget::ConnectingWidget(QWidget *parent, const QString &text, const QString &reconnect) : QWidget(parent), _shadow(st::boxShadow), _reconnect(this, QString()) { set(text, reconnect); connect(&_reconnect, SIGNAL(clicked()), this, SLOT(onReconnect())); @@ -2019,7 +2017,6 @@ LastCrashedWindow::LastCrashedWindow() #endif { -#ifdef Q_OS_WIN if (_sendingState != SendingNoReport) { QString maxDump, maxDumpFull; QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified(); @@ -2044,7 +2041,6 @@ LastCrashedWindow::LastCrashedWindow() _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(maxDumpSize / 1024)); } -#endif _networkSettings.setText(qsl("NETWORK SETTINGS")); connect(&_networkSettings, SIGNAL(clicked()), this, SLOT(onNetworkSettings())); @@ -2306,10 +2302,9 @@ void LastCrashedWindow::onCheckingFinished() { reportPart.setBody(Global::LastCrashDump()); multipart->append(reportPart); -#ifdef Q_OS_WIN QFileInfo dmpFile(_minidumpFull); if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && - QRegularExpression(qsl("^[a-z0-9\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { + QRegularExpression(qsl("^[a-zA-Z0-9\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { QFile file(_minidumpFull); if (file.open(QIODevice::ReadOnly)) { QByteArray minidump = file.readAll(); @@ -2330,9 +2325,9 @@ void LastCrashedWindow::onCheckingFinished() { zfuncs.ztell_file = zByteArrayTellFile; if (zipFile zf = zipOpen2(0, APPEND_STATUS_CREATE, 0, &zfuncs)) { - zip_fileinfo zfi = { 0 }; + zip_fileinfo zfi = { { 0, 0, 0, 0, 0, 0 }, 0, 0, 0 }; std::wstring fileName = dmpFile.fileName().toStdWString(); - if (zipOpenNewFileInZip(zf, std::string(fileName.begin(), fileName.end()).c_str(), &zfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) != S_OK) { + if (zipOpenNewFileInZip(zf, std::string(fileName.begin(), fileName.end()).c_str(), &zfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) != ZIP_OK) { failed = true; } else if (zipWriteInFileInZip(zf, minidump.constData(), minidump.size()) != 0) { failed = true; @@ -2358,7 +2353,6 @@ void LastCrashedWindow::onCheckingFinished() { } } } -#endif _sendReply = _sendManager.post(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=report")), multipart); multipart->setParent(_sendReply); diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 4f7b75747118bc..ea1644d6de69cb 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -44,6 +44,26 @@ 0710CA051B0B9404001B4272 /* moc_stickersetbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0710CA041B0B9404001B4272 /* moc_stickersetbox.cpp */; }; 07129D6A1C16D230002DC495 /* mtpAuthKey.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D691C16D230002DC495 /* mtpAuthKey.cpp */; }; 07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D6C1C16D245002DC495 /* facades.cpp */; }; + 071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D11C5E8E6D008C9E90 /* zip.c */; }; + 071AD8D71C5E8F35008C9E90 /* breakpad_nlist_64.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */; }; + 071AD8D81C5E8F35008C9E90 /* dynamic_images.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */; }; + 071AD8D91C5E8F35008C9E90 /* exception_handler.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */; }; + 071AD8DA1C5E8F35008C9E90 /* minidump_generator.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */; }; + 071AD8DE1C5E912C008C9E90 /* crash_generation_client.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */; }; + 071AD8DF1C5E912C008C9E90 /* crash_generation_server.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */; }; + 071AD8E21C5E9143008C9E90 /* minidump_file_writer.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */; }; + 071AD8E61C5E9196008C9E90 /* convert_UTF.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E31C5E9196008C9E90 /* convert_UTF.c */; }; + 071AD8E71C5E9196008C9E90 /* md5.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E41C5E9196008C9E90 /* md5.cc */; }; + 071AD8E81C5E9196008C9E90 /* string_conversion.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E51C5E9196008C9E90 /* string_conversion.cc */; }; + 071AD8F01C5E91E3008C9E90 /* bootstrap_compat.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */; }; + 071AD8F11C5E91E3008C9E90 /* file_id.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EA1C5E91E3008C9E90 /* file_id.cc */; }; + 071AD8F21C5E91E3008C9E90 /* MachIPC.mm in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */; }; + 071AD8F31C5E91E3008C9E90 /* macho_id.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */; }; + 071AD8F41C5E91E3008C9E90 /* macho_utilities.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */; }; + 071AD8F51C5E91E3008C9E90 /* macho_walker.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */; }; + 071AD8F61C5E91E3008C9E90 /* string_utilities.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */; }; + 071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8F71C5E99D6008C9E90 /* ioapi.c */; }; + 071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */; }; 0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; }; 0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */; }; 074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074756181A1372C600CA07F7 /* moc_types.cpp */; }; @@ -276,6 +296,73 @@ 07129D691C16D230002DC495 /* mtpAuthKey.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mtpAuthKey.cpp; path = SourceFiles/mtproto/mtpAuthKey.cpp; sourceTree = SOURCE_ROOT; }; 07129D6C1C16D245002DC495 /* facades.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = facades.cpp; path = SourceFiles/facades.cpp; sourceTree = SOURCE_ROOT; }; 07129D6D1C16D245002DC495 /* facades.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = facades.h; path = SourceFiles/facades.h; sourceTree = SOURCE_ROOT; }; + 071AD86B1C5E8536008C9E90 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crypt.h; path = ThirdParty/minizip/crypt.h; sourceTree = SOURCE_ROOT; }; + 071AD86C1C5E8536008C9E90 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ioapi.h; path = ThirdParty/minizip/ioapi.h; sourceTree = SOURCE_ROOT; }; + 071AD86E1C5E8536008C9E90 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zip.h; path = ThirdParty/minizip/zip.h; sourceTree = SOURCE_ROOT; }; + 071AD8751C5E85A0008C9E90 /* exception_handler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = exception_handler.h; path = ThirdParty/breakpad/client/mac/handler/exception_handler.h; sourceTree = SOURCE_ROOT; }; + 071AD8791C5E8672008C9E90 /* crash_generation_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crash_generation_client.h; sourceTree = ""; }; + 071AD87B1C5E8688008C9E90 /* ucontext_compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ucontext_compat.h; path = ThirdParty/breakpad/client/mac/handler/ucontext_compat.h; sourceTree = SOURCE_ROOT; }; + 071AD87F1C5E87AA008C9E90 /* scoped_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = scoped_ptr.h; path = ThirdParty/breakpad/common/scoped_ptr.h; sourceTree = SOURCE_ROOT; }; + 071AD8811C5E87C2008C9E90 /* MachIPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MachIPC.h; path = ThirdParty/breakpad/common/mac/MachIPC.h; sourceTree = SOURCE_ROOT; }; + 071AD8851C5E8853008C9E90 /* bootstrap_compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bootstrap_compat.h; path = ThirdParty/breakpad/common/mac/bootstrap_compat.h; sourceTree = SOURCE_ROOT; }; + 071AD8881C5E8886008C9E90 /* minidump_generator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_generator.h; path = ThirdParty/breakpad/client/mac/handler/minidump_generator.h; sourceTree = SOURCE_ROOT; }; + 071AD88B1C5E88AA008C9E90 /* crash_generation_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crash_generation_server.h; sourceTree = ""; }; + 071AD88D1C5E88CD008C9E90 /* minidump_file_writer-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "minidump_file_writer-inl.h"; path = "ThirdParty/breakpad/client/minidump_file_writer-inl.h"; sourceTree = SOURCE_ROOT; }; + 071AD88F1C5E88CD008C9E90 /* minidump_file_writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_file_writer.h; path = ThirdParty/breakpad/client/minidump_file_writer.h; sourceTree = SOURCE_ROOT; }; + 071AD8911C5E88EA008C9E90 /* client_info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = client_info.h; sourceTree = ""; }; + 071AD8921C5E8994008C9E90 /* memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = memory.h; path = ThirdParty/breakpad/common/memory.h; sourceTree = SOURCE_ROOT; }; + 071AD8951C5E89D1008C9E90 /* breakpad_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = breakpad_types.h; path = ThirdParty/breakpad/google_breakpad/common/breakpad_types.h; sourceTree = SOURCE_ROOT; }; + 071AD8961C5E89D1008C9E90 /* minidump_cpu_amd64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_amd64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h; sourceTree = SOURCE_ROOT; }; + 071AD8971C5E89D1008C9E90 /* minidump_cpu_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_arm.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h; sourceTree = SOURCE_ROOT; }; + 071AD8981C5E89D1008C9E90 /* minidump_cpu_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_arm64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h; sourceTree = SOURCE_ROOT; }; + 071AD8991C5E89D1008C9E90 /* minidump_cpu_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_mips.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h; sourceTree = SOURCE_ROOT; }; + 071AD89A1C5E89D1008C9E90 /* minidump_cpu_ppc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_ppc.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h; sourceTree = SOURCE_ROOT; }; + 071AD89B1C5E89D1008C9E90 /* minidump_cpu_ppc64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_ppc64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h; sourceTree = SOURCE_ROOT; }; + 071AD89C1C5E89D1008C9E90 /* minidump_cpu_sparc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_sparc.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h; sourceTree = SOURCE_ROOT; }; + 071AD89D1C5E89D1008C9E90 /* minidump_cpu_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_x86.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h; sourceTree = SOURCE_ROOT; }; + 071AD89E1C5E89D1008C9E90 /* minidump_exception_linux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_linux.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h; sourceTree = SOURCE_ROOT; }; + 071AD89F1C5E89D1008C9E90 /* minidump_exception_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_mac.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h; sourceTree = SOURCE_ROOT; }; + 071AD8A01C5E89D1008C9E90 /* minidump_exception_ps3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_ps3.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h; sourceTree = SOURCE_ROOT; }; + 071AD8A11C5E89D1008C9E90 /* minidump_exception_solaris.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_solaris.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h; sourceTree = SOURCE_ROOT; }; + 071AD8A21C5E89D1008C9E90 /* minidump_exception_win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_win32.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h; sourceTree = SOURCE_ROOT; }; + 071AD8A31C5E89D1008C9E90 /* minidump_format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_format.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_format.h; sourceTree = SOURCE_ROOT; }; + 071AD8A41C5E89D1008C9E90 /* minidump_size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_size.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_size.h; sourceTree = SOURCE_ROOT; }; + 071AD8A61C5E8A30008C9E90 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ThirdParty/breakpad/common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; }; + 071AD8A91C5E8A7B008C9E90 /* dynamic_images.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dynamic_images.h; path = ThirdParty/breakpad/client/mac/handler/dynamic_images.h; sourceTree = SOURCE_ROOT; }; + 071AD8AB1C5E8A99008C9E90 /* mach_vm_compat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mach_vm_compat.h; path = ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h; sourceTree = SOURCE_ROOT; }; + 071AD8AD1C5E8B07008C9E90 /* breakpad_nlist_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = breakpad_nlist_64.h; path = ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h; sourceTree = SOURCE_ROOT; }; + 071AD8AF1C5E8B16008C9E90 /* byteswap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = byteswap.h; path = ThirdParty/breakpad/common/mac/byteswap.h; sourceTree = SOURCE_ROOT; }; + 071AD8B11C5E8B23008C9E90 /* linux_libc_support.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = linux_libc_support.h; path = ThirdParty/breakpad/common/linux/linux_libc_support.h; sourceTree = SOURCE_ROOT; }; + 071AD8B31C5E8B43008C9E90 /* string_conversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_conversion.h; path = ThirdParty/breakpad/common/string_conversion.h; sourceTree = SOURCE_ROOT; }; + 071AD8B61C5E8B5C008C9E90 /* file_id.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_id.h; path = ThirdParty/breakpad/common/mac/file_id.h; sourceTree = SOURCE_ROOT; }; + 071AD8B81C5E8B81008C9E90 /* scoped_task_suspend-inl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "scoped_task_suspend-inl.h"; path = "ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h"; sourceTree = SOURCE_ROOT; }; + 071AD8BA1C5E8B9B008C9E90 /* macho_id.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_id.h; path = ThirdParty/breakpad/common/mac/macho_id.h; sourceTree = SOURCE_ROOT; }; + 071AD8BD1C5E8BB0008C9E90 /* convert_UTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = convert_UTF.h; path = ThirdParty/breakpad/common/convert_UTF.h; sourceTree = SOURCE_ROOT; }; + 071AD8BF1C5E8BC8008C9E90 /* using_std_string.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = using_std_string.h; path = ThirdParty/breakpad/common/using_std_string.h; sourceTree = SOURCE_ROOT; }; + 071AD8C11C5E8BE5008C9E90 /* macho_walker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_walker.h; path = ThirdParty/breakpad/common/mac/macho_walker.h; sourceTree = SOURCE_ROOT; }; + 071AD8C41C5E8BFD008C9E90 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5.h; path = ThirdParty/breakpad/common/md5.h; sourceTree = SOURCE_ROOT; }; + 071AD8C71C5E8C14008C9E90 /* string_utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_utilities.h; path = ThirdParty/breakpad/common/mac/string_utilities.h; sourceTree = SOURCE_ROOT; }; + 071AD8D11C5E8E6D008C9E90 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zip.c; path = ThirdParty/minizip/zip.c; sourceTree = SOURCE_ROOT; }; + 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = breakpad_nlist_64.cc; path = ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc; sourceTree = SOURCE_ROOT; }; + 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dynamic_images.cc; path = ThirdParty/breakpad/client/mac/handler/dynamic_images.cc; sourceTree = SOURCE_ROOT; }; + 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = exception_handler.cc; path = ThirdParty/breakpad/client/mac/handler/exception_handler.cc; sourceTree = SOURCE_ROOT; }; + 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_generator.cc; path = ThirdParty/breakpad/client/mac/handler/minidump_generator.cc; sourceTree = SOURCE_ROOT; }; + 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crash_generation_client.cc; sourceTree = ""; }; + 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crash_generation_server.cc; sourceTree = ""; }; + 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_file_writer.cc; path = ThirdParty/breakpad/client/minidump_file_writer.cc; sourceTree = SOURCE_ROOT; }; + 071AD8E31C5E9196008C9E90 /* convert_UTF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = convert_UTF.c; path = ThirdParty/breakpad/common/convert_UTF.c; sourceTree = SOURCE_ROOT; }; + 071AD8E41C5E9196008C9E90 /* md5.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = md5.cc; path = ThirdParty/breakpad/common/md5.cc; sourceTree = SOURCE_ROOT; }; + 071AD8E51C5E9196008C9E90 /* string_conversion.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_conversion.cc; path = ThirdParty/breakpad/common/string_conversion.cc; sourceTree = SOURCE_ROOT; }; + 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bootstrap_compat.cc; path = ThirdParty/breakpad/common/mac/bootstrap_compat.cc; sourceTree = SOURCE_ROOT; }; + 071AD8EA1C5E91E3008C9E90 /* file_id.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_id.cc; path = ThirdParty/breakpad/common/mac/file_id.cc; sourceTree = SOURCE_ROOT; }; + 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MachIPC.mm; path = ThirdParty/breakpad/common/mac/MachIPC.mm; sourceTree = SOURCE_ROOT; }; + 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_id.cc; path = ThirdParty/breakpad/common/mac/macho_id.cc; sourceTree = SOURCE_ROOT; }; + 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ThirdParty/breakpad/common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; }; + 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_walker.cc; path = ThirdParty/breakpad/common/mac/macho_walker.cc; sourceTree = SOURCE_ROOT; }; + 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_utilities.cc; path = ThirdParty/breakpad/common/mac/string_utilities.cc; sourceTree = SOURCE_ROOT; }; + 071AD8F71C5E99D6008C9E90 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ioapi.c; path = ThirdParty/minizip/ioapi.c; sourceTree = SOURCE_ROOT; }; + 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Breakpad.framework; path = Users/antanubis/TBuild/Libraries/breakpad/Breakpad.framework; sourceTree = ""; }; + 071AD90B1C5EA37D008C9E90 /* Breakpad.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Breakpad.framework; path = "Users/antanubis/Library/Developer/Xcode/DerivedData/Breakpad-ffxagkgqghkohhawycvgjexmnjhs/Build/Products/Debug/Breakpad.framework"; sourceTree = ""; }; 072E117A1A56EB9400A87ACC /* lang_pt_BR.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = lang_pt_BR.strings; path = SourceFiles/langs/lang_pt_BR.strings; sourceTree = SOURCE_ROOT; }; 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = overviewwidget.cpp; path = SourceFiles/overviewwidget.cpp; sourceTree = SOURCE_ROOT; }; 0732E4A8199E262300D50FE7 /* overviewwidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = overviewwidget.h; path = SourceFiles/overviewwidget.h; sourceTree = SOURCE_ROOT; }; @@ -700,6 +787,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */, 0752F8751C2C89F40026D0BC /* VideoToolbox.framework in Link Binary With Libraries */, 0752F8731C2C89220026D0BC /* VideoDecodeAcceleration.framework in Link Binary With Libraries */, 07CAACD81AEA64F00058E508 /* AudioUnit.framework in Link Binary With Libraries */, @@ -755,6 +843,167 @@ name = Products; sourceTree = ""; }; + 071AD8691C5E8504008C9E90 /* ThirdParty */ = { + isa = PBXGroup; + children = ( + 071AD8701C5E8546008C9E90 /* breakpad */, + 071AD86A1C5E8522008C9E90 /* minizip */, + ); + name = ThirdParty; + sourceTree = ""; + }; + 071AD86A1C5E8522008C9E90 /* minizip */ = { + isa = PBXGroup; + children = ( + 071AD86B1C5E8536008C9E90 /* crypt.h */, + 071AD86C1C5E8536008C9E90 /* ioapi.h */, + 071AD8F71C5E99D6008C9E90 /* ioapi.c */, + 071AD86E1C5E8536008C9E90 /* zip.h */, + 071AD8D11C5E8E6D008C9E90 /* zip.c */, + ); + name = minizip; + sourceTree = ""; + }; + 071AD8701C5E8546008C9E90 /* breakpad */ = { + isa = PBXGroup; + children = ( + 071AD8931C5E89BE008C9E90 /* google_breakpad */, + 071AD87E1C5E8792008C9E90 /* common */, + 071AD8711C5E8569008C9E90 /* client */, + ); + name = breakpad; + sourceTree = ""; + }; + 071AD8711C5E8569008C9E90 /* client */ = { + isa = PBXGroup; + children = ( + 071AD88D1C5E88CD008C9E90 /* minidump_file_writer-inl.h */, + 071AD88F1C5E88CD008C9E90 /* minidump_file_writer.h */, + 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */, + 071AD8721C5E8575008C9E90 /* mac */, + ); + name = client; + sourceTree = ""; + }; + 071AD8721C5E8575008C9E90 /* mac */ = { + isa = PBXGroup; + children = ( + 071AD8771C5E8672008C9E90 /* crash_generation */, + 071AD8731C5E8579008C9E90 /* handler */, + ); + name = mac; + sourceTree = ""; + }; + 071AD8731C5E8579008C9E90 /* handler */ = { + isa = PBXGroup; + children = ( + 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */, + 071AD8AD1C5E8B07008C9E90 /* breakpad_nlist_64.h */, + 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */, + 071AD8A91C5E8A7B008C9E90 /* dynamic_images.h */, + 071AD8751C5E85A0008C9E90 /* exception_handler.h */, + 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */, + 071AD8AB1C5E8A99008C9E90 /* mach_vm_compat.h */, + 071AD8881C5E8886008C9E90 /* minidump_generator.h */, + 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */, + 071AD87B1C5E8688008C9E90 /* ucontext_compat.h */, + ); + name = handler; + sourceTree = ""; + }; + 071AD8771C5E8672008C9E90 /* crash_generation */ = { + isa = PBXGroup; + children = ( + 071AD8911C5E88EA008C9E90 /* client_info.h */, + 071AD8791C5E8672008C9E90 /* crash_generation_client.h */, + 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */, + 071AD88B1C5E88AA008C9E90 /* crash_generation_server.h */, + 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */, + ); + name = crash_generation; + path = ThirdParty/breakpad/client/mac/crash_generation; + sourceTree = SOURCE_ROOT; + }; + 071AD87E1C5E8792008C9E90 /* common */ = { + isa = PBXGroup; + children = ( + 071AD8B01C5E8B1B008C9E90 /* linux */, + 071AD8801C5E87B5008C9E90 /* mac */, + 071AD8BD1C5E8BB0008C9E90 /* convert_UTF.h */, + 071AD8E31C5E9196008C9E90 /* convert_UTF.c */, + 071AD8C41C5E8BFD008C9E90 /* md5.h */, + 071AD8E41C5E9196008C9E90 /* md5.cc */, + 071AD8921C5E8994008C9E90 /* memory.h */, + 071AD87F1C5E87AA008C9E90 /* scoped_ptr.h */, + 071AD8B31C5E8B43008C9E90 /* string_conversion.h */, + 071AD8E51C5E9196008C9E90 /* string_conversion.cc */, + 071AD8BF1C5E8BC8008C9E90 /* using_std_string.h */, + ); + name = common; + sourceTree = ""; + }; + 071AD8801C5E87B5008C9E90 /* mac */ = { + isa = PBXGroup; + children = ( + 071AD8851C5E8853008C9E90 /* bootstrap_compat.h */, + 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */, + 071AD8AF1C5E8B16008C9E90 /* byteswap.h */, + 071AD8B61C5E8B5C008C9E90 /* file_id.h */, + 071AD8EA1C5E91E3008C9E90 /* file_id.cc */, + 071AD8811C5E87C2008C9E90 /* MachIPC.h */, + 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */, + 071AD8BA1C5E8B9B008C9E90 /* macho_id.h */, + 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */, + 071AD8A61C5E8A30008C9E90 /* macho_utilities.h */, + 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */, + 071AD8C11C5E8BE5008C9E90 /* macho_walker.h */, + 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */, + 071AD8B81C5E8B81008C9E90 /* scoped_task_suspend-inl.h */, + 071AD8C71C5E8C14008C9E90 /* string_utilities.h */, + 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */, + ); + name = mac; + sourceTree = ""; + }; + 071AD8931C5E89BE008C9E90 /* google_breakpad */ = { + isa = PBXGroup; + children = ( + 071AD8941C5E89C4008C9E90 /* common */, + ); + name = google_breakpad; + sourceTree = ""; + }; + 071AD8941C5E89C4008C9E90 /* common */ = { + isa = PBXGroup; + children = ( + 071AD8951C5E89D1008C9E90 /* breakpad_types.h */, + 071AD8961C5E89D1008C9E90 /* minidump_cpu_amd64.h */, + 071AD8971C5E89D1008C9E90 /* minidump_cpu_arm.h */, + 071AD8981C5E89D1008C9E90 /* minidump_cpu_arm64.h */, + 071AD8991C5E89D1008C9E90 /* minidump_cpu_mips.h */, + 071AD89A1C5E89D1008C9E90 /* minidump_cpu_ppc.h */, + 071AD89B1C5E89D1008C9E90 /* minidump_cpu_ppc64.h */, + 071AD89C1C5E89D1008C9E90 /* minidump_cpu_sparc.h */, + 071AD89D1C5E89D1008C9E90 /* minidump_cpu_x86.h */, + 071AD89E1C5E89D1008C9E90 /* minidump_exception_linux.h */, + 071AD89F1C5E89D1008C9E90 /* minidump_exception_mac.h */, + 071AD8A01C5E89D1008C9E90 /* minidump_exception_ps3.h */, + 071AD8A11C5E89D1008C9E90 /* minidump_exception_solaris.h */, + 071AD8A21C5E89D1008C9E90 /* minidump_exception_win32.h */, + 071AD8A31C5E89D1008C9E90 /* minidump_format.h */, + 071AD8A41C5E89D1008C9E90 /* minidump_size.h */, + ); + name = common; + sourceTree = ""; + }; + 071AD8B01C5E8B1B008C9E90 /* linux */ = { + isa = PBXGroup; + children = ( + 071AD8B11C5E8B23008C9E90 /* linux_libc_support.h */, + ); + name = linux; + sourceTree = ""; + }; 074968CB1A44D0B800394F46 /* langs */ = { isa = PBXGroup; children = ( @@ -1222,6 +1471,8 @@ AF39DD055C3EF8226FBE929D /* Frameworks */ = { isa = PBXGroup; children = ( + 071AD90B1C5EA37D008C9E90 /* Breakpad.framework */, + 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */, 0752F8741C2C89F40026D0BC /* VideoToolbox.framework */, 0752F8721C2C89220026D0BC /* VideoDecodeAcceleration.framework */, 07CAACD71AEA64F00058E508 /* AudioUnit.framework */, @@ -1291,6 +1542,7 @@ 07084684195445A600B5AE3A /* Updater.xcodeproj */, 2EB56BE3C2D93CDAB0C52E67 /* Sources */, 25B08E2869634E9BCBA333A2 /* Generated Sources */, + 071AD8691C5E8504008C9E90 /* ThirdParty */, 74B182DB50CB5611B5C1C297 /* Supporting Files */, AF39DD055C3EF8226FBE929D /* Frameworks */, FE0A091FDBFB3E9C31B7A1BD /* Products */, @@ -1522,6 +1774,7 @@ 0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */, 1DF53374E3B6A31661548D08 /* historywidget.cpp in Compile Sources */, 078A2FCD1A811CA600CCC7A0 /* backgroundbox.cpp in Compile Sources */, + 071AD8D81C5E8F35008C9E90 /* dynamic_images.cc in Compile Sources */, 37A3C6C782A0E4BC7B09536B /* langloaderplain.cpp in Compile Sources */, 19A66ECD6EE2F8356F27D32D /* layerwidget.cpp in Compile Sources */, 89ADB41E48A3B5E24ABB626C /* profilewidget.cpp in Compile Sources */, @@ -1535,23 +1788,28 @@ 4078D5D614EB3ECF7F1848C7 /* types.cpp in Compile Sources */, 68FFEB7CA30BF0149161B809 /* window.cpp in Compile Sources */, 0CB7DE9A54CC9BF86FB7B5CA /* mtp.cpp in Compile Sources */, + 071AD8E71C5E9196008C9E90 /* md5.cc in Compile Sources */, DF259E9677CC63AF8754032B /* mtpConnection.cpp in Compile Sources */, 074FCB9119D36E60004C6EB2 /* moc_popupmenu.cpp in Compile Sources */, B6346B66B0A2228A91D8A5D9 /* mtpDC.cpp in Compile Sources */, 0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */, 07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */, B8CA3E1E11A7E0E7DF9E1CDE /* mtpFileLoader.cpp in Compile Sources */, + 071AD8DF1C5E912C008C9E90 /* crash_generation_server.cc in Compile Sources */, 0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */, 99F0A9B2AFE5ABDCBFC04510 /* mtpRPC.cpp in Compile Sources */, A297B1E3CE33CC501DFEDB6E /* mtpSession.cpp in Compile Sources */, D1FC601FC2F9F3E33F3A14E9 /* animation.cpp in Compile Sources */, 8F65F0D95B1F0CEB859F2FB3 /* boxshadow.cpp in Compile Sources */, + 071AD8F41C5E91E3008C9E90 /* macho_utilities.cc in Compile Sources */, D7EF8F129FCCE9AB3F3F081F /* button.cpp in Compile Sources */, 07DC42A01B5EA15300B6B888 /* numbers.cpp in Compile Sources */, C03447C9A7D9FF73463B8BB5 /* countryinput.cpp in Compile Sources */, 07BE850F1A2093C9008ACB9F /* localstorage.cpp in Compile Sources */, CDB0266A8B7CB20A95266BCD /* emoji_config.cpp in Compile Sources */, + 071AD8DA1C5E8F35008C9E90 /* minidump_generator.cc in Compile Sources */, 0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */, + 071AD8F01C5E91E3008C9E90 /* bootstrap_compat.cc in Compile Sources */, 7C2B2DEE467A4C4679F1C3C9 /* filedialog.cpp in Compile Sources */, 832C50BFD7D09AF042A51D4F /* flatbutton.cpp in Compile Sources */, B91D13BCC3963CB9C12D24A4 /* flatcheckbox.cpp in Compile Sources */, @@ -1560,11 +1818,13 @@ 03270F718426CFE84729079E /* flattextarea.cpp in Compile Sources */, E3D7A5CA24541D5DB69D6606 /* images.cpp in Compile Sources */, ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */, + 071AD8F11C5E91E3008C9E90 /* file_id.cc in Compile Sources */, 07129D6A1C16D230002DC495 /* mtpAuthKey.cpp in Compile Sources */, 90085DF442550A0845D5AF37 /* style_core.cpp in Compile Sources */, 074FCB8E19D36851004C6EB2 /* popupmenu.cpp in Compile Sources */, 3AA6E7264581F82856FB37F7 /* text.cpp in Compile Sources */, FCE6518C548DF7BC82228A4A /* twidget.cpp in Compile Sources */, + 071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */, E9F1CE7F9B18C7C85A50E62D /* style_auto.cpp in Compile Sources */, EBE29731916DB43BF49FE7A4 /* aboutbox.cpp in Compile Sources */, 4426AF526AAD86D6F73CE36F /* addcontactbox.cpp in Compile Sources */, @@ -1578,6 +1838,7 @@ 07DB67511AD07CB800A51329 /* intropwdcheck.cpp in Compile Sources */, 3ABE4F9B2264F770D944106D /* emojibox.cpp in Compile Sources */, 07D703BB19B88FB900C4EED2 /* moc_audio.cpp in Compile Sources */, + 071AD8E81C5E9196008C9E90 /* string_conversion.cc in Compile Sources */, 77B998AC22A13EF3DDEE07AC /* photocropbox.cpp in Compile Sources */, F278C423357CA99797EA30AB /* photosendbox.cpp in Compile Sources */, E8D95529CED88F18818C9A8B /* intro.cpp in Compile Sources */, @@ -1595,25 +1856,33 @@ 352349751855EF76DECA4D60 /* moc_historywidget.cpp in Compile Sources */, 4B0036C794BEA27AF9419768 /* moc_layerwidget.cpp in Compile Sources */, C14E6C902F6435B3149ECD64 /* moc_profilewidget.cpp in Compile Sources */, + 071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */, 074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */, 98E4F55DB5D8E64AB9F08C83 /* moc_localimageloader.cpp in Compile Sources */, A24E4B5B683764E07683ECEC /* moc_mainwidget.cpp in Compile Sources */, 0710CA051B0B9404001B4272 /* moc_stickersetbox.cpp in Compile Sources */, 07DE92A71AA4925B00A18F6F /* autolockbox.cpp in Compile Sources */, + 071AD8F51C5E91E3008C9E90 /* macho_walker.cc in Compile Sources */, 07D8509919F8320900623D75 /* usernamebox.cpp in Compile Sources */, + 071AD8F21C5E91E3008C9E90 /* MachIPC.mm in Compile Sources */, + 071AD8DE1C5E912C008C9E90 /* crash_generation_client.cc in Compile Sources */, A469EC9C4C367E0B773A9BB7 /* moc_settingswidget.cpp in Compile Sources */, FD2FE0C564A7389A2E609EC7 /* moc_sysbuttons.cpp in Compile Sources */, E97B3CFAB59B49BACFFC5F7C /* moc_title.cpp in Compile Sources */, 07D8510819F8340A00623D75 /* moc_usernamebox.cpp in Compile Sources */, 9A0D5DDC7816FC2538EB6A96 /* moc_window.cpp in Compile Sources */, + 071AD8D91C5E8F35008C9E90 /* exception_handler.cc in Compile Sources */, 06EABCC49D2EEE4076322BE7 /* moc_mtp.cpp in Compile Sources */, 0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */, 07DE92AA1AA4928200A18F6F /* moc_autolockbox.cpp in Compile Sources */, 07B604351B46A20900CA29FE /* moc_playerwidget.cpp in Compile Sources */, 8F6F5D7F82036331E8C6DAE6 /* moc_mtpConnection.cpp in Compile Sources */, B780F9E21269259B90A1F32A /* moc_mtpDC.cpp in Compile Sources */, + 071AD8F31C5E91E3008C9E90 /* macho_id.cc in Compile Sources */, 07080BCF1A43588C00741A51 /* lang_auto.cpp in Compile Sources */, 07539B1D1A1416AF00083EFC /* moc_history.cpp in Compile Sources */, + 071AD8E61C5E9196008C9E90 /* convert_UTF.c in Compile Sources */, + 071AD8F61C5E91E3008C9E90 /* string_utilities.cc in Compile Sources */, 2A500B102B7CE80F3EB6E13E /* moc_mtpFileLoader.cpp in Compile Sources */, 07A6933519927B160099CB9F /* moc_mediaview.cpp in Compile Sources */, 07A69332199277BA0099CB9F /* mediaview.cpp in Compile Sources */, @@ -1625,6 +1894,7 @@ 07DE92A01AA4923300A18F6F /* passcodewidget.cpp in Compile Sources */, B0B88EFE444C0DE673389418 /* moc_flatbutton.cpp in Compile Sources */, 1BD711B4C358EA7D727BF358 /* moc_flatcheckbox.cpp in Compile Sources */, + 071AD8D71C5E8F35008C9E90 /* breakpad_nlist_64.cc in Compile Sources */, 565F748438E6CE0148C54AFE /* moc_flatinput.cpp in Compile Sources */, 8B71D1C7BB9DCEE6511219C2 /* moc_flatlabel.cpp in Compile Sources */, 0710C9FE1B0B9376001B4272 /* stickersetbox.cpp in Compile Sources */, @@ -1638,6 +1908,7 @@ 7062978F12EEA525893A5E6F /* moc_aboutbox.cpp in Compile Sources */, E8B28580819B882A5964561A /* moc_addcontactbox.cpp in Compile Sources */, 07B604321B46A0EC00CA29FE /* playerwidget.cpp in Compile Sources */, + 071AD8E21C5E9143008C9E90 /* minidump_file_writer.cc in Compile Sources */, D6874C00733283846ACA9AB2 /* moc_confirmbox.cpp in Compile Sources */, ED2557A57C6782721DC494AF /* moc_connectionbox.cpp in Compile Sources */, 5FC914F652D1B16FDA8F0634 /* moc_contactsbox.cpp in Compile Sources */, @@ -1752,7 +2023,7 @@ DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_CURRENT_VERSION = 0.9.19; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ""; + FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1785,6 +2056,8 @@ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers, "/usr/local/Qt-5.5.1/mkspecs/macx-clang", + ./ThirdParty/breakpad, + ./ThirdParty/minizip, ); INFOPLIST_FILE = Telegram.plist; INSTALL_DIR = ./../Mac/Release/; @@ -1815,8 +2088,8 @@ "-Wno-unused-function", "-Wno-switch", "-Wno-comment", - "-I./../../Libraries/openssl-xcode/include", "-DCUSTOM_API_ID", + "-I./../../Libraries/openssl-xcode/include", ); OTHER_CPLUSPLUSFLAGS = ( "-pipe", @@ -1835,8 +2108,8 @@ "-Wno-unused-function", "-Wno-switch", "-Wno-comment", - "-I./../../Libraries/openssl-xcode/include", "-DCUSTOM_API_ID", + "-I./../../Libraries/openssl-xcode/include", ); OTHER_LDFLAGS = ( "-headerpad_max_install_names", @@ -1846,7 +2119,7 @@ "-L/usr/local/Qt-5.5.1/plugins/platforms", "-lcups", "-L/usr/local/Qt-5.5.1/plugins/imageformats", - "-lz", + /usr/local/lib/libz.a, "-lm", /usr/local/lib/libopenal.a, /usr/local/lib/libopus.a, @@ -1859,6 +2132,7 @@ /usr/local/lib/libavutil.a, /usr/local/lib/libiconv.a, "../../Libraries/openssl-xcode/libcrypto.a", + "-g", ); PRODUCT_NAME = Telegram; QT_LIBRARY_SUFFIX = ""; @@ -1886,7 +2160,7 @@ DYLIB_CURRENT_VERSION = 0.9.19; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ""; + FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1919,6 +2193,8 @@ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers, /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/System/Library/Frameworks/AGL.framework/Headers, "/usr/local/Qt-5.5.1/mkspecs/macx-clang", + ./ThirdParty/breakpad, + ./ThirdParty/minizip, ); INFOPLIST_FILE = Telegram.plist; INSTALL_DIR = ./../Mac/Debug/; @@ -1981,7 +2257,7 @@ "-L/usr/local/Qt-5.5.1/plugins/platforms", "-lcups", "-L/usr/local/Qt-5.5.1/plugins/imageformats", - "-lz", + /usr/local/lib/libz.a, "-lm", /usr/local/lib/libopenal.a, /usr/local/lib/libopus.a, @@ -1994,6 +2270,7 @@ /usr/local/lib/libavutil.a, /usr/local/lib/libiconv.a, "../../Libraries/openssl-xcode/libcrypto.a", + "-g", ); PRODUCT_NAME = Telegram; QT_LIBRARY_SUFFIX = _debug; diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h new file mode 100644 index 00000000000000..a3a95dcaced748 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h @@ -0,0 +1,47 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ +#define CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ + +namespace google_breakpad { + +class ClientInfo { + public: + explicit ClientInfo(pid_t pid) : pid_(pid) {} + + pid_t pid() const { return pid_; } + + private: + pid_t pid_; +}; + +} // namespace google_breakpad + +#endif // CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc new file mode 100644 index 00000000000000..ceeb3b32afecba --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc @@ -0,0 +1,72 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "client/mac/crash_generation/crash_generation_client.h" + +#include "client/mac/crash_generation/crash_generation_server.h" +#include "common/mac/MachIPC.h" + +namespace google_breakpad { + +bool CrashGenerationClient::RequestDumpForException( + int exception_type, + int exception_code, + int exception_subcode, + mach_port_t crashing_thread) { + // The server will send a message to this port indicating that it + // has finished its work. + ReceivePort acknowledge_port; + + MachSendMessage message(kDumpRequestMessage); + message.AddDescriptor(mach_task_self()); // this task + message.AddDescriptor(crashing_thread); // crashing thread + message.AddDescriptor(mach_thread_self()); // handler thread + message.AddDescriptor(acknowledge_port.GetPort()); // message receive port + + ExceptionInfo info; + info.exception_type = exception_type; + info.exception_code = exception_code; + info.exception_subcode = exception_subcode; + message.SetData(&info, sizeof(info)); + + const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; + kern_return_t result = sender_.SendMessage(message, kSendTimeoutMs); + if (result != KERN_SUCCESS) + return false; + + // Give the server slightly longer to reply since it has to + // inspect this task and write the minidump. + const mach_msg_timeout_t kReceiveTimeoutMs = 5 * 1000; + MachReceiveMessage acknowledge_message; + result = acknowledge_port.WaitForMessage(&acknowledge_message, + kReceiveTimeoutMs); + return result == KERN_SUCCESS; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h new file mode 100644 index 00000000000000..527f577a517a4a --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h @@ -0,0 +1,65 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ +#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ + +#include "common/mac/MachIPC.h" + +namespace google_breakpad { + +class CrashGenerationClient { + public: + explicit CrashGenerationClient(const char* mach_port_name) + : sender_(mach_port_name) { + } + + // Request the crash server to generate a dump. + // + // Return true if the dump was successful; false otherwise. + bool RequestDumpForException(int exception_type, + int exception_code, + int exception_subcode, + mach_port_t crashing_thread); + + bool RequestDump() { + return RequestDumpForException(0, 0, 0, MACH_PORT_NULL); + } + + private: + MachPortSender sender_; + + // Prevent copy construction and assignment. + CrashGenerationClient(const CrashGenerationClient&); + CrashGenerationClient& operator=(const CrashGenerationClient&); +}; + +} // namespace google_breakpad + +#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc new file mode 100644 index 00000000000000..451e8d9c2a7ef8 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc @@ -0,0 +1,166 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "client/mac/crash_generation/crash_generation_server.h" + +#include + +#include "client/mac/crash_generation/client_info.h" +#include "client/mac/handler/minidump_generator.h" +#include "common/mac/scoped_task_suspend-inl.h" + +namespace google_breakpad { + +CrashGenerationServer::CrashGenerationServer( + const char *mach_port_name, + FilterCallback filter, + void *filter_context, + OnClientDumpRequestCallback dump_callback, + void *dump_context, + OnClientExitingCallback exit_callback, + void *exit_context, + bool generate_dumps, + const std::string &dump_path) + : filter_(filter), + filter_context_(filter_context), + dump_callback_(dump_callback), + dump_context_(dump_context), + exit_callback_(exit_callback), + exit_context_(exit_context), + generate_dumps_(generate_dumps), + dump_dir_(dump_path.empty() ? "/tmp" : dump_path), + started_(false), + receive_port_(mach_port_name), + mach_port_name_(mach_port_name) { +} + +CrashGenerationServer::~CrashGenerationServer() { + if (started_) + Stop(); +} + +bool CrashGenerationServer::Start() { + int thread_create_result = pthread_create(&server_thread_, NULL, + &WaitForMessages, this); + started_ = thread_create_result == 0; + return started_; +} + +bool CrashGenerationServer::Stop() { + if (!started_) + return false; + + // Send a quit message to the background thread, and then join it. + MachPortSender sender(mach_port_name_.c_str()); + MachSendMessage quit_message(kQuitMessage); + const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; + kern_return_t result = sender.SendMessage(quit_message, kSendTimeoutMs); + if (result == KERN_SUCCESS) { + int thread_join_result = pthread_join(server_thread_, NULL); + started_ = thread_join_result != 0; + } + + return !started_; +} + +// static +void *CrashGenerationServer::WaitForMessages(void *server) { + CrashGenerationServer *self = + reinterpret_cast(server); + while (self->WaitForOneMessage()) {} + return NULL; +} + +bool CrashGenerationServer::WaitForOneMessage() { + MachReceiveMessage message; + kern_return_t result = receive_port_.WaitForMessage(&message, + MACH_MSG_TIMEOUT_NONE); + if (result == KERN_SUCCESS) { + switch (message.GetMessageID()) { + case kDumpRequestMessage: { + ExceptionInfo &info = (ExceptionInfo &)*message.GetData(); + + mach_port_t remote_task = message.GetTranslatedPort(0); + mach_port_t crashing_thread = message.GetTranslatedPort(1); + mach_port_t handler_thread = message.GetTranslatedPort(2); + mach_port_t ack_port = message.GetTranslatedPort(3); + pid_t remote_pid = -1; + pid_for_task(remote_task, &remote_pid); + ClientInfo client(remote_pid); + + bool result; + std::string dump_path; + if (generate_dumps_ && (!filter_ || filter_(filter_context_))) { + ScopedTaskSuspend suspend(remote_task); + + MinidumpGenerator generator(remote_task, handler_thread); + dump_path = generator.UniqueNameInDirectory(dump_dir_, NULL); + + if (info.exception_type && info.exception_code) { + generator.SetExceptionInformation(info.exception_type, + info.exception_code, + info.exception_subcode, + crashing_thread); + } + result = generator.Write(dump_path.c_str()); + } else { + result = true; + } + + if (result && dump_callback_) { + dump_callback_(dump_context_, client, dump_path); + } + + // TODO(ted): support a way for the client to send additional data, + // perhaps with a callback so users of the server can read the data + // themselves? + + if (ack_port != MACH_PORT_DEAD && ack_port != MACH_PORT_NULL) { + MachPortSender sender(ack_port); + MachSendMessage ack_message(kAcknowledgementMessage); + const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; + + sender.SendMessage(ack_message, kSendTimeoutMs); + } + + if (exit_callback_) { + exit_callback_(exit_context_, client); + } + break; + } + case kQuitMessage: + return false; + } + } else { // result != KERN_SUCCESS + return false; + } + return true; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h new file mode 100644 index 00000000000000..85bd5b5e33e466 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h @@ -0,0 +1,150 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ +#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ + +#include + +#include + +#include "common/mac/MachIPC.h" + +namespace google_breakpad { + +class ClientInfo; + +// Messages the server can read via its mach port +enum { + kDumpRequestMessage = 1, + kAcknowledgementMessage = 2, + kQuitMessage = 3 +}; + +// Exception details sent by the client when requesting a dump. +struct ExceptionInfo { + int32_t exception_type; + int32_t exception_code; + int32_t exception_subcode; +}; + +class CrashGenerationServer { + public: + // WARNING: callbacks may be invoked on a different thread + // than that which creates the CrashGenerationServer. They must + // be thread safe. + typedef void (*OnClientDumpRequestCallback)(void *context, + const ClientInfo &client_info, + const std::string &file_path); + + typedef void (*OnClientExitingCallback)(void *context, + const ClientInfo &client_info); + // If a FilterCallback returns false, the dump will not be written. + typedef bool (*FilterCallback)(void *context); + + // Create an instance with the given parameters. + // + // mach_port_name: Named server port to listen on. + // filter: Callback for a client to cancel writing a dump. + // filter_context: Context for the filter callback. + // dump_callback: Callback for a client crash dump request. + // dump_context: Context for client crash dump request callback. + // exit_callback: Callback for client process exit. + // exit_context: Context for client exit callback. + // generate_dumps: Whether to automatically generate dumps. + // Client code of this class might want to generate dumps explicitly + // in the crash dump request callback. In that case, false can be + // passed for this parameter. + // dump_path: Path for generating dumps; required only if true is + // passed for generateDumps parameter; NULL can be passed otherwise. + CrashGenerationServer(const char *mach_port_name, + FilterCallback filter, + void *filter_context, + OnClientDumpRequestCallback dump_callback, + void *dump_context, + OnClientExitingCallback exit_callback, + void *exit_context, + bool generate_dumps, + const std::string &dump_path); + + ~CrashGenerationServer(); + + // Perform initialization steps needed to start listening to clients. + // + // Return true if initialization is successful; false otherwise. + bool Start(); + + // Stop the server. + bool Stop(); + + private: + // Return a unique filename at which a minidump can be written. + bool MakeMinidumpFilename(std::string &outFilename); + + // Loop reading client messages and responding to them until + // a quit message is received. + static void *WaitForMessages(void *server); + + // Wait for a single client message and respond to it. Returns false + // if a quit message was received or if an error occurred. + bool WaitForOneMessage(); + + FilterCallback filter_; + void *filter_context_; + + OnClientDumpRequestCallback dump_callback_; + void *dump_context_; + + OnClientExitingCallback exit_callback_; + void *exit_context_; + + bool generate_dumps_; + + std::string dump_dir_; + + bool started_; + + // The mach port that receives requests to dump from child processes. + ReceivePort receive_port_; + + // The name of the mach port. Stored so the Stop method can message + // the background thread to shut it down. + std::string mach_port_name_; + + // The thread that waits on the receive port. + pthread_t server_thread_; + + // Disable copy constructor and operator=. + CrashGenerationServer(const CrashGenerationServer&); + CrashGenerationServer& operator=(const CrashGenerationServer&); +}; + +} // namespace google_breakpad + +#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc new file mode 100644 index 00000000000000..3492b823dad0d5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc @@ -0,0 +1,402 @@ +/* + * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. + * + * @APPLE_LICENSE_HEADER_START@ + * + * This file contains Original Code and/or Modifications of Original Code + * as defined in and that are subject to the Apple Public Source License + * Version 2.0 (the 'License'). You may not use this file except in + * compliance with the License. Please obtain a copy of the License at + * http://www.opensource.apple.com/apsl/ and read it before using this + * file. + * + * The Original Code and all software distributed under the License are + * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, + * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. + * Please see the License for the specific language governing rights and + * limitations under the License. + * + * @APPLE_LICENSE_HEADER_END@ + */ +/* + * Copyright (c) 1989, 1993 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + + +/* + * This file was copied from libc/gen/nlist.c from Darwin's source code + * The version of nlist used as a base is from 10.5.2, libc-498 + * http://www.opensource.apple.com/darwinsource/10.5.2/Libc-498/gen/nlist.c + * + * The full tarball is at: + * http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libc-498.tar.gz + * + * I've modified it to be compatible with 64-bit images. +*/ + +#include "breakpad_nlist_64.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/* Stuff lifted from and since they are gone */ +/* + * Header prepended to each a.out file. + */ +struct exec { + unsigned short a_machtype; /* machine type */ + unsigned short a_magic; /* magic number */ + unsigned long a_text; /* size of text segment */ + unsigned long a_data; /* size of initialized data */ + unsigned long a_bss; /* size of uninitialized data */ + unsigned long a_syms; /* size of symbol table */ + unsigned long a_entry; /* entry point */ + unsigned long a_trsize; /* size of text relocation */ + unsigned long a_drsize; /* size of data relocation */ +}; + +#define OMAGIC 0407 /* old impure format */ +#define NMAGIC 0410 /* read-only text */ +#define ZMAGIC 0413 /* demand load format */ + +#define N_BADMAG(x) \ + (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) +#define N_TXTOFF(x) \ + ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec)) +#define N_SYMOFF(x) \ + (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize) + +// Traits structs for specializing function templates to handle +// 32-bit/64-bit Mach-O files. +template +struct MachBits {}; + +typedef struct nlist nlist32; +typedef struct nlist_64 nlist64; + +template<> +struct MachBits { + typedef mach_header mach_header_type; + typedef uint32_t word_type; + static const uint32_t magic = MH_MAGIC; +}; + +template<> +struct MachBits { + typedef mach_header_64 mach_header_type; + typedef uint64_t word_type; + static const uint32_t magic = MH_MAGIC_64; +}; + +template +int +__breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, + cpu_type_t cpu_type); + +/* + * nlist - retreive attributes from name list (string table version) + */ + +template +int breakpad_nlist_common(const char *name, + nlist_type *list, + const char **symbolNames, + cpu_type_t cpu_type) { + int fd = open(name, O_RDONLY, 0); + if (fd < 0) + return -1; + int n = __breakpad_fdnlist(fd, list, symbolNames, cpu_type); + close(fd); + return n; +} + +int breakpad_nlist(const char *name, + struct nlist *list, + const char **symbolNames, + cpu_type_t cpu_type) { + return breakpad_nlist_common(name, list, symbolNames, cpu_type); +} + +int breakpad_nlist(const char *name, + struct nlist_64 *list, + const char **symbolNames, + cpu_type_t cpu_type) { + return breakpad_nlist_common(name, list, symbolNames, cpu_type); +} + +/* Note: __fdnlist() is called from kvm_nlist in libkvm's kvm.c */ + +template +int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, + cpu_type_t cpu_type) { + typedef typename MachBits::mach_header_type mach_header_type; + typedef typename MachBits::word_type word_type; + + const uint32_t magic = MachBits::magic; + + int maxlen = 500; + int nreq = 0; + for (nlist_type* q = list; + symbolNames[q-list] && symbolNames[q-list][0]; + q++, nreq++) { + + q->n_type = 0; + q->n_value = 0; + q->n_desc = 0; + q->n_sect = 0; + q->n_un.n_strx = 0; + } + + struct exec buf; + if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) || + (N_BADMAG(buf) && *((uint32_t *)&buf) != magic && + CFSwapInt32BigToHost(*((uint32_t *)&buf)) != FAT_MAGIC && + /* The following is the big-endian ppc64 check */ + (*((uint32_t*)&buf)) != FAT_MAGIC)) { + return -1; + } + + /* Deal with fat file if necessary */ + unsigned arch_offset = 0; + if (CFSwapInt32BigToHost(*((uint32_t *)&buf)) == FAT_MAGIC || + /* The following is the big-endian ppc64 check */ + *((unsigned int *)&buf) == FAT_MAGIC) { + /* Read in the fat header */ + struct fat_header fh; + if (lseek(fd, 0, SEEK_SET) == -1) { + return -1; + } + if (read(fd, (char *)&fh, sizeof(fh)) != sizeof(fh)) { + return -1; + } + + /* Convert fat_narchs to host byte order */ + fh.nfat_arch = CFSwapInt32BigToHost(fh.nfat_arch); + + /* Read in the fat archs */ + struct fat_arch *fat_archs = + (struct fat_arch *)malloc(fh.nfat_arch * sizeof(struct fat_arch)); + if (fat_archs == NULL) { + return -1; + } + if (read(fd, (char *)fat_archs, + sizeof(struct fat_arch) * fh.nfat_arch) != + (ssize_t)(sizeof(struct fat_arch) * fh.nfat_arch)) { + free(fat_archs); + return -1; + } + + /* + * Convert archs to host byte ordering (a constraint of + * cpusubtype_getbestarch() + */ + for (unsigned i = 0; i < fh.nfat_arch; i++) { + fat_archs[i].cputype = + CFSwapInt32BigToHost(fat_archs[i].cputype); + fat_archs[i].cpusubtype = + CFSwapInt32BigToHost(fat_archs[i].cpusubtype); + fat_archs[i].offset = + CFSwapInt32BigToHost(fat_archs[i].offset); + fat_archs[i].size = + CFSwapInt32BigToHost(fat_archs[i].size); + fat_archs[i].align = + CFSwapInt32BigToHost(fat_archs[i].align); + } + + struct fat_arch *fap = NULL; + for (unsigned i = 0; i < fh.nfat_arch; i++) { + if (fat_archs[i].cputype == cpu_type) { + fap = &fat_archs[i]; + break; + } + } + + if (!fap) { + free(fat_archs); + return -1; + } + arch_offset = fap->offset; + free(fat_archs); + + /* Read in the beginning of the architecture-specific file */ + if (lseek(fd, arch_offset, SEEK_SET) == -1) { + return -1; + } + if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf)) { + return -1; + } + } + + off_t sa; /* symbol address */ + off_t ss; /* start of strings */ + register_t n; + if (*((unsigned int *)&buf) == magic) { + if (lseek(fd, arch_offset, SEEK_SET) == -1) { + return -1; + } + mach_header_type mh; + if (read(fd, (char *)&mh, sizeof(mh)) != sizeof(mh)) { + return -1; + } + + struct load_command *load_commands = + (struct load_command *)malloc(mh.sizeofcmds); + if (load_commands == NULL) { + return -1; + } + if (read(fd, (char *)load_commands, mh.sizeofcmds) != + (ssize_t)mh.sizeofcmds) { + free(load_commands); + return -1; + } + struct symtab_command *stp = NULL; + struct load_command *lcp = load_commands; + // iterate through all load commands, looking for + // LC_SYMTAB load command + for (uint32_t i = 0; i < mh.ncmds; i++) { + if (lcp->cmdsize % sizeof(word_type) != 0 || + lcp->cmdsize <= 0 || + (char *)lcp + lcp->cmdsize > + (char *)load_commands + mh.sizeofcmds) { + free(load_commands); + return -1; + } + if (lcp->cmd == LC_SYMTAB) { + if (lcp->cmdsize != + sizeof(struct symtab_command)) { + free(load_commands); + return -1; + } + stp = (struct symtab_command *)lcp; + break; + } + lcp = (struct load_command *) + ((char *)lcp + lcp->cmdsize); + } + if (stp == NULL) { + free(load_commands); + return -1; + } + // sa points to the beginning of the symbol table + sa = stp->symoff + arch_offset; + // ss points to the beginning of the string table + ss = stp->stroff + arch_offset; + // n is the number of bytes in the symbol table + // each symbol table entry is an nlist structure + n = stp->nsyms * sizeof(nlist_type); + free(load_commands); + } else { + sa = N_SYMOFF(buf) + arch_offset; + ss = sa + buf.a_syms + arch_offset; + n = buf.a_syms; + } + + if (lseek(fd, sa, SEEK_SET) == -1) { + return -1; + } + + // the algorithm here is to read the nlist entries in m-sized + // chunks into q. q is then iterated over. for each entry in q, + // use the string table index(q->n_un.n_strx) to read the symbol + // name, then scan the nlist entries passed in by the user(via p), + // and look for a match + while (n) { + nlist_type space[BUFSIZ/sizeof (nlist_type)]; + register_t m = sizeof (space); + + if (n < m) + m = n; + if (read(fd, (char *)space, m) != m) + break; + n -= m; + off_t savpos = lseek(fd, 0, SEEK_CUR); + if (savpos == -1) { + return -1; + } + for (nlist_type* q = space; (m -= sizeof(nlist_type)) >= 0; q++) { + char nambuf[BUFSIZ]; + + if (q->n_un.n_strx == 0 || q->n_type & N_STAB) + continue; + + // seek to the location in the binary where the symbol + // name is stored & read it into memory + if (lseek(fd, ss+q->n_un.n_strx, SEEK_SET) == -1) { + return -1; + } + if (read(fd, nambuf, maxlen+1) == -1) { + return -1; + } + const char *s2 = nambuf; + for (nlist_type *p = list; + symbolNames[p-list] && symbolNames[p-list][0]; + p++) { + // get the symbol name the user has passed in that + // corresponds to the nlist entry that we're looking at + const char *s1 = symbolNames[p - list]; + while (*s1) { + if (*s1++ != *s2++) + goto cont; + } + if (*s2) + goto cont; + + p->n_value = q->n_value; + p->n_type = q->n_type; + p->n_desc = q->n_desc; + p->n_sect = q->n_sect; + p->n_un.n_strx = q->n_un.n_strx; + if (--nreq == 0) + return nreq; + + break; + cont: ; + } + } + if (lseek(fd, savpos, SEEK_SET) == -1) { + return -1; + } + } + return nreq; +} diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h new file mode 100644 index 00000000000000..1d2c63913457b4 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h @@ -0,0 +1,47 @@ +// Copyright (c) 2008, Google Inc. +// All rights reserved +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// breakpad_nlist.h +// +// This file is meant to provide a header for clients of the modified +// nlist function implemented to work on 64-bit. + +#ifndef CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ + +#include + +int breakpad_nlist(const char *name, + struct nlist *list, + const char **symbolNames, + cpu_type_t cpu_type); +int breakpad_nlist(const char *name, + struct nlist_64 *list, + const char **symbolNames, + cpu_type_t cpu_type); + +#endif /* CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ */ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc new file mode 100644 index 00000000000000..cdba6df4acfbb1 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc @@ -0,0 +1,573 @@ +// Copyright (c) 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "client/mac/handler/dynamic_images.h" + +extern "C" { // needed to compile on Leopard + #include + #include + #include +} + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "breakpad_nlist_64.h" + +#if !TARGET_OS_IPHONE +#include + +#ifndef MAC_OS_X_VERSION_10_6 +#define MAC_OS_X_VERSION_10_6 1060 +#endif + +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 + +// Fallback declarations for TASK_DYLD_INFO and friends, introduced in +// in the Mac OS X 10.6 SDK. +#define TASK_DYLD_INFO 17 +struct task_dyld_info { + mach_vm_address_t all_image_info_addr; + mach_vm_size_t all_image_info_size; +}; +typedef struct task_dyld_info task_dyld_info_data_t; +typedef struct task_dyld_info *task_dyld_info_t; +#define TASK_DYLD_INFO_COUNT (sizeof(task_dyld_info_data_t) / sizeof(natural_t)) + +#endif + +#endif // !TARGET_OS_IPHONE + +namespace google_breakpad { + +using std::string; +using std::vector; + +//============================================================================== +// Returns the size of the memory region containing |address| and the +// number of bytes from |address| to the end of the region. +// We potentially, will extend the size of the original +// region by the size of the following region if it's contiguous with the +// first in order to handle cases when we're reading strings and they +// straddle two vm regions. +// +static mach_vm_size_t GetMemoryRegionSize(task_port_t target_task, + const uint64_t address, + mach_vm_size_t *size_to_end) { + mach_vm_address_t region_base = (mach_vm_address_t)address; + mach_vm_size_t region_size; + natural_t nesting_level = 0; + vm_region_submap_info_64 submap_info; + mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; + + // Get information about the vm region containing |address| + vm_region_recurse_info_t region_info; + region_info = reinterpret_cast(&submap_info); + + kern_return_t result = + mach_vm_region_recurse(target_task, + ®ion_base, + ®ion_size, + &nesting_level, + region_info, + &info_count); + + if (result == KERN_SUCCESS) { + // Get distance from |address| to the end of this region + *size_to_end = region_base + region_size -(mach_vm_address_t)address; + + // If we want to handle strings as long as 4096 characters we may need + // to check if there's a vm region immediately following the first one. + // If so, we need to extend |*size_to_end| to go all the way to the end + // of the second region. + if (*size_to_end < 4096) { + // Second region starts where the first one ends + mach_vm_address_t region_base2 = + (mach_vm_address_t)(region_base + region_size); + mach_vm_size_t region_size2; + + // Get information about the following vm region + result = + mach_vm_region_recurse(target_task, + ®ion_base2, + ®ion_size2, + &nesting_level, + region_info, + &info_count); + + // Extend region_size to go all the way to the end of the 2nd region + if (result == KERN_SUCCESS + && region_base2 == region_base + region_size) { + region_size += region_size2; + } + } + + *size_to_end = region_base + region_size -(mach_vm_address_t)address; + } else { + region_size = 0; + *size_to_end = 0; + } + + return region_size; +} + +#define kMaxStringLength 8192 +//============================================================================== +// Reads a NULL-terminated string from another task. +// +// Warning! This will not read any strings longer than kMaxStringLength-1 +// +static string ReadTaskString(task_port_t target_task, + const uint64_t address) { + // The problem is we don't know how much to read until we know how long + // the string is. And we don't know how long the string is, until we've read + // the memory! So, we'll try to read kMaxStringLength bytes + // (or as many bytes as we can until we reach the end of the vm region). + mach_vm_size_t size_to_end; + GetMemoryRegionSize(target_task, address, &size_to_end); + + if (size_to_end > 0) { + mach_vm_size_t size_to_read = + size_to_end > kMaxStringLength ? kMaxStringLength : size_to_end; + + vector bytes; + if (ReadTaskMemory(target_task, address, (size_t)size_to_read, bytes) != + KERN_SUCCESS) + return string(); + + return string(reinterpret_cast(&bytes[0])); + } + + return string(); +} + +//============================================================================== +// Reads an address range from another task. The bytes read will be returned +// in bytes, which will be resized as necessary. +kern_return_t ReadTaskMemory(task_port_t target_task, + const uint64_t address, + size_t length, + vector &bytes) { + int systemPageSize = getpagesize(); + + // use the negative of the page size for the mask to find the page address + mach_vm_address_t page_address = address & (-systemPageSize); + + mach_vm_address_t last_page_address = + (address + length + (systemPageSize - 1)) & (-systemPageSize); + + mach_vm_size_t page_size = last_page_address - page_address; + uint8_t* local_start; + uint32_t local_length; + + kern_return_t r = mach_vm_read(target_task, + page_address, + page_size, + reinterpret_cast(&local_start), + &local_length); + + if (r != KERN_SUCCESS) + return r; + + bytes.resize(length); + memcpy(&bytes[0], + &local_start[(mach_vm_address_t)address - page_address], + length); + mach_vm_deallocate(mach_task_self(), (uintptr_t)local_start, local_length); + return KERN_SUCCESS; +} + +#pragma mark - + +//============================================================================== +// Traits structs for specializing function templates to handle +// 32-bit/64-bit Mach-O files. +struct MachO32 { + typedef mach_header mach_header_type; + typedef segment_command mach_segment_command_type; + typedef dyld_image_info32 dyld_image_info; + typedef dyld_all_image_infos32 dyld_all_image_infos; + typedef struct nlist nlist_type; + static const uint32_t magic = MH_MAGIC; + static const uint32_t segment_load_command = LC_SEGMENT; +}; + +struct MachO64 { + typedef mach_header_64 mach_header_type; + typedef segment_command_64 mach_segment_command_type; + typedef dyld_image_info64 dyld_image_info; + typedef dyld_all_image_infos64 dyld_all_image_infos; + typedef struct nlist_64 nlist_type; + static const uint32_t magic = MH_MAGIC_64; + static const uint32_t segment_load_command = LC_SEGMENT_64; +}; + +template +bool FindTextSection(DynamicImage& image) { + typedef typename MachBits::mach_header_type mach_header_type; + typedef typename MachBits::mach_segment_command_type + mach_segment_command_type; + + const mach_header_type* header = + reinterpret_cast(&image.header_[0]); + + if(header->magic != MachBits::magic) { + return false; + } + + const struct load_command *cmd = + reinterpret_cast(header + 1); + + bool found_text_section = false; + bool found_dylib_id_command = false; + for (unsigned int i = 0; cmd && (i < header->ncmds); ++i) { + if (!found_text_section) { + if (cmd->cmd == MachBits::segment_load_command) { + const mach_segment_command_type *seg = + reinterpret_cast(cmd); + + if (!strcmp(seg->segname, "__TEXT")) { + image.vmaddr_ = static_cast(seg->vmaddr); + image.vmsize_ = static_cast(seg->vmsize); + image.slide_ = 0; + + if (seg->fileoff == 0 && seg->filesize != 0) { + image.slide_ = + (uintptr_t)image.GetLoadAddress() - (uintptr_t)seg->vmaddr; + } + found_text_section = true; + } + } + } + + if (!found_dylib_id_command) { + if (cmd->cmd == LC_ID_DYLIB) { + const struct dylib_command *dc = + reinterpret_cast(cmd); + + image.version_ = dc->dylib.current_version; + found_dylib_id_command = true; + } + } + + if (found_dylib_id_command && found_text_section) { + return true; + } + + cmd = reinterpret_cast + (reinterpret_cast(cmd) + cmd->cmdsize); + } + + return false; +} + +//============================================================================== +// Initializes vmaddr_, vmsize_, and slide_ +void DynamicImage::CalculateMemoryAndVersionInfo() { + // unless we can process the header, ensure that calls to + // IsValid() will return false + vmaddr_ = 0; + vmsize_ = 0; + slide_ = 0; + version_ = 0; + + // The function template above does all the real work. + if (Is64Bit()) + FindTextSection(*this); + else + FindTextSection(*this); +} + +//============================================================================== +// The helper function template abstracts the 32/64-bit differences. +template +uint32_t GetFileTypeFromHeader(DynamicImage& image) { + typedef typename MachBits::mach_header_type mach_header_type; + + const mach_header_type* header = + reinterpret_cast(&image.header_[0]); + return header->filetype; +} + +uint32_t DynamicImage::GetFileType() { + if (Is64Bit()) + return GetFileTypeFromHeader(*this); + + return GetFileTypeFromHeader(*this); +} + +#pragma mark - + +//============================================================================== +// Loads information about dynamically loaded code in the given task. +DynamicImages::DynamicImages(mach_port_t task) + : task_(task), + cpu_type_(DetermineTaskCPUType(task)), + image_list_() { + ReadImageInfoForTask(); +} + +template +static uint64_t LookupSymbol(const char* symbol_name, + const char* filename, + cpu_type_t cpu_type) { + typedef typename MachBits::nlist_type nlist_type; + + nlist_type symbol_info[8] = {}; + const char *symbolNames[2] = { symbol_name, "\0" }; + nlist_type &list = symbol_info[0]; + int invalidEntriesCount = breakpad_nlist(filename, + &list, + symbolNames, + cpu_type); + + if(invalidEntriesCount != 0) { + return 0; + } + + assert(list.n_value); + return list.n_value; +} + +#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 +static bool HasTaskDyldInfo() { + return true; +} +#else +static SInt32 GetOSVersionInternal() { + SInt32 os_version = 0; + Gestalt(gestaltSystemVersion, &os_version); + return os_version; +} + +static SInt32 GetOSVersion() { + static SInt32 os_version = GetOSVersionInternal(); + return os_version; +} + +static bool HasTaskDyldInfo() { + return GetOSVersion() >= 0x1060; +} +#endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 10_6 + +uint64_t DynamicImages::GetDyldAllImageInfosPointer() { + if (HasTaskDyldInfo()) { + task_dyld_info_data_t task_dyld_info; + mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT; + if (task_info(task_, TASK_DYLD_INFO, (task_info_t)&task_dyld_info, + &count) != KERN_SUCCESS) { + return 0; + } + + return (uint64_t)task_dyld_info.all_image_info_addr; + } else { + const char *imageSymbolName = "_dyld_all_image_infos"; + const char *dyldPath = "/usr/lib/dyld"; + + if (Is64Bit()) + return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); + return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); + } +} + +//============================================================================== +// This code was written using dyld_debug.c (from Darwin) as a guide. + +template +void ReadImageInfo(DynamicImages& images, + uint64_t image_list_address) { + typedef typename MachBits::dyld_image_info dyld_image_info; + typedef typename MachBits::dyld_all_image_infos dyld_all_image_infos; + typedef typename MachBits::mach_header_type mach_header_type; + + // Read the structure inside of dyld that contains information about + // loaded images. We're reading from the desired task's address space. + + // Here we make the assumption that dyld loaded at the same address in + // the crashed process vs. this one. This is an assumption made in + // "dyld_debug.c" and is said to be nearly always valid. + vector dyld_all_info_bytes; + if (ReadTaskMemory(images.task_, + image_list_address, + sizeof(dyld_all_image_infos), + dyld_all_info_bytes) != KERN_SUCCESS) + return; + + dyld_all_image_infos *dyldInfo = + reinterpret_cast(&dyld_all_info_bytes[0]); + + // number of loaded images + int count = dyldInfo->infoArrayCount; + + // Read an array of dyld_image_info structures each containing + // information about a loaded image. + vector dyld_info_array_bytes; + if (ReadTaskMemory(images.task_, + dyldInfo->infoArray, + count * sizeof(dyld_image_info), + dyld_info_array_bytes) != KERN_SUCCESS) + return; + + dyld_image_info *infoArray = + reinterpret_cast(&dyld_info_array_bytes[0]); + images.image_list_.reserve(count); + + for (int i = 0; i < count; ++i) { + dyld_image_info &info = infoArray[i]; + + // First read just the mach_header from the image in the task. + vector mach_header_bytes; + if (ReadTaskMemory(images.task_, + info.load_address_, + sizeof(mach_header_type), + mach_header_bytes) != KERN_SUCCESS) + continue; // bail on this dynamic image + + mach_header_type *header = + reinterpret_cast(&mach_header_bytes[0]); + + // Now determine the total amount necessary to read the header + // plus all of the load commands. + size_t header_size = + sizeof(mach_header_type) + header->sizeofcmds; + + if (ReadTaskMemory(images.task_, + info.load_address_, + header_size, + mach_header_bytes) != KERN_SUCCESS) + continue; + + // Read the file name from the task's memory space. + string file_path; + if (info.file_path_) { + // Although we're reading kMaxStringLength bytes, it's copied in the + // the DynamicImage constructor below with the correct string length, + // so it's not really wasting memory. + file_path = ReadTaskString(images.task_, info.file_path_); + } + + // Create an object representing this image and add it to our list. + DynamicImage *new_image; + new_image = new DynamicImage(&mach_header_bytes[0], + header_size, + info.load_address_, + file_path, + static_cast(info.file_mod_date_), + images.task_, + images.cpu_type_); + + if (new_image->IsValid()) { + images.image_list_.push_back(DynamicImageRef(new_image)); + } else { + delete new_image; + } + } + + // sorts based on loading address + sort(images.image_list_.begin(), images.image_list_.end()); + // remove duplicates - this happens in certain strange cases + // You can see it in DashboardClient when Google Gadgets plugin + // is installed. Apple's crash reporter log and gdb "info shared" + // both show the same library multiple times at the same address + + vector::iterator it = unique(images.image_list_.begin(), + images.image_list_.end()); + images.image_list_.erase(it, images.image_list_.end()); +} + +void DynamicImages::ReadImageInfoForTask() { + uint64_t imageList = GetDyldAllImageInfosPointer(); + + if (imageList) { + if (Is64Bit()) + ReadImageInfo(*this, imageList); + else + ReadImageInfo(*this, imageList); + } +} + +//============================================================================== +DynamicImage *DynamicImages::GetExecutableImage() { + int executable_index = GetExecutableImageIndex(); + + if (executable_index >= 0) { + return GetImage(executable_index); + } + + return NULL; +} + +//============================================================================== +// returns -1 if failure to find executable +int DynamicImages::GetExecutableImageIndex() { + int image_count = GetImageCount(); + + for (int i = 0; i < image_count; ++i) { + DynamicImage *image = GetImage(i); + if (image->GetFileType() == MH_EXECUTE) { + return i; + } + } + + return -1; +} + +//============================================================================== +// static +cpu_type_t DynamicImages::DetermineTaskCPUType(task_t task) { + if (task == mach_task_self()) + return GetNativeCPUType(); + + int mib[CTL_MAXNAME]; + size_t mibLen = CTL_MAXNAME; + int err = sysctlnametomib("sysctl.proc_cputype", mib, &mibLen); + if (err == 0) { + assert(mibLen < CTL_MAXNAME); + pid_for_task(task, &mib[mibLen]); + mibLen += 1; + + cpu_type_t cpu_type; + size_t cpuTypeSize = sizeof(cpu_type); + sysctl(mib, static_cast(mibLen), &cpu_type, &cpuTypeSize, 0, 0); + return cpu_type; + } + + return GetNativeCPUType(); +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h new file mode 100644 index 00000000000000..65147900b822f0 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h @@ -0,0 +1,319 @@ +// Copyright (c) 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// dynamic_images.h +// +// Implements most of the function of the dyld API, but allowing an +// arbitrary task to be introspected, unlike the dyld API which +// only allows operation on the current task. The current implementation +// is limited to use by 32-bit tasks. + +#ifndef CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ +#define CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ + +#include +#include +#include +#include + +#include +#include + +#include "mach_vm_compat.h" + +namespace google_breakpad { + +using std::string; +using std::vector; + +//============================================================================== +// The memory layout of this struct matches the dyld_image_info struct +// defined in "dyld_gdb.h" in the darwin source. +typedef struct dyld_image_info32 { + uint32_t load_address_; // struct mach_header* + uint32_t file_path_; // char* + uint32_t file_mod_date_; +} dyld_image_info32; + +typedef struct dyld_image_info64 { + uint64_t load_address_; // struct mach_header* + uint64_t file_path_; // char* + uint64_t file_mod_date_; +} dyld_image_info64; + +//============================================================================== +// This is as defined in "dyld_gdb.h" in the darwin source. +// _dyld_all_image_infos (in dyld) is a structure of this type +// which will be used to determine which dynamic code has been loaded. +typedef struct dyld_all_image_infos32 { + uint32_t version; // == 1 in Mac OS X 10.4 + uint32_t infoArrayCount; + uint32_t infoArray; // const struct dyld_image_info* + uint32_t notification; + bool processDetachedFromSharedRegion; +} dyld_all_image_infos32; + +typedef struct dyld_all_image_infos64 { + uint32_t version; // == 1 in Mac OS X 10.4 + uint32_t infoArrayCount; + uint64_t infoArray; // const struct dyld_image_info* + uint64_t notification; + bool processDetachedFromSharedRegion; +} dyld_all_image_infos64; + +// some typedefs to isolate 64/32 bit differences +#ifdef __LP64__ +typedef mach_header_64 breakpad_mach_header; +typedef segment_command_64 breakpad_mach_segment_command; +#else +typedef mach_header breakpad_mach_header; +typedef segment_command breakpad_mach_segment_command; +#endif + +// Helper functions to deal with 32-bit/64-bit Mach-O differences. +class DynamicImage; +template +bool FindTextSection(DynamicImage& image); + +template +uint32_t GetFileTypeFromHeader(DynamicImage& image); + +//============================================================================== +// Represents a single dynamically loaded mach-o image +class DynamicImage { + public: + DynamicImage(uint8_t *header, // data is copied + size_t header_size, // includes load commands + uint64_t load_address, + string file_path, + uintptr_t image_mod_date, + mach_port_t task, + cpu_type_t cpu_type) + : header_(header, header + header_size), + header_size_(header_size), + load_address_(load_address), + vmaddr_(0), + vmsize_(0), + slide_(0), + version_(0), + file_path_(file_path), + file_mod_date_(image_mod_date), + task_(task), + cpu_type_(cpu_type) { + CalculateMemoryAndVersionInfo(); + } + + // Size of mach_header plus load commands + size_t GetHeaderSize() const {return header_.size();} + + // Full path to mach-o binary + string GetFilePath() {return file_path_;} + + uint64_t GetModDate() const {return file_mod_date_;} + + // Actual address where the image was loaded + uint64_t GetLoadAddress() const {return load_address_;} + + // Address where the image should be loaded + mach_vm_address_t GetVMAddr() const {return vmaddr_;} + + // Difference between GetLoadAddress() and GetVMAddr() + ptrdiff_t GetVMAddrSlide() const {return slide_;} + + // Size of the image + mach_vm_size_t GetVMSize() const {return vmsize_;} + + // Task owning this loaded image + mach_port_t GetTask() {return task_;} + + // CPU type of the task + cpu_type_t GetCPUType() {return cpu_type_;} + + // filetype from the Mach-O header. + uint32_t GetFileType(); + + // Return true if the task is a 64-bit architecture. + bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } + + uint32_t GetVersion() {return version_;} + // For sorting + bool operator<(const DynamicImage &inInfo) { + return GetLoadAddress() < inInfo.GetLoadAddress(); + } + + // Sanity checking + bool IsValid() {return GetVMSize() != 0;} + + private: + DynamicImage(const DynamicImage &); + DynamicImage &operator=(const DynamicImage &); + + friend class DynamicImages; + template + friend bool FindTextSection(DynamicImage& image); + template + friend uint32_t GetFileTypeFromHeader(DynamicImage& image); + + // Initializes vmaddr_, vmsize_, and slide_ + void CalculateMemoryAndVersionInfo(); + + const vector header_; // our local copy of the header + size_t header_size_; // mach_header plus load commands + uint64_t load_address_; // base address image is mapped into + mach_vm_address_t vmaddr_; + mach_vm_size_t vmsize_; + ptrdiff_t slide_; + uint32_t version_; // Dylib version + string file_path_; // path dyld used to load the image + uintptr_t file_mod_date_; // time_t of image file + + mach_port_t task_; + cpu_type_t cpu_type_; // CPU type of task_ +}; + +//============================================================================== +// DynamicImageRef is just a simple wrapper for a pointer to +// DynamicImage. The reason we use it instead of a simple typedef is so +// that we can use stl::sort() on a vector of DynamicImageRefs +// and simple class pointers can't implement operator<(). +// +class DynamicImageRef { + public: + explicit DynamicImageRef(DynamicImage *inP) : p(inP) {} + // The copy constructor is required by STL + DynamicImageRef(const DynamicImageRef &inRef) : p(inRef.p) {} + + bool operator<(const DynamicImageRef &inRef) const { + return (*const_cast(this)->p) + < (*const_cast(inRef).p); + } + + bool operator==(const DynamicImageRef &inInfo) const { + return (*const_cast(this)->p).GetLoadAddress() == + (*const_cast(inInfo)).GetLoadAddress(); + } + + // Be just like DynamicImage* + DynamicImage *operator->() {return p;} + operator DynamicImage*() {return p;} + + private: + DynamicImage *p; +}; + +// Helper function to deal with 32-bit/64-bit Mach-O differences. +class DynamicImages; +template +void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); + +//============================================================================== +// An object of type DynamicImages may be created to allow introspection of +// an arbitrary task's dynamically loaded mach-o binaries. This makes the +// assumption that the current task has send rights to the target task. +class DynamicImages { + public: + explicit DynamicImages(mach_port_t task); + + ~DynamicImages() { + for (int i = 0; i < GetImageCount(); ++i) { + delete image_list_[i]; + } + } + + // Returns the number of dynamically loaded mach-o images. + int GetImageCount() const {return static_cast(image_list_.size());} + + // Returns an individual image. + DynamicImage *GetImage(int i) { + if (i < (int)image_list_.size()) { + return image_list_[i]; + } + return NULL; + } + + // Returns the image corresponding to the main executable. + DynamicImage *GetExecutableImage(); + int GetExecutableImageIndex(); + + // Returns the task which we're looking at. + mach_port_t GetTask() const {return task_;} + + // CPU type of the task + cpu_type_t GetCPUType() {return cpu_type_;} + + // Return true if the task is a 64-bit architecture. + bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } + + // Determine the CPU type of the task being dumped. + static cpu_type_t DetermineTaskCPUType(task_t task); + + // Get the native CPU type of this task. + static cpu_type_t GetNativeCPUType() { +#if defined(__i386__) + return CPU_TYPE_I386; +#elif defined(__x86_64__) + return CPU_TYPE_X86_64; +#elif defined(__ppc__) + return CPU_TYPE_POWERPC; +#elif defined(__ppc64__) + return CPU_TYPE_POWERPC64; +#elif defined(__arm__) + return CPU_TYPE_ARM; +#elif defined(__aarch64__) + return CPU_TYPE_ARM64; +#else +#error "GetNativeCPUType not implemented for this architecture" +#endif + } + + private: + template + friend void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); + + bool IsOurTask() {return task_ == mach_task_self();} + + // Initialization + void ReadImageInfoForTask(); + uint64_t GetDyldAllImageInfosPointer(); + + mach_port_t task_; + cpu_type_t cpu_type_; // CPU type of task_ + vector image_list_; +}; + +// Fill bytes with the contents of memory at a particular +// location in another task. +kern_return_t ReadTaskMemory(task_port_t target_task, + const uint64_t address, + size_t length, + vector &bytes); + +} // namespace google_breakpad + +#endif // CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h b/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h new file mode 100644 index 00000000000000..9e9028b928d835 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h @@ -0,0 +1,48 @@ +// Copyright (c) 2011, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ +#define CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ + +#include + +// On iOS 5 and higher, mach/mach_vm.h is not supported. Use the corresponding +// vm_map functions instead. +#if TARGET_OS_IPHONE +#include +#define mach_vm_address_t vm_address_t +#define mach_vm_deallocate vm_deallocate +#define mach_vm_read vm_read +#define mach_vm_region_recurse vm_region_recurse_64 +#define mach_vm_size_t vm_size_t +#else +#include +#endif // TARGET_OS_IPHONE + +#endif // CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc new file mode 100644 index 00000000000000..7d6e81dbb86439 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc @@ -0,0 +1,1591 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "client/mac/handler/minidump_generator.h" + +#if defined(HAS_ARM_SUPPORT) || defined(HAS_ARM64_SUPPORT) +#include +#endif +#ifdef HAS_PPC_SUPPORT +#include +#endif +#ifdef HAS_X86_SUPPORT +#include +#endif + +#include "client/minidump_file_writer-inl.h" +#include "common/mac/file_id.h" +#include "common/mac/macho_id.h" +#include "common/mac/string_utilities.h" + +using MacStringUtils::ConvertToString; +using MacStringUtils::IntegerValueAtIndex; + +namespace google_breakpad { + +#if defined(__LP64__) && __LP64__ +#define LC_SEGMENT_ARCH LC_SEGMENT_64 +#else +#define LC_SEGMENT_ARCH LC_SEGMENT +#endif + +// constructor when generating from within the crashed process +MinidumpGenerator::MinidumpGenerator() + : writer_(), + exception_type_(0), + exception_code_(0), + exception_subcode_(0), + exception_thread_(0), + crashing_task_(mach_task_self()), + handler_thread_(mach_thread_self()), + cpu_type_(DynamicImages::GetNativeCPUType()), + task_context_(NULL), + dynamic_images_(NULL), + memory_blocks_(&allocator_) { + GatherSystemInformation(); +} + +// constructor when generating from a different process than the +// crashed process +MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, + mach_port_t handler_thread) + : writer_(), + exception_type_(0), + exception_code_(0), + exception_subcode_(0), + exception_thread_(0), + crashing_task_(crashing_task), + handler_thread_(handler_thread), + cpu_type_(DynamicImages::GetNativeCPUType()), + task_context_(NULL), + dynamic_images_(NULL), + memory_blocks_(&allocator_) { + if (crashing_task != mach_task_self()) { + dynamic_images_ = new DynamicImages(crashing_task_); + cpu_type_ = dynamic_images_->GetCPUType(); + } else { + dynamic_images_ = NULL; + cpu_type_ = DynamicImages::GetNativeCPUType(); + } + + GatherSystemInformation(); +} + +MinidumpGenerator::~MinidumpGenerator() { + delete dynamic_images_; +} + +char MinidumpGenerator::build_string_[16]; +int MinidumpGenerator::os_major_version_ = 0; +int MinidumpGenerator::os_minor_version_ = 0; +int MinidumpGenerator::os_build_number_ = 0; + +// static +void MinidumpGenerator::GatherSystemInformation() { + // If this is non-zero, then we've already gathered the information + if (os_major_version_) + return; + + // This code extracts the version and build information from the OS + CFStringRef vers_path = + CFSTR("/System/Library/CoreServices/SystemVersion.plist"); + CFURLRef sys_vers = + CFURLCreateWithFileSystemPath(NULL, + vers_path, + kCFURLPOSIXPathStyle, + false); + CFReadStreamRef read_stream = CFReadStreamCreateWithFile(NULL, sys_vers); + CFRelease(sys_vers); + if (!read_stream) { + return; + } + if (!CFReadStreamOpen(read_stream)) { + CFRelease(read_stream); + return; + } + CFDataRef data = NULL; + CFIndex num_bytes_read = 0; + const UInt8 *data_bytes = + CFReadStreamGetBuffer(read_stream, 0, &num_bytes_read); + if (data_bytes) { + data = CFDataCreate(NULL, data_bytes, num_bytes_read); + } + CFReadStreamClose(read_stream); + CFRelease(read_stream); + if (!data) { + return; + } + CFDictionaryRef list = static_cast + (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, + NULL)); + CFRelease(data); + if (!list) { + return; + } + CFStringRef build_version = static_cast + (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); + CFStringRef product_version = static_cast + (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); + string build_str = ConvertToString(build_version); + string product_str = ConvertToString(product_version); + + CFRelease(list); + + strlcpy(build_string_, build_str.c_str(), sizeof(build_string_)); + + // Parse the string that looks like "10.4.8" + os_major_version_ = IntegerValueAtIndex(product_str, 0); + os_minor_version_ = IntegerValueAtIndex(product_str, 1); + os_build_number_ = IntegerValueAtIndex(product_str, 2); +} + +void MinidumpGenerator::SetTaskContext(breakpad_ucontext_t *task_context) { + task_context_ = task_context; +} + +string MinidumpGenerator::UniqueNameInDirectory(const string &dir, + string *unique_name) { + CFUUIDRef uuid = CFUUIDCreate(NULL); + CFStringRef uuid_cfstr = CFUUIDCreateString(NULL, uuid); + CFRelease(uuid); + string file_name(ConvertToString(uuid_cfstr)); + CFRelease(uuid_cfstr); + string path(dir); + + // Ensure that the directory (if non-empty) has a trailing slash so that + // we can append the file name and have a valid pathname. + if (!dir.empty()) { + if (dir.at(dir.size() - 1) != '/') + path.append(1, '/'); + } + + path.append(file_name); + path.append(".dmp"); + + if (unique_name) + *unique_name = file_name; + + return path; +} + +bool MinidumpGenerator::Write(const char *path) { + WriteStreamFN writers[] = { + &MinidumpGenerator::WriteThreadListStream, + &MinidumpGenerator::WriteMemoryListStream, + &MinidumpGenerator::WriteSystemInfoStream, + &MinidumpGenerator::WriteModuleListStream, + &MinidumpGenerator::WriteMiscInfoStream, + &MinidumpGenerator::WriteBreakpadInfoStream, + // Exception stream needs to be the last entry in this array as it may + // be omitted in the case where the minidump is written without an + // exception. + &MinidumpGenerator::WriteExceptionStream, + }; + bool result = false; + + // If opening was successful, create the header, directory, and call each + // writer. The destructor for the TypedMDRVAs will cause the data to be + // flushed. The destructor for the MinidumpFileWriter will close the file. + if (writer_.Open(path)) { + TypedMDRVA header(&writer_); + TypedMDRVA dir(&writer_); + + if (!header.Allocate()) + return false; + + int writer_count = static_cast(sizeof(writers) / sizeof(writers[0])); + + // If we don't have exception information, don't write out the + // exception stream + if (!exception_thread_ && !exception_type_) + --writer_count; + + // Add space for all writers + if (!dir.AllocateArray(writer_count)) + return false; + + MDRawHeader *header_ptr = header.get(); + header_ptr->signature = MD_HEADER_SIGNATURE; + header_ptr->version = MD_HEADER_VERSION; + time(reinterpret_cast(&(header_ptr->time_date_stamp))); + header_ptr->stream_count = writer_count; + header_ptr->stream_directory_rva = dir.position(); + + MDRawDirectory local_dir; + result = true; + for (int i = 0; (result) && (i < writer_count); ++i) { + result = (this->*writers[i])(&local_dir); + + if (result) + dir.CopyIndex(i, &local_dir); + } + } + return result; +} + +size_t MinidumpGenerator::CalculateStackSize(mach_vm_address_t start_addr) { + mach_vm_address_t stack_region_base = start_addr; + mach_vm_size_t stack_region_size; + natural_t nesting_level = 0; + vm_region_submap_info_64 submap_info; + mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; + + vm_region_recurse_info_t region_info; + region_info = reinterpret_cast(&submap_info); + + if (start_addr == 0) { + return 0; + } + + kern_return_t result = + mach_vm_region_recurse(crashing_task_, &stack_region_base, + &stack_region_size, &nesting_level, + region_info, &info_count); + + if (result != KERN_SUCCESS || start_addr < stack_region_base) { + // Failure or stack corruption, since mach_vm_region had to go + // higher in the process address space to find a valid region. + return 0; + } + + unsigned int tag = submap_info.user_tag; + + // If the user tag is VM_MEMORY_STACK, look for more readable regions with + // the same tag placed immediately above the computed stack region. Under + // some circumstances, the stack for thread 0 winds up broken up into + // multiple distinct abutting regions. This can happen for several reasons, + // including user code that calls setrlimit(RLIMIT_STACK, ...) or changes + // the access on stack pages by calling mprotect. + if (tag == VM_MEMORY_STACK) { + while (true) { + mach_vm_address_t next_region_base = stack_region_base + + stack_region_size; + mach_vm_address_t proposed_next_region_base = next_region_base; + mach_vm_size_t next_region_size; + nesting_level = 0; + info_count = VM_REGION_SUBMAP_INFO_COUNT_64; + result = mach_vm_region_recurse(crashing_task_, &next_region_base, + &next_region_size, &nesting_level, + region_info, &info_count); + if (result != KERN_SUCCESS || + next_region_base != proposed_next_region_base || + submap_info.user_tag != tag || + (submap_info.protection & VM_PROT_READ) == 0) { + break; + } + + stack_region_size += next_region_size; + } + } + + return stack_region_base + stack_region_size - start_addr; +} + +bool MinidumpGenerator::WriteStackFromStartAddress( + mach_vm_address_t start_addr, + MDMemoryDescriptor *stack_location) { + UntypedMDRVA memory(&writer_); + + bool result = false; + size_t size = CalculateStackSize(start_addr); + + if (size == 0) { + // In some situations the stack address for the thread can come back 0. + // In these cases we skip over the threads in question and stuff the + // stack with a clearly borked value. + start_addr = 0xDEADBEEF; + size = 16; + if (!memory.Allocate(size)) + return false; + + unsigned long long dummy_stack[2]; // Fill dummy stack with 16 bytes of + // junk. + dummy_stack[0] = 0xDEADBEEF; + dummy_stack[1] = 0xDEADBEEF; + + result = memory.Copy(dummy_stack, size); + } else { + + if (!memory.Allocate(size)) + return false; + + if (dynamic_images_) { + vector stack_memory; + if (ReadTaskMemory(crashing_task_, + start_addr, + size, + stack_memory) != KERN_SUCCESS) { + return false; + } + + result = memory.Copy(&stack_memory[0], size); + } else { + result = memory.Copy(reinterpret_cast(start_addr), size); + } + } + + stack_location->start_of_memory_range = start_addr; + stack_location->memory = memory.location(); + + return result; +} + +bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + return WriteStackARM(state, stack_location); +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: + return WriteStackARM64(state, stack_location); +#endif +#ifdef HAS_PPC_SUPPORT + case CPU_TYPE_POWERPC: + return WriteStackPPC(state, stack_location); + case CPU_TYPE_POWERPC64: + return WriteStackPPC64(state, stack_location); +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + return WriteStackX86(state, stack_location); + case CPU_TYPE_X86_64: + return WriteStackX86_64(state, stack_location); +#endif + default: + return false; + } +} + +bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) { + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + return WriteContextARM(state, register_location); +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: + return WriteContextARM64(state, register_location); +#endif +#ifdef HAS_PPC_SUPPORT + case CPU_TYPE_POWERPC: + return WriteContextPPC(state, register_location); + case CPU_TYPE_POWERPC64: + return WriteContextPPC64(state, register_location); +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + return WriteContextX86(state, register_location); + case CPU_TYPE_X86_64: + return WriteContextX86_64(state, register_location); +#endif + default: + return false; + } +} + +uint64_t MinidumpGenerator::CurrentPCForStack( + breakpad_thread_state_data_t state) { + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + return CurrentPCForStackARM(state); +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: + return CurrentPCForStackARM64(state); +#endif +#ifdef HAS_PPC_SUPPORT + case CPU_TYPE_POWERPC: + return CurrentPCForStackPPC(state); + case CPU_TYPE_POWERPC64: + return CurrentPCForStackPPC64(state); +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + return CurrentPCForStackX86(state); + case CPU_TYPE_X86_64: + return CurrentPCForStackX86_64(state); +#endif + default: + assert(0 && "Unknown CPU type!"); + return 0; + } +} + +#ifdef HAS_ARM_SUPPORT +bool MinidumpGenerator::WriteStackARM(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + arm_thread_state_t *machine_state = + reinterpret_cast(state); + mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, sp); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackARM(breakpad_thread_state_data_t state) { + arm_thread_state_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, pc); +} + +bool MinidumpGenerator::WriteContextARM(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) +{ + TypedMDRVA context(&writer_); + arm_thread_state_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextARM *context_ptr = context.get(); + context_ptr->context_flags = MD_CONTEXT_ARM_FULL; + +#define AddGPR(a) context_ptr->iregs[a] = REGISTER_FROM_THREADSTATE(machine_state, r[a]) + + context_ptr->iregs[13] = REGISTER_FROM_THREADSTATE(machine_state, sp); + context_ptr->iregs[14] = REGISTER_FROM_THREADSTATE(machine_state, lr); + context_ptr->iregs[15] = REGISTER_FROM_THREADSTATE(machine_state, pc); + context_ptr->cpsr = REGISTER_FROM_THREADSTATE(machine_state, cpsr); + + AddGPR(0); + AddGPR(1); + AddGPR(2); + AddGPR(3); + AddGPR(4); + AddGPR(5); + AddGPR(6); + AddGPR(7); + AddGPR(8); + AddGPR(9); + AddGPR(10); + AddGPR(11); + AddGPR(12); +#undef AddGPR + + return true; +} +#endif + +#ifdef HAS_ARM64_SUPPORT +bool MinidumpGenerator::WriteStackARM64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + arm_thread_state64_t *machine_state = + reinterpret_cast(state); + mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, sp); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackARM64(breakpad_thread_state_data_t state) { + arm_thread_state64_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, pc); +} + +bool +MinidumpGenerator::WriteContextARM64(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) +{ + TypedMDRVA context(&writer_); + arm_thread_state64_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextARM64 *context_ptr = context.get(); + context_ptr->context_flags = MD_CONTEXT_ARM64_FULL; + +#define AddGPR(a) context_ptr->iregs[a] = \ + REGISTER_FROM_THREADSTATE(machine_state, x[a]) + + context_ptr->iregs[29] = REGISTER_FROM_THREADSTATE(machine_state, fp); + context_ptr->iregs[30] = REGISTER_FROM_THREADSTATE(machine_state, lr); + context_ptr->iregs[31] = REGISTER_FROM_THREADSTATE(machine_state, sp); + context_ptr->iregs[32] = REGISTER_FROM_THREADSTATE(machine_state, pc); + context_ptr->cpsr = REGISTER_FROM_THREADSTATE(machine_state, cpsr); + + AddGPR(0); + AddGPR(1); + AddGPR(2); + AddGPR(3); + AddGPR(4); + AddGPR(5); + AddGPR(6); + AddGPR(7); + AddGPR(8); + AddGPR(9); + AddGPR(10); + AddGPR(11); + AddGPR(12); + AddGPR(13); + AddGPR(14); + AddGPR(15); + AddGPR(16); + AddGPR(17); + AddGPR(18); + AddGPR(19); + AddGPR(20); + AddGPR(21); + AddGPR(22); + AddGPR(23); + AddGPR(24); + AddGPR(25); + AddGPR(26); + AddGPR(27); + AddGPR(28); +#undef AddGPR + + return true; +} +#endif + +#ifdef HAS_PCC_SUPPORT +bool MinidumpGenerator::WriteStackPPC(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + ppc_thread_state_t *machine_state = + reinterpret_cast(state); + mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +bool MinidumpGenerator::WriteStackPPC64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + ppc_thread_state64_t *machine_state = + reinterpret_cast(state); + mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackPPC(breakpad_thread_state_data_t state) { + ppc_thread_state_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, srr0); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackPPC64(breakpad_thread_state_data_t state) { + ppc_thread_state64_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, srr0); +} + +bool MinidumpGenerator::WriteContextPPC(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) +{ + TypedMDRVA context(&writer_); + ppc_thread_state_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextPPC *context_ptr = context.get(); + context_ptr->context_flags = MD_CONTEXT_PPC_BASE; + +#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, a)) +#define AddGPR(a) context_ptr->gpr[a] = \ + static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, r ## a) + + AddReg(srr0); + AddReg(cr); + AddReg(xer); + AddReg(ctr); + AddReg(lr); + AddReg(vrsave); + + AddGPR(0); + AddGPR(1); + AddGPR(2); + AddGPR(3); + AddGPR(4); + AddGPR(5); + AddGPR(6); + AddGPR(7); + AddGPR(8); + AddGPR(9); + AddGPR(10); + AddGPR(11); + AddGPR(12); + AddGPR(13); + AddGPR(14); + AddGPR(15); + AddGPR(16); + AddGPR(17); + AddGPR(18); + AddGPR(19); + AddGPR(20); + AddGPR(21); + AddGPR(22); + AddGPR(23); + AddGPR(24); + AddGPR(25); + AddGPR(26); + AddGPR(27); + AddGPR(28); + AddGPR(29); + AddGPR(30); + AddGPR(31); + AddReg(mq); +#undef AddReg +#undef AddGPR + + return true; +} + +bool MinidumpGenerator::WriteContextPPC64( + breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) { + TypedMDRVA context(&writer_); + ppc_thread_state64_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextPPC64 *context_ptr = context.get(); + context_ptr->context_flags = MD_CONTEXT_PPC_BASE; + +#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, a)) +#define AddGPR(a) context_ptr->gpr[a] = \ + static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, r ## a) + + AddReg(srr0); + AddReg(cr); + AddReg(xer); + AddReg(ctr); + AddReg(lr); + AddReg(vrsave); + + AddGPR(0); + AddGPR(1); + AddGPR(2); + AddGPR(3); + AddGPR(4); + AddGPR(5); + AddGPR(6); + AddGPR(7); + AddGPR(8); + AddGPR(9); + AddGPR(10); + AddGPR(11); + AddGPR(12); + AddGPR(13); + AddGPR(14); + AddGPR(15); + AddGPR(16); + AddGPR(17); + AddGPR(18); + AddGPR(19); + AddGPR(20); + AddGPR(21); + AddGPR(22); + AddGPR(23); + AddGPR(24); + AddGPR(25); + AddGPR(26); + AddGPR(27); + AddGPR(28); + AddGPR(29); + AddGPR(30); + AddGPR(31); +#undef AddReg +#undef AddGPR + + return true; +} + +#endif + +#ifdef HAS_X86_SUPPORT +bool MinidumpGenerator::WriteStackX86(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + i386_thread_state_t *machine_state = + reinterpret_cast(state); + + mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, esp); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +bool MinidumpGenerator::WriteStackX86_64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location) { + x86_thread_state64_t *machine_state = + reinterpret_cast(state); + + mach_vm_address_t start_addr = static_cast( + REGISTER_FROM_THREADSTATE(machine_state, rsp)); + return WriteStackFromStartAddress(start_addr, stack_location); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackX86(breakpad_thread_state_data_t state) { + i386_thread_state_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, eip); +} + +uint64_t +MinidumpGenerator::CurrentPCForStackX86_64(breakpad_thread_state_data_t state) { + x86_thread_state64_t *machine_state = + reinterpret_cast(state); + + return REGISTER_FROM_THREADSTATE(machine_state, rip); +} + +bool MinidumpGenerator::WriteContextX86(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) +{ + TypedMDRVA context(&writer_); + i386_thread_state_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextX86 *context_ptr = context.get(); + +#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, a)) + + context_ptr->context_flags = MD_CONTEXT_X86; + AddReg(eax); + AddReg(ebx); + AddReg(ecx); + AddReg(edx); + AddReg(esi); + AddReg(edi); + AddReg(ebp); + AddReg(esp); + + AddReg(cs); + AddReg(ds); + AddReg(ss); + AddReg(es); + AddReg(fs); + AddReg(gs); + AddReg(eflags); + + AddReg(eip); +#undef AddReg + + return true; +} + +bool MinidumpGenerator::WriteContextX86_64( + breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location) { + TypedMDRVA context(&writer_); + x86_thread_state64_t *machine_state = + reinterpret_cast(state); + + if (!context.Allocate()) + return false; + + *register_location = context.location(); + MDRawContextAMD64 *context_ptr = context.get(); + +#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ + REGISTER_FROM_THREADSTATE(machine_state, a)) + + context_ptr->context_flags = MD_CONTEXT_AMD64; + AddReg(rax); + AddReg(rbx); + AddReg(rcx); + AddReg(rdx); + AddReg(rdi); + AddReg(rsi); + AddReg(rbp); + AddReg(rsp); + AddReg(r8); + AddReg(r9); + AddReg(r10); + AddReg(r11); + AddReg(r12); + AddReg(r13); + AddReg(r14); + AddReg(r15); + AddReg(rip); + // according to AMD's software developer guide, bits above 18 are + // not used in the flags register. Since the minidump format + // specifies 32 bits for the flags register, we can truncate safely + // with no loss. + context_ptr->eflags = static_cast(REGISTER_FROM_THREADSTATE(machine_state, rflags)); + AddReg(cs); + AddReg(fs); + AddReg(gs); +#undef AddReg + + return true; +} +#endif + +bool MinidumpGenerator::GetThreadState(thread_act_t target_thread, + thread_state_t state, + mach_msg_type_number_t *count) { + if (task_context_ && target_thread == mach_thread_self()) { + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + size_t final_size = + std::min(static_cast(*count), sizeof(arm_thread_state_t)); + memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); + *count = static_cast(final_size); + return true; +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: { + size_t final_size = + std::min(static_cast(*count), sizeof(arm_thread_state64_t)); + memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); + *count = static_cast(final_size); + return true; + } +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + case CPU_TYPE_X86_64: { + size_t state_size = cpu_type_ == CPU_TYPE_I386 ? + sizeof(i386_thread_state_t) : sizeof(x86_thread_state64_t); + size_t final_size = + std::min(static_cast(*count), state_size); + memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); + *count = static_cast(final_size); + return true; + } +#endif + } + } + + thread_state_flavor_t flavor; + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + flavor = ARM_THREAD_STATE; + break; +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: + flavor = ARM_THREAD_STATE64; + break; +#endif +#ifdef HAS_PPC_SUPPORT + case CPU_TYPE_POWERPC: + flavor = PPC_THREAD_STATE; + break; + case CPU_TYPE_POWERPC64: + flavor = PPC_THREAD_STATE64; + break; +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + flavor = i386_THREAD_STATE; + break; + case CPU_TYPE_X86_64: + flavor = x86_THREAD_STATE64; + break; +#endif + default: + return false; + } + return thread_get_state(target_thread, flavor, + state, count) == KERN_SUCCESS; +} + +bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id, + MDRawThread *thread) { + breakpad_thread_state_data_t state; + mach_msg_type_number_t state_count + = static_cast(sizeof(state)); + + if (GetThreadState(thread_id, state, &state_count)) { + if (!WriteStack(state, &thread->stack)) + return false; + + memory_blocks_.push_back(thread->stack); + + if (!WriteContext(state, &thread->thread_context)) + return false; + + thread->thread_id = thread_id; + } else { + return false; + } + + return true; +} + +bool MinidumpGenerator::WriteThreadListStream( + MDRawDirectory *thread_list_stream) { + TypedMDRVA list(&writer_); + thread_act_port_array_t threads_for_task; + mach_msg_type_number_t thread_count; + int non_generator_thread_count; + + if (task_threads(crashing_task_, &threads_for_task, &thread_count)) + return false; + + // Don't include the generator thread + if (handler_thread_ != MACH_PORT_NULL) + non_generator_thread_count = thread_count - 1; + else + non_generator_thread_count = thread_count; + if (!list.AllocateObjectAndArray(non_generator_thread_count, + sizeof(MDRawThread))) + return false; + + thread_list_stream->stream_type = MD_THREAD_LIST_STREAM; + thread_list_stream->location = list.location(); + + list.get()->number_of_threads = non_generator_thread_count; + + MDRawThread thread; + int thread_idx = 0; + + for (unsigned int i = 0; i < thread_count; ++i) { + memset(&thread, 0, sizeof(MDRawThread)); + + if (threads_for_task[i] != handler_thread_) { + if (!WriteThreadStream(threads_for_task[i], &thread)) + return false; + + list.CopyIndexAfterObject(thread_idx++, &thread, sizeof(MDRawThread)); + } + } + + return true; +} + +bool MinidumpGenerator::WriteMemoryListStream( + MDRawDirectory *memory_list_stream) { + TypedMDRVA list(&writer_); + + // If the dump has an exception, include some memory around the + // instruction pointer. + const size_t kIPMemorySize = 256; // bytes + bool have_ip_memory = false; + MDMemoryDescriptor ip_memory_d; + if (exception_thread_ && exception_type_) { + breakpad_thread_state_data_t state; + mach_msg_type_number_t stateCount + = static_cast(sizeof(state)); + + if (GetThreadState(exception_thread_, state, &stateCount)) { + uint64_t ip = CurrentPCForStack(state); + // Bound it to the upper and lower bounds of the region + // it's contained within. If it's not in a known memory region, + // don't bother trying to write it. + mach_vm_address_t addr = static_cast(ip); + mach_vm_size_t size; + natural_t nesting_level = 0; + vm_region_submap_info_64 info; + mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; + vm_region_recurse_info_t recurse_info; + recurse_info = reinterpret_cast(&info); + + kern_return_t ret = + mach_vm_region_recurse(crashing_task_, + &addr, + &size, + &nesting_level, + recurse_info, + &info_count); + if (ret == KERN_SUCCESS && ip >= addr && ip < (addr + size)) { + // Try to get 128 bytes before and after the IP, but + // settle for whatever's available. + ip_memory_d.start_of_memory_range = + std::max(uintptr_t(addr), + uintptr_t(ip - (kIPMemorySize / 2))); + uintptr_t end_of_range = + std::min(uintptr_t(ip + (kIPMemorySize / 2)), + uintptr_t(addr + size)); + uintptr_t range_diff = end_of_range - + static_cast(ip_memory_d.start_of_memory_range); + ip_memory_d.memory.data_size = static_cast(range_diff); + have_ip_memory = true; + // This needs to get appended to the list even though + // the memory bytes aren't filled in yet so the entire + // list can be written first. The memory bytes will get filled + // in after the memory list is written. + memory_blocks_.push_back(ip_memory_d); + } + } + } + + // Now fill in the memory list and write it. + size_t memory_count = memory_blocks_.size(); + if (!list.AllocateObjectAndArray(memory_count, + sizeof(MDMemoryDescriptor))) + return false; + + memory_list_stream->stream_type = MD_MEMORY_LIST_STREAM; + memory_list_stream->location = list.location(); + + list.get()->number_of_memory_ranges = static_cast(memory_count); + + unsigned int i; + for (i = 0; i < memory_count; ++i) { + list.CopyIndexAfterObject(i, &memory_blocks_[i], + sizeof(MDMemoryDescriptor)); + } + + if (have_ip_memory) { + // Now read the memory around the instruction pointer. + UntypedMDRVA ip_memory(&writer_); + if (!ip_memory.Allocate(ip_memory_d.memory.data_size)) + return false; + + if (dynamic_images_) { + // Out-of-process. + vector memory; + if (ReadTaskMemory(crashing_task_, + ip_memory_d.start_of_memory_range, + ip_memory_d.memory.data_size, + memory) != KERN_SUCCESS) { + return false; + } + + ip_memory.Copy(&memory[0], ip_memory_d.memory.data_size); + } else { + // In-process, just copy from local memory. + ip_memory.Copy( + reinterpret_cast(ip_memory_d.start_of_memory_range), + ip_memory_d.memory.data_size); + } + + ip_memory_d.memory = ip_memory.location(); + // Write this again now that the data location is filled in. + list.CopyIndexAfterObject(i - 1, &ip_memory_d, + sizeof(MDMemoryDescriptor)); + } + + return true; +} + +bool +MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) { + TypedMDRVA exception(&writer_); + + if (!exception.Allocate()) + return false; + + exception_stream->stream_type = MD_EXCEPTION_STREAM; + exception_stream->location = exception.location(); + MDRawExceptionStream *exception_ptr = exception.get(); + exception_ptr->thread_id = exception_thread_; + + // This naming is confusing, but it is the proper translation from + // mach naming to minidump naming. + exception_ptr->exception_record.exception_code = exception_type_; + exception_ptr->exception_record.exception_flags = exception_code_; + + breakpad_thread_state_data_t state; + mach_msg_type_number_t state_count + = static_cast(sizeof(state)); + + if (!GetThreadState(exception_thread_, state, &state_count)) + return false; + + if (!WriteContext(state, &exception_ptr->thread_context)) + return false; + + if (exception_type_ == EXC_BAD_ACCESS) + exception_ptr->exception_record.exception_address = exception_subcode_; + else + exception_ptr->exception_record.exception_address = CurrentPCForStack(state); + + return true; +} + +bool MinidumpGenerator::WriteSystemInfoStream( + MDRawDirectory *system_info_stream) { + TypedMDRVA info(&writer_); + + if (!info.Allocate()) + return false; + + system_info_stream->stream_type = MD_SYSTEM_INFO_STREAM; + system_info_stream->location = info.location(); + + // CPU Information + uint32_t number_of_processors; + size_t len = sizeof(number_of_processors); + sysctlbyname("hw.ncpu", &number_of_processors, &len, NULL, 0); + MDRawSystemInfo *info_ptr = info.get(); + + switch (cpu_type_) { +#ifdef HAS_ARM_SUPPORT + case CPU_TYPE_ARM: + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_ARM; + break; +#endif +#ifdef HAS_ARM64_SUPPORT + case CPU_TYPE_ARM64: + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_ARM64; + break; +#endif +#ifdef HAS_PPC_SUPPORT + case CPU_TYPE_POWERPC: + case CPU_TYPE_POWERPC64: + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_PPC; + break; +#endif +#ifdef HAS_X86_SUPPORT + case CPU_TYPE_I386: + case CPU_TYPE_X86_64: + if (cpu_type_ == CPU_TYPE_I386) + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; + else + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_AMD64; +#ifdef __i386__ + // ebx is used for PIC code, so we need + // to preserve it. +#define cpuid(op,eax,ebx,ecx,edx) \ + asm ("pushl %%ebx \n\t" \ + "cpuid \n\t" \ + "movl %%ebx,%1 \n\t" \ + "popl %%ebx" \ + : "=a" (eax), \ + "=g" (ebx), \ + "=c" (ecx), \ + "=d" (edx) \ + : "0" (op)) +#elif defined(__x86_64__) + +#define cpuid(op,eax,ebx,ecx,edx) \ + asm ("cpuid \n\t" \ + : "=a" (eax), \ + "=b" (ebx), \ + "=c" (ecx), \ + "=d" (edx) \ + : "0" (op)) +#endif + +#if defined(__i386__) || defined(__x86_64__) + int unused, unused2; + // get vendor id + cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], + info_ptr->cpu.x86_cpu_info.vendor_id[2], + info_ptr->cpu.x86_cpu_info.vendor_id[1]); + // get version and feature info + cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, + info_ptr->cpu.x86_cpu_info.feature_information); + + // family + info_ptr->processor_level = + (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; + // 0xMMSS (Model, Stepping) + info_ptr->processor_revision = static_cast( + (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | + ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4)); + + // decode extended model info + if (info_ptr->processor_level == 0xF || + info_ptr->processor_level == 0x6) { + info_ptr->processor_revision |= + ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4); + } + + // decode extended family info + if (info_ptr->processor_level == 0xF) { + info_ptr->processor_level += + ((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20); + } + +#endif // __i386__ || __x86_64_ + break; +#endif // HAS_X86_SUPPORT + default: + info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; + break; + } + + info_ptr->number_of_processors = static_cast(number_of_processors); +#if TARGET_OS_IPHONE + info_ptr->platform_id = MD_OS_IOS; +#else + info_ptr->platform_id = MD_OS_MAC_OS_X; +#endif // TARGET_OS_IPHONE + + MDLocationDescriptor build_string_loc; + + if (!writer_.WriteString(build_string_, 0, + &build_string_loc)) + return false; + + info_ptr->csd_version_rva = build_string_loc.rva; + info_ptr->major_version = os_major_version_; + info_ptr->minor_version = os_minor_version_; + info_ptr->build_number = os_build_number_; + + return true; +} + +bool MinidumpGenerator::WriteModuleStream(unsigned int index, + MDRawModule *module) { + if (dynamic_images_) { + // we're in a different process than the crashed process + DynamicImage *image = dynamic_images_->GetImage(index); + + if (!image) + return false; + + memset(module, 0, sizeof(MDRawModule)); + + MDLocationDescriptor string_location; + + string name = image->GetFilePath(); + if (!writer_.WriteString(name.c_str(), 0, &string_location)) + return false; + + module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); + module->size_of_image = static_cast(image->GetVMSize()); + module->module_name_rva = string_location.rva; + + // We'll skip the executable module, because they don't have + // LC_ID_DYLIB load commands, and the crash processing server gets + // version information from the Plist file, anyway. + if (index != static_cast(FindExecutableModule())) { + module->version_info.signature = MD_VSFIXEDFILEINFO_SIGNATURE; + module->version_info.struct_version |= MD_VSFIXEDFILEINFO_VERSION; + // Convert MAC dylib version format, which is a 32 bit number, to the + // format used by minidump. The mac format is <16 bits>.<8 bits>.<8 bits> + // so it fits nicely into the windows version with some massaging + // The mapping is: + // 1) upper 16 bits of MAC version go to lower 16 bits of product HI + // 2) Next most significant 8 bits go to upper 16 bits of product LO + // 3) Least significant 8 bits go to lower 16 bits of product LO + uint32_t modVersion = image->GetVersion(); + module->version_info.file_version_hi = 0; + module->version_info.file_version_hi = modVersion >> 16; + module->version_info.file_version_lo |= (modVersion & 0xff00) << 8; + module->version_info.file_version_lo |= (modVersion & 0xff); + } + + if (!WriteCVRecord(module, image->GetCPUType(), name.c_str(), false)) { + return false; + } + } else { + // Getting module info in the crashed process + const breakpad_mach_header *header; + header = (breakpad_mach_header*)_dyld_get_image_header(index); + if (!header) + return false; + +#ifdef __LP64__ + assert(header->magic == MH_MAGIC_64); + + if(header->magic != MH_MAGIC_64) + return false; +#else + assert(header->magic == MH_MAGIC); + + if(header->magic != MH_MAGIC) + return false; +#endif + + int cpu_type = header->cputype; + unsigned long slide = _dyld_get_image_vmaddr_slide(index); + const char* name = _dyld_get_image_name(index); + const struct load_command *cmd = + reinterpret_cast(header + 1); + + memset(module, 0, sizeof(MDRawModule)); + + for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { + if (cmd->cmd == LC_SEGMENT_ARCH) { + + const breakpad_mach_segment_command *seg = + reinterpret_cast(cmd); + + if (!strcmp(seg->segname, "__TEXT")) { + MDLocationDescriptor string_location; + + if (!writer_.WriteString(name, 0, &string_location)) + return false; + + module->base_of_image = seg->vmaddr + slide; + module->size_of_image = static_cast(seg->vmsize); + module->module_name_rva = string_location.rva; + + bool in_memory = false; +#if TARGET_OS_IPHONE + in_memory = true; +#endif + if (!WriteCVRecord(module, cpu_type, name, in_memory)) + return false; + + return true; + } + } + + cmd = reinterpret_cast((char *)cmd + cmd->cmdsize); + } + } + + return true; +} + +int MinidumpGenerator::FindExecutableModule() { + if (dynamic_images_) { + int index = dynamic_images_->GetExecutableImageIndex(); + + if (index >= 0) { + return index; + } + } else { + int image_count = _dyld_image_count(); + const struct mach_header *header; + + for (int index = 0; index < image_count; ++index) { + header = _dyld_get_image_header(index); + + if (header->filetype == MH_EXECUTE) + return index; + } + } + + // failed - just use the first image + return 0; +} + +bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, + const char *module_path, bool in_memory) { + TypedMDRVA cv(&writer_); + + // Only return the last path component of the full module path + const char *module_name = strrchr(module_path, '/'); + + // Increment past the slash + if (module_name) + ++module_name; + else + module_name = ""; + + size_t module_name_length = strlen(module_name); + + if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(uint8_t))) + return false; + + if (!cv.CopyIndexAfterObject(0, module_name, module_name_length)) + return false; + + module->cv_record = cv.location(); + MDCVInfoPDB70 *cv_ptr = cv.get(); + cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; + cv_ptr->age = 0; + + // Get the module identifier + unsigned char identifier[16]; + bool result = false; + if (in_memory) { + MacFileUtilities::MachoID macho(module_path, + reinterpret_cast(module->base_of_image), + static_cast(module->size_of_image)); + result = macho.UUIDCommand(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); + if (!result) + result = macho.MD5(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); + } + + if (!result) { + FileID file_id(module_path); + result = file_id.MachoIdentifier(cpu_type, CPU_SUBTYPE_MULTIPLE, + identifier); + } + + if (result) { + cv_ptr->signature.data1 = + static_cast(identifier[0]) << 24 | + static_cast(identifier[1]) << 16 | + static_cast(identifier[2]) << 8 | + static_cast(identifier[3]); + cv_ptr->signature.data2 = + static_cast(identifier[4] << 8) | identifier[5]; + cv_ptr->signature.data3 = + static_cast(identifier[6] << 8) | identifier[7]; + cv_ptr->signature.data4[0] = identifier[8]; + cv_ptr->signature.data4[1] = identifier[9]; + cv_ptr->signature.data4[2] = identifier[10]; + cv_ptr->signature.data4[3] = identifier[11]; + cv_ptr->signature.data4[4] = identifier[12]; + cv_ptr->signature.data4[5] = identifier[13]; + cv_ptr->signature.data4[6] = identifier[14]; + cv_ptr->signature.data4[7] = identifier[15]; + } + + return true; +} + +bool MinidumpGenerator::WriteModuleListStream( + MDRawDirectory *module_list_stream) { + TypedMDRVA list(&writer_); + + uint32_t image_count = dynamic_images_ ? + dynamic_images_->GetImageCount() : + _dyld_image_count(); + + if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) + return false; + + module_list_stream->stream_type = MD_MODULE_LIST_STREAM; + module_list_stream->location = list.location(); + list.get()->number_of_modules = static_cast(image_count); + + // Write out the executable module as the first one + MDRawModule module; + uint32_t executableIndex = FindExecutableModule(); + + if (!WriteModuleStream(static_cast(executableIndex), &module)) { + return false; + } + + list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); + int destinationIndex = 1; // Write all other modules after this one + + for (uint32_t i = 0; i < image_count; ++i) { + if (i != executableIndex) { + if (!WriteModuleStream(static_cast(i), &module)) { + return false; + } + + list.CopyIndexAfterObject(destinationIndex++, &module, MD_MODULE_SIZE); + } + } + + return true; +} + +bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { + TypedMDRVA info(&writer_); + + if (!info.Allocate()) + return false; + + misc_info_stream->stream_type = MD_MISC_INFO_STREAM; + misc_info_stream->location = info.location(); + + MDRawMiscInfo *info_ptr = info.get(); + info_ptr->size_of_info = static_cast(sizeof(MDRawMiscInfo)); + info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID | + MD_MISCINFO_FLAGS1_PROCESS_TIMES | + MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO; + + // Process ID + info_ptr->process_id = getpid(); + + // Times + struct rusage usage; + if (getrusage(RUSAGE_SELF, &usage) != -1) { + // Omit the fractional time since the MDRawMiscInfo only wants seconds + info_ptr->process_user_time = + static_cast(usage.ru_utime.tv_sec); + info_ptr->process_kernel_time = + static_cast(usage.ru_stime.tv_sec); + } + int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, + static_cast(info_ptr->process_id) }; + uint mibsize = static_cast(sizeof(mib) / sizeof(mib[0])); + struct kinfo_proc proc; + size_t size = sizeof(proc); + if (sysctl(mib, mibsize, &proc, &size, NULL, 0) == 0) { + info_ptr->process_create_time = + static_cast(proc.kp_proc.p_starttime.tv_sec); + } + + // Speed + uint64_t speed; + const uint64_t kOneMillion = 1000 * 1000; + size = sizeof(speed); + sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); + info_ptr->processor_max_mhz = static_cast(speed / kOneMillion); + info_ptr->processor_mhz_limit = static_cast(speed / kOneMillion); + size = sizeof(speed); + sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); + info_ptr->processor_current_mhz = static_cast(speed / kOneMillion); + + return true; +} + +bool MinidumpGenerator::WriteBreakpadInfoStream( + MDRawDirectory *breakpad_info_stream) { + TypedMDRVA info(&writer_); + + if (!info.Allocate()) + return false; + + breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM; + breakpad_info_stream->location = info.location(); + MDRawBreakpadInfo *info_ptr = info.get(); + + if (exception_thread_ && exception_type_) { + info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | + MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; + info_ptr->dump_thread_id = handler_thread_; + info_ptr->requesting_thread_id = exception_thread_; + } else { + info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; + info_ptr->dump_thread_id = handler_thread_; + info_ptr->requesting_thread_id = 0; + } + + return true; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h new file mode 100644 index 00000000000000..4e4b4a68488332 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h @@ -0,0 +1,236 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// minidump_generator.h: Create a minidump of the current MacOS process. + +#ifndef CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ +#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ + +#include +#include + +#include + +#include "client/mac/handler/ucontext_compat.h" +#include "client/minidump_file_writer.h" +#include "common/memory.h" +#include "common/mac/macho_utilities.h" +#include "google_breakpad/common/minidump_format.h" + +#include "dynamic_images.h" +#include "mach_vm_compat.h" + +#if !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) + #define HAS_PPC_SUPPORT +#endif +#if defined(__arm__) +#define HAS_ARM_SUPPORT +#elif defined(__aarch64__) +#define HAS_ARM64_SUPPORT +#elif defined(__i386__) || defined(__x86_64__) + #define HAS_X86_SUPPORT +#endif + +namespace google_breakpad { + +using std::string; + +// Use the REGISTER_FROM_THREADSTATE to access a register name from the +// breakpad_thread_state_t structure. +#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64 || TARGET_CPU_ARM +// In The 10.5 SDK Headers Apple prepended __ to the variable names in the +// i386_thread_state_t structure. There's no good way to tell what version of +// the SDK we're compiling against so we just toggle on the same preprocessor +// symbol Apple's headers use. +#define REGISTER_FROM_THREADSTATE(a, b) ((a)->__ ## b) +#else +#define REGISTER_FROM_THREADSTATE(a, b) (a->b) +#endif + +// Creates a minidump file of the current process. If there is exception data, +// use SetExceptionInformation() to add this to the minidump. The minidump +// file is generated by the Write() function. +// Usage: +// MinidumpGenerator minidump(); +// minidump.Write("/tmp/minidump"); +// +class MinidumpGenerator { + public: + MinidumpGenerator(); + MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread); + + virtual ~MinidumpGenerator(); + + // Return /.dmp + // Sets |unique_name| (if requested) to the unique name for the minidump + static string UniqueNameInDirectory(const string &dir, string *unique_name); + + // Write out the minidump into |path| + // All of the components of |path| must exist and be writable + // Return true if successful, false otherwise + bool Write(const char *path); + + // Specify some exception information, if applicable + void SetExceptionInformation(int type, int code, int subcode, + mach_port_t thread_name) { + exception_type_ = type; + exception_code_ = code; + exception_subcode_ = subcode; + exception_thread_ = thread_name; + } + + // Specify the task context. If |task_context| is not NULL, it will be used + // to retrieve the context of the current thread, instead of using + // |thread_get_state|. + void SetTaskContext(breakpad_ucontext_t *task_context); + + // Gather system information. This should be call at least once before using + // the MinidumpGenerator class. + static void GatherSystemInformation(); + + protected: + // Overridable Stream writers + virtual bool WriteExceptionStream(MDRawDirectory *exception_stream); + + // Overridable Helper + virtual bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread); + + private: + typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *); + + // Stream writers + bool WriteThreadListStream(MDRawDirectory *thread_list_stream); + bool WriteMemoryListStream(MDRawDirectory *memory_list_stream); + bool WriteSystemInfoStream(MDRawDirectory *system_info_stream); + bool WriteModuleListStream(MDRawDirectory *module_list_stream); + bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream); + bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); + + // Helpers + uint64_t CurrentPCForStack(breakpad_thread_state_data_t state); + bool GetThreadState(thread_act_t target_thread, thread_state_t state, + mach_msg_type_number_t *count); + bool WriteStackFromStartAddress(mach_vm_address_t start_addr, + MDMemoryDescriptor *stack_location); + bool WriteStack(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContext(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + bool WriteCVRecord(MDRawModule *module, int cpu_type, + const char *module_path, bool in_memory); + bool WriteModuleStream(unsigned int index, MDRawModule *module); + size_t CalculateStackSize(mach_vm_address_t start_addr); + int FindExecutableModule(); + + // Per-CPU implementations of these methods +#ifdef HAS_ARM_SUPPORT + bool WriteStackARM(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextARM(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackARM(breakpad_thread_state_data_t state); +#endif +#ifdef HAS_ARM64_SUPPORT + bool WriteStackARM64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextARM64(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackARM64(breakpad_thread_state_data_t state); +#endif +#ifdef HAS_PPC_SUPPORT + bool WriteStackPPC(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextPPC(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state); + bool WriteStackPPC64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextPPC64(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); +#endif +#ifdef HAS_X86_SUPPORT + bool WriteStackX86(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextX86(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackX86(breakpad_thread_state_data_t state); + bool WriteStackX86_64(breakpad_thread_state_data_t state, + MDMemoryDescriptor *stack_location); + bool WriteContextX86_64(breakpad_thread_state_data_t state, + MDLocationDescriptor *register_location); + uint64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state); +#endif + + // disallow copy ctor and operator= + explicit MinidumpGenerator(const MinidumpGenerator &); + void operator=(const MinidumpGenerator &); + + protected: + // Use this writer to put the data to disk + MinidumpFileWriter writer_; + + private: + // Exception information + int exception_type_; + int exception_code_; + int exception_subcode_; + mach_port_t exception_thread_; + mach_port_t crashing_task_; + mach_port_t handler_thread_; + + // CPU type of the task being dumped. + cpu_type_t cpu_type_; + + // System information + static char build_string_[16]; + static int os_major_version_; + static int os_minor_version_; + static int os_build_number_; + + // Context of the task to dump. + breakpad_ucontext_t *task_context_; + + // Information about dynamically loaded code + DynamicImages *dynamic_images_; + + // PageAllocator makes it possible to allocate memory + // directly from the system, even while handling an exception. + mutable PageAllocator allocator_; + + protected: + // Blocks of memory written to the dump. These are all currently + // written while writing the thread list stream, but saved here + // so a memory list stream can be written afterwards. + wasteful_vector memory_blocks_; +}; + +} // namespace google_breakpad + +#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h b/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h new file mode 100644 index 00000000000000..1e4b752e514f17 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h @@ -0,0 +1,47 @@ +// Copyright 2013 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ +#define CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ + +#include + +// The purpose of this file is to work around the fact that ucontext_t's +// uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64. +#if defined(__aarch64__) +// doesn't include the below file. +#include +typedef ucontext64_t breakpad_ucontext_t; +#define breakpad_uc_mcontext uc_mcontext64 +#else +typedef ucontext_t breakpad_ucontext_t; +#define breakpad_uc_mcontext uc_mcontext +#endif // defined(__aarch64__) + +#endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h b/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h new file mode 100644 index 00000000000000..0e12e00b69e6be --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h @@ -0,0 +1,97 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// minidump_file_writer-inl.h: Minidump file writer implementation. +// +// See minidump_file_writer.h for documentation. + +#ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ +#define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ + +#include + +#include "client/minidump_file_writer.h" +#include "google_breakpad/common/minidump_size.h" + +namespace google_breakpad { + +template +inline bool TypedMDRVA::Allocate() { + allocation_state_ = SINGLE_OBJECT; + return UntypedMDRVA::Allocate(minidump_size::size()); +} + +template +inline bool TypedMDRVA::Allocate(size_t additional) { + allocation_state_ = SINGLE_OBJECT; + return UntypedMDRVA::Allocate(minidump_size::size() + additional); +} + +template +inline bool TypedMDRVA::AllocateArray(size_t count) { + assert(count); + allocation_state_ = ARRAY; + return UntypedMDRVA::Allocate(minidump_size::size() * count); +} + +template +inline bool TypedMDRVA::AllocateObjectAndArray(size_t count, + size_t length) { + assert(count && length); + allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; + return UntypedMDRVA::Allocate(minidump_size::size() + count * length); +} + +template +inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { + assert(allocation_state_ == ARRAY); + return writer_->Copy( + static_cast(position_ + index * minidump_size::size()), + item, minidump_size::size()); +} + +template +inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, + const void *src, + size_t length) { + assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); + return writer_->Copy( + static_cast(position_ + minidump_size::size() + + index * length), + src, length); +} + +template +inline bool TypedMDRVA::Flush() { + return writer_->Copy(position_, &data_, minidump_size::size()); +} + +} // namespace google_breakpad + +#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc new file mode 100644 index 00000000000000..a1957f324a9c7f --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc @@ -0,0 +1,350 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// minidump_file_writer.cc: Minidump file writer implementation. +// +// See minidump_file_writer.h for documentation. + +#include +#include +#include +#include +#include + +#include "client/minidump_file_writer-inl.h" +#include "common/linux/linux_libc_support.h" +#include "common/string_conversion.h" +#if defined(__linux__) && __linux__ +#include "third_party/lss/linux_syscall_support.h" +#endif + +#if defined(__ANDROID__) +#include + +namespace { + +bool g_need_ftruncate_workaround = false; +bool g_checked_need_ftruncate_workaround = false; + +void CheckNeedsFTruncateWorkAround(int file) { + if (g_checked_need_ftruncate_workaround) { + return; + } + g_checked_need_ftruncate_workaround = true; + + // Attempt an idempotent truncate that chops off nothing and see if we + // run into any sort of errors. + off_t offset = sys_lseek(file, 0, SEEK_END); + if (offset == -1) { + // lseek failed. Don't apply work around. It's unlikely that we can write + // to a minidump with either method. + return; + } + + int result = ftruncate(file, offset); + if (result == -1 && errno == EACCES) { + // It very likely that we are running into the kernel bug in M devices. + // We are going to deploy the workaround for writing minidump files + // without uses of ftruncate(). This workaround should be fine even + // for kernels without the bug. + // See http://crbug.com/542840 for more details. + g_need_ftruncate_workaround = true; + } +} + +bool NeedsFTruncateWorkAround() { + return g_need_ftruncate_workaround; +} + +} // namespace +#endif // defined(__ANDROID__) + +namespace google_breakpad { + +const MDRVA MinidumpFileWriter::kInvalidMDRVA = static_cast(-1); + +MinidumpFileWriter::MinidumpFileWriter() + : file_(-1), + close_file_when_destroyed_(true), + position_(0), + size_(0) { +} + +MinidumpFileWriter::~MinidumpFileWriter() { + if (close_file_when_destroyed_) + Close(); +} + +bool MinidumpFileWriter::Open(const char *path) { + assert(file_ == -1); +#if defined(__linux__) && __linux__ + file_ = sys_open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); +#else + file_ = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); +#endif + + return file_ != -1; +} + +void MinidumpFileWriter::SetFile(const int file) { + assert(file_ == -1); + file_ = file; + close_file_when_destroyed_ = false; +#if defined(__ANDROID__) + CheckNeedsFTruncateWorkAround(file); +#endif +} + +bool MinidumpFileWriter::Close() { + bool result = true; + + if (file_ != -1) { +#if defined(__ANDROID__) + if (!NeedsFTruncateWorkAround() && ftruncate(file_, position_)) { + return false; + } +#else + if (ftruncate(file_, position_)) { + return false; + } +#endif +#if defined(__linux__) && __linux__ + result = (sys_close(file_) == 0); +#else + result = (close(file_) == 0); +#endif + file_ = -1; + } + + return result; +} + +bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, + unsigned int length, + TypedMDRVA *mdstring) { + bool result = true; + if (sizeof(wchar_t) == sizeof(uint16_t)) { + // Shortcut if wchar_t is the same size as MDString's buffer + result = mdstring->Copy(str, mdstring->get()->length); + } else { + uint16_t out[2]; + int out_idx = 0; + + // Copy the string character by character + while (length && result) { + UTF32ToUTF16Char(*str, out); + if (!out[0]) + return false; + + // Process one character at a time + --length; + ++str; + + // Append the one or two UTF-16 characters. The first one will be non- + // zero, but the second one may be zero, depending on the conversion from + // UTF-32. + int out_count = out[1] ? 2 : 1; + size_t out_size = sizeof(uint16_t) * out_count; + result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); + out_idx += out_count; + } + } + return result; +} + +bool MinidumpFileWriter::CopyStringToMDString(const char *str, + unsigned int length, + TypedMDRVA *mdstring) { + bool result = true; + uint16_t out[2]; + int out_idx = 0; + + // Copy the string character by character + while (length && result) { + int conversion_count = UTF8ToUTF16Char(str, length, out); + if (!conversion_count) + return false; + + // Move the pointer along based on the nubmer of converted characters + length -= conversion_count; + str += conversion_count; + + // Append the one or two UTF-16 characters + int out_count = out[1] ? 2 : 1; + size_t out_size = sizeof(uint16_t) * out_count; + result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); + out_idx += out_count; + } + return result; +} + +template +bool MinidumpFileWriter::WriteStringCore(const CharType *str, + unsigned int length, + MDLocationDescriptor *location) { + assert(str); + assert(location); + // Calculate the mdstring length by either limiting to |length| as passed in + // or by finding the location of the NULL character. + unsigned int mdstring_length = 0; + if (!length) + length = INT_MAX; + for (; mdstring_length < length && str[mdstring_length]; ++mdstring_length) + ; + + // Allocate the string buffer + TypedMDRVA mdstring(this); + if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(uint16_t))) + return false; + + // Set length excluding the NULL and copy the string + mdstring.get()->length = + static_cast(mdstring_length * sizeof(uint16_t)); + bool result = CopyStringToMDString(str, mdstring_length, &mdstring); + + // NULL terminate + if (result) { + uint16_t ch = 0; + result = mdstring.CopyIndexAfterObject(mdstring_length, &ch, sizeof(ch)); + + if (result) + *location = mdstring.location(); + } + + return result; +} + +bool MinidumpFileWriter::WriteString(const wchar_t *str, unsigned int length, + MDLocationDescriptor *location) { + return WriteStringCore(str, length, location); +} + +bool MinidumpFileWriter::WriteString(const char *str, unsigned int length, + MDLocationDescriptor *location) { + return WriteStringCore(str, length, location); +} + +bool MinidumpFileWriter::WriteMemory(const void *src, size_t size, + MDMemoryDescriptor *output) { + assert(src); + assert(output); + UntypedMDRVA mem(this); + + if (!mem.Allocate(size)) + return false; + if (!mem.Copy(src, mem.size())) + return false; + + output->start_of_memory_range = reinterpret_cast(src); + output->memory = mem.location(); + + return true; +} + +MDRVA MinidumpFileWriter::Allocate(size_t size) { + assert(size); + assert(file_ != -1); +#if defined(__ANDROID__) + if (NeedsFTruncateWorkAround()) { + // If ftruncate() is not available. We simply increase the size beyond the + // current file size. sys_write() will expand the file when data is written + // to it. Because we did not over allocate to fit memory pages, we also + // do not need to ftruncate() the file once we are done. + size_ += size; + + // We don't need to seek since the file is unchanged. + MDRVA current_position = position_; + position_ += static_cast(size); + return current_position; + } +#endif + size_t aligned_size = (size + 7) & ~7; // 64-bit alignment + + if (position_ + aligned_size > size_) { + size_t growth = aligned_size; + size_t minimal_growth = getpagesize(); + + // Ensure that the file grows by at least the size of a memory page + if (growth < minimal_growth) + growth = minimal_growth; + + size_t new_size = size_ + growth; + if (ftruncate(file_, new_size) != 0) + return kInvalidMDRVA; + + size_ = new_size; + } + + MDRVA current_position = position_; + position_ += static_cast(aligned_size); + + return current_position; +} + +bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { + assert(src); + assert(size); + assert(file_ != -1); + + // Ensure that the data will fit in the allocated space + if (static_cast(size + position) > size_) + return false; + + // Seek and write the data +#if defined(__linux__) && __linux__ + if (sys_lseek(file_, position, SEEK_SET) == static_cast(position)) { + if (sys_write(file_, src, size) == size) { + return true; + } + } +#else + if (lseek(file_, position, SEEK_SET) == static_cast(position)) { + if (write(file_, src, size) == size) { + return true; + } + } +#endif + return false; +} + +bool UntypedMDRVA::Allocate(size_t size) { + assert(size_ == 0); + size_ = size; + position_ = writer_->Allocate(size_); + return position_ != MinidumpFileWriter::kInvalidMDRVA; +} + +bool UntypedMDRVA::Copy(MDRVA pos, const void *src, size_t size) { + assert(src); + assert(size); + assert(pos + size <= position_ + size_); + return writer_->Copy(pos, src, size); +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h new file mode 100644 index 00000000000000..ce32b6d0879f8e --- /dev/null +++ b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h @@ -0,0 +1,272 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// minidump_file_writer.h: Implements file-based minidump generation. It's +// intended to be used with the Google Breakpad open source crash handling +// project. + +#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ +#define CLIENT_MINIDUMP_FILE_WRITER_H__ + +#include + +#include "google_breakpad/common/minidump_format.h" + +namespace google_breakpad { + +class UntypedMDRVA; +template class TypedMDRVA; + +// The user of this class can Open() a file and add minidump streams, data, and +// strings using the definitions in minidump_format.h. Since this class is +// expected to be used in a situation where the current process may be +// damaged, it will not allocate heap memory. +// Sample usage: +// MinidumpFileWriter writer; +// writer.Open("/tmp/minidump.dmp"); +// TypedMDRVA header(&writer_); +// header.Allocate(); +// header->get()->signature = MD_HEADER_SIGNATURE; +// : +// writer.Close(); +// +// An alternative is to use SetFile and provide a file descriptor: +// MinidumpFileWriter writer; +// writer.SetFile(minidump_fd); +// TypedMDRVA header(&writer_); +// header.Allocate(); +// header->get()->signature = MD_HEADER_SIGNATURE; +// : +// writer.Close(); + +class MinidumpFileWriter { +public: + // Invalid MDRVA (Minidump Relative Virtual Address) + // returned on failed allocation + static const MDRVA kInvalidMDRVA; + + MinidumpFileWriter(); + ~MinidumpFileWriter(); + + // Open |path| as the destination of the minidump data. If |path| already + // exists, then Open() will fail. + // Return true on success, or false on failure. + bool Open(const char *path); + + // Sets the file descriptor |file| as the destination of the minidump data. + // Can be used as an alternative to Open() when a file descriptor is + // available. + // Note that |fd| is not closed when the instance of MinidumpFileWriter is + // destroyed. + void SetFile(const int file); + + // Close the current file (that was either created when Open was called, or + // specified with SetFile). + // Return true on success, or false on failure. + bool Close(); + + // Copy the contents of |str| to a MDString and write it to the file. + // |str| is expected to be either UTF-16 or UTF-32 depending on the size + // of wchar_t. + // Maximum |length| of characters to copy from |str|, or specify 0 to use the + // entire NULL terminated string. Copying will stop at the first NULL. + // |location| the allocated location + // Return true on success, or false on failure + bool WriteString(const wchar_t *str, unsigned int length, + MDLocationDescriptor *location); + + // Same as above, except with |str| as a UTF-8 string + bool WriteString(const char *str, unsigned int length, + MDLocationDescriptor *location); + + // Write |size| bytes starting at |src| into the current position. + // Return true on success and set |output| to position, or false on failure + bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output); + + // Copies |size| bytes from |src| to |position| + // Return true on success, or false on failure + bool Copy(MDRVA position, const void *src, ssize_t size); + + // Return the current position for writing to the minidump + inline MDRVA position() const { return position_; } + + private: + friend class UntypedMDRVA; + + // Allocates an area of |size| bytes. + // Returns the position of the allocation, or kInvalidMDRVA if it was + // unable to allocate the bytes. + MDRVA Allocate(size_t size); + + // The file descriptor for the output file. + int file_; + + // Whether |file_| should be closed when the instance is destroyed. + bool close_file_when_destroyed_; + + // Current position in buffer + MDRVA position_; + + // Current allocated size + size_t size_; + + // Copy |length| characters from |str| to |mdstring|. These are distinct + // because the underlying MDString is a UTF-16 based string. The wchar_t + // variant may need to create a MDString that has more characters than the + // source |str|, whereas the UTF-8 variant may coalesce characters to form + // a single UTF-16 character. + bool CopyStringToMDString(const wchar_t *str, unsigned int length, + TypedMDRVA *mdstring); + bool CopyStringToMDString(const char *str, unsigned int length, + TypedMDRVA *mdstring); + + // The common templated code for writing a string + template + bool WriteStringCore(const CharType *str, unsigned int length, + MDLocationDescriptor *location); +}; + +// Represents an untyped allocated chunk +class UntypedMDRVA { + public: + explicit UntypedMDRVA(MinidumpFileWriter *writer) + : writer_(writer), + position_(writer->position()), + size_(0) {} + + // Allocates |size| bytes. Must not call more than once. + // Return true on success, or false on failure + bool Allocate(size_t size); + + // Returns the current position or kInvalidMDRVA if allocation failed + inline MDRVA position() const { return position_; } + + // Number of bytes allocated + inline size_t size() const { return size_; } + + // Return size and position + inline MDLocationDescriptor location() const { + MDLocationDescriptor location = { static_cast(size_), + position_ }; + return location; + } + + // Copy |size| bytes starting at |src| into the minidump at |position| + // Return true on success, or false on failure + bool Copy(MDRVA position, const void *src, size_t size); + + // Copy |size| bytes from |src| to the current position + inline bool Copy(const void *src, size_t size) { + return Copy(position_, src, size); + } + + protected: + // Writer we associate with + MinidumpFileWriter *writer_; + + // Position of the start of the data + MDRVA position_; + + // Allocated size + size_t size_; +}; + +// Represents a Minidump object chunk. Additional memory can be allocated at +// the end of the object as a: +// - single allocation +// - Array of MDType objects +// - A MDType object followed by an array +template +class TypedMDRVA : public UntypedMDRVA { + public: + // Constructs an unallocated MDRVA + explicit TypedMDRVA(MinidumpFileWriter *writer) + : UntypedMDRVA(writer), + data_(), + allocation_state_(UNALLOCATED) {} + + inline ~TypedMDRVA() { + // Ensure that the data_ object is written out + if (allocation_state_ != ARRAY) + Flush(); + } + + // Address of object data_ of MDType. This is not declared const as the + // typical usage will be to access the underlying |data_| object as to + // alter its contents. + MDType *get() { return &data_; } + + // Allocates minidump_size::size() bytes. + // Must not call more than once. + // Return true on success, or false on failure + bool Allocate(); + + // Allocates minidump_size::size() + |additional| bytes. + // Must not call more than once. + // Return true on success, or false on failure + bool Allocate(size_t additional); + + // Allocate an array of |count| elements of MDType. + // Must not call more than once. + // Return true on success, or false on failure + bool AllocateArray(size_t count); + + // Allocate an array of |count| elements of |size| after object of MDType + // Must not call more than once. + // Return true on success, or false on failure + bool AllocateObjectAndArray(size_t count, size_t size); + + // Copy |item| to |index| + // Must have been allocated using AllocateArray(). + // Return true on success, or false on failure + bool CopyIndex(unsigned int index, MDType *item); + + // Copy |size| bytes starting at |str| to |index| + // Must have been allocated using AllocateObjectAndArray(). + // Return true on success, or false on failure + bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); + + // Write data_ + bool Flush(); + + private: + enum AllocationState { + UNALLOCATED = 0, + SINGLE_OBJECT, + ARRAY, + SINGLE_OBJECT_WITH_ARRAY + }; + + MDType data_; + AllocationState allocation_state_; +}; + +} // namespace google_breakpad + +#endif // CLIENT_MINIDUMP_FILE_WRITER_H__ diff --git a/Telegram/ThirdParty/breakpad/common/convert_UTF.c b/Telegram/ThirdParty/breakpad/common/convert_UTF.c new file mode 100644 index 00000000000000..12a3c891741d33 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/convert_UTF.c @@ -0,0 +1,554 @@ +/* + * Copyright © 1991-2015 Unicode, Inc. All rights reserved. + * Distributed under the Terms of Use in + * http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation + * (the "Data Files") or Unicode software and any associated documentation + * (the "Software") to deal in the Data Files or Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, and/or sell copies of + * the Data Files or Software, and to permit persons to whom the Data Files + * or Software are furnished to do so, provided that + * (a) this copyright and permission notice appear with all copies + * of the Data Files or Software, + * (b) this copyright and permission notice appear in associated + * documentation, and + * (c) there is clear notice in each modified Data File or in the Software + * as well as in the documentation associated with the Data File(s) or + * Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in these Data Files or Software without prior + * written authorization of the copyright holder. + */ + +/* --------------------------------------------------------------------- + +Conversions between UTF32, UTF-16, and UTF-8. Source code file. +Author: Mark E. Davis, 1994. +Rev History: Rick McGowan, fixes & updates May 2001. +Sept 2001: fixed const & error conditions per +mods suggested by S. Parent & A. Lillich. +June 2002: Tim Dodd added detection and handling of incomplete +source sequences, enhanced error detection, added casts +to eliminate compiler warnings. +July 2003: slight mods to back out aggressive FFFE detection. +Jan 2004: updated switches in from-UTF8 conversions. +Oct 2004: updated to use UNI_MAX_LEGAL_UTF32 in UTF-32 conversions. + +See the header file "ConvertUTF.h" for complete documentation. + +------------------------------------------------------------------------ */ + + +#include "convert_UTF.h" +#ifdef CVTUTF_DEBUG +#include +#endif + +static const int halfShift = 10; /* used for shifting by 10 bits */ + +static const UTF32 halfBase = 0x0010000UL; +static const UTF32 halfMask = 0x3FFUL; + +#define UNI_SUR_HIGH_START (UTF32)0xD800 +#define UNI_SUR_HIGH_END (UTF32)0xDBFF +#define UNI_SUR_LOW_START (UTF32)0xDC00 +#define UNI_SUR_LOW_END (UTF32)0xDFFF + +#ifndef false +#define false 0 +#endif +#ifndef true +#define true 1 +#endif + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, + UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF32* source = *sourceStart; + UTF16* target = *targetStart; + while (source < sourceEnd) { + UTF32 ch; + if (target >= targetEnd) { + result = targetExhausted; break; + } + ch = *source++; + if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ + /* UTF-16 surrogate values are illegal in UTF-32; 0xffff or 0xfffe are both reserved values */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { + if (flags == strictConversion) { + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } else { + *target++ = UNI_REPLACEMENT_CHAR; + } + } else { + *target++ = (UTF16)ch; /* normal case */ + } + } else if (ch > UNI_MAX_LEGAL_UTF32) { + if (flags == strictConversion) { + result = sourceIllegal; + } else { + *target++ = UNI_REPLACEMENT_CHAR; + } + } else { + /* target is a character in range 0xFFFF - 0x10FFFF. */ + if (target + 1 >= targetEnd) { + --source; /* Back up source pointer! */ + result = targetExhausted; break; + } + ch -= halfBase; + *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); + *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); + } + } +*sourceStart = source; +*targetStart = target; +return result; +} + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, + UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF16* source = *sourceStart; + UTF32* target = *targetStart; + UTF32 ch, ch2; + while (source < sourceEnd) { + const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ + ch = *source++; + /* If we have a surrogate pair, convert to UTF32 first. */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { + /* If the 16 bits following the high surrogate are in the source buffer... */ + if (source < sourceEnd) { + ch2 = *source; + /* If it's a low surrogate, convert to UTF32. */ + if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { + ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + + (ch2 - UNI_SUR_LOW_START) + halfBase; + ++source; + } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } + } else { /* We don't have the 16 bits following the high surrogate. */ + --source; /* return to the high surrogate */ + result = sourceExhausted; + break; + } + } else if (flags == strictConversion) { + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } + } + if (target >= targetEnd) { + source = oldSource; /* Back up source pointer! */ + result = targetExhausted; break; + } + *target++ = ch; + } + *sourceStart = source; + *targetStart = target; +#ifdef CVTUTF_DEBUG + if (result == sourceIllegal) { + fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2); + fflush(stderr); + } +#endif + return result; +} + +/* --------------------------------------------------------------------- */ + +/* + * Index into the table below with the first byte of a UTF-8 sequence to + * get the number of trailing bytes that are supposed to follow it. + * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is + * left as-is for anyone who may want to do such conversion, which was + * allowed in earlier algorithms. + */ +static const char trailingBytesForUTF8[256] = { + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 +}; + +/* + * Magic values subtracted from a buffer value during UTF8 conversion. + * This table contains as many values as there might be trailing bytes + * in a UTF-8 sequence. + */ +static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, + 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; + +/* + * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed + * into the first byte, depending on how many bytes follow. There are + * as many entries in this table as there are UTF-8 sequence types. + * (I.e., one byte sequence, two byte... etc.). Remember that sequencs + * for *legal* UTF-8 will be 4 or fewer bytes total. + */ +static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; + +/* --------------------------------------------------------------------- */ + +/* The interface converts a whole buffer to avoid function-call overhead. +* Constants have been gathered. Loops & conditionals have been removed as +* much as possible for efficiency, in favor of drop-through switches. +* (See "Note A" at the bottom of the file for equivalent code.) +* If your compiler supports it, the "isLegalUTF8" call can be turned +* into an inline function. +*/ + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, + UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF16* source = *sourceStart; + UTF8* target = *targetStart; + while (source < sourceEnd) { + UTF32 ch; + unsigned short bytesToWrite = 0; + const UTF32 byteMask = 0xBF; + const UTF32 byteMark = 0x80; + const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ + ch = *source++; + /* If we have a surrogate pair, convert to UTF32 first. */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { + /* If the 16 bits following the high surrogate are in the source buffer... */ + if (source < sourceEnd) { + UTF32 ch2 = *source; + /* If it's a low surrogate, convert to UTF32. */ + if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { + ch = ((ch - UNI_SUR_HIGH_START) << halfShift) + + (ch2 - UNI_SUR_LOW_START) + halfBase; + ++source; + } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } + } else { /* We don't have the 16 bits following the high surrogate. */ + --source; /* return to the high surrogate */ + result = sourceExhausted; + break; + } + } else if (flags == strictConversion) { + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } + } + /* Figure out how many bytes the result will require */ + if (ch < (UTF32)0x80) { bytesToWrite = 1; + } else if (ch < (UTF32)0x800) { bytesToWrite = 2; + } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; + } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; + } else { bytesToWrite = 3; + ch = UNI_REPLACEMENT_CHAR; + } + + target += bytesToWrite; + if (target > targetEnd) { + source = oldSource; /* Back up source pointer! */ + target -= bytesToWrite; result = targetExhausted; break; + } + switch (bytesToWrite) { /* note: everything falls through. */ + case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); + } + target += bytesToWrite; + } +*sourceStart = source; +*targetStart = target; +return result; +} + +/* --------------------------------------------------------------------- */ + +/* + * Utility routine to tell whether a sequence of bytes is legal UTF-8. + * This must be called with the length pre-determined by the first byte. + * If not calling this from ConvertUTF8to*, then the length can be set by: + * length = trailingBytesForUTF8[*source]+1; + * and the sequence is illegal right away if there aren't that many bytes + * available. + * If presented with a length > 4, this returns false. The Unicode + * definition of UTF-8 goes up to 4-byte sequences. + */ + +static Boolean isLegalUTF8(const UTF8 *source, int length) { + UTF8 a; + const UTF8 *srcptr = source+length; + switch (length) { + default: return false; + /* Everything else falls through when "true"... */ + case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; + case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; + case 2: if ((a = (*--srcptr)) > 0xBF) return false; + + switch (*source) { + /* no fall-through in this inner switch */ + case 0xE0: if (a < 0xA0) return false; break; + case 0xED: if (a > 0x9F) return false; break; + case 0xF0: if (a < 0x90) return false; break; + case 0xF4: if (a > 0x8F) return false; break; + default: if (a < 0x80) return false; + } + + case 1: if (*source >= 0x80 && *source < 0xC2) return false; + } + if (*source > 0xF4) return false; + return true; +} + +/* --------------------------------------------------------------------- */ + +/* + * Exported function to return whether a UTF-8 sequence is legal or not. + * This is not used here; it's just exported. + */ +Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { + int length = trailingBytesForUTF8[*source]+1; + if (source+length > sourceEnd) { + return false; + } + return isLegalUTF8(source, length); +} + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, + UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF8* source = *sourceStart; + UTF16* target = *targetStart; + while (source < sourceEnd) { + UTF32 ch = 0; + unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; + if (source + extraBytesToRead >= sourceEnd) { + result = sourceExhausted; break; + } + /* Do this check whether lenient or strict */ + if (! isLegalUTF8(source, extraBytesToRead+1)) { + result = sourceIllegal; + break; + } + /* + * The cases all fall through. See "Note A" below. + */ + switch (extraBytesToRead) { + case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ + case 3: ch += *source++; ch <<= 6; + case 2: ch += *source++; ch <<= 6; + case 1: ch += *source++; ch <<= 6; + case 0: ch += *source++; + } + ch -= offsetsFromUTF8[extraBytesToRead]; + + if (target >= targetEnd) { + source -= (extraBytesToRead+1); /* Back up source pointer! */ + result = targetExhausted; break; + } + if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { + if (flags == strictConversion) { + source -= (extraBytesToRead+1); /* return to the illegal value itself */ + result = sourceIllegal; + break; + } else { + *target++ = UNI_REPLACEMENT_CHAR; + } + } else { + *target++ = (UTF16)ch; /* normal case */ + } + } else if (ch > UNI_MAX_UTF16) { + if (flags == strictConversion) { + result = sourceIllegal; + source -= (extraBytesToRead+1); /* return to the start */ + break; /* Bail out; shouldn't continue */ + } else { + *target++ = UNI_REPLACEMENT_CHAR; + } + } else { + /* target is a character in range 0xFFFF - 0x10FFFF. */ + if (target + 1 >= targetEnd) { + source -= (extraBytesToRead+1); /* Back up source pointer! */ + result = targetExhausted; break; + } + ch -= halfBase; + *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); + *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); + } + } +*sourceStart = source; +*targetStart = target; +return result; +} + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, + UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF32* source = *sourceStart; + UTF8* target = *targetStart; + while (source < sourceEnd) { + UTF32 ch; + unsigned short bytesToWrite = 0; + const UTF32 byteMask = 0xBF; + const UTF32 byteMark = 0x80; + ch = *source++; + if (flags == strictConversion ) { + /* UTF-16 surrogate values are illegal in UTF-32 */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { + --source; /* return to the illegal value itself */ + result = sourceIllegal; + break; + } + } + /* + * Figure out how many bytes the result will require. Turn any + * illegally large UTF32 things (> Plane 17) into replacement chars. + */ + if (ch < (UTF32)0x80) { bytesToWrite = 1; + } else if (ch < (UTF32)0x800) { bytesToWrite = 2; + } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; + } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; + } else { bytesToWrite = 3; + ch = UNI_REPLACEMENT_CHAR; + result = sourceIllegal; + } + + target += bytesToWrite; + if (target > targetEnd) { + --source; /* Back up source pointer! */ + target -= bytesToWrite; result = targetExhausted; break; + } + switch (bytesToWrite) { /* note: everything falls through. */ + case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; + case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); + } + target += bytesToWrite; + } +*sourceStart = source; +*targetStart = target; +return result; +} + +/* --------------------------------------------------------------------- */ + +ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, + UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { + ConversionResult result = conversionOK; + const UTF8* source = *sourceStart; + UTF32* target = *targetStart; + while (source < sourceEnd) { + UTF32 ch = 0; + unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; + if (source + extraBytesToRead >= sourceEnd) { + result = sourceExhausted; break; + } + /* Do this check whether lenient or strict */ + if (! isLegalUTF8(source, extraBytesToRead+1)) { + result = sourceIllegal; + break; + } + /* + * The cases all fall through. See "Note A" below. + */ + switch (extraBytesToRead) { + case 5: ch += *source++; ch <<= 6; + case 4: ch += *source++; ch <<= 6; + case 3: ch += *source++; ch <<= 6; + case 2: ch += *source++; ch <<= 6; + case 1: ch += *source++; ch <<= 6; + case 0: ch += *source++; + } + ch -= offsetsFromUTF8[extraBytesToRead]; + + if (target >= targetEnd) { + source -= (extraBytesToRead+1); /* Back up the source pointer! */ + result = targetExhausted; break; + } + if (ch <= UNI_MAX_LEGAL_UTF32) { + /* + * UTF-16 surrogate values are illegal in UTF-32, and anything + * over Plane 17 (> 0x10FFFF) is illegal. + */ + if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { + if (flags == strictConversion) { + source -= (extraBytesToRead+1); /* return to the illegal value itself */ + result = sourceIllegal; + break; + } else { + *target++ = UNI_REPLACEMENT_CHAR; + } + } else { + *target++ = ch; + } + } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */ + result = sourceIllegal; + *target++ = UNI_REPLACEMENT_CHAR; + } + } + *sourceStart = source; + *targetStart = target; + return result; +} + +/* --------------------------------------------------------------------- + +Note A. +The fall-through switches in UTF-8 reading code save a +temp variable, some decrements & conditionals. The switches +are equivalent to the following loop: +{ + int tmpBytesToRead = extraBytesToRead+1; + do { + ch += *source++; + --tmpBytesToRead; + if (tmpBytesToRead) ch <<= 6; + } while (tmpBytesToRead > 0); +} +In UTF-8 writing code, the switches on "bytesToWrite" are +similarly unrolled loops. + +--------------------------------------------------------------------- */ diff --git a/Telegram/ThirdParty/breakpad/common/convert_UTF.h b/Telegram/ThirdParty/breakpad/common/convert_UTF.h new file mode 100644 index 00000000000000..644d099506fbf2 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/convert_UTF.h @@ -0,0 +1,164 @@ +/* + * Copyright © 1991-2015 Unicode, Inc. All rights reserved. + * Distributed under the Terms of Use in + * http://www.unicode.org/copyright.html. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of the Unicode data files and any associated documentation + * (the "Data Files") or Unicode software and any associated documentation + * (the "Software") to deal in the Data Files or Software + * without restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, and/or sell copies of + * the Data Files or Software, and to permit persons to whom the Data Files + * or Software are furnished to do so, provided that + * (a) this copyright and permission notice appear with all copies + * of the Data Files or Software, + * (b) this copyright and permission notice appear in associated + * documentation, and + * (c) there is clear notice in each modified Data File or in the Software + * as well as in the documentation associated with the Data File(s) or + * Software that the data or software has been modified. + * + * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF + * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE + * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT OF THIRD PARTY RIGHTS. + * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS + * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL + * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THE DATA FILES OR SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in these Data Files or Software without prior + * written authorization of the copyright holder. + */ + +#ifndef COMMON_CONVERT_UTF_H_ +#define COMMON_CONVERT_UTF_H_ + +/* --------------------------------------------------------------------- + +Conversions between UTF32, UTF-16, and UTF-8. Header file. + +Several funtions are included here, forming a complete set of +conversions between the three formats. UTF-7 is not included +here, but is handled in a separate source file. + +Each of these routines takes pointers to input buffers and output +buffers. The input buffers are const. + +Each routine converts the text between *sourceStart and sourceEnd, +putting the result into the buffer between *targetStart and +targetEnd. Note: the end pointers are *after* the last item: e.g. +*(sourceEnd - 1) is the last item. + +The return result indicates whether the conversion was successful, +and if not, whether the problem was in the source or target buffers. +(Only the first encountered problem is indicated.) + +After the conversion, *sourceStart and *targetStart are both +updated to point to the end of last text successfully converted in +the respective buffers. + +Input parameters: +sourceStart - pointer to a pointer to the source buffer. +The contents of this are modified on return so that +it points at the next thing to be converted. +targetStart - similarly, pointer to pointer to the target buffer. +sourceEnd, targetEnd - respectively pointers to the ends of the +two buffers, for overflow checking only. + +These conversion functions take a ConversionFlags argument. When this +flag is set to strict, both irregular sequences and isolated surrogates +will cause an error. When the flag is set to lenient, both irregular +sequences and isolated surrogates are converted. + +Whether the flag is strict or lenient, all illegal sequences will cause +an error return. This includes sequences such as: , , +or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code +must check for illegal sequences. + +When the flag is set to lenient, characters over 0x10FFFF are converted +to the replacement character; otherwise (when the flag is set to strict) +they constitute an error. + +Output parameters: +The value "sourceIllegal" is returned from some routines if the input +sequence is malformed. When "sourceIllegal" is returned, the source +value will point to the illegal value that caused the problem. E.g., +in UTF-8 when a sequence is malformed, it points to the start of the +malformed sequence. + +Author: Mark E. Davis, 1994. +Rev History: Rick McGowan, fixes & updates May 2001. +Fixes & updates, Sept 2001. + +------------------------------------------------------------------------ */ + +/* --------------------------------------------------------------------- +The following 4 definitions are compiler-specific. +The C standard does not guarantee that wchar_t has at least +16 bits, so wchar_t is no less portable than unsigned short! +All should be unsigned values to avoid sign extension during +bit mask & shift operations. +------------------------------------------------------------------------ */ + +typedef unsigned long UTF32; /* at least 32 bits */ +typedef unsigned short UTF16; /* at least 16 bits */ +typedef unsigned char UTF8; /* typically 8 bits */ +typedef unsigned char Boolean; /* 0 or 1 */ + +/* Some fundamental constants */ +#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD +#define UNI_MAX_BMP (UTF32)0x0000FFFF +#define UNI_MAX_UTF16 (UTF32)0x0010FFFF +#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF +#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF + +typedef enum { + conversionOK, /* conversion successful */ + sourceExhausted, /* partial character in source, but hit end */ + targetExhausted, /* insuff. room in target for conversion */ + sourceIllegal /* source sequence is illegal/malformed */ +} ConversionResult; + +typedef enum { + strictConversion = 0, + lenientConversion +} ConversionFlags; + +/* This is for C++ and does no harm in C */ +#ifdef __cplusplus +extern "C" { +#endif + +ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, + UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); + +ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, + UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); + +ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, + UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); + +ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, + UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); + +ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, + UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); + +ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, + UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); + +Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); + +#ifdef __cplusplus +} +#endif + +/* --------------------------------------------------------------------- */ + +#endif // COMMON_CONVERT_UTF_H_ diff --git a/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h b/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h new file mode 100644 index 00000000000000..ec5a8d6b6b4a93 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h @@ -0,0 +1,96 @@ +// Copyright (c) 2009, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// This header provides replacements for libc functions that we need. We if +// call the libc functions directly we risk crashing in the dynamic linker as +// it tries to resolve uncached PLT entries. + +#ifndef CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ +#define CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ + +#include +#include +#include + +extern "C" { + +extern size_t my_strlen(const char* s); + +extern int my_strcmp(const char* a, const char* b); + +extern int my_strncmp(const char* a, const char* b, size_t len); + +// Parse a non-negative integer. +// result: (output) the resulting non-negative integer +// s: a NUL terminated string +// Return true iff successful. +extern bool my_strtoui(int* result, const char* s); + +// Return the length of the given unsigned integer when expressed in base 10. +extern unsigned my_uint_len(uintmax_t i); + +// Convert an unsigned integer to a string +// output: (output) the resulting string is written here. This buffer must be +// large enough to hold the resulting string. Call |my_uint_len| to get the +// required length. +// i: the unsigned integer to serialise. +// i_len: the length of the integer in base 10 (see |my_uint_len|). +extern void my_uitos(char* output, uintmax_t i, unsigned i_len); + +extern const char* my_strchr(const char* haystack, char needle); + +extern const char* my_strrchr(const char* haystack, char needle); + +// Read a hex value +// result: (output) the resulting value +// s: a string +// Returns a pointer to the first invalid charactor. +extern const char* my_read_hex_ptr(uintptr_t* result, const char* s); + +extern const char* my_read_decimal_ptr(uintptr_t* result, const char* s); + +extern void my_memset(void* ip, char c, size_t len); + +extern void* my_memchr(const void* src, int c, size_t len); + +// The following are considered safe to use in a compromised environment. +// Besides, this gives the compiler an opportunity to optimize their calls. +#define my_memcpy memcpy +#define my_memmove memmove +#define my_memcmp memcmp + +extern size_t my_strlcpy(char* s1, const char* s2, size_t len); + +extern size_t my_strlcat(char* s1, const char* s2, size_t len); + +extern int my_isspace(int ch); + +} // extern "C" + +#endif // CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h new file mode 100644 index 00000000000000..8df9165bb343f1 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h @@ -0,0 +1,301 @@ +// Copyright (c) 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// MachIPC.h +// +// Some helpful wrappers for using Mach IPC calls + +#ifndef MACH_IPC_H__ +#define MACH_IPC_H__ + +#import +#import +#import +#import + +#import + +//============================================================================== +// DISCUSSION: +// +// The three main classes of interest are +// +// MachMessage: a wrapper for a mach message of the following form +// mach_msg_header_t +// mach_msg_body_t +// optional descriptors +// optional extra message data +// +// MachReceiveMessage and MachSendMessage subclass MachMessage +// and are used instead of MachMessage which is an abstract base class +// +// ReceivePort: +// Represents a mach port for which we have receive rights +// +// MachPortSender: +// Represents a mach port for which we have send rights +// +// Here's an example to receive a message on a server port: +// +// // This creates our named server port +// ReceivePort receivePort("com.Google.MyService"); +// +// MachReceiveMessage message; +// kern_return_t result = receivePort.WaitForMessage(&message, 0); +// +// if (result == KERN_SUCCESS && message.GetMessageID() == 57) { +// mach_port_t task = message.GetTranslatedPort(0); +// mach_port_t thread = message.GetTranslatedPort(1); +// +// char *messageString = message.GetData(); +// +// printf("message string = %s\n", messageString); +// } +// +// Here is an example of using these classes to send a message to this port: +// +// // send to already named port +// MachPortSender sender("com.Google.MyService"); +// MachSendMessage message(57); // our message ID is 57 +// +// // add some ports to be translated for us +// message.AddDescriptor(mach_task_self()); // our task +// message.AddDescriptor(mach_thread_self()); // this thread +// +// char messageString[] = "Hello server!\n"; +// message.SetData(messageString, strlen(messageString)+1); +// +// kern_return_t result = sender.SendMessage(message, 1000); // timeout 1000ms +// + +namespace google_breakpad { +#define PRINT_MACH_RESULT(result_, message_) \ + printf(message_" %s (%d)\n", mach_error_string(result_), result_ ); + +//============================================================================== +// A wrapper class for mach_msg_port_descriptor_t (with same memory layout) +// with convenient constructors and accessors +class MachMsgPortDescriptor : public mach_msg_port_descriptor_t { + public: + // General-purpose constructor + MachMsgPortDescriptor(mach_port_t in_name, + mach_msg_type_name_t in_disposition) { + name = in_name; + pad1 = 0; + pad2 = 0; + disposition = in_disposition; + type = MACH_MSG_PORT_DESCRIPTOR; + } + + // For passing send rights to a port + MachMsgPortDescriptor(mach_port_t in_name) { + name = in_name; + pad1 = 0; + pad2 = 0; + disposition = MACH_MSG_TYPE_COPY_SEND; + type = MACH_MSG_PORT_DESCRIPTOR; + } + + // Copy constructor + MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { + name = desc.name; + pad1 = desc.pad1; + pad2 = desc.pad2; + disposition = desc.disposition; + type = desc.type; + } + + mach_port_t GetMachPort() const { + return name; + } + + mach_msg_type_name_t GetDisposition() const { + return disposition; + } + + // For convenience + operator mach_port_t() const { + return GetMachPort(); + } +}; + +//============================================================================== +// MachMessage: a wrapper for a mach message +// (mach_msg_header_t, mach_msg_body_t, extra data) +// +// This considerably simplifies the construction of a message for sending +// and the getting at relevant data and descriptors for the receiver. +// +// Currently the combined size of the descriptors plus data must be +// less than 1024. But as a benefit no memory allocation is necessary. +// +// TODO: could consider adding malloc() support for very large messages +// +// A MachMessage object is used by ReceivePort::WaitForMessage +// and MachPortSender::SendMessage +// +class MachMessage { + public: + + // The receiver of the message can retrieve the raw data this way + uint8_t *GetData() { + return GetDataLength() > 0 ? GetDataPacket()->data : NULL; + } + + uint32_t GetDataLength() { + return EndianU32_LtoN(GetDataPacket()->data_length); + } + + // The message ID may be used as a code identifying the type of message + void SetMessageID(int32_t message_id) { + GetDataPacket()->id = EndianU32_NtoL(message_id); + } + + int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); } + + // Adds a descriptor (typically a mach port) to be translated + // returns true if successful, otherwise not enough space + bool AddDescriptor(const MachMsgPortDescriptor &desc); + + int GetDescriptorCount() const { return body.msgh_descriptor_count; } + MachMsgPortDescriptor *GetDescriptor(int n); + + // Convenience method which gets the mach port described by the descriptor + mach_port_t GetTranslatedPort(int n); + + // A simple message is one with no descriptors + bool IsSimpleMessage() const { return GetDescriptorCount() == 0; } + + // Sets raw data for the message (returns false if not enough space) + bool SetData(void *data, int32_t data_length); + + protected: + // Consider this an abstract base class - must create an actual instance + // of MachReceiveMessage or MachSendMessage + + MachMessage() { + memset(this, 0, sizeof(MachMessage)); + } + + friend class ReceivePort; + friend class MachPortSender; + + // Represents raw data in our message + struct MessageDataPacket { + int32_t id; // little-endian + int32_t data_length; // little-endian + uint8_t data[1]; // actual size limited by sizeof(MachMessage) + }; + + MessageDataPacket* GetDataPacket(); + + void SetDescriptorCount(int n); + void SetDescriptor(int n, const MachMsgPortDescriptor &desc); + + // Returns total message size setting msgh_size in the header to this value + mach_msg_size_t CalculateSize(); + + mach_msg_header_t head; + mach_msg_body_t body; + uint8_t padding[1024]; // descriptors and data may be embedded here +}; + +//============================================================================== +// MachReceiveMessage and MachSendMessage are useful to separate the idea +// of a mach message being sent and being received, and adds increased type +// safety: +// ReceivePort::WaitForMessage() only accepts a MachReceiveMessage +// MachPortSender::SendMessage() only accepts a MachSendMessage + +//============================================================================== +class MachReceiveMessage : public MachMessage { + public: + MachReceiveMessage() : MachMessage() {}; +}; + +//============================================================================== +class MachSendMessage : public MachMessage { + public: + MachSendMessage(int32_t message_id); +}; + +//============================================================================== +// Represents a mach port for which we have receive rights +class ReceivePort { + public: + // Creates a new mach port for receiving messages and registers a name for it + explicit ReceivePort(const char *receive_port_name); + + // Given an already existing mach port, use it. We take ownership of the + // port and deallocate it in our destructor. + explicit ReceivePort(mach_port_t receive_port); + + // Create a new mach port for receiving messages + ReceivePort(); + + ~ReceivePort(); + + // Waits on the mach port until message received or timeout + kern_return_t WaitForMessage(MachReceiveMessage *out_message, + mach_msg_timeout_t timeout); + + // The underlying mach port that we wrap + mach_port_t GetPort() const { return port_; } + + private: + ReceivePort(const ReceivePort&); // disable copy c-tor + + mach_port_t port_; + kern_return_t init_result_; +}; + +//============================================================================== +// Represents a mach port for which we have send rights +class MachPortSender { + public: + // get a port with send rights corresponding to a named registered service + explicit MachPortSender(const char *receive_port_name); + + + // Given an already existing mach port, use it. + explicit MachPortSender(mach_port_t send_port); + + kern_return_t SendMessage(MachSendMessage &message, + mach_msg_timeout_t timeout); + + private: + MachPortSender(const MachPortSender&); // disable copy c-tor + + mach_port_t send_port_; + kern_return_t init_result_; +}; + +} // namespace google_breakpad + +#endif // MACH_IPC_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm new file mode 100644 index 00000000000000..dc9773f77ad2f5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm @@ -0,0 +1,306 @@ +// Copyright (c) 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// MachIPC.mm +// Wrapper for mach IPC calls + +#import +#import "MachIPC.h" +#include "common/mac/bootstrap_compat.h" + +namespace google_breakpad { +//============================================================================== +MachSendMessage::MachSendMessage(int32_t message_id) : MachMessage() { + head.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); + + // head.msgh_remote_port = ...; // filled out in MachPortSender::SendMessage() + head.msgh_local_port = MACH_PORT_NULL; + head.msgh_reserved = 0; + head.msgh_id = 0; + + SetDescriptorCount(0); // start out with no descriptors + + SetMessageID(message_id); + SetData(NULL, 0); // client may add data later +} + +//============================================================================== +// returns true if successful +bool MachMessage::SetData(void *data, + int32_t data_length) { + // first check to make sure we have enough space + size_t size = CalculateSize(); + size_t new_size = size + data_length; + + if (new_size > sizeof(MachMessage)) { + return false; // not enough space + } + + GetDataPacket()->data_length = EndianU32_NtoL(data_length); + if (data) memcpy(GetDataPacket()->data, data, data_length); + + CalculateSize(); + + return true; +} + +//============================================================================== +// calculates and returns the total size of the message +// Currently, the entire message MUST fit inside of the MachMessage +// messsage size <= sizeof(MachMessage) +mach_msg_size_t MachMessage::CalculateSize() { + size_t size = sizeof(mach_msg_header_t) + sizeof(mach_msg_body_t); + + // add space for MessageDataPacket + int32_t alignedDataLength = (GetDataLength() + 3) & ~0x3; + size += 2*sizeof(int32_t) + alignedDataLength; + + // add space for descriptors + size += GetDescriptorCount() * sizeof(MachMsgPortDescriptor); + + head.msgh_size = static_cast(size); + + return head.msgh_size; +} + +//============================================================================== +MachMessage::MessageDataPacket *MachMessage::GetDataPacket() { + size_t desc_size = sizeof(MachMsgPortDescriptor)*GetDescriptorCount(); + MessageDataPacket *packet = + reinterpret_cast(padding + desc_size); + + return packet; +} + +//============================================================================== +void MachMessage::SetDescriptor(int n, + const MachMsgPortDescriptor &desc) { + MachMsgPortDescriptor *desc_array = + reinterpret_cast(padding); + desc_array[n] = desc; +} + +//============================================================================== +// returns true if successful otherwise there was not enough space +bool MachMessage::AddDescriptor(const MachMsgPortDescriptor &desc) { + // first check to make sure we have enough space + int size = CalculateSize(); + size_t new_size = size + sizeof(MachMsgPortDescriptor); + + if (new_size > sizeof(MachMessage)) { + return false; // not enough space + } + + // unfortunately, we need to move the data to allow space for the + // new descriptor + u_int8_t *p = reinterpret_cast(GetDataPacket()); + bcopy(p, p+sizeof(MachMsgPortDescriptor), GetDataLength()+2*sizeof(int32_t)); + + SetDescriptor(GetDescriptorCount(), desc); + SetDescriptorCount(GetDescriptorCount() + 1); + + CalculateSize(); + + return true; +} + +//============================================================================== +void MachMessage::SetDescriptorCount(int n) { + body.msgh_descriptor_count = n; + + if (n > 0) { + head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; + } else { + head.msgh_bits &= ~MACH_MSGH_BITS_COMPLEX; + } +} + +//============================================================================== +MachMsgPortDescriptor *MachMessage::GetDescriptor(int n) { + if (n < GetDescriptorCount()) { + MachMsgPortDescriptor *desc = + reinterpret_cast(padding); + return desc + n; + } + + return nil; +} + +//============================================================================== +mach_port_t MachMessage::GetTranslatedPort(int n) { + if (n < GetDescriptorCount()) { + return GetDescriptor(n)->GetMachPort(); + } + return MACH_PORT_NULL; +} + +#pragma mark - + +//============================================================================== +// create a new mach port for receiving messages and register a name for it +ReceivePort::ReceivePort(const char *receive_port_name) { + mach_port_t current_task = mach_task_self(); + + init_result_ = mach_port_allocate(current_task, + MACH_PORT_RIGHT_RECEIVE, + &port_); + + if (init_result_ != KERN_SUCCESS) + return; + + init_result_ = mach_port_insert_right(current_task, + port_, + port_, + MACH_MSG_TYPE_MAKE_SEND); + + if (init_result_ != KERN_SUCCESS) + return; + + mach_port_t task_bootstrap_port = 0; + init_result_ = task_get_bootstrap_port(current_task, &task_bootstrap_port); + + if (init_result_ != KERN_SUCCESS) + return; + + init_result_ = breakpad::BootstrapRegister( + bootstrap_port, + const_cast(receive_port_name), + port_); +} + +//============================================================================== +// create a new mach port for receiving messages +ReceivePort::ReceivePort() { + mach_port_t current_task = mach_task_self(); + + init_result_ = mach_port_allocate(current_task, + MACH_PORT_RIGHT_RECEIVE, + &port_); + + if (init_result_ != KERN_SUCCESS) + return; + + init_result_ = mach_port_insert_right(current_task, + port_, + port_, + MACH_MSG_TYPE_MAKE_SEND); +} + +//============================================================================== +// Given an already existing mach port, use it. We take ownership of the +// port and deallocate it in our destructor. +ReceivePort::ReceivePort(mach_port_t receive_port) + : port_(receive_port), + init_result_(KERN_SUCCESS) { +} + +//============================================================================== +ReceivePort::~ReceivePort() { + if (init_result_ == KERN_SUCCESS) + mach_port_deallocate(mach_task_self(), port_); +} + +//============================================================================== +kern_return_t ReceivePort::WaitForMessage(MachReceiveMessage *out_message, + mach_msg_timeout_t timeout) { + if (!out_message) { + return KERN_INVALID_ARGUMENT; + } + + // return any error condition encountered in constructor + if (init_result_ != KERN_SUCCESS) + return init_result_; + + out_message->head.msgh_bits = 0; + out_message->head.msgh_local_port = port_; + out_message->head.msgh_remote_port = MACH_PORT_NULL; + out_message->head.msgh_reserved = 0; + out_message->head.msgh_id = 0; + + mach_msg_option_t options = MACH_RCV_MSG; + if (timeout != MACH_MSG_TIMEOUT_NONE) + options |= MACH_RCV_TIMEOUT; + kern_return_t result = mach_msg(&out_message->head, + options, + 0, + sizeof(MachMessage), + port_, + timeout, // timeout in ms + MACH_PORT_NULL); + + return result; +} + +#pragma mark - + +//============================================================================== +// get a port with send rights corresponding to a named registered service +MachPortSender::MachPortSender(const char *receive_port_name) { + mach_port_t task_bootstrap_port = 0; + init_result_ = task_get_bootstrap_port(mach_task_self(), + &task_bootstrap_port); + + if (init_result_ != KERN_SUCCESS) + return; + + init_result_ = bootstrap_look_up(task_bootstrap_port, + const_cast(receive_port_name), + &send_port_); +} + +//============================================================================== +MachPortSender::MachPortSender(mach_port_t send_port) + : send_port_(send_port), + init_result_(KERN_SUCCESS) { +} + +//============================================================================== +kern_return_t MachPortSender::SendMessage(MachSendMessage &message, + mach_msg_timeout_t timeout) { + if (message.head.msgh_size == 0) { + return KERN_INVALID_VALUE; // just for safety -- never should occur + }; + + if (init_result_ != KERN_SUCCESS) + return init_result_; + + message.head.msgh_remote_port = send_port_; + + kern_return_t result = mach_msg(&message.head, + MACH_SEND_MSG | MACH_SEND_TIMEOUT, + message.head.msgh_size, + 0, + MACH_PORT_NULL, + timeout, // timeout in ms + MACH_PORT_NULL); + + return result; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc new file mode 100644 index 00000000000000..d875d95b5f6806 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc @@ -0,0 +1,42 @@ +// Copyright (c) 2012, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "common/mac/bootstrap_compat.h" + +namespace breakpad { + +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" +kern_return_t BootstrapRegister(mach_port_t bp, + name_t service_name, + mach_port_t sp) { + return bootstrap_register(bp, service_name, sp); +} +#pragma GCC diagnostic warning "-Wdeprecated-declarations" + +} // namesapce breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h new file mode 100644 index 00000000000000..8ca7357c349c6a --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h @@ -0,0 +1,54 @@ +// Copyright (c) 2012, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef COMMON_MAC_BOOTSTRAP_COMPAT_H_ +#define COMMON_MAC_BOOTSTRAP_COMPAT_H_ + +#include + +namespace breakpad { + +// Wrapper for bootstrap_register to avoid deprecation warnings. +// +// In 10.6, it's possible to call bootstrap_check_in as the one-stop-shop for +// handling what bootstrap_register is used for. In 10.5, bootstrap_check_in +// can't check in a service whose name has not yet been registered, despite +// bootstrap_register being marked as deprecated in that OS release. Breakpad +// needs to register new service names, and in 10.5, calling +// bootstrap_register is the only way to achieve that. Attempts to call +// bootstrap_check_in for a new service name on 10.5 will result in +// BOOTSTRAP_UNKNOWN_SERVICE being returned rather than registration of the +// new service name. +kern_return_t BootstrapRegister(mach_port_t bp, + name_t service_name, + mach_port_t sp); + +} // namespace breakpad + +#endif // COMMON_MAC_BOOTSTRAP_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/byteswap.h b/Telegram/ThirdParty/breakpad/common/mac/byteswap.h new file mode 100644 index 00000000000000..b7bbc0b95bbd8c --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/byteswap.h @@ -0,0 +1,73 @@ +// -*- mode: c++ -*- + +// Copyright (c) 2010, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Original author: Jim Blandy + +// byteswap.h: Overloaded functions for conveniently byteswapping values. + +#ifndef COMMON_MAC_BYTESWAP_H_ +#define COMMON_MAC_BYTESWAP_H_ + +#ifdef __APPLE__ +#include + +static inline uint16_t ByteSwap(uint16_t v) { return OSSwapInt16(v); } +static inline uint32_t ByteSwap(uint32_t v) { return OSSwapInt32(v); } +static inline uint64_t ByteSwap(uint64_t v) { return OSSwapInt64(v); } +static inline int16_t ByteSwap(int16_t v) { return OSSwapInt16(v); } +static inline int32_t ByteSwap(int32_t v) { return OSSwapInt32(v); } +static inline int64_t ByteSwap(int64_t v) { return OSSwapInt64(v); } + +#elif defined(__linux__) +// For NXByteOrder +#include +#include +#include +#include_next + +static inline uint16_t ByteSwap(uint16_t v) { return bswap_16(v); } +static inline uint32_t ByteSwap(uint32_t v) { return bswap_32(v); } +static inline uint64_t ByteSwap(uint64_t v) { return bswap_64(v); } +static inline int16_t ByteSwap(int16_t v) { return bswap_16(v); } +static inline int32_t ByteSwap(int32_t v) { return bswap_32(v); } +static inline int64_t ByteSwap(int64_t v) { return bswap_64(v); } + +static inline NXByteOrder NXHostByteOrder() { +#ifdef __LITTLE_ENDIAN + return NX_LittleEndian; +#else + return NX_BigEndian; +#endif +} + +#endif // __APPLE__ + +#endif // COMMON_MAC_BYTESWAP_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/file_id.cc b/Telegram/ThirdParty/breakpad/common/mac/file_id.cc new file mode 100644 index 00000000000000..4661d5d625c5f6 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/file_id.cc @@ -0,0 +1,106 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// file_id.cc: Return a unique identifier for a file +// +// See file_id.h for documentation +// +// Author: Dan Waylonis + +#include +#include +#include +#include + +#include "common/mac/file_id.h" +#include "common/mac/macho_id.h" + +using MacFileUtilities::MachoID; + +namespace google_breakpad { + +FileID::FileID(const char *path) { + snprintf(path_, sizeof(path_), "%s", path); +} + +bool FileID::FileIdentifier(unsigned char identifier[16]) { + int fd = open(path_, O_RDONLY); + if (fd == -1) + return false; + + MD5Context md5; + MD5Init(&md5); + + // Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but + // doesn't seem to be an unreasonable size for the stack. + unsigned char buffer[4096 * 2]; + size_t buffer_size = sizeof(buffer); + while ((buffer_size = read(fd, buffer, buffer_size) > 0)) { + MD5Update(&md5, buffer, static_cast(buffer_size)); + } + + close(fd); + MD5Final(identifier, &md5); + + return true; +} + +bool FileID::MachoIdentifier(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]) { + MachoID macho(path_); + + if (macho.UUIDCommand(cpu_type, cpu_subtype, identifier)) + return true; + + return macho.MD5(cpu_type, cpu_subtype, identifier); +} + +// static +void FileID::ConvertIdentifierToString(const unsigned char identifier[16], + char *buffer, int buffer_length) { + int buffer_idx = 0; + for (int idx = 0; (buffer_idx < buffer_length) && (idx < 16); ++idx) { + int hi = (identifier[idx] >> 4) & 0x0F; + int lo = (identifier[idx]) & 0x0F; + + if (idx == 4 || idx == 6 || idx == 8 || idx == 10) + buffer[buffer_idx++] = '-'; + + buffer[buffer_idx++] = + static_cast((hi >= 10) ? ('A' + hi - 10) : ('0' + hi)); + buffer[buffer_idx++] = + static_cast((lo >= 10) ? ('A' + lo - 10) : ('0' + lo)); + } + + // NULL terminate + buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/file_id.h b/Telegram/ThirdParty/breakpad/common/mac/file_id.h new file mode 100644 index 00000000000000..1d6dfde1b00970 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/file_id.h @@ -0,0 +1,81 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// file_id.h: Return a unique identifier for a file +// +// Author: Dan Waylonis + +#ifndef COMMON_MAC_FILE_ID_H__ +#define COMMON_MAC_FILE_ID_H__ + +#include +#include + +namespace google_breakpad { + +class FileID { + public: + FileID(const char *path); + ~FileID() {}; + + // Load the identifier for the file path specified in the constructor into + // |identifier|. Return false if the identifier could not be created for the + // file. + // The current implementation will return the MD5 hash of the file's bytes. + bool FileIdentifier(unsigned char identifier[16]); + + // Treat the file as a mach-o file that will contain one or more archicture. + // Accepted values for |cpu_type| and |cpu_subtype| (e.g., CPU_TYPE_X86 or + // CPU_TYPE_POWERPC) are listed in /usr/include/mach/machine.h. + // If |cpu_type| is 0, then the native cpu type is used. If |cpu_subtype| is + // CPU_SUBTYPE_MULTIPLE, the match is only done on |cpu_type|. + // Returns false if opening the file failed or if the |cpu_type|/|cpu_subtype| + // is not present in the file. + // Return the unique identifier in |identifier|. + // The current implementation will look for the (in order of priority): + // LC_UUID, LC_ID_DYLIB, or MD5 hash of the given |cpu_type|. + bool MachoIdentifier(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]); + + // Convert the |identifier| data to a NULL terminated string. The string will + // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). + // The |buffer| should be at least 37 bytes long to receive all of the data + // and termination. Shorter buffers will contain truncated data. + static void ConvertIdentifierToString(const unsigned char identifier[16], + char *buffer, int buffer_length); + + private: + // Storage for the path specified + char path_[PATH_MAX]; +}; + +} // namespace google_breakpad + +#endif // COMMON_MAC_FILE_ID_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc new file mode 100644 index 00000000000000..c396ad888d80f5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc @@ -0,0 +1,369 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_id.cc: Functions to gather identifying information from a macho file +// +// See macho_id.h for documentation +// +// Author: Dan Waylonis + + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "common/mac/macho_id.h" +#include "common/mac/macho_walker.h" +#include "common/mac/macho_utilities.h" + +namespace MacFileUtilities { + +using google_breakpad::MD5Init; +using google_breakpad::MD5Update; +using google_breakpad::MD5Final; + +MachoID::MachoID(const char *path) + : memory_(0), + memory_size_(0), + crc_(0), + md5_context_(), + update_function_(NULL) { + snprintf(path_, sizeof(path_), "%s", path); +} + +MachoID::MachoID(const char *path, void *memory, size_t size) + : memory_(memory), + memory_size_(size), + crc_(0), + md5_context_(), + update_function_(NULL) { + snprintf(path_, sizeof(path_), "%s", path); +} + +MachoID::~MachoID() { +} + +// The CRC info is from http://en.wikipedia.org/wiki/Adler-32 +// With optimizations from http://www.zlib.net/ + +// The largest prime smaller than 65536 +#define MOD_ADLER 65521 +// MAX_BLOCK is the largest n such that 255n(n+1)/2 + (n+1)(MAX_BLOCK-1) <= 2^32-1 +#define MAX_BLOCK 5552 + +void MachoID::UpdateCRC(unsigned char *bytes, size_t size) { +// Unrolled loops for summing +#define DO1(buf,i) {sum1 += (buf)[i]; sum2 += sum1;} +#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); +#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); +#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); +#define DO16(buf) DO8(buf,0); DO8(buf,8); + // Split up the crc + uint32_t sum1 = crc_ & 0xFFFF; + uint32_t sum2 = (crc_ >> 16) & 0xFFFF; + + // Do large blocks + while (size >= MAX_BLOCK) { + size -= MAX_BLOCK; + int block_count = MAX_BLOCK / 16; + do { + DO16(bytes); + bytes += 16; + } while (--block_count); + sum1 %= MOD_ADLER; + sum2 %= MOD_ADLER; + } + + // Do remaining bytes + if (size) { + while (size >= 16) { + size -= 16; + DO16(bytes); + bytes += 16; + } + while (size--) { + sum1 += *bytes++; + sum2 += sum1; + } + sum1 %= MOD_ADLER; + sum2 %= MOD_ADLER; + crc_ = (sum2 << 16) | sum1; + } +} + +void MachoID::UpdateMD5(unsigned char *bytes, size_t size) { + MD5Update(&md5_context_, bytes, static_cast(size)); +} + +void MachoID::Update(MachoWalker *walker, off_t offset, size_t size) { + if (!update_function_ || !size) + return; + + // Read up to 4k bytes at a time + unsigned char buffer[4096]; + size_t buffer_size; + off_t file_offset = offset; + while (size > 0) { + if (size > sizeof(buffer)) { + buffer_size = sizeof(buffer); + size -= buffer_size; + } else { + buffer_size = size; + size = 0; + } + + if (!walker->ReadBytes(buffer, buffer_size, file_offset)) + return; + + (this->*update_function_)(buffer, buffer_size); + file_offset += buffer_size; + } +} + +bool MachoID::UUIDCommand(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char bytes[16]) { + struct breakpad_uuid_command uuid_cmd; + uuid_cmd.cmd = 0; + if (!WalkHeader(cpu_type, cpu_subtype, UUIDWalkerCB, &uuid_cmd)) + return false; + + // If we found the command, we'll have initialized the uuid_command + // structure + if (uuid_cmd.cmd == LC_UUID) { + memcpy(bytes, uuid_cmd.uuid, sizeof(uuid_cmd.uuid)); + return true; + } + + return false; +} + +bool MachoID::IDCommand(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]) { + struct dylib_command dylib_cmd; + dylib_cmd.cmd = 0; + if (!WalkHeader(cpu_type, cpu_subtype, IDWalkerCB, &dylib_cmd)) + return false; + + // If we found the command, we'll have initialized the dylib_command + // structure + if (dylib_cmd.cmd == LC_ID_DYLIB) { + // Take the hashed filename, version, and compatability version bytes + // to form the first 12 bytes, pad the rest with zeros + + // create a crude hash of the filename to generate the first 4 bytes + identifier[0] = 0; + identifier[1] = 0; + identifier[2] = 0; + identifier[3] = 0; + + for (int j = 0, i = (int)strlen(path_)-1; i>=0 && path_[i]!='/'; ++j, --i) { + identifier[j%4] += path_[i]; + } + + identifier[4] = (dylib_cmd.dylib.current_version >> 24) & 0xFF; + identifier[5] = (dylib_cmd.dylib.current_version >> 16) & 0xFF; + identifier[6] = (dylib_cmd.dylib.current_version >> 8) & 0xFF; + identifier[7] = dylib_cmd.dylib.current_version & 0xFF; + identifier[8] = (dylib_cmd.dylib.compatibility_version >> 24) & 0xFF; + identifier[9] = (dylib_cmd.dylib.compatibility_version >> 16) & 0xFF; + identifier[10] = (dylib_cmd.dylib.compatibility_version >> 8) & 0xFF; + identifier[11] = dylib_cmd.dylib.compatibility_version & 0xFF; + identifier[12] = (cpu_type >> 24) & 0xFF; + identifier[13] = (cpu_type >> 16) & 0xFF; + identifier[14] = (cpu_type >> 8) & 0xFF; + identifier[15] = cpu_type & 0xFF; + + return true; + } + + return false; +} + +uint32_t MachoID::Adler32(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) { + update_function_ = &MachoID::UpdateCRC; + crc_ = 0; + + if (!WalkHeader(cpu_type, cpu_subtype, WalkerCB, this)) + return 0; + + return crc_; +} + +bool MachoID::MD5(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype, unsigned char identifier[16]) { + update_function_ = &MachoID::UpdateMD5; + + MD5Init(&md5_context_); + + if (!WalkHeader(cpu_type, cpu_subtype, WalkerCB, this)) + return false; + + MD5Final(identifier, &md5_context_); + return true; +} + +bool MachoID::WalkHeader(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + MachoWalker::LoadCommandCallback callback, + void *context) { + if (memory_) { + MachoWalker walker(memory_, memory_size_, callback, context); + return walker.WalkHeader(cpu_type, cpu_subtype); + } else { + MachoWalker walker(path_, callback, context); + return walker.WalkHeader(cpu_type, cpu_subtype); + } +} + +// static +bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context) { + MachoID *macho_id = (MachoID *)context; + + if (cmd->cmd == LC_SEGMENT) { + struct segment_command seg; + + if (!walker->ReadBytes(&seg, sizeof(seg), offset)) + return false; + + if (swap) + breakpad_swap_segment_command(&seg); + + struct mach_header_64 header; + off_t header_offset; + + if (!walker->CurrentHeader(&header, &header_offset)) + return false; + + // Process segments that have sections: + // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) + offset += sizeof(struct segment_command); + struct section sec; + for (unsigned long i = 0; i < seg.nsects; ++i) { + if (!walker->ReadBytes(&sec, sizeof(sec), offset)) + return false; + + if (swap) + breakpad_swap_section(&sec, 1); + + // sections of type S_ZEROFILL are "virtual" and contain no data + // in the file itself + if ((sec.flags & SECTION_TYPE) != S_ZEROFILL && sec.offset != 0) + macho_id->Update(walker, header_offset + sec.offset, sec.size); + + offset += sizeof(struct section); + } + } else if (cmd->cmd == LC_SEGMENT_64) { + struct segment_command_64 seg64; + + if (!walker->ReadBytes(&seg64, sizeof(seg64), offset)) + return false; + + if (swap) + breakpad_swap_segment_command_64(&seg64); + + struct mach_header_64 header; + off_t header_offset; + + if (!walker->CurrentHeader(&header, &header_offset)) + return false; + + // Process segments that have sections: + // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) + offset += sizeof(struct segment_command_64); + struct section_64 sec64; + for (unsigned long i = 0; i < seg64.nsects; ++i) { + if (!walker->ReadBytes(&sec64, sizeof(sec64), offset)) + return false; + + if (swap) + breakpad_swap_section_64(&sec64, 1); + + // sections of type S_ZEROFILL are "virtual" and contain no data + // in the file itself + if ((sec64.flags & SECTION_TYPE) != S_ZEROFILL && sec64.offset != 0) + macho_id->Update(walker, + header_offset + sec64.offset, + (size_t)sec64.size); + + offset += sizeof(struct section_64); + } + } + + // Continue processing + return true; +} + +// static +bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context) { + if (cmd->cmd == LC_UUID) { + struct breakpad_uuid_command *uuid_cmd = + (struct breakpad_uuid_command *)context; + + if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command), + offset)) + return false; + + if (swap) + breakpad_swap_uuid_command(uuid_cmd); + + return false; + } + + // Continue processing + return true; +} + +// static +bool MachoID::IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context) { + if (cmd->cmd == LC_ID_DYLIB) { + struct dylib_command *dylib_cmd = (struct dylib_command *)context; + + if (!walker->ReadBytes(dylib_cmd, sizeof(struct dylib_command), offset)) + return false; + + if (swap) + breakpad_swap_dylib_command(dylib_cmd); + + return false; + } + + // Continue processing + return true; +} + +} // namespace MacFileUtilities diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_id.h b/Telegram/ThirdParty/breakpad/common/mac/macho_id.h new file mode 100644 index 00000000000000..1037549124a38d --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_id.h @@ -0,0 +1,131 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_id.h: Functions to gather identifying information from a macho file +// +// Author: Dan Waylonis + +#ifndef COMMON_MAC_MACHO_ID_H__ +#define COMMON_MAC_MACHO_ID_H__ + +#include +#include +#include + +#include "common/mac/macho_walker.h" +#include "common/md5.h" + +namespace MacFileUtilities { + +class MachoID { + public: + MachoID(const char *path); + MachoID(const char *path, void *memory, size_t size); + ~MachoID(); + + // For the given |cpu_type| and |cpu_subtype|, return a UUID from the LC_UUID + // command. + // Return false if there isn't a LC_UUID command. + bool UUIDCommand(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]); + + // For the given |cpu_type| and |cpu_subtype|, return a UUID from the + // LC_ID_DYLIB command. + // Return false if there isn't a LC_ID_DYLIB command. + bool IDCommand(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]); + + // For the given |cpu_type| and |cpu_subtype|, return the Adler32 CRC for the + // mach-o data segment(s). + // Return 0 on error (e.g., if the file is not a mach-o file) + uint32_t Adler32(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype); + + // For the given |cpu_type|, and |cpu_subtype| return the MD5 for the mach-o + // data segment(s). + // Return true on success, false otherwise + bool MD5(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + unsigned char identifier[16]); + + private: + // Signature of class member function to be called with data read from file + typedef void (MachoID::*UpdateFunction)(unsigned char *bytes, size_t size); + + // Update the CRC value by examining |size| |bytes| and applying the algorithm + // to each byte. + void UpdateCRC(unsigned char *bytes, size_t size); + + // Update the MD5 value by examining |size| |bytes| and applying the algorithm + // to each byte. + void UpdateMD5(unsigned char *bytes, size_t size); + + // Bottleneck for update routines + void Update(MachoWalker *walker, off_t offset, size_t size); + + // Factory for the MachoWalker + bool WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype, + MachoWalker::LoadCommandCallback callback, void *context); + + // The callback from the MachoWalker for CRC and MD5 + static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context); + + // The callback from the MachoWalker for LC_UUID + static bool UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context); + + // The callback from the MachoWalker for LC_ID_DYLIB + static bool IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, + bool swap, void *context); + + // File path + char path_[PATH_MAX]; + + // Memory region to read from + void *memory_; + + // Size of the memory region + size_t memory_size_; + + // The current crc value + uint32_t crc_; + + // The MD5 context + google_breakpad::MD5Context md5_context_; + + // The current update to call from the Update callback + UpdateFunction update_function_; +}; + +} // namespace MacFileUtilities + +#endif // COMMON_MAC_MACHO_ID_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc new file mode 100644 index 00000000000000..f56fe768c10dce --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc @@ -0,0 +1,155 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_utilties.cc: Utilities for dealing with mach-o files +// +// Author: Dave Camp + +#include "common/mac/byteswap.h" +#include "common/mac/macho_utilities.h" + +#include +#include + +void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc) { + uc->cmd = ByteSwap(uc->cmd); + uc->cmdsize = ByteSwap(uc->cmdsize); +} + +void breakpad_swap_load_command(struct load_command *lc) { + lc->cmd = ByteSwap(lc->cmd); + lc->cmdsize = ByteSwap(lc->cmdsize); +} + +void breakpad_swap_dylib_command(struct dylib_command *dc) { + dc->cmd = ByteSwap(dc->cmd); + dc->cmdsize = ByteSwap(dc->cmdsize); + + dc->dylib.name.offset = ByteSwap(dc->dylib.name.offset); + dc->dylib.timestamp = ByteSwap(dc->dylib.timestamp); + dc->dylib.current_version = ByteSwap(dc->dylib.current_version); + dc->dylib.compatibility_version = ByteSwap(dc->dylib.compatibility_version); +} + +void breakpad_swap_segment_command(struct segment_command *sc) { + sc->cmd = ByteSwap(sc->cmd); + sc->cmdsize = ByteSwap(sc->cmdsize); + + sc->vmaddr = ByteSwap(sc->vmaddr); + sc->vmsize = ByteSwap(sc->vmsize); + sc->fileoff = ByteSwap(sc->fileoff); + sc->filesize = ByteSwap(sc->filesize); + sc->maxprot = ByteSwap(sc->maxprot); + sc->initprot = ByteSwap(sc->initprot); + sc->nsects = ByteSwap(sc->nsects); + sc->flags = ByteSwap(sc->flags); +} + +void breakpad_swap_segment_command_64(struct segment_command_64 *sg) { + sg->cmd = ByteSwap(sg->cmd); + sg->cmdsize = ByteSwap(sg->cmdsize); + + sg->vmaddr = ByteSwap(sg->vmaddr); + sg->vmsize = ByteSwap(sg->vmsize); + sg->fileoff = ByteSwap(sg->fileoff); + sg->filesize = ByteSwap(sg->filesize); + + sg->maxprot = ByteSwap(sg->maxprot); + sg->initprot = ByteSwap(sg->initprot); + sg->nsects = ByteSwap(sg->nsects); + sg->flags = ByteSwap(sg->flags); +} + +void breakpad_swap_fat_header(struct fat_header *fh) { + fh->magic = ByteSwap(fh->magic); + fh->nfat_arch = ByteSwap(fh->nfat_arch); +} + +void breakpad_swap_fat_arch(struct fat_arch *fa, uint32_t narchs) { + for (uint32_t i = 0; i < narchs; ++i) { + fa[i].cputype = ByteSwap(fa[i].cputype); + fa[i].cpusubtype = ByteSwap(fa[i].cpusubtype); + fa[i].offset = ByteSwap(fa[i].offset); + fa[i].size = ByteSwap(fa[i].size); + fa[i].align = ByteSwap(fa[i].align); + } +} + +void breakpad_swap_mach_header(struct mach_header *mh) { + mh->magic = ByteSwap(mh->magic); + mh->cputype = ByteSwap(mh->cputype); + mh->cpusubtype = ByteSwap(mh->cpusubtype); + mh->filetype = ByteSwap(mh->filetype); + mh->ncmds = ByteSwap(mh->ncmds); + mh->sizeofcmds = ByteSwap(mh->sizeofcmds); + mh->flags = ByteSwap(mh->flags); +} + +void breakpad_swap_mach_header_64(struct mach_header_64 *mh) { + mh->magic = ByteSwap(mh->magic); + mh->cputype = ByteSwap(mh->cputype); + mh->cpusubtype = ByteSwap(mh->cpusubtype); + mh->filetype = ByteSwap(mh->filetype); + mh->ncmds = ByteSwap(mh->ncmds); + mh->sizeofcmds = ByteSwap(mh->sizeofcmds); + mh->flags = ByteSwap(mh->flags); + mh->reserved = ByteSwap(mh->reserved); +} + +void breakpad_swap_section(struct section *s, + uint32_t nsects) { + for (uint32_t i = 0; i < nsects; i++) { + s[i].addr = ByteSwap(s[i].addr); + s[i].size = ByteSwap(s[i].size); + + s[i].offset = ByteSwap(s[i].offset); + s[i].align = ByteSwap(s[i].align); + s[i].reloff = ByteSwap(s[i].reloff); + s[i].nreloc = ByteSwap(s[i].nreloc); + s[i].flags = ByteSwap(s[i].flags); + s[i].reserved1 = ByteSwap(s[i].reserved1); + s[i].reserved2 = ByteSwap(s[i].reserved2); + } +} + +void breakpad_swap_section_64(struct section_64 *s, + uint32_t nsects) { + for (uint32_t i = 0; i < nsects; i++) { + s[i].addr = ByteSwap(s[i].addr); + s[i].size = ByteSwap(s[i].size); + + s[i].offset = ByteSwap(s[i].offset); + s[i].align = ByteSwap(s[i].align); + s[i].reloff = ByteSwap(s[i].reloff); + s[i].nreloc = ByteSwap(s[i].nreloc); + s[i].flags = ByteSwap(s[i].flags); + s[i].reserved1 = ByteSwap(s[i].reserved1); + s[i].reserved2 = ByteSwap(s[i].reserved2); + } +} diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h new file mode 100644 index 00000000000000..00563a77c8bc0e --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h @@ -0,0 +1,95 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_utilities.h: Utilities for dealing with mach-o files +// +// Author: Dave Camp + +#ifndef COMMON_MAC_MACHO_UTILITIES_H__ +#define COMMON_MAC_MACHO_UTILITIES_H__ + +#include +#include + +/* Some #defines and structs that aren't defined in older SDKs */ +#ifndef CPU_ARCH_ABI64 +# define CPU_ARCH_ABI64 0x01000000 +#endif + +#ifndef CPU_TYPE_X86 +# define CPU_TYPE_X86 CPU_TYPE_I386 +#endif + +#ifndef CPU_TYPE_POWERPC64 +# define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) +#endif + +#ifndef LC_UUID +# define LC_UUID 0x1b /* the uuid */ +#endif + +// The uuid_command struct/swap routines were added during the 10.4 series. +// Their presence isn't guaranteed. +struct breakpad_uuid_command { + uint32_t cmd; /* LC_UUID */ + uint32_t cmdsize; /* sizeof(struct uuid_command) */ + uint8_t uuid[16]; /* the 128-bit uuid */ +}; + +void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc); + +void breakpad_swap_load_command(struct load_command *lc); + +void breakpad_swap_dylib_command(struct dylib_command *dc); + +// Older SDKs defines thread_state_data_t as an int[] instead +// of the natural_t[] it should be. +typedef natural_t breakpad_thread_state_data_t[THREAD_STATE_MAX]; + +void breakpad_swap_segment_command(struct segment_command *sc); + +// The 64-bit swap routines were added during the 10.4 series, their +// presence isn't guaranteed. +void breakpad_swap_segment_command_64(struct segment_command_64 *sg); + +void breakpad_swap_fat_header(struct fat_header *fh); + +void breakpad_swap_fat_arch(struct fat_arch *fa, uint32_t narchs); + +void breakpad_swap_mach_header(struct mach_header *mh); + +void breakpad_swap_mach_header_64(struct mach_header_64 *mh); + +void breakpad_swap_section(struct section *s, + uint32_t nsects); + +void breakpad_swap_section_64(struct section_64 *s, + uint32_t nsects); + +#endif diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc new file mode 100644 index 00000000000000..1acd86656b6c91 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc @@ -0,0 +1,268 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_walker.cc: Iterate over the load commands in a mach-o file +// +// See macho_walker.h for documentation +// +// Author: Dan Waylonis + +#include +#include +#include +#include +#include +#include +#include + +#include "common/mac/byteswap.h" +#include "common/mac/macho_walker.h" +#include "common/mac/macho_utilities.h" + +namespace MacFileUtilities { + +MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, + void *context) + : file_(-1), + memory_(NULL), + memory_size_(0), + callback_(callback), + callback_context_(context), + current_header_(NULL), + current_header_size_(0), + current_header_offset_(0) { + file_ = open(path, O_RDONLY); +} + +MachoWalker::MachoWalker(void *memory, size_t size, + LoadCommandCallback callback, void *context) + : file_(-1), + memory_(memory), + memory_size_(size), + callback_(callback), + callback_context_(context), + current_header_(NULL), + current_header_size_(0), + current_header_offset_(0) { +} + +MachoWalker::~MachoWalker() { + if (file_ != -1) + close(file_); +} + +bool MachoWalker::WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) { + cpu_type_t valid_cpu_type = cpu_type; + cpu_subtype_t valid_cpu_subtype = cpu_subtype; + // if |cpu_type| is 0, use the native cpu type. + if (cpu_type == 0) { + const NXArchInfo *arch = NXGetLocalArchInfo(); + assert(arch); + valid_cpu_type = arch->cputype; + valid_cpu_subtype = CPU_SUBTYPE_MULTIPLE; + } + off_t offset; + if (FindHeader(valid_cpu_type, valid_cpu_subtype, offset)) { + if (cpu_type & CPU_ARCH_ABI64) + return WalkHeader64AtOffset(offset); + + return WalkHeaderAtOffset(offset); + } + + return false; +} + +bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) { + if (memory_) { + if (offset < 0) + return false; + bool result = true; + if (offset + size > memory_size_) { + if (static_cast(offset) >= memory_size_) + return false; + size = memory_size_ - static_cast(offset); + result = false; + } + memcpy(buffer, static_cast(memory_) + offset, size); + return result; + } else { + return pread(file_, buffer, size, offset) == (ssize_t)size; + } +} + +bool MachoWalker::CurrentHeader(struct mach_header_64 *header, off_t *offset) { + if (current_header_) { + memcpy(header, current_header_, sizeof(mach_header_64)); + *offset = current_header_offset_; + return true; + } + + return false; +} + +bool MachoWalker::FindHeader(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + off_t &offset) { + // Read the magic bytes that's common amongst all mach-o files + uint32_t magic; + if (!ReadBytes(&magic, sizeof(magic), 0)) + return false; + + offset = sizeof(magic); + + // Figure out what type of file we've got + bool is_fat = false; + if (magic == FAT_MAGIC || magic == FAT_CIGAM) { + is_fat = true; + } + else if (magic != MH_MAGIC && magic != MH_CIGAM && magic != MH_MAGIC_64 && + magic != MH_CIGAM_64) { + return false; + } + + if (!is_fat) { + // If we don't have a fat header, check if the cpu type matches the single + // header + struct mach_header header; + if (!ReadBytes(&header, sizeof(header), 0)) + return false; + + if (magic == MH_CIGAM || magic == MH_CIGAM_64) + breakpad_swap_mach_header(&header); + + if (cpu_type != header.cputype || + (cpu_subtype != CPU_SUBTYPE_MULTIPLE && + cpu_subtype != header.cpusubtype)) { + return false; + } + + offset = 0; + return true; + } else { + // Read the fat header and find an appropriate architecture + offset = 0; + struct fat_header fat; + if (!ReadBytes(&fat, sizeof(fat), offset)) + return false; + + if (NXHostByteOrder() != NX_BigEndian) + breakpad_swap_fat_header(&fat); + + offset += sizeof(fat); + + // Search each architecture for the desired one + struct fat_arch arch; + for (uint32_t i = 0; i < fat.nfat_arch; ++i) { + if (!ReadBytes(&arch, sizeof(arch), offset)) + return false; + + if (NXHostByteOrder() != NX_BigEndian) + breakpad_swap_fat_arch(&arch, 1); + + if (arch.cputype == cpu_type && + (cpu_subtype == CPU_SUBTYPE_MULTIPLE || + arch.cpusubtype == cpu_subtype)) { + offset = arch.offset; + return true; + } + + offset += sizeof(arch); + } + } + + return false; +} + +bool MachoWalker::WalkHeaderAtOffset(off_t offset) { + struct mach_header header; + if (!ReadBytes(&header, sizeof(header), offset)) + return false; + + bool swap = (header.magic == MH_CIGAM); + if (swap) + breakpad_swap_mach_header(&header); + + // Copy the data into the mach_header_64 structure. Since the 32-bit and + // 64-bit only differ in the last field (reserved), this is safe to do. + struct mach_header_64 header64; + memcpy((void *)&header64, (const void *)&header, sizeof(header)); + header64.reserved = 0; + + current_header_ = &header64; + current_header_size_ = sizeof(header); // 32-bit, not 64-bit + current_header_offset_ = offset; + offset += current_header_size_; + bool result = WalkHeaderCore(offset, header.ncmds, swap); + current_header_ = NULL; + current_header_size_ = 0; + current_header_offset_ = 0; + return result; +} + +bool MachoWalker::WalkHeader64AtOffset(off_t offset) { + struct mach_header_64 header; + if (!ReadBytes(&header, sizeof(header), offset)) + return false; + + bool swap = (header.magic == MH_CIGAM_64); + if (swap) + breakpad_swap_mach_header_64(&header); + + current_header_ = &header; + current_header_size_ = sizeof(header); + current_header_offset_ = offset; + offset += current_header_size_; + bool result = WalkHeaderCore(offset, header.ncmds, swap); + current_header_ = NULL; + current_header_size_ = 0; + current_header_offset_ = 0; + return result; +} + +bool MachoWalker::WalkHeaderCore(off_t offset, uint32_t number_of_commands, + bool swap) { + for (uint32_t i = 0; i < number_of_commands; ++i) { + struct load_command cmd; + if (!ReadBytes(&cmd, sizeof(cmd), offset)) + return false; + + if (swap) + breakpad_swap_load_command(&cmd); + + // Call the user callback + if (callback_ && !callback_(this, &cmd, offset, swap, callback_context_)) + break; + + offset += cmd.cmdsize; + } + + return true; +} + +} // namespace MacFileUtilities diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h new file mode 100644 index 00000000000000..dd535814a1dde7 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h @@ -0,0 +1,119 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// macho_walker.h: Iterate over the load commands in a mach-o file +// +// Author: Dan Waylonis + +#ifndef COMMON_MAC_MACHO_WALKER_H__ +#define COMMON_MAC_MACHO_WALKER_H__ + +#include +#include +#include + +namespace MacFileUtilities { + +class MachoWalker { + public: + // A callback function executed when a new load command is read. If no + // further processing of load commands is desired, return false. Otherwise, + // return true. + // |cmd| is the current command, and |offset| is the location relative to the + // beginning of the file (not header) where the command was read. If |swap| + // is set, then any command data (other than the returned load_command) should + // be swapped when read + typedef bool (*LoadCommandCallback)(MachoWalker *walker, load_command *cmd, + off_t offset, bool swap, void *context); + + MachoWalker(const char *path, LoadCommandCallback callback, void *context); + MachoWalker(void *memory, size_t size, LoadCommandCallback callback, + void *context); + ~MachoWalker(); + + // Begin walking the header for |cpu_type| and |cpu_subtype|. If |cpu_type| + // is 0, then the native cpu type is used. Otherwise, accepted values are + // listed in /usr/include/mach/machine.h (e.g., CPU_TYPE_X86 or + // CPU_TYPE_POWERPC). If |cpu_subtype| is CPU_SUBTYPE_MULTIPLE, the match is + // only done on |cpu_type|. + // Returns false if opening the file failed or if the |cpu_type|/|cpu_subtype| + // is not present in the file. + bool WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype); + + // Read |size| bytes from the opened file at |offset| into |buffer| + bool ReadBytes(void *buffer, size_t size, off_t offset); + + // Return the current header and header offset + bool CurrentHeader(struct mach_header_64 *header, off_t *offset); + + private: + // Locate (if any) the header offset for |cpu_type| and return in |offset|. + // Return true if found, false otherwise. + bool FindHeader(cpu_type_t cpu_type, + cpu_subtype_t cpu_subtype, + off_t &offset); + + // Process an individual header starting at |offset| from the start of the + // file. Return true if successful, false otherwise. + bool WalkHeaderAtOffset(off_t offset); + bool WalkHeader64AtOffset(off_t offset); + + // Bottleneck for walking the load commands + bool WalkHeaderCore(off_t offset, uint32_t number_of_commands, bool swap); + + // File descriptor to the opened file + int file_; + + // Memory location to read from. + void *memory_; + + // Size of the memory segment we can read from. + size_t memory_size_; + + // User specified callback & context + LoadCommandCallback callback_; + void *callback_context_; + + // Current header, size, and offset. The mach_header_64 is used for both + // 32-bit and 64-bit headers because they only differ in their last field + // (reserved). By adding the |current_header_size_| and the + // |current_header_offset_|, you can determine the offset in the file just + // after the header. + struct mach_header_64 *current_header_; + unsigned long current_header_size_; + off_t current_header_offset_; + + private: + MachoWalker(const MachoWalker &); + MachoWalker &operator=(const MachoWalker &); +}; + +} // namespace MacFileUtilities + +#endif // COMMON_MAC_MACHO_WALKER_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h b/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h new file mode 100644 index 00000000000000..d6d1bef9717437 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h @@ -0,0 +1,56 @@ +// Copyright (c) 2010 Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Inline implementation of ScopedTaskSuspend, which suspends a Mach +// task for the duration of its scope. + +#ifndef GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ +#define GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ + +#include + +namespace google_breakpad { + +class ScopedTaskSuspend { + public: + explicit ScopedTaskSuspend(mach_port_t target) : target_(target) { + task_suspend(target_); + } + + ~ScopedTaskSuspend() { + task_resume(target_); + } + + private: + mach_port_t target_; +}; + +} // namespace google_breakpad + +#endif // GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc new file mode 100644 index 00000000000000..07c0f42680d18e --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc @@ -0,0 +1,84 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include "common/scoped_ptr.h" +#include "common/mac/string_utilities.h" + +namespace MacStringUtils { + +using google_breakpad::scoped_array; + +std::string ConvertToString(CFStringRef str) { + CFIndex length = CFStringGetLength(str); + std::string result; + + if (!length) + return result; + + CFIndex maxUTF8Length = + CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); + scoped_array buffer(new UInt8[maxUTF8Length + 1]); + CFIndex actualUTF8Length; + CFStringGetBytes(str, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, + false, buffer.get(), maxUTF8Length, &actualUTF8Length); + buffer[actualUTF8Length] = 0; + result.assign((const char *)buffer.get()); + + return result; +} + +unsigned int IntegerValueAtIndex(string &str, unsigned int idx) { + string digits("0123456789"), temp; + size_t start = 0; + size_t end; + size_t found = 0; + unsigned int result = 0; + + for (; found <= idx; ++found) { + end = str.find_first_not_of(digits, start); + + if (end == string::npos) + end = str.size(); + + temp = str.substr(start, end - start); + + if (found == idx) { + result = atoi(temp.c_str()); + } + + start = str.find_first_of(digits, end + 1); + + if (start == string::npos) + break; + } + + return result; +} + +} // namespace MacStringUtils diff --git a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h new file mode 100644 index 00000000000000..6d89c834e7cbac --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h @@ -0,0 +1,52 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// string_utilities.h: Utilities for strings for Mac platform + +#ifndef COMMON_MAC_STRING_UTILITIES_H__ +#define COMMON_MAC_STRING_UTILITIES_H__ + +#include + +#include + +namespace MacStringUtils { + +using std::string; + +// Convert a CoreFoundation string into a std::string +string ConvertToString(CFStringRef str); + +// Return the idx'th decimal integer in str, separated by non-decimal-digits +// E.g., str = 10.4.8, idx = 1 -> 4 +unsigned int IntegerValueAtIndex(string &str, unsigned int idx); + +} // namespace MacStringUtils + +#endif // COMMON_MAC_STRING_UTILITIES_H__ diff --git a/Telegram/ThirdParty/breakpad/common/md5.cc b/Telegram/ThirdParty/breakpad/common/md5.cc new file mode 100644 index 00000000000000..a0d9a1bdd89108 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/md5.cc @@ -0,0 +1,251 @@ +/* + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * To compute the message digest of a chunk of bytes, declare an + * MD5Context structure, pass it to MD5Init, call MD5Update as + * needed on buffers full of bytes, and then call MD5Final, which + * will fill a supplied 16-byte array with the digest. + */ + +#include + +#include "common/md5.h" + +namespace google_breakpad { + +#ifndef WORDS_BIGENDIAN +#define byteReverse(buf, len) /* Nothing */ +#else +/* + * Note: this code is harmless on little-endian machines. + */ +static void byteReverse(unsigned char *buf, unsigned longs) +{ + u32 t; + do { + t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | + ((unsigned) buf[1] << 8 | buf[0]); + *(u32 *) buf = t; + buf += 4; + } while (--longs); +} +#endif + +static void MD5Transform(u32 buf[4], u32 const in[16]); + +/* + * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious + * initialization constants. + */ +void MD5Init(struct MD5Context *ctx) +{ + ctx->buf[0] = 0x67452301; + ctx->buf[1] = 0xefcdab89; + ctx->buf[2] = 0x98badcfe; + ctx->buf[3] = 0x10325476; + + ctx->bits[0] = 0; + ctx->bits[1] = 0; +} + +/* + * Update context to reflect the concatenation of another buffer full + * of bytes. + */ +void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len) +{ + u32 t; + + /* Update bitcount */ + + t = ctx->bits[0]; + if ((ctx->bits[0] = t + ((u32) len << 3)) < t) + ctx->bits[1]++; /* Carry from low to high */ + ctx->bits[1] += len >> 29; + + t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ + + /* Handle any leading odd-sized chunks */ + + if (t) { + unsigned char *p = (unsigned char *) ctx->in + t; + + t = 64 - t; + if (len < t) { + memcpy(p, buf, len); + return; + } + memcpy(p, buf, t); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (u32 *) ctx->in); + buf += t; + len -= t; + } + /* Process data in 64-byte chunks */ + + while (len >= 64) { + memcpy(ctx->in, buf, 64); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (u32 *) ctx->in); + buf += 64; + len -= 64; + } + + /* Handle any remaining bytes of data. */ + + memcpy(ctx->in, buf, len); +} + +/* + * Final wrapup - pad to 64-byte boundary with the bit pattern + * 1 0* (64-bit count of bits processed, MSB-first) + */ +void MD5Final(unsigned char digest[16], struct MD5Context *ctx) +{ + unsigned count; + unsigned char *p; + + /* Compute number of bytes mod 64 */ + count = (ctx->bits[0] >> 3) & 0x3F; + + /* Set the first char of padding to 0x80. This is safe since there is + always at least one byte free */ + p = ctx->in + count; + *p++ = 0x80; + + /* Bytes of padding needed to make 64 bytes */ + count = 64 - 1 - count; + + /* Pad out to 56 mod 64 */ + if (count < 8) { + /* Two lots of padding: Pad the first block to 64 bytes */ + memset(p, 0, count); + byteReverse(ctx->in, 16); + MD5Transform(ctx->buf, (u32 *) ctx->in); + + /* Now fill the next block with 56 bytes */ + memset(ctx->in, 0, 56); + } else { + /* Pad block to 56 bytes */ + memset(p, 0, count - 8); + } + byteReverse(ctx->in, 14); + + /* Append length in bits and transform */ + ((u32 *) ctx->in)[14] = ctx->bits[0]; + ((u32 *) ctx->in)[15] = ctx->bits[1]; + + MD5Transform(ctx->buf, (u32 *) ctx->in); + byteReverse((unsigned char *) ctx->buf, 4); + memcpy(digest, ctx->buf, 16); + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ +} + +/* The four core functions - F1 is optimized somewhat */ + +/* #define F1(x, y, z) (x & y | ~x & z) */ +#define F1(x, y, z) (z ^ (x & (y ^ z))) +#define F2(x, y, z) F1(z, x, y) +#define F3(x, y, z) (x ^ y ^ z) +#define F4(x, y, z) (y ^ (x | ~z)) + +/* This is the central step in the MD5 algorithm. */ +#define MD5STEP(f, w, x, y, z, data, s) \ + ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) + +/* + * The core of the MD5 algorithm, this alters an existing MD5 hash to + * reflect the addition of 16 longwords of new data. MD5Update blocks + * the data and converts bytes into longwords for this routine. + */ +static void MD5Transform(u32 buf[4], u32 const in[16]) +{ + u32 a, b, c, d; + + a = buf[0]; + b = buf[1]; + c = buf[2]; + d = buf[3]; + + MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); + MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); + MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); + MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); + MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); + MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); + MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); + MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); + MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); + MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); + MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); + MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); + MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); + MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); + MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); + MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); + + MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); + MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); + MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); + MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); + MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); + MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); + MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); + MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); + MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); + MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); + MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); + MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); + MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); + MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); + MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); + MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); + + MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); + MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); + MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); + MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); + MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); + MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); + MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); + MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); + MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); + MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); + MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); + MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); + MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); + MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); + MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); + MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); + + MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); + MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); + MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); + MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); + MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); + MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); + MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); + MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); + MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); + MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); + MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); + MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); + MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); + MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); + MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); + MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); + + buf[0] += a; + buf[1] += b; + buf[2] += c; + buf[3] += d; +} + +} // namespace google_breakpad + diff --git a/Telegram/ThirdParty/breakpad/common/md5.h b/Telegram/ThirdParty/breakpad/common/md5.h new file mode 100644 index 00000000000000..2ab0ab95aebd83 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/md5.h @@ -0,0 +1,27 @@ +// Copyright 2007 Google Inc. All Rights Reserved. +// Author: liuli@google.com (Liu Li) +#ifndef COMMON_MD5_H__ +#define COMMON_MD5_H__ + +#include + +namespace google_breakpad { + +typedef uint32_t u32; +typedef uint8_t u8; + +struct MD5Context { + u32 buf[4]; + u32 bits[2]; + u8 in[64]; +}; + +void MD5Init(struct MD5Context *ctx); + +void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len); + +void MD5Final(unsigned char digest[16], struct MD5Context *ctx); + +} // namespace google_breakpad + +#endif // COMMON_MD5_H__ diff --git a/Telegram/ThirdParty/breakpad/common/memory.h b/Telegram/ThirdParty/breakpad/common/memory.h new file mode 100644 index 00000000000000..d6aa137d35c0fd --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/memory.h @@ -0,0 +1,212 @@ +// Copyright (c) 2009, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#ifndef GOOGLE_BREAKPAD_COMMON_MEMORY_H_ +#define GOOGLE_BREAKPAD_COMMON_MEMORY_H_ + +#include +#include +#include +#include + +#include +#include + +#if defined(MEMORY_SANITIZER) +#include +#endif + +#ifdef __APPLE__ +#define sys_mmap mmap +#define sys_mmap2 mmap +#define sys_munmap munmap +#define MAP_ANONYMOUS MAP_ANON +#else +#include "third_party/lss/linux_syscall_support.h" +#endif + +namespace google_breakpad { + +// This is very simple allocator which fetches pages from the kernel directly. +// Thus, it can be used even when the heap may be corrupted. +// +// There is no free operation. The pages are only freed when the object is +// destroyed. +class PageAllocator { + public: + PageAllocator() + : page_size_(getpagesize()), + last_(NULL), + current_page_(NULL), + page_offset_(0) { + } + + ~PageAllocator() { + FreeAll(); + } + + void *Alloc(size_t bytes) { + if (!bytes) + return NULL; + + if (current_page_ && page_size_ - page_offset_ >= bytes) { + uint8_t *const ret = current_page_ + page_offset_; + page_offset_ += bytes; + if (page_offset_ == page_size_) { + page_offset_ = 0; + current_page_ = NULL; + } + + return ret; + } + + const size_t pages = + (bytes + sizeof(PageHeader) + page_size_ - 1) / page_size_; + uint8_t *const ret = GetNPages(pages); + if (!ret) + return NULL; + + page_offset_ = + (page_size_ - (page_size_ * pages - (bytes + sizeof(PageHeader)))) % + page_size_; + current_page_ = page_offset_ ? ret + page_size_ * (pages - 1) : NULL; + + return ret + sizeof(PageHeader); + } + + // Checks whether the page allocator owns the passed-in pointer. + // This method exists for testing pursposes only. + bool OwnsPointer(const void* p) { + for (PageHeader* header = last_; header; header = header->next) { + const char* current = reinterpret_cast(header); + if ((p >= current) && (p < current + header->num_pages * page_size_)) + return true; + } + + return false; + } + + private: + uint8_t *GetNPages(size_t num_pages) { +#if defined(__x86_64__) || defined(__aarch64__) || defined(__aarch64__) || \ + ((defined(__mips__) && _MIPS_SIM == _ABI64)) + void *a = sys_mmap(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); +#else + void *a = sys_mmap2(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); +#endif + if (a == MAP_FAILED) + return NULL; + +#if defined(MEMORY_SANITIZER) + // We need to indicate to MSan that memory allocated through sys_mmap is + // initialized, since linux_syscall_support.h doesn't have MSan hooks. + __msan_unpoison(a, page_size_ * num_pages); +#endif + + struct PageHeader *header = reinterpret_cast(a); + header->next = last_; + header->num_pages = num_pages; + last_ = header; + + return reinterpret_cast(a); + } + + void FreeAll() { + PageHeader *next; + + for (PageHeader *cur = last_; cur; cur = next) { + next = cur->next; + sys_munmap(cur, cur->num_pages * page_size_); + } + } + + struct PageHeader { + PageHeader *next; // pointer to the start of the next set of pages. + size_t num_pages; // the number of pages in this set. + }; + + const size_t page_size_; + PageHeader *last_; + uint8_t *current_page_; + size_t page_offset_; +}; + +// Wrapper to use with STL containers +template +struct PageStdAllocator : public std::allocator { + typedef typename std::allocator::pointer pointer; + typedef typename std::allocator::size_type size_type; + + explicit PageStdAllocator(PageAllocator& allocator): allocator_(allocator) {} + template PageStdAllocator(const PageStdAllocator& other) + : allocator_(other.allocator_) {} + + inline pointer allocate(size_type n, const void* = 0) { + return static_cast(allocator_.Alloc(sizeof(T) * n)); + } + + inline void deallocate(pointer, size_type) { + // The PageAllocator doesn't free. + } + + template struct rebind { + typedef PageStdAllocator other; + }; + + private: + // Silly workaround for the gcc from Android's ndk (gcc 4.6), which will + // otherwise complain that `other.allocator_` is private in the constructor + // code. + template friend struct PageStdAllocator; + + PageAllocator& allocator_; +}; + +// A wasteful vector is a std::vector, except that it allocates memory from a +// PageAllocator. It's wasteful because, when resizing, it always allocates a +// whole new array since the PageAllocator doesn't support realloc. +template +class wasteful_vector : public std::vector > { + public: + wasteful_vector(PageAllocator* allocator, unsigned size_hint = 16) + : std::vector >(PageStdAllocator(*allocator)) { + std::vector >::reserve(size_hint); + } +}; + +} // namespace google_breakpad + +inline void* operator new(size_t nbytes, + google_breakpad::PageAllocator& allocator) { + return allocator.Alloc(nbytes); +} + +#endif // GOOGLE_BREAKPAD_COMMON_MEMORY_H_ diff --git a/Telegram/ThirdParty/breakpad/common/string_conversion.cc b/Telegram/ThirdParty/breakpad/common/string_conversion.cc new file mode 100644 index 00000000000000..9c0d623fc1043f --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/string_conversion.cc @@ -0,0 +1,155 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#include + +#include "common/convert_UTF.h" +#include "common/scoped_ptr.h" +#include "common/string_conversion.h" +#include "common/using_std_string.h" + +namespace google_breakpad { + +using std::vector; + +void UTF8ToUTF16(const char *in, vector *out) { + size_t source_length = strlen(in); + const UTF8 *source_ptr = reinterpret_cast(in); + const UTF8 *source_end_ptr = source_ptr + source_length; + // Erase the contents and zero fill to the expected size + out->clear(); + out->insert(out->begin(), source_length, 0); + uint16_t *target_ptr = &(*out)[0]; + uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t); + ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, + &target_ptr, target_end_ptr, + strictConversion); + + // Resize to be the size of the # of converted characters + NULL + out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); +} + +int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]) { + const UTF8 *source_ptr = reinterpret_cast(in); + const UTF8 *source_end_ptr = source_ptr + sizeof(char); + uint16_t *target_ptr = out; + uint16_t *target_end_ptr = target_ptr + 2 * sizeof(uint16_t); + out[0] = out[1] = 0; + + // Process one character at a time + while (1) { + ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, + &target_ptr, target_end_ptr, + strictConversion); + + if (result == conversionOK) + return static_cast(source_ptr - reinterpret_cast(in)); + + // Add another character to the input stream and try again + source_ptr = reinterpret_cast(in); + ++source_end_ptr; + + if (source_end_ptr > reinterpret_cast(in) + in_length) + break; + } + + return 0; +} + +void UTF32ToUTF16(const wchar_t *in, vector *out) { + size_t source_length = wcslen(in); + const UTF32 *source_ptr = reinterpret_cast(in); + const UTF32 *source_end_ptr = source_ptr + source_length; + // Erase the contents and zero fill to the expected size + out->clear(); + out->insert(out->begin(), source_length, 0); + uint16_t *target_ptr = &(*out)[0]; + uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t); + ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, + &target_ptr, target_end_ptr, + strictConversion); + + // Resize to be the size of the # of converted characters + NULL + out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); +} + +void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]) { + const UTF32 *source_ptr = reinterpret_cast(&in); + const UTF32 *source_end_ptr = source_ptr + 1; + uint16_t *target_ptr = out; + uint16_t *target_end_ptr = target_ptr + 2 * sizeof(uint16_t); + out[0] = out[1] = 0; + ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, + &target_ptr, target_end_ptr, + strictConversion); + + if (result != conversionOK) { + out[0] = out[1] = 0; + } +} + +static inline uint16_t Swap(uint16_t value) { + return (value >> 8) | static_cast(value << 8); +} + +string UTF16ToUTF8(const vector &in, bool swap) { + const UTF16 *source_ptr = &in[0]; + scoped_array source_buffer; + + // If we're to swap, we need to make a local copy and swap each byte pair + if (swap) { + int idx = 0; + source_buffer.reset(new uint16_t[in.size()]); + UTF16 *source_buffer_ptr = source_buffer.get(); + for (vector::const_iterator it = in.begin(); + it != in.end(); ++it, ++idx) + source_buffer_ptr[idx] = Swap(*it); + + source_ptr = source_buffer.get(); + } + + // The maximum expansion would be 4x the size of the input string. + const UTF16 *source_end_ptr = source_ptr + in.size(); + size_t target_capacity = in.size() * 4; + scoped_array target_buffer(new UTF8[target_capacity]); + UTF8 *target_ptr = target_buffer.get(); + UTF8 *target_end_ptr = target_ptr + target_capacity; + ConversionResult result = ConvertUTF16toUTF8(&source_ptr, source_end_ptr, + &target_ptr, target_end_ptr, + strictConversion); + + if (result == conversionOK) { + const char *targetPtr = reinterpret_cast(target_buffer.get()); + return targetPtr; + } + + return ""; +} + +} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/string_conversion.h b/Telegram/ThirdParty/breakpad/common/string_conversion.h new file mode 100644 index 00000000000000..b9ba96a2e17a6e --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/string_conversion.h @@ -0,0 +1,68 @@ +// Copyright (c) 2006, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// string_conversion.h: Conversion between different UTF-8/16/32 encodings. + +#ifndef COMMON_STRING_CONVERSION_H__ +#define COMMON_STRING_CONVERSION_H__ + +#include +#include + +#include "common/using_std_string.h" +#include "google_breakpad/common/breakpad_types.h" + +namespace google_breakpad { + +using std::vector; + +// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the +// conversion failed, |out| will be zero length. +void UTF8ToUTF16(const char *in, vector *out); + +// Convert at least one character (up to a maximum of |in_length|) from |in| +// to UTF-16 into |out|. Return the number of characters consumed from |in|. +// Any unused characters in |out| will be initialized to 0. No memory will +// be allocated by this routine. +int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]); + +// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the +// conversion failed, |out| will be zero length. +void UTF32ToUTF16(const wchar_t *in, vector *out); + +// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be +// initialized to 0. No memory will be allocated by this routine. +void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]); + +// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. +string UTF16ToUTF8(const vector &in, bool swap); + +} // namespace google_breakpad + +#endif // COMMON_STRING_CONVERSION_H__ diff --git a/Telegram/ThirdParty/breakpad/common/using_std_string.h b/Telegram/ThirdParty/breakpad/common/using_std_string.h new file mode 100644 index 00000000000000..13c1da59ccb5ff --- /dev/null +++ b/Telegram/ThirdParty/breakpad/common/using_std_string.h @@ -0,0 +1,65 @@ +// -*- mode: C++ -*- + +// Copyright (c) 2012, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Original author: Ivan Penkov + +// using_std_string.h: Allows building this code in environments where +// global string (::string) exists. +// +// The problem: +// ------------- +// Let's say you want to build this code in an environment where a global +// string type is defined (i.e. ::string). Now, let's suppose that ::string +// is different that std::string and you'd like to have the option to easily +// choose between the two string types. Ideally you'd like to control which +// string type is chosen by simply #defining an identifier. +// +// The solution: +// ------------- +// #define HAS_GLOBAL_STRING somewhere in a global header file and then +// globally replace std::string with string. Then include this header +// file everywhere where string is used. If you want to revert back to +// using std::string, simply remove the #define (HAS_GLOBAL_STRING). + +#ifndef THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ +#define THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ + +#ifdef HAS_GLOBAL_STRING + typedef ::string google_breakpad_string; +#else + using std::string; + typedef std::string google_breakpad_string; +#endif + +// Inicates that type google_breakpad_string is defined +#define HAS_GOOGLE_BREAKPAD_STRING + +#endif // THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h new file mode 100644 index 00000000000000..918544b66238d5 --- /dev/null +++ b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h @@ -0,0 +1,107 @@ +// Copyright (c) 2007, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ + +// minidump_size.h: Provides a C++ template for programmatic access to +// the sizes of various types defined in minidump_format.h. +// +// Author: Mark Mentovai + +#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ +#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ + +#include + +#include "google_breakpad/common/minidump_format.h" + +namespace google_breakpad { + +template +class minidump_size { + public: + static size_t size() { return sizeof(T); } +}; + +// Explicit specializations for variable-length types. The size returned +// for these should be the size for an object without its variable-length +// section. + +template<> +class minidump_size { + public: + static size_t size() { return MDString_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDRawThreadList_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDCVInfoPDB20_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDCVInfoPDB70_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDImageDebugMisc_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDRawModuleList_minsize; } +}; + +template<> +class minidump_size { + public: + static size_t size() { return MDRawMemoryList_minsize; } +}; + +// Explicit specialization for MDRawModule, for which sizeof may include +// tail-padding on some architectures but not others. + +template<> +class minidump_size { + public: + static size_t size() { return MD_MODULE_SIZE; } +}; + +} // namespace google_breakpad + +#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ diff --git a/Telegram/ThirdParty/minizip/ioapi.c b/Telegram/ThirdParty/minizip/ioapi.c new file mode 100644 index 00000000000000..7f5c191b2afd16 --- /dev/null +++ b/Telegram/ThirdParty/minizip/ioapi.c @@ -0,0 +1,247 @@ +/* ioapi.h -- IO base function header for compress/uncompress .zip + part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) + + Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) + + Modifications for Zip64 support + Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) + + For more info read MiniZip_info.txt + +*/ + +#if defined(_WIN32) && (!(defined(_CRT_SECURE_NO_WARNINGS))) + #define _CRT_SECURE_NO_WARNINGS +#endif + +#if defined(__APPLE__) || defined(IOAPI_NO_64) +// In darwin and perhaps other BSD variants off_t is a 64 bit value, hence no need for specific 64 bit functions +#define FOPEN_FUNC(filename, mode) fopen(filename, mode) +#define FTELLO_FUNC(stream) ftello(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko(stream, offset, origin) +#else +#define FOPEN_FUNC(filename, mode) fopen64(filename, mode) +#define FTELLO_FUNC(stream) ftello64(stream) +#define FSEEKO_FUNC(stream, offset, origin) fseeko64(stream, offset, origin) +#endif + + +#include "ioapi.h" + +voidpf call_zopen64 (const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode) +{ + if (pfilefunc->zfile_func64.zopen64_file != NULL) + return (*(pfilefunc->zfile_func64.zopen64_file)) (pfilefunc->zfile_func64.opaque,filename,mode); + else + { + return (*(pfilefunc->zopen32_file))(pfilefunc->zfile_func64.opaque,(const char*)filename,mode); + } +} + +long call_zseek64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.zseek64_file)) (pfilefunc->zfile_func64.opaque,filestream,offset,origin); + else + { + uLong offsetTruncated = (uLong)offset; + if (offsetTruncated != offset) + return -1; + else + return (*(pfilefunc->zseek32_file))(pfilefunc->zfile_func64.opaque,filestream,offsetTruncated,origin); + } +} + +ZPOS64_T call_ztell64 (const zlib_filefunc64_32_def* pfilefunc,voidpf filestream) +{ + if (pfilefunc->zfile_func64.zseek64_file != NULL) + return (*(pfilefunc->zfile_func64.ztell64_file)) (pfilefunc->zfile_func64.opaque,filestream); + else + { + uLong tell_uLong = (*(pfilefunc->ztell32_file))(pfilefunc->zfile_func64.opaque,filestream); + if ((tell_uLong) == MAXU32) + return (ZPOS64_T)-1; + else + return tell_uLong; + } +} + +void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32) +{ + p_filefunc64_32->zfile_func64.zopen64_file = NULL; + p_filefunc64_32->zopen32_file = p_filefunc32->zopen_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.zread_file = p_filefunc32->zread_file; + p_filefunc64_32->zfile_func64.zwrite_file = p_filefunc32->zwrite_file; + p_filefunc64_32->zfile_func64.ztell64_file = NULL; + p_filefunc64_32->zfile_func64.zseek64_file = NULL; + p_filefunc64_32->zfile_func64.zclose_file = p_filefunc32->zclose_file; + p_filefunc64_32->zfile_func64.zerror_file = p_filefunc32->zerror_file; + p_filefunc64_32->zfile_func64.opaque = p_filefunc32->opaque; + p_filefunc64_32->zseek32_file = p_filefunc32->zseek_file; + p_filefunc64_32->ztell32_file = p_filefunc32->ztell_file; +} + + + +static voidpf ZCALLBACK fopen_file_func OF((voidpf opaque, const char* filename, int mode)); +static uLong ZCALLBACK fread_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); +static uLong ZCALLBACK fwrite_file_func OF((voidpf opaque, voidpf stream, const void* buf,uLong size)); +static ZPOS64_T ZCALLBACK ftell64_file_func OF((voidpf opaque, voidpf stream)); +static long ZCALLBACK fseek64_file_func OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); +static int ZCALLBACK fclose_file_func OF((voidpf opaque, voidpf stream)); +static int ZCALLBACK ferror_file_func OF((voidpf opaque, voidpf stream)); + +static voidpf ZCALLBACK fopen_file_func (voidpf opaque, const char* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = fopen(filename, mode_fopen); + return file; +} + +static voidpf ZCALLBACK fopen64_file_func (voidpf opaque, const void* filename, int mode) +{ + FILE* file = NULL; + const char* mode_fopen = NULL; + if ((mode & ZLIB_FILEFUNC_MODE_READWRITEFILTER)==ZLIB_FILEFUNC_MODE_READ) + mode_fopen = "rb"; + else + if (mode & ZLIB_FILEFUNC_MODE_EXISTING) + mode_fopen = "r+b"; + else + if (mode & ZLIB_FILEFUNC_MODE_CREATE) + mode_fopen = "wb"; + + if ((filename!=NULL) && (mode_fopen != NULL)) + file = FOPEN_FUNC((const char*)filename, mode_fopen); + return file; +} + + +static uLong ZCALLBACK fread_file_func (voidpf opaque, voidpf stream, void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fread(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static uLong ZCALLBACK fwrite_file_func (voidpf opaque, voidpf stream, const void* buf, uLong size) +{ + uLong ret; + ret = (uLong)fwrite(buf, 1, (size_t)size, (FILE *)stream); + return ret; +} + +static long ZCALLBACK ftell_file_func (voidpf opaque, voidpf stream) +{ + long ret; + ret = ftell((FILE *)stream); + return ret; +} + + +static ZPOS64_T ZCALLBACK ftell64_file_func (voidpf opaque, voidpf stream) +{ + ZPOS64_T ret; + ret = FTELLO_FUNC((FILE *)stream); + return ret; +} + +static long ZCALLBACK fseek_file_func (voidpf opaque, voidpf stream, uLong offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + if (fseek((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + return ret; +} + +static long ZCALLBACK fseek64_file_func (voidpf opaque, voidpf stream, ZPOS64_T offset, int origin) +{ + int fseek_origin=0; + long ret; + switch (origin) + { + case ZLIB_FILEFUNC_SEEK_CUR : + fseek_origin = SEEK_CUR; + break; + case ZLIB_FILEFUNC_SEEK_END : + fseek_origin = SEEK_END; + break; + case ZLIB_FILEFUNC_SEEK_SET : + fseek_origin = SEEK_SET; + break; + default: return -1; + } + ret = 0; + + if(FSEEKO_FUNC((FILE *)stream, offset, fseek_origin) != 0) + ret = -1; + + return ret; +} + + +static int ZCALLBACK fclose_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = fclose((FILE *)stream); + return ret; +} + +static int ZCALLBACK ferror_file_func (voidpf opaque, voidpf stream) +{ + int ret; + ret = ferror((FILE *)stream); + return ret; +} + +void fill_fopen_filefunc (pzlib_filefunc_def) + zlib_filefunc_def* pzlib_filefunc_def; +{ + pzlib_filefunc_def->zopen_file = fopen_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell_file = ftell_file_func; + pzlib_filefunc_def->zseek_file = fseek_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} + +void fill_fopen64_filefunc (zlib_filefunc64_def* pzlib_filefunc_def) +{ + pzlib_filefunc_def->zopen64_file = fopen64_file_func; + pzlib_filefunc_def->zread_file = fread_file_func; + pzlib_filefunc_def->zwrite_file = fwrite_file_func; + pzlib_filefunc_def->ztell64_file = ftell64_file_func; + pzlib_filefunc_def->zseek64_file = fseek64_file_func; + pzlib_filefunc_def->zclose_file = fclose_file_func; + pzlib_filefunc_def->zerror_file = ferror_file_func; + pzlib_filefunc_def->opaque = NULL; +} diff --git a/Telegram/ThirdParty/minizip/zip.c b/Telegram/ThirdParty/minizip/zip.c index ea54853e858a7f..3c1a7bff25b970 100644 --- a/Telegram/ThirdParty/minizip/zip.c +++ b/Telegram/ThirdParty/minizip/zip.c @@ -1411,7 +1411,7 @@ extern int ZEXPORT zipWriteInFileInZip (zipFile file,const void* buf,unsigned in if (zi->in_opened_file_inzip == 0) return ZIP_PARAMERROR; - zi->ci.crc32 = crc32(zi->ci.crc32,buf,(uInt)len); + zi->ci.crc32 = crc32(zi->ci.crc32,(const Bytef *)buf,(uInt)len); #ifdef HAVE_BZIP2 if(zi->ci.method == Z_BZIP2ED && (!zi->ci.raw)) From b1f267e4dcaaf928cad89b7d2d88cf1a45b166ce Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Feb 2016 13:39:51 +0300 Subject: [PATCH 022/133] added breakpad for linux --- Telegram/Telegram.pro | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 64d4739b0b8def..b0ea1e9d8ce1cc 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -273,11 +273,16 @@ HEADERS += \ ./SourceFiles/pspecific_mac.h } +SOURCES += \ + ./ThirdParty/minizip/zip.c \ + ./ThirdParty/minizip/ioapi.c + CONFIG += precompile_header PRECOMPILED_HEADER = ./SourceFiles/stdafx.h QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-switch -Wno-comment -Wno-unused-but-set-variable +QMAKE_CFLAGS_WARN_ON += -Wno-unused-result -Wno-unused-parameter -Wno-unused-variable -Wno-switch -Wno-comment -Wno-unused-but-set-variable CONFIG(release, debug|release) { QMAKE_CXXFLAGS_RELEASE -= -O2 @@ -294,7 +299,9 @@ INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ ./../../Libraries/QtStatic/qtbase/include\ /usr/local/include/opus\ ./SourceFiles\ - ./GeneratedFiles + ./GeneratedFiles\ + ./ThirdParty/minizip\ + ./../../Libraries/breakpad/src INCLUDEPATH += "/usr/include/libappindicator-0.1" INCLUDEPATH += "/usr/include/gtk-2.0" @@ -311,11 +318,13 @@ INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/dee-1.0" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" -LIBS += -lcrypto -lssl -lz -ldl -llzma -lexif -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva +LIBS += -lcrypto -lssl -ldl -llzma -lexif -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a +LIBS += /usr/local/lib/libz.a LIBS += /usr/local/lib/libxkbcommon.a +LIBS += ./../../../Libraries/breakpad/src/client/linux/libbreakpad_client.a RESOURCES += \ ./SourceFiles/telegram.qrc \ From fa2767cc656d0f034fdc7f218147d9af4d3b883a Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Feb 2016 14:09:11 +0300 Subject: [PATCH 023/133] always writing tdata/working stacktrace when breakpad catches a crash --- Telegram/SourceFiles/logs.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 086c7b46125f83..bebdd736b0f116 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -389,8 +389,6 @@ namespace Logs { return false; } - - if (LogsInMemory) { t_assert(LogsInMemory != DeletedLogsInMemory); LogsInMemoryList list = *LogsInMemory; @@ -720,7 +718,9 @@ namespace SignalHandlers { } if (name) { dump() << "Caught signal " << signum << " (" << name << ") in thread " << uint64(thread) << "\n"; - } else { + } else if (signum == -1) { + dump() << "Google Breakpad caught a crash, minidump written in thread " << uint64(thread) << "\n"; + } else { dump() << "Caught signal " << signum << " in thread " << uint64(thread) << "\n"; } @@ -809,9 +809,7 @@ namespace SignalHandlers { bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, bool success) #endif { -#ifdef Q_OS_MAC Handler(-1, 0, 0); -#endif return success; } From 9f7b92eccd6dfca201cbef9d947103d7b9016b8d Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Feb 2016 14:50:07 +0300 Subject: [PATCH 024/133] improved minidump choosing when sending crash report --- Telegram/SourceFiles/logs.cpp | 32 +++++++++++++++++++ Telegram/SourceFiles/logs.h | 1 + Telegram/SourceFiles/window.cpp | 56 ++++++++++++++++++++------------- 3 files changed, 68 insertions(+), 21 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index bebdd736b0f116..54e754364a5244 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -600,6 +600,19 @@ namespace SignalHandlers { return stream; } + const dump &operator<<(const dump &stream, const wchar_t *str) { + if (!CrashDumpFile) return stream; + + for (int i = 0, l = wcslen(str); i < l; ++i) { + if (str[i] >= 0 && str[i] < 128) { + _writeChar(char(str[i])); + } else { + _writeChar('?'); + } + } + return stream; + } + template const dump &_writeNumber(const dump &stream, Type number) { if (!CrashDumpFile) return stream; @@ -658,6 +671,9 @@ namespace SignalHandlers { bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; + const char *BreakpadDumpPath = 0; + const wchar_t *BreakpadDumpPathW = 0; + // see https://github.com/benbjohnson/bandicoot #if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 struct sigaction SIG_def[32]; @@ -720,6 +736,11 @@ namespace SignalHandlers { dump() << "Caught signal " << signum << " (" << name << ") in thread " << uint64(thread) << "\n"; } else if (signum == -1) { dump() << "Google Breakpad caught a crash, minidump written in thread " << uint64(thread) << "\n"; + if (BreakpadDumpPath) { + dump() << "Minidump: " << BreakpadDumpPath << "\n"; + } else if (BreakpadDumpPathW) { + dump() << "Minidump: " << BreakpadDumpPathW << "\n"; + } } else { dump() << "Caught signal " << signum << " in thread " << uint64(thread) << "\n"; } @@ -809,7 +830,18 @@ namespace SignalHandlers { bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, bool success) #endif { +#ifdef Q_OS_WIN + BreakpadDumpPathW = _minidump_id; + Handler(-1); +#else + +#ifdef Q_OS_MAC + BreakpadDumpPath = _minidump_id; +#else + BreakpadDumpPath = md.path(); +#endif Handler(-1, 0, 0); +#endif return success; } diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 9deebadb1ca5fc..e8e2c99984a7cb 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -92,6 +92,7 @@ namespace SignalHandlers { ~dump(); }; const dump &operator<<(const dump &stream, const char *str); + const dump &operator<<(const dump &stream, const wchar_t *str); const dump &operator<<(const dump &stream, int num); const dump &operator<<(const dump &stream, unsigned int num); const dump &operator<<(const dump &stream, unsigned long num); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index d4ae8fc39839da..9e3c8ccff706bf 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2018,28 +2018,42 @@ LastCrashedWindow::LastCrashedWindow() { if (_sendingState != SendingNoReport) { - QString maxDump, maxDumpFull; - QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified(); - qint64 maxDumpSize = 0; - QFileInfoList list = QDir(cWorkingDir() + qsl("tdumps")).entryInfoList(); - for (int32 i = 0, l = list.size(); i < l; ++i) { - QString name = list.at(i).fileName(); - if (name.endsWith(qstr(".dmp"))) { - QDateTime modified = list.at(i).lastModified(); - if (maxDump.isEmpty() || qAbs(workingModified.secsTo(modified)) < qAbs(workingModified.secsTo(maxDumpModified))) { - maxDump = name; - maxDumpModified = modified; - maxDumpFull = list.at(i).absoluteFilePath(); - maxDumpSize = list.at(i).size(); - } - } - } - if (!maxDump.isEmpty() && qAbs(workingModified.secsTo(maxDumpModified)) < 10) { - _minidumpName = maxDump; - _minidumpFull = maxDumpFull; - } + qint64 dumpSize = 0; + QString possibleDump = getReportField(qstr("minidump"), qstr("Minidump:")); + if (!possibleDump.isEmpty()) { + if (!possibleDump.startsWith('/')) { + possibleDump = cWorkingDir() + qsl("tdumps/") + possibleDump; + } + QFileInfo possibleInfo(possibleDump); + if (possibleInfo.exists()) { + _minidumpName = possibleInfo.fileName(); + _minidumpFull = possibleInfo.absoluteFilePath(); + dumpSize = possibleInfo.size(); + } + } + if (_minidumpFull.isEmpty()) { + QString maxDump, maxDumpFull; + QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified(); + QFileInfoList list = QDir(cWorkingDir() + qsl("tdumps")).entryInfoList(); + for (int32 i = 0, l = list.size(); i < l; ++i) { + QString name = list.at(i).fileName(); + if (name.endsWith(qstr(".dmp"))) { + QDateTime modified = list.at(i).lastModified(); + if (maxDump.isEmpty() || qAbs(workingModified.secsTo(modified)) < qAbs(workingModified.secsTo(maxDumpModified))) { + maxDump = name; + maxDumpModified = modified; + maxDumpFull = list.at(i).absoluteFilePath(); + dumpSize = list.at(i).size(); + } + } + } + if (!maxDump.isEmpty() && qAbs(workingModified.secsTo(maxDumpModified)) < 10) { + _minidumpName = maxDump; + _minidumpFull = maxDumpFull; + } + } - _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(maxDumpSize / 1024)); + _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(dumpSize / 1024)); } _networkSettings.setText(qsl("NETWORK SETTINGS")); From 44c12064a65847b0451b9ea7c14e3fb20841f7ae Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 1 Feb 2016 15:09:23 +0300 Subject: [PATCH 025/133] fixed crash reports for windows --- Telegram/SourceFiles/logs.cpp | 2 +- Telegram/SourceFiles/window.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 54e754364a5244..78c6f4437db658 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -19,7 +19,7 @@ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #include "stdafx.h" -#include +#include #include "pspecific.h" // see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/ diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9e3c8ccff706bf..e675b15bb2a678 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2024,6 +2024,9 @@ LastCrashedWindow::LastCrashedWindow() if (!possibleDump.startsWith('/')) { possibleDump = cWorkingDir() + qsl("tdumps/") + possibleDump; } + if (!possibleDump.endsWith('.dmp')) { + possibleDump += qsl(".dmp"); + } QFileInfo possibleInfo(possibleDump); if (possibleInfo.exists()) { _minidumpName = possibleInfo.fileName(); From 5940ae6411e6e67702d9093af90926d6424c66dc Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Feb 2016 14:48:46 +0300 Subject: [PATCH 026/133] google crashpad added to os x version --- Telegram/SourceFiles/logs.cpp | 119 +++++---- Telegram/SourceFiles/pspecific_mac.cpp | 4 + Telegram/SourceFiles/settings.cpp | 42 ++- Telegram/SourceFiles/settings.h | 1 + Telegram/SourceFiles/window.cpp | 7 +- Telegram/Telegram.xcodeproj/project.pbxproj | 276 +++----------------- 6 files changed, 137 insertions(+), 312 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index bebdd736b0f116..a3cb642ea7beaa 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -26,7 +26,13 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #ifdef Q_OS_WIN #include "client/windows/handler/exception_handler.h" #elif defined Q_OS_MAC + +#ifdef MAC_USE_BREAKPAD #include "client/mac/handler/exception_handler.h" +#else +#include "client/crashpad_client.h" +#endif + #elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 #include "client/linux/handler/exception_handler.h" #endif @@ -658,6 +664,9 @@ namespace SignalHandlers { bool LoggingCrashHeaderWritten = false; QMutex LoggingCrashMutex; + typedef std::map AnnotationsMap; + AnnotationsMap ProcessAnnotations; + // see https://github.com/benbjohnson/bandicoot #if defined Q_OS_MAC || defined Q_OS_LINUX32 || defined Q_OS_LINUX64 struct sigaction SIG_def[32]; @@ -691,28 +700,9 @@ namespace SignalHandlers { if (!LoggingCrashHeaderWritten) { LoggingCrashHeaderWritten = true; - dump() << "Binary: " << LaunchedBinaryName << "\n"; - dump() << "ApiId: " << ApiId << "\n"; - if (cBetaVersion()) { - dump() << "Version: " << cBetaVersion() << " beta\n"; - } else { - dump() << "Version: " << AppVersion; - if (cDevVersion()) { - dump() << " dev\n"; - } else { - dump() << "\n"; - } + for (AnnotationsMap::const_iterator i = ProcessAnnotations.cbegin(), e = ProcessAnnotations.cend(); i != e; ++i) { + dump() << i->first.c_str() << ": " << i->second.c_str() << "\n"; } - dump() << "Launched: " << LaunchedDateTimeStr << "\n"; - dump() << "Platform: "; - switch (cPlatform()) { - case dbipWindows: dump() << "win"; break; - case dbipMac: dump() << "mac"; break; - case dbipMacOld: dump() << "macold"; break; - case dbipLinux64: dump() << "linux64"; break; - case dbipLinux32: dump() << "linux32"; break; - } - dump() << "\n"; psWriteDump(); dump() << "\n"; } @@ -799,6 +789,8 @@ namespace SignalHandlers { LoggingCrashThreadId = 0; } + bool SetSignalHandlers = true; +#if !defined Q_OS_MAC || defined MAC_USE_BREAKPAD google_breakpad::ExceptionHandler* BreakpadExceptionHandler = 0; #ifdef Q_OS_WIN @@ -812,31 +804,54 @@ namespace SignalHandlers { Handler(-1, 0, 0); return success; } +#endif void StartBreakpad() { - QString dumpPath = cWorkingDir() + qsl("tdumps"); - QDir().mkpath(dumpPath); + 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(); + + QString dumpspath = cWorkingDir() + qsl("tdata/dumps"); + QDir().mkpath(dumpspath); #ifdef Q_OS_WIN BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - dumpPath.toStdWString(), + dumpspath.toStdWString(), /*FilterCallback*/ 0, DumpCallback, /*context*/ 0, true ); #elif defined Q_OS_MAC + +#ifdef MAC_USE_BREAKPAD BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - dumpPath.toStdString(), + dumpspath.toUtf8().toStdString(), /*FilterCallback*/ 0, DumpCallback, /*context*/ 0, true, 0 ); + 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(); + if (crashpad_client.StartHandler(base::FilePath(handler), + base::FilePath(database), + std::string(), + ProcessAnnotations, + std::vector(), + false)) { + crashpad_client.UseHandler(); + } +#endif #elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - google_breakpad::MinidumpDescriptor(dumpPath.toStdString()), + google_breakpad::MinidumpDescriptor(dumpspath.toUtf8().toStdString()), /*FilterCallback*/ 0, DumpCallback, /*context*/ 0, @@ -847,11 +862,13 @@ namespace SignalHandlers { } void FinishBreakpad() { +#if !defined Q_OS_MAC || defined MAC_USE_BREAKPAD if (BreakpadExceptionHandler) { google_breakpad::ExceptionHandler *h = BreakpadExceptionHandler; BreakpadExceptionHandler = 0; delete h; } +#endif } Status start() { @@ -882,36 +899,27 @@ namespace SignalHandlers { CrashDumpFile = fopen(CrashDumpPath.constData(), "wb"); if (CrashDumpFile) { CrashDumpFileNo = fileno(CrashDumpFile); - - QByteArray launchedDateTime = QDateTime::currentDateTime().toString("dd.MM.yyyy hh:mm:ss").toUtf8(); - t_assert(launchedDateTime.size() < int(sizeof(LaunchedDateTimeStr))); - memcpy(LaunchedDateTimeStr, launchedDateTime.constData(), launchedDateTime.size()); - - QByteArray launchedBinaryName = cExeName().toUtf8(); - t_assert(launchedBinaryName.size() < int(sizeof(LaunchedBinaryName))); - memcpy(LaunchedBinaryName, launchedBinaryName.constData(), launchedBinaryName.size()); - + if (SetSignalHandlers) { #ifndef Q_OS_WIN - struct sigaction sigact; - - sigact.sa_sigaction = SignalHandlers::Handler; - sigemptyset(&sigact.sa_mask); - sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; - -#ifndef Q_OS_MAC // let breakpad handle this - sigaction(SIGABRT, &sigact, &SIG_def[SIGABRT]); -#endif - sigaction(SIGSEGV, &sigact, &SIG_def[SIGSEGV]); - sigaction(SIGILL, &sigact, &SIG_def[SIGILL]); - sigaction(SIGFPE, &sigact, &SIG_def[SIGFPE]); - sigaction(SIGBUS, &sigact, &SIG_def[SIGBUS]); - sigaction(SIGSYS, &sigact, &SIG_def[SIGSYS]); + struct sigaction sigact; + + sigact.sa_sigaction = SignalHandlers::Handler; + sigemptyset(&sigact.sa_mask); + sigact.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO; + + sigaction(SIGABRT, &sigact, &SIG_def[SIGABRT]); + sigaction(SIGSEGV, &sigact, &SIG_def[SIGSEGV]); + sigaction(SIGILL, &sigact, &SIG_def[SIGILL]); + sigaction(SIGFPE, &sigact, &SIG_def[SIGFPE]); + sigaction(SIGBUS, &sigact, &SIG_def[SIGBUS]); + sigaction(SIGSYS, &sigact, &SIG_def[SIGSYS]); #else - signal(SIGABRT, SignalHandlers::Handler); - signal(SIGSEGV, SignalHandlers::Handler); - signal(SIGILL, SignalHandlers::Handler); - signal(SIGFPE, SignalHandlers::Handler); + signal(SIGABRT, SignalHandlers::Handler); + signal(SIGSEGV, SignalHandlers::Handler); + signal(SIGILL, SignalHandlers::Handler); + signal(SIGFPE, SignalHandlers::Handler); #endif + } return Started; } @@ -921,10 +929,7 @@ namespace SignalHandlers { } void finish() { - if (BreakpadExceptionHandler) { - delete BreakpadExceptionHandler; - BreakpadExceptionHandler = 0; - } + FinishBreakpad(); if (CrashDumpFile) { fclose(CrashDumpFile); unlink(CrashDumpPath.constData()); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index e86334561ff8f5..2b51f85b883d31 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -688,6 +688,10 @@ QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile) { result.append(qstr("BAD LINE: ")).append(line).append('\n'); continue; } + if (lst.size() > 5 && lst.at(3) == qsl("0x0") && lst.at(4) == qsl("+") && lst.at(5) == qsl("1")) { + result.append(qsl("(0x1 separator)\n")); + continue; + } if (i - start < atos.size()) { if (!atos.at(i - start).isEmpty()) { result.append(atos.at(i - start)).append('\n'); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 7d77c05eef6dc7..e17e7f0eaafd11 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -139,19 +139,17 @@ bool gCustomNotifies = true; #ifdef Q_OS_WIN DBIPlatform gPlatform = dbipWindows; -QUrl gUpdateURL = QUrl(qsl("http://tdesktop.com/win/tupdates/current")); #elif defined Q_OS_MAC DBIPlatform gPlatform = dbipMac; -QUrl gUpdateURL = QUrl(qsl("http://tdesktop.com/mac/tupdates/current")); -#elif defined Q_OS_LINUX32 -DBIPlatform gPlatform = dbipLinux32; -QUrl gUpdateURL = QUrl(qsl("http://tdesktop.com/linux32/tupdates/current")); #elif defined Q_OS_LINUX64 DBIPlatform gPlatform = dbipLinux64; -QUrl gUpdateURL = QUrl(qsl("http://tdesktop.com/linux/tupdates/current")); +#elif defined Q_OS_LINUX32 +DBIPlatform gPlatform = dbipLinux32; #else #error Unknown platform #endif +QString gPlatformString; +QUrl gUpdateURL; bool gIsElCapitan = false; bool gContactsReceived = false; @@ -183,14 +181,36 @@ bool gAutoPlayGif = true; void settingsParseArgs(int argc, char *argv[]) { #ifdef Q_OS_MAC - gIsElCapitan = (QSysInfo::macVersion() >= QSysInfo::MV_10_11); - if (QSysInfo::macVersion() < QSysInfo::MV_10_8) { - gUpdateURL = QUrl(qsl("http://tdesktop.com/mac32/tupdates/current")); + if (QSysInfo::macVersion() >= QSysInfo::MV_10_11) { + gIsElCapitan = true; + } else if (QSysInfo::macVersion() < QSysInfo::MV_10_8) { gPlatform = dbipMacOld; - } else { - gCustomNotifies = false; } #endif + + switch (cPlatform()) { + case dbipWindows: + gUpdateURL = QUrl(qsl("http://tdesktop.com/win/tupdates/current")); + gPlatformString = qsl("Windows"); + break; + case dbipMac: + gUpdateURL = QUrl(qsl("http://tdesktop.com/mac/tupdates/current")); + gPlatformString = qsl("MacOS"); + gCustomNotifies = false; + break; + case dbipMacOld: + gUpdateURL = QUrl(qsl("http://tdesktop.com/mac32/tupdates/current")); + gPlatformString = qsl("MacOSold"); + break; + case dbipLinux64: + gUpdateURL = QUrl(qsl("http://tdesktop.com/linux/tupdates/current")); + gPlatformString = qsl("Linux64bit"); + break; + case dbipLinux32: + gUpdateURL = QUrl(qsl("http://tdesktop.com/linux32/tupdates/current")); + gPlatformString = qsl("Linux32bit"); + break; + } QStringList args; for (int32 i = 0; i < argc; ++i) { diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 3272b833644ee9..42554b7440d046 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -317,6 +317,7 @@ DeclareSetting(int32, IntRetinaFactor); DeclareSetting(bool, CustomNotifies); DeclareReadSetting(DBIPlatform, Platform); +DeclareReadSetting(QString, PlatformString); DeclareReadSetting(bool, IsElCapitan); DeclareReadSetting(QUrl, UpdateURL); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index d4ae8fc39839da..f23b0a5a33f635 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2021,7 +2021,11 @@ LastCrashedWindow::LastCrashedWindow() QString maxDump, maxDumpFull; QDateTime maxDumpModified, workingModified = QFileInfo(cWorkingDir() + qsl("tdata/working")).lastModified(); qint64 maxDumpSize = 0; - QFileInfoList list = QDir(cWorkingDir() + qsl("tdumps")).entryInfoList(); + QString dumpspath = cWorkingDir() + qsl("tdata/dumps"); +#if defined Q_OS_MAC && !defined MAC_USE_BREAKPAD + dumpspath += qsl("/completed"); +#endif + QFileInfoList list = QDir(dumpspath).entryInfoList(); for (int32 i = 0, l = list.size(); i < l; ++i) { QString name = list.at(i).fileName(); if (name.endsWith(qstr(".dmp"))) { @@ -2286,6 +2290,7 @@ void LastCrashedWindow::onCheckingFinished() { return; } else if (result != "Report") { _pleaseSendReport.setText(qsl("This report is about some old version of Telegram Desktop.")); + _pleaseSendReport.setText(qsl("Response: %1").arg(QString::fromLatin1(result))); _sendingState = SendingTooOld; updateControls(); return; diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index ea1644d6de69cb..121a09c1cb18b3 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -45,23 +45,6 @@ 07129D6A1C16D230002DC495 /* mtpAuthKey.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D691C16D230002DC495 /* mtpAuthKey.cpp */; }; 07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D6C1C16D245002DC495 /* facades.cpp */; }; 071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D11C5E8E6D008C9E90 /* zip.c */; }; - 071AD8D71C5E8F35008C9E90 /* breakpad_nlist_64.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */; }; - 071AD8D81C5E8F35008C9E90 /* dynamic_images.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */; }; - 071AD8D91C5E8F35008C9E90 /* exception_handler.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */; }; - 071AD8DA1C5E8F35008C9E90 /* minidump_generator.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */; }; - 071AD8DE1C5E912C008C9E90 /* crash_generation_client.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */; }; - 071AD8DF1C5E912C008C9E90 /* crash_generation_server.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */; }; - 071AD8E21C5E9143008C9E90 /* minidump_file_writer.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */; }; - 071AD8E61C5E9196008C9E90 /* convert_UTF.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E31C5E9196008C9E90 /* convert_UTF.c */; }; - 071AD8E71C5E9196008C9E90 /* md5.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E41C5E9196008C9E90 /* md5.cc */; }; - 071AD8E81C5E9196008C9E90 /* string_conversion.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E51C5E9196008C9E90 /* string_conversion.cc */; }; - 071AD8F01C5E91E3008C9E90 /* bootstrap_compat.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */; }; - 071AD8F11C5E91E3008C9E90 /* file_id.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EA1C5E91E3008C9E90 /* file_id.cc */; }; - 071AD8F21C5E91E3008C9E90 /* MachIPC.mm in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */; }; - 071AD8F31C5E91E3008C9E90 /* macho_id.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */; }; - 071AD8F41C5E91E3008C9E90 /* macho_utilities.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */; }; - 071AD8F51C5E91E3008C9E90 /* macho_walker.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */; }; - 071AD8F61C5E91E3008C9E90 /* string_utilities.cc in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */; }; 071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8F71C5E99D6008C9E90 /* ioapi.c */; }; 071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */; }; 0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; }; @@ -299,67 +282,7 @@ 071AD86B1C5E8536008C9E90 /* crypt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = crypt.h; path = ThirdParty/minizip/crypt.h; sourceTree = SOURCE_ROOT; }; 071AD86C1C5E8536008C9E90 /* ioapi.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ioapi.h; path = ThirdParty/minizip/ioapi.h; sourceTree = SOURCE_ROOT; }; 071AD86E1C5E8536008C9E90 /* zip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = zip.h; path = ThirdParty/minizip/zip.h; sourceTree = SOURCE_ROOT; }; - 071AD8751C5E85A0008C9E90 /* exception_handler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = exception_handler.h; path = ThirdParty/breakpad/client/mac/handler/exception_handler.h; sourceTree = SOURCE_ROOT; }; - 071AD8791C5E8672008C9E90 /* crash_generation_client.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crash_generation_client.h; sourceTree = ""; }; - 071AD87B1C5E8688008C9E90 /* ucontext_compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ucontext_compat.h; path = ThirdParty/breakpad/client/mac/handler/ucontext_compat.h; sourceTree = SOURCE_ROOT; }; - 071AD87F1C5E87AA008C9E90 /* scoped_ptr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = scoped_ptr.h; path = ThirdParty/breakpad/common/scoped_ptr.h; sourceTree = SOURCE_ROOT; }; - 071AD8811C5E87C2008C9E90 /* MachIPC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MachIPC.h; path = ThirdParty/breakpad/common/mac/MachIPC.h; sourceTree = SOURCE_ROOT; }; - 071AD8851C5E8853008C9E90 /* bootstrap_compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bootstrap_compat.h; path = ThirdParty/breakpad/common/mac/bootstrap_compat.h; sourceTree = SOURCE_ROOT; }; - 071AD8881C5E8886008C9E90 /* minidump_generator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_generator.h; path = ThirdParty/breakpad/client/mac/handler/minidump_generator.h; sourceTree = SOURCE_ROOT; }; - 071AD88B1C5E88AA008C9E90 /* crash_generation_server.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = crash_generation_server.h; sourceTree = ""; }; - 071AD88D1C5E88CD008C9E90 /* minidump_file_writer-inl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "minidump_file_writer-inl.h"; path = "ThirdParty/breakpad/client/minidump_file_writer-inl.h"; sourceTree = SOURCE_ROOT; }; - 071AD88F1C5E88CD008C9E90 /* minidump_file_writer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_file_writer.h; path = ThirdParty/breakpad/client/minidump_file_writer.h; sourceTree = SOURCE_ROOT; }; - 071AD8911C5E88EA008C9E90 /* client_info.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = client_info.h; sourceTree = ""; }; - 071AD8921C5E8994008C9E90 /* memory.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = memory.h; path = ThirdParty/breakpad/common/memory.h; sourceTree = SOURCE_ROOT; }; - 071AD8951C5E89D1008C9E90 /* breakpad_types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = breakpad_types.h; path = ThirdParty/breakpad/google_breakpad/common/breakpad_types.h; sourceTree = SOURCE_ROOT; }; - 071AD8961C5E89D1008C9E90 /* minidump_cpu_amd64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_amd64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h; sourceTree = SOURCE_ROOT; }; - 071AD8971C5E89D1008C9E90 /* minidump_cpu_arm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_arm.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h; sourceTree = SOURCE_ROOT; }; - 071AD8981C5E89D1008C9E90 /* minidump_cpu_arm64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_arm64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h; sourceTree = SOURCE_ROOT; }; - 071AD8991C5E89D1008C9E90 /* minidump_cpu_mips.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_mips.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h; sourceTree = SOURCE_ROOT; }; - 071AD89A1C5E89D1008C9E90 /* minidump_cpu_ppc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_ppc.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h; sourceTree = SOURCE_ROOT; }; - 071AD89B1C5E89D1008C9E90 /* minidump_cpu_ppc64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_ppc64.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h; sourceTree = SOURCE_ROOT; }; - 071AD89C1C5E89D1008C9E90 /* minidump_cpu_sparc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_sparc.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h; sourceTree = SOURCE_ROOT; }; - 071AD89D1C5E89D1008C9E90 /* minidump_cpu_x86.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_cpu_x86.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h; sourceTree = SOURCE_ROOT; }; - 071AD89E1C5E89D1008C9E90 /* minidump_exception_linux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_linux.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h; sourceTree = SOURCE_ROOT; }; - 071AD89F1C5E89D1008C9E90 /* minidump_exception_mac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_mac.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h; sourceTree = SOURCE_ROOT; }; - 071AD8A01C5E89D1008C9E90 /* minidump_exception_ps3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_ps3.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h; sourceTree = SOURCE_ROOT; }; - 071AD8A11C5E89D1008C9E90 /* minidump_exception_solaris.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_solaris.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h; sourceTree = SOURCE_ROOT; }; - 071AD8A21C5E89D1008C9E90 /* minidump_exception_win32.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_exception_win32.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h; sourceTree = SOURCE_ROOT; }; - 071AD8A31C5E89D1008C9E90 /* minidump_format.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_format.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_format.h; sourceTree = SOURCE_ROOT; }; - 071AD8A41C5E89D1008C9E90 /* minidump_size.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = minidump_size.h; path = ThirdParty/breakpad/google_breakpad/common/minidump_size.h; sourceTree = SOURCE_ROOT; }; - 071AD8A61C5E8A30008C9E90 /* macho_utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_utilities.h; path = ThirdParty/breakpad/common/mac/macho_utilities.h; sourceTree = SOURCE_ROOT; }; - 071AD8A91C5E8A7B008C9E90 /* dynamic_images.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = dynamic_images.h; path = ThirdParty/breakpad/client/mac/handler/dynamic_images.h; sourceTree = SOURCE_ROOT; }; - 071AD8AB1C5E8A99008C9E90 /* mach_vm_compat.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = mach_vm_compat.h; path = ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h; sourceTree = SOURCE_ROOT; }; - 071AD8AD1C5E8B07008C9E90 /* breakpad_nlist_64.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = breakpad_nlist_64.h; path = ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h; sourceTree = SOURCE_ROOT; }; - 071AD8AF1C5E8B16008C9E90 /* byteswap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = byteswap.h; path = ThirdParty/breakpad/common/mac/byteswap.h; sourceTree = SOURCE_ROOT; }; - 071AD8B11C5E8B23008C9E90 /* linux_libc_support.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = linux_libc_support.h; path = ThirdParty/breakpad/common/linux/linux_libc_support.h; sourceTree = SOURCE_ROOT; }; - 071AD8B31C5E8B43008C9E90 /* string_conversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_conversion.h; path = ThirdParty/breakpad/common/string_conversion.h; sourceTree = SOURCE_ROOT; }; - 071AD8B61C5E8B5C008C9E90 /* file_id.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = file_id.h; path = ThirdParty/breakpad/common/mac/file_id.h; sourceTree = SOURCE_ROOT; }; - 071AD8B81C5E8B81008C9E90 /* scoped_task_suspend-inl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "scoped_task_suspend-inl.h"; path = "ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h"; sourceTree = SOURCE_ROOT; }; - 071AD8BA1C5E8B9B008C9E90 /* macho_id.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_id.h; path = ThirdParty/breakpad/common/mac/macho_id.h; sourceTree = SOURCE_ROOT; }; - 071AD8BD1C5E8BB0008C9E90 /* convert_UTF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = convert_UTF.h; path = ThirdParty/breakpad/common/convert_UTF.h; sourceTree = SOURCE_ROOT; }; - 071AD8BF1C5E8BC8008C9E90 /* using_std_string.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = using_std_string.h; path = ThirdParty/breakpad/common/using_std_string.h; sourceTree = SOURCE_ROOT; }; - 071AD8C11C5E8BE5008C9E90 /* macho_walker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = macho_walker.h; path = ThirdParty/breakpad/common/mac/macho_walker.h; sourceTree = SOURCE_ROOT; }; - 071AD8C41C5E8BFD008C9E90 /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5.h; path = ThirdParty/breakpad/common/md5.h; sourceTree = SOURCE_ROOT; }; - 071AD8C71C5E8C14008C9E90 /* string_utilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = string_utilities.h; path = ThirdParty/breakpad/common/mac/string_utilities.h; sourceTree = SOURCE_ROOT; }; 071AD8D11C5E8E6D008C9E90 /* zip.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zip.c; path = ThirdParty/minizip/zip.c; sourceTree = SOURCE_ROOT; }; - 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = breakpad_nlist_64.cc; path = ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc; sourceTree = SOURCE_ROOT; }; - 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = dynamic_images.cc; path = ThirdParty/breakpad/client/mac/handler/dynamic_images.cc; sourceTree = SOURCE_ROOT; }; - 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = exception_handler.cc; path = ThirdParty/breakpad/client/mac/handler/exception_handler.cc; sourceTree = SOURCE_ROOT; }; - 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_generator.cc; path = ThirdParty/breakpad/client/mac/handler/minidump_generator.cc; sourceTree = SOURCE_ROOT; }; - 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crash_generation_client.cc; sourceTree = ""; }; - 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = crash_generation_server.cc; sourceTree = ""; }; - 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = minidump_file_writer.cc; path = ThirdParty/breakpad/client/minidump_file_writer.cc; sourceTree = SOURCE_ROOT; }; - 071AD8E31C5E9196008C9E90 /* convert_UTF.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = convert_UTF.c; path = ThirdParty/breakpad/common/convert_UTF.c; sourceTree = SOURCE_ROOT; }; - 071AD8E41C5E9196008C9E90 /* md5.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = md5.cc; path = ThirdParty/breakpad/common/md5.cc; sourceTree = SOURCE_ROOT; }; - 071AD8E51C5E9196008C9E90 /* string_conversion.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_conversion.cc; path = ThirdParty/breakpad/common/string_conversion.cc; sourceTree = SOURCE_ROOT; }; - 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bootstrap_compat.cc; path = ThirdParty/breakpad/common/mac/bootstrap_compat.cc; sourceTree = SOURCE_ROOT; }; - 071AD8EA1C5E91E3008C9E90 /* file_id.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_id.cc; path = ThirdParty/breakpad/common/mac/file_id.cc; sourceTree = SOURCE_ROOT; }; - 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MachIPC.mm; path = ThirdParty/breakpad/common/mac/MachIPC.mm; sourceTree = SOURCE_ROOT; }; - 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_id.cc; path = ThirdParty/breakpad/common/mac/macho_id.cc; sourceTree = SOURCE_ROOT; }; - 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_utilities.cc; path = ThirdParty/breakpad/common/mac/macho_utilities.cc; sourceTree = SOURCE_ROOT; }; - 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = macho_walker.cc; path = ThirdParty/breakpad/common/mac/macho_walker.cc; sourceTree = SOURCE_ROOT; }; - 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_utilities.cc; path = ThirdParty/breakpad/common/mac/string_utilities.cc; sourceTree = SOURCE_ROOT; }; 071AD8F71C5E99D6008C9E90 /* ioapi.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ioapi.c; path = ThirdParty/minizip/ioapi.c; sourceTree = SOURCE_ROOT; }; 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Breakpad.framework; path = Users/antanubis/TBuild/Libraries/breakpad/Breakpad.framework; sourceTree = ""; }; 071AD90B1C5EA37D008C9E90 /* Breakpad.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Breakpad.framework; path = "Users/antanubis/Library/Developer/Xcode/DerivedData/Breakpad-ffxagkgqghkohhawycvgjexmnjhs/Build/Products/Debug/Breakpad.framework"; sourceTree = ""; }; @@ -846,7 +769,6 @@ 071AD8691C5E8504008C9E90 /* ThirdParty */ = { isa = PBXGroup; children = ( - 071AD8701C5E8546008C9E90 /* breakpad */, 071AD86A1C5E8522008C9E90 /* minizip */, ); name = ThirdParty; @@ -864,146 +786,6 @@ name = minizip; sourceTree = ""; }; - 071AD8701C5E8546008C9E90 /* breakpad */ = { - isa = PBXGroup; - children = ( - 071AD8931C5E89BE008C9E90 /* google_breakpad */, - 071AD87E1C5E8792008C9E90 /* common */, - 071AD8711C5E8569008C9E90 /* client */, - ); - name = breakpad; - sourceTree = ""; - }; - 071AD8711C5E8569008C9E90 /* client */ = { - isa = PBXGroup; - children = ( - 071AD88D1C5E88CD008C9E90 /* minidump_file_writer-inl.h */, - 071AD88F1C5E88CD008C9E90 /* minidump_file_writer.h */, - 071AD8E11C5E9143008C9E90 /* minidump_file_writer.cc */, - 071AD8721C5E8575008C9E90 /* mac */, - ); - name = client; - sourceTree = ""; - }; - 071AD8721C5E8575008C9E90 /* mac */ = { - isa = PBXGroup; - children = ( - 071AD8771C5E8672008C9E90 /* crash_generation */, - 071AD8731C5E8579008C9E90 /* handler */, - ); - name = mac; - sourceTree = ""; - }; - 071AD8731C5E8579008C9E90 /* handler */ = { - isa = PBXGroup; - children = ( - 071AD8D31C5E8F35008C9E90 /* breakpad_nlist_64.cc */, - 071AD8AD1C5E8B07008C9E90 /* breakpad_nlist_64.h */, - 071AD8D41C5E8F35008C9E90 /* dynamic_images.cc */, - 071AD8A91C5E8A7B008C9E90 /* dynamic_images.h */, - 071AD8751C5E85A0008C9E90 /* exception_handler.h */, - 071AD8D51C5E8F35008C9E90 /* exception_handler.cc */, - 071AD8AB1C5E8A99008C9E90 /* mach_vm_compat.h */, - 071AD8881C5E8886008C9E90 /* minidump_generator.h */, - 071AD8D61C5E8F35008C9E90 /* minidump_generator.cc */, - 071AD87B1C5E8688008C9E90 /* ucontext_compat.h */, - ); - name = handler; - sourceTree = ""; - }; - 071AD8771C5E8672008C9E90 /* crash_generation */ = { - isa = PBXGroup; - children = ( - 071AD8911C5E88EA008C9E90 /* client_info.h */, - 071AD8791C5E8672008C9E90 /* crash_generation_client.h */, - 071AD8DC1C5E912C008C9E90 /* crash_generation_client.cc */, - 071AD88B1C5E88AA008C9E90 /* crash_generation_server.h */, - 071AD8DD1C5E912C008C9E90 /* crash_generation_server.cc */, - ); - name = crash_generation; - path = ThirdParty/breakpad/client/mac/crash_generation; - sourceTree = SOURCE_ROOT; - }; - 071AD87E1C5E8792008C9E90 /* common */ = { - isa = PBXGroup; - children = ( - 071AD8B01C5E8B1B008C9E90 /* linux */, - 071AD8801C5E87B5008C9E90 /* mac */, - 071AD8BD1C5E8BB0008C9E90 /* convert_UTF.h */, - 071AD8E31C5E9196008C9E90 /* convert_UTF.c */, - 071AD8C41C5E8BFD008C9E90 /* md5.h */, - 071AD8E41C5E9196008C9E90 /* md5.cc */, - 071AD8921C5E8994008C9E90 /* memory.h */, - 071AD87F1C5E87AA008C9E90 /* scoped_ptr.h */, - 071AD8B31C5E8B43008C9E90 /* string_conversion.h */, - 071AD8E51C5E9196008C9E90 /* string_conversion.cc */, - 071AD8BF1C5E8BC8008C9E90 /* using_std_string.h */, - ); - name = common; - sourceTree = ""; - }; - 071AD8801C5E87B5008C9E90 /* mac */ = { - isa = PBXGroup; - children = ( - 071AD8851C5E8853008C9E90 /* bootstrap_compat.h */, - 071AD8E91C5E91E3008C9E90 /* bootstrap_compat.cc */, - 071AD8AF1C5E8B16008C9E90 /* byteswap.h */, - 071AD8B61C5E8B5C008C9E90 /* file_id.h */, - 071AD8EA1C5E91E3008C9E90 /* file_id.cc */, - 071AD8811C5E87C2008C9E90 /* MachIPC.h */, - 071AD8EB1C5E91E3008C9E90 /* MachIPC.mm */, - 071AD8BA1C5E8B9B008C9E90 /* macho_id.h */, - 071AD8EC1C5E91E3008C9E90 /* macho_id.cc */, - 071AD8A61C5E8A30008C9E90 /* macho_utilities.h */, - 071AD8ED1C5E91E3008C9E90 /* macho_utilities.cc */, - 071AD8C11C5E8BE5008C9E90 /* macho_walker.h */, - 071AD8EE1C5E91E3008C9E90 /* macho_walker.cc */, - 071AD8B81C5E8B81008C9E90 /* scoped_task_suspend-inl.h */, - 071AD8C71C5E8C14008C9E90 /* string_utilities.h */, - 071AD8EF1C5E91E3008C9E90 /* string_utilities.cc */, - ); - name = mac; - sourceTree = ""; - }; - 071AD8931C5E89BE008C9E90 /* google_breakpad */ = { - isa = PBXGroup; - children = ( - 071AD8941C5E89C4008C9E90 /* common */, - ); - name = google_breakpad; - sourceTree = ""; - }; - 071AD8941C5E89C4008C9E90 /* common */ = { - isa = PBXGroup; - children = ( - 071AD8951C5E89D1008C9E90 /* breakpad_types.h */, - 071AD8961C5E89D1008C9E90 /* minidump_cpu_amd64.h */, - 071AD8971C5E89D1008C9E90 /* minidump_cpu_arm.h */, - 071AD8981C5E89D1008C9E90 /* minidump_cpu_arm64.h */, - 071AD8991C5E89D1008C9E90 /* minidump_cpu_mips.h */, - 071AD89A1C5E89D1008C9E90 /* minidump_cpu_ppc.h */, - 071AD89B1C5E89D1008C9E90 /* minidump_cpu_ppc64.h */, - 071AD89C1C5E89D1008C9E90 /* minidump_cpu_sparc.h */, - 071AD89D1C5E89D1008C9E90 /* minidump_cpu_x86.h */, - 071AD89E1C5E89D1008C9E90 /* minidump_exception_linux.h */, - 071AD89F1C5E89D1008C9E90 /* minidump_exception_mac.h */, - 071AD8A01C5E89D1008C9E90 /* minidump_exception_ps3.h */, - 071AD8A11C5E89D1008C9E90 /* minidump_exception_solaris.h */, - 071AD8A21C5E89D1008C9E90 /* minidump_exception_win32.h */, - 071AD8A31C5E89D1008C9E90 /* minidump_format.h */, - 071AD8A41C5E89D1008C9E90 /* minidump_size.h */, - ); - name = common; - sourceTree = ""; - }; - 071AD8B01C5E8B1B008C9E90 /* linux */ = { - isa = PBXGroup; - children = ( - 071AD8B11C5E8B23008C9E90 /* linux_libc_support.h */, - ); - name = linux; - sourceTree = ""; - }; 074968CB1A44D0B800394F46 /* langs */ = { isa = PBXGroup; children = ( @@ -1578,6 +1360,7 @@ 07C3AF25194336160016CFF1 /* Resources */, 07489B6B1A28949600348CD9 /* Build Updater */, 0746AC8F1A28D4140040AE26 /* Clean Updater */, + 071AD90E1C60AA74008C9E90 /* Copy crashpad_handler */, 07489B6D1A28972E00348CD9 /* Sign Application */, ); buildRules = ( @@ -1659,6 +1442,20 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 071AD90E1C60AA74008C9E90 /* Copy crashpad_handler */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Copy crashpad_handler"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "mkdir -p \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers\" && cp \"./../../Libraries/crashpad/crashpad/out/Release/crashpad_handler\" \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers/\""; + }; 0746AC8F1A28D4140040AE26 /* Clean Updater */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1774,7 +1571,6 @@ 0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */, 1DF53374E3B6A31661548D08 /* historywidget.cpp in Compile Sources */, 078A2FCD1A811CA600CCC7A0 /* backgroundbox.cpp in Compile Sources */, - 071AD8D81C5E8F35008C9E90 /* dynamic_images.cc in Compile Sources */, 37A3C6C782A0E4BC7B09536B /* langloaderplain.cpp in Compile Sources */, 19A66ECD6EE2F8356F27D32D /* layerwidget.cpp in Compile Sources */, 89ADB41E48A3B5E24ABB626C /* profilewidget.cpp in Compile Sources */, @@ -1788,28 +1584,23 @@ 4078D5D614EB3ECF7F1848C7 /* types.cpp in Compile Sources */, 68FFEB7CA30BF0149161B809 /* window.cpp in Compile Sources */, 0CB7DE9A54CC9BF86FB7B5CA /* mtp.cpp in Compile Sources */, - 071AD8E71C5E9196008C9E90 /* md5.cc in Compile Sources */, DF259E9677CC63AF8754032B /* mtpConnection.cpp in Compile Sources */, 074FCB9119D36E60004C6EB2 /* moc_popupmenu.cpp in Compile Sources */, B6346B66B0A2228A91D8A5D9 /* mtpDC.cpp in Compile Sources */, 0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */, 07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */, B8CA3E1E11A7E0E7DF9E1CDE /* mtpFileLoader.cpp in Compile Sources */, - 071AD8DF1C5E912C008C9E90 /* crash_generation_server.cc in Compile Sources */, 0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */, 99F0A9B2AFE5ABDCBFC04510 /* mtpRPC.cpp in Compile Sources */, A297B1E3CE33CC501DFEDB6E /* mtpSession.cpp in Compile Sources */, D1FC601FC2F9F3E33F3A14E9 /* animation.cpp in Compile Sources */, 8F65F0D95B1F0CEB859F2FB3 /* boxshadow.cpp in Compile Sources */, - 071AD8F41C5E91E3008C9E90 /* macho_utilities.cc in Compile Sources */, D7EF8F129FCCE9AB3F3F081F /* button.cpp in Compile Sources */, 07DC42A01B5EA15300B6B888 /* numbers.cpp in Compile Sources */, C03447C9A7D9FF73463B8BB5 /* countryinput.cpp in Compile Sources */, 07BE850F1A2093C9008ACB9F /* localstorage.cpp in Compile Sources */, CDB0266A8B7CB20A95266BCD /* emoji_config.cpp in Compile Sources */, - 071AD8DA1C5E8F35008C9E90 /* minidump_generator.cc in Compile Sources */, 0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */, - 071AD8F01C5E91E3008C9E90 /* bootstrap_compat.cc in Compile Sources */, 7C2B2DEE467A4C4679F1C3C9 /* filedialog.cpp in Compile Sources */, 832C50BFD7D09AF042A51D4F /* flatbutton.cpp in Compile Sources */, B91D13BCC3963CB9C12D24A4 /* flatcheckbox.cpp in Compile Sources */, @@ -1818,7 +1609,6 @@ 03270F718426CFE84729079E /* flattextarea.cpp in Compile Sources */, E3D7A5CA24541D5DB69D6606 /* images.cpp in Compile Sources */, ADE99904299B99EB6135E8D9 /* scrollarea.cpp in Compile Sources */, - 071AD8F11C5E91E3008C9E90 /* file_id.cc in Compile Sources */, 07129D6A1C16D230002DC495 /* mtpAuthKey.cpp in Compile Sources */, 90085DF442550A0845D5AF37 /* style_core.cpp in Compile Sources */, 074FCB8E19D36851004C6EB2 /* popupmenu.cpp in Compile Sources */, @@ -1838,7 +1628,6 @@ 07DB67511AD07CB800A51329 /* intropwdcheck.cpp in Compile Sources */, 3ABE4F9B2264F770D944106D /* emojibox.cpp in Compile Sources */, 07D703BB19B88FB900C4EED2 /* moc_audio.cpp in Compile Sources */, - 071AD8E81C5E9196008C9E90 /* string_conversion.cc in Compile Sources */, 77B998AC22A13EF3DDEE07AC /* photocropbox.cpp in Compile Sources */, F278C423357CA99797EA30AB /* photosendbox.cpp in Compile Sources */, E8D95529CED88F18818C9A8B /* intro.cpp in Compile Sources */, @@ -1862,27 +1651,20 @@ A24E4B5B683764E07683ECEC /* moc_mainwidget.cpp in Compile Sources */, 0710CA051B0B9404001B4272 /* moc_stickersetbox.cpp in Compile Sources */, 07DE92A71AA4925B00A18F6F /* autolockbox.cpp in Compile Sources */, - 071AD8F51C5E91E3008C9E90 /* macho_walker.cc in Compile Sources */, 07D8509919F8320900623D75 /* usernamebox.cpp in Compile Sources */, - 071AD8F21C5E91E3008C9E90 /* MachIPC.mm in Compile Sources */, - 071AD8DE1C5E912C008C9E90 /* crash_generation_client.cc in Compile Sources */, A469EC9C4C367E0B773A9BB7 /* moc_settingswidget.cpp in Compile Sources */, FD2FE0C564A7389A2E609EC7 /* moc_sysbuttons.cpp in Compile Sources */, E97B3CFAB59B49BACFFC5F7C /* moc_title.cpp in Compile Sources */, 07D8510819F8340A00623D75 /* moc_usernamebox.cpp in Compile Sources */, 9A0D5DDC7816FC2538EB6A96 /* moc_window.cpp in Compile Sources */, - 071AD8D91C5E8F35008C9E90 /* exception_handler.cc in Compile Sources */, 06EABCC49D2EEE4076322BE7 /* moc_mtp.cpp in Compile Sources */, 0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */, 07DE92AA1AA4928200A18F6F /* moc_autolockbox.cpp in Compile Sources */, 07B604351B46A20900CA29FE /* moc_playerwidget.cpp in Compile Sources */, 8F6F5D7F82036331E8C6DAE6 /* moc_mtpConnection.cpp in Compile Sources */, B780F9E21269259B90A1F32A /* moc_mtpDC.cpp in Compile Sources */, - 071AD8F31C5E91E3008C9E90 /* macho_id.cc in Compile Sources */, 07080BCF1A43588C00741A51 /* lang_auto.cpp in Compile Sources */, 07539B1D1A1416AF00083EFC /* moc_history.cpp in Compile Sources */, - 071AD8E61C5E9196008C9E90 /* convert_UTF.c in Compile Sources */, - 071AD8F61C5E91E3008C9E90 /* string_utilities.cc in Compile Sources */, 2A500B102B7CE80F3EB6E13E /* moc_mtpFileLoader.cpp in Compile Sources */, 07A6933519927B160099CB9F /* moc_mediaview.cpp in Compile Sources */, 07A69332199277BA0099CB9F /* mediaview.cpp in Compile Sources */, @@ -1894,7 +1676,6 @@ 07DE92A01AA4923300A18F6F /* passcodewidget.cpp in Compile Sources */, B0B88EFE444C0DE673389418 /* moc_flatbutton.cpp in Compile Sources */, 1BD711B4C358EA7D727BF358 /* moc_flatcheckbox.cpp in Compile Sources */, - 071AD8D71C5E8F35008C9E90 /* breakpad_nlist_64.cc in Compile Sources */, 565F748438E6CE0148C54AFE /* moc_flatinput.cpp in Compile Sources */, 8B71D1C7BB9DCEE6511219C2 /* moc_flatlabel.cpp in Compile Sources */, 0710C9FE1B0B9376001B4272 /* stickersetbox.cpp in Compile Sources */, @@ -1908,7 +1689,6 @@ 7062978F12EEA525893A5E6F /* moc_aboutbox.cpp in Compile Sources */, E8B28580819B882A5964561A /* moc_addcontactbox.cpp in Compile Sources */, 07B604321B46A0EC00CA29FE /* playerwidget.cpp in Compile Sources */, - 071AD8E21C5E9143008C9E90 /* minidump_file_writer.cc in Compile Sources */, D6874C00733283846ACA9AB2 /* moc_confirmbox.cpp in Compile Sources */, ED2557A57C6782721DC494AF /* moc_connectionbox.cpp in Compile Sources */, 5FC914F652D1B16FDA8F0634 /* moc_contactsbox.cpp in Compile Sources */, @@ -2009,6 +1789,8 @@ isa = XCBuildConfiguration; buildSettings = { CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = NO; CLANG_WARN_CONSTANT_CONVERSION = NO; CLANG_WARN_EMPTY_BODY = YES; @@ -2058,6 +1840,8 @@ "/usr/local/Qt-5.5.1/mkspecs/macx-clang", ./ThirdParty/breakpad, ./ThirdParty/minizip, + ./../../Libraries/crashpad/crashpad, + ./../../Libraries/crashpad/crashpad/third_party/mini_chromium/mini_chromium, ); INFOPLIST_FILE = Telegram.plist; INSTALL_DIR = ./../Mac/Release/; @@ -2094,8 +1878,6 @@ OTHER_CPLUSPLUSFLAGS = ( "-pipe", "-g", - "-std=c++11", - "-stdlib=libc++", "-Wall", "-W", "-fPIE", @@ -2113,11 +1895,11 @@ ); OTHER_LDFLAGS = ( "-headerpad_max_install_names", - "-stdlib=libc++", "-L/usr/local/Qt-5.5.1/lib", "-L/usr/local/Qt-5.5.1/plugins/bearer", "-L/usr/local/Qt-5.5.1/plugins/platforms", "-lcups", + "-lbsm", "-L/usr/local/Qt-5.5.1/plugins/imageformats", /usr/local/lib/libz.a, "-lm", @@ -2131,7 +1913,10 @@ /usr/local/lib/libswresample.a, /usr/local/lib/libavutil.a, /usr/local/lib/libiconv.a, - "../../Libraries/openssl-xcode/libcrypto.a", + "./../../Libraries/openssl-xcode/libcrypto.a", + ./../../Libraries/crashpad/crashpad/out/Release/libbase.a, + ./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_client.a, + ./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_util.a, "-g", ); PRODUCT_NAME = Telegram; @@ -2145,6 +1930,8 @@ isa = XCBuildConfiguration; buildSettings = { CC = /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang; + CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; + CLANG_CXX_LIBRARY = "libc++"; CLANG_WARN_BOOL_CONVERSION = NO; CLANG_WARN_CONSTANT_CONVERSION = NO; CLANG_WARN_EMPTY_BODY = YES; @@ -2195,6 +1982,8 @@ "/usr/local/Qt-5.5.1/mkspecs/macx-clang", ./ThirdParty/breakpad, ./ThirdParty/minizip, + ./../../Libraries/crashpad/crashpad, + ./../../Libraries/crashpad/crashpad/third_party/mini_chromium/mini_chromium, ); INFOPLIST_FILE = Telegram.plist; INSTALL_DIR = ./../Mac/Debug/; @@ -2232,8 +2021,6 @@ OTHER_CPLUSPLUSFLAGS = ( "-pipe", "-g", - "-std=c++11", - "-stdlib=libc++", "-Wall", "-W", "-fPIE", @@ -2251,11 +2038,11 @@ ); OTHER_LDFLAGS = ( "-headerpad_max_install_names", - "-stdlib=libc++", "-L/usr/local/Qt-5.5.1/lib", "-L/usr/local/Qt-5.5.1/plugins/bearer", "-L/usr/local/Qt-5.5.1/plugins/platforms", "-lcups", + "-lbsm", "-L/usr/local/Qt-5.5.1/plugins/imageformats", /usr/local/lib/libz.a, "-lm", @@ -2269,7 +2056,10 @@ /usr/local/lib/libswresample.a, /usr/local/lib/libavutil.a, /usr/local/lib/libiconv.a, - "../../Libraries/openssl-xcode/libcrypto.a", + "./../../Libraries/openssl-xcode/libcrypto.a", + ./../../Libraries/crashpad/crashpad/out/Release/libbase.a, + ./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_client.a, + ./../../Libraries/crashpad/crashpad/out/Release/libcrashpad_util.a, "-g", ); PRODUCT_NAME = Telegram; From f7f041f11d1437eed2ea704e04e5c098f946eabf Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Feb 2016 15:50:12 +0300 Subject: [PATCH 027/133] instructions updated for zlib --- QTCREATOR.md | 14 ++++++++++++++ Telegram/SourceFiles/logs.cpp | 17 +++++++++-------- Telegram/SourceFiles/structs.cpp | 4 +--- Telegram/SourceFiles/structs.h | 9 ++++++++- Telegram/Telegram.xcodeproj/project.pbxproj | 6 ++---- XCODE.md | 16 +++++++++++++++- XCODEold.md | 16 +++++++++++++++- 7 files changed, 64 insertions(+), 18 deletions(-) diff --git a/QTCREATOR.md b/QTCREATOR.md index d963f9badf9150..e4c584b74a5920 100644 --- a/QTCREATOR.md +++ b/QTCREATOR.md @@ -32,6 +32,20 @@ Install dev libraries sudo apt-get install libexif-dev liblzma-dev libz-dev libssl-dev libappindicator-dev libunity-dev +####zlib 1.2.8 + +http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip) + +Extract to **/home/user/TBuild/Libraries** + +#####Building library + +In Terminal go to **/home/user/TBuild/Libraries/zlib-1.2.8** and run: + + ./configure + make + sudo make install + Install audio libraries ####Opus codec 1.1 diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 641c7fd576d037..b776cba00f2894 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -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(), diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 1660203d189a33..81c7e8568bd92a 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -61,9 +61,7 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) { return i.value(); } -InterfaceWrapStruct InterfaceWraps[64] = { - { 0, 0, 0 } -}; +InterfaceWrapStruct InterfaceWraps[64]; QAtomicInt InterfaceIndexLast(0); diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 66d2d647357734..5655fafa546cf3 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -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 @@ class BasicInterface { if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) { t_assert(last < 64); if (_index.testAndSetOrdered(0, last + 1)) { - InterfaceWraps[last] = { InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct }; + InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct); } break; } diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 121a09c1cb18b3..70a484b14d17be 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -46,7 +46,6 @@ 07129D6E1C16D245002DC495 /* facades.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 07129D6C1C16D245002DC495 /* facades.cpp */; }; 071AD8D21C5E8E6D008C9E90 /* zip.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8D11C5E8E6D008C9E90 /* zip.c */; }; 071AD8F81C5E99D6008C9E90 /* ioapi.c in Compile Sources */ = {isa = PBXBuildFile; fileRef = 071AD8F71C5E99D6008C9E90 /* ioapi.c */; }; - 071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */ = {isa = PBXBuildFile; fileRef = 071AD9091C5EA2A5008C9E90 /* Breakpad.framework */; }; 0732E4A9199E262300D50FE7 /* overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4A7199E262300D50FE7 /* overviewwidget.cpp */; }; 0732E4AC199E268A00D50FE7 /* moc_overviewwidget.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0732E4AB199E268A00D50FE7 /* moc_overviewwidget.cpp */; }; 074756191A1372C600CA07F7 /* moc_types.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 074756181A1372C600CA07F7 /* moc_types.cpp */; }; @@ -710,7 +709,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 071AD90A1C5EA2A5008C9E90 /* Breakpad.framework in Link Binary With Libraries */, 0752F8751C2C89F40026D0BC /* VideoToolbox.framework in Link Binary With Libraries */, 0752F8731C2C89220026D0BC /* VideoDecodeAcceleration.framework in Link Binary With Libraries */, 07CAACD81AEA64F00058E508 /* AudioUnit.framework in Link Binary With Libraries */, @@ -1805,7 +1803,7 @@ DYLIB_COMPATIBILITY_VERSION = 0.9; DYLIB_CURRENT_VERSION = 0.9.19; ENABLE_STRICT_OBJC_MSGSEND = YES; - FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad; + FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -1947,7 +1945,7 @@ DYLIB_CURRENT_VERSION = 0.9.19; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - FRAMEWORK_SEARCH_PATHS = ./../../Libraries/breakpad; + FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_LINK_WITH_DYNAMIC_LIBRARIES = NO; GCC_NO_COMMON_BLOCKS = YES; diff --git a/XCODE.md b/XCODE.md index 96b94b667fd736..00a0dfbd7665ad 100644 --- a/XCODE.md +++ b/XCODE.md @@ -28,6 +28,20 @@ In your build Terminal run: to set minimal supported OS version to 10.8 for future console builds. +####zlib 1.2.8 + +http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip) + +Extract to **/Users/user/TBuild/Libraries** + +#####Building library + +In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run: + + CFLAGS="-mmacosx-version-min=10.8" LDFLAGS="-mmacosx-version-min=10.8" ./configure + make + sudo make install + ####OpenSSL 1.0.1g #####Get openssl-xcode project file @@ -37,7 +51,7 @@ From https://github.com/telegramdesktop/openssl-xcode with git in Terminal: * go to **/Users/user/TBuild/Libraries * run: - git clone https://github.com/telegramdesktop/openssl-xcode.git + git clone https://github.com/telegramdesktop/openssl-xcode.git or: diff --git a/XCODEold.md b/XCODEold.md index 8decf2b10b3a8f..00d2e3e37a4148 100644 --- a/XCODEold.md +++ b/XCODEold.md @@ -22,6 +22,20 @@ In your build Terminal run to set minimal supported OS version to 10.6 for future console builds. +####zlib 1.2.8 + +http://www.zlib.net/ > Download [**zlib source code, version 1.2.8, zipfile format**](http://zlib.net/zlib128.zip) + +Extract to **/Users/user/TBuild/Libraries** + +#####Building library + +In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run: + + prefix=/usr/local/zlib_old CFLAGS="-mmacosx-version-min=10.6" LDFLAGS="-mmacosx-version-min=10.6" ./configure + make + sudo make install + ####OpenSSL 1.0.1g Get sources from https://github.com/telegramdesktop/openssl-xcode, by git – in Terminal go to **/Users/user/TBuild/Libraries** and run @@ -85,7 +99,7 @@ to have **/Users/user/TBuild/Libraries/openal-soft/CMakeLists.txt** In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there run - cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 .. + cmake -D LIBTYPE:STRING=STATIC -D CMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.6 -D CMAKE_INSTALL_PREFIX:STRING=/usr/local/openal_old .. make sudo make install From 02961ecc99df94a226b639a6b5edcaff23e45e82 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Feb 2016 19:00:46 +0300 Subject: [PATCH 028/133] added mini_chromium patch for 10.6 and 10.8 os x google crashpad build --- Telegram/_mini_chromium_patch.diff | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Telegram/_mini_chromium_patch.diff diff --git a/Telegram/_mini_chromium_patch.diff b/Telegram/_mini_chromium_patch.diff new file mode 100644 index 00000000000000..3dab62ec2c022c --- /dev/null +++ b/Telegram/_mini_chromium_patch.diff @@ -0,0 +1,52 @@ +diff --git a/base/mac/scoped_nsobject.h b/base/mac/scoped_nsobject.h +index 2e157a4..5a306a1 100644 +--- a/base/mac/scoped_nsobject.h ++++ b/base/mac/scoped_nsobject.h +@@ -11,6 +11,7 @@ + + #include "base/compiler_specific.h" + #include "base/mac/scoped_typeref.h" ++#include "base/template_util.h" + + namespace base { + +@@ -55,7 +56,7 @@ class scoped_nsobject : public scoped_nsprotocol { + public: + using scoped_nsprotocol::scoped_nsprotocol; + +- static_assert(std::is_same::value == false, ++ static_assert(is_same::value == false, + "Use ScopedNSAutoreleasePool instead"); + }; + +diff --git a/base/macros.h b/base/macros.h +index 5d96783..096704c 100644 +--- a/base/macros.h ++++ b/base/macros.h +@@ -42,8 +42,9 @@ char (&ArraySizeHelper(const T (&array)[N]))[N]; + + template + inline Dest bit_cast(const Source& source) { ++#if __cplusplus >= 201103L + static_assert(sizeof(Dest) == sizeof(Source), "sizes must be equal"); +- ++#endif + Dest dest; + memcpy(&dest, &source, sizeof(dest)); + return dest; +diff --git a/build/common.gypi b/build/common.gypi +index 1affc70..6e8f292 100644 +--- a/build/common.gypi ++++ b/build/common.gypi +@@ -66,6 +66,11 @@ + 'conditions': [ + ['clang!=0', { + 'CLANG_CXX_LANGUAGE_STANDARD': 'c++11', # -std=c++11 ++ 'conditions': [ ++ ['mac_deployment_target=="10.8"', { ++ 'CLANG_CXX_LIBRARY': 'libc++', # force -stdlib=libc++ for 10.8 ++ }] ++ ], + + # Don't link in libarclite_macosx.a, see http://crbug.com/156530. + 'CLANG_LINK_OBJC_RUNTIME': 'NO', # -fno-objc-link-runtime From 9d2b83c4d50e4cfb0b5e60b6d2367c999cd7355f Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Feb 2016 19:12:45 +0300 Subject: [PATCH 029/133] fixed release build for win --- Telegram/Telegram.vcxproj | 268 ++++++++++++++++++++------------------ 1 file changed, 138 insertions(+), 130 deletions(-) diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 21af719fa8934a..081bce35160057 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -96,7 +96,7 @@ AL_LIBTYPE_STATIC;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\ThirdParty\breakpad;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded false @@ -126,7 +126,7 @@ AL_LIBTYPE_STATIC;CUSTOM_API_ID;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\ThirdParty\breakpad;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded false @@ -1055,15 +1055,23 @@ NotUsing + NotUsing + NotUsing NotUsing + NotUsing + NotUsing NotUsing + NotUsing + NotUsing NotUsing + NotUsing + NotUsing @@ -1095,7 +1103,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1103,7 +1111,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" Moc%27ing window.h... @@ -1113,8 +1121,8 @@ Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1145,8 +1153,8 @@ Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1159,7 +1167,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1167,7 +1175,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" @@ -1178,8 +1186,8 @@ Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1192,8 +1200,8 @@ Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1206,8 +1214,8 @@ Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1220,8 +1228,8 @@ Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1234,8 +1242,8 @@ Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1248,8 +1256,8 @@ Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1262,8 +1270,8 @@ Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1276,8 +1284,8 @@ Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1290,8 +1298,8 @@ Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1300,7 +1308,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1308,13 +1316,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1322,13 +1330,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1336,13 +1344,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1350,13 +1358,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1364,13 +1372,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1378,13 +1386,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1392,13 +1400,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1406,13 +1414,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1420,13 +1428,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1434,7 +1442,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" @@ -1445,8 +1453,8 @@ Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1459,8 +1467,8 @@ Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1473,8 +1481,8 @@ Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1487,8 +1495,8 @@ Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1501,8 +1509,8 @@ Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1516,8 +1524,8 @@ Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1530,8 +1538,8 @@ Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1544,8 +1552,8 @@ Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1558,8 +1566,8 @@ Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1572,8 +1580,8 @@ Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1584,7 +1592,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1592,7 +1600,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" @@ -1603,8 +1611,8 @@ Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1638,8 +1646,8 @@ Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1652,8 +1660,8 @@ Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1663,13 +1671,13 @@ Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1682,8 +1690,8 @@ Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1696,8 +1704,8 @@ Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1710,8 +1718,8 @@ Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1724,8 +1732,8 @@ Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1738,8 +1746,8 @@ Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1748,7 +1756,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1756,7 +1764,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" @@ -1767,8 +1775,8 @@ Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1781,8 +1789,8 @@ Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1793,7 +1801,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1801,7 +1809,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" @@ -1832,8 +1840,8 @@ Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1846,8 +1854,8 @@ Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1860,8 +1868,8 @@ Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1870,7 +1878,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1878,7 +1886,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" @@ -1889,8 +1897,8 @@ Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1905,8 +1913,8 @@ Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1921,8 +1929,8 @@ Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1935,8 +1943,8 @@ Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1949,8 +1957,8 @@ Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1963,8 +1971,8 @@ Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1974,7 +1982,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1982,13 +1990,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -1996,13 +2004,13 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2010,7 +2018,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" @@ -2018,7 +2026,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2026,7 +2034,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" true true true @@ -2035,7 +2043,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp @@ -2043,7 +2051,7 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" true true true @@ -2083,8 +2091,8 @@ Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -2097,8 +2105,8 @@ Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) From ab00a0310a950968d82b9840e0b273d013d2a4e2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 2 Feb 2016 19:21:07 +0300 Subject: [PATCH 030/133] added crashing in settings --- Telegram/SourceFiles/settingswidget.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index ecb5d2468db515..e52872678b5dea 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -803,7 +803,9 @@ void SettingsInner::keyPressEvent(QKeyEvent *e) { break; } else if (str == qstr("loadlang")) { chooseCustomLang(); - } else if (qsl("debugmode").startsWith(str) || qsl("testmode").startsWith(str) || qsl("loadlang").startsWith(str)) { + } else if (str == qstr("crashplease")) { + t_assert(!"Crashed in Settings!"); + } else if (qsl("debugmode").startsWith(str) || qsl("testmode").startsWith(str) || qsl("loadlang").startsWith(str) || qsl("crashplease").startsWith(str)) { break; } ++from; From 837432a4f3d793ca1c9481b30e1b07ccc6f2ccb1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 3 Feb 2016 17:01:34 +0300 Subject: [PATCH 031/133] fixed connection on app state change --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/settingswidget.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 6ac2a77b67ec5e..051d171f8436e0 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -720,7 +720,7 @@ AppClass::AppClass() : QObject() application()->installNativeEventFilter(psNativeEventFilter()); - connect(application(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); + Sandboxer::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index e52872678b5dea..8b5e3bf0b9bf81 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -221,7 +221,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) connect(App::main(), SIGNAL(peerPhotoChanged(PeerData *)), this, SLOT(peerUpdated(PeerData *))); connect(App::main(), SIGNAL(peerNameChanged(PeerData *, const PeerData::Names &, const PeerData::NameFirstChars &)), this, SLOT(peerUpdated(PeerData *))); - connect(App::app(), SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onReloadPassword(Qt::ApplicationState))); + Sandboxer::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onReloadPassword(Qt::ApplicationState))); } // profile From fd0a119885a32a6e315733e07a7f7e78c6ea086a Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 4 Feb 2016 15:44:39 +0300 Subject: [PATCH 032/133] langs updated, build scripts updated --- README.md | 2 + Telegram/Build.bat | 30 +- Telegram/Build.sh | 62 ++- Telegram/Deploy.sh | 8 +- Telegram/SourceFiles/facades.cpp | 6 +- Telegram/SourceFiles/langs/lang_de.strings | 12 +- Telegram/SourceFiles/langs/lang_es.strings | 6 +- Telegram/SourceFiles/langs/lang_it.strings | 8 +- Telegram/SourceFiles/langs/lang_ko.strings | 4 +- Telegram/SourceFiles/langs/lang_nl.strings | 6 +- Telegram/SourceFiles/langs/lang_pt_BR.strings | 6 +- Telegram/SourceFiles/logs.cpp | 8 +- Telegram/Telegram.xcodeproj/project.pbxproj | 30 -- Telegram/_breakpad_appstore_patch.diff | 366 ++++++++++++++++++ 14 files changed, 486 insertions(+), 68 deletions(-) create mode 100644 Telegram/_breakpad_appstore_patch.diff diff --git a/README.md b/README.md index b2dc768a2c6775..df84d735161be0 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,8 @@ The source code is published under GPLv3 with OpenSSL exception, the license is * libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)) * LZMA SDK 9.20 ([public domain](http://www.7-zip.org/sdk.html)) * liblzma ([public domain](http://tukaani.org/xz/)) +* Google Breakpad ([License](https://chromium.googlesource.com/breakpad/breakpad/+/master/LICENSE)) +* Google Crashpad ([Apache License 2.0](https://chromium.googlesource.com/crashpad/crashpad/+/master/LICENSE)) * OpenAL Soft ([LGPL](http://kcat.strangesoft.net/openal.html)) * Opus codec ([BSD license](http://www.opus-codec.org/license/)) * FFmpeg ([LGPL](https://www.ffmpeg.org/legal.html)) diff --git a/Telegram/Build.bat b/Telegram/Build.bat index 650a937ee5278d..5e2da4a8f167d0 100644 --- a/Telegram/Build.bat +++ b/Telegram/Build.bat @@ -29,6 +29,8 @@ set "HomePath=..\..\Telegram" set "ReleasePath=..\Win32\Deploy" set "DeployPath=%ReleasePath%\deploy\%AppVersionStrMajor%\%AppVersionStrFull%" set "SignPath=..\..\TelegramPrivate\Sign.bat" +set "BinaryName=Telegram" +set "DropboxSymbolsPath=Z:\Dropbox\Telegram\symbols" if %BetaVersion% neq 0 ( if exist %DeployPath%\ ( @@ -71,9 +73,13 @@ echo . echo Version %AppVersionStrFull% build successfull. Preparing.. echo . +echo Dumping debug symbols.. +call ..\..\Libraries\breakpad\src\tools\windows\binaries\dump_syms.exe %ReleasePath%\%BinaryName%.pdb > %ReleasePath%\%BinaryName%.sym +echo Done! + set "PATH=%PATH%;C:\Program Files\7-Zip;C:\Program Files (x86)\Inno Setup 5" -call %SignPath% %ReleasePath%\Telegram.exe +call %SignPath% %ReleasePath%\%BinaryName%.exe if %errorlevel% neq 0 goto error call %SignPath% %ReleasePath%\Updater.exe @@ -90,7 +96,7 @@ if %BetaVersion% equ 0 ( ) cd %ReleasePath% -call Packer.exe -version %VersionForPacker% -path Telegram.exe -path Updater.exe %DevParam% +call Packer.exe -version %VersionForPacker% -path %BinaryName%.exe -path Updater.exe %DevParam% cd %HomePath% if %errorlevel% neq 0 goto error @@ -109,6 +115,22 @@ if %BetaVersion% neq 0 ( set "PortableFile=tbeta%BetaVersion%_%BetaSignature%.zip" ) +for /f ^"usebackq^ eol^=^ + +^ delims^=^" %%a in (..\Win32\Debug\Telegram.sym) do ( + set "SymbolsHashLine=%%a" + goto symbolslinedone +) +:symbolslinedone +FOR /F "tokens=1,2,3,4* delims= " %%i in ("%SymbolsHashLine%") do set "SymbolsH +ash=%%l" + +echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% +if not exist %DropboxSymbolsPath%\%BinaryName% mkdir %DropboxSymbolsPath%\%BinaryName% +if not exist %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% mkdir %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% +xcopy %ReleasePath%\%BinaryName%.sym %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash%\ +echo Done! + if not exist %ReleasePath%\deploy mkdir %ReleasePath%\deploy if not exist %ReleasePath%\deploy\%AppVersionStrMajor% mkdir %ReleasePath%\deploy\%AppVersionStrMajor% mkdir %DeployPath% @@ -144,7 +166,7 @@ if not exist %DeployPath%\%PortableFile% goto error if %BetaVersion% equ 0 ( if not exist %DeployPath%\%SetupFile% goto error ) -if not exist %DeployPath%\Telegram.pdb goto error +if not exist %DeployPath%\%BinaryName%.pdb goto error if not exist %DeployPath%\Updater.exe goto error if not exist %DeployPath%\Updater.pdb goto error if not exist %FinalReleasePath%\%AppVersionStrMajor% mkdir %FinalReleasePath%\%AppVersionStrMajor% @@ -157,7 +179,7 @@ if %BetaVersion% equ 0 ( ) else ( xcopy %DeployPath%\%BetaKeyFile% %FinalDeployPath%\ /Y ) -xcopy %DeployPath%\Telegram.pdb %FinalDeployPath%\ +xcopy %DeployPath%\%BinaryName%.pdb %FinalDeployPath%\ xcopy %DeployPath%\Updater.exe %FinalDeployPath%\ xcopy %DeployPath%\Updater.pdb %FinalDeployPath%\ diff --git a/Telegram/Build.sh b/Telegram/Build.sh index 3aa9b88f6642b3..302419fadad863 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -37,6 +37,7 @@ if [ "$BuildTarget" == "linux" ]; then WorkPath="./../Linux" FixScript="$HomePath/FixMake.sh" ReleasePath="./../Linux/Release" + BinaryName="Telegram" elif [ "$BuildTarget" == "linux32" ]; then echo "Building version $AppVersionStrFull for Linux 32bit.." UpdateFile="tlinux32upd$AppVersion" @@ -44,6 +45,7 @@ elif [ "$BuildTarget" == "linux32" ]; then WorkPath="./../Linux" FixScript="$HomePath/FixMake32.sh" ReleasePath="./../Linux/Release" + BinaryName="Telegram" elif [ "$BuildTarget" == "mac" ]; then echo "Building version $AppVersionStrFull for OS X 10.8+.." UpdateFile="tmacupd$AppVersion" @@ -104,6 +106,9 @@ fi #fi if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then + + DropboxSymbolsPath="/media/psf/Home/Dropbox/Telegram/symbols" + mkdir -p "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater" /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" @@ -118,8 +123,8 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then make echo "Telegram build complete!" cd "$HomePath" - if [ ! -f "$ReleasePath/Telegram" ]; then - echo "Telegram not found!" + if [ ! -f "$ReleasePath/$BinaryName" ]; then + echo "$BinaryName not found!" exit 1 fi @@ -128,8 +133,16 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then exit 1 fi + echo "Dumping debug symbols.." + "./../../Libraries/breakpad/src/tools/linux/dump_syms/dump_syms" "$ReleasePath/$BinaryName" > "$ReleasePath/$BinaryName.sym" + echo "Done!" + + echo "Stripping the executable.." + strip -s "$ReleasePath/$BinaryName" + echo "Done!" + echo "Preparing version $AppVersionStrFull, executing Packer.." - cd "$ReleasePath" && "./Packer" -path Telegram -path Updater -version $VersionForPacker $DevParam && cd "$HomePath" + cd "$ReleasePath" && "./Packer" -path "$BinaryName" -path Updater -version $VersionForPacker $DevParam && cd "$HomePath" echo "Packer done!" if [ "$BetaVersion" != "0" ]; then @@ -146,6 +159,12 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then SetupFile="tbeta${BetaVersion}_${BetaSignature}.tar.xz" fi + SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'` + echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash" + mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash" + cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/" + echo "Done!" + if [ ! -d "$ReleasePath/deploy" ]; then mkdir "$ReleasePath/deploy" fi @@ -154,10 +173,10 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then mkdir "$ReleasePath/deploy/$AppVersionStrMajor" fi - echo "Copying Telegram, Updater and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStrFull.."; + echo "Copying $BinaryName, Updater and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStrFull.."; mkdir "$DeployPath" - mkdir "$DeployPath/Telegram" - mv "$ReleasePath/Telegram" "$DeployPath/Telegram/" + mkdir "$DeployPath/$BinaryName" + mv "$ReleasePath/$BinaryName" "$DeployPath/Telegram/" mv "$ReleasePath/Updater" "$DeployPath/Telegram/" mv "$ReleasePath/$UpdateFile" "$DeployPath/" if [ "$BetaVersion" != "0" ]; then @@ -168,6 +187,8 @@ fi if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then + DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols" + touch "./SourceFiles/telegram.qrc" xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build @@ -181,6 +202,28 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg exit 1 fi + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then + echo "Removing Updater debug symbols.." + rm -rf "$ReleasePath/$BinaryName.app/Contents/Frameworks/Updater.dSYM" + echo "Done!" + fi + + echo "Dumping debug symbols.." + "./../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" > "$ReleasePath/$BinaryName.sym" + echo "Done!" + + echo "Stripping the executable.." + strip "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" + echo "Done!" + + echo "Signing the application.." + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then + codesign --force --deep --sign "Developer ID Application: John Preston" "$ReleasePath/$BinaryName.app" + elif [ "$BuildTarget" == "macstore" ]; then + codesign --force --deep --sign "3rd Party Mac Developer Application: TELEGRAM MESSENGER LLP (6N38VWS5BX)" "$ReleasePath/$BinaryName.app" --entitlements "Telegram/Telegram Desktop.entitlements" + fi + echo "Done!" + AppUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" | awk -F " " '{print $2}'` DsymUUID=`dwarfdump -u "$ReleasePath/$BinaryName.app.dSYM" | awk -F " " '{print $2}'` if [ "$AppUUID" != "$DsymUUID" ]; then @@ -215,6 +258,12 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg fi fi + SymbolsHash=`head -n 1 "$ReleasePath/$BinaryName.sym" | awk -F " " 'END {print $4}'` + echo "Copying $BinaryName.sym to $DropboxSymbolsPath/$BinaryName/$SymbolsHash" + mkdir -p "$DropboxSymbolsPath/$BinaryName/$SymbolsHash" + cp "$ReleasePath/$BinaryName.sym" "$DropboxSymbolsPath/$BinaryName/$SymbolsHash/" + echo "Done!" + if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then if [ "$BetaVersion" == "0" ]; then cd "$ReleasePath" @@ -294,6 +343,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg rm "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" rm -rf "$ReleasePath/$BinaryName.app/Contents/_CodeSignature" + mkdir -p "$DropboxDeployPath" cp -v "$DeployPath/$BinaryName.app" "$DropboxDeployPath/" cp -rv "$DeployPath/$BinaryName.app.dSYM" "$DropboxDeployPath/" fi diff --git a/Telegram/Deploy.sh b/Telegram/Deploy.sh index 058cbf09d2bd04..4a54d780a7719e 100755 --- a/Telegram/Deploy.sh +++ b/Telegram/Deploy.sh @@ -165,13 +165,7 @@ fi fi fi - if [ ! -d "$DropboxPath" ]; then - mkdir "$DropboxPath" - fi - - if [ ! -d "$DropboxDeployPath" ]; then - mkdir "$DropboxDeployPath" - fi + mkdir -p "$DropboxDeployPath" fi #fi diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 5023c7ed7a0f06..e434100510f21b 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -199,7 +199,7 @@ namespace Global { dataStream.setVersion(QDataStream::Qt_5_3); dataStream << quint64(cRealBetaVersion()) << cBetaPrivateKey(); } else { - LOG(("Error: could not open '%1' for writing private key!").arg(beta.fileName())); + LOG(("FATAL: Could not open '%1' for writing private key!").arg(beta.fileName())); return false; } } else if (beta.exists()) { @@ -216,11 +216,11 @@ namespace Global { cSetBetaPrivateKey(k); cSetRealBetaVersion(v); } else { - LOG(("Error: '%1' is corrupted, reinstall private beta!").arg(beta.fileName())); + LOG(("FATAL: '%1' is corrupted, reinstall private beta!").arg(beta.fileName())); return false; } } else { - LOG(("Error: could not open '%1' for reading private key!").arg(beta.fileName())); + LOG(("FATAL: could not open '%1' for reading private key!").arg(beta.fileName())); return false; } } diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index 6764779b1a5971..fc48c7322eaed1 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -78,7 +78,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_weekday7_full" = "Sonntag"; "lng_month_day" = "{day}. {month}"; -"lng_month_day_year" = "{day} {month}, {year}"; +"lng_month_day_year" = "{day}. {month} {year}"; "lng_month_year" = "{month}, {year}"; "lng_box_ok" = "OK"; @@ -454,7 +454,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_chat_all_members_admins" = "Alle Mitglieder Sind Admins"; "lng_chat_about_all_admins" = "Gruppenmitglieder können neue Leute hinzufügen sowie den Gruppennamen und das Bild ändern."; -"lng_chat_about_admins" = "Nur Admins können neue neue Leute hinzufügen und entfernen, den Gruppennamen und das Bild ändern."; +"lng_chat_about_admins" = "Nur Admins können neue Leute hinzufügen und entfernen, den Gruppennamen und das Bild ändern."; "lng_participant_filter" = "Suche"; "lng_participant_invite" = "Einladen"; @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "Sicher, dass du diese Gruppe löschen willst? Alle Mitglieder und Nachrichten werden entfernt."; "lng_message_empty" = "Leere Nachricht"; -"lng_media_unsupported" = "Format Nicht Unterstützt"; +"lng_message_unsupported" = "Diese Nachricht wird von deiner Telegram Desktop Version nicht unterstützt. Bitte aktualisiere sie in den Einstellungen oder über {link}"; "lng_action_add_user" = "{from} hat {user} hinzugefügt"; "lng_action_add_users_many" = "{from} hat {users} hinzugefügt"; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "Gespeicherte GIFs"; "lng_inline_bot_results" = "Ergebnisse von {inline_bot}"; "lng_inline_bot_no_results" = "Keine Ergebnisse"; +"lng_inline_bot_via" = "via {inline_bot}"; "lng_box_remove" = "Entfernen"; @@ -793,7 +794,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_delete" = "Löschen"; "lng_selected_forward" = "Weiterleiten"; "lng_selected_count" = "{count:_not_used_|# Nachricht|# Nachrichten}"; -"lng_selected_cancel_sure_this" = "Upload wirklich abbrechen?"; +"lng_selected_cancel_sure_this" = "Upload abbrechen?"; +"lng_selected_upload_stop" = "Abbrechen"; "lng_selected_delete_sure_this" = "Diese Nachricht wirklich löschen?"; "lng_selected_delete_sure" = "Willst du {count:_not_used_|# Nachricht|# Nachrichten} löschen?"; "lng_box_delete" = "Löschen"; @@ -877,7 +879,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_mac_menu_redo" = "Wiederholen"; "lng_mac_menu_cut" = "Ausschneiden"; "lng_mac_menu_copy" = "Kopieren"; -"lng_mac_menu_paste" = "Einsetzen"; +"lng_mac_menu_paste" = "Einfügen"; "lng_mac_menu_delete" = "Löschen"; "lng_mac_menu_select_all" = "Alles auswählen"; "lng_mac_menu_window" = "Fenster"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index 20716ed5d5d590..ecb880634f11b0 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "¿Quieres eliminar este grupo? Todos los miembros y mensajes se perderán."; "lng_message_empty" = "Mensaje vacío"; -"lng_media_unsupported" = "Multimedia no soportada"; +"lng_message_unsupported" = "Este mensaje no es soportado por tu versión de Telegram Desktop. Por favor, actualiza a la última versión desde Ajustes o instálala desde {link}"; "lng_action_add_user" = "{from} añadió a {user}"; "lng_action_add_users_many" = "{from} añadió a {users}"; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "GIF guardados"; "lng_inline_bot_results" = "Resultados de {inline_bot}"; "lng_inline_bot_no_results" = "Sin resultados"; +"lng_inline_bot_via" = "vía {inline_bot}"; "lng_box_remove" = "Eliminar"; @@ -793,7 +794,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_delete" = "Eliminar"; "lng_selected_forward" = "Reenviar"; "lng_selected_count" = "{count:_not_used_|# mensaje|# mensajes}"; -"lng_selected_cancel_sure_this" = "¿Quieres cancelar este envío?"; +"lng_selected_cancel_sure_this" = "¿Cancelar envío?"; +"lng_selected_upload_stop" = "Detener"; "lng_selected_delete_sure_this" = "¿Quieres eliminar este mensaje?"; "lng_selected_delete_sure" = "¿Quieres eliminar {count:_not_used_|# mensaje|# mensajes}?"; "lng_box_delete" = "Eliminar"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index 28d9b9eaeecaed..b68200cac03e6b 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "Sei sicuro di voler eliminare questo gruppo? Tutti i membri verranno rimossi e i messaggi verranno persi."; "lng_message_empty" = "Messaggio vuoto"; -"lng_media_unsupported" = "Media non supportato"; +"lng_message_unsupported" = "Questo messaggio non è supportato dalla tua versione di Telegram Desktop. Per favore, aggiorna all'ultima versione dalle Impostazioni o installalo da {link}"; "lng_action_add_user" = "{from} ha aggiunto {user}"; "lng_action_add_users_many" = "{from} ha aggiunto {users}"; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "GIF salvate"; "lng_inline_bot_results" = "Risultati da {inline_bot}"; "lng_inline_bot_no_results" = "Nessun risultato"; +"lng_inline_bot_via" = "via {inline_bot}"; "lng_box_remove" = "Rimuovi"; @@ -793,7 +794,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_delete" = "Elimina"; "lng_selected_forward" = "Inoltra"; "lng_selected_count" = "{count:_not_used_|# messaggio|# messaggi}"; -"lng_selected_cancel_sure_this" = "Vuoi annullare il caricamento?"; +"lng_selected_cancel_sure_this" = "Annullare il caricamento?"; +"lng_selected_upload_stop" = "Arresta "; "lng_selected_delete_sure_this" = "Vuoi eliminare questo messaggio?"; "lng_selected_delete_sure" = "Vuoi eliminare {count:_not_used_|# messaggio|# messaggi}?"; "lng_box_delete" = "Elimina"; @@ -832,7 +834,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; "lng_new_version_minor" = "— Bug fix e altri miglioramenti minori"; -"lng_new_version_text" = "Rivoluzione GIF: L'invio e il download delle GIF sono ora 10 volte più veloci, riproduci automaticamente le GIF e salva le tue GIF preferite in una pagina dedicata nel pannello sticker.\n\nPiù info sulle GIF:\n{gifs_link}\n\n@-Bot: Un nuovo modo di aggiungere contenuto dai bot in qualsiasi chat. Scrivi l'username di un bot e la tua domanda nel campo di scrittura per ricevere risultati immediati e inviarli nella chat. Prova a scrivere “@gif dog” nella tua prossima chat. Bot di esempio: @gif, @wiki, @bing, @vid, @bold.\n\nPiù info sui @-Bot:\n{bots_link}\n\nInoltre in questa versione: Nuovo design per i media, impostazioni di download automatico per foto, note vocali e GIF."; +"lng_new_version_text" = "Rivoluzione GIF: L'invio e il download delle GIF sono ora 10 volte più veloci, riproduci automaticamente le GIF e salva le tue GIF preferite in una pagina dedicata nel pannello sticker.\n\nPiù info sulle GIF:\n{gifs_link}\n\nInline Bot: Un nuovo modo di aggiungere contenuto dai bot in qualsiasi chat. Scrivi l'username di un bot e la tua domanda nel campo di scrittura per ricevere risultati immediati e inviarli nella chat. Prova a scrivere “@gif dog” nella tua prossima chat. Bot di esempio: @gif, @wiki, @bing, @vid, @bold.\n\nPiù info sugli Inline Bot:\n{bots_link}\n\nInoltre in questa versione: Nuovo design per i media, impostazioni di download automatico per foto, note vocali e GIF."; "lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index 09113ebe7346bc..2c7022c509b95f 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "정말로 그룹방을 삭제하시겠습니까? 모든 구성원 및 메시지가 삭제됩니다."; "lng_message_empty" = "메시지 없음"; -"lng_media_unsupported" = "지원하지 않는 미디어"; +"lng_message_unsupported" = "이 메시지는 텔레그램 데스크탑에서 호환이 되지 않습니다. 설정에서 최신 버전으로 업데이트를 하던가 {link}를 통하여 설치해주세요."; "lng_action_add_user" = "{from} 님께서 {user} 님을 초대하셨습니다."; "lng_action_add_users_many" = "{from}님께서 {users}명을 초대하였습니다."; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "저장된 GIF"; "lng_inline_bot_results" = "{inline_bot} 결과"; "lng_inline_bot_no_results" = "결과 없음"; +"lng_inline_bot_via" = "{inline_bot} 결과"; "lng_box_remove" = "삭제"; @@ -794,6 +795,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_forward" = "전달"; "lng_selected_count" = "{count:_not_used_|# 메시지|# 메시지}"; "lng_selected_cancel_sure_this" = "업로드를 취소하시겠습니까?"; +"lng_selected_upload_stop" = "정지"; "lng_selected_delete_sure_this" = "메시지를 삭제하시겠습니까?"; "lng_selected_delete_sure" = "{count:_not_used_|# 메시지|# 메시지}를 삭제하시겠습니까?"; "lng_box_delete" = "삭제"; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index fe6af5786c9e50..b1993615f1c5b7 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "Groep echt verwijderen? Berichten worden gewist en alle deelnemers verwijderd."; "lng_message_empty" = "Leeg bericht"; -"lng_media_unsupported" = "Niet-ondersteunde media"; +"lng_message_unsupported" = "Dit bericht wordt niet ondersteund door jouw versie van Telegram Desktop. Werk bij naar de laatste versie via de instellingen of installeer vanuit {link}"; "lng_action_add_user" = "{from} heeft {user} toegevoegd"; "lng_action_add_users_many" = "{from} heeft {users} toegevoegd"; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "Opgeslagen GIF's"; "lng_inline_bot_results" = "Resultaten van {inline_bot}"; "lng_inline_bot_no_results" = "Geen resultaten"; +"lng_inline_bot_via" = "via {inline_bot}"; "lng_box_remove" = "Verwijder"; @@ -793,7 +794,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_delete" = "Verwijder"; "lng_selected_forward" = "Doorsturen"; "lng_selected_count" = "{count:_not_used_|# bericht|# berichten}"; -"lng_selected_cancel_sure_this" = "Wil je deze upload annuleren?"; +"lng_selected_cancel_sure_this" = "Upload annuleren?"; +"lng_selected_upload_stop" = "Stoppen"; "lng_selected_delete_sure_this" = "Wil je dit bericht verwijderen?"; "lng_selected_delete_sure" = "Wil je {count:_not_used_|# bericht|# berichten} verwijderen?"; "lng_box_delete" = "Verwijder"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index 200c3741e577c7..26d2c98b35fc9f 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -498,7 +498,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_sure_delete_group" = "Tem certeza que deseja apagar este grupo? Todos os membros serão removidos e todas as mensagens serão perdidas."; "lng_message_empty" = "Mensagem Vazia"; -"lng_media_unsupported" = "Mídia Não-Suportada"; +"lng_message_unsupported" = "Essa mensagem não é suportada em sua versão do Telegram Desktop. Atualize para a última versão nas Configurações ou instale por aqui {link}"; "lng_action_add_user" = "{from} adicionou {user}"; "lng_action_add_users_many" = "{from} adicionou {users}"; @@ -600,6 +600,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_saved_gifs" = "GIFs Salvos"; "lng_inline_bot_results" = "Resultados de {inline_bot}"; "lng_inline_bot_no_results" = "Nenhum resultado"; +"lng_inline_bot_via" = "via {inline_bot}"; "lng_box_remove" = "Remover"; @@ -793,7 +794,8 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org "lng_selected_delete" = "Apagar"; "lng_selected_forward" = "Encaminhar"; "lng_selected_count" = "{count:_not_used_|# mensagem|# mensagens}"; -"lng_selected_cancel_sure_this" = "Você deseja cancelar o envio?"; +"lng_selected_cancel_sure_this" = "Cancelar envio?"; +"lng_selected_upload_stop" = "Parar"; "lng_selected_delete_sure_this" = "Você deseja apagar essa mensagem?"; "lng_selected_delete_sure" = "Você deseja apagar {count:_not_used_|# mensagem|# mensagens}?"; "lng_box_delete" = "Apagar"; diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index b776cba00f2894..c987c70c62904a 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -338,7 +338,7 @@ namespace Logs { LOG(("Arguments: %1").arg(cArguments())); if (!LogsData) { - LOG(("Could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain, qsl("_startXX")))); + LOG(("FATAL: Could not open '%1' for writing log!").arg(_logsFilePath(LogDataMain, qsl("_startXX")))); return; } @@ -391,7 +391,7 @@ namespace Logs { delete LogsData; LogsData = 0; - LOG(("Could not move logging to '%1'!").arg(_logsFilePath(LogDataMain))); + LOG(("FATAL: Could not move logging to '%1'!").arg(_logsFilePath(LogDataMain))); return false; } @@ -860,6 +860,7 @@ namespace SignalHandlers { #elif defined Q_OS_MAC #ifdef MAC_USE_BREAKPAD +#ifndef _DEBUG BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( dumpspath.toUtf8().toStdString(), /*FilterCallback*/ 0, @@ -868,6 +869,7 @@ namespace SignalHandlers { true, 0 ); +#endif SetSignalHandlers = false; #else crashpad::CrashpadClient crashpad_client; @@ -956,7 +958,7 @@ namespace SignalHandlers { return Started; } - LOG(("Could not open '%1' for writing!").arg(QString::fromUtf8(CrashDumpPath))); + LOG(("FATAL: Could not open '%1' for writing!").arg(QString::fromUtf8(CrashDumpPath))); return CantOpen; } diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 70a484b14d17be..22ede49fcf3af6 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1357,9 +1357,7 @@ 07C3AF341948FC3B0016CFF1 /* Force Resources Directory */, 07C3AF25194336160016CFF1 /* Resources */, 07489B6B1A28949600348CD9 /* Build Updater */, - 0746AC8F1A28D4140040AE26 /* Clean Updater */, 071AD90E1C60AA74008C9E90 /* Copy crashpad_handler */, - 07489B6D1A28972E00348CD9 /* Sign Application */, ); buildRules = ( ); @@ -1454,20 +1452,6 @@ shellPath = /bin/sh; shellScript = "mkdir -p \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers\" && cp \"./../../Libraries/crashpad/crashpad/out/Release/crashpad_handler\" \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Helpers/\""; }; - 0746AC8F1A28D4140040AE26 /* Clean Updater */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Clean Updater"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "rm -rf \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app/Contents/Frameworks/Updater.dSYM\""; - }; 07489B6B1A28949600348CD9 /* Build Updater */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -1482,20 +1466,6 @@ shellPath = /bin/sh; shellScript = "xcodebuild -project Updater.xcodeproj -configuration $CONFIGURATION"; }; - 07489B6D1A28972E00348CD9 /* Sign Application */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Sign Application"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "codesign --force --deep --sign \"Developer ID Application: John Preston\" \"$CONFIGURATION_BUILD_DIR/$PRODUCT_NAME.app\""; - }; 07C3AF341948FC3B0016CFF1 /* Force Resources Directory */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/Telegram/_breakpad_appstore_patch.diff b/Telegram/_breakpad_appstore_patch.diff new file mode 100644 index 00000000000000..9b12b92b8ced34 --- /dev/null +++ b/Telegram/_breakpad_appstore_patch.diff @@ -0,0 +1,366 @@ +diff --git a/src/client/mac/Breakpad.xcodeproj/project.pbxproj b/src/client/mac/Breakpad.xcodeproj/project.pbxproj +index 584ec5d..9cea428 100644 +--- a/src/client/mac/Breakpad.xcodeproj/project.pbxproj ++++ b/src/client/mac/Breakpad.xcodeproj/project.pbxproj +@@ -174,7 +174,6 @@ + F92C565F0ECD116B009BE4BA /* protected_memory_allocator.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53720ECCE3FD009BE4BA /* protected_memory_allocator.cc */; }; + F92C56630ECD1179009BE4BA /* exception_handler.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536D0ECCE3FD009BE4BA /* exception_handler.cc */; }; + F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */ = {isa = PBXBuildFile; fileRef = F92C563C0ECD10B3009BE4BA /* breakpadUtilities.dylib */; }; +- F92C568A0ECD15F9009BE4BA /* Inspector in Resources */ = {isa = PBXBuildFile; fileRef = F92C53540ECCE349009BE4BA /* Inspector */; }; + F92C56A90ECE04C5009BE4BA /* crash_report_sender.m in Sources */ = {isa = PBXBuildFile; fileRef = F92C56A80ECE04C5009BE4BA /* crash_report_sender.m */; }; + F93803CD0F8083B7004D428B /* dynamic_images.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536B0ECCE3FD009BE4BA /* dynamic_images.cc */; }; + F93803CE0F8083B7004D428B /* exception_handler.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536D0ECCE3FD009BE4BA /* exception_handler.cc */; }; +@@ -213,7 +212,6 @@ + F9C44DBD0EF072A0003AEBAA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9C44DBA0EF072A0003AEBAA /* MainMenu.xib */; }; + F9C44E000EF077CD003AEBAA /* Breakpad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Breakpad.framework */; }; + F9C44E3C0EF08B12003AEBAA /* Breakpad.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Breakpad.framework */; }; +- F9C44E980EF09F56003AEBAA /* crash_report_sender.app in Resources */ = {isa = PBXBuildFile; fileRef = F92C56A00ECE04A7009BE4BA /* crash_report_sender.app */; }; + F9C44EA20EF09F93003AEBAA /* HTTPMultipartUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F92C53770ECCE635009BE4BA /* HTTPMultipartUpload.m */; }; + F9C44EE50EF0A006003AEBAA /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9C44EE40EF0A006003AEBAA /* SystemConfiguration.framework */; }; + F9C44EE90EF0A3C1003AEBAA /* GTMLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F9C44EE80EF0A3C1003AEBAA /* GTMLogger.m */; }; +@@ -417,13 +415,6 @@ + remoteGlobalIDString = F92C563B0ECD10B3009BE4BA; + remoteInfo = breakpadUtilities; + }; +- F92C56870ECD15F1009BE4BA /* PBXContainerItemProxy */ = { +- isa = PBXContainerItemProxy; +- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; +- proxyType = 1; +- remoteGlobalIDString = F92C53530ECCE349009BE4BA; +- remoteInfo = Inspector; +- }; + F93DE2FB0F82C3C600608B94 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; +@@ -536,13 +527,6 @@ + remoteGlobalIDString = 8DC2EF4F0486A6940098B216; + remoteInfo = Breakpad; + }; +- F9C44E960EF09F4B003AEBAA /* PBXContainerItemProxy */ = { +- isa = PBXContainerItemProxy; +- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; +- proxyType = 1; +- remoteGlobalIDString = F92C569F0ECE04A7009BE4BA; +- remoteInfo = crash_report_sender; +- }; + /* End PBXContainerItemProxy section */ + + /* Begin PBXCopyFilesBuildPhase section */ +@@ -1193,8 +1177,6 @@ + ); + dependencies = ( + F92C56860ECD15EF009BE4BA /* PBXTargetDependency */, +- F92C56880ECD15F1009BE4BA /* PBXTargetDependency */, +- F9C44E970EF09F4B003AEBAA /* PBXTargetDependency */, + ); + name = Breakpad; + productInstallPath = "$(HOME)/Library/Frameworks"; +@@ -1401,6 +1383,8 @@ + /* Begin PBXProject section */ + 0867D690FE84028FC02AAC07 /* Project object */ = { + isa = PBXProject; ++ attributes = { ++ }; + buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Breakpad" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; +@@ -1589,8 +1573,6 @@ + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( +- F9C44E980EF09F56003AEBAA /* crash_report_sender.app in Resources */, +- F92C568A0ECD15F9009BE4BA /* Inspector in Resources */, + F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; +@@ -1962,11 +1944,6 @@ + target = F92C563B0ECD10B3009BE4BA /* breakpadUtilities */; + targetProxy = F92C56850ECD15EF009BE4BA /* PBXContainerItemProxy */; + }; +- F92C56880ECD15F1009BE4BA /* PBXTargetDependency */ = { +- isa = PBXTargetDependency; +- target = F92C53530ECCE349009BE4BA /* Inspector */; +- targetProxy = F92C56870ECD15F1009BE4BA /* PBXContainerItemProxy */; +- }; + F93DE2FC0F82C3C600608B94 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = F93803BD0F80820F004D428B /* generator_test */; +@@ -2027,11 +2004,6 @@ + target = 8DC2EF4F0486A6940098B216 /* Breakpad */; + targetProxy = F9C44E190EF0790F003AEBAA /* PBXContainerItemProxy */; + }; +- F9C44E970EF09F4B003AEBAA /* PBXTargetDependency */ = { +- isa = PBXTargetDependency; +- target = F92C569F0ECE04A7009BE4BA /* crash_report_sender */; +- targetProxy = F9C44E960EF09F4B003AEBAA /* PBXContainerItemProxy */; +- }; + /* End PBXTargetDependency section */ + + /* Begin PBXVariantGroup section */ +@@ -2128,8 +2100,12 @@ + isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; + buildSettings = { ++ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; ++ CLANG_CXX_LIBRARY = "libc++"; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; +- SDKROOT = macosx10.5; ++ GCC_VERSION = ""; ++ MACOSX_DEPLOYMENT_TARGET = 10.8; ++ SDKROOT = macosx; + }; + name = Debug; + }; +@@ -2137,7 +2113,12 @@ + isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027811F0D3AF00FCF3E4 /* BreakpadRelease.xcconfig */; + buildSettings = { ++ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; ++ CLANG_CXX_LIBRARY = "libc++"; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; ++ GCC_VERSION = ""; ++ MACOSX_DEPLOYMENT_TARGET = 10.8; ++ SDKROOT = macosx; + }; + name = Release; + }; +@@ -2456,7 +2437,12 @@ + isa = XCBuildConfiguration; + baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; + buildSettings = { ++ CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; ++ CLANG_CXX_LIBRARY = "libc++"; + GCC_TREAT_WARNINGS_AS_ERRORS = NO; ++ GCC_VERSION = ""; ++ MACOSX_DEPLOYMENT_TARGET = 10.8; ++ SDKROOT = macosx; + }; + name = "Debug With Code Coverage"; + }; +diff --git a/src/client/mac/Framework/Breakpad.mm b/src/client/mac/Framework/Breakpad.mm +index 1d2e519..943310f 100644 +--- a/src/client/mac/Framework/Breakpad.mm ++++ b/src/client/mac/Framework/Breakpad.mm +@@ -355,10 +355,10 @@ bool Breakpad::Initialize(NSDictionary *parameters) { + return false; + } + +- if ([[parameters objectForKey:@BREAKPAD_IN_PROCESS] boolValue]) ++// if ([[parameters objectForKey:@BREAKPAD_IN_PROCESS] boolValue]) + return InitializeInProcess(parameters); +- else +- return InitializeOutOfProcess(parameters); ++// else ++// return InitializeOutOfProcess(parameters); + } + + //============================================================================= +@@ -373,52 +373,52 @@ bool Breakpad::InitializeInProcess(NSDictionary* parameters) { + } + + //============================================================================= +-bool Breakpad::InitializeOutOfProcess(NSDictionary* parameters) { +- // Get path to Inspector executable. +- NSString *inspectorPathString = KeyValue(@BREAKPAD_INSPECTOR_LOCATION); +- +- // Standardize path (resolve symlinkes, etc.) and escape spaces +- inspectorPathString = [inspectorPathString stringByStandardizingPath]; +- inspectorPathString = [[inspectorPathString componentsSeparatedByString:@" "] +- componentsJoinedByString:@"\\ "]; +- +- // Create an on-demand server object representing the Inspector. +- // In case of a crash, we simply need to call the LaunchOnDemand() +- // method on it, then send a mach message to its service port. +- // It will then launch and perform a process inspection of our crashed state. +- // See the HandleException() method for the details. +-#define RECEIVE_PORT_NAME "com.Breakpad.Inspector" +- +- name_t portName; +- snprintf(portName, sizeof(name_t), "%s%d", RECEIVE_PORT_NAME, getpid()); +- +- // Save the location of the Inspector +- strlcpy(inspector_path_, [inspectorPathString fileSystemRepresentation], +- sizeof(inspector_path_)); +- +- // Append a single command-line argument to the Inspector path +- // representing the bootstrap name of the launch-on-demand receive port. +- // When the Inspector is launched, it can use this to lookup the port +- // by calling bootstrap_check_in(). +- strlcat(inspector_path_, " ", sizeof(inspector_path_)); +- strlcat(inspector_path_, portName, sizeof(inspector_path_)); +- +- kern_return_t kr = inspector_.Initialize(inspector_path_, +- portName, +- true); // shutdown on exit +- +- if (kr != KERN_SUCCESS) { +- return false; +- } +- +- // Create the handler (allocating it in our special protected pool) +- handler_ = +- new (gBreakpadAllocator->Allocate( +- sizeof(google_breakpad::ExceptionHandler))) +- google_breakpad::ExceptionHandler( +- Breakpad::ExceptionHandlerDirectCallback, this, true); +- return true; +-} ++//bool Breakpad::InitializeOutOfProcess(NSDictionary* parameters) { ++// // Get path to Inspector executable. ++// NSString *inspectorPathString = KeyValue(@BREAKPAD_INSPECTOR_LOCATION); ++// ++// // Standardize path (resolve symlinkes, etc.) and escape spaces ++// inspectorPathString = [inspectorPathString stringByStandardizingPath]; ++// inspectorPathString = [[inspectorPathString componentsSeparatedByString:@" "] ++// componentsJoinedByString:@"\\ "]; ++// ++// // Create an on-demand server object representing the Inspector. ++// // In case of a crash, we simply need to call the LaunchOnDemand() ++// // method on it, then send a mach message to its service port. ++// // It will then launch and perform a process inspection of our crashed state. ++// // See the HandleException() method for the details. ++//#define RECEIVE_PORT_NAME "com.Breakpad.Inspector" ++// ++// name_t portName; ++// snprintf(portName, sizeof(name_t), "%s%d", RECEIVE_PORT_NAME, getpid()); ++// ++// // Save the location of the Inspector ++// strlcpy(inspector_path_, [inspectorPathString fileSystemRepresentation], ++// sizeof(inspector_path_)); ++// ++// // Append a single command-line argument to the Inspector path ++// // representing the bootstrap name of the launch-on-demand receive port. ++// // When the Inspector is launched, it can use this to lookup the port ++// // by calling bootstrap_check_in(). ++// strlcat(inspector_path_, " ", sizeof(inspector_path_)); ++// strlcat(inspector_path_, portName, sizeof(inspector_path_)); ++// ++// kern_return_t kr = inspector_.Initialize(inspector_path_, ++// portName, ++// true); // shutdown on exit ++// ++// if (kr != KERN_SUCCESS) { ++// return false; ++// } ++// ++// // Create the handler (allocating it in our special protected pool) ++// handler_ = ++// new (gBreakpadAllocator->Allocate( ++// sizeof(google_breakpad::ExceptionHandler))) ++// google_breakpad::ExceptionHandler( ++// Breakpad::ExceptionHandlerDirectCallback, this, true); ++// return true; ++//} + + //============================================================================= + Breakpad::~Breakpad() { +@@ -445,10 +445,10 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { + NSString *version = [parameters objectForKey:@BREAKPAD_VERSION]; + NSString *urlStr = [parameters objectForKey:@BREAKPAD_URL]; + NSString *interval = [parameters objectForKey:@BREAKPAD_REPORT_INTERVAL]; +- NSString *inspectorPathString = +- [parameters objectForKey:@BREAKPAD_INSPECTOR_LOCATION]; +- NSString *reporterPathString = +- [parameters objectForKey:@BREAKPAD_REPORTER_EXE_LOCATION]; ++// NSString *inspectorPathString = ++// [parameters objectForKey:@BREAKPAD_INSPECTOR_LOCATION]; ++// NSString *reporterPathString = ++// [parameters objectForKey:@BREAKPAD_REPORTER_EXE_LOCATION]; + NSString *timeout = [parameters objectForKey:@BREAKPAD_CONFIRM_TIMEOUT]; + NSArray *logFilePaths = [parameters objectForKey:@BREAKPAD_LOGFILES]; + NSString *logFileTailSize = +@@ -536,39 +536,39 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { + } + + // Find the helper applications if not specified in user config. +- NSString *resourcePath = nil; +- if (!inspectorPathString || !reporterPathString) { +- resourcePath = GetResourcePath(); +- if (!resourcePath) { +- return false; +- } +- } ++// NSString *resourcePath = nil; ++// if (!inspectorPathString || !reporterPathString) { ++// resourcePath = GetResourcePath(); ++// if (!resourcePath) { ++// return false; ++// } ++// } + + // Find Inspector. +- if (!inspectorPathString) { +- inspectorPathString = +- [resourcePath stringByAppendingPathComponent:@"Inspector"]; +- } +- +- // Verify that there is an Inspector tool. +- if (![[NSFileManager defaultManager] fileExistsAtPath:inspectorPathString]) { +- return false; +- } ++// if (!inspectorPathString) { ++// inspectorPathString = ++// [resourcePath stringByAppendingPathComponent:@"Inspector"]; ++// } ++// ++// // Verify that there is an Inspector tool. ++// if (![[NSFileManager defaultManager] fileExistsAtPath:inspectorPathString]) { ++// return false; ++// } + + // Find Reporter. +- if (!reporterPathString) { +- reporterPathString = +- [resourcePath +- stringByAppendingPathComponent:@"crash_report_sender.app"]; +- reporterPathString = +- [[NSBundle bundleWithPath:reporterPathString] executablePath]; +- } ++// if (!reporterPathString) { ++// reporterPathString = ++// [resourcePath ++// stringByAppendingPathComponent:@"crash_report_sender.app"]; ++// reporterPathString = ++// [[NSBundle bundleWithPath:reporterPathString] executablePath]; ++// } + + // Verify that there is a Reporter application. +- if (![[NSFileManager defaultManager] +- fileExistsAtPath:reporterPathString]) { +- return false; +- } ++// if (![[NSFileManager defaultManager] ++// fileExistsAtPath:reporterPathString]) { ++// return false; ++// } + + if (!dumpSubdirectory) { + dumpSubdirectory = @""; +@@ -601,10 +601,10 @@ bool Breakpad::ExtractParameters(NSDictionary *parameters) { + dictionary.SetKeyValue(BREAKPAD_REPORT_INTERVAL, [interval UTF8String]); + dictionary.SetKeyValue(BREAKPAD_SKIP_CONFIRM, [skipConfirm UTF8String]); + dictionary.SetKeyValue(BREAKPAD_CONFIRM_TIMEOUT, [timeout UTF8String]); +- dictionary.SetKeyValue(BREAKPAD_INSPECTOR_LOCATION, +- [inspectorPathString fileSystemRepresentation]); +- dictionary.SetKeyValue(BREAKPAD_REPORTER_EXE_LOCATION, +- [reporterPathString fileSystemRepresentation]); ++// dictionary.SetKeyValue(BREAKPAD_INSPECTOR_LOCATION, ++// [inspectorPathString fileSystemRepresentation]); ++// dictionary.SetKeyValue(BREAKPAD_REPORTER_EXE_LOCATION, ++// [reporterPathString fileSystemRepresentation]); + dictionary.SetKeyValue(BREAKPAD_LOGFILE_UPLOAD_SIZE, + [logFileTailSize UTF8String]); + dictionary.SetKeyValue(BREAKPAD_REQUEST_COMMENTS, +@@ -762,9 +762,9 @@ bool Breakpad::HandleException(int exception_type, + bool Breakpad::HandleMinidump(const char *dump_dir, const char *minidump_id) { + google_breakpad::ConfigFile config_file; + config_file.WriteFile(dump_dir, config_params_, dump_dir, minidump_id); +- google_breakpad::LaunchReporter( +- config_params_->GetValueForKey(BREAKPAD_REPORTER_EXE_LOCATION), +- config_file.GetFilePath()); ++// google_breakpad::LaunchReporter( ++// config_params_->GetValueForKey(BREAKPAD_REPORTER_EXE_LOCATION), ++// config_file.GetFilePath()); + return true; + } + From 952f24e4e1d43a0613984037221540a6e37cafe7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 4 Feb 2016 17:49:08 +0300 Subject: [PATCH 033/133] beta version 9019001 with new crash tracking --- Telegram/SourceFiles/config.h | 2 +- Telegram/Version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 4a1637ba043ad2..716414b06a829a 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9019; static const wchar_t *AppVersionStr = L"0.9.19"; static const bool DevVersion = true; -//#define BETA_VERSION (9015008ULL) // just comment this line to build public version +#define BETA_VERSION (9019001ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Version b/Telegram/Version index 9aa9665cefba83..fba09052d88c29 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.19 AppVersionStr 0.9.19 DevChannel 1 -BetaVersion 0 9015008 +BetaVersion 9019001 From 91e1330b5966b0422b9ada4750249985582b4390 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 4 Feb 2016 20:45:53 +0300 Subject: [PATCH 034/133] improved breakpad appstore patch --- Telegram/Build.sh | 2 +- Telegram/_breakpad_appstore_patch.diff | 143 +++++++++++++++++++++---- 2 files changed, 124 insertions(+), 21 deletions(-) diff --git a/Telegram/Build.sh b/Telegram/Build.sh index 302419fadad863..f7a64597ffa33e 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -209,7 +209,7 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg fi echo "Dumping debug symbols.." - "./../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app/Contents/MacOS/$BinaryName" > "$ReleasePath/$BinaryName.sym" + "./../../Libraries/breakpad/src/tools/mac/dump_syms/build/Release/dump_syms" "$ReleasePath/$BinaryName.app.dSYM" > "$ReleasePath/$BinaryName.sym" 2>/dev/null echo "Done!" echo "Stripping the executable.." diff --git a/Telegram/_breakpad_appstore_patch.diff b/Telegram/_breakpad_appstore_patch.diff index 9b12b92b8ced34..7ef79fa2162fe1 100644 --- a/Telegram/_breakpad_appstore_patch.diff +++ b/Telegram/_breakpad_appstore_patch.diff @@ -1,16 +1,40 @@ diff --git a/src/client/mac/Breakpad.xcodeproj/project.pbxproj b/src/client/mac/Breakpad.xcodeproj/project.pbxproj -index 584ec5d..9cea428 100644 +index 584ec5d..1c7214f 100644 --- a/src/client/mac/Breakpad.xcodeproj/project.pbxproj +++ b/src/client/mac/Breakpad.xcodeproj/project.pbxproj -@@ -174,7 +174,6 @@ +@@ -35,6 +35,19 @@ + /* End PBXAggregateTarget section */ + + /* Begin PBXBuildFile section */ ++ 0748C0431C63C409004489BF /* MachIPC.mm in Sources */ = {isa = PBXBuildFile; fileRef = F92C53790ECCE635009BE4BA /* MachIPC.mm */; }; ++ 0748C0441C63C43C004489BF /* minidump_generator.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536F0ECCE3FD009BE4BA /* minidump_generator.cc */; }; ++ 0748C0451C63C46C004489BF /* string_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53820ECCE635009BE4BA /* string_utilities.cc */; }; ++ 0748C0461C63C484004489BF /* minidump_file_writer.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C538F0ECCE70A009BE4BA /* minidump_file_writer.cc */; }; ++ 0748C0471C63C4A1004489BF /* dynamic_images.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536B0ECCE3FD009BE4BA /* dynamic_images.cc */; }; ++ 0748C0491C63C4CF004489BF /* macho_id.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537A0ECCE635009BE4BA /* macho_id.cc */; }; ++ 0748C04A1C63C4D4004489BF /* string_conversion.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53850ECCE6AD009BE4BA /* string_conversion.cc */; }; ++ 0748C04B1C63C4DB004489BF /* convert_UTF.c in Sources */ = {isa = PBXBuildFile; fileRef = F92C53870ECCE6C0009BE4BA /* convert_UTF.c */; }; ++ 0748C04C1C63C4EA004489BF /* macho_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537C0ECCE635009BE4BA /* macho_utilities.cc */; }; ++ 0748C04D1C63C50F004489BF /* file_id.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53740ECCE635009BE4BA /* file_id.cc */; }; ++ 0748C04E1C63C51C004489BF /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; }; ++ 0748C04F1C63C523004489BF /* macho_walker.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C537E0ECCE635009BE4BA /* macho_walker.cc */; }; ++ 0748C0501C63C52D004489BF /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; }; + 162F64F2161C577500CD68D5 /* arch_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 162F64F0161C577500CD68D5 /* arch_utilities.cc */; }; + 162F64F3161C577500CD68D5 /* arch_utilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 162F64F1161C577500CD68D5 /* arch_utilities.h */; }; + 162F64F4161C579B00CD68D5 /* arch_utilities.cc in Sources */ = {isa = PBXBuildFile; fileRef = 162F64F0161C577500CD68D5 /* arch_utilities.cc */; }; +@@ -170,11 +183,8 @@ + F92C564A0ECD10CA009BE4BA /* string_conversion.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53850ECCE6AD009BE4BA /* string_conversion.cc */; }; + F92C564C0ECD10DD009BE4BA /* breakpadUtilities.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F92C563C0ECD10B3009BE4BA /* breakpadUtilities.dylib */; }; + F92C56570ECD113E009BE4BA /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F92C554A0ECCF530009BE4BA /* Carbon.framework */; }; +- F92C565C0ECD1158009BE4BA /* breakpadUtilities.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = F92C563C0ECD10B3009BE4BA /* breakpadUtilities.dylib */; }; F92C565F0ECD116B009BE4BA /* protected_memory_allocator.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C53720ECCE3FD009BE4BA /* protected_memory_allocator.cc */; }; F92C56630ECD1179009BE4BA /* exception_handler.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536D0ECCE3FD009BE4BA /* exception_handler.cc */; }; - F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */ = {isa = PBXBuildFile; fileRef = F92C563C0ECD10B3009BE4BA /* breakpadUtilities.dylib */; }; +- F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */ = {isa = PBXBuildFile; fileRef = F92C563C0ECD10B3009BE4BA /* breakpadUtilities.dylib */; }; - F92C568A0ECD15F9009BE4BA /* Inspector in Resources */ = {isa = PBXBuildFile; fileRef = F92C53540ECCE349009BE4BA /* Inspector */; }; F92C56A90ECE04C5009BE4BA /* crash_report_sender.m in Sources */ = {isa = PBXBuildFile; fileRef = F92C56A80ECE04C5009BE4BA /* crash_report_sender.m */; }; F93803CD0F8083B7004D428B /* dynamic_images.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536B0ECCE3FD009BE4BA /* dynamic_images.cc */; }; F93803CE0F8083B7004D428B /* exception_handler.cc in Sources */ = {isa = PBXBuildFile; fileRef = F92C536D0ECCE3FD009BE4BA /* exception_handler.cc */; }; -@@ -213,7 +212,6 @@ +@@ -213,7 +223,6 @@ F9C44DBD0EF072A0003AEBAA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9C44DBA0EF072A0003AEBAA /* MainMenu.xib */; }; F9C44E000EF077CD003AEBAA /* Breakpad.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Breakpad.framework */; }; F9C44E3C0EF08B12003AEBAA /* Breakpad.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = 8DC2EF5B0486A6940098B216 /* Breakpad.framework */; }; @@ -18,10 +42,17 @@ index 584ec5d..9cea428 100644 F9C44EA20EF09F93003AEBAA /* HTTPMultipartUpload.m in Sources */ = {isa = PBXBuildFile; fileRef = F92C53770ECCE635009BE4BA /* HTTPMultipartUpload.m */; }; F9C44EE50EF0A006003AEBAA /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F9C44EE40EF0A006003AEBAA /* SystemConfiguration.framework */; }; F9C44EE90EF0A3C1003AEBAA /* GTMLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = F9C44EE80EF0A3C1003AEBAA /* GTMLogger.m */; }; -@@ -417,13 +415,6 @@ +@@ -410,20 +419,6 @@ remoteGlobalIDString = F92C563B0ECD10B3009BE4BA; remoteInfo = breakpadUtilities; }; +- F92C56850ECD15EF009BE4BA /* PBXContainerItemProxy */ = { +- isa = PBXContainerItemProxy; +- containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; +- proxyType = 1; +- remoteGlobalIDString = F92C563B0ECD10B3009BE4BA; +- remoteInfo = breakpadUtilities; +- }; - F92C56870ECD15F1009BE4BA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; @@ -32,7 +63,7 @@ index 584ec5d..9cea428 100644 F93DE2FB0F82C3C600608B94 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 0867D690FE84028FC02AAC07 /* Project object */; -@@ -536,13 +527,6 @@ +@@ -536,13 +531,6 @@ remoteGlobalIDString = 8DC2EF4F0486A6940098B216; remoteInfo = Breakpad; }; @@ -46,10 +77,28 @@ index 584ec5d..9cea428 100644 /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ -@@ -1193,8 +1177,6 @@ +@@ -715,7 +703,6 @@ + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( +- F92C565C0ECD1158009BE4BA /* breakpadUtilities.dylib in Frameworks */, + 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; +@@ -1183,18 +1170,13 @@ + isa = PBXNativeTarget; + buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Breakpad" */; + buildPhases = ( +- F97A0E850ED4EC15008784D3 /* Change install name of breakpadUtilities */, + 8DC2EF500486A6940098B216 /* Headers */, +- 8DC2EF520486A6940098B216 /* Resources */, + 8DC2EF540486A6940098B216 /* Sources */, + 8DC2EF560486A6940098B216 /* Frameworks */, + ); + buildRules = ( ); dependencies = ( - F92C56860ECD15EF009BE4BA /* PBXTargetDependency */, +- F92C56860ECD15EF009BE4BA /* PBXTargetDependency */, - F92C56880ECD15F1009BE4BA /* PBXTargetDependency */, - F9C44E970EF09F4B003AEBAA /* PBXTargetDependency */, ); @@ -64,19 +113,73 @@ index 584ec5d..9cea428 100644 buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Breakpad" */; compatibilityVersion = "Xcode 3.1"; developmentRegion = English; -@@ -1589,8 +1573,6 @@ +@@ -1585,16 +1569,6 @@ + /* End PBXReferenceProxy section */ + + /* Begin PBXResourcesBuildPhase section */ +- 8DC2EF520486A6940098B216 /* Resources */ = { +- isa = PBXResourcesBuildPhase; +- buildActionMask = 2147483647; +- files = ( +- F9C44E980EF09F56003AEBAA /* crash_report_sender.app in Resources */, +- F92C568A0ECD15F9009BE4BA /* Inspector in Resources */, +- F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */, +- ); +- runOnlyForDeploymentPostprocessing = 0; +- }; + F92C569C0ECE04A7009BE4BA /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; +@@ -1642,20 +1616,6 @@ + shellPath = /bin/sh; + shellScript = "install_name_tool -id \"@executable_path/../Resources/breakpadUtilities.dylib\" \"${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\"\n"; + }; +- F97A0E850ED4EC15008784D3 /* Change install name of breakpadUtilities */ = { +- isa = PBXShellScriptBuildPhase; +- buildActionMask = 2147483647; +- files = ( +- ); +- inputPaths = ( +- ); +- name = "Change install name of breakpadUtilities"; +- outputPaths = ( +- ); +- runOnlyForDeploymentPostprocessing = 0; +- shellPath = /bin/sh; +- shellScript = "#!/bin/bash\ninstall_name_tool -id \"@executable_path/../Frameworks/Breakpad.framework/Resources/breakpadUtilities.dylib\" \"${BUILT_PRODUCTS_DIR}/breakpadUtilities.dylib\"\n"; +- }; + F9C77DD80F7DD5CF0045F7DB /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; +@@ -1676,6 +1636,19 @@ + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; files = ( -- F9C44E980EF09F56003AEBAA /* crash_report_sender.app in Resources */, -- F92C568A0ECD15F9009BE4BA /* Inspector in Resources */, - F92C56650ECD1185009BE4BA /* breakpadUtilities.dylib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; -@@ -1962,11 +1944,6 @@ ++ 0748C0501C63C52D004489BF /* bootstrap_compat.cc in Sources */, ++ 0748C04F1C63C523004489BF /* macho_walker.cc in Sources */, ++ 0748C04E1C63C51C004489BF /* md5.cc in Sources */, ++ 0748C04D1C63C50F004489BF /* file_id.cc in Sources */, ++ 0748C04C1C63C4EA004489BF /* macho_utilities.cc in Sources */, ++ 0748C04B1C63C4DB004489BF /* convert_UTF.c in Sources */, ++ 0748C04A1C63C4D4004489BF /* string_conversion.cc in Sources */, ++ 0748C0491C63C4CF004489BF /* macho_id.cc in Sources */, ++ 0748C0471C63C4A1004489BF /* dynamic_images.cc in Sources */, ++ 0748C0461C63C484004489BF /* minidump_file_writer.cc in Sources */, ++ 0748C0451C63C46C004489BF /* string_utilities.cc in Sources */, ++ 0748C0441C63C43C004489BF /* minidump_generator.cc in Sources */, ++ 0748C0431C63C409004489BF /* MachIPC.mm in Sources */, + F92C565F0ECD116B009BE4BA /* protected_memory_allocator.cc in Sources */, + F92C56630ECD1179009BE4BA /* exception_handler.cc in Sources */, + F92C55D10ECD0064009BE4BA /* Breakpad.mm in Sources */, +@@ -1957,16 +1930,6 @@ target = F92C563B0ECD10B3009BE4BA /* breakpadUtilities */; - targetProxy = F92C56850ECD15EF009BE4BA /* PBXContainerItemProxy */; + targetProxy = F92C564D0ECD10E5009BE4BA /* PBXContainerItemProxy */; }; +- F92C56860ECD15EF009BE4BA /* PBXTargetDependency */ = { +- isa = PBXTargetDependency; +- target = F92C563B0ECD10B3009BE4BA /* breakpadUtilities */; +- targetProxy = F92C56850ECD15EF009BE4BA /* PBXContainerItemProxy */; +- }; - F92C56880ECD15F1009BE4BA /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = F92C53530ECCE349009BE4BA /* Inspector */; @@ -85,7 +188,7 @@ index 584ec5d..9cea428 100644 F93DE2FC0F82C3C600608B94 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = F93803BD0F80820F004D428B /* generator_test */; -@@ -2027,11 +2004,6 @@ +@@ -2027,11 +1990,6 @@ target = 8DC2EF4F0486A6940098B216 /* Breakpad */; targetProxy = F9C44E190EF0790F003AEBAA /* PBXContainerItemProxy */; }; @@ -97,7 +200,7 @@ index 584ec5d..9cea428 100644 /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ -@@ -2128,8 +2100,12 @@ +@@ -2128,8 +2086,12 @@ isa = XCBuildConfiguration; baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; buildSettings = { @@ -111,7 +214,7 @@ index 584ec5d..9cea428 100644 }; name = Debug; }; -@@ -2137,7 +2113,12 @@ +@@ -2137,7 +2099,12 @@ isa = XCBuildConfiguration; baseConfigurationReference = 8B31027811F0D3AF00FCF3E4 /* BreakpadRelease.xcconfig */; buildSettings = { @@ -124,7 +227,7 @@ index 584ec5d..9cea428 100644 }; name = Release; }; -@@ -2456,7 +2437,12 @@ +@@ -2456,7 +2423,12 @@ isa = XCBuildConfiguration; baseConfigurationReference = 8B31027711F0D3AF00FCF3E4 /* BreakpadDebug.xcconfig */; buildSettings = { From f3a4b5460196ff3a6b1e24ce09596e0b1e07d10a Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 01:16:25 +0300 Subject: [PATCH 035/133] fixed bugs in crash dump finding and in beta version --- Telegram/SourceFiles/facades.cpp | 1 + Telegram/SourceFiles/window.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index e434100510f21b..4cb9c6202384f1 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -191,6 +191,7 @@ namespace Global { QFile beta(cExeDir() + qsl("TelegramBeta_data/tdata/beta")); if (cBetaVersion()) { cForceWorkingDir(cExeDir() + qsl("TelegramBeta_data/")); + QDir().mkpath(cWorkingDir() + qstr("tdata")); if (*BetaPrivateKey) { cSetBetaPrivateKey(QByteArray(BetaPrivateKey)); } diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 6525b79ddeb62c..43c2b25a8d9f28 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2028,7 +2028,7 @@ LastCrashedWindow::LastCrashedWindow() if (!possibleDump.startsWith('/')) { possibleDump = dumpspath + '/' + possibleDump; } - if (!possibleDump.endsWith('.dmp')) { + if (!possibleDump.endsWith(qstr(".dmp"))) { possibleDump += qsl(".dmp"); } QFileInfo possibleInfo(possibleDump); From cec7ebc24f5c0f40c0fee788b13b976f82a9c709 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 13:21:57 +0300 Subject: [PATCH 036/133] fixed build script, 0.9.19.1 version in .rc --- Telegram/Build.bat | 5 ++--- Telegram/Telegram.rc | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Telegram/Build.bat b/Telegram/Build.bat index 5e2da4a8f167d0..d6c274cb3873a6 100644 --- a/Telegram/Build.bat +++ b/Telegram/Build.bat @@ -117,13 +117,12 @@ if %BetaVersion% neq 0 ( for /f ^"usebackq^ eol^=^ -^ delims^=^" %%a in (..\Win32\Debug\Telegram.sym) do ( +^ delims^=^" %%a in (%ReleasePath%\%BinaryName%.sym) do ( set "SymbolsHashLine=%%a" goto symbolslinedone ) :symbolslinedone -FOR /F "tokens=1,2,3,4* delims= " %%i in ("%SymbolsHashLine%") do set "SymbolsH -ash=%%l" +FOR /F "tokens=1,2,3,4* delims= " %%i in ("%SymbolsHashLine%") do set "SymbolsHash=%%l" echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% if not exist %DropboxSymbolsPath%\%BinaryName% mkdir %DropboxSymbolsPath%\%BinaryName% diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index e22500f40a7ac8..7b4720543a3ad5 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,19,0 - PRODUCTVERSION 0,9,19,0 + FILEVERSION 0,9,19,1 + PRODUCTVERSION 0,9,19,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.19.0" + VALUE "FileVersion", "0.9.19.1" VALUE "LegalCopyright", "Copyright (C) 2013" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.19.0" + VALUE "ProductVersion", "0.9.19.1" END END BLOCK "VarFileInfo" From 6e8fc37ca95d0a41af2724bcd8eb7cfb822435d9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 16:31:24 +0300 Subject: [PATCH 037/133] using libs for google breakpad on windows --- Telegram/Telegram.vcxproj | 438 ++-- Telegram/Telegram.vcxproj.filters | 102 - .../client/linux/handler/exception_handler.cc | 765 ------ .../client/linux/handler/exception_handler.h | 278 -- .../client/mac/crash_generation/client_info.h | 47 - .../crash_generation_client.cc | 72 - .../crash_generation_client.h | 65 - .../crash_generation_server.cc | 166 -- .../crash_generation_server.h | 150 -- .../client/mac/handler/breakpad_nlist_64.cc | 402 --- .../client/mac/handler/breakpad_nlist_64.h | 47 - .../client/mac/handler/dynamic_images.cc | 573 ----- .../client/mac/handler/dynamic_images.h | 319 --- .../client/mac/handler/exception_handler.cc | 855 ------- .../client/mac/handler/exception_handler.h | 281 -- .../client/mac/handler/mach_vm_compat.h | 48 - .../client/mac/handler/minidump_generator.cc | 1591 ------------ .../client/mac/handler/minidump_generator.h | 236 -- .../client/mac/handler/ucontext_compat.h | 47 - .../client/minidump_file_writer-inl.h | 97 - .../breakpad/client/minidump_file_writer.cc | 350 --- .../breakpad/client/minidump_file_writer.h | 272 -- .../client/windows/common/ipc_protocol.h | 181 -- .../crash_generation_client.cc | 405 --- .../crash_generation_client.h | 182 -- .../windows/handler/exception_handler.cc | 1073 -------- .../windows/handler/exception_handler.h | 522 ---- .../ThirdParty/breakpad/common/convert_UTF.c | 554 ---- .../ThirdParty/breakpad/common/convert_UTF.h | 164 -- .../common/linux/linux_libc_support.h | 96 - .../ThirdParty/breakpad/common/mac/MachIPC.h | 301 --- .../ThirdParty/breakpad/common/mac/MachIPC.mm | 306 --- .../breakpad/common/mac/bootstrap_compat.cc | 42 - .../breakpad/common/mac/bootstrap_compat.h | 54 - .../ThirdParty/breakpad/common/mac/byteswap.h | 73 - .../ThirdParty/breakpad/common/mac/file_id.cc | 106 - .../ThirdParty/breakpad/common/mac/file_id.h | 81 - .../breakpad/common/mac/macho_id.cc | 369 --- .../ThirdParty/breakpad/common/mac/macho_id.h | 131 - .../breakpad/common/mac/macho_utilities.cc | 155 -- .../breakpad/common/mac/macho_utilities.h | 95 - .../breakpad/common/mac/macho_walker.cc | 268 -- .../breakpad/common/mac/macho_walker.h | 119 - .../common/mac/scoped_task_suspend-inl.h | 56 - .../breakpad/common/mac/string_utilities.cc | 84 - .../breakpad/common/mac/string_utilities.h | 52 - Telegram/ThirdParty/breakpad/common/md5.cc | 251 -- Telegram/ThirdParty/breakpad/common/md5.h | 27 - Telegram/ThirdParty/breakpad/common/memory.h | 212 -- .../ThirdParty/breakpad/common/scoped_ptr.h | 404 --- .../breakpad/common/string_conversion.cc | 155 -- .../breakpad/common/string_conversion.h | 68 - .../breakpad/common/using_std_string.h | 65 - .../breakpad/common/windows/guid_string.cc | 76 - .../breakpad/common/windows/guid_string.h | 58 - .../common/windows/string_utils-inl.h | 142 -- .../google_breakpad/common/breakpad_types.h | 68 - .../common/minidump_cpu_amd64.h | 235 -- .../google_breakpad/common/minidump_cpu_arm.h | 151 -- .../common/minidump_cpu_arm64.h | 140 - .../common/minidump_cpu_mips.h | 160 -- .../google_breakpad/common/minidump_cpu_ppc.h | 168 -- .../common/minidump_cpu_ppc64.h | 134 - .../common/minidump_cpu_sparc.h | 163 -- .../google_breakpad/common/minidump_cpu_x86.h | 174 -- .../common/minidump_exception_linux.h | 87 - .../common/minidump_exception_mac.h | 205 -- .../common/minidump_exception_ps3.h | 67 - .../common/minidump_exception_solaris.h | 94 - .../common/minidump_exception_win32.h | 2261 ----------------- .../google_breakpad/common/minidump_format.h | 972 ------- .../google_breakpad/common/minidump_size.h | 107 - 72 files changed, 201 insertions(+), 19113 deletions(-) delete mode 100644 Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h delete mode 100644 Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h delete mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h delete mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/minidump_file_writer.h delete mode 100644 Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h delete mode 100644 Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h delete mode 100644 Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc delete mode 100644 Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h delete mode 100644 Telegram/ThirdParty/breakpad/common/convert_UTF.c delete mode 100644 Telegram/ThirdParty/breakpad/common/convert_UTF.h delete mode 100644 Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/MachIPC.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/byteswap.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/file_id.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/file_id.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_id.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_id.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/macho_walker.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/mac/string_utilities.h delete mode 100644 Telegram/ThirdParty/breakpad/common/md5.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/md5.h delete mode 100644 Telegram/ThirdParty/breakpad/common/memory.h delete mode 100644 Telegram/ThirdParty/breakpad/common/scoped_ptr.h delete mode 100644 Telegram/ThirdParty/breakpad/common/string_conversion.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/string_conversion.h delete mode 100644 Telegram/ThirdParty/breakpad/common/using_std_string.h delete mode 100644 Telegram/ThirdParty/breakpad/common/windows/guid_string.cc delete mode 100644 Telegram/ThirdParty/breakpad/common/windows/guid_string.h delete mode 100644 Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h delete mode 100644 Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 081bce35160057..16a8dc9350c84c 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -69,7 +69,7 @@ AL_LIBTYPE_STATIC;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl_debug\Debug\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\ThirdParty\breakpad;.\ThirdParty\minizip;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl_debug\Debug\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\..\..\Libraries\breakpad\src;.\ThirdParty\minizip;.\SourceFiles;.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase false Use @@ -82,8 +82,8 @@ Windows $(OutDir)$(ProjectName).exe - .\..\..\Libraries\lzma\C\Util\LzmaLib\Debug;.\..\..\Libraries\libexif-0.6.20\win32\Debug;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Debug;.\..\..\Libraries\openal-soft\build\Debug;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatDebug;.\..\..\Libraries\openssl_debug\Debug\lib;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmaind.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Cored.lib;Qt5Guid.lib;qtharfbuzzngd.lib;qtpcred.lib;qtfreetyped.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;Qt5PlatformSupportd.lib;platforms\qwindowsd.lib;imageformats\qwebpd.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;LzmaLib.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;%(AdditionalDependencies) + .\..\..\Libraries\lzma\C\Util\LzmaLib\Debug;.\..\..\Libraries\libexif-0.6.20\win32\Debug;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Debug;.\..\..\Libraries\openal-soft\build\Debug;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatDebug;.\..\..\Libraries\openssl_debug\Debug\lib;.\..\..\Libraries\breakpad\src\client\windows\Debug;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmaind.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Cored.lib;Qt5Guid.lib;qtharfbuzzngd.lib;qtpcred.lib;qtfreetyped.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;Qt5PlatformSupportd.lib;platforms\qwindowsd.lib;imageformats\qwebpd.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;LzmaLib.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;lib\common.lib;lib\exception_handler.lib;lib\crash_generation_client.lib;%(AdditionalDependencies) true LIBCMT @@ -96,7 +96,7 @@ AL_LIBTYPE_STATIC;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\ThirdParty\breakpad;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\..\..\Libraries\breakpad\src;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded false @@ -111,8 +111,8 @@ Windows $(OutDir)$(ProjectName).exe - .\..\..\Libraries\lzma\C\Util\LzmaLib\Release;.\..\..\Libraries\libexif-0.6.20\win32\Release;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Release;.\..\..\Libraries\openal-soft\build\Release;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmain.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Core.lib;Qt5Gui.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;Qt5Widgets.lib;Qt5Network.lib;Qt5PlatformSupport.lib;platforms\qwindows.lib;imageformats\qwebp.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;LzmaLib.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;%(AdditionalDependencies) + .\..\..\Libraries\lzma\C\Util\LzmaLib\Release;.\..\..\Libraries\libexif-0.6.20\win32\Release;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Release;.\..\..\Libraries\openal-soft\build\Release;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;.\..\..\Libraries\breakpad\src\client\windows\Release;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmain.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Core.lib;Qt5Gui.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;Qt5Widgets.lib;Qt5Network.lib;Qt5PlatformSupport.lib;platforms\qwindows.lib;imageformats\qwebp.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;LzmaLib.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;lib\common.lib;lib\exception_handler.lib;lib\crash_generation_client.lib;%(AdditionalDependencies) $(SolutionDir)$(Platform)\$(Configuration)Intermediate\$(TargetName).lib $(IntDir)$(TargetName).pgd @@ -126,7 +126,7 @@ AL_LIBTYPE_STATIC;CUSTOM_API_ID;UNICODE;WIN32;WIN64;HAVE_STDINT_H;ZLIB_WINAPI;QT_NO_DEBUG;NDEBUG;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\ThirdParty\breakpad;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) + .\..\..\Libraries\lzma\C;.\..\..\Libraries\libexif-0.6.20;.\..\..\Libraries\zlib-1.2.8;.\..\..\Libraries\openssl\Release\include;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\openal-soft\include;.\SourceFiles;.\GeneratedFiles;.\..\..\Libraries\breakpad\src;.\ThirdParty\minizip;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore;.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui;%(AdditionalIncludeDirectories) ProgramDatabase MultiThreaded false @@ -141,8 +141,8 @@ Windows $(OutDir)$(ProjectName).exe - .\..\..\Libraries\lzma\C\Util\LzmaLib\Release;.\..\..\Libraries\libexif-0.6.20\win32\Release;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Release;.\..\..\Libraries\openal-soft\build\Release;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) - kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmain.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Core.lib;Qt5Gui.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;Qt5Widgets.lib;Qt5Network.lib;Qt5PlatformSupport.lib;platforms\qwindows.lib;imageformats\qwebp.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;LzmaLib.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;%(AdditionalDependencies) + .\..\..\Libraries\lzma\C\Util\LzmaLib\Release;.\..\..\Libraries\libexif-0.6.20\win32\Release;.\..\..\Libraries\ffmpeg;.\..\..\Libraries\opus\win32\VS2010\Win32\Release;.\..\..\Libraries\openal-soft\build\Release;.\..\..\Libraries\zlib-1.2.8\contrib\vstudio\vc11\x86\ZlibStatRelease;.\..\..\Libraries\openssl\Release\lib;.\..\..\Libraries\breakpad\src\client\windows\Release;$(QTDIR)\lib;$(QTDIR)\plugins;%(AdditionalLibraryDirectories) + kernel32.lib;user32.lib;shell32.lib;uuid.lib;ole32.lib;advapi32.lib;ws2_32.lib;gdi32.lib;comdlg32.lib;oleaut32.lib;Shlwapi.lib;Gdiplus.lib;imm32.lib;winmm.lib;qtmain.lib;glu32.lib;opengl32.lib;Strmiids.lib;Qt5Core.lib;Qt5Gui.lib;qtharfbuzzng.lib;qtpcre.lib;qtfreetype.lib;Qt5Widgets.lib;Qt5Network.lib;Qt5PlatformSupport.lib;platforms\qwindows.lib;imageformats\qwebp.lib;libeay32.lib;ssleay32.lib;Crypt32.lib;zlibstat.lib;lib_exif.lib;UxTheme.lib;DbgHelp.lib;LzmaLib.lib;OpenAL32.lib;common.lib;libavformat\libavformat.a;libavcodec\libavcodec.a;libavutil\libavutil.a;libswresample\libswresample.a;libswscale\libswscale.a;opus.lib;celt.lib;silk_common.lib;silk_float.lib;lib\common.lib;lib\exception_handler.lib;lib\crash_generation_client.lib;%(AdditionalDependencies) $(SolutionDir)$(Platform)\$(Configuration)Intermediate\$(TargetName).lib @@ -1053,21 +1053,6 @@ - - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - - - NotUsing - NotUsing - NotUsing - NotUsing NotUsing @@ -1075,27 +1060,6 @@ - - - - - - - - - - - - - - - - - - - - - @@ -1103,26 +1067,26 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing types.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/types.h" Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" Moc%27ing window.h... Moc%27ing window.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/window.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1148,13 +1112,13 @@ Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" Moc%27ing application.h... Moc%27ing application.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/application.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1167,27 +1131,27 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing apiwrap.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/apiwrap.h" Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" Moc%27ing aboutbox.h... Moc%27ing aboutbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/aboutbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1195,13 +1159,13 @@ Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" Moc%27ing addcontactbox.h... Moc%27ing addcontactbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/addcontactbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1209,13 +1173,13 @@ Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" Moc%27ing confirmbox.h... Moc%27ing confirmbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/confirmbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1223,13 +1187,13 @@ Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" Moc%27ing connectionbox.h... Moc%27ing connectionbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/connectionbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1237,13 +1201,13 @@ Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" Moc%27ing contactsbox.h... Moc%27ing contactsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/contactsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1251,13 +1215,13 @@ Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" Moc%27ing photocropbox.h... Moc%27ing photocropbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photocropbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1265,13 +1229,13 @@ Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" Moc%27ing photosendbox.h... Moc%27ing photosendbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/photosendbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1279,13 +1243,13 @@ Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" Moc%27ing emojibox.h... Moc%27ing emojibox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/emojibox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1293,13 +1257,13 @@ Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" Moc%27ing downloadpathbox.h... Moc%27ing downloadpathbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/downloadpathbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1308,153 +1272,153 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing audio.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/audio.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing usernamebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/usernamebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing languagebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/languagebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing backgroundbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/backgroundbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autolockbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/autolockbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodebox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/passcodebox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing sessionsbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/sessionsbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing abstractbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/abstractbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing stickersetbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/boxes/stickersetbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing autoupdater.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/autoupdater.h" Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" Moc%27ing animation.h... Moc%27ing animation.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/animation.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1462,13 +1426,13 @@ Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" Moc%27ing button.h... Moc%27ing button.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/button.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1476,13 +1440,13 @@ Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" Moc%27ing flatbutton.h... Moc%27ing flatbutton.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatbutton.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1490,13 +1454,13 @@ Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" Moc%27ing flatinput.h... Moc%27ing flatinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1504,13 +1468,13 @@ Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" Moc%27ing countryinput.h... Moc%27ing countryinput.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/countryinput.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1519,13 +1483,13 @@ Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" Moc%27ing scrollarea.h... Moc%27ing scrollarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/scrollarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1533,13 +1497,13 @@ Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" Moc%27ing dialogswidget.h... Moc%27ing dialogswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dialogswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1547,13 +1511,13 @@ Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" Moc%27ing flattextarea.h... Moc%27ing flattextarea.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flattextarea.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1561,13 +1525,13 @@ Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" Moc%27ing fileuploader.h... Moc%27ing fileuploader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/fileuploader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1575,13 +1539,13 @@ Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" Moc%27ing dropdown.h... Moc%27ing dropdown.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/dropdown.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1592,27 +1556,27 @@ $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" $(QTDIR)\bin\moc.exe;%(FullPath);$(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing popupmenu.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/popupmenu.h" Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" Moc%27ing flatcheckbox.h... Moc%27ing flatcheckbox.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatcheckbox.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1641,13 +1605,13 @@ Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" Moc%27ing flatlabel.h... Moc%27ing flatlabel.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/flatlabel.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1655,13 +1619,13 @@ Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" Moc%27ing twidget.h... Moc%27ing twidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/gui/twidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1671,13 +1635,13 @@ Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" Moc%27ing history.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/history.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1685,13 +1649,13 @@ Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" Moc%27ing historywidget.h... Moc%27ing historywidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/historywidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1699,13 +1663,13 @@ Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" Moc%27ing intro.h... Moc%27ing intro.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intro.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1713,13 +1677,13 @@ Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" Moc%27ing introcode.h... Moc%27ing introcode.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introcode.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1727,13 +1691,13 @@ Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" Moc%27ing introphone.h... Moc%27ing introphone.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introphone.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1741,13 +1705,13 @@ Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" Moc%27ing introsignup.h... Moc%27ing introsignup.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/introsignup.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1756,27 +1720,27 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing intropwdcheck.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/intro/intropwdcheck.h" Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" Moc%27ing layerwidget.h... Moc%27ing layerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/layerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1784,13 +1748,13 @@ Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" Moc%27ing localimageloader.h... Moc%27ing localimageloader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localimageloader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1801,15 +1765,15 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing localstorage.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/localstorage.h" @@ -1835,13 +1799,13 @@ Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" Moc%27ing mtpConnection.h... Moc%27ing mtpConnection.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpConnection.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1849,13 +1813,13 @@ Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" Moc%27ing mainwidget.h... Moc%27ing mainwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mainwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1863,13 +1827,13 @@ Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" Moc%27ing mtp.h... Moc%27ing mtp.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtp.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1878,27 +1842,27 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing mediaview.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mediaview.h" Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" Moc%27ing mtpFileLoader.h... Moc%27ing mtpFileLoader.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpFileLoader.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1908,13 +1872,13 @@ Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" Moc%27ing mtpDC.h... Moc%27ing mtpDC.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpDC.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1924,13 +1888,13 @@ Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" Moc%27ing mtpSession.h... Moc%27ing mtpSession.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/mtproto/mtpSession.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1938,13 +1902,13 @@ Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" Moc%27ing settingswidget.h... Moc%27ing settingswidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/settingswidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1952,13 +1916,13 @@ Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" Moc%27ing profilewidget.h... Moc%27ing profilewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/profilewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1966,13 +1930,13 @@ Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" Moc%27ing pspecific_wnd.h... Moc%27ing pspecific_wnd.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_wnd.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -1982,43 +1946,43 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing overviewwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/overviewwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing passcodewidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/passcodewidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing playerwidget.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/playerwidget.h" @@ -2026,15 +1990,15 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_linux.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_linux.h" true true true @@ -2043,15 +2007,15 @@ $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" $(QTDIR)\bin\moc.exe;%(FullPath) Moc%27ing pspecific_mac.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/pspecific_mac.h" true true true @@ -2086,13 +2050,13 @@ Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" Moc%27ing sysbuttons.h... Moc%27ing sysbuttons.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/sysbuttons.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) @@ -2100,13 +2064,13 @@ Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl_debug\Debug\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" Moc%27ing title.h... Moc%27ing title.h... .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp .\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" - "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\ThirdParty\breakpad" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" + "$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DAL_LIBTYPE_STATIC -DCUSTOM_API_ID -DUNICODE -DWIN32 -DWIN64 -DHAVE_STDINT_H -DZLIB_WINAPI -DQT_NO_DEBUG -DNDEBUG -D_SCL_SECURE_NO_WARNINGS "-I.\..\..\Libraries\lzma\C" "-I.\..\..\Libraries\libexif-0.6.20" "-I.\..\..\Libraries\zlib-1.2.8" "-I.\..\..\Libraries\openssl\Release\include" "-I.\..\..\Libraries\ffmpeg" "-I.\..\..\Libraries\openal-soft\include" "-I.\SourceFiles" "-I.\GeneratedFiles" "-I.\..\..\Libraries\breakpad\src" "-I.\ThirdParty\minizip" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I.\..\..\Libraries\QtStatic\qtbase\include\QtCore\5.5.1\QtCore" "-I.\..\..\Libraries\QtStatic\qtbase\include\QtGui\5.5.1\QtGui" "-fstdafx.h" "-f../../SourceFiles/title.h" $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) $(QTDIR)\bin\moc.exe;%(FullPath) diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters index 394abb94be5c3f..ddc386b0a05a0d 100644 --- a/Telegram/Telegram.vcxproj.filters +++ b/Telegram/Telegram.vcxproj.filters @@ -52,36 +52,6 @@ {1abe710c-3c36-484c-b2a5-881c29a051c2} - - {7bd3aaf0-4c45-4177-841d-e09b420f969b} - - - {7e91af88-3ca1-43f3-b213-ae3a6e9adbe3} - - - {729af6c6-f616-40f3-86d8-7a177a4ca581} - - - {6ebf64cf-1373-4c85-bc7c-a334da36957d} - - - {342ef107-8d0a-4518-a4ef-186706a51186} - - - {ea350daa-d09f-4e6a-a31d-46c971c7e117} - - - {22eae21d-0b6e-4c24-b12a-cad8538b25cf} - - - {6a602fc1-ef90-4276-ad51-e68e520a750d} - - - {8c8b7809-73e8-4074-986d-39cfda2961a0} - - - {1a35c875-fa31-4146-9555-1443abb58026} - @@ -936,15 +906,6 @@ ThirdParty\minizip - - ThirdParty\breakpad\client\windows\handler - - - ThirdParty\breakpad\client\windows\crash_generation - - - ThirdParty\breakpad\common\windows - @@ -1043,69 +1004,6 @@ ThirdParty\minizip - - ThirdParty\breakpad\client\windows\handler - - - ThirdParty\breakpad\client\windows\common - - - ThirdParty\breakpad\client\windows\crash_generation - - - ThirdParty\breakpad\common\windows - - - ThirdParty\breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\common\windows - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - - - ThirdParty\breakpad\google_breakpad\common - diff --git a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc deleted file mode 100644 index 148d61f9f3d95e..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.cc +++ /dev/null @@ -1,765 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// The ExceptionHandler object installs signal handlers for a number of -// signals. We rely on the signal handler running on the thread which crashed -// in order to identify it. This is true of the synchronous signals (SEGV etc), -// but not true of ABRT. Thus, if you send ABRT to yourself in a program which -// uses ExceptionHandler, you need to use tgkill to direct it to the current -// thread. -// -// The signal flow looks like this: -// -// SignalHandler (uses a global stack of ExceptionHandler objects to find -// | one to handle the signal. If the first rejects it, try -// | the second etc...) -// V -// HandleSignal ----------------------------| (clones a new process which -// | | shares an address space with -// (wait for cloned | the crashed process. This -// process) | allows us to ptrace the crashed -// | | process) -// V V -// (set signal handler to ThreadEntry (static function to bounce -// SIG_DFL and rethrow, | back into the object) -// killing the crashed | -// process) V -// DoDump (writes minidump) -// | -// V -// sys_exit -// - -// This code is a little fragmented. Different functions of the ExceptionHandler -// class run in a number of different contexts. Some of them run in a normal -// context and are easy to code, others run in a compromised context and the -// restrictions at the top of minidump_writer.cc apply: no libc and use the -// alternative malloc. Each function should have comment above it detailing the -// context which it runs in. - -#include "client/linux/handler/exception_handler.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include -#include -#include - -#include "common/basictypes.h" -#include "common/linux/linux_libc_support.h" -#include "common/memory.h" -#include "client/linux/log/log.h" -#include "client/linux/microdump_writer/microdump_writer.h" -#include "client/linux/minidump_writer/linux_dumper.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/linux/eintr_wrapper.h" -#include "third_party/lss/linux_syscall_support.h" - -#if defined(__ANDROID__) -#include "linux/sched.h" -#endif - -#ifndef PR_SET_PTRACER -#define PR_SET_PTRACER 0x59616d61 -#endif - -// A wrapper for the tgkill syscall: send a signal to a specific thread. -static int tgkill(pid_t tgid, pid_t tid, int sig) { - return syscall(__NR_tgkill, tgid, tid, sig); - return 0; -} - -namespace google_breakpad { - -namespace { -// The list of signals which we consider to be crashes. The default action for -// all these signals must be Core (see man 7 signal) because we rethrow the -// signal after handling it and expect that it'll be fatal. -const int kExceptionSignals[] = { - SIGSEGV, SIGABRT, SIGFPE, SIGILL, SIGBUS -}; -const int kNumHandledSignals = - sizeof(kExceptionSignals) / sizeof(kExceptionSignals[0]); -struct sigaction old_handlers[kNumHandledSignals]; -bool handlers_installed = false; - -// InstallAlternateStackLocked will store the newly installed stack in new_stack -// and (if it exists) the previously installed stack in old_stack. -stack_t old_stack; -stack_t new_stack; -bool stack_installed = false; - -// Create an alternative stack to run the signal handlers on. This is done since -// the signal might have been caused by a stack overflow. -// Runs before crashing: normal context. -void InstallAlternateStackLocked() { - if (stack_installed) - return; - - memset(&old_stack, 0, sizeof(old_stack)); - memset(&new_stack, 0, sizeof(new_stack)); - - // SIGSTKSZ may be too small to prevent the signal handlers from overrunning - // the alternative stack. Ensure that the size of the alternative stack is - // large enough. - static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ); - - // Only set an alternative stack if there isn't already one, or if the current - // one is too small. - if (sys_sigaltstack(NULL, &old_stack) == -1 || !old_stack.ss_sp || - old_stack.ss_size < kSigStackSize) { - new_stack.ss_sp = calloc(1, kSigStackSize); - new_stack.ss_size = kSigStackSize; - - if (sys_sigaltstack(&new_stack, NULL) == -1) { - free(new_stack.ss_sp); - return; - } - stack_installed = true; - } -} - -// Runs before crashing: normal context. -void RestoreAlternateStackLocked() { - if (!stack_installed) - return; - - stack_t current_stack; - if (sys_sigaltstack(NULL, ¤t_stack) == -1) - return; - - // Only restore the old_stack if the current alternative stack is the one - // installed by the call to InstallAlternateStackLocked. - if (current_stack.ss_sp == new_stack.ss_sp) { - if (old_stack.ss_sp) { - if (sys_sigaltstack(&old_stack, NULL) == -1) - return; - } else { - stack_t disable_stack; - disable_stack.ss_flags = SS_DISABLE; - if (sys_sigaltstack(&disable_stack, NULL) == -1) - return; - } - } - - free(new_stack.ss_sp); - stack_installed = false; -} - -void InstallDefaultHandler(int sig) { -#if defined(__ANDROID__) - // Android L+ expose signal and sigaction symbols that override the system - // ones. There is a bug in these functions where a request to set the handler - // to SIG_DFL is ignored. In that case, an infinite loop is entered as the - // signal is repeatedly sent to breakpad's signal handler. - // To work around this, directly call the system's sigaction. - struct kernel_sigaction sa; - memset(&sa, 0, sizeof(sa)); - sys_sigemptyset(&sa.sa_mask); - sa.sa_handler_ = SIG_DFL; - sa.sa_flags = SA_RESTART; - sys_rt_sigaction(sig, &sa, NULL, sizeof(kernel_sigset_t)); -#else - signal(sig, SIG_DFL); -#endif -} - -// The global exception handler stack. This is needed because there may exist -// multiple ExceptionHandler instances in a process. Each will have itself -// registered in this stack. -std::vector* g_handler_stack_ = NULL; -pthread_mutex_t g_handler_stack_mutex_ = PTHREAD_MUTEX_INITIALIZER; - -// sizeof(CrashContext) can be too big w.r.t the size of alternatate stack -// for SignalHandler(). Keep the crash context as a .bss field. Exception -// handlers are serialized by the |g_handler_stack_mutex_| and at most one at a -// time can use |g_crash_context_|. -ExceptionHandler::CrashContext g_crash_context_; - -} // namespace - -// Runs before crashing: normal context. -ExceptionHandler::ExceptionHandler(const MinidumpDescriptor& descriptor, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - bool install_handler, - const int server_fd) - : filter_(filter), - callback_(callback), - callback_context_(callback_context), - minidump_descriptor_(descriptor), - crash_handler_(NULL) { - if (server_fd >= 0) - crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); - - if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && - !minidump_descriptor_.IsMicrodumpOnConsole()) - minidump_descriptor_.UpdatePath(); - -#if defined(__ANDROID__) - if (minidump_descriptor_.IsMicrodumpOnConsole()) - logger::initializeCrashLogWriter(); -#endif - - pthread_mutex_lock(&g_handler_stack_mutex_); - - // Pre-fault the crash context struct. This is to avoid failing due to OOM - // if handling an exception when the process ran out of virtual memory. - memset(&g_crash_context_, 0, sizeof(g_crash_context_)); - - if (!g_handler_stack_) - g_handler_stack_ = new std::vector; - if (install_handler) { - InstallAlternateStackLocked(); - InstallHandlersLocked(); - } - g_handler_stack_->push_back(this); - pthread_mutex_unlock(&g_handler_stack_mutex_); -} - -// Runs before crashing: normal context. -ExceptionHandler::~ExceptionHandler() { - pthread_mutex_lock(&g_handler_stack_mutex_); - std::vector::iterator handler = - std::find(g_handler_stack_->begin(), g_handler_stack_->end(), this); - g_handler_stack_->erase(handler); - if (g_handler_stack_->empty()) { - delete g_handler_stack_; - g_handler_stack_ = NULL; - RestoreAlternateStackLocked(); - RestoreHandlersLocked(); - } - pthread_mutex_unlock(&g_handler_stack_mutex_); -} - -// Runs before crashing: normal context. -// static -bool ExceptionHandler::InstallHandlersLocked() { - if (handlers_installed) - return false; - - // Fail if unable to store all the old handlers. - for (int i = 0; i < kNumHandledSignals; ++i) { - if (sigaction(kExceptionSignals[i], NULL, &old_handlers[i]) == -1) - return false; - } - - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sigemptyset(&sa.sa_mask); - - // Mask all exception signals when we're handling one of them. - for (int i = 0; i < kNumHandledSignals; ++i) - sigaddset(&sa.sa_mask, kExceptionSignals[i]); - - sa.sa_sigaction = SignalHandler; - sa.sa_flags = SA_ONSTACK | SA_SIGINFO; - - for (int i = 0; i < kNumHandledSignals; ++i) { - if (sigaction(kExceptionSignals[i], &sa, NULL) == -1) { - // At this point it is impractical to back out changes, and so failure to - // install a signal is intentionally ignored. - } - } - handlers_installed = true; - return true; -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the crashing thread. -// static -void ExceptionHandler::RestoreHandlersLocked() { - if (!handlers_installed) - return; - - for (int i = 0; i < kNumHandledSignals; ++i) { - if (sigaction(kExceptionSignals[i], &old_handlers[i], NULL) == -1) { - InstallDefaultHandler(kExceptionSignals[i]); - } - } - handlers_installed = false; -} - -// void ExceptionHandler::set_crash_handler(HandlerCallback callback) { -// crash_handler_ = callback; -// } - -// This function runs in a compromised context: see the top of the file. -// Runs on the crashing thread. -// static -void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { - // All the exception signals are blocked at this point. - pthread_mutex_lock(&g_handler_stack_mutex_); - - // Sometimes, Breakpad runs inside a process where some other buggy code - // saves and restores signal handlers temporarily with 'signal' - // instead of 'sigaction'. This loses the SA_SIGINFO flag associated - // with this function. As a consequence, the values of 'info' and 'uc' - // become totally bogus, generally inducing a crash. - // - // The following code tries to detect this case. When it does, it - // resets the signal handlers with sigaction + SA_SIGINFO and returns. - // This forces the signal to be thrown again, but this time the kernel - // will call the function with the right arguments. - struct sigaction cur_handler; - if (sigaction(sig, NULL, &cur_handler) == 0 && - (cur_handler.sa_flags & SA_SIGINFO) == 0) { - // Reset signal handler with the right flags. - sigemptyset(&cur_handler.sa_mask); - sigaddset(&cur_handler.sa_mask, sig); - - cur_handler.sa_sigaction = SignalHandler; - cur_handler.sa_flags = SA_ONSTACK | SA_SIGINFO; - - if (sigaction(sig, &cur_handler, NULL) == -1) { - // When resetting the handler fails, try to reset the - // default one to avoid an infinite loop here. - InstallDefaultHandler(sig); - } - pthread_mutex_unlock(&g_handler_stack_mutex_); - return; - } - - bool handled = false; - for (int i = g_handler_stack_->size() - 1; !handled && i >= 0; --i) { - handled = (*g_handler_stack_)[i]->HandleSignal(sig, info, uc); - } - - // Upon returning from this signal handler, sig will become unmasked and then - // it will be retriggered. If one of the ExceptionHandlers handled it - // successfully, restore the default handler. Otherwise, restore the - // previously installed handler. Then, when the signal is retriggered, it will - // be delivered to the appropriate handler. - if (handled) { - InstallDefaultHandler(sig); - } else { - RestoreHandlersLocked(); - } - - pthread_mutex_unlock(&g_handler_stack_mutex_); - - // info->si_code <= 0 iff SI_FROMUSER (SI_FROMKERNEL otherwise). - if (info->si_code <= 0 || sig == SIGABRT) { - // This signal was triggered by somebody sending us the signal with kill(). - // In order to retrigger it, we have to queue a new signal by calling - // kill() ourselves. The special case (si_pid == 0 && sig == SIGABRT) is - // due to the kernel sending a SIGABRT from a user request via SysRQ. - if (tgkill(getpid(), syscall(__NR_gettid), sig) < 0) { - // If we failed to kill ourselves (e.g. because a sandbox disallows us - // to do so), we instead resort to terminating our process. This will - // result in an incorrect exit code. - _exit(1); - } - } else { - // This was a synchronous signal triggered by a hard fault (e.g. SIGSEGV). - // No need to reissue the signal. It will automatically trigger again, - // when we return from the signal handler. - } -} - -struct ThreadArgument { - pid_t pid; // the crashing process - const MinidumpDescriptor* minidump_descriptor; - ExceptionHandler* handler; - const void* context; // a CrashContext structure - size_t context_size; -}; - -// This is the entry function for the cloned process. We are in a compromised -// context here: see the top of the file. -// static -int ExceptionHandler::ThreadEntry(void *arg) { - const ThreadArgument *thread_arg = reinterpret_cast(arg); - - // Block here until the crashing process unblocks us when - // we're allowed to use ptrace - thread_arg->handler->WaitForContinueSignal(); - - return thread_arg->handler->DoDump(thread_arg->pid, thread_arg->context, - thread_arg->context_size) == false; -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the crashing thread. -bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) { - if (filter_ && !filter_(callback_context_)) - return false; - - // Allow ourselves to be dumped if the signal is trusted. - bool signal_trusted = info->si_code > 0; - bool signal_pid_trusted = info->si_code == SI_USER || - info->si_code == SI_TKILL; - if (signal_trusted || (signal_pid_trusted && info->si_pid == getpid())) { - sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); - } - - // Fill in all the holes in the struct to make Valgrind happy. - memset(&g_crash_context_, 0, sizeof(g_crash_context_)); - memcpy(&g_crash_context_.siginfo, info, sizeof(siginfo_t)); - memcpy(&g_crash_context_.context, uc, sizeof(struct ucontext)); -#if defined(__aarch64__) - struct ucontext* uc_ptr = (struct ucontext*)uc; - struct fpsimd_context* fp_ptr = - (struct fpsimd_context*)&uc_ptr->uc_mcontext.__reserved; - if (fp_ptr->head.magic == FPSIMD_MAGIC) { - memcpy(&g_crash_context_.float_state, fp_ptr, - sizeof(g_crash_context_.float_state)); - } -#elif !defined(__ARM_EABI__) && !defined(__mips__) - // FP state is not part of user ABI on ARM Linux. - // In case of MIPS Linux FP state is already part of struct ucontext - // and 'float_state' is not a member of CrashContext. - struct ucontext* uc_ptr = (struct ucontext*)uc; - if (uc_ptr->uc_mcontext.fpregs) { - memcpy(&g_crash_context_.float_state, uc_ptr->uc_mcontext.fpregs, - sizeof(g_crash_context_.float_state)); - } -#endif - g_crash_context_.tid = syscall(__NR_gettid); - if (crash_handler_ != NULL) { - if (crash_handler_(&g_crash_context_, sizeof(g_crash_context_), - callback_context_)) { - return true; - } - } - return GenerateDump(&g_crash_context_); -} - -// This is a public interface to HandleSignal that allows the client to -// generate a crash dump. This function may run in a compromised context. -bool ExceptionHandler::SimulateSignalDelivery(int sig) { - siginfo_t siginfo = {}; - // Mimic a trusted signal to allow tracing the process (see - // ExceptionHandler::HandleSignal(). - siginfo.si_code = SI_USER; - siginfo.si_pid = getpid(); - struct ucontext context; - getcontext(&context); - return HandleSignal(sig, &siginfo, &context); -} - -// This function may run in a compromised context: see the top of the file. -bool ExceptionHandler::GenerateDump(CrashContext *context) { - if (IsOutOfProcess()) - return crash_generation_client_->RequestDump(context, sizeof(*context)); - - // Allocating too much stack isn't a problem, and better to err on the side - // of caution than smash it into random locations. - static const unsigned kChildStackSize = 16000; - PageAllocator allocator; - uint8_t* stack = reinterpret_cast(allocator.Alloc(kChildStackSize)); - if (!stack) - return false; - // clone() needs the top-most address. (scrub just to be safe) - stack += kChildStackSize; - my_memset(stack - 16, 0, 16); - - ThreadArgument thread_arg; - thread_arg.handler = this; - thread_arg.minidump_descriptor = &minidump_descriptor_; - thread_arg.pid = getpid(); - thread_arg.context = context; - thread_arg.context_size = sizeof(*context); - - // We need to explicitly enable ptrace of parent processes on some - // kernels, but we need to know the PID of the cloned process before we - // can do this. Create a pipe here which we can use to block the - // cloned process after creating it, until we have explicitly enabled ptrace - if (sys_pipe(fdes) == -1) { - // Creating the pipe failed. We'll log an error but carry on anyway, - // as we'll probably still get a useful crash report. All that will happen - // is the write() and read() calls will fail with EBADF - static const char no_pipe_msg[] = "ExceptionHandler::GenerateDump " - "sys_pipe failed:"; - logger::write(no_pipe_msg, sizeof(no_pipe_msg) - 1); - logger::write(strerror(errno), strlen(strerror(errno))); - logger::write("\n", 1); - - // Ensure fdes[0] and fdes[1] are invalid file descriptors. - fdes[0] = fdes[1] = -1; - } - - const pid_t child = sys_clone( - ThreadEntry, stack, CLONE_FILES | CLONE_FS | CLONE_UNTRACED, - &thread_arg, NULL, NULL, NULL); - if (child == -1) { - sys_close(fdes[0]); - sys_close(fdes[1]); - return false; - } - - // Allow the child to ptrace us - sys_prctl(PR_SET_PTRACER, child, 0, 0, 0); - SendContinueSignalToChild(); - int status; - const int r = HANDLE_EINTR(sys_waitpid(child, &status, __WALL)); - - sys_close(fdes[0]); - sys_close(fdes[1]); - - if (r == -1) { - static const char msg[] = "ExceptionHandler::GenerateDump waitpid failed:"; - logger::write(msg, sizeof(msg) - 1); - logger::write(strerror(errno), strlen(strerror(errno))); - logger::write("\n", 1); - } - - bool success = r != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0; - if (callback_) - success = callback_(minidump_descriptor_, callback_context_, success); - return success; -} - -// This function runs in a compromised context: see the top of the file. -void ExceptionHandler::SendContinueSignalToChild() { - static const char okToContinueMessage = 'a'; - int r; - r = HANDLE_EINTR(sys_write(fdes[1], &okToContinueMessage, sizeof(char))); - if (r == -1) { - static const char msg[] = "ExceptionHandler::SendContinueSignalToChild " - "sys_write failed:"; - logger::write(msg, sizeof(msg) - 1); - logger::write(strerror(errno), strlen(strerror(errno))); - logger::write("\n", 1); - } -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the cloned process. -void ExceptionHandler::WaitForContinueSignal() { - int r; - char receivedMessage; - r = HANDLE_EINTR(sys_read(fdes[0], &receivedMessage, sizeof(char))); - if (r == -1) { - static const char msg[] = "ExceptionHandler::WaitForContinueSignal " - "sys_read failed:"; - logger::write(msg, sizeof(msg) - 1); - logger::write(strerror(errno), strlen(strerror(errno))); - logger::write("\n", 1); - } -} - -// This function runs in a compromised context: see the top of the file. -// Runs on the cloned process. -bool ExceptionHandler::DoDump(pid_t crashing_process, const void* context, - size_t context_size) { - if (minidump_descriptor_.IsMicrodumpOnConsole()) { - return google_breakpad::WriteMicrodump( - crashing_process, - context, - context_size, - mapping_list_, - *minidump_descriptor_.microdump_extra_info()); - } - if (minidump_descriptor_.IsFD()) { - return google_breakpad::WriteMinidump(minidump_descriptor_.fd(), - minidump_descriptor_.size_limit(), - crashing_process, - context, - context_size, - mapping_list_, - app_memory_list_); - } - return google_breakpad::WriteMinidump(minidump_descriptor_.path(), - minidump_descriptor_.size_limit(), - crashing_process, - context, - context_size, - mapping_list_, - app_memory_list_); -} - -// static -bool ExceptionHandler::WriteMinidump(const string& dump_path, - MinidumpCallback callback, - void* callback_context) { - MinidumpDescriptor descriptor(dump_path); - ExceptionHandler eh(descriptor, NULL, callback, callback_context, false, -1); - return eh.WriteMinidump(); -} - -// In order to making using EBP to calculate the desired value for ESP -// a valid operation, ensure that this function is compiled with a -// frame pointer using the following attribute. This attribute -// is supported on GCC but not on clang. -#if defined(__i386__) && defined(__GNUC__) && !defined(__clang__) -__attribute__((optimize("no-omit-frame-pointer"))) -#endif -bool ExceptionHandler::WriteMinidump() { - if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && - !minidump_descriptor_.IsMicrodumpOnConsole()) { - // Update the path of the minidump so that this can be called multiple times - // and new files are created for each minidump. This is done before the - // generation happens, as clients may want to access the MinidumpDescriptor - // after this call to find the exact path to the minidump file. - minidump_descriptor_.UpdatePath(); - } else if (minidump_descriptor_.IsFD()) { - // Reposition the FD to its beginning and resize it to get rid of the - // previous minidump info. - lseek(minidump_descriptor_.fd(), 0, SEEK_SET); - ignore_result(ftruncate(minidump_descriptor_.fd(), 0)); - } - - // Allow this process to be dumped. - sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0); - - CrashContext context; - int getcontext_result = getcontext(&context.context); - if (getcontext_result) - return false; - -#if defined(__i386__) - // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved - // from REG_UESP instead of from REG_ESP. REG_UESP is the user stack pointer - // and it only makes sense when running in kernel mode with a different stack - // pointer. When WriteMiniDump is called during normal processing REG_UESP is - // zero which leads to bad minidump files. - if (!context.context.uc_mcontext.gregs[REG_UESP]) { - // If REG_UESP is set to REG_ESP then that includes the stack space for the - // CrashContext object in this function, which is about 128 KB. Since the - // Linux dumper only records 32 KB of stack this would mean that nothing - // useful would be recorded. A better option is to set REG_UESP to REG_EBP, - // perhaps with a small negative offset in case there is any code that - // objects to them being equal. - context.context.uc_mcontext.gregs[REG_UESP] = - context.context.uc_mcontext.gregs[REG_EBP] - 16; - // The stack saving is based off of REG_ESP so it must be set to match the - // new REG_UESP. - context.context.uc_mcontext.gregs[REG_ESP] = - context.context.uc_mcontext.gregs[REG_UESP]; - } -#endif - -#if !defined(__ARM_EABI__) && !defined(__aarch64__) && !defined(__mips__) - // FPU state is not part of ARM EABI ucontext_t. - memcpy(&context.float_state, context.context.uc_mcontext.fpregs, - sizeof(context.float_state)); -#endif - context.tid = sys_gettid(); - - // Add an exception stream to the minidump for better reporting. - memset(&context.siginfo, 0, sizeof(context.siginfo)); - context.siginfo.si_signo = MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED; -#if defined(__i386__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.gregs[REG_EIP]); -#elif defined(__x86_64__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.gregs[REG_RIP]); -#elif defined(__arm__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.arm_pc); -#elif defined(__aarch64__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.pc); -#elif defined(__mips__) - context.siginfo.si_addr = - reinterpret_cast(context.context.uc_mcontext.pc); -#else -#error "This code has not been ported to your platform yet." -#endif - - return GenerateDump(&context); -} - -void ExceptionHandler::AddMappingInfo(const string& name, - const uint8_t identifier[sizeof(MDGUID)], - uintptr_t start_address, - size_t mapping_size, - size_t file_offset) { - MappingInfo info; - info.start_addr = start_address; - info.size = mapping_size; - info.offset = file_offset; - strncpy(info.name, name.c_str(), sizeof(info.name) - 1); - info.name[sizeof(info.name) - 1] = '\0'; - - MappingEntry mapping; - mapping.first = info; - memcpy(mapping.second, identifier, sizeof(MDGUID)); - mapping_list_.push_back(mapping); -} - -void ExceptionHandler::RegisterAppMemory(void* ptr, size_t length) { - AppMemoryList::iterator iter = - std::find(app_memory_list_.begin(), app_memory_list_.end(), ptr); - if (iter != app_memory_list_.end()) { - // Don't allow registering the same pointer twice. - return; - } - - AppMemory app_memory; - app_memory.ptr = ptr; - app_memory.length = length; - app_memory_list_.push_back(app_memory); -} - -void ExceptionHandler::UnregisterAppMemory(void* ptr) { - AppMemoryList::iterator iter = - std::find(app_memory_list_.begin(), app_memory_list_.end(), ptr); - if (iter != app_memory_list_.end()) { - app_memory_list_.erase(iter); - } -} - -// static -bool ExceptionHandler::WriteMinidumpForChild(pid_t child, - pid_t child_blamed_thread, - const string& dump_path, - MinidumpCallback callback, - void* callback_context) { - // This function is not run in a compromised context. - MinidumpDescriptor descriptor(dump_path); - descriptor.UpdatePath(); - if (!google_breakpad::WriteMinidump(descriptor.path(), - child, - child_blamed_thread)) - return false; - - return callback ? callback(descriptor, callback_context, true) : true; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h deleted file mode 100644 index 591c310855702c..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/linux/handler/exception_handler.h +++ /dev/null @@ -1,278 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ -#define CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ - -#include -#include -#include -#include - -#include - -#include "client/linux/crash_generation/crash_generation_client.h" -#include "client/linux/handler/minidump_descriptor.h" -#include "client/linux/minidump_writer/minidump_writer.h" -#include "common/scoped_ptr.h" -#include "common/using_std_string.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// ExceptionHandler -// -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// (NOTE): There should be only be one this kind of exception handler -// object per process. -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the full path or file descriptor of the minidump. The -// caller can collect and write additional application state to that minidump, -// and launch an external crash-reporting application. -// -// Caller should try to make the callbacks as crash-friendly as possible, -// it should avoid use heap memory allocation as much as possible. - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. |context| is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // |descriptor| contains the file descriptor or file path containing the - // minidump. |context| is the parameter supplied by the user as - // callback_context when the handler was created. |succeeded| indicates - // whether a minidump file was successfully written. - // - // If an exception occurred and the callback returns true, Breakpad will - // treat the exception as fully-handled, suppressing any other handlers from - // being notified of the exception. If the callback returns false, Breakpad - // will treat the exception as unhandled, and allow another handler to handle - // it. If there are no other handlers, Breakpad will report the exception to - // the system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - typedef bool (*MinidumpCallback)(const MinidumpDescriptor& descriptor, - void* context, - bool succeeded); - - // In certain cases, a user may wish to handle the generation of the minidump - // themselves. In this case, they can install a handler callback which is - // called when a crash has occurred. If this function returns true, no other - // processing of occurs and the process will shortly be crashed. If this - // returns false, the normal processing continues. - typedef bool (*HandlerCallback)(const void* crash_context, - size_t crash_context_size, - void* context); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional |filter| callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. The minidump content will be written to the file path or file - // descriptor from |descriptor|, and the optional |callback| is called after - // writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - // If |server_fd| is valid, the minidump is generated out-of-process. If it - // is -1, in-process generation will always be used. - ExceptionHandler(const MinidumpDescriptor& descriptor, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - bool install_handler, - const int server_fd); - ~ExceptionHandler(); - - const MinidumpDescriptor& minidump_descriptor() const { - return minidump_descriptor_; - } - - void set_minidump_descriptor(const MinidumpDescriptor& descriptor) { - minidump_descriptor_ = descriptor; - } - - void set_crash_handler(HandlerCallback callback) { - crash_handler_ = callback; - } - - void set_crash_generation_client(CrashGenerationClient* client) { - crash_generation_client_.reset(client); - } - - // Writes a minidump immediately. This can be used to capture the execution - // state independently of a crash. - // Returns true on success. - // If the ExceptionHandler has been created with a path, a new file is - // generated for each minidump. The file path can be retrieved in the - // MinidumpDescriptor passed to the MinidumpCallback or by accessing the - // MinidumpDescriptor directly from the ExceptionHandler (with - // minidump_descriptor()). - // If the ExceptionHandler has been created with a file descriptor, the file - // descriptor is repositioned to its beginning and the previous generated - // minidump is overwritten. - // Note that this method is not supposed to be called from a compromised - // context as it uses the heap. - bool WriteMinidump(); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string& dump_path, - MinidumpCallback callback, - void* callback_context); - - // Write a minidump of |child| immediately. This can be used to - // capture the execution state of |child| independently of a crash. - // Pass a meaningful |child_blamed_thread| to make that thread in - // the child process the one from which a crash signature is - // extracted. - // - // WARNING: the return of this function *must* happen before - // the code that will eventually reap |child| executes. - // Otherwise there's a pernicious race condition in which |child| - // exits, is reaped, another process created with its pid, then that - // new process dumped. - static bool WriteMinidumpForChild(pid_t child, - pid_t child_blamed_thread, - const string& dump_path, - MinidumpCallback callback, - void* callback_context); - - // This structure is passed to minidump_writer.h:WriteMinidump via an opaque - // blob. It shouldn't be needed in any user code. - struct CrashContext { - siginfo_t siginfo; - pid_t tid; // the crashing thread. - struct ucontext context; -#if !defined(__ARM_EABI__) && !defined(__mips__) - // #ifdef this out because FP state is not part of user ABI for Linux ARM. - // In case of MIPS Linux FP state is already part of struct - // ucontext so 'float_state' is not required. - fpstate_t float_state; -#endif - }; - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { - return crash_generation_client_.get() != NULL; - } - - // Add information about a memory mapping. This can be used if - // a custom library loader is used that maps things in a way - // that the linux dumper can't handle by reading the maps file. - void AddMappingInfo(const string& name, - const uint8_t identifier[sizeof(MDGUID)], - uintptr_t start_address, - size_t mapping_size, - size_t file_offset); - - // Register a block of memory of length bytes starting at address ptr - // to be copied to the minidump when a crash happens. - void RegisterAppMemory(void* ptr, size_t length); - - // Unregister a block of memory that was registered with RegisterAppMemory. - void UnregisterAppMemory(void* ptr); - - // Force signal handling for the specified signal. - bool SimulateSignalDelivery(int sig); - - // Report a crash signal from an SA_SIGINFO signal handler. - bool HandleSignal(int sig, siginfo_t* info, void* uc); - - private: - // Save the old signal handlers and install new ones. - static bool InstallHandlersLocked(); - // Restore the old signal handlers. - static void RestoreHandlersLocked(); - - void PreresolveSymbols(); - bool GenerateDump(CrashContext *context); - void SendContinueSignalToChild(); - void WaitForContinueSignal(); - - static void SignalHandler(int sig, siginfo_t* info, void* uc); - static int ThreadEntry(void* arg); - bool DoDump(pid_t crashing_process, const void* context, - size_t context_size); - - const FilterCallback filter_; - const MinidumpCallback callback_; - void* const callback_context_; - - scoped_ptr crash_generation_client_; - - MinidumpDescriptor minidump_descriptor_; - - // Must be volatile. The compiler is unaware of the code which runs in - // the signal handler which reads this variable. Without volatile the - // compiler is free to optimise away writes to this variable which it - // believes are never read. - volatile HandlerCallback crash_handler_; - - // We need to explicitly enable ptrace of parent processes on some - // kernels, but we need to know the PID of the cloned process before we - // can do this. We create a pipe which we can use to block the - // cloned process after creating it, until we have explicitly enabled - // ptrace. This is used to store the file descriptors for the pipe - int fdes[2]; - - // Callers can add extra info about mappings for cases where the - // dumper code cannot extract enough information from /proc//maps. - MappingList mapping_list_; - - // Callers can request additional memory regions to be included in - // the dump. - AppMemoryList app_memory_list_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_LINUX_HANDLER_EXCEPTION_HANDLER_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h deleted file mode 100644 index a3a95dcaced748..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/client_info.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ -#define CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ - -namespace google_breakpad { - -class ClientInfo { - public: - explicit ClientInfo(pid_t pid) : pid_(pid) {} - - pid_t pid() const { return pid_; } - - private: - pid_t pid_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_CRASH_GENERATION_CLIENT_INFO_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc deleted file mode 100644 index ceeb3b32afecba..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/crash_generation/crash_generation_client.h" - -#include "client/mac/crash_generation/crash_generation_server.h" -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -bool CrashGenerationClient::RequestDumpForException( - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread) { - // The server will send a message to this port indicating that it - // has finished its work. - ReceivePort acknowledge_port; - - MachSendMessage message(kDumpRequestMessage); - message.AddDescriptor(mach_task_self()); // this task - message.AddDescriptor(crashing_thread); // crashing thread - message.AddDescriptor(mach_thread_self()); // handler thread - message.AddDescriptor(acknowledge_port.GetPort()); // message receive port - - ExceptionInfo info; - info.exception_type = exception_type; - info.exception_code = exception_code; - info.exception_subcode = exception_subcode; - message.SetData(&info, sizeof(info)); - - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - kern_return_t result = sender_.SendMessage(message, kSendTimeoutMs); - if (result != KERN_SUCCESS) - return false; - - // Give the server slightly longer to reply since it has to - // inspect this task and write the minidump. - const mach_msg_timeout_t kReceiveTimeoutMs = 5 * 1000; - MachReceiveMessage acknowledge_message; - result = acknowledge_port.WaitForMessage(&acknowledge_message, - kReceiveTimeoutMs); - return result == KERN_SUCCESS; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h deleted file mode 100644 index 527f577a517a4a..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ -#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ - -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -class CrashGenerationClient { - public: - explicit CrashGenerationClient(const char* mach_port_name) - : sender_(mach_port_name) { - } - - // Request the crash server to generate a dump. - // - // Return true if the dump was successful; false otherwise. - bool RequestDumpForException(int exception_type, - int exception_code, - int exception_subcode, - mach_port_t crashing_thread); - - bool RequestDump() { - return RequestDumpForException(0, 0, 0, MACH_PORT_NULL); - } - - private: - MachPortSender sender_; - - // Prevent copy construction and assignment. - CrashGenerationClient(const CrashGenerationClient&); - CrashGenerationClient& operator=(const CrashGenerationClient&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc deleted file mode 100644 index 451e8d9c2a7ef8..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.cc +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/crash_generation/crash_generation_server.h" - -#include - -#include "client/mac/crash_generation/client_info.h" -#include "client/mac/handler/minidump_generator.h" -#include "common/mac/scoped_task_suspend-inl.h" - -namespace google_breakpad { - -CrashGenerationServer::CrashGenerationServer( - const char *mach_port_name, - FilterCallback filter, - void *filter_context, - OnClientDumpRequestCallback dump_callback, - void *dump_context, - OnClientExitingCallback exit_callback, - void *exit_context, - bool generate_dumps, - const std::string &dump_path) - : filter_(filter), - filter_context_(filter_context), - dump_callback_(dump_callback), - dump_context_(dump_context), - exit_callback_(exit_callback), - exit_context_(exit_context), - generate_dumps_(generate_dumps), - dump_dir_(dump_path.empty() ? "/tmp" : dump_path), - started_(false), - receive_port_(mach_port_name), - mach_port_name_(mach_port_name) { -} - -CrashGenerationServer::~CrashGenerationServer() { - if (started_) - Stop(); -} - -bool CrashGenerationServer::Start() { - int thread_create_result = pthread_create(&server_thread_, NULL, - &WaitForMessages, this); - started_ = thread_create_result == 0; - return started_; -} - -bool CrashGenerationServer::Stop() { - if (!started_) - return false; - - // Send a quit message to the background thread, and then join it. - MachPortSender sender(mach_port_name_.c_str()); - MachSendMessage quit_message(kQuitMessage); - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - kern_return_t result = sender.SendMessage(quit_message, kSendTimeoutMs); - if (result == KERN_SUCCESS) { - int thread_join_result = pthread_join(server_thread_, NULL); - started_ = thread_join_result != 0; - } - - return !started_; -} - -// static -void *CrashGenerationServer::WaitForMessages(void *server) { - CrashGenerationServer *self = - reinterpret_cast(server); - while (self->WaitForOneMessage()) {} - return NULL; -} - -bool CrashGenerationServer::WaitForOneMessage() { - MachReceiveMessage message; - kern_return_t result = receive_port_.WaitForMessage(&message, - MACH_MSG_TIMEOUT_NONE); - if (result == KERN_SUCCESS) { - switch (message.GetMessageID()) { - case kDumpRequestMessage: { - ExceptionInfo &info = (ExceptionInfo &)*message.GetData(); - - mach_port_t remote_task = message.GetTranslatedPort(0); - mach_port_t crashing_thread = message.GetTranslatedPort(1); - mach_port_t handler_thread = message.GetTranslatedPort(2); - mach_port_t ack_port = message.GetTranslatedPort(3); - pid_t remote_pid = -1; - pid_for_task(remote_task, &remote_pid); - ClientInfo client(remote_pid); - - bool result; - std::string dump_path; - if (generate_dumps_ && (!filter_ || filter_(filter_context_))) { - ScopedTaskSuspend suspend(remote_task); - - MinidumpGenerator generator(remote_task, handler_thread); - dump_path = generator.UniqueNameInDirectory(dump_dir_, NULL); - - if (info.exception_type && info.exception_code) { - generator.SetExceptionInformation(info.exception_type, - info.exception_code, - info.exception_subcode, - crashing_thread); - } - result = generator.Write(dump_path.c_str()); - } else { - result = true; - } - - if (result && dump_callback_) { - dump_callback_(dump_context_, client, dump_path); - } - - // TODO(ted): support a way for the client to send additional data, - // perhaps with a callback so users of the server can read the data - // themselves? - - if (ack_port != MACH_PORT_DEAD && ack_port != MACH_PORT_NULL) { - MachPortSender sender(ack_port); - MachSendMessage ack_message(kAcknowledgementMessage); - const mach_msg_timeout_t kSendTimeoutMs = 2 * 1000; - - sender.SendMessage(ack_message, kSendTimeoutMs); - } - - if (exit_callback_) { - exit_callback_(exit_context_, client); - } - break; - } - case kQuitMessage: - return false; - } - } else { // result != KERN_SUCCESS - return false; - } - return true; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h b/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h deleted file mode 100644 index 85bd5b5e33e466..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/crash_generation/crash_generation_server.h +++ /dev/null @@ -1,150 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ -#define GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ - -#include - -#include - -#include "common/mac/MachIPC.h" - -namespace google_breakpad { - -class ClientInfo; - -// Messages the server can read via its mach port -enum { - kDumpRequestMessage = 1, - kAcknowledgementMessage = 2, - kQuitMessage = 3 -}; - -// Exception details sent by the client when requesting a dump. -struct ExceptionInfo { - int32_t exception_type; - int32_t exception_code; - int32_t exception_subcode; -}; - -class CrashGenerationServer { - public: - // WARNING: callbacks may be invoked on a different thread - // than that which creates the CrashGenerationServer. They must - // be thread safe. - typedef void (*OnClientDumpRequestCallback)(void *context, - const ClientInfo &client_info, - const std::string &file_path); - - typedef void (*OnClientExitingCallback)(void *context, - const ClientInfo &client_info); - // If a FilterCallback returns false, the dump will not be written. - typedef bool (*FilterCallback)(void *context); - - // Create an instance with the given parameters. - // - // mach_port_name: Named server port to listen on. - // filter: Callback for a client to cancel writing a dump. - // filter_context: Context for the filter callback. - // dump_callback: Callback for a client crash dump request. - // dump_context: Context for client crash dump request callback. - // exit_callback: Callback for client process exit. - // exit_context: Context for client exit callback. - // generate_dumps: Whether to automatically generate dumps. - // Client code of this class might want to generate dumps explicitly - // in the crash dump request callback. In that case, false can be - // passed for this parameter. - // dump_path: Path for generating dumps; required only if true is - // passed for generateDumps parameter; NULL can be passed otherwise. - CrashGenerationServer(const char *mach_port_name, - FilterCallback filter, - void *filter_context, - OnClientDumpRequestCallback dump_callback, - void *dump_context, - OnClientExitingCallback exit_callback, - void *exit_context, - bool generate_dumps, - const std::string &dump_path); - - ~CrashGenerationServer(); - - // Perform initialization steps needed to start listening to clients. - // - // Return true if initialization is successful; false otherwise. - bool Start(); - - // Stop the server. - bool Stop(); - - private: - // Return a unique filename at which a minidump can be written. - bool MakeMinidumpFilename(std::string &outFilename); - - // Loop reading client messages and responding to them until - // a quit message is received. - static void *WaitForMessages(void *server); - - // Wait for a single client message and respond to it. Returns false - // if a quit message was received or if an error occurred. - bool WaitForOneMessage(); - - FilterCallback filter_; - void *filter_context_; - - OnClientDumpRequestCallback dump_callback_; - void *dump_context_; - - OnClientExitingCallback exit_callback_; - void *exit_context_; - - bool generate_dumps_; - - std::string dump_dir_; - - bool started_; - - // The mach port that receives requests to dump from child processes. - ReceivePort receive_port_; - - // The name of the mach port. Stored so the Stop method can message - // the background thread to shut it down. - std::string mach_port_name_; - - // The thread that waits on the receive port. - pthread_t server_thread_; - - // Disable copy constructor and operator=. - CrashGenerationServer(const CrashGenerationServer&); - CrashGenerationServer& operator=(const CrashGenerationServer&); -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_CLIENT_MAC_CRASH_GENERATION_CRASH_GENERATION_SERVER_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc deleted file mode 100644 index 3492b823dad0d5..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.cc +++ /dev/null @@ -1,402 +0,0 @@ -/* - * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. - * - * @APPLE_LICENSE_HEADER_START@ - * - * This file contains Original Code and/or Modifications of Original Code - * as defined in and that are subject to the Apple Public Source License - * Version 2.0 (the 'License'). You may not use this file except in - * compliance with the License. Please obtain a copy of the License at - * http://www.opensource.apple.com/apsl/ and read it before using this - * file. - * - * The Original Code and all software distributed under the License are - * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER - * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, - * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. - * Please see the License for the specific language governing rights and - * limitations under the License. - * - * @APPLE_LICENSE_HEADER_END@ - */ -/* - * Copyright (c) 1989, 1993 - * The Regents of the University of California. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. All advertising materials mentioning features or use of this software - * must display the following acknowledgement: - * This product includes software developed by the University of - * California, Berkeley and its contributors. - * 4. Neither the name of the University nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - - -/* - * This file was copied from libc/gen/nlist.c from Darwin's source code - * The version of nlist used as a base is from 10.5.2, libc-498 - * http://www.opensource.apple.com/darwinsource/10.5.2/Libc-498/gen/nlist.c - * - * The full tarball is at: - * http://www.opensource.apple.com/darwinsource/tarballs/apsl/Libc-498.tar.gz - * - * I've modified it to be compatible with 64-bit images. -*/ - -#include "breakpad_nlist_64.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* Stuff lifted from and since they are gone */ -/* - * Header prepended to each a.out file. - */ -struct exec { - unsigned short a_machtype; /* machine type */ - unsigned short a_magic; /* magic number */ - unsigned long a_text; /* size of text segment */ - unsigned long a_data; /* size of initialized data */ - unsigned long a_bss; /* size of uninitialized data */ - unsigned long a_syms; /* size of symbol table */ - unsigned long a_entry; /* entry point */ - unsigned long a_trsize; /* size of text relocation */ - unsigned long a_drsize; /* size of data relocation */ -}; - -#define OMAGIC 0407 /* old impure format */ -#define NMAGIC 0410 /* read-only text */ -#define ZMAGIC 0413 /* demand load format */ - -#define N_BADMAG(x) \ - (((x).a_magic)!=OMAGIC && ((x).a_magic)!=NMAGIC && ((x).a_magic)!=ZMAGIC) -#define N_TXTOFF(x) \ - ((x).a_magic==ZMAGIC ? 0 : sizeof (struct exec)) -#define N_SYMOFF(x) \ - (N_TXTOFF(x) + (x).a_text+(x).a_data + (x).a_trsize+(x).a_drsize) - -// Traits structs for specializing function templates to handle -// 32-bit/64-bit Mach-O files. -template -struct MachBits {}; - -typedef struct nlist nlist32; -typedef struct nlist_64 nlist64; - -template<> -struct MachBits { - typedef mach_header mach_header_type; - typedef uint32_t word_type; - static const uint32_t magic = MH_MAGIC; -}; - -template<> -struct MachBits { - typedef mach_header_64 mach_header_type; - typedef uint64_t word_type; - static const uint32_t magic = MH_MAGIC_64; -}; - -template -int -__breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, - cpu_type_t cpu_type); - -/* - * nlist - retreive attributes from name list (string table version) - */ - -template -int breakpad_nlist_common(const char *name, - nlist_type *list, - const char **symbolNames, - cpu_type_t cpu_type) { - int fd = open(name, O_RDONLY, 0); - if (fd < 0) - return -1; - int n = __breakpad_fdnlist(fd, list, symbolNames, cpu_type); - close(fd); - return n; -} - -int breakpad_nlist(const char *name, - struct nlist *list, - const char **symbolNames, - cpu_type_t cpu_type) { - return breakpad_nlist_common(name, list, symbolNames, cpu_type); -} - -int breakpad_nlist(const char *name, - struct nlist_64 *list, - const char **symbolNames, - cpu_type_t cpu_type) { - return breakpad_nlist_common(name, list, symbolNames, cpu_type); -} - -/* Note: __fdnlist() is called from kvm_nlist in libkvm's kvm.c */ - -template -int __breakpad_fdnlist(int fd, nlist_type *list, const char **symbolNames, - cpu_type_t cpu_type) { - typedef typename MachBits::mach_header_type mach_header_type; - typedef typename MachBits::word_type word_type; - - const uint32_t magic = MachBits::magic; - - int maxlen = 500; - int nreq = 0; - for (nlist_type* q = list; - symbolNames[q-list] && symbolNames[q-list][0]; - q++, nreq++) { - - q->n_type = 0; - q->n_value = 0; - q->n_desc = 0; - q->n_sect = 0; - q->n_un.n_strx = 0; - } - - struct exec buf; - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf) || - (N_BADMAG(buf) && *((uint32_t *)&buf) != magic && - CFSwapInt32BigToHost(*((uint32_t *)&buf)) != FAT_MAGIC && - /* The following is the big-endian ppc64 check */ - (*((uint32_t*)&buf)) != FAT_MAGIC)) { - return -1; - } - - /* Deal with fat file if necessary */ - unsigned arch_offset = 0; - if (CFSwapInt32BigToHost(*((uint32_t *)&buf)) == FAT_MAGIC || - /* The following is the big-endian ppc64 check */ - *((unsigned int *)&buf) == FAT_MAGIC) { - /* Read in the fat header */ - struct fat_header fh; - if (lseek(fd, 0, SEEK_SET) == -1) { - return -1; - } - if (read(fd, (char *)&fh, sizeof(fh)) != sizeof(fh)) { - return -1; - } - - /* Convert fat_narchs to host byte order */ - fh.nfat_arch = CFSwapInt32BigToHost(fh.nfat_arch); - - /* Read in the fat archs */ - struct fat_arch *fat_archs = - (struct fat_arch *)malloc(fh.nfat_arch * sizeof(struct fat_arch)); - if (fat_archs == NULL) { - return -1; - } - if (read(fd, (char *)fat_archs, - sizeof(struct fat_arch) * fh.nfat_arch) != - (ssize_t)(sizeof(struct fat_arch) * fh.nfat_arch)) { - free(fat_archs); - return -1; - } - - /* - * Convert archs to host byte ordering (a constraint of - * cpusubtype_getbestarch() - */ - for (unsigned i = 0; i < fh.nfat_arch; i++) { - fat_archs[i].cputype = - CFSwapInt32BigToHost(fat_archs[i].cputype); - fat_archs[i].cpusubtype = - CFSwapInt32BigToHost(fat_archs[i].cpusubtype); - fat_archs[i].offset = - CFSwapInt32BigToHost(fat_archs[i].offset); - fat_archs[i].size = - CFSwapInt32BigToHost(fat_archs[i].size); - fat_archs[i].align = - CFSwapInt32BigToHost(fat_archs[i].align); - } - - struct fat_arch *fap = NULL; - for (unsigned i = 0; i < fh.nfat_arch; i++) { - if (fat_archs[i].cputype == cpu_type) { - fap = &fat_archs[i]; - break; - } - } - - if (!fap) { - free(fat_archs); - return -1; - } - arch_offset = fap->offset; - free(fat_archs); - - /* Read in the beginning of the architecture-specific file */ - if (lseek(fd, arch_offset, SEEK_SET) == -1) { - return -1; - } - if (read(fd, (char *)&buf, sizeof(buf)) != sizeof(buf)) { - return -1; - } - } - - off_t sa; /* symbol address */ - off_t ss; /* start of strings */ - register_t n; - if (*((unsigned int *)&buf) == magic) { - if (lseek(fd, arch_offset, SEEK_SET) == -1) { - return -1; - } - mach_header_type mh; - if (read(fd, (char *)&mh, sizeof(mh)) != sizeof(mh)) { - return -1; - } - - struct load_command *load_commands = - (struct load_command *)malloc(mh.sizeofcmds); - if (load_commands == NULL) { - return -1; - } - if (read(fd, (char *)load_commands, mh.sizeofcmds) != - (ssize_t)mh.sizeofcmds) { - free(load_commands); - return -1; - } - struct symtab_command *stp = NULL; - struct load_command *lcp = load_commands; - // iterate through all load commands, looking for - // LC_SYMTAB load command - for (uint32_t i = 0; i < mh.ncmds; i++) { - if (lcp->cmdsize % sizeof(word_type) != 0 || - lcp->cmdsize <= 0 || - (char *)lcp + lcp->cmdsize > - (char *)load_commands + mh.sizeofcmds) { - free(load_commands); - return -1; - } - if (lcp->cmd == LC_SYMTAB) { - if (lcp->cmdsize != - sizeof(struct symtab_command)) { - free(load_commands); - return -1; - } - stp = (struct symtab_command *)lcp; - break; - } - lcp = (struct load_command *) - ((char *)lcp + lcp->cmdsize); - } - if (stp == NULL) { - free(load_commands); - return -1; - } - // sa points to the beginning of the symbol table - sa = stp->symoff + arch_offset; - // ss points to the beginning of the string table - ss = stp->stroff + arch_offset; - // n is the number of bytes in the symbol table - // each symbol table entry is an nlist structure - n = stp->nsyms * sizeof(nlist_type); - free(load_commands); - } else { - sa = N_SYMOFF(buf) + arch_offset; - ss = sa + buf.a_syms + arch_offset; - n = buf.a_syms; - } - - if (lseek(fd, sa, SEEK_SET) == -1) { - return -1; - } - - // the algorithm here is to read the nlist entries in m-sized - // chunks into q. q is then iterated over. for each entry in q, - // use the string table index(q->n_un.n_strx) to read the symbol - // name, then scan the nlist entries passed in by the user(via p), - // and look for a match - while (n) { - nlist_type space[BUFSIZ/sizeof (nlist_type)]; - register_t m = sizeof (space); - - if (n < m) - m = n; - if (read(fd, (char *)space, m) != m) - break; - n -= m; - off_t savpos = lseek(fd, 0, SEEK_CUR); - if (savpos == -1) { - return -1; - } - for (nlist_type* q = space; (m -= sizeof(nlist_type)) >= 0; q++) { - char nambuf[BUFSIZ]; - - if (q->n_un.n_strx == 0 || q->n_type & N_STAB) - continue; - - // seek to the location in the binary where the symbol - // name is stored & read it into memory - if (lseek(fd, ss+q->n_un.n_strx, SEEK_SET) == -1) { - return -1; - } - if (read(fd, nambuf, maxlen+1) == -1) { - return -1; - } - const char *s2 = nambuf; - for (nlist_type *p = list; - symbolNames[p-list] && symbolNames[p-list][0]; - p++) { - // get the symbol name the user has passed in that - // corresponds to the nlist entry that we're looking at - const char *s1 = symbolNames[p - list]; - while (*s1) { - if (*s1++ != *s2++) - goto cont; - } - if (*s2) - goto cont; - - p->n_value = q->n_value; - p->n_type = q->n_type; - p->n_desc = q->n_desc; - p->n_sect = q->n_sect; - p->n_un.n_strx = q->n_un.n_strx; - if (--nreq == 0) - return nreq; - - break; - cont: ; - } - } - if (lseek(fd, savpos, SEEK_SET) == -1) { - return -1; - } - } - return nreq; -} diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h b/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h deleted file mode 100644 index 1d2c63913457b4..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/breakpad_nlist_64.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// breakpad_nlist.h -// -// This file is meant to provide a header for clients of the modified -// nlist function implemented to work on 64-bit. - -#ifndef CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ - -#include - -int breakpad_nlist(const char *name, - struct nlist *list, - const char **symbolNames, - cpu_type_t cpu_type); -int breakpad_nlist(const char *name, - struct nlist_64 *list, - const char **symbolNames, - cpu_type_t cpu_type); - -#endif /* CLIENT_MAC_HANDLER_BREAKPAD_NLIST_H__ */ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc deleted file mode 100644 index cdba6df4acfbb1..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.cc +++ /dev/null @@ -1,573 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/mac/handler/dynamic_images.h" - -extern "C" { // needed to compile on Leopard - #include - #include - #include -} - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "breakpad_nlist_64.h" - -#if !TARGET_OS_IPHONE -#include - -#ifndef MAC_OS_X_VERSION_10_6 -#define MAC_OS_X_VERSION_10_6 1060 -#endif - -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 - -// Fallback declarations for TASK_DYLD_INFO and friends, introduced in -// in the Mac OS X 10.6 SDK. -#define TASK_DYLD_INFO 17 -struct task_dyld_info { - mach_vm_address_t all_image_info_addr; - mach_vm_size_t all_image_info_size; -}; -typedef struct task_dyld_info task_dyld_info_data_t; -typedef struct task_dyld_info *task_dyld_info_t; -#define TASK_DYLD_INFO_COUNT (sizeof(task_dyld_info_data_t) / sizeof(natural_t)) - -#endif - -#endif // !TARGET_OS_IPHONE - -namespace google_breakpad { - -using std::string; -using std::vector; - -//============================================================================== -// Returns the size of the memory region containing |address| and the -// number of bytes from |address| to the end of the region. -// We potentially, will extend the size of the original -// region by the size of the following region if it's contiguous with the -// first in order to handle cases when we're reading strings and they -// straddle two vm regions. -// -static mach_vm_size_t GetMemoryRegionSize(task_port_t target_task, - const uint64_t address, - mach_vm_size_t *size_to_end) { - mach_vm_address_t region_base = (mach_vm_address_t)address; - mach_vm_size_t region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - // Get information about the vm region containing |address| - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - kern_return_t result = - mach_vm_region_recurse(target_task, - ®ion_base, - ®ion_size, - &nesting_level, - region_info, - &info_count); - - if (result == KERN_SUCCESS) { - // Get distance from |address| to the end of this region - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - - // If we want to handle strings as long as 4096 characters we may need - // to check if there's a vm region immediately following the first one. - // If so, we need to extend |*size_to_end| to go all the way to the end - // of the second region. - if (*size_to_end < 4096) { - // Second region starts where the first one ends - mach_vm_address_t region_base2 = - (mach_vm_address_t)(region_base + region_size); - mach_vm_size_t region_size2; - - // Get information about the following vm region - result = - mach_vm_region_recurse(target_task, - ®ion_base2, - ®ion_size2, - &nesting_level, - region_info, - &info_count); - - // Extend region_size to go all the way to the end of the 2nd region - if (result == KERN_SUCCESS - && region_base2 == region_base + region_size) { - region_size += region_size2; - } - } - - *size_to_end = region_base + region_size -(mach_vm_address_t)address; - } else { - region_size = 0; - *size_to_end = 0; - } - - return region_size; -} - -#define kMaxStringLength 8192 -//============================================================================== -// Reads a NULL-terminated string from another task. -// -// Warning! This will not read any strings longer than kMaxStringLength-1 -// -static string ReadTaskString(task_port_t target_task, - const uint64_t address) { - // The problem is we don't know how much to read until we know how long - // the string is. And we don't know how long the string is, until we've read - // the memory! So, we'll try to read kMaxStringLength bytes - // (or as many bytes as we can until we reach the end of the vm region). - mach_vm_size_t size_to_end; - GetMemoryRegionSize(target_task, address, &size_to_end); - - if (size_to_end > 0) { - mach_vm_size_t size_to_read = - size_to_end > kMaxStringLength ? kMaxStringLength : size_to_end; - - vector bytes; - if (ReadTaskMemory(target_task, address, (size_t)size_to_read, bytes) != - KERN_SUCCESS) - return string(); - - return string(reinterpret_cast(&bytes[0])); - } - - return string(); -} - -//============================================================================== -// Reads an address range from another task. The bytes read will be returned -// in bytes, which will be resized as necessary. -kern_return_t ReadTaskMemory(task_port_t target_task, - const uint64_t address, - size_t length, - vector &bytes) { - int systemPageSize = getpagesize(); - - // use the negative of the page size for the mask to find the page address - mach_vm_address_t page_address = address & (-systemPageSize); - - mach_vm_address_t last_page_address = - (address + length + (systemPageSize - 1)) & (-systemPageSize); - - mach_vm_size_t page_size = last_page_address - page_address; - uint8_t* local_start; - uint32_t local_length; - - kern_return_t r = mach_vm_read(target_task, - page_address, - page_size, - reinterpret_cast(&local_start), - &local_length); - - if (r != KERN_SUCCESS) - return r; - - bytes.resize(length); - memcpy(&bytes[0], - &local_start[(mach_vm_address_t)address - page_address], - length); - mach_vm_deallocate(mach_task_self(), (uintptr_t)local_start, local_length); - return KERN_SUCCESS; -} - -#pragma mark - - -//============================================================================== -// Traits structs for specializing function templates to handle -// 32-bit/64-bit Mach-O files. -struct MachO32 { - typedef mach_header mach_header_type; - typedef segment_command mach_segment_command_type; - typedef dyld_image_info32 dyld_image_info; - typedef dyld_all_image_infos32 dyld_all_image_infos; - typedef struct nlist nlist_type; - static const uint32_t magic = MH_MAGIC; - static const uint32_t segment_load_command = LC_SEGMENT; -}; - -struct MachO64 { - typedef mach_header_64 mach_header_type; - typedef segment_command_64 mach_segment_command_type; - typedef dyld_image_info64 dyld_image_info; - typedef dyld_all_image_infos64 dyld_all_image_infos; - typedef struct nlist_64 nlist_type; - static const uint32_t magic = MH_MAGIC_64; - static const uint32_t segment_load_command = LC_SEGMENT_64; -}; - -template -bool FindTextSection(DynamicImage& image) { - typedef typename MachBits::mach_header_type mach_header_type; - typedef typename MachBits::mach_segment_command_type - mach_segment_command_type; - - const mach_header_type* header = - reinterpret_cast(&image.header_[0]); - - if(header->magic != MachBits::magic) { - return false; - } - - const struct load_command *cmd = - reinterpret_cast(header + 1); - - bool found_text_section = false; - bool found_dylib_id_command = false; - for (unsigned int i = 0; cmd && (i < header->ncmds); ++i) { - if (!found_text_section) { - if (cmd->cmd == MachBits::segment_load_command) { - const mach_segment_command_type *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - image.vmaddr_ = static_cast(seg->vmaddr); - image.vmsize_ = static_cast(seg->vmsize); - image.slide_ = 0; - - if (seg->fileoff == 0 && seg->filesize != 0) { - image.slide_ = - (uintptr_t)image.GetLoadAddress() - (uintptr_t)seg->vmaddr; - } - found_text_section = true; - } - } - } - - if (!found_dylib_id_command) { - if (cmd->cmd == LC_ID_DYLIB) { - const struct dylib_command *dc = - reinterpret_cast(cmd); - - image.version_ = dc->dylib.current_version; - found_dylib_id_command = true; - } - } - - if (found_dylib_id_command && found_text_section) { - return true; - } - - cmd = reinterpret_cast - (reinterpret_cast(cmd) + cmd->cmdsize); - } - - return false; -} - -//============================================================================== -// Initializes vmaddr_, vmsize_, and slide_ -void DynamicImage::CalculateMemoryAndVersionInfo() { - // unless we can process the header, ensure that calls to - // IsValid() will return false - vmaddr_ = 0; - vmsize_ = 0; - slide_ = 0; - version_ = 0; - - // The function template above does all the real work. - if (Is64Bit()) - FindTextSection(*this); - else - FindTextSection(*this); -} - -//============================================================================== -// The helper function template abstracts the 32/64-bit differences. -template -uint32_t GetFileTypeFromHeader(DynamicImage& image) { - typedef typename MachBits::mach_header_type mach_header_type; - - const mach_header_type* header = - reinterpret_cast(&image.header_[0]); - return header->filetype; -} - -uint32_t DynamicImage::GetFileType() { - if (Is64Bit()) - return GetFileTypeFromHeader(*this); - - return GetFileTypeFromHeader(*this); -} - -#pragma mark - - -//============================================================================== -// Loads information about dynamically loaded code in the given task. -DynamicImages::DynamicImages(mach_port_t task) - : task_(task), - cpu_type_(DetermineTaskCPUType(task)), - image_list_() { - ReadImageInfoForTask(); -} - -template -static uint64_t LookupSymbol(const char* symbol_name, - const char* filename, - cpu_type_t cpu_type) { - typedef typename MachBits::nlist_type nlist_type; - - nlist_type symbol_info[8] = {}; - const char *symbolNames[2] = { symbol_name, "\0" }; - nlist_type &list = symbol_info[0]; - int invalidEntriesCount = breakpad_nlist(filename, - &list, - symbolNames, - cpu_type); - - if(invalidEntriesCount != 0) { - return 0; - } - - assert(list.n_value); - return list.n_value; -} - -#if TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6 -static bool HasTaskDyldInfo() { - return true; -} -#else -static SInt32 GetOSVersionInternal() { - SInt32 os_version = 0; - Gestalt(gestaltSystemVersion, &os_version); - return os_version; -} - -static SInt32 GetOSVersion() { - static SInt32 os_version = GetOSVersionInternal(); - return os_version; -} - -static bool HasTaskDyldInfo() { - return GetOSVersion() >= 0x1060; -} -#endif // TARGET_OS_IPHONE || MAC_OS_X_VERSION_MIN_REQUIRED >= 10_6 - -uint64_t DynamicImages::GetDyldAllImageInfosPointer() { - if (HasTaskDyldInfo()) { - task_dyld_info_data_t task_dyld_info; - mach_msg_type_number_t count = TASK_DYLD_INFO_COUNT; - if (task_info(task_, TASK_DYLD_INFO, (task_info_t)&task_dyld_info, - &count) != KERN_SUCCESS) { - return 0; - } - - return (uint64_t)task_dyld_info.all_image_info_addr; - } else { - const char *imageSymbolName = "_dyld_all_image_infos"; - const char *dyldPath = "/usr/lib/dyld"; - - if (Is64Bit()) - return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); - return LookupSymbol(imageSymbolName, dyldPath, cpu_type_); - } -} - -//============================================================================== -// This code was written using dyld_debug.c (from Darwin) as a guide. - -template -void ReadImageInfo(DynamicImages& images, - uint64_t image_list_address) { - typedef typename MachBits::dyld_image_info dyld_image_info; - typedef typename MachBits::dyld_all_image_infos dyld_all_image_infos; - typedef typename MachBits::mach_header_type mach_header_type; - - // Read the structure inside of dyld that contains information about - // loaded images. We're reading from the desired task's address space. - - // Here we make the assumption that dyld loaded at the same address in - // the crashed process vs. this one. This is an assumption made in - // "dyld_debug.c" and is said to be nearly always valid. - vector dyld_all_info_bytes; - if (ReadTaskMemory(images.task_, - image_list_address, - sizeof(dyld_all_image_infos), - dyld_all_info_bytes) != KERN_SUCCESS) - return; - - dyld_all_image_infos *dyldInfo = - reinterpret_cast(&dyld_all_info_bytes[0]); - - // number of loaded images - int count = dyldInfo->infoArrayCount; - - // Read an array of dyld_image_info structures each containing - // information about a loaded image. - vector dyld_info_array_bytes; - if (ReadTaskMemory(images.task_, - dyldInfo->infoArray, - count * sizeof(dyld_image_info), - dyld_info_array_bytes) != KERN_SUCCESS) - return; - - dyld_image_info *infoArray = - reinterpret_cast(&dyld_info_array_bytes[0]); - images.image_list_.reserve(count); - - for (int i = 0; i < count; ++i) { - dyld_image_info &info = infoArray[i]; - - // First read just the mach_header from the image in the task. - vector mach_header_bytes; - if (ReadTaskMemory(images.task_, - info.load_address_, - sizeof(mach_header_type), - mach_header_bytes) != KERN_SUCCESS) - continue; // bail on this dynamic image - - mach_header_type *header = - reinterpret_cast(&mach_header_bytes[0]); - - // Now determine the total amount necessary to read the header - // plus all of the load commands. - size_t header_size = - sizeof(mach_header_type) + header->sizeofcmds; - - if (ReadTaskMemory(images.task_, - info.load_address_, - header_size, - mach_header_bytes) != KERN_SUCCESS) - continue; - - // Read the file name from the task's memory space. - string file_path; - if (info.file_path_) { - // Although we're reading kMaxStringLength bytes, it's copied in the - // the DynamicImage constructor below with the correct string length, - // so it's not really wasting memory. - file_path = ReadTaskString(images.task_, info.file_path_); - } - - // Create an object representing this image and add it to our list. - DynamicImage *new_image; - new_image = new DynamicImage(&mach_header_bytes[0], - header_size, - info.load_address_, - file_path, - static_cast(info.file_mod_date_), - images.task_, - images.cpu_type_); - - if (new_image->IsValid()) { - images.image_list_.push_back(DynamicImageRef(new_image)); - } else { - delete new_image; - } - } - - // sorts based on loading address - sort(images.image_list_.begin(), images.image_list_.end()); - // remove duplicates - this happens in certain strange cases - // You can see it in DashboardClient when Google Gadgets plugin - // is installed. Apple's crash reporter log and gdb "info shared" - // both show the same library multiple times at the same address - - vector::iterator it = unique(images.image_list_.begin(), - images.image_list_.end()); - images.image_list_.erase(it, images.image_list_.end()); -} - -void DynamicImages::ReadImageInfoForTask() { - uint64_t imageList = GetDyldAllImageInfosPointer(); - - if (imageList) { - if (Is64Bit()) - ReadImageInfo(*this, imageList); - else - ReadImageInfo(*this, imageList); - } -} - -//============================================================================== -DynamicImage *DynamicImages::GetExecutableImage() { - int executable_index = GetExecutableImageIndex(); - - if (executable_index >= 0) { - return GetImage(executable_index); - } - - return NULL; -} - -//============================================================================== -// returns -1 if failure to find executable -int DynamicImages::GetExecutableImageIndex() { - int image_count = GetImageCount(); - - for (int i = 0; i < image_count; ++i) { - DynamicImage *image = GetImage(i); - if (image->GetFileType() == MH_EXECUTE) { - return i; - } - } - - return -1; -} - -//============================================================================== -// static -cpu_type_t DynamicImages::DetermineTaskCPUType(task_t task) { - if (task == mach_task_self()) - return GetNativeCPUType(); - - int mib[CTL_MAXNAME]; - size_t mibLen = CTL_MAXNAME; - int err = sysctlnametomib("sysctl.proc_cputype", mib, &mibLen); - if (err == 0) { - assert(mibLen < CTL_MAXNAME); - pid_for_task(task, &mib[mibLen]); - mibLen += 1; - - cpu_type_t cpu_type; - size_t cpuTypeSize = sizeof(cpu_type); - sysctl(mib, static_cast(mibLen), &cpu_type, &cpuTypeSize, 0, 0); - return cpu_type; - } - - return GetNativeCPUType(); -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h b/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h deleted file mode 100644 index 65147900b822f0..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/dynamic_images.h +++ /dev/null @@ -1,319 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// dynamic_images.h -// -// Implements most of the function of the dyld API, but allowing an -// arbitrary task to be introspected, unlike the dyld API which -// only allows operation on the current task. The current implementation -// is limited to use by 32-bit tasks. - -#ifndef CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ -#define CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ - -#include -#include -#include -#include - -#include -#include - -#include "mach_vm_compat.h" - -namespace google_breakpad { - -using std::string; -using std::vector; - -//============================================================================== -// The memory layout of this struct matches the dyld_image_info struct -// defined in "dyld_gdb.h" in the darwin source. -typedef struct dyld_image_info32 { - uint32_t load_address_; // struct mach_header* - uint32_t file_path_; // char* - uint32_t file_mod_date_; -} dyld_image_info32; - -typedef struct dyld_image_info64 { - uint64_t load_address_; // struct mach_header* - uint64_t file_path_; // char* - uint64_t file_mod_date_; -} dyld_image_info64; - -//============================================================================== -// This is as defined in "dyld_gdb.h" in the darwin source. -// _dyld_all_image_infos (in dyld) is a structure of this type -// which will be used to determine which dynamic code has been loaded. -typedef struct dyld_all_image_infos32 { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - uint32_t infoArray; // const struct dyld_image_info* - uint32_t notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos32; - -typedef struct dyld_all_image_infos64 { - uint32_t version; // == 1 in Mac OS X 10.4 - uint32_t infoArrayCount; - uint64_t infoArray; // const struct dyld_image_info* - uint64_t notification; - bool processDetachedFromSharedRegion; -} dyld_all_image_infos64; - -// some typedefs to isolate 64/32 bit differences -#ifdef __LP64__ -typedef mach_header_64 breakpad_mach_header; -typedef segment_command_64 breakpad_mach_segment_command; -#else -typedef mach_header breakpad_mach_header; -typedef segment_command breakpad_mach_segment_command; -#endif - -// Helper functions to deal with 32-bit/64-bit Mach-O differences. -class DynamicImage; -template -bool FindTextSection(DynamicImage& image); - -template -uint32_t GetFileTypeFromHeader(DynamicImage& image); - -//============================================================================== -// Represents a single dynamically loaded mach-o image -class DynamicImage { - public: - DynamicImage(uint8_t *header, // data is copied - size_t header_size, // includes load commands - uint64_t load_address, - string file_path, - uintptr_t image_mod_date, - mach_port_t task, - cpu_type_t cpu_type) - : header_(header, header + header_size), - header_size_(header_size), - load_address_(load_address), - vmaddr_(0), - vmsize_(0), - slide_(0), - version_(0), - file_path_(file_path), - file_mod_date_(image_mod_date), - task_(task), - cpu_type_(cpu_type) { - CalculateMemoryAndVersionInfo(); - } - - // Size of mach_header plus load commands - size_t GetHeaderSize() const {return header_.size();} - - // Full path to mach-o binary - string GetFilePath() {return file_path_;} - - uint64_t GetModDate() const {return file_mod_date_;} - - // Actual address where the image was loaded - uint64_t GetLoadAddress() const {return load_address_;} - - // Address where the image should be loaded - mach_vm_address_t GetVMAddr() const {return vmaddr_;} - - // Difference between GetLoadAddress() and GetVMAddr() - ptrdiff_t GetVMAddrSlide() const {return slide_;} - - // Size of the image - mach_vm_size_t GetVMSize() const {return vmsize_;} - - // Task owning this loaded image - mach_port_t GetTask() {return task_;} - - // CPU type of the task - cpu_type_t GetCPUType() {return cpu_type_;} - - // filetype from the Mach-O header. - uint32_t GetFileType(); - - // Return true if the task is a 64-bit architecture. - bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } - - uint32_t GetVersion() {return version_;} - // For sorting - bool operator<(const DynamicImage &inInfo) { - return GetLoadAddress() < inInfo.GetLoadAddress(); - } - - // Sanity checking - bool IsValid() {return GetVMSize() != 0;} - - private: - DynamicImage(const DynamicImage &); - DynamicImage &operator=(const DynamicImage &); - - friend class DynamicImages; - template - friend bool FindTextSection(DynamicImage& image); - template - friend uint32_t GetFileTypeFromHeader(DynamicImage& image); - - // Initializes vmaddr_, vmsize_, and slide_ - void CalculateMemoryAndVersionInfo(); - - const vector header_; // our local copy of the header - size_t header_size_; // mach_header plus load commands - uint64_t load_address_; // base address image is mapped into - mach_vm_address_t vmaddr_; - mach_vm_size_t vmsize_; - ptrdiff_t slide_; - uint32_t version_; // Dylib version - string file_path_; // path dyld used to load the image - uintptr_t file_mod_date_; // time_t of image file - - mach_port_t task_; - cpu_type_t cpu_type_; // CPU type of task_ -}; - -//============================================================================== -// DynamicImageRef is just a simple wrapper for a pointer to -// DynamicImage. The reason we use it instead of a simple typedef is so -// that we can use stl::sort() on a vector of DynamicImageRefs -// and simple class pointers can't implement operator<(). -// -class DynamicImageRef { - public: - explicit DynamicImageRef(DynamicImage *inP) : p(inP) {} - // The copy constructor is required by STL - DynamicImageRef(const DynamicImageRef &inRef) : p(inRef.p) {} - - bool operator<(const DynamicImageRef &inRef) const { - return (*const_cast(this)->p) - < (*const_cast(inRef).p); - } - - bool operator==(const DynamicImageRef &inInfo) const { - return (*const_cast(this)->p).GetLoadAddress() == - (*const_cast(inInfo)).GetLoadAddress(); - } - - // Be just like DynamicImage* - DynamicImage *operator->() {return p;} - operator DynamicImage*() {return p;} - - private: - DynamicImage *p; -}; - -// Helper function to deal with 32-bit/64-bit Mach-O differences. -class DynamicImages; -template -void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); - -//============================================================================== -// An object of type DynamicImages may be created to allow introspection of -// an arbitrary task's dynamically loaded mach-o binaries. This makes the -// assumption that the current task has send rights to the target task. -class DynamicImages { - public: - explicit DynamicImages(mach_port_t task); - - ~DynamicImages() { - for (int i = 0; i < GetImageCount(); ++i) { - delete image_list_[i]; - } - } - - // Returns the number of dynamically loaded mach-o images. - int GetImageCount() const {return static_cast(image_list_.size());} - - // Returns an individual image. - DynamicImage *GetImage(int i) { - if (i < (int)image_list_.size()) { - return image_list_[i]; - } - return NULL; - } - - // Returns the image corresponding to the main executable. - DynamicImage *GetExecutableImage(); - int GetExecutableImageIndex(); - - // Returns the task which we're looking at. - mach_port_t GetTask() const {return task_;} - - // CPU type of the task - cpu_type_t GetCPUType() {return cpu_type_;} - - // Return true if the task is a 64-bit architecture. - bool Is64Bit() { return (GetCPUType() & CPU_ARCH_ABI64) == CPU_ARCH_ABI64; } - - // Determine the CPU type of the task being dumped. - static cpu_type_t DetermineTaskCPUType(task_t task); - - // Get the native CPU type of this task. - static cpu_type_t GetNativeCPUType() { -#if defined(__i386__) - return CPU_TYPE_I386; -#elif defined(__x86_64__) - return CPU_TYPE_X86_64; -#elif defined(__ppc__) - return CPU_TYPE_POWERPC; -#elif defined(__ppc64__) - return CPU_TYPE_POWERPC64; -#elif defined(__arm__) - return CPU_TYPE_ARM; -#elif defined(__aarch64__) - return CPU_TYPE_ARM64; -#else -#error "GetNativeCPUType not implemented for this architecture" -#endif - } - - private: - template - friend void ReadImageInfo(DynamicImages& images, uint64_t image_list_address); - - bool IsOurTask() {return task_ == mach_task_self();} - - // Initialization - void ReadImageInfoForTask(); - uint64_t GetDyldAllImageInfosPointer(); - - mach_port_t task_; - cpu_type_t cpu_type_; // CPU type of task_ - vector image_list_; -}; - -// Fill bytes with the contents of memory at a particular -// location in another task. -kern_return_t ReadTaskMemory(task_port_t target_task, - const uint64_t address, - size_t length, - vector &bytes); - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_DYNAMIC_IMAGES_H__ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc deleted file mode 100644 index 6928e98472b519..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.cc +++ /dev/null @@ -1,855 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include -#include -#include -#include - -#include - -#include "client/mac/handler/exception_handler.h" -#include "client/mac/handler/minidump_generator.h" -#include "common/mac/macho_utilities.h" -#include "common/mac/scoped_task_suspend-inl.h" -#include "google_breakpad/common/minidump_exception_mac.h" - -#ifndef __EXCEPTIONS -// This file uses C++ try/catch (but shouldn't). Duplicate the macros from -// allowing this file to work properly with -// exceptions disabled even when other C++ libraries are used. #undef the try -// and catch macros first in case libstdc++ is in use and has already provided -// its own definitions. -#undef try -#define try if (true) -#undef catch -#define catch(X) if (false) -#endif // __EXCEPTIONS - -#ifndef USE_PROTECTED_ALLOCATIONS -#if TARGET_OS_IPHONE -#define USE_PROTECTED_ALLOCATIONS 1 -#else -#define USE_PROTECTED_ALLOCATIONS 0 -#endif -#endif - -// If USE_PROTECTED_ALLOCATIONS is activated then the -// gBreakpadAllocator needs to be setup in other code -// ahead of time. Please see ProtectedMemoryAllocator.h -// for more details. -#if USE_PROTECTED_ALLOCATIONS - #include "protected_memory_allocator.h" - extern ProtectedMemoryAllocator *gBreakpadAllocator; -#endif - -namespace google_breakpad { - -static union { -#if USE_PROTECTED_ALLOCATIONS -#if defined PAGE_MAX_SIZE - char protected_buffer[PAGE_MAX_SIZE] __attribute__((aligned(PAGE_MAX_SIZE))); -#else - char protected_buffer[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); -#endif // defined PAGE_MAX_SIZE -#endif // USE_PROTECTED_ALLOCATIONS - google_breakpad::ExceptionHandler *handler; -} gProtectedData; - -using std::map; - -// These structures and techniques are illustrated in -// Mac OS X Internals, Amit Singh, ch 9.7 -struct ExceptionMessage { - mach_msg_header_t header; - mach_msg_body_t body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - NDR_record_t ndr; - exception_type_t exception; - mach_msg_type_number_t code_count; - integer_t code[EXCEPTION_CODE_MAX]; - char padding[512]; -}; - -struct ExceptionParameters { - ExceptionParameters() : count(0) {} - mach_msg_type_number_t count; - exception_mask_t masks[EXC_TYPES_COUNT]; - mach_port_t ports[EXC_TYPES_COUNT]; - exception_behavior_t behaviors[EXC_TYPES_COUNT]; - thread_state_flavor_t flavors[EXC_TYPES_COUNT]; -}; - -struct ExceptionReplyMessage { - mach_msg_header_t header; - NDR_record_t ndr; - kern_return_t return_code; -}; - -// Only catch these three exceptions. The other ones are nebulously defined -// and may result in treating a non-fatal exception as fatal. -exception_mask_t s_exception_mask = EXC_MASK_BAD_ACCESS | -EXC_MASK_BAD_INSTRUCTION | EXC_MASK_ARITHMETIC | EXC_MASK_BREAKPOINT; - -#if !TARGET_OS_IPHONE -extern "C" { - // Forward declarations for functions that need "C" style compilation - boolean_t exc_server(mach_msg_header_t* request, - mach_msg_header_t* reply); - - // This symbol must be visible to dlsym() - see - // http://code.google.com/p/google-breakpad/issues/detail?id=345 for details. - kern_return_t catch_exception_raise(mach_port_t target_port, - mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) - __attribute__((visibility("default"))); -} -#endif - -kern_return_t ForwardException(mach_port_t task, - mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count); - -#if TARGET_OS_IPHONE -// Implementation is based on the implementation generated by mig. -boolean_t breakpad_exc_server(mach_msg_header_t* InHeadP, - mach_msg_header_t* OutHeadP) { - OutHeadP->msgh_bits = - MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_remote_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - - if (InHeadP->msgh_id != 2401) { - ((mig_reply_error_t*)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t*)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - integer_t code[2]; - mach_msg_trailer_t trailer; - } Request; - - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } Reply; -#ifdef __MigPackStructs -#pragma pack() -#endif - - Request* In0P = (Request*)InHeadP; - Reply* OutP = (Reply*)OutHeadP; - - if (In0P->task.name != mach_task_self()) { - return FALSE; - } - OutP->RetCode = ForwardException(In0P->task.name, - In0P->thread.name, - In0P->exception, - In0P->code, - In0P->codeCnt); - OutP->NDR = NDR_record; - return TRUE; -} -#else -boolean_t breakpad_exc_server(mach_msg_header_t* request, - mach_msg_header_t* reply) { - return exc_server(request, reply); -} - -// Callback from exc_server() -kern_return_t catch_exception_raise(mach_port_t port, mach_port_t failed_thread, - mach_port_t task, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - if (task != mach_task_self()) { - return KERN_FAILURE; - } - return ForwardException(task, failed_thread, exception, code, code_count); -} -#endif - -ExceptionHandler::ExceptionHandler(const string &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - bool install_handler, - const char* port_name) - : dump_path_(), - filter_(filter), - callback_(callback), - callback_context_(callback_context), - directCallback_(NULL), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - // This will update to the ID and C-string pointers - set_dump_path(dump_path); - MinidumpGenerator::GatherSystemInformation(); -#if !TARGET_OS_IPHONE - if (port_name) - crash_generation_client_.reset(new CrashGenerationClient(port_name)); -#endif - Setup(install_handler); -} - -// special constructor if we want to bypass minidump writing and -// simply get a callback with the exception information -ExceptionHandler::ExceptionHandler(DirectCallback callback, - void* callback_context, - bool install_handler) - : dump_path_(), - filter_(NULL), - callback_(NULL), - callback_context_(callback_context), - directCallback_(callback), - handler_thread_(NULL), - handler_port_(MACH_PORT_NULL), - previous_(NULL), - installed_exception_handler_(false), - is_in_teardown_(false), - last_minidump_write_result_(false), - use_minidump_write_mutex_(false) { - MinidumpGenerator::GatherSystemInformation(); - Setup(install_handler); -} - -ExceptionHandler::~ExceptionHandler() { - Teardown(); -} - -bool ExceptionHandler::WriteMinidump(bool write_exception_stream) { - // If we're currently writing, just return - if (use_minidump_write_mutex_) - return false; - - use_minidump_write_mutex_ = true; - last_minidump_write_result_ = false; - - // Lock the mutex. Since we just created it, this will return immediately. - if (pthread_mutex_lock(&minidump_write_mutex_) == 0) { - // Send an empty message to the handle port so that a minidump will - // be written - bool result = SendMessageToHandlerThread(write_exception_stream ? - kWriteDumpWithExceptionMessage : - kWriteDumpMessage); - if (!result) { - pthread_mutex_unlock(&minidump_write_mutex_); - return false; - } - - // Wait for the minidump writer to complete its writing. It will unlock - // the mutex when completed - pthread_mutex_lock(&minidump_write_mutex_); - } - - use_minidump_write_mutex_ = false; - UpdateNextID(); - return last_minidump_write_result_; -} - -// static -bool ExceptionHandler::WriteMinidump(const string &dump_path, - bool write_exception_stream, - MinidumpCallback callback, - void* callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, false, - NULL); - return handler.WriteMinidump(write_exception_stream); -} - -// static -bool ExceptionHandler::WriteMinidumpForChild(mach_port_t child, - mach_port_t child_blamed_thread, - const string &dump_path, - MinidumpCallback callback, - void* callback_context) { - ScopedTaskSuspend suspend(child); - - MinidumpGenerator generator(child, MACH_PORT_NULL); - string dump_id; - string dump_filename = generator.UniqueNameInDirectory(dump_path, &dump_id); - - generator.SetExceptionInformation(EXC_BREAKPOINT, -#if defined(__i386__) || defined(__x86_64__) - EXC_I386_BPT, -#elif defined(__ppc__) || defined(__ppc64__) - EXC_PPC_BREAKPOINT, -#elif defined(__arm__) || defined(__aarch64__) - EXC_ARM_BREAKPOINT, -#else -#error architecture not supported -#endif - 0, - child_blamed_thread); - bool result = generator.Write(dump_filename.c_str()); - - if (callback) { - return callback(dump_path.c_str(), dump_id.c_str(), - callback_context, result); - } - return result; -} - -bool ExceptionHandler::WriteMinidumpWithException( - int exception_type, - int exception_code, - int exception_subcode, - breakpad_ucontext_t* task_context, - mach_port_t thread_name, - bool exit_after_write, - bool report_current_thread) { - bool result = false; - - if (directCallback_) { - if (directCallback_(callback_context_, - exception_type, - exception_code, - exception_subcode, - thread_name) ) { - if (exit_after_write) - _exit(exception_type); - } -#if !TARGET_OS_IPHONE - } else if (IsOutOfProcess()) { - if (exception_type && exception_code) { - // If this is a real exception, give the filter (if any) a chance to - // decide if this should be sent. - if (filter_ && !filter_(callback_context_)) - return false; - result = crash_generation_client_->RequestDumpForException( - exception_type, - exception_code, - exception_subcode, - thread_name); - if (result && exit_after_write) { - _exit(exception_type); - } - } -#endif - } else { - string minidump_id; - - // Putting the MinidumpGenerator in its own context will ensure that the - // destructor is executed, closing the newly created minidump file. - if (!dump_path_.empty()) { - MinidumpGenerator md(mach_task_self(), - report_current_thread ? MACH_PORT_NULL : - mach_thread_self()); - md.SetTaskContext(task_context); - if (exception_type && exception_code) { - // If this is a real exception, give the filter (if any) a chance to - // decide if this should be sent. - if (filter_ && !filter_(callback_context_)) - return false; - - md.SetExceptionInformation(exception_type, exception_code, - exception_subcode, thread_name); - } - - result = md.Write(next_minidump_path_c_); - } - - // Call user specified callback (if any) - if (callback_) { - // If the user callback returned true and we're handling an exception - // (rather than just writing out the file), then we should exit without - // forwarding the exception to the next handler. - if (callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - result)) { - if (exit_after_write) - _exit(exception_type); - } - } - } - - return result; -} - -kern_return_t ForwardException(mach_port_t task, mach_port_t failed_thread, - exception_type_t exception, - exception_data_t code, - mach_msg_type_number_t code_count) { - // At this time, we should have called Uninstall() on the exception handler - // so that the current exception ports are the ones that we should be - // forwarding to. - ExceptionParameters current; - - current.count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - task_get_exception_ports(current_task, - s_exception_mask, - current.masks, - ¤t.count, - current.ports, - current.behaviors, - current.flavors); - - // Find the first exception handler that matches the exception - unsigned int found; - for (found = 0; found < current.count; ++found) { - if (current.masks[found] & (1 << exception)) { - break; - } - } - - // Nothing to forward - if (found == current.count) { - fprintf(stderr, "** No previous ports for forwarding!! \n"); - exit(KERN_FAILURE); - } - - mach_port_t target_port = current.ports[found]; - exception_behavior_t target_behavior = current.behaviors[found]; - - kern_return_t result; - // TODO: Handle the case where |target_behavior| has MACH_EXCEPTION_CODES - // set. https://code.google.com/p/google-breakpad/issues/detail?id=551 - switch (target_behavior) { - case EXCEPTION_DEFAULT: - result = exception_raise(target_port, failed_thread, task, exception, - code, code_count); - break; - default: - fprintf(stderr, "** Unknown exception behavior: %d\n", target_behavior); - result = KERN_FAILURE; - break; - } - - return result; -} - -// static -void* ExceptionHandler::WaitForMessage(void* exception_handler_class) { - ExceptionHandler* self = - reinterpret_cast(exception_handler_class); - ExceptionMessage receive; - - // Wait for the exception info - while (1) { - receive.header.msgh_local_port = self->handler_port_; - receive.header.msgh_size = static_cast(sizeof(receive)); - kern_return_t result = mach_msg(&(receive.header), - MACH_RCV_MSG | MACH_RCV_LARGE, 0, - receive.header.msgh_size, - self->handler_port_, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - - if (result == KERN_SUCCESS) { - // Uninstall our handler so that we don't get in a loop if the process of - // writing out a minidump causes an exception. However, if the exception - // was caused by a fork'd process, don't uninstall things - - // If the actual exception code is zero, then we're calling this handler - // in a way that indicates that we want to either exit this thread or - // generate a minidump - // - // While reporting, all threads (except this one) must be suspended - // to avoid misleading stacks. If appropriate they will be resumed - // afterwards. - if (!receive.exception) { - // Don't touch self, since this message could have been sent - // from its destructor. - if (receive.header.msgh_id == kShutdownMessage) - return NULL; - - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - mach_port_t thread = MACH_PORT_NULL; - int exception_type = 0; - int exception_code = 0; - if (receive.header.msgh_id == kWriteDumpWithExceptionMessage) { - thread = receive.thread.name; - exception_type = EXC_BREAKPOINT; -#if defined(__i386__) || defined(__x86_64__) - exception_code = EXC_I386_BPT; -#elif defined(__ppc__) || defined(__ppc64__) - exception_code = EXC_PPC_BREAKPOINT; -#elif defined(__arm__) || defined(__aarch64__) - exception_code = EXC_ARM_BREAKPOINT; -#else -#error architecture not supported -#endif - } - - // Write out the dump and save the result for later retrieval - self->last_minidump_write_result_ = - self->WriteMinidumpWithException(exception_type, exception_code, - 0, NULL, thread, - false, false); - -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - - self->ResumeThreads(); - - if (self->use_minidump_write_mutex_) - pthread_mutex_unlock(&self->minidump_write_mutex_); - } else { - // When forking a child process with the exception handler installed, - // if the child crashes, it will send the exception back to the parent - // process. The check for task == self_task() ensures that only - // exceptions that occur in the parent process are caught and - // processed. If the exception was not caused by this task, we - // still need to call into the exception server and have it return - // KERN_FAILURE (see catch_exception_raise) in order for the kernel - // to move onto the host exception handler for the child task - if (receive.task.name == mach_task_self()) { - self->SuspendThreads(); - -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - int subcode = 0; - if (receive.exception == EXC_BAD_ACCESS && receive.code_count > 1) - subcode = receive.code[1]; - - // Generate the minidump with the exception data. - self->WriteMinidumpWithException(receive.exception, receive.code[0], - subcode, NULL, receive.thread.name, - true, false); - -#if USE_PROTECTED_ALLOCATIONS - // This may have become protected again within - // WriteMinidumpWithException, but it needs to be unprotected for - // UninstallHandler. - if (gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - - self->UninstallHandler(true); - -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif - } - // Pass along the exception to the server, which will setup the - // message and call catch_exception_raise() and put the return - // code into the reply. - ExceptionReplyMessage reply; - if (!breakpad_exc_server(&receive.header, &reply.header)) - exit(1); - - // Send a reply and exit - mach_msg(&(reply.header), MACH_SEND_MSG, - reply.header.msgh_size, 0, MACH_PORT_NULL, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - } - } - } - - return NULL; -} - -// static -void ExceptionHandler::SignalHandler(int sig, siginfo_t* info, void* uc) { -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Unprotect(); -#endif - gProtectedData.handler->WriteMinidumpWithException( - EXC_SOFTWARE, - MD_EXCEPTION_CODE_MAC_ABORT, - 0, - static_cast(uc), - mach_thread_self(), - true, - true); -#if USE_PROTECTED_ALLOCATIONS - if (gBreakpadAllocator) - gBreakpadAllocator->Protect(); -#endif -} - -bool ExceptionHandler::InstallHandler() { - // If a handler is already installed, something is really wrong. - if (gProtectedData.handler != NULL) { - return false; - } - if (!IsOutOfProcess()) { - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sigemptyset(&sa.sa_mask); - sigaddset(&sa.sa_mask, SIGABRT); - sa.sa_sigaction = ExceptionHandler::SignalHandler; - sa.sa_flags = SA_SIGINFO; - - scoped_ptr old(new struct sigaction); - if (sigaction(SIGABRT, &sa, old.get()) == -1) { - return false; - } - old_handler_.swap(old); - gProtectedData.handler = this; -#if USE_PROTECTED_ALLOCATIONS - assert(((size_t)(gProtectedData.protected_buffer) & PAGE_MASK) == 0); - mprotect(gProtectedData.protected_buffer, PAGE_SIZE, PROT_READ); -#endif - } - - try { -#if USE_PROTECTED_ALLOCATIONS - previous_ = new (gBreakpadAllocator->Allocate(sizeof(ExceptionParameters)) ) - ExceptionParameters(); -#else - previous_ = new ExceptionParameters(); -#endif - } - catch (std::bad_alloc) { - return false; - } - - // Save the current exception ports so that we can forward to them - previous_->count = EXC_TYPES_COUNT; - mach_port_t current_task = mach_task_self(); - kern_return_t result = task_get_exception_ports(current_task, - s_exception_mask, - previous_->masks, - &previous_->count, - previous_->ports, - previous_->behaviors, - previous_->flavors); - - // Setup the exception ports on this task - if (result == KERN_SUCCESS) - result = task_set_exception_ports(current_task, s_exception_mask, - handler_port_, EXCEPTION_DEFAULT, - THREAD_STATE_NONE); - - installed_exception_handler_ = (result == KERN_SUCCESS); - - return installed_exception_handler_; -} - -bool ExceptionHandler::UninstallHandler(bool in_exception) { - kern_return_t result = KERN_SUCCESS; - - if (old_handler_.get()) { - sigaction(SIGABRT, old_handler_.get(), NULL); -#if USE_PROTECTED_ALLOCATIONS - mprotect(gProtectedData.protected_buffer, PAGE_SIZE, - PROT_READ | PROT_WRITE); -#endif - old_handler_.reset(); - gProtectedData.handler = NULL; - } - - if (installed_exception_handler_) { - mach_port_t current_task = mach_task_self(); - - // Restore the previous ports - for (unsigned int i = 0; i < previous_->count; ++i) { - result = task_set_exception_ports(current_task, previous_->masks[i], - previous_->ports[i], - previous_->behaviors[i], - previous_->flavors[i]); - if (result != KERN_SUCCESS) - return false; - } - - // this delete should NOT happen if an exception just occurred! - if (!in_exception) { -#if USE_PROTECTED_ALLOCATIONS - previous_->~ExceptionParameters(); -#else - delete previous_; -#endif - } - - previous_ = NULL; - installed_exception_handler_ = false; - } - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::Setup(bool install_handler) { - if (pthread_mutex_init(&minidump_write_mutex_, NULL)) - return false; - - // Create a receive right - mach_port_t current_task = mach_task_self(); - kern_return_t result = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &handler_port_); - // Add send right - if (result == KERN_SUCCESS) - result = mach_port_insert_right(current_task, handler_port_, handler_port_, - MACH_MSG_TYPE_MAKE_SEND); - - if (install_handler && result == KERN_SUCCESS) - if (!InstallHandler()) - return false; - - if (result == KERN_SUCCESS) { - // Install the handler in its own thread, detached as we won't be joining. - pthread_attr_t attr; - pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - int thread_create_result = pthread_create(&handler_thread_, &attr, - &WaitForMessage, this); - pthread_attr_destroy(&attr); - result = thread_create_result ? KERN_FAILURE : KERN_SUCCESS; - } - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::Teardown() { - kern_return_t result = KERN_SUCCESS; - is_in_teardown_ = true; - - if (!UninstallHandler(false)) - return false; - - // Send an empty message so that the handler_thread exits - if (SendMessageToHandlerThread(kShutdownMessage)) { - mach_port_t current_task = mach_task_self(); - result = mach_port_deallocate(current_task, handler_port_); - if (result != KERN_SUCCESS) - return false; - } else { - return false; - } - - handler_thread_ = NULL; - handler_port_ = MACH_PORT_NULL; - pthread_mutex_destroy(&minidump_write_mutex_); - - return result == KERN_SUCCESS; -} - -bool ExceptionHandler::SendMessageToHandlerThread( - HandlerThreadMessage message_id) { - ExceptionMessage msg; - memset(&msg, 0, sizeof(msg)); - msg.header.msgh_id = message_id; - if (message_id == kWriteDumpMessage || - message_id == kWriteDumpWithExceptionMessage) { - // Include this thread's port. - msg.thread.name = mach_thread_self(); - msg.thread.disposition = MACH_MSG_TYPE_PORT_SEND; - msg.thread.type = MACH_MSG_PORT_DESCRIPTOR; - } - msg.header.msgh_size = sizeof(msg) - sizeof(msg.padding); - msg.header.msgh_remote_port = handler_port_; - msg.header.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, - MACH_MSG_TYPE_MAKE_SEND_ONCE); - kern_return_t result = mach_msg(&(msg.header), - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - msg.header.msgh_size, 0, 0, - MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - - return result == KERN_SUCCESS; -} - -void ExceptionHandler::UpdateNextID() { - next_minidump_path_ = - (MinidumpGenerator::UniqueNameInDirectory(dump_path_, &next_minidump_id_)); - - next_minidump_path_c_ = next_minidump_path_.c_str(); - next_minidump_id_c_ = next_minidump_id_.c_str(); -} - -bool ExceptionHandler::SuspendThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // suspend all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_suspend(threads_for_task[i])) - return false; - } - } - - return true; -} - -bool ExceptionHandler::ResumeThreads() { - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - - if (task_threads(mach_task_self(), &threads_for_task, &thread_count)) - return false; - - // resume all of the threads except for this one - for (unsigned int i = 0; i < thread_count; ++i) { - if (threads_for_task[i] != mach_thread_self()) { - if (thread_resume(threads_for_task[i])) - return false; - } - } - - return true; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h deleted file mode 100644 index f1d9ae92dee230..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/exception_handler.h +++ /dev/null @@ -1,281 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// exception_handler.h: MacOS exception handler -// This class can install a Mach exception port handler to trap most common -// programming errors. If an exception occurs, a minidump file will be -// generated which contains detailed information about the process and the -// exception. - -#ifndef CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include - -#include - -#include "client/mac/handler/ucontext_compat.h" -#include "common/scoped_ptr.h" - -#if !TARGET_OS_IPHONE -#include "client/mac/crash_generation/crash_generation_client.h" -#endif - -namespace google_breakpad { - -using std::string; - -struct ExceptionParameters; - -enum HandlerThreadMessage { - // Message ID telling the handler thread to write a dump. - kWriteDumpMessage = 0, - // Message ID telling the handler thread to write a dump and include - // an exception stream. - kWriteDumpWithExceptionMessage = 1, - // Message ID telling the handler thread to quit. - kShutdownMessage = 2 -}; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, Breakpad - // will immediately report the exception as unhandled without writing a - // minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void *context); - - // A callback function to run after the minidump has been written. - // |minidump_id| is a unique id for the dump, so the minidump - // file is /.dmp. - // |context| is the value passed into the constructor. - // |succeeded| indicates whether a minidump file was successfully written. - // Return true if the exception was fully handled and breakpad should exit. - // Return false to allow any other exception handlers to process the - // exception. - typedef bool (*MinidumpCallback)(const char *dump_dir, - const char *minidump_id, - void *context, bool succeeded); - - // A callback function which will be called directly if an exception occurs. - // This bypasses the minidump file writing and simply gives the client - // the exception information. - typedef bool (*DirectCallback)( void *context, - int exception_type, - int exception_code, - int exception_subcode, - mach_port_t thread_name); - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Minidump files will be written to dump_path, and the optional callback - // is called after writing the dump file, as described above. - // If install_handler is true, then a minidump will be written whenever - // an unhandled exception occurs. If it is false, minidumps will only - // be written when WriteMinidump is called. - // If port_name is non-NULL, attempt to perform out-of-process dump generation - // If port_name is NULL, in-process dump generation will be used. - ExceptionHandler(const string &dump_path, - FilterCallback filter, MinidumpCallback callback, - void *callback_context, bool install_handler, - const char *port_name); - - // A special constructor if we want to bypass minidump writing and - // simply get a callback with the exception information. - ExceptionHandler(DirectCallback callback, - void *callback_context, - bool install_handler); - - ~ExceptionHandler(); - - // Get and set the minidump path. - string dump_path() const { return dump_path_; } - void set_dump_path(const string &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump() { - return WriteMinidump(false); - } - - bool WriteMinidump(bool write_exception_stream); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const string &dump_path, MinidumpCallback callback, - void *callback_context) { - return WriteMinidump(dump_path, false, callback, callback_context); - } - - static bool WriteMinidump(const string &dump_path, - bool write_exception_stream, - MinidumpCallback callback, - void *callback_context); - - // Write a minidump of child immediately. This can be used to capture - // the execution state of a child process independently of a crash. - static bool WriteMinidumpForChild(mach_port_t child, - mach_port_t child_blamed_thread, - const std::string &dump_path, - MinidumpCallback callback, - void *callback_context); - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { -#if TARGET_OS_IPHONE - return false; -#else - return crash_generation_client_.get() != NULL; -#endif - } - - private: - // Install the mach exception handler - bool InstallHandler(); - - // Uninstall the mach exception handler (if any) - bool UninstallHandler(bool in_exception); - - // Setup the handler thread, and if |install_handler| is true, install the - // mach exception port handler - bool Setup(bool install_handler); - - // Uninstall the mach exception handler (if any) and terminate the helper - // thread - bool Teardown(); - - // Send a mach message to the exception handler. Return true on - // success, false otherwise. - bool SendMessageToHandlerThread(HandlerThreadMessage message_id); - - // All minidump writing goes through this one routine. - // |task_context| can be NULL. If not, it will be used to retrieve the - // context of the current thread, instead of using |thread_get_state|. - bool WriteMinidumpWithException(int exception_type, - int exception_code, - int exception_subcode, - breakpad_ucontext_t *task_context, - mach_port_t thread_name, - bool exit_after_write, - bool report_current_thread); - - // When installed, this static function will be call from a newly created - // pthread with |this| as the argument - static void *WaitForMessage(void *exception_handler_class); - - // Signal handler for SIGABRT. - static void SignalHandler(int sig, siginfo_t* info, void* uc); - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - // These functions will suspend/resume all threads except for the - // reporting thread - bool SuspendThreads(); - bool ResumeThreads(); - - // The destination directory for the minidump - string dump_path_; - - // The basename of the next minidump w/o extension - string next_minidump_id_; - - // The full path to the next minidump to be written, including extension - string next_minidump_path_; - - // Pointers to the UTF-8 versions of above - const char *dump_path_c_; - const char *next_minidump_id_c_; - const char *next_minidump_path_c_; - - // The callback function and pointer to be passed back after the minidump - // has been written - FilterCallback filter_; - MinidumpCallback callback_; - void *callback_context_; - - // The callback function to be passed back when we don't want a minidump - // file to be written - DirectCallback directCallback_; - - // The thread that is created for the handler - pthread_t handler_thread_; - - // The port that is waiting on an exception message to be sent, if the - // handler is installed - mach_port_t handler_port_; - - // These variables save the previous exception handler's data so that it - // can be re-installed when this handler is uninstalled - ExceptionParameters *previous_; - - // True, if we've installed the exception handler - bool installed_exception_handler_; - - // True, if we're in the process of uninstalling the exception handler and - // the thread. - bool is_in_teardown_; - - // Save the last result of the last minidump - bool last_minidump_write_result_; - - // A mutex for use when writing out a minidump that was requested on a - // thread other than the exception handler. - pthread_mutex_t minidump_write_mutex_; - - // True, if we're using the mutext to indicate when mindump writing occurs - bool use_minidump_write_mutex_; - - // Old signal handler for SIGABRT. Used to be able to restore it when - // uninstalling. - scoped_ptr old_handler_; - -#if !TARGET_OS_IPHONE - // Client for out-of-process dump generation. - scoped_ptr crash_generation_client_; -#endif -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h b/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h deleted file mode 100644 index 9e9028b928d835..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/mach_vm_compat.h +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright (c) 2011, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ -#define CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ - -#include - -// On iOS 5 and higher, mach/mach_vm.h is not supported. Use the corresponding -// vm_map functions instead. -#if TARGET_OS_IPHONE -#include -#define mach_vm_address_t vm_address_t -#define mach_vm_deallocate vm_deallocate -#define mach_vm_read vm_read -#define mach_vm_region_recurse vm_region_recurse_64 -#define mach_vm_size_t vm_size_t -#else -#include -#endif // TARGET_OS_IPHONE - -#endif // CLIENT_MAC_GENERATOR_MACH_VM_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc deleted file mode 100644 index 7d6e81dbb86439..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.cc +++ /dev/null @@ -1,1591 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "client/mac/handler/minidump_generator.h" - -#if defined(HAS_ARM_SUPPORT) || defined(HAS_ARM64_SUPPORT) -#include -#endif -#ifdef HAS_PPC_SUPPORT -#include -#endif -#ifdef HAS_X86_SUPPORT -#include -#endif - -#include "client/minidump_file_writer-inl.h" -#include "common/mac/file_id.h" -#include "common/mac/macho_id.h" -#include "common/mac/string_utilities.h" - -using MacStringUtils::ConvertToString; -using MacStringUtils::IntegerValueAtIndex; - -namespace google_breakpad { - -#if defined(__LP64__) && __LP64__ -#define LC_SEGMENT_ARCH LC_SEGMENT_64 -#else -#define LC_SEGMENT_ARCH LC_SEGMENT -#endif - -// constructor when generating from within the crashed process -MinidumpGenerator::MinidumpGenerator() - : writer_(), - exception_type_(0), - exception_code_(0), - exception_subcode_(0), - exception_thread_(0), - crashing_task_(mach_task_self()), - handler_thread_(mach_thread_self()), - cpu_type_(DynamicImages::GetNativeCPUType()), - task_context_(NULL), - dynamic_images_(NULL), - memory_blocks_(&allocator_) { - GatherSystemInformation(); -} - -// constructor when generating from a different process than the -// crashed process -MinidumpGenerator::MinidumpGenerator(mach_port_t crashing_task, - mach_port_t handler_thread) - : writer_(), - exception_type_(0), - exception_code_(0), - exception_subcode_(0), - exception_thread_(0), - crashing_task_(crashing_task), - handler_thread_(handler_thread), - cpu_type_(DynamicImages::GetNativeCPUType()), - task_context_(NULL), - dynamic_images_(NULL), - memory_blocks_(&allocator_) { - if (crashing_task != mach_task_self()) { - dynamic_images_ = new DynamicImages(crashing_task_); - cpu_type_ = dynamic_images_->GetCPUType(); - } else { - dynamic_images_ = NULL; - cpu_type_ = DynamicImages::GetNativeCPUType(); - } - - GatherSystemInformation(); -} - -MinidumpGenerator::~MinidumpGenerator() { - delete dynamic_images_; -} - -char MinidumpGenerator::build_string_[16]; -int MinidumpGenerator::os_major_version_ = 0; -int MinidumpGenerator::os_minor_version_ = 0; -int MinidumpGenerator::os_build_number_ = 0; - -// static -void MinidumpGenerator::GatherSystemInformation() { - // If this is non-zero, then we've already gathered the information - if (os_major_version_) - return; - - // This code extracts the version and build information from the OS - CFStringRef vers_path = - CFSTR("/System/Library/CoreServices/SystemVersion.plist"); - CFURLRef sys_vers = - CFURLCreateWithFileSystemPath(NULL, - vers_path, - kCFURLPOSIXPathStyle, - false); - CFReadStreamRef read_stream = CFReadStreamCreateWithFile(NULL, sys_vers); - CFRelease(sys_vers); - if (!read_stream) { - return; - } - if (!CFReadStreamOpen(read_stream)) { - CFRelease(read_stream); - return; - } - CFDataRef data = NULL; - CFIndex num_bytes_read = 0; - const UInt8 *data_bytes = - CFReadStreamGetBuffer(read_stream, 0, &num_bytes_read); - if (data_bytes) { - data = CFDataCreate(NULL, data_bytes, num_bytes_read); - } - CFReadStreamClose(read_stream); - CFRelease(read_stream); - if (!data) { - return; - } - CFDictionaryRef list = static_cast - (CFPropertyListCreateFromXMLData(NULL, data, kCFPropertyListImmutable, - NULL)); - CFRelease(data); - if (!list) { - return; - } - CFStringRef build_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductBuildVersion"))); - CFStringRef product_version = static_cast - (CFDictionaryGetValue(list, CFSTR("ProductVersion"))); - string build_str = ConvertToString(build_version); - string product_str = ConvertToString(product_version); - - CFRelease(list); - - strlcpy(build_string_, build_str.c_str(), sizeof(build_string_)); - - // Parse the string that looks like "10.4.8" - os_major_version_ = IntegerValueAtIndex(product_str, 0); - os_minor_version_ = IntegerValueAtIndex(product_str, 1); - os_build_number_ = IntegerValueAtIndex(product_str, 2); -} - -void MinidumpGenerator::SetTaskContext(breakpad_ucontext_t *task_context) { - task_context_ = task_context; -} - -string MinidumpGenerator::UniqueNameInDirectory(const string &dir, - string *unique_name) { - CFUUIDRef uuid = CFUUIDCreate(NULL); - CFStringRef uuid_cfstr = CFUUIDCreateString(NULL, uuid); - CFRelease(uuid); - string file_name(ConvertToString(uuid_cfstr)); - CFRelease(uuid_cfstr); - string path(dir); - - // Ensure that the directory (if non-empty) has a trailing slash so that - // we can append the file name and have a valid pathname. - if (!dir.empty()) { - if (dir.at(dir.size() - 1) != '/') - path.append(1, '/'); - } - - path.append(file_name); - path.append(".dmp"); - - if (unique_name) - *unique_name = file_name; - - return path; -} - -bool MinidumpGenerator::Write(const char *path) { - WriteStreamFN writers[] = { - &MinidumpGenerator::WriteThreadListStream, - &MinidumpGenerator::WriteMemoryListStream, - &MinidumpGenerator::WriteSystemInfoStream, - &MinidumpGenerator::WriteModuleListStream, - &MinidumpGenerator::WriteMiscInfoStream, - &MinidumpGenerator::WriteBreakpadInfoStream, - // Exception stream needs to be the last entry in this array as it may - // be omitted in the case where the minidump is written without an - // exception. - &MinidumpGenerator::WriteExceptionStream, - }; - bool result = false; - - // If opening was successful, create the header, directory, and call each - // writer. The destructor for the TypedMDRVAs will cause the data to be - // flushed. The destructor for the MinidumpFileWriter will close the file. - if (writer_.Open(path)) { - TypedMDRVA header(&writer_); - TypedMDRVA dir(&writer_); - - if (!header.Allocate()) - return false; - - int writer_count = static_cast(sizeof(writers) / sizeof(writers[0])); - - // If we don't have exception information, don't write out the - // exception stream - if (!exception_thread_ && !exception_type_) - --writer_count; - - // Add space for all writers - if (!dir.AllocateArray(writer_count)) - return false; - - MDRawHeader *header_ptr = header.get(); - header_ptr->signature = MD_HEADER_SIGNATURE; - header_ptr->version = MD_HEADER_VERSION; - time(reinterpret_cast(&(header_ptr->time_date_stamp))); - header_ptr->stream_count = writer_count; - header_ptr->stream_directory_rva = dir.position(); - - MDRawDirectory local_dir; - result = true; - for (int i = 0; (result) && (i < writer_count); ++i) { - result = (this->*writers[i])(&local_dir); - - if (result) - dir.CopyIndex(i, &local_dir); - } - } - return result; -} - -size_t MinidumpGenerator::CalculateStackSize(mach_vm_address_t start_addr) { - mach_vm_address_t stack_region_base = start_addr; - mach_vm_size_t stack_region_size; - natural_t nesting_level = 0; - vm_region_submap_info_64 submap_info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - - vm_region_recurse_info_t region_info; - region_info = reinterpret_cast(&submap_info); - - if (start_addr == 0) { - return 0; - } - - kern_return_t result = - mach_vm_region_recurse(crashing_task_, &stack_region_base, - &stack_region_size, &nesting_level, - region_info, &info_count); - - if (result != KERN_SUCCESS || start_addr < stack_region_base) { - // Failure or stack corruption, since mach_vm_region had to go - // higher in the process address space to find a valid region. - return 0; - } - - unsigned int tag = submap_info.user_tag; - - // If the user tag is VM_MEMORY_STACK, look for more readable regions with - // the same tag placed immediately above the computed stack region. Under - // some circumstances, the stack for thread 0 winds up broken up into - // multiple distinct abutting regions. This can happen for several reasons, - // including user code that calls setrlimit(RLIMIT_STACK, ...) or changes - // the access on stack pages by calling mprotect. - if (tag == VM_MEMORY_STACK) { - while (true) { - mach_vm_address_t next_region_base = stack_region_base + - stack_region_size; - mach_vm_address_t proposed_next_region_base = next_region_base; - mach_vm_size_t next_region_size; - nesting_level = 0; - info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - result = mach_vm_region_recurse(crashing_task_, &next_region_base, - &next_region_size, &nesting_level, - region_info, &info_count); - if (result != KERN_SUCCESS || - next_region_base != proposed_next_region_base || - submap_info.user_tag != tag || - (submap_info.protection & VM_PROT_READ) == 0) { - break; - } - - stack_region_size += next_region_size; - } - } - - return stack_region_base + stack_region_size - start_addr; -} - -bool MinidumpGenerator::WriteStackFromStartAddress( - mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location) { - UntypedMDRVA memory(&writer_); - - bool result = false; - size_t size = CalculateStackSize(start_addr); - - if (size == 0) { - // In some situations the stack address for the thread can come back 0. - // In these cases we skip over the threads in question and stuff the - // stack with a clearly borked value. - start_addr = 0xDEADBEEF; - size = 16; - if (!memory.Allocate(size)) - return false; - - unsigned long long dummy_stack[2]; // Fill dummy stack with 16 bytes of - // junk. - dummy_stack[0] = 0xDEADBEEF; - dummy_stack[1] = 0xDEADBEEF; - - result = memory.Copy(dummy_stack, size); - } else { - - if (!memory.Allocate(size)) - return false; - - if (dynamic_images_) { - vector stack_memory; - if (ReadTaskMemory(crashing_task_, - start_addr, - size, - stack_memory) != KERN_SUCCESS) { - return false; - } - - result = memory.Copy(&stack_memory[0], size); - } else { - result = memory.Copy(reinterpret_cast(start_addr), size); - } - } - - stack_location->start_of_memory_range = start_addr; - stack_location->memory = memory.location(); - - return result; -} - -bool MinidumpGenerator::WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - return WriteStackARM(state, stack_location); -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: - return WriteStackARM64(state, stack_location); -#endif -#ifdef HAS_PPC_SUPPORT - case CPU_TYPE_POWERPC: - return WriteStackPPC(state, stack_location); - case CPU_TYPE_POWERPC64: - return WriteStackPPC64(state, stack_location); -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - return WriteStackX86(state, stack_location); - case CPU_TYPE_X86_64: - return WriteStackX86_64(state, stack_location); -#endif - default: - return false; - } -} - -bool MinidumpGenerator::WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - return WriteContextARM(state, register_location); -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: - return WriteContextARM64(state, register_location); -#endif -#ifdef HAS_PPC_SUPPORT - case CPU_TYPE_POWERPC: - return WriteContextPPC(state, register_location); - case CPU_TYPE_POWERPC64: - return WriteContextPPC64(state, register_location); -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - return WriteContextX86(state, register_location); - case CPU_TYPE_X86_64: - return WriteContextX86_64(state, register_location); -#endif - default: - return false; - } -} - -uint64_t MinidumpGenerator::CurrentPCForStack( - breakpad_thread_state_data_t state) { - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - return CurrentPCForStackARM(state); -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: - return CurrentPCForStackARM64(state); -#endif -#ifdef HAS_PPC_SUPPORT - case CPU_TYPE_POWERPC: - return CurrentPCForStackPPC(state); - case CPU_TYPE_POWERPC64: - return CurrentPCForStackPPC64(state); -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - return CurrentPCForStackX86(state); - case CPU_TYPE_X86_64: - return CurrentPCForStackX86_64(state); -#endif - default: - assert(0 && "Unknown CPU type!"); - return 0; - } -} - -#ifdef HAS_ARM_SUPPORT -bool MinidumpGenerator::WriteStackARM(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - arm_thread_state_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, sp); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackARM(breakpad_thread_state_data_t state) { - arm_thread_state_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, pc); -} - -bool MinidumpGenerator::WriteContextARM(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - arm_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextARM *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_ARM_FULL; - -#define AddGPR(a) context_ptr->iregs[a] = REGISTER_FROM_THREADSTATE(machine_state, r[a]) - - context_ptr->iregs[13] = REGISTER_FROM_THREADSTATE(machine_state, sp); - context_ptr->iregs[14] = REGISTER_FROM_THREADSTATE(machine_state, lr); - context_ptr->iregs[15] = REGISTER_FROM_THREADSTATE(machine_state, pc); - context_ptr->cpsr = REGISTER_FROM_THREADSTATE(machine_state, cpsr); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); -#undef AddGPR - - return true; -} -#endif - -#ifdef HAS_ARM64_SUPPORT -bool MinidumpGenerator::WriteStackARM64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - arm_thread_state64_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, sp); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackARM64(breakpad_thread_state_data_t state) { - arm_thread_state64_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, pc); -} - -bool -MinidumpGenerator::WriteContextARM64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - arm_thread_state64_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextARM64 *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_ARM64_FULL; - -#define AddGPR(a) context_ptr->iregs[a] = \ - REGISTER_FROM_THREADSTATE(machine_state, x[a]) - - context_ptr->iregs[29] = REGISTER_FROM_THREADSTATE(machine_state, fp); - context_ptr->iregs[30] = REGISTER_FROM_THREADSTATE(machine_state, lr); - context_ptr->iregs[31] = REGISTER_FROM_THREADSTATE(machine_state, sp); - context_ptr->iregs[32] = REGISTER_FROM_THREADSTATE(machine_state, pc); - context_ptr->cpsr = REGISTER_FROM_THREADSTATE(machine_state, cpsr); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); -#undef AddGPR - - return true; -} -#endif - -#ifdef HAS_PCC_SUPPORT -bool MinidumpGenerator::WriteStackPPC(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -bool MinidumpGenerator::WriteStackPPC64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, r1); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackPPC(breakpad_thread_state_data_t state) { - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, srr0); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackPPC64(breakpad_thread_state_data_t state) { - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, srr0); -} - -bool MinidumpGenerator::WriteContextPPC(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - ppc_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextPPC *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_PPC_BASE; - -#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, a)) -#define AddGPR(a) context_ptr->gpr[a] = \ - static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, r ## a) - - AddReg(srr0); - AddReg(cr); - AddReg(xer); - AddReg(ctr); - AddReg(lr); - AddReg(vrsave); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); - AddGPR(29); - AddGPR(30); - AddGPR(31); - AddReg(mq); -#undef AddReg -#undef AddGPR - - return true; -} - -bool MinidumpGenerator::WriteContextPPC64( - breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - ppc_thread_state64_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextPPC64 *context_ptr = context.get(); - context_ptr->context_flags = MD_CONTEXT_PPC_BASE; - -#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, a)) -#define AddGPR(a) context_ptr->gpr[a] = \ - static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, r ## a) - - AddReg(srr0); - AddReg(cr); - AddReg(xer); - AddReg(ctr); - AddReg(lr); - AddReg(vrsave); - - AddGPR(0); - AddGPR(1); - AddGPR(2); - AddGPR(3); - AddGPR(4); - AddGPR(5); - AddGPR(6); - AddGPR(7); - AddGPR(8); - AddGPR(9); - AddGPR(10); - AddGPR(11); - AddGPR(12); - AddGPR(13); - AddGPR(14); - AddGPR(15); - AddGPR(16); - AddGPR(17); - AddGPR(18); - AddGPR(19); - AddGPR(20); - AddGPR(21); - AddGPR(22); - AddGPR(23); - AddGPR(24); - AddGPR(25); - AddGPR(26); - AddGPR(27); - AddGPR(28); - AddGPR(29); - AddGPR(30); - AddGPR(31); -#undef AddReg -#undef AddGPR - - return true; -} - -#endif - -#ifdef HAS_X86_SUPPORT -bool MinidumpGenerator::WriteStackX86(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - mach_vm_address_t start_addr = REGISTER_FROM_THREADSTATE(machine_state, esp); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -bool MinidumpGenerator::WriteStackX86_64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location) { - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - mach_vm_address_t start_addr = static_cast( - REGISTER_FROM_THREADSTATE(machine_state, rsp)); - return WriteStackFromStartAddress(start_addr, stack_location); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackX86(breakpad_thread_state_data_t state) { - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, eip); -} - -uint64_t -MinidumpGenerator::CurrentPCForStackX86_64(breakpad_thread_state_data_t state) { - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - return REGISTER_FROM_THREADSTATE(machine_state, rip); -} - -bool MinidumpGenerator::WriteContextX86(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) -{ - TypedMDRVA context(&writer_); - i386_thread_state_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextX86 *context_ptr = context.get(); - -#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, a)) - - context_ptr->context_flags = MD_CONTEXT_X86; - AddReg(eax); - AddReg(ebx); - AddReg(ecx); - AddReg(edx); - AddReg(esi); - AddReg(edi); - AddReg(ebp); - AddReg(esp); - - AddReg(cs); - AddReg(ds); - AddReg(ss); - AddReg(es); - AddReg(fs); - AddReg(gs); - AddReg(eflags); - - AddReg(eip); -#undef AddReg - - return true; -} - -bool MinidumpGenerator::WriteContextX86_64( - breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location) { - TypedMDRVA context(&writer_); - x86_thread_state64_t *machine_state = - reinterpret_cast(state); - - if (!context.Allocate()) - return false; - - *register_location = context.location(); - MDRawContextAMD64 *context_ptr = context.get(); - -#define AddReg(a) context_ptr->a = static_cast<__typeof__(context_ptr->a)>( \ - REGISTER_FROM_THREADSTATE(machine_state, a)) - - context_ptr->context_flags = MD_CONTEXT_AMD64; - AddReg(rax); - AddReg(rbx); - AddReg(rcx); - AddReg(rdx); - AddReg(rdi); - AddReg(rsi); - AddReg(rbp); - AddReg(rsp); - AddReg(r8); - AddReg(r9); - AddReg(r10); - AddReg(r11); - AddReg(r12); - AddReg(r13); - AddReg(r14); - AddReg(r15); - AddReg(rip); - // according to AMD's software developer guide, bits above 18 are - // not used in the flags register. Since the minidump format - // specifies 32 bits for the flags register, we can truncate safely - // with no loss. - context_ptr->eflags = static_cast(REGISTER_FROM_THREADSTATE(machine_state, rflags)); - AddReg(cs); - AddReg(fs); - AddReg(gs); -#undef AddReg - - return true; -} -#endif - -bool MinidumpGenerator::GetThreadState(thread_act_t target_thread, - thread_state_t state, - mach_msg_type_number_t *count) { - if (task_context_ && target_thread == mach_thread_self()) { - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - size_t final_size = - std::min(static_cast(*count), sizeof(arm_thread_state_t)); - memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); - *count = static_cast(final_size); - return true; -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: { - size_t final_size = - std::min(static_cast(*count), sizeof(arm_thread_state64_t)); - memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); - *count = static_cast(final_size); - return true; - } -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - case CPU_TYPE_X86_64: { - size_t state_size = cpu_type_ == CPU_TYPE_I386 ? - sizeof(i386_thread_state_t) : sizeof(x86_thread_state64_t); - size_t final_size = - std::min(static_cast(*count), state_size); - memcpy(state, &task_context_->breakpad_uc_mcontext->__ss, final_size); - *count = static_cast(final_size); - return true; - } -#endif - } - } - - thread_state_flavor_t flavor; - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - flavor = ARM_THREAD_STATE; - break; -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: - flavor = ARM_THREAD_STATE64; - break; -#endif -#ifdef HAS_PPC_SUPPORT - case CPU_TYPE_POWERPC: - flavor = PPC_THREAD_STATE; - break; - case CPU_TYPE_POWERPC64: - flavor = PPC_THREAD_STATE64; - break; -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - flavor = i386_THREAD_STATE; - break; - case CPU_TYPE_X86_64: - flavor = x86_THREAD_STATE64; - break; -#endif - default: - return false; - } - return thread_get_state(target_thread, flavor, - state, count) == KERN_SUCCESS; -} - -bool MinidumpGenerator::WriteThreadStream(mach_port_t thread_id, - MDRawThread *thread) { - breakpad_thread_state_data_t state; - mach_msg_type_number_t state_count - = static_cast(sizeof(state)); - - if (GetThreadState(thread_id, state, &state_count)) { - if (!WriteStack(state, &thread->stack)) - return false; - - memory_blocks_.push_back(thread->stack); - - if (!WriteContext(state, &thread->thread_context)) - return false; - - thread->thread_id = thread_id; - } else { - return false; - } - - return true; -} - -bool MinidumpGenerator::WriteThreadListStream( - MDRawDirectory *thread_list_stream) { - TypedMDRVA list(&writer_); - thread_act_port_array_t threads_for_task; - mach_msg_type_number_t thread_count; - int non_generator_thread_count; - - if (task_threads(crashing_task_, &threads_for_task, &thread_count)) - return false; - - // Don't include the generator thread - if (handler_thread_ != MACH_PORT_NULL) - non_generator_thread_count = thread_count - 1; - else - non_generator_thread_count = thread_count; - if (!list.AllocateObjectAndArray(non_generator_thread_count, - sizeof(MDRawThread))) - return false; - - thread_list_stream->stream_type = MD_THREAD_LIST_STREAM; - thread_list_stream->location = list.location(); - - list.get()->number_of_threads = non_generator_thread_count; - - MDRawThread thread; - int thread_idx = 0; - - for (unsigned int i = 0; i < thread_count; ++i) { - memset(&thread, 0, sizeof(MDRawThread)); - - if (threads_for_task[i] != handler_thread_) { - if (!WriteThreadStream(threads_for_task[i], &thread)) - return false; - - list.CopyIndexAfterObject(thread_idx++, &thread, sizeof(MDRawThread)); - } - } - - return true; -} - -bool MinidumpGenerator::WriteMemoryListStream( - MDRawDirectory *memory_list_stream) { - TypedMDRVA list(&writer_); - - // If the dump has an exception, include some memory around the - // instruction pointer. - const size_t kIPMemorySize = 256; // bytes - bool have_ip_memory = false; - MDMemoryDescriptor ip_memory_d; - if (exception_thread_ && exception_type_) { - breakpad_thread_state_data_t state; - mach_msg_type_number_t stateCount - = static_cast(sizeof(state)); - - if (GetThreadState(exception_thread_, state, &stateCount)) { - uint64_t ip = CurrentPCForStack(state); - // Bound it to the upper and lower bounds of the region - // it's contained within. If it's not in a known memory region, - // don't bother trying to write it. - mach_vm_address_t addr = static_cast(ip); - mach_vm_size_t size; - natural_t nesting_level = 0; - vm_region_submap_info_64 info; - mach_msg_type_number_t info_count = VM_REGION_SUBMAP_INFO_COUNT_64; - vm_region_recurse_info_t recurse_info; - recurse_info = reinterpret_cast(&info); - - kern_return_t ret = - mach_vm_region_recurse(crashing_task_, - &addr, - &size, - &nesting_level, - recurse_info, - &info_count); - if (ret == KERN_SUCCESS && ip >= addr && ip < (addr + size)) { - // Try to get 128 bytes before and after the IP, but - // settle for whatever's available. - ip_memory_d.start_of_memory_range = - std::max(uintptr_t(addr), - uintptr_t(ip - (kIPMemorySize / 2))); - uintptr_t end_of_range = - std::min(uintptr_t(ip + (kIPMemorySize / 2)), - uintptr_t(addr + size)); - uintptr_t range_diff = end_of_range - - static_cast(ip_memory_d.start_of_memory_range); - ip_memory_d.memory.data_size = static_cast(range_diff); - have_ip_memory = true; - // This needs to get appended to the list even though - // the memory bytes aren't filled in yet so the entire - // list can be written first. The memory bytes will get filled - // in after the memory list is written. - memory_blocks_.push_back(ip_memory_d); - } - } - } - - // Now fill in the memory list and write it. - size_t memory_count = memory_blocks_.size(); - if (!list.AllocateObjectAndArray(memory_count, - sizeof(MDMemoryDescriptor))) - return false; - - memory_list_stream->stream_type = MD_MEMORY_LIST_STREAM; - memory_list_stream->location = list.location(); - - list.get()->number_of_memory_ranges = static_cast(memory_count); - - unsigned int i; - for (i = 0; i < memory_count; ++i) { - list.CopyIndexAfterObject(i, &memory_blocks_[i], - sizeof(MDMemoryDescriptor)); - } - - if (have_ip_memory) { - // Now read the memory around the instruction pointer. - UntypedMDRVA ip_memory(&writer_); - if (!ip_memory.Allocate(ip_memory_d.memory.data_size)) - return false; - - if (dynamic_images_) { - // Out-of-process. - vector memory; - if (ReadTaskMemory(crashing_task_, - ip_memory_d.start_of_memory_range, - ip_memory_d.memory.data_size, - memory) != KERN_SUCCESS) { - return false; - } - - ip_memory.Copy(&memory[0], ip_memory_d.memory.data_size); - } else { - // In-process, just copy from local memory. - ip_memory.Copy( - reinterpret_cast(ip_memory_d.start_of_memory_range), - ip_memory_d.memory.data_size); - } - - ip_memory_d.memory = ip_memory.location(); - // Write this again now that the data location is filled in. - list.CopyIndexAfterObject(i - 1, &ip_memory_d, - sizeof(MDMemoryDescriptor)); - } - - return true; -} - -bool -MinidumpGenerator::WriteExceptionStream(MDRawDirectory *exception_stream) { - TypedMDRVA exception(&writer_); - - if (!exception.Allocate()) - return false; - - exception_stream->stream_type = MD_EXCEPTION_STREAM; - exception_stream->location = exception.location(); - MDRawExceptionStream *exception_ptr = exception.get(); - exception_ptr->thread_id = exception_thread_; - - // This naming is confusing, but it is the proper translation from - // mach naming to minidump naming. - exception_ptr->exception_record.exception_code = exception_type_; - exception_ptr->exception_record.exception_flags = exception_code_; - - breakpad_thread_state_data_t state; - mach_msg_type_number_t state_count - = static_cast(sizeof(state)); - - if (!GetThreadState(exception_thread_, state, &state_count)) - return false; - - if (!WriteContext(state, &exception_ptr->thread_context)) - return false; - - if (exception_type_ == EXC_BAD_ACCESS) - exception_ptr->exception_record.exception_address = exception_subcode_; - else - exception_ptr->exception_record.exception_address = CurrentPCForStack(state); - - return true; -} - -bool MinidumpGenerator::WriteSystemInfoStream( - MDRawDirectory *system_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - system_info_stream->stream_type = MD_SYSTEM_INFO_STREAM; - system_info_stream->location = info.location(); - - // CPU Information - uint32_t number_of_processors; - size_t len = sizeof(number_of_processors); - sysctlbyname("hw.ncpu", &number_of_processors, &len, NULL, 0); - MDRawSystemInfo *info_ptr = info.get(); - - switch (cpu_type_) { -#ifdef HAS_ARM_SUPPORT - case CPU_TYPE_ARM: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_ARM; - break; -#endif -#ifdef HAS_ARM64_SUPPORT - case CPU_TYPE_ARM64: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_ARM64; - break; -#endif -#ifdef HAS_PPC_SUPPORT - case CPU_TYPE_POWERPC: - case CPU_TYPE_POWERPC64: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_PPC; - break; -#endif -#ifdef HAS_X86_SUPPORT - case CPU_TYPE_I386: - case CPU_TYPE_X86_64: - if (cpu_type_ == CPU_TYPE_I386) - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_X86; - else - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_AMD64; -#ifdef __i386__ - // ebx is used for PIC code, so we need - // to preserve it. -#define cpuid(op,eax,ebx,ecx,edx) \ - asm ("pushl %%ebx \n\t" \ - "cpuid \n\t" \ - "movl %%ebx,%1 \n\t" \ - "popl %%ebx" \ - : "=a" (eax), \ - "=g" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "0" (op)) -#elif defined(__x86_64__) - -#define cpuid(op,eax,ebx,ecx,edx) \ - asm ("cpuid \n\t" \ - : "=a" (eax), \ - "=b" (ebx), \ - "=c" (ecx), \ - "=d" (edx) \ - : "0" (op)) -#endif - -#if defined(__i386__) || defined(__x86_64__) - int unused, unused2; - // get vendor id - cpuid(0, unused, info_ptr->cpu.x86_cpu_info.vendor_id[0], - info_ptr->cpu.x86_cpu_info.vendor_id[2], - info_ptr->cpu.x86_cpu_info.vendor_id[1]); - // get version and feature info - cpuid(1, info_ptr->cpu.x86_cpu_info.version_information, unused, unused2, - info_ptr->cpu.x86_cpu_info.feature_information); - - // family - info_ptr->processor_level = - (info_ptr->cpu.x86_cpu_info.version_information & 0xF00) >> 8; - // 0xMMSS (Model, Stepping) - info_ptr->processor_revision = static_cast( - (info_ptr->cpu.x86_cpu_info.version_information & 0xF) | - ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0) << 4)); - - // decode extended model info - if (info_ptr->processor_level == 0xF || - info_ptr->processor_level == 0x6) { - info_ptr->processor_revision |= - ((info_ptr->cpu.x86_cpu_info.version_information & 0xF0000) >> 4); - } - - // decode extended family info - if (info_ptr->processor_level == 0xF) { - info_ptr->processor_level += - ((info_ptr->cpu.x86_cpu_info.version_information & 0xFF00000) >> 20); - } - -#endif // __i386__ || __x86_64_ - break; -#endif // HAS_X86_SUPPORT - default: - info_ptr->processor_architecture = MD_CPU_ARCHITECTURE_UNKNOWN; - break; - } - - info_ptr->number_of_processors = static_cast(number_of_processors); -#if TARGET_OS_IPHONE - info_ptr->platform_id = MD_OS_IOS; -#else - info_ptr->platform_id = MD_OS_MAC_OS_X; -#endif // TARGET_OS_IPHONE - - MDLocationDescriptor build_string_loc; - - if (!writer_.WriteString(build_string_, 0, - &build_string_loc)) - return false; - - info_ptr->csd_version_rva = build_string_loc.rva; - info_ptr->major_version = os_major_version_; - info_ptr->minor_version = os_minor_version_; - info_ptr->build_number = os_build_number_; - - return true; -} - -bool MinidumpGenerator::WriteModuleStream(unsigned int index, - MDRawModule *module) { - if (dynamic_images_) { - // we're in a different process than the crashed process - DynamicImage *image = dynamic_images_->GetImage(index); - - if (!image) - return false; - - memset(module, 0, sizeof(MDRawModule)); - - MDLocationDescriptor string_location; - - string name = image->GetFilePath(); - if (!writer_.WriteString(name.c_str(), 0, &string_location)) - return false; - - module->base_of_image = image->GetVMAddr() + image->GetVMAddrSlide(); - module->size_of_image = static_cast(image->GetVMSize()); - module->module_name_rva = string_location.rva; - - // We'll skip the executable module, because they don't have - // LC_ID_DYLIB load commands, and the crash processing server gets - // version information from the Plist file, anyway. - if (index != static_cast(FindExecutableModule())) { - module->version_info.signature = MD_VSFIXEDFILEINFO_SIGNATURE; - module->version_info.struct_version |= MD_VSFIXEDFILEINFO_VERSION; - // Convert MAC dylib version format, which is a 32 bit number, to the - // format used by minidump. The mac format is <16 bits>.<8 bits>.<8 bits> - // so it fits nicely into the windows version with some massaging - // The mapping is: - // 1) upper 16 bits of MAC version go to lower 16 bits of product HI - // 2) Next most significant 8 bits go to upper 16 bits of product LO - // 3) Least significant 8 bits go to lower 16 bits of product LO - uint32_t modVersion = image->GetVersion(); - module->version_info.file_version_hi = 0; - module->version_info.file_version_hi = modVersion >> 16; - module->version_info.file_version_lo |= (modVersion & 0xff00) << 8; - module->version_info.file_version_lo |= (modVersion & 0xff); - } - - if (!WriteCVRecord(module, image->GetCPUType(), name.c_str(), false)) { - return false; - } - } else { - // Getting module info in the crashed process - const breakpad_mach_header *header; - header = (breakpad_mach_header*)_dyld_get_image_header(index); - if (!header) - return false; - -#ifdef __LP64__ - assert(header->magic == MH_MAGIC_64); - - if(header->magic != MH_MAGIC_64) - return false; -#else - assert(header->magic == MH_MAGIC); - - if(header->magic != MH_MAGIC) - return false; -#endif - - int cpu_type = header->cputype; - unsigned long slide = _dyld_get_image_vmaddr_slide(index); - const char* name = _dyld_get_image_name(index); - const struct load_command *cmd = - reinterpret_cast(header + 1); - - memset(module, 0, sizeof(MDRawModule)); - - for (unsigned int i = 0; cmd && (i < header->ncmds); i++) { - if (cmd->cmd == LC_SEGMENT_ARCH) { - - const breakpad_mach_segment_command *seg = - reinterpret_cast(cmd); - - if (!strcmp(seg->segname, "__TEXT")) { - MDLocationDescriptor string_location; - - if (!writer_.WriteString(name, 0, &string_location)) - return false; - - module->base_of_image = seg->vmaddr + slide; - module->size_of_image = static_cast(seg->vmsize); - module->module_name_rva = string_location.rva; - - bool in_memory = false; -#if TARGET_OS_IPHONE - in_memory = true; -#endif - if (!WriteCVRecord(module, cpu_type, name, in_memory)) - return false; - - return true; - } - } - - cmd = reinterpret_cast((char *)cmd + cmd->cmdsize); - } - } - - return true; -} - -int MinidumpGenerator::FindExecutableModule() { - if (dynamic_images_) { - int index = dynamic_images_->GetExecutableImageIndex(); - - if (index >= 0) { - return index; - } - } else { - int image_count = _dyld_image_count(); - const struct mach_header *header; - - for (int index = 0; index < image_count; ++index) { - header = _dyld_get_image_header(index); - - if (header->filetype == MH_EXECUTE) - return index; - } - } - - // failed - just use the first image - return 0; -} - -bool MinidumpGenerator::WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path, bool in_memory) { - TypedMDRVA cv(&writer_); - - // Only return the last path component of the full module path - const char *module_name = strrchr(module_path, '/'); - - // Increment past the slash - if (module_name) - ++module_name; - else - module_name = ""; - - size_t module_name_length = strlen(module_name); - - if (!cv.AllocateObjectAndArray(module_name_length + 1, sizeof(uint8_t))) - return false; - - if (!cv.CopyIndexAfterObject(0, module_name, module_name_length)) - return false; - - module->cv_record = cv.location(); - MDCVInfoPDB70 *cv_ptr = cv.get(); - cv_ptr->cv_signature = MD_CVINFOPDB70_SIGNATURE; - cv_ptr->age = 0; - - // Get the module identifier - unsigned char identifier[16]; - bool result = false; - if (in_memory) { - MacFileUtilities::MachoID macho(module_path, - reinterpret_cast(module->base_of_image), - static_cast(module->size_of_image)); - result = macho.UUIDCommand(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); - if (!result) - result = macho.MD5(cpu_type, CPU_SUBTYPE_MULTIPLE, identifier); - } - - if (!result) { - FileID file_id(module_path); - result = file_id.MachoIdentifier(cpu_type, CPU_SUBTYPE_MULTIPLE, - identifier); - } - - if (result) { - cv_ptr->signature.data1 = - static_cast(identifier[0]) << 24 | - static_cast(identifier[1]) << 16 | - static_cast(identifier[2]) << 8 | - static_cast(identifier[3]); - cv_ptr->signature.data2 = - static_cast(identifier[4] << 8) | identifier[5]; - cv_ptr->signature.data3 = - static_cast(identifier[6] << 8) | identifier[7]; - cv_ptr->signature.data4[0] = identifier[8]; - cv_ptr->signature.data4[1] = identifier[9]; - cv_ptr->signature.data4[2] = identifier[10]; - cv_ptr->signature.data4[3] = identifier[11]; - cv_ptr->signature.data4[4] = identifier[12]; - cv_ptr->signature.data4[5] = identifier[13]; - cv_ptr->signature.data4[6] = identifier[14]; - cv_ptr->signature.data4[7] = identifier[15]; - } - - return true; -} - -bool MinidumpGenerator::WriteModuleListStream( - MDRawDirectory *module_list_stream) { - TypedMDRVA list(&writer_); - - uint32_t image_count = dynamic_images_ ? - dynamic_images_->GetImageCount() : - _dyld_image_count(); - - if (!list.AllocateObjectAndArray(image_count, MD_MODULE_SIZE)) - return false; - - module_list_stream->stream_type = MD_MODULE_LIST_STREAM; - module_list_stream->location = list.location(); - list.get()->number_of_modules = static_cast(image_count); - - // Write out the executable module as the first one - MDRawModule module; - uint32_t executableIndex = FindExecutableModule(); - - if (!WriteModuleStream(static_cast(executableIndex), &module)) { - return false; - } - - list.CopyIndexAfterObject(0, &module, MD_MODULE_SIZE); - int destinationIndex = 1; // Write all other modules after this one - - for (uint32_t i = 0; i < image_count; ++i) { - if (i != executableIndex) { - if (!WriteModuleStream(static_cast(i), &module)) { - return false; - } - - list.CopyIndexAfterObject(destinationIndex++, &module, MD_MODULE_SIZE); - } - } - - return true; -} - -bool MinidumpGenerator::WriteMiscInfoStream(MDRawDirectory *misc_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - misc_info_stream->stream_type = MD_MISC_INFO_STREAM; - misc_info_stream->location = info.location(); - - MDRawMiscInfo *info_ptr = info.get(); - info_ptr->size_of_info = static_cast(sizeof(MDRawMiscInfo)); - info_ptr->flags1 = MD_MISCINFO_FLAGS1_PROCESS_ID | - MD_MISCINFO_FLAGS1_PROCESS_TIMES | - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO; - - // Process ID - info_ptr->process_id = getpid(); - - // Times - struct rusage usage; - if (getrusage(RUSAGE_SELF, &usage) != -1) { - // Omit the fractional time since the MDRawMiscInfo only wants seconds - info_ptr->process_user_time = - static_cast(usage.ru_utime.tv_sec); - info_ptr->process_kernel_time = - static_cast(usage.ru_stime.tv_sec); - } - int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, - static_cast(info_ptr->process_id) }; - uint mibsize = static_cast(sizeof(mib) / sizeof(mib[0])); - struct kinfo_proc proc; - size_t size = sizeof(proc); - if (sysctl(mib, mibsize, &proc, &size, NULL, 0) == 0) { - info_ptr->process_create_time = - static_cast(proc.kp_proc.p_starttime.tv_sec); - } - - // Speed - uint64_t speed; - const uint64_t kOneMillion = 1000 * 1000; - size = sizeof(speed); - sysctlbyname("hw.cpufrequency_max", &speed, &size, NULL, 0); - info_ptr->processor_max_mhz = static_cast(speed / kOneMillion); - info_ptr->processor_mhz_limit = static_cast(speed / kOneMillion); - size = sizeof(speed); - sysctlbyname("hw.cpufrequency", &speed, &size, NULL, 0); - info_ptr->processor_current_mhz = static_cast(speed / kOneMillion); - - return true; -} - -bool MinidumpGenerator::WriteBreakpadInfoStream( - MDRawDirectory *breakpad_info_stream) { - TypedMDRVA info(&writer_); - - if (!info.Allocate()) - return false; - - breakpad_info_stream->stream_type = MD_BREAKPAD_INFO_STREAM; - breakpad_info_stream->location = info.location(); - MDRawBreakpadInfo *info_ptr = info.get(); - - if (exception_thread_ && exception_type_) { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = exception_thread_; - } else { - info_ptr->validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID; - info_ptr->dump_thread_id = handler_thread_; - info_ptr->requesting_thread_id = 0; - } - - return true; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h b/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h deleted file mode 100644 index 4e4b4a68488332..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/minidump_generator.h +++ /dev/null @@ -1,236 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_generator.h: Create a minidump of the current MacOS process. - -#ifndef CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ -#define CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ - -#include -#include - -#include - -#include "client/mac/handler/ucontext_compat.h" -#include "client/minidump_file_writer.h" -#include "common/memory.h" -#include "common/mac/macho_utilities.h" -#include "google_breakpad/common/minidump_format.h" - -#include "dynamic_images.h" -#include "mach_vm_compat.h" - -#if !TARGET_OS_IPHONE && (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7) - #define HAS_PPC_SUPPORT -#endif -#if defined(__arm__) -#define HAS_ARM_SUPPORT -#elif defined(__aarch64__) -#define HAS_ARM64_SUPPORT -#elif defined(__i386__) || defined(__x86_64__) - #define HAS_X86_SUPPORT -#endif - -namespace google_breakpad { - -using std::string; - -// Use the REGISTER_FROM_THREADSTATE to access a register name from the -// breakpad_thread_state_t structure. -#if __DARWIN_UNIX03 || TARGET_CPU_X86_64 || TARGET_CPU_PPC64 || TARGET_CPU_ARM -// In The 10.5 SDK Headers Apple prepended __ to the variable names in the -// i386_thread_state_t structure. There's no good way to tell what version of -// the SDK we're compiling against so we just toggle on the same preprocessor -// symbol Apple's headers use. -#define REGISTER_FROM_THREADSTATE(a, b) ((a)->__ ## b) -#else -#define REGISTER_FROM_THREADSTATE(a, b) (a->b) -#endif - -// Creates a minidump file of the current process. If there is exception data, -// use SetExceptionInformation() to add this to the minidump. The minidump -// file is generated by the Write() function. -// Usage: -// MinidumpGenerator minidump(); -// minidump.Write("/tmp/minidump"); -// -class MinidumpGenerator { - public: - MinidumpGenerator(); - MinidumpGenerator(mach_port_t crashing_task, mach_port_t handler_thread); - - virtual ~MinidumpGenerator(); - - // Return /.dmp - // Sets |unique_name| (if requested) to the unique name for the minidump - static string UniqueNameInDirectory(const string &dir, string *unique_name); - - // Write out the minidump into |path| - // All of the components of |path| must exist and be writable - // Return true if successful, false otherwise - bool Write(const char *path); - - // Specify some exception information, if applicable - void SetExceptionInformation(int type, int code, int subcode, - mach_port_t thread_name) { - exception_type_ = type; - exception_code_ = code; - exception_subcode_ = subcode; - exception_thread_ = thread_name; - } - - // Specify the task context. If |task_context| is not NULL, it will be used - // to retrieve the context of the current thread, instead of using - // |thread_get_state|. - void SetTaskContext(breakpad_ucontext_t *task_context); - - // Gather system information. This should be call at least once before using - // the MinidumpGenerator class. - static void GatherSystemInformation(); - - protected: - // Overridable Stream writers - virtual bool WriteExceptionStream(MDRawDirectory *exception_stream); - - // Overridable Helper - virtual bool WriteThreadStream(mach_port_t thread_id, MDRawThread *thread); - - private: - typedef bool (MinidumpGenerator::*WriteStreamFN)(MDRawDirectory *); - - // Stream writers - bool WriteThreadListStream(MDRawDirectory *thread_list_stream); - bool WriteMemoryListStream(MDRawDirectory *memory_list_stream); - bool WriteSystemInfoStream(MDRawDirectory *system_info_stream); - bool WriteModuleListStream(MDRawDirectory *module_list_stream); - bool WriteMiscInfoStream(MDRawDirectory *misc_info_stream); - bool WriteBreakpadInfoStream(MDRawDirectory *breakpad_info_stream); - - // Helpers - uint64_t CurrentPCForStack(breakpad_thread_state_data_t state); - bool GetThreadState(thread_act_t target_thread, thread_state_t state, - mach_msg_type_number_t *count); - bool WriteStackFromStartAddress(mach_vm_address_t start_addr, - MDMemoryDescriptor *stack_location); - bool WriteStack(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContext(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - bool WriteCVRecord(MDRawModule *module, int cpu_type, - const char *module_path, bool in_memory); - bool WriteModuleStream(unsigned int index, MDRawModule *module); - size_t CalculateStackSize(mach_vm_address_t start_addr); - int FindExecutableModule(); - - // Per-CPU implementations of these methods -#ifdef HAS_ARM_SUPPORT - bool WriteStackARM(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextARM(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackARM(breakpad_thread_state_data_t state); -#endif -#ifdef HAS_ARM64_SUPPORT - bool WriteStackARM64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextARM64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackARM64(breakpad_thread_state_data_t state); -#endif -#ifdef HAS_PPC_SUPPORT - bool WriteStackPPC(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextPPC(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackPPC(breakpad_thread_state_data_t state); - bool WriteStackPPC64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextPPC64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackPPC64(breakpad_thread_state_data_t state); -#endif -#ifdef HAS_X86_SUPPORT - bool WriteStackX86(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextX86(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackX86(breakpad_thread_state_data_t state); - bool WriteStackX86_64(breakpad_thread_state_data_t state, - MDMemoryDescriptor *stack_location); - bool WriteContextX86_64(breakpad_thread_state_data_t state, - MDLocationDescriptor *register_location); - uint64_t CurrentPCForStackX86_64(breakpad_thread_state_data_t state); -#endif - - // disallow copy ctor and operator= - explicit MinidumpGenerator(const MinidumpGenerator &); - void operator=(const MinidumpGenerator &); - - protected: - // Use this writer to put the data to disk - MinidumpFileWriter writer_; - - private: - // Exception information - int exception_type_; - int exception_code_; - int exception_subcode_; - mach_port_t exception_thread_; - mach_port_t crashing_task_; - mach_port_t handler_thread_; - - // CPU type of the task being dumped. - cpu_type_t cpu_type_; - - // System information - static char build_string_[16]; - static int os_major_version_; - static int os_minor_version_; - static int os_build_number_; - - // Context of the task to dump. - breakpad_ucontext_t *task_context_; - - // Information about dynamically loaded code - DynamicImages *dynamic_images_; - - // PageAllocator makes it possible to allocate memory - // directly from the system, even while handling an exception. - mutable PageAllocator allocator_; - - protected: - // Blocks of memory written to the dump. These are all currently - // written while writing the thread list stream, but saved here - // so a memory list stream can be written afterwards. - wasteful_vector memory_blocks_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MAC_GENERATOR_MINIDUMP_GENERATOR_H__ diff --git a/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h b/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h deleted file mode 100644 index 1e4b752e514f17..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/mac/handler/ucontext_compat.h +++ /dev/null @@ -1,47 +0,0 @@ -// Copyright 2013 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ -#define CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ - -#include - -// The purpose of this file is to work around the fact that ucontext_t's -// uc_mcontext member is an mcontext_t rather than an mcontext64_t on ARM64. -#if defined(__aarch64__) -// doesn't include the below file. -#include -typedef ucontext64_t breakpad_ucontext_t; -#define breakpad_uc_mcontext uc_mcontext64 -#else -typedef ucontext_t breakpad_ucontext_t; -#define breakpad_uc_mcontext uc_mcontext -#endif // defined(__aarch64__) - -#endif // CLIENT_MAC_HANDLER_UCONTEXT_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h b/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h deleted file mode 100644 index 0e12e00b69e6be..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/minidump_file_writer-inl.h +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer-inl.h: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_INL_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_INL_H__ - -#include - -#include "client/minidump_file_writer.h" -#include "google_breakpad/common/minidump_size.h" - -namespace google_breakpad { - -template -inline bool TypedMDRVA::Allocate() { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size()); -} - -template -inline bool TypedMDRVA::Allocate(size_t additional) { - allocation_state_ = SINGLE_OBJECT; - return UntypedMDRVA::Allocate(minidump_size::size() + additional); -} - -template -inline bool TypedMDRVA::AllocateArray(size_t count) { - assert(count); - allocation_state_ = ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() * count); -} - -template -inline bool TypedMDRVA::AllocateObjectAndArray(size_t count, - size_t length) { - assert(count && length); - allocation_state_ = SINGLE_OBJECT_WITH_ARRAY; - return UntypedMDRVA::Allocate(minidump_size::size() + count * length); -} - -template -inline bool TypedMDRVA::CopyIndex(unsigned int index, MDType *item) { - assert(allocation_state_ == ARRAY); - return writer_->Copy( - static_cast(position_ + index * minidump_size::size()), - item, minidump_size::size()); -} - -template -inline bool TypedMDRVA::CopyIndexAfterObject(unsigned int index, - const void *src, - size_t length) { - assert(allocation_state_ == SINGLE_OBJECT_WITH_ARRAY); - return writer_->Copy( - static_cast(position_ + minidump_size::size() - + index * length), - src, length); -} - -template -inline bool TypedMDRVA::Flush() { - return writer_->Copy(position_, &data_, minidump_size::size()); -} - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_INL_H__ diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc deleted file mode 100644 index a1957f324a9c7f..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.cc +++ /dev/null @@ -1,350 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.cc: Minidump file writer implementation. -// -// See minidump_file_writer.h for documentation. - -#include -#include -#include -#include -#include - -#include "client/minidump_file_writer-inl.h" -#include "common/linux/linux_libc_support.h" -#include "common/string_conversion.h" -#if defined(__linux__) && __linux__ -#include "third_party/lss/linux_syscall_support.h" -#endif - -#if defined(__ANDROID__) -#include - -namespace { - -bool g_need_ftruncate_workaround = false; -bool g_checked_need_ftruncate_workaround = false; - -void CheckNeedsFTruncateWorkAround(int file) { - if (g_checked_need_ftruncate_workaround) { - return; - } - g_checked_need_ftruncate_workaround = true; - - // Attempt an idempotent truncate that chops off nothing and see if we - // run into any sort of errors. - off_t offset = sys_lseek(file, 0, SEEK_END); - if (offset == -1) { - // lseek failed. Don't apply work around. It's unlikely that we can write - // to a minidump with either method. - return; - } - - int result = ftruncate(file, offset); - if (result == -1 && errno == EACCES) { - // It very likely that we are running into the kernel bug in M devices. - // We are going to deploy the workaround for writing minidump files - // without uses of ftruncate(). This workaround should be fine even - // for kernels without the bug. - // See http://crbug.com/542840 for more details. - g_need_ftruncate_workaround = true; - } -} - -bool NeedsFTruncateWorkAround() { - return g_need_ftruncate_workaround; -} - -} // namespace -#endif // defined(__ANDROID__) - -namespace google_breakpad { - -const MDRVA MinidumpFileWriter::kInvalidMDRVA = static_cast(-1); - -MinidumpFileWriter::MinidumpFileWriter() - : file_(-1), - close_file_when_destroyed_(true), - position_(0), - size_(0) { -} - -MinidumpFileWriter::~MinidumpFileWriter() { - if (close_file_when_destroyed_) - Close(); -} - -bool MinidumpFileWriter::Open(const char *path) { - assert(file_ == -1); -#if defined(__linux__) && __linux__ - file_ = sys_open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); -#else - file_ = open(path, O_WRONLY | O_CREAT | O_EXCL, 0600); -#endif - - return file_ != -1; -} - -void MinidumpFileWriter::SetFile(const int file) { - assert(file_ == -1); - file_ = file; - close_file_when_destroyed_ = false; -#if defined(__ANDROID__) - CheckNeedsFTruncateWorkAround(file); -#endif -} - -bool MinidumpFileWriter::Close() { - bool result = true; - - if (file_ != -1) { -#if defined(__ANDROID__) - if (!NeedsFTruncateWorkAround() && ftruncate(file_, position_)) { - return false; - } -#else - if (ftruncate(file_, position_)) { - return false; - } -#endif -#if defined(__linux__) && __linux__ - result = (sys_close(file_) == 0); -#else - result = (close(file_) == 0); -#endif - file_ = -1; - } - - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const wchar_t *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - if (sizeof(wchar_t) == sizeof(uint16_t)) { - // Shortcut if wchar_t is the same size as MDString's buffer - result = mdstring->Copy(str, mdstring->get()->length); - } else { - uint16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - UTF32ToUTF16Char(*str, out); - if (!out[0]) - return false; - - // Process one character at a time - --length; - ++str; - - // Append the one or two UTF-16 characters. The first one will be non- - // zero, but the second one may be zero, depending on the conversion from - // UTF-32. - int out_count = out[1] ? 2 : 1; - size_t out_size = sizeof(uint16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - } - return result; -} - -bool MinidumpFileWriter::CopyStringToMDString(const char *str, - unsigned int length, - TypedMDRVA *mdstring) { - bool result = true; - uint16_t out[2]; - int out_idx = 0; - - // Copy the string character by character - while (length && result) { - int conversion_count = UTF8ToUTF16Char(str, length, out); - if (!conversion_count) - return false; - - // Move the pointer along based on the nubmer of converted characters - length -= conversion_count; - str += conversion_count; - - // Append the one or two UTF-16 characters - int out_count = out[1] ? 2 : 1; - size_t out_size = sizeof(uint16_t) * out_count; - result = mdstring->CopyIndexAfterObject(out_idx, out, out_size); - out_idx += out_count; - } - return result; -} - -template -bool MinidumpFileWriter::WriteStringCore(const CharType *str, - unsigned int length, - MDLocationDescriptor *location) { - assert(str); - assert(location); - // Calculate the mdstring length by either limiting to |length| as passed in - // or by finding the location of the NULL character. - unsigned int mdstring_length = 0; - if (!length) - length = INT_MAX; - for (; mdstring_length < length && str[mdstring_length]; ++mdstring_length) - ; - - // Allocate the string buffer - TypedMDRVA mdstring(this); - if (!mdstring.AllocateObjectAndArray(mdstring_length + 1, sizeof(uint16_t))) - return false; - - // Set length excluding the NULL and copy the string - mdstring.get()->length = - static_cast(mdstring_length * sizeof(uint16_t)); - bool result = CopyStringToMDString(str, mdstring_length, &mdstring); - - // NULL terminate - if (result) { - uint16_t ch = 0; - result = mdstring.CopyIndexAfterObject(mdstring_length, &ch, sizeof(ch)); - - if (result) - *location = mdstring.location(); - } - - return result; -} - -bool MinidumpFileWriter::WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location) { - return WriteStringCore(str, length, location); -} - -bool MinidumpFileWriter::WriteMemory(const void *src, size_t size, - MDMemoryDescriptor *output) { - assert(src); - assert(output); - UntypedMDRVA mem(this); - - if (!mem.Allocate(size)) - return false; - if (!mem.Copy(src, mem.size())) - return false; - - output->start_of_memory_range = reinterpret_cast(src); - output->memory = mem.location(); - - return true; -} - -MDRVA MinidumpFileWriter::Allocate(size_t size) { - assert(size); - assert(file_ != -1); -#if defined(__ANDROID__) - if (NeedsFTruncateWorkAround()) { - // If ftruncate() is not available. We simply increase the size beyond the - // current file size. sys_write() will expand the file when data is written - // to it. Because we did not over allocate to fit memory pages, we also - // do not need to ftruncate() the file once we are done. - size_ += size; - - // We don't need to seek since the file is unchanged. - MDRVA current_position = position_; - position_ += static_cast(size); - return current_position; - } -#endif - size_t aligned_size = (size + 7) & ~7; // 64-bit alignment - - if (position_ + aligned_size > size_) { - size_t growth = aligned_size; - size_t minimal_growth = getpagesize(); - - // Ensure that the file grows by at least the size of a memory page - if (growth < minimal_growth) - growth = minimal_growth; - - size_t new_size = size_ + growth; - if (ftruncate(file_, new_size) != 0) - return kInvalidMDRVA; - - size_ = new_size; - } - - MDRVA current_position = position_; - position_ += static_cast(aligned_size); - - return current_position; -} - -bool MinidumpFileWriter::Copy(MDRVA position, const void *src, ssize_t size) { - assert(src); - assert(size); - assert(file_ != -1); - - // Ensure that the data will fit in the allocated space - if (static_cast(size + position) > size_) - return false; - - // Seek and write the data -#if defined(__linux__) && __linux__ - if (sys_lseek(file_, position, SEEK_SET) == static_cast(position)) { - if (sys_write(file_, src, size) == size) { - return true; - } - } -#else - if (lseek(file_, position, SEEK_SET) == static_cast(position)) { - if (write(file_, src, size) == size) { - return true; - } - } -#endif - return false; -} - -bool UntypedMDRVA::Allocate(size_t size) { - assert(size_ == 0); - size_ = size; - position_ = writer_->Allocate(size_); - return position_ != MinidumpFileWriter::kInvalidMDRVA; -} - -bool UntypedMDRVA::Copy(MDRVA pos, const void *src, size_t size) { - assert(src); - assert(size); - assert(pos + size <= position_ + size_); - return writer_->Copy(pos, src, size); -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h b/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h deleted file mode 100644 index ce32b6d0879f8e..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/minidump_file_writer.h +++ /dev/null @@ -1,272 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// minidump_file_writer.h: Implements file-based minidump generation. It's -// intended to be used with the Google Breakpad open source crash handling -// project. - -#ifndef CLIENT_MINIDUMP_FILE_WRITER_H__ -#define CLIENT_MINIDUMP_FILE_WRITER_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -class UntypedMDRVA; -template class TypedMDRVA; - -// The user of this class can Open() a file and add minidump streams, data, and -// strings using the definitions in minidump_format.h. Since this class is -// expected to be used in a situation where the current process may be -// damaged, it will not allocate heap memory. -// Sample usage: -// MinidumpFileWriter writer; -// writer.Open("/tmp/minidump.dmp"); -// TypedMDRVA header(&writer_); -// header.Allocate(); -// header->get()->signature = MD_HEADER_SIGNATURE; -// : -// writer.Close(); -// -// An alternative is to use SetFile and provide a file descriptor: -// MinidumpFileWriter writer; -// writer.SetFile(minidump_fd); -// TypedMDRVA header(&writer_); -// header.Allocate(); -// header->get()->signature = MD_HEADER_SIGNATURE; -// : -// writer.Close(); - -class MinidumpFileWriter { -public: - // Invalid MDRVA (Minidump Relative Virtual Address) - // returned on failed allocation - static const MDRVA kInvalidMDRVA; - - MinidumpFileWriter(); - ~MinidumpFileWriter(); - - // Open |path| as the destination of the minidump data. If |path| already - // exists, then Open() will fail. - // Return true on success, or false on failure. - bool Open(const char *path); - - // Sets the file descriptor |file| as the destination of the minidump data. - // Can be used as an alternative to Open() when a file descriptor is - // available. - // Note that |fd| is not closed when the instance of MinidumpFileWriter is - // destroyed. - void SetFile(const int file); - - // Close the current file (that was either created when Open was called, or - // specified with SetFile). - // Return true on success, or false on failure. - bool Close(); - - // Copy the contents of |str| to a MDString and write it to the file. - // |str| is expected to be either UTF-16 or UTF-32 depending on the size - // of wchar_t. - // Maximum |length| of characters to copy from |str|, or specify 0 to use the - // entire NULL terminated string. Copying will stop at the first NULL. - // |location| the allocated location - // Return true on success, or false on failure - bool WriteString(const wchar_t *str, unsigned int length, - MDLocationDescriptor *location); - - // Same as above, except with |str| as a UTF-8 string - bool WriteString(const char *str, unsigned int length, - MDLocationDescriptor *location); - - // Write |size| bytes starting at |src| into the current position. - // Return true on success and set |output| to position, or false on failure - bool WriteMemory(const void *src, size_t size, MDMemoryDescriptor *output); - - // Copies |size| bytes from |src| to |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, ssize_t size); - - // Return the current position for writing to the minidump - inline MDRVA position() const { return position_; } - - private: - friend class UntypedMDRVA; - - // Allocates an area of |size| bytes. - // Returns the position of the allocation, or kInvalidMDRVA if it was - // unable to allocate the bytes. - MDRVA Allocate(size_t size); - - // The file descriptor for the output file. - int file_; - - // Whether |file_| should be closed when the instance is destroyed. - bool close_file_when_destroyed_; - - // Current position in buffer - MDRVA position_; - - // Current allocated size - size_t size_; - - // Copy |length| characters from |str| to |mdstring|. These are distinct - // because the underlying MDString is a UTF-16 based string. The wchar_t - // variant may need to create a MDString that has more characters than the - // source |str|, whereas the UTF-8 variant may coalesce characters to form - // a single UTF-16 character. - bool CopyStringToMDString(const wchar_t *str, unsigned int length, - TypedMDRVA *mdstring); - bool CopyStringToMDString(const char *str, unsigned int length, - TypedMDRVA *mdstring); - - // The common templated code for writing a string - template - bool WriteStringCore(const CharType *str, unsigned int length, - MDLocationDescriptor *location); -}; - -// Represents an untyped allocated chunk -class UntypedMDRVA { - public: - explicit UntypedMDRVA(MinidumpFileWriter *writer) - : writer_(writer), - position_(writer->position()), - size_(0) {} - - // Allocates |size| bytes. Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t size); - - // Returns the current position or kInvalidMDRVA if allocation failed - inline MDRVA position() const { return position_; } - - // Number of bytes allocated - inline size_t size() const { return size_; } - - // Return size and position - inline MDLocationDescriptor location() const { - MDLocationDescriptor location = { static_cast(size_), - position_ }; - return location; - } - - // Copy |size| bytes starting at |src| into the minidump at |position| - // Return true on success, or false on failure - bool Copy(MDRVA position, const void *src, size_t size); - - // Copy |size| bytes from |src| to the current position - inline bool Copy(const void *src, size_t size) { - return Copy(position_, src, size); - } - - protected: - // Writer we associate with - MinidumpFileWriter *writer_; - - // Position of the start of the data - MDRVA position_; - - // Allocated size - size_t size_; -}; - -// Represents a Minidump object chunk. Additional memory can be allocated at -// the end of the object as a: -// - single allocation -// - Array of MDType objects -// - A MDType object followed by an array -template -class TypedMDRVA : public UntypedMDRVA { - public: - // Constructs an unallocated MDRVA - explicit TypedMDRVA(MinidumpFileWriter *writer) - : UntypedMDRVA(writer), - data_(), - allocation_state_(UNALLOCATED) {} - - inline ~TypedMDRVA() { - // Ensure that the data_ object is written out - if (allocation_state_ != ARRAY) - Flush(); - } - - // Address of object data_ of MDType. This is not declared const as the - // typical usage will be to access the underlying |data_| object as to - // alter its contents. - MDType *get() { return &data_; } - - // Allocates minidump_size::size() bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(); - - // Allocates minidump_size::size() + |additional| bytes. - // Must not call more than once. - // Return true on success, or false on failure - bool Allocate(size_t additional); - - // Allocate an array of |count| elements of MDType. - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateArray(size_t count); - - // Allocate an array of |count| elements of |size| after object of MDType - // Must not call more than once. - // Return true on success, or false on failure - bool AllocateObjectAndArray(size_t count, size_t size); - - // Copy |item| to |index| - // Must have been allocated using AllocateArray(). - // Return true on success, or false on failure - bool CopyIndex(unsigned int index, MDType *item); - - // Copy |size| bytes starting at |str| to |index| - // Must have been allocated using AllocateObjectAndArray(). - // Return true on success, or false on failure - bool CopyIndexAfterObject(unsigned int index, const void *src, size_t size); - - // Write data_ - bool Flush(); - - private: - enum AllocationState { - UNALLOCATED = 0, - SINGLE_OBJECT, - ARRAY, - SINGLE_OBJECT_WITH_ARRAY - }; - - MDType data_; - AllocationState allocation_state_; -}; - -} // namespace google_breakpad - -#endif // CLIENT_MINIDUMP_FILE_WRITER_H__ diff --git a/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h b/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h deleted file mode 100644 index c74868198c6095..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/windows/common/ipc_protocol.h +++ /dev/null @@ -1,181 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ -#define CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ - -#include -#include -#include -#include -#include "common/windows/string_utils-inl.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -// Name/value pair for custom client information. -struct CustomInfoEntry { - // Maximum length for name and value for client custom info. - static const int kNameMaxLength = 64; - static const int kValueMaxLength = 64; - - CustomInfoEntry() { - // Putting name and value in initializer list makes VC++ show warning 4351. - set_name(NULL); - set_value(NULL); - } - - CustomInfoEntry(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - void set_name(const wchar_t* name_arg) { - if (!name_arg) { - name[0] = L'\0'; - return; - } - WindowsStringUtils::safe_wcscpy(name, kNameMaxLength, name_arg); - } - - void set_value(const wchar_t* value_arg) { - if (!value_arg) { - value[0] = L'\0'; - return; - } - - WindowsStringUtils::safe_wcscpy(value, kValueMaxLength, value_arg); - } - - void set(const wchar_t* name_arg, const wchar_t* value_arg) { - set_name(name_arg); - set_value(value_arg); - } - - wchar_t name[kNameMaxLength]; - wchar_t value[kValueMaxLength]; -}; - -// Constants for the protocol between client and the server. - -// Tags sent with each message indicating the purpose of -// the message. -enum MessageTag { - MESSAGE_TAG_NONE = 0, - MESSAGE_TAG_REGISTRATION_REQUEST = 1, - MESSAGE_TAG_REGISTRATION_RESPONSE = 2, - MESSAGE_TAG_REGISTRATION_ACK = 3, - MESSAGE_TAG_UPLOAD_REQUEST = 4 -}; - -struct CustomClientInfo { - const CustomInfoEntry* entries; - size_t count; -}; - -// Message structure for IPC between crash client and crash server. -struct ProtocolMessage { - ProtocolMessage() - : tag(MESSAGE_TAG_NONE), - id(0), - dump_type(MiniDumpNormal), - thread_id(0), - exception_pointers(NULL), - assert_info(NULL), - custom_client_info(), - dump_request_handle(NULL), - dump_generated_handle(NULL), - server_alive_handle(NULL) { - } - - // Creates an instance with the given parameters. - ProtocolMessage(MessageTag arg_tag, - DWORD arg_id, - MINIDUMP_TYPE arg_dump_type, - DWORD* arg_thread_id, - EXCEPTION_POINTERS** arg_exception_pointers, - MDRawAssertionInfo* arg_assert_info, - const CustomClientInfo& custom_info, - HANDLE arg_dump_request_handle, - HANDLE arg_dump_generated_handle, - HANDLE arg_server_alive) - : tag(arg_tag), - id(arg_id), - dump_type(arg_dump_type), - thread_id(arg_thread_id), - exception_pointers(arg_exception_pointers), - assert_info(arg_assert_info), - custom_client_info(custom_info), - dump_request_handle(arg_dump_request_handle), - dump_generated_handle(arg_dump_generated_handle), - server_alive_handle(arg_server_alive) { - } - - // Tag in the message. - MessageTag tag; - - // The id for this message. This may be either a process id or a crash id - // depending on the type of message. - DWORD id; - - // Dump type requested. - MINIDUMP_TYPE dump_type; - - // Client thread id pointer. - DWORD* thread_id; - - // Exception information. - EXCEPTION_POINTERS** exception_pointers; - - // Assert information in case of an invalid parameter or - // pure call failure. - MDRawAssertionInfo* assert_info; - - // Custom client information. - CustomClientInfo custom_client_info; - - // Handle to signal the crash event. - HANDLE dump_request_handle; - - // Handle to check if server is done generating crash. - HANDLE dump_generated_handle; - - // Handle to a mutex that becomes signaled (WAIT_ABANDONED) - // if server process goes down. - HANDLE server_alive_handle; - - private: - // Disable copy ctor and operator=. - ProtocolMessage(const ProtocolMessage& msg); - ProtocolMessage& operator=(const ProtocolMessage& msg); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_COMMON_IPC_PROTOCOL_H__ diff --git a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc deleted file mode 100644 index 3ba5d4e4fbde9a..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.cc +++ /dev/null @@ -1,405 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "client/windows/crash_generation/crash_generation_client.h" -#include -#include -#include "client/windows/common/ipc_protocol.h" - -namespace google_breakpad { - -const int kPipeBusyWaitTimeoutMs = 2000; - -#ifdef _DEBUG -const DWORD kWaitForServerTimeoutMs = INFINITE; -#else -const DWORD kWaitForServerTimeoutMs = 15000; -#endif - -const int kPipeConnectMaxAttempts = 2; - -const DWORD kPipeDesiredAccess = FILE_READ_DATA | - FILE_WRITE_DATA | - FILE_WRITE_ATTRIBUTES; - -const DWORD kPipeFlagsAndAttributes = SECURITY_IDENTIFICATION | - SECURITY_SQOS_PRESENT; - -const DWORD kPipeMode = PIPE_READMODE_MESSAGE; - -const size_t kWaitEventCount = 2; - -// This function is orphan for production code. It can be used -// for debugging to help repro some scenarios like the client -// is slow in writing to the pipe after connecting, the client -// is slow in reading from the pipe after writing, etc. The parameter -// overlapped below is not used and it is present to match the signature -// of this function to TransactNamedPipe Win32 API. Uncomment if needed -// for debugging. -/** -static bool TransactNamedPipeDebugHelper(HANDLE pipe, - const void* in_buffer, - DWORD in_size, - void* out_buffer, - DWORD out_size, - DWORD* bytes_count, - LPOVERLAPPED) { - // Uncomment the next sleep to create a gap before writing - // to pipe. - // Sleep(5000); - - if (!WriteFile(pipe, - in_buffer, - in_size, - bytes_count, - NULL)) { - return false; - } - - // Uncomment the next sleep to create a gap between write - // and read. - // Sleep(5000); - - return ReadFile(pipe, out_buffer, out_size, bytes_count, NULL) != FALSE; -} -**/ - -CrashGenerationClient::CrashGenerationClient( - const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info) - : pipe_name_(pipe_name), - pipe_handle_(NULL), - custom_info_(), - dump_type_(dump_type), - crash_event_(NULL), - crash_generated_(NULL), - server_alive_(NULL), - server_process_id_(0), - thread_id_(0), - exception_pointers_(NULL) { - memset(&assert_info_, 0, sizeof(assert_info_)); - if (custom_info) { - custom_info_ = *custom_info; - } -} - -CrashGenerationClient::CrashGenerationClient( - HANDLE pipe_handle, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info) - : pipe_name_(), - pipe_handle_(pipe_handle), - custom_info_(), - dump_type_(dump_type), - crash_event_(NULL), - crash_generated_(NULL), - server_alive_(NULL), - server_process_id_(0), - thread_id_(0), - exception_pointers_(NULL) { - memset(&assert_info_, 0, sizeof(assert_info_)); - if (custom_info) { - custom_info_ = *custom_info; - } -} - -CrashGenerationClient::~CrashGenerationClient() { - if (crash_event_) { - CloseHandle(crash_event_); - } - - if (crash_generated_) { - CloseHandle(crash_generated_); - } - - if (server_alive_) { - CloseHandle(server_alive_); - } -} - -// Performs the registration step with the server process. -// The registration step involves communicating with the server -// via a named pipe. The client sends the following pieces of -// data to the server: -// -// * Message tag indicating the client is requesting registration. -// * Process id of the client process. -// * Address of a DWORD variable in the client address space -// that will contain the thread id of the client thread that -// caused the crash. -// * Address of a EXCEPTION_POINTERS* variable in the client -// address space that will point to an instance of EXCEPTION_POINTERS -// when the crash happens. -// * Address of an instance of MDRawAssertionInfo that will contain -// relevant information in case of non-exception crashes like assertion -// failures and pure calls. -// -// In return the client expects the following information from the server: -// -// * Message tag indicating successful registration. -// * Server process id. -// * Handle to an object that client can signal to request dump -// generation from the server. -// * Handle to an object that client can wait on after requesting -// dump generation for the server to finish dump generation. -// * Handle to a mutex object that client can wait on to make sure -// server is still alive. -// -// If any step of the expected behavior mentioned above fails, the -// registration step is not considered successful and hence out-of-process -// dump generation service is not available. -// -// Returns true if the registration is successful; false otherwise. -bool CrashGenerationClient::Register() { - if (IsRegistered()) { - return true; - } - - HANDLE pipe = ConnectToServer(); - if (!pipe) { - return false; - } - - bool success = RegisterClient(pipe); - CloseHandle(pipe); - return success; -} - -bool CrashGenerationClient::RequestUpload(DWORD crash_id) { - HANDLE pipe = ConnectToServer(); - if (!pipe) { - return false; - } - - CustomClientInfo custom_info = {NULL, 0}; - ProtocolMessage msg(MESSAGE_TAG_UPLOAD_REQUEST, crash_id, - static_cast(NULL), NULL, NULL, NULL, - custom_info, NULL, NULL, NULL); - DWORD bytes_count = 0; - bool success = WriteFile(pipe, &msg, sizeof(msg), &bytes_count, NULL) != 0; - - CloseHandle(pipe); - return success; -} - -HANDLE CrashGenerationClient::ConnectToServer() { - HANDLE pipe = ConnectToPipe(pipe_name_.c_str(), - kPipeDesiredAccess, - kPipeFlagsAndAttributes); - if (!pipe) { - return NULL; - } - - DWORD mode = kPipeMode; - if (!SetNamedPipeHandleState(pipe, &mode, NULL, NULL)) { - CloseHandle(pipe); - pipe = NULL; - } - - return pipe; -} - -bool CrashGenerationClient::RegisterClient(HANDLE pipe) { - ProtocolMessage msg(MESSAGE_TAG_REGISTRATION_REQUEST, - GetCurrentProcessId(), - dump_type_, - &thread_id_, - &exception_pointers_, - &assert_info_, - custom_info_, - NULL, - NULL, - NULL); - ProtocolMessage reply; - DWORD bytes_count = 0; - // The call to TransactNamedPipe below can be changed to a call - // to TransactNamedPipeDebugHelper to help repro some scenarios. - // For details see comments for TransactNamedPipeDebugHelper. - if (!TransactNamedPipe(pipe, - &msg, - sizeof(msg), - &reply, - sizeof(ProtocolMessage), - &bytes_count, - NULL)) { - return false; - } - - if (!ValidateResponse(reply)) { - return false; - } - - ProtocolMessage ack_msg; - ack_msg.tag = MESSAGE_TAG_REGISTRATION_ACK; - - if (!WriteFile(pipe, &ack_msg, sizeof(ack_msg), &bytes_count, NULL)) { - return false; - } - crash_event_ = reply.dump_request_handle; - crash_generated_ = reply.dump_generated_handle; - server_alive_ = reply.server_alive_handle; - server_process_id_ = reply.id; - - return true; -} - -HANDLE CrashGenerationClient::ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs) { - if (pipe_handle_) { - HANDLE t = pipe_handle_; - pipe_handle_ = NULL; - return t; - } - - for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { - HANDLE pipe = CreateFile(pipe_name, - pipe_access, - 0, - NULL, - OPEN_EXISTING, - flags_attrs, - NULL); - if (pipe != INVALID_HANDLE_VALUE) { - return pipe; - } - - // Cannot continue retrying if error is something other than - // ERROR_PIPE_BUSY. - if (GetLastError() != ERROR_PIPE_BUSY) { - break; - } - - // Cannot continue retrying if wait on pipe fails. - if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { - break; - } - } - - return NULL; -} - -bool CrashGenerationClient::ValidateResponse( - const ProtocolMessage& msg) const { - return (msg.tag == MESSAGE_TAG_REGISTRATION_RESPONSE) && - (msg.id != 0) && - (msg.dump_request_handle != NULL) && - (msg.dump_generated_handle != NULL) && - (msg.server_alive_handle != NULL); -} - -bool CrashGenerationClient::IsRegistered() const { - return crash_event_ != NULL; -} - -bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info, - MDRawAssertionInfo* assert_info) { - if (!IsRegistered()) { - return false; - } - - exception_pointers_ = ex_info; - thread_id_ = GetCurrentThreadId(); - - if (assert_info) { - memcpy(&assert_info_, assert_info, sizeof(assert_info_)); - } else { - memset(&assert_info_, 0, sizeof(assert_info_)); - } - - return SignalCrashEventAndWait(); -} - -bool CrashGenerationClient::RequestDump(EXCEPTION_POINTERS* ex_info) { - return RequestDump(ex_info, NULL); -} - -bool CrashGenerationClient::RequestDump(MDRawAssertionInfo* assert_info) { - return RequestDump(NULL, assert_info); -} - -bool CrashGenerationClient::SignalCrashEventAndWait() { - assert(crash_event_); - assert(crash_generated_); - assert(server_alive_); - - // Reset the dump generated event before signaling the crash - // event so that the server can set the dump generated event - // once it is done generating the event. - if (!ResetEvent(crash_generated_)) { - return false; - } - - if (!SetEvent(crash_event_)) { - return false; - } - - HANDLE wait_handles[kWaitEventCount] = {crash_generated_, server_alive_}; - - DWORD result = WaitForMultipleObjects(kWaitEventCount, - wait_handles, - FALSE, - kWaitForServerTimeoutMs); - - // Crash dump was successfully generated only if the server - // signaled the crash generated event. - return result == WAIT_OBJECT_0; -} - -HANDLE CrashGenerationClient::DuplicatePipeToClientProcess(const wchar_t* pipe_name, - HANDLE hProcess) { - for (int i = 0; i < kPipeConnectMaxAttempts; ++i) { - HANDLE local_pipe = CreateFile(pipe_name, kPipeDesiredAccess, - 0, NULL, OPEN_EXISTING, - kPipeFlagsAndAttributes, NULL); - if (local_pipe != INVALID_HANDLE_VALUE) { - HANDLE remotePipe = INVALID_HANDLE_VALUE; - if (DuplicateHandle(GetCurrentProcess(), local_pipe, - hProcess, &remotePipe, 0, FALSE, - DUPLICATE_CLOSE_SOURCE | DUPLICATE_SAME_ACCESS)) { - return remotePipe; - } else { - return INVALID_HANDLE_VALUE; - } - } - - // Cannot continue retrying if the error wasn't a busy pipe. - if (GetLastError() != ERROR_PIPE_BUSY) { - return INVALID_HANDLE_VALUE; - } - - if (!WaitNamedPipe(pipe_name, kPipeBusyWaitTimeoutMs)) { - return INVALID_HANDLE_VALUE; - } - } - return INVALID_HANDLE_VALUE; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h b/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h deleted file mode 100644 index 457f731957264f..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/windows/crash_generation/crash_generation_client.h +++ /dev/null @@ -1,182 +0,0 @@ -// Copyright (c) 2008, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ -#define CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ - -#include -#include -#include -#include -#include "client/windows/common/ipc_protocol.h" -#include "common/scoped_ptr.h" - -namespace google_breakpad { - -struct CustomClientInfo; - -// Abstraction of client-side implementation of out of process -// crash generation. -// -// The process that desires to have out-of-process crash dump -// generation service can use this class in the following way: -// -// * Create an instance. -// * Call Register method so that the client tries to register -// with the server process and check the return value. If -// registration is not successful, out-of-process crash dump -// generation will not be available -// * Request dump generation by calling either of the two -// overloaded RequestDump methods - one in case of exceptions -// and the other in case of assertion failures -// -// Note that it is the responsibility of the client code of -// this class to set the unhandled exception filter with the -// system by calling the SetUnhandledExceptionFilter function -// and the client code should explicitly request dump generation. -class CrashGenerationClient { - public: - CrashGenerationClient(const wchar_t* pipe_name, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info); - - CrashGenerationClient(HANDLE pipe_handle, - MINIDUMP_TYPE dump_type, - const CustomClientInfo* custom_info); - - ~CrashGenerationClient(); - - // Registers the client process with the crash server. - // - // Returns true if the registration is successful; false otherwise. - bool Register(); - - // Requests the crash server to upload a previous dump with the - // given crash id. - bool RequestUpload(DWORD crash_id); - - bool RequestDump(EXCEPTION_POINTERS* ex_info, - MDRawAssertionInfo* assert_info); - - // Requests the crash server to generate a dump with the given - // exception information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(EXCEPTION_POINTERS* ex_info); - - // Requests the crash server to generate a dump with the given - // assertion information. - // - // Returns true if the dump was successful; false otherwise. Note that - // if the registration step was not performed or it was not successful, - // false will be returned. - bool RequestDump(MDRawAssertionInfo* assert_info); - - // If the crash generation client is running in a sandbox that prevents it - // from opening the named pipe directly, the server process may open the - // handle and duplicate it into the client process with this helper method. - // Returns INVALID_HANDLE_VALUE on failure. The process must have been opened - // with the PROCESS_DUP_HANDLE access right. - static HANDLE DuplicatePipeToClientProcess(const wchar_t* pipe_name, - HANDLE hProcess); - - private: - // Connects to the appropriate pipe and sets the pipe handle state. - // - // Returns the pipe handle if everything goes well; otherwise Returns NULL. - HANDLE ConnectToServer(); - - // Performs a handshake with the server over the given pipe which should be - // already connected to the server. - // - // Returns true if handshake with the server was successful; false otherwise. - bool RegisterClient(HANDLE pipe); - - // Validates the given server response. - bool ValidateResponse(const ProtocolMessage& msg) const; - - // Returns true if the registration step succeeded; false otherwise. - bool IsRegistered() const; - - // Connects to the given named pipe with given parameters. - // - // Returns true if the connection is successful; false otherwise. - HANDLE ConnectToPipe(const wchar_t* pipe_name, - DWORD pipe_access, - DWORD flags_attrs); - - // Signals the crash event and wait for the server to generate crash. - bool SignalCrashEventAndWait(); - - // Pipe name to use to talk to server. - std::wstring pipe_name_; - - // Pipe handle duplicated from server process. Only valid before - // Register is called. - HANDLE pipe_handle_; - - // Custom client information - CustomClientInfo custom_info_; - - // Type of dump to generate. - MINIDUMP_TYPE dump_type_; - - // Event to signal in case of a crash. - HANDLE crash_event_; - - // Handle to wait on after signaling a crash for the server - // to finish generating crash dump. - HANDLE crash_generated_; - - // Handle to a mutex that will become signaled with WAIT_ABANDONED - // if the server process goes down. - HANDLE server_alive_; - - // Server process id. - DWORD server_process_id_; - - // Id of the thread that caused the crash. - DWORD thread_id_; - - // Exception pointers for an exception crash. - EXCEPTION_POINTERS* exception_pointers_; - - // Assertion info for an invalid parameter or pure call crash. - MDRawAssertionInfo assert_info_; - - // Disable copy ctor and operator=. - CrashGenerationClient(const CrashGenerationClient& crash_client); - CrashGenerationClient& operator=(const CrashGenerationClient& crash_client); -}; - -} // namespace google_breakpad - -#endif // CLIENT_WINDOWS_CRASH_GENERATION_CRASH_GENERATION_CLIENT_H_ diff --git a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc deleted file mode 100644 index b78075dec5a179..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.cc +++ /dev/null @@ -1,1073 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include -#include -#include - -#include "common/windows/string_utils-inl.h" - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/handler/exception_handler.h" -#include "common/windows/guid_string.h" - -namespace google_breakpad { - -static const int kWaitForHandlerThreadMs = 60000; -static const int kExceptionHandlerThreadInitialStackSize = 64 * 1024; - -// As documented on MSDN, on failure SuspendThread returns (DWORD) -1 -static const DWORD kFailedToSuspendThread = static_cast(-1); - -// This is passed as the context to the MinidumpWriteDump callback. -typedef struct { - AppMemoryList::const_iterator iter; - AppMemoryList::const_iterator end; -} MinidumpCallbackContext; - -vector* ExceptionHandler::handler_stack_ = NULL; -LONG ExceptionHandler::handler_stack_index_ = 0; -CRITICAL_SECTION ExceptionHandler::handler_stack_critical_section_; -volatile LONG ExceptionHandler::instance_count_ = 0; - -ExceptionHandler::ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - dump_type, - pipe_name, - NULL, // pipe_handle - NULL, // crash_generation_client - custom_info); -} - -ExceptionHandler::ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - HANDLE pipe_handle, - const CustomClientInfo* custom_info) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - dump_type, - NULL, // pipe_name - pipe_handle, - NULL, // crash_generation_client - custom_info); -} - -ExceptionHandler::ExceptionHandler( - const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - CrashGenerationClient* crash_generation_client) { - // The dump_type, pipe_name and custom_info that are passed in to Initialize() - // are not used. The ones set in crash_generation_client are used instead. - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - MiniDumpNormal, // dump_type - not used - NULL, // pipe_name - not used - NULL, // pipe_handle - crash_generation_client, - NULL); // custom_info - not used -} - -ExceptionHandler::ExceptionHandler(const wstring &dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types) { - Initialize(dump_path, - filter, - callback, - callback_context, - handler_types, - MiniDumpNormal, - NULL, // pipe_name - NULL, // pipe_handle - NULL, // crash_generation_client - NULL); // custom_info -} - -void ExceptionHandler::Initialize( - const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - HANDLE pipe_handle, - CrashGenerationClient* crash_generation_client, - const CustomClientInfo* custom_info) { - LONG instance_count = InterlockedIncrement(&instance_count_); - filter_ = filter; - callback_ = callback; - callback_context_ = callback_context; - dump_path_c_ = NULL; - next_minidump_id_c_ = NULL; - next_minidump_path_c_ = NULL; - dbghelp_module_ = NULL; - minidump_write_dump_ = NULL; - dump_type_ = dump_type; - rpcrt4_module_ = NULL; - uuid_create_ = NULL; - handler_types_ = handler_types; - previous_filter_ = NULL; -#if _MSC_VER >= 1400 // MSVC 2005/8 - previous_iph_ = NULL; -#endif // _MSC_VER >= 1400 - previous_pch_ = NULL; - handler_thread_ = NULL; - is_shutdown_ = false; - handler_start_semaphore_ = NULL; - handler_finish_semaphore_ = NULL; - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - handler_return_value_ = false; - handle_debug_exceptions_ = false; - consume_invalid_handle_exceptions_ = false; - - // Attempt to use out-of-process if user has specified a pipe or a - // crash generation client. - scoped_ptr client; - if (crash_generation_client) { - client.reset(crash_generation_client); - } else if (pipe_name) { - client.reset( - new CrashGenerationClient(pipe_name, dump_type_, custom_info)); - } else if (pipe_handle) { - client.reset( - new CrashGenerationClient(pipe_handle, dump_type_, custom_info)); - } - - if (client.get() != NULL) { - // If successful in registering with the monitoring process, - // there is no need to setup in-process crash generation. - if (client->Register()) { - crash_generation_client_.reset(client.release()); - } - } - - if (!IsOutOfProcess()) { - // Either client did not ask for out-of-process crash generation - // or registration with the server process failed. In either case, - // setup to do in-process crash generation. - - // Set synchronization primitives and the handler thread. Each - // ExceptionHandler object gets its own handler thread because that's the - // only way to reliably guarantee sufficient stack space in an exception, - // and it allows an easy way to get a snapshot of the requesting thread's - // context outside of an exception. - InitializeCriticalSection(&handler_critical_section_); - handler_start_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_start_semaphore_ != NULL); - - handler_finish_semaphore_ = CreateSemaphore(NULL, 0, 1, NULL); - assert(handler_finish_semaphore_ != NULL); - - // Don't attempt to create the thread if we could not create the semaphores. - if (handler_finish_semaphore_ != NULL && handler_start_semaphore_ != NULL) { - DWORD thread_id; - handler_thread_ = CreateThread(NULL, // lpThreadAttributes - kExceptionHandlerThreadInitialStackSize, - ExceptionHandlerThreadMain, - this, // lpParameter - 0, // dwCreationFlags - &thread_id); - assert(handler_thread_ != NULL); - } - - dbghelp_module_ = LoadLibrary(L"dbghelp.dll"); - if (dbghelp_module_) { - minidump_write_dump_ = reinterpret_cast( - GetProcAddress(dbghelp_module_, "MiniDumpWriteDump")); - } - - // Load this library dynamically to not affect existing projects. Most - // projects don't link against this directly, it's usually dynamically - // loaded by dependent code. - rpcrt4_module_ = LoadLibrary(L"rpcrt4.dll"); - if (rpcrt4_module_) { - uuid_create_ = reinterpret_cast( - GetProcAddress(rpcrt4_module_, "UuidCreate")); - } - - // set_dump_path calls UpdateNextID. This sets up all of the path and id - // strings, and their equivalent c_str pointers. - set_dump_path(dump_path); - } - - // Reserve one element for the instruction memory - AppMemory instruction_memory; - instruction_memory.ptr = NULL; - instruction_memory.length = 0; - app_memory_info_.push_back(instruction_memory); - - // There is a race condition here. If the first instance has not yet - // initialized the critical section, the second (and later) instances may - // try to use uninitialized critical section object. The feature of multiple - // instances in one module is not used much, so leave it as is for now. - // One way to solve this in the current design (that is, keeping the static - // handler stack) is to use spin locks with volatile bools to synchronize - // the handler stack. This works only if the compiler guarantees to generate - // cache coherent code for volatile. - // TODO(munjal): Fix this in a better way by changing the design if possible. - - // Lazy initialization of the handler_stack_critical_section_ - if (instance_count == 1) { - InitializeCriticalSection(&handler_stack_critical_section_); - } - - if (handler_types != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - // The first time an ExceptionHandler that installs a handler is - // created, set up the handler stack. - if (!handler_stack_) { - handler_stack_ = new vector(); - } - handler_stack_->push_back(this); - - if (handler_types & HANDLER_EXCEPTION) - previous_filter_ = SetUnhandledExceptionFilter(HandleException); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types & HANDLER_INVALID_PARAMETER) - previous_iph_ = _set_invalid_parameter_handler(HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - - if (handler_types & HANDLER_PURECALL) - previous_pch_ = _set_purecall_handler(HandlePureVirtualCall); - - LeaveCriticalSection(&handler_stack_critical_section_); - } -} - -ExceptionHandler::~ExceptionHandler() { - if (dbghelp_module_) { - FreeLibrary(dbghelp_module_); - } - - if (rpcrt4_module_) { - FreeLibrary(rpcrt4_module_); - } - - if (handler_types_ != HANDLER_NONE) { - EnterCriticalSection(&handler_stack_critical_section_); - - if (handler_types_ & HANDLER_EXCEPTION) - SetUnhandledExceptionFilter(previous_filter_); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - if (handler_types_ & HANDLER_INVALID_PARAMETER) - _set_invalid_parameter_handler(previous_iph_); -#endif // _MSC_VER >= 1400 - - if (handler_types_ & HANDLER_PURECALL) - _set_purecall_handler(previous_pch_); - - if (handler_stack_->back() == this) { - handler_stack_->pop_back(); - } else { - // TODO(mmentovai): use advapi32!ReportEvent to log the warning to the - // system's application event log. - fprintf(stderr, "warning: removing Breakpad handler out of order\n"); - vector::iterator iterator = handler_stack_->begin(); - while (iterator != handler_stack_->end()) { - if (*iterator == this) { - iterator = handler_stack_->erase(iterator); - } else { - ++iterator; - } - } - } - - if (handler_stack_->empty()) { - // When destroying the last ExceptionHandler that installed a handler, - // clean up the handler stack. - delete handler_stack_; - handler_stack_ = NULL; - } - - LeaveCriticalSection(&handler_stack_critical_section_); - } - - // Some of the objects were only initialized if out of process - // registration was not done. - if (!IsOutOfProcess()) { -#ifdef BREAKPAD_NO_TERMINATE_THREAD - // Clean up the handler thread and synchronization primitives. The handler - // thread is either waiting on the semaphore to handle a crash or it is - // handling a crash. Coming out of the wait is fast but wait more in the - // eventuality a crash is handled. This compilation option results in a - // deadlock if the exception handler is destroyed while executing code - // inside DllMain. - is_shutdown_ = true; - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - WaitForSingleObject(handler_thread_, kWaitForHandlerThreadMs); -#else - TerminateThread(handler_thread_, 1); -#endif // BREAKPAD_NO_TERMINATE_THREAD - - CloseHandle(handler_thread_); - handler_thread_ = NULL; - DeleteCriticalSection(&handler_critical_section_); - CloseHandle(handler_start_semaphore_); - CloseHandle(handler_finish_semaphore_); - } - - // There is a race condition in the code below: if this instance is - // deleting the static critical section and a new instance of the class - // is created, then there is a possibility that the critical section be - // initialized while the same critical section is being deleted. Given the - // usage pattern for the code, this race condition is unlikely to hit, but it - // is a race condition nonetheless. - if (InterlockedDecrement(&instance_count_) == 0) { - DeleteCriticalSection(&handler_stack_critical_section_); - } -} - -bool ExceptionHandler::RequestUpload(DWORD crash_id) { - return crash_generation_client_->RequestUpload(crash_id); -} - -// static -DWORD ExceptionHandler::ExceptionHandlerThreadMain(void* lpParameter) { - ExceptionHandler* self = reinterpret_cast(lpParameter); - assert(self); - assert(self->handler_start_semaphore_ != NULL); - assert(self->handler_finish_semaphore_ != NULL); - - while (true) { - if (WaitForSingleObject(self->handler_start_semaphore_, INFINITE) == - WAIT_OBJECT_0) { - // Perform the requested action. - if (self->is_shutdown_) { - // The instance of the exception handler is being destroyed. - break; - } else { - self->handler_return_value_ = - self->WriteMinidumpWithException(self->requesting_thread_id_, - self->exception_info_, - self->assertion_); - } - - // Allow the requesting thread to proceed. - ReleaseSemaphore(self->handler_finish_semaphore_, 1, NULL); - } - } - - // This statement is not reached when the thread is unconditionally - // terminated by the ExceptionHandler destructor. - return 0; -} - -// HandleException and HandleInvalidParameter must create an -// AutoExceptionHandler object to maintain static state and to determine which -// ExceptionHandler instance to use. The constructor locates the correct -// instance, and makes it available through get_handler(). The destructor -// restores the state in effect prior to allocating the AutoExceptionHandler. -class AutoExceptionHandler { - public: - AutoExceptionHandler() { - // Increment handler_stack_index_ so that if another Breakpad handler is - // registered using this same HandleException function, and it needs to be - // called while this handler is running (either because this handler - // declines to handle the exception, or an exception occurs during - // handling), HandleException will find the appropriate ExceptionHandler - // object in handler_stack_ to deliver the exception to. - // - // Because handler_stack_ is addressed in reverse (as |size - index|), - // preincrementing handler_stack_index_ avoids needing to subtract 1 from - // the argument to |at|. - // - // The index is maintained instead of popping elements off of the handler - // stack and pushing them at the end of this method. This avoids ruining - // the order of elements in the stack in the event that some other thread - // decides to manipulate the handler stack (such as creating a new - // ExceptionHandler object) while an exception is being handled. - EnterCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - handler_ = ExceptionHandler::handler_stack_->at( - ExceptionHandler::handler_stack_->size() - - ++ExceptionHandler::handler_stack_index_); - - // In case another exception occurs while this handler is doing its thing, - // it should be delivered to the previous filter. - SetUnhandledExceptionFilter(handler_->previous_filter_); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(handler_->previous_iph_); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(handler_->previous_pch_); - } - - ~AutoExceptionHandler() { - // Put things back the way they were before entering this handler. - SetUnhandledExceptionFilter(ExceptionHandler::HandleException); -#if _MSC_VER >= 1400 // MSVC 2005/8 - _set_invalid_parameter_handler(ExceptionHandler::HandleInvalidParameter); -#endif // _MSC_VER >= 1400 - _set_purecall_handler(ExceptionHandler::HandlePureVirtualCall); - - --ExceptionHandler::handler_stack_index_; - LeaveCriticalSection(&ExceptionHandler::handler_stack_critical_section_); - } - - ExceptionHandler* get_handler() const { return handler_; } - - private: - ExceptionHandler* handler_; -}; - -// static -LONG ExceptionHandler::HandleException(EXCEPTION_POINTERS* exinfo) { - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - // Ignore EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP exceptions. This - // logic will short-circuit before calling WriteMinidumpOnHandlerThread, - // allowing something else to handle the breakpoint without incurring the - // overhead transitioning to and from the handler thread. This behavior - // can be overridden by calling ExceptionHandler::set_handle_debug_exceptions. - DWORD code = exinfo->ExceptionRecord->ExceptionCode; - LONG action; - bool is_debug_exception = (code == EXCEPTION_BREAKPOINT) || - (code == EXCEPTION_SINGLE_STEP); - - if (code == EXCEPTION_INVALID_HANDLE && - current_handler->consume_invalid_handle_exceptions_) { - return EXCEPTION_CONTINUE_EXECUTION; - } - - bool success = false; - - if (!is_debug_exception || - current_handler->get_handle_debug_exceptions()) { - // If out-of-proc crash handler client is available, we have to use that - // to generate dump and we cannot fall back on in-proc dump generation - // because we never prepared for an in-proc dump generation - - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - exinfo, - NULL); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(exinfo, NULL); - } - } - - // The handler fully handled the exception. Returning - // EXCEPTION_EXECUTE_HANDLER indicates this to the system, and usually - // results in the application being terminated. - // - // Note: If the application was launched from within the Cygwin - // environment, returning EXCEPTION_EXECUTE_HANDLER seems to cause the - // application to be restarted. - if (success) { - action = EXCEPTION_EXECUTE_HANDLER; - } else { - // There was an exception, it was a breakpoint or something else ignored - // above, or it was passed to the handler, which decided not to handle it. - // This could be because the filter callback didn't want it, because - // minidump writing failed for some reason, or because the post-minidump - // callback function indicated failure. Give the previous handler a - // chance to do something with the exception. If there is no previous - // handler, return EXCEPTION_CONTINUE_SEARCH, which will allow a debugger - // or native "crashed" dialog to handle the exception. - if (current_handler->previous_filter_) { - action = current_handler->previous_filter_(exinfo); - } else { - action = EXCEPTION_CONTINUE_SEARCH; - } - } - - return action; -} - -#if _MSC_VER >= 1400 // MSVC 2005/8 -// static -void ExceptionHandler::HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved) { - // This is an invalid parameter, not an exception. It's safe to play with - // sprintf here. - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - _snwprintf_s(reinterpret_cast(assertion.expression), - sizeof(assertion.expression) / sizeof(assertion.expression[0]), - _TRUNCATE, L"%s", expression); - _snwprintf_s(reinterpret_cast(assertion.function), - sizeof(assertion.function) / sizeof(assertion.function[0]), - _TRUNCATE, L"%s", function); - _snwprintf_s(reinterpret_cast(assertion.file), - sizeof(assertion.file) / sizeof(assertion.file[0]), - _TRUNCATE, L"%s", file); - assertion.line = line; - assertion.type = MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER; - - // Make up an exception record for the current thread and CPU context - // to make it possible for the crash processor to classify these - // as do regular crashes, and to make it humane for developers to - // analyze them. - EXCEPTION_RECORD exception_record = {}; - CONTEXT exception_context = {}; - EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; - - ::RtlCaptureContext(&exception_context); - - exception_record.ExceptionCode = STATUS_INVALID_PARAMETER; - - // We store pointers to the the expression and function strings, - // and the line as exception parameters to make them easy to - // access by the developer on the far side. - exception_record.NumberParameters = 3; - exception_record.ExceptionInformation[0] = - reinterpret_cast(&assertion.expression); - exception_record.ExceptionInformation[1] = - reinterpret_cast(&assertion.file); - exception_record.ExceptionInformation[2] = assertion.line; - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - &exception_ptrs, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs, - &assertion); - } - - if (!success) { - if (current_handler->previous_iph_) { - // The handler didn't fully handle the exception. Give it to the - // previous invalid parameter handler. - current_handler->previous_iph_(expression, - function, - file, - line, - reserved); - } else { - // If there's no previous handler, pass the exception back in to the - // invalid parameter handler's core. That's the routine that called this - // function, but now, since this function is no longer registered (and in - // fact, no function at all is registered), this will result in the - // default code path being taken: _CRT_DEBUGGER_HOOK and _invoke_watson. - // Use _invalid_parameter where it exists (in _DEBUG builds) as it passes - // more information through. In non-debug builds, it is not available, - // so fall back to using _invalid_parameter_noinfo. See invarg.c in the - // CRT source. -#ifdef _DEBUG - _invalid_parameter(expression, function, file, line, reserved); -#else // _DEBUG - _invalid_parameter_noinfo(); -#endif // _DEBUG - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} -#endif // _MSC_VER >= 1400 - -// static -void ExceptionHandler::HandlePureVirtualCall() { - // This is an pure virtual function call, not an exception. It's safe to - // play with sprintf here. - AutoExceptionHandler auto_exception_handler; - ExceptionHandler* current_handler = auto_exception_handler.get_handler(); - - MDRawAssertionInfo assertion; - memset(&assertion, 0, sizeof(assertion)); - assertion.type = MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL; - - // Make up an exception record for the current thread and CPU context - // to make it possible for the crash processor to classify these - // as do regular crashes, and to make it humane for developers to - // analyze them. - EXCEPTION_RECORD exception_record = {}; - CONTEXT exception_context = {}; - EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; - - ::RtlCaptureContext(&exception_context); - - exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; - - // We store pointers to the the expression and function strings, - // and the line as exception parameters to make them easy to - // access by the developer on the far side. - exception_record.NumberParameters = 3; - exception_record.ExceptionInformation[0] = - reinterpret_cast(&assertion.expression); - exception_record.ExceptionInformation[1] = - reinterpret_cast(&assertion.file); - exception_record.ExceptionInformation[2] = assertion.line; - - bool success = false; - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - - if (current_handler->IsOutOfProcess()) { - success = current_handler->WriteMinidumpWithException( - GetCurrentThreadId(), - &exception_ptrs, - &assertion); - } else { - success = current_handler->WriteMinidumpOnHandlerThread(&exception_ptrs, - &assertion); - } - - if (!success) { - if (current_handler->previous_pch_) { - // The handler didn't fully handle the exception. Give it to the - // previous purecall handler. - current_handler->previous_pch_(); - } else { - // If there's no previous handler, return and let _purecall handle it. - // This will just put up an assertion dialog. - return; - } - } - - // The handler either took care of the invalid parameter problem itself, - // or passed it on to another handler. "Swallow" it by exiting, paralleling - // the behavior of "swallowing" exceptions. - exit(0); -} - -bool ExceptionHandler::WriteMinidumpOnHandlerThread( - EXCEPTION_POINTERS* exinfo, MDRawAssertionInfo* assertion) { - EnterCriticalSection(&handler_critical_section_); - - // There isn't much we can do if the handler thread - // was not successfully created. - if (handler_thread_ == NULL) { - LeaveCriticalSection(&handler_critical_section_); - return false; - } - - // The handler thread should only be created when the semaphores are valid. - assert(handler_start_semaphore_ != NULL); - assert(handler_finish_semaphore_ != NULL); - - // Set up data to be passed in to the handler thread. - requesting_thread_id_ = GetCurrentThreadId(); - exception_info_ = exinfo; - assertion_ = assertion; - - // This causes the handler thread to call WriteMinidumpWithException. - ReleaseSemaphore(handler_start_semaphore_, 1, NULL); - - // Wait until WriteMinidumpWithException is done and collect its return value. - WaitForSingleObject(handler_finish_semaphore_, INFINITE); - bool status = handler_return_value_; - - // Clean up. - requesting_thread_id_ = 0; - exception_info_ = NULL; - assertion_ = NULL; - - LeaveCriticalSection(&handler_critical_section_); - - return status; -} - -bool ExceptionHandler::WriteMinidump() { - // Make up an exception record for the current thread and CPU context - // to make it possible for the crash processor to classify these - // as do regular crashes, and to make it humane for developers to - // analyze them. - EXCEPTION_RECORD exception_record = {}; - CONTEXT exception_context = {}; - EXCEPTION_POINTERS exception_ptrs = { &exception_record, &exception_context }; - - ::RtlCaptureContext(&exception_context); - exception_record.ExceptionCode = STATUS_NONCONTINUABLE_EXCEPTION; - - return WriteMinidumpForException(&exception_ptrs); -} - -bool ExceptionHandler::WriteMinidumpForException(EXCEPTION_POINTERS* exinfo) { - // In case of out-of-process dump generation, directly call - // WriteMinidumpWithException since there is no separate thread running. - if (IsOutOfProcess()) { - return WriteMinidumpWithException(GetCurrentThreadId(), - exinfo, - NULL); - } - - bool success = WriteMinidumpOnHandlerThread(exinfo, NULL); - UpdateNextID(); - return success; -} - -// static -bool ExceptionHandler::WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, - void* callback_context) { - ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); - return handler.WriteMinidump(); -} - -// static -bool ExceptionHandler::WriteMinidumpForChild(HANDLE child, - DWORD child_blamed_thread, - const wstring& dump_path, - MinidumpCallback callback, - void* callback_context) { - EXCEPTION_RECORD ex; - CONTEXT ctx; - EXCEPTION_POINTERS exinfo = { NULL, NULL }; - DWORD last_suspend_count = kFailedToSuspendThread; - HANDLE child_thread_handle = OpenThread(THREAD_GET_CONTEXT | - THREAD_QUERY_INFORMATION | - THREAD_SUSPEND_RESUME, - FALSE, - child_blamed_thread); - // This thread may have died already, so not opening the handle is a - // non-fatal error. - if (child_thread_handle != NULL) { - last_suspend_count = SuspendThread(child_thread_handle); - if (last_suspend_count != kFailedToSuspendThread) { - ctx.ContextFlags = CONTEXT_ALL; - if (GetThreadContext(child_thread_handle, &ctx)) { - memset(&ex, 0, sizeof(ex)); - ex.ExceptionCode = EXCEPTION_BREAKPOINT; -#if defined(_M_IX86) - ex.ExceptionAddress = reinterpret_cast(ctx.Eip); -#elif defined(_M_X64) - ex.ExceptionAddress = reinterpret_cast(ctx.Rip); -#endif - exinfo.ExceptionRecord = &ex; - exinfo.ContextRecord = &ctx; - } - } - } - - ExceptionHandler handler(dump_path, NULL, callback, callback_context, - HANDLER_NONE); - bool success = handler.WriteMinidumpWithExceptionForProcess( - child_blamed_thread, - exinfo.ExceptionRecord ? &exinfo : NULL, - NULL, child, false); - - if (last_suspend_count != kFailedToSuspendThread) { - ResumeThread(child_thread_handle); - } - - CloseHandle(child_thread_handle); - - if (callback) { - success = callback(handler.dump_path_c_, handler.next_minidump_id_c_, - callback_context, NULL, NULL, success); - } - - return success; -} - -bool ExceptionHandler::WriteMinidumpWithException( - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion) { - // Give user code a chance to approve or prevent writing a minidump. If the - // filter returns false, don't handle the exception at all. If this method - // was called as a result of an exception, returning false will cause - // HandleException to call any previous handler or return - // EXCEPTION_CONTINUE_SEARCH on the exception thread, allowing it to appear - // as though this handler were not present at all. - if (filter_ && !filter_(callback_context_, exinfo, assertion)) { - return false; - } - - bool success = false; - if (IsOutOfProcess()) { - success = crash_generation_client_->RequestDump(exinfo, assertion); - } else { - success = WriteMinidumpWithExceptionForProcess(requesting_thread_id, - exinfo, - assertion, - GetCurrentProcess(), - true); - } - - if (callback_) { - // TODO(munjal): In case of out-of-process dump generation, both - // dump_path_c_ and next_minidump_id_ will be NULL. For out-of-process - // scenario, the server process ends up creating the dump path and dump - // id so they are not known to the client. - success = callback_(dump_path_c_, next_minidump_id_c_, callback_context_, - exinfo, assertion, success); - } - - return success; -} - -// static -BOOL CALLBACK ExceptionHandler::MinidumpWriteDumpCallback( - PVOID context, - const PMINIDUMP_CALLBACK_INPUT callback_input, - PMINIDUMP_CALLBACK_OUTPUT callback_output) { - switch (callback_input->CallbackType) { - case MemoryCallback: { - MinidumpCallbackContext* callback_context = - reinterpret_cast(context); - if (callback_context->iter == callback_context->end) - return FALSE; - - // Include the specified memory region. - callback_output->MemoryBase = callback_context->iter->ptr; - callback_output->MemorySize = callback_context->iter->length; - callback_context->iter++; - return TRUE; - } - - // Include all modules. - case IncludeModuleCallback: - case ModuleCallback: - return TRUE; - - // Include all threads. - case IncludeThreadCallback: - case ThreadCallback: - return TRUE; - - // Stop receiving cancel callbacks. - case CancelCallback: - callback_output->CheckCancel = FALSE; - callback_output->Cancel = FALSE; - return TRUE; - } - // Ignore other callback types. - return FALSE; -} - -bool ExceptionHandler::WriteMinidumpWithExceptionForProcess( - DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - HANDLE process, - bool write_requester_stream) { - bool success = false; - if (minidump_write_dump_) { - HANDLE dump_file = CreateFile(next_minidump_path_c_, - GENERIC_WRITE, - 0, // no sharing - NULL, - CREATE_NEW, // fail if exists - FILE_ATTRIBUTE_NORMAL, - NULL); - if (dump_file != INVALID_HANDLE_VALUE) { - MINIDUMP_EXCEPTION_INFORMATION except_info; - except_info.ThreadId = requesting_thread_id; - except_info.ExceptionPointers = exinfo; - except_info.ClientPointers = FALSE; - - // Leave room in user_stream_array for possible breakpad and - // assertion info streams. - MINIDUMP_USER_STREAM user_stream_array[2]; - MINIDUMP_USER_STREAM_INFORMATION user_streams; - user_streams.UserStreamCount = 0; - user_streams.UserStreamArray = user_stream_array; - - if (write_requester_stream) { - // Add an MDRawBreakpadInfo stream to the minidump, to provide - // additional information about the exception handler to the Breakpad - // processor. The information will help the processor determine which - // threads are relevant. The Breakpad processor does not require this - // information but can function better with Breakpad-generated dumps - // when it is present. The native debugger is not harmed by the - // presence of this information. - MDRawBreakpadInfo breakpad_info; - breakpad_info.validity = MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID | - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID; - breakpad_info.dump_thread_id = GetCurrentThreadId(); - breakpad_info.requesting_thread_id = requesting_thread_id; - - int index = user_streams.UserStreamCount; - user_stream_array[index].Type = MD_BREAKPAD_INFO_STREAM; - user_stream_array[index].BufferSize = sizeof(breakpad_info); - user_stream_array[index].Buffer = &breakpad_info; - ++user_streams.UserStreamCount; - } - - if (assertion) { - int index = user_streams.UserStreamCount; - user_stream_array[index].Type = MD_ASSERTION_INFO_STREAM; - user_stream_array[index].BufferSize = sizeof(MDRawAssertionInfo); - user_stream_array[index].Buffer = assertion; - ++user_streams.UserStreamCount; - } - - // Older versions of DbgHelp.dll don't correctly put the memory around - // the faulting instruction pointer into the minidump. This - // callback will ensure that it gets included. - if (exinfo) { - // Find a memory region of 256 bytes centered on the - // faulting instruction pointer. - const ULONG64 instruction_pointer = -#if defined(_M_IX86) - exinfo->ContextRecord->Eip; -#elif defined(_M_AMD64) - exinfo->ContextRecord->Rip; -#else -#error Unsupported platform -#endif - - MEMORY_BASIC_INFORMATION info; - if (VirtualQueryEx(process, - reinterpret_cast(instruction_pointer), - &info, - sizeof(MEMORY_BASIC_INFORMATION)) != 0 && - info.State == MEM_COMMIT) { - // Attempt to get 128 bytes before and after the instruction - // pointer, but settle for whatever's available up to the - // boundaries of the memory region. - const ULONG64 kIPMemorySize = 256; - ULONG64 base = - (std::max)(reinterpret_cast(info.BaseAddress), - instruction_pointer - (kIPMemorySize / 2)); - ULONG64 end_of_range = - (std::min)(instruction_pointer + (kIPMemorySize / 2), - reinterpret_cast(info.BaseAddress) - + info.RegionSize); - ULONG size = static_cast(end_of_range - base); - - AppMemory& elt = app_memory_info_.front(); - elt.ptr = base; - elt.length = size; - } - } - - MinidumpCallbackContext context; - context.iter = app_memory_info_.begin(); - context.end = app_memory_info_.end(); - - // Skip the reserved element if there was no instruction memory - if (context.iter->ptr == 0) { - context.iter++; - } - - MINIDUMP_CALLBACK_INFORMATION callback; - callback.CallbackRoutine = MinidumpWriteDumpCallback; - callback.CallbackParam = reinterpret_cast(&context); - - // The explicit comparison to TRUE avoids a warning (C4800). - success = (minidump_write_dump_(process, - GetProcessId(process), - dump_file, - dump_type_, - exinfo ? &except_info : NULL, - &user_streams, - &callback) == TRUE); - - CloseHandle(dump_file); - } - } - - return success; -} - -void ExceptionHandler::UpdateNextID() { - assert(uuid_create_); - UUID id = {0}; - if (uuid_create_) { - uuid_create_(&id); - } - next_minidump_id_ = GUIDString::GUIDToWString(&id); - next_minidump_id_c_ = next_minidump_id_.c_str(); - - wchar_t minidump_path[MAX_PATH]; - swprintf(minidump_path, MAX_PATH, L"%s\\%s.dmp", - dump_path_c_, next_minidump_id_c_); - - // remove when VC++7.1 is no longer supported - minidump_path[MAX_PATH - 1] = L'\0'; - - next_minidump_path_ = minidump_path; - next_minidump_path_c_ = next_minidump_path_.c_str(); -} - -void ExceptionHandler::RegisterAppMemory(void* ptr, size_t length) { - AppMemoryList::iterator iter = - std::find(app_memory_info_.begin(), app_memory_info_.end(), ptr); - if (iter != app_memory_info_.end()) { - // Don't allow registering the same pointer twice. - return; - } - - AppMemory app_memory; - app_memory.ptr = reinterpret_cast(ptr); - app_memory.length = static_cast(length); - app_memory_info_.push_back(app_memory); -} - -void ExceptionHandler::UnregisterAppMemory(void* ptr) { - AppMemoryList::iterator iter = - std::find(app_memory_info_.begin(), app_memory_info_.end(), ptr); - if (iter != app_memory_info_.end()) { - app_memory_info_.erase(iter); - } -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h b/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h deleted file mode 100644 index e3cd8146b3b0dc..00000000000000 --- a/Telegram/ThirdParty/breakpad/client/windows/handler/exception_handler.h +++ /dev/null @@ -1,522 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// ExceptionHandler can write a minidump file when an exception occurs, -// or when WriteMinidump() is called explicitly by your program. -// -// To have the exception handler write minidumps when an uncaught exception -// (crash) occurs, you should create an instance early in the execution -// of your program, and keep it around for the entire time you want to -// have crash handling active (typically, until shutdown). -// -// If you want to write minidumps without installing the exception handler, -// you can create an ExceptionHandler with install_handler set to false, -// then call WriteMinidump. You can also use this technique if you want to -// use different minidump callbacks for different call sites. -// -// In either case, a callback function is called when a minidump is written, -// which receives the unqiue id of the minidump. The caller can use this -// id to collect and write additional application state, and to launch an -// external crash-reporting application. -// -// It is important that creation and destruction of ExceptionHandler objects -// be nested cleanly, when using install_handler = true. -// Avoid the following pattern: -// ExceptionHandler *e = new ExceptionHandler(...); -// ExceptionHandler *f = new ExceptionHandler(...); -// delete e; -// This will put the exception filter stack into an inconsistent state. - -#ifndef CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ -#define CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ - -#include -#include -#include -#include - -#pragma warning(push) -// Disable exception handler warnings. -#pragma warning(disable:4530) - -#include -#include -#include - -#include "client/windows/common/ipc_protocol.h" -#include "client/windows/crash_generation/crash_generation_client.h" -#include "common/scoped_ptr.h" -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -using std::vector; -using std::wstring; - -// These entries store a list of memory regions that the client wants included -// in the minidump. -struct AppMemory { - ULONG64 ptr; - ULONG length; - - bool operator==(const struct AppMemory& other) const { - return ptr == other.ptr; - } - - bool operator==(const void* other) const { - return ptr == reinterpret_cast(other); - } -}; -typedef std::list AppMemoryList; - -class ExceptionHandler { - public: - // A callback function to run before Breakpad performs any substantial - // processing of an exception. A FilterCallback is called before writing - // a minidump. context is the parameter supplied by the user as - // callback_context when the handler was created. exinfo points to the - // exception record, if any; assertion points to assertion information, - // if any. - // - // If a FilterCallback returns true, Breakpad will continue processing, - // attempting to write a minidump. If a FilterCallback returns false, - // Breakpad will immediately report the exception as unhandled without - // writing a minidump, allowing another handler the opportunity to handle it. - typedef bool (*FilterCallback)(void* context, EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // A callback function to run after the minidump has been written. - // minidump_id is a unique id for the dump, so the minidump - // file is \.dmp. context is the parameter supplied - // by the user as callback_context when the handler was created. exinfo - // points to the exception record, or NULL if no exception occurred. - // succeeded indicates whether a minidump file was successfully written. - // assertion points to information about an assertion if the handler was - // invoked by an assertion. - // - // If an exception occurred and the callback returns true, Breakpad will treat - // the exception as fully-handled, suppressing any other handlers from being - // notified of the exception. If the callback returns false, Breakpad will - // treat the exception as unhandled, and allow another handler to handle it. - // If there are no other handlers, Breakpad will report the exception to the - // system as unhandled, allowing a debugger or native crash dialog the - // opportunity to handle the exception. Most callback implementations - // should normally return the value of |succeeded|, or when they wish to - // not report an exception of handled, false. Callbacks will rarely want to - // return true directly (unless |succeeded| is true). - // - // For out-of-process dump generation, dump path and minidump ID will always - // be NULL. In case of out-of-process dump generation, the dump path and - // minidump id are controlled by the server process and are not communicated - // back to the crashing process. - typedef bool (*MinidumpCallback)(const wchar_t* dump_path, - const wchar_t* minidump_id, - void* context, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - bool succeeded); - - // HandlerType specifies which types of handlers should be installed, if - // any. Use HANDLER_NONE for an ExceptionHandler that remains idle, - // without catching any failures on its own. This type of handler may - // still be triggered by calling WriteMinidump. Otherwise, use a - // combination of the other HANDLER_ values, or HANDLER_ALL to install - // all handlers. - enum HandlerType { - HANDLER_NONE = 0, - HANDLER_EXCEPTION = 1 << 0, // SetUnhandledExceptionFilter - HANDLER_INVALID_PARAMETER = 1 << 1, // _set_invalid_parameter_handler - HANDLER_PURECALL = 1 << 2, // _set_purecall_handler - HANDLER_ALL = HANDLER_EXCEPTION | - HANDLER_INVALID_PARAMETER | - HANDLER_PURECALL - }; - - // Creates a new ExceptionHandler instance to handle writing minidumps. - // Before writing a minidump, the optional filter callback will be called. - // Its return value determines whether or not Breakpad should write a - // minidump. Minidump files will be written to dump_path, and the optional - // callback is called after writing the dump file, as described above. - // handler_types specifies the types of handlers that should be installed. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types); - - // Creates a new ExceptionHandler instance that can attempt to perform - // out-of-process dump generation if pipe_name is not NULL. If pipe_name is - // NULL, or if out-of-process dump generation registration step fails, - // in-process dump generation will be used. This also allows specifying - // the dump type to generate. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - const CustomClientInfo* custom_info); - - // As above, creates a new ExceptionHandler instance to perform - // out-of-process dump generation if the given pipe_handle is not NULL. - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - HANDLE pipe_handle, - const CustomClientInfo* custom_info); - - // ExceptionHandler that ENSURES out-of-process dump generation. Expects a - // crash generation client that is already registered with a crash generation - // server. Takes ownership of the passed-in crash_generation_client. - // - // Usage example: - // crash_generation_client = new CrashGenerationClient(..); - // if (crash_generation_client->Register()) { - // // Registration with the crash generation server succeeded. - // // Out-of-process dump generation is guaranteed. - // g_handler = new ExceptionHandler(.., crash_generation_client, ..); - // return true; - // } - ExceptionHandler(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - CrashGenerationClient* crash_generation_client); - - ~ExceptionHandler(); - - // Get and set the minidump path. - wstring dump_path() const { return dump_path_; } - void set_dump_path(const wstring &dump_path) { - dump_path_ = dump_path; - dump_path_c_ = dump_path_.c_str(); - UpdateNextID(); // Necessary to put dump_path_ in next_minidump_path_. - } - - // Requests that a previously reported crash be uploaded. - bool RequestUpload(DWORD crash_id); - - // Writes a minidump immediately. This can be used to capture the - // execution state independently of a crash. Returns true on success. - bool WriteMinidump(); - - // Writes a minidump immediately, with the user-supplied exception - // information. - bool WriteMinidumpForException(EXCEPTION_POINTERS* exinfo); - - // Convenience form of WriteMinidump which does not require an - // ExceptionHandler instance. - static bool WriteMinidump(const wstring &dump_path, - MinidumpCallback callback, void* callback_context); - - // Write a minidump of |child| immediately. This can be used to - // capture the execution state of |child| independently of a crash. - // Pass a meaningful |child_blamed_thread| to make that thread in - // the child process the one from which a crash signature is - // extracted. - static bool WriteMinidumpForChild(HANDLE child, - DWORD child_blamed_thread, - const wstring& dump_path, - MinidumpCallback callback, - void* callback_context); - - // Get the thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). This - // may be useful if you want to include additional thread state in your - // dumps. - DWORD get_requesting_thread_id() const { return requesting_thread_id_; } - - // Controls behavior of EXCEPTION_BREAKPOINT and EXCEPTION_SINGLE_STEP. - bool get_handle_debug_exceptions() const { return handle_debug_exceptions_; } - void set_handle_debug_exceptions(bool handle_debug_exceptions) { - handle_debug_exceptions_ = handle_debug_exceptions; - } - - // Controls behavior of EXCEPTION_INVALID_HANDLE. - bool get_consume_invalid_handle_exceptions() const { - return consume_invalid_handle_exceptions_; - } - void set_consume_invalid_handle_exceptions( - bool consume_invalid_handle_exceptions) { - consume_invalid_handle_exceptions_ = consume_invalid_handle_exceptions; - } - - // Returns whether out-of-process dump generation is used or not. - bool IsOutOfProcess() const { return crash_generation_client_.get() != NULL; } - - // Calling RegisterAppMemory(p, len) causes len bytes starting - // at address p to be copied to the minidump when a crash happens. - void RegisterAppMemory(void* ptr, size_t length); - void UnregisterAppMemory(void* ptr); - - private: - friend class AutoExceptionHandler; - - // Initializes the instance with given values. - void Initialize(const wstring& dump_path, - FilterCallback filter, - MinidumpCallback callback, - void* callback_context, - int handler_types, - MINIDUMP_TYPE dump_type, - const wchar_t* pipe_name, - HANDLE pipe_handle, - CrashGenerationClient* crash_generation_client, - const CustomClientInfo* custom_info); - - // Function pointer type for MiniDumpWriteDump, which is looked up - // dynamically. - typedef BOOL (WINAPI *MiniDumpWriteDump_type)( - HANDLE hProcess, - DWORD dwPid, - HANDLE hFile, - MINIDUMP_TYPE DumpType, - CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, - CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, - CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam); - - // Function pointer type for UuidCreate, which is looked up dynamically. - typedef RPC_STATUS (RPC_ENTRY *UuidCreate_type)(UUID* Uuid); - - // Runs the main loop for the exception handler thread. - static DWORD WINAPI ExceptionHandlerThreadMain(void* lpParameter); - - // Called on the exception thread when an unhandled exception occurs. - // Signals the exception handler thread to handle the exception. - static LONG WINAPI HandleException(EXCEPTION_POINTERS* exinfo); - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // This function will be called by some CRT functions when they detect - // that they were passed an invalid parameter. Note that in _DEBUG builds, - // the CRT may display an assertion dialog before calling this function, - // and the function will not be called unless the assertion dialog is - // dismissed by clicking "Ignore." - static void HandleInvalidParameter(const wchar_t* expression, - const wchar_t* function, - const wchar_t* file, - unsigned int line, - uintptr_t reserved); -#endif // _MSC_VER >= 1400 - - // This function will be called by the CRT when a pure virtual - // function is called. - static void HandlePureVirtualCall(); - - // This is called on the exception thread or on another thread that - // the user wishes to produce a dump from. It calls - // WriteMinidumpWithException on the handler thread, avoiding stack - // overflows and inconsistent dumps due to writing the dump from - // the exception thread. If the dump is requested as a result of an - // exception, exinfo contains exception information, otherwise, it - // is NULL. If the dump is requested as a result of an assertion - // (such as an invalid parameter being passed to a CRT function), - // assertion contains data about the assertion, otherwise, it is NULL. - bool WriteMinidumpOnHandlerThread(EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function is called on the handler thread. It calls into - // WriteMinidumpWithExceptionForProcess() with a handle to the - // current process. requesting_thread_id is the ID of the thread - // that requested the dump. If the dump is requested as a result of - // an exception, exinfo contains exception information, otherwise, - // it is NULL. - bool WriteMinidumpWithException(DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion); - - // This function is used as a callback when calling MinidumpWriteDump, - // in order to add additional memory regions to the dump. - static BOOL CALLBACK MinidumpWriteDumpCallback( - PVOID context, - const PMINIDUMP_CALLBACK_INPUT callback_input, - PMINIDUMP_CALLBACK_OUTPUT callback_output); - - // This function does the actual writing of a minidump. It is - // called on the handler thread. requesting_thread_id is the ID of - // the thread that requested the dump, if that information is - // meaningful. If the dump is requested as a result of an - // exception, exinfo contains exception information, otherwise, it - // is NULL. process is the one that will be dumped. If - // requesting_thread_id is meaningful and should be added to the - // minidump, write_requester_stream is |true|. - bool WriteMinidumpWithExceptionForProcess(DWORD requesting_thread_id, - EXCEPTION_POINTERS* exinfo, - MDRawAssertionInfo* assertion, - HANDLE process, - bool write_requester_stream); - - // Generates a new ID and stores it in next_minidump_id_, and stores the - // path of the next minidump to be written in next_minidump_path_. - void UpdateNextID(); - - FilterCallback filter_; - MinidumpCallback callback_; - void* callback_context_; - - scoped_ptr crash_generation_client_; - - // The directory in which a minidump will be written, set by the dump_path - // argument to the constructor, or set_dump_path. - wstring dump_path_; - - // The basename of the next minidump to be written, without the extension. - wstring next_minidump_id_; - - // The full pathname of the next minidump to be written, including the file - // extension. - wstring next_minidump_path_; - - // Pointers to C-string representations of the above. These are set when - // the above wstring versions are set in order to avoid calling c_str during - // an exception, as c_str may attempt to allocate heap memory. These - // pointers are not owned by the ExceptionHandler object, but their lifetimes - // should be equivalent to the lifetimes of the associated wstring, provided - // that the wstrings are not altered. - const wchar_t* dump_path_c_; - const wchar_t* next_minidump_id_c_; - const wchar_t* next_minidump_path_c_; - - HMODULE dbghelp_module_; - MiniDumpWriteDump_type minidump_write_dump_; - MINIDUMP_TYPE dump_type_; - - HMODULE rpcrt4_module_; - UuidCreate_type uuid_create_; - - // Tracks the handler types that were installed according to the - // handler_types constructor argument. - int handler_types_; - - // When installed_handler_ is true, previous_filter_ is the unhandled - // exception filter that was set prior to installing ExceptionHandler as - // the unhandled exception filter and pointing it to |this|. NULL indicates - // that there is no previous unhandled exception filter. - LPTOP_LEVEL_EXCEPTION_FILTER previous_filter_; - -#if _MSC_VER >= 1400 // MSVC 2005/8 - // Beginning in VC 8, the CRT provides an invalid parameter handler that will - // be called when some CRT functions are passed invalid parameters. In - // earlier CRTs, the same conditions would cause unexpected behavior or - // crashes. - _invalid_parameter_handler previous_iph_; -#endif // _MSC_VER >= 1400 - - // The CRT allows you to override the default handler for pure - // virtual function calls. - _purecall_handler previous_pch_; - - // The exception handler thread. - HANDLE handler_thread_; - - // True if the exception handler is being destroyed. - // Starting with MSVC 2005, Visual C has stronger guarantees on volatile vars. - // It has release semantics on write and acquire semantics on reads. - // See the msdn documentation. - volatile bool is_shutdown_; - - // The critical section enforcing the requirement that only one exception be - // handled by a handler at a time. - CRITICAL_SECTION handler_critical_section_; - - // Semaphores used to move exception handling between the exception thread - // and the handler thread. handler_start_semaphore_ is signalled by the - // exception thread to wake up the handler thread when an exception occurs. - // handler_finish_semaphore_ is signalled by the handler thread to wake up - // the exception thread when handling is complete. - HANDLE handler_start_semaphore_; - HANDLE handler_finish_semaphore_; - - // The next 2 fields contain data passed from the requesting thread to - // the handler thread. - - // The thread ID of the thread requesting the dump (either the exception - // thread or any other thread that called WriteMinidump directly). - DWORD requesting_thread_id_; - - // The exception info passed to the exception handler on the exception - // thread, if an exception occurred. NULL for user-requested dumps. - EXCEPTION_POINTERS* exception_info_; - - // If the handler is invoked due to an assertion, this will contain a - // pointer to the assertion information. It is NULL at other times. - MDRawAssertionInfo* assertion_; - - // The return value of the handler, passed from the handler thread back to - // the requesting thread. - bool handler_return_value_; - - // If true, the handler will intercept EXCEPTION_BREAKPOINT and - // EXCEPTION_SINGLE_STEP exceptions. Leave this false (the default) - // to not interfere with debuggers. - bool handle_debug_exceptions_; - - // If true, the handler will consume any EXCEPTION_INVALID_HANDLE exceptions. - // Leave this false (the default) to handle these exceptions as normal. - bool consume_invalid_handle_exceptions_; - - // Callers can request additional memory regions to be included in - // the dump. - AppMemoryList app_memory_info_; - - // A stack of ExceptionHandler objects that have installed unhandled - // exception filters. This vector is used by HandleException to determine - // which ExceptionHandler object to route an exception to. When an - // ExceptionHandler is created with install_handler true, it will append - // itself to this list. - static vector* handler_stack_; - - // The index of the ExceptionHandler in handler_stack_ that will handle the - // next exception. Note that 0 means the last entry in handler_stack_, 1 - // means the next-to-last entry, and so on. This is used by HandleException - // to support multiple stacked Breakpad handlers. - static LONG handler_stack_index_; - - // handler_stack_critical_section_ guards operations on handler_stack_ and - // handler_stack_index_. The critical section is initialized by the - // first instance of the class and destroyed by the last instance of it. - static CRITICAL_SECTION handler_stack_critical_section_; - - // The number of instances of this class. - static volatile LONG instance_count_; - - // disallow copy ctor and operator= - explicit ExceptionHandler(const ExceptionHandler &); - void operator=(const ExceptionHandler &); -}; - -} // namespace google_breakpad - -#pragma warning(pop) - -#endif // CLIENT_WINDOWS_HANDLER_EXCEPTION_HANDLER_H__ diff --git a/Telegram/ThirdParty/breakpad/common/convert_UTF.c b/Telegram/ThirdParty/breakpad/common/convert_UTF.c deleted file mode 100644 index 12a3c891741d33..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/convert_UTF.c +++ /dev/null @@ -1,554 +0,0 @@ -/* - * Copyright © 1991-2015 Unicode, Inc. All rights reserved. - * Distributed under the Terms of Use in - * http://www.unicode.org/copyright.html. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of the Unicode data files and any associated documentation - * (the "Data Files") or Unicode software and any associated documentation - * (the "Software") to deal in the Data Files or Software - * without restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, and/or sell copies of - * the Data Files or Software, and to permit persons to whom the Data Files - * or Software are furnished to do so, provided that - * (a) this copyright and permission notice appear with all copies - * of the Data Files or Software, - * (b) this copyright and permission notice appear in associated - * documentation, and - * (c) there is clear notice in each modified Data File or in the Software - * as well as in the documentation associated with the Data File(s) or - * Software that the data or software has been modified. - * - * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF - * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS - * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL - * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THE DATA FILES OR SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder - * shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in these Data Files or Software without prior - * written authorization of the copyright holder. - */ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Source code file. -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Sept 2001: fixed const & error conditions per -mods suggested by S. Parent & A. Lillich. -June 2002: Tim Dodd added detection and handling of incomplete -source sequences, enhanced error detection, added casts -to eliminate compiler warnings. -July 2003: slight mods to back out aggressive FFFE detection. -Jan 2004: updated switches in from-UTF8 conversions. -Oct 2004: updated to use UNI_MAX_LEGAL_UTF32 in UTF-32 conversions. - -See the header file "ConvertUTF.h" for complete documentation. - ------------------------------------------------------------------------- */ - - -#include "convert_UTF.h" -#ifdef CVTUTF_DEBUG -#include -#endif - -static const int halfShift = 10; /* used for shifting by 10 bits */ - -static const UTF32 halfBase = 0x0010000UL; -static const UTF32 halfMask = 0x3FFUL; - -#define UNI_SUR_HIGH_START (UTF32)0xD800 -#define UNI_SUR_HIGH_END (UTF32)0xDBFF -#define UNI_SUR_LOW_START (UTF32)0xDC00 -#define UNI_SUR_LOW_END (UTF32)0xDFFF - -#ifndef false -#define false 0 -#endif -#ifndef true -#define true 1 -#endif - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - if (target >= targetEnd) { - result = targetExhausted; break; - } - ch = *source++; - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32; 0xffff or 0xfffe are both reserved values */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_LEGAL_UTF32) { - if (flags == strictConversion) { - result = sourceIllegal; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - --source; /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF32* target = *targetStart; - UTF32 ch, ch2; - while (source < sourceEnd) { - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - if (target >= targetEnd) { - source = oldSource; /* Back up source pointer! */ - result = targetExhausted; break; - } - *target++ = ch; - } - *sourceStart = source; - *targetStart = target; -#ifdef CVTUTF_DEBUG - if (result == sourceIllegal) { - fprintf(stderr, "ConvertUTF16toUTF32 illegal seq 0x%04x,%04x\n", ch, ch2); - fflush(stderr); - } -#endif - return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Index into the table below with the first byte of a UTF-8 sequence to - * get the number of trailing bytes that are supposed to follow it. - * Note that *legal* UTF-8 values can't have 4 or 5-bytes. The table is - * left as-is for anyone who may want to do such conversion, which was - * allowed in earlier algorithms. - */ -static const char trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -/* - * Magic values subtracted from a buffer value during UTF8 conversion. - * This table contains as many values as there might be trailing bytes - * in a UTF-8 sequence. - */ -static const UTF32 offsetsFromUTF8[6] = { 0x00000000UL, 0x00003080UL, 0x000E2080UL, - 0x03C82080UL, 0xFA082080UL, 0x82082080UL }; - -/* - * Once the bits are split out into bytes of UTF-8, this is a mask OR-ed - * into the first byte, depending on how many bytes follow. There are - * as many entries in this table as there are UTF-8 sequence types. - * (I.e., one byte sequence, two byte... etc.). Remember that sequencs - * for *legal* UTF-8 will be 4 or fewer bytes total. - */ -static const UTF8 firstByteMark[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC }; - -/* --------------------------------------------------------------------- */ - -/* The interface converts a whole buffer to avoid function-call overhead. -* Constants have been gathered. Loops & conditionals have been removed as -* much as possible for efficiency, in favor of drop-through switches. -* (See "Note A" at the bottom of the file for equivalent code.) -* If your compiler supports it, the "isLegalUTF8" call can be turned -* into an inline function. -*/ - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF16* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - const UTF16* oldSource = source; /* In case we have to back up because of target overflow. */ - ch = *source++; - /* If we have a surrogate pair, convert to UTF32 first. */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_HIGH_END) { - /* If the 16 bits following the high surrogate are in the source buffer... */ - if (source < sourceEnd) { - UTF32 ch2 = *source; - /* If it's a low surrogate, convert to UTF32. */ - if (ch2 >= UNI_SUR_LOW_START && ch2 <= UNI_SUR_LOW_END) { - ch = ((ch - UNI_SUR_HIGH_START) << halfShift) - + (ch2 - UNI_SUR_LOW_START) + halfBase; - ++source; - } else if (flags == strictConversion) { /* it's an unpaired high surrogate */ - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } else { /* We don't have the 16 bits following the high surrogate. */ - --source; /* return to the high surrogate */ - result = sourceExhausted; - break; - } - } else if (flags == strictConversion) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_LOW_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* Figure out how many bytes the result will require */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch < (UTF32)0x110000) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - } - - target += bytesToWrite; - if (target > targetEnd) { - source = oldSource; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8)(ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -/* - * Utility routine to tell whether a sequence of bytes is legal UTF-8. - * This must be called with the length pre-determined by the first byte. - * If not calling this from ConvertUTF8to*, then the length can be set by: - * length = trailingBytesForUTF8[*source]+1; - * and the sequence is illegal right away if there aren't that many bytes - * available. - * If presented with a length > 4, this returns false. The Unicode - * definition of UTF-8 goes up to 4-byte sequences. - */ - -static Boolean isLegalUTF8(const UTF8 *source, int length) { - UTF8 a; - const UTF8 *srcptr = source+length; - switch (length) { - default: return false; - /* Everything else falls through when "true"... */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return false; - case 2: if ((a = (*--srcptr)) > 0xBF) return false; - - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return false; break; - case 0xED: if (a > 0x9F) return false; break; - case 0xF0: if (a < 0x90) return false; break; - case 0xF4: if (a > 0x8F) return false; break; - default: if (a < 0x80) return false; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return false; - } - if (*source > 0xF4) return false; - return true; -} - -/* --------------------------------------------------------------------- */ - -/* - * Exported function to return whether a UTF-8 sequence is legal or not. - * This is not used here; it's just exported. - */ -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd) { - int length = trailingBytesForUTF8[*source]+1; - if (source+length > sourceEnd) { - return false; - } - return isLegalUTF8(source, length); -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF16* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 4: ch += *source++; ch <<= 6; /* remember, illegal UTF-8 */ - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_BMP) { /* Target is a character <= 0xFFFF */ - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = (UTF16)ch; /* normal case */ - } - } else if (ch > UNI_MAX_UTF16) { - if (flags == strictConversion) { - result = sourceIllegal; - source -= (extraBytesToRead+1); /* return to the start */ - break; /* Bail out; shouldn't continue */ - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - /* target is a character in range 0xFFFF - 0x10FFFF. */ - if (target + 1 >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up source pointer! */ - result = targetExhausted; break; - } - ch -= halfBase; - *target++ = (UTF16)((ch >> halfShift) + UNI_SUR_HIGH_START); - *target++ = (UTF16)((ch & halfMask) + UNI_SUR_LOW_START); - } - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF32* source = *sourceStart; - UTF8* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch; - unsigned short bytesToWrite = 0; - const UTF32 byteMask = 0xBF; - const UTF32 byteMark = 0x80; - ch = *source++; - if (flags == strictConversion ) { - /* UTF-16 surrogate values are illegal in UTF-32 */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - --source; /* return to the illegal value itself */ - result = sourceIllegal; - break; - } - } - /* - * Figure out how many bytes the result will require. Turn any - * illegally large UTF32 things (> Plane 17) into replacement chars. - */ - if (ch < (UTF32)0x80) { bytesToWrite = 1; - } else if (ch < (UTF32)0x800) { bytesToWrite = 2; - } else if (ch < (UTF32)0x10000) { bytesToWrite = 3; - } else if (ch <= UNI_MAX_LEGAL_UTF32) { bytesToWrite = 4; - } else { bytesToWrite = 3; - ch = UNI_REPLACEMENT_CHAR; - result = sourceIllegal; - } - - target += bytesToWrite; - if (target > targetEnd) { - --source; /* Back up source pointer! */ - target -= bytesToWrite; result = targetExhausted; break; - } - switch (bytesToWrite) { /* note: everything falls through. */ - case 4: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 3: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 2: *--target = (UTF8)((ch | byteMark) & byteMask); ch >>= 6; - case 1: *--target = (UTF8) (ch | firstByteMark[bytesToWrite]); - } - target += bytesToWrite; - } -*sourceStart = source; -*targetStart = target; -return result; -} - -/* --------------------------------------------------------------------- */ - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags) { - ConversionResult result = conversionOK; - const UTF8* source = *sourceStart; - UTF32* target = *targetStart; - while (source < sourceEnd) { - UTF32 ch = 0; - unsigned short extraBytesToRead = trailingBytesForUTF8[*source]; - if (source + extraBytesToRead >= sourceEnd) { - result = sourceExhausted; break; - } - /* Do this check whether lenient or strict */ - if (! isLegalUTF8(source, extraBytesToRead+1)) { - result = sourceIllegal; - break; - } - /* - * The cases all fall through. See "Note A" below. - */ - switch (extraBytesToRead) { - case 5: ch += *source++; ch <<= 6; - case 4: ch += *source++; ch <<= 6; - case 3: ch += *source++; ch <<= 6; - case 2: ch += *source++; ch <<= 6; - case 1: ch += *source++; ch <<= 6; - case 0: ch += *source++; - } - ch -= offsetsFromUTF8[extraBytesToRead]; - - if (target >= targetEnd) { - source -= (extraBytesToRead+1); /* Back up the source pointer! */ - result = targetExhausted; break; - } - if (ch <= UNI_MAX_LEGAL_UTF32) { - /* - * UTF-16 surrogate values are illegal in UTF-32, and anything - * over Plane 17 (> 0x10FFFF) is illegal. - */ - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) { - if (flags == strictConversion) { - source -= (extraBytesToRead+1); /* return to the illegal value itself */ - result = sourceIllegal; - break; - } else { - *target++ = UNI_REPLACEMENT_CHAR; - } - } else { - *target++ = ch; - } - } else { /* i.e., ch > UNI_MAX_LEGAL_UTF32 */ - result = sourceIllegal; - *target++ = UNI_REPLACEMENT_CHAR; - } - } - *sourceStart = source; - *targetStart = target; - return result; -} - -/* --------------------------------------------------------------------- - -Note A. -The fall-through switches in UTF-8 reading code save a -temp variable, some decrements & conditionals. The switches -are equivalent to the following loop: -{ - int tmpBytesToRead = extraBytesToRead+1; - do { - ch += *source++; - --tmpBytesToRead; - if (tmpBytesToRead) ch <<= 6; - } while (tmpBytesToRead > 0); -} -In UTF-8 writing code, the switches on "bytesToWrite" are -similarly unrolled loops. - ---------------------------------------------------------------------- */ diff --git a/Telegram/ThirdParty/breakpad/common/convert_UTF.h b/Telegram/ThirdParty/breakpad/common/convert_UTF.h deleted file mode 100644 index 644d099506fbf2..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/convert_UTF.h +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Copyright © 1991-2015 Unicode, Inc. All rights reserved. - * Distributed under the Terms of Use in - * http://www.unicode.org/copyright.html. - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of the Unicode data files and any associated documentation - * (the "Data Files") or Unicode software and any associated documentation - * (the "Software") to deal in the Data Files or Software - * without restriction, including without limitation the rights to use, - * copy, modify, merge, publish, distribute, and/or sell copies of - * the Data Files or Software, and to permit persons to whom the Data Files - * or Software are furnished to do so, provided that - * (a) this copyright and permission notice appear with all copies - * of the Data Files or Software, - * (b) this copyright and permission notice appear in associated - * documentation, and - * (c) there is clear notice in each modified Data File or in the Software - * as well as in the documentation associated with the Data File(s) or - * Software that the data or software has been modified. - * - * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF - * ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - * NONINFRINGEMENT OF THIRD PARTY RIGHTS. - * IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS - * NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL - * DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THE DATA FILES OR SOFTWARE. - * - * Except as contained in this notice, the name of a copyright holder - * shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in these Data Files or Software without prior - * written authorization of the copyright holder. - */ - -#ifndef COMMON_CONVERT_UTF_H_ -#define COMMON_CONVERT_UTF_H_ - -/* --------------------------------------------------------------------- - -Conversions between UTF32, UTF-16, and UTF-8. Header file. - -Several funtions are included here, forming a complete set of -conversions between the three formats. UTF-7 is not included -here, but is handled in a separate source file. - -Each of these routines takes pointers to input buffers and output -buffers. The input buffers are const. - -Each routine converts the text between *sourceStart and sourceEnd, -putting the result into the buffer between *targetStart and -targetEnd. Note: the end pointers are *after* the last item: e.g. -*(sourceEnd - 1) is the last item. - -The return result indicates whether the conversion was successful, -and if not, whether the problem was in the source or target buffers. -(Only the first encountered problem is indicated.) - -After the conversion, *sourceStart and *targetStart are both -updated to point to the end of last text successfully converted in -the respective buffers. - -Input parameters: -sourceStart - pointer to a pointer to the source buffer. -The contents of this are modified on return so that -it points at the next thing to be converted. -targetStart - similarly, pointer to pointer to the target buffer. -sourceEnd, targetEnd - respectively pointers to the ends of the -two buffers, for overflow checking only. - -These conversion functions take a ConversionFlags argument. When this -flag is set to strict, both irregular sequences and isolated surrogates -will cause an error. When the flag is set to lenient, both irregular -sequences and isolated surrogates are converted. - -Whether the flag is strict or lenient, all illegal sequences will cause -an error return. This includes sequences such as: , , -or in UTF-8, and values above 0x10FFFF in UTF-32. Conformant code -must check for illegal sequences. - -When the flag is set to lenient, characters over 0x10FFFF are converted -to the replacement character; otherwise (when the flag is set to strict) -they constitute an error. - -Output parameters: -The value "sourceIllegal" is returned from some routines if the input -sequence is malformed. When "sourceIllegal" is returned, the source -value will point to the illegal value that caused the problem. E.g., -in UTF-8 when a sequence is malformed, it points to the start of the -malformed sequence. - -Author: Mark E. Davis, 1994. -Rev History: Rick McGowan, fixes & updates May 2001. -Fixes & updates, Sept 2001. - ------------------------------------------------------------------------- */ - -/* --------------------------------------------------------------------- -The following 4 definitions are compiler-specific. -The C standard does not guarantee that wchar_t has at least -16 bits, so wchar_t is no less portable than unsigned short! -All should be unsigned values to avoid sign extension during -bit mask & shift operations. ------------------------------------------------------------------------- */ - -typedef unsigned long UTF32; /* at least 32 bits */ -typedef unsigned short UTF16; /* at least 16 bits */ -typedef unsigned char UTF8; /* typically 8 bits */ -typedef unsigned char Boolean; /* 0 or 1 */ - -/* Some fundamental constants */ -#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD -#define UNI_MAX_BMP (UTF32)0x0000FFFF -#define UNI_MAX_UTF16 (UTF32)0x0010FFFF -#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF -#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF - -typedef enum { - conversionOK, /* conversion successful */ - sourceExhausted, /* partial character in source, but hit end */ - targetExhausted, /* insuff. room in target for conversion */ - sourceIllegal /* source sequence is illegal/malformed */ -} ConversionResult; - -typedef enum { - strictConversion = 0, - lenientConversion -} ConversionFlags; - -/* This is for C++ and does no harm in C */ -#ifdef __cplusplus -extern "C" { -#endif - -ConversionResult ConvertUTF8toUTF16 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF8 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF8toUTF32 (const UTF8** sourceStart, const UTF8* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF8 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF8** targetStart, UTF8* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF16toUTF32 (const UTF16** sourceStart, const UTF16* sourceEnd, - UTF32** targetStart, UTF32* targetEnd, ConversionFlags flags); - -ConversionResult ConvertUTF32toUTF16 (const UTF32** sourceStart, const UTF32* sourceEnd, - UTF16** targetStart, UTF16* targetEnd, ConversionFlags flags); - -Boolean isLegalUTF8Sequence(const UTF8 *source, const UTF8 *sourceEnd); - -#ifdef __cplusplus -} -#endif - -/* --------------------------------------------------------------------- */ - -#endif // COMMON_CONVERT_UTF_H_ diff --git a/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h b/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h deleted file mode 100644 index ec5a8d6b6b4a93..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/linux/linux_libc_support.h +++ /dev/null @@ -1,96 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// This header provides replacements for libc functions that we need. We if -// call the libc functions directly we risk crashing in the dynamic linker as -// it tries to resolve uncached PLT entries. - -#ifndef CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ -#define CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ - -#include -#include -#include - -extern "C" { - -extern size_t my_strlen(const char* s); - -extern int my_strcmp(const char* a, const char* b); - -extern int my_strncmp(const char* a, const char* b, size_t len); - -// Parse a non-negative integer. -// result: (output) the resulting non-negative integer -// s: a NUL terminated string -// Return true iff successful. -extern bool my_strtoui(int* result, const char* s); - -// Return the length of the given unsigned integer when expressed in base 10. -extern unsigned my_uint_len(uintmax_t i); - -// Convert an unsigned integer to a string -// output: (output) the resulting string is written here. This buffer must be -// large enough to hold the resulting string. Call |my_uint_len| to get the -// required length. -// i: the unsigned integer to serialise. -// i_len: the length of the integer in base 10 (see |my_uint_len|). -extern void my_uitos(char* output, uintmax_t i, unsigned i_len); - -extern const char* my_strchr(const char* haystack, char needle); - -extern const char* my_strrchr(const char* haystack, char needle); - -// Read a hex value -// result: (output) the resulting value -// s: a string -// Returns a pointer to the first invalid charactor. -extern const char* my_read_hex_ptr(uintptr_t* result, const char* s); - -extern const char* my_read_decimal_ptr(uintptr_t* result, const char* s); - -extern void my_memset(void* ip, char c, size_t len); - -extern void* my_memchr(const void* src, int c, size_t len); - -// The following are considered safe to use in a compromised environment. -// Besides, this gives the compiler an opportunity to optimize their calls. -#define my_memcpy memcpy -#define my_memmove memmove -#define my_memcmp memcmp - -extern size_t my_strlcpy(char* s1, const char* s2, size_t len); - -extern size_t my_strlcat(char* s1, const char* s2, size_t len); - -extern int my_isspace(int ch); - -} // extern "C" - -#endif // CLIENT_LINUX_LINUX_LIBC_SUPPORT_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h deleted file mode 100644 index 8df9165bb343f1..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.h +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// MachIPC.h -// -// Some helpful wrappers for using Mach IPC calls - -#ifndef MACH_IPC_H__ -#define MACH_IPC_H__ - -#import -#import -#import -#import - -#import - -//============================================================================== -// DISCUSSION: -// -// The three main classes of interest are -// -// MachMessage: a wrapper for a mach message of the following form -// mach_msg_header_t -// mach_msg_body_t -// optional descriptors -// optional extra message data -// -// MachReceiveMessage and MachSendMessage subclass MachMessage -// and are used instead of MachMessage which is an abstract base class -// -// ReceivePort: -// Represents a mach port for which we have receive rights -// -// MachPortSender: -// Represents a mach port for which we have send rights -// -// Here's an example to receive a message on a server port: -// -// // This creates our named server port -// ReceivePort receivePort("com.Google.MyService"); -// -// MachReceiveMessage message; -// kern_return_t result = receivePort.WaitForMessage(&message, 0); -// -// if (result == KERN_SUCCESS && message.GetMessageID() == 57) { -// mach_port_t task = message.GetTranslatedPort(0); -// mach_port_t thread = message.GetTranslatedPort(1); -// -// char *messageString = message.GetData(); -// -// printf("message string = %s\n", messageString); -// } -// -// Here is an example of using these classes to send a message to this port: -// -// // send to already named port -// MachPortSender sender("com.Google.MyService"); -// MachSendMessage message(57); // our message ID is 57 -// -// // add some ports to be translated for us -// message.AddDescriptor(mach_task_self()); // our task -// message.AddDescriptor(mach_thread_self()); // this thread -// -// char messageString[] = "Hello server!\n"; -// message.SetData(messageString, strlen(messageString)+1); -// -// kern_return_t result = sender.SendMessage(message, 1000); // timeout 1000ms -// - -namespace google_breakpad { -#define PRINT_MACH_RESULT(result_, message_) \ - printf(message_" %s (%d)\n", mach_error_string(result_), result_ ); - -//============================================================================== -// A wrapper class for mach_msg_port_descriptor_t (with same memory layout) -// with convenient constructors and accessors -class MachMsgPortDescriptor : public mach_msg_port_descriptor_t { - public: - // General-purpose constructor - MachMsgPortDescriptor(mach_port_t in_name, - mach_msg_type_name_t in_disposition) { - name = in_name; - pad1 = 0; - pad2 = 0; - disposition = in_disposition; - type = MACH_MSG_PORT_DESCRIPTOR; - } - - // For passing send rights to a port - MachMsgPortDescriptor(mach_port_t in_name) { - name = in_name; - pad1 = 0; - pad2 = 0; - disposition = MACH_MSG_TYPE_COPY_SEND; - type = MACH_MSG_PORT_DESCRIPTOR; - } - - // Copy constructor - MachMsgPortDescriptor(const MachMsgPortDescriptor& desc) { - name = desc.name; - pad1 = desc.pad1; - pad2 = desc.pad2; - disposition = desc.disposition; - type = desc.type; - } - - mach_port_t GetMachPort() const { - return name; - } - - mach_msg_type_name_t GetDisposition() const { - return disposition; - } - - // For convenience - operator mach_port_t() const { - return GetMachPort(); - } -}; - -//============================================================================== -// MachMessage: a wrapper for a mach message -// (mach_msg_header_t, mach_msg_body_t, extra data) -// -// This considerably simplifies the construction of a message for sending -// and the getting at relevant data and descriptors for the receiver. -// -// Currently the combined size of the descriptors plus data must be -// less than 1024. But as a benefit no memory allocation is necessary. -// -// TODO: could consider adding malloc() support for very large messages -// -// A MachMessage object is used by ReceivePort::WaitForMessage -// and MachPortSender::SendMessage -// -class MachMessage { - public: - - // The receiver of the message can retrieve the raw data this way - uint8_t *GetData() { - return GetDataLength() > 0 ? GetDataPacket()->data : NULL; - } - - uint32_t GetDataLength() { - return EndianU32_LtoN(GetDataPacket()->data_length); - } - - // The message ID may be used as a code identifying the type of message - void SetMessageID(int32_t message_id) { - GetDataPacket()->id = EndianU32_NtoL(message_id); - } - - int32_t GetMessageID() { return EndianU32_LtoN(GetDataPacket()->id); } - - // Adds a descriptor (typically a mach port) to be translated - // returns true if successful, otherwise not enough space - bool AddDescriptor(const MachMsgPortDescriptor &desc); - - int GetDescriptorCount() const { return body.msgh_descriptor_count; } - MachMsgPortDescriptor *GetDescriptor(int n); - - // Convenience method which gets the mach port described by the descriptor - mach_port_t GetTranslatedPort(int n); - - // A simple message is one with no descriptors - bool IsSimpleMessage() const { return GetDescriptorCount() == 0; } - - // Sets raw data for the message (returns false if not enough space) - bool SetData(void *data, int32_t data_length); - - protected: - // Consider this an abstract base class - must create an actual instance - // of MachReceiveMessage or MachSendMessage - - MachMessage() { - memset(this, 0, sizeof(MachMessage)); - } - - friend class ReceivePort; - friend class MachPortSender; - - // Represents raw data in our message - struct MessageDataPacket { - int32_t id; // little-endian - int32_t data_length; // little-endian - uint8_t data[1]; // actual size limited by sizeof(MachMessage) - }; - - MessageDataPacket* GetDataPacket(); - - void SetDescriptorCount(int n); - void SetDescriptor(int n, const MachMsgPortDescriptor &desc); - - // Returns total message size setting msgh_size in the header to this value - mach_msg_size_t CalculateSize(); - - mach_msg_header_t head; - mach_msg_body_t body; - uint8_t padding[1024]; // descriptors and data may be embedded here -}; - -//============================================================================== -// MachReceiveMessage and MachSendMessage are useful to separate the idea -// of a mach message being sent and being received, and adds increased type -// safety: -// ReceivePort::WaitForMessage() only accepts a MachReceiveMessage -// MachPortSender::SendMessage() only accepts a MachSendMessage - -//============================================================================== -class MachReceiveMessage : public MachMessage { - public: - MachReceiveMessage() : MachMessage() {}; -}; - -//============================================================================== -class MachSendMessage : public MachMessage { - public: - MachSendMessage(int32_t message_id); -}; - -//============================================================================== -// Represents a mach port for which we have receive rights -class ReceivePort { - public: - // Creates a new mach port for receiving messages and registers a name for it - explicit ReceivePort(const char *receive_port_name); - - // Given an already existing mach port, use it. We take ownership of the - // port and deallocate it in our destructor. - explicit ReceivePort(mach_port_t receive_port); - - // Create a new mach port for receiving messages - ReceivePort(); - - ~ReceivePort(); - - // Waits on the mach port until message received or timeout - kern_return_t WaitForMessage(MachReceiveMessage *out_message, - mach_msg_timeout_t timeout); - - // The underlying mach port that we wrap - mach_port_t GetPort() const { return port_; } - - private: - ReceivePort(const ReceivePort&); // disable copy c-tor - - mach_port_t port_; - kern_return_t init_result_; -}; - -//============================================================================== -// Represents a mach port for which we have send rights -class MachPortSender { - public: - // get a port with send rights corresponding to a named registered service - explicit MachPortSender(const char *receive_port_name); - - - // Given an already existing mach port, use it. - explicit MachPortSender(mach_port_t send_port); - - kern_return_t SendMessage(MachSendMessage &message, - mach_msg_timeout_t timeout); - - private: - MachPortSender(const MachPortSender&); // disable copy c-tor - - mach_port_t send_port_; - kern_return_t init_result_; -}; - -} // namespace google_breakpad - -#endif // MACH_IPC_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm b/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm deleted file mode 100644 index dc9773f77ad2f5..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/MachIPC.mm +++ /dev/null @@ -1,306 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// -// MachIPC.mm -// Wrapper for mach IPC calls - -#import -#import "MachIPC.h" -#include "common/mac/bootstrap_compat.h" - -namespace google_breakpad { -//============================================================================== -MachSendMessage::MachSendMessage(int32_t message_id) : MachMessage() { - head.msgh_bits = MACH_MSGH_BITS(MACH_MSG_TYPE_COPY_SEND, 0); - - // head.msgh_remote_port = ...; // filled out in MachPortSender::SendMessage() - head.msgh_local_port = MACH_PORT_NULL; - head.msgh_reserved = 0; - head.msgh_id = 0; - - SetDescriptorCount(0); // start out with no descriptors - - SetMessageID(message_id); - SetData(NULL, 0); // client may add data later -} - -//============================================================================== -// returns true if successful -bool MachMessage::SetData(void *data, - int32_t data_length) { - // first check to make sure we have enough space - size_t size = CalculateSize(); - size_t new_size = size + data_length; - - if (new_size > sizeof(MachMessage)) { - return false; // not enough space - } - - GetDataPacket()->data_length = EndianU32_NtoL(data_length); - if (data) memcpy(GetDataPacket()->data, data, data_length); - - CalculateSize(); - - return true; -} - -//============================================================================== -// calculates and returns the total size of the message -// Currently, the entire message MUST fit inside of the MachMessage -// messsage size <= sizeof(MachMessage) -mach_msg_size_t MachMessage::CalculateSize() { - size_t size = sizeof(mach_msg_header_t) + sizeof(mach_msg_body_t); - - // add space for MessageDataPacket - int32_t alignedDataLength = (GetDataLength() + 3) & ~0x3; - size += 2*sizeof(int32_t) + alignedDataLength; - - // add space for descriptors - size += GetDescriptorCount() * sizeof(MachMsgPortDescriptor); - - head.msgh_size = static_cast(size); - - return head.msgh_size; -} - -//============================================================================== -MachMessage::MessageDataPacket *MachMessage::GetDataPacket() { - size_t desc_size = sizeof(MachMsgPortDescriptor)*GetDescriptorCount(); - MessageDataPacket *packet = - reinterpret_cast(padding + desc_size); - - return packet; -} - -//============================================================================== -void MachMessage::SetDescriptor(int n, - const MachMsgPortDescriptor &desc) { - MachMsgPortDescriptor *desc_array = - reinterpret_cast(padding); - desc_array[n] = desc; -} - -//============================================================================== -// returns true if successful otherwise there was not enough space -bool MachMessage::AddDescriptor(const MachMsgPortDescriptor &desc) { - // first check to make sure we have enough space - int size = CalculateSize(); - size_t new_size = size + sizeof(MachMsgPortDescriptor); - - if (new_size > sizeof(MachMessage)) { - return false; // not enough space - } - - // unfortunately, we need to move the data to allow space for the - // new descriptor - u_int8_t *p = reinterpret_cast(GetDataPacket()); - bcopy(p, p+sizeof(MachMsgPortDescriptor), GetDataLength()+2*sizeof(int32_t)); - - SetDescriptor(GetDescriptorCount(), desc); - SetDescriptorCount(GetDescriptorCount() + 1); - - CalculateSize(); - - return true; -} - -//============================================================================== -void MachMessage::SetDescriptorCount(int n) { - body.msgh_descriptor_count = n; - - if (n > 0) { - head.msgh_bits |= MACH_MSGH_BITS_COMPLEX; - } else { - head.msgh_bits &= ~MACH_MSGH_BITS_COMPLEX; - } -} - -//============================================================================== -MachMsgPortDescriptor *MachMessage::GetDescriptor(int n) { - if (n < GetDescriptorCount()) { - MachMsgPortDescriptor *desc = - reinterpret_cast(padding); - return desc + n; - } - - return nil; -} - -//============================================================================== -mach_port_t MachMessage::GetTranslatedPort(int n) { - if (n < GetDescriptorCount()) { - return GetDescriptor(n)->GetMachPort(); - } - return MACH_PORT_NULL; -} - -#pragma mark - - -//============================================================================== -// create a new mach port for receiving messages and register a name for it -ReceivePort::ReceivePort(const char *receive_port_name) { - mach_port_t current_task = mach_task_self(); - - init_result_ = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &port_); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = mach_port_insert_right(current_task, - port_, - port_, - MACH_MSG_TYPE_MAKE_SEND); - - if (init_result_ != KERN_SUCCESS) - return; - - mach_port_t task_bootstrap_port = 0; - init_result_ = task_get_bootstrap_port(current_task, &task_bootstrap_port); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = breakpad::BootstrapRegister( - bootstrap_port, - const_cast(receive_port_name), - port_); -} - -//============================================================================== -// create a new mach port for receiving messages -ReceivePort::ReceivePort() { - mach_port_t current_task = mach_task_self(); - - init_result_ = mach_port_allocate(current_task, - MACH_PORT_RIGHT_RECEIVE, - &port_); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = mach_port_insert_right(current_task, - port_, - port_, - MACH_MSG_TYPE_MAKE_SEND); -} - -//============================================================================== -// Given an already existing mach port, use it. We take ownership of the -// port and deallocate it in our destructor. -ReceivePort::ReceivePort(mach_port_t receive_port) - : port_(receive_port), - init_result_(KERN_SUCCESS) { -} - -//============================================================================== -ReceivePort::~ReceivePort() { - if (init_result_ == KERN_SUCCESS) - mach_port_deallocate(mach_task_self(), port_); -} - -//============================================================================== -kern_return_t ReceivePort::WaitForMessage(MachReceiveMessage *out_message, - mach_msg_timeout_t timeout) { - if (!out_message) { - return KERN_INVALID_ARGUMENT; - } - - // return any error condition encountered in constructor - if (init_result_ != KERN_SUCCESS) - return init_result_; - - out_message->head.msgh_bits = 0; - out_message->head.msgh_local_port = port_; - out_message->head.msgh_remote_port = MACH_PORT_NULL; - out_message->head.msgh_reserved = 0; - out_message->head.msgh_id = 0; - - mach_msg_option_t options = MACH_RCV_MSG; - if (timeout != MACH_MSG_TIMEOUT_NONE) - options |= MACH_RCV_TIMEOUT; - kern_return_t result = mach_msg(&out_message->head, - options, - 0, - sizeof(MachMessage), - port_, - timeout, // timeout in ms - MACH_PORT_NULL); - - return result; -} - -#pragma mark - - -//============================================================================== -// get a port with send rights corresponding to a named registered service -MachPortSender::MachPortSender(const char *receive_port_name) { - mach_port_t task_bootstrap_port = 0; - init_result_ = task_get_bootstrap_port(mach_task_self(), - &task_bootstrap_port); - - if (init_result_ != KERN_SUCCESS) - return; - - init_result_ = bootstrap_look_up(task_bootstrap_port, - const_cast(receive_port_name), - &send_port_); -} - -//============================================================================== -MachPortSender::MachPortSender(mach_port_t send_port) - : send_port_(send_port), - init_result_(KERN_SUCCESS) { -} - -//============================================================================== -kern_return_t MachPortSender::SendMessage(MachSendMessage &message, - mach_msg_timeout_t timeout) { - if (message.head.msgh_size == 0) { - return KERN_INVALID_VALUE; // just for safety -- never should occur - }; - - if (init_result_ != KERN_SUCCESS) - return init_result_; - - message.head.msgh_remote_port = send_port_; - - kern_return_t result = mach_msg(&message.head, - MACH_SEND_MSG | MACH_SEND_TIMEOUT, - message.head.msgh_size, - 0, - MACH_PORT_NULL, - timeout, // timeout in ms - MACH_PORT_NULL); - - return result; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc deleted file mode 100644 index d875d95b5f6806..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.cc +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2012, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/mac/bootstrap_compat.h" - -namespace breakpad { - -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" -kern_return_t BootstrapRegister(mach_port_t bp, - name_t service_name, - mach_port_t sp) { - return bootstrap_register(bp, service_name, sp); -} -#pragma GCC diagnostic warning "-Wdeprecated-declarations" - -} // namesapce breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h b/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h deleted file mode 100644 index 8ca7357c349c6a..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/bootstrap_compat.h +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright (c) 2012, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef COMMON_MAC_BOOTSTRAP_COMPAT_H_ -#define COMMON_MAC_BOOTSTRAP_COMPAT_H_ - -#include - -namespace breakpad { - -// Wrapper for bootstrap_register to avoid deprecation warnings. -// -// In 10.6, it's possible to call bootstrap_check_in as the one-stop-shop for -// handling what bootstrap_register is used for. In 10.5, bootstrap_check_in -// can't check in a service whose name has not yet been registered, despite -// bootstrap_register being marked as deprecated in that OS release. Breakpad -// needs to register new service names, and in 10.5, calling -// bootstrap_register is the only way to achieve that. Attempts to call -// bootstrap_check_in for a new service name on 10.5 will result in -// BOOTSTRAP_UNKNOWN_SERVICE being returned rather than registration of the -// new service name. -kern_return_t BootstrapRegister(mach_port_t bp, - name_t service_name, - mach_port_t sp); - -} // namespace breakpad - -#endif // COMMON_MAC_BOOTSTRAP_COMPAT_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/byteswap.h b/Telegram/ThirdParty/breakpad/common/mac/byteswap.h deleted file mode 100644 index b7bbc0b95bbd8c..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/byteswap.h +++ /dev/null @@ -1,73 +0,0 @@ -// -*- mode: c++ -*- - -// Copyright (c) 2010, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Jim Blandy - -// byteswap.h: Overloaded functions for conveniently byteswapping values. - -#ifndef COMMON_MAC_BYTESWAP_H_ -#define COMMON_MAC_BYTESWAP_H_ - -#ifdef __APPLE__ -#include - -static inline uint16_t ByteSwap(uint16_t v) { return OSSwapInt16(v); } -static inline uint32_t ByteSwap(uint32_t v) { return OSSwapInt32(v); } -static inline uint64_t ByteSwap(uint64_t v) { return OSSwapInt64(v); } -static inline int16_t ByteSwap(int16_t v) { return OSSwapInt16(v); } -static inline int32_t ByteSwap(int32_t v) { return OSSwapInt32(v); } -static inline int64_t ByteSwap(int64_t v) { return OSSwapInt64(v); } - -#elif defined(__linux__) -// For NXByteOrder -#include -#include -#include -#include_next - -static inline uint16_t ByteSwap(uint16_t v) { return bswap_16(v); } -static inline uint32_t ByteSwap(uint32_t v) { return bswap_32(v); } -static inline uint64_t ByteSwap(uint64_t v) { return bswap_64(v); } -static inline int16_t ByteSwap(int16_t v) { return bswap_16(v); } -static inline int32_t ByteSwap(int32_t v) { return bswap_32(v); } -static inline int64_t ByteSwap(int64_t v) { return bswap_64(v); } - -static inline NXByteOrder NXHostByteOrder() { -#ifdef __LITTLE_ENDIAN - return NX_LittleEndian; -#else - return NX_BigEndian; -#endif -} - -#endif // __APPLE__ - -#endif // COMMON_MAC_BYTESWAP_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/file_id.cc b/Telegram/ThirdParty/breakpad/common/mac/file_id.cc deleted file mode 100644 index 4661d5d625c5f6..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/file_id.cc +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.cc: Return a unique identifier for a file -// -// See file_id.h for documentation -// -// Author: Dan Waylonis - -#include -#include -#include -#include - -#include "common/mac/file_id.h" -#include "common/mac/macho_id.h" - -using MacFileUtilities::MachoID; - -namespace google_breakpad { - -FileID::FileID(const char *path) { - snprintf(path_, sizeof(path_), "%s", path); -} - -bool FileID::FileIdentifier(unsigned char identifier[16]) { - int fd = open(path_, O_RDONLY); - if (fd == -1) - return false; - - MD5Context md5; - MD5Init(&md5); - - // Read 4k x 2 bytes at a time. This is faster than just 4k bytes, but - // doesn't seem to be an unreasonable size for the stack. - unsigned char buffer[4096 * 2]; - size_t buffer_size = sizeof(buffer); - while ((buffer_size = read(fd, buffer, buffer_size) > 0)) { - MD5Update(&md5, buffer, static_cast(buffer_size)); - } - - close(fd); - MD5Final(identifier, &md5); - - return true; -} - -bool FileID::MachoIdentifier(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]) { - MachoID macho(path_); - - if (macho.UUIDCommand(cpu_type, cpu_subtype, identifier)) - return true; - - return macho.MD5(cpu_type, cpu_subtype, identifier); -} - -// static -void FileID::ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length) { - int buffer_idx = 0; - for (int idx = 0; (buffer_idx < buffer_length) && (idx < 16); ++idx) { - int hi = (identifier[idx] >> 4) & 0x0F; - int lo = (identifier[idx]) & 0x0F; - - if (idx == 4 || idx == 6 || idx == 8 || idx == 10) - buffer[buffer_idx++] = '-'; - - buffer[buffer_idx++] = - static_cast((hi >= 10) ? ('A' + hi - 10) : ('0' + hi)); - buffer[buffer_idx++] = - static_cast((lo >= 10) ? ('A' + lo - 10) : ('0' + lo)); - } - - // NULL terminate - buffer[(buffer_idx < buffer_length) ? buffer_idx : buffer_idx - 1] = 0; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/mac/file_id.h b/Telegram/ThirdParty/breakpad/common/mac/file_id.h deleted file mode 100644 index 1d6dfde1b00970..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/file_id.h +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// file_id.h: Return a unique identifier for a file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_FILE_ID_H__ -#define COMMON_MAC_FILE_ID_H__ - -#include -#include - -namespace google_breakpad { - -class FileID { - public: - FileID(const char *path); - ~FileID() {}; - - // Load the identifier for the file path specified in the constructor into - // |identifier|. Return false if the identifier could not be created for the - // file. - // The current implementation will return the MD5 hash of the file's bytes. - bool FileIdentifier(unsigned char identifier[16]); - - // Treat the file as a mach-o file that will contain one or more archicture. - // Accepted values for |cpu_type| and |cpu_subtype| (e.g., CPU_TYPE_X86 or - // CPU_TYPE_POWERPC) are listed in /usr/include/mach/machine.h. - // If |cpu_type| is 0, then the native cpu type is used. If |cpu_subtype| is - // CPU_SUBTYPE_MULTIPLE, the match is only done on |cpu_type|. - // Returns false if opening the file failed or if the |cpu_type|/|cpu_subtype| - // is not present in the file. - // Return the unique identifier in |identifier|. - // The current implementation will look for the (in order of priority): - // LC_UUID, LC_ID_DYLIB, or MD5 hash of the given |cpu_type|. - bool MachoIdentifier(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]); - - // Convert the |identifier| data to a NULL terminated string. The string will - // be formatted as a UUID (e.g., 22F065BB-FC9C-49F7-80FE-26A7CEBD7BCE). - // The |buffer| should be at least 37 bytes long to receive all of the data - // and termination. Shorter buffers will contain truncated data. - static void ConvertIdentifierToString(const unsigned char identifier[16], - char *buffer, int buffer_length); - - private: - // Storage for the path specified - char path_[PATH_MAX]; -}; - -} // namespace google_breakpad - -#endif // COMMON_MAC_FILE_ID_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc deleted file mode 100644 index c396ad888d80f5..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_id.cc +++ /dev/null @@ -1,369 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.cc: Functions to gather identifying information from a macho file -// -// See macho_id.h for documentation -// -// Author: Dan Waylonis - - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "common/mac/macho_id.h" -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -using google_breakpad::MD5Init; -using google_breakpad::MD5Update; -using google_breakpad::MD5Final; - -MachoID::MachoID(const char *path) - : memory_(0), - memory_size_(0), - crc_(0), - md5_context_(), - update_function_(NULL) { - snprintf(path_, sizeof(path_), "%s", path); -} - -MachoID::MachoID(const char *path, void *memory, size_t size) - : memory_(memory), - memory_size_(size), - crc_(0), - md5_context_(), - update_function_(NULL) { - snprintf(path_, sizeof(path_), "%s", path); -} - -MachoID::~MachoID() { -} - -// The CRC info is from http://en.wikipedia.org/wiki/Adler-32 -// With optimizations from http://www.zlib.net/ - -// The largest prime smaller than 65536 -#define MOD_ADLER 65521 -// MAX_BLOCK is the largest n such that 255n(n+1)/2 + (n+1)(MAX_BLOCK-1) <= 2^32-1 -#define MAX_BLOCK 5552 - -void MachoID::UpdateCRC(unsigned char *bytes, size_t size) { -// Unrolled loops for summing -#define DO1(buf,i) {sum1 += (buf)[i]; sum2 += sum1;} -#define DO2(buf,i) DO1(buf,i); DO1(buf,i+1); -#define DO4(buf,i) DO2(buf,i); DO2(buf,i+2); -#define DO8(buf,i) DO4(buf,i); DO4(buf,i+4); -#define DO16(buf) DO8(buf,0); DO8(buf,8); - // Split up the crc - uint32_t sum1 = crc_ & 0xFFFF; - uint32_t sum2 = (crc_ >> 16) & 0xFFFF; - - // Do large blocks - while (size >= MAX_BLOCK) { - size -= MAX_BLOCK; - int block_count = MAX_BLOCK / 16; - do { - DO16(bytes); - bytes += 16; - } while (--block_count); - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - } - - // Do remaining bytes - if (size) { - while (size >= 16) { - size -= 16; - DO16(bytes); - bytes += 16; - } - while (size--) { - sum1 += *bytes++; - sum2 += sum1; - } - sum1 %= MOD_ADLER; - sum2 %= MOD_ADLER; - crc_ = (sum2 << 16) | sum1; - } -} - -void MachoID::UpdateMD5(unsigned char *bytes, size_t size) { - MD5Update(&md5_context_, bytes, static_cast(size)); -} - -void MachoID::Update(MachoWalker *walker, off_t offset, size_t size) { - if (!update_function_ || !size) - return; - - // Read up to 4k bytes at a time - unsigned char buffer[4096]; - size_t buffer_size; - off_t file_offset = offset; - while (size > 0) { - if (size > sizeof(buffer)) { - buffer_size = sizeof(buffer); - size -= buffer_size; - } else { - buffer_size = size; - size = 0; - } - - if (!walker->ReadBytes(buffer, buffer_size, file_offset)) - return; - - (this->*update_function_)(buffer, buffer_size); - file_offset += buffer_size; - } -} - -bool MachoID::UUIDCommand(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char bytes[16]) { - struct breakpad_uuid_command uuid_cmd; - uuid_cmd.cmd = 0; - if (!WalkHeader(cpu_type, cpu_subtype, UUIDWalkerCB, &uuid_cmd)) - return false; - - // If we found the command, we'll have initialized the uuid_command - // structure - if (uuid_cmd.cmd == LC_UUID) { - memcpy(bytes, uuid_cmd.uuid, sizeof(uuid_cmd.uuid)); - return true; - } - - return false; -} - -bool MachoID::IDCommand(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]) { - struct dylib_command dylib_cmd; - dylib_cmd.cmd = 0; - if (!WalkHeader(cpu_type, cpu_subtype, IDWalkerCB, &dylib_cmd)) - return false; - - // If we found the command, we'll have initialized the dylib_command - // structure - if (dylib_cmd.cmd == LC_ID_DYLIB) { - // Take the hashed filename, version, and compatability version bytes - // to form the first 12 bytes, pad the rest with zeros - - // create a crude hash of the filename to generate the first 4 bytes - identifier[0] = 0; - identifier[1] = 0; - identifier[2] = 0; - identifier[3] = 0; - - for (int j = 0, i = (int)strlen(path_)-1; i>=0 && path_[i]!='/'; ++j, --i) { - identifier[j%4] += path_[i]; - } - - identifier[4] = (dylib_cmd.dylib.current_version >> 24) & 0xFF; - identifier[5] = (dylib_cmd.dylib.current_version >> 16) & 0xFF; - identifier[6] = (dylib_cmd.dylib.current_version >> 8) & 0xFF; - identifier[7] = dylib_cmd.dylib.current_version & 0xFF; - identifier[8] = (dylib_cmd.dylib.compatibility_version >> 24) & 0xFF; - identifier[9] = (dylib_cmd.dylib.compatibility_version >> 16) & 0xFF; - identifier[10] = (dylib_cmd.dylib.compatibility_version >> 8) & 0xFF; - identifier[11] = dylib_cmd.dylib.compatibility_version & 0xFF; - identifier[12] = (cpu_type >> 24) & 0xFF; - identifier[13] = (cpu_type >> 16) & 0xFF; - identifier[14] = (cpu_type >> 8) & 0xFF; - identifier[15] = cpu_type & 0xFF; - - return true; - } - - return false; -} - -uint32_t MachoID::Adler32(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) { - update_function_ = &MachoID::UpdateCRC; - crc_ = 0; - - if (!WalkHeader(cpu_type, cpu_subtype, WalkerCB, this)) - return 0; - - return crc_; -} - -bool MachoID::MD5(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype, unsigned char identifier[16]) { - update_function_ = &MachoID::UpdateMD5; - - MD5Init(&md5_context_); - - if (!WalkHeader(cpu_type, cpu_subtype, WalkerCB, this)) - return false; - - MD5Final(identifier, &md5_context_); - return true; -} - -bool MachoID::WalkHeader(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - MachoWalker::LoadCommandCallback callback, - void *context) { - if (memory_) { - MachoWalker walker(memory_, memory_size_, callback, context); - return walker.WalkHeader(cpu_type, cpu_subtype); - } else { - MachoWalker walker(path_, callback, context); - return walker.WalkHeader(cpu_type, cpu_subtype); - } -} - -// static -bool MachoID::WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - MachoID *macho_id = (MachoID *)context; - - if (cmd->cmd == LC_SEGMENT) { - struct segment_command seg; - - if (!walker->ReadBytes(&seg, sizeof(seg), offset)) - return false; - - if (swap) - breakpad_swap_segment_command(&seg); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command); - struct section sec; - for (unsigned long i = 0; i < seg.nsects; ++i) { - if (!walker->ReadBytes(&sec, sizeof(sec), offset)) - return false; - - if (swap) - breakpad_swap_section(&sec, 1); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec.flags & SECTION_TYPE) != S_ZEROFILL && sec.offset != 0) - macho_id->Update(walker, header_offset + sec.offset, sec.size); - - offset += sizeof(struct section); - } - } else if (cmd->cmd == LC_SEGMENT_64) { - struct segment_command_64 seg64; - - if (!walker->ReadBytes(&seg64, sizeof(seg64), offset)) - return false; - - if (swap) - breakpad_swap_segment_command_64(&seg64); - - struct mach_header_64 header; - off_t header_offset; - - if (!walker->CurrentHeader(&header, &header_offset)) - return false; - - // Process segments that have sections: - // (e.g., __TEXT, __DATA, __IMPORT, __OBJC) - offset += sizeof(struct segment_command_64); - struct section_64 sec64; - for (unsigned long i = 0; i < seg64.nsects; ++i) { - if (!walker->ReadBytes(&sec64, sizeof(sec64), offset)) - return false; - - if (swap) - breakpad_swap_section_64(&sec64, 1); - - // sections of type S_ZEROFILL are "virtual" and contain no data - // in the file itself - if ((sec64.flags & SECTION_TYPE) != S_ZEROFILL && sec64.offset != 0) - macho_id->Update(walker, - header_offset + sec64.offset, - (size_t)sec64.size); - - offset += sizeof(struct section_64); - } - } - - // Continue processing - return true; -} - -// static -bool MachoID::UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_UUID) { - struct breakpad_uuid_command *uuid_cmd = - (struct breakpad_uuid_command *)context; - - if (!walker->ReadBytes(uuid_cmd, sizeof(struct breakpad_uuid_command), - offset)) - return false; - - if (swap) - breakpad_swap_uuid_command(uuid_cmd); - - return false; - } - - // Continue processing - return true; -} - -// static -bool MachoID::IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context) { - if (cmd->cmd == LC_ID_DYLIB) { - struct dylib_command *dylib_cmd = (struct dylib_command *)context; - - if (!walker->ReadBytes(dylib_cmd, sizeof(struct dylib_command), offset)) - return false; - - if (swap) - breakpad_swap_dylib_command(dylib_cmd); - - return false; - } - - // Continue processing - return true; -} - -} // namespace MacFileUtilities diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_id.h b/Telegram/ThirdParty/breakpad/common/mac/macho_id.h deleted file mode 100644 index 1037549124a38d..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_id.h +++ /dev/null @@ -1,131 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_id.h: Functions to gather identifying information from a macho file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_ID_H__ -#define COMMON_MAC_MACHO_ID_H__ - -#include -#include -#include - -#include "common/mac/macho_walker.h" -#include "common/md5.h" - -namespace MacFileUtilities { - -class MachoID { - public: - MachoID(const char *path); - MachoID(const char *path, void *memory, size_t size); - ~MachoID(); - - // For the given |cpu_type| and |cpu_subtype|, return a UUID from the LC_UUID - // command. - // Return false if there isn't a LC_UUID command. - bool UUIDCommand(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]); - - // For the given |cpu_type| and |cpu_subtype|, return a UUID from the - // LC_ID_DYLIB command. - // Return false if there isn't a LC_ID_DYLIB command. - bool IDCommand(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]); - - // For the given |cpu_type| and |cpu_subtype|, return the Adler32 CRC for the - // mach-o data segment(s). - // Return 0 on error (e.g., if the file is not a mach-o file) - uint32_t Adler32(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype); - - // For the given |cpu_type|, and |cpu_subtype| return the MD5 for the mach-o - // data segment(s). - // Return true on success, false otherwise - bool MD5(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - unsigned char identifier[16]); - - private: - // Signature of class member function to be called with data read from file - typedef void (MachoID::*UpdateFunction)(unsigned char *bytes, size_t size); - - // Update the CRC value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateCRC(unsigned char *bytes, size_t size); - - // Update the MD5 value by examining |size| |bytes| and applying the algorithm - // to each byte. - void UpdateMD5(unsigned char *bytes, size_t size); - - // Bottleneck for update routines - void Update(MachoWalker *walker, off_t offset, size_t size); - - // Factory for the MachoWalker - bool WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype, - MachoWalker::LoadCommandCallback callback, void *context); - - // The callback from the MachoWalker for CRC and MD5 - static bool WalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_UUID - static bool UUIDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // The callback from the MachoWalker for LC_ID_DYLIB - static bool IDWalkerCB(MachoWalker *walker, load_command *cmd, off_t offset, - bool swap, void *context); - - // File path - char path_[PATH_MAX]; - - // Memory region to read from - void *memory_; - - // Size of the memory region - size_t memory_size_; - - // The current crc value - uint32_t crc_; - - // The MD5 context - google_breakpad::MD5Context md5_context_; - - // The current update to call from the Update callback - UpdateFunction update_function_; -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_ID_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc deleted file mode 100644 index f56fe768c10dce..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.cc +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilties.cc: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#include "common/mac/byteswap.h" -#include "common/mac/macho_utilities.h" - -#include -#include - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc) { - uc->cmd = ByteSwap(uc->cmd); - uc->cmdsize = ByteSwap(uc->cmdsize); -} - -void breakpad_swap_load_command(struct load_command *lc) { - lc->cmd = ByteSwap(lc->cmd); - lc->cmdsize = ByteSwap(lc->cmdsize); -} - -void breakpad_swap_dylib_command(struct dylib_command *dc) { - dc->cmd = ByteSwap(dc->cmd); - dc->cmdsize = ByteSwap(dc->cmdsize); - - dc->dylib.name.offset = ByteSwap(dc->dylib.name.offset); - dc->dylib.timestamp = ByteSwap(dc->dylib.timestamp); - dc->dylib.current_version = ByteSwap(dc->dylib.current_version); - dc->dylib.compatibility_version = ByteSwap(dc->dylib.compatibility_version); -} - -void breakpad_swap_segment_command(struct segment_command *sc) { - sc->cmd = ByteSwap(sc->cmd); - sc->cmdsize = ByteSwap(sc->cmdsize); - - sc->vmaddr = ByteSwap(sc->vmaddr); - sc->vmsize = ByteSwap(sc->vmsize); - sc->fileoff = ByteSwap(sc->fileoff); - sc->filesize = ByteSwap(sc->filesize); - sc->maxprot = ByteSwap(sc->maxprot); - sc->initprot = ByteSwap(sc->initprot); - sc->nsects = ByteSwap(sc->nsects); - sc->flags = ByteSwap(sc->flags); -} - -void breakpad_swap_segment_command_64(struct segment_command_64 *sg) { - sg->cmd = ByteSwap(sg->cmd); - sg->cmdsize = ByteSwap(sg->cmdsize); - - sg->vmaddr = ByteSwap(sg->vmaddr); - sg->vmsize = ByteSwap(sg->vmsize); - sg->fileoff = ByteSwap(sg->fileoff); - sg->filesize = ByteSwap(sg->filesize); - - sg->maxprot = ByteSwap(sg->maxprot); - sg->initprot = ByteSwap(sg->initprot); - sg->nsects = ByteSwap(sg->nsects); - sg->flags = ByteSwap(sg->flags); -} - -void breakpad_swap_fat_header(struct fat_header *fh) { - fh->magic = ByteSwap(fh->magic); - fh->nfat_arch = ByteSwap(fh->nfat_arch); -} - -void breakpad_swap_fat_arch(struct fat_arch *fa, uint32_t narchs) { - for (uint32_t i = 0; i < narchs; ++i) { - fa[i].cputype = ByteSwap(fa[i].cputype); - fa[i].cpusubtype = ByteSwap(fa[i].cpusubtype); - fa[i].offset = ByteSwap(fa[i].offset); - fa[i].size = ByteSwap(fa[i].size); - fa[i].align = ByteSwap(fa[i].align); - } -} - -void breakpad_swap_mach_header(struct mach_header *mh) { - mh->magic = ByteSwap(mh->magic); - mh->cputype = ByteSwap(mh->cputype); - mh->cpusubtype = ByteSwap(mh->cpusubtype); - mh->filetype = ByteSwap(mh->filetype); - mh->ncmds = ByteSwap(mh->ncmds); - mh->sizeofcmds = ByteSwap(mh->sizeofcmds); - mh->flags = ByteSwap(mh->flags); -} - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh) { - mh->magic = ByteSwap(mh->magic); - mh->cputype = ByteSwap(mh->cputype); - mh->cpusubtype = ByteSwap(mh->cpusubtype); - mh->filetype = ByteSwap(mh->filetype); - mh->ncmds = ByteSwap(mh->ncmds); - mh->sizeofcmds = ByteSwap(mh->sizeofcmds); - mh->flags = ByteSwap(mh->flags); - mh->reserved = ByteSwap(mh->reserved); -} - -void breakpad_swap_section(struct section *s, - uint32_t nsects) { - for (uint32_t i = 0; i < nsects; i++) { - s[i].addr = ByteSwap(s[i].addr); - s[i].size = ByteSwap(s[i].size); - - s[i].offset = ByteSwap(s[i].offset); - s[i].align = ByteSwap(s[i].align); - s[i].reloff = ByteSwap(s[i].reloff); - s[i].nreloc = ByteSwap(s[i].nreloc); - s[i].flags = ByteSwap(s[i].flags); - s[i].reserved1 = ByteSwap(s[i].reserved1); - s[i].reserved2 = ByteSwap(s[i].reserved2); - } -} - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects) { - for (uint32_t i = 0; i < nsects; i++) { - s[i].addr = ByteSwap(s[i].addr); - s[i].size = ByteSwap(s[i].size); - - s[i].offset = ByteSwap(s[i].offset); - s[i].align = ByteSwap(s[i].align); - s[i].reloff = ByteSwap(s[i].reloff); - s[i].nreloc = ByteSwap(s[i].nreloc); - s[i].flags = ByteSwap(s[i].flags); - s[i].reserved1 = ByteSwap(s[i].reserved1); - s[i].reserved2 = ByteSwap(s[i].reserved2); - } -} diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h b/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h deleted file mode 100644 index 00563a77c8bc0e..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_utilities.h +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_utilities.h: Utilities for dealing with mach-o files -// -// Author: Dave Camp - -#ifndef COMMON_MAC_MACHO_UTILITIES_H__ -#define COMMON_MAC_MACHO_UTILITIES_H__ - -#include -#include - -/* Some #defines and structs that aren't defined in older SDKs */ -#ifndef CPU_ARCH_ABI64 -# define CPU_ARCH_ABI64 0x01000000 -#endif - -#ifndef CPU_TYPE_X86 -# define CPU_TYPE_X86 CPU_TYPE_I386 -#endif - -#ifndef CPU_TYPE_POWERPC64 -# define CPU_TYPE_POWERPC64 (CPU_TYPE_POWERPC | CPU_ARCH_ABI64) -#endif - -#ifndef LC_UUID -# define LC_UUID 0x1b /* the uuid */ -#endif - -// The uuid_command struct/swap routines were added during the 10.4 series. -// Their presence isn't guaranteed. -struct breakpad_uuid_command { - uint32_t cmd; /* LC_UUID */ - uint32_t cmdsize; /* sizeof(struct uuid_command) */ - uint8_t uuid[16]; /* the 128-bit uuid */ -}; - -void breakpad_swap_uuid_command(struct breakpad_uuid_command *uc); - -void breakpad_swap_load_command(struct load_command *lc); - -void breakpad_swap_dylib_command(struct dylib_command *dc); - -// Older SDKs defines thread_state_data_t as an int[] instead -// of the natural_t[] it should be. -typedef natural_t breakpad_thread_state_data_t[THREAD_STATE_MAX]; - -void breakpad_swap_segment_command(struct segment_command *sc); - -// The 64-bit swap routines were added during the 10.4 series, their -// presence isn't guaranteed. -void breakpad_swap_segment_command_64(struct segment_command_64 *sg); - -void breakpad_swap_fat_header(struct fat_header *fh); - -void breakpad_swap_fat_arch(struct fat_arch *fa, uint32_t narchs); - -void breakpad_swap_mach_header(struct mach_header *mh); - -void breakpad_swap_mach_header_64(struct mach_header_64 *mh); - -void breakpad_swap_section(struct section *s, - uint32_t nsects); - -void breakpad_swap_section_64(struct section_64 *s, - uint32_t nsects); - -#endif diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc deleted file mode 100644 index 1acd86656b6c91..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.cc +++ /dev/null @@ -1,268 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.cc: Iterate over the load commands in a mach-o file -// -// See macho_walker.h for documentation -// -// Author: Dan Waylonis - -#include -#include -#include -#include -#include -#include -#include - -#include "common/mac/byteswap.h" -#include "common/mac/macho_walker.h" -#include "common/mac/macho_utilities.h" - -namespace MacFileUtilities { - -MachoWalker::MachoWalker(const char *path, LoadCommandCallback callback, - void *context) - : file_(-1), - memory_(NULL), - memory_size_(0), - callback_(callback), - callback_context_(context), - current_header_(NULL), - current_header_size_(0), - current_header_offset_(0) { - file_ = open(path, O_RDONLY); -} - -MachoWalker::MachoWalker(void *memory, size_t size, - LoadCommandCallback callback, void *context) - : file_(-1), - memory_(memory), - memory_size_(size), - callback_(callback), - callback_context_(context), - current_header_(NULL), - current_header_size_(0), - current_header_offset_(0) { -} - -MachoWalker::~MachoWalker() { - if (file_ != -1) - close(file_); -} - -bool MachoWalker::WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype) { - cpu_type_t valid_cpu_type = cpu_type; - cpu_subtype_t valid_cpu_subtype = cpu_subtype; - // if |cpu_type| is 0, use the native cpu type. - if (cpu_type == 0) { - const NXArchInfo *arch = NXGetLocalArchInfo(); - assert(arch); - valid_cpu_type = arch->cputype; - valid_cpu_subtype = CPU_SUBTYPE_MULTIPLE; - } - off_t offset; - if (FindHeader(valid_cpu_type, valid_cpu_subtype, offset)) { - if (cpu_type & CPU_ARCH_ABI64) - return WalkHeader64AtOffset(offset); - - return WalkHeaderAtOffset(offset); - } - - return false; -} - -bool MachoWalker::ReadBytes(void *buffer, size_t size, off_t offset) { - if (memory_) { - if (offset < 0) - return false; - bool result = true; - if (offset + size > memory_size_) { - if (static_cast(offset) >= memory_size_) - return false; - size = memory_size_ - static_cast(offset); - result = false; - } - memcpy(buffer, static_cast(memory_) + offset, size); - return result; - } else { - return pread(file_, buffer, size, offset) == (ssize_t)size; - } -} - -bool MachoWalker::CurrentHeader(struct mach_header_64 *header, off_t *offset) { - if (current_header_) { - memcpy(header, current_header_, sizeof(mach_header_64)); - *offset = current_header_offset_; - return true; - } - - return false; -} - -bool MachoWalker::FindHeader(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - off_t &offset) { - // Read the magic bytes that's common amongst all mach-o files - uint32_t magic; - if (!ReadBytes(&magic, sizeof(magic), 0)) - return false; - - offset = sizeof(magic); - - // Figure out what type of file we've got - bool is_fat = false; - if (magic == FAT_MAGIC || magic == FAT_CIGAM) { - is_fat = true; - } - else if (magic != MH_MAGIC && magic != MH_CIGAM && magic != MH_MAGIC_64 && - magic != MH_CIGAM_64) { - return false; - } - - if (!is_fat) { - // If we don't have a fat header, check if the cpu type matches the single - // header - struct mach_header header; - if (!ReadBytes(&header, sizeof(header), 0)) - return false; - - if (magic == MH_CIGAM || magic == MH_CIGAM_64) - breakpad_swap_mach_header(&header); - - if (cpu_type != header.cputype || - (cpu_subtype != CPU_SUBTYPE_MULTIPLE && - cpu_subtype != header.cpusubtype)) { - return false; - } - - offset = 0; - return true; - } else { - // Read the fat header and find an appropriate architecture - offset = 0; - struct fat_header fat; - if (!ReadBytes(&fat, sizeof(fat), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - breakpad_swap_fat_header(&fat); - - offset += sizeof(fat); - - // Search each architecture for the desired one - struct fat_arch arch; - for (uint32_t i = 0; i < fat.nfat_arch; ++i) { - if (!ReadBytes(&arch, sizeof(arch), offset)) - return false; - - if (NXHostByteOrder() != NX_BigEndian) - breakpad_swap_fat_arch(&arch, 1); - - if (arch.cputype == cpu_type && - (cpu_subtype == CPU_SUBTYPE_MULTIPLE || - arch.cpusubtype == cpu_subtype)) { - offset = arch.offset; - return true; - } - - offset += sizeof(arch); - } - } - - return false; -} - -bool MachoWalker::WalkHeaderAtOffset(off_t offset) { - struct mach_header header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM); - if (swap) - breakpad_swap_mach_header(&header); - - // Copy the data into the mach_header_64 structure. Since the 32-bit and - // 64-bit only differ in the last field (reserved), this is safe to do. - struct mach_header_64 header64; - memcpy((void *)&header64, (const void *)&header, sizeof(header)); - header64.reserved = 0; - - current_header_ = &header64; - current_header_size_ = sizeof(header); // 32-bit, not 64-bit - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeader64AtOffset(off_t offset) { - struct mach_header_64 header; - if (!ReadBytes(&header, sizeof(header), offset)) - return false; - - bool swap = (header.magic == MH_CIGAM_64); - if (swap) - breakpad_swap_mach_header_64(&header); - - current_header_ = &header; - current_header_size_ = sizeof(header); - current_header_offset_ = offset; - offset += current_header_size_; - bool result = WalkHeaderCore(offset, header.ncmds, swap); - current_header_ = NULL; - current_header_size_ = 0; - current_header_offset_ = 0; - return result; -} - -bool MachoWalker::WalkHeaderCore(off_t offset, uint32_t number_of_commands, - bool swap) { - for (uint32_t i = 0; i < number_of_commands; ++i) { - struct load_command cmd; - if (!ReadBytes(&cmd, sizeof(cmd), offset)) - return false; - - if (swap) - breakpad_swap_load_command(&cmd); - - // Call the user callback - if (callback_ && !callback_(this, &cmd, offset, swap, callback_context_)) - break; - - offset += cmd.cmdsize; - } - - return true; -} - -} // namespace MacFileUtilities diff --git a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h b/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h deleted file mode 100644 index dd535814a1dde7..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/macho_walker.h +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// macho_walker.h: Iterate over the load commands in a mach-o file -// -// Author: Dan Waylonis - -#ifndef COMMON_MAC_MACHO_WALKER_H__ -#define COMMON_MAC_MACHO_WALKER_H__ - -#include -#include -#include - -namespace MacFileUtilities { - -class MachoWalker { - public: - // A callback function executed when a new load command is read. If no - // further processing of load commands is desired, return false. Otherwise, - // return true. - // |cmd| is the current command, and |offset| is the location relative to the - // beginning of the file (not header) where the command was read. If |swap| - // is set, then any command data (other than the returned load_command) should - // be swapped when read - typedef bool (*LoadCommandCallback)(MachoWalker *walker, load_command *cmd, - off_t offset, bool swap, void *context); - - MachoWalker(const char *path, LoadCommandCallback callback, void *context); - MachoWalker(void *memory, size_t size, LoadCommandCallback callback, - void *context); - ~MachoWalker(); - - // Begin walking the header for |cpu_type| and |cpu_subtype|. If |cpu_type| - // is 0, then the native cpu type is used. Otherwise, accepted values are - // listed in /usr/include/mach/machine.h (e.g., CPU_TYPE_X86 or - // CPU_TYPE_POWERPC). If |cpu_subtype| is CPU_SUBTYPE_MULTIPLE, the match is - // only done on |cpu_type|. - // Returns false if opening the file failed or if the |cpu_type|/|cpu_subtype| - // is not present in the file. - bool WalkHeader(cpu_type_t cpu_type, cpu_subtype_t cpu_subtype); - - // Read |size| bytes from the opened file at |offset| into |buffer| - bool ReadBytes(void *buffer, size_t size, off_t offset); - - // Return the current header and header offset - bool CurrentHeader(struct mach_header_64 *header, off_t *offset); - - private: - // Locate (if any) the header offset for |cpu_type| and return in |offset|. - // Return true if found, false otherwise. - bool FindHeader(cpu_type_t cpu_type, - cpu_subtype_t cpu_subtype, - off_t &offset); - - // Process an individual header starting at |offset| from the start of the - // file. Return true if successful, false otherwise. - bool WalkHeaderAtOffset(off_t offset); - bool WalkHeader64AtOffset(off_t offset); - - // Bottleneck for walking the load commands - bool WalkHeaderCore(off_t offset, uint32_t number_of_commands, bool swap); - - // File descriptor to the opened file - int file_; - - // Memory location to read from. - void *memory_; - - // Size of the memory segment we can read from. - size_t memory_size_; - - // User specified callback & context - LoadCommandCallback callback_; - void *callback_context_; - - // Current header, size, and offset. The mach_header_64 is used for both - // 32-bit and 64-bit headers because they only differ in their last field - // (reserved). By adding the |current_header_size_| and the - // |current_header_offset_|, you can determine the offset in the file just - // after the header. - struct mach_header_64 *current_header_; - unsigned long current_header_size_; - off_t current_header_offset_; - - private: - MachoWalker(const MachoWalker &); - MachoWalker &operator=(const MachoWalker &); -}; - -} // namespace MacFileUtilities - -#endif // COMMON_MAC_MACHO_WALKER_H__ diff --git a/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h b/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h deleted file mode 100644 index d6d1bef9717437..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/scoped_task_suspend-inl.h +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (c) 2010 Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Inline implementation of ScopedTaskSuspend, which suspends a Mach -// task for the duration of its scope. - -#ifndef GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ -#define GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ - -#include - -namespace google_breakpad { - -class ScopedTaskSuspend { - public: - explicit ScopedTaskSuspend(mach_port_t target) : target_(target) { - task_suspend(target_); - } - - ~ScopedTaskSuspend() { - task_resume(target_); - } - - private: - mach_port_t target_; -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MAC_SCOPED_TASK_SUSPEND_H_ diff --git a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc deleted file mode 100644 index 07c0f42680d18e..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.cc +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include "common/scoped_ptr.h" -#include "common/mac/string_utilities.h" - -namespace MacStringUtils { - -using google_breakpad::scoped_array; - -std::string ConvertToString(CFStringRef str) { - CFIndex length = CFStringGetLength(str); - std::string result; - - if (!length) - return result; - - CFIndex maxUTF8Length = - CFStringGetMaximumSizeForEncoding(length, kCFStringEncodingUTF8); - scoped_array buffer(new UInt8[maxUTF8Length + 1]); - CFIndex actualUTF8Length; - CFStringGetBytes(str, CFRangeMake(0, length), kCFStringEncodingUTF8, 0, - false, buffer.get(), maxUTF8Length, &actualUTF8Length); - buffer[actualUTF8Length] = 0; - result.assign((const char *)buffer.get()); - - return result; -} - -unsigned int IntegerValueAtIndex(string &str, unsigned int idx) { - string digits("0123456789"), temp; - size_t start = 0; - size_t end; - size_t found = 0; - unsigned int result = 0; - - for (; found <= idx; ++found) { - end = str.find_first_not_of(digits, start); - - if (end == string::npos) - end = str.size(); - - temp = str.substr(start, end - start); - - if (found == idx) { - result = atoi(temp.c_str()); - } - - start = str.find_first_of(digits, end + 1); - - if (start == string::npos) - break; - } - - return result; -} - -} // namespace MacStringUtils diff --git a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h b/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h deleted file mode 100644 index 6d89c834e7cbac..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/mac/string_utilities.h +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utilities.h: Utilities for strings for Mac platform - -#ifndef COMMON_MAC_STRING_UTILITIES_H__ -#define COMMON_MAC_STRING_UTILITIES_H__ - -#include - -#include - -namespace MacStringUtils { - -using std::string; - -// Convert a CoreFoundation string into a std::string -string ConvertToString(CFStringRef str); - -// Return the idx'th decimal integer in str, separated by non-decimal-digits -// E.g., str = 10.4.8, idx = 1 -> 4 -unsigned int IntegerValueAtIndex(string &str, unsigned int idx); - -} // namespace MacStringUtils - -#endif // COMMON_MAC_STRING_UTILITIES_H__ diff --git a/Telegram/ThirdParty/breakpad/common/md5.cc b/Telegram/ThirdParty/breakpad/common/md5.cc deleted file mode 100644 index a0d9a1bdd89108..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/md5.cc +++ /dev/null @@ -1,251 +0,0 @@ -/* - * written by Colin Plumb in 1993, no copyright is claimed. - * This code is in the public domain; do with it what you wish. - * - * Equivalent code is available from RSA Data Security, Inc. - * This code has been tested against that, and is equivalent, - * except that you don't need to include two pages of legalese - * with every copy. - * - * To compute the message digest of a chunk of bytes, declare an - * MD5Context structure, pass it to MD5Init, call MD5Update as - * needed on buffers full of bytes, and then call MD5Final, which - * will fill a supplied 16-byte array with the digest. - */ - -#include - -#include "common/md5.h" - -namespace google_breakpad { - -#ifndef WORDS_BIGENDIAN -#define byteReverse(buf, len) /* Nothing */ -#else -/* - * Note: this code is harmless on little-endian machines. - */ -static void byteReverse(unsigned char *buf, unsigned longs) -{ - u32 t; - do { - t = (u32) ((unsigned) buf[3] << 8 | buf[2]) << 16 | - ((unsigned) buf[1] << 8 | buf[0]); - *(u32 *) buf = t; - buf += 4; - } while (--longs); -} -#endif - -static void MD5Transform(u32 buf[4], u32 const in[16]); - -/* - * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious - * initialization constants. - */ -void MD5Init(struct MD5Context *ctx) -{ - ctx->buf[0] = 0x67452301; - ctx->buf[1] = 0xefcdab89; - ctx->buf[2] = 0x98badcfe; - ctx->buf[3] = 0x10325476; - - ctx->bits[0] = 0; - ctx->bits[1] = 0; -} - -/* - * Update context to reflect the concatenation of another buffer full - * of bytes. - */ -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len) -{ - u32 t; - - /* Update bitcount */ - - t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((u32) len << 3)) < t) - ctx->bits[1]++; /* Carry from low to high */ - ctx->bits[1] += len >> 29; - - t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ - - /* Handle any leading odd-sized chunks */ - - if (t) { - unsigned char *p = (unsigned char *) ctx->in + t; - - t = 64 - t; - if (len < t) { - memcpy(p, buf, len); - return; - } - memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += t; - len -= t; - } - /* Process data in 64-byte chunks */ - - while (len >= 64) { - memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - buf += 64; - len -= 64; - } - - /* Handle any remaining bytes of data. */ - - memcpy(ctx->in, buf, len); -} - -/* - * Final wrapup - pad to 64-byte boundary with the bit pattern - * 1 0* (64-bit count of bits processed, MSB-first) - */ -void MD5Final(unsigned char digest[16], struct MD5Context *ctx) -{ - unsigned count; - unsigned char *p; - - /* Compute number of bytes mod 64 */ - count = (ctx->bits[0] >> 3) & 0x3F; - - /* Set the first char of padding to 0x80. This is safe since there is - always at least one byte free */ - p = ctx->in + count; - *p++ = 0x80; - - /* Bytes of padding needed to make 64 bytes */ - count = 64 - 1 - count; - - /* Pad out to 56 mod 64 */ - if (count < 8) { - /* Two lots of padding: Pad the first block to 64 bytes */ - memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (u32 *) ctx->in); - - /* Now fill the next block with 56 bytes */ - memset(ctx->in, 0, 56); - } else { - /* Pad block to 56 bytes */ - memset(p, 0, count - 8); - } - byteReverse(ctx->in, 14); - - /* Append length in bits and transform */ - ((u32 *) ctx->in)[14] = ctx->bits[0]; - ((u32 *) ctx->in)[15] = ctx->bits[1]; - - MD5Transform(ctx->buf, (u32 *) ctx->in); - byteReverse((unsigned char *) ctx->buf, 4); - memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ -} - -/* The four core functions - F1 is optimized somewhat */ - -/* #define F1(x, y, z) (x & y | ~x & z) */ -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -/* This is the central step in the MD5 algorithm. */ -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - */ -static void MD5Transform(u32 buf[4], u32 const in[16]) -{ - u32 a, b, c, d; - - a = buf[0]; - b = buf[1]; - c = buf[2]; - d = buf[3]; - - MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); - - buf[0] += a; - buf[1] += b; - buf[2] += c; - buf[3] += d; -} - -} // namespace google_breakpad - diff --git a/Telegram/ThirdParty/breakpad/common/md5.h b/Telegram/ThirdParty/breakpad/common/md5.h deleted file mode 100644 index 2ab0ab95aebd83..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/md5.h +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2007 Google Inc. All Rights Reserved. -// Author: liuli@google.com (Liu Li) -#ifndef COMMON_MD5_H__ -#define COMMON_MD5_H__ - -#include - -namespace google_breakpad { - -typedef uint32_t u32; -typedef uint8_t u8; - -struct MD5Context { - u32 buf[4]; - u32 bits[2]; - u8 in[64]; -}; - -void MD5Init(struct MD5Context *ctx); - -void MD5Update(struct MD5Context *ctx, unsigned char const *buf, size_t len); - -void MD5Final(unsigned char digest[16], struct MD5Context *ctx); - -} // namespace google_breakpad - -#endif // COMMON_MD5_H__ diff --git a/Telegram/ThirdParty/breakpad/common/memory.h b/Telegram/ThirdParty/breakpad/common/memory.h deleted file mode 100644 index d6aa137d35c0fd..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/memory.h +++ /dev/null @@ -1,212 +0,0 @@ -// Copyright (c) 2009, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#ifndef GOOGLE_BREAKPAD_COMMON_MEMORY_H_ -#define GOOGLE_BREAKPAD_COMMON_MEMORY_H_ - -#include -#include -#include -#include - -#include -#include - -#if defined(MEMORY_SANITIZER) -#include -#endif - -#ifdef __APPLE__ -#define sys_mmap mmap -#define sys_mmap2 mmap -#define sys_munmap munmap -#define MAP_ANONYMOUS MAP_ANON -#else -#include "third_party/lss/linux_syscall_support.h" -#endif - -namespace google_breakpad { - -// This is very simple allocator which fetches pages from the kernel directly. -// Thus, it can be used even when the heap may be corrupted. -// -// There is no free operation. The pages are only freed when the object is -// destroyed. -class PageAllocator { - public: - PageAllocator() - : page_size_(getpagesize()), - last_(NULL), - current_page_(NULL), - page_offset_(0) { - } - - ~PageAllocator() { - FreeAll(); - } - - void *Alloc(size_t bytes) { - if (!bytes) - return NULL; - - if (current_page_ && page_size_ - page_offset_ >= bytes) { - uint8_t *const ret = current_page_ + page_offset_; - page_offset_ += bytes; - if (page_offset_ == page_size_) { - page_offset_ = 0; - current_page_ = NULL; - } - - return ret; - } - - const size_t pages = - (bytes + sizeof(PageHeader) + page_size_ - 1) / page_size_; - uint8_t *const ret = GetNPages(pages); - if (!ret) - return NULL; - - page_offset_ = - (page_size_ - (page_size_ * pages - (bytes + sizeof(PageHeader)))) % - page_size_; - current_page_ = page_offset_ ? ret + page_size_ * (pages - 1) : NULL; - - return ret + sizeof(PageHeader); - } - - // Checks whether the page allocator owns the passed-in pointer. - // This method exists for testing pursposes only. - bool OwnsPointer(const void* p) { - for (PageHeader* header = last_; header; header = header->next) { - const char* current = reinterpret_cast(header); - if ((p >= current) && (p < current + header->num_pages * page_size_)) - return true; - } - - return false; - } - - private: - uint8_t *GetNPages(size_t num_pages) { -#if defined(__x86_64__) || defined(__aarch64__) || defined(__aarch64__) || \ - ((defined(__mips__) && _MIPS_SIM == _ABI64)) - void *a = sys_mmap(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -#else - void *a = sys_mmap2(NULL, page_size_ * num_pages, PROT_READ | PROT_WRITE, - MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); -#endif - if (a == MAP_FAILED) - return NULL; - -#if defined(MEMORY_SANITIZER) - // We need to indicate to MSan that memory allocated through sys_mmap is - // initialized, since linux_syscall_support.h doesn't have MSan hooks. - __msan_unpoison(a, page_size_ * num_pages); -#endif - - struct PageHeader *header = reinterpret_cast(a); - header->next = last_; - header->num_pages = num_pages; - last_ = header; - - return reinterpret_cast(a); - } - - void FreeAll() { - PageHeader *next; - - for (PageHeader *cur = last_; cur; cur = next) { - next = cur->next; - sys_munmap(cur, cur->num_pages * page_size_); - } - } - - struct PageHeader { - PageHeader *next; // pointer to the start of the next set of pages. - size_t num_pages; // the number of pages in this set. - }; - - const size_t page_size_; - PageHeader *last_; - uint8_t *current_page_; - size_t page_offset_; -}; - -// Wrapper to use with STL containers -template -struct PageStdAllocator : public std::allocator { - typedef typename std::allocator::pointer pointer; - typedef typename std::allocator::size_type size_type; - - explicit PageStdAllocator(PageAllocator& allocator): allocator_(allocator) {} - template PageStdAllocator(const PageStdAllocator& other) - : allocator_(other.allocator_) {} - - inline pointer allocate(size_type n, const void* = 0) { - return static_cast(allocator_.Alloc(sizeof(T) * n)); - } - - inline void deallocate(pointer, size_type) { - // The PageAllocator doesn't free. - } - - template struct rebind { - typedef PageStdAllocator other; - }; - - private: - // Silly workaround for the gcc from Android's ndk (gcc 4.6), which will - // otherwise complain that `other.allocator_` is private in the constructor - // code. - template friend struct PageStdAllocator; - - PageAllocator& allocator_; -}; - -// A wasteful vector is a std::vector, except that it allocates memory from a -// PageAllocator. It's wasteful because, when resizing, it always allocates a -// whole new array since the PageAllocator doesn't support realloc. -template -class wasteful_vector : public std::vector > { - public: - wasteful_vector(PageAllocator* allocator, unsigned size_hint = 16) - : std::vector >(PageStdAllocator(*allocator)) { - std::vector >::reserve(size_hint); - } -}; - -} // namespace google_breakpad - -inline void* operator new(size_t nbytes, - google_breakpad::PageAllocator& allocator) { - return allocator.Alloc(nbytes); -} - -#endif // GOOGLE_BREAKPAD_COMMON_MEMORY_H_ diff --git a/Telegram/ThirdParty/breakpad/common/scoped_ptr.h b/Telegram/ThirdParty/breakpad/common/scoped_ptr.h deleted file mode 100644 index d137c186811cc5..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/scoped_ptr.h +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright 2013 Google Inc. All Rights Reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Scopers help you manage ownership of a pointer, helping you easily manage the -// a pointer within a scope, and automatically destroying the pointer at the -// end of a scope. There are two main classes you will use, which correspond -// to the operators new/delete and new[]/delete[]. -// -// Example usage (scoped_ptr): -// { -// scoped_ptr foo(new Foo("wee")); -// } // foo goes out of scope, releasing the pointer with it. -// -// { -// scoped_ptr foo; // No pointer managed. -// foo.reset(new Foo("wee")); // Now a pointer is managed. -// foo.reset(new Foo("wee2")); // Foo("wee") was destroyed. -// foo.reset(new Foo("wee3")); // Foo("wee2") was destroyed. -// foo->Method(); // Foo::Method() called. -// foo.get()->Method(); // Foo::Method() called. -// SomeFunc(foo.release()); // SomeFunc takes ownership, foo no longer -// // manages a pointer. -// foo.reset(new Foo("wee4")); // foo manages a pointer again. -// foo.reset(); // Foo("wee4") destroyed, foo no longer -// // manages a pointer. -// } // foo wasn't managing a pointer, so nothing was destroyed. -// -// Example usage (scoped_array): -// { -// scoped_array foo(new Foo[100]); -// foo.get()->Method(); // Foo::Method on the 0th element. -// foo[10].Method(); // Foo::Method on the 10th element. -// } - -#ifndef COMMON_SCOPED_PTR_H_ -#define COMMON_SCOPED_PTR_H_ - -// This is an implementation designed to match the anticipated future TR2 -// implementation of the scoped_ptr class, and its closely-related brethren, -// scoped_array, scoped_ptr_malloc. - -#include -#include -#include - -namespace google_breakpad { - -// A scoped_ptr is like a T*, except that the destructor of scoped_ptr -// automatically deletes the pointer it holds (if any). -// That is, scoped_ptr owns the T object that it points to. -// Like a T*, a scoped_ptr may hold either NULL or a pointer to a T object. -// Also like T*, scoped_ptr is thread-compatible, and once you -// dereference it, you get the threadsafety guarantees of T. -// -// The size of a scoped_ptr is small: -// sizeof(scoped_ptr) == sizeof(C*) -template -class scoped_ptr { - public: - - // The element type - typedef C element_type; - - // Constructor. Defaults to initializing with NULL. - // There is no way to create an uninitialized scoped_ptr. - // The input parameter must be allocated with new. - explicit scoped_ptr(C* p = NULL) : ptr_(p) { } - - // Destructor. If there is a C object, delete it. - // We don't need to test ptr_ == NULL because C++ does that for us. - ~scoped_ptr() { - enum { type_must_be_complete = sizeof(C) }; - delete ptr_; - } - - // Reset. Deletes the current owned object, if any. - // Then takes ownership of a new object, if given. - // this->reset(this->get()) works. - void reset(C* p = NULL) { - if (p != ptr_) { - enum { type_must_be_complete = sizeof(C) }; - delete ptr_; - ptr_ = p; - } - } - - // Accessors to get the owned object. - // operator* and operator-> will assert() if there is no current object. - C& operator*() const { - assert(ptr_ != NULL); - return *ptr_; - } - C* operator->() const { - assert(ptr_ != NULL); - return ptr_; - } - C* get() const { return ptr_; } - - // Comparison operators. - // These return whether two scoped_ptr refer to the same object, not just to - // two different but equal objects. - bool operator==(C* p) const { return ptr_ == p; } - bool operator!=(C* p) const { return ptr_ != p; } - - // Swap two scoped pointers. - void swap(scoped_ptr& p2) { - C* tmp = ptr_; - ptr_ = p2.ptr_; - p2.ptr_ = tmp; - } - - // Release a pointer. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - C* release() { - C* retVal = ptr_; - ptr_ = NULL; - return retVal; - } - - private: - C* ptr_; - - // Forbid comparison of scoped_ptr types. If C2 != C, it totally doesn't - // make sense, and if C2 == C, it still doesn't make sense because you should - // never have the same object owned by two different scoped_ptrs. - template bool operator==(scoped_ptr const& p2) const; - template bool operator!=(scoped_ptr const& p2) const; - - // Disallow evil constructors - scoped_ptr(const scoped_ptr&); - void operator=(const scoped_ptr&); -}; - -// Free functions -template -void swap(scoped_ptr& p1, scoped_ptr& p2) { - p1.swap(p2); -} - -template -bool operator==(C* p1, const scoped_ptr& p2) { - return p1 == p2.get(); -} - -template -bool operator!=(C* p1, const scoped_ptr& p2) { - return p1 != p2.get(); -} - -// scoped_array is like scoped_ptr, except that the caller must allocate -// with new [] and the destructor deletes objects with delete []. -// -// As with scoped_ptr, a scoped_array either points to an object -// or is NULL. A scoped_array owns the object that it points to. -// scoped_array is thread-compatible, and once you index into it, -// the returned objects have only the threadsafety guarantees of T. -// -// Size: sizeof(scoped_array) == sizeof(C*) -template -class scoped_array { - public: - - // The element type - typedef C element_type; - - // Constructor. Defaults to intializing with NULL. - // There is no way to create an uninitialized scoped_array. - // The input parameter must be allocated with new []. - explicit scoped_array(C* p = NULL) : array_(p) { } - - // Destructor. If there is a C object, delete it. - // We don't need to test ptr_ == NULL because C++ does that for us. - ~scoped_array() { - enum { type_must_be_complete = sizeof(C) }; - delete[] array_; - } - - // Reset. Deletes the current owned object, if any. - // Then takes ownership of a new object, if given. - // this->reset(this->get()) works. - void reset(C* p = NULL) { - if (p != array_) { - enum { type_must_be_complete = sizeof(C) }; - delete[] array_; - array_ = p; - } - } - - // Get one element of the current object. - // Will assert() if there is no current object, or index i is negative. - C& operator[](ptrdiff_t i) const { - assert(i >= 0); - assert(array_ != NULL); - return array_[i]; - } - - // Get a pointer to the zeroth element of the current object. - // If there is no current object, return NULL. - C* get() const { - return array_; - } - - // Comparison operators. - // These return whether two scoped_array refer to the same object, not just to - // two different but equal objects. - bool operator==(C* p) const { return array_ == p; } - bool operator!=(C* p) const { return array_ != p; } - - // Swap two scoped arrays. - void swap(scoped_array& p2) { - C* tmp = array_; - array_ = p2.array_; - p2.array_ = tmp; - } - - // Release an array. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - C* release() { - C* retVal = array_; - array_ = NULL; - return retVal; - } - - private: - C* array_; - - // Forbid comparison of different scoped_array types. - template bool operator==(scoped_array const& p2) const; - template bool operator!=(scoped_array const& p2) const; - - // Disallow evil constructors - scoped_array(const scoped_array&); - void operator=(const scoped_array&); -}; - -// Free functions -template -void swap(scoped_array& p1, scoped_array& p2) { - p1.swap(p2); -} - -template -bool operator==(C* p1, const scoped_array& p2) { - return p1 == p2.get(); -} - -template -bool operator!=(C* p1, const scoped_array& p2) { - return p1 != p2.get(); -} - -// This class wraps the c library function free() in a class that can be -// passed as a template argument to scoped_ptr_malloc below. -class ScopedPtrMallocFree { - public: - inline void operator()(void* x) const { - free(x); - } -}; - -// scoped_ptr_malloc<> is similar to scoped_ptr<>, but it accepts a -// second template argument, the functor used to free the object. - -template -class scoped_ptr_malloc { - public: - - // The element type - typedef C element_type; - - // Constructor. Defaults to initializing with NULL. - // There is no way to create an uninitialized scoped_ptr. - // The input parameter must be allocated with an allocator that matches the - // Free functor. For the default Free functor, this is malloc, calloc, or - // realloc. - explicit scoped_ptr_malloc(C* p = NULL): ptr_(p) {} - - // Destructor. If there is a C object, call the Free functor. - ~scoped_ptr_malloc() { - reset(); - } - - // Reset. Calls the Free functor on the current owned object, if any. - // Then takes ownership of a new object, if given. - // this->reset(this->get()) works. - void reset(C* p = NULL) { - if (ptr_ != p) { - FreeProc free_proc; - free_proc(ptr_); - ptr_ = p; - } - } - - // Get the current object. - // operator* and operator-> will cause an assert() failure if there is - // no current object. - C& operator*() const { - assert(ptr_ != NULL); - return *ptr_; - } - - C* operator->() const { - assert(ptr_ != NULL); - return ptr_; - } - - C* get() const { - return ptr_; - } - - // Comparison operators. - // These return whether a scoped_ptr_malloc and a plain pointer refer - // to the same object, not just to two different but equal objects. - // For compatibility with the boost-derived implementation, these - // take non-const arguments. - bool operator==(C* p) const { - return ptr_ == p; - } - - bool operator!=(C* p) const { - return ptr_ != p; - } - - // Swap two scoped pointers. - void swap(scoped_ptr_malloc & b) { - C* tmp = b.ptr_; - b.ptr_ = ptr_; - ptr_ = tmp; - } - - // Release a pointer. - // The return value is the current pointer held by this object. - // If this object holds a NULL pointer, the return value is NULL. - // After this operation, this object will hold a NULL pointer, - // and will not own the object any more. - C* release() { - C* tmp = ptr_; - ptr_ = NULL; - return tmp; - } - - private: - C* ptr_; - - // no reason to use these: each scoped_ptr_malloc should have its own object - template - bool operator==(scoped_ptr_malloc const& p) const; - template - bool operator!=(scoped_ptr_malloc const& p) const; - - // Disallow evil constructors - scoped_ptr_malloc(const scoped_ptr_malloc&); - void operator=(const scoped_ptr_malloc&); -}; - -template inline -void swap(scoped_ptr_malloc& a, scoped_ptr_malloc& b) { - a.swap(b); -} - -template inline -bool operator==(C* p, const scoped_ptr_malloc& b) { - return p == b.get(); -} - -template inline -bool operator!=(C* p, const scoped_ptr_malloc& b) { - return p != b.get(); -} - -} // namespace google_breakpad - -#endif // COMMON_SCOPED_PTR_H_ diff --git a/Telegram/ThirdParty/breakpad/common/string_conversion.cc b/Telegram/ThirdParty/breakpad/common/string_conversion.cc deleted file mode 100644 index 9c0d623fc1043f..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/string_conversion.cc +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -#include - -#include "common/convert_UTF.h" -#include "common/scoped_ptr.h" -#include "common/string_conversion.h" -#include "common/using_std_string.h" - -namespace google_breakpad { - -using std::vector; - -void UTF8ToUTF16(const char *in, vector *out) { - size_t source_length = strlen(in); - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->clear(); - out->insert(out->begin(), source_length, 0); - uint16_t *target_ptr = &(*out)[0]; - uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t); - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]) { - const UTF8 *source_ptr = reinterpret_cast(in); - const UTF8 *source_end_ptr = source_ptr + sizeof(char); - uint16_t *target_ptr = out; - uint16_t *target_end_ptr = target_ptr + 2 * sizeof(uint16_t); - out[0] = out[1] = 0; - - // Process one character at a time - while (1) { - ConversionResult result = ConvertUTF8toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) - return static_cast(source_ptr - reinterpret_cast(in)); - - // Add another character to the input stream and try again - source_ptr = reinterpret_cast(in); - ++source_end_ptr; - - if (source_end_ptr > reinterpret_cast(in) + in_length) - break; - } - - return 0; -} - -void UTF32ToUTF16(const wchar_t *in, vector *out) { - size_t source_length = wcslen(in); - const UTF32 *source_ptr = reinterpret_cast(in); - const UTF32 *source_end_ptr = source_ptr + source_length; - // Erase the contents and zero fill to the expected size - out->clear(); - out->insert(out->begin(), source_length, 0); - uint16_t *target_ptr = &(*out)[0]; - uint16_t *target_end_ptr = target_ptr + out->capacity() * sizeof(uint16_t); - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - // Resize to be the size of the # of converted characters + NULL - out->resize(result == conversionOK ? target_ptr - &(*out)[0] + 1: 0); -} - -void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]) { - const UTF32 *source_ptr = reinterpret_cast(&in); - const UTF32 *source_end_ptr = source_ptr + 1; - uint16_t *target_ptr = out; - uint16_t *target_end_ptr = target_ptr + 2 * sizeof(uint16_t); - out[0] = out[1] = 0; - ConversionResult result = ConvertUTF32toUTF16(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result != conversionOK) { - out[0] = out[1] = 0; - } -} - -static inline uint16_t Swap(uint16_t value) { - return (value >> 8) | static_cast(value << 8); -} - -string UTF16ToUTF8(const vector &in, bool swap) { - const UTF16 *source_ptr = &in[0]; - scoped_array source_buffer; - - // If we're to swap, we need to make a local copy and swap each byte pair - if (swap) { - int idx = 0; - source_buffer.reset(new uint16_t[in.size()]); - UTF16 *source_buffer_ptr = source_buffer.get(); - for (vector::const_iterator it = in.begin(); - it != in.end(); ++it, ++idx) - source_buffer_ptr[idx] = Swap(*it); - - source_ptr = source_buffer.get(); - } - - // The maximum expansion would be 4x the size of the input string. - const UTF16 *source_end_ptr = source_ptr + in.size(); - size_t target_capacity = in.size() * 4; - scoped_array target_buffer(new UTF8[target_capacity]); - UTF8 *target_ptr = target_buffer.get(); - UTF8 *target_end_ptr = target_ptr + target_capacity; - ConversionResult result = ConvertUTF16toUTF8(&source_ptr, source_end_ptr, - &target_ptr, target_end_ptr, - strictConversion); - - if (result == conversionOK) { - const char *targetPtr = reinterpret_cast(target_buffer.get()); - return targetPtr; - } - - return ""; -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/string_conversion.h b/Telegram/ThirdParty/breakpad/common/string_conversion.h deleted file mode 100644 index b9ba96a2e17a6e..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/string_conversion.h +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_conversion.h: Conversion between different UTF-8/16/32 encodings. - -#ifndef COMMON_STRING_CONVERSION_H__ -#define COMMON_STRING_CONVERSION_H__ - -#include -#include - -#include "common/using_std_string.h" -#include "google_breakpad/common/breakpad_types.h" - -namespace google_breakpad { - -using std::vector; - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF8ToUTF16(const char *in, vector *out); - -// Convert at least one character (up to a maximum of |in_length|) from |in| -// to UTF-16 into |out|. Return the number of characters consumed from |in|. -// Any unused characters in |out| will be initialized to 0. No memory will -// be allocated by this routine. -int UTF8ToUTF16Char(const char *in, int in_length, uint16_t out[2]); - -// Convert |in| to UTF-16 into |out|. Use platform byte ordering. If the -// conversion failed, |out| will be zero length. -void UTF32ToUTF16(const wchar_t *in, vector *out); - -// Convert |in| to UTF-16 into |out|. Any unused characters in |out| will be -// initialized to 0. No memory will be allocated by this routine. -void UTF32ToUTF16Char(wchar_t in, uint16_t out[2]); - -// Convert |in| to UTF-8. If |swap| is true, swap bytes before converting. -string UTF16ToUTF8(const vector &in, bool swap); - -} // namespace google_breakpad - -#endif // COMMON_STRING_CONVERSION_H__ diff --git a/Telegram/ThirdParty/breakpad/common/using_std_string.h b/Telegram/ThirdParty/breakpad/common/using_std_string.h deleted file mode 100644 index 13c1da59ccb5ff..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/using_std_string.h +++ /dev/null @@ -1,65 +0,0 @@ -// -*- mode: C++ -*- - -// Copyright (c) 2012, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// Original author: Ivan Penkov - -// using_std_string.h: Allows building this code in environments where -// global string (::string) exists. -// -// The problem: -// ------------- -// Let's say you want to build this code in an environment where a global -// string type is defined (i.e. ::string). Now, let's suppose that ::string -// is different that std::string and you'd like to have the option to easily -// choose between the two string types. Ideally you'd like to control which -// string type is chosen by simply #defining an identifier. -// -// The solution: -// ------------- -// #define HAS_GLOBAL_STRING somewhere in a global header file and then -// globally replace std::string with string. Then include this header -// file everywhere where string is used. If you want to revert back to -// using std::string, simply remove the #define (HAS_GLOBAL_STRING). - -#ifndef THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ -#define THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ - -#ifdef HAS_GLOBAL_STRING - typedef ::string google_breakpad_string; -#else - using std::string; - typedef std::string google_breakpad_string; -#endif - -// Inicates that type google_breakpad_string is defined -#define HAS_GOOGLE_BREAKPAD_STRING - -#endif // THIRD_PARTY_BREAKPAD_SRC_COMMON_USING_STD_STRING_H_ diff --git a/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc b/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc deleted file mode 100644 index b7f877e66e7e55..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/windows/guid_string.cc +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. -// -// See guid_string.h for documentation. - -#include - -#include "common/windows/string_utils-inl.h" - -#include "common/windows/guid_string.h" - -namespace google_breakpad { - -// static -wstring GUIDString::GUIDToWString(GUID *guid) { - wchar_t guid_string[37]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -// static -wstring GUIDString::GUIDToSymbolServerWString(GUID *guid) { - wchar_t guid_string[33]; - swprintf( - guid_string, sizeof(guid_string) / sizeof(guid_string[0]), - L"%08X%04X%04X%02X%02X%02X%02X%02X%02X%02X%02X", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - // remove when VC++7.1 is no longer supported - guid_string[sizeof(guid_string) / sizeof(guid_string[0]) - 1] = L'\0'; - - return wstring(guid_string); -} - -} // namespace google_breakpad diff --git a/Telegram/ThirdParty/breakpad/common/windows/guid_string.h b/Telegram/ThirdParty/breakpad/common/windows/guid_string.h deleted file mode 100644 index 48a5c1d3708f93..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/windows/guid_string.h +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// guid_string.cc: Convert GUIDs to strings. - -#ifndef COMMON_WINDOWS_GUID_STRING_H_ -#define COMMON_WINDOWS_GUID_STRING_H_ - -#include - -#include - -namespace google_breakpad { - -using std::wstring; - -class GUIDString { - public: - // Converts guid to a string in the format recommended by RFC 4122 and - // returns the string. - static wstring GUIDToWString(GUID *guid); - - // Converts guid to a string formatted as uppercase hexadecimal, with - // no separators, and returns the string. This is the format used for - // symbol server identifiers, although identifiers have an age tacked - // on to the string. - static wstring GUIDToSymbolServerWString(GUID *guid); -}; - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_GUID_STRING_H_ diff --git a/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h b/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h deleted file mode 100644 index 9b636072681ada..00000000000000 --- a/Telegram/ThirdParty/breakpad/common/windows/string_utils-inl.h +++ /dev/null @@ -1,142 +0,0 @@ -// Copyright (c) 2006, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -// string_utils-inl.h: Safer string manipulation on Windows, supporting -// pre-MSVC8 environments. - -#ifndef COMMON_WINDOWS_STRING_UTILS_INL_H_ -#define COMMON_WINDOWS_STRING_UTILS_INL_H_ - -#include -#include - -#include - -// The "ll" printf format size specifier corresponding to |long long| was -// intrudced in MSVC8. Earlier versions did not provide this size specifier, -// but "I64" can be used to print 64-bit types. Don't use "I64" where "ll" -// is available, in the event of oddball systems where |long long| is not -// 64 bits wide. -#if _MSC_VER >= 1400 // MSVC 2005/8 -#define WIN_STRING_FORMAT_LL "ll" -#else // MSC_VER >= 1400 -#define WIN_STRING_FORMAT_LL "I64" -#endif // MSC_VER >= 1400 - -// A nonconforming version of swprintf, without the length argument, was -// included with the CRT prior to MSVC8. Although a conforming version was -// also available via an overload, it is not reliably chosen. _snwprintf -// behaves as a standards-confirming swprintf should, so force the use of -// _snwprintf when using older CRTs. -#if _MSC_VER < 1400 // MSVC 2005/8 -#define swprintf _snwprintf -#else -// For MSVC8 and newer, swprintf_s is the recommended method. Conveniently, -// it takes the same argument list as swprintf. -#define swprintf swprintf_s -#endif // MSC_VER < 1400 - -namespace google_breakpad { - -using std::string; -using std::wstring; - -class WindowsStringUtils { - public: - // Roughly equivalent to MSVC8's wcscpy_s, except pre-MSVC8, this does - // not fail if source is longer than destination_size. The destination - // buffer is always 0-terminated. - static void safe_wcscpy(wchar_t *destination, size_t destination_size, - const wchar_t *source); - - // Roughly equivalent to MSVC8's wcsncpy_s, except that _TRUNCATE cannot - // be passed directly, and pre-MSVC8, this will not fail if source or count - // are longer than destination_size. The destination buffer is always - // 0-terminated. - static void safe_wcsncpy(wchar_t *destination, size_t destination_size, - const wchar_t *source, size_t count); - - // Performs multi-byte to wide character conversion on C++ strings, using - // mbstowcs_s (MSVC8) or mbstowcs (pre-MSVC8). Returns false on failure, - // without setting wcs. - static bool safe_mbstowcs(const string &mbs, wstring *wcs); - - // The inverse of safe_mbstowcs. - static bool safe_wcstombs(const wstring &wcs, string *mbs); - - // Returns the base name of a file, e.g. strips off the path. - static wstring GetBaseName(const wstring &filename); - - private: - // Disallow instantiation and other object-based operations. - WindowsStringUtils(); - WindowsStringUtils(const WindowsStringUtils&); - ~WindowsStringUtils(); - void operator=(const WindowsStringUtils&); -}; - -// static -inline void WindowsStringUtils::safe_wcscpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcscpy_s(destination, destination_size, source); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcscpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - wcsncpy(destination, source, destination_size); - if (destination && destination_size) - destination[destination_size - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -// static -inline void WindowsStringUtils::safe_wcsncpy(wchar_t *destination, - size_t destination_size, - const wchar_t *source, - size_t count) { -#if _MSC_VER >= 1400 // MSVC 2005/8 - wcsncpy_s(destination, destination_size, source, count); -#else // _MSC_VER >= 1400 - // Pre-MSVC 2005/8 doesn't have wcsncpy_s. Simulate it with wcsncpy. - // wcsncpy doesn't 0-terminate the destination buffer if the source string - // is longer than size. Ensure that the destination is 0-terminated. - if (destination_size < count) - count = destination_size; - - wcsncpy(destination, source, count); - if (destination && count) - destination[count - 1] = 0; -#endif // _MSC_VER >= 1400 -} - -} // namespace google_breakpad - -#endif // COMMON_WINDOWS_STRING_UTILS_INL_H_ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h deleted file mode 100644 index d8828043ff382b..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/breakpad_types.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* breakpad_types.h: Precise-width types - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file ensures that types uintN_t are defined for N = 8, 16, 32, and - * 64. Types of precise widths are crucial to the task of writing data - * structures on one platform and reading them on another. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ -#define GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ - -#if (defined(_INTTYPES_H) || defined(_INTTYPES_H_)) && \ - !defined(__STDC_FORMAT_MACROS) -#error "inttypes.h has already been included before this header file, but " -#error "without __STDC_FORMAT_MACROS defined." -#endif - -#ifndef __STDC_FORMAT_MACROS -#define __STDC_FORMAT_MACROS -#endif /* __STDC_FORMAT_MACROS */ -#include - -typedef struct { - uint64_t high; - uint64_t low; -} uint128_struct; - -typedef uint64_t breakpad_time_t; - -/* Try to get PRIx64 from inttypes.h, but if it's not defined, fall back to - * llx, which is the format string for "long long" - this is a 64-bit - * integral type on many systems. */ -#ifndef PRIx64 -#define PRIx64 "llx" -#endif /* !PRIx64 */ - -#endif /* GOOGLE_BREAKPAD_COMMON_BREAKPAD_TYPES_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h deleted file mode 100644 index 4256706d77978f..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_amd64.h +++ /dev/null @@ -1,235 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on amd64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ - - -/* - * AMD64 support, see WINNT.H - */ - -typedef struct { - uint16_t control_word; - uint16_t status_word; - uint8_t tag_word; - uint8_t reserved1; - uint16_t error_opcode; - uint32_t error_offset; - uint16_t error_selector; - uint16_t reserved2; - uint32_t data_offset; - uint16_t data_selector; - uint16_t reserved3; - uint32_t mx_csr; - uint32_t mx_csr_mask; - uint128_struct float_registers[8]; - uint128_struct xmm_registers[16]; - uint8_t reserved4[96]; -} MDXmmSaveArea32AMD64; /* XMM_SAVE_AREA32 */ - -#define MD_CONTEXT_AMD64_VR_COUNT 26 - -typedef struct { - /* - * Register parameter home addresses. - */ - uint64_t p1_home; - uint64_t p2_home; - uint64_t p3_home; - uint64_t p4_home; - uint64_t p5_home; - uint64_t p6_home; - - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - uint32_t context_flags; - uint32_t mx_csr; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - uint16_t cs; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_SEGMENTS */ - uint16_t ds; - uint16_t es; - uint16_t fs; - uint16_t gs; - - /* The next 2 registers are included with MD_CONTEXT_AMD64_CONTROL */ - uint16_t ss; - uint32_t eflags; - - /* The next 6 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - uint64_t dr0; - uint64_t dr1; - uint64_t dr2; - uint64_t dr3; - uint64_t dr6; - uint64_t dr7; - - /* The next 4 registers are included with MD_CONTEXT_AMD64_INTEGER */ - uint64_t rax; - uint64_t rcx; - uint64_t rdx; - uint64_t rbx; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - uint64_t rsp; - - /* The next 11 registers are included with MD_CONTEXT_AMD64_INTEGER */ - uint64_t rbp; - uint64_t rsi; - uint64_t rdi; - uint64_t r8; - uint64_t r9; - uint64_t r10; - uint64_t r11; - uint64_t r12; - uint64_t r13; - uint64_t r14; - uint64_t r15; - - /* The next register is included with MD_CONTEXT_AMD64_CONTROL */ - uint64_t rip; - - /* The next set of registers are included with - * MD_CONTEXT_AMD64_FLOATING_POINT - */ - union { - MDXmmSaveArea32AMD64 flt_save; - struct { - uint128_struct header[2]; - uint128_struct legacy[8]; - uint128_struct xmm0; - uint128_struct xmm1; - uint128_struct xmm2; - uint128_struct xmm3; - uint128_struct xmm4; - uint128_struct xmm5; - uint128_struct xmm6; - uint128_struct xmm7; - uint128_struct xmm8; - uint128_struct xmm9; - uint128_struct xmm10; - uint128_struct xmm11; - uint128_struct xmm12; - uint128_struct xmm13; - uint128_struct xmm14; - uint128_struct xmm15; - } sse_registers; - }; - - uint128_struct vector_register[MD_CONTEXT_AMD64_VR_COUNT]; - uint64_t vector_control; - - /* The next 5 registers are included with MD_CONTEXT_AMD64_DEBUG_REGISTERS */ - uint64_t debug_control; - uint64_t last_branch_to_rip; - uint64_t last_branch_from_rip; - uint64_t last_exception_to_rip; - uint64_t last_exception_from_rip; - -} MDRawContextAMD64; /* CONTEXT */ - -/* For (MDRawContextAMD64).context_flags. These values indicate the type of - * context stored in the structure. The high 24 bits identify the CPU, the - * low 8 bits identify the type of context saved. */ -#define MD_CONTEXT_AMD64 0x00100000 /* CONTEXT_AMD64 */ -#define MD_CONTEXT_AMD64_CONTROL (MD_CONTEXT_AMD64 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_AMD64_INTEGER (MD_CONTEXT_AMD64 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_AMD64_SEGMENTS (MD_CONTEXT_AMD64 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_AMD64_FLOATING_POINT (MD_CONTEXT_AMD64 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_AMD64_DEBUG_REGISTERS (MD_CONTEXT_AMD64 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -#define MD_CONTEXT_AMD64_XSTATE (MD_CONTEXT_AMD64 | 0x00000040) - /* CONTEXT_XSTATE */ - -/* WinNT.h refers to CONTEXT_MMX_REGISTERS but doesn't appear to define it - * I think it really means CONTEXT_FLOATING_POINT. - */ - -#define MD_CONTEXT_AMD64_FULL (MD_CONTEXT_AMD64_CONTROL | \ - MD_CONTEXT_AMD64_INTEGER | \ - MD_CONTEXT_AMD64_FLOATING_POINT) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_AMD64_ALL (MD_CONTEXT_AMD64_FULL | \ - MD_CONTEXT_AMD64_SEGMENTS | \ - MD_CONTEXT_X86_DEBUG_REGISTERS) - /* CONTEXT_ALL */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_AMD64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h deleted file mode 100644 index 6a71138337b6d8..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm.h +++ /dev/null @@ -1,151 +0,0 @@ -/* Copyright (c) 2009, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ARM. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by - * ensuring that all members are aligned on their natural boundaries. - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. - * - * Author: Julian Seward - */ - -/* - * ARM support - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ - -#define MD_FLOATINGSAVEAREA_ARM_FPR_COUNT 32 -#define MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT 8 - -/* - * Note that these structures *do not* map directly to the CONTEXT - * structure defined in WinNT.h in the Windows Mobile SDK. That structure - * does not accomodate VFPv3, and I'm unsure if it was ever used in the - * wild anyway, as Windows CE only seems to produce "cedumps" which - * are not exactly minidumps. - */ -typedef struct { - uint64_t fpscr; /* FPU status register */ - - /* 32 64-bit floating point registers, d0 .. d31. */ - uint64_t regs[MD_FLOATINGSAVEAREA_ARM_FPR_COUNT]; - - /* Miscellaneous control words */ - uint32_t extra[MD_FLOATINGSAVEAREA_ARM_FPEXTRA_COUNT]; -} MDFloatingSaveAreaARM; - -#define MD_CONTEXT_ARM_GPR_COUNT 16 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - uint32_t context_flags; - - /* 16 32-bit integer registers, r0 .. r15 - * Note the following fixed uses: - * r13 is the stack pointer - * r14 is the link register - * r15 is the program counter - */ - uint32_t iregs[MD_CONTEXT_ARM_GPR_COUNT]; - - /* CPSR (flags, basically): 32 bits: - bit 31 - N (negative) - bit 30 - Z (zero) - bit 29 - C (carry) - bit 28 - V (overflow) - bit 27 - Q (saturation flag, sticky) - All other fields -- ignore */ - uint32_t cpsr; - - /* The next field is included with MD_CONTEXT_ARM_FLOATING_POINT */ - MDFloatingSaveAreaARM float_save; - -} MDRawContextARM; - -/* Indices into iregs for registers with a dedicated or conventional - * purpose. - */ -enum MDARMRegisterNumbers { - MD_CONTEXT_ARM_REG_IOS_FP = 7, - MD_CONTEXT_ARM_REG_FP = 11, - MD_CONTEXT_ARM_REG_SP = 13, - MD_CONTEXT_ARM_REG_LR = 14, - MD_CONTEXT_ARM_REG_PC = 15 -}; - -/* For (MDRawContextARM).context_flags. These values indicate the type of - * context stored in the structure. */ -/* CONTEXT_ARM from the Windows CE 5.0 SDK. This value isn't correct - * because this bit can be used for flags. Presumably this value was - * never actually used in minidumps, but only in "CEDumps" which - * are a whole parallel minidump file format for Windows CE. - * Therefore, Breakpad defines its own value for ARM CPUs. - */ -#define MD_CONTEXT_ARM_OLD 0x00000040 -/* This value was chosen to avoid likely conflicts with MD_CONTEXT_* - * for other CPUs. */ -#define MD_CONTEXT_ARM 0x40000000 -#define MD_CONTEXT_ARM_INTEGER (MD_CONTEXT_ARM | 0x00000002) -#define MD_CONTEXT_ARM_FLOATING_POINT (MD_CONTEXT_ARM | 0x00000004) - -#define MD_CONTEXT_ARM_FULL (MD_CONTEXT_ARM_INTEGER | \ - MD_CONTEXT_ARM_FLOATING_POINT) - -#define MD_CONTEXT_ARM_ALL (MD_CONTEXT_ARM_INTEGER | \ - MD_CONTEXT_ARM_FLOATING_POINT) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h deleted file mode 100644 index 5ace0d9de470c9..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_arm64.h +++ /dev/null @@ -1,140 +0,0 @@ -/* Copyright 2013 Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ARM. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by - * ensuring that all members are aligned on their natural boundaries. - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. - * - * Author: Colin Blundell - */ - -/* - * ARM64 support - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ - -#define MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT 32 - -typedef struct { - uint32_t fpsr; /* FPU status register */ - uint32_t fpcr; /* FPU control register */ - - /* 32 128-bit floating point registers, d0 .. d31. */ - uint128_struct regs[MD_FLOATINGSAVEAREA_ARM64_FPR_COUNT]; -} MDFloatingSaveAreaARM64; - -#define MD_CONTEXT_ARM64_GPR_COUNT 33 - -/* Use the same 32-bit alignment when accessing this structure from 64-bit code - * as is used natively in 32-bit code. */ -#pragma pack(push, 4) - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - uint64_t context_flags; - - /* 33 64-bit integer registers, x0 .. x31 + the PC - * Note the following fixed uses: - * x29 is the frame pointer - * x30 is the link register - * x31 is the stack pointer - * The PC is effectively x32. - */ - uint64_t iregs[MD_CONTEXT_ARM64_GPR_COUNT]; - - /* CPSR (flags, basically): 32 bits: - bit 31 - N (negative) - bit 30 - Z (zero) - bit 29 - C (carry) - bit 28 - V (overflow) - bit 27 - Q (saturation flag, sticky) - All other fields -- ignore */ - uint32_t cpsr; - - /* The next field is included with MD_CONTEXT64_ARM_FLOATING_POINT */ - MDFloatingSaveAreaARM64 float_save; - -} MDRawContextARM64; - -#pragma pack(pop) - -/* Indices into iregs for registers with a dedicated or conventional - * purpose. - */ -enum MDARM64RegisterNumbers { - MD_CONTEXT_ARM64_REG_FP = 29, - MD_CONTEXT_ARM64_REG_LR = 30, - MD_CONTEXT_ARM64_REG_SP = 31, - MD_CONTEXT_ARM64_REG_PC = 32 -}; - -/* For (MDRawContextARM64).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_ARM64 is Breakpad-defined. - * This value was chosen to avoid likely conflicts with MD_CONTEXT_* - * for other CPUs. */ -#define MD_CONTEXT_ARM64 0x80000000 -#define MD_CONTEXT_ARM64_INTEGER (MD_CONTEXT_ARM64 | 0x00000002) -#define MD_CONTEXT_ARM64_FLOATING_POINT (MD_CONTEXT_ARM64 | 0x00000004) - -#define MD_CONTEXT_ARM64_FULL (MD_CONTEXT_ARM64_INTEGER | \ - MD_CONTEXT_ARM64_FLOATING_POINT) - -#define MD_CONTEXT_ARM64_ALL (MD_CONTEXT_ARM64_INTEGER | \ - MD_CONTEXT_ARM64_FLOATING_POINT) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_ARM64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h deleted file mode 100644 index 6cbe3023f9c1ce..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_mips.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Copyright (c) 2013, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on MIPS. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by - * ensuring that all members are aligned on their natural boundaries. - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. - * - * Author: Chris Dearman - */ - -/* - * MIPS support - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ - -#define MD_CONTEXT_MIPS_GPR_COUNT 32 -#define MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT 32 -#define MD_CONTEXT_MIPS_DSP_COUNT 3 - -/* - * Note that these structures *do not* map directly to the CONTEXT - * structure defined in WinNT.h in the Windows Mobile SDK. That structure - * does not accomodate VFPv3, and I'm unsure if it was ever used in the - * wild anyway, as Windows CE only seems to produce "cedumps" which - * are not exactly minidumps. - */ -typedef struct { - /* 32 64-bit floating point registers, f0..f31 */ - uint64_t regs[MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT]; - - uint32_t fpcsr; /* FPU status register. */ - uint32_t fir; /* FPU implementation register. */ -} MDFloatingSaveAreaMIPS; - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated. - */ - uint32_t context_flags; - uint32_t _pad0; - - /* 32 64-bit integer registers, r0..r31. - * Note the following fixed uses: - * r29 is the stack pointer. - * r31 is the return address. - */ - uint64_t iregs[MD_CONTEXT_MIPS_GPR_COUNT]; - - /* multiply/divide result. */ - uint64_t mdhi, mdlo; - - /* DSP accumulators. */ - uint32_t hi[MD_CONTEXT_MIPS_DSP_COUNT]; - uint32_t lo[MD_CONTEXT_MIPS_DSP_COUNT]; - uint32_t dsp_control; - uint32_t _pad1; - - uint64_t epc; - uint64_t badvaddr; - uint32_t status; - uint32_t cause; - - /* The next field is included with MD_CONTEXT_MIPS_FLOATING_POINT. */ - MDFloatingSaveAreaMIPS float_save; - -} MDRawContextMIPS; - -/* Indices into iregs for registers with a dedicated or conventional - * purpose. - */ -enum MDMIPSRegisterNumbers { - MD_CONTEXT_MIPS_REG_S0 = 16, - MD_CONTEXT_MIPS_REG_S1 = 17, - MD_CONTEXT_MIPS_REG_S2 = 18, - MD_CONTEXT_MIPS_REG_S3 = 19, - MD_CONTEXT_MIPS_REG_S4 = 20, - MD_CONTEXT_MIPS_REG_S5 = 21, - MD_CONTEXT_MIPS_REG_S6 = 22, - MD_CONTEXT_MIPS_REG_S7 = 23, - MD_CONTEXT_MIPS_REG_GP = 28, - MD_CONTEXT_MIPS_REG_SP = 29, - MD_CONTEXT_MIPS_REG_FP = 30, - MD_CONTEXT_MIPS_REG_RA = 31, -}; - -/* For (MDRawContextMIPS).context_flags. These values indicate the type of - * context stored in the structure. */ -/* CONTEXT_MIPS from the Windows CE 5.0 SDK. This value isn't correct - * because this bit can be used for flags. Presumably this value was - * never actually used in minidumps, but only in "CEDumps" which - * are a whole parallel minidump file format for Windows CE. - * Therefore, Breakpad defines its own value for MIPS CPUs. - */ -#define MD_CONTEXT_MIPS 0x00040000 -#define MD_CONTEXT_MIPS_INTEGER (MD_CONTEXT_MIPS | 0x00000002) -#define MD_CONTEXT_MIPS_FLOATING_POINT (MD_CONTEXT_MIPS | 0x00000004) -#define MD_CONTEXT_MIPS_DSP (MD_CONTEXT_MIPS | 0x00000008) - -#define MD_CONTEXT_MIPS_FULL (MD_CONTEXT_MIPS_INTEGER | \ - MD_CONTEXT_MIPS_FLOATING_POINT | \ - MD_CONTEXT_MIPS_DSP) - -#define MD_CONTEXT_MIPS_ALL (MD_CONTEXT_MIPS_INTEGER | \ - MD_CONTEXT_MIPS_FLOATING_POINT \ - MD_CONTEXT_MIPS_DSP) - -#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_MIPS_H__ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h deleted file mode 100644 index b24cc42438e407..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc.h +++ /dev/null @@ -1,168 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * Breakpad minidump extension for PowerPC support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ - -#define MD_FLOATINGSAVEAREA_PPC_FPR_COUNT 32 - -typedef struct { - /* fpregs is a double[32] in mach/ppc/_types.h, but a uint64_t is used - * here for precise sizing. */ - uint64_t fpregs[MD_FLOATINGSAVEAREA_PPC_FPR_COUNT]; - uint32_t fpscr_pad; - uint32_t fpscr; /* Status/control */ -} MDFloatingSaveAreaPPC; /* Based on ppc_float_state */ - - -#define MD_VECTORSAVEAREA_PPC_VR_COUNT 32 - -typedef struct { - /* Vector registers (including vscr) are 128 bits, but mach/ppc/_types.h - * exposes them as four 32-bit quantities. */ - uint128_struct save_vr[MD_VECTORSAVEAREA_PPC_VR_COUNT]; - uint128_struct save_vscr; /* Status/control */ - uint32_t save_pad5[4]; - uint32_t save_vrvalid; /* Indicates which vector registers are saved */ - uint32_t save_pad6[7]; -} MDVectorSaveAreaPPC; /* ppc_vector_state */ - - -#define MD_CONTEXT_PPC_GPR_COUNT 32 - -/* Use the same 32-bit alignment when accessing this structure from 64-bit code - * as is used natively in 32-bit code. #pragma pack is a MSVC extension - * supported by gcc. */ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(4) -#else -#pragma pack(push, 4) -#endif - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - uint32_t context_flags; - - uint32_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - uint32_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - uint32_t gpr[MD_CONTEXT_PPC_GPR_COUNT]; - uint32_t cr; /* Condition */ - uint32_t xer; /* Integer (fiXed-point) exception */ - uint32_t lr; /* Link */ - uint32_t ctr; /* Count */ - uint32_t mq; /* Multiply/Quotient (PPC 601, POWER only) */ - uint32_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC; /* Based on ppc_thread_state */ - -/* Indices into gpr for registers with a dedicated or conventional purpose. */ -enum MDPPCRegisterNumbers { - MD_CONTEXT_PPC_REG_SP = 1 -}; - -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -#pragma pack(0) -#else -#pragma pack(pop) -#endif - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC 0x20000000 -#define MD_CONTEXT_PPC_BASE (MD_CONTEXT_PPC | 0x00000001) -#define MD_CONTEXT_PPC_FLOATING_POINT (MD_CONTEXT_PPC | 0x00000008) -#define MD_CONTEXT_PPC_VECTOR (MD_CONTEXT_PPC | 0x00000020) - -#define MD_CONTEXT_PPC_FULL MD_CONTEXT_PPC_BASE -#define MD_CONTEXT_PPC_ALL (MD_CONTEXT_PPC_FULL | \ - MD_CONTEXT_PPC_FLOATING_POINT | \ - MD_CONTEXT_PPC_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h deleted file mode 100644 index 61f41938655e83..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_ppc64.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2008, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on ppc64. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Neal Sidhwaney */ - - -/* - * Breakpad minidump extension for PPC64 support. Based on Darwin/Mac OS X' - * mach/ppc/_types.h - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ - -#include "minidump_cpu_ppc.h" - -// these types are the same in ppc64 & ppc -typedef MDFloatingSaveAreaPPC MDFloatingSaveAreaPPC64; -typedef MDVectorSaveAreaPPC MDVectorSaveAreaPPC64; - -#define MD_CONTEXT_PPC64_GPR_COUNT MD_CONTEXT_PPC_GPR_COUNT - -typedef struct { - /* context_flags is not present in ppc_thread_state, but it aids - * identification of MDRawContextPPC among other raw context types, - * and it guarantees alignment when we get to float_save. */ - uint64_t context_flags; - - uint64_t srr0; /* Machine status save/restore: stores pc - * (instruction) */ - uint64_t srr1; /* Machine status save/restore: stores msr - * (ps, program/machine state) */ - /* ppc_thread_state contains 32 fields, r0 .. r31. Here, an array is - * used for brevity. */ - uint64_t gpr[MD_CONTEXT_PPC64_GPR_COUNT]; - uint64_t cr; /* Condition */ - uint64_t xer; /* Integer (fiXed-point) exception */ - uint64_t lr; /* Link */ - uint64_t ctr; /* Count */ - uint64_t vrsave; /* Vector save */ - - /* float_save and vector_save aren't present in ppc_thread_state, but - * are represented in separate structures that still define a thread's - * context. */ - MDFloatingSaveAreaPPC float_save; - MDVectorSaveAreaPPC vector_save; -} MDRawContextPPC64; /* Based on ppc_thread_state */ - -/* Indices into gpr for registers with a dedicated or conventional purpose. */ -enum MDPPC64RegisterNumbers { - MD_CONTEXT_PPC64_REG_SP = 1 -}; - -/* For (MDRawContextPPC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_PPC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_PPC64 0x01000000 -#define MD_CONTEXT_PPC64_BASE (MD_CONTEXT_PPC64 | 0x00000001) -#define MD_CONTEXT_PPC64_FLOATING_POINT (MD_CONTEXT_PPC64 | 0x00000008) -#define MD_CONTEXT_PPC64_VECTOR (MD_CONTEXT_PPC64 | 0x00000020) - -#define MD_CONTEXT_PPC64_FULL MD_CONTEXT_PPC64_BASE -#define MD_CONTEXT_PPC64_ALL (MD_CONTEXT_PPC64_FULL | \ - MD_CONTEXT_PPC64_FLOATING_POINT | \ - MD_CONTEXT_PPC64_VECTOR) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_PPC64_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h deleted file mode 100644 index 95c08b1743e7e5..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_sparc.h +++ /dev/null @@ -1,163 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on sparc. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai - * Change to split into its own file: Neal Sidhwaney */ - -/* - * SPARC support, see (solaris)sys/procfs_isa.h also - */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ - -#define MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT 32 - -typedef struct { - - /* FPU floating point regs */ - uint64_t regs[MD_FLOATINGSAVEAREA_SPARC_FPR_COUNT]; - - uint64_t filler; - uint64_t fsr; /* FPU status register */ -} MDFloatingSaveAreaSPARC; /* FLOATING_SAVE_AREA */ - -#define MD_CONTEXT_SPARC_GPR_COUNT 32 - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated - */ - uint32_t context_flags; - uint32_t flag_pad; - /* - * General register access (SPARC). - * Don't confuse definitions here with definitions in . - * Registers are 32 bits for ILP32, 64 bits for LP64. - * SPARC V7/V8 is for 32bit, SPARC V9 is for 64bit - */ - - /* 32 Integer working registers */ - - /* g_r[0-7] global registers(g0-g7) - * g_r[8-15] out registers(o0-o7) - * g_r[16-23] local registers(l0-l7) - * g_r[24-31] in registers(i0-i7) - */ - uint64_t g_r[MD_CONTEXT_SPARC_GPR_COUNT]; - - /* several control registers */ - - /* Processor State register(PSR) for SPARC V7/V8 - * Condition Code register (CCR) for SPARC V9 - */ - uint64_t ccr; - - uint64_t pc; /* Program Counter register (PC) */ - uint64_t npc; /* Next Program Counter register (nPC) */ - uint64_t y; /* Y register (Y) */ - - /* Address Space Identifier register (ASI) for SPARC V9 - * WIM for SPARC V7/V8 - */ - uint64_t asi; - - /* Floating-Point Registers State register (FPRS) for SPARC V9 - * TBR for for SPARC V7/V8 - */ - uint64_t fprs; - - /* The next field is included with MD_CONTEXT_SPARC_FLOATING_POINT */ - MDFloatingSaveAreaSPARC float_save; - -} MDRawContextSPARC; /* CONTEXT_SPARC */ - -/* Indices into g_r for registers with a dedicated or conventional purpose. */ -enum MDSPARCRegisterNumbers { - MD_CONTEXT_SPARC_REG_SP = 14 -}; - -/* For (MDRawContextSPARC).context_flags. These values indicate the type of - * context stored in the structure. MD_CONTEXT_SPARC is Breakpad-defined. Its - * value was chosen to avoid likely conflicts with MD_CONTEXT_* for other - * CPUs. */ -#define MD_CONTEXT_SPARC 0x10000000 -#define MD_CONTEXT_SPARC_CONTROL (MD_CONTEXT_SPARC | 0x00000001) -#define MD_CONTEXT_SPARC_INTEGER (MD_CONTEXT_SPARC | 0x00000002) -#define MD_CONTEXT_SAPARC_FLOATING_POINT (MD_CONTEXT_SPARC | 0x00000004) -#define MD_CONTEXT_SAPARC_EXTRA (MD_CONTEXT_SPARC | 0x00000008) - -#define MD_CONTEXT_SPARC_FULL (MD_CONTEXT_SPARC_CONTROL | \ - MD_CONTEXT_SPARC_INTEGER) - -#define MD_CONTEXT_SPARC_ALL (MD_CONTEXT_SPARC_FULL | \ - MD_CONTEXT_SAPARC_FLOATING_POINT | \ - MD_CONTEXT_SAPARC_EXTRA) - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_SPARC_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h deleted file mode 100644 index e09cb7cb527ddc..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_cpu_x86.h +++ /dev/null @@ -1,174 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * This file contains the necessary definitions to read minidump files - * produced on x86. These files may be read on any platform provided - * that the alignments of these structures on the processing system are - * identical to the alignments of these structures on the producing system. - * For this reason, precise-sized types are used. The structures defined - * by this file have been laid out to minimize alignment problems by ensuring - * ensuring that all members are aligned on their natural boundaries. In - * In some cases, tail-padding may be significant when different ABIs specify - * different tail-padding behaviors. To avoid problems when reading or - * writing affected structures, MD_*_SIZE macros are provided where needed, - * containing the useful size of the structures without padding. - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ - -#define MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE 80 - /* SIZE_OF_80387_REGISTERS */ - -typedef struct { - uint32_t control_word; - uint32_t status_word; - uint32_t tag_word; - uint32_t error_offset; - uint32_t error_selector; - uint32_t data_offset; - uint32_t data_selector; - - /* register_area contains eight 80-bit (x87 "long double") quantities for - * floating-point registers %st0 (%mm0) through %st7 (%mm7). */ - uint8_t register_area[MD_FLOATINGSAVEAREA_X86_REGISTERAREA_SIZE]; - uint32_t cr0_npx_state; -} MDFloatingSaveAreaX86; /* FLOATING_SAVE_AREA */ - - -#define MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE 512 - /* MAXIMUM_SUPPORTED_EXTENSION */ - -typedef struct { - /* The next field determines the layout of the structure, and which parts - * of it are populated */ - uint32_t context_flags; - - /* The next 6 registers are included with MD_CONTEXT_X86_DEBUG_REGISTERS */ - uint32_t dr0; - uint32_t dr1; - uint32_t dr2; - uint32_t dr3; - uint32_t dr6; - uint32_t dr7; - - /* The next field is included with MD_CONTEXT_X86_FLOATING_POINT */ - MDFloatingSaveAreaX86 float_save; - - /* The next 4 registers are included with MD_CONTEXT_X86_SEGMENTS */ - uint32_t gs; - uint32_t fs; - uint32_t es; - uint32_t ds; - /* The next 6 registers are included with MD_CONTEXT_X86_INTEGER */ - uint32_t edi; - uint32_t esi; - uint32_t ebx; - uint32_t edx; - uint32_t ecx; - uint32_t eax; - - /* The next 6 registers are included with MD_CONTEXT_X86_CONTROL */ - uint32_t ebp; - uint32_t eip; - uint32_t cs; /* WinNT.h says "must be sanitized" */ - uint32_t eflags; /* WinNT.h says "must be sanitized" */ - uint32_t esp; - uint32_t ss; - - /* The next field is included with MD_CONTEXT_X86_EXTENDED_REGISTERS. - * It contains vector (MMX/SSE) registers. It it laid out in the - * format used by the fxsave and fsrstor instructions, so it includes - * a copy of the x87 floating-point registers as well. See FXSAVE in - * "Intel Architecture Software Developer's Manual, Volume 2." */ - uint8_t extended_registers[ - MD_CONTEXT_X86_EXTENDED_REGISTERS_SIZE]; -} MDRawContextX86; /* CONTEXT */ - -/* For (MDRawContextX86).context_flags. These values indicate the type of - * context stored in the structure. The high 24 bits identify the CPU, the - * low 8 bits identify the type of context saved. */ -#define MD_CONTEXT_X86 0x00010000 - /* CONTEXT_i386, CONTEXT_i486: identifies CPU */ -#define MD_CONTEXT_X86_CONTROL (MD_CONTEXT_X86 | 0x00000001) - /* CONTEXT_CONTROL */ -#define MD_CONTEXT_X86_INTEGER (MD_CONTEXT_X86 | 0x00000002) - /* CONTEXT_INTEGER */ -#define MD_CONTEXT_X86_SEGMENTS (MD_CONTEXT_X86 | 0x00000004) - /* CONTEXT_SEGMENTS */ -#define MD_CONTEXT_X86_FLOATING_POINT (MD_CONTEXT_X86 | 0x00000008) - /* CONTEXT_FLOATING_POINT */ -#define MD_CONTEXT_X86_DEBUG_REGISTERS (MD_CONTEXT_X86 | 0x00000010) - /* CONTEXT_DEBUG_REGISTERS */ -#define MD_CONTEXT_X86_EXTENDED_REGISTERS (MD_CONTEXT_X86 | 0x00000020) - /* CONTEXT_EXTENDED_REGISTERS */ -#define MD_CONTEXT_X86_XSTATE (MD_CONTEXT_X86 | 0x00000040) - /* CONTEXT_XSTATE */ - -#define MD_CONTEXT_X86_FULL (MD_CONTEXT_X86_CONTROL | \ - MD_CONTEXT_X86_INTEGER | \ - MD_CONTEXT_X86_SEGMENTS) - /* CONTEXT_FULL */ - -#define MD_CONTEXT_X86_ALL (MD_CONTEXT_X86_FULL | \ - MD_CONTEXT_X86_FLOATING_POINT | \ - MD_CONTEXT_X86_DEBUG_REGISTERS | \ - MD_CONTEXT_X86_EXTENDED_REGISTERS) - /* CONTEXT_ALL */ - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_CPU_X86_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h deleted file mode 100644 index 9e7e4f1e12ae2b..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_linux.h +++ /dev/null @@ -1,87 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_linux.h: A definition of exception codes for - * Linux - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from bits/signum.h. - */ -typedef enum { - MD_EXCEPTION_CODE_LIN_SIGHUP = 1, /* Hangup (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGINT = 2, /* Interrupt (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGQUIT = 3, /* Quit (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGILL = 4, /* Illegal instruction (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGTRAP = 5, /* Trace trap (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGABRT = 6, /* Abort (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGBUS = 7, /* BUS error (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGFPE = 8, /* Floating-point exception (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGKILL = 9, /* Kill, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGUSR1 = 10, /* User-defined signal 1 (POSIX). */ - MD_EXCEPTION_CODE_LIN_SIGSEGV = 11, /* Segmentation violation (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGUSR2 = 12, /* User-defined signal 2 (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGPIPE = 13, /* Broken pipe (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGALRM = 14, /* Alarm clock (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTERM = 15, /* Termination (ANSI) */ - MD_EXCEPTION_CODE_LIN_SIGSTKFLT = 16, /* Stack faultd */ - MD_EXCEPTION_CODE_LIN_SIGCHLD = 17, /* Child status has changed (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGCONT = 18, /* Continue (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGSTOP = 19, /* Stop, unblockable (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTSTP = 20, /* Keyboard stop (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTIN = 21, /* Background read from tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGTTOU = 22, /* Background write to tty (POSIX) */ - MD_EXCEPTION_CODE_LIN_SIGURG = 23, - /* Urgent condition on socket (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXCPU = 24, /* CPU limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGXFSZ = 25, - /* File size limit exceeded (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGVTALRM = 26, /* Virtual alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPROF = 27, /* Profiling alarm clock (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGWINCH = 28, /* Window size change (4.3 BSD, Sun) */ - MD_EXCEPTION_CODE_LIN_SIGIO = 29, /* I/O now possible (4.2 BSD) */ - MD_EXCEPTION_CODE_LIN_SIGPWR = 30, /* Power failure restart (System V) */ - MD_EXCEPTION_CODE_LIN_SIGSYS = 31, /* Bad system call */ - MD_EXCEPTION_CODE_LIN_DUMP_REQUESTED = 0xFFFFFFFF /* No exception, - dump requested. */ -} MDExceptionCodeLinux; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_LINUX_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h deleted file mode 100644 index 91c1c097467c7a..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_mac.h +++ /dev/null @@ -1,205 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_mac.h: A definition of exception codes for Mac - * OS X - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/exception_types.h. This is - * what Mac OS X calls an "exception", not a "code". */ -typedef enum { - /* Exception code. The high 16 bits of exception_code contains one of - * these values. */ - MD_EXCEPTION_MAC_BAD_ACCESS = 1, /* code can be a kern_return_t */ - /* EXC_BAD_ACCESS */ - MD_EXCEPTION_MAC_BAD_INSTRUCTION = 2, /* code is CPU-specific */ - /* EXC_BAD_INSTRUCTION */ - MD_EXCEPTION_MAC_ARITHMETIC = 3, /* code is CPU-specific */ - /* EXC_ARITHMETIC */ - MD_EXCEPTION_MAC_EMULATION = 4, /* code is CPU-specific */ - /* EXC_EMULATION */ - MD_EXCEPTION_MAC_SOFTWARE = 5, - /* EXC_SOFTWARE */ - MD_EXCEPTION_MAC_BREAKPOINT = 6, /* code is CPU-specific */ - /* EXC_BREAKPOINT */ - MD_EXCEPTION_MAC_SYSCALL = 7, - /* EXC_SYSCALL */ - MD_EXCEPTION_MAC_MACH_SYSCALL = 8, - /* EXC_MACH_SYSCALL */ - MD_EXCEPTION_MAC_RPC_ALERT = 9 - /* EXC_RPC_ALERT */ -} MDExceptionMac; - -/* For (MDException).exception_flags. Breakpad minidump extension for Mac OS X - * support. Based on Darwin/Mac OS X' mach/ppc/exception.h and - * mach/i386/exception.h. This is what Mac OS X calls a "code". */ -typedef enum { - /* With MD_EXCEPTION_BAD_ACCESS. These are relevant kern_return_t values - * from mach/kern_return.h. */ - MD_EXCEPTION_CODE_MAC_INVALID_ADDRESS = 1, - /* KERN_INVALID_ADDRESS */ - MD_EXCEPTION_CODE_MAC_PROTECTION_FAILURE = 2, - /* KERN_PROTECTION_FAILURE */ - MD_EXCEPTION_CODE_MAC_NO_ACCESS = 8, - /* KERN_NO_ACCESS */ - MD_EXCEPTION_CODE_MAC_MEMORY_FAILURE = 9, - /* KERN_MEMORY_FAILURE */ - MD_EXCEPTION_CODE_MAC_MEMORY_ERROR = 10, - /* KERN_MEMORY_ERROR */ - - /* With MD_EXCEPTION_SOFTWARE */ - MD_EXCEPTION_CODE_MAC_BAD_SYSCALL = 0x00010000, /* Mach SIGSYS */ - MD_EXCEPTION_CODE_MAC_BAD_PIPE = 0x00010001, /* Mach SIGPIPE */ - MD_EXCEPTION_CODE_MAC_ABORT = 0x00010002, /* Mach SIGABRT */ - /* Custom values */ - MD_EXCEPTION_CODE_MAC_NS_EXCEPTION = 0xDEADC0DE, /* uncaught NSException */ - - /* With MD_EXCEPTION_MAC_BAD_ACCESS on arm */ - MD_EXCEPTION_CODE_MAC_ARM_DA_ALIGN = 0x0101, /* EXC_ARM_DA_ALIGN */ - MD_EXCEPTION_CODE_MAC_ARM_DA_DEBUG = 0x0102, /* EXC_ARM_DA_DEBUG */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on arm */ - MD_EXCEPTION_CODE_MAC_ARM_UNDEFINED = 1, /* EXC_ARM_UNDEFINED */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on arm */ - MD_EXCEPTION_CODE_MAC_ARM_BREAKPOINT = 1, /* EXC_ARM_BREAKPOINT */ - - /* With MD_EXCEPTION_MAC_BAD_ACCESS on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_VM_PROT_READ = 0x0101, - /* EXC_PPC_VM_PROT_READ */ - MD_EXCEPTION_CODE_MAC_PPC_BADSPACE = 0x0102, - /* EXC_PPC_BADSPACE */ - MD_EXCEPTION_CODE_MAC_PPC_UNALIGNED = 0x0103, - /* EXC_PPC_UNALIGNED */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_INVALID_SYSCALL = 1, - /* EXC_PPC_INVALID_SYSCALL */ - MD_EXCEPTION_CODE_MAC_PPC_UNIMPLEMENTED_INSTRUCTION = 2, - /* EXC_PPC_UNIPL_INST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_INSTRUCTION = 3, - /* EXC_PPC_PRIVINST */ - MD_EXCEPTION_CODE_MAC_PPC_PRIVILEGED_REGISTER = 4, - /* EXC_PPC_PRIVREG */ - MD_EXCEPTION_CODE_MAC_PPC_TRACE = 5, - /* EXC_PPC_TRACE */ - MD_EXCEPTION_CODE_MAC_PPC_PERFORMANCE_MONITOR = 6, - /* EXC_PPC_PERFMON */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_OVERFLOW = 1, - /* EXC_PPC_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_ZERO_DIVIDE = 2, - /* EXC_PPC_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_INEXACT = 3, - /* EXC_FLT_INEXACT */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_ZERO_DIVIDE = 4, - /* EXC_PPC_FLT_ZERO_DIVIDE */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_UNDERFLOW = 5, - /* EXC_PPC_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_OVERFLOW = 6, - /* EXC_PPC_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_MAC_PPC_FLOAT_NOT_A_NUMBER = 7, - /* EXC_PPC_FLT_NOT_A_NUMBER */ - - /* With MD_EXCEPTION_MAC_EMULATION on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_NO_EMULATION = 8, - /* EXC_PPC_NOEMULATION */ - MD_EXCEPTION_CODE_MAC_PPC_ALTIVEC_ASSIST = 9, - /* EXC_PPC_ALTIVECASSIST */ - - /* With MD_EXCEPTION_MAC_SOFTWARE on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_TRAP = 0x00000001, /* EXC_PPC_TRAP */ - MD_EXCEPTION_CODE_MAC_PPC_MIGRATE = 0x00010100, /* EXC_PPC_MIGRATE */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on ppc */ - MD_EXCEPTION_CODE_MAC_PPC_BREAKPOINT = 1, /* EXC_PPC_BREAKPOINT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86, see also x86 interrupt - * values below. */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_OPERATION = 1, /* EXC_I386_INVOP */ - - /* With MD_EXCEPTION_MAC_ARITHMETIC on x86 */ - MD_EXCEPTION_CODE_MAC_X86_DIV = 1, /* EXC_I386_DIV */ - MD_EXCEPTION_CODE_MAC_X86_INTO = 2, /* EXC_I386_INTO */ - MD_EXCEPTION_CODE_MAC_X86_NOEXT = 3, /* EXC_I386_NOEXT */ - MD_EXCEPTION_CODE_MAC_X86_EXTOVR = 4, /* EXC_I386_EXTOVR */ - MD_EXCEPTION_CODE_MAC_X86_EXTERR = 5, /* EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_EMERR = 6, /* EXC_I386_EMERR */ - MD_EXCEPTION_CODE_MAC_X86_BOUND = 7, /* EXC_I386_BOUND */ - MD_EXCEPTION_CODE_MAC_X86_SSEEXTERR = 8, /* EXC_I386_SSEEXTERR */ - - /* With MD_EXCEPTION_MAC_BREAKPOINT on x86 */ - MD_EXCEPTION_CODE_MAC_X86_SGL = 1, /* EXC_I386_SGL */ - MD_EXCEPTION_CODE_MAC_X86_BPT = 2, /* EXC_I386_BPT */ - - /* With MD_EXCEPTION_MAC_BAD_INSTRUCTION on x86. These are the raw - * x86 interrupt codes. Most of these are mapped to other Mach - * exceptions and codes, are handled, or should not occur in user space. - * A few of these will do occur with MD_EXCEPTION_MAC_BAD_INSTRUCTION. */ - /* EXC_I386_DIVERR = 0: mapped to EXC_ARITHMETIC/EXC_I386_DIV */ - /* EXC_I386_SGLSTP = 1: mapped to EXC_BREAKPOINT/EXC_I386_SGL */ - /* EXC_I386_NMIFLT = 2: should not occur in user space */ - /* EXC_I386_BPTFLT = 3: mapped to EXC_BREAKPOINT/EXC_I386_BPT */ - /* EXC_I386_INTOFLT = 4: mapped to EXC_ARITHMETIC/EXC_I386_INTO */ - /* EXC_I386_BOUNDFLT = 5: mapped to EXC_ARITHMETIC/EXC_I386_BOUND */ - /* EXC_I386_INVOPFLT = 6: mapped to EXC_BAD_INSTRUCTION/EXC_I386_INVOP */ - /* EXC_I386_NOEXTFLT = 7: should be handled by the kernel */ - /* EXC_I386_DBLFLT = 8: should be handled (if possible) by the kernel */ - /* EXC_I386_EXTOVRFLT = 9: mapped to EXC_BAD_ACCESS/(PROT_READ|PROT_EXEC) */ - MD_EXCEPTION_CODE_MAC_X86_INVALID_TASK_STATE_SEGMENT = 10, - /* EXC_INVTSSFLT */ - MD_EXCEPTION_CODE_MAC_X86_SEGMENT_NOT_PRESENT = 11, - /* EXC_SEGNPFLT */ - MD_EXCEPTION_CODE_MAC_X86_STACK_FAULT = 12, - /* EXC_STKFLT */ - MD_EXCEPTION_CODE_MAC_X86_GENERAL_PROTECTION_FAULT = 13, - /* EXC_GPFLT */ - /* EXC_I386_PGFLT = 14: should not occur in user space */ - /* EXC_I386_EXTERRFLT = 16: mapped to EXC_ARITHMETIC/EXC_I386_EXTERR */ - MD_EXCEPTION_CODE_MAC_X86_ALIGNMENT_FAULT = 17 - /* EXC_ALIGNFLT (for vector operations) */ - /* EXC_I386_ENOEXTFLT = 32: should be handled by the kernel */ - /* EXC_I386_ENDPERR = 33: should not occur */ -} MDExceptionCodeMac; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_MAC_OSX_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h deleted file mode 100644 index adff5a6bbc6dcf..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_ps3.h +++ /dev/null @@ -1,67 +0,0 @@ -/* Copyright (c) 2013, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_ps3.h: A definition of exception codes for - * PS3 */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -typedef enum { - MD_EXCEPTION_CODE_PS3_UNKNOWN = 0, - MD_EXCEPTION_CODE_PS3_TRAP_EXCEP = 1, - MD_EXCEPTION_CODE_PS3_PRIV_INSTR = 2, - MD_EXCEPTION_CODE_PS3_ILLEGAL_INSTR = 3, - MD_EXCEPTION_CODE_PS3_INSTR_STORAGE = 4, - MD_EXCEPTION_CODE_PS3_INSTR_SEGMENT = 5, - MD_EXCEPTION_CODE_PS3_DATA_STORAGE = 6, - MD_EXCEPTION_CODE_PS3_DATA_SEGMENT = 7, - MD_EXCEPTION_CODE_PS3_FLOAT_POINT = 8, - MD_EXCEPTION_CODE_PS3_DABR_MATCH = 9, - MD_EXCEPTION_CODE_PS3_ALIGN_EXCEP = 10, - MD_EXCEPTION_CODE_PS3_MEMORY_ACCESS = 11, - MD_EXCEPTION_CODE_PS3_COPRO_ALIGN = 12, - MD_EXCEPTION_CODE_PS3_COPRO_INVALID_COM = 13, - MD_EXCEPTION_CODE_PS3_COPRO_ERR = 14, - MD_EXCEPTION_CODE_PS3_COPRO_FIR = 15, - MD_EXCEPTION_CODE_PS3_COPRO_DATA_SEGMENT = 16, - MD_EXCEPTION_CODE_PS3_COPRO_DATA_STORAGE = 17, - MD_EXCEPTION_CODE_PS3_COPRO_STOP_INSTR = 18, - MD_EXCEPTION_CODE_PS3_COPRO_HALT_INSTR = 19, - MD_EXCEPTION_CODE_PS3_COPRO_HALTINST_UNKNOWN = 20, - MD_EXCEPTION_CODE_PS3_COPRO_MEMORY_ACCESS = 21, - MD_EXCEPTION_CODE_PS3_GRAPHIC = 22 -} MDExceptionCodePS3; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_PS3_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h deleted file mode 100644 index f18ddf42472ccf..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_solaris.h +++ /dev/null @@ -1,94 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_solaris.h: A definition of exception codes for - * Solaris - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - -/* For (MDException).exception_code. These values come from sys/iso/signal_iso.h - */ -typedef enum { - MD_EXCEPTION_CODE_SOL_SIGHUP = 1, /* Hangup */ - MD_EXCEPTION_CODE_SOL_SIGINT = 2, /* interrupt (rubout) */ - MD_EXCEPTION_CODE_SOL_SIGQUIT = 3, /* quit (ASCII FS) */ - MD_EXCEPTION_CODE_SOL_SIGILL = 4, /* illegal instruction (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGTRAP = 5, /* trace trap (not reset when caught) */ - MD_EXCEPTION_CODE_SOL_SIGIOT = 6, /* IOT instruction */ - MD_EXCEPTION_CODE_SOL_SIGABRT = 6, /* used by abort, replace SIGIOT in the future */ - MD_EXCEPTION_CODE_SOL_SIGEMT = 7, /* EMT instruction */ - MD_EXCEPTION_CODE_SOL_SIGFPE = 8, /* floating point exception */ - MD_EXCEPTION_CODE_SOL_SIGKILL = 9, /* kill (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGBUS = 10, /* bus error */ - MD_EXCEPTION_CODE_SOL_SIGSEGV = 11, /* segmentation violation */ - MD_EXCEPTION_CODE_SOL_SIGSYS = 12, /* bad argument to system call */ - MD_EXCEPTION_CODE_SOL_SIGPIPE = 13, /* write on a pipe with no one to read it */ - MD_EXCEPTION_CODE_SOL_SIGALRM = 14, /* alarm clock */ - MD_EXCEPTION_CODE_SOL_SIGTERM = 15, /* software termination signal from kill */ - MD_EXCEPTION_CODE_SOL_SIGUSR1 = 16, /* user defined signal 1 */ - MD_EXCEPTION_CODE_SOL_SIGUSR2 = 17, /* user defined signal 2 */ - MD_EXCEPTION_CODE_SOL_SIGCLD = 18, /* child status change */ - MD_EXCEPTION_CODE_SOL_SIGCHLD = 18, /* child status change alias (POSIX) */ - MD_EXCEPTION_CODE_SOL_SIGPWR = 19, /* power-fail restart */ - MD_EXCEPTION_CODE_SOL_SIGWINCH = 20, /* window size change */ - MD_EXCEPTION_CODE_SOL_SIGURG = 21, /* urgent socket condition */ - MD_EXCEPTION_CODE_SOL_SIGPOLL = 22, /* pollable event occurred */ - MD_EXCEPTION_CODE_SOL_SIGIO = 22, /* socket I/O possible (SIGPOLL alias) */ - MD_EXCEPTION_CODE_SOL_SIGSTOP = 23, /* stop (cannot be caught or ignored) */ - MD_EXCEPTION_CODE_SOL_SIGTSTP = 24, /* user stop requested from tty */ - MD_EXCEPTION_CODE_SOL_SIGCONT = 25, /* stopped process has been continued */ - MD_EXCEPTION_CODE_SOL_SIGTTIN = 26, /* background tty read attempted */ - MD_EXCEPTION_CODE_SOL_SIGTTOU = 27, /* background tty write attempted */ - MD_EXCEPTION_CODE_SOL_SIGVTALRM = 28, /* virtual timer expired */ - MD_EXCEPTION_CODE_SOL_SIGPROF = 29, /* profiling timer expired */ - MD_EXCEPTION_CODE_SOL_SIGXCPU = 30, /* exceeded cpu limit */ - MD_EXCEPTION_CODE_SOL_SIGXFSZ = 31, /* exceeded file size limit */ - MD_EXCEPTION_CODE_SOL_SIGWAITING = 32, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGLWP = 33, /* reserved signal no longer used by threading code */ - MD_EXCEPTION_CODE_SOL_SIGFREEZE = 34, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGTHAW = 35, /* special signal used by CPR */ - MD_EXCEPTION_CODE_SOL_SIGCANCEL = 36, /* reserved signal for thread cancellation */ - MD_EXCEPTION_CODE_SOL_SIGLOST = 37, /* resource lost (eg, record-lock lost) */ - MD_EXCEPTION_CODE_SOL_SIGXRES = 38, /* resource control exceeded */ - MD_EXCEPTION_CODE_SOL_SIGJVM1 = 39, /* reserved signal for Java Virtual Machine */ - MD_EXCEPTION_CODE_SOL_SIGJVM2 = 40 /* reserved signal for Java Virtual Machine */ -} MDExceptionCodeSolaris; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_SOLARIS_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h deleted file mode 100644 index e4cd59edd5f116..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_exception_win32.h +++ /dev/null @@ -1,2261 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_exception_win32.h: Definitions of exception codes for - * Win32 platform - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Author: Mark Mentovai - * Split into its own file: Neal Sidhwaney */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -/* For (MDException).exception_code. These values come from WinBase.h - * and WinNT.h (names beginning with EXCEPTION_ are in WinBase.h, - * they are STATUS_ in WinNT.h). */ -typedef enum { - MD_EXCEPTION_CODE_WIN_CONTROL_C = 0x40010005, - /* DBG_CONTROL_C */ - MD_EXCEPTION_CODE_WIN_GUARD_PAGE_VIOLATION = 0x80000001, - /* EXCEPTION_GUARD_PAGE */ - MD_EXCEPTION_CODE_WIN_DATATYPE_MISALIGNMENT = 0x80000002, - /* EXCEPTION_DATATYPE_MISALIGNMENT */ - MD_EXCEPTION_CODE_WIN_BREAKPOINT = 0x80000003, - /* EXCEPTION_BREAKPOINT */ - MD_EXCEPTION_CODE_WIN_SINGLE_STEP = 0x80000004, - /* EXCEPTION_SINGLE_STEP */ - MD_EXCEPTION_CODE_WIN_ACCESS_VIOLATION = 0xc0000005, - /* EXCEPTION_ACCESS_VIOLATION */ - MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR = 0xc0000006, - /* EXCEPTION_IN_PAGE_ERROR */ - MD_EXCEPTION_CODE_WIN_INVALID_HANDLE = 0xc0000008, - /* EXCEPTION_INVALID_HANDLE */ - MD_EXCEPTION_CODE_WIN_ILLEGAL_INSTRUCTION = 0xc000001d, - /* EXCEPTION_ILLEGAL_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_NONCONTINUABLE_EXCEPTION = 0xc0000025, - /* EXCEPTION_NONCONTINUABLE_EXCEPTION */ - MD_EXCEPTION_CODE_WIN_INVALID_DISPOSITION = 0xc0000026, - /* EXCEPTION_INVALID_DISPOSITION */ - MD_EXCEPTION_CODE_WIN_ARRAY_BOUNDS_EXCEEDED = 0xc000008c, - /* EXCEPTION_BOUNDS_EXCEEDED */ - MD_EXCEPTION_CODE_WIN_FLOAT_DENORMAL_OPERAND = 0xc000008d, - /* EXCEPTION_FLT_DENORMAL_OPERAND */ - MD_EXCEPTION_CODE_WIN_FLOAT_DIVIDE_BY_ZERO = 0xc000008e, - /* EXCEPTION_FLT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_FLOAT_INEXACT_RESULT = 0xc000008f, - /* EXCEPTION_FLT_INEXACT_RESULT */ - MD_EXCEPTION_CODE_WIN_FLOAT_INVALID_OPERATION = 0xc0000090, - /* EXCEPTION_FLT_INVALID_OPERATION */ - MD_EXCEPTION_CODE_WIN_FLOAT_OVERFLOW = 0xc0000091, - /* EXCEPTION_FLT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_FLOAT_STACK_CHECK = 0xc0000092, - /* EXCEPTION_FLT_STACK_CHECK */ - MD_EXCEPTION_CODE_WIN_FLOAT_UNDERFLOW = 0xc0000093, - /* EXCEPTION_FLT_UNDERFLOW */ - MD_EXCEPTION_CODE_WIN_INTEGER_DIVIDE_BY_ZERO = 0xc0000094, - /* EXCEPTION_INT_DIVIDE_BY_ZERO */ - MD_EXCEPTION_CODE_WIN_INTEGER_OVERFLOW = 0xc0000095, - /* EXCEPTION_INT_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_PRIVILEGED_INSTRUCTION = 0xc0000096, - /* EXCEPTION_PRIV_INSTRUCTION */ - MD_EXCEPTION_CODE_WIN_STACK_OVERFLOW = 0xc00000fd, - /* EXCEPTION_STACK_OVERFLOW */ - MD_EXCEPTION_CODE_WIN_POSSIBLE_DEADLOCK = 0xc0000194, - /* EXCEPTION_POSSIBLE_DEADLOCK */ - MD_EXCEPTION_CODE_WIN_STACK_BUFFER_OVERRUN = 0xc0000409, - /* STATUS_STACK_BUFFER_OVERRUN */ - MD_EXCEPTION_CODE_WIN_HEAP_CORRUPTION = 0xc0000374, - /* STATUS_HEAP_CORRUPTION */ - MD_EXCEPTION_CODE_WIN_UNHANDLED_CPP_EXCEPTION = 0xe06d7363 - /* Per http://support.microsoft.com/kb/185294, - generated by Visual C++ compiler */ -} MDExceptionCodeWin; - - -/* For (MDException).exception_information[2], when (MDException).exception_code - * is MD_EXCEPTION_CODE_WIN_IN_PAGE_ERROR. This describes the underlying reason - * for the error. These values come from ntstatus.h. - * - * The content of this enum was created from ntstatus.h in the 8.1 SDK with - * - * egrep '#define [A-Z_0-9]+\s+\(\(NTSTATUS\)0xC[0-9A-F]+L\)' ntstatus.h - * | tr -d '\r' - * | sed -r 's@#define ([A-Z_0-9]+)\s+\(\(NTSTATUS\)(0xC[0-9A-F]+)L\).*@\2 \1@' - * | sort - * | sed -r 's@(0xC[0-9A-F]+) ([A-Z_0-9]+)@ MD_NTSTATUS_WIN_\2 = \1,@' - * - * With easy copy to clipboard with - * | xclip -selection c # on linux - * | clip # on windows - * | pbcopy # on mac - * - * and then the last comma manually removed. */ -typedef enum { - MD_NTSTATUS_WIN_STATUS_UNSUCCESSFUL = 0xC0000001, - MD_NTSTATUS_WIN_STATUS_NOT_IMPLEMENTED = 0xC0000002, - MD_NTSTATUS_WIN_STATUS_INVALID_INFO_CLASS = 0xC0000003, - MD_NTSTATUS_WIN_STATUS_INFO_LENGTH_MISMATCH = 0xC0000004, - MD_NTSTATUS_WIN_STATUS_ACCESS_VIOLATION = 0xC0000005, - MD_NTSTATUS_WIN_STATUS_IN_PAGE_ERROR = 0xC0000006, - MD_NTSTATUS_WIN_STATUS_PAGEFILE_QUOTA = 0xC0000007, - MD_NTSTATUS_WIN_STATUS_INVALID_HANDLE = 0xC0000008, - MD_NTSTATUS_WIN_STATUS_BAD_INITIAL_STACK = 0xC0000009, - MD_NTSTATUS_WIN_STATUS_BAD_INITIAL_PC = 0xC000000A, - MD_NTSTATUS_WIN_STATUS_INVALID_CID = 0xC000000B, - MD_NTSTATUS_WIN_STATUS_TIMER_NOT_CANCELED = 0xC000000C, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER = 0xC000000D, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_DEVICE = 0xC000000E, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_FILE = 0xC000000F, - MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_REQUEST = 0xC0000010, - MD_NTSTATUS_WIN_STATUS_END_OF_FILE = 0xC0000011, - MD_NTSTATUS_WIN_STATUS_WRONG_VOLUME = 0xC0000012, - MD_NTSTATUS_WIN_STATUS_NO_MEDIA_IN_DEVICE = 0xC0000013, - MD_NTSTATUS_WIN_STATUS_UNRECOGNIZED_MEDIA = 0xC0000014, - MD_NTSTATUS_WIN_STATUS_NONEXISTENT_SECTOR = 0xC0000015, - MD_NTSTATUS_WIN_STATUS_MORE_PROCESSING_REQUIRED = 0xC0000016, - MD_NTSTATUS_WIN_STATUS_NO_MEMORY = 0xC0000017, - MD_NTSTATUS_WIN_STATUS_CONFLICTING_ADDRESSES = 0xC0000018, - MD_NTSTATUS_WIN_STATUS_NOT_MAPPED_VIEW = 0xC0000019, - MD_NTSTATUS_WIN_STATUS_UNABLE_TO_FREE_VM = 0xC000001A, - MD_NTSTATUS_WIN_STATUS_UNABLE_TO_DELETE_SECTION = 0xC000001B, - MD_NTSTATUS_WIN_STATUS_INVALID_SYSTEM_SERVICE = 0xC000001C, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_INSTRUCTION = 0xC000001D, - MD_NTSTATUS_WIN_STATUS_INVALID_LOCK_SEQUENCE = 0xC000001E, - MD_NTSTATUS_WIN_STATUS_INVALID_VIEW_SIZE = 0xC000001F, - MD_NTSTATUS_WIN_STATUS_INVALID_FILE_FOR_SECTION = 0xC0000020, - MD_NTSTATUS_WIN_STATUS_ALREADY_COMMITTED = 0xC0000021, - MD_NTSTATUS_WIN_STATUS_ACCESS_DENIED = 0xC0000022, - MD_NTSTATUS_WIN_STATUS_BUFFER_TOO_SMALL = 0xC0000023, - MD_NTSTATUS_WIN_STATUS_OBJECT_TYPE_MISMATCH = 0xC0000024, - MD_NTSTATUS_WIN_STATUS_NONCONTINUABLE_EXCEPTION = 0xC0000025, - MD_NTSTATUS_WIN_STATUS_INVALID_DISPOSITION = 0xC0000026, - MD_NTSTATUS_WIN_STATUS_UNWIND = 0xC0000027, - MD_NTSTATUS_WIN_STATUS_BAD_STACK = 0xC0000028, - MD_NTSTATUS_WIN_STATUS_INVALID_UNWIND_TARGET = 0xC0000029, - MD_NTSTATUS_WIN_STATUS_NOT_LOCKED = 0xC000002A, - MD_NTSTATUS_WIN_STATUS_PARITY_ERROR = 0xC000002B, - MD_NTSTATUS_WIN_STATUS_UNABLE_TO_DECOMMIT_VM = 0xC000002C, - MD_NTSTATUS_WIN_STATUS_NOT_COMMITTED = 0xC000002D, - MD_NTSTATUS_WIN_STATUS_INVALID_PORT_ATTRIBUTES = 0xC000002E, - MD_NTSTATUS_WIN_STATUS_PORT_MESSAGE_TOO_LONG = 0xC000002F, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_MIX = 0xC0000030, - MD_NTSTATUS_WIN_STATUS_INVALID_QUOTA_LOWER = 0xC0000031, - MD_NTSTATUS_WIN_STATUS_DISK_CORRUPT_ERROR = 0xC0000032, - MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_INVALID = 0xC0000033, - MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_NOT_FOUND = 0xC0000034, - MD_NTSTATUS_WIN_STATUS_OBJECT_NAME_COLLISION = 0xC0000035, - MD_NTSTATUS_WIN_STATUS_PORT_DISCONNECTED = 0xC0000037, - MD_NTSTATUS_WIN_STATUS_DEVICE_ALREADY_ATTACHED = 0xC0000038, - MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_INVALID = 0xC0000039, - MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_NOT_FOUND = 0xC000003A, - MD_NTSTATUS_WIN_STATUS_OBJECT_PATH_SYNTAX_BAD = 0xC000003B, - MD_NTSTATUS_WIN_STATUS_DATA_OVERRUN = 0xC000003C, - MD_NTSTATUS_WIN_STATUS_DATA_LATE_ERROR = 0xC000003D, - MD_NTSTATUS_WIN_STATUS_DATA_ERROR = 0xC000003E, - MD_NTSTATUS_WIN_STATUS_CRC_ERROR = 0xC000003F, - MD_NTSTATUS_WIN_STATUS_SECTION_TOO_BIG = 0xC0000040, - MD_NTSTATUS_WIN_STATUS_PORT_CONNECTION_REFUSED = 0xC0000041, - MD_NTSTATUS_WIN_STATUS_INVALID_PORT_HANDLE = 0xC0000042, - MD_NTSTATUS_WIN_STATUS_SHARING_VIOLATION = 0xC0000043, - MD_NTSTATUS_WIN_STATUS_QUOTA_EXCEEDED = 0xC0000044, - MD_NTSTATUS_WIN_STATUS_INVALID_PAGE_PROTECTION = 0xC0000045, - MD_NTSTATUS_WIN_STATUS_MUTANT_NOT_OWNED = 0xC0000046, - MD_NTSTATUS_WIN_STATUS_SEMAPHORE_LIMIT_EXCEEDED = 0xC0000047, - MD_NTSTATUS_WIN_STATUS_PORT_ALREADY_SET = 0xC0000048, - MD_NTSTATUS_WIN_STATUS_SECTION_NOT_IMAGE = 0xC0000049, - MD_NTSTATUS_WIN_STATUS_SUSPEND_COUNT_EXCEEDED = 0xC000004A, - MD_NTSTATUS_WIN_STATUS_THREAD_IS_TERMINATING = 0xC000004B, - MD_NTSTATUS_WIN_STATUS_BAD_WORKING_SET_LIMIT = 0xC000004C, - MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_FILE_MAP = 0xC000004D, - MD_NTSTATUS_WIN_STATUS_SECTION_PROTECTION = 0xC000004E, - MD_NTSTATUS_WIN_STATUS_EAS_NOT_SUPPORTED = 0xC000004F, - MD_NTSTATUS_WIN_STATUS_EA_TOO_LARGE = 0xC0000050, - MD_NTSTATUS_WIN_STATUS_NONEXISTENT_EA_ENTRY = 0xC0000051, - MD_NTSTATUS_WIN_STATUS_NO_EAS_ON_FILE = 0xC0000052, - MD_NTSTATUS_WIN_STATUS_EA_CORRUPT_ERROR = 0xC0000053, - MD_NTSTATUS_WIN_STATUS_FILE_LOCK_CONFLICT = 0xC0000054, - MD_NTSTATUS_WIN_STATUS_LOCK_NOT_GRANTED = 0xC0000055, - MD_NTSTATUS_WIN_STATUS_DELETE_PENDING = 0xC0000056, - MD_NTSTATUS_WIN_STATUS_CTL_FILE_NOT_SUPPORTED = 0xC0000057, - MD_NTSTATUS_WIN_STATUS_UNKNOWN_REVISION = 0xC0000058, - MD_NTSTATUS_WIN_STATUS_REVISION_MISMATCH = 0xC0000059, - MD_NTSTATUS_WIN_STATUS_INVALID_OWNER = 0xC000005A, - MD_NTSTATUS_WIN_STATUS_INVALID_PRIMARY_GROUP = 0xC000005B, - MD_NTSTATUS_WIN_STATUS_NO_IMPERSONATION_TOKEN = 0xC000005C, - MD_NTSTATUS_WIN_STATUS_CANT_DISABLE_MANDATORY = 0xC000005D, - MD_NTSTATUS_WIN_STATUS_NO_LOGON_SERVERS = 0xC000005E, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_LOGON_SESSION = 0xC000005F, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_PRIVILEGE = 0xC0000060, - MD_NTSTATUS_WIN_STATUS_PRIVILEGE_NOT_HELD = 0xC0000061, - MD_NTSTATUS_WIN_STATUS_INVALID_ACCOUNT_NAME = 0xC0000062, - MD_NTSTATUS_WIN_STATUS_USER_EXISTS = 0xC0000063, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_USER = 0xC0000064, - MD_NTSTATUS_WIN_STATUS_GROUP_EXISTS = 0xC0000065, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_GROUP = 0xC0000066, - MD_NTSTATUS_WIN_STATUS_MEMBER_IN_GROUP = 0xC0000067, - MD_NTSTATUS_WIN_STATUS_MEMBER_NOT_IN_GROUP = 0xC0000068, - MD_NTSTATUS_WIN_STATUS_LAST_ADMIN = 0xC0000069, - MD_NTSTATUS_WIN_STATUS_WRONG_PASSWORD = 0xC000006A, - MD_NTSTATUS_WIN_STATUS_ILL_FORMED_PASSWORD = 0xC000006B, - MD_NTSTATUS_WIN_STATUS_PASSWORD_RESTRICTION = 0xC000006C, - MD_NTSTATUS_WIN_STATUS_LOGON_FAILURE = 0xC000006D, - MD_NTSTATUS_WIN_STATUS_ACCOUNT_RESTRICTION = 0xC000006E, - MD_NTSTATUS_WIN_STATUS_INVALID_LOGON_HOURS = 0xC000006F, - MD_NTSTATUS_WIN_STATUS_INVALID_WORKSTATION = 0xC0000070, - MD_NTSTATUS_WIN_STATUS_PASSWORD_EXPIRED = 0xC0000071, - MD_NTSTATUS_WIN_STATUS_ACCOUNT_DISABLED = 0xC0000072, - MD_NTSTATUS_WIN_STATUS_NONE_MAPPED = 0xC0000073, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_LUIDS_REQUESTED = 0xC0000074, - MD_NTSTATUS_WIN_STATUS_LUIDS_EXHAUSTED = 0xC0000075, - MD_NTSTATUS_WIN_STATUS_INVALID_SUB_AUTHORITY = 0xC0000076, - MD_NTSTATUS_WIN_STATUS_INVALID_ACL = 0xC0000077, - MD_NTSTATUS_WIN_STATUS_INVALID_SID = 0xC0000078, - MD_NTSTATUS_WIN_STATUS_INVALID_SECURITY_DESCR = 0xC0000079, - MD_NTSTATUS_WIN_STATUS_PROCEDURE_NOT_FOUND = 0xC000007A, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_FORMAT = 0xC000007B, - MD_NTSTATUS_WIN_STATUS_NO_TOKEN = 0xC000007C, - MD_NTSTATUS_WIN_STATUS_BAD_INHERITANCE_ACL = 0xC000007D, - MD_NTSTATUS_WIN_STATUS_RANGE_NOT_LOCKED = 0xC000007E, - MD_NTSTATUS_WIN_STATUS_DISK_FULL = 0xC000007F, - MD_NTSTATUS_WIN_STATUS_SERVER_DISABLED = 0xC0000080, - MD_NTSTATUS_WIN_STATUS_SERVER_NOT_DISABLED = 0xC0000081, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_GUIDS_REQUESTED = 0xC0000082, - MD_NTSTATUS_WIN_STATUS_GUIDS_EXHAUSTED = 0xC0000083, - MD_NTSTATUS_WIN_STATUS_INVALID_ID_AUTHORITY = 0xC0000084, - MD_NTSTATUS_WIN_STATUS_AGENTS_EXHAUSTED = 0xC0000085, - MD_NTSTATUS_WIN_STATUS_INVALID_VOLUME_LABEL = 0xC0000086, - MD_NTSTATUS_WIN_STATUS_SECTION_NOT_EXTENDED = 0xC0000087, - MD_NTSTATUS_WIN_STATUS_NOT_MAPPED_DATA = 0xC0000088, - MD_NTSTATUS_WIN_STATUS_RESOURCE_DATA_NOT_FOUND = 0xC0000089, - MD_NTSTATUS_WIN_STATUS_RESOURCE_TYPE_NOT_FOUND = 0xC000008A, - MD_NTSTATUS_WIN_STATUS_RESOURCE_NAME_NOT_FOUND = 0xC000008B, - MD_NTSTATUS_WIN_STATUS_ARRAY_BOUNDS_EXCEEDED = 0xC000008C, - MD_NTSTATUS_WIN_STATUS_FLOAT_DENORMAL_OPERAND = 0xC000008D, - MD_NTSTATUS_WIN_STATUS_FLOAT_DIVIDE_BY_ZERO = 0xC000008E, - MD_NTSTATUS_WIN_STATUS_FLOAT_INEXACT_RESULT = 0xC000008F, - MD_NTSTATUS_WIN_STATUS_FLOAT_INVALID_OPERATION = 0xC0000090, - MD_NTSTATUS_WIN_STATUS_FLOAT_OVERFLOW = 0xC0000091, - MD_NTSTATUS_WIN_STATUS_FLOAT_STACK_CHECK = 0xC0000092, - MD_NTSTATUS_WIN_STATUS_FLOAT_UNDERFLOW = 0xC0000093, - MD_NTSTATUS_WIN_STATUS_INTEGER_DIVIDE_BY_ZERO = 0xC0000094, - MD_NTSTATUS_WIN_STATUS_INTEGER_OVERFLOW = 0xC0000095, - MD_NTSTATUS_WIN_STATUS_PRIVILEGED_INSTRUCTION = 0xC0000096, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_PAGING_FILES = 0xC0000097, - MD_NTSTATUS_WIN_STATUS_FILE_INVALID = 0xC0000098, - MD_NTSTATUS_WIN_STATUS_ALLOTTED_SPACE_EXCEEDED = 0xC0000099, - MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_RESOURCES = 0xC000009A, - MD_NTSTATUS_WIN_STATUS_DFS_EXIT_PATH_FOUND = 0xC000009B, - MD_NTSTATUS_WIN_STATUS_DEVICE_DATA_ERROR = 0xC000009C, - MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_CONNECTED = 0xC000009D, - MD_NTSTATUS_WIN_STATUS_DEVICE_POWER_FAILURE = 0xC000009E, - MD_NTSTATUS_WIN_STATUS_FREE_VM_NOT_AT_BASE = 0xC000009F, - MD_NTSTATUS_WIN_STATUS_MEMORY_NOT_ALLOCATED = 0xC00000A0, - MD_NTSTATUS_WIN_STATUS_WORKING_SET_QUOTA = 0xC00000A1, - MD_NTSTATUS_WIN_STATUS_MEDIA_WRITE_PROTECTED = 0xC00000A2, - MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_READY = 0xC00000A3, - MD_NTSTATUS_WIN_STATUS_INVALID_GROUP_ATTRIBUTES = 0xC00000A4, - MD_NTSTATUS_WIN_STATUS_BAD_IMPERSONATION_LEVEL = 0xC00000A5, - MD_NTSTATUS_WIN_STATUS_CANT_OPEN_ANONYMOUS = 0xC00000A6, - MD_NTSTATUS_WIN_STATUS_BAD_VALIDATION_CLASS = 0xC00000A7, - MD_NTSTATUS_WIN_STATUS_BAD_TOKEN_TYPE = 0xC00000A8, - MD_NTSTATUS_WIN_STATUS_BAD_MASTER_BOOT_RECORD = 0xC00000A9, - MD_NTSTATUS_WIN_STATUS_INSTRUCTION_MISALIGNMENT = 0xC00000AA, - MD_NTSTATUS_WIN_STATUS_INSTANCE_NOT_AVAILABLE = 0xC00000AB, - MD_NTSTATUS_WIN_STATUS_PIPE_NOT_AVAILABLE = 0xC00000AC, - MD_NTSTATUS_WIN_STATUS_INVALID_PIPE_STATE = 0xC00000AD, - MD_NTSTATUS_WIN_STATUS_PIPE_BUSY = 0xC00000AE, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_FUNCTION = 0xC00000AF, - MD_NTSTATUS_WIN_STATUS_PIPE_DISCONNECTED = 0xC00000B0, - MD_NTSTATUS_WIN_STATUS_PIPE_CLOSING = 0xC00000B1, - MD_NTSTATUS_WIN_STATUS_PIPE_CONNECTED = 0xC00000B2, - MD_NTSTATUS_WIN_STATUS_PIPE_LISTENING = 0xC00000B3, - MD_NTSTATUS_WIN_STATUS_INVALID_READ_MODE = 0xC00000B4, - MD_NTSTATUS_WIN_STATUS_IO_TIMEOUT = 0xC00000B5, - MD_NTSTATUS_WIN_STATUS_FILE_FORCED_CLOSED = 0xC00000B6, - MD_NTSTATUS_WIN_STATUS_PROFILING_NOT_STARTED = 0xC00000B7, - MD_NTSTATUS_WIN_STATUS_PROFILING_NOT_STOPPED = 0xC00000B8, - MD_NTSTATUS_WIN_STATUS_COULD_NOT_INTERPRET = 0xC00000B9, - MD_NTSTATUS_WIN_STATUS_FILE_IS_A_DIRECTORY = 0xC00000BA, - MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED = 0xC00000BB, - MD_NTSTATUS_WIN_STATUS_REMOTE_NOT_LISTENING = 0xC00000BC, - MD_NTSTATUS_WIN_STATUS_DUPLICATE_NAME = 0xC00000BD, - MD_NTSTATUS_WIN_STATUS_BAD_NETWORK_PATH = 0xC00000BE, - MD_NTSTATUS_WIN_STATUS_NETWORK_BUSY = 0xC00000BF, - MD_NTSTATUS_WIN_STATUS_DEVICE_DOES_NOT_EXIST = 0xC00000C0, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_COMMANDS = 0xC00000C1, - MD_NTSTATUS_WIN_STATUS_ADAPTER_HARDWARE_ERROR = 0xC00000C2, - MD_NTSTATUS_WIN_STATUS_INVALID_NETWORK_RESPONSE = 0xC00000C3, - MD_NTSTATUS_WIN_STATUS_UNEXPECTED_NETWORK_ERROR = 0xC00000C4, - MD_NTSTATUS_WIN_STATUS_BAD_REMOTE_ADAPTER = 0xC00000C5, - MD_NTSTATUS_WIN_STATUS_PRINT_QUEUE_FULL = 0xC00000C6, - MD_NTSTATUS_WIN_STATUS_NO_SPOOL_SPACE = 0xC00000C7, - MD_NTSTATUS_WIN_STATUS_PRINT_CANCELLED = 0xC00000C8, - MD_NTSTATUS_WIN_STATUS_NETWORK_NAME_DELETED = 0xC00000C9, - MD_NTSTATUS_WIN_STATUS_NETWORK_ACCESS_DENIED = 0xC00000CA, - MD_NTSTATUS_WIN_STATUS_BAD_DEVICE_TYPE = 0xC00000CB, - MD_NTSTATUS_WIN_STATUS_BAD_NETWORK_NAME = 0xC00000CC, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_NAMES = 0xC00000CD, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_SESSIONS = 0xC00000CE, - MD_NTSTATUS_WIN_STATUS_SHARING_PAUSED = 0xC00000CF, - MD_NTSTATUS_WIN_STATUS_REQUEST_NOT_ACCEPTED = 0xC00000D0, - MD_NTSTATUS_WIN_STATUS_REDIRECTOR_PAUSED = 0xC00000D1, - MD_NTSTATUS_WIN_STATUS_NET_WRITE_FAULT = 0xC00000D2, - MD_NTSTATUS_WIN_STATUS_PROFILING_AT_LIMIT = 0xC00000D3, - MD_NTSTATUS_WIN_STATUS_NOT_SAME_DEVICE = 0xC00000D4, - MD_NTSTATUS_WIN_STATUS_FILE_RENAMED = 0xC00000D5, - MD_NTSTATUS_WIN_STATUS_VIRTUAL_CIRCUIT_CLOSED = 0xC00000D6, - MD_NTSTATUS_WIN_STATUS_NO_SECURITY_ON_OBJECT = 0xC00000D7, - MD_NTSTATUS_WIN_STATUS_CANT_WAIT = 0xC00000D8, - MD_NTSTATUS_WIN_STATUS_PIPE_EMPTY = 0xC00000D9, - MD_NTSTATUS_WIN_STATUS_CANT_ACCESS_DOMAIN_INFO = 0xC00000DA, - MD_NTSTATUS_WIN_STATUS_CANT_TERMINATE_SELF = 0xC00000DB, - MD_NTSTATUS_WIN_STATUS_INVALID_SERVER_STATE = 0xC00000DC, - MD_NTSTATUS_WIN_STATUS_INVALID_DOMAIN_STATE = 0xC00000DD, - MD_NTSTATUS_WIN_STATUS_INVALID_DOMAIN_ROLE = 0xC00000DE, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_DOMAIN = 0xC00000DF, - MD_NTSTATUS_WIN_STATUS_DOMAIN_EXISTS = 0xC00000E0, - MD_NTSTATUS_WIN_STATUS_DOMAIN_LIMIT_EXCEEDED = 0xC00000E1, - MD_NTSTATUS_WIN_STATUS_OPLOCK_NOT_GRANTED = 0xC00000E2, - MD_NTSTATUS_WIN_STATUS_INVALID_OPLOCK_PROTOCOL = 0xC00000E3, - MD_NTSTATUS_WIN_STATUS_INTERNAL_DB_CORRUPTION = 0xC00000E4, - MD_NTSTATUS_WIN_STATUS_INTERNAL_ERROR = 0xC00000E5, - MD_NTSTATUS_WIN_STATUS_GENERIC_NOT_MAPPED = 0xC00000E6, - MD_NTSTATUS_WIN_STATUS_BAD_DESCRIPTOR_FORMAT = 0xC00000E7, - MD_NTSTATUS_WIN_STATUS_INVALID_USER_BUFFER = 0xC00000E8, - MD_NTSTATUS_WIN_STATUS_UNEXPECTED_IO_ERROR = 0xC00000E9, - MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_CREATE_ERR = 0xC00000EA, - MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_MAP_ERROR = 0xC00000EB, - MD_NTSTATUS_WIN_STATUS_UNEXPECTED_MM_EXTEND_ERR = 0xC00000EC, - MD_NTSTATUS_WIN_STATUS_NOT_LOGON_PROCESS = 0xC00000ED, - MD_NTSTATUS_WIN_STATUS_LOGON_SESSION_EXISTS = 0xC00000EE, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_1 = 0xC00000EF, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_2 = 0xC00000F0, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_3 = 0xC00000F1, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_4 = 0xC00000F2, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_5 = 0xC00000F3, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_6 = 0xC00000F4, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_7 = 0xC00000F5, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_8 = 0xC00000F6, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_9 = 0xC00000F7, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_10 = 0xC00000F8, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_11 = 0xC00000F9, - MD_NTSTATUS_WIN_STATUS_INVALID_PARAMETER_12 = 0xC00000FA, - MD_NTSTATUS_WIN_STATUS_REDIRECTOR_NOT_STARTED = 0xC00000FB, - MD_NTSTATUS_WIN_STATUS_REDIRECTOR_STARTED = 0xC00000FC, - MD_NTSTATUS_WIN_STATUS_STACK_OVERFLOW = 0xC00000FD, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_PACKAGE = 0xC00000FE, - MD_NTSTATUS_WIN_STATUS_BAD_FUNCTION_TABLE = 0xC00000FF, - MD_NTSTATUS_WIN_STATUS_VARIABLE_NOT_FOUND = 0xC0000100, - MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_EMPTY = 0xC0000101, - MD_NTSTATUS_WIN_STATUS_FILE_CORRUPT_ERROR = 0xC0000102, - MD_NTSTATUS_WIN_STATUS_NOT_A_DIRECTORY = 0xC0000103, - MD_NTSTATUS_WIN_STATUS_BAD_LOGON_SESSION_STATE = 0xC0000104, - MD_NTSTATUS_WIN_STATUS_LOGON_SESSION_COLLISION = 0xC0000105, - MD_NTSTATUS_WIN_STATUS_NAME_TOO_LONG = 0xC0000106, - MD_NTSTATUS_WIN_STATUS_FILES_OPEN = 0xC0000107, - MD_NTSTATUS_WIN_STATUS_CONNECTION_IN_USE = 0xC0000108, - MD_NTSTATUS_WIN_STATUS_MESSAGE_NOT_FOUND = 0xC0000109, - MD_NTSTATUS_WIN_STATUS_PROCESS_IS_TERMINATING = 0xC000010A, - MD_NTSTATUS_WIN_STATUS_INVALID_LOGON_TYPE = 0xC000010B, - MD_NTSTATUS_WIN_STATUS_NO_GUID_TRANSLATION = 0xC000010C, - MD_NTSTATUS_WIN_STATUS_CANNOT_IMPERSONATE = 0xC000010D, - MD_NTSTATUS_WIN_STATUS_IMAGE_ALREADY_LOADED = 0xC000010E, - MD_NTSTATUS_WIN_STATUS_ABIOS_NOT_PRESENT = 0xC000010F, - MD_NTSTATUS_WIN_STATUS_ABIOS_LID_NOT_EXIST = 0xC0000110, - MD_NTSTATUS_WIN_STATUS_ABIOS_LID_ALREADY_OWNED = 0xC0000111, - MD_NTSTATUS_WIN_STATUS_ABIOS_NOT_LID_OWNER = 0xC0000112, - MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_COMMAND = 0xC0000113, - MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_LID = 0xC0000114, - MD_NTSTATUS_WIN_STATUS_ABIOS_SELECTOR_NOT_AVAILABLE = 0xC0000115, - MD_NTSTATUS_WIN_STATUS_ABIOS_INVALID_SELECTOR = 0xC0000116, - MD_NTSTATUS_WIN_STATUS_NO_LDT = 0xC0000117, - MD_NTSTATUS_WIN_STATUS_INVALID_LDT_SIZE = 0xC0000118, - MD_NTSTATUS_WIN_STATUS_INVALID_LDT_OFFSET = 0xC0000119, - MD_NTSTATUS_WIN_STATUS_INVALID_LDT_DESCRIPTOR = 0xC000011A, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_NE_FORMAT = 0xC000011B, - MD_NTSTATUS_WIN_STATUS_RXACT_INVALID_STATE = 0xC000011C, - MD_NTSTATUS_WIN_STATUS_RXACT_COMMIT_FAILURE = 0xC000011D, - MD_NTSTATUS_WIN_STATUS_MAPPED_FILE_SIZE_ZERO = 0xC000011E, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_OPENED_FILES = 0xC000011F, - MD_NTSTATUS_WIN_STATUS_CANCELLED = 0xC0000120, - MD_NTSTATUS_WIN_STATUS_CANNOT_DELETE = 0xC0000121, - MD_NTSTATUS_WIN_STATUS_INVALID_COMPUTER_NAME = 0xC0000122, - MD_NTSTATUS_WIN_STATUS_FILE_DELETED = 0xC0000123, - MD_NTSTATUS_WIN_STATUS_SPECIAL_ACCOUNT = 0xC0000124, - MD_NTSTATUS_WIN_STATUS_SPECIAL_GROUP = 0xC0000125, - MD_NTSTATUS_WIN_STATUS_SPECIAL_USER = 0xC0000126, - MD_NTSTATUS_WIN_STATUS_MEMBERS_PRIMARY_GROUP = 0xC0000127, - MD_NTSTATUS_WIN_STATUS_FILE_CLOSED = 0xC0000128, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_THREADS = 0xC0000129, - MD_NTSTATUS_WIN_STATUS_THREAD_NOT_IN_PROCESS = 0xC000012A, - MD_NTSTATUS_WIN_STATUS_TOKEN_ALREADY_IN_USE = 0xC000012B, - MD_NTSTATUS_WIN_STATUS_PAGEFILE_QUOTA_EXCEEDED = 0xC000012C, - MD_NTSTATUS_WIN_STATUS_COMMITMENT_LIMIT = 0xC000012D, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_LE_FORMAT = 0xC000012E, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_NOT_MZ = 0xC000012F, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_PROTECT = 0xC0000130, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_16 = 0xC0000131, - MD_NTSTATUS_WIN_STATUS_LOGON_SERVER_CONFLICT = 0xC0000132, - MD_NTSTATUS_WIN_STATUS_TIME_DIFFERENCE_AT_DC = 0xC0000133, - MD_NTSTATUS_WIN_STATUS_SYNCHRONIZATION_REQUIRED = 0xC0000134, - MD_NTSTATUS_WIN_STATUS_DLL_NOT_FOUND = 0xC0000135, - MD_NTSTATUS_WIN_STATUS_OPEN_FAILED = 0xC0000136, - MD_NTSTATUS_WIN_STATUS_IO_PRIVILEGE_FAILED = 0xC0000137, - MD_NTSTATUS_WIN_STATUS_ORDINAL_NOT_FOUND = 0xC0000138, - MD_NTSTATUS_WIN_STATUS_ENTRYPOINT_NOT_FOUND = 0xC0000139, - MD_NTSTATUS_WIN_STATUS_CONTROL_C_EXIT = 0xC000013A, - MD_NTSTATUS_WIN_STATUS_LOCAL_DISCONNECT = 0xC000013B, - MD_NTSTATUS_WIN_STATUS_REMOTE_DISCONNECT = 0xC000013C, - MD_NTSTATUS_WIN_STATUS_REMOTE_RESOURCES = 0xC000013D, - MD_NTSTATUS_WIN_STATUS_LINK_FAILED = 0xC000013E, - MD_NTSTATUS_WIN_STATUS_LINK_TIMEOUT = 0xC000013F, - MD_NTSTATUS_WIN_STATUS_INVALID_CONNECTION = 0xC0000140, - MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS = 0xC0000141, - MD_NTSTATUS_WIN_STATUS_DLL_INIT_FAILED = 0xC0000142, - MD_NTSTATUS_WIN_STATUS_MISSING_SYSTEMFILE = 0xC0000143, - MD_NTSTATUS_WIN_STATUS_UNHANDLED_EXCEPTION = 0xC0000144, - MD_NTSTATUS_WIN_STATUS_APP_INIT_FAILURE = 0xC0000145, - MD_NTSTATUS_WIN_STATUS_PAGEFILE_CREATE_FAILED = 0xC0000146, - MD_NTSTATUS_WIN_STATUS_NO_PAGEFILE = 0xC0000147, - MD_NTSTATUS_WIN_STATUS_INVALID_LEVEL = 0xC0000148, - MD_NTSTATUS_WIN_STATUS_WRONG_PASSWORD_CORE = 0xC0000149, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_FLOAT_CONTEXT = 0xC000014A, - MD_NTSTATUS_WIN_STATUS_PIPE_BROKEN = 0xC000014B, - MD_NTSTATUS_WIN_STATUS_REGISTRY_CORRUPT = 0xC000014C, - MD_NTSTATUS_WIN_STATUS_REGISTRY_IO_FAILED = 0xC000014D, - MD_NTSTATUS_WIN_STATUS_NO_EVENT_PAIR = 0xC000014E, - MD_NTSTATUS_WIN_STATUS_UNRECOGNIZED_VOLUME = 0xC000014F, - MD_NTSTATUS_WIN_STATUS_SERIAL_NO_DEVICE_INITED = 0xC0000150, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_ALIAS = 0xC0000151, - MD_NTSTATUS_WIN_STATUS_MEMBER_NOT_IN_ALIAS = 0xC0000152, - MD_NTSTATUS_WIN_STATUS_MEMBER_IN_ALIAS = 0xC0000153, - MD_NTSTATUS_WIN_STATUS_ALIAS_EXISTS = 0xC0000154, - MD_NTSTATUS_WIN_STATUS_LOGON_NOT_GRANTED = 0xC0000155, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_SECRETS = 0xC0000156, - MD_NTSTATUS_WIN_STATUS_SECRET_TOO_LONG = 0xC0000157, - MD_NTSTATUS_WIN_STATUS_INTERNAL_DB_ERROR = 0xC0000158, - MD_NTSTATUS_WIN_STATUS_FULLSCREEN_MODE = 0xC0000159, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_CONTEXT_IDS = 0xC000015A, - MD_NTSTATUS_WIN_STATUS_LOGON_TYPE_NOT_GRANTED = 0xC000015B, - MD_NTSTATUS_WIN_STATUS_NOT_REGISTRY_FILE = 0xC000015C, - MD_NTSTATUS_WIN_STATUS_NT_CROSS_ENCRYPTION_REQUIRED = 0xC000015D, - MD_NTSTATUS_WIN_STATUS_DOMAIN_CTRLR_CONFIG_ERROR = 0xC000015E, - MD_NTSTATUS_WIN_STATUS_FT_MISSING_MEMBER = 0xC000015F, - MD_NTSTATUS_WIN_STATUS_ILL_FORMED_SERVICE_ENTRY = 0xC0000160, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_CHARACTER = 0xC0000161, - MD_NTSTATUS_WIN_STATUS_UNMAPPABLE_CHARACTER = 0xC0000162, - MD_NTSTATUS_WIN_STATUS_UNDEFINED_CHARACTER = 0xC0000163, - MD_NTSTATUS_WIN_STATUS_FLOPPY_VOLUME = 0xC0000164, - MD_NTSTATUS_WIN_STATUS_FLOPPY_ID_MARK_NOT_FOUND = 0xC0000165, - MD_NTSTATUS_WIN_STATUS_FLOPPY_WRONG_CYLINDER = 0xC0000166, - MD_NTSTATUS_WIN_STATUS_FLOPPY_UNKNOWN_ERROR = 0xC0000167, - MD_NTSTATUS_WIN_STATUS_FLOPPY_BAD_REGISTERS = 0xC0000168, - MD_NTSTATUS_WIN_STATUS_DISK_RECALIBRATE_FAILED = 0xC0000169, - MD_NTSTATUS_WIN_STATUS_DISK_OPERATION_FAILED = 0xC000016A, - MD_NTSTATUS_WIN_STATUS_DISK_RESET_FAILED = 0xC000016B, - MD_NTSTATUS_WIN_STATUS_SHARED_IRQ_BUSY = 0xC000016C, - MD_NTSTATUS_WIN_STATUS_FT_ORPHANING = 0xC000016D, - MD_NTSTATUS_WIN_STATUS_BIOS_FAILED_TO_CONNECT_INTERRUPT = 0xC000016E, - MD_NTSTATUS_WIN_STATUS_PARTITION_FAILURE = 0xC0000172, - MD_NTSTATUS_WIN_STATUS_INVALID_BLOCK_LENGTH = 0xC0000173, - MD_NTSTATUS_WIN_STATUS_DEVICE_NOT_PARTITIONED = 0xC0000174, - MD_NTSTATUS_WIN_STATUS_UNABLE_TO_LOCK_MEDIA = 0xC0000175, - MD_NTSTATUS_WIN_STATUS_UNABLE_TO_UNLOAD_MEDIA = 0xC0000176, - MD_NTSTATUS_WIN_STATUS_EOM_OVERFLOW = 0xC0000177, - MD_NTSTATUS_WIN_STATUS_NO_MEDIA = 0xC0000178, - MD_NTSTATUS_WIN_STATUS_NO_SUCH_MEMBER = 0xC000017A, - MD_NTSTATUS_WIN_STATUS_INVALID_MEMBER = 0xC000017B, - MD_NTSTATUS_WIN_STATUS_KEY_DELETED = 0xC000017C, - MD_NTSTATUS_WIN_STATUS_NO_LOG_SPACE = 0xC000017D, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_SIDS = 0xC000017E, - MD_NTSTATUS_WIN_STATUS_LM_CROSS_ENCRYPTION_REQUIRED = 0xC000017F, - MD_NTSTATUS_WIN_STATUS_KEY_HAS_CHILDREN = 0xC0000180, - MD_NTSTATUS_WIN_STATUS_CHILD_MUST_BE_VOLATILE = 0xC0000181, - MD_NTSTATUS_WIN_STATUS_DEVICE_CONFIGURATION_ERROR = 0xC0000182, - MD_NTSTATUS_WIN_STATUS_DRIVER_INTERNAL_ERROR = 0xC0000183, - MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_STATE = 0xC0000184, - MD_NTSTATUS_WIN_STATUS_IO_DEVICE_ERROR = 0xC0000185, - MD_NTSTATUS_WIN_STATUS_DEVICE_PROTOCOL_ERROR = 0xC0000186, - MD_NTSTATUS_WIN_STATUS_BACKUP_CONTROLLER = 0xC0000187, - MD_NTSTATUS_WIN_STATUS_LOG_FILE_FULL = 0xC0000188, - MD_NTSTATUS_WIN_STATUS_TOO_LATE = 0xC0000189, - MD_NTSTATUS_WIN_STATUS_NO_TRUST_LSA_SECRET = 0xC000018A, - MD_NTSTATUS_WIN_STATUS_NO_TRUST_SAM_ACCOUNT = 0xC000018B, - MD_NTSTATUS_WIN_STATUS_TRUSTED_DOMAIN_FAILURE = 0xC000018C, - MD_NTSTATUS_WIN_STATUS_TRUSTED_RELATIONSHIP_FAILURE = 0xC000018D, - MD_NTSTATUS_WIN_STATUS_EVENTLOG_FILE_CORRUPT = 0xC000018E, - MD_NTSTATUS_WIN_STATUS_EVENTLOG_CANT_START = 0xC000018F, - MD_NTSTATUS_WIN_STATUS_TRUST_FAILURE = 0xC0000190, - MD_NTSTATUS_WIN_STATUS_MUTANT_LIMIT_EXCEEDED = 0xC0000191, - MD_NTSTATUS_WIN_STATUS_NETLOGON_NOT_STARTED = 0xC0000192, - MD_NTSTATUS_WIN_STATUS_ACCOUNT_EXPIRED = 0xC0000193, - MD_NTSTATUS_WIN_STATUS_POSSIBLE_DEADLOCK = 0xC0000194, - MD_NTSTATUS_WIN_STATUS_NETWORK_CREDENTIAL_CONFLICT = 0xC0000195, - MD_NTSTATUS_WIN_STATUS_REMOTE_SESSION_LIMIT = 0xC0000196, - MD_NTSTATUS_WIN_STATUS_EVENTLOG_FILE_CHANGED = 0xC0000197, - MD_NTSTATUS_WIN_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT = 0xC0000198, - MD_NTSTATUS_WIN_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT = 0xC0000199, - MD_NTSTATUS_WIN_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT = 0xC000019A, - MD_NTSTATUS_WIN_STATUS_DOMAIN_TRUST_INCONSISTENT = 0xC000019B, - MD_NTSTATUS_WIN_STATUS_FS_DRIVER_REQUIRED = 0xC000019C, - MD_NTSTATUS_WIN_STATUS_IMAGE_ALREADY_LOADED_AS_DLL = 0xC000019D, - MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_WITH_GLOBAL_SHORT_NAME_REGISTRY_SETTING = 0xC000019E, - MD_NTSTATUS_WIN_STATUS_SHORT_NAMES_NOT_ENABLED_ON_VOLUME = 0xC000019F, - MD_NTSTATUS_WIN_STATUS_SECURITY_STREAM_IS_INCONSISTENT = 0xC00001A0, - MD_NTSTATUS_WIN_STATUS_INVALID_LOCK_RANGE = 0xC00001A1, - MD_NTSTATUS_WIN_STATUS_INVALID_ACE_CONDITION = 0xC00001A2, - MD_NTSTATUS_WIN_STATUS_IMAGE_SUBSYSTEM_NOT_PRESENT = 0xC00001A3, - MD_NTSTATUS_WIN_STATUS_NOTIFICATION_GUID_ALREADY_DEFINED = 0xC00001A4, - MD_NTSTATUS_WIN_STATUS_INVALID_EXCEPTION_HANDLER = 0xC00001A5, - MD_NTSTATUS_WIN_STATUS_DUPLICATE_PRIVILEGES = 0xC00001A6, - MD_NTSTATUS_WIN_STATUS_NOT_ALLOWED_ON_SYSTEM_FILE = 0xC00001A7, - MD_NTSTATUS_WIN_STATUS_REPAIR_NEEDED = 0xC00001A8, - MD_NTSTATUS_WIN_STATUS_QUOTA_NOT_ENABLED = 0xC00001A9, - MD_NTSTATUS_WIN_STATUS_NO_APPLICATION_PACKAGE = 0xC00001AA, - MD_NTSTATUS_WIN_STATUS_NETWORK_OPEN_RESTRICTION = 0xC0000201, - MD_NTSTATUS_WIN_STATUS_NO_USER_SESSION_KEY = 0xC0000202, - MD_NTSTATUS_WIN_STATUS_USER_SESSION_DELETED = 0xC0000203, - MD_NTSTATUS_WIN_STATUS_RESOURCE_LANG_NOT_FOUND = 0xC0000204, - MD_NTSTATUS_WIN_STATUS_INSUFF_SERVER_RESOURCES = 0xC0000205, - MD_NTSTATUS_WIN_STATUS_INVALID_BUFFER_SIZE = 0xC0000206, - MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS_COMPONENT = 0xC0000207, - MD_NTSTATUS_WIN_STATUS_INVALID_ADDRESS_WILDCARD = 0xC0000208, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_ADDRESSES = 0xC0000209, - MD_NTSTATUS_WIN_STATUS_ADDRESS_ALREADY_EXISTS = 0xC000020A, - MD_NTSTATUS_WIN_STATUS_ADDRESS_CLOSED = 0xC000020B, - MD_NTSTATUS_WIN_STATUS_CONNECTION_DISCONNECTED = 0xC000020C, - MD_NTSTATUS_WIN_STATUS_CONNECTION_RESET = 0xC000020D, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_NODES = 0xC000020E, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_ABORTED = 0xC000020F, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_TIMED_OUT = 0xC0000210, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_RELEASE = 0xC0000211, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_MATCH = 0xC0000212, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_RESPONDED = 0xC0000213, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_ID = 0xC0000214, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_TYPE = 0xC0000215, - MD_NTSTATUS_WIN_STATUS_NOT_SERVER_SESSION = 0xC0000216, - MD_NTSTATUS_WIN_STATUS_NOT_CLIENT_SESSION = 0xC0000217, - MD_NTSTATUS_WIN_STATUS_CANNOT_LOAD_REGISTRY_FILE = 0xC0000218, - MD_NTSTATUS_WIN_STATUS_DEBUG_ATTACH_FAILED = 0xC0000219, - MD_NTSTATUS_WIN_STATUS_SYSTEM_PROCESS_TERMINATED = 0xC000021A, - MD_NTSTATUS_WIN_STATUS_DATA_NOT_ACCEPTED = 0xC000021B, - MD_NTSTATUS_WIN_STATUS_NO_BROWSER_SERVERS_FOUND = 0xC000021C, - MD_NTSTATUS_WIN_STATUS_VDM_HARD_ERROR = 0xC000021D, - MD_NTSTATUS_WIN_STATUS_DRIVER_CANCEL_TIMEOUT = 0xC000021E, - MD_NTSTATUS_WIN_STATUS_REPLY_MESSAGE_MISMATCH = 0xC000021F, - MD_NTSTATUS_WIN_STATUS_MAPPED_ALIGNMENT = 0xC0000220, - MD_NTSTATUS_WIN_STATUS_IMAGE_CHECKSUM_MISMATCH = 0xC0000221, - MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA = 0xC0000222, - MD_NTSTATUS_WIN_STATUS_CLIENT_SERVER_PARAMETERS_INVALID = 0xC0000223, - MD_NTSTATUS_WIN_STATUS_PASSWORD_MUST_CHANGE = 0xC0000224, - MD_NTSTATUS_WIN_STATUS_NOT_FOUND = 0xC0000225, - MD_NTSTATUS_WIN_STATUS_NOT_TINY_STREAM = 0xC0000226, - MD_NTSTATUS_WIN_STATUS_RECOVERY_FAILURE = 0xC0000227, - MD_NTSTATUS_WIN_STATUS_STACK_OVERFLOW_READ = 0xC0000228, - MD_NTSTATUS_WIN_STATUS_FAIL_CHECK = 0xC0000229, - MD_NTSTATUS_WIN_STATUS_DUPLICATE_OBJECTID = 0xC000022A, - MD_NTSTATUS_WIN_STATUS_OBJECTID_EXISTS = 0xC000022B, - MD_NTSTATUS_WIN_STATUS_CONVERT_TO_LARGE = 0xC000022C, - MD_NTSTATUS_WIN_STATUS_RETRY = 0xC000022D, - MD_NTSTATUS_WIN_STATUS_FOUND_OUT_OF_SCOPE = 0xC000022E, - MD_NTSTATUS_WIN_STATUS_ALLOCATE_BUCKET = 0xC000022F, - MD_NTSTATUS_WIN_STATUS_PROPSET_NOT_FOUND = 0xC0000230, - MD_NTSTATUS_WIN_STATUS_MARSHALL_OVERFLOW = 0xC0000231, - MD_NTSTATUS_WIN_STATUS_INVALID_VARIANT = 0xC0000232, - MD_NTSTATUS_WIN_STATUS_DOMAIN_CONTROLLER_NOT_FOUND = 0xC0000233, - MD_NTSTATUS_WIN_STATUS_ACCOUNT_LOCKED_OUT = 0xC0000234, - MD_NTSTATUS_WIN_STATUS_HANDLE_NOT_CLOSABLE = 0xC0000235, - MD_NTSTATUS_WIN_STATUS_CONNECTION_REFUSED = 0xC0000236, - MD_NTSTATUS_WIN_STATUS_GRACEFUL_DISCONNECT = 0xC0000237, - MD_NTSTATUS_WIN_STATUS_ADDRESS_ALREADY_ASSOCIATED = 0xC0000238, - MD_NTSTATUS_WIN_STATUS_ADDRESS_NOT_ASSOCIATED = 0xC0000239, - MD_NTSTATUS_WIN_STATUS_CONNECTION_INVALID = 0xC000023A, - MD_NTSTATUS_WIN_STATUS_CONNECTION_ACTIVE = 0xC000023B, - MD_NTSTATUS_WIN_STATUS_NETWORK_UNREACHABLE = 0xC000023C, - MD_NTSTATUS_WIN_STATUS_HOST_UNREACHABLE = 0xC000023D, - MD_NTSTATUS_WIN_STATUS_PROTOCOL_UNREACHABLE = 0xC000023E, - MD_NTSTATUS_WIN_STATUS_PORT_UNREACHABLE = 0xC000023F, - MD_NTSTATUS_WIN_STATUS_REQUEST_ABORTED = 0xC0000240, - MD_NTSTATUS_WIN_STATUS_CONNECTION_ABORTED = 0xC0000241, - MD_NTSTATUS_WIN_STATUS_BAD_COMPRESSION_BUFFER = 0xC0000242, - MD_NTSTATUS_WIN_STATUS_USER_MAPPED_FILE = 0xC0000243, - MD_NTSTATUS_WIN_STATUS_AUDIT_FAILED = 0xC0000244, - MD_NTSTATUS_WIN_STATUS_TIMER_RESOLUTION_NOT_SET = 0xC0000245, - MD_NTSTATUS_WIN_STATUS_CONNECTION_COUNT_LIMIT = 0xC0000246, - MD_NTSTATUS_WIN_STATUS_LOGIN_TIME_RESTRICTION = 0xC0000247, - MD_NTSTATUS_WIN_STATUS_LOGIN_WKSTA_RESTRICTION = 0xC0000248, - MD_NTSTATUS_WIN_STATUS_IMAGE_MP_UP_MISMATCH = 0xC0000249, - MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_LOGON_INFO = 0xC0000250, - MD_NTSTATUS_WIN_STATUS_BAD_DLL_ENTRYPOINT = 0xC0000251, - MD_NTSTATUS_WIN_STATUS_BAD_SERVICE_ENTRYPOINT = 0xC0000252, - MD_NTSTATUS_WIN_STATUS_LPC_REPLY_LOST = 0xC0000253, - MD_NTSTATUS_WIN_STATUS_IP_ADDRESS_CONFLICT1 = 0xC0000254, - MD_NTSTATUS_WIN_STATUS_IP_ADDRESS_CONFLICT2 = 0xC0000255, - MD_NTSTATUS_WIN_STATUS_REGISTRY_QUOTA_LIMIT = 0xC0000256, - MD_NTSTATUS_WIN_STATUS_PATH_NOT_COVERED = 0xC0000257, - MD_NTSTATUS_WIN_STATUS_NO_CALLBACK_ACTIVE = 0xC0000258, - MD_NTSTATUS_WIN_STATUS_LICENSE_QUOTA_EXCEEDED = 0xC0000259, - MD_NTSTATUS_WIN_STATUS_PWD_TOO_SHORT = 0xC000025A, - MD_NTSTATUS_WIN_STATUS_PWD_TOO_RECENT = 0xC000025B, - MD_NTSTATUS_WIN_STATUS_PWD_HISTORY_CONFLICT = 0xC000025C, - MD_NTSTATUS_WIN_STATUS_PLUGPLAY_NO_DEVICE = 0xC000025E, - MD_NTSTATUS_WIN_STATUS_UNSUPPORTED_COMPRESSION = 0xC000025F, - MD_NTSTATUS_WIN_STATUS_INVALID_HW_PROFILE = 0xC0000260, - MD_NTSTATUS_WIN_STATUS_INVALID_PLUGPLAY_DEVICE_PATH = 0xC0000261, - MD_NTSTATUS_WIN_STATUS_DRIVER_ORDINAL_NOT_FOUND = 0xC0000262, - MD_NTSTATUS_WIN_STATUS_DRIVER_ENTRYPOINT_NOT_FOUND = 0xC0000263, - MD_NTSTATUS_WIN_STATUS_RESOURCE_NOT_OWNED = 0xC0000264, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_LINKS = 0xC0000265, - MD_NTSTATUS_WIN_STATUS_QUOTA_LIST_INCONSISTENT = 0xC0000266, - MD_NTSTATUS_WIN_STATUS_FILE_IS_OFFLINE = 0xC0000267, - MD_NTSTATUS_WIN_STATUS_EVALUATION_EXPIRATION = 0xC0000268, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_DLL_RELOCATION = 0xC0000269, - MD_NTSTATUS_WIN_STATUS_LICENSE_VIOLATION = 0xC000026A, - MD_NTSTATUS_WIN_STATUS_DLL_INIT_FAILED_LOGOFF = 0xC000026B, - MD_NTSTATUS_WIN_STATUS_DRIVER_UNABLE_TO_LOAD = 0xC000026C, - MD_NTSTATUS_WIN_STATUS_DFS_UNAVAILABLE = 0xC000026D, - MD_NTSTATUS_WIN_STATUS_VOLUME_DISMOUNTED = 0xC000026E, - MD_NTSTATUS_WIN_STATUS_WX86_INTERNAL_ERROR = 0xC000026F, - MD_NTSTATUS_WIN_STATUS_WX86_FLOAT_STACK_CHECK = 0xC0000270, - MD_NTSTATUS_WIN_STATUS_VALIDATE_CONTINUE = 0xC0000271, - MD_NTSTATUS_WIN_STATUS_NO_MATCH = 0xC0000272, - MD_NTSTATUS_WIN_STATUS_NO_MORE_MATCHES = 0xC0000273, - MD_NTSTATUS_WIN_STATUS_NOT_A_REPARSE_POINT = 0xC0000275, - MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_INVALID = 0xC0000276, - MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_MISMATCH = 0xC0000277, - MD_NTSTATUS_WIN_STATUS_IO_REPARSE_DATA_INVALID = 0xC0000278, - MD_NTSTATUS_WIN_STATUS_IO_REPARSE_TAG_NOT_HANDLED = 0xC0000279, - MD_NTSTATUS_WIN_STATUS_PWD_TOO_LONG = 0xC000027A, - MD_NTSTATUS_WIN_STATUS_STOWED_EXCEPTION = 0xC000027B, - MD_NTSTATUS_WIN_STATUS_REPARSE_POINT_NOT_RESOLVED = 0xC0000280, - MD_NTSTATUS_WIN_STATUS_DIRECTORY_IS_A_REPARSE_POINT = 0xC0000281, - MD_NTSTATUS_WIN_STATUS_RANGE_LIST_CONFLICT = 0xC0000282, - MD_NTSTATUS_WIN_STATUS_SOURCE_ELEMENT_EMPTY = 0xC0000283, - MD_NTSTATUS_WIN_STATUS_DESTINATION_ELEMENT_FULL = 0xC0000284, - MD_NTSTATUS_WIN_STATUS_ILLEGAL_ELEMENT_ADDRESS = 0xC0000285, - MD_NTSTATUS_WIN_STATUS_MAGAZINE_NOT_PRESENT = 0xC0000286, - MD_NTSTATUS_WIN_STATUS_REINITIALIZATION_NEEDED = 0xC0000287, - MD_NTSTATUS_WIN_STATUS_ENCRYPTION_FAILED = 0xC000028A, - MD_NTSTATUS_WIN_STATUS_DECRYPTION_FAILED = 0xC000028B, - MD_NTSTATUS_WIN_STATUS_RANGE_NOT_FOUND = 0xC000028C, - MD_NTSTATUS_WIN_STATUS_NO_RECOVERY_POLICY = 0xC000028D, - MD_NTSTATUS_WIN_STATUS_NO_EFS = 0xC000028E, - MD_NTSTATUS_WIN_STATUS_WRONG_EFS = 0xC000028F, - MD_NTSTATUS_WIN_STATUS_NO_USER_KEYS = 0xC0000290, - MD_NTSTATUS_WIN_STATUS_FILE_NOT_ENCRYPTED = 0xC0000291, - MD_NTSTATUS_WIN_STATUS_NOT_EXPORT_FORMAT = 0xC0000292, - MD_NTSTATUS_WIN_STATUS_FILE_ENCRYPTED = 0xC0000293, - MD_NTSTATUS_WIN_STATUS_WMI_GUID_NOT_FOUND = 0xC0000295, - MD_NTSTATUS_WIN_STATUS_WMI_INSTANCE_NOT_FOUND = 0xC0000296, - MD_NTSTATUS_WIN_STATUS_WMI_ITEMID_NOT_FOUND = 0xC0000297, - MD_NTSTATUS_WIN_STATUS_WMI_TRY_AGAIN = 0xC0000298, - MD_NTSTATUS_WIN_STATUS_SHARED_POLICY = 0xC0000299, - MD_NTSTATUS_WIN_STATUS_POLICY_OBJECT_NOT_FOUND = 0xC000029A, - MD_NTSTATUS_WIN_STATUS_POLICY_ONLY_IN_DS = 0xC000029B, - MD_NTSTATUS_WIN_STATUS_VOLUME_NOT_UPGRADED = 0xC000029C, - MD_NTSTATUS_WIN_STATUS_REMOTE_STORAGE_NOT_ACTIVE = 0xC000029D, - MD_NTSTATUS_WIN_STATUS_REMOTE_STORAGE_MEDIA_ERROR = 0xC000029E, - MD_NTSTATUS_WIN_STATUS_NO_TRACKING_SERVICE = 0xC000029F, - MD_NTSTATUS_WIN_STATUS_SERVER_SID_MISMATCH = 0xC00002A0, - MD_NTSTATUS_WIN_STATUS_DS_NO_ATTRIBUTE_OR_VALUE = 0xC00002A1, - MD_NTSTATUS_WIN_STATUS_DS_INVALID_ATTRIBUTE_SYNTAX = 0xC00002A2, - MD_NTSTATUS_WIN_STATUS_DS_ATTRIBUTE_TYPE_UNDEFINED = 0xC00002A3, - MD_NTSTATUS_WIN_STATUS_DS_ATTRIBUTE_OR_VALUE_EXISTS = 0xC00002A4, - MD_NTSTATUS_WIN_STATUS_DS_BUSY = 0xC00002A5, - MD_NTSTATUS_WIN_STATUS_DS_UNAVAILABLE = 0xC00002A6, - MD_NTSTATUS_WIN_STATUS_DS_NO_RIDS_ALLOCATED = 0xC00002A7, - MD_NTSTATUS_WIN_STATUS_DS_NO_MORE_RIDS = 0xC00002A8, - MD_NTSTATUS_WIN_STATUS_DS_INCORRECT_ROLE_OWNER = 0xC00002A9, - MD_NTSTATUS_WIN_STATUS_DS_RIDMGR_INIT_ERROR = 0xC00002AA, - MD_NTSTATUS_WIN_STATUS_DS_OBJ_CLASS_VIOLATION = 0xC00002AB, - MD_NTSTATUS_WIN_STATUS_DS_CANT_ON_NON_LEAF = 0xC00002AC, - MD_NTSTATUS_WIN_STATUS_DS_CANT_ON_RDN = 0xC00002AD, - MD_NTSTATUS_WIN_STATUS_DS_CANT_MOD_OBJ_CLASS = 0xC00002AE, - MD_NTSTATUS_WIN_STATUS_DS_CROSS_DOM_MOVE_FAILED = 0xC00002AF, - MD_NTSTATUS_WIN_STATUS_DS_GC_NOT_AVAILABLE = 0xC00002B0, - MD_NTSTATUS_WIN_STATUS_DIRECTORY_SERVICE_REQUIRED = 0xC00002B1, - MD_NTSTATUS_WIN_STATUS_REPARSE_ATTRIBUTE_CONFLICT = 0xC00002B2, - MD_NTSTATUS_WIN_STATUS_CANT_ENABLE_DENY_ONLY = 0xC00002B3, - MD_NTSTATUS_WIN_STATUS_FLOAT_MULTIPLE_FAULTS = 0xC00002B4, - MD_NTSTATUS_WIN_STATUS_FLOAT_MULTIPLE_TRAPS = 0xC00002B5, - MD_NTSTATUS_WIN_STATUS_DEVICE_REMOVED = 0xC00002B6, - MD_NTSTATUS_WIN_STATUS_JOURNAL_DELETE_IN_PROGRESS = 0xC00002B7, - MD_NTSTATUS_WIN_STATUS_JOURNAL_NOT_ACTIVE = 0xC00002B8, - MD_NTSTATUS_WIN_STATUS_NOINTERFACE = 0xC00002B9, - MD_NTSTATUS_WIN_STATUS_DS_RIDMGR_DISABLED = 0xC00002BA, - MD_NTSTATUS_WIN_STATUS_DS_ADMIN_LIMIT_EXCEEDED = 0xC00002C1, - MD_NTSTATUS_WIN_STATUS_DRIVER_FAILED_SLEEP = 0xC00002C2, - MD_NTSTATUS_WIN_STATUS_MUTUAL_AUTHENTICATION_FAILED = 0xC00002C3, - MD_NTSTATUS_WIN_STATUS_CORRUPT_SYSTEM_FILE = 0xC00002C4, - MD_NTSTATUS_WIN_STATUS_DATATYPE_MISALIGNMENT_ERROR = 0xC00002C5, - MD_NTSTATUS_WIN_STATUS_WMI_READ_ONLY = 0xC00002C6, - MD_NTSTATUS_WIN_STATUS_WMI_SET_FAILURE = 0xC00002C7, - MD_NTSTATUS_WIN_STATUS_COMMITMENT_MINIMUM = 0xC00002C8, - MD_NTSTATUS_WIN_STATUS_REG_NAT_CONSUMPTION = 0xC00002C9, - MD_NTSTATUS_WIN_STATUS_TRANSPORT_FULL = 0xC00002CA, - MD_NTSTATUS_WIN_STATUS_DS_SAM_INIT_FAILURE = 0xC00002CB, - MD_NTSTATUS_WIN_STATUS_ONLY_IF_CONNECTED = 0xC00002CC, - MD_NTSTATUS_WIN_STATUS_DS_SENSITIVE_GROUP_VIOLATION = 0xC00002CD, - MD_NTSTATUS_WIN_STATUS_PNP_RESTART_ENUMERATION = 0xC00002CE, - MD_NTSTATUS_WIN_STATUS_JOURNAL_ENTRY_DELETED = 0xC00002CF, - MD_NTSTATUS_WIN_STATUS_DS_CANT_MOD_PRIMARYGROUPID = 0xC00002D0, - MD_NTSTATUS_WIN_STATUS_SYSTEM_IMAGE_BAD_SIGNATURE = 0xC00002D1, - MD_NTSTATUS_WIN_STATUS_PNP_REBOOT_REQUIRED = 0xC00002D2, - MD_NTSTATUS_WIN_STATUS_POWER_STATE_INVALID = 0xC00002D3, - MD_NTSTATUS_WIN_STATUS_DS_INVALID_GROUP_TYPE = 0xC00002D4, - MD_NTSTATUS_WIN_STATUS_DS_NO_NEST_GLOBALGROUP_IN_MIXEDDOMAIN = 0xC00002D5, - MD_NTSTATUS_WIN_STATUS_DS_NO_NEST_LOCALGROUP_IN_MIXEDDOMAIN = 0xC00002D6, - MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D7, - MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_UNIVERSAL_MEMBER = 0xC00002D8, - MD_NTSTATUS_WIN_STATUS_DS_UNIVERSAL_CANT_HAVE_LOCAL_MEMBER = 0xC00002D9, - MD_NTSTATUS_WIN_STATUS_DS_GLOBAL_CANT_HAVE_CROSSDOMAIN_MEMBER = 0xC00002DA, - MD_NTSTATUS_WIN_STATUS_DS_LOCAL_CANT_HAVE_CROSSDOMAIN_LOCAL_MEMBER = 0xC00002DB, - MD_NTSTATUS_WIN_STATUS_DS_HAVE_PRIMARY_MEMBERS = 0xC00002DC, - MD_NTSTATUS_WIN_STATUS_WMI_NOT_SUPPORTED = 0xC00002DD, - MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_POWER = 0xC00002DE, - MD_NTSTATUS_WIN_STATUS_SAM_NEED_BOOTKEY_PASSWORD = 0xC00002DF, - MD_NTSTATUS_WIN_STATUS_SAM_NEED_BOOTKEY_FLOPPY = 0xC00002E0, - MD_NTSTATUS_WIN_STATUS_DS_CANT_START = 0xC00002E1, - MD_NTSTATUS_WIN_STATUS_DS_INIT_FAILURE = 0xC00002E2, - MD_NTSTATUS_WIN_STATUS_SAM_INIT_FAILURE = 0xC00002E3, - MD_NTSTATUS_WIN_STATUS_DS_GC_REQUIRED = 0xC00002E4, - MD_NTSTATUS_WIN_STATUS_DS_LOCAL_MEMBER_OF_LOCAL_ONLY = 0xC00002E5, - MD_NTSTATUS_WIN_STATUS_DS_NO_FPO_IN_UNIVERSAL_GROUPS = 0xC00002E6, - MD_NTSTATUS_WIN_STATUS_DS_MACHINE_ACCOUNT_QUOTA_EXCEEDED = 0xC00002E7, - MD_NTSTATUS_WIN_STATUS_MULTIPLE_FAULT_VIOLATION = 0xC00002E8, - MD_NTSTATUS_WIN_STATUS_CURRENT_DOMAIN_NOT_ALLOWED = 0xC00002E9, - MD_NTSTATUS_WIN_STATUS_CANNOT_MAKE = 0xC00002EA, - MD_NTSTATUS_WIN_STATUS_SYSTEM_SHUTDOWN = 0xC00002EB, - MD_NTSTATUS_WIN_STATUS_DS_INIT_FAILURE_CONSOLE = 0xC00002EC, - MD_NTSTATUS_WIN_STATUS_DS_SAM_INIT_FAILURE_CONSOLE = 0xC00002ED, - MD_NTSTATUS_WIN_STATUS_UNFINISHED_CONTEXT_DELETED = 0xC00002EE, - MD_NTSTATUS_WIN_STATUS_NO_TGT_REPLY = 0xC00002EF, - MD_NTSTATUS_WIN_STATUS_OBJECTID_NOT_FOUND = 0xC00002F0, - MD_NTSTATUS_WIN_STATUS_NO_IP_ADDRESSES = 0xC00002F1, - MD_NTSTATUS_WIN_STATUS_WRONG_CREDENTIAL_HANDLE = 0xC00002F2, - MD_NTSTATUS_WIN_STATUS_CRYPTO_SYSTEM_INVALID = 0xC00002F3, - MD_NTSTATUS_WIN_STATUS_MAX_REFERRALS_EXCEEDED = 0xC00002F4, - MD_NTSTATUS_WIN_STATUS_MUST_BE_KDC = 0xC00002F5, - MD_NTSTATUS_WIN_STATUS_STRONG_CRYPTO_NOT_SUPPORTED = 0xC00002F6, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_PRINCIPALS = 0xC00002F7, - MD_NTSTATUS_WIN_STATUS_NO_PA_DATA = 0xC00002F8, - MD_NTSTATUS_WIN_STATUS_PKINIT_NAME_MISMATCH = 0xC00002F9, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_LOGON_REQUIRED = 0xC00002FA, - MD_NTSTATUS_WIN_STATUS_KDC_INVALID_REQUEST = 0xC00002FB, - MD_NTSTATUS_WIN_STATUS_KDC_UNABLE_TO_REFER = 0xC00002FC, - MD_NTSTATUS_WIN_STATUS_KDC_UNKNOWN_ETYPE = 0xC00002FD, - MD_NTSTATUS_WIN_STATUS_SHUTDOWN_IN_PROGRESS = 0xC00002FE, - MD_NTSTATUS_WIN_STATUS_SERVER_SHUTDOWN_IN_PROGRESS = 0xC00002FF, - MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED_ON_SBS = 0xC0000300, - MD_NTSTATUS_WIN_STATUS_WMI_GUID_DISCONNECTED = 0xC0000301, - MD_NTSTATUS_WIN_STATUS_WMI_ALREADY_DISABLED = 0xC0000302, - MD_NTSTATUS_WIN_STATUS_WMI_ALREADY_ENABLED = 0xC0000303, - MD_NTSTATUS_WIN_STATUS_MFT_TOO_FRAGMENTED = 0xC0000304, - MD_NTSTATUS_WIN_STATUS_COPY_PROTECTION_FAILURE = 0xC0000305, - MD_NTSTATUS_WIN_STATUS_CSS_AUTHENTICATION_FAILURE = 0xC0000306, - MD_NTSTATUS_WIN_STATUS_CSS_KEY_NOT_PRESENT = 0xC0000307, - MD_NTSTATUS_WIN_STATUS_CSS_KEY_NOT_ESTABLISHED = 0xC0000308, - MD_NTSTATUS_WIN_STATUS_CSS_SCRAMBLED_SECTOR = 0xC0000309, - MD_NTSTATUS_WIN_STATUS_CSS_REGION_MISMATCH = 0xC000030A, - MD_NTSTATUS_WIN_STATUS_CSS_RESETS_EXHAUSTED = 0xC000030B, - MD_NTSTATUS_WIN_STATUS_PASSWORD_CHANGE_REQUIRED = 0xC000030C, - MD_NTSTATUS_WIN_STATUS_PKINIT_FAILURE = 0xC0000320, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_SUBSYSTEM_FAILURE = 0xC0000321, - MD_NTSTATUS_WIN_STATUS_NO_KERB_KEY = 0xC0000322, - MD_NTSTATUS_WIN_STATUS_HOST_DOWN = 0xC0000350, - MD_NTSTATUS_WIN_STATUS_UNSUPPORTED_PREAUTH = 0xC0000351, - MD_NTSTATUS_WIN_STATUS_EFS_ALG_BLOB_TOO_BIG = 0xC0000352, - MD_NTSTATUS_WIN_STATUS_PORT_NOT_SET = 0xC0000353, - MD_NTSTATUS_WIN_STATUS_DEBUGGER_INACTIVE = 0xC0000354, - MD_NTSTATUS_WIN_STATUS_DS_VERSION_CHECK_FAILURE = 0xC0000355, - MD_NTSTATUS_WIN_STATUS_AUDITING_DISABLED = 0xC0000356, - MD_NTSTATUS_WIN_STATUS_PRENT4_MACHINE_ACCOUNT = 0xC0000357, - MD_NTSTATUS_WIN_STATUS_DS_AG_CANT_HAVE_UNIVERSAL_MEMBER = 0xC0000358, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_32 = 0xC0000359, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_WIN_64 = 0xC000035A, - MD_NTSTATUS_WIN_STATUS_BAD_BINDINGS = 0xC000035B, - MD_NTSTATUS_WIN_STATUS_NETWORK_SESSION_EXPIRED = 0xC000035C, - MD_NTSTATUS_WIN_STATUS_APPHELP_BLOCK = 0xC000035D, - MD_NTSTATUS_WIN_STATUS_ALL_SIDS_FILTERED = 0xC000035E, - MD_NTSTATUS_WIN_STATUS_NOT_SAFE_MODE_DRIVER = 0xC000035F, - MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_DEFAULT = 0xC0000361, - MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_PATH = 0xC0000362, - MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_PUBLISHER = 0xC0000363, - MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_BY_POLICY_OTHER = 0xC0000364, - MD_NTSTATUS_WIN_STATUS_FAILED_DRIVER_ENTRY = 0xC0000365, - MD_NTSTATUS_WIN_STATUS_DEVICE_ENUMERATION_ERROR = 0xC0000366, - MD_NTSTATUS_WIN_STATUS_MOUNT_POINT_NOT_RESOLVED = 0xC0000368, - MD_NTSTATUS_WIN_STATUS_INVALID_DEVICE_OBJECT_PARAMETER = 0xC0000369, - MD_NTSTATUS_WIN_STATUS_MCA_OCCURED = 0xC000036A, - MD_NTSTATUS_WIN_STATUS_DRIVER_BLOCKED_CRITICAL = 0xC000036B, - MD_NTSTATUS_WIN_STATUS_DRIVER_BLOCKED = 0xC000036C, - MD_NTSTATUS_WIN_STATUS_DRIVER_DATABASE_ERROR = 0xC000036D, - MD_NTSTATUS_WIN_STATUS_SYSTEM_HIVE_TOO_LARGE = 0xC000036E, - MD_NTSTATUS_WIN_STATUS_INVALID_IMPORT_OF_NON_DLL = 0xC000036F, - MD_NTSTATUS_WIN_STATUS_NO_SECRETS = 0xC0000371, - MD_NTSTATUS_WIN_STATUS_ACCESS_DISABLED_NO_SAFER_UI_BY_POLICY = 0xC0000372, - MD_NTSTATUS_WIN_STATUS_FAILED_STACK_SWITCH = 0xC0000373, - MD_NTSTATUS_WIN_STATUS_HEAP_CORRUPTION = 0xC0000374, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_WRONG_PIN = 0xC0000380, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_CARD_BLOCKED = 0xC0000381, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_CARD_NOT_AUTHENTICATED = 0xC0000382, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_CARD = 0xC0000383, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_KEY_CONTAINER = 0xC0000384, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_CERTIFICATE = 0xC0000385, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_NO_KEYSET = 0xC0000386, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_IO_ERROR = 0xC0000387, - MD_NTSTATUS_WIN_STATUS_DOWNGRADE_DETECTED = 0xC0000388, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_CERT_REVOKED = 0xC0000389, - MD_NTSTATUS_WIN_STATUS_ISSUING_CA_UNTRUSTED = 0xC000038A, - MD_NTSTATUS_WIN_STATUS_REVOCATION_OFFLINE_C = 0xC000038B, - MD_NTSTATUS_WIN_STATUS_PKINIT_CLIENT_FAILURE = 0xC000038C, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_CERT_EXPIRED = 0xC000038D, - MD_NTSTATUS_WIN_STATUS_DRIVER_FAILED_PRIOR_UNLOAD = 0xC000038E, - MD_NTSTATUS_WIN_STATUS_SMARTCARD_SILENT_CONTEXT = 0xC000038F, - MD_NTSTATUS_WIN_STATUS_PER_USER_TRUST_QUOTA_EXCEEDED = 0xC0000401, - MD_NTSTATUS_WIN_STATUS_ALL_USER_TRUST_QUOTA_EXCEEDED = 0xC0000402, - MD_NTSTATUS_WIN_STATUS_USER_DELETE_TRUST_QUOTA_EXCEEDED = 0xC0000403, - MD_NTSTATUS_WIN_STATUS_DS_NAME_NOT_UNIQUE = 0xC0000404, - MD_NTSTATUS_WIN_STATUS_DS_DUPLICATE_ID_FOUND = 0xC0000405, - MD_NTSTATUS_WIN_STATUS_DS_GROUP_CONVERSION_ERROR = 0xC0000406, - MD_NTSTATUS_WIN_STATUS_VOLSNAP_PREPARE_HIBERNATE = 0xC0000407, - MD_NTSTATUS_WIN_STATUS_USER2USER_REQUIRED = 0xC0000408, - MD_NTSTATUS_WIN_STATUS_STACK_BUFFER_OVERRUN = 0xC0000409, - MD_NTSTATUS_WIN_STATUS_NO_S4U_PROT_SUPPORT = 0xC000040A, - MD_NTSTATUS_WIN_STATUS_CROSSREALM_DELEGATION_FAILURE = 0xC000040B, - MD_NTSTATUS_WIN_STATUS_REVOCATION_OFFLINE_KDC = 0xC000040C, - MD_NTSTATUS_WIN_STATUS_ISSUING_CA_UNTRUSTED_KDC = 0xC000040D, - MD_NTSTATUS_WIN_STATUS_KDC_CERT_EXPIRED = 0xC000040E, - MD_NTSTATUS_WIN_STATUS_KDC_CERT_REVOKED = 0xC000040F, - MD_NTSTATUS_WIN_STATUS_PARAMETER_QUOTA_EXCEEDED = 0xC0000410, - MD_NTSTATUS_WIN_STATUS_HIBERNATION_FAILURE = 0xC0000411, - MD_NTSTATUS_WIN_STATUS_DELAY_LOAD_FAILED = 0xC0000412, - MD_NTSTATUS_WIN_STATUS_AUTHENTICATION_FIREWALL_FAILED = 0xC0000413, - MD_NTSTATUS_WIN_STATUS_VDM_DISALLOWED = 0xC0000414, - MD_NTSTATUS_WIN_STATUS_HUNG_DISPLAY_DRIVER_THREAD = 0xC0000415, - MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_RESOURCE_FOR_SPECIFIED_SHARED_SECTION_SIZE = 0xC0000416, - MD_NTSTATUS_WIN_STATUS_INVALID_CRUNTIME_PARAMETER = 0xC0000417, - MD_NTSTATUS_WIN_STATUS_NTLM_BLOCKED = 0xC0000418, - MD_NTSTATUS_WIN_STATUS_DS_SRC_SID_EXISTS_IN_FOREST = 0xC0000419, - MD_NTSTATUS_WIN_STATUS_DS_DOMAIN_NAME_EXISTS_IN_FOREST = 0xC000041A, - MD_NTSTATUS_WIN_STATUS_DS_FLAT_NAME_EXISTS_IN_FOREST = 0xC000041B, - MD_NTSTATUS_WIN_STATUS_INVALID_USER_PRINCIPAL_NAME = 0xC000041C, - MD_NTSTATUS_WIN_STATUS_FATAL_USER_CALLBACK_EXCEPTION = 0xC000041D, - MD_NTSTATUS_WIN_STATUS_ASSERTION_FAILURE = 0xC0000420, - MD_NTSTATUS_WIN_STATUS_VERIFIER_STOP = 0xC0000421, - MD_NTSTATUS_WIN_STATUS_CALLBACK_POP_STACK = 0xC0000423, - MD_NTSTATUS_WIN_STATUS_INCOMPATIBLE_DRIVER_BLOCKED = 0xC0000424, - MD_NTSTATUS_WIN_STATUS_HIVE_UNLOADED = 0xC0000425, - MD_NTSTATUS_WIN_STATUS_COMPRESSION_DISABLED = 0xC0000426, - MD_NTSTATUS_WIN_STATUS_FILE_SYSTEM_LIMITATION = 0xC0000427, - MD_NTSTATUS_WIN_STATUS_INVALID_IMAGE_HASH = 0xC0000428, - MD_NTSTATUS_WIN_STATUS_NOT_CAPABLE = 0xC0000429, - MD_NTSTATUS_WIN_STATUS_REQUEST_OUT_OF_SEQUENCE = 0xC000042A, - MD_NTSTATUS_WIN_STATUS_IMPLEMENTATION_LIMIT = 0xC000042B, - MD_NTSTATUS_WIN_STATUS_ELEVATION_REQUIRED = 0xC000042C, - MD_NTSTATUS_WIN_STATUS_NO_SECURITY_CONTEXT = 0xC000042D, - MD_NTSTATUS_WIN_STATUS_PKU2U_CERT_FAILURE = 0xC000042F, - MD_NTSTATUS_WIN_STATUS_BEYOND_VDL = 0xC0000432, - MD_NTSTATUS_WIN_STATUS_ENCOUNTERED_WRITE_IN_PROGRESS = 0xC0000433, - MD_NTSTATUS_WIN_STATUS_PTE_CHANGED = 0xC0000434, - MD_NTSTATUS_WIN_STATUS_PURGE_FAILED = 0xC0000435, - MD_NTSTATUS_WIN_STATUS_CRED_REQUIRES_CONFIRMATION = 0xC0000440, - MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_INVALID_SERVER_RESPONSE = 0xC0000441, - MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_UNSUPPORTED_SERVER = 0xC0000442, - MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_EXISTING_ENCRYPTED_FILE = 0xC0000443, - MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_NEW_ENCRYPTED_FILE = 0xC0000444, - MD_NTSTATUS_WIN_STATUS_CS_ENCRYPTION_FILE_NOT_CSE = 0xC0000445, - MD_NTSTATUS_WIN_STATUS_INVALID_LABEL = 0xC0000446, - MD_NTSTATUS_WIN_STATUS_DRIVER_PROCESS_TERMINATED = 0xC0000450, - MD_NTSTATUS_WIN_STATUS_AMBIGUOUS_SYSTEM_DEVICE = 0xC0000451, - MD_NTSTATUS_WIN_STATUS_SYSTEM_DEVICE_NOT_FOUND = 0xC0000452, - MD_NTSTATUS_WIN_STATUS_RESTART_BOOT_APPLICATION = 0xC0000453, - MD_NTSTATUS_WIN_STATUS_INSUFFICIENT_NVRAM_RESOURCES = 0xC0000454, - MD_NTSTATUS_WIN_STATUS_INVALID_SESSION = 0xC0000455, - MD_NTSTATUS_WIN_STATUS_THREAD_ALREADY_IN_SESSION = 0xC0000456, - MD_NTSTATUS_WIN_STATUS_THREAD_NOT_IN_SESSION = 0xC0000457, - MD_NTSTATUS_WIN_STATUS_INVALID_WEIGHT = 0xC0000458, - MD_NTSTATUS_WIN_STATUS_REQUEST_PAUSED = 0xC0000459, - MD_NTSTATUS_WIN_STATUS_NO_RANGES_PROCESSED = 0xC0000460, - MD_NTSTATUS_WIN_STATUS_DISK_RESOURCES_EXHAUSTED = 0xC0000461, - MD_NTSTATUS_WIN_STATUS_NEEDS_REMEDIATION = 0xC0000462, - MD_NTSTATUS_WIN_STATUS_DEVICE_FEATURE_NOT_SUPPORTED = 0xC0000463, - MD_NTSTATUS_WIN_STATUS_DEVICE_UNREACHABLE = 0xC0000464, - MD_NTSTATUS_WIN_STATUS_INVALID_TOKEN = 0xC0000465, - MD_NTSTATUS_WIN_STATUS_SERVER_UNAVAILABLE = 0xC0000466, - MD_NTSTATUS_WIN_STATUS_FILE_NOT_AVAILABLE = 0xC0000467, - MD_NTSTATUS_WIN_STATUS_DEVICE_INSUFFICIENT_RESOURCES = 0xC0000468, - MD_NTSTATUS_WIN_STATUS_PACKAGE_UPDATING = 0xC0000469, - MD_NTSTATUS_WIN_STATUS_NOT_READ_FROM_COPY = 0xC000046A, - MD_NTSTATUS_WIN_STATUS_FT_WRITE_FAILURE = 0xC000046B, - MD_NTSTATUS_WIN_STATUS_FT_DI_SCAN_REQUIRED = 0xC000046C, - MD_NTSTATUS_WIN_STATUS_OBJECT_NOT_EXTERNALLY_BACKED = 0xC000046D, - MD_NTSTATUS_WIN_STATUS_EXTERNAL_BACKING_PROVIDER_UNKNOWN = 0xC000046E, - MD_NTSTATUS_WIN_STATUS_DATA_CHECKSUM_ERROR = 0xC0000470, - MD_NTSTATUS_WIN_STATUS_INTERMIXED_KERNEL_EA_OPERATION = 0xC0000471, - MD_NTSTATUS_WIN_STATUS_TRIM_READ_ZERO_NOT_SUPPORTED = 0xC0000472, - MD_NTSTATUS_WIN_STATUS_TOO_MANY_SEGMENT_DESCRIPTORS = 0xC0000473, - MD_NTSTATUS_WIN_STATUS_INVALID_OFFSET_ALIGNMENT = 0xC0000474, - MD_NTSTATUS_WIN_STATUS_INVALID_FIELD_IN_PARAMETER_LIST = 0xC0000475, - MD_NTSTATUS_WIN_STATUS_OPERATION_IN_PROGRESS = 0xC0000476, - MD_NTSTATUS_WIN_STATUS_INVALID_INITIATOR_TARGET_PATH = 0xC0000477, - MD_NTSTATUS_WIN_STATUS_SCRUB_DATA_DISABLED = 0xC0000478, - MD_NTSTATUS_WIN_STATUS_NOT_REDUNDANT_STORAGE = 0xC0000479, - MD_NTSTATUS_WIN_STATUS_RESIDENT_FILE_NOT_SUPPORTED = 0xC000047A, - MD_NTSTATUS_WIN_STATUS_COMPRESSED_FILE_NOT_SUPPORTED = 0xC000047B, - MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_SUPPORTED = 0xC000047C, - MD_NTSTATUS_WIN_STATUS_IO_OPERATION_TIMEOUT = 0xC000047D, - MD_NTSTATUS_WIN_STATUS_SYSTEM_NEEDS_REMEDIATION = 0xC000047E, - MD_NTSTATUS_WIN_STATUS_APPX_INTEGRITY_FAILURE_CLR_NGEN = 0xC000047F, - MD_NTSTATUS_WIN_STATUS_SHARE_UNAVAILABLE = 0xC0000480, - MD_NTSTATUS_WIN_STATUS_APISET_NOT_HOSTED = 0xC0000481, - MD_NTSTATUS_WIN_STATUS_APISET_NOT_PRESENT = 0xC0000482, - MD_NTSTATUS_WIN_STATUS_DEVICE_HARDWARE_ERROR = 0xC0000483, - MD_NTSTATUS_WIN_STATUS_INVALID_TASK_NAME = 0xC0000500, - MD_NTSTATUS_WIN_STATUS_INVALID_TASK_INDEX = 0xC0000501, - MD_NTSTATUS_WIN_STATUS_THREAD_ALREADY_IN_TASK = 0xC0000502, - MD_NTSTATUS_WIN_STATUS_CALLBACK_BYPASS = 0xC0000503, - MD_NTSTATUS_WIN_STATUS_UNDEFINED_SCOPE = 0xC0000504, - MD_NTSTATUS_WIN_STATUS_INVALID_CAP = 0xC0000505, - MD_NTSTATUS_WIN_STATUS_NOT_GUI_PROCESS = 0xC0000506, - MD_NTSTATUS_WIN_STATUS_FAIL_FAST_EXCEPTION = 0xC0000602, - MD_NTSTATUS_WIN_STATUS_IMAGE_CERT_REVOKED = 0xC0000603, - MD_NTSTATUS_WIN_STATUS_DYNAMIC_CODE_BLOCKED = 0xC0000604, - MD_NTSTATUS_WIN_STATUS_PORT_CLOSED = 0xC0000700, - MD_NTSTATUS_WIN_STATUS_MESSAGE_LOST = 0xC0000701, - MD_NTSTATUS_WIN_STATUS_INVALID_MESSAGE = 0xC0000702, - MD_NTSTATUS_WIN_STATUS_REQUEST_CANCELED = 0xC0000703, - MD_NTSTATUS_WIN_STATUS_RECURSIVE_DISPATCH = 0xC0000704, - MD_NTSTATUS_WIN_STATUS_LPC_RECEIVE_BUFFER_EXPECTED = 0xC0000705, - MD_NTSTATUS_WIN_STATUS_LPC_INVALID_CONNECTION_USAGE = 0xC0000706, - MD_NTSTATUS_WIN_STATUS_LPC_REQUESTS_NOT_ALLOWED = 0xC0000707, - MD_NTSTATUS_WIN_STATUS_RESOURCE_IN_USE = 0xC0000708, - MD_NTSTATUS_WIN_STATUS_HARDWARE_MEMORY_ERROR = 0xC0000709, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_HANDLE_EXCEPTION = 0xC000070A, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_SET_EVENT_ON_COMPLETION_FAILED = 0xC000070B, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASE_SEMAPHORE_ON_COMPLETION_FAILED = 0xC000070C, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASE_MUTEX_ON_COMPLETION_FAILED = 0xC000070D, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_FREE_LIBRARY_ON_COMPLETION_FAILED = 0xC000070E, - MD_NTSTATUS_WIN_STATUS_THREADPOOL_RELEASED_DURING_OPERATION = 0xC000070F, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_WHILE_IMPERSONATING = 0xC0000710, - MD_NTSTATUS_WIN_STATUS_APC_RETURNED_WHILE_IMPERSONATING = 0xC0000711, - MD_NTSTATUS_WIN_STATUS_PROCESS_IS_PROTECTED = 0xC0000712, - MD_NTSTATUS_WIN_STATUS_MCA_EXCEPTION = 0xC0000713, - MD_NTSTATUS_WIN_STATUS_CERTIFICATE_MAPPING_NOT_UNIQUE = 0xC0000714, - MD_NTSTATUS_WIN_STATUS_SYMLINK_CLASS_DISABLED = 0xC0000715, - MD_NTSTATUS_WIN_STATUS_INVALID_IDN_NORMALIZATION = 0xC0000716, - MD_NTSTATUS_WIN_STATUS_NO_UNICODE_TRANSLATION = 0xC0000717, - MD_NTSTATUS_WIN_STATUS_ALREADY_REGISTERED = 0xC0000718, - MD_NTSTATUS_WIN_STATUS_CONTEXT_MISMATCH = 0xC0000719, - MD_NTSTATUS_WIN_STATUS_PORT_ALREADY_HAS_COMPLETION_LIST = 0xC000071A, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_THREAD_PRIORITY = 0xC000071B, - MD_NTSTATUS_WIN_STATUS_INVALID_THREAD = 0xC000071C, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_TRANSACTION = 0xC000071D, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_LDR_LOCK = 0xC000071E, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_LANG = 0xC000071F, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_PRI_BACK = 0xC0000720, - MD_NTSTATUS_WIN_STATUS_CALLBACK_RETURNED_THREAD_AFFINITY = 0xC0000721, - MD_NTSTATUS_WIN_STATUS_DISK_REPAIR_DISABLED = 0xC0000800, - MD_NTSTATUS_WIN_STATUS_DS_DOMAIN_RENAME_IN_PROGRESS = 0xC0000801, - MD_NTSTATUS_WIN_STATUS_DISK_QUOTA_EXCEEDED = 0xC0000802, - MD_NTSTATUS_WIN_STATUS_CONTENT_BLOCKED = 0xC0000804, - MD_NTSTATUS_WIN_STATUS_BAD_CLUSTERS = 0xC0000805, - MD_NTSTATUS_WIN_STATUS_VOLUME_DIRTY = 0xC0000806, - MD_NTSTATUS_WIN_STATUS_DISK_REPAIR_UNSUCCESSFUL = 0xC0000808, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_OVERFULL = 0xC0000809, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_CORRUPTED = 0xC000080A, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_UNAVAILABLE = 0xC000080B, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_DELETED_FULL = 0xC000080C, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_CLEARED = 0xC000080D, - MD_NTSTATUS_WIN_STATUS_ORPHAN_NAME_EXHAUSTED = 0xC000080E, - MD_NTSTATUS_WIN_STATUS_PROACTIVE_SCAN_IN_PROGRESS = 0xC000080F, - MD_NTSTATUS_WIN_STATUS_ENCRYPTED_IO_NOT_POSSIBLE = 0xC0000810, - MD_NTSTATUS_WIN_STATUS_CORRUPT_LOG_UPLEVEL_RECORDS = 0xC0000811, - MD_NTSTATUS_WIN_STATUS_FILE_CHECKED_OUT = 0xC0000901, - MD_NTSTATUS_WIN_STATUS_CHECKOUT_REQUIRED = 0xC0000902, - MD_NTSTATUS_WIN_STATUS_BAD_FILE_TYPE = 0xC0000903, - MD_NTSTATUS_WIN_STATUS_FILE_TOO_LARGE = 0xC0000904, - MD_NTSTATUS_WIN_STATUS_FORMS_AUTH_REQUIRED = 0xC0000905, - MD_NTSTATUS_WIN_STATUS_VIRUS_INFECTED = 0xC0000906, - MD_NTSTATUS_WIN_STATUS_VIRUS_DELETED = 0xC0000907, - MD_NTSTATUS_WIN_STATUS_BAD_MCFG_TABLE = 0xC0000908, - MD_NTSTATUS_WIN_STATUS_CANNOT_BREAK_OPLOCK = 0xC0000909, - MD_NTSTATUS_WIN_STATUS_BAD_KEY = 0xC000090A, - MD_NTSTATUS_WIN_STATUS_BAD_DATA = 0xC000090B, - MD_NTSTATUS_WIN_STATUS_NO_KEY = 0xC000090C, - MD_NTSTATUS_WIN_STATUS_FILE_HANDLE_REVOKED = 0xC0000910, - MD_NTSTATUS_WIN_STATUS_WOW_ASSERTION = 0xC0009898, - MD_NTSTATUS_WIN_STATUS_INVALID_SIGNATURE = 0xC000A000, - MD_NTSTATUS_WIN_STATUS_HMAC_NOT_SUPPORTED = 0xC000A001, - MD_NTSTATUS_WIN_STATUS_AUTH_TAG_MISMATCH = 0xC000A002, - MD_NTSTATUS_WIN_STATUS_INVALID_STATE_TRANSITION = 0xC000A003, - MD_NTSTATUS_WIN_STATUS_INVALID_KERNEL_INFO_VERSION = 0xC000A004, - MD_NTSTATUS_WIN_STATUS_INVALID_PEP_INFO_VERSION = 0xC000A005, - MD_NTSTATUS_WIN_STATUS_IPSEC_QUEUE_OVERFLOW = 0xC000A010, - MD_NTSTATUS_WIN_STATUS_ND_QUEUE_OVERFLOW = 0xC000A011, - MD_NTSTATUS_WIN_STATUS_HOPLIMIT_EXCEEDED = 0xC000A012, - MD_NTSTATUS_WIN_STATUS_PROTOCOL_NOT_SUPPORTED = 0xC000A013, - MD_NTSTATUS_WIN_STATUS_FASTPATH_REJECTED = 0xC000A014, - MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_NETWORK_DISCONNECTED = 0xC000A080, - MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_NETWORK_SERVER_ERROR = 0xC000A081, - MD_NTSTATUS_WIN_STATUS_LOST_WRITEBEHIND_DATA_LOCAL_DISK_ERROR = 0xC000A082, - MD_NTSTATUS_WIN_STATUS_XML_PARSE_ERROR = 0xC000A083, - MD_NTSTATUS_WIN_STATUS_XMLDSIG_ERROR = 0xC000A084, - MD_NTSTATUS_WIN_STATUS_WRONG_COMPARTMENT = 0xC000A085, - MD_NTSTATUS_WIN_STATUS_AUTHIP_FAILURE = 0xC000A086, - MD_NTSTATUS_WIN_STATUS_DS_OID_MAPPED_GROUP_CANT_HAVE_MEMBERS = 0xC000A087, - MD_NTSTATUS_WIN_STATUS_DS_OID_NOT_FOUND = 0xC000A088, - MD_NTSTATUS_WIN_STATUS_INCORRECT_ACCOUNT_TYPE = 0xC000A089, - MD_NTSTATUS_WIN_STATUS_HASH_NOT_SUPPORTED = 0xC000A100, - MD_NTSTATUS_WIN_STATUS_HASH_NOT_PRESENT = 0xC000A101, - MD_NTSTATUS_WIN_STATUS_SECONDARY_IC_PROVIDER_NOT_REGISTERED = 0xC000A121, - MD_NTSTATUS_WIN_STATUS_GPIO_CLIENT_INFORMATION_INVALID = 0xC000A122, - MD_NTSTATUS_WIN_STATUS_GPIO_VERSION_NOT_SUPPORTED = 0xC000A123, - MD_NTSTATUS_WIN_STATUS_GPIO_INVALID_REGISTRATION_PACKET = 0xC000A124, - MD_NTSTATUS_WIN_STATUS_GPIO_OPERATION_DENIED = 0xC000A125, - MD_NTSTATUS_WIN_STATUS_GPIO_INCOMPATIBLE_CONNECT_MODE = 0xC000A126, - MD_NTSTATUS_WIN_STATUS_CANNOT_SWITCH_RUNLEVEL = 0xC000A141, - MD_NTSTATUS_WIN_STATUS_INVALID_RUNLEVEL_SETTING = 0xC000A142, - MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_TIMEOUT = 0xC000A143, - MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_AGENT_TIMEOUT = 0xC000A145, - MD_NTSTATUS_WIN_STATUS_RUNLEVEL_SWITCH_IN_PROGRESS = 0xC000A146, - MD_NTSTATUS_WIN_STATUS_NOT_APPCONTAINER = 0xC000A200, - MD_NTSTATUS_WIN_STATUS_NOT_SUPPORTED_IN_APPCONTAINER = 0xC000A201, - MD_NTSTATUS_WIN_STATUS_INVALID_PACKAGE_SID_LENGTH = 0xC000A202, - MD_NTSTATUS_WIN_STATUS_APP_DATA_NOT_FOUND = 0xC000A281, - MD_NTSTATUS_WIN_STATUS_APP_DATA_EXPIRED = 0xC000A282, - MD_NTSTATUS_WIN_STATUS_APP_DATA_CORRUPT = 0xC000A283, - MD_NTSTATUS_WIN_STATUS_APP_DATA_LIMIT_EXCEEDED = 0xC000A284, - MD_NTSTATUS_WIN_STATUS_APP_DATA_REBOOT_REQUIRED = 0xC000A285, - MD_NTSTATUS_WIN_STATUS_OFFLOAD_READ_FLT_NOT_SUPPORTED = 0xC000A2A1, - MD_NTSTATUS_WIN_STATUS_OFFLOAD_WRITE_FLT_NOT_SUPPORTED = 0xC000A2A2, - MD_NTSTATUS_WIN_STATUS_OFFLOAD_READ_FILE_NOT_SUPPORTED = 0xC000A2A3, - MD_NTSTATUS_WIN_STATUS_OFFLOAD_WRITE_FILE_NOT_SUPPORTED = 0xC000A2A4, - MD_NTSTATUS_WIN_DBG_NO_STATE_CHANGE = 0xC0010001, - MD_NTSTATUS_WIN_DBG_APP_NOT_IDLE = 0xC0010002, - MD_NTSTATUS_WIN_RPC_NT_INVALID_STRING_BINDING = 0xC0020001, - MD_NTSTATUS_WIN_RPC_NT_WRONG_KIND_OF_BINDING = 0xC0020002, - MD_NTSTATUS_WIN_RPC_NT_INVALID_BINDING = 0xC0020003, - MD_NTSTATUS_WIN_RPC_NT_PROTSEQ_NOT_SUPPORTED = 0xC0020004, - MD_NTSTATUS_WIN_RPC_NT_INVALID_RPC_PROTSEQ = 0xC0020005, - MD_NTSTATUS_WIN_RPC_NT_INVALID_STRING_UUID = 0xC0020006, - MD_NTSTATUS_WIN_RPC_NT_INVALID_ENDPOINT_FORMAT = 0xC0020007, - MD_NTSTATUS_WIN_RPC_NT_INVALID_NET_ADDR = 0xC0020008, - MD_NTSTATUS_WIN_RPC_NT_NO_ENDPOINT_FOUND = 0xC0020009, - MD_NTSTATUS_WIN_RPC_NT_INVALID_TIMEOUT = 0xC002000A, - MD_NTSTATUS_WIN_RPC_NT_OBJECT_NOT_FOUND = 0xC002000B, - MD_NTSTATUS_WIN_RPC_NT_ALREADY_REGISTERED = 0xC002000C, - MD_NTSTATUS_WIN_RPC_NT_TYPE_ALREADY_REGISTERED = 0xC002000D, - MD_NTSTATUS_WIN_RPC_NT_ALREADY_LISTENING = 0xC002000E, - MD_NTSTATUS_WIN_RPC_NT_NO_PROTSEQS_REGISTERED = 0xC002000F, - MD_NTSTATUS_WIN_RPC_NT_NOT_LISTENING = 0xC0020010, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_MGR_TYPE = 0xC0020011, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_IF = 0xC0020012, - MD_NTSTATUS_WIN_RPC_NT_NO_BINDINGS = 0xC0020013, - MD_NTSTATUS_WIN_RPC_NT_NO_PROTSEQS = 0xC0020014, - MD_NTSTATUS_WIN_RPC_NT_CANT_CREATE_ENDPOINT = 0xC0020015, - MD_NTSTATUS_WIN_RPC_NT_OUT_OF_RESOURCES = 0xC0020016, - MD_NTSTATUS_WIN_RPC_NT_SERVER_UNAVAILABLE = 0xC0020017, - MD_NTSTATUS_WIN_RPC_NT_SERVER_TOO_BUSY = 0xC0020018, - MD_NTSTATUS_WIN_RPC_NT_INVALID_NETWORK_OPTIONS = 0xC0020019, - MD_NTSTATUS_WIN_RPC_NT_NO_CALL_ACTIVE = 0xC002001A, - MD_NTSTATUS_WIN_RPC_NT_CALL_FAILED = 0xC002001B, - MD_NTSTATUS_WIN_RPC_NT_CALL_FAILED_DNE = 0xC002001C, - MD_NTSTATUS_WIN_RPC_NT_PROTOCOL_ERROR = 0xC002001D, - MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_TRANS_SYN = 0xC002001F, - MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_TYPE = 0xC0020021, - MD_NTSTATUS_WIN_RPC_NT_INVALID_TAG = 0xC0020022, - MD_NTSTATUS_WIN_RPC_NT_INVALID_BOUND = 0xC0020023, - MD_NTSTATUS_WIN_RPC_NT_NO_ENTRY_NAME = 0xC0020024, - MD_NTSTATUS_WIN_RPC_NT_INVALID_NAME_SYNTAX = 0xC0020025, - MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_NAME_SYNTAX = 0xC0020026, - MD_NTSTATUS_WIN_RPC_NT_UUID_NO_ADDRESS = 0xC0020028, - MD_NTSTATUS_WIN_RPC_NT_DUPLICATE_ENDPOINT = 0xC0020029, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_TYPE = 0xC002002A, - MD_NTSTATUS_WIN_RPC_NT_MAX_CALLS_TOO_SMALL = 0xC002002B, - MD_NTSTATUS_WIN_RPC_NT_STRING_TOO_LONG = 0xC002002C, - MD_NTSTATUS_WIN_RPC_NT_PROTSEQ_NOT_FOUND = 0xC002002D, - MD_NTSTATUS_WIN_RPC_NT_PROCNUM_OUT_OF_RANGE = 0xC002002E, - MD_NTSTATUS_WIN_RPC_NT_BINDING_HAS_NO_AUTH = 0xC002002F, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_SERVICE = 0xC0020030, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHN_LEVEL = 0xC0020031, - MD_NTSTATUS_WIN_RPC_NT_INVALID_AUTH_IDENTITY = 0xC0020032, - MD_NTSTATUS_WIN_RPC_NT_UNKNOWN_AUTHZ_SERVICE = 0xC0020033, - MD_NTSTATUS_WIN_EPT_NT_INVALID_ENTRY = 0xC0020034, - MD_NTSTATUS_WIN_EPT_NT_CANT_PERFORM_OP = 0xC0020035, - MD_NTSTATUS_WIN_EPT_NT_NOT_REGISTERED = 0xC0020036, - MD_NTSTATUS_WIN_RPC_NT_NOTHING_TO_EXPORT = 0xC0020037, - MD_NTSTATUS_WIN_RPC_NT_INCOMPLETE_NAME = 0xC0020038, - MD_NTSTATUS_WIN_RPC_NT_INVALID_VERS_OPTION = 0xC0020039, - MD_NTSTATUS_WIN_RPC_NT_NO_MORE_MEMBERS = 0xC002003A, - MD_NTSTATUS_WIN_RPC_NT_NOT_ALL_OBJS_UNEXPORTED = 0xC002003B, - MD_NTSTATUS_WIN_RPC_NT_INTERFACE_NOT_FOUND = 0xC002003C, - MD_NTSTATUS_WIN_RPC_NT_ENTRY_ALREADY_EXISTS = 0xC002003D, - MD_NTSTATUS_WIN_RPC_NT_ENTRY_NOT_FOUND = 0xC002003E, - MD_NTSTATUS_WIN_RPC_NT_NAME_SERVICE_UNAVAILABLE = 0xC002003F, - MD_NTSTATUS_WIN_RPC_NT_INVALID_NAF_ID = 0xC0020040, - MD_NTSTATUS_WIN_RPC_NT_CANNOT_SUPPORT = 0xC0020041, - MD_NTSTATUS_WIN_RPC_NT_NO_CONTEXT_AVAILABLE = 0xC0020042, - MD_NTSTATUS_WIN_RPC_NT_INTERNAL_ERROR = 0xC0020043, - MD_NTSTATUS_WIN_RPC_NT_ZERO_DIVIDE = 0xC0020044, - MD_NTSTATUS_WIN_RPC_NT_ADDRESS_ERROR = 0xC0020045, - MD_NTSTATUS_WIN_RPC_NT_FP_DIV_ZERO = 0xC0020046, - MD_NTSTATUS_WIN_RPC_NT_FP_UNDERFLOW = 0xC0020047, - MD_NTSTATUS_WIN_RPC_NT_FP_OVERFLOW = 0xC0020048, - MD_NTSTATUS_WIN_RPC_NT_CALL_IN_PROGRESS = 0xC0020049, - MD_NTSTATUS_WIN_RPC_NT_NO_MORE_BINDINGS = 0xC002004A, - MD_NTSTATUS_WIN_RPC_NT_GROUP_MEMBER_NOT_FOUND = 0xC002004B, - MD_NTSTATUS_WIN_EPT_NT_CANT_CREATE = 0xC002004C, - MD_NTSTATUS_WIN_RPC_NT_INVALID_OBJECT = 0xC002004D, - MD_NTSTATUS_WIN_RPC_NT_NO_INTERFACES = 0xC002004F, - MD_NTSTATUS_WIN_RPC_NT_CALL_CANCELLED = 0xC0020050, - MD_NTSTATUS_WIN_RPC_NT_BINDING_INCOMPLETE = 0xC0020051, - MD_NTSTATUS_WIN_RPC_NT_COMM_FAILURE = 0xC0020052, - MD_NTSTATUS_WIN_RPC_NT_UNSUPPORTED_AUTHN_LEVEL = 0xC0020053, - MD_NTSTATUS_WIN_RPC_NT_NO_PRINC_NAME = 0xC0020054, - MD_NTSTATUS_WIN_RPC_NT_NOT_RPC_ERROR = 0xC0020055, - MD_NTSTATUS_WIN_RPC_NT_SEC_PKG_ERROR = 0xC0020057, - MD_NTSTATUS_WIN_RPC_NT_NOT_CANCELLED = 0xC0020058, - MD_NTSTATUS_WIN_RPC_NT_INVALID_ASYNC_HANDLE = 0xC0020062, - MD_NTSTATUS_WIN_RPC_NT_INVALID_ASYNC_CALL = 0xC0020063, - MD_NTSTATUS_WIN_RPC_NT_PROXY_ACCESS_DENIED = 0xC0020064, - MD_NTSTATUS_WIN_RPC_NT_COOKIE_AUTH_FAILED = 0xC0020065, - MD_NTSTATUS_WIN_RPC_NT_NO_MORE_ENTRIES = 0xC0030001, - MD_NTSTATUS_WIN_RPC_NT_SS_CHAR_TRANS_OPEN_FAIL = 0xC0030002, - MD_NTSTATUS_WIN_RPC_NT_SS_CHAR_TRANS_SHORT_FILE = 0xC0030003, - MD_NTSTATUS_WIN_RPC_NT_SS_IN_NULL_CONTEXT = 0xC0030004, - MD_NTSTATUS_WIN_RPC_NT_SS_CONTEXT_MISMATCH = 0xC0030005, - MD_NTSTATUS_WIN_RPC_NT_SS_CONTEXT_DAMAGED = 0xC0030006, - MD_NTSTATUS_WIN_RPC_NT_SS_HANDLES_MISMATCH = 0xC0030007, - MD_NTSTATUS_WIN_RPC_NT_SS_CANNOT_GET_CALL_HANDLE = 0xC0030008, - MD_NTSTATUS_WIN_RPC_NT_NULL_REF_POINTER = 0xC0030009, - MD_NTSTATUS_WIN_RPC_NT_ENUM_VALUE_OUT_OF_RANGE = 0xC003000A, - MD_NTSTATUS_WIN_RPC_NT_BYTE_COUNT_TOO_SMALL = 0xC003000B, - MD_NTSTATUS_WIN_RPC_NT_BAD_STUB_DATA = 0xC003000C, - MD_NTSTATUS_WIN_RPC_NT_INVALID_ES_ACTION = 0xC0030059, - MD_NTSTATUS_WIN_RPC_NT_WRONG_ES_VERSION = 0xC003005A, - MD_NTSTATUS_WIN_RPC_NT_WRONG_STUB_VERSION = 0xC003005B, - MD_NTSTATUS_WIN_RPC_NT_INVALID_PIPE_OBJECT = 0xC003005C, - MD_NTSTATUS_WIN_RPC_NT_INVALID_PIPE_OPERATION = 0xC003005D, - MD_NTSTATUS_WIN_RPC_NT_WRONG_PIPE_VERSION = 0xC003005E, - MD_NTSTATUS_WIN_RPC_NT_PIPE_CLOSED = 0xC003005F, - MD_NTSTATUS_WIN_RPC_NT_PIPE_DISCIPLINE_ERROR = 0xC0030060, - MD_NTSTATUS_WIN_RPC_NT_PIPE_EMPTY = 0xC0030061, - MD_NTSTATUS_WIN_STATUS_PNP_BAD_MPS_TABLE = 0xC0040035, - MD_NTSTATUS_WIN_STATUS_PNP_TRANSLATION_FAILED = 0xC0040036, - MD_NTSTATUS_WIN_STATUS_PNP_IRQ_TRANSLATION_FAILED = 0xC0040037, - MD_NTSTATUS_WIN_STATUS_PNP_INVALID_ID = 0xC0040038, - MD_NTSTATUS_WIN_STATUS_IO_REISSUE_AS_CACHED = 0xC0040039, - MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NAME_INVALID = 0xC00A0001, - MD_NTSTATUS_WIN_STATUS_CTX_INVALID_PD = 0xC00A0002, - MD_NTSTATUS_WIN_STATUS_CTX_PD_NOT_FOUND = 0xC00A0003, - MD_NTSTATUS_WIN_STATUS_CTX_CLOSE_PENDING = 0xC00A0006, - MD_NTSTATUS_WIN_STATUS_CTX_NO_OUTBUF = 0xC00A0007, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_INF_NOT_FOUND = 0xC00A0008, - MD_NTSTATUS_WIN_STATUS_CTX_INVALID_MODEMNAME = 0xC00A0009, - MD_NTSTATUS_WIN_STATUS_CTX_RESPONSE_ERROR = 0xC00A000A, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_TIMEOUT = 0xC00A000B, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_NO_CARRIER = 0xC00A000C, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_NO_DIALTONE = 0xC00A000D, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_BUSY = 0xC00A000E, - MD_NTSTATUS_WIN_STATUS_CTX_MODEM_RESPONSE_VOICE = 0xC00A000F, - MD_NTSTATUS_WIN_STATUS_CTX_TD_ERROR = 0xC00A0010, - MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_CLIENT_INVALID = 0xC00A0012, - MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_NOT_AVAILABLE = 0xC00A0013, - MD_NTSTATUS_WIN_STATUS_CTX_LICENSE_EXPIRED = 0xC00A0014, - MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NOT_FOUND = 0xC00A0015, - MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_NAME_COLLISION = 0xC00A0016, - MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_BUSY = 0xC00A0017, - MD_NTSTATUS_WIN_STATUS_CTX_BAD_VIDEO_MODE = 0xC00A0018, - MD_NTSTATUS_WIN_STATUS_CTX_GRAPHICS_INVALID = 0xC00A0022, - MD_NTSTATUS_WIN_STATUS_CTX_NOT_CONSOLE = 0xC00A0024, - MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_QUERY_TIMEOUT = 0xC00A0026, - MD_NTSTATUS_WIN_STATUS_CTX_CONSOLE_DISCONNECT = 0xC00A0027, - MD_NTSTATUS_WIN_STATUS_CTX_CONSOLE_CONNECT = 0xC00A0028, - MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_DENIED = 0xC00A002A, - MD_NTSTATUS_WIN_STATUS_CTX_WINSTATION_ACCESS_DENIED = 0xC00A002B, - MD_NTSTATUS_WIN_STATUS_CTX_INVALID_WD = 0xC00A002E, - MD_NTSTATUS_WIN_STATUS_CTX_WD_NOT_FOUND = 0xC00A002F, - MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_INVALID = 0xC00A0030, - MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_DISABLED = 0xC00A0031, - MD_NTSTATUS_WIN_STATUS_RDP_PROTOCOL_ERROR = 0xC00A0032, - MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_LICENSE_NOT_SET = 0xC00A0033, - MD_NTSTATUS_WIN_STATUS_CTX_CLIENT_LICENSE_IN_USE = 0xC00A0034, - MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_ENDED_BY_MODE_CHANGE = 0xC00A0035, - MD_NTSTATUS_WIN_STATUS_CTX_SHADOW_NOT_RUNNING = 0xC00A0036, - MD_NTSTATUS_WIN_STATUS_CTX_LOGON_DISABLED = 0xC00A0037, - MD_NTSTATUS_WIN_STATUS_CTX_SECURITY_LAYER_ERROR = 0xC00A0038, - MD_NTSTATUS_WIN_STATUS_TS_INCOMPATIBLE_SESSIONS = 0xC00A0039, - MD_NTSTATUS_WIN_STATUS_TS_VIDEO_SUBSYSTEM_ERROR = 0xC00A003A, - MD_NTSTATUS_WIN_STATUS_MUI_FILE_NOT_FOUND = 0xC00B0001, - MD_NTSTATUS_WIN_STATUS_MUI_INVALID_FILE = 0xC00B0002, - MD_NTSTATUS_WIN_STATUS_MUI_INVALID_RC_CONFIG = 0xC00B0003, - MD_NTSTATUS_WIN_STATUS_MUI_INVALID_LOCALE_NAME = 0xC00B0004, - MD_NTSTATUS_WIN_STATUS_MUI_INVALID_ULTIMATEFALLBACK_NAME = 0xC00B0005, - MD_NTSTATUS_WIN_STATUS_MUI_FILE_NOT_LOADED = 0xC00B0006, - MD_NTSTATUS_WIN_STATUS_RESOURCE_ENUM_USER_STOP = 0xC00B0007, - MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NODE = 0xC0130001, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_EXISTS = 0xC0130002, - MD_NTSTATUS_WIN_STATUS_CLUSTER_JOIN_IN_PROGRESS = 0xC0130003, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_FOUND = 0xC0130004, - MD_NTSTATUS_WIN_STATUS_CLUSTER_LOCAL_NODE_NOT_FOUND = 0xC0130005, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_EXISTS = 0xC0130006, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_NOT_FOUND = 0xC0130007, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NETINTERFACE_EXISTS = 0xC0130008, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NETINTERFACE_NOT_FOUND = 0xC0130009, - MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_REQUEST = 0xC013000A, - MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NETWORK_PROVIDER = 0xC013000B, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_DOWN = 0xC013000C, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_UNREACHABLE = 0xC013000D, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_MEMBER = 0xC013000E, - MD_NTSTATUS_WIN_STATUS_CLUSTER_JOIN_NOT_IN_PROGRESS = 0xC013000F, - MD_NTSTATUS_WIN_STATUS_CLUSTER_INVALID_NETWORK = 0xC0130010, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NO_NET_ADAPTERS = 0xC0130011, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_UP = 0xC0130012, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_PAUSED = 0xC0130013, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NODE_NOT_PAUSED = 0xC0130014, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NO_SECURITY_CONTEXT = 0xC0130015, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NETWORK_NOT_INTERNAL = 0xC0130016, - MD_NTSTATUS_WIN_STATUS_CLUSTER_POISONED = 0xC0130017, - MD_NTSTATUS_WIN_STATUS_CLUSTER_NON_CSV_PATH = 0xC0130018, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_NOT_LOCAL = 0xC0130019, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_READ_OPLOCK_BREAK_IN_PROGRESS = 0xC0130020, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_AUTO_PAUSE_ERROR = 0xC0130021, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_REDIRECTED = 0xC0130022, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_NOT_REDIRECTED = 0xC0130023, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_DRAINING = 0xC0130024, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_SNAPSHOT_CREATION_IN_PROGRESS = 0xC0130025, - MD_NTSTATUS_WIN_STATUS_CLUSTER_CSV_VOLUME_DRAINING_SUCCEEDED_DOWNLEVEL = 0xC0130026, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_OPCODE = 0xC0140001, - MD_NTSTATUS_WIN_STATUS_ACPI_STACK_OVERFLOW = 0xC0140002, - MD_NTSTATUS_WIN_STATUS_ACPI_ASSERT_FAILED = 0xC0140003, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_INDEX = 0xC0140004, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ARGUMENT = 0xC0140005, - MD_NTSTATUS_WIN_STATUS_ACPI_FATAL = 0xC0140006, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_SUPERNAME = 0xC0140007, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ARGTYPE = 0xC0140008, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_OBJTYPE = 0xC0140009, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_TARGETTYPE = 0xC014000A, - MD_NTSTATUS_WIN_STATUS_ACPI_INCORRECT_ARGUMENT_COUNT = 0xC014000B, - MD_NTSTATUS_WIN_STATUS_ACPI_ADDRESS_NOT_MAPPED = 0xC014000C, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_EVENTTYPE = 0xC014000D, - MD_NTSTATUS_WIN_STATUS_ACPI_HANDLER_COLLISION = 0xC014000E, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_DATA = 0xC014000F, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_REGION = 0xC0140010, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_ACCESS_SIZE = 0xC0140011, - MD_NTSTATUS_WIN_STATUS_ACPI_ACQUIRE_GLOBAL_LOCK = 0xC0140012, - MD_NTSTATUS_WIN_STATUS_ACPI_ALREADY_INITIALIZED = 0xC0140013, - MD_NTSTATUS_WIN_STATUS_ACPI_NOT_INITIALIZED = 0xC0140014, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_MUTEX_LEVEL = 0xC0140015, - MD_NTSTATUS_WIN_STATUS_ACPI_MUTEX_NOT_OWNED = 0xC0140016, - MD_NTSTATUS_WIN_STATUS_ACPI_MUTEX_NOT_OWNER = 0xC0140017, - MD_NTSTATUS_WIN_STATUS_ACPI_RS_ACCESS = 0xC0140018, - MD_NTSTATUS_WIN_STATUS_ACPI_INVALID_TABLE = 0xC0140019, - MD_NTSTATUS_WIN_STATUS_ACPI_REG_HANDLER_FAILED = 0xC0140020, - MD_NTSTATUS_WIN_STATUS_ACPI_POWER_REQUEST_FAILED = 0xC0140021, - MD_NTSTATUS_WIN_STATUS_SXS_SECTION_NOT_FOUND = 0xC0150001, - MD_NTSTATUS_WIN_STATUS_SXS_CANT_GEN_ACTCTX = 0xC0150002, - MD_NTSTATUS_WIN_STATUS_SXS_INVALID_ACTCTXDATA_FORMAT = 0xC0150003, - MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_NOT_FOUND = 0xC0150004, - MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_FORMAT_ERROR = 0xC0150005, - MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_PARSE_ERROR = 0xC0150006, - MD_NTSTATUS_WIN_STATUS_SXS_ACTIVATION_CONTEXT_DISABLED = 0xC0150007, - MD_NTSTATUS_WIN_STATUS_SXS_KEY_NOT_FOUND = 0xC0150008, - MD_NTSTATUS_WIN_STATUS_SXS_VERSION_CONFLICT = 0xC0150009, - MD_NTSTATUS_WIN_STATUS_SXS_WRONG_SECTION_TYPE = 0xC015000A, - MD_NTSTATUS_WIN_STATUS_SXS_THREAD_QUERIES_DISABLED = 0xC015000B, - MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_MISSING = 0xC015000C, - MD_NTSTATUS_WIN_STATUS_SXS_PROCESS_DEFAULT_ALREADY_SET = 0xC015000E, - MD_NTSTATUS_WIN_STATUS_SXS_EARLY_DEACTIVATION = 0xC015000F, - MD_NTSTATUS_WIN_STATUS_SXS_INVALID_DEACTIVATION = 0xC0150010, - MD_NTSTATUS_WIN_STATUS_SXS_MULTIPLE_DEACTIVATION = 0xC0150011, - MD_NTSTATUS_WIN_STATUS_SXS_SYSTEM_DEFAULT_ACTIVATION_CONTEXT_EMPTY = 0xC0150012, - MD_NTSTATUS_WIN_STATUS_SXS_PROCESS_TERMINATION_REQUESTED = 0xC0150013, - MD_NTSTATUS_WIN_STATUS_SXS_CORRUPT_ACTIVATION_STACK = 0xC0150014, - MD_NTSTATUS_WIN_STATUS_SXS_CORRUPTION = 0xC0150015, - MD_NTSTATUS_WIN_STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_VALUE = 0xC0150016, - MD_NTSTATUS_WIN_STATUS_SXS_INVALID_IDENTITY_ATTRIBUTE_NAME = 0xC0150017, - MD_NTSTATUS_WIN_STATUS_SXS_IDENTITY_DUPLICATE_ATTRIBUTE = 0xC0150018, - MD_NTSTATUS_WIN_STATUS_SXS_IDENTITY_PARSE_ERROR = 0xC0150019, - MD_NTSTATUS_WIN_STATUS_SXS_COMPONENT_STORE_CORRUPT = 0xC015001A, - MD_NTSTATUS_WIN_STATUS_SXS_FILE_HASH_MISMATCH = 0xC015001B, - MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_IDENTITY_SAME_BUT_CONTENTS_DIFFERENT = 0xC015001C, - MD_NTSTATUS_WIN_STATUS_SXS_IDENTITIES_DIFFERENT = 0xC015001D, - MD_NTSTATUS_WIN_STATUS_SXS_ASSEMBLY_IS_NOT_A_DEPLOYMENT = 0xC015001E, - MD_NTSTATUS_WIN_STATUS_SXS_FILE_NOT_PART_OF_ASSEMBLY = 0xC015001F, - MD_NTSTATUS_WIN_STATUS_ADVANCED_INSTALLER_FAILED = 0xC0150020, - MD_NTSTATUS_WIN_STATUS_XML_ENCODING_MISMATCH = 0xC0150021, - MD_NTSTATUS_WIN_STATUS_SXS_MANIFEST_TOO_BIG = 0xC0150022, - MD_NTSTATUS_WIN_STATUS_SXS_SETTING_NOT_REGISTERED = 0xC0150023, - MD_NTSTATUS_WIN_STATUS_SXS_TRANSACTION_CLOSURE_INCOMPLETE = 0xC0150024, - MD_NTSTATUS_WIN_STATUS_SMI_PRIMITIVE_INSTALLER_FAILED = 0xC0150025, - MD_NTSTATUS_WIN_STATUS_GENERIC_COMMAND_FAILED = 0xC0150026, - MD_NTSTATUS_WIN_STATUS_SXS_FILE_HASH_MISSING = 0xC0150027, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONAL_CONFLICT = 0xC0190001, - MD_NTSTATUS_WIN_STATUS_INVALID_TRANSACTION = 0xC0190002, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ACTIVE = 0xC0190003, - MD_NTSTATUS_WIN_STATUS_TM_INITIALIZATION_FAILED = 0xC0190004, - MD_NTSTATUS_WIN_STATUS_RM_NOT_ACTIVE = 0xC0190005, - MD_NTSTATUS_WIN_STATUS_RM_METADATA_CORRUPT = 0xC0190006, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_JOINED = 0xC0190007, - MD_NTSTATUS_WIN_STATUS_DIRECTORY_NOT_RM = 0xC0190008, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONS_UNSUPPORTED_REMOTE = 0xC019000A, - MD_NTSTATUS_WIN_STATUS_LOG_RESIZE_INVALID_SIZE = 0xC019000B, - MD_NTSTATUS_WIN_STATUS_REMOTE_FILE_VERSION_MISMATCH = 0xC019000C, - MD_NTSTATUS_WIN_STATUS_CRM_PROTOCOL_ALREADY_EXISTS = 0xC019000F, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_PROPAGATION_FAILED = 0xC0190010, - MD_NTSTATUS_WIN_STATUS_CRM_PROTOCOL_NOT_FOUND = 0xC0190011, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_SUPERIOR_EXISTS = 0xC0190012, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_REQUEST_NOT_VALID = 0xC0190013, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_REQUESTED = 0xC0190014, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_ALREADY_ABORTED = 0xC0190015, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_ALREADY_COMMITTED = 0xC0190016, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_INVALID_MARSHALL_BUFFER = 0xC0190017, - MD_NTSTATUS_WIN_STATUS_CURRENT_TRANSACTION_NOT_VALID = 0xC0190018, - MD_NTSTATUS_WIN_STATUS_LOG_GROWTH_FAILED = 0xC0190019, - MD_NTSTATUS_WIN_STATUS_OBJECT_NO_LONGER_EXISTS = 0xC0190021, - MD_NTSTATUS_WIN_STATUS_STREAM_MINIVERSION_NOT_FOUND = 0xC0190022, - MD_NTSTATUS_WIN_STATUS_STREAM_MINIVERSION_NOT_VALID = 0xC0190023, - MD_NTSTATUS_WIN_STATUS_MINIVERSION_INACCESSIBLE_FROM_SPECIFIED_TRANSACTION = 0xC0190024, - MD_NTSTATUS_WIN_STATUS_CANT_OPEN_MINIVERSION_WITH_MODIFY_INTENT = 0xC0190025, - MD_NTSTATUS_WIN_STATUS_CANT_CREATE_MORE_STREAM_MINIVERSIONS = 0xC0190026, - MD_NTSTATUS_WIN_STATUS_HANDLE_NO_LONGER_VALID = 0xC0190028, - MD_NTSTATUS_WIN_STATUS_LOG_CORRUPTION_DETECTED = 0xC0190030, - MD_NTSTATUS_WIN_STATUS_RM_DISCONNECTED = 0xC0190032, - MD_NTSTATUS_WIN_STATUS_ENLISTMENT_NOT_SUPERIOR = 0xC0190033, - MD_NTSTATUS_WIN_STATUS_FILE_IDENTITY_NOT_PERSISTENT = 0xC0190036, - MD_NTSTATUS_WIN_STATUS_CANT_BREAK_TRANSACTIONAL_DEPENDENCY = 0xC0190037, - MD_NTSTATUS_WIN_STATUS_CANT_CROSS_RM_BOUNDARY = 0xC0190038, - MD_NTSTATUS_WIN_STATUS_TXF_DIR_NOT_EMPTY = 0xC0190039, - MD_NTSTATUS_WIN_STATUS_INDOUBT_TRANSACTIONS_EXIST = 0xC019003A, - MD_NTSTATUS_WIN_STATUS_TM_VOLATILE = 0xC019003B, - MD_NTSTATUS_WIN_STATUS_ROLLBACK_TIMER_EXPIRED = 0xC019003C, - MD_NTSTATUS_WIN_STATUS_TXF_ATTRIBUTE_CORRUPT = 0xC019003D, - MD_NTSTATUS_WIN_STATUS_EFS_NOT_ALLOWED_IN_TRANSACTION = 0xC019003E, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONAL_OPEN_NOT_ALLOWED = 0xC019003F, - MD_NTSTATUS_WIN_STATUS_TRANSACTED_MAPPING_UNSUPPORTED_REMOTE = 0xC0190040, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_REQUIRED_PROMOTION = 0xC0190043, - MD_NTSTATUS_WIN_STATUS_CANNOT_EXECUTE_FILE_IN_TRANSACTION = 0xC0190044, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONS_NOT_FROZEN = 0xC0190045, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_FREEZE_IN_PROGRESS = 0xC0190046, - MD_NTSTATUS_WIN_STATUS_NOT_SNAPSHOT_VOLUME = 0xC0190047, - MD_NTSTATUS_WIN_STATUS_NO_SAVEPOINT_WITH_OPEN_FILES = 0xC0190048, - MD_NTSTATUS_WIN_STATUS_SPARSE_NOT_ALLOWED_IN_TRANSACTION = 0xC0190049, - MD_NTSTATUS_WIN_STATUS_TM_IDENTITY_MISMATCH = 0xC019004A, - MD_NTSTATUS_WIN_STATUS_FLOATED_SECTION = 0xC019004B, - MD_NTSTATUS_WIN_STATUS_CANNOT_ACCEPT_TRANSACTED_WORK = 0xC019004C, - MD_NTSTATUS_WIN_STATUS_CANNOT_ABORT_TRANSACTIONS = 0xC019004D, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_FOUND = 0xC019004E, - MD_NTSTATUS_WIN_STATUS_RESOURCEMANAGER_NOT_FOUND = 0xC019004F, - MD_NTSTATUS_WIN_STATUS_ENLISTMENT_NOT_FOUND = 0xC0190050, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_NOT_FOUND = 0xC0190051, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_NOT_ONLINE = 0xC0190052, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_RECOVERY_NAME_COLLISION = 0xC0190053, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ROOT = 0xC0190054, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_OBJECT_EXPIRED = 0xC0190055, - MD_NTSTATUS_WIN_STATUS_COMPRESSION_NOT_ALLOWED_IN_TRANSACTION = 0xC0190056, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_RESPONSE_NOT_ENLISTED = 0xC0190057, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_RECORD_TOO_LONG = 0xC0190058, - MD_NTSTATUS_WIN_STATUS_NO_LINK_TRACKING_IN_TRANSACTION = 0xC0190059, - MD_NTSTATUS_WIN_STATUS_OPERATION_NOT_SUPPORTED_IN_TRANSACTION = 0xC019005A, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_INTEGRITY_VIOLATED = 0xC019005B, - MD_NTSTATUS_WIN_STATUS_TRANSACTIONMANAGER_IDENTITY_MISMATCH = 0xC019005C, - MD_NTSTATUS_WIN_STATUS_RM_CANNOT_BE_FROZEN_FOR_SNAPSHOT = 0xC019005D, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_MUST_WRITETHROUGH = 0xC019005E, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NO_SUPERIOR = 0xC019005F, - MD_NTSTATUS_WIN_STATUS_EXPIRED_HANDLE = 0xC0190060, - MD_NTSTATUS_WIN_STATUS_TRANSACTION_NOT_ENLISTED = 0xC0190061, - MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_INVALID = 0xC01A0001, - MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_PARITY_INVALID = 0xC01A0002, - MD_NTSTATUS_WIN_STATUS_LOG_SECTOR_REMAPPED = 0xC01A0003, - MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_INCOMPLETE = 0xC01A0004, - MD_NTSTATUS_WIN_STATUS_LOG_INVALID_RANGE = 0xC01A0005, - MD_NTSTATUS_WIN_STATUS_LOG_BLOCKS_EXHAUSTED = 0xC01A0006, - MD_NTSTATUS_WIN_STATUS_LOG_READ_CONTEXT_INVALID = 0xC01A0007, - MD_NTSTATUS_WIN_STATUS_LOG_RESTART_INVALID = 0xC01A0008, - MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_VERSION = 0xC01A0009, - MD_NTSTATUS_WIN_STATUS_LOG_BLOCK_INVALID = 0xC01A000A, - MD_NTSTATUS_WIN_STATUS_LOG_READ_MODE_INVALID = 0xC01A000B, - MD_NTSTATUS_WIN_STATUS_LOG_METADATA_CORRUPT = 0xC01A000D, - MD_NTSTATUS_WIN_STATUS_LOG_METADATA_INVALID = 0xC01A000E, - MD_NTSTATUS_WIN_STATUS_LOG_METADATA_INCONSISTENT = 0xC01A000F, - MD_NTSTATUS_WIN_STATUS_LOG_RESERVATION_INVALID = 0xC01A0010, - MD_NTSTATUS_WIN_STATUS_LOG_CANT_DELETE = 0xC01A0011, - MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_LIMIT_EXCEEDED = 0xC01A0012, - MD_NTSTATUS_WIN_STATUS_LOG_START_OF_LOG = 0xC01A0013, - MD_NTSTATUS_WIN_STATUS_LOG_POLICY_ALREADY_INSTALLED = 0xC01A0014, - MD_NTSTATUS_WIN_STATUS_LOG_POLICY_NOT_INSTALLED = 0xC01A0015, - MD_NTSTATUS_WIN_STATUS_LOG_POLICY_INVALID = 0xC01A0016, - MD_NTSTATUS_WIN_STATUS_LOG_POLICY_CONFLICT = 0xC01A0017, - MD_NTSTATUS_WIN_STATUS_LOG_PINNED_ARCHIVE_TAIL = 0xC01A0018, - MD_NTSTATUS_WIN_STATUS_LOG_RECORD_NONEXISTENT = 0xC01A0019, - MD_NTSTATUS_WIN_STATUS_LOG_RECORDS_RESERVED_INVALID = 0xC01A001A, - MD_NTSTATUS_WIN_STATUS_LOG_SPACE_RESERVED_INVALID = 0xC01A001B, - MD_NTSTATUS_WIN_STATUS_LOG_TAIL_INVALID = 0xC01A001C, - MD_NTSTATUS_WIN_STATUS_LOG_FULL = 0xC01A001D, - MD_NTSTATUS_WIN_STATUS_LOG_MULTIPLEXED = 0xC01A001E, - MD_NTSTATUS_WIN_STATUS_LOG_DEDICATED = 0xC01A001F, - MD_NTSTATUS_WIN_STATUS_LOG_ARCHIVE_NOT_IN_PROGRESS = 0xC01A0020, - MD_NTSTATUS_WIN_STATUS_LOG_ARCHIVE_IN_PROGRESS = 0xC01A0021, - MD_NTSTATUS_WIN_STATUS_LOG_EPHEMERAL = 0xC01A0022, - MD_NTSTATUS_WIN_STATUS_LOG_NOT_ENOUGH_CONTAINERS = 0xC01A0023, - MD_NTSTATUS_WIN_STATUS_LOG_CLIENT_ALREADY_REGISTERED = 0xC01A0024, - MD_NTSTATUS_WIN_STATUS_LOG_CLIENT_NOT_REGISTERED = 0xC01A0025, - MD_NTSTATUS_WIN_STATUS_LOG_FULL_HANDLER_IN_PROGRESS = 0xC01A0026, - MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_READ_FAILED = 0xC01A0027, - MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_WRITE_FAILED = 0xC01A0028, - MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_OPEN_FAILED = 0xC01A0029, - MD_NTSTATUS_WIN_STATUS_LOG_CONTAINER_STATE_INVALID = 0xC01A002A, - MD_NTSTATUS_WIN_STATUS_LOG_STATE_INVALID = 0xC01A002B, - MD_NTSTATUS_WIN_STATUS_LOG_PINNED = 0xC01A002C, - MD_NTSTATUS_WIN_STATUS_LOG_METADATA_FLUSH_FAILED = 0xC01A002D, - MD_NTSTATUS_WIN_STATUS_LOG_INCONSISTENT_SECURITY = 0xC01A002E, - MD_NTSTATUS_WIN_STATUS_LOG_APPENDED_FLUSH_FAILED = 0xC01A002F, - MD_NTSTATUS_WIN_STATUS_LOG_PINNED_RESERVATION = 0xC01A0030, - MD_NTSTATUS_WIN_STATUS_VIDEO_HUNG_DISPLAY_DRIVER_THREAD = 0xC01B00EA, - MD_NTSTATUS_WIN_STATUS_FLT_NO_HANDLER_DEFINED = 0xC01C0001, - MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALREADY_DEFINED = 0xC01C0002, - MD_NTSTATUS_WIN_STATUS_FLT_INVALID_ASYNCHRONOUS_REQUEST = 0xC01C0003, - MD_NTSTATUS_WIN_STATUS_FLT_DISALLOW_FAST_IO = 0xC01C0004, - MD_NTSTATUS_WIN_STATUS_FLT_INVALID_NAME_REQUEST = 0xC01C0005, - MD_NTSTATUS_WIN_STATUS_FLT_NOT_SAFE_TO_POST_OPERATION = 0xC01C0006, - MD_NTSTATUS_WIN_STATUS_FLT_NOT_INITIALIZED = 0xC01C0007, - MD_NTSTATUS_WIN_STATUS_FLT_FILTER_NOT_READY = 0xC01C0008, - MD_NTSTATUS_WIN_STATUS_FLT_POST_OPERATION_CLEANUP = 0xC01C0009, - MD_NTSTATUS_WIN_STATUS_FLT_INTERNAL_ERROR = 0xC01C000A, - MD_NTSTATUS_WIN_STATUS_FLT_DELETING_OBJECT = 0xC01C000B, - MD_NTSTATUS_WIN_STATUS_FLT_MUST_BE_NONPAGED_POOL = 0xC01C000C, - MD_NTSTATUS_WIN_STATUS_FLT_DUPLICATE_ENTRY = 0xC01C000D, - MD_NTSTATUS_WIN_STATUS_FLT_CBDQ_DISABLED = 0xC01C000E, - MD_NTSTATUS_WIN_STATUS_FLT_DO_NOT_ATTACH = 0xC01C000F, - MD_NTSTATUS_WIN_STATUS_FLT_DO_NOT_DETACH = 0xC01C0010, - MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_ALTITUDE_COLLISION = 0xC01C0011, - MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_NAME_COLLISION = 0xC01C0012, - MD_NTSTATUS_WIN_STATUS_FLT_FILTER_NOT_FOUND = 0xC01C0013, - MD_NTSTATUS_WIN_STATUS_FLT_VOLUME_NOT_FOUND = 0xC01C0014, - MD_NTSTATUS_WIN_STATUS_FLT_INSTANCE_NOT_FOUND = 0xC01C0015, - MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALLOCATION_NOT_FOUND = 0xC01C0016, - MD_NTSTATUS_WIN_STATUS_FLT_INVALID_CONTEXT_REGISTRATION = 0xC01C0017, - MD_NTSTATUS_WIN_STATUS_FLT_NAME_CACHE_MISS = 0xC01C0018, - MD_NTSTATUS_WIN_STATUS_FLT_NO_DEVICE_OBJECT = 0xC01C0019, - MD_NTSTATUS_WIN_STATUS_FLT_VOLUME_ALREADY_MOUNTED = 0xC01C001A, - MD_NTSTATUS_WIN_STATUS_FLT_ALREADY_ENLISTED = 0xC01C001B, - MD_NTSTATUS_WIN_STATUS_FLT_CONTEXT_ALREADY_LINKED = 0xC01C001C, - MD_NTSTATUS_WIN_STATUS_FLT_NO_WAITER_FOR_REPLY = 0xC01C0020, - MD_NTSTATUS_WIN_STATUS_FLT_REGISTRATION_BUSY = 0xC01C0023, - MD_NTSTATUS_WIN_STATUS_MONITOR_NO_DESCRIPTOR = 0xC01D0001, - MD_NTSTATUS_WIN_STATUS_MONITOR_UNKNOWN_DESCRIPTOR_FORMAT = 0xC01D0002, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_DESCRIPTOR_CHECKSUM = 0xC01D0003, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_STANDARD_TIMING_BLOCK = 0xC01D0004, - MD_NTSTATUS_WIN_STATUS_MONITOR_WMI_DATABLOCK_REGISTRATION_FAILED = 0xC01D0005, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_SERIAL_NUMBER_MONDSC_BLOCK = 0xC01D0006, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_USER_FRIENDLY_MONDSC_BLOCK = 0xC01D0007, - MD_NTSTATUS_WIN_STATUS_MONITOR_NO_MORE_DESCRIPTOR_DATA = 0xC01D0008, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_DETAILED_TIMING_BLOCK = 0xC01D0009, - MD_NTSTATUS_WIN_STATUS_MONITOR_INVALID_MANUFACTURE_DATE = 0xC01D000A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_EXCLUSIVE_MODE_OWNER = 0xC01E0000, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INSUFFICIENT_DMA_BUFFER = 0xC01E0001, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_DISPLAY_ADAPTER = 0xC01E0002, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_WAS_RESET = 0xC01E0003, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_DRIVER_MODEL = 0xC01E0004, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_MODE_CHANGED = 0xC01E0005, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_OCCLUDED = 0xC01E0006, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_DENIED = 0xC01E0007, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANNOTCOLORCONVERT = 0xC01E0008, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DRIVER_MISMATCH = 0xC01E0009, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_REDIRECTION_DISABLED = 0xC01E000B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PRESENT_UNOCCLUDED = 0xC01E000C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_WINDOWDC_NOT_AVAILABLE = 0xC01E000D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_WINDOWLESS_PRESENT_DISABLED = 0xC01E000E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_VIDEO_MEMORY = 0xC01E0100, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_LOCK_MEMORY = 0xC01E0101, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_BUSY = 0xC01E0102, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TOO_MANY_REFERENCES = 0xC01E0103, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TRY_AGAIN_LATER = 0xC01E0104, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TRY_AGAIN_NOW = 0xC01E0105, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_INVALID = 0xC01E0106, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNAVAILABLE = 0xC01E0107, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNSWIZZLING_APERTURE_UNSUPPORTED = 0xC01E0108, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_EVICT_PINNED_ALLOCATION = 0xC01E0109, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_USAGE = 0xC01E0110, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_RENDER_LOCKED_ALLOCATION = 0xC01E0111, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_CLOSED = 0xC01E0112, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_INSTANCE = 0xC01E0113, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ALLOCATION_HANDLE = 0xC01E0114, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_WRONG_ALLOCATION_DEVICE = 0xC01E0115, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ALLOCATION_CONTENT_LOST = 0xC01E0116, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_GPU_EXCEPTION_ON_DEVICE = 0xC01E0200, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY = 0xC01E0300, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_TOPOLOGY_NOT_SUPPORTED = 0xC01E0301, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_TOPOLOGY_CURRENTLY_NOT_SUPPORTED = 0xC01E0302, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN = 0xC01E0303, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE = 0xC01E0304, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET = 0xC01E0305, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_MODALITY_NOT_SUPPORTED = 0xC01E0306, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_SOURCEMODESET = 0xC01E0308, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TARGETMODESET = 0xC01E0309, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_FREQUENCY = 0xC01E030A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_ACTIVE_REGION = 0xC01E030B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_TOTAL_REGION = 0xC01E030C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_SOURCE_MODE = 0xC01E0310, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEO_PRESENT_TARGET_MODE = 0xC01E0311, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PINNED_MODE_MUST_REMAIN_IN_SET = 0xC01E0312, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_ALREADY_IN_TOPOLOGY = 0xC01E0313, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_ALREADY_IN_MODESET = 0xC01E0314, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEOPRESENTSOURCESET = 0xC01E0315, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDEOPRESENTTARGETSET = 0xC01E0316, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_ALREADY_IN_SET = 0xC01E0317, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_ALREADY_IN_SET = 0xC01E0318, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_PRESENT_PATH = 0xC01E0319, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_RECOMMENDED_VIDPN_TOPOLOGY = 0xC01E031A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGESET = 0xC01E031B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE = 0xC01E031C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_FREQUENCYRANGE_NOT_IN_SET = 0xC01E031D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_FREQUENCYRANGE_ALREADY_IN_SET = 0xC01E031F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_STALE_MODESET = 0xC01E0320, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_SOURCEMODESET = 0xC01E0321, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_SOURCE_MODE = 0xC01E0322, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_RECOMMENDED_FUNCTIONAL_VIDPN = 0xC01E0323, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_ID_MUST_BE_UNIQUE = 0xC01E0324, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_EMPTY_ADAPTER_MONITOR_MODE_SUPPORT_INTERSECTION = 0xC01E0325, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDEO_PRESENT_TARGETS_LESS_THAN_SOURCES = 0xC01E0326, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_NOT_IN_TOPOLOGY = 0xC01E0327, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_SOURCE = 0xC01E0328, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_MUST_HAVE_AT_LEAST_ONE_TARGET = 0xC01E0329, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITORDESCRIPTORSET = 0xC01E032A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITORDESCRIPTOR = 0xC01E032B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_NOT_IN_SET = 0xC01E032C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_ALREADY_IN_SET = 0xC01E032D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITORDESCRIPTOR_ID_MUST_BE_UNIQUE = 0xC01E032E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TARGET_SUBSET_TYPE = 0xC01E032F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_RESOURCES_NOT_RELATED = 0xC01E0330, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_ID_MUST_BE_UNIQUE = 0xC01E0331, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_ID_MUST_BE_UNIQUE = 0xC01E0332, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_AVAILABLE_VIDPN_TARGET = 0xC01E0333, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_COULD_NOT_BE_ASSOCIATED_WITH_ADAPTER = 0xC01E0334, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_VIDPNMGR = 0xC01E0335, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_ACTIVE_VIDPN = 0xC01E0336, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_STALE_VIDPN_TOPOLOGY = 0xC01E0337, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_NOT_CONNECTED = 0xC01E0338, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_SOURCE_NOT_IN_TOPOLOGY = 0xC01E0339, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PRIMARYSURFACE_SIZE = 0xC01E033A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VISIBLEREGION_SIZE = 0xC01E033B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_STRIDE = 0xC01E033C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PIXELFORMAT = 0xC01E033D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_COLORBASIS = 0xC01E033E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PIXELVALUEACCESSMODE = 0xC01E033F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TARGET_NOT_IN_TOPOLOGY = 0xC01E0340, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_DISPLAY_MODE_MANAGEMENT_SUPPORT = 0xC01E0341, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_VIDPN_SOURCE_IN_USE = 0xC01E0342, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANT_ACCESS_ACTIVE_VIDPN = 0xC01E0343, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_IMPORTANCE_ORDINAL = 0xC01E0344, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_CONTENT_GEOMETRY_TRANSFORMATION = 0xC01E0345, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PATH_CONTENT_GEOMETRY_TRANSFORMATION_NOT_SUPPORTED = 0xC01E0346, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_GAMMA_RAMP = 0xC01E0347, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_GAMMA_RAMP_NOT_SUPPORTED = 0xC01E0348, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MULTISAMPLING_NOT_SUPPORTED = 0xC01E0349, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MODE_NOT_IN_MODESET = 0xC01E034A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_VIDPN_TOPOLOGY_RECOMMENDATION_REASON = 0xC01E034D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PATH_CONTENT_TYPE = 0xC01E034E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_COPYPROTECTION_TYPE = 0xC01E034F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_UNASSIGNED_MODESET_ALREADY_EXISTS = 0xC01E0350, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_SCANLINE_ORDERING = 0xC01E0352, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_TOPOLOGY_CHANGES_NOT_ALLOWED = 0xC01E0353, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_AVAILABLE_IMPORTANCE_ORDINALS = 0xC01E0354, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INCOMPATIBLE_PRIVATE_FORMAT = 0xC01E0355, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MODE_PRUNING_ALGORITHM = 0xC01E0356, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_CAPABILITY_ORIGIN = 0xC01E0357, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_MONITOR_FREQUENCYRANGE_CONSTRAINT = 0xC01E0358, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MAX_NUM_PATHS_REACHED = 0xC01E0359, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CANCEL_VIDPN_TOPOLOGY_AUGMENTATION = 0xC01E035A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_CLIENT_TYPE = 0xC01E035B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CLIENTVIDPN_NOT_SET = 0xC01E035C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_SPECIFIED_CHILD_ALREADY_CONNECTED = 0xC01E0400, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHILD_DESCRIPTOR_NOT_SUPPORTED = 0xC01E0401, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_A_LINKED_ADAPTER = 0xC01E0430, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_LEADLINK_NOT_ENUMERATED = 0xC01E0431, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_ENUMERATED = 0xC01E0432, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_CHAIN_NOT_READY = 0xC01E0433, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_STARTED = 0xC01E0434, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_CHAINLINKS_NOT_POWERED_ON = 0xC01E0435, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INCONSISTENT_DEVICE_LINK_STATE = 0xC01E0436, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NOT_POST_DEVICE_DRIVER = 0xC01E0438, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ADAPTER_ACCESS_NOT_EXCLUDED = 0xC01E043B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_NOT_SUPPORTED = 0xC01E0500, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_COPP_NOT_SUPPORTED = 0xC01E0501, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_UAB_NOT_SUPPORTED = 0xC01E0502, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_ENCRYPTED_PARAMETERS = 0xC01E0503, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_NO_PROTECTED_OUTPUTS_EXIST = 0xC01E0505, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INTERNAL_ERROR = 0xC01E050B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_HANDLE = 0xC01E050C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PVP_INVALID_CERTIFICATE_LENGTH = 0xC01E050E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_SPANNING_MODE_ENABLED = 0xC01E050F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_THEATER_MODE_ENABLED = 0xC01E0510, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PVP_HFS_FAILED = 0xC01E0511, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_SRM = 0xC01E0512, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_HDCP = 0xC01E0513, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_ACP = 0xC01E0514, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_OUTPUT_DOES_NOT_SUPPORT_CGMSA = 0xC01E0515, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_HDCP_SRM_NEVER_SET = 0xC01E0516, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_RESOLUTION_TOO_HIGH = 0xC01E0517, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_ALL_HDCP_HARDWARE_ALREADY_IN_USE = 0xC01E0518, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_NO_LONGER_EXISTS = 0xC01E051A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_COPP_SEMANTICS = 0xC01E051C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_INFORMATION_REQUEST = 0xC01E051D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_DRIVER_INTERNAL_ERROR = 0xC01E051E, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_PROTECTED_OUTPUT_DOES_NOT_HAVE_OPM_SEMANTICS = 0xC01E051F, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_SIGNALING_NOT_SUPPORTED = 0xC01E0520, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_OPM_INVALID_CONFIGURATION_REQUEST = 0xC01E0521, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_NOT_SUPPORTED = 0xC01E0580, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_DEVICE_DOES_NOT_EXIST = 0xC01E0581, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_ERROR_TRANSMITTING_DATA = 0xC01E0582, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_I2C_ERROR_RECEIVING_DATA = 0xC01E0583, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_VCP_NOT_SUPPORTED = 0xC01E0584, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_DATA = 0xC01E0585, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_MONITOR_RETURNED_INVALID_TIMING_STATUS_BYTE = 0xC01E0586, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_CAPABILITIES_STRING = 0xC01E0587, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MCA_INTERNAL_ERROR = 0xC01E0588, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_COMMAND = 0xC01E0589, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_LENGTH = 0xC01E058A, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DDCCI_INVALID_MESSAGE_CHECKSUM = 0xC01E058B, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_PHYSICAL_MONITOR_HANDLE = 0xC01E058C, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MONITOR_NO_LONGER_EXISTS = 0xC01E058D, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_ONLY_CONSOLE_SESSION_SUPPORTED = 0xC01E05E0, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_DISPLAY_DEVICE_CORRESPONDS_TO_NAME = 0xC01E05E1, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_DISPLAY_DEVICE_NOT_ATTACHED_TO_DESKTOP = 0xC01E05E2, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_MIRRORING_DEVICES_NOT_SUPPORTED = 0xC01E05E3, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INVALID_POINTER = 0xC01E05E4, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_NO_MONITORS_CORRESPOND_TO_DISPLAY_DEVICE = 0xC01E05E5, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_PARAMETER_ARRAY_TOO_SMALL = 0xC01E05E6, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_INTERNAL_ERROR = 0xC01E05E7, - MD_NTSTATUS_WIN_STATUS_GRAPHICS_SESSION_TYPE_CHANGE_IN_PROGRESS = 0xC01E05E8, - MD_NTSTATUS_WIN_STATUS_FVE_LOCKED_VOLUME = 0xC0210000, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_ENCRYPTED = 0xC0210001, - MD_NTSTATUS_WIN_STATUS_FVE_BAD_INFORMATION = 0xC0210002, - MD_NTSTATUS_WIN_STATUS_FVE_TOO_SMALL = 0xC0210003, - MD_NTSTATUS_WIN_STATUS_FVE_FAILED_WRONG_FS = 0xC0210004, - MD_NTSTATUS_WIN_STATUS_FVE_BAD_PARTITION_SIZE = 0xC0210005, - MD_NTSTATUS_WIN_STATUS_FVE_FS_NOT_EXTENDED = 0xC0210006, - MD_NTSTATUS_WIN_STATUS_FVE_FS_MOUNTED = 0xC0210007, - MD_NTSTATUS_WIN_STATUS_FVE_NO_LICENSE = 0xC0210008, - MD_NTSTATUS_WIN_STATUS_FVE_ACTION_NOT_ALLOWED = 0xC0210009, - MD_NTSTATUS_WIN_STATUS_FVE_BAD_DATA = 0xC021000A, - MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_NOT_BOUND = 0xC021000B, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_DATA_VOLUME = 0xC021000C, - MD_NTSTATUS_WIN_STATUS_FVE_CONV_READ_ERROR = 0xC021000D, - MD_NTSTATUS_WIN_STATUS_FVE_CONV_WRITE_ERROR = 0xC021000E, - MD_NTSTATUS_WIN_STATUS_FVE_OVERLAPPED_UPDATE = 0xC021000F, - MD_NTSTATUS_WIN_STATUS_FVE_FAILED_SECTOR_SIZE = 0xC0210010, - MD_NTSTATUS_WIN_STATUS_FVE_FAILED_AUTHENTICATION = 0xC0210011, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_OS_VOLUME = 0xC0210012, - MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_NOT_FOUND = 0xC0210013, - MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_INVALID = 0xC0210014, - MD_NTSTATUS_WIN_STATUS_FVE_KEYFILE_NO_VMK = 0xC0210015, - MD_NTSTATUS_WIN_STATUS_FVE_TPM_DISABLED = 0xC0210016, - MD_NTSTATUS_WIN_STATUS_FVE_TPM_SRK_AUTH_NOT_ZERO = 0xC0210017, - MD_NTSTATUS_WIN_STATUS_FVE_TPM_INVALID_PCR = 0xC0210018, - MD_NTSTATUS_WIN_STATUS_FVE_TPM_NO_VMK = 0xC0210019, - MD_NTSTATUS_WIN_STATUS_FVE_PIN_INVALID = 0xC021001A, - MD_NTSTATUS_WIN_STATUS_FVE_AUTH_INVALID_APPLICATION = 0xC021001B, - MD_NTSTATUS_WIN_STATUS_FVE_AUTH_INVALID_CONFIG = 0xC021001C, - MD_NTSTATUS_WIN_STATUS_FVE_DEBUGGER_ENABLED = 0xC021001D, - MD_NTSTATUS_WIN_STATUS_FVE_DRY_RUN_FAILED = 0xC021001E, - MD_NTSTATUS_WIN_STATUS_FVE_BAD_METADATA_POINTER = 0xC021001F, - MD_NTSTATUS_WIN_STATUS_FVE_OLD_METADATA_COPY = 0xC0210020, - MD_NTSTATUS_WIN_STATUS_FVE_REBOOT_REQUIRED = 0xC0210021, - MD_NTSTATUS_WIN_STATUS_FVE_RAW_ACCESS = 0xC0210022, - MD_NTSTATUS_WIN_STATUS_FVE_RAW_BLOCKED = 0xC0210023, - MD_NTSTATUS_WIN_STATUS_FVE_NO_AUTOUNLOCK_MASTER_KEY = 0xC0210024, - MD_NTSTATUS_WIN_STATUS_FVE_MOR_FAILED = 0xC0210025, - MD_NTSTATUS_WIN_STATUS_FVE_NO_FEATURE_LICENSE = 0xC0210026, - MD_NTSTATUS_WIN_STATUS_FVE_POLICY_USER_DISABLE_RDV_NOT_ALLOWED = 0xC0210027, - MD_NTSTATUS_WIN_STATUS_FVE_CONV_RECOVERY_FAILED = 0xC0210028, - MD_NTSTATUS_WIN_STATUS_FVE_VIRTUALIZED_SPACE_TOO_BIG = 0xC0210029, - MD_NTSTATUS_WIN_STATUS_FVE_INVALID_DATUM_TYPE = 0xC021002A, - MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_TOO_SMALL = 0xC0210030, - MD_NTSTATUS_WIN_STATUS_FVE_ENH_PIN_INVALID = 0xC0210031, - MD_NTSTATUS_WIN_STATUS_FVE_FULL_ENCRYPTION_NOT_ALLOWED_ON_TP_STORAGE = 0xC0210032, - MD_NTSTATUS_WIN_STATUS_FVE_WIPE_NOT_ALLOWED_ON_TP_STORAGE = 0xC0210033, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_ON_CSV_STACK = 0xC0210034, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_ON_CLUSTER = 0xC0210035, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_ALLOWED_TO_UPGRADE_WHILE_CONVERTING = 0xC0210036, - MD_NTSTATUS_WIN_STATUS_FVE_WIPE_CANCEL_NOT_APPLICABLE = 0xC0210037, - MD_NTSTATUS_WIN_STATUS_FVE_EDRIVE_DRY_RUN_FAILED = 0xC0210038, - MD_NTSTATUS_WIN_STATUS_FVE_SECUREBOOT_DISABLED = 0xC0210039, - MD_NTSTATUS_WIN_STATUS_FVE_SECUREBOOT_CONFIG_CHANGE = 0xC021003A, - MD_NTSTATUS_WIN_STATUS_FVE_DEVICE_LOCKEDOUT = 0xC021003B, - MD_NTSTATUS_WIN_STATUS_FVE_VOLUME_EXTEND_PREVENTS_EOW_DECRYPT = 0xC021003C, - MD_NTSTATUS_WIN_STATUS_FVE_NOT_DE_VOLUME = 0xC021003D, - MD_NTSTATUS_WIN_STATUS_FVE_PROTECTION_DISABLED = 0xC021003E, - MD_NTSTATUS_WIN_STATUS_FVE_PROTECTION_CANNOT_BE_DISABLED = 0xC021003F, - MD_NTSTATUS_WIN_STATUS_FWP_CALLOUT_NOT_FOUND = 0xC0220001, - MD_NTSTATUS_WIN_STATUS_FWP_CONDITION_NOT_FOUND = 0xC0220002, - MD_NTSTATUS_WIN_STATUS_FWP_FILTER_NOT_FOUND = 0xC0220003, - MD_NTSTATUS_WIN_STATUS_FWP_LAYER_NOT_FOUND = 0xC0220004, - MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_NOT_FOUND = 0xC0220005, - MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_CONTEXT_NOT_FOUND = 0xC0220006, - MD_NTSTATUS_WIN_STATUS_FWP_SUBLAYER_NOT_FOUND = 0xC0220007, - MD_NTSTATUS_WIN_STATUS_FWP_NOT_FOUND = 0xC0220008, - MD_NTSTATUS_WIN_STATUS_FWP_ALREADY_EXISTS = 0xC0220009, - MD_NTSTATUS_WIN_STATUS_FWP_IN_USE = 0xC022000A, - MD_NTSTATUS_WIN_STATUS_FWP_DYNAMIC_SESSION_IN_PROGRESS = 0xC022000B, - MD_NTSTATUS_WIN_STATUS_FWP_WRONG_SESSION = 0xC022000C, - MD_NTSTATUS_WIN_STATUS_FWP_NO_TXN_IN_PROGRESS = 0xC022000D, - MD_NTSTATUS_WIN_STATUS_FWP_TXN_IN_PROGRESS = 0xC022000E, - MD_NTSTATUS_WIN_STATUS_FWP_TXN_ABORTED = 0xC022000F, - MD_NTSTATUS_WIN_STATUS_FWP_SESSION_ABORTED = 0xC0220010, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_TXN = 0xC0220011, - MD_NTSTATUS_WIN_STATUS_FWP_TIMEOUT = 0xC0220012, - MD_NTSTATUS_WIN_STATUS_FWP_NET_EVENTS_DISABLED = 0xC0220013, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_LAYER = 0xC0220014, - MD_NTSTATUS_WIN_STATUS_FWP_KM_CLIENTS_ONLY = 0xC0220015, - MD_NTSTATUS_WIN_STATUS_FWP_LIFETIME_MISMATCH = 0xC0220016, - MD_NTSTATUS_WIN_STATUS_FWP_BUILTIN_OBJECT = 0xC0220017, - MD_NTSTATUS_WIN_STATUS_FWP_TOO_MANY_CALLOUTS = 0xC0220018, - MD_NTSTATUS_WIN_STATUS_FWP_NOTIFICATION_DROPPED = 0xC0220019, - MD_NTSTATUS_WIN_STATUS_FWP_TRAFFIC_MISMATCH = 0xC022001A, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_SA_STATE = 0xC022001B, - MD_NTSTATUS_WIN_STATUS_FWP_NULL_POINTER = 0xC022001C, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_ENUMERATOR = 0xC022001D, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_FLAGS = 0xC022001E, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_NET_MASK = 0xC022001F, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_RANGE = 0xC0220020, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_INTERVAL = 0xC0220021, - MD_NTSTATUS_WIN_STATUS_FWP_ZERO_LENGTH_ARRAY = 0xC0220022, - MD_NTSTATUS_WIN_STATUS_FWP_NULL_DISPLAY_NAME = 0xC0220023, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_ACTION_TYPE = 0xC0220024, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_WEIGHT = 0xC0220025, - MD_NTSTATUS_WIN_STATUS_FWP_MATCH_TYPE_MISMATCH = 0xC0220026, - MD_NTSTATUS_WIN_STATUS_FWP_TYPE_MISMATCH = 0xC0220027, - MD_NTSTATUS_WIN_STATUS_FWP_OUT_OF_BOUNDS = 0xC0220028, - MD_NTSTATUS_WIN_STATUS_FWP_RESERVED = 0xC0220029, - MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_CONDITION = 0xC022002A, - MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_KEYMOD = 0xC022002B, - MD_NTSTATUS_WIN_STATUS_FWP_ACTION_INCOMPATIBLE_WITH_LAYER = 0xC022002C, - MD_NTSTATUS_WIN_STATUS_FWP_ACTION_INCOMPATIBLE_WITH_SUBLAYER = 0xC022002D, - MD_NTSTATUS_WIN_STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_LAYER = 0xC022002E, - MD_NTSTATUS_WIN_STATUS_FWP_CONTEXT_INCOMPATIBLE_WITH_CALLOUT = 0xC022002F, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_AUTH_METHOD = 0xC0220030, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_DH_GROUP = 0xC0220031, - MD_NTSTATUS_WIN_STATUS_FWP_EM_NOT_SUPPORTED = 0xC0220032, - MD_NTSTATUS_WIN_STATUS_FWP_NEVER_MATCH = 0xC0220033, - MD_NTSTATUS_WIN_STATUS_FWP_PROVIDER_CONTEXT_MISMATCH = 0xC0220034, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_PARAMETER = 0xC0220035, - MD_NTSTATUS_WIN_STATUS_FWP_TOO_MANY_SUBLAYERS = 0xC0220036, - MD_NTSTATUS_WIN_STATUS_FWP_CALLOUT_NOTIFICATION_FAILED = 0xC0220037, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_AUTH_TRANSFORM = 0xC0220038, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_CIPHER_TRANSFORM = 0xC0220039, - MD_NTSTATUS_WIN_STATUS_FWP_INCOMPATIBLE_CIPHER_TRANSFORM = 0xC022003A, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_TRANSFORM_COMBINATION = 0xC022003B, - MD_NTSTATUS_WIN_STATUS_FWP_DUPLICATE_AUTH_METHOD = 0xC022003C, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_TUNNEL_ENDPOINT = 0xC022003D, - MD_NTSTATUS_WIN_STATUS_FWP_L2_DRIVER_NOT_READY = 0xC022003E, - MD_NTSTATUS_WIN_STATUS_FWP_KEY_DICTATOR_ALREADY_REGISTERED = 0xC022003F, - MD_NTSTATUS_WIN_STATUS_FWP_KEY_DICTATION_INVALID_KEYING_MATERIAL = 0xC0220040, - MD_NTSTATUS_WIN_STATUS_FWP_CONNECTIONS_DISABLED = 0xC0220041, - MD_NTSTATUS_WIN_STATUS_FWP_INVALID_DNS_NAME = 0xC0220042, - MD_NTSTATUS_WIN_STATUS_FWP_STILL_ON = 0xC0220043, - MD_NTSTATUS_WIN_STATUS_FWP_IKEEXT_NOT_RUNNING = 0xC0220044, - MD_NTSTATUS_WIN_STATUS_FWP_TCPIP_NOT_READY = 0xC0220100, - MD_NTSTATUS_WIN_STATUS_FWP_INJECT_HANDLE_CLOSING = 0xC0220101, - MD_NTSTATUS_WIN_STATUS_FWP_INJECT_HANDLE_STALE = 0xC0220102, - MD_NTSTATUS_WIN_STATUS_FWP_CANNOT_PEND = 0xC0220103, - MD_NTSTATUS_WIN_STATUS_FWP_DROP_NOICMP = 0xC0220104, - MD_NTSTATUS_WIN_STATUS_NDIS_CLOSING = 0xC0230002, - MD_NTSTATUS_WIN_STATUS_NDIS_BAD_VERSION = 0xC0230004, - MD_NTSTATUS_WIN_STATUS_NDIS_BAD_CHARACTERISTICS = 0xC0230005, - MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_NOT_FOUND = 0xC0230006, - MD_NTSTATUS_WIN_STATUS_NDIS_OPEN_FAILED = 0xC0230007, - MD_NTSTATUS_WIN_STATUS_NDIS_DEVICE_FAILED = 0xC0230008, - MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_FULL = 0xC0230009, - MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_EXISTS = 0xC023000A, - MD_NTSTATUS_WIN_STATUS_NDIS_MULTICAST_NOT_FOUND = 0xC023000B, - MD_NTSTATUS_WIN_STATUS_NDIS_REQUEST_ABORTED = 0xC023000C, - MD_NTSTATUS_WIN_STATUS_NDIS_RESET_IN_PROGRESS = 0xC023000D, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PACKET = 0xC023000F, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_DEVICE_REQUEST = 0xC0230010, - MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_NOT_READY = 0xC0230011, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_LENGTH = 0xC0230014, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_DATA = 0xC0230015, - MD_NTSTATUS_WIN_STATUS_NDIS_BUFFER_TOO_SHORT = 0xC0230016, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_OID = 0xC0230017, - MD_NTSTATUS_WIN_STATUS_NDIS_ADAPTER_REMOVED = 0xC0230018, - MD_NTSTATUS_WIN_STATUS_NDIS_UNSUPPORTED_MEDIA = 0xC0230019, - MD_NTSTATUS_WIN_STATUS_NDIS_GROUP_ADDRESS_IN_USE = 0xC023001A, - MD_NTSTATUS_WIN_STATUS_NDIS_FILE_NOT_FOUND = 0xC023001B, - MD_NTSTATUS_WIN_STATUS_NDIS_ERROR_READING_FILE = 0xC023001C, - MD_NTSTATUS_WIN_STATUS_NDIS_ALREADY_MAPPED = 0xC023001D, - MD_NTSTATUS_WIN_STATUS_NDIS_RESOURCE_CONFLICT = 0xC023001E, - MD_NTSTATUS_WIN_STATUS_NDIS_MEDIA_DISCONNECTED = 0xC023001F, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_ADDRESS = 0xC0230022, - MD_NTSTATUS_WIN_STATUS_NDIS_PAUSED = 0xC023002A, - MD_NTSTATUS_WIN_STATUS_NDIS_INTERFACE_NOT_FOUND = 0xC023002B, - MD_NTSTATUS_WIN_STATUS_NDIS_UNSUPPORTED_REVISION = 0xC023002C, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PORT = 0xC023002D, - MD_NTSTATUS_WIN_STATUS_NDIS_INVALID_PORT_STATE = 0xC023002E, - MD_NTSTATUS_WIN_STATUS_NDIS_LOW_POWER_STATE = 0xC023002F, - MD_NTSTATUS_WIN_STATUS_NDIS_REINIT_REQUIRED = 0xC0230030, - MD_NTSTATUS_WIN_STATUS_NDIS_NOT_SUPPORTED = 0xC02300BB, - MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_POLICY = 0xC023100F, - MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_CONNECTION_REJECTED = 0xC0231012, - MD_NTSTATUS_WIN_STATUS_NDIS_OFFLOAD_PATH_REJECTED = 0xC0231013, - MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_AUTO_CONFIG_ENABLED = 0xC0232000, - MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_MEDIA_IN_USE = 0xC0232001, - MD_NTSTATUS_WIN_STATUS_NDIS_DOT11_POWER_STATE_INVALID = 0xC0232002, - MD_NTSTATUS_WIN_STATUS_NDIS_PM_WOL_PATTERN_LIST_FULL = 0xC0232003, - MD_NTSTATUS_WIN_STATUS_NDIS_PM_PROTOCOL_OFFLOAD_LIST_FULL = 0xC0232004, - MD_NTSTATUS_WIN_STATUS_TPM_ERROR_MASK = 0xC0290000, - MD_NTSTATUS_WIN_STATUS_TPM_AUTHFAIL = 0xC0290001, - MD_NTSTATUS_WIN_STATUS_TPM_BADINDEX = 0xC0290002, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_PARAMETER = 0xC0290003, - MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAILURE = 0xC0290004, - MD_NTSTATUS_WIN_STATUS_TPM_CLEAR_DISABLED = 0xC0290005, - MD_NTSTATUS_WIN_STATUS_TPM_DEACTIVATED = 0xC0290006, - MD_NTSTATUS_WIN_STATUS_TPM_DISABLED = 0xC0290007, - MD_NTSTATUS_WIN_STATUS_TPM_DISABLED_CMD = 0xC0290008, - MD_NTSTATUS_WIN_STATUS_TPM_FAIL = 0xC0290009, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_ORDINAL = 0xC029000A, - MD_NTSTATUS_WIN_STATUS_TPM_INSTALL_DISABLED = 0xC029000B, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_KEYHANDLE = 0xC029000C, - MD_NTSTATUS_WIN_STATUS_TPM_KEYNOTFOUND = 0xC029000D, - MD_NTSTATUS_WIN_STATUS_TPM_INAPPROPRIATE_ENC = 0xC029000E, - MD_NTSTATUS_WIN_STATUS_TPM_MIGRATEFAIL = 0xC029000F, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_PCR_INFO = 0xC0290010, - MD_NTSTATUS_WIN_STATUS_TPM_NOSPACE = 0xC0290011, - MD_NTSTATUS_WIN_STATUS_TPM_NOSRK = 0xC0290012, - MD_NTSTATUS_WIN_STATUS_TPM_NOTSEALED_BLOB = 0xC0290013, - MD_NTSTATUS_WIN_STATUS_TPM_OWNER_SET = 0xC0290014, - MD_NTSTATUS_WIN_STATUS_TPM_RESOURCES = 0xC0290015, - MD_NTSTATUS_WIN_STATUS_TPM_SHORTRANDOM = 0xC0290016, - MD_NTSTATUS_WIN_STATUS_TPM_SIZE = 0xC0290017, - MD_NTSTATUS_WIN_STATUS_TPM_WRONGPCRVAL = 0xC0290018, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_PARAM_SIZE = 0xC0290019, - MD_NTSTATUS_WIN_STATUS_TPM_SHA_THREAD = 0xC029001A, - MD_NTSTATUS_WIN_STATUS_TPM_SHA_ERROR = 0xC029001B, - MD_NTSTATUS_WIN_STATUS_TPM_FAILEDSELFTEST = 0xC029001C, - MD_NTSTATUS_WIN_STATUS_TPM_AUTH2FAIL = 0xC029001D, - MD_NTSTATUS_WIN_STATUS_TPM_BADTAG = 0xC029001E, - MD_NTSTATUS_WIN_STATUS_TPM_IOERROR = 0xC029001F, - MD_NTSTATUS_WIN_STATUS_TPM_ENCRYPT_ERROR = 0xC0290020, - MD_NTSTATUS_WIN_STATUS_TPM_DECRYPT_ERROR = 0xC0290021, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_AUTHHANDLE = 0xC0290022, - MD_NTSTATUS_WIN_STATUS_TPM_NO_ENDORSEMENT = 0xC0290023, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_KEYUSAGE = 0xC0290024, - MD_NTSTATUS_WIN_STATUS_TPM_WRONG_ENTITYTYPE = 0xC0290025, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_POSTINIT = 0xC0290026, - MD_NTSTATUS_WIN_STATUS_TPM_INAPPROPRIATE_SIG = 0xC0290027, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_KEY_PROPERTY = 0xC0290028, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_MIGRATION = 0xC0290029, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_SCHEME = 0xC029002A, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_DATASIZE = 0xC029002B, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_MODE = 0xC029002C, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_PRESENCE = 0xC029002D, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_VERSION = 0xC029002E, - MD_NTSTATUS_WIN_STATUS_TPM_NO_WRAP_TRANSPORT = 0xC029002F, - MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAIL_UNSUCCESSFUL = 0xC0290030, - MD_NTSTATUS_WIN_STATUS_TPM_AUDITFAIL_SUCCESSFUL = 0xC0290031, - MD_NTSTATUS_WIN_STATUS_TPM_NOTRESETABLE = 0xC0290032, - MD_NTSTATUS_WIN_STATUS_TPM_NOTLOCAL = 0xC0290033, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_TYPE = 0xC0290034, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_RESOURCE = 0xC0290035, - MD_NTSTATUS_WIN_STATUS_TPM_NOTFIPS = 0xC0290036, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_FAMILY = 0xC0290037, - MD_NTSTATUS_WIN_STATUS_TPM_NO_NV_PERMISSION = 0xC0290038, - MD_NTSTATUS_WIN_STATUS_TPM_REQUIRES_SIGN = 0xC0290039, - MD_NTSTATUS_WIN_STATUS_TPM_KEY_NOTSUPPORTED = 0xC029003A, - MD_NTSTATUS_WIN_STATUS_TPM_AUTH_CONFLICT = 0xC029003B, - MD_NTSTATUS_WIN_STATUS_TPM_AREA_LOCKED = 0xC029003C, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_LOCALITY = 0xC029003D, - MD_NTSTATUS_WIN_STATUS_TPM_READ_ONLY = 0xC029003E, - MD_NTSTATUS_WIN_STATUS_TPM_PER_NOWRITE = 0xC029003F, - MD_NTSTATUS_WIN_STATUS_TPM_FAMILYCOUNT = 0xC0290040, - MD_NTSTATUS_WIN_STATUS_TPM_WRITE_LOCKED = 0xC0290041, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_ATTRIBUTES = 0xC0290042, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_STRUCTURE = 0xC0290043, - MD_NTSTATUS_WIN_STATUS_TPM_KEY_OWNER_CONTROL = 0xC0290044, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_COUNTER = 0xC0290045, - MD_NTSTATUS_WIN_STATUS_TPM_NOT_FULLWRITE = 0xC0290046, - MD_NTSTATUS_WIN_STATUS_TPM_CONTEXT_GAP = 0xC0290047, - MD_NTSTATUS_WIN_STATUS_TPM_MAXNVWRITES = 0xC0290048, - MD_NTSTATUS_WIN_STATUS_TPM_NOOPERATOR = 0xC0290049, - MD_NTSTATUS_WIN_STATUS_TPM_RESOURCEMISSING = 0xC029004A, - MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_LOCK = 0xC029004B, - MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_FAMILY = 0xC029004C, - MD_NTSTATUS_WIN_STATUS_TPM_DELEGATE_ADMIN = 0xC029004D, - MD_NTSTATUS_WIN_STATUS_TPM_TRANSPORT_NOTEXCLUSIVE = 0xC029004E, - MD_NTSTATUS_WIN_STATUS_TPM_OWNER_CONTROL = 0xC029004F, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_RESOURCES = 0xC0290050, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_INPUT_DATA0 = 0xC0290051, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_INPUT_DATA1 = 0xC0290052, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_ISSUER_SETTINGS = 0xC0290053, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_TPM_SETTINGS = 0xC0290054, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_STAGE = 0xC0290055, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_ISSUER_VALIDITY = 0xC0290056, - MD_NTSTATUS_WIN_STATUS_TPM_DAA_WRONG_W = 0xC0290057, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_HANDLE = 0xC0290058, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_DELEGATE = 0xC0290059, - MD_NTSTATUS_WIN_STATUS_TPM_BADCONTEXT = 0xC029005A, - MD_NTSTATUS_WIN_STATUS_TPM_TOOMANYCONTEXTS = 0xC029005B, - MD_NTSTATUS_WIN_STATUS_TPM_MA_TICKET_SIGNATURE = 0xC029005C, - MD_NTSTATUS_WIN_STATUS_TPM_MA_DESTINATION = 0xC029005D, - MD_NTSTATUS_WIN_STATUS_TPM_MA_SOURCE = 0xC029005E, - MD_NTSTATUS_WIN_STATUS_TPM_MA_AUTHORITY = 0xC029005F, - MD_NTSTATUS_WIN_STATUS_TPM_PERMANENTEK = 0xC0290061, - MD_NTSTATUS_WIN_STATUS_TPM_BAD_SIGNATURE = 0xC0290062, - MD_NTSTATUS_WIN_STATUS_TPM_NOCONTEXTSPACE = 0xC0290063, - MD_NTSTATUS_WIN_STATUS_TPM_COMMAND_BLOCKED = 0xC0290400, - MD_NTSTATUS_WIN_STATUS_TPM_INVALID_HANDLE = 0xC0290401, - MD_NTSTATUS_WIN_STATUS_TPM_DUPLICATE_VHANDLE = 0xC0290402, - MD_NTSTATUS_WIN_STATUS_TPM_EMBEDDED_COMMAND_BLOCKED = 0xC0290403, - MD_NTSTATUS_WIN_STATUS_TPM_EMBEDDED_COMMAND_UNSUPPORTED = 0xC0290404, - MD_NTSTATUS_WIN_STATUS_TPM_RETRY = 0xC0290800, - MD_NTSTATUS_WIN_STATUS_TPM_NEEDS_SELFTEST = 0xC0290801, - MD_NTSTATUS_WIN_STATUS_TPM_DOING_SELFTEST = 0xC0290802, - MD_NTSTATUS_WIN_STATUS_TPM_DEFEND_LOCK_RUNNING = 0xC0290803, - MD_NTSTATUS_WIN_STATUS_TPM_COMMAND_CANCELED = 0xC0291001, - MD_NTSTATUS_WIN_STATUS_TPM_TOO_MANY_CONTEXTS = 0xC0291002, - MD_NTSTATUS_WIN_STATUS_TPM_NOT_FOUND = 0xC0291003, - MD_NTSTATUS_WIN_STATUS_TPM_ACCESS_DENIED = 0xC0291004, - MD_NTSTATUS_WIN_STATUS_TPM_INSUFFICIENT_BUFFER = 0xC0291005, - MD_NTSTATUS_WIN_STATUS_TPM_PPI_FUNCTION_UNSUPPORTED = 0xC0291006, - MD_NTSTATUS_WIN_STATUS_PCP_ERROR_MASK = 0xC0292000, - MD_NTSTATUS_WIN_STATUS_PCP_DEVICE_NOT_READY = 0xC0292001, - MD_NTSTATUS_WIN_STATUS_PCP_INVALID_HANDLE = 0xC0292002, - MD_NTSTATUS_WIN_STATUS_PCP_INVALID_PARAMETER = 0xC0292003, - MD_NTSTATUS_WIN_STATUS_PCP_FLAG_NOT_SUPPORTED = 0xC0292004, - MD_NTSTATUS_WIN_STATUS_PCP_NOT_SUPPORTED = 0xC0292005, - MD_NTSTATUS_WIN_STATUS_PCP_BUFFER_TOO_SMALL = 0xC0292006, - MD_NTSTATUS_WIN_STATUS_PCP_INTERNAL_ERROR = 0xC0292007, - MD_NTSTATUS_WIN_STATUS_PCP_AUTHENTICATION_FAILED = 0xC0292008, - MD_NTSTATUS_WIN_STATUS_PCP_AUTHENTICATION_IGNORED = 0xC0292009, - MD_NTSTATUS_WIN_STATUS_PCP_POLICY_NOT_FOUND = 0xC029200A, - MD_NTSTATUS_WIN_STATUS_PCP_PROFILE_NOT_FOUND = 0xC029200B, - MD_NTSTATUS_WIN_STATUS_PCP_VALIDATION_FAILED = 0xC029200C, - MD_NTSTATUS_WIN_STATUS_PCP_DEVICE_NOT_FOUND = 0xC029200D, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_HYPERCALL_CODE = 0xC0350002, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_HYPERCALL_INPUT = 0xC0350003, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_ALIGNMENT = 0xC0350004, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARAMETER = 0xC0350005, - MD_NTSTATUS_WIN_STATUS_HV_ACCESS_DENIED = 0xC0350006, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARTITION_STATE = 0xC0350007, - MD_NTSTATUS_WIN_STATUS_HV_OPERATION_DENIED = 0xC0350008, - MD_NTSTATUS_WIN_STATUS_HV_UNKNOWN_PROPERTY = 0xC0350009, - MD_NTSTATUS_WIN_STATUS_HV_PROPERTY_VALUE_OUT_OF_RANGE = 0xC035000A, - MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_MEMORY = 0xC035000B, - MD_NTSTATUS_WIN_STATUS_HV_PARTITION_TOO_DEEP = 0xC035000C, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_PARTITION_ID = 0xC035000D, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_VP_INDEX = 0xC035000E, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_PORT_ID = 0xC0350011, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_CONNECTION_ID = 0xC0350012, - MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_BUFFERS = 0xC0350013, - MD_NTSTATUS_WIN_STATUS_HV_NOT_ACKNOWLEDGED = 0xC0350014, - MD_NTSTATUS_WIN_STATUS_HV_ACKNOWLEDGED = 0xC0350016, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_SAVE_RESTORE_STATE = 0xC0350017, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_SYNIC_STATE = 0xC0350018, - MD_NTSTATUS_WIN_STATUS_HV_OBJECT_IN_USE = 0xC0350019, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_PROXIMITY_DOMAIN_INFO = 0xC035001A, - MD_NTSTATUS_WIN_STATUS_HV_NO_DATA = 0xC035001B, - MD_NTSTATUS_WIN_STATUS_HV_INACTIVE = 0xC035001C, - MD_NTSTATUS_WIN_STATUS_HV_NO_RESOURCES = 0xC035001D, - MD_NTSTATUS_WIN_STATUS_HV_FEATURE_UNAVAILABLE = 0xC035001E, - MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_BUFFER = 0xC0350033, - MD_NTSTATUS_WIN_STATUS_HV_INSUFFICIENT_DEVICE_DOMAINS = 0xC0350038, - MD_NTSTATUS_WIN_STATUS_HV_INVALID_LP_INDEX = 0xC0350041, - MD_NTSTATUS_WIN_STATUS_HV_NOT_PRESENT = 0xC0351000, - MD_NTSTATUS_WIN_STATUS_IPSEC_BAD_SPI = 0xC0360001, - MD_NTSTATUS_WIN_STATUS_IPSEC_SA_LIFETIME_EXPIRED = 0xC0360002, - MD_NTSTATUS_WIN_STATUS_IPSEC_WRONG_SA = 0xC0360003, - MD_NTSTATUS_WIN_STATUS_IPSEC_REPLAY_CHECK_FAILED = 0xC0360004, - MD_NTSTATUS_WIN_STATUS_IPSEC_INVALID_PACKET = 0xC0360005, - MD_NTSTATUS_WIN_STATUS_IPSEC_INTEGRITY_CHECK_FAILED = 0xC0360006, - MD_NTSTATUS_WIN_STATUS_IPSEC_CLEAR_TEXT_DROP = 0xC0360007, - MD_NTSTATUS_WIN_STATUS_IPSEC_AUTH_FIREWALL_DROP = 0xC0360008, - MD_NTSTATUS_WIN_STATUS_IPSEC_THROTTLE_DROP = 0xC0360009, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_BLOCK = 0xC0368000, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_RECEIVED_MULTICAST = 0xC0368001, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_INVALID_PACKET = 0xC0368002, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_STATE_LOOKUP_FAILED = 0xC0368003, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_MAX_ENTRIES = 0xC0368004, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_KEYMOD_NOT_ALLOWED = 0xC0368005, - MD_NTSTATUS_WIN_STATUS_IPSEC_DOSP_MAX_PER_IP_RATELIMIT_QUEUES = 0xC0368006, - MD_NTSTATUS_WIN_STATUS_VID_DUPLICATE_HANDLER = 0xC0370001, - MD_NTSTATUS_WIN_STATUS_VID_TOO_MANY_HANDLERS = 0xC0370002, - MD_NTSTATUS_WIN_STATUS_VID_QUEUE_FULL = 0xC0370003, - MD_NTSTATUS_WIN_STATUS_VID_HANDLER_NOT_PRESENT = 0xC0370004, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_OBJECT_NAME = 0xC0370005, - MD_NTSTATUS_WIN_STATUS_VID_PARTITION_NAME_TOO_LONG = 0xC0370006, - MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_NAME_TOO_LONG = 0xC0370007, - MD_NTSTATUS_WIN_STATUS_VID_PARTITION_ALREADY_EXISTS = 0xC0370008, - MD_NTSTATUS_WIN_STATUS_VID_PARTITION_DOES_NOT_EXIST = 0xC0370009, - MD_NTSTATUS_WIN_STATUS_VID_PARTITION_NAME_NOT_FOUND = 0xC037000A, - MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_ALREADY_EXISTS = 0xC037000B, - MD_NTSTATUS_WIN_STATUS_VID_EXCEEDED_MBP_ENTRY_MAP_LIMIT = 0xC037000C, - MD_NTSTATUS_WIN_STATUS_VID_MB_STILL_REFERENCED = 0xC037000D, - MD_NTSTATUS_WIN_STATUS_VID_CHILD_GPA_PAGE_SET_CORRUPTED = 0xC037000E, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_NUMA_SETTINGS = 0xC037000F, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_NUMA_NODE_INDEX = 0xC0370010, - MD_NTSTATUS_WIN_STATUS_VID_NOTIFICATION_QUEUE_ALREADY_ASSOCIATED = 0xC0370011, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_MEMORY_BLOCK_HANDLE = 0xC0370012, - MD_NTSTATUS_WIN_STATUS_VID_PAGE_RANGE_OVERFLOW = 0xC0370013, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_MESSAGE_QUEUE_HANDLE = 0xC0370014, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_GPA_RANGE_HANDLE = 0xC0370015, - MD_NTSTATUS_WIN_STATUS_VID_NO_MEMORY_BLOCK_NOTIFICATION_QUEUE = 0xC0370016, - MD_NTSTATUS_WIN_STATUS_VID_MEMORY_BLOCK_LOCK_COUNT_EXCEEDED = 0xC0370017, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_PPM_HANDLE = 0xC0370018, - MD_NTSTATUS_WIN_STATUS_VID_MBPS_ARE_LOCKED = 0xC0370019, - MD_NTSTATUS_WIN_STATUS_VID_MESSAGE_QUEUE_CLOSED = 0xC037001A, - MD_NTSTATUS_WIN_STATUS_VID_VIRTUAL_PROCESSOR_LIMIT_EXCEEDED = 0xC037001B, - MD_NTSTATUS_WIN_STATUS_VID_STOP_PENDING = 0xC037001C, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_PROCESSOR_STATE = 0xC037001D, - MD_NTSTATUS_WIN_STATUS_VID_EXCEEDED_KM_CONTEXT_COUNT_LIMIT = 0xC037001E, - MD_NTSTATUS_WIN_STATUS_VID_KM_INTERFACE_ALREADY_INITIALIZED = 0xC037001F, - MD_NTSTATUS_WIN_STATUS_VID_MB_PROPERTY_ALREADY_SET_RESET = 0xC0370020, - MD_NTSTATUS_WIN_STATUS_VID_MMIO_RANGE_DESTROYED = 0xC0370021, - MD_NTSTATUS_WIN_STATUS_VID_INVALID_CHILD_GPA_PAGE_SET = 0xC0370022, - MD_NTSTATUS_WIN_STATUS_VID_RESERVE_PAGE_SET_IS_BEING_USED = 0xC0370023, - MD_NTSTATUS_WIN_STATUS_VID_RESERVE_PAGE_SET_TOO_SMALL = 0xC0370024, - MD_NTSTATUS_WIN_STATUS_VID_MBP_ALREADY_LOCKED_USING_RESERVED_PAGE = 0xC0370025, - MD_NTSTATUS_WIN_STATUS_VID_MBP_COUNT_EXCEEDED_LIMIT = 0xC0370026, - MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_CORRUPT = 0xC0370027, - MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_UNRECOGNIZED_ITEM = 0xC0370028, - MD_NTSTATUS_WIN_STATUS_VID_SAVED_STATE_INCOMPATIBLE = 0xC0370029, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DATABASE_FULL = 0xC0380001, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONFIGURATION_CORRUPTED = 0xC0380002, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONFIGURATION_NOT_IN_SYNC = 0xC0380003, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_UPDATE_FAILED = 0xC0380004, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_CONTAINS_NON_SIMPLE_VOLUME = 0xC0380005, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_DUPLICATE = 0xC0380006, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_DYNAMIC = 0xC0380007, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_ID_INVALID = 0xC0380008, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_INVALID = 0xC0380009, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAST_VOTER = 0xC038000A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_INVALID = 0xC038000B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_NON_BASIC_BETWEEN_BASIC_PARTITIONS = 0xC038000C, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_NOT_CYLINDER_ALIGNED = 0xC038000D, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_PARTITIONS_TOO_SMALL = 0xC038000E, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_PRIMARY_BETWEEN_LOGICAL_PARTITIONS = 0xC038000F, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_LAYOUT_TOO_MANY_PARTITIONS = 0xC0380010, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_MISSING = 0xC0380011, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_NOT_EMPTY = 0xC0380012, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_NOT_ENOUGH_SPACE = 0xC0380013, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_REVECTORING_FAILED = 0xC0380014, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_SECTOR_SIZE_INVALID = 0xC0380015, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_SET_NOT_CONTAINED = 0xC0380016, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_MEMBERS = 0xC0380017, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DISK_USED_BY_MULTIPLE_PLEXES = 0xC0380018, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DYNAMIC_DISK_NOT_SUPPORTED = 0xC0380019, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_ALREADY_USED = 0xC038001A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_CONTIGUOUS = 0xC038001B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_IN_PUBLIC_REGION = 0xC038001C, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_NOT_SECTOR_ALIGNED = 0xC038001D, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_OVERLAPS_EBR_PARTITION = 0xC038001E, - MD_NTSTATUS_WIN_STATUS_VOLMGR_EXTENT_VOLUME_LENGTHS_DO_NOT_MATCH = 0xC038001F, - MD_NTSTATUS_WIN_STATUS_VOLMGR_FAULT_TOLERANT_NOT_SUPPORTED = 0xC0380020, - MD_NTSTATUS_WIN_STATUS_VOLMGR_INTERLEAVE_LENGTH_INVALID = 0xC0380021, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MAXIMUM_REGISTERED_USERS = 0xC0380022, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_IN_SYNC = 0xC0380023, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_INDEX_DUPLICATE = 0xC0380024, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_INDEX_INVALID = 0xC0380025, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_MISSING = 0xC0380026, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_NOT_DETACHED = 0xC0380027, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MEMBER_REGENERATING = 0xC0380028, - MD_NTSTATUS_WIN_STATUS_VOLMGR_ALL_DISKS_FAILED = 0xC0380029, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_REGISTERED_USERS = 0xC038002A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_SUCH_USER = 0xC038002B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NOTIFICATION_RESET = 0xC038002C, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_MEMBERS_INVALID = 0xC038002D, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_PLEXES_INVALID = 0xC038002E, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_DUPLICATE = 0xC038002F, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_ID_INVALID = 0xC0380030, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_INVALID = 0xC0380031, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_NAME_INVALID = 0xC0380032, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_OFFLINE = 0xC0380033, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_HAS_QUORUM = 0xC0380034, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_WITHOUT_QUORUM = 0xC0380035, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PARTITION_STYLE_INVALID = 0xC0380036, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PARTITION_UPDATE_FAILED = 0xC0380037, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_IN_SYNC = 0xC0380038, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_INDEX_DUPLICATE = 0xC0380039, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_INDEX_INVALID = 0xC038003A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_LAST_ACTIVE = 0xC038003B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_MISSING = 0xC038003C, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_REGENERATING = 0xC038003D, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_TYPE_INVALID = 0xC038003E, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_RAID5 = 0xC038003F, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_SIMPLE = 0xC0380040, - MD_NTSTATUS_WIN_STATUS_VOLMGR_STRUCTURE_SIZE_INVALID = 0xC0380041, - MD_NTSTATUS_WIN_STATUS_VOLMGR_TOO_MANY_NOTIFICATION_REQUESTS = 0xC0380042, - MD_NTSTATUS_WIN_STATUS_VOLMGR_TRANSACTION_IN_PROGRESS = 0xC0380043, - MD_NTSTATUS_WIN_STATUS_VOLMGR_UNEXPECTED_DISK_LAYOUT_CHANGE = 0xC0380044, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_CONTAINS_MISSING_DISK = 0xC0380045, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_ID_INVALID = 0xC0380046, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_LENGTH_INVALID = 0xC0380047, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_LENGTH_NOT_SECTOR_SIZE_MULTIPLE = 0xC0380048, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_NOT_MIRRORED = 0xC0380049, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_NOT_RETAINED = 0xC038004A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_OFFLINE = 0xC038004B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_RETAINED = 0xC038004C, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_EXTENTS_INVALID = 0xC038004D, - MD_NTSTATUS_WIN_STATUS_VOLMGR_DIFFERENT_SECTOR_SIZE = 0xC038004E, - MD_NTSTATUS_WIN_STATUS_VOLMGR_BAD_BOOT_DISK = 0xC038004F, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_OFFLINE = 0xC0380050, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_CONFIG_ONLINE = 0xC0380051, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NOT_PRIMARY_PACK = 0xC0380052, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PACK_LOG_UPDATE_FAILED = 0xC0380053, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_IN_PLEX_INVALID = 0xC0380054, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_IN_MEMBER_INVALID = 0xC0380055, - MD_NTSTATUS_WIN_STATUS_VOLMGR_VOLUME_MIRRORED = 0xC0380056, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PLEX_NOT_SIMPLE_SPANNED = 0xC0380057, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NO_VALID_LOG_COPIES = 0xC0380058, - MD_NTSTATUS_WIN_STATUS_VOLMGR_PRIMARY_PACK_PRESENT = 0xC0380059, - MD_NTSTATUS_WIN_STATUS_VOLMGR_NUMBER_OF_DISKS_INVALID = 0xC038005A, - MD_NTSTATUS_WIN_STATUS_VOLMGR_MIRROR_NOT_SUPPORTED = 0xC038005B, - MD_NTSTATUS_WIN_STATUS_VOLMGR_RAID5_NOT_SUPPORTED = 0xC038005C, - MD_NTSTATUS_WIN_STATUS_BCD_TOO_MANY_ELEMENTS = 0xC0390002, - MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_MISSING = 0xC03A0001, - MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_CHECKSUM_MISMATCH = 0xC03A0002, - MD_NTSTATUS_WIN_STATUS_VHD_DRIVE_FOOTER_CORRUPT = 0xC03A0003, - MD_NTSTATUS_WIN_STATUS_VHD_FORMAT_UNKNOWN = 0xC03A0004, - MD_NTSTATUS_WIN_STATUS_VHD_FORMAT_UNSUPPORTED_VERSION = 0xC03A0005, - MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_CHECKSUM_MISMATCH = 0xC03A0006, - MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_UNSUPPORTED_VERSION = 0xC03A0007, - MD_NTSTATUS_WIN_STATUS_VHD_SPARSE_HEADER_CORRUPT = 0xC03A0008, - MD_NTSTATUS_WIN_STATUS_VHD_BLOCK_ALLOCATION_FAILURE = 0xC03A0009, - MD_NTSTATUS_WIN_STATUS_VHD_BLOCK_ALLOCATION_TABLE_CORRUPT = 0xC03A000A, - MD_NTSTATUS_WIN_STATUS_VHD_INVALID_BLOCK_SIZE = 0xC03A000B, - MD_NTSTATUS_WIN_STATUS_VHD_BITMAP_MISMATCH = 0xC03A000C, - MD_NTSTATUS_WIN_STATUS_VHD_PARENT_VHD_NOT_FOUND = 0xC03A000D, - MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_ID_MISMATCH = 0xC03A000E, - MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_TIMESTAMP_MISMATCH = 0xC03A000F, - MD_NTSTATUS_WIN_STATUS_VHD_METADATA_READ_FAILURE = 0xC03A0010, - MD_NTSTATUS_WIN_STATUS_VHD_METADATA_WRITE_FAILURE = 0xC03A0011, - MD_NTSTATUS_WIN_STATUS_VHD_INVALID_SIZE = 0xC03A0012, - MD_NTSTATUS_WIN_STATUS_VHD_INVALID_FILE_SIZE = 0xC03A0013, - MD_NTSTATUS_WIN_STATUS_VIRTDISK_PROVIDER_NOT_FOUND = 0xC03A0014, - MD_NTSTATUS_WIN_STATUS_VIRTDISK_NOT_VIRTUAL_DISK = 0xC03A0015, - MD_NTSTATUS_WIN_STATUS_VHD_PARENT_VHD_ACCESS_DENIED = 0xC03A0016, - MD_NTSTATUS_WIN_STATUS_VHD_CHILD_PARENT_SIZE_MISMATCH = 0xC03A0017, - MD_NTSTATUS_WIN_STATUS_VHD_DIFFERENCING_CHAIN_CYCLE_DETECTED = 0xC03A0018, - MD_NTSTATUS_WIN_STATUS_VHD_DIFFERENCING_CHAIN_ERROR_IN_PARENT = 0xC03A0019, - MD_NTSTATUS_WIN_STATUS_VIRTUAL_DISK_LIMITATION = 0xC03A001A, - MD_NTSTATUS_WIN_STATUS_VHD_INVALID_TYPE = 0xC03A001B, - MD_NTSTATUS_WIN_STATUS_VHD_INVALID_STATE = 0xC03A001C, - MD_NTSTATUS_WIN_STATUS_VIRTDISK_UNSUPPORTED_DISK_SECTOR_SIZE = 0xC03A001D, - MD_NTSTATUS_WIN_STATUS_VIRTDISK_DISK_ALREADY_OWNED = 0xC03A001E, - MD_NTSTATUS_WIN_STATUS_VIRTDISK_DISK_ONLINE_AND_WRITABLE = 0xC03A001F, - MD_NTSTATUS_WIN_STATUS_CTLOG_TRACKING_NOT_INITIALIZED = 0xC03A0020, - MD_NTSTATUS_WIN_STATUS_CTLOG_LOGFILE_SIZE_EXCEEDED_MAXSIZE = 0xC03A0021, - MD_NTSTATUS_WIN_STATUS_CTLOG_VHD_CHANGED_OFFLINE = 0xC03A0022, - MD_NTSTATUS_WIN_STATUS_CTLOG_INVALID_TRACKING_STATE = 0xC03A0023, - MD_NTSTATUS_WIN_STATUS_CTLOG_INCONSISTENT_TRACKING_FILE = 0xC03A0024, - MD_NTSTATUS_WIN_STATUS_VHD_METADATA_FULL = 0xC03A0028, - MD_NTSTATUS_WIN_STATUS_RKF_KEY_NOT_FOUND = 0xC0400001, - MD_NTSTATUS_WIN_STATUS_RKF_DUPLICATE_KEY = 0xC0400002, - MD_NTSTATUS_WIN_STATUS_RKF_BLOB_FULL = 0xC0400003, - MD_NTSTATUS_WIN_STATUS_RKF_STORE_FULL = 0xC0400004, - MD_NTSTATUS_WIN_STATUS_RKF_FILE_BLOCKED = 0xC0400005, - MD_NTSTATUS_WIN_STATUS_RKF_ACTIVE_KEY = 0xC0400006, - MD_NTSTATUS_WIN_STATUS_RDBSS_RESTART_OPERATION = 0xC0410001, - MD_NTSTATUS_WIN_STATUS_RDBSS_CONTINUE_OPERATION = 0xC0410002, - MD_NTSTATUS_WIN_STATUS_RDBSS_POST_OPERATION = 0xC0410003, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_HANDLE = 0xC0420001, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_READ_NOT_PERMITTED = 0xC0420002, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_WRITE_NOT_PERMITTED = 0xC0420003, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_PDU = 0xC0420004, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_AUTHENTICATION = 0xC0420005, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_REQUEST_NOT_SUPPORTED = 0xC0420006, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_OFFSET = 0xC0420007, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_AUTHORIZATION = 0xC0420008, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_PREPARE_QUEUE_FULL = 0xC0420009, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_ATTRIBUTE_NOT_FOUND = 0xC042000A, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_ATTRIBUTE_NOT_LONG = 0xC042000B, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION_KEY_SIZE = 0xC042000C, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INVALID_ATTRIBUTE_VALUE_LENGTH = 0xC042000D, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNLIKELY = 0xC042000E, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_ENCRYPTION = 0xC042000F, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNSUPPORTED_GROUP_TYPE = 0xC0420010, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_INSUFFICIENT_RESOURCES = 0xC0420011, - MD_NTSTATUS_WIN_STATUS_BTH_ATT_UNKNOWN_ERROR = 0xC0421000, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_ROLLBACK_DETECTED = 0xC0430001, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_VIOLATION = 0xC0430002, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_INVALID_POLICY = 0xC0430003, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_PUBLISHER_NOT_FOUND = 0xC0430004, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_POLICY_NOT_SIGNED = 0xC0430005, - MD_NTSTATUS_WIN_STATUS_SECUREBOOT_FILE_REPLACED = 0xC0430007, - MD_NTSTATUS_WIN_STATUS_AUDIO_ENGINE_NODE_NOT_FOUND = 0xC0440001, - MD_NTSTATUS_WIN_STATUS_HDAUDIO_EMPTY_CONNECTION_LIST = 0xC0440002, - MD_NTSTATUS_WIN_STATUS_HDAUDIO_CONNECTION_LIST_NOT_SUPPORTED = 0xC0440003, - MD_NTSTATUS_WIN_STATUS_HDAUDIO_NO_LOGICAL_DEVICES_CREATED = 0xC0440004, - MD_NTSTATUS_WIN_STATUS_HDAUDIO_NULL_LINKED_LIST_ENTRY = 0xC0440005, - MD_NTSTATUS_WIN_STATUS_VOLSNAP_BOOTFILE_NOT_VALID = 0xC0500003, - MD_NTSTATUS_WIN_STATUS_IO_PREEMPTED = 0xC0510001, - MD_NTSTATUS_WIN_STATUS_SVHDX_ERROR_STORED = 0xC05C0000, - MD_NTSTATUS_WIN_STATUS_SVHDX_ERROR_NOT_AVAILABLE = 0xC05CFF00, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_AVAILABLE = 0xC05CFF01, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_CAPACITY_DATA_CHANGED = 0xC05CFF02, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_PREEMPTED = 0xC05CFF03, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_RESERVATIONS_RELEASED = 0xC05CFF04, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_REGISTRATIONS_PREEMPTED = 0xC05CFF05, - MD_NTSTATUS_WIN_STATUS_SVHDX_UNIT_ATTENTION_OPERATING_DEFINITION_CHANGED = 0xC05CFF06, - MD_NTSTATUS_WIN_STATUS_SVHDX_RESERVATION_CONFLICT = 0xC05CFF07, - MD_NTSTATUS_WIN_STATUS_SVHDX_WRONG_FILE_TYPE = 0xC05CFF08, - MD_NTSTATUS_WIN_STATUS_SVHDX_VERSION_MISMATCH = 0xC05CFF09, - MD_NTSTATUS_WIN_STATUS_VHD_SHARED = 0xC05CFF0A, - MD_NTSTATUS_WIN_STATUS_SPACES_RESILIENCY_TYPE_INVALID = 0xC0E70003, - MD_NTSTATUS_WIN_STATUS_SPACES_DRIVE_SECTOR_SIZE_INVALID = 0xC0E70004, - MD_NTSTATUS_WIN_STATUS_SPACES_INTERLEAVE_LENGTH_INVALID = 0xC0E70009, - MD_NTSTATUS_WIN_STATUS_SPACES_NUMBER_OF_COLUMNS_INVALID = 0xC0E7000A, - MD_NTSTATUS_WIN_STATUS_SPACES_NOT_ENOUGH_DRIVES = 0xC0E7000B -} MDNTStatusCodeWin; - -// These constants are defined in the MSDN documentation of -// the EXCEPTION_RECORD structure. -typedef enum { - MD_ACCESS_VIOLATION_WIN_READ = 0, - MD_ACCESS_VIOLATION_WIN_WRITE = 1, - MD_ACCESS_VIOLATION_WIN_EXEC = 8 -} MDAccessViolationTypeWin; - -// These constants are defined in the MSDN documentation of -// the EXCEPTION_RECORD structure. -typedef enum { - MD_IN_PAGE_ERROR_WIN_READ = 0, - MD_IN_PAGE_ERROR_WIN_WRITE = 1, - MD_IN_PAGE_ERROR_WIN_EXEC = 8 -} MDInPageErrorTypeWin; - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_EXCEPTION_WIN32_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h deleted file mode 100644 index 17a5abba33f4a1..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_format.h +++ /dev/null @@ -1,972 +0,0 @@ -/* Copyright (c) 2006, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -/* minidump_format.h: A cross-platform reimplementation of minidump-related - * portions of DbgHelp.h from the Windows Platform SDK. - * - * (This is C99 source, please don't corrupt it with C++.) - * - * Structures that are defined by Microsoft to contain a zero-length array - * are instead defined here to contain an array with one element, as - * zero-length arrays are forbidden by standard C and C++. In these cases, - * *_minsize constants are provided to be used in place of sizeof. For a - * cleaner interface to these sizes when using C++, see minidump_size.h. - * - * These structures are also sufficient to populate minidump files. - * - * These definitions may be extended to support handling minidump files - * for other CPUs and other operating systems. - * - * Because precise data type sizes are crucial for this implementation to - * function properly and portably in terms of interoperability with minidumps - * produced by DbgHelp on Windows, a set of primitive types with known sizes - * are used as the basis of each structure defined by this file. DbgHelp - * on Windows is assumed to be the reference implementation; this file - * seeks to provide a cross-platform compatible implementation. To avoid - * collisions with the types and values defined and used by DbgHelp in the - * event that this implementation is used on Windows, each type and value - * defined here is given a new name, beginning with "MD". Names of the - * equivalent types and values in the Windows Platform SDK are given in - * comments. - * - * Author: Mark Mentovai */ - - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ - -#include - -#include "google_breakpad/common/breakpad_types.h" - - -#if defined(_MSC_VER) -/* Disable "zero-sized array in struct/union" warnings when compiling in - * MSVC. DbgHelp.h does this too. */ -#pragma warning(push) -#pragma warning(disable:4200) -#endif /* _MSC_VER */ - - -/* - * guiddef.h - */ - -typedef struct { - uint32_t data1; - uint16_t data2; - uint16_t data3; - uint8_t data4[8]; -} MDGUID; /* GUID */ - - -/* - * WinNT.h - */ - -/* Non-x86 CPU identifiers found in the high 24 bits of - * (MDRawContext*).context_flags. These aren't used by Breakpad, but are - * defined here for reference, to avoid assigning values that conflict - * (although some values already conflict). */ -#define MD_CONTEXT_IA64 0x00080000 /* CONTEXT_IA64 */ -/* Additional values from winnt.h in the Windows CE 5.0 SDK: */ -#define MD_CONTEXT_SHX 0x000000c0 /* CONTEXT_SH4 (Super-H, includes SH3) */ -#define MD_CONTEXT_ALPHA 0x00020000 /* CONTEXT_ALPHA */ - -/* As of Windows 7 SP1, the number of flag bits has increased to - * include 0x40 (CONTEXT_XSTATE): - * http://msdn.microsoft.com/en-us/library/hh134238%28v=vs.85%29.aspx */ -#define MD_CONTEXT_CPU_MASK 0xffffff00 - - -/* This is a base type for MDRawContextX86 and MDRawContextPPC. This - * structure should never be allocated directly. The actual structure type - * can be determined by examining the context_flags field. */ -typedef struct { - uint32_t context_flags; -} MDRawContextBase; - -#include "minidump_cpu_amd64.h" -#include "minidump_cpu_arm.h" -#include "minidump_cpu_arm64.h" -#include "minidump_cpu_mips.h" -#include "minidump_cpu_ppc.h" -#include "minidump_cpu_ppc64.h" -#include "minidump_cpu_sparc.h" -#include "minidump_cpu_x86.h" - -/* - * WinVer.h - */ - - -typedef struct { - uint32_t signature; - uint32_t struct_version; - uint32_t file_version_hi; - uint32_t file_version_lo; - uint32_t product_version_hi; - uint32_t product_version_lo; - uint32_t file_flags_mask; /* Identifies valid bits in fileFlags */ - uint32_t file_flags; - uint32_t file_os; - uint32_t file_type; - uint32_t file_subtype; - uint32_t file_date_hi; - uint32_t file_date_lo; -} MDVSFixedFileInfo; /* VS_FIXEDFILEINFO */ - -/* For (MDVSFixedFileInfo).signature */ -#define MD_VSFIXEDFILEINFO_SIGNATURE 0xfeef04bd - /* VS_FFI_SIGNATURE */ - -/* For (MDVSFixedFileInfo).version */ -#define MD_VSFIXEDFILEINFO_VERSION 0x00010000 - /* VS_FFI_STRUCVERSION */ - -/* For (MDVSFixedFileInfo).file_flags_mask and - * (MDVSFixedFileInfo).file_flags */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_DEBUG 0x00000001 - /* VS_FF_DEBUG */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRERELEASE 0x00000002 - /* VS_FF_PRERELEASE */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PATCHED 0x00000004 - /* VS_FF_PATCHED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_PRIVATEBUILD 0x00000008 - /* VS_FF_PRIVATEBUILD */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_INFOINFERRED 0x00000010 - /* VS_FF_INFOINFERRED */ -#define MD_VSFIXEDFILEINFO_FILE_FLAGS_SPECIALBUILD 0x00000020 - /* VS_FF_SPECIALBUILD */ - -/* For (MDVSFixedFileInfo).file_os: high 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS_UNKNOWN 0 /* VOS_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_OS_DOS (1 << 16) /* VOS_DOS */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS216 (2 << 16) /* VOS_OS216 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_OS232 (3 << 16) /* VOS_OS232 */ -#define MD_VSFIXEDFILEINFO_FILE_OS_NT (4 << 16) /* VOS_NT */ -#define MD_VSFIXEDFILEINFO_FILE_OS_WINCE (5 << 16) /* VOS_WINCE */ -/* Low 16 bits */ -#define MD_VSFIXEDFILEINFO_FILE_OS__BASE 0 /* VOS__BASE */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS16 1 /* VOS__WINDOWS16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM16 2 /* VOS__PM16 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__PM32 3 /* VOS__PM32 */ -#define MD_VSFIXEDFILEINFO_FILE_OS__WINDOWS32 4 /* VOS__WINDOWS32 */ - -/* For (MDVSFixedFileInfo).file_type */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_UNKNOWN 0 /* VFT_UNKNOWN */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_APP 1 /* VFT_APP */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DLL 2 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_DRV 3 /* VFT_DLL */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_FONT 4 /* VFT_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_VXD 5 /* VFT_VXD */ -#define MD_VSFIXEDFILEINFO_FILE_TYPE_STATIC_LIB 7 /* VFT_STATIC_LIB */ - -/* For (MDVSFixedFileInfo).file_subtype */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_UNKNOWN 0 - /* VFT2_UNKNOWN */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_DRV */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_PRINTER 1 - /* VFT2_DRV_PRINTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_KEYBOARD 2 - /* VFT2_DRV_KEYBOARD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_LANGUAGE 3 - /* VFT2_DRV_LANGUAGE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_DISPLAY 4 - /* VFT2_DRV_DISPLAY */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_MOUSE 5 - /* VFT2_DRV_MOUSE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_NETWORK 6 - /* VFT2_DRV_NETWORK */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SYSTEM 7 - /* VFT2_DRV_SYSTEM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INSTALLABLE 8 - /* VFT2_DRV_INSTALLABLE */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_SOUND 9 - /* VFT2_DRV_SOUND */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_COMM 10 - /* VFT2_DRV_COMM */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_INPUTMETHOD 11 - /* VFT2_DRV_INPUTMETHOD */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_DRV_VERSIONED_PRINTER 12 - /* VFT2_DRV_VERSIONED_PRINTER */ -/* with file_type = MD_VSFIXEDFILEINFO_FILETYPE_FONT */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_RASTER 1 - /* VFT2_FONT_RASTER */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_VECTOR 2 - /* VFT2_FONT_VECTOR */ -#define MD_VSFIXEDFILEINFO_FILE_SUBTYPE_FONT_TRUETYPE 3 - /* VFT2_FONT_TRUETYPE */ - - -/* - * DbgHelp.h - */ - - -/* An MDRVA is an offset into the minidump file. The beginning of the - * MDRawHeader is at offset 0. */ -typedef uint32_t MDRVA; /* RVA */ - -typedef struct { - uint32_t data_size; - MDRVA rva; -} MDLocationDescriptor; /* MINIDUMP_LOCATION_DESCRIPTOR */ - - -typedef struct { - /* The base address of the memory range on the host that produced the - * minidump. */ - uint64_t start_of_memory_range; - - MDLocationDescriptor memory; -} MDMemoryDescriptor; /* MINIDUMP_MEMORY_DESCRIPTOR */ - - -typedef struct { - uint32_t signature; - uint32_t version; - uint32_t stream_count; - MDRVA stream_directory_rva; /* A |stream_count|-sized array of - * MDRawDirectory structures. */ - uint32_t checksum; /* Can be 0. In fact, that's all that's - * been found in minidump files. */ - uint32_t time_date_stamp; /* time_t */ - uint64_t flags; -} MDRawHeader; /* MINIDUMP_HEADER */ - -/* For (MDRawHeader).signature and (MDRawHeader).version. Note that only the - * low 16 bits of (MDRawHeader).version are MD_HEADER_VERSION. Per the - * documentation, the high 16 bits are implementation-specific. */ -#define MD_HEADER_SIGNATURE 0x504d444d /* 'PMDM' */ - /* MINIDUMP_SIGNATURE */ -#define MD_HEADER_VERSION 0x0000a793 /* 42899 */ - /* MINIDUMP_VERSION */ - -/* For (MDRawHeader).flags: */ -typedef enum { - /* MD_NORMAL is the standard type of minidump. It includes full - * streams for the thread list, module list, exception, system info, - * and miscellaneous info. A memory list stream is also present, - * pointing to the same stack memory contained in the thread list, - * as well as a 256-byte region around the instruction address that - * was executing when the exception occurred. Stack memory is from - * 4 bytes below a thread's stack pointer up to the top of the - * memory region encompassing the stack. */ - MD_NORMAL = 0x00000000, - MD_WITH_DATA_SEGS = 0x00000001, - MD_WITH_FULL_MEMORY = 0x00000002, - MD_WITH_HANDLE_DATA = 0x00000004, - MD_FILTER_MEMORY = 0x00000008, - MD_SCAN_MEMORY = 0x00000010, - MD_WITH_UNLOADED_MODULES = 0x00000020, - MD_WITH_INDIRECTLY_REFERENCED_MEMORY = 0x00000040, - MD_FILTER_MODULE_PATHS = 0x00000080, - MD_WITH_PROCESS_THREAD_DATA = 0x00000100, - MD_WITH_PRIVATE_READ_WRITE_MEMORY = 0x00000200, - MD_WITHOUT_OPTIONAL_DATA = 0x00000400, - MD_WITH_FULL_MEMORY_INFO = 0x00000800, - MD_WITH_THREAD_INFO = 0x00001000, - MD_WITH_CODE_SEGS = 0x00002000, - MD_WITHOUT_AUXILLIARY_SEGS = 0x00004000, - MD_WITH_FULL_AUXILLIARY_STATE = 0x00008000, - MD_WITH_PRIVATE_WRITE_COPY_MEMORY = 0x00010000, - MD_IGNORE_INACCESSIBLE_MEMORY = 0x00020000, - MD_WITH_TOKEN_INFORMATION = 0x00040000 -} MDType; /* MINIDUMP_TYPE */ - - -typedef struct { - uint32_t stream_type; - MDLocationDescriptor location; -} MDRawDirectory; /* MINIDUMP_DIRECTORY */ - -/* For (MDRawDirectory).stream_type */ -typedef enum { - MD_UNUSED_STREAM = 0, - MD_RESERVED_STREAM_0 = 1, - MD_RESERVED_STREAM_1 = 2, - MD_THREAD_LIST_STREAM = 3, /* MDRawThreadList */ - MD_MODULE_LIST_STREAM = 4, /* MDRawModuleList */ - MD_MEMORY_LIST_STREAM = 5, /* MDRawMemoryList */ - MD_EXCEPTION_STREAM = 6, /* MDRawExceptionStream */ - MD_SYSTEM_INFO_STREAM = 7, /* MDRawSystemInfo */ - MD_THREAD_EX_LIST_STREAM = 8, - MD_MEMORY_64_LIST_STREAM = 9, - MD_COMMENT_STREAM_A = 10, - MD_COMMENT_STREAM_W = 11, - MD_HANDLE_DATA_STREAM = 12, - MD_FUNCTION_TABLE_STREAM = 13, - MD_UNLOADED_MODULE_LIST_STREAM = 14, - MD_MISC_INFO_STREAM = 15, /* MDRawMiscInfo */ - MD_MEMORY_INFO_LIST_STREAM = 16, /* MDRawMemoryInfoList */ - MD_THREAD_INFO_LIST_STREAM = 17, - MD_HANDLE_OPERATION_LIST_STREAM = 18, - MD_LAST_RESERVED_STREAM = 0x0000ffff, - - /* Breakpad extension types. 0x4767 = "Gg" */ - MD_BREAKPAD_INFO_STREAM = 0x47670001, /* MDRawBreakpadInfo */ - MD_ASSERTION_INFO_STREAM = 0x47670002, /* MDRawAssertionInfo */ - /* These are additional minidump stream values which are specific to - * the linux breakpad implementation. */ - MD_LINUX_CPU_INFO = 0x47670003, /* /proc/cpuinfo */ - MD_LINUX_PROC_STATUS = 0x47670004, /* /proc/$x/status */ - MD_LINUX_LSB_RELEASE = 0x47670005, /* /etc/lsb-release */ - MD_LINUX_CMD_LINE = 0x47670006, /* /proc/$x/cmdline */ - MD_LINUX_ENVIRON = 0x47670007, /* /proc/$x/environ */ - MD_LINUX_AUXV = 0x47670008, /* /proc/$x/auxv */ - MD_LINUX_MAPS = 0x47670009, /* /proc/$x/maps */ - MD_LINUX_DSO_DEBUG = 0x4767000A /* MDRawDebug{32,64} */ -} MDStreamType; /* MINIDUMP_STREAM_TYPE */ - - -typedef struct { - uint32_t length; /* Length of buffer in bytes (not characters), - * excluding 0-terminator */ - uint16_t buffer[1]; /* UTF-16-encoded, 0-terminated */ -} MDString; /* MINIDUMP_STRING */ - -static const size_t MDString_minsize = offsetof(MDString, buffer[0]); - - -typedef struct { - uint32_t thread_id; - uint32_t suspend_count; - uint32_t priority_class; - uint32_t priority; - uint64_t teb; /* Thread environment block */ - MDMemoryDescriptor stack; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawThread; /* MINIDUMP_THREAD */ - - -typedef struct { - uint32_t number_of_threads; - MDRawThread threads[1]; -} MDRawThreadList; /* MINIDUMP_THREAD_LIST */ - -static const size_t MDRawThreadList_minsize = offsetof(MDRawThreadList, - threads[0]); - - -typedef struct { - uint64_t base_of_image; - uint32_t size_of_image; - uint32_t checksum; /* 0 if unknown */ - uint32_t time_date_stamp; /* time_t */ - MDRVA module_name_rva; /* MDString, pathname or filename */ - MDVSFixedFileInfo version_info; - - /* The next field stores a CodeView record and is populated when a module's - * debug information resides in a PDB file. It identifies the PDB file. */ - MDLocationDescriptor cv_record; - - /* The next field is populated when a module's debug information resides - * in a DBG file. It identifies the DBG file. This field is effectively - * obsolete with modules built by recent toolchains. */ - MDLocationDescriptor misc_record; - - /* Alignment problem: reserved0 and reserved1 are defined by the platform - * SDK as 64-bit quantities. However, that results in a structure whose - * alignment is unpredictable on different CPUs and ABIs. If the ABI - * specifies full alignment of 64-bit quantities in structures (as ppc - * does), there will be padding between miscRecord and reserved0. If - * 64-bit quantities can be aligned on 32-bit boundaries (as on x86), - * this padding will not exist. (Note that the structure up to this point - * contains 1 64-bit member followed by 21 32-bit members.) - * As a workaround, reserved0 and reserved1 are instead defined here as - * four 32-bit quantities. This should be harmless, as there are - * currently no known uses for these fields. */ - uint32_t reserved0[2]; - uint32_t reserved1[2]; -} MDRawModule; /* MINIDUMP_MODULE */ - -/* The inclusion of a 64-bit type in MINIDUMP_MODULE forces the struct to - * be tail-padded out to a multiple of 64 bits under some ABIs (such as PPC). - * This doesn't occur on systems that don't tail-pad in this manner. Define - * this macro to be the usable size of the MDRawModule struct, and use it in - * place of sizeof(MDRawModule). */ -#define MD_MODULE_SIZE 108 - - -/* (MDRawModule).cv_record can reference MDCVInfoPDB20 or MDCVInfoPDB70. - * Ref.: http://www.debuginfo.com/articles/debuginfomatch.html - * MDCVInfoPDB70 is the expected structure type with recent toolchains. */ - -typedef struct { - uint32_t signature; - uint32_t offset; /* Offset to debug data (expect 0 in minidump) */ -} MDCVHeader; - -typedef struct { - MDCVHeader cv_header; - uint32_t signature; /* time_t debug information created */ - uint32_t age; /* revision of PDB file */ - uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file */ -} MDCVInfoPDB20; - -static const size_t MDCVInfoPDB20_minsize = offsetof(MDCVInfoPDB20, - pdb_file_name[0]); - -#define MD_CVINFOPDB20_SIGNATURE 0x3031424e /* cvHeader.signature = '01BN' */ - -typedef struct { - uint32_t cv_signature; - MDGUID signature; /* GUID, identifies PDB file */ - uint32_t age; /* Identifies incremental changes to PDB file */ - uint8_t pdb_file_name[1]; /* Pathname or filename of PDB file, - * 0-terminated 8-bit character data (UTF-8?) */ -} MDCVInfoPDB70; - -static const size_t MDCVInfoPDB70_minsize = offsetof(MDCVInfoPDB70, - pdb_file_name[0]); - -#define MD_CVINFOPDB70_SIGNATURE 0x53445352 /* cvSignature = 'SDSR' */ - -typedef struct { - uint32_t data1[2]; - uint32_t data2; - uint32_t data3; - uint32_t data4; - uint32_t data5[3]; - uint8_t extra[2]; -} MDCVInfoELF; - -/* In addition to the two CodeView record formats above, used for linking - * to external pdb files, it is possible for debugging data to be carried - * directly in the CodeView record itself. These signature values will - * be found in the first 4 bytes of the CodeView record. Additional values - * not commonly experienced in the wild are given by "Microsoft Symbol and - * Type Information", http://www.x86.org/ftp/manuals/tools/sym.pdf, section - * 7.2. An in-depth description of the CodeView 4.1 format is given by - * "Undocumented Windows 2000 Secrets", Windows 2000 Debugging Support/ - * Microsoft Symbol File Internals/CodeView Subsections, - * http://www.rawol.com/features/undocumented/sbs-w2k-1-windows-2000-debugging-support.pdf - */ -#define MD_CVINFOCV41_SIGNATURE 0x3930424e /* '90BN', CodeView 4.10. */ -#define MD_CVINFOCV50_SIGNATURE 0x3131424e /* '11BN', CodeView 5.0, - * MS C7-format (/Z7). */ - -#define MD_CVINFOUNKNOWN_SIGNATURE 0xffffffff /* An unlikely value. */ - -/* (MDRawModule).miscRecord can reference MDImageDebugMisc. The Windows - * structure is actually defined in WinNT.h. This structure is effectively - * obsolete with modules built by recent toolchains. */ - -typedef struct { - uint32_t data_type; /* IMAGE_DEBUG_TYPE_*, not defined here because - * this debug record type is mostly obsolete. */ - uint32_t length; /* Length of entire MDImageDebugMisc structure */ - uint8_t unicode; /* True if data is multibyte */ - uint8_t reserved[3]; - uint8_t data[1]; -} MDImageDebugMisc; /* IMAGE_DEBUG_MISC */ - -static const size_t MDImageDebugMisc_minsize = offsetof(MDImageDebugMisc, - data[0]); - - -typedef struct { - uint32_t number_of_modules; - MDRawModule modules[1]; -} MDRawModuleList; /* MINIDUMP_MODULE_LIST */ - -static const size_t MDRawModuleList_minsize = offsetof(MDRawModuleList, - modules[0]); - - -typedef struct { - uint32_t number_of_memory_ranges; - MDMemoryDescriptor memory_ranges[1]; -} MDRawMemoryList; /* MINIDUMP_MEMORY_LIST */ - -static const size_t MDRawMemoryList_minsize = offsetof(MDRawMemoryList, - memory_ranges[0]); - - -#define MD_EXCEPTION_MAXIMUM_PARAMETERS 15 - -typedef struct { - uint32_t exception_code; /* Windows: MDExceptionCodeWin, - * Mac OS X: MDExceptionMac, - * Linux: MDExceptionCodeLinux. */ - uint32_t exception_flags; /* Windows: 1 if noncontinuable, - Mac OS X: MDExceptionCodeMac. */ - uint64_t exception_record; /* Address (in the minidump-producing host's - * memory) of another MDException, for - * nested exceptions. */ - uint64_t exception_address; /* The address that caused the exception. - * Mac OS X: exception subcode (which is - * typically the address). */ - uint32_t number_parameters; /* Number of valid elements in - * exception_information. */ - uint32_t __align; - uint64_t exception_information[MD_EXCEPTION_MAXIMUM_PARAMETERS]; -} MDException; /* MINIDUMP_EXCEPTION */ - -#include "minidump_exception_linux.h" -#include "minidump_exception_mac.h" -#include "minidump_exception_ps3.h" -#include "minidump_exception_solaris.h" -#include "minidump_exception_win32.h" - -typedef struct { - uint32_t thread_id; /* Thread in which the exception - * occurred. Corresponds to - * (MDRawThread).thread_id. */ - uint32_t __align; - MDException exception_record; - MDLocationDescriptor thread_context; /* MDRawContext[CPU] */ -} MDRawExceptionStream; /* MINIDUMP_EXCEPTION_STREAM */ - - -typedef union { - struct { - uint32_t vendor_id[3]; /* cpuid 0: ebx, edx, ecx */ - uint32_t version_information; /* cpuid 1: eax */ - uint32_t feature_information; /* cpuid 1: edx */ - uint32_t amd_extended_cpu_features; /* cpuid 0x80000001, ebx */ - } x86_cpu_info; - struct { - uint32_t cpuid; - uint32_t elf_hwcaps; /* linux specific, 0 otherwise */ - } arm_cpu_info; - struct { - uint64_t processor_features[2]; - } other_cpu_info; -} MDCPUInformation; /* CPU_INFORMATION */ - -/* For (MDCPUInformation).arm_cpu_info.elf_hwcaps. - * This matches the Linux kernel definitions from */ -typedef enum { - MD_CPU_ARM_ELF_HWCAP_SWP = (1 << 0), - MD_CPU_ARM_ELF_HWCAP_HALF = (1 << 1), - MD_CPU_ARM_ELF_HWCAP_THUMB = (1 << 2), - MD_CPU_ARM_ELF_HWCAP_26BIT = (1 << 3), - MD_CPU_ARM_ELF_HWCAP_FAST_MULT = (1 << 4), - MD_CPU_ARM_ELF_HWCAP_FPA = (1 << 5), - MD_CPU_ARM_ELF_HWCAP_VFP = (1 << 6), - MD_CPU_ARM_ELF_HWCAP_EDSP = (1 << 7), - MD_CPU_ARM_ELF_HWCAP_JAVA = (1 << 8), - MD_CPU_ARM_ELF_HWCAP_IWMMXT = (1 << 9), - MD_CPU_ARM_ELF_HWCAP_CRUNCH = (1 << 10), - MD_CPU_ARM_ELF_HWCAP_THUMBEE = (1 << 11), - MD_CPU_ARM_ELF_HWCAP_NEON = (1 << 12), - MD_CPU_ARM_ELF_HWCAP_VFPv3 = (1 << 13), - MD_CPU_ARM_ELF_HWCAP_VFPv3D16 = (1 << 14), - MD_CPU_ARM_ELF_HWCAP_TLS = (1 << 15), - MD_CPU_ARM_ELF_HWCAP_VFPv4 = (1 << 16), - MD_CPU_ARM_ELF_HWCAP_IDIVA = (1 << 17), - MD_CPU_ARM_ELF_HWCAP_IDIVT = (1 << 18), -} MDCPUInformationARMElfHwCaps; - -typedef struct { - /* The next 3 fields and numberOfProcessors are from the SYSTEM_INFO - * structure as returned by GetSystemInfo */ - uint16_t processor_architecture; - uint16_t processor_level; /* x86: 5 = 586, 6 = 686, ... */ - /* ARM: 6 = ARMv6, 7 = ARMv7 ... */ - uint16_t processor_revision; /* x86: 0xMMSS, where MM=model, - * SS=stepping */ - /* ARM: 0 */ - - uint8_t number_of_processors; - uint8_t product_type; /* Windows: VER_NT_* from WinNT.h */ - - /* The next 5 fields are from the OSVERSIONINFO structure as returned - * by GetVersionEx */ - uint32_t major_version; - uint32_t minor_version; - uint32_t build_number; - uint32_t platform_id; - MDRVA csd_version_rva; /* MDString further identifying the - * host OS. - * Windows: name of the installed OS - * service pack. - * Mac OS X: the Apple OS build number - * (sw_vers -buildVersion). - * Linux: uname -srvmo */ - - uint16_t suite_mask; /* Windows: VER_SUITE_* from WinNT.h */ - uint16_t reserved2; - - MDCPUInformation cpu; -} MDRawSystemInfo; /* MINIDUMP_SYSTEM_INFO */ - -/* For (MDRawSystemInfo).processor_architecture: */ -typedef enum { - MD_CPU_ARCHITECTURE_X86 = 0, /* PROCESSOR_ARCHITECTURE_INTEL */ - MD_CPU_ARCHITECTURE_MIPS = 1, /* PROCESSOR_ARCHITECTURE_MIPS */ - MD_CPU_ARCHITECTURE_ALPHA = 2, /* PROCESSOR_ARCHITECTURE_ALPHA */ - MD_CPU_ARCHITECTURE_PPC = 3, /* PROCESSOR_ARCHITECTURE_PPC */ - MD_CPU_ARCHITECTURE_SHX = 4, /* PROCESSOR_ARCHITECTURE_SHX - * (Super-H) */ - MD_CPU_ARCHITECTURE_ARM = 5, /* PROCESSOR_ARCHITECTURE_ARM */ - MD_CPU_ARCHITECTURE_IA64 = 6, /* PROCESSOR_ARCHITECTURE_IA64 */ - MD_CPU_ARCHITECTURE_ALPHA64 = 7, /* PROCESSOR_ARCHITECTURE_ALPHA64 */ - MD_CPU_ARCHITECTURE_MSIL = 8, /* PROCESSOR_ARCHITECTURE_MSIL - * (Microsoft Intermediate Language) */ - MD_CPU_ARCHITECTURE_AMD64 = 9, /* PROCESSOR_ARCHITECTURE_AMD64 */ - MD_CPU_ARCHITECTURE_X86_WIN64 = 10, - /* PROCESSOR_ARCHITECTURE_IA32_ON_WIN64 (WoW64) */ - MD_CPU_ARCHITECTURE_SPARC = 0x8001, /* Breakpad-defined value for SPARC */ - MD_CPU_ARCHITECTURE_PPC64 = 0x8002, /* Breakpad-defined value for PPC64 */ - MD_CPU_ARCHITECTURE_ARM64 = 0x8003, /* Breakpad-defined value for ARM64 */ - MD_CPU_ARCHITECTURE_UNKNOWN = 0xffff /* PROCESSOR_ARCHITECTURE_UNKNOWN */ -} MDCPUArchitecture; - -/* For (MDRawSystemInfo).platform_id: */ -typedef enum { - MD_OS_WIN32S = 0, /* VER_PLATFORM_WIN32s (Windows 3.1) */ - MD_OS_WIN32_WINDOWS = 1, /* VER_PLATFORM_WIN32_WINDOWS (Windows 95-98-Me) */ - MD_OS_WIN32_NT = 2, /* VER_PLATFORM_WIN32_NT (Windows NT, 2000+) */ - MD_OS_WIN32_CE = 3, /* VER_PLATFORM_WIN32_CE, VER_PLATFORM_WIN32_HH - * (Windows CE, Windows Mobile, "Handheld") */ - - /* The following values are Breakpad-defined. */ - MD_OS_UNIX = 0x8000, /* Generic Unix-ish */ - MD_OS_MAC_OS_X = 0x8101, /* Mac OS X/Darwin */ - MD_OS_IOS = 0x8102, /* iOS */ - MD_OS_LINUX = 0x8201, /* Linux */ - MD_OS_SOLARIS = 0x8202, /* Solaris */ - MD_OS_ANDROID = 0x8203, /* Android */ - MD_OS_PS3 = 0x8204, /* PS3 */ - MD_OS_NACL = 0x8205 /* Native Client (NaCl) */ -} MDOSPlatform; - -typedef struct { - uint16_t year; - uint16_t month; - uint16_t day_of_week; - uint16_t day; - uint16_t hour; - uint16_t minute; - uint16_t second; - uint16_t milliseconds; -} MDSystemTime; /* SYSTEMTIME */ - -typedef struct { - /* Required field. The bias is the difference, in minutes, between - * Coordinated Universal Time (UTC) and local time. - * Formula: UTC = local time + bias */ - int32_t bias; - /* A description for standard time. For example, "EST" could indicate Eastern - * Standard Time. In practice this contains the full time zone names. This - * string can be empty. */ - uint16_t standard_name[32]; /* UTF-16-encoded, 0-terminated */ - /* A MDSystemTime structure that contains a date and local time when the - * transition from daylight saving time to standard time occurs on this - * operating system. If the time zone does not support daylight saving time, - * the month member in the MDSystemTime structure is zero. */ - MDSystemTime standard_date; - /* The bias value to be used during local time translations that occur during - * standard time. */ - int32_t standard_bias; - /* A description for daylight saving time. For example, "PDT" could indicate - * Pacific Daylight Time. In practice this contains the full time zone names. - * This string can be empty. */ - uint16_t daylight_name[32]; /* UTF-16-encoded, 0-terminated */ - /* A MDSystemTime structure that contains a date and local time when the - * transition from standard time to daylight saving time occurs on this - * operating system. If the time zone does not support daylight saving time, - * the month member in the MDSystemTime structure is zero.*/ - MDSystemTime daylight_date; - /* The bias value to be used during local time translations that occur during - * daylight saving time. */ - int32_t daylight_bias; -} MDTimeZoneInformation; /* TIME_ZONE_INFORMATION */ - -/* MAX_PATH from windef.h */ -#define MD_MAX_PATH 260 - -/* The miscellaneous information stream contains a variety - * of small pieces of information. A member is valid if - * it's within the available size and its corresponding - * bit is set. */ -typedef struct { - uint32_t size_of_info; /* Length of entire MDRawMiscInfo structure. */ - uint32_t flags1; - - /* The next field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_ID. */ - uint32_t process_id; - - /* The next 3 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_TIMES. */ - uint32_t process_create_time; /* time_t process started */ - uint32_t process_user_time; /* seconds of user CPU time */ - uint32_t process_kernel_time; /* seconds of kernel CPU time */ - - /* The following fields are not present in MINIDUMP_MISC_INFO but are - * in MINIDUMP_MISC_INFO_2. When this struct is populated, these values - * may not be set. Use flags1 and size_of_info to determine whether these - * values are present. These are only valid when flags1 contains - * MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO. */ - uint32_t processor_max_mhz; - uint32_t processor_current_mhz; - uint32_t processor_mhz_limit; - uint32_t processor_max_idle_state; - uint32_t processor_current_idle_state; - - /* The following fields are not present in MINIDUMP_MISC_INFO_2 but are - * in MINIDUMP_MISC_INFO_3. When this struct is populated, these values - * may not be set. Use flags1 and size_of_info to determine whether these - * values are present. */ - - /* The following field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY. */ - uint32_t process_integrity_level; - - /* The following field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS. */ - uint32_t process_execute_flags; - - /* The following field is only valid if flags1 contains - * MD_MISCINFO_FLAGS1_PROTECTED_PROCESS. */ - uint32_t protected_process; - - /* The following 2 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_TIMEZONE. */ - uint32_t time_zone_id; - MDTimeZoneInformation time_zone; - - /* The following fields are not present in MINIDUMP_MISC_INFO_3 but are - * in MINIDUMP_MISC_INFO_4. When this struct is populated, these values - * may not be set. Use flags1 and size_of_info to determine whether these - * values are present. */ - - /* The following 2 fields are only valid if flags1 contains - * MD_MISCINFO_FLAGS1_BUILDSTRING. */ - uint16_t build_string[MD_MAX_PATH]; /* UTF-16-encoded, 0-terminated */ - uint16_t dbg_bld_str[40]; /* UTF-16-encoded, 0-terminated */ -} MDRawMiscInfo; /* MINIDUMP_MISC_INFO, MINIDUMP_MISC_INFO_2, - * MINIDUMP_MISC_INFO_3, MINIDUMP_MISC_INFO_4, - * MINIDUMP_MISC_INFO_N */ - -static const size_t MD_MISCINFO_SIZE = - offsetof(MDRawMiscInfo, processor_max_mhz); -static const size_t MD_MISCINFO2_SIZE = - offsetof(MDRawMiscInfo, process_integrity_level); -static const size_t MD_MISCINFO3_SIZE = - offsetof(MDRawMiscInfo, build_string[0]); -static const size_t MD_MISCINFO4_SIZE = sizeof(MDRawMiscInfo); - -/* For (MDRawMiscInfo).flags1. These values indicate which fields in the - * MDRawMiscInfoStructure are valid. */ -typedef enum { - MD_MISCINFO_FLAGS1_PROCESS_ID = 0x00000001, - /* MINIDUMP_MISC1_PROCESS_ID */ - MD_MISCINFO_FLAGS1_PROCESS_TIMES = 0x00000002, - /* MINIDUMP_MISC1_PROCESS_TIMES */ - MD_MISCINFO_FLAGS1_PROCESSOR_POWER_INFO = 0x00000004, - /* MINIDUMP_MISC1_PROCESSOR_POWER_INFO */ - MD_MISCINFO_FLAGS1_PROCESS_INTEGRITY = 0x00000010, - /* MINIDUMP_MISC3_PROCESS_INTEGRITY */ - MD_MISCINFO_FLAGS1_PROCESS_EXECUTE_FLAGS = 0x00000020, - /* MINIDUMP_MISC3_PROCESS_EXECUTE_FLAGS */ - MD_MISCINFO_FLAGS1_TIMEZONE = 0x00000040, - /* MINIDUMP_MISC3_TIMEZONE */ - MD_MISCINFO_FLAGS1_PROTECTED_PROCESS = 0x00000080, - /* MINIDUMP_MISC3_PROTECTED_PROCESS */ - MD_MISCINFO_FLAGS1_BUILDSTRING = 0x00000100, - /* MINIDUMP_MISC4_BUILDSTRING */ -} MDMiscInfoFlags1; - -/* - * Around DbgHelp version 6.0, the style of new LIST structures changed - * from including an array of length 1 at the end of the struct to - * represent the variable-length data to including explicit - * "size of header", "size of entry" and "number of entries" fields - * in the header, presumably to allow backwards-compatibly-extending - * the structures in the future. The actual list entries follow the - * header data directly in this case. - */ - -typedef struct { - uint32_t size_of_header; /* sizeof(MDRawMemoryInfoList) */ - uint32_t size_of_entry; /* sizeof(MDRawMemoryInfo) */ - uint64_t number_of_entries; -} MDRawMemoryInfoList; /* MINIDUMP_MEMORY_INFO_LIST */ - -typedef struct { - uint64_t base_address; /* Base address of a region of pages */ - uint64_t allocation_base; /* Base address of a range of pages - * within this region. */ - uint32_t allocation_protection; /* Memory protection when this region - * was originally allocated: - * MDMemoryProtection */ - uint32_t __alignment1; - uint64_t region_size; - uint32_t state; /* MDMemoryState */ - uint32_t protection; /* MDMemoryProtection */ - uint32_t type; /* MDMemoryType */ - uint32_t __alignment2; -} MDRawMemoryInfo; /* MINIDUMP_MEMORY_INFO */ - -/* For (MDRawMemoryInfo).state */ -typedef enum { - MD_MEMORY_STATE_COMMIT = 0x1000, /* physical storage has been allocated */ - MD_MEMORY_STATE_RESERVE = 0x2000, /* reserved, but no physical storage */ - MD_MEMORY_STATE_FREE = 0x10000 /* available to be allocated */ -} MDMemoryState; - -/* For (MDRawMemoryInfo).allocation_protection and .protection */ -typedef enum { - MD_MEMORY_PROTECT_NOACCESS = 0x01, /* PAGE_NOACCESS */ - MD_MEMORY_PROTECT_READONLY = 0x02, /* PAGE_READONLY */ - MD_MEMORY_PROTECT_READWRITE = 0x04, /* PAGE_READWRITE */ - MD_MEMORY_PROTECT_WRITECOPY = 0x08, /* PAGE_WRITECOPY */ - MD_MEMORY_PROTECT_EXECUTE = 0x10, /* PAGE_EXECUTE */ - MD_MEMORY_PROTECT_EXECUTE_READ = 0x20, /* PAGE_EXECUTE_READ */ - MD_MEMORY_PROTECT_EXECUTE_READWRITE = 0x40, /* PAGE_EXECUTE_READWRITE */ - MD_MEMORY_PROTECT_EXECUTE_WRITECOPY = 0x80, /* PAGE_EXECUTE_WRITECOPY */ - /* These options can be combined with the previous flags. */ - MD_MEMORY_PROTECT_GUARD = 0x100, /* PAGE_GUARD */ - MD_MEMORY_PROTECT_NOCACHE = 0x200, /* PAGE_NOCACHE */ - MD_MEMORY_PROTECT_WRITECOMBINE = 0x400, /* PAGE_WRITECOMBINE */ -} MDMemoryProtection; - -/* Used to mask the mutually exclusive options from the combinable flags. */ -const uint32_t MD_MEMORY_PROTECTION_ACCESS_MASK = 0xFF; - -/* For (MDRawMemoryInfo).type */ -typedef enum { - MD_MEMORY_TYPE_PRIVATE = 0x20000, /* not shared by other processes */ - MD_MEMORY_TYPE_MAPPED = 0x40000, /* mapped into the view of a section */ - MD_MEMORY_TYPE_IMAGE = 0x1000000 /* mapped into the view of an image */ -} MDMemoryType; - -/* - * Breakpad extension types - */ - - -typedef struct { - /* validity is a bitmask with values from MDBreakpadInfoValidity, indicating - * which of the other fields in the structure are valid. */ - uint32_t validity; - - /* Thread ID of the handler thread. dump_thread_id should correspond to - * the thread_id of an MDRawThread in the minidump's MDRawThreadList if - * a dedicated thread in that list was used to produce the minidump. If - * the MDRawThreadList does not contain a dedicated thread used to produce - * the minidump, this field should be set to 0 and the validity field - * must not contain MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID. */ - uint32_t dump_thread_id; - - /* Thread ID of the thread that requested the minidump be produced. As - * with dump_thread_id, requesting_thread_id should correspond to the - * thread_id of an MDRawThread in the minidump's MDRawThreadList. For - * minidumps produced as a result of an exception, requesting_thread_id - * will be the same as the MDRawExceptionStream's thread_id field. For - * minidumps produced "manually" at the program's request, - * requesting_thread_id will indicate which thread caused the dump to be - * written. If the minidump was produced at the request of something - * other than a thread in the MDRawThreadList, this field should be set - * to 0 and the validity field must not contain - * MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID. */ - uint32_t requesting_thread_id; -} MDRawBreakpadInfo; - -/* For (MDRawBreakpadInfo).validity: */ -typedef enum { - /* When set, the dump_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_DUMP_THREAD_ID = 1 << 0, - - /* When set, the requesting_thread_id field is valid. */ - MD_BREAKPAD_INFO_VALID_REQUESTING_THREAD_ID = 1 << 1 -} MDBreakpadInfoValidity; - -typedef struct { - /* expression, function, and file are 0-terminated UTF-16 strings. They - * may be truncated if necessary, but should always be 0-terminated when - * written to a file. - * Fixed-length strings are used because MiniDumpWriteDump doesn't offer - * a way for user streams to point to arbitrary RVAs for strings. */ - uint16_t expression[128]; /* Assertion that failed... */ - uint16_t function[128]; /* ...within this function... */ - uint16_t file[128]; /* ...in this file... */ - uint32_t line; /* ...at this line. */ - uint32_t type; -} MDRawAssertionInfo; - -/* For (MDRawAssertionInfo).type: */ -typedef enum { - MD_ASSERTION_INFO_TYPE_UNKNOWN = 0, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to an invalid parameter handler instead. */ - MD_ASSERTION_INFO_TYPE_INVALID_PARAMETER, - - /* Used for assertions that would be raised by the MSVC CRT but are - * directed to a pure virtual call handler instead. */ - MD_ASSERTION_INFO_TYPE_PURE_VIRTUAL_CALL -} MDAssertionInfoData; - -/* These structs are used to store the DSO debug data in Linux minidumps, - * which is necessary for converting minidumps to usable coredumps. - * Because of a historical accident, several fields are variably encoded - * according to client word size, so tools potentially need to support both. */ - -typedef struct { - uint32_t addr; - MDRVA name; - uint32_t ld; -} MDRawLinkMap32; - -typedef struct { - uint32_t version; - MDRVA map; /* array of MDRawLinkMap32 */ - uint32_t dso_count; - uint32_t brk; - uint32_t ldbase; - uint32_t dynamic; -} MDRawDebug32; - -typedef struct { - uint64_t addr; - MDRVA name; - uint64_t ld; -} MDRawLinkMap64; - -typedef struct { - uint32_t version; - MDRVA map; /* array of MDRawLinkMap64 */ - uint32_t dso_count; - uint64_t brk; - uint64_t ldbase; - uint64_t dynamic; -} MDRawDebug64; - -#if defined(_MSC_VER) -#pragma warning(pop) -#endif /* _MSC_VER */ - - -#endif /* GOOGLE_BREAKPAD_COMMON_MINIDUMP_FORMAT_H__ */ diff --git a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h b/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h deleted file mode 100644 index 918544b66238d5..00000000000000 --- a/Telegram/ThirdParty/breakpad/google_breakpad/common/minidump_size.h +++ /dev/null @@ -1,107 +0,0 @@ -// Copyright (c) 2007, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - -// minidump_size.h: Provides a C++ template for programmatic access to -// the sizes of various types defined in minidump_format.h. -// -// Author: Mark Mentovai - -#ifndef GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ -#define GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ - -#include - -#include "google_breakpad/common/minidump_format.h" - -namespace google_breakpad { - -template -class minidump_size { - public: - static size_t size() { return sizeof(T); } -}; - -// Explicit specializations for variable-length types. The size returned -// for these should be the size for an object without its variable-length -// section. - -template<> -class minidump_size { - public: - static size_t size() { return MDString_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawThreadList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB20_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDCVInfoPDB70_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDImageDebugMisc_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawModuleList_minsize; } -}; - -template<> -class minidump_size { - public: - static size_t size() { return MDRawMemoryList_minsize; } -}; - -// Explicit specialization for MDRawModule, for which sizeof may include -// tail-padding on some architectures but not others. - -template<> -class minidump_size { - public: - static size_t size() { return MD_MODULE_SIZE; } -}; - -} // namespace google_breakpad - -#endif // GOOGLE_BREAKPAD_COMMON_MINIDUMP_SIZE_H__ From 759ede3c5770a6abf896e7acc8e95be590c3d069 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 17:32:19 +0300 Subject: [PATCH 038/133] fixed linux launch with static linking --- README.md | 15 -- Telegram/FixMake.sh | 4 +- Telegram/SourceFiles/app.cpp | 3 +- Telegram/SourceFiles/pspecific_linux.cpp | 281 +++++++++++------------ Telegram/Telegram.pro | 2 +- 5 files changed, 136 insertions(+), 169 deletions(-) diff --git a/README.md b/README.md index df84d735161be0..be9a15977402a4 100644 --- a/README.md +++ b/README.md @@ -48,21 +48,6 @@ The source code is published under GPLv3 with OpenSSL exception, the license is Compiles given files to single update file, compresses it with lzma and signs with a private key. It is not built in **Debug** and **Release** configurations of Telegram solution, because private key is inaccessible. -* ### Prepare - - Prepares a release for deployment, puts all current files to deploy/{version} folder. - - **Windows**: - * tsetup{version}.exe installer - * Telegram.exe - * Telegram.pdb (debug info for crash minidumps view) - * tupdate{updversion} binary lzma update archive - - **Mac**: - * tsetup{version}.dmg - * Telegram.app - * tmacupd{updversion} binary lzma update archive - * ### MetaEmoji Creates four sprites and text2emoji replace code diff --git a/Telegram/FixMake.sh b/Telegram/FixMake.sh index 21abada2b22853..b2b180b1354eea 100755 --- a/Telegram/FixMake.sh +++ b/Telegram/FixMake.sh @@ -11,11 +11,9 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' -Replace '\-lz' '\/usr\/lib\/x86_64\-linux\-gnu\/libz\.a' Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' -Replace '\-lexif' '\/usr\/lib\/x86_64\-linux\-gnu\/libexif\.a' -Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' +#Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a' Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 3a992e7065b84a..fae83e4597a36c 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -25,8 +25,9 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "application.h" #include "fileuploader.h" #include "mainwidget.h" +#if QT_VERSION < QT_VERSION_CHECK(5, 5, 0) #include - +#endif #include "localstorage.h" #include "numbers.h" diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 47429e862edb5b..6eec6629570d51 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -346,156 +346,141 @@ namespace { return FALSE; } - class _PsInitializer { - public: - _PsInitializer() { - static bool inited = false; - if (inited) return; - inited = true; - - QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); - noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); - tryAppIndicator = (cdesktop == qstr("xfce")); - noTryUnity = (cdesktop != qstr("unity")); - - if (noQtTrayIcon) cSetSupportTray(false); - - DEBUG_LOG(("Loading libraries")); - setupGtk(); - setupUnity(); + bool loadLibrary(QLibrary &lib, const char *name, int version) { + DEBUG_LOG(("Loading '%1' with version %2..").arg(QLatin1String(name)).arg(version)); + lib.setFileNameAndVersion(QLatin1String(name), version); + if (lib.load()) { + DEBUG_LOG(("Loaded '%1' with version %2!").arg(QLatin1String(name)).arg(version)); + return true; } - - bool loadLibrary(QLibrary &lib, const char *name, int version) { - DEBUG_LOG(("Loading '%1' with version %2..").arg(QLatin1String(name)).arg(version)); - lib.setFileNameAndVersion(QLatin1String(name), version); - if (lib.load()) { - DEBUG_LOG(("Loaded '%1' with version %2!").arg(QLatin1String(name)).arg(version)); - return true; - } - lib.setFileNameAndVersion(QLatin1String(name), QString()); - if (lib.load()) { - DEBUG_LOG(("Loaded '%1' without version!").arg(QLatin1String(name))); - return true; - } - LOG(("Could not load '%1' with version %2 :(").arg(QLatin1String(name)).arg(version)); - return false; + lib.setFileNameAndVersion(QLatin1String(name), QString()); + if (lib.load()) { + DEBUG_LOG(("Loaded '%1' without version!").arg(QLatin1String(name))); + return true; } + LOG(("Could not load '%1' with version %2 :(").arg(QLatin1String(name)).arg(version)); + return false; + } - void setupGtkBase(QLibrary &lib_gtk) { - if (!loadFunction(lib_gtk, "gtk_init_check", ps_gtk_init_check)) return; - if (!loadFunction(lib_gtk, "gtk_menu_new", ps_gtk_menu_new)) return; - if (!loadFunction(lib_gtk, "gtk_menu_get_type", ps_gtk_menu_get_type)) return; + void setupGtkBase(QLibrary &lib_gtk) { + if (!loadFunction(lib_gtk, "gtk_init_check", ps_gtk_init_check)) return; + if (!loadFunction(lib_gtk, "gtk_menu_new", ps_gtk_menu_new)) return; + if (!loadFunction(lib_gtk, "gtk_menu_get_type", ps_gtk_menu_get_type)) return; - if (!loadFunction(lib_gtk, "gtk_menu_item_new_with_label", ps_gtk_menu_item_new_with_label)) return; - if (!loadFunction(lib_gtk, "gtk_menu_item_set_label", ps_gtk_menu_item_set_label)) return; - if (!loadFunction(lib_gtk, "gtk_menu_shell_append", ps_gtk_menu_shell_append)) return; - if (!loadFunction(lib_gtk, "gtk_menu_shell_get_type", ps_gtk_menu_shell_get_type)) return; - if (!loadFunction(lib_gtk, "gtk_widget_show", ps_gtk_widget_show)) return; - if (!loadFunction(lib_gtk, "gtk_widget_get_toplevel", ps_gtk_widget_get_toplevel)) return; - if (!loadFunction(lib_gtk, "gtk_widget_get_visible", ps_gtk_widget_get_visible)) return; - if (!loadFunction(lib_gtk, "gtk_widget_set_sensitive", ps_gtk_widget_set_sensitive)) return; + if (!loadFunction(lib_gtk, "gtk_menu_item_new_with_label", ps_gtk_menu_item_new_with_label)) return; + if (!loadFunction(lib_gtk, "gtk_menu_item_set_label", ps_gtk_menu_item_set_label)) return; + if (!loadFunction(lib_gtk, "gtk_menu_shell_append", ps_gtk_menu_shell_append)) return; + if (!loadFunction(lib_gtk, "gtk_menu_shell_get_type", ps_gtk_menu_shell_get_type)) return; + if (!loadFunction(lib_gtk, "gtk_widget_show", ps_gtk_widget_show)) return; + if (!loadFunction(lib_gtk, "gtk_widget_get_toplevel", ps_gtk_widget_get_toplevel)) return; + if (!loadFunction(lib_gtk, "gtk_widget_get_visible", ps_gtk_widget_get_visible)) return; + if (!loadFunction(lib_gtk, "gtk_widget_set_sensitive", ps_gtk_widget_set_sensitive)) return; - if (!loadFunction(lib_gtk, "g_type_check_instance_cast", ps_g_type_check_instance_cast)) return; - if (!loadFunction(lib_gtk, "g_signal_connect_data", ps_g_signal_connect_data)) return; + if (!loadFunction(lib_gtk, "g_type_check_instance_cast", ps_g_type_check_instance_cast)) return; + if (!loadFunction(lib_gtk, "g_signal_connect_data", ps_g_signal_connect_data)) return; - if (!loadFunction(lib_gtk, "g_object_ref_sink", ps_g_object_ref_sink)) return; - if (!loadFunction(lib_gtk, "g_object_unref", ps_g_object_unref)) return; + if (!loadFunction(lib_gtk, "g_object_ref_sink", ps_g_object_ref_sink)) return; + if (!loadFunction(lib_gtk, "g_object_unref", ps_g_object_unref)) return; + DEBUG_LOG(("Library gtk functions loaded!")); + if (ps_gtk_init_check(0, 0)) { + DEBUG_LOG(("Checked gtk with gtk_init_check!")); useGtkBase = true; - DEBUG_LOG(("Library gtk functions loaded!")); - } - - void setupAppIndicator(QLibrary &lib_indicator) { - if (!loadFunction(lib_indicator, "app_indicator_new", ps_app_indicator_new)) return; - if (!loadFunction(lib_indicator, "app_indicator_set_status", ps_app_indicator_set_status)) return; - if (!loadFunction(lib_indicator, "app_indicator_set_menu", ps_app_indicator_set_menu)) return; - if (!loadFunction(lib_indicator, "app_indicator_set_icon_full", ps_app_indicator_set_icon_full)) return; - useAppIndicator = true; - DEBUG_LOG(("Library appindicator functions loaded!")); + } else { + DEBUG_LOG(("Failed to gtk_init_check(0, 0)!")); } + } - void setupGtk() { - QLibrary lib_gtk, lib_indicator; - if (!noQtTrayIcon && !tryAppIndicator) { - if (!noTryUnity) { - if (loadLibrary(lib_gtk, "gtk-3", 0)) { - setupGtkBase(lib_gtk); - } - if (!useGtkBase) { - if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { - setupGtkBase(lib_gtk); - } - } - if (!useGtkBase) { - noTryUnity = true; - } - } - return; - } + void setupAppIndicator(QLibrary &lib_indicator) { + if (!loadFunction(lib_indicator, "app_indicator_new", ps_app_indicator_new)) return; + if (!loadFunction(lib_indicator, "app_indicator_set_status", ps_app_indicator_set_status)) return; + if (!loadFunction(lib_indicator, "app_indicator_set_menu", ps_app_indicator_set_menu)) return; + if (!loadFunction(lib_indicator, "app_indicator_set_icon_full", ps_app_indicator_set_icon_full)) return; + useAppIndicator = true; + DEBUG_LOG(("Library appindicator functions loaded!")); + } - if (loadLibrary(lib_indicator, "appindicator3", 1)) { + void setupGtk() { + QLibrary lib_gtk, lib_indicator; + if (!noQtTrayIcon && !tryAppIndicator) { + if (!noTryUnity) { if (loadLibrary(lib_gtk, "gtk-3", 0)) { setupGtkBase(lib_gtk); - setupAppIndicator(lib_indicator); } - } - if (!useGtkBase || !useAppIndicator) { - if (loadLibrary(lib_indicator, "appindicator", 1)) { + if (!useGtkBase) { if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { - useGtkBase = useAppIndicator = false; setupGtkBase(lib_gtk); - setupAppIndicator(lib_indicator); } } - } - if (tryAppIndicator) { - if (useGtkBase && useAppIndicator) { - noQtTrayIcon = true; - cSetSupportTray(false); + if (!useGtkBase) { + noTryUnity = true; } - return; } + return; + } - if (!useGtkBase && lib_gtk.isLoaded()) { - LOG(("Could not load appindicator, trying to load gtk..")); + if (loadLibrary(lib_indicator, "appindicator3", 1)) { + if (loadLibrary(lib_gtk, "gtk-3", 0)) { setupGtkBase(lib_gtk); + setupAppIndicator(lib_indicator); } - if (!useGtkBase) { - useAppIndicator = false; - LOG(("Could not load gtk-x11-2.0!")); - return; + } + if (!useGtkBase || !useAppIndicator) { + if (loadLibrary(lib_indicator, "appindicator", 1)) { + if (loadLibrary(lib_gtk, "gtk-x11-2.0", 0)) { + useGtkBase = useAppIndicator = false; + setupGtkBase(lib_gtk); + setupAppIndicator(lib_indicator); + } } + } + if (tryAppIndicator) { + if (useGtkBase && useAppIndicator) { + noQtTrayIcon = true; + cSetSupportTray(false); + } + return; + } - if (!loadFunction(lib_gtk, "gdk_init_check", ps_gdk_init_check)) return; - if (!loadFunction(lib_gtk, "gdk_pixbuf_new_from_data", ps_gdk_pixbuf_new_from_data)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_new_from_pixbuf", ps_gtk_status_icon_new_from_pixbuf)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_set_from_pixbuf", ps_gtk_status_icon_set_from_pixbuf)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_set_title", ps_gtk_status_icon_set_title)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_set_tooltip_text", ps_gtk_status_icon_set_tooltip_text)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_set_visible", ps_gtk_status_icon_set_visible)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_is_embedded", ps_gtk_status_icon_is_embedded)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_get_geometry", ps_gtk_status_icon_get_geometry)) return; - if (!loadFunction(lib_gtk, "gtk_status_icon_position_menu", ps_gtk_status_icon_position_menu)) return; - if (!loadFunction(lib_gtk, "gtk_menu_popup", ps_gtk_menu_popup)) return; - if (!loadFunction(lib_gtk, "gtk_get_current_event_time", ps_gtk_get_current_event_time)) return; - if (!loadFunction(lib_gtk, "g_idle_add", ps_g_idle_add)) return; - useStatusIcon = true; - DEBUG_LOG(("Status icon api loaded!")); - } + if (!useGtkBase && lib_gtk.isLoaded()) { + LOG(("Could not load appindicator, trying to load gtk..")); + setupGtkBase(lib_gtk); + } + if (!useGtkBase) { + useAppIndicator = false; + LOG(("Could not load gtk-x11-2.0!")); + return; + } - void setupUnity() { - if (noTryUnity) return; + if (!loadFunction(lib_gtk, "gdk_init_check", ps_gdk_init_check)) return; + if (!loadFunction(lib_gtk, "gdk_pixbuf_new_from_data", ps_gdk_pixbuf_new_from_data)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_new_from_pixbuf", ps_gtk_status_icon_new_from_pixbuf)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_set_from_pixbuf", ps_gtk_status_icon_set_from_pixbuf)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_set_title", ps_gtk_status_icon_set_title)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_set_tooltip_text", ps_gtk_status_icon_set_tooltip_text)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_set_visible", ps_gtk_status_icon_set_visible)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_is_embedded", ps_gtk_status_icon_is_embedded)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_get_geometry", ps_gtk_status_icon_get_geometry)) return; + if (!loadFunction(lib_gtk, "gtk_status_icon_position_menu", ps_gtk_status_icon_position_menu)) return; + if (!loadFunction(lib_gtk, "gtk_menu_popup", ps_gtk_menu_popup)) return; + if (!loadFunction(lib_gtk, "gtk_get_current_event_time", ps_gtk_get_current_event_time)) return; + if (!loadFunction(lib_gtk, "g_idle_add", ps_g_idle_add)) return; + useStatusIcon = true; + DEBUG_LOG(("Status icon api loaded!")); + } - QLibrary lib_unity(qstr("unity"), 9, 0); - if (!loadLibrary(lib_unity, "unity", 9)) return; + void setupUnity() { + if (noTryUnity) return; - if (!loadFunction(lib_unity, "unity_launcher_entry_get_for_desktop_id", ps_unity_launcher_entry_get_for_desktop_id)) return; - if (!loadFunction(lib_unity, "unity_launcher_entry_set_count", ps_unity_launcher_entry_set_count)) return; - if (!loadFunction(lib_unity, "unity_launcher_entry_set_count_visible", ps_unity_launcher_entry_set_count_visible)) return; - useUnityCount = true; - DEBUG_LOG(("Unity count api loaded!")); - } - }; + QLibrary lib_unity(qstr("unity"), 9, 0); + if (!loadLibrary(lib_unity, "unity", 9)) return; + + if (!loadFunction(lib_unity, "unity_launcher_entry_get_for_desktop_id", ps_unity_launcher_entry_get_for_desktop_id)) return; + if (!loadFunction(lib_unity, "unity_launcher_entry_set_count", ps_unity_launcher_entry_set_count)) return; + if (!loadFunction(lib_unity, "unity_launcher_entry_set_count_visible", ps_unity_launcher_entry_set_count_visible)) return; + useUnityCount = true; + DEBUG_LOG(("Unity count api loaded!")); + } class _PsEventFilter : public QAbstractNativeEventFilter { public: @@ -516,8 +501,6 @@ namespace { PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent), posInited(false), trayIcon(0), trayIconMenu(0), icon256(qsl(":/gui/art/icon256.png")), iconbig256(icon256), wndIcon(QIcon::fromTheme("telegram", QIcon(QPixmap::fromImage(icon256, Qt::ColorOnly)))), _psCheckStatusIconLeft(100), _psLastIndicatorUpdate(0) { - _PsInitializer initializer; - connect(&_psCheckStatusIconTimer, SIGNAL(timeout()), this, SLOT(psStatusIconCheck())); _psCheckStatusIconTimer.setSingleShot(false); @@ -770,41 +753,31 @@ void PsMainWindow::psCreateTrayIcon() { if (!noQtTrayIcon) { cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable()); if (!noTryUnity) { - if (ps_gtk_init_check(0, 0)) { - DEBUG_LOG(("Checked gtk with gtk_init_check!")); - } else { - DEBUG_LOG(("Failed to gtk_init_check(0, 0)!")); - useUnityCount = false; - } + useUnityCount = false; } return; } if (useAppIndicator) { DEBUG_LOG(("Trying to create AppIndicator")); - if (ps_gtk_init_check(0, 0)) { - DEBUG_LOG(("Checked gtk with gtk_init_check!")); - _trayMenu = ps_gtk_menu_new(); - if (_trayMenu) { - DEBUG_LOG(("Created gtk menu for appindicator!")); - QFileInfo f(_trayIconImageFile()); - if (f.exists()) { - QByteArray path = QFile::encodeName(f.absoluteFilePath()); - _trayIndicator = ps_app_indicator_new("Telegram Desktop", path.constData(), APP_INDICATOR_CATEGORY_APPLICATION_STATUS); - if (_trayIndicator) { - DEBUG_LOG(("Created appindicator!")); - } else { - DEBUG_LOG(("Failed to app_indicator_new()!")); - } + _trayMenu = ps_gtk_menu_new(); + if (_trayMenu) { + DEBUG_LOG(("Created gtk menu for appindicator!")); + QFileInfo f(_trayIconImageFile()); + if (f.exists()) { + QByteArray path = QFile::encodeName(f.absoluteFilePath()); + _trayIndicator = ps_app_indicator_new("Telegram Desktop", path.constData(), APP_INDICATOR_CATEGORY_APPLICATION_STATUS); + if (_trayIndicator) { + DEBUG_LOG(("Created appindicator!")); } else { - useAppIndicator = false; - DEBUG_LOG(("Failed to create image file!")); + DEBUG_LOG(("Failed to app_indicator_new()!")); } } else { - DEBUG_LOG(("Failed to gtk_menu_new()!")); + useAppIndicator = false; + DEBUG_LOG(("Failed to create image file!")); } } else { - DEBUG_LOG(("Failed to gtk_init_check(0, 0)!")); + DEBUG_LOG(("Failed to gtk_menu_new()!")); } if (_trayMenu && _trayIndicator) { ps_app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_ACTIVE); @@ -816,7 +789,7 @@ void PsMainWindow::psCreateTrayIcon() { } } if (useStatusIcon) { - if (ps_gtk_init_check(0, 0) && ps_gdk_init_check(0, 0)) { + if (ps_gdk_init_check(0, 0)) { if (!_trayMenu) _trayMenu = ps_gtk_menu_new(); if (_trayMenu) { loadPixbuf(_trayIconImageGen()); @@ -1269,6 +1242,16 @@ void psShowInFolder(const QString &name) { namespace PlatformSpecific { Initializer::Initializer() { + QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); + noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); + tryAppIndicator = (cdesktop == qstr("xfce")); + noTryUnity = (cdesktop != qstr("unity")); + + if (noQtTrayIcon) cSetSupportTray(false); + + DEBUG_LOG(("Loading libraries")); + setupGtk(); + setupUnity(); } Initializer::~Initializer() { diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index b0ea1e9d8ce1cc..1ba6d852eca21b 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -318,7 +318,7 @@ INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/dee-1.0" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" -LIBS += -lcrypto -lssl -ldl -llzma -lexif -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva +LIBS += -lcrypto -lssl -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a From 2b8ef0e9b28a62190e8832f2f211ba8444693e75 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 18:58:51 +0300 Subject: [PATCH 039/133] fixed linux build for 9019001 beta --- Telegram/FixMake.sh | 2 +- Telegram/Telegram.pro | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/FixMake.sh b/Telegram/FixMake.sh index b2b180b1354eea..e03c47d215baf3 100755 --- a/Telegram/FixMake.sh +++ b/Telegram/FixMake.sh @@ -13,7 +13,7 @@ Replace () { Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' -#Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' +Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a' Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 1ba6d852eca21b..859fb8d01307f1 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -288,10 +288,10 @@ CONFIG(release, debug|release) { QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g QMAKE_LFLAGS_RELEASE -= -O1 - QMAKE_LFLAGS_RELEASE += -Ofast -flto -rdynamic -g + QMAKE_LFLAGS_RELEASE += -Ofast -flto -g } CONFIG(debug, debug|release) { - QMAKE_LFLAGS_DEBUG += -rdynamic -g + QMAKE_LFLAGS_DEBUG += -g } INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ From c240295a7469cd5b86fcfec33a8bd8d5b71186b3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 22:53:01 +0300 Subject: [PATCH 040/133] retina settings fixed for os x tray icon --- Telegram/SourceFiles/application.cpp | 45 +++++++++++++++++----------- Telegram/SourceFiles/application.h | 5 +++- Telegram/SourceFiles/window.cpp | 2 +- 3 files changed, 33 insertions(+), 19 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 051d171f8436e0..f5d565abd8880e 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -281,7 +281,7 @@ void Application::singleInstanceChecked() { } else if (status == SignalHandlers::LastCrashed) { new LastCrashedWindow(); } else { - new AppClass(); + Sandboxer::startSandbox(); } } } @@ -636,13 +636,38 @@ namespace Sandboxer { } } +#endif + void connect(const char *signal, QObject *object, const char *method) { if (Application *a = application()) { a->connect(a, signal, object, method); } } -#endif + void startSandbox() { + t_assert(application() != 0); + + float64 dpi = Application::primaryScreen()->logicalDotsPerInch(); + if (dpi <= 108) { // 0-96-108 + cSetScreenScale(dbisOne); + } else if (dpi <= 132) { // 108-120-132 + cSetScreenScale(dbisOneAndQuarter); + } else if (dpi <= 168) { // 132-144-168 + cSetScreenScale(dbisOneAndHalf); + } else { // 168-192-inf + cSetScreenScale(dbisTwo); + } + + if (application()->devicePixelRatio() > 1) { + cSetRetina(true); + cSetRetinaFactor(application()->devicePixelRatio()); + cSetIntRetinaFactor(int32(cRetinaFactor())); + cSetConfigScale(dbisOne); + cSetRealScale(dbisOne); + } + + new AppClass(); + } } @@ -667,21 +692,7 @@ AppClass::AppClass() : QObject() application()->installEventFilter(new EventFilterForKeys(this)); - float64 dpi = QApplication::primaryScreen()->logicalDotsPerInch(); - if (dpi <= 108) { // 0-96-108 - cSetScreenScale(dbisOne); - } else if (dpi <= 132) { // 108-120-132 - cSetScreenScale(dbisOneAndQuarter); - } else if (dpi <= 168) { // 132-144-168 - cSetScreenScale(dbisOneAndHalf); - } else { // 168-192-inf - cSetScreenScale(dbisTwo); - } - - if (application()->devicePixelRatio() > 1) { - cSetRetina(true); - cSetRetinaFactor(application()->devicePixelRatio()); - cSetIntRetinaFactor(int32(cRetinaFactor())); + if (cRetina()) { cSetConfigScale(dbisOne); cSetRealScale(dbisOne); } diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 26b443955f4787..d1a0f857c79d13 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -128,10 +128,13 @@ namespace Sandboxer { void updateProgress(qint64 ready, qint64 total); void updateFailed(); void updateReady(); - void connect(const char *signal, QObject *object, const char *method); #endif + void connect(const char *signal, QObject *object, const char *method); + + void startSandbox(); + } class MainWidget; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 43c2b25a8d9f28..9c5272553678c0 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2692,7 +2692,7 @@ void LastCrashedWindow::onContinue() { if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); } else { - new AppClass(); + Sandboxer::startSandbox(); } close(); } From db9f47c6f27f79989f4652f9cba124d0b6101a12 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 5 Feb 2016 22:56:42 +0300 Subject: [PATCH 041/133] fixed version in crash reporting for betas, fixed global app event filter install --- Telegram/SourceFiles/window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9c5272553678c0..2e1bc196baefad 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -435,7 +435,7 @@ void Window::init() { psInitFrameless(); setWindowIcon(wndIcon); - App::app()->installEventFilter(this); + Application::instance()->installEventFilter(this); connect(windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(stateChanged(Qt::WindowState))); connect(windowHandle(), SIGNAL(activeChanged()), this, SLOT(checkHistoryActivation()), Qt::QueuedConnection); @@ -2156,7 +2156,7 @@ QString LastCrashedWindow::getReportField(const QLatin1String &name, const QLati if (name == qstr("version")) { if (data.endsWith(qstr(" beta"))) { - data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").mid(0, data.size() - 5).toLongLong()); + data = QString::number(-data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong()); } else { data = QString::number(data.replace(QRegularExpression(qsl("[^\\d]")), "").toLongLong()); } From dd0c79ee5642695a39d5ff9d0e58e2f2b9f27534 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 7 Feb 2016 13:10:35 +0300 Subject: [PATCH 042/133] qt patch updated, os x tray icon fixed --- Telegram/_qtbase_5_5_1_patch.diff | 40 ++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/Telegram/_qtbase_5_5_1_patch.diff b/Telegram/_qtbase_5_5_1_patch.diff index e8057f0b10b6be..8447f44c48630b 100644 --- a/Telegram/_qtbase_5_5_1_patch.diff +++ b/Telegram/_qtbase_5_5_1_patch.diff @@ -282,7 +282,7 @@ index 112bb8e..45be6c6 100644 + } + } + } -+ ++ + families << family; } populateFromPattern(pattern); @@ -1149,7 +1149,7 @@ new file mode 100644 index 0000000..b47d332 --- /dev/null +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.cpp -@@ -0,0 +1,25 @@ +@@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -N -p fcitxqtinputcontextproxy -c FcitxQtInputContextProxy interfaces/org.fcitx.Fcitx.InputContext.xml -i fcitxqtformattedpreedit.h -i fcitxqt_export.h @@ -1175,6 +1175,7 @@ index 0000000..b47d332 +FcitxQtInputContextProxy::~FcitxQtInputContextProxy() +{ +} ++ diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputcontextproxy.h new file mode 100644 index 0000000..19874dc @@ -1493,7 +1494,7 @@ new file mode 100644 index 0000000..068f4c2 --- /dev/null +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.cpp -@@ -0,0 +1,25 @@ +@@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -N -p fcitxqtinputmethodproxy -c FcitxQtInputMethodProxy interfaces/org.fcitx.Fcitx.InputMethod.xml -i fcitxqtinputmethoditem.h -i fcitxqt_export.h @@ -1519,6 +1520,7 @@ index 0000000..068f4c2 +FcitxQtInputMethodProxy::~FcitxQtInputMethodProxy() +{ +} ++ diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtinputmethodproxy.h new file mode 100644 index 0000000..7aa37e2 @@ -1917,7 +1919,7 @@ new file mode 100644 index 0000000..7523a92 --- /dev/null +++ b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.cpp -@@ -0,0 +1,25 @@ +@@ -0,0 +1,26 @@ +/* + * This file was generated by qdbusxml2cpp version 0.8 + * Command line was: qdbusxml2cpp -N -p fcitxqtkeyboardproxy -c FcitxQtKeyboardProxy interfaces/org.fcitx.Fcitx.Keyboard.xml -i fcitxqtkeyboardlayout.h -i fcitxqt_export.h @@ -1943,6 +1945,7 @@ index 0000000..7523a92 +FcitxQtKeyboardProxy::~FcitxQtKeyboardProxy() +{ +} ++ diff --git a/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h b/src/plugins/platforminputcontexts/fcitx/fcitxqtkeyboardproxy.h new file mode 100644 index 0000000..42a6561 @@ -11201,7 +11204,7 @@ index ca92103..f681b08 100644 p.setCompositionMode(QPainter::CompositionMode_Source); const QVector rects = region.rects(); diff --git a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm -index 713758c..9a509b2 100755 +index 713758c..9b23ca2 100755 --- a/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm +++ b/src/plugins/platforms/cocoa/qcocoasystemtrayicon.mm @@ -94,6 +94,8 @@ QT_USE_NAMESPACE @@ -11213,17 +11216,22 @@ index 713758c..9a509b2 100755 QIcon icon; QT_MANGLE_NAMESPACE(QNSImageView) *imageCell; } -@@ -197,7 +199,8 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) +@@ -197,8 +199,12 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) // (device independent pixels). The menu height on past and // current OS X versions is 22 points. Provide some future-proofing // by deriving the icon height from the menu height. - const int padding = 4; +- const int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; + // create a good os x tray icon + const int padding = 0; - const int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; ++ int menuHeight = [[[NSApplication sharedApplication] mainMenu] menuBarHeight]; ++ if (menuHeight <= 0) { ++ menuHeight = 22; ++ } const int maxImageHeight = menuHeight - padding; -@@ -207,8 +210,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) + // Select pixmap based on the device pixel height. Ideally we would use +@@ -207,8 +213,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) // devicePixelRatio for the "best" screen on the system. qreal devicePixelRatio = qApp->devicePixelRatio(); const int maxPixmapHeight = maxImageHeight * devicePixelRatio; @@ -11236,7 +11244,7 @@ index 713758c..9a509b2 100755 // Select a pixmap based on the height. We want the largest pixmap // with a height smaller or equal to maxPixmapHeight. The pixmap // may rectangular; assume it has a reasonable size. If there is -@@ -224,9 +230,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) +@@ -224,9 +233,11 @@ void QCocoaSystemTrayIcon::updateIcon(const QIcon &icon) // Handle SVG icons, which do not return anything for availableSizes(). if (!selectedSize.isValid()) @@ -11250,7 +11258,7 @@ index 713758c..9a509b2 100755 // Draw a low-resolution icon if there is not enough pixels for a retina // icon. This prevents showing a small icon on retina displays. -@@ -373,6 +381,11 @@ QT_END_NAMESPACE +@@ -373,6 +384,11 @@ QT_END_NAMESPACE Q_UNUSED(notification); down = NO; @@ -11262,7 +11270,7 @@ index 713758c..9a509b2 100755 [self setNeedsDisplay:YES]; } -@@ -382,6 +395,10 @@ QT_END_NAMESPACE +@@ -382,6 +398,10 @@ QT_END_NAMESPACE int clickCount = [mouseEvent clickCount]; [self setNeedsDisplay:YES]; @@ -11273,7 +11281,7 @@ index 713758c..9a509b2 100755 if (clickCount == 2) { [self menuTrackingDone:nil]; [parent doubleClickSelector:self]; -@@ -398,6 +415,11 @@ QT_END_NAMESPACE +@@ -398,6 +418,11 @@ QT_END_NAMESPACE -(void)mouseUp:(NSEvent *)mouseEvent { Q_UNUSED(mouseEvent); @@ -11285,7 +11293,7 @@ index 713758c..9a509b2 100755 [self menuTrackingDone:nil]; } -@@ -409,6 +431,11 @@ QT_END_NAMESPACE +@@ -409,6 +434,11 @@ QT_END_NAMESPACE -(void)rightMouseUp:(NSEvent *)mouseEvent { Q_UNUSED(mouseEvent); @@ -11297,7 +11305,7 @@ index 713758c..9a509b2 100755 [self menuTrackingDone:nil]; } -@@ -424,7 +451,8 @@ QT_END_NAMESPACE +@@ -424,7 +454,8 @@ QT_END_NAMESPACE } -(void)drawRect:(NSRect)rect { @@ -11307,7 +11315,7 @@ index 713758c..9a509b2 100755 [super drawRect:rect]; } @end -@@ -436,7 +464,9 @@ QT_END_NAMESPACE +@@ -436,7 +467,9 @@ QT_END_NAMESPACE self = [super init]; if (self) { item = [[[NSStatusBar systemStatusBar] statusItemWithLength:NSSquareStatusItemLength] retain]; @@ -11317,7 +11325,7 @@ index 713758c..9a509b2 100755 systray = sys; imageCell = [[QNSImageView alloc] initWithParent:self]; [item setView: imageCell]; -@@ -481,6 +511,8 @@ QT_END_NAMESPACE +@@ -481,6 +514,8 @@ QT_END_NAMESPACE selector:@selector(menuTrackingDone:) name:NSMenuDidEndTrackingNotification object:m]; From 0b4ddb045eb053cdd5d4a6e633f276dfdcfe87ea Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 7 Feb 2016 18:38:49 +0300 Subject: [PATCH 043/133] max history width limited, custom tooltips replace QToolTip, keys with modifiers are not passed to MentionsDropdown --- Telegram/Resources/style.txt | 17 ++++ Telegram/Resources/style_classes.txt | 14 +++ Telegram/SourceFiles/application.cpp | 23 ++++- Telegram/SourceFiles/application.h | 2 + Telegram/SourceFiles/dropdown.cpp | 11 ++- Telegram/SourceFiles/gui/popupmenu.cpp | 123 ++++++++++++++++++++++++ Telegram/SourceFiles/gui/popupmenu.h | 37 +++++++ Telegram/SourceFiles/gui/text.cpp | 108 +++++++++++++++++++++ Telegram/SourceFiles/gui/text.h | 1 + Telegram/SourceFiles/history.cpp | 13 ++- Telegram/SourceFiles/history.h | 2 +- Telegram/SourceFiles/historywidget.cpp | 19 ++-- Telegram/SourceFiles/logs.cpp | 5 + Telegram/SourceFiles/overviewwidget.cpp | 13 +-- Telegram/SourceFiles/pspecific_wnd.cpp | 4 + Telegram/SourceFiles/window.cpp | 2 +- 16 files changed, 363 insertions(+), 31 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index a1f7a785cdb1fa..3e4eee98ec8066 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -269,6 +269,21 @@ defaultPopupMenu: PopupMenu { widthMin: 180px; widthMax: 300px; } + +defaultTooltip: Tooltip { + textBg: #eef2f5; + textFg: #5d6c80; + textFont: normalFont; + textBorder: #c9d1db; + textPadding: margins(5px, 2px, 5px, 2px); + + shift: point(-20px, 20px); + skip: 10px; + + widthMax: 800px; + linesMax: 12; +} + almostTransparent: #ffffff0d; boxScroll: flatScroll(solidScroll) { width: 18px; @@ -999,6 +1014,8 @@ historyToEndSkip: 10px; activeFadeInDuration: 500; activeFadeOutDuration: 3000; +historyMaxWidth: 640px; + msgRadius: 3px; msgMaxWidth: 430px; diff --git a/Telegram/Resources/style_classes.txt b/Telegram/Resources/style_classes.txt index 611b367a411c4e..0610af6bb4ab63 100644 --- a/Telegram/Resources/style_classes.txt +++ b/Telegram/Resources/style_classes.txt @@ -272,6 +272,20 @@ PopupMenu { widthMax: number; } +Tooltip { + textBg: color; + textFg: color; + textFont: font; + textBorder: color; + textPadding: margins; + + shift: point; + skip: number; + + widthMax: number; + linesMax: number; +} + botKeyboardButton { margin: number; padding: number; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f5d565abd8880e..8d23bd21896175 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -70,6 +70,13 @@ namespace { App::wnd()->setWindowState(Qt::WindowMinimized); return true; } + } else { + if ((ev->key() == Qt::Key_W || ev->key() == Qt::Key_F4) && (ev->modifiers() & Qt::ControlModifier)) { + if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { + App::wnd()->minimizeToTray(); + return true; + } + } } if (ev->key() == Qt::Key_MediaPlay) { if (App::main()) App::main()->player()->playPressed(); @@ -279,7 +286,15 @@ void Application::singleInstanceChecked() { if (status == SignalHandlers::CantOpen) { new NotStartedWindow(); } else if (status == SignalHandlers::LastCrashed) { - new LastCrashedWindow(); + if (Global::LastCrashDump().isEmpty()) { // don't handle bad closing for now + if (SignalHandlers::restart() == SignalHandlers::CantOpen) { + new NotStartedWindow(); + } else { + Sandboxer::startSandbox(); + } + } else { + new LastCrashedWindow(); + } } else { Sandboxer::startSandbox(); } @@ -560,6 +575,12 @@ namespace Sandboxer { return false; } + void installEventFilter(QObject *filter) { + if (Application *a = application()) { + a->installEventFilter(filter); + } + } + void execExternal(const QString &cmd) { DEBUG_LOG(("Application Info: executing external command '%1'").arg(cmd)); if (cmd == "show") { diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index d1a0f857c79d13..2cfe56b5d8d10c 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -112,6 +112,8 @@ namespace Sandboxer { void setActiveWindow(QWidget *window); bool isSavingSession(); + void installEventFilter(QObject *filter); + void execExternal(const QString &cmd); #ifndef TDESKTOP_DISABLE_AUTOUPDATE diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 129ec45cc07b07..62cd0b5009a336 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -4064,6 +4064,7 @@ bool MentionsInner::select() { if (!_srows->isEmpty()) { if (_sel >= 0 && _sel < _srows->size()) { emit selected(_srows->at(_sel)); + return true; } } else { QString sel = getSelected(); @@ -4636,10 +4637,12 @@ bool MentionsDropdown::eventFilter(QObject *obj, QEvent *e) { if (isHidden()) return QWidget::eventFilter(obj, e); if (e->type() == QEvent::KeyPress) { QKeyEvent *ev = static_cast(e); - if (ev->key() == Qt::Key_Up || ev->key() == Qt::Key_Down || (!_srows.isEmpty() && (ev->key() == Qt::Key_Left || ev->key() == Qt::Key_Right))) { - return _inner.moveSel(ev->key()); - } else if (ev->key() == Qt::Key_Enter || ev->key() == Qt::Key_Return) { - return _inner.select(); + if (!(ev->modifiers() & (Qt::AltModifier | Qt::ControlModifier | Qt::ShiftModifier | Qt::MetaModifier))) { + if (ev->key() == Qt::Key_Up || ev->key() == Qt::Key_Down || (!_srows.isEmpty() && (ev->key() == Qt::Key_Left || ev->key() == Qt::Key_Right))) { + return _inner.moveSel(ev->key()); + } else if (ev->key() == Qt::Key_Enter || ev->key() == Qt::Key_Return) { + return _inner.select(); + } } } return QWidget::eventFilter(obj, e); diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index 349fec1af37eec..a2adda19af2b69 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -520,3 +520,126 @@ PopupMenu::~PopupMenu() { } #endif } + +PopupTooltip *PopupTooltipInstance = 0; + +PopupTooltip::PopupTooltip(const QPoint &p, const QString &text, const style::Tooltip &st) : TWidget(0) +, _st(0) { + if (PopupTooltip *instance = PopupTooltipInstance) { + hide(); + deleteLater(); + } else { + PopupTooltipInstance = this; + Sandboxer::installEventFilter(this); + _hideByLeaveTimer.setSingleShot(true); + connect(&_hideByLeaveTimer, SIGNAL(timeout()), this, SLOT(onHideByLeave())); + } + + setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::ToolTip | Qt::NoDropShadowWindowHint); + setAttribute(Qt::WA_NoSystemBackground, true); + + PopupTooltipInstance->popup(p, text, &st); +} + +bool PopupTooltip::eventFilter(QObject *o, QEvent *e) { + if (e->type() == QEvent::Leave) { + _hideByLeaveTimer.start(10); + } else if (e->type() == QEvent::Enter) { + _hideByLeaveTimer.stop(); + } else if (e->type() == QEvent::MouseMove) { + if ((QCursor::pos() - _point).manhattanLength() > QApplication::startDragDistance()) { + Hide(); + } + } + return TWidget::eventFilter(o, e); +} + +void PopupTooltip::onHideByLeave() { + Hide(); +} + +PopupTooltip::~PopupTooltip() { + if (PopupTooltipInstance == this) { + PopupTooltipInstance = 0; + } +} + +void PopupTooltip::popup(const QPoint &m, const QString &text, const style::Tooltip *st) { + _point = m; + _st = st; + _text = Text(_st->textFont, text, _textPlainOptions, _st->widthMax, true); + + int32 addw = 2 * st::lineWidth + _st->textPadding.left() + _st->textPadding.right(); + int32 addh = 2 * st::lineWidth + _st->textPadding.top() + _st->textPadding.bottom(); + + // count tooltip size + QSize s(addw + _text.maxWidth(), addh + _text.minHeight()); + if (s.width() > _st->widthMax) { + s.setWidth(addw + _text.countWidth(_st->widthMax - addw)); + s.setHeight(addh + _text.countHeight(s.width() - addw)); + } + int32 maxh = addh + (_st->linesMax * _st->textFont->height); + if (s.height() > maxh) { + s.setHeight(maxh); + } + + // count tooltip position + QPoint p(m + _st->shift); + if (rtl()) { + p.setX(m.x() - s.width() - _st->shift.x()); + } + if (s.width() < 2 * _st->shift.x()) { + p.setX(m.x() - (s.width() / 2)); + } + + // adjust tooltip position + QRect r(QApplication::desktop()->screenGeometry(m)); + if (r.x() + r.width() - _st->skip < p.x() + s.width() && p.x() + s.width() > m.x()) { + p.setX(qMax(r.x() + r.width() - int32(_st->skip) - s.width(), m.x() - s.width())); + } + if (r.x() + _st->skip > p.x() && p.x() < m.x()) { + p.setX(qMin(m.x(), r.x() + int32(_st->skip))); + } + if (r.y() + r.height() - _st->skip < p.y() + s.height()) { + p.setY(m.y() - s.height() - _st->skip); + } + if (r.y() > p.x()) { + p.setY(qMin(m.y() + _st->shift.y(), r.y() + r.height() - s.height())); + } + + setGeometry(QRect(p, s)); + + _hideByLeaveTimer.stop(); + show(); +} + +void PopupTooltip::paintEvent(QPaintEvent *e) { + Painter p(this); + + p.fillRect(rect(), _st->textBg); + + p.fillRect(QRect(0, 0, width(), st::lineWidth), _st->textBorder); + p.fillRect(QRect(0, height() - st::lineWidth, width(), st::lineWidth), _st->textBorder); + p.fillRect(QRect(0, st::lineWidth, st::lineWidth, height() - 2 * st::lineWidth), _st->textBorder); + p.fillRect(QRect(width() - st::lineWidth, st::lineWidth, st::lineWidth, height() - 2 * st::lineWidth), _st->textBorder); + + int32 lines = qFloor((height() - 2 * st::lineWidth - _st->textPadding.top() - _st->textPadding.bottom()) / _st->textFont->height); + + p.setPen(_st->textFg); + _text.drawElided(p, st::lineWidth + _st->textPadding.left(), st::lineWidth + _st->textPadding.top(), width() - 2 * st::lineWidth - _st->textPadding.left() - _st->textPadding.right(), lines); +} + +void PopupTooltip::hideEvent(QHideEvent *e) { + if (PopupTooltipInstance == this) { + PopupTooltipInstance = 0; + deleteLater(); + } +} + +void PopupTooltip::Hide() { + if (PopupTooltip *instance = PopupTooltipInstance) { + PopupTooltipInstance = 0; + instance->hide(); + instance->deleteLater(); + } +} diff --git a/Telegram/SourceFiles/gui/popupmenu.h b/Telegram/SourceFiles/gui/popupmenu.h index 121984e830dcb5..354bf445b1fb1b 100644 --- a/Telegram/SourceFiles/gui/popupmenu.h +++ b/Telegram/SourceFiles/gui/popupmenu.h @@ -17,6 +17,8 @@ */ #pragma once +#include "text.h" + class PopupMenu : public TWidget { Q_OBJECT @@ -105,3 +107,38 @@ public slots: bool _deleteOnHide, _triggering, _deleteLater; }; + +class PopupTooltip : public TWidget { + Q_OBJECT + +public: + + PopupTooltip(const QPoint &p, const QString &text, const style::Tooltip &st = st::defaultTooltip); + + bool eventFilter(QObject *o, QEvent *e); + + static void Hide(); + + ~PopupTooltip(); + +public slots: + + void onHideByLeave(); + +protected: + + void paintEvent(QPaintEvent *e); + void hideEvent(QHideEvent *e); + +private: + + void popup(const QPoint &p, const QString &text, const style::Tooltip *st); + + Text _text; + QPoint _point; + + const style::Tooltip *_st; + + QTimer _hideByLeaveTimer; + +}; diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 9fe984d736d01f..cab543cede9499 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -886,6 +886,8 @@ namespace { void TextLink::onClick(Qt::MouseButton button) const { if (button == Qt::LeftButton || button == Qt::MiddleButton) { + PopupTooltip::Hide(); + QString url = TextLink::encoded(); QRegularExpressionMatch telegramMeUser = QRegularExpression(qsl("^https?://telegram\\.me/([a-zA-Z0-9\\.\\_]+)/?(\\?|$)"), QRegularExpression::CaseInsensitiveOption).match(url); QRegularExpressionMatch telegramMeGroup = QRegularExpression(qsl("^https?://telegram\\.me/joinchat/([a-zA-Z0-9\\.\\_\\-]+)(\\?|$)"), QRegularExpression::CaseInsensitiveOption).match(url); @@ -912,6 +914,7 @@ void TextLink::onClick(Qt::MouseButton button) const { void EmailLink::onClick(Qt::MouseButton button) const { if (button == Qt::LeftButton || button == Qt::MiddleButton) { + PopupTooltip::Hide(); QUrl url(qstr("mailto:") + _email); if (!QDesktopServices::openUrl(url)) { psOpenFile(url.toString(QUrl::FullyEncoded), true); @@ -2713,6 +2716,111 @@ void Text::removeSkipBlock() { } } +int32 Text::countWidth(int32 w) const { + QFixed width = w; + if (width < _minResizeWidth) width = _minResizeWidth; + if (width >= _maxWidth) { + return _maxWidth.ceil().toInt(); + } + + QFixed minWidthLeft = width, widthLeft = width, last_rBearing = 0, last_rPadding = 0; + bool longWordLine = true; + for (TextBlocks::const_iterator i = _blocks.cbegin(), e = _blocks.cend(); i != e; ++i) { + ITextBlock *b = *i; + TextBlockType _btype = b->type(); + int32 blockHeight = _blockHeight(b, _font); + QFixed _rb = _blockRBearing(b); + + if (_btype == TextBlockTNewline) { + last_rBearing = _rb; + last_rPadding = b->f_rpadding(); + if (widthLeft < minWidthLeft) { + minWidthLeft = widthLeft; + } + widthLeft = width - (b->f_width() - last_rBearing); + + longWordLine = true; + continue; + } + QFixed lpadding = b->f_lpadding(); + QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + b->f_width() - _rb); + if (newWidthLeft >= 0) { + last_rBearing = _rb; + last_rPadding = b->f_rpadding(); + widthLeft = newWidthLeft; + + longWordLine = false; + continue; + } + + if (_btype == TextBlockTText) { + TextBlock *t = static_cast(b); + if (t->_words.isEmpty()) { // no words in this block, spaces only => layout this block in the same line + last_rPadding += lpadding; + + longWordLine = false; + continue; + } + + QFixed f_wLeft = widthLeft; + for (TextBlock::TextWords::const_iterator j = t->_words.cbegin(), e = t->_words.cend(), f = j; j != e; ++j) { + bool wordEndsHere = (j->width >= 0); + QFixed j_width = wordEndsHere ? j->width : -j->width; + + QFixed newWidthLeft = widthLeft - lpadding - last_rBearing - (last_rPadding + j_width - j->f_rbearing()); + lpadding = 0; + if (newWidthLeft >= 0) { + last_rBearing = j->f_rbearing(); + last_rPadding = j->rpadding; + widthLeft = newWidthLeft; + + if (wordEndsHere) { + longWordLine = false; + } + if (wordEndsHere || longWordLine) { + f_wLeft = widthLeft; + f = j + 1; + } + continue; + } + + if (f != j) { + j = f; + widthLeft = f_wLeft; + j_width = (j->width >= 0) ? j->width : -j->width; + } + + last_rBearing = j->f_rbearing(); + last_rPadding = j->rpadding; + if (widthLeft < minWidthLeft) { + minWidthLeft = widthLeft; + } + widthLeft = width - (j_width - last_rBearing); + + longWordLine = true; + f = j + 1; + f_wLeft = widthLeft; + } + continue; + } + + last_rBearing = _rb; + last_rPadding = b->f_rpadding(); + if (widthLeft < minWidthLeft) { + minWidthLeft = widthLeft; + } + widthLeft = width - (b->f_width() - last_rBearing); + + longWordLine = true; + continue; + } + if (widthLeft < minWidthLeft) { + minWidthLeft = widthLeft; + } + + return (width - minWidthLeft).ceil().toInt(); +} + int32 Text::countHeight(int32 w) const { QFixed width = w; if (width < _minResizeWidth) width = _minResizeWidth; diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index bd95be31633372..b742b41d8e4c09 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -549,6 +549,7 @@ class Text { Text(const Text &other); Text &operator=(const Text &other); + int32 countWidth(int32 width) const; int32 countHeight(int32 width) const; void setText(style::font font, const QString &text, const TextParseOptions &options = _defaultOptions); void setRichText(style::font font, const QString &text, TextParseOptions options = _defaultOptions, const TextCustomTagsMap &custom = TextCustomTagsMap()); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index c2c9e796494814..f25a464b9eedcf 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -4604,7 +4604,7 @@ void HistoryGif::draw(Painter &p, const HistoryItem *parent, const QRect &r, boo if (!_caption.isEmpty()) { p.setPen(st::black); _caption.draw(p, st::msgPadding.left(), skipy + height + st::mediaPadding.bottom() + st::mediaCaptionSkip, captionw); - } else if (parent->getMedia() == this) { + } else if (parent->getMedia() == this && (_data->uploading() || App::hoveredItem() == parent)) { int32 fullRight = skipx + width, fullBottom = skipy + height; parent->drawInfo(p, fullRight, fullBottom, 2 * skipx + width, selected, InfoDisplayOverImage); } @@ -6209,17 +6209,22 @@ void HistoryMessage::initDimensions() { } void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { - int32 mwidth = qMin(int(st::msgMaxWidth), _maxw); + int32 mwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width; if (_media && _media->currentWidth() < mwidth) { mwidth = qMax(_media->currentWidth(), qMin(mwidth, plainMaxWidth())); } - left = (!fromChannel() && out()) ? st::msgMargin.right() : st::msgMargin.left(); + left = 0; + if (hwidth > st::historyMaxWidth) { + left = (hwidth - st::historyMaxWidth) / 2; + hwidth = st::historyMaxWidth; + } + left += (!fromChannel() && out()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { left += st::msgPhotoSkip; } - width = _history->width - st::msgMargin.left() - st::msgMargin.right(); + width = hwidth - st::msgMargin.left() - st::msgMargin.right(); if (width > mwidth) { if (!fromChannel() && out()) { left += width - mwidth; diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 360d2cedc75537..0cdd33cda9c66d 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -2010,7 +2010,7 @@ class HistoryMessage : public HistoryItem { return drawBubble(); } bool displayFromName() const { - return hasFromName() && (!emptyText() || !_media || !_media->isDisplayed() || toHistoryReply() || viaBot() || !_media->hideFromName()); + return hasFromName() && (!emptyText() || !_media || !_media->isDisplayed() || toHistoryReply() || toHistoryForwarded() || viaBot() || !_media->hideFromName()); } bool uploading() const { return _media && _media->uploading(); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 95830b4e86be11..21c119671ed25e 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -458,6 +458,7 @@ void HistoryInner::touchScrollUpdated(const QPoint &screenPos) { QPoint HistoryInner::mapMouseToItem(QPoint p, HistoryItem *item) { int32 msgy = itemTop(item); if (msgy < 0) return QPoint(0, 0); + p.setY(p.y() - msgy); return p; } @@ -1616,7 +1617,7 @@ void HistoryInner::onUpdateSelected() { } } textlnkOver(lnk); - QToolTip::hideText(); + PopupTooltip::Hide(); App::hoveredLinkItem((lnk && !lnkInDesc) ? item : 0); if (textlnkOver()) { if (HistoryItem *item = App::hoveredLinkItem()) { @@ -1631,7 +1632,7 @@ void HistoryInner::onUpdateSelected() { _tooltipTimer.start(1000); } if (_dragCursorState == HistoryInDateCursorState && cursorState != HistoryInDateCursorState) { - QToolTip::hideText(); + PopupTooltip::Hide(); } if (_dragAction == NoDrag) { @@ -1870,14 +1871,11 @@ void HistoryInner::applyDragSelection(SelectedItems *toItems) const { void HistoryInner::showLinkTip() { TextLinkPtr lnk = textlnkOver(); - int32 dd = QApplication::startDragDistance(); - QPoint dp(mapFromGlobal(_dragPos)); - QRect r(dp.x() - dd, dp.y() - dd, 2 * dd, 2 * dd); if (lnk && !lnk->fullDisplayed()) { - QToolTip::showText(_dragPos, lnk->readable(), this, r); + new PopupTooltip(_dragPos, lnk->readable()); } else if (_dragCursorState == HistoryInDateCursorState && _dragAction == NoDrag) { if (App::hoveredItem()) { - QToolTip::showText(_dragPos, App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)), this, r); + new PopupTooltip(_dragPos, App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat))); } } } @@ -2265,10 +2263,7 @@ void BotKeyboard::showCommandTip() { if (_sel >= 0) { int row = (_sel / MatrixRowShift), col = _sel % MatrixRowShift; if (!_btns.at(row).at(col).full) { - int32 dd = QApplication::startDragDistance(); - QPoint dp(mapFromGlobal(_lastMousePos)); - QRect r(dp.x() - dd, dp.y() - dd, 2 * dd, 2 * dd); - QToolTip::showText(_lastMousePos, _btns.at(row).at(col).cmd, this, r); + new PopupTooltip(_lastMousePos, _btns.at(row).at(col).cmd); } } } @@ -2294,7 +2289,7 @@ void BotKeyboard::updateSelected() { if (newSel >= 0) break; } if (newSel != _sel) { - QToolTip::hideText(); + PopupTooltip::Hide(); if (newSel < 0) { setCursor(style::cur_default); } else if (_sel < 0) { diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index c987c70c62904a..f5b6ac4c66ffcb 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -24,7 +24,12 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org // see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/ #ifdef Q_OS_WIN + +#pragma warning(push) +#pragma warning(disable:4091) #include "client/windows/handler/exception_handler.h" +#pragma warning(pop) + #elif defined Q_OS_MAC #ifdef MAC_USE_BREAKPAD diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 4c13164d4ac6fa..8eefed34f19630 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1000,7 +1000,7 @@ void OverviewInner::onUpdateSelected() { } } textlnkOver(lnk); - QToolTip::hideText(); + PopupTooltip::Hide(); App::hoveredLinkItem(lnk ? item : 0); if (textlnkOver()) { if (item && index >= 0) { @@ -1015,10 +1015,10 @@ void OverviewInner::onUpdateSelected() { lnkChanged = true; if (oldMousedItem) repaintItem(oldMousedItem, oldMousedItemIndex); if (item) repaintItem(item); - QToolTip::hideText(); + PopupTooltip::Hide(); } if (_cursorState == HistoryInDateCursorState && cursorState != HistoryInDateCursorState) { - QToolTip::hideText(); + PopupTooltip::Hide(); } if (cursorState != _cursorState) { _cursorState = cursorState; @@ -1142,14 +1142,11 @@ void OverviewInner::onUpdateSelected() { void OverviewInner::showLinkTip() { TextLinkPtr lnk = textlnkOver(); - int32 dd = QApplication::startDragDistance(); - QPoint dp(mapFromGlobal(_dragPos)); - QRect r(dp.x() - dd, dp.y() - dd, 2 * dd, 2 * dd); if (lnk && !lnk->fullDisplayed()) { - QToolTip::showText(_dragPos, lnk->readable(), this, r); + new PopupTooltip(_dragPos, lnk->readable()); } else if (_cursorState == HistoryInDateCursorState && _dragAction == NoDrag && _mousedItem) { if (HistoryItem *item = App::histItemById(itemChannel(_mousedItem), itemMsgId(_mousedItem))) { - QToolTip::showText(_dragPos, item->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)), this, r); + new PopupTooltip(_dragPos, item->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat))); } } } diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index d871085c597103..4ff51a0cb0d229 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -37,7 +37,11 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include #include +#pragma warning(push) +#pragma warning(disable:4091) #include +#pragma warning(pop) + #include #include #include diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 2e1bc196baefad..e799961a43186b 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2005,7 +2005,7 @@ LastCrashedWindow::LastCrashedWindow() , _reportText(QString::fromUtf8(Global::LastCrashDump())) , _reportShown(false) , _reportSaved(false) -, _sendingState(Global::LastCrashDump().isEmpty() ? SendingNoReport : SendingUpdateCheck) +, _sendingState(((!cDevVersion() && !cBetaVersion()) || Global::LastCrashDump().isEmpty()) ? SendingNoReport : SendingUpdateCheck) , _updating(this) , _sendingProgress(0) , _sendingTotal(0) From 47ead0392529245dd5896120d37b746cf74d711b Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 7 Feb 2016 21:58:42 +0300 Subject: [PATCH 044/133] moved Interfaces to types.h, tooltip hiding fixed --- Telegram/SourceFiles/facades.cpp | 11 +- Telegram/SourceFiles/facades.h | 5 +- Telegram/SourceFiles/gui/popupmenu.cpp | 57 ++++++-- Telegram/SourceFiles/gui/popupmenu.h | 20 ++- Telegram/SourceFiles/historywidget.cpp | 33 +++-- Telegram/SourceFiles/historywidget.h | 18 +-- Telegram/SourceFiles/overviewwidget.cpp | 14 +- Telegram/SourceFiles/overviewwidget.h | 7 +- Telegram/SourceFiles/structs.cpp | 31 ----- Telegram/SourceFiles/structs.h | 168 ------------------------ Telegram/SourceFiles/types.cpp | 31 +++++ Telegram/SourceFiles/types.h | 168 ++++++++++++++++++++++++ 12 files changed, 312 insertions(+), 251 deletions(-) diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 4cb9c6202384f1..00edb264601dcb 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -315,15 +315,16 @@ namespace Sandbox { t_assert_full(SandboxData != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ return SandboxData->Name; \ } -#define DefineSandbox(Type, Name) DefineSandboxReadOnly(Type, Name) \ -void Set##Name(const Type &Name) { \ - t_assert_full(SandboxData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ - SandboxData->Name = Name; \ -} \ +#define DefineSandboxRef(Type, Name) DefineSandboxReadOnly(Type, Name) \ Type &Ref##Name() { \ t_assert_full(SandboxData != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ return SandboxData->Name; \ } +#define DefineSandbox(Type, Name) DefineSandboxRef(Type, Name) \ +void Set##Name(const Type &Name) { \ + t_assert_full(SandboxData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ + SandboxData->Name = Name; \ +} DefineSandboxReadOnly(uint64, LaunchId); diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 9797a95f3d46c4..5b142925212f90 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -123,9 +123,10 @@ namespace Sandbox { void finish(); #define DeclareSandboxReadOnly(Type, Name) const Type &Name(); -#define DeclareSandbox(Type, Name) DeclareSandboxReadOnly(Type, Name) \ - void Set##Name(const Type &Name); \ +#define DeclareSandboxRef(Type, Name) DeclareSandboxReadOnly(Type, Name) \ Type &Ref##Name(); +#define DeclareSandbox(Type, Name) DeclareSandboxRef(Type, Name) \ + void Set##Name(const Type &Name); DeclareSandboxReadOnly(uint64, LaunchId); diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index a2adda19af2b69..e64fe2feb08949 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -523,22 +523,33 @@ PopupMenu::~PopupMenu() { PopupTooltip *PopupTooltipInstance = 0; -PopupTooltip::PopupTooltip(const QPoint &p, const QString &text, const style::Tooltip &st) : TWidget(0) -, _st(0) { - if (PopupTooltip *instance = PopupTooltipInstance) { - hide(); - deleteLater(); - } else { - PopupTooltipInstance = this; - Sandboxer::installEventFilter(this); - _hideByLeaveTimer.setSingleShot(true); - connect(&_hideByLeaveTimer, SIGNAL(timeout()), this, SLOT(onHideByLeave())); +AbstractTooltipShower::~AbstractTooltipShower() { + if (PopupTooltipInstance && PopupTooltipInstance->_shower == this) { + PopupTooltipInstance->_shower = 0; } +} + +PopupTooltip::PopupTooltip() : TWidget(0) +, _shower(0) +, _st(0) { + PopupTooltipInstance = this; setWindowFlags(Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::ToolTip | Qt::NoDropShadowWindowHint); setAttribute(Qt::WA_NoSystemBackground, true); - PopupTooltipInstance->popup(p, text, &st); + _showTimer.setSingleShot(true); + connect(&_showTimer, SIGNAL(timeout()), this, SLOT(onShow())); +} + +void PopupTooltip::onShow() { + if (_shower) { + QString text = _shower->tooltipText(); + if (text.isEmpty()) { + Hide(); + } else { + PopupTooltipInstance->popup(_shower->tooltipPos(), text, _shower->tooltipSt()); + } + } } bool PopupTooltip::eventFilter(QObject *o, QEvent *e) { @@ -565,6 +576,13 @@ PopupTooltip::~PopupTooltip() { } void PopupTooltip::popup(const QPoint &m, const QString &text, const style::Tooltip *st) { + if (!_hideByLeaveTimer.isSingleShot()) { + _hideByLeaveTimer.setSingleShot(true); + connect(&_hideByLeaveTimer, SIGNAL(timeout()), this, SLOT(onHideByLeave())); + + Sandboxer::installEventFilter(this); + } + _point = m; _st = st; _text = Text(_st->textFont, text, _textPlainOptions, _st->widthMax, true); @@ -631,14 +649,27 @@ void PopupTooltip::paintEvent(QPaintEvent *e) { void PopupTooltip::hideEvent(QHideEvent *e) { if (PopupTooltipInstance == this) { - PopupTooltipInstance = 0; - deleteLater(); + Hide(); + } +} + +void PopupTooltip::Show(int32 delay, const AbstractTooltipShower *shower) { + if (!PopupTooltipInstance) { + new PopupTooltip(); + } + PopupTooltipInstance->_shower = shower; + if (delay >= 0) { + PopupTooltipInstance->_showTimer.start(delay); + } else { + PopupTooltipInstance->onShow(); } } void PopupTooltip::Hide() { if (PopupTooltip *instance = PopupTooltipInstance) { PopupTooltipInstance = 0; + instance->_showTimer.stop(); + instance->_hideByLeaveTimer.stop(); instance->hide(); instance->deleteLater(); } diff --git a/Telegram/SourceFiles/gui/popupmenu.h b/Telegram/SourceFiles/gui/popupmenu.h index 354bf445b1fb1b..b0ae5b2dded8ab 100644 --- a/Telegram/SourceFiles/gui/popupmenu.h +++ b/Telegram/SourceFiles/gui/popupmenu.h @@ -108,21 +108,31 @@ public slots: }; +class AbstractTooltipShower { +public: + virtual QString tooltipText() const = 0; + virtual QPoint tooltipPos() const = 0; + virtual const style::Tooltip *tooltipSt() const { + return &st::defaultTooltip; + } + virtual ~AbstractTooltipShower(); +}; + class PopupTooltip : public TWidget { Q_OBJECT public: - PopupTooltip(const QPoint &p, const QString &text, const style::Tooltip &st = st::defaultTooltip); - bool eventFilter(QObject *o, QEvent *e); + static void Show(int32 delay, const AbstractTooltipShower *shower); static void Hide(); ~PopupTooltip(); public slots: + void onShow(); void onHideByLeave(); protected: @@ -132,8 +142,14 @@ public slots: private: + PopupTooltip(); + void popup(const QPoint &p, const QString &text, const style::Tooltip *st); + friend class AbstractTooltipShower; + const AbstractTooltipShower *_shower; + QTimer _showTimer; + Text _text; QPoint _point; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 21c119671ed25e..85b7e90420ed77 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -75,8 +75,6 @@ HistoryInner::HistoryInner(HistoryWidget *historyWidget, ScrollArea *scroll, His , _menu(0) { connect(App::wnd(), SIGNAL(imageLoaded()), this, SLOT(update())); - _tooltipTimer.setSingleShot(true); - connect(&_tooltipTimer, SIGNAL(timeout()), this, SLOT(showLinkTip())); _touchSelectTimer.setSingleShot(true); connect(&_touchSelectTimer, SIGNAL(timeout()), this, SLOT(onTouchSelect())); @@ -1628,12 +1626,12 @@ void HistoryInner::onUpdateSelected() { } } } - if (lnk || cursorState == HistoryInDateCursorState) { - _tooltipTimer.start(1000); - } if (_dragCursorState == HistoryInDateCursorState && cursorState != HistoryInDateCursorState) { PopupTooltip::Hide(); } + if (lnk || cursorState == HistoryInDateCursorState) { + PopupTooltip::Show(1000, this); + } if (_dragAction == NoDrag) { _dragCursorState = cursorState; @@ -1869,15 +1867,20 @@ void HistoryInner::applyDragSelection(SelectedItems *toItems) const { } } -void HistoryInner::showLinkTip() { +QString HistoryInner::tooltipText() const { TextLinkPtr lnk = textlnkOver(); if (lnk && !lnk->fullDisplayed()) { - new PopupTooltip(_dragPos, lnk->readable()); + return lnk->readable(); } else if (_dragCursorState == HistoryInDateCursorState && _dragAction == NoDrag) { if (App::hoveredItem()) { - new PopupTooltip(_dragPos, App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat))); + return App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)); } } + return QString(); +} + +QPoint HistoryInner::tooltipPos() const { + return _dragPos; } void HistoryInner::onParentGeometryChanged() { @@ -2017,9 +2020,6 @@ BotKeyboard::BotKeyboard() : TWidget() setGeometry(0, 0, _st->margin, _st->margin); _height = _st->margin; setMouseTracking(true); - - _cmdTipTimer.setSingleShot(true); - connect(&_cmdTipTimer, SIGNAL(timeout()), this, SLOT(showCommandTip())); } void BotKeyboard::paintEvent(QPaintEvent *e) { @@ -2259,17 +2259,22 @@ void BotKeyboard::clearSelection() { } } -void BotKeyboard::showCommandTip() { +QPoint BotKeyboard::tooltipPos() const { + return _lastMousePos; +} + +QString BotKeyboard::tooltipText() const { if (_sel >= 0) { int row = (_sel / MatrixRowShift), col = _sel % MatrixRowShift; if (!_btns.at(row).at(col).full) { - new PopupTooltip(_lastMousePos, _btns.at(row).at(col).cmd); + return _btns.at(row).at(col).cmd; } } + return QString(); } void BotKeyboard::updateSelected() { - _cmdTipTimer.start(1000); + PopupTooltip::Show(1000, this); if (_down >= 0) return; diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 6aae8e548e0a6c..94c5ad30daf2e0 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -33,7 +33,7 @@ enum DragState { }; class HistoryWidget; -class HistoryInner : public TWidget { +class HistoryInner : public TWidget, public AbstractTooltipShower { Q_OBJECT public: @@ -97,6 +97,10 @@ class HistoryInner : public TWidget { void notifyIsBotChanged(); void notifyMigrateUpdated(); + // AbstractTooltipShower + virtual QString tooltipText() const; + virtual QPoint tooltipPos() const; + ~HistoryInner(); public slots: @@ -104,8 +108,6 @@ public slots: void onUpdateSelected(); void onParentGeometryChanged(); - void showLinkTip(); - void openContextUrl(); void copyContextUrl(); void saveContextImage(); @@ -150,8 +152,6 @@ public slots: bool _firstLoading; - QTimer _tooltipTimer; - Qt::CursorShape _cursor; typedef QMap SelectedItems; SelectedItems _selected; @@ -249,7 +249,7 @@ class ReportSpamPanel : public TWidget { }; -class BotKeyboard : public TWidget { +class BotKeyboard : public TWidget, public AbstractTooltipShower { Q_OBJECT public: @@ -277,9 +277,12 @@ class BotKeyboard : public TWidget { return _wasForMsgId; } + // AbstractTooltipShower + virtual QString tooltipText() const; + virtual QPoint tooltipPos() const; + public slots: - void showCommandTip(); void updateSelected(); private: @@ -290,7 +293,6 @@ public slots: FullMsgId _wasForMsgId; int32 _height, _maxOuterHeight; bool _maximizeSize, _singleUse, _forceReply; - QTimer _cmdTipTimer; QPoint _lastMousePos; struct Button { diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 8eefed34f19630..2ddf41cb0364c8 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -91,8 +91,6 @@ OverviewInner::OverviewInner(OverviewWidget *overview, ScrollArea *scroll, PeerD App::contextItem(0); - _linkTipTimer.setSingleShot(true); - connect(&_linkTipTimer, SIGNAL(timeout()), this, SLOT(showLinkTip())); _touchSelectTimer.setSingleShot(true); connect(&_touchSelectTimer, SIGNAL(timeout()), this, SLOT(onTouchSelect())); @@ -1024,7 +1022,7 @@ void OverviewInner::onUpdateSelected() { _cursorState = cursorState; } if (lnk || cursorState == HistoryInDateCursorState) { - _linkTipTimer.start(1000); + PopupTooltip::Show(1000, this); } fixItemIndex(_dragItemIndex, _dragItem); @@ -1139,16 +1137,20 @@ void OverviewInner::onUpdateSelected() { } } +QPoint OverviewInner::tooltipPos() const { + return _dragPos; +} -void OverviewInner::showLinkTip() { +QString OverviewInner::tooltipText() const { TextLinkPtr lnk = textlnkOver(); if (lnk && !lnk->fullDisplayed()) { - new PopupTooltip(_dragPos, lnk->readable()); + return lnk->readable(); } else if (_cursorState == HistoryInDateCursorState && _dragAction == NoDrag && _mousedItem) { if (HistoryItem *item = App::histItemById(itemChannel(_mousedItem), itemMsgId(_mousedItem))) { - new PopupTooltip(_dragPos, item->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat))); + return item->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)); } } + return QString(); } void OverviewInner::updateDragSelection(MsgId dragSelFrom, int32 dragSelFromIndex, MsgId dragSelTo, int32 dragSelToIndex, bool dragSelecting) { diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index 62ea9d915ee812..d2740e0441a5d3 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -21,7 +21,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #pragma once class OverviewWidget; -class OverviewInner : public QWidget, public RPCSender { +class OverviewInner : public QWidget, public AbstractTooltipShower, public RPCSender { Q_OBJECT public: @@ -76,12 +76,15 @@ class OverviewInner : public QWidget, public RPCSender { void clearSelectedItems(bool onlyTextSelection = false); void fillSelectedItems(SelectedItemSet &sel, bool forDelete = true); + // AbstractTooltipShower + virtual QString tooltipText() const; + virtual QPoint tooltipPos() const; + ~OverviewInner(); public slots: void onUpdateSelected(); - void showLinkTip(); void openContextUrl(); void copyContextUrl(); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 81c7e8568bd92a..34bd47fba4bbc3 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -34,37 +34,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #include "audio.h" #include "localstorage.h" -class InterfacesMetadatasMap : public QMap { -public: - ~InterfacesMetadatasMap() { - for (const_iterator i = cbegin(), e = cend(); i != e; ++i) { - delete i.value(); - } - } -}; - -const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) { - typedef QMap InterfacesMetadatasMap; - static InterfacesMetadatasMap InterfacesMetadatas; - static QMutex InterfacesMetadatasMutex; - - QMutexLocker lock(&InterfacesMetadatasMutex); - InterfacesMetadatasMap::const_iterator i = InterfacesMetadatas.constFind(mask); - if (i == InterfacesMetadatas.cend()) { - InterfacesMetadata *meta = new InterfacesMetadata(mask); - if (!meta) { // terminate if we can't allocate memory - throw "Can't allocate memory!"; - } - - i = InterfacesMetadatas.insert(mask, meta); - } - return i.value(); -} - -InterfaceWrapStruct InterfaceWraps[64]; - -QAtomicInt InterfaceIndexLast(0); - namespace { int32 peerColorIndex(const PeerId &peer) { int32 myId(MTP::authedId()), peerId(peerToBareInt(peer)); diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 5655fafa546cf3..8de9bf0c5d7812 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -20,174 +20,6 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org */ #pragma once -class Interfaces; -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; -}; - -template -struct CeilDivideMinimumOne { - static const int Result = ((Value / Denominator) + ((!Value || (Value % Denominator)) ? 1 : 0)); -}; - -template -struct InterfaceWrapTemplate { - static const int Size = CeilDivideMinimumOne::Result * sizeof(uint64); - static void Construct(void *location, Interfaces *interfaces) { - new (location) Type(interfaces); - } - static void Destruct(void *location) { - ((Type*)location)->~Type(); - } -}; - -extern InterfaceWrapStruct InterfaceWraps[64]; -extern QAtomicInt InterfaceIndexLast; - -template -class BasicInterface { -public: - static int Index() { - static QAtomicInt _index(0); - if (int index = _index.loadAcquire()) { - return index - 1; - } - while (true) { - int last = InterfaceIndexLast.loadAcquire(); - if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) { - t_assert(last < 64); - if (_index.testAndSetOrdered(0, last + 1)) { - InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct); - } - break; - } - } - return _index.loadAcquire() - 1; - } - static uint64 Bit() { - return (1 << Index()); - } - -}; - -template -class BasicInterfaceWithPointer : public BasicInterface { -public: - BasicInterfaceWithPointer(Interfaces *interfaces) : interfaces(interfaces) { - } - Interfaces *interfaces = 0; -}; - -class InterfacesMetadata { -public: - - InterfacesMetadata(uint64 mask) : size(0), last(64), _mask(mask) { - for (int i = 0; i < 64; ++i) { - uint64 m = (1 << i); - if (_mask & m) { - int s = InterfaceWraps[i].Size; - if (s) { - offsets[i] = size; - size += s; - } else { - offsets[i] = -1; - } - } else if (_mask < m) { - last = i; - for (; i < 64; ++i) { - offsets[i] = -1; - } - } else { - offsets[i] = -1; - } - } - } - - int size, last; - int offsets[64]; - -private: - uint64 _mask; - -}; - -const InterfacesMetadata *GetInterfacesMetadata(uint64 mask); - -class Interfaces { -public: - - Interfaces(uint64 mask = 0) : _meta(GetInterfacesMetadata(mask)), _data(0) { - if (_meta->size) { - _data = malloc(_meta->size); - if (!_data) { // terminate if we can't allocate memory - throw "Can't allocate memory!"; - } - - for (int i = 0; i < _meta->last; ++i) { - int offset = _meta->offsets[i]; - if (offset >= 0) { - try { - InterfaceWraps[i].Construct(_dataptrunsafe(offset), this); - } catch (...) { - while (i > 0) { - --i; - offset = _meta->offsets[--i]; - if (offset >= 0) { - InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); - } - } - throw; - } - } - } - } - } - ~Interfaces() { - if (_data) { - for (int i = 0; i < _meta->last; ++i) { - int offset = _meta->offsets[i]; - if (offset >= 0) { - InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); - } - } - free(_data); - } - } - - template - Type *Get() { - return (Type*)_dataptr(_meta->offsets[Type::Index()]); - } - template - const Type *Get() const { - return (const Type*)_dataptr(_meta->offsets[Type::Index()]); - } - -private: - - void *_dataptrunsafe(int skip) const { - return (char*)_data + skip; - } - void *_dataptr(int skip) const { - return (skip >= 0) ? _dataptrunsafe(skip) : 0; - } - const InterfacesMetadata *_meta; - void *_data; - -}; - typedef int32 ChannelId; static const ChannelId NoChannel = 0; diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 18ffcc395aeec3..15039a9b3c95de 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -1016,3 +1016,34 @@ MimeType mimeTypeForData(const QByteArray &data) { } return MimeType(QMimeDatabase().mimeTypeForData(data)); } + +class InterfacesMetadatasMap : public QMap { +public: + ~InterfacesMetadatasMap() { + for (const_iterator i = cbegin(), e = cend(); i != e; ++i) { + delete i.value(); + } + } +}; + +const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) { + typedef QMap InterfacesMetadatasMap; + static InterfacesMetadatasMap InterfacesMetadatas; + static QMutex InterfacesMetadatasMutex; + + QMutexLocker lock(&InterfacesMetadatasMutex); + InterfacesMetadatasMap::const_iterator i = InterfacesMetadatas.constFind(mask); + if (i == InterfacesMetadatas.cend()) { + InterfacesMetadata *meta = new InterfacesMetadata(mask); + if (!meta) { // terminate if we can't allocate memory + throw "Can't allocate memory!"; + } + + i = InterfacesMetadatas.insert(mask, meta); + } + return i.value(); +} + +InterfaceWrapStruct InterfaceWraps[64]; + +QAtomicInt InterfaceIndexLast(0); diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index d7043d70bb47b3..7c47cca8fdebb9 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -529,6 +529,174 @@ inline void destroyImplementation(I *&ptr) { deleteAndMark(ptr); } +class Interfaces; +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; +}; + +template +struct CeilDivideMinimumOne { + static const int Result = ((Value / Denominator) + ((!Value || (Value % Denominator)) ? 1 : 0)); +}; + +template +struct InterfaceWrapTemplate { + static const int Size = CeilDivideMinimumOne::Result * sizeof(uint64); + static void Construct(void *location, Interfaces *interfaces) { + new (location) Type(interfaces); + } + static void Destruct(void *location) { + ((Type*)location)->~Type(); + } +}; + +extern InterfaceWrapStruct InterfaceWraps[64]; +extern QAtomicInt InterfaceIndexLast; + +template +class BasicInterface { +public: + static int Index() { + static QAtomicInt _index(0); + if (int index = _index.loadAcquire()) { + return index - 1; + } + while (true) { + int last = InterfaceIndexLast.loadAcquire(); + if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) { + t_assert(last < 64); + if (_index.testAndSetOrdered(0, last + 1)) { + InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct); + } + break; + } + } + return _index.loadAcquire() - 1; + } + static uint64 Bit() { + return (1 << Index()); + } + +}; + +template +class BasicInterfaceWithPointer : public BasicInterface { +public: + BasicInterfaceWithPointer(Interfaces *interfaces) : interfaces(interfaces) { + } + Interfaces *interfaces = 0; +}; + +class InterfacesMetadata { +public: + + InterfacesMetadata(uint64 mask) : size(0), last(64), _mask(mask) { + for (int i = 0; i < 64; ++i) { + uint64 m = (1 << i); + if (_mask & m) { + int s = InterfaceWraps[i].Size; + if (s) { + offsets[i] = size; + size += s; + } else { + offsets[i] = -1; + } + } else if (_mask < m) { + last = i; + for (; i < 64; ++i) { + offsets[i] = -1; + } + } else { + offsets[i] = -1; + } + } + } + + int size, last; + int offsets[64]; + +private: + uint64 _mask; + +}; + +const InterfacesMetadata *GetInterfacesMetadata(uint64 mask); + +class Interfaces { +public: + + Interfaces(uint64 mask = 0) : _meta(GetInterfacesMetadata(mask)), _data(0) { + if (_meta->size) { + _data = malloc(_meta->size); + if (!_data) { // terminate if we can't allocate memory + throw "Can't allocate memory!"; + } + + for (int i = 0; i < _meta->last; ++i) { + int offset = _meta->offsets[i]; + if (offset >= 0) { + try { + InterfaceWraps[i].Construct(_dataptrunsafe(offset), this); + } catch (...) { + while (i > 0) { + --i; + offset = _meta->offsets[--i]; + if (offset >= 0) { + InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); + } + } + throw; + } + } + } + } + } + ~Interfaces() { + if (_data) { + for (int i = 0; i < _meta->last; ++i) { + int offset = _meta->offsets[i]; + if (offset >= 0) { + InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); + } + } + free(_data); + } + } + + template + Type *Get() { + return (Type*)_dataptr(_meta->offsets[Type::Index()]); + } + template + const Type *Get() const { + return (const Type*)_dataptr(_meta->offsets[Type::Index()]); + } + +private: + + void *_dataptrunsafe(int skip) const { + return (char*)_data + skip; + } + void *_dataptr(int skip) const { + return (skip >= 0) ? _dataptrunsafe(skip) : 0; + } + const InterfacesMetadata *_meta; + void *_data; + +}; + template class FunctionImplementation { public: From 520d82b0ff9b0c31877bc6a785bee9bacb50ec51 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 7 Feb 2016 22:08:18 +0300 Subject: [PATCH 045/133] beta version 9019002 --- Telegram/SourceFiles/config.h | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Version | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 716414b06a829a..c8d75c9fbe7fa4 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9019; static const wchar_t *AppVersionStr = L"0.9.19"; static const bool DevVersion = true; -#define BETA_VERSION (9019001ULL) // just comment this line to build public version +#define BETA_VERSION (9019002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 7b4720543a3ad5..d9254c7431972e 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,19,1 - PRODUCTVERSION 0,9,19,1 + FILEVERSION 0,9,19,2 + PRODUCTVERSION 0,9,19,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.19.1" + VALUE "FileVersion", "0.9.19.2" VALUE "LegalCopyright", "Copyright (C) 2013" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.19.1" + VALUE "ProductVersion", "0.9.19.2" END END BLOCK "VarFileInfo" diff --git a/Telegram/Version b/Telegram/Version index fba09052d88c29..83bc292728ddce 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.19 AppVersionStr 0.9.19 DevChannel 1 -BetaVersion 9019001 +BetaVersion 9019002 From b3da86bf08fbdbdbabc3477aec9b58acb4181b6d Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 13:50:56 +0300 Subject: [PATCH 046/133] closing logs and working file before relaunching Telegram --- Telegram/SourceFiles/logs.cpp | 20 +++++++++++++++++++- Telegram/SourceFiles/logs.h | 2 ++ Telegram/SourceFiles/pspecific_linux.cpp | 2 ++ Telegram/SourceFiles/pspecific_mac_p.mm | 4 +++- Telegram/SourceFiles/pspecific_wnd.cpp | 2 ++ 5 files changed, 28 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index f5b6ac4c66ffcb..2dfea02f2a183f 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -98,6 +98,14 @@ class LogsDataFields { return reopen(LogDataMain, 0, qsl("start")); } + void closeMain() { + QMutexLocker lock(_logsMutex(LogDataMain)); + if (files[LogDataMain]) { + streams[LogDataMain].setDevice(0); + files[LogDataMain]->close(); + } + } + bool instanceChecked() { return reopen(LogDataMain, 0, QString()); } @@ -433,6 +441,13 @@ namespace Logs { LogsBeforeSingleInstanceChecked.clear(); } + void closeMain() { + LOG(("Explicitly closing main log and finishing crash handlers.")); + if (LogsData) { + LogsData->closeMain(); + } + } + void writeMain(const QString &v) { time_t t = time(NULL); struct tm tm; @@ -490,7 +505,7 @@ namespace Logs { return LogsBeforeSingleInstanceChecked; } - int32 size = 0; + int32 size = LogsBeforeSingleInstanceChecked.size(); for (LogsInMemoryList::const_iterator i = LogsInMemory->cbegin(), e = LogsInMemory->cend(); i != e; ++i) { if (i->first == LogDataMain) { size += i->second.size(); @@ -498,6 +513,9 @@ namespace Logs { } QString result; result.reserve(size); + if (!LogsBeforeSingleInstanceChecked.isEmpty()) { + result.append(LogsBeforeSingleInstanceChecked); + } for (LogsInMemoryList::const_iterator i = LogsInMemory->cbegin(), e = LogsInMemory->cend(); i != e; ++i) { if (i->first == LogDataMain) { result += i->second; diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index e8e2c99984a7cb..09d4567eac29fb 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -32,6 +32,8 @@ namespace Logs { bool instanceChecked(); void multipleInstances(); + void closeMain(); + void writeMain(const QString &v); void writeDebug(const char *file, int32 line, const QString &v); diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 6eec6629570d51..4117a5f26502a8 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -1411,6 +1411,8 @@ bool _execUpdater(bool update = true, const QString &crashreport = QString()) { } } + Logs::closeMain(); + SignalHandlers::finish(); pid_t pid = fork(); switch (pid) { case -1: return false; diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index ca7db5d832ca93..4c2acf16938a95 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -978,8 +978,10 @@ BOOL _execUpdater(BOOL update = YES, const QString &crashreport = QString()) { } DEBUG_LOG(("Application Info: executing %1 %2").arg(objcString(path)).arg(objcString([args componentsJoinedByString:@" "]))); + Logs::closeMain(); + SignalHandlers::finish(); if (![NSTask launchedTaskWithLaunchPath:path arguments:args]) { - LOG(("Task not launched while executing %1 %2").arg(objcString(path)).arg(objcString([args componentsJoinedByString:@" "]))); + DEBUG_LOG(("Task not launched while executing %1 %2").arg(objcString(path)).arg(objcString([args componentsJoinedByString:@" "]))); return NO; } } diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 4ff51a0cb0d229..84c165c800beb8 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2284,6 +2284,8 @@ void psExecTelegram(const QString &crashreport) { QString telegram(QDir::toNativeSeparators(cExeDir() + cExeName())), wdir(QDir::toNativeSeparators(cWorkingDir())); DEBUG_LOG(("Application Info: executing %1 %2").arg(cExeDir() + cExeName()).arg(targs)); + Logs::closeMain(); + SignalHandlers::finish(); HINSTANCE r = ShellExecute(0, 0, telegram.toStdWString().c_str(), targs.toStdWString().c_str(), wdir.isEmpty() ? 0 : wdir.toStdWString().c_str(), SW_SHOWNORMAL); if (long(r) < 32) { DEBUG_LOG(("Application Error: failed to execute %1, working directory: '%2', result: %3").arg(telegram).arg(wdir).arg(long(r))); From 0b8523d58e76bcd50e59777fc0091f502d0f5a47 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 13:56:18 +0300 Subject: [PATCH 047/133] added year 2016 to copyright --- Telegram/Resources/lang.strings | 2 +- Telegram/Resources/style.txt | 2 +- Telegram/Resources/style_classes.txt | 2 +- Telegram/SourceFiles/_other/genemoji.cpp | 4 ++-- Telegram/SourceFiles/_other/genemoji.h | 2 +- Telegram/SourceFiles/_other/genlang.cpp | 6 +++--- Telegram/SourceFiles/_other/genlang.h | 2 +- Telegram/SourceFiles/_other/genstyles.cpp | 10 +++++----- Telegram/SourceFiles/_other/genstyles.h | 2 +- Telegram/SourceFiles/_other/memain.cpp | 2 +- Telegram/SourceFiles/_other/memain.h | 2 +- Telegram/SourceFiles/_other/mlmain.cpp | 2 +- Telegram/SourceFiles/_other/mlmain.h | 2 +- Telegram/SourceFiles/_other/msmain.cpp | 2 +- Telegram/SourceFiles/_other/msmain.h | 2 +- Telegram/SourceFiles/_other/packer.cpp | 2 +- Telegram/SourceFiles/_other/packer.h | 2 +- Telegram/SourceFiles/_other/updater.cpp | 4 +--- Telegram/SourceFiles/_other/updater.h | 8 +++++++- Telegram/SourceFiles/_other/updater_linux.cpp | 2 +- Telegram/SourceFiles/_other/updater_osx.m | 2 +- Telegram/SourceFiles/apiwrap.cpp | 2 +- Telegram/SourceFiles/apiwrap.h | 2 +- Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/app.h | 2 +- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/application.h | 2 +- Telegram/SourceFiles/audio.cpp | 2 +- Telegram/SourceFiles/audio.h | 2 +- Telegram/SourceFiles/autoupdater.cpp | 2 +- Telegram/SourceFiles/autoupdater.h | 2 +- Telegram/SourceFiles/boxes/aboutbox.cpp | 2 +- Telegram/SourceFiles/boxes/aboutbox.h | 2 +- Telegram/SourceFiles/boxes/abstractbox.cpp | 2 +- Telegram/SourceFiles/boxes/abstractbox.h | 2 +- Telegram/SourceFiles/boxes/addcontactbox.cpp | 2 +- Telegram/SourceFiles/boxes/addcontactbox.h | 2 +- Telegram/SourceFiles/boxes/autolockbox.cpp | 2 +- Telegram/SourceFiles/boxes/autolockbox.h | 2 +- Telegram/SourceFiles/boxes/backgroundbox.cpp | 2 +- Telegram/SourceFiles/boxes/backgroundbox.h | 2 +- Telegram/SourceFiles/boxes/confirmbox.cpp | 2 +- Telegram/SourceFiles/boxes/confirmbox.h | 2 +- Telegram/SourceFiles/boxes/connectionbox.cpp | 2 +- Telegram/SourceFiles/boxes/connectionbox.h | 2 +- Telegram/SourceFiles/boxes/contactsbox.cpp | 2 +- Telegram/SourceFiles/boxes/contactsbox.h | 2 +- Telegram/SourceFiles/boxes/downloadpathbox.cpp | 2 +- Telegram/SourceFiles/boxes/downloadpathbox.h | 2 +- Telegram/SourceFiles/boxes/emojibox.cpp | 2 +- Telegram/SourceFiles/boxes/emojibox.h | 2 +- Telegram/SourceFiles/boxes/languagebox.cpp | 2 +- Telegram/SourceFiles/boxes/languagebox.h | 2 +- Telegram/SourceFiles/boxes/passcodebox.cpp | 2 +- Telegram/SourceFiles/boxes/passcodebox.h | 2 +- Telegram/SourceFiles/boxes/photocropbox.cpp | 2 +- Telegram/SourceFiles/boxes/photocropbox.h | 2 +- Telegram/SourceFiles/boxes/photosendbox.cpp | 2 +- Telegram/SourceFiles/boxes/photosendbox.h | 2 +- Telegram/SourceFiles/boxes/sessionsbox.cpp | 2 +- Telegram/SourceFiles/boxes/sessionsbox.h | 2 +- Telegram/SourceFiles/boxes/stickersetbox.cpp | 2 +- Telegram/SourceFiles/boxes/stickersetbox.h | 2 +- Telegram/SourceFiles/boxes/usernamebox.cpp | 2 +- Telegram/SourceFiles/boxes/usernamebox.h | 2 +- Telegram/SourceFiles/config.h | 2 +- Telegram/SourceFiles/countries.h | 2 +- Telegram/SourceFiles/dialogswidget.cpp | 2 +- Telegram/SourceFiles/dialogswidget.h | 2 +- Telegram/SourceFiles/dropdown.cpp | 2 +- Telegram/SourceFiles/dropdown.h | 2 +- Telegram/SourceFiles/facades.cpp | 2 +- Telegram/SourceFiles/facades.h | 2 +- Telegram/SourceFiles/fileuploader.cpp | 2 +- Telegram/SourceFiles/fileuploader.h | 2 +- Telegram/SourceFiles/gui/animation.cpp | 2 +- Telegram/SourceFiles/gui/animation.h | 2 +- Telegram/SourceFiles/gui/boxshadow.cpp | 2 +- Telegram/SourceFiles/gui/boxshadow.h | 2 +- Telegram/SourceFiles/gui/button.cpp | 2 +- Telegram/SourceFiles/gui/button.h | 2 +- Telegram/SourceFiles/gui/countryinput.cpp | 2 +- Telegram/SourceFiles/gui/countryinput.h | 2 +- Telegram/SourceFiles/gui/emoji_config.cpp | 2 +- Telegram/SourceFiles/gui/emoji_config.h | 2 +- Telegram/SourceFiles/gui/filedialog.cpp | 2 +- Telegram/SourceFiles/gui/filedialog.h | 2 +- Telegram/SourceFiles/gui/flatbutton.cpp | 2 +- Telegram/SourceFiles/gui/flatbutton.h | 2 +- Telegram/SourceFiles/gui/flatcheckbox.cpp | 2 +- Telegram/SourceFiles/gui/flatcheckbox.h | 2 +- Telegram/SourceFiles/gui/flatinput.cpp | 2 +- Telegram/SourceFiles/gui/flatinput.h | 2 +- Telegram/SourceFiles/gui/flatlabel.cpp | 2 +- Telegram/SourceFiles/gui/flatlabel.h | 2 +- Telegram/SourceFiles/gui/flattextarea.cpp | 2 +- Telegram/SourceFiles/gui/flattextarea.h | 2 +- Telegram/SourceFiles/gui/images.cpp | 2 +- Telegram/SourceFiles/gui/images.h | 2 +- Telegram/SourceFiles/gui/popupmenu.cpp | 2 +- Telegram/SourceFiles/gui/popupmenu.h | 2 +- Telegram/SourceFiles/gui/scrollarea.cpp | 2 +- Telegram/SourceFiles/gui/scrollarea.h | 2 +- Telegram/SourceFiles/gui/style_core.cpp | 2 +- Telegram/SourceFiles/gui/style_core.h | 2 +- Telegram/SourceFiles/gui/text.cpp | 2 +- Telegram/SourceFiles/gui/text.h | 2 +- Telegram/SourceFiles/gui/twidget.cpp | 2 +- Telegram/SourceFiles/gui/twidget.h | 2 +- Telegram/SourceFiles/history.cpp | 2 +- Telegram/SourceFiles/history.h | 2 +- Telegram/SourceFiles/historywidget.cpp | 2 +- Telegram/SourceFiles/historywidget.h | 2 +- Telegram/SourceFiles/intro/intro.cpp | 2 +- Telegram/SourceFiles/intro/intro.h | 2 +- Telegram/SourceFiles/intro/introcode.cpp | 2 +- Telegram/SourceFiles/intro/introcode.h | 2 +- Telegram/SourceFiles/intro/introphone.cpp | 2 +- Telegram/SourceFiles/intro/introphone.h | 2 +- Telegram/SourceFiles/intro/intropwdcheck.cpp | 2 +- Telegram/SourceFiles/intro/intropwdcheck.h | 2 +- Telegram/SourceFiles/intro/introsignup.cpp | 2 +- Telegram/SourceFiles/intro/introsignup.h | 2 +- Telegram/SourceFiles/intro/introsteps.cpp | 2 +- Telegram/SourceFiles/intro/introsteps.h | 2 +- Telegram/SourceFiles/lang.cpp | 2 +- Telegram/SourceFiles/lang.h | 2 +- Telegram/SourceFiles/langloaderplain.cpp | 2 +- Telegram/SourceFiles/langloaderplain.h | 2 +- Telegram/SourceFiles/langs/lang_de.strings | 2 +- Telegram/SourceFiles/langs/lang_es.strings | 2 +- Telegram/SourceFiles/langs/lang_it.strings | 2 +- Telegram/SourceFiles/langs/lang_ko.strings | 2 +- Telegram/SourceFiles/langs/lang_nl.strings | 2 +- Telegram/SourceFiles/langs/lang_pt_BR.strings | 2 +- Telegram/SourceFiles/layerwidget.cpp | 2 +- Telegram/SourceFiles/layerwidget.h | 2 +- Telegram/SourceFiles/layout.cpp | 2 +- Telegram/SourceFiles/layout.h | 2 +- Telegram/SourceFiles/localimageloader.cpp | 2 +- Telegram/SourceFiles/localimageloader.h | 2 +- Telegram/SourceFiles/localstorage.cpp | 2 +- Telegram/SourceFiles/localstorage.h | 2 +- Telegram/SourceFiles/logs.cpp | 2 +- Telegram/SourceFiles/logs.h | 2 +- Telegram/SourceFiles/main.cpp | 2 +- Telegram/SourceFiles/mainwidget.cpp | 2 +- Telegram/SourceFiles/mainwidget.h | 2 +- Telegram/SourceFiles/mediaview.cpp | 2 +- Telegram/SourceFiles/mediaview.h | 2 +- Telegram/SourceFiles/mtproto/mtp.cpp | 2 +- Telegram/SourceFiles/mtproto/mtp.h | 2 +- Telegram/SourceFiles/mtproto/mtpAuthKey.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpAuthKey.h | 2 +- Telegram/SourceFiles/mtproto/mtpConnection.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpConnection.h | 2 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 2 +- Telegram/SourceFiles/mtproto/mtpDC.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpDC.h | 2 +- Telegram/SourceFiles/mtproto/mtpFileLoader.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpFileLoader.h | 2 +- Telegram/SourceFiles/mtproto/mtpPublicRSA.h | 2 +- Telegram/SourceFiles/mtproto/mtpRPC.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpRPC.h | 2 +- Telegram/SourceFiles/mtproto/mtpSession.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpSession.h | 2 +- Telegram/SourceFiles/mtproto/mtpSessionImpl.h | 2 +- Telegram/SourceFiles/numbers.h | 2 +- Telegram/SourceFiles/overviewwidget.cpp | 2 +- Telegram/SourceFiles/overviewwidget.h | 2 +- Telegram/SourceFiles/passcodewidget.cpp | 2 +- Telegram/SourceFiles/passcodewidget.h | 2 +- Telegram/SourceFiles/playerwidget.cpp | 2 +- Telegram/SourceFiles/playerwidget.h | 2 +- Telegram/SourceFiles/profilewidget.cpp | 2 +- Telegram/SourceFiles/profilewidget.h | 2 +- Telegram/SourceFiles/pspecific.h | 2 +- Telegram/SourceFiles/pspecific_linux.cpp | 2 +- Telegram/SourceFiles/pspecific_linux.h | 2 +- Telegram/SourceFiles/pspecific_mac.cpp | 2 +- Telegram/SourceFiles/pspecific_mac.h | 2 +- Telegram/SourceFiles/pspecific_mac_p.h | 2 +- Telegram/SourceFiles/pspecific_mac_p.mm | 2 +- Telegram/SourceFiles/pspecific_wnd.cpp | 4 ++-- Telegram/SourceFiles/pspecific_wnd.h | 2 +- Telegram/SourceFiles/settings.cpp | 2 +- Telegram/SourceFiles/settings.h | 2 +- Telegram/SourceFiles/settingswidget.cpp | 2 +- Telegram/SourceFiles/settingswidget.h | 2 +- Telegram/SourceFiles/stdafx.cpp | 2 +- Telegram/SourceFiles/stdafx.h | 2 +- Telegram/SourceFiles/structs.cpp | 2 +- Telegram/SourceFiles/structs.h | 2 +- Telegram/SourceFiles/style.h | 2 +- Telegram/SourceFiles/sysbuttons.cpp | 2 +- Telegram/SourceFiles/sysbuttons.h | 2 +- Telegram/SourceFiles/title.cpp | 2 +- Telegram/SourceFiles/title.h | 2 +- Telegram/SourceFiles/types.cpp | 2 +- Telegram/SourceFiles/types.h | 2 +- Telegram/SourceFiles/window.cpp | 2 +- Telegram/SourceFiles/window.h | 2 +- Telegram/Telegram.rc | 2 +- 204 files changed, 218 insertions(+), 214 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 79aee3ad76825c..57da8554cc58ff 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "English"; "lng_switch_to_this" = "Switch to English"; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 3e4eee98ec8066..71c0598a940dfe 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ defaultFontFamily: 'Open Sans'; semibold: 'Open Sans Semibold'; diff --git a/Telegram/Resources/style_classes.txt b/Telegram/Resources/style_classes.txt index 0610af6bb4ab63..229b3398bb2b13 100644 --- a/Telegram/Resources/style_classes.txt +++ b/Telegram/Resources/style_classes.txt @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ textStyle { linkFlags: font; diff --git a/Telegram/SourceFiles/_other/genemoji.cpp b/Telegram/SourceFiles/_other/genemoji.cpp index 5e6fce4bf5ff16..22e3fd1bd3f083 100644 --- a/Telegram/SourceFiles/_other/genemoji.cpp +++ b/Telegram/SourceFiles/_other/genemoji.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "genemoji.h" @@ -1942,7 +1942,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tcpp << "#include \"stdafx.h\"\n#include \"gui/emoji_config.h\"\n\n"; diff --git a/Telegram/SourceFiles/_other/genemoji.h b/Telegram/SourceFiles/_other/genemoji.h index 61c0e3e767c7a6..ecf35ef48e4684 100644 --- a/Telegram/SourceFiles/_other/genemoji.h +++ b/Telegram/SourceFiles/_other/genemoji.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include #include diff --git a/Telegram/SourceFiles/_other/genlang.cpp b/Telegram/SourceFiles/_other/genlang.cpp index 60e77ec79d8aff..2050bfcbf33c6b 100644 --- a/Telegram/SourceFiles/_other/genlang.cpp +++ b/Telegram/SourceFiles/_other/genlang.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "genlang.h" @@ -412,7 +412,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; th << "#pragma once\n\n"; @@ -496,7 +496,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tcpp << "#include \"stdafx.h\"\n#include \"lang.h\"\n\n"; tcpp << "namespace {\n"; diff --git a/Telegram/SourceFiles/_other/genlang.h b/Telegram/SourceFiles/_other/genlang.h index dadeb8c09ba419..b88f6d030616fc 100644 --- a/Telegram/SourceFiles/_other/genlang.h +++ b/Telegram/SourceFiles/_other/genlang.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include #include diff --git a/Telegram/SourceFiles/_other/genstyles.cpp b/Telegram/SourceFiles/_other/genstyles.cpp index 709117d522bcef..67f58191f99984 100644 --- a/Telegram/SourceFiles/_other/genstyles.cpp +++ b/Telegram/SourceFiles/_other/genstyles.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "genstyles.h" @@ -381,7 +381,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tout << "#pragma once\n\n#include \"style.h\"\n\nnamespace style {\n"; for (int i = 0, l = byIndex.size(); i < l; ++i) { @@ -1542,7 +1542,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tout << "#pragma once\n\n#include \"style.h\"\n\nnamespace st {\n"; tcpp << "\ @@ -1568,7 +1568,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tcpp << "#include \"stdafx.h\"\n#include \"style_auto.h\"\n\nnamespace {\n"; for (int i = 0, l = scalars.size(); i < l; ++i) { @@ -1945,7 +1945,7 @@ In addition, as a special exception, the copyright holders give permission\n\ to link the code of portions of this program with the OpenSSL library.\n\ \n\ Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE\n\ -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org\n\ +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org\n\ */\n"; tnum << "#include \"stdafx.h\"\n#include \"numbers.h\"\n\n"; tnum << "QVector phoneNumberParse(const QString &number) {\n"; diff --git a/Telegram/SourceFiles/_other/genstyles.h b/Telegram/SourceFiles/_other/genstyles.h index 40a6d6ce67c353..05fa8c333ea758 100644 --- a/Telegram/SourceFiles/_other/genstyles.h +++ b/Telegram/SourceFiles/_other/genstyles.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include #include diff --git a/Telegram/SourceFiles/_other/memain.cpp b/Telegram/SourceFiles/_other/memain.cpp index 6daade312c44e5..aaf5b634154d54 100644 --- a/Telegram/SourceFiles/_other/memain.cpp +++ b/Telegram/SourceFiles/_other/memain.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "memain.h" diff --git a/Telegram/SourceFiles/_other/memain.h b/Telegram/SourceFiles/_other/memain.h index c2faceb850373b..c3293a73c8e148 100644 --- a/Telegram/SourceFiles/_other/memain.h +++ b/Telegram/SourceFiles/_other/memain.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include diff --git a/Telegram/SourceFiles/_other/mlmain.cpp b/Telegram/SourceFiles/_other/mlmain.cpp index 490ce50efe28e7..42c01b0d282d64 100644 --- a/Telegram/SourceFiles/_other/mlmain.cpp +++ b/Telegram/SourceFiles/_other/mlmain.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "mlmain.h" diff --git a/Telegram/SourceFiles/_other/mlmain.h b/Telegram/SourceFiles/_other/mlmain.h index a909bb50250e50..6516c86b25f6d3 100644 --- a/Telegram/SourceFiles/_other/mlmain.h +++ b/Telegram/SourceFiles/_other/mlmain.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include diff --git a/Telegram/SourceFiles/_other/msmain.cpp b/Telegram/SourceFiles/_other/msmain.cpp index cd316838848b11..ac85f52e410667 100644 --- a/Telegram/SourceFiles/_other/msmain.cpp +++ b/Telegram/SourceFiles/_other/msmain.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "msmain.h" #include diff --git a/Telegram/SourceFiles/_other/msmain.h b/Telegram/SourceFiles/_other/msmain.h index f0e13771a2709d..4db67255276a8f 100644 --- a/Telegram/SourceFiles/_other/msmain.h +++ b/Telegram/SourceFiles/_other/msmain.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include diff --git a/Telegram/SourceFiles/_other/packer.cpp b/Telegram/SourceFiles/_other/packer.cpp index 7cf2da9552559a..e2a6f128afd1cc 100644 --- a/Telegram/SourceFiles/_other/packer.cpp +++ b/Telegram/SourceFiles/_other/packer.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "packer.h" diff --git a/Telegram/SourceFiles/_other/packer.h b/Telegram/SourceFiles/_other/packer.h index b82ccd71c21103..ccdff11cf8f1de 100644 --- a/Telegram/SourceFiles/_other/packer.h +++ b/Telegram/SourceFiles/_other/packer.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/_other/updater.cpp b/Telegram/SourceFiles/_other/updater.cpp index a1dd35aa017cea..9dea213aa9f185 100644 --- a/Telegram/SourceFiles/_other/updater.cpp +++ b/Telegram/SourceFiles/_other/updater.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "updater.h" @@ -328,8 +328,6 @@ void updateRegistry() { } } -#include - int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prevInstance, LPWSTR cmdParamarg, int cmdShow) { openLog(); diff --git a/Telegram/SourceFiles/_other/updater.h b/Telegram/SourceFiles/_other/updater.h index b7f8fd8c0b1881..8b2709c2720238 100644 --- a/Telegram/SourceFiles/_other/updater.h +++ b/Telegram/SourceFiles/_other/updater.h @@ -16,13 +16,19 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once #include #include + +#pragma warning(push) +#pragma warning(disable:4091) #include +#include +#pragma warning(pop) + #include #include diff --git a/Telegram/SourceFiles/_other/updater_linux.cpp b/Telegram/SourceFiles/_other/updater_linux.cpp index f65ad09448130c..3a3b778105df2d 100644 --- a/Telegram/SourceFiles/_other/updater_linux.cpp +++ b/Telegram/SourceFiles/_other/updater_linux.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include #include diff --git a/Telegram/SourceFiles/_other/updater_osx.m b/Telegram/SourceFiles/_other/updater_osx.m index ea34527f439cfe..ef13dfc065b242 100644 --- a/Telegram/SourceFiles/_other/updater_osx.m +++ b/Telegram/SourceFiles/_other/updater_osx.m @@ -16,7 +16,7 @@ to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #import diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 69366c14ce5e96..ac903405903945 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/apiwrap.h b/Telegram/SourceFiles/apiwrap.h index 5daabcf74f4da4..521bb05b2bf03e 100644 --- a/Telegram/SourceFiles/apiwrap.h +++ b/Telegram/SourceFiles/apiwrap.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index fae83e4597a36c..f68b037366132f 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index 4e556473404a7b..2b224e07cada98 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 8d23bd21896175..4938588524fb03 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "application.h" diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 2cfe56b5d8d10c..48bf3e80f6d3f3 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index 57bf5f9f6b8297..db981b3aa2b070 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "audio.h" diff --git a/Telegram/SourceFiles/audio.h b/Telegram/SourceFiles/audio.h index 94132335011dd3..e21c273f780b69 100644 --- a/Telegram/SourceFiles/audio.h +++ b/Telegram/SourceFiles/audio.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index 17528d79f07558..36cb2c8777c20c 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/autoupdater.h b/Telegram/SourceFiles/autoupdater.h index 7394035ddd9799..3687a405dce72c 100644 --- a/Telegram/SourceFiles/autoupdater.h +++ b/Telegram/SourceFiles/autoupdater.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/aboutbox.cpp b/Telegram/SourceFiles/boxes/aboutbox.cpp index e593541d9348a6..913465e84bcbef 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.cpp +++ b/Telegram/SourceFiles/boxes/aboutbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/aboutbox.h b/Telegram/SourceFiles/boxes/aboutbox.h index 6be8c2ed4caae2..ceccef089ff413 100644 --- a/Telegram/SourceFiles/boxes/aboutbox.h +++ b/Telegram/SourceFiles/boxes/aboutbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/abstractbox.cpp b/Telegram/SourceFiles/boxes/abstractbox.cpp index e61b40fcee9097..ca02a614a79a41 100644 --- a/Telegram/SourceFiles/boxes/abstractbox.cpp +++ b/Telegram/SourceFiles/boxes/abstractbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/abstractbox.h b/Telegram/SourceFiles/boxes/abstractbox.h index 4920cebd133b3d..14c3f3d741a9f0 100644 --- a/Telegram/SourceFiles/boxes/abstractbox.h +++ b/Telegram/SourceFiles/boxes/abstractbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/addcontactbox.cpp b/Telegram/SourceFiles/boxes/addcontactbox.cpp index c2d94321a0163a..d236862a3032de 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.cpp +++ b/Telegram/SourceFiles/boxes/addcontactbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/addcontactbox.h b/Telegram/SourceFiles/boxes/addcontactbox.h index b50c715deb6829..0289bc3d53a06e 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.h +++ b/Telegram/SourceFiles/boxes/addcontactbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/autolockbox.cpp b/Telegram/SourceFiles/boxes/autolockbox.cpp index 93675868c5ff29..3af3b2615e5320 100644 --- a/Telegram/SourceFiles/boxes/autolockbox.cpp +++ b/Telegram/SourceFiles/boxes/autolockbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/autolockbox.h b/Telegram/SourceFiles/boxes/autolockbox.h index 827e103654cbdc..db7035972c2085 100644 --- a/Telegram/SourceFiles/boxes/autolockbox.h +++ b/Telegram/SourceFiles/boxes/autolockbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/backgroundbox.cpp b/Telegram/SourceFiles/boxes/backgroundbox.cpp index 098b301c2ae911..e35eb32c961574 100644 --- a/Telegram/SourceFiles/boxes/backgroundbox.cpp +++ b/Telegram/SourceFiles/boxes/backgroundbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/backgroundbox.h b/Telegram/SourceFiles/boxes/backgroundbox.h index e2a6e5a820f5e5..4d3b5bfef23649 100644 --- a/Telegram/SourceFiles/boxes/backgroundbox.h +++ b/Telegram/SourceFiles/boxes/backgroundbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/confirmbox.cpp b/Telegram/SourceFiles/boxes/confirmbox.cpp index b619af2657c2a4..b114ffa18b863f 100644 --- a/Telegram/SourceFiles/boxes/confirmbox.cpp +++ b/Telegram/SourceFiles/boxes/confirmbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/confirmbox.h b/Telegram/SourceFiles/boxes/confirmbox.h index ba439eb957bdee..6cfd6019918c5d 100644 --- a/Telegram/SourceFiles/boxes/confirmbox.h +++ b/Telegram/SourceFiles/boxes/confirmbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/connectionbox.cpp b/Telegram/SourceFiles/boxes/connectionbox.cpp index f2c24a9e38d0d7..a94fdd44db7366 100644 --- a/Telegram/SourceFiles/boxes/connectionbox.cpp +++ b/Telegram/SourceFiles/boxes/connectionbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/connectionbox.h b/Telegram/SourceFiles/boxes/connectionbox.h index 79a43f378fcac3..34a2770be7860f 100644 --- a/Telegram/SourceFiles/boxes/connectionbox.h +++ b/Telegram/SourceFiles/boxes/connectionbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/contactsbox.cpp b/Telegram/SourceFiles/boxes/contactsbox.cpp index 4ac079ff9fc015..e295611fe8297b 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.cpp +++ b/Telegram/SourceFiles/boxes/contactsbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/contactsbox.h b/Telegram/SourceFiles/boxes/contactsbox.h index 540f35b40c4d2e..6f9eed12d18322 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.h +++ b/Telegram/SourceFiles/boxes/contactsbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/downloadpathbox.cpp b/Telegram/SourceFiles/boxes/downloadpathbox.cpp index b5d7f5d5893243..00c7a7158898f4 100644 --- a/Telegram/SourceFiles/boxes/downloadpathbox.cpp +++ b/Telegram/SourceFiles/boxes/downloadpathbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/downloadpathbox.h b/Telegram/SourceFiles/boxes/downloadpathbox.h index c4a335e3049823..8f6e923b8396ec 100644 --- a/Telegram/SourceFiles/boxes/downloadpathbox.h +++ b/Telegram/SourceFiles/boxes/downloadpathbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/emojibox.cpp b/Telegram/SourceFiles/boxes/emojibox.cpp index a5b483747505a6..9bd637bed3619d 100644 --- a/Telegram/SourceFiles/boxes/emojibox.cpp +++ b/Telegram/SourceFiles/boxes/emojibox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/emojibox.h b/Telegram/SourceFiles/boxes/emojibox.h index 405fd127b0a7aa..8fb3baac763c2d 100644 --- a/Telegram/SourceFiles/boxes/emojibox.h +++ b/Telegram/SourceFiles/boxes/emojibox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/languagebox.cpp b/Telegram/SourceFiles/boxes/languagebox.cpp index 3ec7ea7eaca406..115123b91c640c 100644 --- a/Telegram/SourceFiles/boxes/languagebox.cpp +++ b/Telegram/SourceFiles/boxes/languagebox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/languagebox.h b/Telegram/SourceFiles/boxes/languagebox.h index ce37f417c9a1ff..68b7c65ce7bda1 100644 --- a/Telegram/SourceFiles/boxes/languagebox.h +++ b/Telegram/SourceFiles/boxes/languagebox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/passcodebox.cpp b/Telegram/SourceFiles/boxes/passcodebox.cpp index 45055b2cf49a8c..b0815abb21c894 100644 --- a/Telegram/SourceFiles/boxes/passcodebox.cpp +++ b/Telegram/SourceFiles/boxes/passcodebox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/passcodebox.h b/Telegram/SourceFiles/boxes/passcodebox.h index f280af9a07c723..be908ae1a029c5 100644 --- a/Telegram/SourceFiles/boxes/passcodebox.h +++ b/Telegram/SourceFiles/boxes/passcodebox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/photocropbox.cpp b/Telegram/SourceFiles/boxes/photocropbox.cpp index e76410712b0946..d7de86d98a3658 100644 --- a/Telegram/SourceFiles/boxes/photocropbox.cpp +++ b/Telegram/SourceFiles/boxes/photocropbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/boxes/photocropbox.h b/Telegram/SourceFiles/boxes/photocropbox.h index 347d24064768d5..e7c63fd0251b90 100644 --- a/Telegram/SourceFiles/boxes/photocropbox.h +++ b/Telegram/SourceFiles/boxes/photocropbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/photosendbox.cpp b/Telegram/SourceFiles/boxes/photosendbox.cpp index d9d933e30ba29d..1a25dd55ec10da 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.cpp +++ b/Telegram/SourceFiles/boxes/photosendbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/boxes/photosendbox.h b/Telegram/SourceFiles/boxes/photosendbox.h index 2c955dfd0045ff..1cd4bbf00ea274 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.h +++ b/Telegram/SourceFiles/boxes/photosendbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/sessionsbox.cpp b/Telegram/SourceFiles/boxes/sessionsbox.cpp index 6cc62071dbd572..be56624faf736c 100644 --- a/Telegram/SourceFiles/boxes/sessionsbox.cpp +++ b/Telegram/SourceFiles/boxes/sessionsbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/sessionsbox.h b/Telegram/SourceFiles/boxes/sessionsbox.h index 3c84bc65d60c1b..e7d60fba9bde89 100644 --- a/Telegram/SourceFiles/boxes/sessionsbox.h +++ b/Telegram/SourceFiles/boxes/sessionsbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/stickersetbox.cpp b/Telegram/SourceFiles/boxes/stickersetbox.cpp index 44247559593b69..8b756c4ee4d2c3 100644 --- a/Telegram/SourceFiles/boxes/stickersetbox.cpp +++ b/Telegram/SourceFiles/boxes/stickersetbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/stickersetbox.h b/Telegram/SourceFiles/boxes/stickersetbox.h index 7fbd2b9720afb6..d2fd4749ee493c 100644 --- a/Telegram/SourceFiles/boxes/stickersetbox.h +++ b/Telegram/SourceFiles/boxes/stickersetbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/boxes/usernamebox.cpp b/Telegram/SourceFiles/boxes/usernamebox.cpp index b0f11ba74669b6..13786841f41b0f 100644 --- a/Telegram/SourceFiles/boxes/usernamebox.cpp +++ b/Telegram/SourceFiles/boxes/usernamebox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/boxes/usernamebox.h b/Telegram/SourceFiles/boxes/usernamebox.h index c48af468f95a1f..d2dfe0b6e1dc6f 100644 --- a/Telegram/SourceFiles/boxes/usernamebox.h +++ b/Telegram/SourceFiles/boxes/usernamebox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index c8d75c9fbe7fa4..97c252ffaa877f 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/countries.h b/Telegram/SourceFiles/countries.h index 6255464ef380de..135d03b9e42d24 100644 --- a/Telegram/SourceFiles/countries.h +++ b/Telegram/SourceFiles/countries.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index ef5247c88e2d51..690805a2532fc7 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/dialogswidget.h b/Telegram/SourceFiles/dialogswidget.h index 60cb877b93015f..a535d2fa15426b 100644 --- a/Telegram/SourceFiles/dialogswidget.h +++ b/Telegram/SourceFiles/dialogswidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 62cd0b5009a336..3fba9d150f35b8 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/dropdown.h b/Telegram/SourceFiles/dropdown.h index 36146697b48a30..5ff587a236fdd0 100644 --- a/Telegram/SourceFiles/dropdown.h +++ b/Telegram/SourceFiles/dropdown.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 00edb264601dcb..12796df2bdf91a 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 5b142925212f90..4c528c4e7ce160 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/fileuploader.cpp b/Telegram/SourceFiles/fileuploader.cpp index 2c5f30adc7f158..607a2e91cc2e27 100644 --- a/Telegram/SourceFiles/fileuploader.cpp +++ b/Telegram/SourceFiles/fileuploader.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "fileuploader.h" diff --git a/Telegram/SourceFiles/fileuploader.h b/Telegram/SourceFiles/fileuploader.h index 460f8e17026a74..895e7c677abf80 100644 --- a/Telegram/SourceFiles/fileuploader.h +++ b/Telegram/SourceFiles/fileuploader.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/animation.cpp b/Telegram/SourceFiles/gui/animation.cpp index f5d59a93815dd7..045dbb27391747 100644 --- a/Telegram/SourceFiles/gui/animation.cpp +++ b/Telegram/SourceFiles/gui/animation.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/animation.h b/Telegram/SourceFiles/gui/animation.h index b3aa52afa0ea71..d5d8253d2d2e47 100644 --- a/Telegram/SourceFiles/gui/animation.h +++ b/Telegram/SourceFiles/gui/animation.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/boxshadow.cpp b/Telegram/SourceFiles/gui/boxshadow.cpp index 415978d7bca4bb..c2df8821463e7c 100644 --- a/Telegram/SourceFiles/gui/boxshadow.cpp +++ b/Telegram/SourceFiles/gui/boxshadow.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/boxshadow.h b/Telegram/SourceFiles/gui/boxshadow.h index 2d2b903ae769a7..bd4bb7765014a8 100644 --- a/Telegram/SourceFiles/gui/boxshadow.h +++ b/Telegram/SourceFiles/gui/boxshadow.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/button.cpp b/Telegram/SourceFiles/gui/button.cpp index 05217d585e938f..767bac6254eb29 100644 --- a/Telegram/SourceFiles/gui/button.cpp +++ b/Telegram/SourceFiles/gui/button.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "button.h" diff --git a/Telegram/SourceFiles/gui/button.h b/Telegram/SourceFiles/gui/button.h index 652fea137dac86..34577ade84eefe 100644 --- a/Telegram/SourceFiles/gui/button.h +++ b/Telegram/SourceFiles/gui/button.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/countryinput.cpp b/Telegram/SourceFiles/gui/countryinput.cpp index 54057375038a41..cca56959842064 100644 --- a/Telegram/SourceFiles/gui/countryinput.cpp +++ b/Telegram/SourceFiles/gui/countryinput.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/gui/countryinput.h b/Telegram/SourceFiles/gui/countryinput.h index 457c177e44ba06..83d5e5040cc5e7 100644 --- a/Telegram/SourceFiles/gui/countryinput.h +++ b/Telegram/SourceFiles/gui/countryinput.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/emoji_config.cpp b/Telegram/SourceFiles/gui/emoji_config.cpp index 32e28e62b910fd..cf84ad2d9e9381 100644 --- a/Telegram/SourceFiles/gui/emoji_config.cpp +++ b/Telegram/SourceFiles/gui/emoji_config.cpp @@ -20,7 +20,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "gui/emoji_config.h" diff --git a/Telegram/SourceFiles/gui/emoji_config.h b/Telegram/SourceFiles/gui/emoji_config.h index 1734d3d8277082..9f4fefb61bcd16 100644 --- a/Telegram/SourceFiles/gui/emoji_config.h +++ b/Telegram/SourceFiles/gui/emoji_config.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/filedialog.cpp b/Telegram/SourceFiles/gui/filedialog.cpp index 4727f81c79bd88..b606613d0a1df0 100644 --- a/Telegram/SourceFiles/gui/filedialog.cpp +++ b/Telegram/SourceFiles/gui/filedialog.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "gui/filedialog.h" diff --git a/Telegram/SourceFiles/gui/filedialog.h b/Telegram/SourceFiles/gui/filedialog.h index 58791f512c94ab..33f3f13918f1fc 100644 --- a/Telegram/SourceFiles/gui/filedialog.h +++ b/Telegram/SourceFiles/gui/filedialog.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/flatbutton.cpp b/Telegram/SourceFiles/gui/flatbutton.cpp index 1df0ac66421aaa..e29de5f44f4f4b 100644 --- a/Telegram/SourceFiles/gui/flatbutton.cpp +++ b/Telegram/SourceFiles/gui/flatbutton.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "gui/flatbutton.h" diff --git a/Telegram/SourceFiles/gui/flatbutton.h b/Telegram/SourceFiles/gui/flatbutton.h index f07b0c4a25d48b..e8f0a77db59965 100644 --- a/Telegram/SourceFiles/gui/flatbutton.h +++ b/Telegram/SourceFiles/gui/flatbutton.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/flatcheckbox.cpp b/Telegram/SourceFiles/gui/flatcheckbox.cpp index bace80fc7c2786..d1624390697d10 100644 --- a/Telegram/SourceFiles/gui/flatcheckbox.cpp +++ b/Telegram/SourceFiles/gui/flatcheckbox.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/gui/flatcheckbox.h b/Telegram/SourceFiles/gui/flatcheckbox.h index 560045fdfe4ab2..6e209e3e21c1a8 100644 --- a/Telegram/SourceFiles/gui/flatcheckbox.h +++ b/Telegram/SourceFiles/gui/flatcheckbox.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/flatinput.cpp b/Telegram/SourceFiles/gui/flatinput.cpp index a7f4241a02cec2..f2a893e7cec3df 100644 --- a/Telegram/SourceFiles/gui/flatinput.cpp +++ b/Telegram/SourceFiles/gui/flatinput.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/gui/flatinput.h b/Telegram/SourceFiles/gui/flatinput.h index 98b8d3be19052f..cfac9d9428ceeb 100644 --- a/Telegram/SourceFiles/gui/flatinput.h +++ b/Telegram/SourceFiles/gui/flatinput.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/flatlabel.cpp b/Telegram/SourceFiles/gui/flatlabel.cpp index 42860323e4191d..34ea575852c859 100644 --- a/Telegram/SourceFiles/gui/flatlabel.cpp +++ b/Telegram/SourceFiles/gui/flatlabel.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/flatlabel.h b/Telegram/SourceFiles/gui/flatlabel.h index 28acee067c2ea3..43e9ebd63df42f 100644 --- a/Telegram/SourceFiles/gui/flatlabel.h +++ b/Telegram/SourceFiles/gui/flatlabel.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/flattextarea.cpp b/Telegram/SourceFiles/gui/flattextarea.cpp index 3340bb1ab529a9..87573907e5dc8d 100644 --- a/Telegram/SourceFiles/gui/flattextarea.cpp +++ b/Telegram/SourceFiles/gui/flattextarea.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/gui/flattextarea.h b/Telegram/SourceFiles/gui/flattextarea.h index 14b9fa10dc0f55..ef1a2cb92e8908 100644 --- a/Telegram/SourceFiles/gui/flattextarea.h +++ b/Telegram/SourceFiles/gui/flattextarea.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/images.cpp b/Telegram/SourceFiles/gui/images.cpp index 7f97ef7d497b91..8bebc9ddf0cf33 100644 --- a/Telegram/SourceFiles/gui/images.cpp +++ b/Telegram/SourceFiles/gui/images.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "gui/images.h" diff --git a/Telegram/SourceFiles/gui/images.h b/Telegram/SourceFiles/gui/images.h index a79890f5c65aff..63c77137935a11 100644 --- a/Telegram/SourceFiles/gui/images.h +++ b/Telegram/SourceFiles/gui/images.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index e64fe2feb08949..46af26b7686b6c 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -13,7 +13,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE - Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org + Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/popupmenu.h b/Telegram/SourceFiles/gui/popupmenu.h index b0ae5b2dded8ab..caf65492dfe5b3 100644 --- a/Telegram/SourceFiles/gui/popupmenu.h +++ b/Telegram/SourceFiles/gui/popupmenu.h @@ -13,7 +13,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE - Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org + Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/scrollarea.cpp b/Telegram/SourceFiles/gui/scrollarea.cpp index 9fdc86a76f8289..a71fac95478d14 100644 --- a/Telegram/SourceFiles/gui/scrollarea.cpp +++ b/Telegram/SourceFiles/gui/scrollarea.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/gui/scrollarea.h b/Telegram/SourceFiles/gui/scrollarea.h index 76add3f2bac9c5..7343d749bbe439 100644 --- a/Telegram/SourceFiles/gui/scrollarea.h +++ b/Telegram/SourceFiles/gui/scrollarea.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/style_core.cpp b/Telegram/SourceFiles/gui/style_core.cpp index 3537f1e92c7333..d7c99ccd4b73ee 100644 --- a/Telegram/SourceFiles/gui/style_core.cpp +++ b/Telegram/SourceFiles/gui/style_core.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/style_core.h b/Telegram/SourceFiles/gui/style_core.h index 8642a701ac8b6a..b36cfe5a908443 100644 --- a/Telegram/SourceFiles/gui/style_core.h +++ b/Telegram/SourceFiles/gui/style_core.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index cab543cede9499..0837eaeb8ad81b 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "text.h" diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index b742b41d8e4c09..1312bc759ffc29 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/gui/twidget.cpp b/Telegram/SourceFiles/gui/twidget.cpp index 8606aece7c27d2..6631a1fa580c9c 100644 --- a/Telegram/SourceFiles/gui/twidget.cpp +++ b/Telegram/SourceFiles/gui/twidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/gui/twidget.h b/Telegram/SourceFiles/gui/twidget.h index d1eaeb1478312e..f627ad349b5940 100644 --- a/Telegram/SourceFiles/gui/twidget.h +++ b/Telegram/SourceFiles/gui/twidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index f25a464b9eedcf..8ac2eb7fe5cf29 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 0cdd33cda9c66d..dfeb4d2b94280f 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 85b7e90420ed77..e68ae11835d530 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 94c5ad30daf2e0..b0c454eb7aee51 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/intro.cpp b/Telegram/SourceFiles/intro/intro.cpp index b921672f4f0096..71eb5dad838472 100644 --- a/Telegram/SourceFiles/intro/intro.cpp +++ b/Telegram/SourceFiles/intro/intro.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/intro.h b/Telegram/SourceFiles/intro/intro.h index ba21c7dab027b3..5697c1bee06af6 100644 --- a/Telegram/SourceFiles/intro/intro.h +++ b/Telegram/SourceFiles/intro/intro.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/introcode.cpp b/Telegram/SourceFiles/intro/introcode.cpp index 71cd2bd9491c4a..35f2540ea86b6a 100644 --- a/Telegram/SourceFiles/intro/introcode.cpp +++ b/Telegram/SourceFiles/intro/introcode.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/introcode.h b/Telegram/SourceFiles/intro/introcode.h index 2ba90769d6ab0b..174cb7c2b13ade 100644 --- a/Telegram/SourceFiles/intro/introcode.h +++ b/Telegram/SourceFiles/intro/introcode.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/introphone.cpp b/Telegram/SourceFiles/intro/introphone.cpp index ccd5f227ee259e..bb2372d7b8650d 100644 --- a/Telegram/SourceFiles/intro/introphone.cpp +++ b/Telegram/SourceFiles/intro/introphone.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/introphone.h b/Telegram/SourceFiles/intro/introphone.h index 8baa29d447c7e5..3a4357112c283a 100644 --- a/Telegram/SourceFiles/intro/introphone.h +++ b/Telegram/SourceFiles/intro/introphone.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/intropwdcheck.cpp b/Telegram/SourceFiles/intro/intropwdcheck.cpp index 2aa13f57343f6c..9e4ba5acdcd656 100644 --- a/Telegram/SourceFiles/intro/intropwdcheck.cpp +++ b/Telegram/SourceFiles/intro/intropwdcheck.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/intropwdcheck.h b/Telegram/SourceFiles/intro/intropwdcheck.h index 71081358a32dd5..5f29c9b3c5c67b 100644 --- a/Telegram/SourceFiles/intro/intropwdcheck.h +++ b/Telegram/SourceFiles/intro/intropwdcheck.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/introsignup.cpp b/Telegram/SourceFiles/intro/introsignup.cpp index 42fbde07b654dd..78d01ffb6420ea 100644 --- a/Telegram/SourceFiles/intro/introsignup.cpp +++ b/Telegram/SourceFiles/intro/introsignup.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/introsignup.h b/Telegram/SourceFiles/intro/introsignup.h index b183f7fc6294d4..4a9f7df3e3a57a 100644 --- a/Telegram/SourceFiles/intro/introsignup.h +++ b/Telegram/SourceFiles/intro/introsignup.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/intro/introsteps.cpp b/Telegram/SourceFiles/intro/introsteps.cpp index eb33f2a3d93b6b..87359c9a8955e8 100644 --- a/Telegram/SourceFiles/intro/introsteps.cpp +++ b/Telegram/SourceFiles/intro/introsteps.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/intro/introsteps.h b/Telegram/SourceFiles/intro/introsteps.h index dc8dc3ed3ca98d..4522f46622931e 100644 --- a/Telegram/SourceFiles/intro/introsteps.h +++ b/Telegram/SourceFiles/intro/introsteps.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/lang.cpp b/Telegram/SourceFiles/lang.cpp index 015b934af58cc8..b9bf2e9bdea692 100644 --- a/Telegram/SourceFiles/lang.cpp +++ b/Telegram/SourceFiles/lang.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/lang.h b/Telegram/SourceFiles/lang.h index 08193e3ef66e74..fd8ef7dced067c 100644 --- a/Telegram/SourceFiles/lang.h +++ b/Telegram/SourceFiles/lang.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/langloaderplain.cpp b/Telegram/SourceFiles/langloaderplain.cpp index 3760077b690730..f07a54e8e9052c 100644 --- a/Telegram/SourceFiles/langloaderplain.cpp +++ b/Telegram/SourceFiles/langloaderplain.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "langloaderplain.h" diff --git a/Telegram/SourceFiles/langloaderplain.h b/Telegram/SourceFiles/langloaderplain.h index ad25438c5c6497..c31451482ae76e 100644 --- a/Telegram/SourceFiles/langloaderplain.h +++ b/Telegram/SourceFiles/langloaderplain.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index fc48c7322eaed1..98f775bac2692a 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "Deutsch"; "lng_switch_to_this" = "Auf Deutsch zurücksetzen"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index ecb880634f11b0..fb3020bfafb556 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "Español"; "lng_switch_to_this" = "Cambiar a español"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index b68200cac03e6b..441b872c8acad6 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "Italiano"; "lng_switch_to_this" = "Passa all'italiano"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index 2c7022c509b95f..17bfe72f9d0506 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "한국어"; "lng_switch_to_this" = "한국어로 변경"; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index b1993615f1c5b7..4a6b48ee17c4ff 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "Nederlands"; "lng_switch_to_this" = "Overschakelen naar Nederlands"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index 26d2c98b35fc9f..e4a7a676cd6931 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ "lng_language_name" = "Português (Brasil)"; "lng_switch_to_this" = "Trocar para Português (Brasil)"; diff --git a/Telegram/SourceFiles/layerwidget.cpp b/Telegram/SourceFiles/layerwidget.cpp index eda4dc89fc0a09..e419334a220065 100644 --- a/Telegram/SourceFiles/layerwidget.cpp +++ b/Telegram/SourceFiles/layerwidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/layerwidget.h b/Telegram/SourceFiles/layerwidget.h index 151597edee188a..8729dc7c6b9b28 100644 --- a/Telegram/SourceFiles/layerwidget.h +++ b/Telegram/SourceFiles/layerwidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 6ae5e528585f44..a82d91700e0a62 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index f4bead1ec0b0b2..39f9ecd1499787 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/localimageloader.cpp b/Telegram/SourceFiles/localimageloader.cpp index 3b1f8d797a68a4..d8137a83243145 100644 --- a/Telegram/SourceFiles/localimageloader.cpp +++ b/Telegram/SourceFiles/localimageloader.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "localimageloader.h" diff --git a/Telegram/SourceFiles/localimageloader.h b/Telegram/SourceFiles/localimageloader.h index 47ef7441fa7866..6078820afe1c4b 100644 --- a/Telegram/SourceFiles/localimageloader.h +++ b/Telegram/SourceFiles/localimageloader.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index e37284d513df52..915bd35352df28 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "localstorage.h" diff --git a/Telegram/SourceFiles/localstorage.h b/Telegram/SourceFiles/localstorage.h index 30ed83b629334b..7bc16304bfece4 100644 --- a/Telegram/SourceFiles/localstorage.h +++ b/Telegram/SourceFiles/localstorage.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 2dfea02f2a183f..c8061a4f9bac12 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 09d4567eac29fb..451fb81795688e 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index fc5d8029917f89..508fb9052e7c7f 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "application.h" diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index e27a7cfab48434..f21e981dd4fe2c 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 3d8c6efa398283..4470adaf00d672 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 18a4fec4979c21..94d00c2e3f8ec2 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/mediaview.h b/Telegram/SourceFiles/mediaview.h index 4a8c0e86cd6ac4..3007e574eb0f2d 100644 --- a/Telegram/SourceFiles/mediaview.h +++ b/Telegram/SourceFiles/mediaview.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 6b9b26cb0d1842..fdd03e1229627d 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "mtp.h" diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index 295cc5ca51ecd1..2e830ae69f4a55 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpAuthKey.cpp b/Telegram/SourceFiles/mtproto/mtpAuthKey.cpp index 7e54022193ea56..7e2470e7ac8012 100644 --- a/Telegram/SourceFiles/mtproto/mtpAuthKey.cpp +++ b/Telegram/SourceFiles/mtproto/mtpAuthKey.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/mtproto/mtpAuthKey.h b/Telegram/SourceFiles/mtproto/mtpAuthKey.h index aff25083df7ecd..9bd994461ea2cd 100644 --- a/Telegram/SourceFiles/mtproto/mtpAuthKey.h +++ b/Telegram/SourceFiles/mtproto/mtpAuthKey.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 9ae550360a2d7e..b1bfac554c44a0 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.h b/Telegram/SourceFiles/mtproto/mtpConnection.h index 7e03ee61669e9f..74d281ae4c4c45 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.h +++ b/Telegram/SourceFiles/mtproto/mtpConnection.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp index dd0a82ae4ebe65..858394a319d22b 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "mtpCoreTypes.h" diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index abdb10eb29c562..60d05a96aa4cc0 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpDC.cpp b/Telegram/SourceFiles/mtproto/mtpDC.cpp index ee5a079ad427cf..1a9bf11d767616 100644 --- a/Telegram/SourceFiles/mtproto/mtpDC.cpp +++ b/Telegram/SourceFiles/mtproto/mtpDC.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "mtpDC.h" diff --git a/Telegram/SourceFiles/mtproto/mtpDC.h b/Telegram/SourceFiles/mtproto/mtpDC.h index 1ed240ff8c594b..bc8a6e78772f76 100644 --- a/Telegram/SourceFiles/mtproto/mtpDC.h +++ b/Telegram/SourceFiles/mtproto/mtpDC.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index 3d3f8fec01515b..e7c7f20c9723d0 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "mainwidget.h" diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.h b/Telegram/SourceFiles/mtproto/mtpFileLoader.h index d2d55d2ab01a2e..d9f06aec1baaa8 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.h +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpPublicRSA.h b/Telegram/SourceFiles/mtproto/mtpPublicRSA.h index fd8b39f11308e5..0827ebfac5b5b8 100644 --- a/Telegram/SourceFiles/mtproto/mtpPublicRSA.h +++ b/Telegram/SourceFiles/mtproto/mtpPublicRSA.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpRPC.cpp b/Telegram/SourceFiles/mtproto/mtpRPC.cpp index 2f8daa3b414a98..c0c861750b2bc2 100644 --- a/Telegram/SourceFiles/mtproto/mtpRPC.cpp +++ b/Telegram/SourceFiles/mtproto/mtpRPC.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "mtproto/mtpRPC.h" diff --git a/Telegram/SourceFiles/mtproto/mtpRPC.h b/Telegram/SourceFiles/mtproto/mtpRPC.h index 1093b04b3981c5..c12f4c3f5936da 100644 --- a/Telegram/SourceFiles/mtproto/mtpRPC.h +++ b/Telegram/SourceFiles/mtproto/mtpRPC.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpSession.cpp b/Telegram/SourceFiles/mtproto/mtpSession.cpp index ee49811a8c1d1e..54ed49cb91b791 100644 --- a/Telegram/SourceFiles/mtproto/mtpSession.cpp +++ b/Telegram/SourceFiles/mtproto/mtpSession.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include diff --git a/Telegram/SourceFiles/mtproto/mtpSession.h b/Telegram/SourceFiles/mtproto/mtpSession.h index d50914ece1335b..23db4fba382117 100644 --- a/Telegram/SourceFiles/mtproto/mtpSession.h +++ b/Telegram/SourceFiles/mtproto/mtpSession.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/mtproto/mtpSessionImpl.h b/Telegram/SourceFiles/mtproto/mtpSessionImpl.h index b2772c43c8bcb9..465a2f7f813f10 100644 --- a/Telegram/SourceFiles/mtproto/mtpSessionImpl.h +++ b/Telegram/SourceFiles/mtproto/mtpSessionImpl.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/numbers.h b/Telegram/SourceFiles/numbers.h index c9b734ca5611c3..bbbf125e6b64f4 100644 --- a/Telegram/SourceFiles/numbers.h +++ b/Telegram/SourceFiles/numbers.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 2ddf41cb0364c8..dd53bfa50e77a3 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index d2740e0441a5d3..b6c63428c5545b 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/passcodewidget.cpp b/Telegram/SourceFiles/passcodewidget.cpp index bb7bea235d85a7..e37ecdfac3496d 100644 --- a/Telegram/SourceFiles/passcodewidget.cpp +++ b/Telegram/SourceFiles/passcodewidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/passcodewidget.h b/Telegram/SourceFiles/passcodewidget.h index 9fe8cbb547d803..effd6c68f5a557 100644 --- a/Telegram/SourceFiles/passcodewidget.h +++ b/Telegram/SourceFiles/passcodewidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/playerwidget.cpp b/Telegram/SourceFiles/playerwidget.cpp index f55b0d9f42bd1b..3ced88806cf3ef 100644 --- a/Telegram/SourceFiles/playerwidget.cpp +++ b/Telegram/SourceFiles/playerwidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/playerwidget.h b/Telegram/SourceFiles/playerwidget.h index e854ffee79b56d..2dacfcad99cba1 100644 --- a/Telegram/SourceFiles/playerwidget.h +++ b/Telegram/SourceFiles/playerwidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index c17b1c0e1c3aa5..0c69c8421c0756 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/profilewidget.h b/Telegram/SourceFiles/profilewidget.h index 611f8a7a99e3af..66523d65d050bc 100644 --- a/Telegram/SourceFiles/profilewidget.h +++ b/Telegram/SourceFiles/profilewidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/pspecific.h b/Telegram/SourceFiles/pspecific.h index 0b1442ad631667..98c84114660588 100644 --- a/Telegram/SourceFiles/pspecific.h +++ b/Telegram/SourceFiles/pspecific.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 4117a5f26502a8..397cac53051974 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "pspecific.h" diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index b4380165b53ec4..8a527b1f73f418 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 2b51f85b883d31..84349d6160e61c 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "pspecific.h" diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index 154fee8f684035..70ca3ade6d62db 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/pspecific_mac_p.h b/Telegram/SourceFiles/pspecific_mac_p.h index 9b0d3aaeebf78d..174aae7b62dc8a 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.h +++ b/Telegram/SourceFiles/pspecific_mac_p.h @@ -13,7 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index 4c2acf16938a95..21e641e1a16ccf 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -13,7 +13,7 @@ GNU General Public License for more details. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "pspecific_mac_p.h" diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 84c165c800beb8..6d40abeabe4c37 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "pspecific.h" @@ -40,11 +40,11 @@ Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org #pragma warning(push) #pragma warning(disable:4091) #include +#include #pragma warning(pop) #include #include -#include #include #include diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 2f6d14af03b5ac..ce46b80cc9aef2 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -17,7 +17,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index e17e7f0eaafd11..316567c0d3ae53 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "pspecific.h" diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 42554b7440d046..28cc53382f906e 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index 8b5e3bf0b9bf81..af03d71853c393 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/settingswidget.h b/Telegram/SourceFiles/settingswidget.h index c8a9c841f028c2..c3a8449be33848 100644 --- a/Telegram/SourceFiles/settingswidget.h +++ b/Telegram/SourceFiles/settingswidget.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/stdafx.cpp b/Telegram/SourceFiles/stdafx.cpp index 01ddf641e596c5..53a464500fdcd6 100644 --- a/Telegram/SourceFiles/stdafx.cpp +++ b/Telegram/SourceFiles/stdafx.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index 8a97b226ec4414..fa832467859f02 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #define __HUGE #define PSAPI_VERSION 1 // fix WinXP diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 34bd47fba4bbc3..274b34f29be6bc 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 8de9bf0c5d7812..78e899e56e73a1 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/style.h b/Telegram/SourceFiles/style.h index bcbbb5c08b9c58..f9fcf062a03241 100644 --- a/Telegram/SourceFiles/style.h +++ b/Telegram/SourceFiles/style.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/sysbuttons.cpp b/Telegram/SourceFiles/sysbuttons.cpp index 8b618dfd7543c1..ec81716c788d8c 100644 --- a/Telegram/SourceFiles/sysbuttons.cpp +++ b/Telegram/SourceFiles/sysbuttons.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/sysbuttons.h b/Telegram/SourceFiles/sysbuttons.h index de7c3f93f15153..db6e2ed897f7fa 100644 --- a/Telegram/SourceFiles/sysbuttons.h +++ b/Telegram/SourceFiles/sysbuttons.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 081c05f5adfb31..9c6e38997693af 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "lang.h" diff --git a/Telegram/SourceFiles/title.h b/Telegram/SourceFiles/title.h index ff85f2528dcea4..7e3b60fd8bb6ba 100644 --- a/Telegram/SourceFiles/title.h +++ b/Telegram/SourceFiles/title.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 15039a9b3c95de..b3fb139f2b8706 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 7c47cca8fdebb9..4647bada865488 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index e799961a43186b..d1a0ff1171be7c 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #include "stdafx.h" #include "style.h" diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index ef715b23757b0d..ae6b9fcb067e0a 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -16,7 +16,7 @@ In addition, as a special exception, the copyright holders give permission to link the code of portions of this program with the OpenSSL library. Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE -Copyright (c) 2014-2015 John Preston, https://desktop.telegram.org +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index d9254c7431972e..dce43cd4d6c1d4 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -52,7 +52,7 @@ BEGIN BEGIN VALUE "CompanyName", "Telegram Messenger LLP" VALUE "FileVersion", "0.9.19.2" - VALUE "LegalCopyright", "Copyright (C) 2013" + VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" VALUE "ProductVersion", "0.9.19.2" END From 53202859432dd395563ea9e886d1655f61472667 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 15:32:17 +0300 Subject: [PATCH 048/133] added google breakpad/crashpad to build instructions --- MSVC.md | 27 ++++++++++++++++++++++- QTCREATOR.md | 11 ++++++++++ XCODE.md | 61 ++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 82 insertions(+), 17 deletions(-) diff --git a/MSVC.md b/MSVC.md index a9f34530944dd8..644839a307f8a9 100644 --- a/MSVC.md +++ b/MSVC.md @@ -170,7 +170,6 @@ and run cd qtbase && git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff && cd .. - #####Install Windows SDKs If you didn't install Windows SDKs before, you need to install them now. To install the SDKs just open Telegram solution at **D:\TBuild\tdesktop\Telegram.sln** and on startup Visual Studio 2015 will popup dialog box and ask to download and install extra components (including Windows 7 SDK). @@ -191,6 +190,32 @@ https://visualstudiogallery.msdn.microsoft.com/c89ff880-8509-47a4-a262-e4fa07168 Download, close all VS2015 instances and install for VS2015 +####Google Breakpad + +* Install Python 2.7.11 from https://www.python.org/downloads/release/python-2711/ > [**Windows x86 MSI installer**](https://www.python.org/ftp/python/2.7.11/python-2.7.11.msi) +* Open **VS2015 x86 Native Tools Command Prompt.bat** (should be in **Start Menu > Programs > Visual Studio 2015** menu folder) + +There go to Libraries directory + + D: + cd TBuild\Libraries + +and run + + git clone https://chromium.googlesource.com/breakpad/breakpad + git clone https://chromium.googlesource.com/external/gyp + set PATH=C:\Python27;%PATH% + cd breakpad/src/client/windows + ..\..\..\..\gyp\gyp --no-circular-check + +#####Building library + +* Open in VS2015 **D:\TBuild\Libraries\breakpad\src\client\windows\breakpad_client.sln** +* Change "Treat WChar_t As Built in Type" to "No" in all projects & configurations +* Change "Treat Warnings As Errors" to "No" in all projects & configurations +* Build Debug configuration +* Build Release configuration + ###Building Telegram Desktop * Launch VS2015 for configuring Qt5Package diff --git a/QTCREATOR.md b/QTCREATOR.md index e4c584b74a5920..9576e30dd575ef 100644 --- a/QTCREATOR.md +++ b/QTCREATOR.md @@ -142,6 +142,17 @@ In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run building (**make** command) will take really long time. +####Google Breakpad + +In Terminal go to **/home/user/TBuild/Libraries** and run + + git clone https://chromium.googlesource.com/breakpad/breakpad + git clone https://chromium.googlesource.com/linux-syscall-support breakpad/src/third_party/lss + cd breakpad + ./configure + make + sudo make install + ###Building Telegram Desktop * Launch Qt Creator, all projects will be taken from **/home/user/TBuild/tdesktop/Telegram** diff --git a/XCODE.md b/XCODE.md index 00a0dfbd7665ad..cdc229f7d4bbfe 100644 --- a/XCODE.md +++ b/XCODE.md @@ -2,11 +2,11 @@ ###Prepare folder -Choose a folder for the future build, for example **/Users/user/TBuild** - +Choose a folder for the future build, for example **/Users/user/TBuild** + There you will have two folders, **Libraries** for third-party libs and **tdesktop** (or **tdesktop-master**) for the app. -**You will need this hierarchy to be able to follow this README !** +**You will need this hierarchy to be able to follow this README !** ###Clone source code @@ -15,8 +15,8 @@ By git – in Terminal go to **/Users/user/TBuild** and run: git clone https://github.com/telegramdesktop/tdesktop.git or: -* download in ZIP and extract to **/Users/user/TBuild** -* rename **tdesktop-master** to **tdesktop**. +* download in ZIP and extract to **/Users/user/TBuild** +* rename **tdesktop-master** to **tdesktop**. The path to Telegram.xcodeproj should now be: **/Users/user/TBuild/tdesktop/Telegram/Telegram.xcodeproj** @@ -44,19 +44,19 @@ In Terminal go to **/Users/user/TBuild/Libraries/zlib-1.2.8** and run: ####OpenSSL 1.0.1g -#####Get openssl-xcode project file +#####Get openssl-xcode project file From https://github.com/telegramdesktop/openssl-xcode with git in Terminal: * go to **/Users/user/TBuild/Libraries * run: - + git clone https://github.com/telegramdesktop/openssl-xcode.git or: -* download in ZIP and extract to **/Users/user/TBuild/Libraries**, -* rename **openssl-xcode-master** to **openssl-xcode** +* download in ZIP and extract to **/Users/user/TBuild/Libraries**, +* rename **openssl-xcode-master** to **openssl-xcode** The path to openssl.xcodeproj should now be: **/Users/user/TBuild/Libraries/openssl-xcode/openssl.xcodeproj** @@ -64,8 +64,8 @@ The path to openssl.xcodeproj should now be: **/Users/user/TBuild/Libraries/open Download [**openssl-1.0.1h.tar.gz**](http://www.openssl.org/source/openssl-1.0.1h.tar.gz) (4.3 Mb) -* Extract openssl-1.0.1h.tar.gz -* Copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** +* Extract openssl-1.0.1h.tar.gz +* Copy everything from **openssl-1.0.1h** to **/Users/user/TBuild/Libraries/openssl-xcode** The folder include of openssl should be: **/Users/user/TBuild/Libraries/openssl-xcode/include** @@ -106,9 +106,9 @@ From https://github.com/telegramdesktop/libexif-0.6.20 with git in Terminal: or: -* download in ZIP +* download in ZIP * extract to **/Users/user/TBuild/Libraries** -* rename **libexif-0.6.20-master** to **libexif-0.6.20** +* rename **libexif-0.6.20-master** to **libexif-0.6.20** The folder configure should have this path: **/Users/user/TBuild/Libraries/libexif-0.6.20/configure** @@ -140,8 +140,8 @@ In Terminal go to **/Users/user/TBuild/Libraries/openal-soft/build** and there r ####Opus codec #####Get the source code -* Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/ -* Extract them to **/Users/user/TBuild/Libraries** +* Download sources [opus-1.1.tar.gz](http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz) from http://www.opus-codec.org/downloads/ +* Extract them to **/Users/user/TBuild/Libraries** * Rename opus-1.1 to opus to have **/Users/user/TBuild/Libraries/opus/configure** #####Building library @@ -210,11 +210,13 @@ In Terminal go to **/Users/user/TBuild/Libraries** and run: cd qtbase && git checkout v5.5.1 && cd .. #####Apply the patch -From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: + +From **/Users/user/TBuild/Libraries/QtStatic/qtbase**, run: git apply ../../../tdesktop/Telegram/_qtbase_5_5_1_patch.diff #####Building library + Go to **/Users/user/TBuild/Libraries/QtStatic** and run: ./configure -debug-and-release -opensource -confirm-license -static -opengl desktop -no-openssl -securetransport -nomake examples -nomake tests -platform macx-clang @@ -223,6 +225,33 @@ Go to **/Users/user/TBuild/Libraries/QtStatic** and run: Building (**make** command) will take a really long time. +####Google Crashpad + +#####Install gyp + +In Terminal go to **/Users/user/TBuild/Libraries** and run: + + git clone https://chromium.googlesource.com/external/gyp + git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git + cd gyp + ./setup.py build + sudo setup.py install + cd .. + +#####Build crashpad + +In Terminal go to **/Users/user/TBuild/Libraries** and run: + + export PATH=/Users/user/TBuild/Libraries/depot_tools:$PATH:/Users/user/TBuild/Libraries/gyp + mkdir crashpad + cd crashpad + fetch crashpad + cd crashpad/third_party/mini_chromium/mini_chromium + git apply ../../../../../../tdesktop/Telegram/_mini_chromium_patch.diff + cd ../../../ + build/gyp_crashpad.py -Dmac_deployment_target=10.8 + ninja -C out/Release + ###Building Telegram Desktop * Launch Xcode, all projects will be taken from **/Users/user/TBuild/tdesktop/Telegram** From 80ba0259dd81db6648599d25353908037eef1ae7 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 17:54:55 +0300 Subject: [PATCH 049/133] some namespaces reorganized, author photo display added to wide mode (where messages are centered), version 0.9.20.dev --- Telegram/Resources/style.txt | 5 +- Telegram/SourceFiles/app.cpp | 4 +- Telegram/SourceFiles/application.cpp | 35 +++-- Telegram/SourceFiles/application.h | 4 +- Telegram/SourceFiles/autoupdater.cpp | 10 +- Telegram/SourceFiles/config.h | 6 +- Telegram/SourceFiles/dialogswidget.cpp | 8 +- Telegram/SourceFiles/dropdown.cpp | 4 +- Telegram/SourceFiles/facades.cpp | 90 ++++++------ Telegram/SourceFiles/facades.h | 52 ++++--- Telegram/SourceFiles/gui/popupmenu.cpp | 4 +- Telegram/SourceFiles/history.cpp | 38 +++-- Telegram/SourceFiles/history.h | 4 +- Telegram/SourceFiles/historywidget.cpp | 38 ++--- Telegram/SourceFiles/historywidget.h | 4 +- Telegram/SourceFiles/intro/intro.cpp | 9 +- Telegram/SourceFiles/intro/intro.h | 8 +- Telegram/SourceFiles/intro/introphone.cpp | 4 +- Telegram/SourceFiles/intro/introsteps.cpp | 2 +- Telegram/SourceFiles/layerwidget.cpp | 3 +- Telegram/SourceFiles/layerwidget.h | 2 +- Telegram/SourceFiles/logs.cpp | 6 +- Telegram/SourceFiles/mainwidget.cpp | 148 ++++++++++---------- Telegram/SourceFiles/mainwidget.h | 6 +- Telegram/SourceFiles/mediaview.cpp | 8 +- Telegram/SourceFiles/overviewwidget.cpp | 14 +- Telegram/SourceFiles/overviewwidget.h | 4 +- Telegram/SourceFiles/playerwidget.cpp | 8 +- Telegram/SourceFiles/playerwidget.h | 2 +- Telegram/SourceFiles/profilewidget.cpp | 12 +- Telegram/SourceFiles/profilewidget.h | 4 +- Telegram/SourceFiles/pspecific_mac_p.mm | 8 +- Telegram/SourceFiles/pspecific_wnd.cpp | 4 +- Telegram/SourceFiles/settings.cpp | 2 - Telegram/SourceFiles/settings.h | 2 - Telegram/SourceFiles/settingswidget.cpp | 36 ++--- Telegram/SourceFiles/settingswidget.h | 2 +- Telegram/SourceFiles/sysbuttons.cpp | 2 +- Telegram/SourceFiles/title.cpp | 44 +++--- Telegram/SourceFiles/title.h | 2 +- Telegram/SourceFiles/window.cpp | 73 +++++----- Telegram/SourceFiles/window.h | 2 +- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 +- Telegram/Telegram.xcodeproj/project.pbxproj | 12 +- Telegram/Version | 8 +- 46 files changed, 386 insertions(+), 367 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 71c0598a940dfe..0cb9e073e3aaf7 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -51,7 +51,10 @@ color7: #2996ad; // sea color8: #ce671b; // orange wndMinWidth: 380px; -wideModeWidth: 640px; + +adaptiveNormalWidth: 640px; +adaptiveWideWidth: 1120px; + wndMinHeight: 480px; wndDefWidth: 800px; wndDefHeight: 600px; diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index f68b037366132f..d36731ff797c58 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -2612,10 +2612,10 @@ namespace App { QNetworkProxy getHttpProxySettings() { const ConnectionProxy *proxy = 0; - if (Sandbox::started()) { + if (Global::started()) { proxy = (cConnectionType() == dbictHttpProxy) ? (&cConnectionProxy()) : 0; } else { - proxy = Global::PreLaunchProxy().host.isEmpty() ? 0 : (&Global::PreLaunchProxy()); + proxy = Sandbox::PreLaunchProxy().host.isEmpty() ? 0 : (&Sandbox::PreLaunchProxy()); } if (proxy) { return QNetworkProxy(QNetworkProxy::HttpProxy, proxy->host, proxy->port, proxy->user, proxy->password); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 4938588524fb03..3e7742c85bccfd 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -75,6 +75,9 @@ namespace { if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { App::wnd()->minimizeToTray(); return true; + } else { + App::wnd()->close(); + return true; } } } @@ -178,7 +181,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) Application::~Application() { App::setQuiting(); - Global::finish(); + Sandbox::finish(); delete AppObject; @@ -277,7 +280,7 @@ void Application::singleInstanceChecked() { Logs::multipleInstances(); } - Global::start(); + Sandbox::start(); if (!Logs::started() || (!cManyInstance() && !Logs::instanceChecked())) { new NotStartedWindow(); @@ -286,17 +289,17 @@ void Application::singleInstanceChecked() { if (status == SignalHandlers::CantOpen) { new NotStartedWindow(); } else if (status == SignalHandlers::LastCrashed) { - if (Global::LastCrashDump().isEmpty()) { // don't handle bad closing for now + if (Sandbox::LastCrashDump().isEmpty()) { // don't handle bad closing for now if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); } else { - Sandboxer::startSandbox(); + Sandbox::launch(); } } else { new LastCrashedWindow(); } } else { - Sandboxer::startSandbox(); + Sandbox::launch(); } } } @@ -328,7 +331,7 @@ void Application::readClients() { for (int32 to = cmds.indexOf(QChar(';'), from); to >= from; to = (from < l) ? cmds.indexOf(QChar(';'), from) : -1) { QStringRef cmd(&cmds, from, to - from); if (cmd.startsWith(qsl("CMD:"))) { - Sandboxer::execExternal(cmds.mid(from + 4, to - from - 4)); + Sandbox::execExternal(cmds.mid(from + 4, to - from - 4)); QByteArray response(qsl("RES:%1;").arg(QCoreApplication::applicationPid()).toLatin1()); i->first->write(response.data(), response.size()); } else if (cmd.startsWith(qsl("SEND:"))) { @@ -546,7 +549,7 @@ inline Application *application() { return qobject_cast(QApplication::instance()); } -namespace Sandboxer { +namespace Sandbox { QRect availableGeometry() { if (Application *a = application()) { @@ -665,7 +668,7 @@ namespace Sandboxer { } } - void startSandbox() { + void launch() { t_assert(application() != 0); float64 dpi = Application::primaryScreen()->logicalDotsPerInch(); @@ -699,7 +702,7 @@ AppClass::AppClass() : QObject() Fonts::start(); ThirdParty::start(); - Sandbox::start(); + Global::start(); Local::start(); if (Local::oldSettingsVersion() < AppVersion) { psNewVersion(); @@ -719,7 +722,7 @@ AppClass::AppClass() : QObject() } if (cLang() < languageTest) { - cSetLang(Global::LangSystem()); + cSetLang(Sandbox::LangSystem()); } if (cLang() == languageTest) { if (QFileInfo(cLangFile()).exists()) { @@ -752,7 +755,7 @@ AppClass::AppClass() : QObject() application()->installNativeEventFilter(psNativeEventFilter()); - Sandboxer::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); + Sandbox::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); @@ -1048,8 +1051,12 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if (cDevVersion() && Local::oldMapVersion() < 9019) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Choose an emoticon and see the suggested stickers\n\xe2\x80\x94 Bug fixes in minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + if (cDevVersion() && Local::oldMapVersion() < 9020) { + if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + } else { + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Ctrl+W or Ctrl+F4 closes Telegram window\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + } } else if (Local::oldMapVersion() < 9016) { versionFeatures = lng_new_version_text(lt_gifs_link, qsl("https://telegram.org/blog/gif-revolution"), lt_bots_link, qsl("https://telegram.org/blog/inline-bots")).trimmed(); } else { @@ -1087,7 +1094,7 @@ AppClass::~AppClass() { style::stopManager(); Local::finish(); - Sandbox::finish(); + Global::finish(); ThirdParty::finish(); } diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index 48bf3e80f6d3f3..c5a11080f128e9 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -105,7 +105,7 @@ public slots: #endif }; -namespace Sandboxer { +namespace Sandbox { QRect availableGeometry(); QRect screenGeometry(const QPoint &p); @@ -135,7 +135,7 @@ namespace Sandboxer { void connect(const char *signal, QObject *object, const char *method); - void startSandbox(); + void launch(); } diff --git a/Telegram/SourceFiles/autoupdater.cpp b/Telegram/SourceFiles/autoupdater.cpp index 36cb2c8777c20c..7471dde5905247 100644 --- a/Telegram/SourceFiles/autoupdater.cpp +++ b/Telegram/SourceFiles/autoupdater.cpp @@ -127,7 +127,7 @@ void UpdateChecker::partMetaGot() { full = m.captured(1).toInt(); } - Sandboxer::updateProgress(already, full); + Sandbox::updateProgress(already, full); } } } @@ -180,7 +180,7 @@ void UpdateChecker::partFinished(qint64 got, qint64 total) { outputFile.close(); unpackUpdate(); } else { - Sandboxer::updateProgress(already, full); + Sandbox::updateProgress(already, full); } } @@ -199,12 +199,12 @@ void UpdateChecker::partFailed(QNetworkReply::NetworkError e) { } } LOG(("Update Error: failed to download part starting from %1, error %2").arg(already).arg(e)); - Sandboxer::updateFailed(); + Sandbox::updateFailed(); } void UpdateChecker::fatalFail() { clearAll(); - Sandboxer::updateFailed(); + Sandbox::updateFailed(); } void UpdateChecker::clearAll() { @@ -466,7 +466,7 @@ void UpdateChecker::unpackUpdate() { } outputFile.remove(); - Sandboxer::updateReady(); + Sandbox::updateReady(); } UpdateChecker::~UpdateChecker() { diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 97c252ffaa877f..ef2a3951594be2 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,10 +20,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9019; -static const wchar_t *AppVersionStr = L"0.9.19"; +static const int32 AppVersion = 9020; +static const wchar_t *AppVersionStr = L"0.9.20"; static const bool DevVersion = true; -#define BETA_VERSION (9019002ULL) // just comment this line to build public version +//#define BETA_VERSION (9019002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 690805a2532fc7..ca7b364e03db30 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -2268,7 +2268,7 @@ void DialogsWidget::dragEnterEvent(QDragEnterEvent *e) { _dragForward = e->mimeData()->hasFormat(qsl("application/x-td-forward-selected")); if (!_dragForward) _dragForward = e->mimeData()->hasFormat(qsl("application/x-td-forward-pressed-link")); if (!_dragForward) _dragForward = e->mimeData()->hasFormat(qsl("application/x-td-forward-pressed")); - if (_dragForward && !cWideMode()) _dragForward = false; + if (_dragForward && Adaptive::OneColumn()) _dragForward = false; if (_dragForward) { e->setDropAction(Qt::CopyAction); e->accept(); @@ -2540,7 +2540,7 @@ bool DialogsWidget::onCancelSearch() { _searchRequest = 0; } if (_searchInPeer && !clearing) { - if (!cWideMode()) { + if (Adaptive::OneColumn()) { Ui::showPeerHistory(_searchInPeer, ShowAtUnreadMsgId); } _searchInPeer = _searchInMigrated = 0; @@ -2560,7 +2560,7 @@ void DialogsWidget::onCancelSearchInPeer() { _searchRequest = 0; } if (_searchInPeer) { - if (!cWideMode() && !App::main()->selectingPeer()) { + if (Adaptive::OneColumn() && !App::main()->selectingPeer()) { Ui::showPeerHistory(_searchInPeer, ShowAtUnreadMsgId); } _searchInPeer = _searchInMigrated = 0; @@ -2570,7 +2570,7 @@ void DialogsWidget::onCancelSearchInPeer() { _filter.clear(); _filter.updatePlaceholder(); onFilterUpdate(); - if (cWideMode() && !App::main()->selectingPeer()) { + if (!Adaptive::OneColumn() && !App::main()->selectingPeer()) { emit cancelled(); } } diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 3fba9d150f35b8..f4b9ac2a583a9b 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -4013,9 +4013,9 @@ void MentionsInner::paintEvent(QPaintEvent *e) { } } } - p.fillRect(cWideMode() ? st::lineWidth : 0, _parent->innerBottom() - st::lineWidth, width() - (cWideMode() ? st::lineWidth : 0), st::lineWidth, st::shadowColor->b); + p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerBottom() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); } - p.fillRect(cWideMode() ? st::lineWidth : 0, _parent->innerTop(), width() - (cWideMode() ? st::lineWidth : 0), st::lineWidth, st::shadowColor->b); + p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, _parent->innerTop(), width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); } void MentionsInner::resizeEvent(QResizeEvent *e) { diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 12796df2bdf91a..1013d65098840b 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -176,16 +176,31 @@ namespace Notify { } -struct GlobalDataStruct { +#define DefineReadOnlyVar(Namespace, Type, Name) const Type &Name() { \ + t_assert_full(Namespace##Data != 0, #Namespace "Data is null in " #Namespace "::" #Name, __FILE__, __LINE__); \ + return Namespace##Data->Name; \ +} +#define DefineRefVar(Namespace, Type, Name) DefineReadOnlyVar(Namespace, Type, Name) \ +Type &Ref##Name() { \ + t_assert_full(Namespace##Data != 0, #Namespace "Data is null in Global::Ref" #Name, __FILE__, __LINE__); \ + return Namespace##Data->Name; \ +} +#define DefineVar(Namespace, Type, Name) DefineRefVar(Namespace, Type, Name) \ +void Set##Name(const Type &Name) { \ + t_assert_full(Namespace##Data != 0, #Namespace "Data is null in Global::Set" #Name, __FILE__, __LINE__); \ + Namespace##Data->Name = Name; \ +} + +struct SandboxDataStruct { QString LangSystemISO; int32 LangSystem = languageDefault; QByteArray LastCrashDump; ConnectionProxy PreLaunchProxy; }; -GlobalDataStruct *GlobalData = 0; +SandboxDataStruct *SandboxData = 0; -namespace Global { +namespace Sandbox { bool CheckBetaVersionDir() { QFile beta(cExeDir() + qsl("TelegramBeta_data/tdata/beta")); @@ -248,14 +263,14 @@ namespace Global { } void start() { - GlobalData = new GlobalDataStruct(); + SandboxData = new SandboxDataStruct(); - GlobalData->LangSystemISO = psCurrentLanguage(); - if (GlobalData->LangSystemISO.isEmpty()) GlobalData->LangSystemISO = qstr("en"); + SandboxData->LangSystemISO = psCurrentLanguage(); + if (SandboxData->LangSystemISO.isEmpty()) SandboxData->LangSystemISO = qstr("en"); QByteArray l = LangSystemISO().toLatin1(); for (int32 i = 0; i < languageCount; ++i) { if (l.at(0) == LanguageCodes[i][0] && l.at(1) == LanguageCodes[i][1]) { - GlobalData->LangSystem = i; + SandboxData->LangSystem = i; break; } } @@ -264,68 +279,41 @@ namespace Global { } void finish() { - delete GlobalData; - GlobalData = 0; + delete SandboxData; + SandboxData = 0; } -#define DefineGlobalReadOnly(Type, Name) const Type &Name() { \ - t_assert_full(GlobalData != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ - return GlobalData->Name; \ -} -#define DefineGlobal(Type, Name) DefineGlobalReadOnly(Type, Name) \ -void Set##Name(const Type &Name) { \ - t_assert_full(GlobalData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ - GlobalData->Name = Name; \ -} \ -Type &Ref##Name() { \ - t_assert_full(GlobalData != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ - return GlobalData->Name; \ -} - - DefineGlobalReadOnly(QString, LangSystemISO); - DefineGlobalReadOnly(int32, LangSystem); - DefineGlobal(QByteArray, LastCrashDump); - DefineGlobal(ConnectionProxy, PreLaunchProxy); + DefineReadOnlyVar(Sandbox, QString, LangSystemISO); + DefineReadOnlyVar(Sandbox, int32, LangSystem); + DefineVar(Sandbox, QByteArray, LastCrashDump); + DefineVar(Sandbox, ConnectionProxy, PreLaunchProxy); } -struct SandboxDataStruct { +struct GlobalDataStruct { uint64 LaunchId = 0; + Adaptive::Layout AdaptiveLayout = Adaptive::NormalLayout; }; -SandboxDataStruct *SandboxData = 0; +GlobalDataStruct *GlobalData = 0; -namespace Sandbox { +namespace Global { bool started() { - return SandboxData != 0; + return GlobalData != 0; } void start() { - SandboxData = new SandboxDataStruct(); + GlobalData = new GlobalDataStruct(); - memset_rand(&SandboxData->LaunchId, sizeof(SandboxData->LaunchId)); + memset_rand(&GlobalData->LaunchId, sizeof(GlobalData->LaunchId)); } void finish() { - delete SandboxData; - SandboxData = 0; + delete GlobalData; + GlobalData = 0; } -#define DefineSandboxReadOnly(Type, Name) const Type &Name() { \ - t_assert_full(SandboxData != 0, "_data is null in Global::" #Name, __FILE__, __LINE__); \ - return SandboxData->Name; \ -} -#define DefineSandboxRef(Type, Name) DefineSandboxReadOnly(Type, Name) \ -Type &Ref##Name() { \ - t_assert_full(SandboxData != 0, "_data is null in Global::Ref" #Name, __FILE__, __LINE__); \ - return SandboxData->Name; \ -} -#define DefineSandbox(Type, Name) DefineSandboxRef(Type, Name) \ -void Set##Name(const Type &Name) { \ - t_assert_full(SandboxData != 0, "_data is null in Global::Set" #Name, __FILE__, __LINE__); \ - SandboxData->Name = Name; \ -} - - DefineSandboxReadOnly(uint64, LaunchId); + DefineReadOnlyVar(Global, uint64, LaunchId); + DefineVar(Global, Adaptive::Layout, AdaptiveLayout); }; diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 4c528c4e7ce160..ca390d2c3c7060 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -96,7 +96,13 @@ namespace Notify { }; -namespace Global { +#define DeclareReadOnlyVar(Type, Name) const Type &Name(); +#define DeclareRefVar(Type, Name) DeclareReadOnlyVar(Type, Name) \ + Type &Ref##Name(); +#define DeclareVar(Type, Name) DeclareRefVar(Type, Name) \ + void Set##Name(const Type &Name); + +namespace Sandbox { bool CheckBetaVersionDir(); void WorkingDirReady(); @@ -104,30 +110,40 @@ namespace Global { void start(); void finish(); -#define DeclareGlobalReadOnly(Type, Name) const Type &Name(); -#define DeclareGlobal(Type, Name) DeclareGlobalReadOnly(Type, Name) \ - void Set##Name(const Type &Name); \ - Type &Ref##Name(); - - DeclareGlobalReadOnly(QString, LangSystemISO); - DeclareGlobalReadOnly(int32, LangSystem); - DeclareGlobal(QByteArray, LastCrashDump); - DeclareGlobal(ConnectionProxy, PreLaunchProxy); + DeclareReadOnlyVar(QString, LangSystemISO); + DeclareReadOnlyVar(int32, LangSystem); + DeclareVar(QByteArray, LastCrashDump); + DeclareVar(ConnectionProxy, PreLaunchProxy); } -namespace Sandbox { +namespace Adaptive { + enum Layout { + OneColumnLayout, + NormalLayout, + WideLayout, + }; +}; + +namespace Global { bool started(); void start(); void finish(); -#define DeclareSandboxReadOnly(Type, Name) const Type &Name(); -#define DeclareSandboxRef(Type, Name) DeclareSandboxReadOnly(Type, Name) \ - Type &Ref##Name(); -#define DeclareSandbox(Type, Name) DeclareSandboxRef(Type, Name) \ - void Set##Name(const Type &Name); - - DeclareSandboxReadOnly(uint64, LaunchId); + DeclareReadOnlyVar(uint64, LaunchId); + DeclareVar(Adaptive::Layout, AdaptiveLayout); }; + +namespace Adaptive { + inline bool OneColumn() { + return Global::AdaptiveLayout() == OneColumnLayout; + } + inline bool Normal() { + return Global::AdaptiveLayout() == NormalLayout; + } + inline bool Wide() { + return Global::AdaptiveLayout() == WideLayout; + } +} diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index 46af26b7686b6c..f116dce00cbc07 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -464,7 +464,7 @@ void PopupMenu::showMenu(const QPoint &p, PopupMenu *parent, PressSource source) _parent = parent; QPoint w = p - QPoint(0, _padding.top()); - QRect r = Sandboxer::screenGeometry(p); + QRect r = Sandbox::screenGeometry(p); if (rtl()) { if (w.x() - width() < r.x() - _padding.left()) { if (_parent && w.x() + _parent->width() - _padding.left() - _padding.right() + width() - _padding.right() <= r.x() + r.width()) { @@ -580,7 +580,7 @@ void PopupTooltip::popup(const QPoint &m, const QString &text, const style::Tool _hideByLeaveTimer.setSingleShot(true); connect(&_hideByLeaveTimer, SIGNAL(timeout()), this, SLOT(onHideByLeave())); - Sandboxer::installEventFilter(this); + Sandbox::installEventFilter(this); } _point = m; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 8ac2eb7fe5cf29..2f122ebf65f117 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2923,6 +2923,10 @@ void HistoryItem::setId(MsgId newId) { id = newId; } +bool HistoryItem::displayFromPhoto() const { + return Adaptive::Wide() || (!out() && !history()->peer->isUser() && !fromChannel()); +} + void HistoryItem::clipCallback(ClipReaderNotification notification) { HistoryMedia *media = getMedia(); if (!media) return; @@ -6209,27 +6213,27 @@ void HistoryMessage::initDimensions() { } void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { - int32 mwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width; - if (_media && _media->currentWidth() < mwidth) { - mwidth = qMax(_media->currentWidth(), qMin(mwidth, plainMaxWidth())); + int32 maxwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width, hmaxwidth = st::historyMaxWidth + (Adaptive::Wide() ? (2 * st::msgPhotoSkip) : 0); + if (_media && _media->currentWidth() < maxwidth) { + maxwidth = qMax(_media->currentWidth(), qMin(maxwidth, plainMaxWidth())); } left = 0; - if (hwidth > st::historyMaxWidth) { - left = (hwidth - st::historyMaxWidth) / 2; - hwidth = st::historyMaxWidth; + if (hwidth > hmaxwidth) { + left = (hwidth - hmaxwidth) / 2; + hwidth = hmaxwidth; } left += (!fromChannel() && out()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { - left += st::msgPhotoSkip; + left += (!fromChannel() && out()) ? -st::msgPhotoSkip : st::msgPhotoSkip; } width = hwidth - st::msgMargin.left() - st::msgMargin.right(); - if (width > mwidth) { + if (width > maxwidth) { if (!fromChannel() && out()) { - left += width - mwidth; + left += width - maxwidth; } - width = mwidth; + width = maxwidth; } } @@ -6480,7 +6484,8 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m } if (displayFromPhoto()) { - p.drawPixmap(left - st::msgPhotoSkip, _height - st::msgMargin.bottom() - st::msgPhotoSize, _from->photo->pixRounded(st::msgPhotoSize)); + int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + p.drawPixmap(photoleft, _height - st::msgMargin.bottom() - st::msgPhotoSize, _from->photo->pixRounded(st::msgPhotoSize)); } if (width < 1) return; @@ -6647,7 +6652,8 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - if (x >= left - st::msgPhotoSkip && x < left - st::msgPhotoSkip + st::msgPhotoSize && y >= _height - st::msgMargin.bottom() - st::msgPhotoSize && y < _height - st::msgMargin.bottom()) { + int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + if (x >= photoleft && x < photoleft + st::msgPhotoSize && y >= _height - st::msgMargin.bottom() - st::msgPhotoSize && y < _height - st::msgMargin.bottom()) { lnk = _from->lnk; return; } @@ -6911,7 +6917,8 @@ void HistoryForwarded::getState(TextLinkPtr &lnk, HistoryCursorState &state, int int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - if (x >= left - st::msgPhotoSkip && x < left - st::msgPhotoSkip + st::msgPhotoSize) { + int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + if (x >= photoleft && x < photoleft + st::msgPhotoSize) { return HistoryMessage::getState(lnk, state, x, y); } } @@ -7230,8 +7237,9 @@ void HistoryReply::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x if (drawBubble()) { int32 left = 0, width = 0; countPositionAndSize(left, width); - if (displayFromPhoto()) { // from user left photo - if (x >= left - st::msgPhotoSkip && x < left - st::msgPhotoSkip + st::msgPhotoSize) { + if (displayFromPhoto()) { + int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + if (x >= photoleft && x < photoleft + st::msgPhotoSize) { return HistoryMessage::getState(lnk, state, x, y); } } diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index dfeb4d2b94280f..b1a321eb3bdd82 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -1020,9 +1020,7 @@ class HistoryItem : public HistoryElem { bool hasFromName() const { return (!out() || fromChannel()) && !history()->peer->isUser(); } - bool displayFromPhoto() const { - return !out() && !history()->peer->isUser() && !fromChannel(); - } + bool displayFromPhoto() const; void clipCallback(ClipReaderNotification notification); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index e68ae11835d530..e8af2e89724bb6 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -630,7 +630,7 @@ void HistoryInner::onDragExec() { mimeData->setText(sel); if (!urls.isEmpty()) mimeData->setUrls(urls); - if (uponSelected && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection && cWideMode()) { + if (uponSelected && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection && !Adaptive::OneColumn()) { mimeData->setData(qsl("application/x-td-forward-selected"), "1"); } drag->setMimeData(mimeData); @@ -1987,7 +1987,7 @@ void ReportSpamPanel::resizeEvent(QResizeEvent *e) { void ReportSpamPanel::paintEvent(QPaintEvent *e) { Painter p(this); p.fillRect(QRect(0, 0, width(), height() - st::lineWidth), st::reportSpamBg->b); - p.fillRect(cWideMode() ? st::lineWidth : 0, height() - st::lineWidth, width() - (cWideMode() ? st::lineWidth : 0), st::lineWidth, st::shadowColor->b); + p.fillRect(Adaptive::OneColumn() ? 0 : st::lineWidth, height() - st::lineWidth, width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::lineWidth, st::shadowColor->b); if (!_clear.isHidden()) { p.setPen(st::black->p); p.setFont(st::msgFont->f); @@ -2473,15 +2473,15 @@ void HistoryHider::mousePressEvent(QMouseEvent *e) { void HistoryHider::startHide() { if (hiding) return; hiding = true; - if (cWideMode()) { + if (Adaptive::OneColumn()) { + QTimer::singleShot(0, this, SLOT(deleteLater())); + } else { if (offered) cacheForAnim = myGrab(this, box); if (_forwardRequest) MTP::cancel(_forwardRequest); a_opacity.start(0); _send.hide(); _cancel.hide(); _a_appearance.start(); - } else { - QTimer::singleShot(0, this, SLOT(deleteLater())); } } @@ -2801,7 +2801,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) _attachDragPhoto.hide(); _topShadow.hide(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); connect(&_attachDragDocument, SIGNAL(dropped(const QMimeData*)), this, SLOT(onDocumentDrop(const QMimeData*))); connect(&_attachDragPhoto, SIGNAL(dropped(const QMimeData*)), this, SLOT(onPhotoDrop(const QMimeData*))); @@ -4671,7 +4671,7 @@ void HistoryWidget::step_show(float64 ms, bool timer) { float64 dt = ms / st::slideDuration; if (dt >= 1) { _a_show.stop(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _topShadow.setVisible(_peer ? true : false); a_coordUnder.finish(); @@ -4705,14 +4705,14 @@ void HistoryWidget::doneShow() { } } -void HistoryWidget::updateWideMode() { - _sideShadow.setVisible(cWideMode()); +void HistoryWidget::updateAdaptiveLayout() { + _sideShadow.setVisible(!Adaptive::OneColumn()); } void HistoryWidget::animStop() { if (!_a_show.animating()) return; _a_show.stop(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _topShadow.setVisible(_peer ? true : false); } @@ -5301,7 +5301,7 @@ void HistoryWidget::paintTopBar(QPainter &p, float64 over, int32 decreaseWidth) if (!_history) return; - int32 increaseLeft = cWideMode() ? 0 : (st::topBarForwardPadding.right() - st::topBarForwardPadding.left()); + int32 increaseLeft = Adaptive::OneColumn() ? (st::topBarForwardPadding.right() - st::topBarForwardPadding.left()) : 0; decreaseWidth += increaseLeft; QRect rectForName(st::topBarForwardPadding.left() + increaseLeft, st::topBarForwardPadding.top(), width() - decreaseWidth - st::topBarForwardPadding.left() - st::topBarForwardPadding.right(), st::msgNameFont->height); p.setFont(st::dlgHistFont->f); @@ -5316,20 +5316,20 @@ void HistoryWidget::paintTopBar(QPainter &p, float64 over, int32 decreaseWidth) p.setPen(st::dlgNameColor->p); _peer->dialogName().drawElided(p, rectForName.left(), rectForName.top(), rectForName.width()); - if (cWideMode()) { + if (Adaptive::OneColumn()) { p.setOpacity(st::topBarForwardAlpha + (1 - st::topBarForwardAlpha) * over); - p.drawPixmap(QPoint(width() - (st::topBarForwardPadding.right() + st::topBarForwardImg.pxWidth()) / 2, (st::topBarHeight - st::topBarForwardImg.pxHeight()) / 2), App::sprite(), st::topBarForwardImg); + p.drawPixmap(QPoint((st::topBarForwardPadding.right() - st::topBarBackwardImg.pxWidth()) / 2, (st::topBarHeight - st::topBarBackwardImg.pxHeight()) / 2), App::sprite(), st::topBarBackwardImg); } else { p.setOpacity(st::topBarForwardAlpha + (1 - st::topBarForwardAlpha) * over); - p.drawPixmap(QPoint((st::topBarForwardPadding.right() - st::topBarBackwardImg.pxWidth()) / 2, (st::topBarHeight - st::topBarBackwardImg.pxHeight()) / 2), App::sprite(), st::topBarBackwardImg); + p.drawPixmap(QPoint(width() - (st::topBarForwardPadding.right() + st::topBarForwardImg.pxWidth()) / 2, (st::topBarHeight - st::topBarForwardImg.pxHeight()) / 2), App::sprite(), st::topBarForwardImg); } } void HistoryWidget::topBarClick() { - if (cWideMode()) { - if (_history) App::main()->showPeerProfile(_peer); - } else { + if (Adaptive::OneColumn()) { Ui::showChatsList(); + } else { + if (_history) App::main()->showPeerProfile(_peer); } } @@ -5973,8 +5973,8 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { break; } - _topShadow.resize(width() - ((cWideMode() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); - _topShadow.moveToLeft((cWideMode() && !_inGrab) ? st::lineWidth : 0, 0); + _topShadow.resize(width() - ((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); + _topShadow.moveToLeft((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0, 0); _sideShadow.resize(st::lineWidth, height()); _sideShadow.moveToLeft(0, 0); } diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index b0c454eb7aee51..eda8743a12e850 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -486,7 +486,7 @@ class HistoryWidget : public TWidget, public RPCSender { void step_show(float64 ms, bool timer); void animStop(); - void updateWideMode(); + void updateAdaptiveLayout(); void doneShow(); QPoint clampMousePosition(QPoint point); @@ -562,7 +562,7 @@ class HistoryWidget : public TWidget, public RPCSender { resizeEvent(0); } void grabFinish() { - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); } diff --git a/Telegram/SourceFiles/intro/intro.cpp b/Telegram/SourceFiles/intro/intro.cpp index 71eb5dad838472..c62b8d55cb86f1 100644 --- a/Telegram/SourceFiles/intro/intro.cpp +++ b/Telegram/SourceFiles/intro/intro.cpp @@ -46,9 +46,9 @@ namespace { countryForReg = nearest.vcountry.c_string().v.c_str(); emit signalEmitOn->countryChanged(); } - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - Sandboxer::startUpdateCheck(); - #endif +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + Sandbox::startUpdateCheck(); +#endif } } @@ -425,8 +425,7 @@ void IntroWidget::keyPressEvent(QKeyEvent *e) { } } -void IntroWidget::updateWideMode() { - +void IntroWidget::updateAdaptiveLayout() { } void IntroWidget::rpcInvalidate() { diff --git a/Telegram/SourceFiles/intro/intro.h b/Telegram/SourceFiles/intro/intro.h index 5697c1bee06af6..7ce176f0cae3e4 100644 --- a/Telegram/SourceFiles/intro/intro.h +++ b/Telegram/SourceFiles/intro/intro.h @@ -40,13 +40,13 @@ class IntroWidget : public TWidget { void resizeEvent(QResizeEvent *e); void mousePressEvent(QMouseEvent *e); void keyPressEvent(QKeyEvent *e); - - void updateWideMode(); + + void updateAdaptiveLayout(); void animShow(const QPixmap &bgAnimCache, bool back = false); void step_show(float64 ms, bool timer); void stop_show(); - + void step_stage(float64 ms, bool timer); QRect innerRect() const; @@ -150,7 +150,7 @@ class IntroStage : public TWidget { } protected: - + IntroWidget *intro() { return qobject_cast(parent()); } diff --git a/Telegram/SourceFiles/intro/introphone.cpp b/Telegram/SourceFiles/intro/introphone.cpp index bb2372d7b8650d..482e478111c1ca 100644 --- a/Telegram/SourceFiles/intro/introphone.cpp +++ b/Telegram/SourceFiles/intro/introphone.cpp @@ -230,7 +230,7 @@ void IntroPhone::phoneCheckDone(const MTPauth_CheckedPhone &result) { checkRequest.start(1000); - sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Global::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); + sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(5), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Sandbox::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); } else { showError(lang(lng_bad_phone_noreg), true); enableAll(true); @@ -260,7 +260,7 @@ void IntroPhone::toSignUp() { checkRequest.start(1000); - sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(0), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Global::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); + sentRequest = MTP::send(MTPauth_SendCode(MTP_string(sentPhone), MTP_int(0), MTP_int(ApiId), MTP_string(ApiHash), MTP_string(Sandbox::LangSystemISO())), rpcDone(&IntroPhone::phoneSubmitDone), rpcFail(&IntroPhone::phoneSubmitFail)); } bool IntroPhone::phoneSubmitFail(const RPCError &error) { diff --git a/Telegram/SourceFiles/intro/introsteps.cpp b/Telegram/SourceFiles/intro/introsteps.cpp index 87359c9a8955e8..d55c7ccad88574 100644 --- a/Telegram/SourceFiles/intro/introsteps.cpp +++ b/Telegram/SourceFiles/intro/introsteps.cpp @@ -36,7 +36,7 @@ _next(this, lang(lng_start_msgs), st::btnIntroNext) { _changeLang.hide(); if (cLang() == languageDefault) { - int32 l = Global::LangSystem(); + int32 l = Sandbox::LangSystem(); if (l != languageDefault) { LangLoaderPlain loader(qsl(":/langs/lang_") + LanguageCodes[l] + qsl(".strings"), LangLoaderRequest(lng_switch_to_this)); QString text = loader.found().value(lng_switch_to_this); diff --git a/Telegram/SourceFiles/layerwidget.cpp b/Telegram/SourceFiles/layerwidget.cpp index e419334a220065..63a1c0ec68dc09 100644 --- a/Telegram/SourceFiles/layerwidget.cpp +++ b/Telegram/SourceFiles/layerwidget.cpp @@ -125,8 +125,7 @@ void BackgroundWidget::resizeEvent(QResizeEvent *e) { w->parentResized(); } -void BackgroundWidget::updateWideMode() { - +void BackgroundWidget::updateAdaptiveLayout() { } void BackgroundWidget::replaceInner(LayeredWidget *n) { diff --git a/Telegram/SourceFiles/layerwidget.h b/Telegram/SourceFiles/layerwidget.h index 8729dc7c6b9b28..6ec55cd245fa2d 100644 --- a/Telegram/SourceFiles/layerwidget.h +++ b/Telegram/SourceFiles/layerwidget.h @@ -71,7 +71,7 @@ class BackgroundWidget : public TWidget { void mousePressEvent(QMouseEvent *e); void resizeEvent(QResizeEvent *e); - void updateWideMode(); + void updateAdaptiveLayout(); void replaceInner(LayeredWidget *n); void showLayerLast(LayeredWidget *n); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index c8061a4f9bac12..1f3e02b547c778 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -295,7 +295,7 @@ namespace Logs { Initializer::Initializer() { t_assert(LogsData == 0); - if (!Global::CheckBetaVersionDir()) { + if (!Sandbox::CheckBetaVersionDir()) { return; } bool workingDirChosen = cBetaVersion(); @@ -336,7 +336,7 @@ namespace Logs { QDir().setCurrent(cWorkingDir()); QDir().mkpath(cWorkingDir() + qstr("tdata")); - Global::WorkingDirReady(); + Sandbox::WorkingDirReady(); SignalHandlers::StartBreakpad(); if (!LogsData->openMain()) { @@ -940,7 +940,7 @@ namespace SignalHandlers { } fclose(f); - Global::SetLastCrashDump(lastdump); + Sandbox::SetLastCrashDump(lastdump); LOG(("Opened '%1' for reading, the previous Telegram Desktop launch was not finished properly :( Crash log size: %2").arg(QString::fromUtf8(CrashDumpPath)).arg(lastdump.size())); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index f21e981dd4fe2c..e91ac441129b30 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -282,7 +282,7 @@ void TopBarWidget::startAnim() { void TopBarWidget::stopAnim() { _animating = false; - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); showAll(); } @@ -346,13 +346,13 @@ void TopBarWidget::showAll() { _mediaType.hide(); } } - if (App::main() && App::main()->historyPeer() && !o && !p && _clearSelection.isHidden() && !cWideMode()) { + if (App::main() && App::main()->historyPeer() && !o && !p && _clearSelection.isHidden() && Adaptive::OneColumn()) { _info.show(); } else { _info.hide(); } } - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); resizeEvent(0); } @@ -367,7 +367,7 @@ void TopBarWidget::showSelected(uint32 selCount, bool canDelete) { showAll(); } -void TopBarWidget::updateWideMode() { +void TopBarWidget::updateAdaptiveLayout() { showAll(); } @@ -453,10 +453,10 @@ MainWidget::MainWidget(Window *window) : TWidget(window) connect(&_cacheBackgroundTimer, SIGNAL(timeout()), this, SLOT(onCacheBackground())); dialogs.show(); - if (cWideMode()) { - history.show(); - } else { + if (Adaptive::OneColumn()) { history.hide(); + } else { + history.show(); } App::wnd()->getTitle()->updateBackButton(); _topBar.hide(); @@ -715,7 +715,7 @@ QPixmap MainWidget::grabInner() { return myGrab(overview); } else if (profile && !profile->isHidden()) { return myGrab(profile); - } else if (!cWideMode() && history.isHidden()) { + } else if (Adaptive::OneColumn() && history.isHidden()) { return myGrab(&dialogs, QRect(0, st::topBarHeight, dialogs.width(), dialogs.height() - st::topBarHeight)); } else if (history.peer()) { return myGrab(&history); @@ -734,7 +734,7 @@ bool MainWidget::isItemVisible(HistoryItem *item) { QPixmap MainWidget::grabTopBar() { if (!_topBar.isHidden()) { return myGrab(&_topBar); - } else if (!cWideMode() && history.isHidden()) { + } else if (Adaptive::OneColumn() && history.isHidden()) { return myGrab(&dialogs, QRect(0, 0, dialogs.width(), st::topBarHeight)); } else { return myGrab(&history, QRect(0, 0, history.width(), st::topBarHeight)); @@ -838,12 +838,7 @@ void MainWidget::notify_historyItemResized(const HistoryItem *item, bool scrollT void MainWidget::noHider(HistoryHider *destroyed) { if (_hider == destroyed) { _hider = 0; - if (cWideMode()) { - if (_forwardConfirm) { - _forwardConfirm->deleteLater(); - _forwardConfirm = 0; - } - } else { + if (Adaptive::OneColumn()) { if (_forwardConfirm) { _forwardConfirm->startHide(); _forwardConfirm = 0; @@ -864,6 +859,11 @@ void MainWidget::noHider(HistoryHider *destroyed) { } } App::wnd()->getTitle()->updateBackButton(); + } else { + if (_forwardConfirm) { + _forwardConfirm->deleteLater(); + _forwardConfirm = 0; + } } } } @@ -876,11 +876,7 @@ void MainWidget::hiderLayer(HistoryHider *h) { _hider = h; connect(_hider, SIGNAL(forwarded()), &dialogs, SLOT(onCancelSearch())); - if (cWideMode()) { - _hider->show(); - resizeEvent(0); - dialogs.activate(); - } else { + if (Adaptive::OneColumn()) { dialogsToUp(); _hider->hide(); @@ -898,6 +894,10 @@ void MainWidget::hiderLayer(HistoryHider *h) { resizeEvent(0); dialogs.animShow(animCache); App::wnd()->getTitle()->updateBackButton(); + } else { + _hider->show(); + resizeEvent(0); + dialogs.activate(); } } @@ -937,7 +937,7 @@ bool MainWidget::selectingPeer(bool withConfirm) { void MainWidget::offerPeer(PeerId peer) { Ui::hideLayer(); - if (_hider->offerPeer(peer) && !cWideMode()) { + if (_hider->offerPeer(peer) && Adaptive::OneColumn()) { _forwardConfirm = new ConfirmBox(_hider->offeredText(), lang(lng_forward_send)); connect(_forwardConfirm, SIGNAL(confirmed()), _hider, SLOT(forward())); connect(_forwardConfirm, SIGNAL(cancelled()), this, SLOT(onForwardCancel())); @@ -1402,7 +1402,7 @@ bool MainWidget::insertBotCommand(const QString &cmd, bool specialGif) { void MainWidget::searchMessages(const QString &query, PeerData *inPeer) { App::wnd()->hideMediaview(); dialogs.searchMessages(query, inPeer); - if (!cWideMode()) { + if (Adaptive::OneColumn()) { Ui::showChatsList(); } else { dialogs.activate(); @@ -2286,15 +2286,15 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool bac } QPixmap animCache, animTopBarCache; - if (!_a_show.animating() && ((history.isHidden() && (profile || overview)) || (!cWideMode() && (history.isHidden() || !peerId)))) { + if (!_a_show.animating() && ((history.isHidden() && (profile || overview)) || (Adaptive::OneColumn() && (history.isHidden() || !peerId)))) { if (peerId) { animCache = grabInner(); - } else if (cWideMode()) { - animCache = myGrab(this, QRect(_dialogsWidth, _playerHeight, width() - _dialogsWidth, height() - _playerHeight)); - } else { + } else if (Adaptive::OneColumn()) { animCache = myGrab(this, QRect(0, _playerHeight, _dialogsWidth, height() - _playerHeight)); + } else { + animCache = myGrab(this, QRect(_dialogsWidth, _playerHeight, width() - _dialogsWidth, height() - _playerHeight)); } - if (peerId || cWideMode()) { + if (peerId || !Adaptive::OneColumn()) { animTopBarCache = grabTopBar(); } history.show(); @@ -2302,7 +2302,7 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool bac if (history.peer() && history.peer()->id != peerId) clearBotStartToken(history.peer()); history.showHistory(peerId, showAtMsgId); - bool noPeer = (!history.peer() || !history.peer()->id), onlyDialogs = noPeer && !cWideMode(); + bool noPeer = (!history.peer() || !history.peer()->id), onlyDialogs = noPeer && Adaptive::OneColumn(); if (profile || overview) { if (profile) { profile->hide(); @@ -2343,7 +2343,7 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool bac } _viewsIncremented.remove(activePeer()); } - if (!cWideMode() && !dialogs.isHidden()) dialogs.hide(); + if (Adaptive::OneColumn() && !dialogs.isHidden()) dialogs.hide(); if (!_a_show.animating()) { if (history.isHidden()) history.show(); if (!animCache.isNull()) { @@ -2437,7 +2437,7 @@ void MainWidget::showMediaOverview(PeerData *peer, MediaOverviewType type, bool QRect topBarRect = QRect(_topBar.x(), _topBar.y(), _topBar.width(), st::topBarHeight); QRect historyRect = QRect(history.x(), topBarRect.y() + topBarRect.height(), history.width(), history.y() + history.height() - topBarRect.y() - topBarRect.height()); QPixmap animCache, animTopBarCache; - if (!_a_show.animating() && (!cWideMode() || profile || overview || history.peer())) { + if (!_a_show.animating() && (Adaptive::OneColumn() || profile || overview || history.peer())) { animCache = grabInner(); animTopBarCache = grabTopBar(); } @@ -2481,7 +2481,7 @@ void MainWidget::showMediaOverview(PeerData *peer, MediaOverviewType type, bool if (back) clearBotStartToken(history.peer()); history.showHistory(0, 0); history.hide(); - if (!cWideMode()) dialogs.hide(); + if (Adaptive::OneColumn()) dialogs.hide(); orderWidgets(); @@ -2531,7 +2531,7 @@ void MainWidget::showPeerProfile(PeerData *peer, bool back, int32 lastScrollTop) if (back) clearBotStartToken(history.peer()); history.showHistory(0, 0); history.hide(); - if (!cWideMode()) dialogs.hide(); + if (Adaptive::OneColumn()) dialogs.hide(); orderWidgets(); @@ -2728,27 +2728,7 @@ void MainWidget::showAll() { cSetPasswordRecovered(false); Ui::showLayer(new InformBox(lang(lng_signin_password_removed))); } - if (cWideMode()) { - if (_hider) { - _hider->show(); - if (_forwardConfirm) { - Ui::hideLayer(true); - _forwardConfirm = 0; - } - } - dialogs.show(); - if (overview) { - overview->show(); - } else if (profile) { - profile->show(); - } else { - history.show(); - history.resizeEvent(0); - } - if (profile || overview || history.peer()) { - _topBar.show(); - } - } else { + if (Adaptive::OneColumn()) { if (_hider) { _hider->hide(); if (!_forwardConfirm && _hider->wasOffered()) { @@ -2779,6 +2759,26 @@ void MainWidget::showAll() { _topBar.show(); dialogs.hide(); } + } else { + if (_hider) { + _hider->show(); + if (_forwardConfirm) { + Ui::hideLayer(true); + _forwardConfirm = 0; + } + } + dialogs.show(); + if (overview) { + overview->show(); + } else if (profile) { + profile->show(); + } else { + history.show(); + history.resizeEvent(0); + } + if (profile || overview || history.peer()) { + _topBar.show(); + } } if (audioPlayer()) { SongMsgId playing; @@ -2802,7 +2802,14 @@ void MainWidget::showAll() { void MainWidget::resizeEvent(QResizeEvent *e) { int32 tbh = _topBar.isHidden() ? 0 : st::topBarHeight; - if (cWideMode()) { + if (Adaptive::OneColumn()) { + _dialogsWidth = width(); + _player.setGeometry(0, 0, _dialogsWidth, _player.height()); + dialogs.setGeometry(0, _playerHeight, _dialogsWidth, height() - _playerHeight); + _topBar.setGeometry(0, _playerHeight, _dialogsWidth, st::topBarHeight); + history.setGeometry(0, _playerHeight + tbh, _dialogsWidth, height() - _playerHeight - tbh); + if (_hider) _hider->setGeometry(0, 0, _dialogsWidth, height()); + } else { _dialogsWidth = snap((width() * 5) / 14, st::dlgMinWidth, st::dlgMaxWidth); dialogs.resize(_dialogsWidth, height()); dialogs.moveToLeft(0, 0); @@ -2816,13 +2823,6 @@ void MainWidget::resizeEvent(QResizeEvent *e) { _hider->resize(width() - _dialogsWidth, height()); _hider->moveToLeft(_dialogsWidth, 0); } - } else { - _dialogsWidth = width(); - _player.setGeometry(0, 0, _dialogsWidth, _player.height()); - dialogs.setGeometry(0, _playerHeight, _dialogsWidth, height() - _playerHeight); - _topBar.setGeometry(0, _playerHeight, _dialogsWidth, st::topBarHeight); - history.setGeometry(0, _playerHeight + tbh, _dialogsWidth, height() - _playerHeight - tbh); - if (_hider) _hider->setGeometry(0, 0, _dialogsWidth, height()); } _mediaType.moveToLeft(width() - _mediaType.width(), _playerHeight + st::topBarHeight); if (profile) profile->setGeometry(history.geometry()); @@ -2838,13 +2838,13 @@ int32 MainWidget::contentScrollAddToY() const { void MainWidget::keyPressEvent(QKeyEvent *e) { } -void MainWidget::updateWideMode() { +void MainWidget::updateAdaptiveLayout() { showAll(); - _topBar.updateWideMode(); - history.updateWideMode(); - if (overview) overview->updateWideMode(); - if (profile) profile->updateWideMode(); - _player.updateWideMode(); + _topBar.updateAdaptiveLayout(); + history.updateAdaptiveLayout(); + if (overview) overview->updateAdaptiveLayout(); + if (profile) profile->updateAdaptiveLayout(); + _player.updateAdaptiveLayout(); } bool MainWidget::needBackButton() { @@ -2910,7 +2910,7 @@ void MainWidget::onTopBarClick() { } void MainWidget::onHistoryShown(History *history, MsgId atMsgId) { - if ((cWideMode() || !selectingPeer()) && (profile || overview || history)) { + if ((!Adaptive::OneColumn() || !selectingPeer()) && (profile || overview || history)) { _topBar.show(); } else { _topBar.hide(); @@ -2925,11 +2925,11 @@ void MainWidget::onHistoryShown(History *history, MsgId atMsgId) { void MainWidget::searchInPeer(PeerData *peer) { dialogs.searchInPeer(peer); - if (cWideMode()) { - dialogs.activate(); - } else { + if (Adaptive::OneColumn()) { dialogsToUp(); Ui::showChatsList(); + } else { + dialogs.activate(); } } @@ -3458,9 +3458,9 @@ void MainWidget::start(const MTPUser &user) { cSetOtherOnline(0); App::feedUsers(MTP_vector(1, user)); - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - Sandboxer::startUpdateCheck(); - #endif +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + Sandbox::startUpdateCheck(); +#endif MTP::send(MTPupdates_GetState(), rpcDone(&MainWidget::gotState)); update(); if (!cStartUrl().isEmpty()) { diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 4470adaf00d672..44e9e2accb5102 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -55,7 +55,7 @@ class TopBarWidget : public TWidget { void showAll(); void showSelected(uint32 selCount, bool canDelete = false); - void updateWideMode(); + void updateAdaptiveLayout(); FlatButton *mediaTypeButton(); @@ -63,7 +63,7 @@ class TopBarWidget : public TWidget { _sideShadow.hide(); } void grabFinish() { - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); } public slots: @@ -192,7 +192,7 @@ class MainWidget : public TWidget, public RPCSender { void resizeEvent(QResizeEvent *e); void keyPressEvent(QKeyEvent *e); - void updateWideMode(); + void updateAdaptiveLayout(); bool needBackButton(); void paintTopBar(QPainter &p, float64 over, int32 decreaseWidth); diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 94d00c2e3f8ec2..84af93dba5918d 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -179,7 +179,7 @@ void MediaView::moveToScreen() { } QPoint wndCenter(App::wnd()->x() + App::wnd()->width() / 2, App::wnd()->y() + App::wnd()->height() / 2); - QRect avail = Sandboxer::screenGeometry(wndCenter); + QRect avail = Sandbox::screenGeometry(wndCenter); if (avail != geometry()) { setGeometry(avail); } @@ -586,7 +586,7 @@ void MediaView::onSaveAs() { } } activateWindow(); - Sandboxer::setActiveWindow(this); + Sandbox::setActiveWindow(this); setFocus(); } @@ -1074,7 +1074,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty show(); psShowOverAll(this); activateWindow(); - Sandboxer::setActiveWindow(this); + Sandbox::setActiveWindow(this); setFocus(); } } @@ -1990,7 +1990,7 @@ void MediaView::onCheckActive() { if (App::wnd() && isVisible()) { if (App::wnd()->isActiveWindow() && App::wnd()->hasFocus()) { activateWindow(); - Sandboxer::setActiveWindow(this); + Sandbox::setActiveWindow(this); setFocus(); } } diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index dd53bfa50e77a3..0c9c0698bae784 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -623,7 +623,7 @@ void OverviewInner::onDragExec() { QList urls; bool forwardSelected = false; if (uponSelected) { - forwardSelected = !_selected.isEmpty() && _selected.cbegin().value() == FullSelection && cWideMode(); + forwardSelected = !_selected.isEmpty() && _selected.cbegin().value() == FullSelection && !Adaptive::OneColumn(); } else if (textlnkDown()) { sel = textlnkDown()->encoded(); if (!sel.isEmpty() && sel.at(0) != '/' && sel.at(0) != '@' && sel.at(0) != '#') { @@ -2007,7 +2007,7 @@ OverviewWidget::OverviewWidget(QWidget *parent, PeerData *peer, MediaOverviewTyp _scroll.move(0, 0); _inner.move(0, 0); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); updateScrollColors(); @@ -2058,8 +2058,8 @@ void OverviewWidget::resizeEvent(QResizeEvent *e) { } _noDropResizeIndex = false; - _topShadow.resize(width() - ((cWideMode() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); - _topShadow.moveToLeft((cWideMode() && !_inGrab) ? st::lineWidth : 0, 0); + _topShadow.resize(width() - ((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); + _topShadow.moveToLeft((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0, 0); _sideShadow.resize(st::lineWidth, height()); _sideShadow.moveToLeft(0, 0); } @@ -2240,7 +2240,7 @@ void OverviewWidget::step_show(float64 ms, bool timer) { float64 dt = ms / st::slideDuration; if (dt >= 1) { _a_show.stop(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _topShadow.show(); a_coordUnder.finish(); @@ -2263,8 +2263,8 @@ void OverviewWidget::step_show(float64 ms, bool timer) { } } -void OverviewWidget::updateWideMode() { - _sideShadow.setVisible(cWideMode()); +void OverviewWidget::updateAdaptiveLayout() { + _sideShadow.setVisible(!Adaptive::OneColumn()); } void OverviewWidget::doneShow() { diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index b6c63428c5545b..58d1efbd54c37d 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -271,7 +271,7 @@ class OverviewWidget : public TWidget, public RPCSender { void animShow(const QPixmap &oldAnimCache, const QPixmap &bgAnimTopBarCache, bool back = false, int32 lastScrollTop = -1); void step_show(float64 ms, bool timer); - void updateWideMode(); + void updateAdaptiveLayout(); void doneShow(); void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); @@ -297,7 +297,7 @@ class OverviewWidget : public TWidget, public RPCSender { resizeEvent(0); } void grabFinish() { - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); } diff --git a/Telegram/SourceFiles/playerwidget.cpp b/Telegram/SourceFiles/playerwidget.cpp index 3ced88806cf3ef..7fdaa1b6ddabd1 100644 --- a/Telegram/SourceFiles/playerwidget.cpp +++ b/Telegram/SourceFiles/playerwidget.cpp @@ -59,7 +59,7 @@ PlayerWidget::PlayerWidget(QWidget *parent) : TWidget(parent) resize(st::wndMinWidth, st::playerHeight); setMouseTracking(true); memset(_stateHovers, 0, sizeof(_stateHovers)); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); } void PlayerWidget::paintEvent(QPaintEvent *e) { @@ -364,8 +364,8 @@ void PlayerWidget::mediaOverviewUpdated(PeerData *peer, MediaOverviewType type) } } -void PlayerWidget::updateWideMode() { - _sideShadow.setVisible(cWideMode()); +void PlayerWidget::updateAdaptiveLayout() { + _sideShadow.setVisible(!Adaptive::OneColumn()); } bool PlayerWidget::seekingSong(const SongMsgId &song) const { @@ -551,7 +551,7 @@ void PlayerWidget::stopPressed() { void PlayerWidget::resizeEvent(QResizeEvent *e) { int32 availh = (height() - st::playerLineHeight); int32 ch = st::playerPlay.pxHeight() + st::playerSkip, ct = (availh - ch) / 2; - _playbackRect = QRect(cWideMode() ? st::lineWidth : 0, height() - st::playerMoverSize.height(), width() - (cWideMode() ? st::lineWidth : 0), st::playerMoverSize.height()); + _playbackRect = QRect(Adaptive::OneColumn() ? 0 : st::lineWidth, height() - st::playerMoverSize.height(), width() - (Adaptive::OneColumn() ? 0 : st::lineWidth), st::playerMoverSize.height()); _prevRect = _fullAvailable ? QRect(st::playerSkip / 2, ct, st::playerPrev.pxWidth() + st::playerSkip, ch) : QRect(); _playRect = QRect(_fullAvailable ? (_prevRect.x() + _prevRect.width()) : (st::playerSkip / 2), ct, st::playerPlay.pxWidth() + st::playerSkip, ch); _nextRect = _fullAvailable ? QRect(_playRect.x() + _playRect.width(), ct, st::playerNext.pxWidth() + st::playerSkip, ch) : QRect(); diff --git a/Telegram/SourceFiles/playerwidget.h b/Telegram/SourceFiles/playerwidget.h index 2dacfcad99cba1..3c5cffbd3ac8b7 100644 --- a/Telegram/SourceFiles/playerwidget.h +++ b/Telegram/SourceFiles/playerwidget.h @@ -51,7 +51,7 @@ class PlayerWidget : public TWidget { void clearSelection(); void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); - void updateWideMode(); + void updateAdaptiveLayout(); bool seekingSong(const SongMsgId &song) const; diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 0c69c8421c0756..a98dee9507e33a 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -1731,7 +1731,7 @@ ProfileWidget::ProfileWidget(QWidget *parent, PeerData *peer) : TWidget(parent) _inner.move(0, 0); _scroll.show(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); connect(&_scroll, SIGNAL(scrolled()), &_inner, SLOT(updateSelected())); connect(&_scroll, SIGNAL(scrolled()), this, SLOT(onScroll())); @@ -1763,8 +1763,8 @@ void ProfileWidget::resizeEvent(QResizeEvent *e) { } } - _topShadow.resize(width() - ((cWideMode() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); - _topShadow.moveToLeft((cWideMode() && !_inGrab) ? st::lineWidth : 0, 0); + _topShadow.resize(width() - ((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0), st::lineWidth); + _topShadow.moveToLeft((!Adaptive::OneColumn() && !_inGrab) ? st::lineWidth : 0, 0); _sideShadow.resize(st::lineWidth, height()); _sideShadow.moveToLeft(0, 0); } @@ -1862,7 +1862,7 @@ void ProfileWidget::step_show(float64 ms, bool timer) { float64 dt = ms / st::slideDuration; if (dt >= 1) { _a_show.stop(); - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _topShadow.show(); a_coordUnder.finish(); @@ -1914,8 +1914,8 @@ void ProfileWidget::mediaOverviewUpdated(PeerData *peer, MediaOverviewType type) } } -void ProfileWidget::updateWideMode() { - _sideShadow.setVisible(cWideMode()); +void ProfileWidget::updateAdaptiveLayout() { + _sideShadow.setVisible(!Adaptive::OneColumn()); } void ProfileWidget::clear() { diff --git a/Telegram/SourceFiles/profilewidget.h b/Telegram/SourceFiles/profilewidget.h index 66523d65d050bc..73fcf2f2419258 100644 --- a/Telegram/SourceFiles/profilewidget.h +++ b/Telegram/SourceFiles/profilewidget.h @@ -245,7 +245,7 @@ class ProfileWidget : public TWidget, public RPCSender { void updateNotifySettings(); void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); - void updateWideMode(); + void updateAdaptiveLayout(); void grabStart() { _sideShadow.hide(); @@ -253,7 +253,7 @@ class ProfileWidget : public TWidget, public RPCSender { resizeEvent(0); } void grabFinish() { - _sideShadow.setVisible(cWideMode()); + _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); } diff --git a/Telegram/SourceFiles/pspecific_mac_p.mm b/Telegram/SourceFiles/pspecific_mac_p.mm index 21e641e1a16ccf..9bacdd112bc180 100644 --- a/Telegram/SourceFiles/pspecific_mac_p.mm +++ b/Telegram/SourceFiles/pspecific_mac_p.mm @@ -211,7 +211,7 @@ - (void) userNotificationCenter:(NSUserNotificationCenter *)center didActivateNo NSNumber *instObj = [[notification userInfo] objectForKey:@"launch"]; unsigned long long instLong = instObj ? [instObj unsignedLongLongValue] : 0; DEBUG_LOG(("Received notification with instance %1").arg(instLong)); - if (instLong != Sandbox::LaunchId()) { // other app instance notification + if (instLong != Global::LaunchId()) { // other app instance notification return; } if (notification.activationType == NSUserNotificationActivationTypeReplied) { @@ -283,8 +283,8 @@ void objc_activateWnd(WId winId) { NSUserNotification *notification = [[NSUserNotification alloc] init]; NSImage *img = qt_mac_create_nsimage(pix); - DEBUG_LOG(("Sending notification with userinfo: peer %1, msgId %2 and instance %3").arg(peer).arg(msgId).arg(Sandbox::LaunchId())); - [notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:Sandbox::LaunchId()],@"launch",nil]]; + DEBUG_LOG(("Sending notification with userinfo: peer %1, msgId %2 and instance %3").arg(peer).arg(msgId).arg(Global::LaunchId())); + [notification setUserInfo:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithUnsignedLongLong:peer],@"peer",[NSNumber numberWithInt:msgId],@"msgid",[NSNumber numberWithUnsignedLongLong:Global::LaunchId()],@"launch",nil]]; [notification setTitle:QNSString(title).s()]; [notification setSubtitle:QNSString(subtitle).s()]; @@ -352,7 +352,7 @@ void objc_activateWnd(WId winId) { NSArray *notifies = [center deliveredNotifications]; for (id notify in notifies) { NSDictionary *dict = [notify userInfo]; - if ([[dict objectForKey:@"peer"] unsignedLongLongValue] == peer && [[dict objectForKey:@"launch"] unsignedLongLongValue] == Sandbox::LaunchId()) { + if ([[dict objectForKey:@"peer"] unsignedLongLongValue] == peer && [[dict objectForKey:@"launch"] unsignedLongLongValue] == Global::LaunchId()) { [center removeDeliveredNotification:notify]; } } diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 6d40abeabe4c37..b29ff4c1f876cf 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -271,7 +271,7 @@ namespace { return false; } - QRect avail(Sandboxer::availableGeometry()); + QRect avail(Sandbox::availableGeometry()); max_w = avail.width(); if (max_w < st::wndMinWidth) max_w = st::wndMinWidth; max_h = avail.height(); @@ -1194,7 +1194,7 @@ void PsMainWindow::psInitSize() { setMinimumHeight(st::wndMinHeight); TWindowPos pos(cWindowPos()); - QRect avail(Sandboxer::availableGeometry()); + QRect avail(Sandbox::availableGeometry()); bool maximized = false; QRect geom(avail.x() + (avail.width() - st::wndDefWidth) / 2, avail.y() + (avail.height() - st::wndDefHeight) / 2, st::wndDefWidth, st::wndDefHeight); if (pos.w && pos.h) { diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index 316567c0d3ae53..bd6578eb7631ca 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -155,8 +155,6 @@ bool gIsElCapitan = false; bool gContactsReceived = false; bool gDialogsReceived = false; -bool gWideMode = true; - int gOnlineUpdatePeriod = 120000; int gOfflineBlurTimeout = 5000; int gOfflineIdleTimeout = 30000; diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index 28cc53382f906e..dc4adaaa64d352 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -324,8 +324,6 @@ DeclareReadSetting(QUrl, UpdateURL); DeclareSetting(bool, ContactsReceived); DeclareSetting(bool, DialogsReceived); -DeclareSetting(bool, WideMode); - DeclareSetting(int, OnlineUpdatePeriod); DeclareSetting(int, OfflineBlurTimeout); DeclareSetting(int, OfflineIdleTimeout); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index af03d71853c393..36c4fa1df08a19 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -221,7 +221,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) connect(App::main(), SIGNAL(peerPhotoChanged(PeerData *)), this, SLOT(peerUpdated(PeerData *))); connect(App::main(), SIGNAL(peerNameChanged(PeerData *, const PeerData::Names &, const PeerData::NameFirstChars &)), this, SLOT(peerUpdated(PeerData *))); - Sandboxer::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onReloadPassword(Qt::ApplicationState))); + Sandbox::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onReloadPassword(Qt::ApplicationState))); } // profile @@ -269,11 +269,11 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) _newVersionWidth = st::linkFont->width(_newVersionText); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - Sandboxer::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); - Sandboxer::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); - Sandboxer::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); - Sandboxer::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); - Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); + Sandbox::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); + Sandbox::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); + Sandbox::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); + Sandbox::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + Sandbox::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); #endif // chat options @@ -330,10 +330,10 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) updateOnlineDisplay(); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - switch (Sandboxer::updatingState()) { + switch (Sandbox::updatingState()) { case Application::UpdatingDownload: setUpdatingState(UpdatingDownload, true); - setDownloadProgress(Sandboxer::updatingReady(), Sandboxer::updatingSize()); + setDownloadProgress(Sandbox::updatingReady(), Sandbox::updatingSize()); break; case Application::UpdatingReady: setUpdatingState(UpdatingReady, true); break; default: setUpdatingState(UpdatingNone, true); break; @@ -1261,14 +1261,14 @@ void SettingsInner::onAutoUpdate() { Local::writeSettings(); resizeEvent(0); if (cAutoUpdate()) { - Sandboxer::startUpdateCheck(); + Sandbox::startUpdateCheck(); if (_updatingState == UpdatingNone) { _checkNow.show(); } else if (_updatingState == UpdatingReady) { _restartNow.show(); } } else { - Sandboxer::stopUpdate(); + Sandbox::stopUpdate(); _restartNow.hide(); _checkNow.hide(); } @@ -1279,7 +1279,7 @@ void SettingsInner::onCheckNow() { if (!cAutoUpdate()) return; cSetLastUpdateCheck(0); - Sandboxer::startUpdateCheck(); + Sandbox::startUpdateCheck(); } #endif @@ -1867,10 +1867,10 @@ void SettingsWidget::showAll() { _scroll.show(); _inner.show(); _inner.showAll(); - if (cWideMode()) { - _close.show(); - } else { + if (Adaptive::OneColumn()) { _close.hide(); + } else { + _close.show(); } } @@ -1892,11 +1892,11 @@ void SettingsWidget::dragEnterEvent(QDragEnterEvent *e) { void SettingsWidget::dropEvent(QDropEvent *e) { } -void SettingsWidget::updateWideMode() { - if (cWideMode()) { - _close.show(); - } else { +void SettingsWidget::updateAdaptiveLayout() { + if (Adaptive::OneColumn()) { _close.hide(); + } else { + _close.show(); } } diff --git a/Telegram/SourceFiles/settingswidget.h b/Telegram/SourceFiles/settingswidget.h index c3a8449be33848..08499ca60d58ca 100644 --- a/Telegram/SourceFiles/settingswidget.h +++ b/Telegram/SourceFiles/settingswidget.h @@ -316,7 +316,7 @@ class SettingsWidget : public TWidget { void dragEnterEvent(QDragEnterEvent *e); void dropEvent(QDropEvent *e); - void updateWideMode(); + void updateAdaptiveLayout(); void animShow(const QPixmap &bgAnimCache, bool back = false); void step_show(float64 ms, bool timer); diff --git a/Telegram/SourceFiles/sysbuttons.cpp b/Telegram/SourceFiles/sysbuttons.cpp index ec81716c788d8c..44fd04ef5988c5 100644 --- a/Telegram/SourceFiles/sysbuttons.cpp +++ b/Telegram/SourceFiles/sysbuttons.cpp @@ -150,7 +150,7 @@ UpdateBtn::UpdateBtn(QWidget *parent, Window *window, const QString &text) : Sys void UpdateBtn::onClick() { #ifndef TDESKTOP_DISABLE_AUTOUPDATE checkReadyUpdate(); - if (Sandboxer::updatingState() == Application::UpdatingReady) { + if (Sandbox::updatingState() == Application::UpdatingReady) { cSetRestartingUpdate(true); } else #endif diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 9c6e38997693af..2bc52abc63804a 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -75,7 +75,7 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) _back.hide(); if ( #ifndef TDESKTOP_DISABLE_AUTOUPDATE - Sandboxer::updatingState() == Application::UpdatingReady || + Sandbox::updatingState() == Application::UpdatingReady || #endif cHasPasscode() ) { @@ -91,7 +91,7 @@ TitleWidget::TitleWidget(Window *window) : TWidget(window) connect(wnd->windowHandle(), SIGNAL(windowStateChanged(Qt::WindowState)), this, SLOT(stateChanged(Qt::WindowState))); #ifndef TDESKTOP_DISABLE_AUTOUPDATE - Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(showUpdateBtn())); + Sandbox::connect(SIGNAL(updateReady()), this, SLOT(showUpdateBtn())); #endif if (cPlatform() != dbipWindows) { @@ -111,7 +111,7 @@ void TitleWidget::paintEvent(QPaintEvent *e) { p.drawText(st::titleMenuOffset - st::titleTextButton.width / 2, st::titleTextButton.textTop + st::titleTextButton.font->ascent, lang(lng_forward_choose)); } p.drawPixmap(st::titleIconPos, App::sprite(), st::titleIconImg); - if (!cWideMode() && !_counter.isNull() && App::main()) { + if (Adaptive::OneColumn() && !_counter.isNull() && App::main()) { p.drawPixmap(st::titleIconPos.x() + st::titleIconImg.pxWidth() - (_counter.width() / cIntRetinaFactor()), st::titleIconPos.y() + st::titleIconImg.pxHeight() - (_counter.height() / cIntRetinaFactor()), _counter); } } @@ -130,10 +130,10 @@ void TitleWidget::setHideLevel(float64 level) { hider = new TitleHider(this); hider->move(0, 0); hider->resize(size()); - if (cWideMode()) { - hider->show(); - } else { + if (Adaptive::OneColumn()) { hider->hide(); + } else { + hider->show(); } } hider->setLevel(hideLevel); @@ -216,7 +216,7 @@ void TitleWidget::updateBackButton() { _lock.setSysBtnStyle(st::sysUnlock); } else { _lock.setSysBtnStyle(st::sysLock); - if (!cWideMode() && App::main() && App::main()->selectingPeer()) { + if (Adaptive::OneColumn() && App::main() && App::main()->selectingPeer()) { _cancel.show(); if (!_back.isHidden()) _back.hide(); if (!_settings.isHidden()) _settings.hide(); @@ -225,12 +225,7 @@ void TitleWidget::updateBackButton() { } else { if (!_cancel.isHidden()) _cancel.hide(); bool authed = (MTP::authedId() > 0); - if (cWideMode()) { - if (!_back.isHidden()) _back.hide(); - if (_settings.isHidden()) _settings.show(); - if (authed && _contacts.isHidden()) _contacts.show(); - if (_about.isHidden()) _about.show(); - } else { + if (Adaptive::OneColumn()) { if (App::wnd()->needBackButton()) { if (_back.isHidden()) _back.show(); if (!_settings.isHidden()) _settings.hide(); @@ -242,6 +237,11 @@ void TitleWidget::updateBackButton() { if (authed && _contacts.isHidden()) _contacts.show(); if (_about.isHidden()) _about.show(); } + } else { + if (!_back.isHidden()) _back.hide(); + if (_settings.isHidden()) _settings.show(); + if (authed && _contacts.isHidden()) _contacts.show(); + if (_about.isHidden()) _about.show(); } } } @@ -249,22 +249,22 @@ void TitleWidget::updateBackButton() { update(); } -void TitleWidget::updateWideMode() { +void TitleWidget::updateAdaptiveLayout() { updateBackButton(); - if (!cWideMode()) { + if (Adaptive::OneColumn()) { updateCounter(); } if (hider) { - if (cWideMode()) { - hider->show(); - } else { + if (Adaptive::OneColumn()) { hider->hide(); + } else { + hider->show(); } } } void TitleWidget::updateCounter() { - if (cWideMode() || !MTP::authedId()) return; + if (!Adaptive::OneColumn() || !MTP::authedId()) return; int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; @@ -313,7 +313,7 @@ void TitleWidget::stateChanged(Qt::WindowState state) { } void TitleWidget::showUpdateBtn() { - if (!cWideMode() && App::main() && App::main()->selectingPeer()) { + if (Adaptive::OneColumn() && App::main() && App::main()->selectingPeer()) { _cancel.show(); _lock.hide(); _update.hide(); @@ -329,7 +329,7 @@ void TitleWidget::showUpdateBtn() { _lock.hide(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE - bool updateReady = (Sandboxer::updatingState() == Application::UpdatingReady); + bool updateReady = (Sandbox::updatingState() == Application::UpdatingReady); #else bool updateReady = false; #endif @@ -377,7 +377,7 @@ HitTestType TitleWidget::hitTest(const QPoint &p) { if (App::wnd() && Ui::isLayerShown()) return HitTestNone; int x(p.x()), y(p.y()), w(width()), h(height()); - if (cWideMode() && hider && x >= App::main()->dlgsWidth()) return HitTestNone; + if (!Adaptive::OneColumn() && hider && x >= App::main()->dlgsWidth()) return HitTestNone; if (x >= st::titleIconPos.x() && y >= st::titleIconPos.y() && x < st::titleIconPos.x() + st::titleIconImg.pxWidth() && y < st::titleIconPos.y() + st::titleIconImg.pxHeight()) { return HitTestIcon; diff --git a/Telegram/SourceFiles/title.h b/Telegram/SourceFiles/title.h index 7e3b60fd8bb6ba..018695890aa6d6 100644 --- a/Telegram/SourceFiles/title.h +++ b/Telegram/SourceFiles/title.h @@ -49,7 +49,7 @@ class TitleWidget : public TWidget { void resizeEvent(QResizeEvent *e); void updateBackButton(); - void updateWideMode(); + void updateAdaptiveLayout(); void updateCounter(); void mousePressEvent(QMouseEvent *e); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index d1a0ff1171be7c..e42a5a4927325a 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1214,7 +1214,7 @@ void Window::toggleDisplayNotifyFromTray() { } void Window::closeEvent(QCloseEvent *e) { - if (MTP::authedId() && !Sandboxer::isSavingSession() && minimizeToTray()) { + if (MTP::authedId() && !Sandbox::isSavingSession() && minimizeToTray()) { e->ignore(); } else { App::quit(); @@ -1228,10 +1228,15 @@ TitleWidget *Window::getTitle() { void Window::resizeEvent(QResizeEvent *e) { if (!title) return; - bool wideMode = (width() >= st::wideModeWidth); - if (wideMode != cWideMode()) { - cSetWideMode(wideMode); - updateWideMode(); + Adaptive::Layout layout = Adaptive::OneColumnLayout; + if (width() >= st::adaptiveWideWidth) { + layout = Adaptive::WideLayout; + } else if (width() >= st::adaptiveNormalWidth) { + layout = Adaptive::NormalLayout; + } + if (layout != Global::AdaptiveLayout()) { + Global::SetAdaptiveLayout(layout); + updateAdaptiveLayout(); } title->setGeometry(0, 0, width(), st::titleHeight); if (layerBg) layerBg->resize(width(), height()); @@ -1239,12 +1244,12 @@ void Window::resizeEvent(QResizeEvent *e) { emit resized(QSize(width(), height() - st::titleHeight)); } -void Window::updateWideMode() { - title->updateWideMode(); - if (main) main->updateWideMode(); - if (settings) settings->updateWideMode(); - if (intro) intro->updateWideMode(); - if (layerBg) layerBg->updateWideMode(); +void Window::updateAdaptiveLayout() { + title->updateAdaptiveLayout(); + if (main) main->updateAdaptiveLayout(); + if (settings) settings->updateAdaptiveLayout(); + if (intro) intro->updateAdaptiveLayout(); + if (layerBg) layerBg->updateAdaptiveLayout(); } bool Window::needBackButton() { @@ -2002,10 +2007,10 @@ LastCrashedWindow::LastCrashedWindow() , _showReport(this) , _saveReport(this) , _getApp(this) -, _reportText(QString::fromUtf8(Global::LastCrashDump())) +, _reportText(QString::fromUtf8(Sandbox::LastCrashDump())) , _reportShown(false) , _reportSaved(false) -, _sendingState(((!cDevVersion() && !cBetaVersion()) || Global::LastCrashDump().isEmpty()) ? SendingNoReport : SendingUpdateCheck) +, _sendingState(((!cDevVersion() && !cBetaVersion()) || Sandbox::LastCrashDump().isEmpty()) ? SendingNoReport : SendingUpdateCheck) , _updating(this) , _sendingProgress(0) , _sendingTotal(0) @@ -2078,23 +2083,23 @@ LastCrashedWindow::LastCrashedWindow() _updatingSkip.setText(qsl("SKIP")); connect(&_updatingSkip, SIGNAL(clicked()), this, SLOT(onUpdateSkip())); - Sandboxer::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); - Sandboxer::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); - Sandboxer::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); - Sandboxer::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); - Sandboxer::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); + Sandbox::connect(SIGNAL(updateChecking()), this, SLOT(onUpdateChecking())); + Sandbox::connect(SIGNAL(updateLatest()), this, SLOT(onUpdateLatest())); + Sandbox::connect(SIGNAL(updateProgress(qint64,qint64)), this, SLOT(onUpdateDownloading(qint64,qint64))); + Sandbox::connect(SIGNAL(updateFailed()), this, SLOT(onUpdateFailed())); + Sandbox::connect(SIGNAL(updateReady()), this, SLOT(onUpdateReady())); - switch (Sandboxer::updatingState()) { + switch (Sandbox::updatingState()) { case Application::UpdatingDownload: setUpdatingState(UpdatingDownload, true); - setDownloadProgress(Sandboxer::updatingReady(), Sandboxer::updatingSize()); + setDownloadProgress(Sandbox::updatingReady(), Sandbox::updatingSize()); break; case Application::UpdatingReady: setUpdatingState(UpdatingReady, true); break; default: setUpdatingState(UpdatingCheck, true); break; } cSetLastUpdateCheck(0); - Sandboxer::startUpdateCheck(); + Sandbox::startUpdateCheck(); #else _updating.setText(qsl("Please check if there is a new version available.")); if (_sendingState != SendingNoReport) { @@ -2137,7 +2142,7 @@ void LastCrashedWindow::onSaveReport() { if (!to.isEmpty()) { QFile file(to); if (file.open(QIODevice::WriteOnly)) { - file.write(Global::LastCrashDump()); + file.write(Sandbox::LastCrashDump()); _reportSaved = true; updateControls(); } @@ -2321,7 +2326,7 @@ void LastCrashedWindow::onCheckingFinished() { QHttpPart reportPart; reportPart.setHeader(QNetworkRequest::ContentTypeHeader, QVariant("application/octet-stream")); reportPart.setHeader(QNetworkRequest::ContentDispositionHeader, QVariant("form-data; name=\"report\"; filename=\"report.telegramcrash\"")); - reportPart.setBody(Global::LastCrashDump()); + reportPart.setBody(Sandbox::LastCrashDump()); multipart->append(reportPart); QFileInfo dmpFile(_minidumpFull); @@ -2578,22 +2583,22 @@ void LastCrashedWindow::updateControls() { } void LastCrashedWindow::onNetworkSettings() { - const ConnectionProxy &p(Global::PreLaunchProxy()); + const ConnectionProxy &p(Sandbox::PreLaunchProxy()); NetworkSettingsWindow *box = new NetworkSettingsWindow(this, p.host, p.port ? p.port : 80, p.user, p.password); connect(box, SIGNAL(saved(QString, quint32, QString, QString)), this, SLOT(onNetworkSettingsSaved(QString, quint32, QString, QString))); box->show(); } void LastCrashedWindow::onNetworkSettingsSaved(QString host, quint32 port, QString username, QString password) { - Global::RefPreLaunchProxy().host = host; - Global::RefPreLaunchProxy().port = port ? port : 80; - Global::RefPreLaunchProxy().user = username; - Global::RefPreLaunchProxy().password = password; + Sandbox::RefPreLaunchProxy().host = host; + Sandbox::RefPreLaunchProxy().port = port ? port : 80; + Sandbox::RefPreLaunchProxy().user = username; + Sandbox::RefPreLaunchProxy().password = password; #ifndef TDESKTOP_DISABLE_AUTOUPDATE if ((_updatingState == UpdatingFail && (_sendingState == SendingNoReport || _sendingState == SendingUpdateCheck)) || (_updatingState == UpdatingCheck)) { - Sandboxer::stopUpdate(); + Sandbox::stopUpdate(); cSetLastUpdateCheck(0); - Sandboxer::startUpdateCheck(); + Sandbox::startUpdateCheck(); } else #endif if (_sendingState == SendingFail || _sendingState == SendingProgress) { @@ -2650,7 +2655,7 @@ void LastCrashedWindow::setDownloadProgress(qint64 ready, qint64 total) { void LastCrashedWindow::onUpdateRetry() { cSetLastUpdateCheck(0); - Sandboxer::startUpdateCheck(); + Sandbox::startUpdateCheck(); } void LastCrashedWindow::onUpdateSkip() { @@ -2658,7 +2663,7 @@ void LastCrashedWindow::onUpdateSkip() { onContinue(); } else { if (_updatingState == UpdatingCheck || _updatingState == UpdatingDownload) { - Sandboxer::stopUpdate(); + Sandbox::stopUpdate(); setUpdatingState(UpdatingFail); } _sendingState = SendingNone; @@ -2692,7 +2697,7 @@ void LastCrashedWindow::onContinue() { if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); } else { - Sandboxer::startSandbox(); + Sandbox::launch(); } close(); } @@ -2909,7 +2914,7 @@ int showCrashReportWindow(const QString &crashdump) { text = qsl("ERROR: could not read crash dump file '%1'").arg(QFileInfo(crashdump).absoluteFilePath()); } - if (Sandbox::started()) { + if (Global::started()) { ShowCrashReportWindow *wnd = new ShowCrashReportWindow(text); return 0; } diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index ae6b9fcb067e0a..c96913b5150f53 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -146,7 +146,7 @@ class Window : public PsMainWindow { void paintEvent(QPaintEvent *e); void resizeEvent(QResizeEvent *e); - void updateWideMode(); + void updateAdaptiveLayout(); bool needBackButton(); void setupPasscode(bool anim); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 77a056a54bcacf..33c4e28b210991 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.19 + 0.9.20 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index dce43cd4d6c1d4..8a1df05a6eed47 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,19,2 - PRODUCTVERSION 0,9,19,2 + FILEVERSION 0,9,20,0 + PRODUCTVERSION 0,9,20,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.19.2" + VALUE "FileVersion", "0.9.20.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.19.2" + VALUE "ProductVersion", "0.9.20.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 22ede49fcf3af6..f55516422fc4a6 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.19; + CURRENT_PROJECT_VERSION = 0.9.20; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.19; + CURRENT_PROJECT_VERSION = 0.9.20; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.19; + CURRENT_PROJECT_VERSION = 0.9.20; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.19; + DYLIB_CURRENT_VERSION = 0.9.20; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.19; + CURRENT_PROJECT_VERSION = 0.9.20; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.19; + DYLIB_CURRENT_VERSION = 0.9.20; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index 83bc292728ddce..d2437c955292bd 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9019 +AppVersion 9020 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.19 -AppVersionStr 0.9.19 +AppVersionStrSmall 0.9.20 +AppVersionStr 0.9.20 DevChannel 1 -BetaVersion 9019002 +BetaVersion 0 9019002 From d6f549fef6bd6ac4e8387d2d7142594602249854 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 19:04:44 +0300 Subject: [PATCH 050/133] no lag in changing normal to wide adaptive mode, files overview ext display improved, no inline bot progress while resolving username, version 0.9.20.dev --- Telegram/Resources/style.txt | 6 +++--- Telegram/SourceFiles/history.cpp | 13 ++++++++++++- Telegram/SourceFiles/history.h | 1 + Telegram/SourceFiles/historywidget.cpp | 8 ++++---- Telegram/SourceFiles/layout.cpp | 12 ++++++------ 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 0cb9e073e3aaf7..944fd83aed2b0e 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1285,9 +1285,6 @@ msgFileBlue: sprite(60px, 425px, 20px, 20px); msgFileOverDuration: 200; msgFileRadialLine: 3px; -msgFileExtPadding: 8px; -msgFileExtTop: 30px; - msgVideoSize: size(320px, 240px); sendPadding: 9px; @@ -2200,6 +2197,9 @@ overviewFileStatusTop: 27px; overviewFileDateTop: 49px; overviewFileChecked: #2fa9e2; overviewFileCheck: #00000066; +overviewFileExtPadding: 5px; +overviewFileExtTop: 24px; +overviewFileExtFont: font(18px semibold); // Mac specific diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 2f122ebf65f117..e039dd1b542d20 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2927,6 +2927,10 @@ bool HistoryItem::displayFromPhoto() const { return Adaptive::Wide() || (!out() && !history()->peer->isUser() && !fromChannel()); } +bool HistoryItem::shiftFromPhoto() const { + return Adaptive::Wide() && !out() && !history()->peer->isUser() && !fromChannel(); +} + void HistoryItem::clipCallback(ClipReaderNotification notification) { HistoryMedia *media = getMedia(); if (!media) return; @@ -6225,7 +6229,14 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { } left += (!fromChannel() && out()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { - left += (!fromChannel() && out()) ? -st::msgPhotoSkip : st::msgPhotoSkip; + if (!fromChannel() && out()) { + left -= st::msgPhotoSkip; + } else { + left += st::msgPhotoSkip; + if (shiftFromPhoto()) { + left += st::msgPhotoSkip; + } + } } width = hwidth - st::msgMargin.left() - st::msgMargin.right(); diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index b1a321eb3bdd82..8f801be89f31fb 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -1021,6 +1021,7 @@ class HistoryItem : public HistoryElem { return (!out() || fromChannel()) && !history()->peer->isUser(); } bool displayFromPhoto() const; + bool shiftFromPhoto() const; void clipCallback(ClipReaderNotification notification); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index e8af2e89724bb6..05c757ee7749e0 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -2838,12 +2838,12 @@ void HistoryWidget::updateInlineBotQuery() { QString query = _field.getInlineBotQuery(_inlineBot, _inlineBotUsername); if (inlineBotUsername != _inlineBotUsername) { if (_inlineBotResolveRequestId) { - Notify::inlineBotRequesting(false); +// Notify::inlineBotRequesting(false); MTP::cancel(_inlineBotResolveRequestId); _inlineBotResolveRequestId = 0; } if (_inlineBot == InlineBotLookingUpData) { - Notify::inlineBotRequesting(true); +// Notify::inlineBotRequesting(true); _inlineBotResolveRequestId = MTP::send(MTPcontacts_ResolveUsername(MTP_string(_inlineBotUsername)), rpcDone(&HistoryWidget::inlineBotResolveDone), rpcFail(&HistoryWidget::inlineBotResolveFail, _inlineBotUsername)); return; } @@ -5066,7 +5066,7 @@ bool HistoryWidget::hasBroadcastToggle() const { void HistoryWidget::inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result) { _inlineBotResolveRequestId = 0; - Notify::inlineBotRequesting(false); +// Notify::inlineBotRequesting(false); _inlineBotUsername = QString(); if (result.type() == mtpc_contacts_resolvedPeer) { const MTPDcontacts_resolvedPeer &d(result.c_contacts_resolvedPeer()); @@ -5080,7 +5080,7 @@ bool HistoryWidget::inlineBotResolveFail(QString name, const RPCError &error) { if (mtpIsFlood(error)) return false; _inlineBotResolveRequestId = 0; - Notify::inlineBotRequesting(false); +// Notify::inlineBotRequesting(false); if (name == _inlineBotUsername) { _inlineBot = 0; onCheckMentionDropdown(); diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index a82d91700e0a62..cf3c71c76a279c 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -764,10 +764,10 @@ LayoutOverviewDocument::LayoutOverviewDocument(DocumentData *document, HistoryIt _thumbw = 0; } - _extw = st::semiboldFont->width(_ext); - if (_extw > st::overviewFileSize - st::msgFileExtPadding * 2) { - _ext = st::semiboldFont->elided(_ext, st::overviewFileSize - st::msgFileExtPadding * 2, Qt::ElideMiddle); - _extw = st::semiboldFont->width(_ext); + _extw = st::overviewFileExtFont->width(_ext); + if (_extw > st::overviewFileSize - st::overviewFileExtPadding * 2) { + _ext = st::overviewFileExtFont->elided(_ext, st::overviewFileSize - st::overviewFileExtPadding * 2, Qt::ElideMiddle); + _extw = st::overviewFileExtFont->width(_ext); } } @@ -872,9 +872,9 @@ void LayoutOverviewDocument::paint(Painter &p, const QRect &clip, uint32 selecti } else { p.fillRect(rthumb, documentColor(_colorIndex)); if (!radial && loaded && !_ext.isEmpty()) { - p.setFont(st::semiboldFont); + p.setFont(st::overviewFileExtFont); p.setPen(st::white); - p.drawText(rthumb.left() + (rthumb.width() - _extw) / 2, rthumb.top() + st::msgFileExtTop + st::semiboldFont->ascent, _ext); + p.drawText(rthumb.left() + (rthumb.width() - _extw) / 2, rthumb.top() + st::overviewFileExtTop + st::overviewFileExtFont->ascent, _ext); } } if (selected) { From 3336b26eeab2cb5a08d3ba3136fafab3c0ef2150 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 8 Feb 2016 22:55:09 +0300 Subject: [PATCH 051/133] improved build for linux, 0.9.20.dev version --- Telegram/FixMake32.sh | 2 -- Telegram/Telegram.pro | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Telegram/FixMake32.sh b/Telegram/FixMake32.sh index 833bca6c6dd9db..b3a601925c8048 100755 --- a/Telegram/FixMake32.sh +++ b/Telegram/FixMake32.sh @@ -11,10 +11,8 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a' -Replace '\-lz' '\/usr\/lib\/i386\-linux\-gnu\/libz\.a' Replace '\-lssl' '\/usr\/lib\/i386\-linux\-gnu\/libssl\.a' Replace '\-lcrypto' '\/usr\/lib\/i386\-linux\-gnu\/libcrypto\.a' -Replace '\-lexif' '\/usr\/lib\/i386\-linux\-gnu\/libexif\.a' Replace '\-lgobject\-2\.0' '\/usr\/lib\/i386\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/i386\-linux\-gnu\/libffi\.a' Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a' Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a' diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 859fb8d01307f1..408bd819048c8d 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -297,6 +297,7 @@ CONFIG(debug, debug|release) { INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ ./../../Libraries/QtStatic/qtbase/include/QtCore/5.5.1/QtCore\ ./../../Libraries/QtStatic/qtbase/include\ + /usr/local/include\ /usr/local/include/opus\ ./SourceFiles\ ./GeneratedFiles\ From 001f2e1fe745a99bb6223330f521c6ea50490fef Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 9 Feb 2016 17:42:36 +0300 Subject: [PATCH 052/133] moved from utf8 to QFile::encode/decodeName --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/gui/flatlabel.cpp | 1 - Telegram/SourceFiles/logs.cpp | 8 ++-- Telegram/SourceFiles/pspecific_linux.cpp | 49 ++++++++++++------------ Telegram/SourceFiles/window.cpp | 2 +- 5 files changed, 30 insertions(+), 32 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 3e7742c85bccfd..0499b2cbf96399 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -149,7 +149,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) , _updateChecker(0) #endif { - QByteArray d(QDir(cWorkingDir()).absolutePath().toUtf8()); + QByteArray d(QFile::encodeName(QDir(cWorkingDir()).absolutePath())); char h[33] = { 0 }; hashMd5Hex(d.constData(), d.size(), h); _localServerName = psServerPrefix() + h + '-' + cGUIDStr(); diff --git a/Telegram/SourceFiles/gui/flatlabel.cpp b/Telegram/SourceFiles/gui/flatlabel.cpp index 34ea575852c859..429b96b58ab1ac 100644 --- a/Telegram/SourceFiles/gui/flatlabel.cpp +++ b/Telegram/SourceFiles/gui/flatlabel.cpp @@ -46,7 +46,6 @@ void FlatLabel::setText(const QString &text) { void FlatLabel::setRichText(const QString &text) { textstyleSet(&_tst); - const char *t = text.toUtf8().constData(); _text.setRichText(_st.font, text, _labelOptions); int32 w = _st.width ? _st.width : _text.maxWidth(), h = _text.countHeight(w); textstyleRestore(); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 1f3e02b547c778..204a3d45887a88 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -885,7 +885,7 @@ namespace SignalHandlers { #ifdef MAC_USE_BREAKPAD #ifndef _DEBUG BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - dumpspath.toUtf8().toStdString(), + QFile::encodeName(dumpspath).toStdString(), /*FilterCallback*/ 0, DumpCallback, /*context*/ 0, @@ -897,7 +897,7 @@ namespace SignalHandlers { #else crashpad::CrashpadClient crashpad_client; std::string handler = (cExeDir() + cExeName() + qsl("/Contents/Helpers/crashpad_handler")).toUtf8().constData(); - std::string database = dumpspath.toUtf8().constData(); + std::string database = QFile::encodeName(dumpspath).constData(); if (crashpad_client.StartHandler(base::FilePath(handler), base::FilePath(database), std::string(), @@ -909,7 +909,7 @@ namespace SignalHandlers { #endif #elif defined Q_OS_LINUX64 || defined Q_OS_LINUX32 BreakpadExceptionHandler = new google_breakpad::ExceptionHandler( - google_breakpad::MinidumpDescriptor(dumpspath.toUtf8().toStdString()), + google_breakpad::MinidumpDescriptor(QFile::encodeName(dumpspath).toStdString()), /*FilterCallback*/ 0, DumpCallback, /*context*/ 0, @@ -930,7 +930,7 @@ namespace SignalHandlers { } Status start() { - CrashDumpPath = (cWorkingDir() + qsl("tdata/working")).toUtf8(); + CrashDumpPath = QFile::encodeName(cWorkingDir() + qsl("tdata/working")); if (FILE *f = fopen(CrashDumpPath.constData(), "rb")) { QByteArray lastdump; char buffer[64 * 1024] = { 0 }; diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 397cac53051974..6b1e982da9d4b0 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -43,10 +43,10 @@ extern "C" { #include namespace { - QString escapeShell(const QString &str) { - QString result; - const QChar *b = str.constData(), *e = str.constEnd(); - for (const QChar *ch = b; ch != e; ++ch) { + QByteArray escapeShell(const QByteArray &str) { + QByteArray result; + const char *b = str.constData(), *e = str.constEnd(); + for (const char *ch = b; ch != e; ++ch) { if (*ch == ' ' || *ch == '"' || *ch == '\'' || *ch == '\\') { if (result.isEmpty()) { result.reserve(str.size() * 2); @@ -974,13 +974,12 @@ QStringList addr2linestr(uint64 *addresses, int count) { if (!count) return result; result.reserve(count); - QString cmdstr = "addr2line -e " + escapeShell(cExeDir() + cExeName()); + QByteArray cmd = "addr2line -e " + escapeShell(QFile::encodeName(cExeDir() + cExeName())); for (int i = 0; i < count; ++i) { if (addresses[i]) { - cmdstr += qsl(" 0x%1").arg(addresses[i], 0, 16); + cmd += qsl(" 0x%1").arg(addresses[i], 0, 16).toUtf8(); } } - QByteArray cmd = cmdstr.toUtf8(); FILE *f = popen(cmd.constData(), "r"); QStringList addr2lineResult; @@ -1165,7 +1164,7 @@ QString psCurrentLanguage() { namespace { QString _psHomeDir() { struct passwd *pw = getpwuid(getuid()); - return (pw && pw->pw_dir && strlen(pw->pw_dir)) ? (fromUtf8Safe(pw->pw_dir) + '/') : QString(); + return (pw && pw->pw_dir && strlen(pw->pw_dir)) ? (QFile::decodeName(pw->pw_dir) + '/') : QString(); } } @@ -1179,7 +1178,7 @@ QString psDownloadPath() { } QString psCurrentExeDirectory(int argc, char *argv[]) { - QString first = argc ? fromUtf8Safe(argv[0]) : QString(); + QString first = argc ? QFile::decodeName(argv[0]) : QString(); if (!first.isEmpty()) { QFileInfo info(first); if (info.isSymLink()) { @@ -1193,7 +1192,7 @@ QString psCurrentExeDirectory(int argc, char *argv[]) { } QString psCurrentExeName(int argc, char *argv[]) { - QString first = argc ? fromUtf8Safe(argv[0]) : QString(); + QString first = argc ? QFile::decodeName(argv[0]) : QString(); if (!first.isEmpty()) { QFileInfo info(first); if (info.isSymLink()) { @@ -1236,7 +1235,7 @@ void psOpenFile(const QString &name, bool openWith) { void psShowInFolder(const QString &name) { Ui::hideLayer(true); - system((qsl("xdg-open ") + escapeShell(QFileInfo(name).absoluteDir().absolutePath())).toUtf8().constData()); + system(("xdg-open " + escapeShell(QFile::encodeName(QFileInfo(name).absoluteDir().absolutePath()))).constData()); } namespace PlatformSpecific { @@ -1262,13 +1261,13 @@ namespace PlatformSpecific { } namespace { - bool _psRunCommand(const QString &command) { - int result = system(command.toUtf8().constData()); + bool _psRunCommand(const QByteArray &command) { + int result = system(command.constData()); if (result) { - DEBUG_LOG(("App Error: command failed, code: %1, command (in utf8): %2").arg(result).arg(command)); + DEBUG_LOG(("App Error: command failed, code: %1, command (in utf8): %2").arg(result).arg(command.constData())); return false; } - DEBUG_LOG(("App Info: command succeeded, command (in utf8): %1").arg(command)); + DEBUG_LOG(("App Info: command succeeded, command (in utf8): %1").arg(command.constData())); return true; } } @@ -1304,7 +1303,7 @@ void psRegisterCustomScheme() { s << "Version=1.0\n"; s << "Name=Telegram Desktop\n"; s << "Comment=Official desktop version of Telegram messaging app\n"; - s << "Exec=" << escapeShell(cExeDir() + cExeName()) << " -- %u\n"; + s << "Exec=" << escapeShell(QFile::encodeName(cExeDir() + cExeName())) << " -- %u\n"; s << "Icon=telegram\n"; s << "Terminal=false\n"; s << "StartupWMClass=Telegram\n"; @@ -1313,12 +1312,12 @@ void psRegisterCustomScheme() { s << "MimeType=application/x-xdg-protocol-tg;x-scheme-handler/tg;\n"; f.close(); - if (_psRunCommand(qsl("desktop-file-install --dir=%1 --delete-original %2").arg(escapeShell(home + qsl(".local/share/applications"))).arg(escapeShell(file)))) { + if (_psRunCommand("desktop-file-install --dir=" + escapeShell(QFile::encodeName(home + qsl(".local/share/applications"))) + " --delete-original " + escapeShell(QFile::encodeName(file)))) { DEBUG_LOG(("App Info: removing old .desktop file")); QFile(qsl("%1.local/share/applications/telegram.desktop").arg(home)).remove(); - _psRunCommand(qsl("update-desktop-database %1").arg(escapeShell(home + qsl(".local/share/applications")))); - _psRunCommand(qsl("xdg-mime default telegramdesktop.desktop x-scheme-handler/tg")); + _psRunCommand("update-desktop-database " + escapeShell(QFile::encodeName(home + qsl(".local/share/applications")))); + _psRunCommand("xdg-mime default telegramdesktop.desktop x-scheme-handler/tg"); } } else { LOG(("App Error: Could not open '%1' for write").arg(file)); @@ -1326,9 +1325,9 @@ void psRegisterCustomScheme() { } DEBUG_LOG(("App Info: registerting for Gnome")); - if (_psRunCommand(qsl("gconftool-2 -t string -s /desktop/gnome/url-handlers/tg/command %1").arg(escapeShell(qsl("%1 -- %s").arg(escapeShell(cExeDir() + cExeName())))))) { - _psRunCommand(qsl("gconftool-2 -t bool -s /desktop/gnome/url-handlers/tg/needs_terminal false")); - _psRunCommand(qsl("gconftool-2 -t bool -s /desktop/gnome/url-handlers/tg/enabled true")); + if (_psRunCommand("gconftool-2 -t string -s /desktop/gnome/url-handlers/tg/command " + escapeShell(escapeShell(QFile::encodeName(cExeDir() + cExeName())) + " -- %s"))) { + _psRunCommand("gconftool-2 -t bool -s /desktop/gnome/url-handlers/tg/needs_terminal false"); + _psRunCommand("gconftool-2 -t bool -s /desktop/gnome/url-handlers/tg/enabled true"); } DEBUG_LOG(("App Info: placing .protocol file")); @@ -1347,7 +1346,7 @@ void psRegisterCustomScheme() { QTextStream s(&f); s.setCodec("UTF-8"); s << "[Protocol]\n"; - s << "exec=" << escapeShell(cExeDir() + cExeName()) << " -- %u\n"; + s << "exec=" << QFile::decodeName(escapeShell(QFile::encodeName(cExeDir() + cExeName()))) << " -- %u\n"; s << "protocol=tg\n"; s << "input=none\n"; s << "output=none\n"; @@ -1396,14 +1395,14 @@ bool _execUpdater(bool update = true, const QString &crashreport = QString()) { args[argIndex++] = p_datafile; } } - QByteArray pathf = cWorkingDir().toUtf8(); + QByteArray pathf = QFile::encodeName(cWorkingDir()); if (pathf.size() < MaxLen) { memcpy(p_pathbuf, pathf.constData(), pathf.size()); args[argIndex++] = p_path; args[argIndex++] = p_pathbuf; } if (!crashreport.isEmpty()) { - QByteArray crashreportf = crashreport.toUtf8(); + QByteArray crashreportf = QFile::encodeName(crashreport); if (crashreportf.size() < MaxLen) { memcpy(p_crashreportbuf, crashreportf.constData(), crashreportf.size()); args[argIndex++] = p_crashreport; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index e42a5a4927325a..397d879af62ae5 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2919,7 +2919,7 @@ int showCrashReportWindow(const QString &crashdump) { return 0; } - QByteArray args[] = { QDir::toNativeSeparators(cExeDir() + cExeName()).toUtf8() }; + QByteArray args[] = { QFile::encodeName(QDir::toNativeSeparators(cExeDir() + cExeName())) }; int a_argc = 1; char *a_argv[1] = { args[0].data() }; QApplication app(a_argc, a_argv); From 7b855a661a05f691c954271f79522857d69e4e41 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 9 Feb 2016 19:05:08 +0300 Subject: [PATCH 053/133] new wide layout, build script and some bugs fixed --- Telegram/Build.bat | 8 ++-- Telegram/Resources/style.txt | 1 - Telegram/SourceFiles/gui/animation.cpp | 1 - Telegram/SourceFiles/history.cpp | 52 ++++++++++++------------- Telegram/SourceFiles/history.h | 3 +- Telegram/SourceFiles/logs.cpp | 26 +++++++++---- Telegram/SourceFiles/mainwidget.cpp | 2 +- Telegram/SourceFiles/mainwidget.h | 4 ++ Telegram/SourceFiles/window.cpp | 54 ++++++++++++++------------ Telegram/SourceFiles/window.h | 1 + 10 files changed, 87 insertions(+), 65 deletions(-) diff --git a/Telegram/Build.bat b/Telegram/Build.bat index d6c274cb3873a6..6f83a43f27000f 100644 --- a/Telegram/Build.bat +++ b/Telegram/Build.bat @@ -124,10 +124,10 @@ for /f ^"usebackq^ eol^=^ :symbolslinedone FOR /F "tokens=1,2,3,4* delims= " %%i in ("%SymbolsHashLine%") do set "SymbolsHash=%%l" -echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% -if not exist %DropboxSymbolsPath%\%BinaryName% mkdir %DropboxSymbolsPath%\%BinaryName% -if not exist %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% mkdir %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash% -xcopy %ReleasePath%\%BinaryName%.sym %DropboxSymbolsPath%\%BinaryName%\%SymbolsHash%\ +echo Copying %BinaryName%.sym to %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% +if not exist %DropboxSymbolsPath%\%BinaryName%.pdb mkdir %DropboxSymbolsPath%\%BinaryName%.pdb +if not exist %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% mkdir %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash% +xcopy %ReleasePath%\%BinaryName%.sym %DropboxSymbolsPath%\%BinaryName%.pdb\%SymbolsHash%\ echo Done! if not exist %ReleasePath%\deploy mkdir %ReleasePath%\deploy diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 944fd83aed2b0e..9168bdd43bf0e9 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -53,7 +53,6 @@ color8: #ce671b; // orange wndMinWidth: 380px; adaptiveNormalWidth: 640px; -adaptiveWideWidth: 1120px; wndMinHeight: 480px; wndDefWidth: 800px; diff --git a/Telegram/SourceFiles/gui/animation.cpp b/Telegram/SourceFiles/gui/animation.cpp index 045dbb27391747..98d756bb0728cb 100644 --- a/Telegram/SourceFiles/gui/animation.cpp +++ b/Telegram/SourceFiles/gui/animation.cpp @@ -425,7 +425,6 @@ void ClipReader::stop() { } void ClipReader::error() { - _private = 0; _state = ClipError; } diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index e039dd1b542d20..869ad41142af19 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2924,11 +2924,7 @@ void HistoryItem::setId(MsgId newId) { } bool HistoryItem::displayFromPhoto() const { - return Adaptive::Wide() || (!out() && !history()->peer->isUser() && !fromChannel()); -} - -bool HistoryItem::shiftFromPhoto() const { - return Adaptive::Wide() && !out() && !history()->peer->isUser() && !fromChannel(); + return (Adaptive::Wide() || (!out() && !history()->peer->isUser())) && !fromChannel(); } void HistoryItem::clipCallback(ClipReaderNotification notification) { @@ -6217,31 +6213,25 @@ void HistoryMessage::initDimensions() { } void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { - int32 maxwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width, hmaxwidth = st::historyMaxWidth + (Adaptive::Wide() ? (2 * st::msgPhotoSkip) : 0); + int32 maxwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width, hmaxwidth = st::historyMaxWidth; if (_media && _media->currentWidth() < maxwidth) { maxwidth = qMax(_media->currentWidth(), qMin(maxwidth, plainMaxWidth())); } left = 0; - if (hwidth > hmaxwidth) { - left = (hwidth - hmaxwidth) / 2; + if (Adaptive::Wide()) { hwidth = hmaxwidth; } - left += (!fromChannel() && out()) ? st::msgMargin.right() : st::msgMargin.left(); + left += (!fromChannel() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { - if (!fromChannel() && out()) { - left -= st::msgPhotoSkip; - } else { - left += st::msgPhotoSkip; - if (shiftFromPhoto()) { - left += st::msgPhotoSkip; - } - } + left += st::msgPhotoSkip; + } else if (!Adaptive::Wide() && !out() && !fromChannel() && st::msgPhotoSkip - (hmaxwidth - hwidth) > 0) { + left += st::msgPhotoSkip - (hmaxwidth - hwidth); } width = hwidth - st::msgMargin.left() - st::msgMargin.right(); if (width > maxwidth) { - if (!fromChannel() && out()) { + if (!fromChannel() && out() && !Adaptive::Wide()) { left += width - maxwidth; } width = maxwidth; @@ -6495,7 +6485,7 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m } if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); p.drawPixmap(photoleft, _height - st::msgMargin.bottom() - st::msgPhotoSize, _from->photo->pixRounded(st::msgPhotoSize)); } if (width < 1) return; @@ -6663,7 +6653,7 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize && y >= _height - st::msgMargin.bottom() - st::msgPhotoSize && y < _height - st::msgMargin.bottom()) { lnk = _from->lnk; return; @@ -6928,7 +6918,7 @@ void HistoryForwarded::getState(TextLinkPtr &lnk, HistoryCursorState &state, int int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize) { return HistoryMessage::getState(lnk, state, x, y); } @@ -7488,6 +7478,11 @@ void HistoryServiceMsg::initDimensions() { if (_media) _media->initDimensions(this); } +void HistoryServiceMsg::countPositionAndSize(int32 &left, int32 &width) const { + left = st::msgServiceMargin.left(); + width = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)) - st::msgServiceMargin.left() - st::msgServiceMargin.left(); +} + QString HistoryServiceMsg::selectedText(uint32 selection) const { uint16 selectedFrom = (selection == FullSelection) ? 0 : (selection >> 16) & 0xFFFF; uint16 selectedTo = (selection == FullSelection) ? 0xFFFF : (selection & 0xFFFF); @@ -7528,7 +7523,8 @@ void HistoryServiceMsg::draw(Painter &p, const QRect &r, uint32 selection, uint6 textstyleSet(&st::serviceTextStyle); - int32 left = st::msgServiceMargin.left(), width = _history->width - st::msgServiceMargin.left() - st::msgServiceMargin.left(), height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + int32 left = 0, width = 0, height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + countPositionAndSize(left, width); if (width < 1) return; if (_media) { @@ -7581,7 +7577,8 @@ int32 HistoryServiceMsg::resize(int32 width) { } bool HistoryServiceMsg::hasPoint(int32 x, int32 y) const { - int32 left = st::msgServiceMargin.left(), width = _history->width - st::msgServiceMargin.left() - st::msgServiceMargin.left(), height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + int32 left = 0, width = 0, height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + countPositionAndSize(left, width); if (width < 1) return false; if (_media) { @@ -7594,7 +7591,8 @@ void HistoryServiceMsg::getState(TextLinkPtr &lnk, HistoryCursorState &state, in lnk = TextLinkPtr(); state = HistoryDefaultCursorState; - int32 left = st::msgServiceMargin.left(), width = _history->width - st::msgServiceMargin.left() - st::msgServiceMargin.left(), height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + int32 left = 0, width = 0, height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + countPositionAndSize(left, width); if (width < 1) return; if (_media) { @@ -7617,7 +7615,8 @@ void HistoryServiceMsg::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 after = false; upon = false; - int32 left = st::msgServiceMargin.left(), width = _history->width - st::msgServiceMargin.left() - st::msgServiceMargin.left(), height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + int32 left = 0, width = 0, height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + countPositionAndSize(left, width); if (width < 1) return; if (_media) { @@ -7682,7 +7681,8 @@ void HistoryGroup::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x lnk = TextLinkPtr(); state = HistoryDefaultCursorState; - int32 left = st::msgServiceMargin.left(), width = _history->width - st::msgServiceMargin.left() - st::msgServiceMargin.left(), height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + int32 left = 0, width = 0, height = _height - st::msgServiceMargin.top() - st::msgServiceMargin.bottom(); // two small margins + countPositionAndSize(left, width); if (width < 1) return; QRect trect(QRect(left, st::msgServiceMargin.top(), width, height).marginsAdded(-st::msgServicePadding)); diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 8f801be89f31fb..9557904364fbcc 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -1021,7 +1021,6 @@ class HistoryItem : public HistoryElem { return (!out() || fromChannel()) && !history()->peer->isUser(); } bool displayFromPhoto() const; - bool shiftFromPhoto() const; void clipCallback(ClipReaderNotification notification); @@ -2249,6 +2248,8 @@ class HistoryServiceMsg : public HistoryItem { void initDimensions(); + void countPositionAndSize(int32 &left, int32 &width) const; + void draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const; int32 resize(int32 width); bool hasPoint(int32 x, int32 y) const; diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 204a3d45887a88..502644d7a17266 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -606,7 +606,7 @@ void _moveOldDataFiles(const QString &wasDir) { namespace SignalHandlers { - QByteArray CrashDumpPath; + QString CrashDumpPath; FILE *CrashDumpFile = 0; int CrashDumpFileNo = 0; char LaunchedDateTimeStr[32] = { 0 }; @@ -930,8 +930,12 @@ namespace SignalHandlers { } Status start() { - CrashDumpPath = QFile::encodeName(cWorkingDir() + qsl("tdata/working")); - if (FILE *f = fopen(CrashDumpPath.constData(), "rb")) { + CrashDumpPath = cWorkingDir() + qsl("tdata/working"); +#ifdef Q_OS_WIN + if (FILE *f = _wfopen(CrashDumpPath.toStdWString().c_str(), L"rb")) { +#else + if (FILE *f = fopen(QFile::encodeName(CrashDumpPath).constData(), "rb")) { +#endif QByteArray lastdump; char buffer[64 * 1024] = { 0 }; int32 read = 0; @@ -942,7 +946,7 @@ namespace SignalHandlers { Sandbox::SetLastCrashDump(lastdump); - LOG(("Opened '%1' for reading, the previous Telegram Desktop launch was not finished properly :( Crash log size: %2").arg(QString::fromUtf8(CrashDumpPath)).arg(lastdump.size())); + LOG(("Opened '%1' for reading, the previous Telegram Desktop launch was not finished properly :( Crash log size: %2").arg(CrashDumpPath).arg(lastdump.size())); return LastCrashed; } @@ -954,7 +958,11 @@ namespace SignalHandlers { return Started; } - CrashDumpFile = fopen(CrashDumpPath.constData(), "wb"); +#ifdef Q_OS_WIN + CrashDumpFile = _wfopen(CrashDumpPath.toStdWString().c_str(), L"wb"); +#else + CrashDumpFile = fopen(QFile::encodeName(CrashDumpPath).constData(), "wb"); +#endif if (CrashDumpFile) { CrashDumpFileNo = fileno(CrashDumpFile); if (SetSignalHandlers) { @@ -981,7 +989,7 @@ namespace SignalHandlers { return Started; } - LOG(("FATAL: Could not open '%1' for writing!").arg(QString::fromUtf8(CrashDumpPath))); + LOG(("FATAL: Could not open '%1' for writing!").arg(CrashDumpPath)); return CantOpen; } @@ -990,7 +998,11 @@ namespace SignalHandlers { FinishBreakpad(); if (CrashDumpFile) { fclose(CrashDumpFile); - unlink(CrashDumpPath.constData()); +#ifdef Q_OS_WIN + _wunlink(CrashDumpPath.toStdWString().c_str()); +#else + unlink(CrashDumpPath.toUtf8().constData()); +#endif } } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index e91ac441129b30..779a93bacc3274 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2810,7 +2810,7 @@ void MainWidget::resizeEvent(QResizeEvent *e) { history.setGeometry(0, _playerHeight + tbh, _dialogsWidth, height() - _playerHeight - tbh); if (_hider) _hider->setGeometry(0, 0, _dialogsWidth, height()); } else { - _dialogsWidth = snap((width() * 5) / 14, st::dlgMinWidth, st::dlgMaxWidth); + _dialogsWidth = chatsListWidth(width()); dialogs.resize(_dialogsWidth, height()); dialogs.moveToLeft(0, 0); _player.resize(width() - _dialogsWidth, _player.height()); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 44e9e2accb5102..ffb357d81c344c 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -179,6 +179,10 @@ class StackItems : public QVector { } }; +inline int chatsListWidth(int windowWidth) { + return snap((windowWidth * 5) / 14, st::dlgMinWidth, st::dlgMaxWidth); +} + class StickerPreviewWidget; class MainWidget : public TWidget, public RPCSender { diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 397d879af62ae5..89fbecc527b034 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1229,10 +1229,12 @@ void Window::resizeEvent(QResizeEvent *e) { if (!title) return; Adaptive::Layout layout = Adaptive::OneColumnLayout; - if (width() >= st::adaptiveWideWidth) { - layout = Adaptive::WideLayout; - } else if (width() >= st::adaptiveNormalWidth) { - layout = Adaptive::NormalLayout; + if (width() >= st::adaptiveNormalWidth) { + if (width() - chatsListWidth(width()) >= st::historyMaxWidth) { + layout = Adaptive::WideLayout; + } else { + layout = Adaptive::NormalLayout; + } } if (layout != Global::AdaptiveLayout()) { Global::SetAdaptiveLayout(layout); @@ -1501,7 +1503,6 @@ void Window::notifyShowNext(NotifyWindow *remove) { uint64 next = 0; HistoryItem *notifyItem = 0; History *notifyHistory = 0; - NotifyWaiters::iterator notifyWaiter = notifyWaiters.end(); for (NotifyWaiters::iterator i = notifyWaiters.begin(); i != notifyWaiters.end();) { History *history = i.key(); if (history->currentNotification() && history->currentNotification()->id != i.value().msg) { @@ -1509,7 +1510,6 @@ void Window::notifyShowNext(NotifyWindow *remove) { if (j == notifyWhenMaps.end()) { history->clearNotifications(); i = notifyWaiters.erase(i); - notifyWaiter = notifyHistory ? notifyWaiters.find(notifyHistory) : notifyWaiters.end(); continue; } do { @@ -1525,7 +1525,6 @@ void Window::notifyShowNext(NotifyWindow *remove) { if (!history->currentNotification()) { notifyWhenMaps.remove(history); i = notifyWaiters.erase(i); - notifyWaiter = notifyHistory ? notifyWaiters.find(notifyHistory) : notifyWaiters.end(); continue; } uint64 when = i.value().when; @@ -1533,7 +1532,6 @@ void Window::notifyShowNext(NotifyWindow *remove) { next = when; notifyItem = history->currentNotification(); notifyHistory = history; - notifyWaiter = i; } ++i; } @@ -1567,8 +1565,7 @@ void Window::notifyShowNext(NotifyWindow *remove) { NotifyWhenMap::const_iterator k = j.value().constFind(history->currentNotification()->id); if (k != j.value().cend()) { nextNotify = history->currentNotification(); - notifyWaiter.value().msg = k.key(); - notifyWaiter.value().when = k.value(); + notifyWaiters.insert(notifyHistory, NotifyWaiter(k.key(), k.value(), 0)); break; } history->skipNotification(); @@ -1599,7 +1596,7 @@ void Window::notifyShowNext(NotifyWindow *remove) { } if (!history->hasNotification()) { - if (notifyWaiter != notifyWaiters.cend()) notifyWaiters.erase(notifyWaiter); + notifyWaiters.remove(history); notifyWhenMaps.remove(history); continue; } @@ -2195,7 +2192,7 @@ void LastCrashedWindow::onSendReport() { App::setProxySettings(_sendManager); QString apiid = getReportField(qstr("apiid"), qstr("ApiId:")), version = getReportField(qstr("version"), qstr("Version:")); - _checkReply = _sendManager.get(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=query_report&apiid=%1&version=%2").arg(apiid).arg(version))); + _checkReply = _sendManager.get(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=query_report&apiid=%1&version=%2&dmp=%3").arg(apiid).arg(version).arg(minidumpFileName().isEmpty() ? 0 : 1))); connect(_checkReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onSendingError(QNetworkReply::NetworkError))); connect(_checkReply, SIGNAL(finished()), this, SLOT(onCheckingFinished())); @@ -2291,6 +2288,15 @@ namespace { } +QString LastCrashedWindow::minidumpFileName() { + QFileInfo dmpFile(_minidumpFull); + if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && + QRegularExpression(qsl("^[a-zA-Z0-9\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { + return dmpFile.fileName(); + } + return QString(); +} + void LastCrashedWindow::onCheckingFinished() { if (!_checkReply || _sendReply) return; @@ -2300,9 +2306,9 @@ void LastCrashedWindow::onCheckingFinished() { LOG(("Crash report check for sending done, result: %1").arg(QString::fromUtf8(result))); - if (result == "Many") { - _pleaseSendReport.setText(qsl("Too many crash reports at this moment :(")); - _sendingState = SendingTooMany; + if (result == "Old") { + _pleaseSendReport.setText(qsl("This report is about some old version of Telegram Desktop.")); + _sendingState = SendingTooOld; updateControls(); return; } else if (result == "Unofficial") { @@ -2311,10 +2317,11 @@ void LastCrashedWindow::onCheckingFinished() { updateControls(); return; } else if (result != "Report") { - _pleaseSendReport.setText(qsl("This report is about some old version of Telegram Desktop.")); - _pleaseSendReport.setText(qsl("Response: %1").arg(QString::fromLatin1(result))); - _sendingState = SendingTooOld; + _pleaseSendReport.setText(qsl("Thank you for your report!")); + _sendingState = SendingDone; updateControls(); + + SignalHandlers::restart(); return; } @@ -2329,15 +2336,14 @@ void LastCrashedWindow::onCheckingFinished() { reportPart.setBody(Sandbox::LastCrashDump()); multipart->append(reportPart); - QFileInfo dmpFile(_minidumpFull); - if (dmpFile.exists() && dmpFile.size() > 0 && dmpFile.size() < 20 * 1024 * 1024 && - QRegularExpression(qsl("^[a-zA-Z0-9\\-]{1,64}\\.dmp$")).match(dmpFile.fileName()).hasMatch()) { + QString dmpName = minidumpFileName(); + if (!dmpName.isEmpty()) { QFile file(_minidumpFull); if (file.open(QIODevice::ReadOnly)) { QByteArray minidump = file.readAll(); file.close(); - QString zipName = dmpFile.fileName().replace(qstr(".dmp"), qstr(".zip")); + QString zipName = QString(dmpName).replace(qstr(".dmp"), qstr(".zip")); zByteArray minidumpZip; bool failed = false; @@ -2353,8 +2359,8 @@ void LastCrashedWindow::onCheckingFinished() { if (zipFile zf = zipOpen2(0, APPEND_STATUS_CREATE, 0, &zfuncs)) { zip_fileinfo zfi = { { 0, 0, 0, 0, 0, 0 }, 0, 0, 0 }; - std::wstring fileName = dmpFile.fileName().toStdWString(); - if (zipOpenNewFileInZip(zf, std::string(fileName.begin(), fileName.end()).c_str(), &zfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) != ZIP_OK) { + QByteArray dmpNameUtf = dmpName.toUtf8(); + if (zipOpenNewFileInZip(zf, dmpNameUtf.constData(), &zfi, NULL, 0, NULL, 0, NULL, Z_DEFLATED, Z_DEFAULT_COMPRESSION) != ZIP_OK) { failed = true; } else if (zipWriteInFileInZip(zf, minidump.constData(), minidump.size()) != 0) { failed = true; diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index c96913b5150f53..4efcdd318cf591 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -453,6 +453,7 @@ public slots: private: + QString minidumpFileName(); void updateControls(); QString _host, _username, _password; From 19d395a9466afe866bfa11f42c1c697445d5f1c4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 9 Feb 2016 23:56:50 +0300 Subject: [PATCH 054/133] 0.9.21 dev version - fix unicode paths to working file + new layout for wide windows --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 4 ++-- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 0499b2cbf96399..f83156edae6794 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1051,7 +1051,7 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if (cDevVersion() && Local::oldMapVersion() < 9020) { + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9020) { if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); } else { diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index ef2a3951594be2..f5797848c9d635 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,8 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9020; -static const wchar_t *AppVersionStr = L"0.9.20"; +static const int32 AppVersion = 9021; +static const wchar_t *AppVersionStr = L"0.9.21"; static const bool DevVersion = true; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 33c4e28b210991..9e4f736360089a 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.20 + 0.9.21 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 8a1df05a6eed47..353487466520e7 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,20,0 - PRODUCTVERSION 0,9,20,0 + FILEVERSION 0,9,21,0 + PRODUCTVERSION 0,9,21,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.20.0" + VALUE "FileVersion", "0.9.21.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.20.0" + VALUE "ProductVersion", "0.9.21.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index f55516422fc4a6..0e234ad04dde75 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.20; + CURRENT_PROJECT_VERSION = 0.9.21; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.20; + CURRENT_PROJECT_VERSION = 0.9.21; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.20; + CURRENT_PROJECT_VERSION = 0.9.21; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.20; + DYLIB_CURRENT_VERSION = 0.9.21; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.20; + CURRENT_PROJECT_VERSION = 0.9.21; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.20; + DYLIB_CURRENT_VERSION = 0.9.21; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index d2437c955292bd..58252de8fc2f61 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9020 +AppVersion 9021 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.20 -AppVersionStr 0.9.20 +AppVersionStrSmall 0.9.21 +AppVersionStr 0.9.21 DevChannel 1 BetaVersion 0 9019002 From ffa588bf5d659942712123268249b87e2f71db7a Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 10 Feb 2016 12:41:32 +0300 Subject: [PATCH 055/133] crash fix --- Telegram/SourceFiles/application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f83156edae6794..7e65ac75fad618 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -696,7 +696,8 @@ namespace Sandbox { } AppClass::AppClass() : QObject() -, _uploader(0) { +, _uploader(0) +, _translator(0) { AppObject = this; Fonts::start(); From f2c45df524ee7f2ae4b40aa0d47c7b1f2e543cef Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 10 Feb 2016 14:39:48 +0300 Subject: [PATCH 056/133] hiding, not destroying window on close on OS X, fixed app event filter --- Telegram/Resources/style.txt | 2 +- Telegram/SourceFiles/application.cpp | 11 ++--------- Telegram/SourceFiles/facades.cpp | 16 ++++++++++++++++ Telegram/SourceFiles/facades.h | 2 ++ Telegram/SourceFiles/window.cpp | 4 ++-- 5 files changed, 23 insertions(+), 12 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 9168bdd43bf0e9..c52dfd796c08ab 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1016,7 +1016,7 @@ historyToEndSkip: 10px; activeFadeInDuration: 500; activeFadeOutDuration: 3000; -historyMaxWidth: 640px; +historyMaxWidth: 680px; msgRadius: 3px; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f83156edae6794..1f1d6bf7922b4a 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -57,15 +57,8 @@ namespace { QKeyEvent *ev = static_cast(e); if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { if (ev->key() == Qt::Key_W && (ev->modifiers() & Qt::ControlModifier)) { - if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { - App::wnd()->minimizeToTray(); - return true; - } else { - App::wnd()->hide(); - App::wnd()->updateIsActive(cOfflineBlurTimeout()); - App::wnd()->updateGlobalMenu(); - return true; - } + Ui::hideWindowNoQuit(); + return true; } else if (ev->key() == Qt::Key_M && (ev->modifiers() & Qt::ControlModifier)) { App::wnd()->setWindowState(Qt::WindowMinimized); return true; diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 1013d65098840b..1750f0250bae41 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -134,6 +134,22 @@ namespace Ui { } } + bool hideWindowNoQuit() { + if (!App::quiting()) { + if (Window *w = App::wnd()) { + if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { + return w->minimizeToTray(); + } else if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { + w->hide(); + w->updateIsActive(cOfflineBlurTimeout()); + w->updateGlobalMenu(); + return true; + } + } + } + return false; + } + } namespace Notify { diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index ca390d2c3c7060..43da4a0268d1b4 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -67,6 +67,8 @@ namespace Ui { showPeerHistory(PeerId(0), 0); } + bool hideWindowNoQuit(); + }; enum ClipStopperType { diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 89fbecc527b034..c7cbfe3a6790e0 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -990,7 +990,7 @@ bool Window::eventFilter(QObject *obj, QEvent *evt) { } else if (t == QEvent::MouseButtonRelease) { Ui::hideStickerPreview(); } - if (obj == App::app()) { + if (obj == Application::instance()) { if (t == QEvent::ApplicationActivate) { psUserActionDone(); QTimer::singleShot(1, this, SLOT(checkHistoryActivation())); @@ -1214,7 +1214,7 @@ void Window::toggleDisplayNotifyFromTray() { } void Window::closeEvent(QCloseEvent *e) { - if (MTP::authedId() && !Sandbox::isSavingSession() && minimizeToTray()) { + if (MTP::authedId() && !Sandbox::isSavingSession() && Ui::hideWindowNoQuit()) { e->ignore(); } else { App::quit(); From 189d0e8de383a22fbc4e397d87b8ff944a6e3dfb Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Feb 2016 19:35:06 +0300 Subject: [PATCH 057/133] voice messages moved to documents with waveforms --- Telegram/Resources/style.txt | 11 +- Telegram/SourceFiles/app.cpp | 92 -- Telegram/SourceFiles/app.h | 11 - Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/audio.cpp | 660 +++++++------ Telegram/SourceFiles/audio.h | 11 +- Telegram/SourceFiles/boxes/connectionbox.cpp | 12 +- Telegram/SourceFiles/config.h | 2 + Telegram/SourceFiles/fileuploader.cpp | 47 +- Telegram/SourceFiles/fileuploader.h | 5 +- Telegram/SourceFiles/history.cpp | 560 ++++++----- Telegram/SourceFiles/history.h | 164 ++-- Telegram/SourceFiles/historywidget.cpp | 126 +-- Telegram/SourceFiles/historywidget.h | 7 +- Telegram/SourceFiles/layout.cpp | 24 +- Telegram/SourceFiles/layout.h | 6 +- Telegram/SourceFiles/localimageloader.cpp | 52 +- Telegram/SourceFiles/localimageloader.h | 11 +- Telegram/SourceFiles/localstorage.cpp | 71 ++ Telegram/SourceFiles/localstorage.h | 2 + Telegram/SourceFiles/mainwidget.cpp | 66 +- Telegram/SourceFiles/mainwidget.h | 5 +- Telegram/SourceFiles/mediaview.cpp | 12 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 2 +- .../SourceFiles/mtproto/mtpFileLoader.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpFileLoader.h | 17 - Telegram/SourceFiles/mtproto/mtpScheme.cpp | 262 ++--- Telegram/SourceFiles/mtproto/mtpScheme.h | 900 ++++-------------- Telegram/SourceFiles/mtproto/scheme.tl | 33 +- Telegram/SourceFiles/overviewwidget.cpp | 70 +- Telegram/SourceFiles/playerwidget.cpp | 62 +- Telegram/SourceFiles/profilewidget.cpp | 32 +- Telegram/SourceFiles/structs.cpp | 489 +++------- Telegram/SourceFiles/structs.h | 188 ++-- Telegram/SourceFiles/types.h | 70 +- Telegram/SourceFiles/window.cpp | 2 +- 36 files changed, 1604 insertions(+), 2484 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 9168bdd43bf0e9..5cd2bda889f093 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1286,6 +1286,15 @@ msgFileRadialLine: 3px; msgVideoSize: size(320px, 240px); +msgWaveformBar: 2px; +msgWaveformSkip: 1px; +msgWaveformMin: 2px; +msgWaveformMax: 20px; +msgWaveformInActive: #59b6eb; +msgWaveformInInactive: #deeaf1; +msgWaveformOutActive: #78c67f; +msgWaveformOutInactive: #c4e8c5; + sendPadding: 9px; btnSend: flatButton(btnDefFlat) { color: btnYesColor; @@ -1386,7 +1395,7 @@ btnRecordAudio: sprite(379px, 390px, 16px, 24px); btnRecordAudioActive: sprite(379px, 366px, 16px, 24px); recordSignalColor: #f17077; recordSignalMin: 5px; -recordSignalMax: 10px; +recordSignalMax: 12px; recordCancel: #aaa; recordCancelActive: #ec6466; recordFont: font(13px); diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index d36731ff797c58..ed66b1ba110d80 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -48,7 +48,6 @@ namespace { PhotosData photosData; VideosData videosData; - AudiosData audiosData; DocumentsData documentsData; typedef QHash ImageLinksData; @@ -65,7 +64,6 @@ namespace { PhotoItems photoItems; VideoItems videoItems; - AudioItems audioItems; DocumentItems documentItems; WebPageItems webPageItems; SharedContactItems sharedContactItems; @@ -1293,22 +1291,6 @@ namespace App { return App::videoSet(video.vid.v, convert, video.vaccess_hash.v, video.vdate.v, video.vduration.v, video.vw.v, video.vh.v, App::image(video.vthumb), video.vdc_id.v, video.vsize.v); } - AudioData *feedAudio(const MTPaudio &audio, AudioData *convert) { - switch (audio.type()) { - case mtpc_audio: { - return feedAudio(audio.c_audio(), convert); - } break; - case mtpc_audioEmpty: { - return App::audioSet(audio.c_audioEmpty().vid.v, convert, 0, 0, QString(), 0, 0, 0); - } break; - } - return App::audio(0); - } - - AudioData *feedAudio(const MTPDaudio &audio, AudioData *convert) { - return App::audioSet(audio.vid.v, convert, audio.vaccess_hash.v, audio.vdate.v, qs(audio.vmime_type), audio.vduration.v, audio.vdc_id.v, audio.vsize.v); - } - DocumentData *feedDocument(const MTPdocument &document, const QPixmap &thumb) { switch (document.type()) { case mtpc_document: { @@ -1568,56 +1550,6 @@ namespace App { return result; } - AudioData *audio(const AudioId &audio) { - AudiosData::const_iterator i = ::audiosData.constFind(audio); - if (i == ::audiosData.cend()) { - i = ::audiosData.insert(audio, new AudioData(audio)); - } - return i.value(); - } - - AudioData *audioSet(const AudioId &audio, AudioData *convert, const uint64 &access, int32 date, const QString &mime, int32 duration, int32 dc, int32 size) { - if (convert) { - if (convert->id != audio) { - AudiosData::iterator i = ::audiosData.find(convert->id); - if (i != ::audiosData.cend() && i.value() == convert) { - ::audiosData.erase(i); - } - convert->id = audio; - convert->status = FileReady; - } - if (date) { - convert->access = access; - convert->date = date; - convert->mime = mime; - convert->duration = duration; - convert->dc = dc; - convert->size = size; - } - } - AudiosData::const_iterator i = ::audiosData.constFind(audio); - AudioData *result; - if (i == ::audiosData.cend()) { - if (convert) { - result = convert; - } else { - result = new AudioData(audio, access, date, mime, duration, dc, size); - } - ::audiosData.insert(audio, result); - } else { - result = i.value(); - if (result != convert && date) { - result->access = access; - result->date = date; - result->mime = mime; - result->duration = duration; - result->dc = dc; - result->size = size; - } - } - return result; - } - DocumentData *document(const DocumentId &document) { DocumentsData::const_iterator i = ::documentsData.constFind(document); if (i == ::documentsData.cend()) { @@ -1795,9 +1727,6 @@ namespace App { for (VideosData::const_iterator i = ::videosData.cbegin(), e = ::videosData.cend(); i != e; ++i) { i.value()->forget(); } - for (AudiosData::const_iterator i = ::audiosData.cbegin(), e = ::audiosData.cend(); i != e; ++i) { - i.value()->forget(); - } for (DocumentsData::const_iterator i = ::documentsData.cbegin(), e = ::documentsData.cend(); i != e; ++i) { i.value()->forget(); } @@ -1955,10 +1884,6 @@ namespace App { delete *i; } ::videosData.clear(); - for (AudiosData::const_iterator i = ::audiosData.cbegin(), e = ::audiosData.cend(); i != e; ++i) { - delete *i; - } - ::audiosData.clear(); for (DocumentsData::const_iterator i = ::documentsData.cbegin(), e = ::documentsData.cend(); i != e; ++i) { delete *i; } @@ -1977,7 +1902,6 @@ namespace App { cSetReportSpamStatuses(ReportSpamStatuses()); ::photoItems.clear(); ::videoItems.clear(); - ::audioItems.clear(); ::documentItems.clear(); ::webPageItems.clear(); ::sharedContactItems.clear(); @@ -2392,22 +2316,6 @@ namespace App { return ::videosData; } - void regAudioItem(AudioData *data, HistoryItem *item) { - ::audioItems[data].insert(item, NullType()); - } - - void unregAudioItem(AudioData*data, HistoryItem *item) { - ::audioItems[data].remove(item); - } - - const AudioItems &audioItems() { - return ::audioItems; - } - - const AudiosData &audiosData() { - return ::audiosData; - } - void regDocumentItem(DocumentData *data, HistoryItem *item) { ::documentItems[data].insert(item, NullType()); } diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index 2b224e07cada98..c62278798db215 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -37,7 +37,6 @@ class FileUploader; typedef QMap HistoryItemsMap; typedef QHash PhotoItems; typedef QHash VideoItems; -typedef QHash AudioItems; typedef QHash DocumentItems; typedef QHash WebPageItems; typedef QHash SharedContactItems; @@ -45,7 +44,6 @@ typedef QHash GifItems; typedef QHash PhotosData; typedef QHash VideosData; -typedef QHash AudiosData; typedef QHash DocumentsData; struct ReplyMarkup { @@ -107,8 +105,6 @@ namespace App { PhotoData *feedPhoto(const MTPPhoto &photo, PhotoData *convert = 0); PhotoData *feedPhoto(const MTPDphoto &photo, PhotoData *convert = 0); VideoData *feedVideo(const MTPDvideo &video, VideoData *convert = 0); - AudioData *feedAudio(const MTPaudio &audio, AudioData *convert = 0); - AudioData *feedAudio(const MTPDaudio &audio, AudioData *convert = 0); DocumentData *feedDocument(const MTPdocument &document, const QPixmap &thumb); DocumentData *feedDocument(const MTPdocument &document, DocumentData *convert = 0); DocumentData *feedDocument(const MTPDdocument &document, DocumentData *convert = 0); @@ -138,8 +134,6 @@ namespace App { PhotoData *photoSet(const PhotoId &photo, PhotoData *convert, const uint64 &access, int32 date, const ImagePtr &thumb, const ImagePtr &medium, const ImagePtr &full); VideoData *video(const VideoId &video); VideoData *videoSet(const VideoId &video, VideoData *convert, const uint64 &access, int32 date, int32 duration, int32 w, int32 h, const ImagePtr &thumb, int32 dc, int32 size); - AudioData *audio(const AudioId &audio); - AudioData *audioSet(const AudioId &audio, AudioData *convert, const uint64 &access, int32 date, const QString &mime, int32 duration, int32 dc, int32 size); DocumentData *document(const DocumentId &document); DocumentData *documentSet(const DocumentId &document, DocumentData *convert, const uint64 &access, int32 date, const QVector &attributes, const QString &mime, const ImagePtr &thumb, int32 dc, int32 size, const StorageImageLocation &thumbLocation); WebPageData *webPage(const WebPageId &webPage); @@ -219,11 +213,6 @@ namespace App { const VideoItems &videoItems(); const VideosData &videosData(); - void regAudioItem(AudioData *data, HistoryItem *item); - void unregAudioItem(AudioData*data, HistoryItem *item); - const AudioItems &audioItems(); - const AudiosData &audiosData(); - void regDocumentItem(DocumentData *data, HistoryItem *item); void unregDocumentItem(DocumentData *data, HistoryItem *item); const DocumentItems &documentItems(); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 7e65ac75fad618..afc5e6bc0742c5 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1039,7 +1039,7 @@ void AppClass::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) { int32 filesize = 0; QByteArray data; - ReadyLocalMedia ready(PreparePhoto, file, filename, filesize, data, id, id, qsl("jpg"), peerId, photo, MTP_audioEmpty(MTP_long(0)), photoThumbs, MTP_documentEmpty(MTP_long(0)), jpeg, false, false, 0); + ReadyLocalMedia ready(PreparePhoto, file, filename, filesize, data, id, id, qsl("jpg"), peerId, photo, photoThumbs, MTP_documentEmpty(MTP_long(0)), jpeg, false, false, 0); connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&, const MTPInputFile&)), App::app(), SLOT(photoUpdated(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index db981b3aa2b070..7771eb39e92144 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -96,6 +96,7 @@ bool _checkALError() { Q_DECLARE_METATYPE(AudioMsgId); Q_DECLARE_METATYPE(SongMsgId); +Q_DECLARE_METATYPE(VoiceWaveform); void audioInit() { if (!capture) { capture = new AudioCapture(); @@ -206,6 +207,7 @@ void audioInit() { qRegisterMetaType(); qRegisterMetaType(); + qRegisterMetaType(); player = new AudioPlayer(); alcDevicePauseSOFT(audioDevice); @@ -368,8 +370,8 @@ void AudioPlayer::onStopped(const SongMsgId &song) { bool AudioPlayer::updateCurrentStarted(MediaOverviewType type, int32 pos) { Msg *data = 0; switch (type) { - case OverviewAudios: data = &_audioData[_audioCurrent]; break; - case OverviewDocuments: data = &_songData[_songCurrent]; break; + case OverviewVoiceFiles: data = &_audioData[_audioCurrent]; break; + case OverviewFiles: data = &_songData[_songCurrent]; break; } if (!data) return false; @@ -382,8 +384,8 @@ bool AudioPlayer::updateCurrentStarted(MediaOverviewType type, int32 pos) { if (!_checkALError()) { setStoppedState(data, AudioPlayerStoppedAtError); switch (type) { - case OverviewAudios: onError(_audioData[_audioCurrent].audio); break; - case OverviewDocuments: onError(_songData[_songCurrent].song); break; + case OverviewVoiceFiles: onError(_audioData[_audioCurrent].audio); break; + case OverviewFiles: onError(_songData[_songCurrent].song); break; } return false; } @@ -395,8 +397,8 @@ bool AudioPlayer::updateCurrentStarted(MediaOverviewType type, int32 pos) { bool AudioPlayer::fadedStop(MediaOverviewType type, bool *fadedStart) { Msg *current = 0; switch (type) { - case OverviewAudios: current = &_audioData[_audioCurrent]; break; - case OverviewDocuments: current = &_songData[_songCurrent]; break; + case OverviewVoiceFiles: current = &_audioData[_audioCurrent]; break; + case OverviewFiles: current = &_songData[_songCurrent]; break; } if (!current) return false; @@ -428,7 +430,7 @@ void AudioPlayer::play(const AudioMsgId &audio, int64 position) { bool fadedStart = false; AudioMsg *current = &_audioData[_audioCurrent]; if (current->audio != audio) { - if (fadedStop(OverviewAudios, &fadedStart)) { + if (fadedStop(OverviewVoiceFiles, &fadedStart)) { stopped = current->audio; } if (current->audio) { @@ -472,7 +474,7 @@ void AudioPlayer::play(const SongMsgId &song, int64 position) { bool fadedStart = false; SongMsg *current = &_songData[_songCurrent]; if (current->song != song) { - if (fadedStop(OverviewDocuments, &fadedStart)) { + if (fadedStop(OverviewFiles, &fadedStart)) { stopped = current->song; } if (current->song) { @@ -513,11 +515,11 @@ bool AudioPlayer::checkCurrentALError(MediaOverviewType type) { if (_checkALError()) return true; switch (type) { - case OverviewAudios: + case OverviewVoiceFiles: setStoppedState(&_audioData[_audioCurrent], AudioPlayerStoppedAtError); onError(_audioData[_audioCurrent].audio); break; - case OverviewDocuments: + case OverviewFiles: setStoppedState(&_songData[_songCurrent], AudioPlayerStoppedAtError); onError(_songData[_songCurrent].song); break; @@ -531,11 +533,11 @@ void AudioPlayer::pauseresume(MediaOverviewType type, bool fast) { Msg *current = 0; float64 suppressGain = 1.; switch (type) { - case OverviewAudios: + case OverviewVoiceFiles: current = &_audioData[_audioCurrent]; suppressGain = suppressAllGain; break; - case OverviewDocuments: + case OverviewFiles: current = &_songData[_songCurrent]; suppressGain = suppressSongGain * cSongVolume(); break; @@ -567,14 +569,14 @@ void AudioPlayer::pauseresume(MediaOverviewType type, bool fast) { alSourcePlay(current->source); if (!checkCurrentALError(type)) return; } - if (type == OverviewAudios) emit suppressSong(); + if (type == OverviewVoiceFiles) emit suppressSong(); } break; case AudioPlayerStarting: case AudioPlayerResuming: case AudioPlayerPlaying: current->state = AudioPlayerPausing; updateCurrentStarted(type); - if (type == OverviewAudios) emit unsuppressSong(); + if (type == OverviewVoiceFiles) emit unsuppressSong(); break; case AudioPlayerFinishing: current->state = AudioPlayerPausing; break; } @@ -584,18 +586,18 @@ void AudioPlayer::pauseresume(MediaOverviewType type, bool fast) { void AudioPlayer::seek(int64 position) { QMutexLocker lock(&playerMutex); - MediaOverviewType type = OverviewDocuments; + MediaOverviewType type = OverviewFiles; Msg *current = 0; float64 suppressGain = 1.; AudioMsgId audio; SongMsgId song; switch (type) { - case OverviewAudios: + case OverviewVoiceFiles: current = &_audioData[_audioCurrent]; audio = _audioData[_audioCurrent].audio; suppressGain = suppressAllGain; break; - case OverviewDocuments: + case OverviewFiles: current = &_songData[_songCurrent]; song = _songData[_songCurrent].song; suppressGain = suppressSongGain * cSongVolume(); @@ -629,7 +631,7 @@ void AudioPlayer::seek(int64 position) { case AudioPlayerPlaying: current->state = AudioPlayerPausing; updateCurrentStarted(type); - if (type == OverviewAudios) emit unsuppressSong(); + if (type == OverviewVoiceFiles) emit unsuppressSong(); break; case AudioPlayerFinishing: case AudioPlayerStopped: @@ -638,8 +640,8 @@ void AudioPlayer::seek(int64 position) { case AudioPlayerStoppedAtStart: lock.unlock(); switch (type) { - case OverviewAudios: if (audio) return play(audio, position); - case OverviewDocuments: if (song) return play(song, position); + case OverviewVoiceFiles: if (audio) return play(audio, position); + case OverviewFiles: if (song) return play(song, position); } } emit faderOnTimer(); @@ -647,7 +649,7 @@ void AudioPlayer::seek(int64 position) { void AudioPlayer::stop(MediaOverviewType type) { switch (type) { - case OverviewAudios: { + case OverviewVoiceFiles: { AudioMsgId current; { QMutexLocker lock(&playerMutex); @@ -657,7 +659,7 @@ void AudioPlayer::stop(MediaOverviewType type) { if (current) emit updated(current); } break; - case OverviewDocuments: { + case OverviewFiles: { SongMsgId current; { QMutexLocker lock(&playerMutex); @@ -754,8 +756,8 @@ void AudioPlayer::resumeDevice() { AudioCapture::AudioCapture() : _capture(new AudioCaptureInner(&_captureThread)) { connect(this, SIGNAL(captureOnStart()), _capture, SLOT(onStart())); connect(this, SIGNAL(captureOnStop(bool)), _capture, SLOT(onStop(bool))); - connect(_capture, SIGNAL(done(QByteArray,qint32)), this, SIGNAL(onDone(QByteArray,qint32))); - connect(_capture, SIGNAL(update(qint16,qint32)), this, SIGNAL(onUpdate(qint16,qint32))); + connect(_capture, SIGNAL(done(QByteArray,VoiceWaveform,qint32)), this, SIGNAL(onDone(QByteArray,VoiceWaveform,qint32))); + connect(_capture, SIGNAL(update(quint16,qint32)), this, SIGNAL(onUpdate(quint16,qint32))); connect(_capture, SIGNAL(error()), this, SIGNAL(onError())); connect(&_captureThread, SIGNAL(started()), _capture, SLOT(onInit())); connect(&_captureThread, SIGNAL(finished()), _capture, SLOT(deleteLater())); @@ -1109,19 +1111,18 @@ class AudioPlayerLoader { }; -static const AVSampleFormat _toFormat = AV_SAMPLE_FMT_S16; -static const int64_t _toChannelLayout = AV_CH_LAYOUT_STEREO; -static const int32 _toChannels = 2; -class FFMpegLoader : public AudioPlayerLoader { +class AbstractFFMpegLoader : public AudioPlayerLoader { public: - FFMpegLoader(const FileLocation &file, const QByteArray &data) : AudioPlayerLoader(file, data), - freq(AudioVoiceMsgFrequency), fmt(AL_FORMAT_STEREO16), - sampleSize(2 * sizeof(short)), srcRate(AudioVoiceMsgFrequency), dstRate(AudioVoiceMsgFrequency), - maxResampleSamples(1024), dstSamplesData(0), len(0), - ioBuffer(0), ioContext(0), fmtContext(0), codec(0), codecContext(0), streamId(0), frame(0), swrContext(0), - _opened(false) { - frame = av_frame_alloc(); + AbstractFFMpegLoader(const FileLocation &file, const QByteArray &data) : AudioPlayerLoader(file, data) + , freq(AudioVoiceMsgFrequency) + , len(0) + , ioBuffer(0) + , ioContext(0) + , fmtContext(0) + , codec(0) + , streamId(0) + , _opened(false) { } bool open(qint64 position = 0) { @@ -1129,31 +1130,32 @@ class FFMpegLoader : public AudioPlayerLoader { return false; } + int res = 0; + char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; + ioBuffer = (uchar*)av_malloc(AVBlockSize); if (data.isEmpty()) { - ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, static_cast(this), &FFMpegLoader::_read_file, 0, &FFMpegLoader::_seek_file); + ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, reinterpret_cast(this), &AbstractFFMpegLoader::_read_file, 0, &AbstractFFMpegLoader::_seek_file); } else { - ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, static_cast(this), &FFMpegLoader::_read_data, 0, &FFMpegLoader::_seek_data); + ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, reinterpret_cast(this), &AbstractFFMpegLoader::_read_data, 0, &AbstractFFMpegLoader::_seek_data); } fmtContext = avformat_alloc_context(); if (!fmtContext) { - LOG(("Audio Error: Unable to avformat_alloc_context for file '%1', data size '%2'").arg(file.name()).arg(data.size())); + DEBUG_LOG(("Audio Read Error: Unable to avformat_alloc_context for file '%1', data size '%2'").arg(file.name()).arg(data.size())); return false; } fmtContext->pb = ioContext; - int res = 0; - char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; if ((res = avformat_open_input(&fmtContext, 0, 0, 0)) < 0) { ioBuffer = 0; - LOG(("Audio Error: Unable to avformat_open_input for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); + DEBUG_LOG(("Audio Read Error: Unable to avformat_open_input for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); return false; } _opened = true; if ((res = avformat_find_stream_info(fmtContext, 0)) < 0) { - LOG(("Audio Error: Unable to avformat_find_stream_info for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); + DEBUG_LOG(("Audio Read Error: Unable to avformat_find_stream_info for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); return false; } @@ -1163,20 +1165,130 @@ class FFMpegLoader : public AudioPlayerLoader { return false; } - // Get a pointer to the codec context for the audio stream - codecContext = fmtContext->streams[streamId]->codec; - av_opt_set_int(codecContext, "refcounted_frames", 1, 0); - if ((res = avcodec_open2(codecContext, codec, 0)) < 0) { - LOG(("Audio Error: Unable to avcodec_open2 for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); - return false; - } - - freq = codecContext->sample_rate; + freq = fmtContext->streams[streamId]->codec->sample_rate; if (fmtContext->streams[streamId]->duration == AV_NOPTS_VALUE) { len = (fmtContext->duration * freq) / AV_TIME_BASE; } else { len = (fmtContext->streams[streamId]->duration * freq * fmtContext->streams[streamId]->time_base.num) / fmtContext->streams[streamId]->time_base.den; } + + return true; + } + + int64 duration() { + return len; + } + + int32 frequency() { + return freq; + } + + ~AbstractFFMpegLoader() { + if (ioContext) av_free(ioContext); + if (_opened) { + avformat_close_input(&fmtContext); + } else if (ioBuffer) { + av_free(ioBuffer); + } + if (fmtContext) avformat_free_context(fmtContext); + } + +protected: + + int32 freq; + int64 len; + + uchar *ioBuffer; + AVIOContext *ioContext; + AVFormatContext *fmtContext; + AVCodec *codec; + int32 streamId; + + bool _opened; + +private: + + static int _read_data(void *opaque, uint8_t *buf, int buf_size) { + AbstractFFMpegLoader *l = reinterpret_cast(opaque); + + int32 nbytes = qMin(l->data.size() - l->dataPos, int32(buf_size)); + if (nbytes <= 0) { + return 0; + } + + memcpy(buf, l->data.constData() + l->dataPos, nbytes); + l->dataPos += nbytes; + return nbytes; + } + + static int64_t _seek_data(void *opaque, int64_t offset, int whence) { + AbstractFFMpegLoader *l = reinterpret_cast(opaque); + + int32 newPos = -1; + switch (whence) { + case SEEK_SET: newPos = offset; break; + case SEEK_CUR: newPos = l->dataPos + offset; break; + case SEEK_END: newPos = l->data.size() + offset; break; + } + if (newPos < 0 || newPos > l->data.size()) { + return -1; + } + l->dataPos = newPos; + return l->dataPos; + } + + static int _read_file(void *opaque, uint8_t *buf, int buf_size) { + AbstractFFMpegLoader *l = reinterpret_cast(opaque); + return int(l->f.read((char*)(buf), buf_size)); + } + + static int64_t _seek_file(void *opaque, int64_t offset, int whence) { + AbstractFFMpegLoader *l = reinterpret_cast(opaque); + + switch (whence) { + case SEEK_SET: return l->f.seek(offset) ? l->f.pos() : -1; + case SEEK_CUR: return l->f.seek(l->f.pos() + offset) ? l->f.pos() : -1; + case SEEK_END: return l->f.seek(l->f.size() + offset) ? l->f.pos() : -1; + } + return -1; + } +}; + +static const AVSampleFormat _toFormat = AV_SAMPLE_FMT_S16; +static const int64_t _toChannelLayout = AV_CH_LAYOUT_STEREO; +static const int32 _toChannels = 2; +class FFMpegLoader : public AbstractFFMpegLoader { +public: + + FFMpegLoader(const FileLocation &file, const QByteArray &data) : AbstractFFMpegLoader(file, data) + , sampleSize(2 * sizeof(uint16)) + , fmt(AL_FORMAT_STEREO16) + , srcRate(AudioVoiceMsgFrequency) + , dstRate(AudioVoiceMsgFrequency) + , maxResampleSamples(1024) + , dstSamplesData(0) + , codecContext(0) + , frame(0) + , swrContext(0) { + frame = av_frame_alloc(); + } + + bool open(qint64 position = 0) { + if (!AbstractFFMpegLoader::open(position)) { + return false; + } + + int res = 0; + char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; + + // Get a pointer to the codec context for the audio stream + av_opt_set_int(fmtContext->streams[streamId]->codec, "refcounted_frames", 1, 0); + if ((res = avcodec_open2(fmtContext->streams[streamId]->codec, codec, 0)) < 0) { + LOG(("Audio Error: Unable to avcodec_open2 for file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); + return false; + } + codecContext = fmtContext->streams[streamId]->codec; + uint64_t layout = codecContext->channel_layout; inputFormat = codecContext->sample_fmt; switch (layout) { @@ -1185,7 +1297,7 @@ class FFMpegLoader : public AudioPlayerLoader { case AV_SAMPLE_FMT_U8: case AV_SAMPLE_FMT_U8P: fmt = AL_FORMAT_MONO8; sampleSize = 1; break; case AV_SAMPLE_FMT_S16: - case AV_SAMPLE_FMT_S16P: fmt = AL_FORMAT_MONO16; sampleSize = 2; break; + case AV_SAMPLE_FMT_S16P: fmt = AL_FORMAT_MONO16; sampleSize = sizeof(uint16); break; default: sampleSize = -1; // convert needed break; @@ -1193,8 +1305,8 @@ class FFMpegLoader : public AudioPlayerLoader { break; case AV_CH_LAYOUT_STEREO: switch (inputFormat) { - case AV_SAMPLE_FMT_U8: fmt = AL_FORMAT_STEREO8; sampleSize = sizeof(short); break; - case AV_SAMPLE_FMT_S16: fmt = AL_FORMAT_STEREO16; sampleSize = 2 * sizeof(short); break; + case AV_SAMPLE_FMT_U8: fmt = AL_FORMAT_STEREO8; sampleSize = 2; break; + case AV_SAMPLE_FMT_S16: fmt = AL_FORMAT_STEREO16; sampleSize = 2 * sizeof(uint16); break; default: sampleSize = -1; // convert needed break; @@ -1256,14 +1368,6 @@ class FFMpegLoader : public AudioPlayerLoader { return true; } - int64 duration() { - return len; - } - - int32 frequency() { - return freq; - } - int32 format() { return fmt; } @@ -1326,7 +1430,6 @@ class FFMpegLoader : public AudioPlayerLoader { } ~FFMpegLoader() { - if (ioContext) av_free(ioContext); if (codecContext) avcodec_close(codecContext); if (swrContext) swr_free(&swrContext); if (dstSamplesData) { @@ -1335,80 +1438,25 @@ class FFMpegLoader : public AudioPlayerLoader { } av_freep(&dstSamplesData); } - if (_opened) { - avformat_close_input(&fmtContext); - } else if (ioBuffer) { - av_free(ioBuffer); - } - if (fmtContext) avformat_free_context(fmtContext); av_frame_free(&frame); } +protected: + int32 sampleSize; + private: - int32 freq, fmt; - int32 sampleSize, srcRate, dstRate, maxResampleSamples; + int32 fmt; + int32 srcRate, dstRate, maxResampleSamples; uint8_t **dstSamplesData; - int64 len; - uchar *ioBuffer; - AVIOContext *ioContext; - AVFormatContext *fmtContext; - AVCodec *codec; AVCodecContext *codecContext; AVPacket avpkt; - int32 streamId; AVSampleFormat inputFormat; AVFrame *frame; SwrContext *swrContext; - bool _opened; - - static int _read_data(void *opaque, uint8_t *buf, int buf_size) { - FFMpegLoader *l = reinterpret_cast(opaque); - - int32 nbytes = qMin(l->data.size() - l->dataPos, int32(buf_size)); - if (nbytes <= 0) { - return 0; - } - - memcpy(buf, l->data.constData() + l->dataPos, nbytes); - l->dataPos += nbytes; - return nbytes; - } - - static int64_t _seek_data(void *opaque, int64_t offset, int whence) { - FFMpegLoader *l = reinterpret_cast(opaque); - - int32 newPos = -1; - switch (whence) { - case SEEK_SET: newPos = offset; break; - case SEEK_CUR: newPos = l->dataPos + offset; break; - case SEEK_END: newPos = l->data.size() + offset; break; - } - if (newPos < 0 || newPos > l->data.size()) { - return -1; - } - l->dataPos = newPos; - return l->dataPos; - } - - static int _read_file(void *opaque, uint8_t *buf, int buf_size) { - FFMpegLoader *l = reinterpret_cast(opaque); - return int(l->f.read((char*)(buf), buf_size)); - } - - static int64_t _seek_file(void *opaque, int64_t offset, int whence) { - FFMpegLoader *l = reinterpret_cast(opaque); - - switch (whence) { - case SEEK_SET: return l->f.seek(offset) ? l->f.pos() : -1; - case SEEK_CUR: return l->f.seek(l->f.pos() + offset) ? l->f.pos() : -1; - case SEEK_END: return l->f.seek(l->f.size() + offset) ? l->f.pos() : -1; - } - return -1; - } }; AudioPlayerLoaders::AudioPlayerLoaders(QThread *thread) : _audioLoader(0), _songLoader(0) { @@ -1436,7 +1484,7 @@ void AudioPlayerLoaders::onStart(const AudioMsgId &audio, qint64 position) { voice->_audioData[voice->_audioCurrent].loading = true; } - loadData(OverviewAudios, static_cast(&audio), position); + loadData(OverviewVoiceFiles, static_cast(&audio), position); } void AudioPlayerLoaders::onStart(const SongMsgId &song, qint64 position) { @@ -1452,13 +1500,13 @@ void AudioPlayerLoaders::onStart(const SongMsgId &song, qint64 position) { voice->_songData[voice->_songCurrent].loading = true; } - loadData(OverviewDocuments, static_cast(&song), position); + loadData(OverviewFiles, static_cast(&song), position); } void AudioPlayerLoaders::clear(MediaOverviewType type) { switch (type) { - case OverviewAudios: clearAudio(); break; - case OverviewDocuments: clearSong(); break; + case OverviewVoiceFiles: clearAudio(); break; + case OverviewFiles: clearSong(); break; } } @@ -1469,8 +1517,8 @@ void AudioPlayerLoaders::setStoppedState(AudioPlayer::Msg *m, AudioPlayerState s void AudioPlayerLoaders::emitError(MediaOverviewType type) { switch (type) { - case OverviewAudios: emit error(clearAudio()); break; - case OverviewDocuments: emit error(clearSong()); break; + case OverviewVoiceFiles: emit error(clearAudio()); break; + case OverviewFiles: emit error(clearSong()); break; } } @@ -1491,11 +1539,11 @@ SongMsgId AudioPlayerLoaders::clearSong() { } void AudioPlayerLoaders::onLoad(const AudioMsgId &audio) { - loadData(OverviewAudios, static_cast(&audio), 0); + loadData(OverviewVoiceFiles, static_cast(&audio), 0); } void AudioPlayerLoaders::onLoad(const SongMsgId &song) { - loadData(OverviewDocuments, static_cast(&song), 0); + loadData(OverviewFiles, static_cast(&song), 0); } void AudioPlayerLoaders::loadData(MediaOverviewType type, const void *objId, qint64 position) { @@ -1608,8 +1656,8 @@ void AudioPlayerLoaders::loadData(MediaOverviewType type, const void *objId, qin audioPlayer()->resumeDevice(); switch (type) { - case OverviewAudios: alSourcef(m->source, AL_GAIN, suppressAllGain); break; - case OverviewDocuments: alSourcef(m->source, AL_GAIN, suppressSongGain * cSongVolume()); break; + case OverviewVoiceFiles: alSourcef(m->source, AL_GAIN, suppressAllGain); break; + case OverviewFiles: alSourcef(m->source, AL_GAIN, suppressSongGain * cSongVolume()); break; } if (!_checkALError()) { setStoppedState(m, AudioPlayerStoppedAtError); @@ -1643,7 +1691,7 @@ AudioPlayerLoader *AudioPlayerLoaders::setupLoader(MediaOverviewType type, const AudioPlayer::Msg *m = 0; AudioPlayerLoader **l = 0; switch (type) { - case OverviewAudios: { + case OverviewVoiceFiles: { AudioPlayer::AudioMsg &msg(voice->_audioData[voice->_audioCurrent]); const AudioMsgId &audio(*static_cast(objId)); if (msg.audio != audio || !msg.loading) { @@ -1654,7 +1702,7 @@ AudioPlayerLoader *AudioPlayerLoaders::setupLoader(MediaOverviewType type, const l = &_audioLoader; isGoodId = (_audio == audio); } break; - case OverviewDocuments: { + case OverviewFiles: { AudioPlayer::SongMsg &msg(voice->_songData[voice->_songCurrent]); const SongMsgId &song(*static_cast(objId)); if (msg.song != song || !msg.loading) { @@ -1676,15 +1724,15 @@ AudioPlayerLoader *AudioPlayerLoaders::setupLoader(MediaOverviewType type, const delete *l; *l = 0; switch (type) { - case OverviewAudios: _audio = AudioMsgId(); break; - case OverviewDocuments: _song = SongMsgId(); break; + case OverviewVoiceFiles: _audio = AudioMsgId(); break; + case OverviewFiles: _song = SongMsgId(); break; } } if (!*l) { switch (type) { - case OverviewAudios: _audio = *static_cast(objId); break; - case OverviewDocuments: _song = *static_cast(objId); break; + case OverviewVoiceFiles: _audio = *static_cast(objId); break; + case OverviewFiles: _song = *static_cast(objId); break; } // QByteArray header = m->data.mid(0, 8); @@ -1737,13 +1785,13 @@ AudioPlayer::Msg *AudioPlayerLoaders::checkLoader(MediaOverviewType type) { AudioPlayer::Msg *m = 0; AudioPlayerLoader **l = 0; switch (type) { - case OverviewAudios: { + case OverviewVoiceFiles: { AudioPlayer::AudioMsg &msg(voice->_audioData[voice->_audioCurrent]); isGoodId = (msg.audio == _audio); l = &_audioLoader; m = &msg; } break; - case OverviewDocuments: { + case OverviewFiles: { AudioPlayer::SongMsg &msg(voice->_songData[voice->_songCurrent]); isGoodId = (msg.song == _song); l = &_songLoader; @@ -1799,10 +1847,30 @@ void AudioPlayerLoaders::onCancel(const SongMsgId &song) { } struct AudioCapturePrivate { - AudioCapturePrivate() : - device(0), fmt(0), ioBuffer(0), ioContext(0), fmtContext(0), stream(0), codec(0), codecContext(0), opened(false), - srcSamples(0), dstSamples(0), maxDstSamples(0), dstSamplesSize(0), fullSamples(0), srcSamplesData(0), dstSamplesData(0), - swrContext(0), lastUpdate(0), level(0), dataPos(0) { + AudioCapturePrivate() + : device(0) + , fmt(0) + , ioBuffer(0) + , ioContext(0) + , fmtContext(0) + , stream(0) + , codec(0) + , codecContext(0) + , opened(false) + , srcSamples(0) + , dstSamples(0) + , maxDstSamples(0) + , dstSamplesSize(0) + , fullSamples(0) + , srcSamplesData(0) + , dstSamplesData(0) + , swrContext(0) + , lastUpdate(0) + , levelMax(0) + , waveformMod(0) + , waveformEach(AudioVoiceMsgFrequency / 100) + , waveformPeak(0) + , dataPos(0) { } ALCdevice *device; AVOutputFormat *fmt; @@ -1819,11 +1887,15 @@ struct AudioCapturePrivate { SwrContext *swrContext; int32 lastUpdate; - int64 level; + uint16 levelMax; QByteArray data; int32 dataPos; + int64 waveformMod, waveformEach; + uint16 waveformPeak; + QVector waveform; + static int _read_data(void *opaque, uint8_t *buf, int buf_size) { AudioCapturePrivate *l = reinterpret_cast(opaque); @@ -2035,6 +2107,9 @@ void AudioCaptureInner::onStop(bool needResult) { d->fullSamples = 0; d->dataPos = 0; d->data.clear(); + d->waveformMod = 0; + d->waveformPeak = 0; + d->waveform.clear(); } else { float64 coef = 1. / fadeSamples, fadedFrom = 0; for (short *ptr = ((short*)_captured.data()) + capturedSamples, *end = ptr - fadeSamples; ptr != end; ++fadedFrom) { @@ -2056,6 +2131,9 @@ void AudioCaptureInner::onStop(bool needResult) { d->fullSamples = 0; d->dataPos = 0; d->data.clear(); + d->waveformMod = 0; + d->waveformPeak = 0; + d->waveform.clear(); } } } @@ -2068,7 +2146,37 @@ void AudioCaptureInner::onStop(bool needResult) { } QByteArray result = d->fullSamples ? d->data : QByteArray(); + VoiceWaveform waveform; qint32 samples = d->fullSamples; + if (samples && !d->waveform.isEmpty()) { + int64 count = d->waveform.size(), sum = 0; + if (count >= WaveformSamplesCount) { + QVector peaks; + peaks.reserve(WaveformSamplesCount); + + uint16 peak = 0; + for (int32 i = 0; i < count; ++i) { + uint16 sample = uint16(d->waveform.at(i)) * 256; + if (peak < sample) { + peak = sample; + } + sum += WaveformSamplesCount; + if (sum >= count) { + sum -= count; + peaks.push_back(peak); + peak = 0; + } + } + + int64 sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0ULL); + peak = qMax(int32(sum * 1.8 / peaks.size()), 2500); + + waveform.resize(peaks.size()); + for (int32 i = 0, l = peaks.size(); i != l; ++i) { + waveform[i] = char(qMin(31U, uint32(qMin(peaks.at(i), peak)) * 31 / peak)); + } + } + } if (d->device) { alcCaptureStop(d->device); alcCaptureCloseDevice(d->device); @@ -2116,12 +2224,16 @@ void AudioCaptureInner::onStop(bool needResult) { d->codec = 0; d->lastUpdate = 0; - d->level = 0; + d->levelMax = 0; d->dataPos = 0; d->data.clear(); + + d->waveformMod = 0; + d->waveformPeak = 0; + d->waveform.clear(); } - if (needResult) emit done(result, samples); + if (needResult) emit done(result, waveform, samples); } void AudioCaptureInner::onTimeout() { @@ -2155,18 +2267,20 @@ void AudioCaptureInner::onTimeout() { int32 levelindex = d->fullSamples + (s / sizeof(short)); for (const short *ptr = (const short*)(_captured.constData() + s), *end = (const short*)(_captured.constData() + news); ptr < end; ++ptr, ++levelindex) { if (levelindex > skipSamples) { + uint16 value = qAbs(*ptr); if (levelindex < skipSamples + fadeSamples) { - d->level += qRound(qAbs(*ptr) * float64(levelindex - skipSamples) / fadeSamples); - } else { - d->level += qAbs(*ptr); + value = qRound(value * float64(levelindex - skipSamples) / fadeSamples); + } + if (d->levelMax < value) { + d->levelMax = value; } } } qint32 samplesFull = d->fullSamples + _captured.size() / sizeof(short), samplesSinceUpdate = samplesFull - d->lastUpdate; if (samplesSinceUpdate > AudioVoiceMsgUpdateView * AudioVoiceMsgFrequency / 1000) { - emit update(d->level / samplesSinceUpdate, samplesFull); + emit update(d->levelMax, samplesFull); d->lastUpdate = samplesFull; - d->level = 0; + d->levelMax = 0; } // Write frames int32 framesize = d->srcSamples * d->codecContext->channels * sizeof(short), encoded = 0; @@ -2206,7 +2320,7 @@ void AudioCaptureInner::writeFrame(int32 offset, int32 framesize) { if (d->fullSamples < skipSamples + fadeSamples) { int32 fadedCnt = qMin(samplesCnt, skipSamples + fadeSamples - d->fullSamples); float64 coef = 1. / fadeSamples, fadedFrom = d->fullSamples - skipSamples; - short *ptr = (short*)srcSamplesData[0], *zeroEnd = ptr + qMin(samplesCnt, qMax(0, skipSamples - d->fullSamples)), *end = ptr + fadedCnt; + short *ptr = srcSamplesDataChannel, *zeroEnd = ptr + qMin(samplesCnt, qMax(0, skipSamples - d->fullSamples)), *end = ptr + fadedCnt; for (; ptr != zeroEnd; ++ptr, ++fadedFrom) { *ptr = 0; } @@ -2215,6 +2329,19 @@ void AudioCaptureInner::writeFrame(int32 offset, int32 framesize) { } } + d->waveform.reserve(d->waveform.size() + (samplesCnt / d->waveformEach) + 1); + for (short *ptr = srcSamplesDataChannel, *end = ptr + samplesCnt; ptr != end; ++ptr) { + uint16 value = qAbs(*ptr); + if (d->waveformPeak < value) { + d->waveformPeak = value; + } + if (++d->waveformMod == d->waveformEach) { + d->waveformMod -= d->waveformEach; + d->waveform.push_back(uchar(d->waveformPeak / 256)); + d->waveformPeak = 0; + } + } + // Convert to final format d->dstSamples = av_rescale_rnd(swr_get_delay(d->swrContext, d->codecContext->sample_rate) + d->srcSamples, d->codecContext->sample_rate, d->codecContext->sample_rate, AV_ROUND_UP); @@ -2269,66 +2396,26 @@ void AudioCaptureInner::writeFrame(int32 offset, int32 framesize) { av_frame_free(&frame); } -class FFMpegAttributesReader : public AudioPlayerLoader { +class FFMpegAttributesReader : public AbstractFFMpegLoader { public: - FFMpegAttributesReader(const FileLocation &file, const QByteArray &data) : AudioPlayerLoader(file, data), - ioBuffer(0), ioContext(0), fmtContext(0), codec(0), streamId(0), - _opened(false) { + FFMpegAttributesReader(const FileLocation &file, const QByteArray &data) : AbstractFFMpegLoader(file, data) { } bool open(qint64 position = 0) { - if (!AudioPlayerLoader::openFile()) { + if (!AbstractFFMpegLoader::openFile()) { return false; } - ioBuffer = (uchar*)av_malloc(AVBlockSize); - if (data.isEmpty()) { - ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, static_cast(this), &FFMpegAttributesReader::_read_file, 0, &FFMpegAttributesReader::_seek_file); - } else { - ioContext = avio_alloc_context(ioBuffer, AVBlockSize, 0, static_cast(this), &FFMpegAttributesReader::_read_data, 0, &FFMpegAttributesReader::_seek_data); - } - fmtContext = avformat_alloc_context(); - if (!fmtContext) { - DEBUG_LOG(("Audio Read Error: Unable to avformat_alloc_context for file '%1', data size '%2'").arg(fname).arg(data.size())); - return false; - } - fmtContext->pb = ioContext; - int res = 0; char err[AV_ERROR_MAX_STRING_SIZE] = { 0 }; - if ((res = avformat_open_input(&fmtContext, 0, 0, 0)) < 0) { - ioBuffer = 0; - - DEBUG_LOG(("Audio Read Error: Unable to avformat_open_input for file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); - return false; - } - _opened = true; - - if ((res = avformat_find_stream_info(fmtContext, 0)) < 0) { - DEBUG_LOG(("Audio Read Error: Unable to avformat_find_stream_info for file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(res).arg(av_make_error_string(err, sizeof(err), res))); - return false; - } - streamId = av_find_best_stream(fmtContext, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0); - if (streamId >= 0) { - DEBUG_LOG(("Audio Read Error: Found video stream in file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(streamId).arg(av_make_error_string(err, sizeof(err), streamId))); - return false; - } - - streamId = av_find_best_stream(fmtContext, AVMEDIA_TYPE_AUDIO, -1, -1, &codec, 0); - if (streamId < 0) { - DEBUG_LOG(("Audio Read Error: Unable to av_find_best_stream for file '%1', data size '%2', error %3, %4").arg(fname).arg(data.size()).arg(streamId).arg(av_make_error_string(err, sizeof(err), streamId))); + int videoStreamId = av_find_best_stream(fmtContext, AVMEDIA_TYPE_VIDEO, -1, -1, &codec, 0); + if (videoStreamId >= 0) { + DEBUG_LOG(("Audio Read Error: Found video stream in file '%1', data size '%2', error %3, %4").arg(file.name()).arg(data.size()).arg(videoStreamId).arg(av_make_error_string(err, sizeof(err), streamId))); return false; } - freq = fmtContext->streams[streamId]->codec->sample_rate; - if (fmtContext->streams[streamId]->duration == AV_NOPTS_VALUE) { - len = (fmtContext->duration * freq) / AV_TIME_BASE; - } else { - len = (fmtContext->streams[streamId]->duration * freq * fmtContext->streams[streamId]->time_base.num) / fmtContext->streams[streamId]->time_base.den; - } - for (int32 i = 0, l = fmtContext->nb_streams; i < l; ++i) { AVStream *stream = fmtContext->streams[i]; if (stream->disposition & AV_DISPOSITION_ATTACHED_PIC) { @@ -2370,14 +2457,6 @@ class FFMpegAttributesReader : public AudioPlayerLoader { //} } - int64 duration() { - return len; - } - - int32 frequency() { - return freq; - } - int32 format() { return 0; } @@ -2408,89 +2487,134 @@ class FFMpegAttributesReader : public AudioPlayerLoader { } ~FFMpegAttributesReader() { - if (ioContext) av_free(ioContext); - if (_opened) { - avformat_close_input(&fmtContext); - } else if (ioBuffer) { - av_free(ioBuffer); - } - if (fmtContext) avformat_free_context(fmtContext); } private: - QString fname, data; - - int32 freq; - int64 len; QString _title, _performer; QImage _cover; QByteArray _coverBytes, _coverFormat; - uchar *ioBuffer; - AVIOContext *ioContext; - AVFormatContext *fmtContext; - AVCodec *codec; - int32 streamId; +}; - bool _opened; +MTPDocumentAttribute audioReadSongAttributes(const QString &fname, const QByteArray &data, QImage &cover, QByteArray &coverBytes, QByteArray &coverFormat) { + FFMpegAttributesReader reader(FileLocation(StorageFilePartial, fname), data); + if (reader.open()) { + int32 duration = reader.duration() / reader.frequency(); + if (reader.duration() > 0) { + cover = reader.cover(); + coverBytes = reader.coverBytes(); + coverFormat = reader.coverFormat(); + return MTP_documentAttributeAudio(MTP_int(MTPDdocumentAttributeAudio::flag_title | MTPDdocumentAttributeAudio::flag_performer), MTP_int(duration), MTP_string(reader.title()), MTP_string(reader.performer()), MTPstring()); + } + } + return MTP_documentAttributeFilename(MTP_string(fname)); +} - static int _read_data(void *opaque, uint8_t *buf, int buf_size) { - FFMpegAttributesReader *l = reinterpret_cast(opaque); +class FFMpegWaveformCounter : public FFMpegLoader { +public: - int32 nbytes = qMin(l->data.size() - l->dataPos, int32(buf_size)); - if (nbytes <= 0) { - return 0; + FFMpegWaveformCounter(const FileLocation &file, const QByteArray &data) : FFMpegLoader(file, data) { + } + + bool open(qint64 position = 0) { + if (!FFMpegLoader::open(position)) { + return false; } - memcpy(buf, l->data.constData() + l->dataPos, nbytes); - l->dataPos += nbytes; - return nbytes; - } + QByteArray buffer; + buffer.reserve(AudioVoiceMsgBufferSize); + int64 countbytes = sampleSize * duration(), processed = 0, sumbytes = 0; + if (duration() < WaveformSamplesCount) { + return false; + } - static int64_t _seek_data(void *opaque, int64_t offset, int whence) { - FFMpegAttributesReader *l = reinterpret_cast(opaque); + QVector peaks; + peaks.reserve(WaveformSamplesCount); - int32 newPos = -1; - switch (whence) { - case SEEK_SET: newPos = offset; break; - case SEEK_CUR: newPos = l->dataPos + offset; break; - case SEEK_END: newPos = l->data.size() + offset; break; + int32 fmt = format(); + uint16 peak = 0; + while (processed < countbytes) { + buffer.resize(0); + + int64 samples = 0; + int res = readMore(buffer, samples); + if (res < 0) { + break; + } + if (buffer.isEmpty()) { + continue; + } + + const char *data = buffer.data(); + if (fmt == AL_FORMAT_MONO8 || fmt == AL_FORMAT_STEREO8) { + for (int32 i = 0, l = buffer.size(); i + sizeof(uchar) <= l;) { + uint16 sample = qAbs((int32(*(uchar*)(data + i)) - 128) * 256); + if (peak < sample) { + peak = sample; + } + + i += sizeof(uchar); + sumbytes += WaveformSamplesCount; + if (sumbytes >= countbytes) { + sumbytes -= countbytes; + peaks.push_back(peak); + peak = 0; + } + } + } else if (fmt == AL_FORMAT_MONO16 || fmt == AL_FORMAT_STEREO16) { + for (int32 i = 0, l = buffer.size(); i + sizeof(uint16) <= l;) { + uint16 sample = qAbs(int32(*(int16*)(data + i))); + if (peak < sample) { + peak = sample; + } + + i += sizeof(uint16); + sumbytes += sizeof(uint16) * WaveformSamplesCount; + if (sumbytes >= countbytes) { + sumbytes -= countbytes; + peaks.push_back(peak); + peak = 0; + } + } + } + processed += sampleSize * samples; } - if (newPos < 0 || newPos > l->data.size()) { - return -1; + if (sumbytes > 0 && peaks.size() < WaveformSamplesCount) { + peaks.push_back(peak); } - l->dataPos = newPos; - return l->dataPos; - } - static int _read_file(void *opaque, uint8_t *buf, int buf_size) { - FFMpegAttributesReader *l = reinterpret_cast(opaque); - return int(l->f.read((char*)(buf), buf_size)); - } + if (peaks.isEmpty()) { + return false; + } - static int64_t _seek_file(void *opaque, int64_t offset, int whence) { - FFMpegAttributesReader *l = reinterpret_cast(opaque); + int64 sum = std::accumulate(peaks.cbegin(), peaks.cend(), 0ULL); + peak = qMax(int32(sum * 1.8 / peaks.size()), 2500); - switch (whence) { - case SEEK_SET: return l->f.seek(offset) ? l->f.pos() : -1; - case SEEK_CUR: return l->f.seek(l->f.pos() + offset) ? l->f.pos() : -1; - case SEEK_END: return l->f.seek(l->f.size() + offset) ? l->f.pos() : -1; + result.resize(peaks.size()); + for (int32 i = 0, l = peaks.size(); i != l; ++i) { + result[i] = char(qMin(31U, uint32(qMin(peaks.at(i), peak)) * 31 / peak)); } - return -1; + + return true; + } + + const VoiceWaveform &waveform() const { + return result; } + + ~FFMpegWaveformCounter() { + } + +private: + VoiceWaveform result; + }; -MTPDocumentAttribute audioReadSongAttributes(const QString &fname, const QByteArray &data, QImage &cover, QByteArray &coverBytes, QByteArray &coverFormat) { - FFMpegAttributesReader reader(FileLocation(StorageFilePartial, fname), data); - if (reader.open()) { - int32 duration = reader.duration() / reader.frequency(); - if (reader.duration() > 0) { - cover = reader.cover(); - coverBytes = reader.coverBytes(); - coverFormat = reader.coverFormat(); - return MTP_documentAttributeAudio(MTP_int(duration), MTP_string(reader.title()), MTP_string(reader.performer())); - } +VoiceWaveform audioCountWaveform(const FileLocation &file, const QByteArray &data) { + FFMpegWaveformCounter counter(file, data); + if (counter.open()) { + return counter.waveform(); } - return MTP_documentAttributeFilename(MTP_string(fname)); + return VoiceWaveform(); } diff --git a/Telegram/SourceFiles/audio.h b/Telegram/SourceFiles/audio.h index e21c273f780b69..f9259906e918a5 100644 --- a/Telegram/SourceFiles/audio.h +++ b/Telegram/SourceFiles/audio.h @@ -56,7 +56,7 @@ class AudioPlayer : public QObject { void play(const AudioMsgId &audio, int64 position = 0); void play(const SongMsgId &song, int64 position = 0); void pauseresume(MediaOverviewType type, bool fast = false); - void seek(int64 position); // type == OverviewDocuments + void seek(int64 position); // type == OverviewFiles void stop(MediaOverviewType type); void stopAndClear(); @@ -201,8 +201,8 @@ class AudioCapture : public QObject { void captureOnStart(); void captureOnStop(bool needResult); - void onDone(QByteArray data, qint32 samples); - void onUpdate(qint16 level, qint32 samples); + void onDone(QByteArray data, VoiceWaveform waveform, qint32 samples); + void onUpdate(quint16 level, qint32 samples); void onError(); private: @@ -338,8 +338,8 @@ class AudioCaptureInner : public QObject { signals: void error(); - void update(qint16 level, qint32 samples); - void done(QByteArray data, qint32 samples); + void update(quint16 level, qint32 samples); + void done(QByteArray data, VoiceWaveform waveform, qint32 samples); public slots: @@ -360,3 +360,4 @@ public slots: }; MTPDocumentAttribute audioReadSongAttributes(const QString &fname, const QByteArray &data, QImage &cover, QByteArray &coverBytes, QByteArray &coverFormat); +VoiceWaveform audioCountWaveform(const FileLocation &file, const QByteArray &data); diff --git a/Telegram/SourceFiles/boxes/connectionbox.cpp b/Telegram/SourceFiles/boxes/connectionbox.cpp index a94fdd44db7366..27b2ce7ff40e8f 100644 --- a/Telegram/SourceFiles/boxes/connectionbox.cpp +++ b/Telegram/SourceFiles/boxes/connectionbox.cpp @@ -313,9 +313,11 @@ void AutoDownloadBox::onSave() { bool enabledGroups = ((cAutoDownloadAudio() & dbiadNoGroups) && !(autoDownloadAudio & dbiadNoGroups)); cSetAutoDownloadAudio(autoDownloadAudio); if (enabledPrivate || enabledGroups) { - const AudiosData &data(App::audiosData()); - for (AudiosData::const_iterator i = data.cbegin(), e = data.cend(); i != e; ++i) { - i.value()->automaticLoadSettingsChanged(); + const DocumentsData &data(App::documentsData()); + for (DocumentsData::const_iterator i = data.cbegin(), e = data.cend(); i != e; ++i) { + if (i.value()->voice()) { + i.value()->automaticLoadSettingsChanged(); + } } } changed = true; @@ -328,7 +330,9 @@ void AutoDownloadBox::onSave() { if (enabledPrivate || enabledGroups) { const DocumentsData &data(App::documentsData()); for (DocumentsData::const_iterator i = data.cbegin(), e = data.cend(); i != e; ++i) { - i.value()->automaticLoadSettingsChanged(); + if (i.value()->isAnimation()) { + i.value()->automaticLoadSettingsChanged(); + } } Notify::automaticLoadSettingsChangedGif(); } diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index f5797848c9d635..0878f1a6d70b7d 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -118,6 +118,8 @@ enum { AudioVoiceMsgInMemory = 2 * 1024 * 1024, // 2 Mb audio is hold in memory and auto loaded AudioPauseDeviceTimeout = 3000, // pause in 3 secs after playing is over + WaveformSamplesCount = 100, + StickerInMemory = 2 * 1024 * 1024, // 2 Mb stickers hold in memory, auto loaded and displayed inline StickerMaxSize = 2048, // 2048x2048 is a max image size for sticker diff --git a/Telegram/SourceFiles/fileuploader.cpp b/Telegram/SourceFiles/fileuploader.cpp index 607a2e91cc2e27..c93f8dbb6adb59 100644 --- a/Telegram/SourceFiles/fileuploader.cpp +++ b/Telegram/SourceFiles/fileuploader.cpp @@ -32,7 +32,7 @@ FileUploader::FileUploader() : sentSize(0) { void FileUploader::uploadMedia(const FullMsgId &msgId, const ReadyLocalMedia &media) { if (media.type == PreparePhoto) { App::feedPhoto(media.photo, media.photoThumbs); - } else if (media.type == PrepareDocument) { + } else if (media.type == PrepareDocument || media.type == PrepareAudio) { DocumentData *document; if (media.photoThumbs.isEmpty()) { document = App::feedDocument(media.document); @@ -40,13 +40,12 @@ void FileUploader::uploadMedia(const FullMsgId &msgId, const ReadyLocalMedia &me document = App::feedDocument(media.document, media.photoThumbs.begin().value()); } document->status = FileUploading; + if (!media.data.isEmpty()) { + document->setData(media.data); + } if (!media.file.isEmpty()) { document->setLocation(FileLocation(StorageFilePartial, media.file)); } - } else if (media.type == PrepareAudio) { - AudioData *audio = App::feedAudio(media.audio); - audio->status = FileUploading; - audio->setData(media.data); } queue.insert(msgId, File(media)); sendNext(); @@ -56,7 +55,7 @@ void FileUploader::upload(const FullMsgId &msgId, const FileLoadResultPtr &file) if (file->type == PreparePhoto) { PhotoData *photo = App::feedPhoto(file->photo, file->photoThumbs); photo->uploadingData = new PhotoData::UploadingData(file->partssize); - } else if (file->type == PrepareDocument) { + } else if (file->type == PrepareDocument || file->type == PrepareAudio) { DocumentData *document; if (file->thumb.isNull()) { document = App::feedDocument(file->document); @@ -64,13 +63,12 @@ void FileUploader::upload(const FullMsgId &msgId, const FileLoadResultPtr &file) document = App::feedDocument(file->document, file->thumb); } document->status = FileUploading; + if (!file->content.isEmpty()) { + document->setData(file->content); + } if (!file->filepath.isEmpty()) { document->setLocation(FileLocation(StorageFilePartial, file->filepath)); } - } else if (file->type == PrepareAudio) { - AudioData *audio = App::feedAudio(file->audio); - audio->status = FileUploading; - audio->setData(file->content); } queue.insert(msgId, File(file)); sendNext(); @@ -87,12 +85,6 @@ void FileUploader::currentFailed() { doc->status = FileUploadFailed; } emit documentFailed(j.key()); - } else if (j->type() == PrepareAudio) { - AudioData *audio = App::audio(j->id()); - if (audio->status == FileUploading) { - audio->status = FileUploadFailed; - } - emit audioFailed(j.key()); } queue.erase(j); } @@ -133,7 +125,7 @@ void FileUploader::sendNext() { if (!uploading.msg) { uploading = i.key(); } else if (i == queue.end()) { - i = queue.begin(); + i = queue.begin(); uploading = i.key(); } int todc = 0; @@ -150,7 +142,7 @@ void FileUploader::sendNext() { if (requestsSent.isEmpty() && docRequestsSent.isEmpty()) { if (i->type() == PreparePhoto) { emit photoReady(uploading, MTP_inputFile(MTP_long(i->id()), MTP_int(i->partsCount), MTP_string(i->filename()), MTP_string(i->file ? i->file->filemd5 : i->media.jpeg_md5))); - } else if (i->type() == PrepareDocument) { + } else if (i->type() == PrepareDocument || i->type() == PrepareAudio) { QByteArray docMd5(32, Qt::Uninitialized); hashMd5Hex(i->md5Hash.result(), docMd5.data()); @@ -160,12 +152,6 @@ void FileUploader::sendNext() { } else { emit documentReady(uploading, doc); } - } else if (i->type() == PrepareAudio) { - QByteArray audioMd5(32, Qt::Uninitialized); - hashMd5Hex(i->md5Hash.result(), audioMd5.data()); - - MTPInputFile audio = (i->docSize > UseBigFilesFrom) ? MTP_inputFileBig(MTP_long(i->id()), MTP_int(i->docPartsCount), MTP_string(i->filename())) : MTP_inputFile(MTP_long(i->id()), MTP_int(i->docPartsCount), MTP_string(i->filename()), MTP_string(audioMd5)); - emit audioReady(uploading, audio); } queue.remove(uploading); uploading = FullMsgId(); @@ -212,7 +198,7 @@ void FileUploader::sendNext() { i->docSentParts++; } else { UploadFileParts::iterator part = parts.begin(); - + mtpRequestId requestId = MTP::send(MTPupload_SaveFilePart(MTP_long(partsOfId), MTP_int(part.key()), MTP_string(part.value())), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl[todc]); requestsSent.insert(requestId, part.value()); dcMap.insert(requestId, todc); @@ -303,7 +289,7 @@ void FileUploader::partLoaded(const MTPBool &result, mtpRequestId requestId) { photo->uploadingData->offset = k->fileSentSize; } emit photoProgress(k.key()); - } else if (k->type() == PrepareDocument) { + } else if (k->type() == PrepareDocument || k->type() == PrepareAudio) { DocumentData *doc = App::document(k->id()); if (doc->uploading()) { doc->uploadOffset = (k->docSentParts - docRequestsSent.size()) * k->docPartSize; @@ -312,15 +298,6 @@ void FileUploader::partLoaded(const MTPBool &result, mtpRequestId requestId) { } } emit documentProgress(k.key()); - } else if (k->type() == PrepareAudio) { - AudioData *audio = App::audio(k->id()); - if (audio->uploading()) { - audio->uploadOffset = (k->docSentParts - docRequestsSent.size()) * k->docPartSize; - if (audio->uploadOffset > audio->size) { - audio->uploadOffset = audio->size; - } - } - emit audioProgress(k.key()); } } } diff --git a/Telegram/SourceFiles/fileuploader.h b/Telegram/SourceFiles/fileuploader.h index 895e7c677abf80..8e038fd9d12692 100644 --- a/Telegram/SourceFiles/fileuploader.h +++ b/Telegram/SourceFiles/fileuploader.h @@ -51,15 +51,12 @@ public slots: void photoReady(const FullMsgId &msgId, const MTPInputFile &file); void documentReady(const FullMsgId &msgId, const MTPInputFile &file); void thumbDocumentReady(const FullMsgId &msgId, const MTPInputFile &file, const MTPInputFile &thumb); - void audioReady(const FullMsgId &msgId, const MTPInputFile &file); void photoProgress(const FullMsgId &msgId); void documentProgress(const FullMsgId &msgId); - void audioProgress(const FullMsgId &msgId); void photoFailed(const FullMsgId &msgId); void documentFailed(const FullMsgId &msgId); - void audioFailed(const FullMsgId &msgId); private: @@ -138,7 +135,7 @@ public slots: QMap dcMap; uint32 sentSize; uint32 sentSizes[MTPUploadSessionsCount]; - + FullMsgId uploading, _paused; Queue queue; Queue uploaded; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 869ad41142af19..1fec50eeebd5ed 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -352,8 +352,8 @@ bool History::updateTyping(uint64 ms, bool force) { switch (sendActions.begin().value().type) { case SendActionRecordVideo: newTypingStr = peer->isUser() ? lang(lng_send_action_record_video) : lng_user_action_record_video(lt_user, sendActions.begin().key()->firstName); break; case SendActionUploadVideo: newTypingStr = peer->isUser() ? lang(lng_send_action_upload_video) : lng_user_action_upload_video(lt_user, sendActions.begin().key()->firstName); break; - case SendActionRecordAudio: newTypingStr = peer->isUser() ? lang(lng_send_action_record_audio) : lng_user_action_record_audio(lt_user, sendActions.begin().key()->firstName); break; - case SendActionUploadAudio: newTypingStr = peer->isUser() ? lang(lng_send_action_upload_audio) : lng_user_action_upload_audio(lt_user, sendActions.begin().key()->firstName); break; + case SendActionRecordVoice: newTypingStr = peer->isUser() ? lang(lng_send_action_record_audio) : lng_user_action_record_audio(lt_user, sendActions.begin().key()->firstName); break; + case SendActionUploadVoice: newTypingStr = peer->isUser() ? lang(lng_send_action_upload_audio) : lng_user_action_upload_audio(lt_user, sendActions.begin().key()->firstName); break; case SendActionUploadPhoto: newTypingStr = peer->isUser() ? lang(lng_send_action_upload_photo) : lng_user_action_upload_photo(lt_user, sendActions.begin().key()->firstName); break; case SendActionUploadFile: newTypingStr = peer->isUser() ? lang(lng_send_action_upload_file) : lng_user_action_upload_file(lt_user, sendActions.begin().key()->firstName); break; case SendActionChooseLocation: newTypingStr = peer->isUser() ? lang(lng_send_action_geo_location) : lng_user_action_geo_location(lt_user, sendActions.begin().key()->firstName); break; @@ -1249,8 +1249,8 @@ void Histories::regSendAction(History *history, UserData *user, const MTPSendMes case mtpc_sendMessageTypingAction: history->typing[user] = ms + 6000; break; case mtpc_sendMessageRecordVideoAction: history->sendActions.insert(user, SendAction(SendActionRecordVideo, ms + 6000)); break; case mtpc_sendMessageUploadVideoAction: history->sendActions.insert(user, SendAction(SendActionUploadVideo, ms + 6000, action.c_sendMessageUploadVideoAction().vprogress.v)); break; - case mtpc_sendMessageRecordAudioAction: history->sendActions.insert(user, SendAction(SendActionRecordAudio, ms + 6000)); break; - case mtpc_sendMessageUploadAudioAction: history->sendActions.insert(user, SendAction(SendActionUploadAudio, ms + 6000, action.c_sendMessageUploadAudioAction().vprogress.v)); break; + case mtpc_sendMessageRecordAudioAction: history->sendActions.insert(user, SendAction(SendActionRecordVoice, ms + 6000)); break; + case mtpc_sendMessageUploadAudioAction: history->sendActions.insert(user, SendAction(SendActionUploadVoice, ms + 6000, action.c_sendMessageUploadAudioAction().vprogress.v)); break; case mtpc_sendMessageUploadPhotoAction: history->sendActions.insert(user, SendAction(SendActionUploadPhoto, ms + 6000, action.c_sendMessageUploadPhotoAction().vprogress.v)); break; case mtpc_sendMessageUploadDocumentAction: history->sendActions.insert(user, SendAction(SendActionUploadFile, ms + 6000, action.c_sendMessageUploadDocumentAction().vprogress.v)); break; case mtpc_sendMessageGeoLocationAction: history->sendActions.insert(user, SendAction(SendActionChooseLocation, ms + 6000)); break; @@ -1369,13 +1369,6 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo default: badMedia = 1; break; } break; - case mtpc_messageMediaAudio: - switch (m.vmedia.c_messageMediaAudio().vaudio.type()) { - case mtpc_audio: break; - case mtpc_audioEmpty: badMedia = 2; break; - default: badMedia = 1; break; - } - break; case mtpc_messageMediaDocument: switch (m.vmedia.c_messageMediaDocument().vdocument.type()) { case mtpc_document: break; @@ -3060,18 +3053,14 @@ namespace { return result; } - int32 audioMaxStatusWidth(AudioData *audio) { - int32 result = st::normalFont->width(formatDownloadText(audio->size, audio->size)); - result = qMax(result, st::normalFont->width(formatPlayedText(audio->duration, audio->duration))); - result = qMax(result, st::normalFont->width(formatDurationAndSizeText(audio->duration, audio->size))); - return result; - } - int32 documentMaxStatusWidth(DocumentData *document) { int32 result = st::normalFont->width(formatDownloadText(document->size, document->size)); if (SongData *song = document->song()) { result = qMax(result, st::normalFont->width(formatPlayedText(song->duration, song->duration))); result = qMax(result, st::normalFont->width(formatDurationAndSizeText(song->duration, document->size))); + } else if (VoiceData *voice = document->voice()) { + result = qMax(result, st::normalFont->width(formatPlayedText(voice->duration, voice->duration))); + result = qMax(result, st::normalFont->width(formatDurationAndSizeText(voice->duration, document->size))); } else { result = qMax(result, st::normalFont->width(formatSizeText(document->size))); } @@ -3785,291 +3774,151 @@ ImagePtr HistoryVideo::replyPreview() { return _data->replyPreview; } -HistoryAudio::HistoryAudio(const MTPDaudio &audio) : HistoryFileMedia() -, _data(App::feedAudio(audio)) { - setLinks(new AudioOpenLink(_data), new AudioOpenLink(_data), new AudioCancelLink(_data)); - - setStatusSize(FileStatusSizeReady); -} - -HistoryAudio::HistoryAudio(const HistoryAudio &other) : HistoryFileMedia() -, _data(other._data) { - setLinks(new AudioOpenLink(_data), new AudioOpenLink(_data), new AudioCancelLink(_data)); - - setStatusSize(other._statusSize); +HistoryDocumentVoicePlayback::HistoryDocumentVoicePlayback(const HistoryDocument *that) +: _position(0) +, a_progress(0., 0.) +, _a_progress(animation(const_cast(that), &HistoryDocument::step_voiceProgress)) { } -void HistoryAudio::initDimensions(const HistoryItem *parent) { - _maxw = st::msgFileMinWidth; - - int32 tleft = 0, tright = 0; - - tleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); - tright = st::msgFileThumbPadding.left(); - _maxw = qMax(_maxw, tleft + audioMaxStatusWidth(_data) + int(st::mediaUnreadSkip + st::mediaUnreadSize) + parent->skipBlockWidth() + st::msgPadding.right()); - - _maxw = qMax(tleft + st::semiboldFont->width(lang(lng_media_audio)) + tright, _maxw); - _maxw = qMin(_maxw, int(st::msgMaxWidth)); - - _height = _minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom(); +void HistoryDocumentVoice::ensurePlayback(const HistoryDocument *that) const { + if (!_playback) { + _playback = new HistoryDocumentVoicePlayback(that); + } } -void HistoryAudio::draw(Painter &p, const HistoryItem *parent, const QRect &r, bool selected, uint64 ms) const { - if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; - - _data->automaticLoad(parent); - bool loaded = _data->loaded(), displayLoading = _data->displayLoading(); - - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; - - if (displayLoading) { - ensureAnimation(parent); - if (!_animation->radial.animating()) { - _animation->radial.start(_data->progress()); - } +void HistoryDocumentVoice::checkPlaybackFinished() const { + if (_playback && !_playback->_a_progress.animating()) { + delete _playback; + _playback = 0; } - bool showPause = updateStatusText(parent); - bool radial = isRadialAnimation(ms); - - int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0; - - nameleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); - nametop = st::msgFileNameTop; - nameright = st::msgFilePadding.left(); - statustop = st::msgFileStatusTop; +} - QRect inner(rtlrect(st::msgFilePadding.left(), st::msgFilePadding.top(), st::msgFileSize, st::msgFileSize, _width)); - p.setPen(Qt::NoPen); - if (selected) { - p.setBrush(outbg ? st::msgFileOutBgSelected : st::msgFileInBgSelected); - } else if (isThumbAnimation(ms)) { - float64 over = _animation->a_thumbOver.current(); - p.setBrush(style::interpolate(outbg ? st::msgFileOutBg : st::msgFileInBg, outbg ? st::msgFileOutBgOver : st::msgFileInBgOver, over)); - } else { - bool over = textlnkDrawOver(_data->loading() ? _cancell : _savel); - p.setBrush(outbg ? (over ? st::msgFileOutBgOver : st::msgFileOutBg) : (over ? st::msgFileInBgOver : st::msgFileInBg)); +HistoryDocument::HistoryDocument(DocumentData *document, const QString &caption, const HistoryItem *parent) : HistoryFileMedia() +, _parent(0) +, _data(document) { + create(!caption.isEmpty()); + if (HistoryDocumentNamed *named = Get()) { + named->_name = documentName(_data); + named->_namew = st::semiboldFont->width(named->_name); } - p.setRenderHint(QPainter::HighQualityAntialiasing); - p.drawEllipse(inner); - p.setRenderHint(QPainter::HighQualityAntialiasing, false); + setLinks(new DocumentOpenLink(_data), _data->voice() ? (ITextLink*)(new VoiceSaveLink(_data)) : new DocumentSaveLink(_data), new DocumentCancelLink(_data)); - if (radial) { - QRect rinner(inner.marginsRemoved(QMargins(st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine, st::msgFileRadialLine))); - style::color bg(outbg ? (selected ? st::msgOutBgSelected : st::msgOutBg) : (selected ? st::msgInBgSelected : st::msgInBg)); - _animation->radial.draw(p, rinner, st::msgFileRadialLine, bg); - } + setStatusSize(FileStatusSizeReady); - style::sprite icon; - if (showPause) { - icon = outbg ? (selected ? st::msgFileOutPauseSelected : st::msgFileOutPause) : (selected ? st::msgFileInPauseSelected : st::msgFileInPause); - } else if (radial || _data->loading()) { - icon = outbg ? (selected ? st::msgFileOutCancelSelected : st::msgFileOutCancel) : (selected ? st::msgFileInCancelSelected : st::msgFileInCancel); - } else if (loaded) { - icon = outbg ? (selected ? st::msgFileOutPlaySelected : st::msgFileOutPlay) : (selected ? st::msgFileInPlaySelected : st::msgFileInPlay); - } else { - icon = outbg ? (selected ? st::msgFileOutDownloadSelected : st::msgFileOutDownload) : (selected ? st::msgFileInDownloadSelected : st::msgFileInDownload); + if (HistoryDocumentCaptioned *captioned = Get()) { + captioned->_caption.setText(st::msgFont, caption + parent->skipBlock(), itemTextNoMonoOptions(parent)); } - p.drawSpriteCenter(inner, icon); - - int32 namewidth = _width - nameleft - nameright; - - p.setFont(st::semiboldFont); - p.setPen(st::black); - p.drawTextLeft(nameleft, nametop, _width, lang(lng_media_audio)); - - style::color status(outbg ? (selected ? st::mediaOutFgSelected : st::mediaOutFg) : (selected ? st::mediaInFgSelected : st::mediaInFg)); - p.setFont(st::normalFont); - p.setPen(status); - p.drawTextLeft(nameleft, statustop, _width, _statusText); - - if (parent->isMediaUnread()) { - int32 w = st::normalFont->width(_statusText); - if (w + st::mediaUnreadSkip + st::mediaUnreadSize <= namewidth) { - p.setPen(Qt::NoPen); - p.setBrush(outbg ? (selected ? st::msgFileOutBgSelected : st::msgFileOutBg) : (selected ? st::msgFileInBgSelected : st::msgFileInBg)); +} - p.setRenderHint(QPainter::HighQualityAntialiasing, true); - p.drawEllipse(rtlrect(nameleft + w + st::mediaUnreadSkip, statustop + st::mediaUnreadTop, st::mediaUnreadSize, st::mediaUnreadSize, _width)); - p.setRenderHint(QPainter::HighQualityAntialiasing, false); +HistoryDocument::HistoryDocument(const HistoryDocument &other) : HistoryFileMedia() +, _parent(0) +, _data(other._data) { + const HistoryDocumentCaptioned *captioned = other.Get(); + create(captioned != 0); + if (HistoryDocumentNamed *named = Get()) { + if (const HistoryDocumentNamed *oin = other.Get()) { + named->_name = oin->_name; + named->_namew = oin->_namew; + } else { + named->_name = documentName(_data); + named->_namew = st::semiboldFont->width(named->_name); } } -} -void HistoryAudio::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { - if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; + setLinks(new DocumentOpenLink(_data), _data->voice() ? (ITextLink*)(new VoiceSaveLink(_data)) : new DocumentSaveLink(_data), new DocumentCancelLink(_data)); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; - bool loaded = _data->loaded(); - - bool showPause = updateStatusText(parent); - - int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0; - - QRect inner(rtlrect(st::msgFilePadding.left(), st::msgFilePadding.top(), st::msgFileSize, st::msgFileSize, _width)); - if ((_data->loading() || _data->status == FileUploading || !loaded) && inner.contains(x, y)) { - lnk = (_data->loading() || _data->status == FileUploading) ? _cancell : _savel; - return; - } + setStatusSize(other._statusSize); - if (x >= 0 && y >= 0 && x < _width && y < _height && _data->access && !_data->loading()) { - lnk = _openl; - return; + if (captioned) { + Get()->_caption = captioned->_caption; } } -const QString HistoryAudio::inDialogsText() const { - return lang(lng_in_dlg_audio); -} - -const QString HistoryAudio::inHistoryText() const { - return qsl("[ ") + lang(lng_in_dlg_audio) + qsl(" ]"); -} - -void HistoryAudio::regItem(HistoryItem *item) { - App::regAudioItem(_data, item); -} - -void HistoryAudio::unregItem(HistoryItem *item) { - App::unregAudioItem(_data, item); -} - -void HistoryAudio::updateFrom(const MTPMessageMedia &media, HistoryItem *parent) { - if (media.type() == mtpc_messageMediaAudio) { - App::feedAudio(media.c_messageMediaAudio().vaudio, _data); - if (!_data->data().isEmpty()) { - Local::writeAudio(mediaKey(AudioFileLocation, _data->dc, _data->id), _data->data()); +void HistoryDocument::create(bool caption) { + uint64 mask; + if (_data->voice()) { + mask = HistoryDocumentVoice::Bit(); + } else { + mask = HistoryDocumentNamed::Bit(); + if (caption) { + mask |= HistoryDocumentCaptioned::Bit(); } - } -} - -void HistoryAudio::setStatusSize(int32 newSize, qint64 realDuration) const { - HistoryFileMedia::setStatusSize(newSize, _data->size, _data->duration, realDuration); -} - -bool HistoryAudio::updateStatusText(const HistoryItem *parent) const { - bool showPause = false; - int32 statusSize = 0, realDuration = 0; - if (_data->status == FileDownloadFailed || _data->status == FileUploadFailed) { - statusSize = FileStatusSizeFailed; - } else if (_data->status == FileUploading) { - statusSize = _data->uploadOffset; - } else if (_data->loading()) { - statusSize = _data->loadOffset(); - } else if (_data->loaded()) { - AudioMsgId playing; - AudioPlayerState playingState = AudioPlayerStopped; - int64 playingPosition = 0, playingDuration = 0; - int32 playingFrequency = 0; - if (audioPlayer()) { - audioPlayer()->currentState(&playing, &playingState, &playingPosition, &playingDuration, &playingFrequency); - } - - if (playing.msgId == parent->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { - statusSize = -1 - (playingPosition / (playingFrequency ? playingFrequency : AudioVoiceMsgFrequency)); - realDuration = playingDuration / (playingFrequency ? playingFrequency : AudioVoiceMsgFrequency); - showPause = (playingState == AudioPlayerPlaying || playingState == AudioPlayerResuming || playingState == AudioPlayerStarting); - } else { - statusSize = FileStatusSizeLoaded; + if (!_data->song() && !_data->thumb->isNull() && _data->thumb->width() && _data->thumb->height()) { + mask |= HistoryDocumentThumbed::Bit(); } - } else { - statusSize = FileStatusSizeReady; - } - if (statusSize != _statusSize) { - setStatusSize(statusSize, realDuration); } - return showPause; -} - -HistoryDocument::HistoryDocument(DocumentData *document, const QString &caption, const HistoryItem *parent) : HistoryFileMedia() -, _data(document) -, _linksavel(new DocumentSaveLink(_data)) -, _linkcancell(new DocumentCancelLink(_data)) -, _name(documentName(_data)) -, _namew(st::semiboldFont->width(_name)) -, _caption(st::msgFileMinWidth - st::msgPadding.left() - st::msgPadding.right()) { - setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); - - setStatusSize(FileStatusSizeReady); - - if (!caption.isEmpty()) { - _caption.setText(st::msgFont, caption + parent->skipBlock(), itemTextNoMonoOptions(parent)); + UpdateInterfaces(mask); + if (HistoryDocumentThumbed *thumbed = Get()) { + thumbed->_linksavel.reset(new DocumentSaveLink(_data)); + thumbed->_linkcancell.reset(new DocumentCancelLink(_data)); } } -HistoryDocument::HistoryDocument(const HistoryDocument &other) : HistoryFileMedia() -, _data(other._data) -, _linksavel(new DocumentSaveLink(_data)) -, _linkcancell(new DocumentCancelLink(_data)) -, _name(other._name) -, _namew(other._namew) -, _thumbw(other._thumbw) -, _caption(other._caption) { - setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); - - setStatusSize(other._statusSize); -} - void HistoryDocument::initDimensions(const HistoryItem *parent) { - if (_caption.hasSkipBlock()) { - _caption.setSkipBlock(parent->skipBlockWidth(), parent->skipBlockHeight()); + _parent = parent; + + HistoryDocumentCaptioned *captioned = Get(); + if (captioned && captioned->_caption.hasSkipBlock()) { + captioned->_caption.setSkipBlock(parent->skipBlockWidth(), parent->skipBlockHeight()); } - if (withThumb()) { + HistoryDocumentThumbed *thumbed = Get(); + if (thumbed) { _data->thumb->load(); int32 tw = _data->thumb->width(), th = _data->thumb->height(); if (tw > th) { - _thumbw = (tw * st::msgFileThumbSize) / th; + thumbed->_thumbw = (tw * st::msgFileThumbSize) / th; } else { - _thumbw = st::msgFileThumbSize; + thumbed->_thumbw = st::msgFileThumbSize; } - } else { - _thumbw = 0; } _maxw = st::msgFileMinWidth; int32 tleft = 0, tright = 0; - bool wthumb = withThumb(); - if (wthumb) { + if (thumbed) { tleft = st::msgFileThumbPadding.left() + st::msgFileThumbSize + st::msgFileThumbPadding.right(); tright = st::msgFileThumbPadding.left(); _maxw = qMax(_maxw, tleft + documentMaxStatusWidth(_data) + tright); } else { tleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); tright = st::msgFileThumbPadding.left(); - _maxw = qMax(_maxw, tleft + documentMaxStatusWidth(_data) + parent->skipBlockWidth() + st::msgPadding.right()); + int32 unread = _data->voice() ? (st::mediaUnreadSkip + st::mediaUnreadSize) : 0; + _maxw = qMax(_maxw, tleft + documentMaxStatusWidth(_data) + unread + parent->skipBlockWidth() + st::msgPadding.right()); } - _maxw = qMax(tleft + _namew + tright, _maxw); - _maxw = qMin(_maxw, int(st::msgMaxWidth)); + if (HistoryDocumentNamed *named = Get()) { + _maxw = qMax(tleft + named->_namew + tright, _maxw); + _maxw = qMin(_maxw, int(st::msgMaxWidth)); + } - if (wthumb) { + if (thumbed) { _minh = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom(); } else { _minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom(); } - if (_caption.isEmpty()) { - _height = _minh; + if (captioned) { + _minh += captioned->_caption.countHeight(_maxw - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); } else { - _minh += _caption.countHeight(_maxw - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); + _height = _minh; } } int32 HistoryDocument::resize(int32 width, const HistoryItem *parent) { - if (_caption.isEmpty()) { + HistoryDocumentCaptioned *captioned = Get(); + if (!captioned) { return HistoryFileMedia::resize(width, parent); } _width = qMin(width, _maxw); - bool wthumb = withThumb(); - if (wthumb) { + if (Get()) { _height = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom(); } else { _height = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom(); } - _height += _caption.countHeight(_width - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); + _height += captioned->_caption.countHeight(_width - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); return _height; } @@ -4094,8 +3943,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r bool radial = isRadialAnimation(ms); int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0, bottom = 0; - bool wthumb = withThumb(); - if (wthumb) { + if (const HistoryDocumentThumbed *thumbed = Get()) { nameleft = st::msgFileThumbPadding.left() + st::msgFileThumbSize + st::msgFileThumbPadding.right(); nametop = st::msgFileThumbNameTop; nameright = st::msgFileThumbPadding.left(); @@ -4104,7 +3952,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r bottom = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom(); QRect rthumb(rtlrect(st::msgFileThumbPadding.left(), st::msgFileThumbPadding.top(), st::msgFileThumbSize, st::msgFileThumbSize, _width)); - QPixmap thumb = loaded ? _data->thumb->pixSingle(_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize) : _data->thumb->pixBlurredSingle(_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize); + QPixmap thumb = loaded ? _data->thumb->pixSingle(thumbed->_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize) : _data->thumb->pixBlurredSingle(thumbed->_thumbw, 0, st::msgFileThumbSize, st::msgFileThumbSize); p.drawPixmap(rthumb.topLeft(), thumb); if (selected) { App::roundRect(p, rthumb, textstyleCurrent()->selectOverlay, SelectedOverlayCorners); @@ -4148,11 +3996,11 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r } if (_data->status != FileUploadFailed) { - const TextLinkPtr &lnk((_data->loading() || _data->status == FileUploading) ? _linkcancell : _linksavel); + const TextLinkPtr &lnk((_data->loading() || _data->status == FileUploading) ? thumbed->_linkcancell : thumbed->_linksavel); bool over = textlnkDrawOver(lnk); p.setFont(over ? st::semiboldFont->underline() : st::semiboldFont); p.setPen(outbg ? (selected ? st::msgFileThumbLinkOutFgSelected : st::msgFileThumbLinkOutFg) : (selected ? st::msgFileThumbLinkInFgSelected : st::msgFileThumbLinkInFg)); - p.drawTextLeft(nameleft, linktop, _width, _link, _linkw); + p.drawTextLeft(nameleft, linktop, _width, thumbed->_link, thumbed->_linkw); } } else { nameleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); @@ -4189,7 +4037,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r } else if (radial || _data->loading()) { icon = outbg ? (selected ? st::msgFileOutCancelSelected : st::msgFileOutCancel) : (selected ? st::msgFileInCancelSelected : st::msgFileInCancel); } else if (loaded) { - if (_data->song()) { + if (_data->song() || _data->voice()) { icon = outbg ? (selected ? st::msgFileOutPlaySelected : st::msgFileOutPlay) : (selected ? st::msgFileInPlaySelected : st::msgFileInPlay); } else if (_data->isImage()) { icon = outbg ? (selected ? st::msgFileOutImageSelected : st::msgFileOutImage) : (selected ? st::msgFileInImageSelected : st::msgFileInImage); @@ -4203,12 +4051,70 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r } int32 namewidth = _width - nameleft - nameright; - p.setFont(st::semiboldFont); - p.setPen(st::black); - if (namewidth < _namew) { - p.drawTextLeft(nameleft, nametop, _width, st::semiboldFont->elided(_name, namewidth)); - } else { - p.drawTextLeft(nameleft, nametop, _width, _name, _namew); + if (const HistoryDocumentVoice *voice = Get()) { + const VoiceWaveform *wf = 0; + uchar norm_value = 0; + if (_data->voice()) { + wf = &_data->voice()->waveform; + if (wf->isEmpty()) { + wf = 0; + if (loaded) { + Local::countVoiceWaveform(_data); + } + } else if (wf->at(0) < 0) { + wf = 0; + } else { + norm_value = _data->voice()->wavemax; + } + } + float64 prg = voice->_playback ? voice->_playback->a_progress.current() : 0; + + // rescale waveform by going in waveform.size * bar_count 1D grid + style::color active(outbg ? st::msgWaveformOutActive : st::msgWaveformInActive); + style::color inactive(outbg ? st::msgWaveformOutInactive : st::msgWaveformInInactive); + int32 wf_size = wf ? wf->size() : WaveformSamplesCount, availw = int32(namewidth + st::msgWaveformSkip), activew = qRound(availw * prg); + int32 bar_count = qMin(availw / int32(st::msgWaveformBar + st::msgWaveformSkip), wf_size); + uchar max_value = 0; + int32 max_delta = st::msgWaveformMax - st::msgWaveformMin, bottom = st::msgFilePadding.top() + st::msgWaveformMax; + p.setPen(Qt::NoPen); + for (uint32 i = 0, bar_x = 0, sum_i = 0; i < wf_size; ++i) { + uchar value = wf ? wf->at(i) : 0; + if (sum_i + bar_count >= wf_size) { // draw bar + sum_i = sum_i + bar_count - wf_size; + if (sum_i < (bar_count + 1) / 2) { + if (max_value < value) max_value = value; + } + int32 bar_value = ((max_value * max_delta) + ((norm_value + 1) / 2)) / (norm_value + 1); + + if (bar_x >= activew) { + p.fillRect(nameleft + bar_x, bottom - bar_value, st::msgWaveformBar, st::msgWaveformMin + bar_value, inactive); + } else if (bar_x + st::msgWaveformBar <= activew) { + p.fillRect(nameleft + bar_x, bottom - bar_value, st::msgWaveformBar, st::msgWaveformMin + bar_value, active); + } else { + p.fillRect(nameleft + bar_x, bottom - bar_value, activew - bar_x, st::msgWaveformMin + bar_value, active); + p.fillRect(nameleft + activew, bottom - bar_value, st::msgWaveformBar - (activew - bar_x), st::msgWaveformMin + bar_value, inactive); + } + bar_x += st::msgWaveformBar + st::msgWaveformSkip; + + if (sum_i < (bar_count + 1) / 2) { + max_value = 0; + } else { + max_value = value; + } + } else { + if (max_value < value) max_value = value; + + sum_i += bar_count; + } + } + } else if (const HistoryDocumentNamed *named = Get()) { + p.setFont(st::semiboldFont); + p.setPen(st::black); + if (namewidth < named->_namew) { + p.drawTextLeft(nameleft, nametop, _width, st::semiboldFont->elided(named->_name, namewidth)); + } else { + p.drawTextLeft(nameleft, nametop, _width, named->_name, named->_namew); + } } style::color status(outbg ? (selected ? st::mediaOutFgSelected : st::mediaOutFg) : (selected ? st::mediaInFgSelected : st::mediaInFg)); @@ -4216,9 +4122,21 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r p.setPen(status); p.drawTextLeft(nameleft, statustop, _width, _statusText); - if (!_caption.isEmpty()) { + if (parent->isMediaUnread()) { + int32 w = st::normalFont->width(_statusText); + if (w + st::mediaUnreadSkip + st::mediaUnreadSize <= namewidth) { + p.setPen(Qt::NoPen); + p.setBrush(outbg ? (selected ? st::msgFileOutBgSelected : st::msgFileOutBg) : (selected ? st::msgFileInBgSelected : st::msgFileInBg)); + + p.setRenderHint(QPainter::HighQualityAntialiasing, true); + p.drawEllipse(rtlrect(nameleft + w + st::mediaUnreadSkip, statustop + st::mediaUnreadTop, st::mediaUnreadSize, st::mediaUnreadSize, _width)); + p.setRenderHint(QPainter::HighQualityAntialiasing, false); + } + } + + if (const HistoryDocumentCaptioned *captioned = Get()) { p.setPen(st::black); - _caption.draw(p, st::msgPadding.left(), bottom, captionw); + captioned->_caption.draw(p, st::msgPadding.left(), bottom, captionw); } } @@ -4231,8 +4149,7 @@ void HistoryDocument::getState(TextLinkPtr &lnk, HistoryCursorState &state, int3 bool showPause = updateStatusText(parent); int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0, bottom = 0; - bool wthumb = withThumb(); - if (wthumb) { + if (const HistoryDocumentThumbed *thumbed = Get()) { nameleft = st::msgFileThumbPadding.left() + st::msgFileThumbSize + st::msgFileThumbPadding.right(); linktop = st::msgFileThumbLinkTop; bottom = st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom(); @@ -4245,8 +4162,8 @@ void HistoryDocument::getState(TextLinkPtr &lnk, HistoryCursorState &state, int3 } if (_data->status != FileUploadFailed) { - if (rtlrect(nameleft, linktop, _linkw, st::semiboldFont->height, _width).contains(x, y)) { - lnk = (_data->loading() || _data->uploading()) ? _linkcancell : _linksavel; + if (rtlrect(nameleft, linktop, thumbed->_linkw, st::semiboldFont->height, _width).contains(x, y)) { + lnk = (_data->loading() || _data->uploading()) ? thumbed->_linkcancell : thumbed->_linksavel; return; } } @@ -4261,14 +4178,14 @@ void HistoryDocument::getState(TextLinkPtr &lnk, HistoryCursorState &state, int3 } int32 height = _height; - if (!_caption.isEmpty()) { + if (const HistoryDocumentCaptioned *captioned = Get()) { if (y >= bottom) { bool inText = false; - _caption.getState(lnk, inText, x - st::msgPadding.left(), y - bottom, _width - st::msgPadding.left() - st::msgPadding.right()); + captioned->_caption.getState(lnk, inText, x - st::msgPadding.left(), y - bottom, _width - st::msgPadding.left() - st::msgPadding.right()); state = inText ? HistoryInTextCursorState : HistoryDefaultCursorState; return; } - height -= _caption.countHeight(_width - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); + height -= captioned->_caption.countHeight(_width - st::msgPadding.left() - st::msgPadding.right()) + st::msgPadding.bottom(); } if (x >= 0 && y >= 0 && x < _width && y < height && !_data->loading() && !_data->uploading() && _data->access) { lnk = _openl; @@ -4277,28 +4194,53 @@ void HistoryDocument::getState(TextLinkPtr &lnk, HistoryCursorState &state, int3 } const QString HistoryDocument::inDialogsText() const { - return (_name.isEmpty() ? lang(lng_in_dlg_file) : _name) + (_caption.isEmpty() ? QString() : (' ' + _caption.original(0, 0xFFFF, Text::ExpandLinksNone))); + QString result; + if (Get()) { + result = lang(lng_in_dlg_audio); + } else { + const HistoryDocumentNamed *named = Get(); + result = (!named || named->_name.isEmpty()) ? lang(lng_in_dlg_file) : named->_name; + } + if (const HistoryDocumentCaptioned *captioned = Get()) { + if (!captioned->_caption.isEmpty()) { + result.append(' ').append(captioned->_caption.original(0, 0xFFFF, Text::ExpandLinksNone)); + } + } + return result; } const QString HistoryDocument::inHistoryText() const { - return qsl("[ ") + lang(lng_in_dlg_file) + (_name.isEmpty() ? QString() : (qsl(" : ") + _name)) + (_caption.isEmpty() ? QString() : (qsl(", ") + _caption.original(0, 0xFFFF, Text::ExpandLinksAll))) + qsl(" ]"); + QString result = qsl("[ ") + lang(Get() ? lng_in_dlg_audio : lng_in_dlg_file); + if (const HistoryDocumentNamed *named = Get()) { + if (!named->_name.isEmpty()) { + result.append(qsl(" : ")).append(named->_name); + } + } + if (const HistoryDocumentCaptioned *captioned = Get()) { + if (!captioned->_caption.isEmpty()) { + result.append(qsl(", ")).append(captioned->_caption.original(0, 0xFFFF, Text::ExpandLinksAll)); + } + } + return result.append(qsl(" ]")); } void HistoryDocument::setStatusSize(int32 newSize, qint64 realDuration) const { - HistoryFileMedia::setStatusSize(newSize, _data->size, _data->song() ? _data->song()->duration : -1, realDuration); - - if (_statusSize == FileStatusSizeReady) { - _link = lang(lng_media_download).toUpper(); - } else if (_statusSize == FileStatusSizeLoaded) { - _link = lang(lng_media_open_with).toUpper(); - } else if (_statusSize == FileStatusSizeFailed) { - _link = lang(lng_media_download).toUpper(); - } else if (_statusSize >= 0) { - _link = lang(lng_media_cancel).toUpper(); - } else { - _link = lang(lng_media_open_with).toUpper(); + int32 duration = _data->song() ? _data->song()->duration : (_data->voice() ? _data->voice()->duration : -1); + HistoryFileMedia::setStatusSize(newSize, _data->size, duration, realDuration); + if (const HistoryDocumentThumbed *thumbed = Get()) { + if (_statusSize == FileStatusSizeReady) { + thumbed->_link = lang(lng_media_download).toUpper(); + } else if (_statusSize == FileStatusSizeLoaded) { + thumbed->_link = lang(lng_media_open_with).toUpper(); + } else if (_statusSize == FileStatusSizeFailed) { + thumbed->_link = lang(lng_media_download).toUpper(); + } else if (_statusSize >= 0) { + thumbed->_link = lang(lng_media_cancel).toUpper(); + } else { + thumbed->_link = lang(lng_media_open_with).toUpper(); + } + thumbed->_linkw = st::semiboldFont->width(thumbed->_link); } - _linkw = st::semiboldFont->width(_link); } bool HistoryDocument::updateStatusText(const HistoryItem *parent) const { @@ -4311,7 +4253,41 @@ bool HistoryDocument::updateStatusText(const HistoryItem *parent) const { } else if (_data->loading()) { statusSize = _data->loadOffset(); } else if (_data->loaded()) { - if (_data->song()) { + if (_data->voice()) { + AudioMsgId playing; + AudioPlayerState playingState = AudioPlayerStopped; + int64 playingPosition = 0, playingDuration = 0; + int32 playingFrequency = 0; + if (audioPlayer()) { + audioPlayer()->currentState(&playing, &playingState, &playingPosition, &playingDuration, &playingFrequency); + } + + if (playing.msgId == parent->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { + if (const HistoryDocumentVoice *voice = Get()) { + bool was = voice->_playback; + voice->ensurePlayback(this); + if (!was || playingPosition != voice->_playback->_position) { + float64 prg = playingDuration ? snap(float64(playingPosition) / playingDuration, 0., 1.) : 0.; + if (voice->_playback->_position < playingPosition) { + voice->_playback->a_progress.start(prg); + } else { + voice->_playback->a_progress = anim::fvalue(0., prg); + } + voice->_playback->_position = playingPosition; + voice->_playback->_a_progress.start(); + } + } + + statusSize = -1 - (playingPosition / (playingFrequency ? playingFrequency : AudioVoiceMsgFrequency)); + realDuration = playingDuration / (playingFrequency ? playingFrequency : AudioVoiceMsgFrequency); + showPause = (playingState == AudioPlayerPlaying || playingState == AudioPlayerResuming || playingState == AudioPlayerStarting); + } else { + statusSize = FileStatusSizeLoaded; + if (const HistoryDocumentVoice *voice = Get()) { + voice->checkPlaybackFinished(); + } + } + } else if (_data->song()) { SongMsgId playing; AudioPlayerState playingState = AudioPlayerStopped; int64 playingPosition = 0, playingDuration = 0; @@ -4342,6 +4318,21 @@ bool HistoryDocument::updateStatusText(const HistoryItem *parent) const { return showPause; } +void HistoryDocument::step_voiceProgress(float64 ms, bool timer) { + if (HistoryDocumentVoice *voice = Get()) { + if (voice->_playback) { + float64 dt = ms / (2 * AudioVoiceMsgUpdateView); + if (dt >= 1) { + voice->_playback->_a_progress.stop(); + voice->_playback->a_progress.finish(); + } else { + voice->_playback->a_progress.update(qMin(dt, 1.), anim::linear); + } + if (timer) Ui::repaintHistoryItem(_parent); + } + } +} + void HistoryDocument::regItem(HistoryItem *item) { App::regDocumentItem(_data, item); } @@ -4353,6 +4344,13 @@ void HistoryDocument::unregItem(HistoryItem *item) { void HistoryDocument::updateFrom(const MTPMessageMedia &media, HistoryItem *parent) { if (media.type() == mtpc_messageMediaDocument) { App::feedDocument(media.c_messageMediaDocument().vdocument, _data); + if (!_data->data().isEmpty()) { + if (_data->voice()) { + Local::writeAudio(mediaKey(AudioFileLocation, _data->dc, _data->id), _data->data()); + } else { + Local::writeStickerImage(mediaKey(DocumentFileLocation, _data->dc, _data->id), _data->data()); + } + } } } @@ -4361,6 +4359,7 @@ ImagePtr HistoryDocument::replyPreview() { } HistoryGif::HistoryGif(DocumentData *document, const QString &caption, const HistoryItem *parent) : HistoryFileMedia() +, _parent(0) , _data(document) , _thumbw(1) , _thumbh(1) @@ -5126,7 +5125,6 @@ void HistoryWebPage::initDimensions(const HistoryItem *parent) { _maxw = _minh = _height = 0; return; } - if (!_lineHeight) _lineHeight = qMax(st::webPageTitleFont->height, st::webPageDescriptionFont->height); if (!_openl && !_data->url.isEmpty()) _openl = TextLinkPtr(new TextLink(_data->url)); @@ -5144,7 +5142,7 @@ void HistoryWebPage::initDimensions(const HistoryItem *parent) { } else { _asArticle = true; } - if (_asArticle && (_data->description.isEmpty() || (title.isEmpty() && _data->siteName.isEmpty()))) { + if (_asArticle && _data->description.isEmpty() && title.isEmpty() && _data->siteName.isEmpty()) { _asArticle = false; } } else { @@ -6121,12 +6119,6 @@ void HistoryMessage::initMedia(const MTPMessageMedia *media, QString ¤tTex _media = new HistoryVideo(video.vvideo.c_video(), qs(video.vcaption), this); } } break; - case mtpc_messageMediaAudio: { - const MTPAudio &audio(media->c_messageMediaAudio().vaudio); - if (audio.type() == mtpc_audio) { - _media = new HistoryAudio(audio.c_audio()); - } - } break; case mtpc_messageMediaDocument: { const MTPDocument &document(media->c_messageMediaDocument().vdocument); if (document.type() == mtpc_document) { @@ -6225,8 +6217,8 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { left += (!fromChannel() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { left += st::msgPhotoSkip; - } else if (!Adaptive::Wide() && !out() && !fromChannel() && st::msgPhotoSkip - (hmaxwidth - hwidth) > 0) { - left += st::msgPhotoSkip - (hmaxwidth - hwidth); +// } else if (!Adaptive::Wide() && !out() && !fromChannel() && st::msgPhotoSkip - (hmaxwidth - hwidth) > 0) { +// left += st::msgPhotoSkip - (hmaxwidth - hwidth); } width = hwidth - st::msgMargin.left() - st::msgMargin.right(); diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 9557904364fbcc..045144ccd1392b 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -95,23 +95,24 @@ enum HistoryMediaType { MediaTypeVideo, MediaTypeGeo, MediaTypeContact, - MediaTypeAudio, - MediaTypeDocument, + MediaTypeFile, MediaTypeGif, MediaTypeSticker, MediaTypeImageLink, MediaTypeWebPage, + MediaTypeMusicFile, + MediaTypeVoiceFile, MediaTypeCount }; enum MediaOverviewType { - OverviewPhotos, - OverviewVideos, - OverviewAudioDocuments, - OverviewDocuments, - OverviewAudios, - OverviewLinks, + OverviewPhotos = 0, + OverviewVideos = 1, + OverviewMusicFiles = 2, + OverviewFiles = 3, + OverviewVoiceFiles = 4, + OverviewLinks = 5, OverviewCount }; @@ -120,9 +121,9 @@ inline MTPMessagesFilter typeToMediaFilter(MediaOverviewType &type) { switch (type) { case OverviewPhotos: return MTP_inputMessagesFilterPhotos(); case OverviewVideos: return MTP_inputMessagesFilterVideo(); - case OverviewAudioDocuments: return MTP_inputMessagesFilterAudioDocuments(); - case OverviewDocuments: return MTP_inputMessagesFilterDocument(); - case OverviewAudios: return MTP_inputMessagesFilterAudio(); + case OverviewMusicFiles: return MTP_inputMessagesFilterMusic(); + case OverviewFiles: return MTP_inputMessagesFilterDocument(); + case OverviewVoiceFiles: return MTP_inputMessagesFilterVoice(); case OverviewLinks: return MTP_inputMessagesFilterUrl(); default: type = OverviewCount; break; } @@ -133,8 +134,8 @@ enum SendActionType { SendActionTyping, SendActionRecordVideo, SendActionUploadVideo, - SendActionRecordAudio, - SendActionUploadAudio, + SendActionRecordVoice, + SendActionUploadVoice, SendActionUploadPhoto, SendActionUploadFile, SendActionChooseLocation, @@ -1205,10 +1206,11 @@ inline MediaOverviewType mediaToOverviewType(HistoryMedia *media) { switch (media->type()) { case MediaTypePhoto: return OverviewPhotos; case MediaTypeVideo: return OverviewVideos; - case MediaTypeDocument: return media->getDocument()->song() ? OverviewAudioDocuments : OverviewDocuments; - case MediaTypeGif: return media->getDocument()->isGifv() ? OverviewCount : OverviewDocuments; -// case MediaTypeSticker: return OverviewDocuments; - case MediaTypeAudio: return OverviewAudios; + case MediaTypeFile: return OverviewFiles; + case MediaTypeMusicFile: return media->getDocument()->isMusic() ? OverviewMusicFiles : OverviewFiles; + case MediaTypeVoiceFile: return OverviewVoiceFiles; + case MediaTypeGif: return media->getDocument()->isGifv() ? OverviewCount : OverviewFiles; +// case MediaTypeSticker: return OverviewFiles; } return OverviewCount; } @@ -1418,76 +1420,52 @@ class HistoryVideo : public HistoryFileMedia { }; -class HistoryAudio : public HistoryFileMedia { -public: - - HistoryAudio(const MTPDaudio &audio); - HistoryAudio(const HistoryAudio &other); - HistoryMediaType type() const { - return MediaTypeAudio; - } - HistoryMedia *clone() const { - return new HistoryAudio(*this); - } - - void initDimensions(const HistoryItem *parent); - - void draw(Painter &p, const HistoryItem *parent, const QRect &r, bool selected, uint64 ms) const; - void getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const; - - const QString inDialogsText() const; - const QString inHistoryText() const; - - bool uploading() const { - return _data->uploading(); - } - - AudioData *audio() { - return _data; +struct HistoryDocumentThumbed : public BasicInterface { + HistoryDocumentThumbed(Interfaces *interfaces) : _thumbw(0), _linkw(0) { } + TextLinkPtr _linksavel, _linkcancell; + int32 _thumbw; - void regItem(HistoryItem *item); - void unregItem(HistoryItem *item); - - void updateFrom(const MTPMessageMedia &media, HistoryItem *parent); - - bool needsBubble(const HistoryItem *parent) const { - return true; - } - bool customInfoLayout() const { - return false; + mutable int32 _linkw; + mutable QString _link; +}; +struct HistoryDocumentCaptioned : public BasicInterface { + HistoryDocumentCaptioned(Interfaces *interfaces) : _caption(st::msgFileMinWidth - st::msgPadding.left() - st::msgPadding.right()) { } - QMargins bubbleMargins() const { - return st::msgPadding; + Text _caption; +}; +struct HistoryDocumentNamed : public BasicInterface { + HistoryDocumentNamed(Interfaces *interfaces) : _namew(0) { } + QString _name; + int32 _namew; +}; +class HistoryDocument; +struct HistoryDocumentVoicePlayback { + HistoryDocumentVoicePlayback(const HistoryDocument *that); -protected: - - float64 dataProgress() const { - return _data->progress(); + int32 _position; + anim::fvalue a_progress; + Animation _a_progress; +}; +struct HistoryDocumentVoice : public BasicInterface { + HistoryDocumentVoice(Interfaces *that) : _playback(0) { } - bool dataFinished() const { - return !_data->loading() && !_data->uploading(); + ~HistoryDocumentVoice() { + deleteAndMark(_playback); } - bool dataLoaded() const { - return _data->loaded(); - } - -private: - AudioData *_data; - - void setStatusSize(int32 newSize, qint64 realDuration = 0) const; - bool updateStatusText(const HistoryItem *parent) const; // returns showPause - + void ensurePlayback(const HistoryDocument *interfaces) const; + void checkPlaybackFinished() const; + mutable HistoryDocumentVoicePlayback *_playback; }; -class HistoryDocument : public HistoryFileMedia { +class HistoryDocument : public HistoryFileMedia, public Interfaces { public: HistoryDocument(DocumentData *document, const QString &caption, const HistoryItem *parent); HistoryDocument(const HistoryDocument &other); HistoryMediaType type() const { - return MediaTypeDocument; + return _data->voice() ? MediaTypeVoiceFile : (_data->song() ? MediaTypeMusicFile : MediaTypeFile); } HistoryMedia *clone() const { return new HistoryDocument(*this); @@ -1506,10 +1484,6 @@ class HistoryDocument : public HistoryFileMedia { return _data->uploading(); } - bool withThumb() const { - return !_data->song() && !_data->thumb->isNull() && _data->thumb->width() && _data->thumb->height(); - } - DocumentData *getDocument() { return _data; } @@ -1525,7 +1499,10 @@ class HistoryDocument : public HistoryFileMedia { ImagePtr replyPreview(); QString getCaption() const { - return _caption.original(); + if (const HistoryDocumentCaptioned *captioned = Get()) { + return captioned->_caption.original(); + } + return QString(); } bool needsBubble(const HistoryItem *parent) const { return true; @@ -1534,12 +1511,14 @@ class HistoryDocument : public HistoryFileMedia { return false; } QMargins bubbleMargins() const { - return withThumb() ? QMargins(st::msgFileThumbPadding.left(), st::msgFileThumbPadding.top(), st::msgFileThumbPadding.left(), st::msgFileThumbPadding.bottom()) : st::msgPadding; + return Get() ? QMargins(st::msgFileThumbPadding.left(), st::msgFileThumbPadding.top(), st::msgFileThumbPadding.left(), st::msgFileThumbPadding.bottom()) : st::msgPadding; } bool hideForwardedFrom() const { return _data->song(); } + void step_voiceProgress(float64 ms, bool timer); + protected: float64 dataProgress() const { @@ -1554,17 +1533,9 @@ class HistoryDocument : public HistoryFileMedia { private: + void create(bool caption); + const HistoryItem *_parent; DocumentData *_data; - TextLinkPtr _linksavel, _linkcancell; - - QString _name; - int32 _namew; - int32 _thumbw; - - mutable int32 _linkw; - mutable QString _link; - - Text _caption; void setStatusSize(int32 newSize, qint64 realDuration = 0) const; bool updateStatusText(const HistoryItem *parent) const; // returns showPause @@ -2237,7 +2208,20 @@ inline int32 newMessageFlags(PeerData *p) { return p->isSelf() ? 0 : (((p->isChat() || (p->isUser() && !p->asUser()->botInfo)) ? MTPDmessage::flag_unread : 0) | MTPDmessage::flag_out); } inline int32 newForwardedFlags(PeerData *p, int32 from, HistoryMessage *msg) { - return newMessageFlags(p) | (from ? MTPDmessage::flag_from_id : 0) | (msg->via() ? MTPDmessage::flag_via_bot_id : 0) | (!p->isChannel() && msg->getMedia() && (msg->getMedia()->type() == MediaTypeAudio/* || msg->getMedia()->type() == MediaTypeVideo*/) ? MTPDmessage::flag_media_unread : 0); + int32 result = newMessageFlags(p) | (from ? MTPDmessage::flag_from_id : 0); + if (msg->via()) { + result |= MTPDmessage::flag_via_bot_id; + } + if (!p->isChannel()) { + if (HistoryMedia *media = msg->getMedia()) { + if (media->type() == MediaTypeVoiceFile) { + result |= MTPDmessage::flag_media_unread; +// } else if (media->type() == MediaTypeVideo) { +// result |= MTPDmessage::flag_media_unread; + } + } + } + return result; } class HistoryServiceMsg : public HistoryItem { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 05c757ee7749e0..baf099ec8611fc 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -865,9 +865,9 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { HistoryItem *item = App::hoveredItem() ? App::hoveredItem() : App::hoveredLinkItem(); PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkPhoto || lnkVideo || lnkAudio || lnkDocument) { + bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; + if (lnkPhoto || lnkVideo || lnkDocument) { if (isUponSelected > 0) { _menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true); } @@ -879,17 +879,17 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _menu->addAction(lang(lng_context_save_image), this, SLOT(saveContextImage()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_image), this, SLOT(copyContextImage()))->setEnabled(true); } else { - if ((lnkVideo && lnkVideo->video()->loading()) || (lnkAudio && lnkAudio->audio()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { + if ((lnkVideo && lnkVideo->video()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { _menu->addAction(lang(lng_context_cancel_download), this, SLOT(cancelContextDownload()))->setEnabled(true); } else { if (lnkDocument && lnkDocument->document()->loaded() && lnkDocument->document()->isGifv()) { _menu->addAction(lang(lng_context_save_gif), this, SLOT(saveContextGif()))->setEnabled(true); } - if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkAudio && !lnkAudio->audio()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { + if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); - _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } if (isUponSelected > 1) { @@ -1071,8 +1071,6 @@ void HistoryInner::copyContextImage() { void HistoryInner::cancelContextDownload() { if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { lnkVideo->video()->cancel(); - } else if (AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data())) { - lnkAudio->audio()->cancel(); } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { lnkDocument->document()->cancel(); } else if (HistoryItem *item = App::contextItem()) { @@ -1088,8 +1086,6 @@ void HistoryInner::showContextInFolder() { QString already; if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { already = lnkVideo->video()->already(true); - } else if (AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data())) { - already = lnkAudio->audio()->already(true); } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { already = lnkDocument->document()->already(true); } else if (HistoryItem *item = App::contextItem()) { @@ -1106,10 +1102,8 @@ void HistoryInner::openContextFile() { HistoryItem *was = App::hoveredLinkItem(); App::hoveredLinkItem(App::contextItem()); VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); if (lnkVideo) VideoOpenLink(lnkVideo->video()).onClick(Qt::LeftButton); - if (lnkAudio) AudioOpenLink(lnkAudio->audio()).onClick(Qt::LeftButton); if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); App::hoveredLinkItem(was); } @@ -1117,8 +1111,6 @@ void HistoryInner::openContextFile() { void HistoryInner::saveContextFile() { if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { VideoSaveLink::doSave(lnkVideo->video(), true); - } else if (AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data())) { - AudioSaveLink::doSave(lnkAudio->audio(), true); } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { DocumentSaveLink::doSave(lnkDocument->document(), true); } else if (HistoryItem *item = App::contextItem()) { @@ -2720,8 +2712,8 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) connect(&_previewTimer, SIGNAL(timeout()), this, SLOT(onPreviewTimeout())); if (audioCapture()) { connect(audioCapture(), SIGNAL(onError()), this, SLOT(onRecordError())); - connect(audioCapture(), SIGNAL(onUpdate(qint16,qint32)), this, SLOT(onRecordUpdate(qint16,qint32))); - connect(audioCapture(), SIGNAL(onDone(QByteArray,qint32)), this, SLOT(onRecordDone(QByteArray,qint32))); + connect(audioCapture(), SIGNAL(onUpdate(quint16,qint32)), this, SLOT(onRecordUpdate(quint16,qint32))); + connect(audioCapture(), SIGNAL(onDone(QByteArray,VoiceWaveform,qint32)), this, SLOT(onRecordDone(QByteArray,VoiceWaveform,qint32))); } _updateHistoryItems.setSingleShot(true); @@ -3005,8 +2997,8 @@ void HistoryWidget::updateSendAction(History *history, SendActionType type, int3 case SendActionTyping: action = MTP_sendMessageTypingAction(); break; case SendActionRecordVideo: action = MTP_sendMessageRecordVideoAction(); break; case SendActionUploadVideo: action = MTP_sendMessageUploadVideoAction(MTP_int(progress)); break; - case SendActionRecordAudio: action = MTP_sendMessageRecordAudioAction(); break; - case SendActionUploadAudio: action = MTP_sendMessageUploadAudioAction(MTP_int(progress)); break; + case SendActionRecordVoice: action = MTP_sendMessageRecordAudioAction(); break; + case SendActionUploadVoice: action = MTP_sendMessageUploadAudioAction(MTP_int(progress)); break; case SendActionUploadPhoto: action = MTP_sendMessageUploadPhotoAction(MTP_int(progress)); break; case SendActionUploadFile: action = MTP_sendMessageUploadDocumentAction(MTP_int(progress)); break; case SendActionChooseLocation: action = MTP_sendMessageGeoLocationAction(); break; @@ -3055,16 +3047,16 @@ void HistoryWidget::onRecordError() { stopRecording(false); } -void HistoryWidget::onRecordDone(QByteArray result, qint32 samples) { +void HistoryWidget::onRecordDone(QByteArray result, VoiceWaveform waveform, qint32 samples) { if (!_peer) return; App::wnd()->activateWindow(); int32 duration = samples / AudioVoiceMsgFrequency; - _fileLoader.addTask(new FileLoadTask(result, duration, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()))); + _fileLoader.addTask(new FileLoadTask(result, duration, waveform, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()))); cancelReply(lastForceReplyReplied()); } -void HistoryWidget::onRecordUpdate(qint16 level, qint32 samples) { +void HistoryWidget::onRecordUpdate(quint16 level, qint32 samples) { if (!_recording) { return; } @@ -3077,7 +3069,7 @@ void HistoryWidget::onRecordUpdate(qint16 level, qint32 samples) { } updateField(); if (_peer && (!_peer->isChannel() || _peer->isMegagroup() || !_peer->asChannel()->canPublish() || (!_peer->asChannel()->isBroadcast() && !_broadcast.checked()))) { - updateSendAction(_history, SendActionRecordAudio); + updateSendAction(_history, SendActionRecordVoice); } } @@ -4241,9 +4233,9 @@ void HistoryWidget::firstLoadMessages() { } if (loadImportant) { - _firstLoadRequest = MTP::send(MTPchannels_GetImportantHistory(from->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); + _firstLoadRequest = MTP::send(MTPchannels_GetImportantHistory(from->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } else { - _firstLoadRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); + _firstLoadRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(offset), MTP_int(0), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } } @@ -4265,9 +4257,9 @@ void HistoryWidget::loadMessages() { int32 offset = 0, loadCount = offset_id ? MessagesPerPage : MessagesFirstLoad; if (loadImportant) { - _preloadRequest = MTP::send(MTPchannels_GetImportantHistory(from->peer->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); + _preloadRequest = MTP::send(MTPchannels_GetImportantHistory(from->peer->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } else { - _preloadRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); + _preloadRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } } @@ -4295,9 +4287,9 @@ void HistoryWidget::loadMessagesDown() { } if (loadImportant) { - _preloadDownRequest = MTP::send(MTPchannels_GetImportantHistory(from->peer->asChannel()->inputChannel, MTP_int(offset_id + 1), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); + _preloadDownRequest = MTP::send(MTPchannels_GetImportantHistory(from->peer->asChannel()->inputChannel, MTP_int(offset_id + 1), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } else { - _preloadDownRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id + 1), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); + _preloadDownRequest = MTP::send(MTPmessages_GetHistory(from->peer->input, MTP_int(offset_id + 1), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from->peer), rpcFail(&HistoryWidget::messagesFailed)); } } @@ -4355,9 +4347,9 @@ void HistoryWidget::delayedShowAt(MsgId showAtMsgId) { } if (loadImportant) { - _delayedShowAtRequest = MTP::send(MTPchannels_GetImportantHistory(from->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); + _delayedShowAtRequest = MTP::send(MTPchannels_GetImportantHistory(from->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } else { - _delayedShowAtRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); + _delayedShowAtRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } } @@ -4807,7 +4799,7 @@ void HistoryWidget::onDocumentSelect() { void HistoryWidget::dragEnterEvent(QDragEnterEvent *e) { if (!_history) return; - if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + if (_peer && !_canSendMessages) return; _attachDrag = getDragState(e->mimeData()); updateDragAreas(); @@ -4887,7 +4879,7 @@ void HistoryWidget::stopRecording(bool send) { _recording = false; _recordingSamples = 0; if (_peer && (!_peer->isChannel() || _peer->isMegagroup() || !_peer->asChannel()->canPublish() || (!_peer->asChannel()->isBroadcast() && !_broadcast.checked()))) { - updateSendAction(_history, SendActionRecordAudio, -1); + updateSendAction(_history, SendActionRecordVoice, -1); } updateControlsVisibility(); @@ -5151,7 +5143,7 @@ void HistoryWidget::onPhotoDrop(const QMimeData *data) { void HistoryWidget::onDocumentDrop(const QMimeData *data) { if (!_history) return; - if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + if (_peer && !_canSendMessages) return; QStringList files = getMediasFromMime(data); if (files.isEmpty()) return; @@ -5161,7 +5153,7 @@ void HistoryWidget::onDocumentDrop(const QMimeData *data) { void HistoryWidget::onFilesDrop(const QMimeData *data) { - if (_peer && (_peer->isChannel() && !_peer->asChannel()->canPublish())) return; + if (_peer && !_canSendMessages) return; QStringList files = getMediasFromMime(data); if (files.isEmpty()) { @@ -5522,13 +5514,10 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&, const MTPInputFile&)), this, SLOT(onPhotoUploaded(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(documentReady(const FullMsgId&, const MTPInputFile&)), this, SLOT(onDocumentUploaded(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(thumbDocumentReady(const FullMsgId&, const MTPInputFile&, const MTPInputFile&)), this, SLOT(onThumbDocumentUploaded(const FullMsgId&, const MTPInputFile&, const MTPInputFile&)), Qt::UniqueConnection); - connect(App::uploader(), SIGNAL(audioReady(const FullMsgId&, const MTPInputFile&)), this, SLOT(onAudioUploaded(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(photoProgress(const FullMsgId&)), this, SLOT(onPhotoProgress(const FullMsgId&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(documentProgress(const FullMsgId&)), this, SLOT(onDocumentProgress(const FullMsgId&)), Qt::UniqueConnection); - connect(App::uploader(), SIGNAL(audioProgress(const FullMsgId&)), this, SLOT(onAudioProgress(const FullMsgId&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(photoFailed(const FullMsgId&)), this, SLOT(onPhotoFailed(const FullMsgId&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(documentFailed(const FullMsgId&)), this, SLOT(onDocumentFailed(const FullMsgId&)), Qt::UniqueConnection); - connect(App::uploader(), SIGNAL(audioFailed(const FullMsgId&)), this, SLOT(onAudioFailed(const FullMsgId&)), Qt::UniqueConnection); App::uploader()->upload(newId, file); @@ -5552,7 +5541,7 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif if (!h->peer->isChannel()) { flags |= MTPDmessage::flag_media_unread; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaAudio(file->audio), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } if (_peer && file->to.peer == _peer->id) { @@ -5628,7 +5617,9 @@ namespace { } else if (document->type == StickerDocument && document->sticker()) { attributes.push_back(MTP_documentAttributeSticker(MTP_string(document->sticker()->alt), document->sticker()->set)); } else if (document->type == SongDocument && document->song()) { - attributes.push_back(MTP_documentAttributeAudio(MTP_int(document->song()->duration), MTP_string(document->song()->title), MTP_string(document->song()->performer))); + attributes.push_back(MTP_documentAttributeAudio(MTP_int(MTPDdocumentAttributeAudio::flag_title | MTPDdocumentAttributeAudio::flag_performer), MTP_int(document->song()->duration), MTP_string(document->song()->title), MTP_string(document->song()->performer), MTPstring())); + } else if (document->type == VoiceDocument && document->voice()) { + attributes.push_back(MTP_documentAttributeAudio(MTP_int(MTPDdocumentAttributeAudio::flag_voice | MTPDdocumentAttributeAudio::flag_waveform), MTP_int(document->voice()->duration), MTPstring(), MTPstring(), MTP_string(documentWaveformEncode5bit(document->voice()->waveform)))); } return MTP_vector(attributes); } @@ -5684,33 +5675,6 @@ void HistoryWidget::onThumbDocumentUploaded(const FullMsgId &newId, const MTPInp } } -void HistoryWidget::onAudioUploaded(const FullMsgId &newId, const MTPInputFile &file) { - if (!MTP::authedId()) return; - HistoryMessage *item = dynamic_cast(App::histItemById(newId)); - if (item) { - AudioData *audio = 0; - if (HistoryAudio *media = dynamic_cast(item->getMedia())) { - audio = media->audio(); - } - if (audio) { - uint64 randomId = MTP::nonce(); - App::historyRegRandom(randomId, newId); - History *hist = item->history(); - MsgId replyTo = item->toHistoryReply() ? item->toHistoryReply()->replyToId() : 0; - int32 sendFlags = 0; - if (replyTo) { - sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; - } - - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->fromChannel(); - if (fromChannelName) { - sendFlags |= MTPmessages_SendMedia::flag_broadcast; - } - hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedAudio(file, MTP_int(audio->duration), MTP_string(audio->mime)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); - } - } -} - void HistoryWidget::onPhotoProgress(const FullMsgId &newId) { if (!MTP::authedId()) return; if (HistoryItem *item = App::histItemById(newId)) { @@ -5728,18 +5692,7 @@ void HistoryWidget::onDocumentProgress(const FullMsgId &newId) { HistoryMedia *media = item->getMedia(); DocumentData *doc = media ? media->getDocument() : 0; if (!item->fromChannel()) { - updateSendAction(item->history(), SendActionUploadFile, doc ? doc->uploadOffset : 0); - } - Ui::repaintHistoryItem(item); - } -} - -void HistoryWidget::onAudioProgress(const FullMsgId &newId) { - if (!MTP::authedId()) return; - if (HistoryItem *item = App::histItemById(newId)) { - AudioData *audio = (item->getMedia() && item->getMedia()->type() == MediaTypeAudio) ? static_cast(item->getMedia())->audio() : 0; - if (!item->fromChannel()) { - updateSendAction(item->history(), SendActionUploadAudio, audio ? audio->uploadOffset : 0); + updateSendAction(item->history(), (doc && doc->voice()) ? SendActionUploadVoice : SendActionUploadFile, doc ? doc->uploadOffset : 0); } Ui::repaintHistoryItem(item); } @@ -5760,19 +5713,10 @@ void HistoryWidget::onDocumentFailed(const FullMsgId &newId) { if (!MTP::authedId()) return; HistoryItem *item = App::histItemById(newId); if (item) { + HistoryMedia *media = item->getMedia(); + DocumentData *doc = media ? media->getDocument() : 0; if (!item->fromChannel()) { - updateSendAction(item->history(), SendActionUploadFile, -1); - } - Ui::repaintHistoryItem(item); - } -} - -void HistoryWidget::onAudioFailed(const FullMsgId &newId) { - if (!MTP::authedId()) return; - HistoryItem *item = App::histItemById(newId); - if (item) { - if (!item->fromChannel()) { - updateSendAction(item->history(), SendActionUploadAudio, -1); + updateSendAction(item->history(), (doc && doc->voice()) ? SendActionUploadVoice : SendActionUploadFile, -1); } Ui::repaintHistoryItem(item); } @@ -7194,7 +7138,7 @@ void HistoryWidget::drawRecording(Painter &p) { p.setPen(Qt::NoPen); p.setBrush(st::recordSignalColor->b); p.setRenderHint(QPainter::HighQualityAntialiasing); - float64 delta = qMin(float64(a_recordingLevel.current()) * 3 * M_PI / 0x7fff, 1.); + float64 delta = qMin(float64(a_recordingLevel.current()) / 0x4000, 1.); int32 d = 2 * qRound(st::recordSignalMin + (delta * (st::recordSignalMax - st::recordSignalMin))); p.drawEllipse(_attachPhoto.x() + (_attachEmoji.width() - d) / 2, _attachPhoto.y() + (_attachPhoto.height() - d) / 2, d, d); p.setRenderHint(QPainter::HighQualityAntialiasing, false); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index eda8743a12e850..fcf4c537718866 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -610,15 +610,12 @@ public slots: void onPhotoUploaded(const FullMsgId &msgId, const MTPInputFile &file); void onDocumentUploaded(const FullMsgId &msgId, const MTPInputFile &file); void onThumbDocumentUploaded(const FullMsgId &msgId, const MTPInputFile &file, const MTPInputFile &thumb); - void onAudioUploaded(const FullMsgId &msgId, const MTPInputFile &file); void onPhotoProgress(const FullMsgId &msgId); void onDocumentProgress(const FullMsgId &msgId); - void onAudioProgress(const FullMsgId &msgId); void onPhotoFailed(const FullMsgId &msgId); void onDocumentFailed(const FullMsgId &msgId); - void onAudioFailed(const FullMsgId &msgId); void onReportSpamClicked(); void onReportSpamSure(); @@ -683,8 +680,8 @@ public slots: void updateField(); void onRecordError(); - void onRecordDone(QByteArray result, qint32 samples); - void onRecordUpdate(qint16 level, qint32 samples); + void onRecordDone(QByteArray result, VoiceWaveform waveform, qint32 samples); + void onRecordUpdate(quint16 level, qint32 samples); void onUpdateHistoryItems(); diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index cf3c71c76a279c..8540930a8a0f91 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -550,23 +550,25 @@ void LayoutOverviewVideo::updateStatusText() const { } } -LayoutOverviewAudio::LayoutOverviewAudio(AudioData *audio, HistoryItem *parent) : LayoutAbstractFileItem(OverviewItemInfo::Bit(), parent) -, _data(audio) -, _namel(new AudioOpenLink(_data)) { - setLinks(new AudioOpenLink(_data), new AudioOpenLink(_data), new AudioCancelLink(_data)); +LayoutOverviewVoice::LayoutOverviewVoice(DocumentData *voice, HistoryItem *parent) : LayoutAbstractFileItem(OverviewItemInfo::Bit(), parent) +, _data(voice) +, _namel(new DocumentOpenLink(_data)) { + t_assert(_data->voice() != 0); + + setLinks(new DocumentOpenLink(_data), new DocumentOpenLink(_data), new DocumentCancelLink(_data)); updateName(); QString d = textcmdLink(1, textRichPrepare(langDateTime(date(_data->date)))); TextParseOptions opts = { TextParseRichText, 0, 0, Qt::LayoutDirectionAuto }; - _details.setText(st::normalFont, lng_date_and_duration(lt_date, d, lt_duration, formatDurationText(_data->duration)), opts); + _details.setText(st::normalFont, lng_date_and_duration(lt_date, d, lt_duration, formatDurationText(_data->voice()->duration)), opts); _details.setLink(1, TextLinkPtr(new MessageLink(parent))); } -void LayoutOverviewAudio::initDimensions() { +void LayoutOverviewVoice::initDimensions() { _maxw = st::profileMaxWidth; _minh = st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom() + st::lineWidth; } -void LayoutOverviewAudio::paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const { +void LayoutOverviewVoice::paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const { bool selected = (selection == FullSelection); _data->automaticLoad(_parent); @@ -666,7 +668,7 @@ void LayoutOverviewAudio::paint(Painter &p, const QRect &clip, uint32 selection, } } -void LayoutOverviewAudio::getState(TextLinkPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const { +void LayoutOverviewVoice::getState(TextLinkPtr &link, HistoryCursorState &cursor, int32 x, int32 y) const { bool loaded = _data->loaded(); bool showPause = updateStatusText(); @@ -696,7 +698,7 @@ void LayoutOverviewAudio::getState(TextLinkPtr &link, HistoryCursorState &cursor } } -void LayoutOverviewAudio::updateName() const { +void LayoutOverviewVoice::updateName() const { int32 version = 0; if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) { _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(fwd->fromForwarded()), _textNameOptions); @@ -708,7 +710,7 @@ void LayoutOverviewAudio::updateName() const { _nameVersion = version; } -bool LayoutOverviewAudio::updateStatusText() const { +bool LayoutOverviewVoice::updateStatusText() const { bool showPause = false; int32 statusSize = 0, realDuration = 0; if (_data->status == FileDownloadFailed || _data->status == FileUploadFailed) { @@ -733,7 +735,7 @@ bool LayoutOverviewAudio::updateStatusText() const { statusSize = FileStatusSizeReady; } if (statusSize != _statusSize) { - setStatusSize(statusSize, _data->size, _data->duration, realDuration); + setStatusSize(statusSize, _data->size, _data->voice()->duration, realDuration); } return showPause; } diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index 39f9ecd1499787..7319613a1ee806 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -349,9 +349,9 @@ class LayoutOverviewVideo : public LayoutAbstractFileItem { }; -class LayoutOverviewAudio : public LayoutAbstractFileItem { +class LayoutOverviewVoice : public LayoutAbstractFileItem { public: - LayoutOverviewAudio(AudioData *audio, HistoryItem *parent); + LayoutOverviewVoice(DocumentData *voice, HistoryItem *parent); virtual void initDimensions(); virtual void paint(Painter &p, const QRect &clip, uint32 selection, const PaintContext *context) const; @@ -372,7 +372,7 @@ class LayoutOverviewAudio : public LayoutAbstractFileItem { } private: - AudioData *_data; + DocumentData *_data; TextLinkPtr _namel; mutable Text _name, _details; diff --git a/Telegram/SourceFiles/localimageloader.cpp b/Telegram/SourceFiles/localimageloader.cpp index d8137a83243145..49d0cfaf260be2 100644 --- a/Telegram/SourceFiles/localimageloader.cpp +++ b/Telegram/SourceFiles/localimageloader.cpp @@ -198,10 +198,11 @@ FileLoadTask::FileLoadTask(const QImage &image, PrepareMediaType type, const Fil , _result(0) { } -FileLoadTask::FileLoadTask(const QByteArray &audio, int32 duration, const FileLoadTo &to) : _id(MTP::nonce()) +FileLoadTask::FileLoadTask(const QByteArray &voice, int32 duration, const VoiceWaveform &waveform, const FileLoadTo &to) : _id(MTP::nonce()) , _to(to) -, _content(audio) +, _content(voice) , _duration(duration) +, _waveform(waveform) , _type(PrepareAudio) , _confirm(FileLoadNoForceConfirm) , _result(0) { @@ -220,7 +221,7 @@ void FileLoadTask::process() { QString thumbname = "thumb.jpg"; QByteArray thumbdata; - bool animated = false; + bool animated = false, song = false, gif = false, voice = (_type == PrepareAudio); QImage fullimage = _image; if (!_filepath.isEmpty()) { @@ -232,30 +233,32 @@ void FileLoadTask::process() { filesize = info.size(); filemime = mimeTypeForFile(info).name(); filename = info.fileName(); - if (filesize <= MaxUploadPhotoSize && _type != PrepareAudio) { + if (filesize <= MaxUploadPhotoSize && !voice) { bool opaque = (filemime != stickerMime); fullimage = App::readImage(_filepath, 0, opaque, &animated); } } else if (!_content.isEmpty()) { filesize = _content.size(); - MimeType mimeType = mimeTypeForData(_content); - filemime = mimeType.name(); - if (filesize <= MaxUploadPhotoSize && _type != PrepareAudio) { - bool opaque = (filemime != stickerMime); - fullimage = App::readImage(_content, 0, opaque, &animated); - } - if (filemime == "image/jpeg") { - filename = filedialogDefaultName(qsl("image"), qsl(".jpg"), QString(), true); - } else if (_type == PrepareAudio) { + if (voice) { filename = filedialogDefaultName(qsl("audio"), qsl(".ogg"), QString(), true); filemime = "audio/ogg"; } else { - QString ext; - QStringList patterns = mimeType.globPatterns(); - if (!patterns.isEmpty()) { - ext = patterns.front().replace('*', QString()); + MimeType mimeType = mimeTypeForData(_content); + filemime = mimeType.name(); + if (filesize <= MaxUploadPhotoSize && !voice) { + bool opaque = (filemime != stickerMime); + fullimage = App::readImage(_content, 0, opaque, &animated); + } + if (filemime == "image/jpeg") { + filename = filedialogDefaultName(qsl("image"), qsl(".jpg"), QString(), true); + } else { + QString ext; + QStringList patterns = mimeType.globPatterns(); + if (!patterns.isEmpty()) { + ext = patterns.front().replace('*', QString()); + } + filename = filedialogDefaultName(qsl("file"), ext, QString(), true); } - filename = filedialogDefaultName(qsl("file"), ext, QString(), true); } } else if (!_image.isNull()) { _image = QImage(); @@ -292,10 +295,8 @@ void FileLoadTask::process() { MTPPhotoSize thumbSize(MTP_photoSizeEmpty(MTP_string(""))); MTPPhoto photo(MTP_photoEmpty(MTP_long(0))); MTPDocument document(MTP_documentEmpty(MTP_long(0))); - MTPAudio audio(MTP_audioEmpty(MTP_long(0))); - bool song = false, gif = false; - if (_type != PrepareAudio) { + if (!voice) { if (filemime == qstr("audio/mp3") || filemime == qstr("audio/m4a") || filemime == qstr("audio/aac") || filemime == qstr("audio/ogg") || filemime == qstr("audio/flac") || filename.endsWith(qstr(".mp3"), Qt::CaseInsensitive) || filename.endsWith(qstr(".m4a"), Qt::CaseInsensitive) || filename.endsWith(qstr(".aac"), Qt::CaseInsensitive) || filename.endsWith(qstr(".ogg"), Qt::CaseInsensitive) || @@ -358,7 +359,7 @@ void FileLoadTask::process() { } } - if (!fullimage.isNull() && fullimage.width() > 0 && !song && !gif) { + if (!fullimage.isNull() && fullimage.width() > 0 && !song && !gif && !voice) { int32 w = fullimage.width(), h = fullimage.height(); attributes.push_back(MTP_documentAttributeImageSize(MTP_int(w), MTP_int(h))); @@ -408,8 +409,10 @@ void FileLoadTask::process() { } } - if (_type == PrepareAudio) { - audio = MTP_audio(MTP_long(_id), MTP_long(0), MTP_int(unixtime()), MTP_int(_duration), MTP_string(filemime), MTP_int(filesize), MTP_int(MTP::maindc())); + if (voice) { + attributes[0] = MTP_documentAttributeAudio(MTP_int(MTPDdocumentAttributeAudio::flag_voice | MTPDdocumentAttributeAudio::flag_waveform), MTP_int(_duration), MTPstring(), MTPstring(), MTP_string(documentWaveformEncode5bit(_waveform))); + attributes.resize(1); + document = MTP_document(MTP_long(_id), MTP_long(0), MTP_int(unixtime()), MTP_string(filemime), MTP_int(filesize), thumbSize, MTP_int(MTP::maindc()), MTP_vector(attributes)); } else { document = MTP_document(MTP_long(_id), MTP_long(0), MTP_int(unixtime()), MTP_string(filemime), MTP_int(filesize), thumbSize, MTP_int(MTP::maindc()), MTP_vector(attributes)); if (photo.type() == mtpc_photoEmpty) { @@ -431,7 +434,6 @@ void FileLoadTask::process() { _result->thumb = thumb; _result->photo = photo; - _result->audio = audio; _result->document = document; _result->photoThumbs = photoThumbs; } diff --git a/Telegram/SourceFiles/localimageloader.h b/Telegram/SourceFiles/localimageloader.h index 6078820afe1c4b..51edd7310436e2 100644 --- a/Telegram/SourceFiles/localimageloader.h +++ b/Telegram/SourceFiles/localimageloader.h @@ -52,8 +52,8 @@ typedef QList ToPrepareMedias; typedef QMap UploadFileParts; struct ReadyLocalMedia { - ReadyLocalMedia(PrepareMediaType type, const QString &file, const QString &filename, int32 filesize, const QByteArray &data, const uint64 &id, const uint64 &thumbId, const QString &thumbExt, const PeerId &peer, const MTPPhoto &photo, const MTPAudio &audio, const PreparedPhotoThumbs &photoThumbs, const MTPDocument &document, const QByteArray &jpeg, bool broadcast, bool ctrlShiftEnter, MsgId replyTo) : - replyTo(replyTo), type(type), file(file), filename(filename), filesize(filesize), data(data), thumbExt(thumbExt), id(id), thumbId(thumbId), peer(peer), photo(photo), document(document), audio(audio), photoThumbs(photoThumbs), broadcast(broadcast), ctrlShiftEnter(ctrlShiftEnter) { + ReadyLocalMedia(PrepareMediaType type, const QString &file, const QString &filename, int32 filesize, const QByteArray &data, const uint64 &id, const uint64 &thumbId, const QString &thumbExt, const PeerId &peer, const MTPPhoto &photo, const PreparedPhotoThumbs &photoThumbs, const MTPDocument &document, const QByteArray &jpeg, bool broadcast, bool ctrlShiftEnter, MsgId replyTo) : + replyTo(replyTo), type(type), file(file), filename(filename), filesize(filesize), data(data), thumbExt(thumbExt), id(id), thumbId(thumbId), peer(peer), photo(photo), document(document), photoThumbs(photoThumbs), broadcast(broadcast), ctrlShiftEnter(ctrlShiftEnter) { if (!jpeg.isEmpty()) { int32 size = jpeg.size(); for (int32 i = 0, part = 0; i < size; i += UploadPartSize, ++part) { @@ -74,7 +74,6 @@ struct ReadyLocalMedia { MTPPhoto photo; MTPDocument document; - MTPAudio audio; PreparedPhotoThumbs photoThumbs; UploadFileParts parts; QByteArray jpeg_md5; @@ -114,7 +113,7 @@ class TaskQueue : public QObject { TaskId addTask(TaskPtr task); void addTasks(const TasksList &tasks); void cancelTask(TaskId id); // this task finish() won't be called - + TaskId addTask(Task *task) { return addTask(TaskPtr(task)); } @@ -203,7 +202,6 @@ struct FileLoadResult { QPixmap thumb; MTPPhoto photo; - MTPAudio audio; MTPDocument document; PreparedPhotoThumbs photoThumbs; @@ -248,7 +246,7 @@ class FileLoadTask : public Task { FileLoadTask(const QString &filepath, PrepareMediaType type, const FileLoadTo &to, FileLoadForceConfirmType confirm = FileLoadNoForceConfirm); FileLoadTask(const QByteArray &content, PrepareMediaType type, const FileLoadTo &to); FileLoadTask(const QImage &image, PrepareMediaType type, const FileLoadTo &to, FileLoadForceConfirmType confirm = FileLoadNoForceConfirm, const QString &originalText = QString()); - FileLoadTask(const QByteArray &audio, int32 duration, const FileLoadTo &to); + FileLoadTask(const QByteArray &voice, int32 duration, const VoiceWaveform &waveform, const FileLoadTo &to); uint64 fileid() const { return _id; @@ -265,6 +263,7 @@ class FileLoadTask : public Task { QImage _image; QByteArray _content; int32 _duration; + VoiceWaveform _waveform; PrepareMediaType _type; FileLoadForceConfirmType _confirm; QString _originalText; diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 915bd35352df28..da64f2cb96fa35 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -2785,6 +2785,77 @@ namespace Local { return _storageWebFilesSize; } + class CountWaveformTask : public Task { + public: + CountWaveformTask(DocumentData *doc) + : _doc(doc) + , _loc(doc->location(true)) + , _data(doc->data()) + , _wavemax(0) { + if (_data.isEmpty() && !_loc.accessEnable()) { + _doc = 0; + } + } + void process() { + if (!_doc) return; + + _waveform = audioCountWaveform(_loc, _data); + uchar wavemax = 0; + for (int32 i = 0, l = _waveform.size(); i < l; ++i) { + uchar waveat = _waveform.at(i); + if (wavemax < waveat) wavemax = waveat; + } + _wavemax = wavemax; + } + void finish() { + if (VoiceData *voice = _doc ? _doc->voice() : 0) { + if (!_waveform.isEmpty()) { + voice->waveform = _waveform; + voice->wavemax = _wavemax; + } + if (voice->waveform.isEmpty()) { + voice->waveform.resize(1); + voice->waveform[0] = -2; + voice->wavemax = 0; + } else if (voice->waveform[0] < 0) { + voice->waveform[0] = -2; + voice->wavemax = 0; + } + const DocumentItems &items(App::documentItems()); + DocumentItems::const_iterator i = items.constFind(_doc); + if (i != items.cend()) { + for (HistoryItemsMap::const_iterator j = i->cbegin(), e = i->cend(); j != e; ++j) { + Ui::repaintHistoryItem(j.key()); + } + } + } + } + virtual ~CountWaveformTask() { + if (_data.isEmpty() && _doc) { + _loc.accessDisable(); + } + } + + protected: + DocumentData *_doc; + FileLocation _loc; + QByteArray _data; + VoiceWaveform _waveform; + char _wavemax; + + }; + + void countVoiceWaveform(DocumentData *document) { + if (VoiceData *voice = document->voice()) { + if (_localLoader) { + voice->waveform.resize(1 + sizeof(TaskId)); + voice->waveform[0] = -1; // counting + TaskId taskId = _localLoader->addTask(new CountWaveformTask(document)); + memcpy(voice->waveform.data() + 1, &taskId, sizeof(taskId)); + } + } + } + void cancelTask(TaskId id) { if (_localLoader) { _localLoader->cancelTask(id); diff --git a/Telegram/SourceFiles/localstorage.h b/Telegram/SourceFiles/localstorage.h index 7bc16304bfece4..607ec9d0ff9819 100644 --- a/Telegram/SourceFiles/localstorage.h +++ b/Telegram/SourceFiles/localstorage.h @@ -144,6 +144,8 @@ namespace Local { int32 hasWebFiles(); qint64 storageWebFilesSize(); + void countVoiceWaveform(DocumentData *document); + void cancelTask(TaskId id); void writeStickers(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 779a93bacc3274..d64f8004a64abc 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1124,9 +1124,9 @@ bool MainWidget::kickParticipantFail(ChatData *chat, const RPCError &error) { void MainWidget::checkPeerHistory(PeerData *peer) { if (peer->isChannel() && !peer->isMegagroup()) { - MTP::send(MTPchannels_GetImportantHistory(peer->asChannel()->inputChannel, MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), rpcDone(&MainWidget::checkedHistory, peer)); + MTP::send(MTPchannels_GetImportantHistory(peer->asChannel()->inputChannel, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), rpcDone(&MainWidget::checkedHistory, peer)); } else { - MTP::send(MTPmessages_GetHistory(peer->input, MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), rpcDone(&MainWidget::checkedHistory, peer)); + MTP::send(MTPmessages_GetHistory(peer->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), rpcDone(&MainWidget::checkedHistory, peer)); } } @@ -1479,9 +1479,9 @@ void MainWidget::mediaOverviewUpdated(PeerData *peer, MediaOverviewType type) { switch (i) { case OverviewPhotos: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaPhotos, lang(lng_media_type_photos))), SIGNAL(clicked()), this, SLOT(onPhotosSelect())); break; case OverviewVideos: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaVideos, lang(lng_media_type_videos))), SIGNAL(clicked()), this, SLOT(onVideosSelect())); break; - case OverviewAudioDocuments: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaSongs, lang(lng_media_type_songs))), SIGNAL(clicked()), this, SLOT(onSongsSelect())); break; - case OverviewDocuments: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaDocuments, lang(lng_media_type_files))), SIGNAL(clicked()), this, SLOT(onDocumentsSelect())); break; - case OverviewAudios: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaAudios, lang(lng_media_type_audios))), SIGNAL(clicked()), this, SLOT(onAudiosSelect())); break; + case OverviewMusicFiles: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaSongs, lang(lng_media_type_songs))), SIGNAL(clicked()), this, SLOT(onSongsSelect())); break; + case OverviewFiles: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaDocuments, lang(lng_media_type_files))), SIGNAL(clicked()), this, SLOT(onDocumentsSelect())); break; + case OverviewVoiceFiles: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaAudios, lang(lng_media_type_audios))), SIGNAL(clicked()), this, SLOT(onAudiosSelect())); break; case OverviewLinks: connect(_mediaType.addButton(new IconedButton(this, st::dropdownMediaLinks, lang(lng_media_type_links))), SIGNAL(clicked()), this, SLOT(onLinksSelect())); break; } } @@ -1709,24 +1709,6 @@ void MainWidget::videoLoadRetry() { if (video) video->save(failedFileName); } -void MainWidget::audioLoadProgress(FileLoader *loader) { - mtpFileLoader *l = loader ? loader->mtpLoader() : 0; - if (!l) return; - - AudioData *audio = App::audio(l->objId()); - if (audio->loaded()) { - audio->performActionOnLoad(); - } - - const AudioItems &items(App::audioItems()); - AudioItems::const_iterator i = items.constFind(audio); - if (i != items.cend()) { - for (HistoryItemsMap::const_iterator j = i->cbegin(), e = i->cend(); j != e; ++j) { - Ui::repaintHistoryItem(j.key()); - } - } -} - void MainWidget::audioPlayProgress(const AudioMsgId &audioId) { AudioMsgId playing; AudioPlayerState state = AudioPlayerStopped; @@ -1734,7 +1716,7 @@ void MainWidget::audioPlayProgress(const AudioMsgId &audioId) { if (playing == audioId && state == AudioPlayerStoppedAtStart) { audioPlayer()->clearStoppedAtStart(audioId); - AudioData *audio = audioId.audio; + DocumentData *audio = audioId.audio; QString already = audio->already(true); if (already.isEmpty() && !audio->data().isEmpty()) { bool mp3 = (audio->mime == qstr("audio/mp3")); @@ -1746,7 +1728,7 @@ void MainWidget::audioPlayProgress(const AudioMsgId &audioId) { f.close(); already = filename; audio->setLocation(FileLocation(StorageFilePartial, filename)); - Local::writeFileLocation(mediaKey(mtpToLocationType(mtpc_inputAudioFileLocation), audio->dc, audio->id), FileLocation(mtpToStorageType(mtpc_storage_filePartial), filename)); + Local::writeFileLocation(mediaKey(AudioFileLocation, audio->dc, audio->id), FileLocation(mtpToStorageType(mtpc_storage_filePartial), filename)); } } } @@ -1794,7 +1776,7 @@ void MainWidget::documentPlayProgress(const SongMsgId &songId) { f.close(); already = filename; document->setLocation(FileLocation(StorageFilePartial, filename)); - Local::writeFileLocation(mediaKey(mtpToLocationType(mtpc_inputDocumentFileLocation), document->dc, document->id), FileLocation(mtpToStorageType(mtpc_storage_filePartial), filename)); + Local::writeFileLocation(mediaKey(DocumentFileLocation, document->dc, document->id), FileLocation(mtpToStorageType(mtpc_storage_filePartial), filename)); } } } @@ -1831,24 +1813,6 @@ void MainWidget::hidePlayer() { } } -void MainWidget::audioLoadFailed(FileLoader *loader, bool started) { - mtpFileLoader *l = loader ? loader->mtpLoader() : 0; - if (!l) return; - - loadFailed(l, started, SLOT(audioLoadRetry())); - AudioData *audio = App::audio(l->objId()); - if (audio) { - if (audio->loading()) audio->cancel(); - audio->status = FileDownloadFailed; - } -} - -void MainWidget::audioLoadRetry() { - Ui::hideLayer(); - AudioData *audio = App::audio(failedObjId); - if (audio) audio->save(failedFileName); -} - void MainWidget::documentLoadProgress(FileLoader *loader) { mtpFileLoader *l = loader ? loader->mtpLoader() : 0; if (!l) return; @@ -1915,9 +1879,9 @@ void MainWidget::inlineResultLoadFailed(FileLoader *loader, bool started) { //Ui::repaintInlineItem(); } -void MainWidget::audioMarkRead(AudioData *data) { - const AudioItems &items(App::audioItems()); - AudioItems::const_iterator i = items.constFind(data); +void MainWidget::audioMarkRead(DocumentData *data) { + const DocumentItems &items(App::documentItems()); + DocumentItems::const_iterator i = items.constFind(data); if (i != items.cend()) { mediaMarkRead(i.value()); } @@ -2428,7 +2392,7 @@ void MainWidget::showMediaOverview(PeerData *peer, MediaOverviewType type, bool if (overview && overview->peer() == peer) { if (overview->type() != type) { overview->switchType(type); - } else if (type == OverviewAudioDocuments) { // hack for player + } else if (type == OverviewMusicFiles) { // hack for player showBackFromStack(); } return; @@ -2872,17 +2836,17 @@ void MainWidget::onVideosSelect() { } void MainWidget::onSongsSelect() { - if (overview) overview->switchType(OverviewAudioDocuments); + if (overview) overview->switchType(OverviewMusicFiles); _mediaType.hideStart(); } void MainWidget::onDocumentsSelect() { - if (overview) overview->switchType(OverviewDocuments); + if (overview) overview->switchType(OverviewFiles); _mediaType.hideStart(); } void MainWidget::onAudiosSelect() { - if (overview) overview->switchType(OverviewAudios); + if (overview) overview->switchType(OverviewVoiceFiles); _mediaType.hideStart(); } diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index ffb357d81c344c..b20465ef8a6a0d 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -375,7 +375,7 @@ class MainWidget : public TWidget, public RPCSender { void cancelForwarding(); void finishForwarding(History *hist, bool broadcast); // send them - void audioMarkRead(AudioData *data); + void audioMarkRead(DocumentData *data); void videoMarkRead(VideoData *data); void mediaMarkRead(const HistoryItemsMap &items); @@ -448,9 +448,6 @@ public slots: void videoLoadProgress(FileLoader *loader); void videoLoadFailed(FileLoader *loader, bool started); void videoLoadRetry(); - void audioLoadProgress(FileLoader *loader); - void audioLoadFailed(FileLoader *loader, bool started); - void audioLoadRetry(); void audioPlayProgress(const AudioMsgId &audioId); void documentLoadProgress(FileLoader *loader); void documentLoadFailed(FileLoader *loader, bool started); diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 84af93dba5918d..a73603e0166660 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -363,7 +363,7 @@ void MediaView::updateControls() { _dateNav = myrtlrect(st::mvTextLeft, height() - st::mvTextTop, st::mvFont->width(_dateText), st::mvFont->height); } updateHeader(); - if (_photo || (_history && (_overview == OverviewPhotos || _overview == OverviewDocuments))) { + if (_photo || (_history && (_overview == OverviewPhotos || _overview == OverviewFiles))) { _leftNavVisible = (_index > 0) || (_index == 0 && ( (!_msgmigrated && _history && _history->overview[_overview].size() < _history->overviewCount(_overview)) || (_msgmigrated && _migrated && _migrated->overview[_overview].size() < _migrated->overviewCount(_overview)) || @@ -865,7 +865,7 @@ void MediaView::showDocument(DocumentData *doc, HistoryItem *context) { _canForward = _msgid > 0; _canDelete = context ? context->canDelete() : false; if (_history) { - _overview = OverviewDocuments; + _overview = OverviewFiles; findCurrent(); } displayDocument(doc, context); @@ -1486,7 +1486,7 @@ void MediaView::keyPressEvent(QKeyEvent *e) { } void MediaView::moveToNext(int32 delta) { - if (_index < 0 || (_history && _overview != OverviewPhotos && _overview != OverviewDocuments) || (_overview == OverviewCount && !_user)) { + if (_index < 0 || (_history && _overview != OverviewPhotos && _overview != OverviewFiles) || (_overview == OverviewCount && !_user)) { return; } if (_msgmigrated && !_history->overviewLoaded(_overview)) { @@ -1515,7 +1515,7 @@ void MediaView::moveToNext(int32 delta) { if (HistoryMedia *media = item->getMedia()) { switch (media->type()) { case MediaTypePhoto: displayPhoto(static_cast(item->getMedia())->photo(), item); preloadData(delta); break; - case MediaTypeDocument: + case MediaTypeFile: case MediaTypeGif: case MediaTypeSticker: displayDocument(media->getDocument(), item); preloadData(delta); break; } @@ -1562,7 +1562,7 @@ void MediaView::preloadData(int32 delta) { if (HistoryMedia *media = item->getMedia()) { switch (media->type()) { case MediaTypePhoto: static_cast(media)->photo()->forget(); break; - case MediaTypeDocument: + case MediaTypeFile: case MediaTypeGif: case MediaTypeSticker: media->getDocument()->forget(); break; } @@ -1587,7 +1587,7 @@ void MediaView::preloadData(int32 delta) { if (HistoryMedia *media = item->getMedia()) { switch (media->type()) { case MediaTypePhoto: static_cast(media)->photo()->download(); break; - case MediaTypeDocument: + case MediaTypeFile: case MediaTypeGif: { DocumentData *doc = media->getDocument(); doc->thumb->load(); diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index 60d05a96aa4cc0..b0059077c1b261 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -368,7 +368,7 @@ static const mtpTypeId mtpLayers[] = { mtpTypeId(mtpc_invokeWithLayer18), }; static const uint32 mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]); -static const mtpPrime mtpCurrentLayer = 45; +static const mtpPrime mtpCurrentLayer = 46; template class MTPBoxed : public bareT { diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index e7c7f20c9723d0..bfbababece7424 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -388,7 +388,7 @@ bool mtpFileLoader::loadPart() { } else { switch (_locationType) { case VideoFileLocation: loc = MTP_inputVideoFileLocation(MTP_long(_id), MTP_long(_access)); break; - case AudioFileLocation: loc = MTP_inputAudioFileLocation(MTP_long(_id), MTP_long(_access)); break; + case AudioFileLocation: loc = MTP_inputDocumentFileLocation(MTP_long(_id), MTP_long(_access)); break; case DocumentFileLocation: loc = MTP_inputDocumentFileLocation(MTP_long(_id), MTP_long(_access)); break; default: cancel(true); return false; break; } diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.h b/Telegram/SourceFiles/mtproto/mtpFileLoader.h index d9f06aec1baaa8..9446c979b5a689 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.h +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.h @@ -30,23 +30,6 @@ enum LocationType { AudioFileLocation = 0x74dc404d, // mtpc_inputAudioFileLocation VideoFileLocation = 0x3d0364ec, // mtpc_inputVideoFileLocation }; -inline LocationType mtpToLocationType(mtpTypeId type) { - switch (type) { - case mtpc_inputDocumentFileLocation: return DocumentFileLocation; - case mtpc_inputAudioFileLocation: return AudioFileLocation; - case mtpc_inputVideoFileLocation: return VideoFileLocation; - default: return UnknownFileLocation; - } -} -inline mtpTypeId mtpFromLocationType(LocationType type) { - switch (type) { - case DocumentFileLocation: return mtpc_inputDocumentFileLocation; - case AudioFileLocation: return mtpc_inputAudioFileLocation; - case VideoFileLocation: return mtpc_inputVideoFileLocation; - case UnknownFileLocation: - default: return 0; - } -} enum StorageFileType { StorageFileUnknown = 0xaa963b05, // mtpc_storage_fileUnknown diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index aa213c7edaea4f..4da8bb3337c8ec 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -693,34 +693,6 @@ void _serialize_inputMediaVideo(MTPStringLogger &to, int32 stage, int32 lev, Typ } } -void _serialize_inputMediaUploadedAudio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputMediaUploadedAudio"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" mime_type: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - -void _serialize_inputMediaAudio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputMediaAudio"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputMediaUploadedDocument(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -928,20 +900,6 @@ void _serialize_inputEncryptedFileLocation(MTPStringLogger &to, int32 stage, int } } -void _serialize_inputAudioFileLocation(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputAudioFileLocation"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputDocumentFileLocation(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -1279,14 +1237,15 @@ void _serialize_channel(MTPStringLogger &to, int32 stage, int32 lev, Types &type case 7: to.add(" verified: "); ++stages.back(); if (flag & MTPDchannel::flag_verified) { to.add("YES [ BY BIT 7 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; case 8: to.add(" megagroup: "); ++stages.back(); if (flag & MTPDchannel::flag_megagroup) { to.add("YES [ BY BIT 8 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; case 9: to.add(" restricted: "); ++stages.back(); if (flag & MTPDchannel::flag_restricted) { to.add("YES [ BY BIT 9 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; - case 10: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 11: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 12: to.add(" title: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 13: to.add(" username: "); ++stages.back(); if (flag & MTPDchannel::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; - case 14: to.add(" photo: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 15: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 16: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 17: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDchannel::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; + case 10: to.add(" invites_enabled: "); ++stages.back(); if (flag & MTPDchannel::flag_invites_enabled) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 11: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 12: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 13: to.add(" title: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 14: to.add(" username: "); ++stages.back(); if (flag & MTPDchannel::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 15: to.add(" photo: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 16: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 17: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 18: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDchannel::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -1587,19 +1546,6 @@ void _serialize_messageMediaDocument(MTPStringLogger &to, int32 stage, int32 lev } } -void _serialize_messageMediaAudio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messageMediaAudio"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" audio: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_messageMediaWebPage(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -2189,20 +2135,6 @@ void _serialize_contactBlocked(MTPStringLogger &to, int32 stage, int32 lev, Type } } -void _serialize_contactSuggested(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contactSuggested"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" mutual_contacts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_contactStatus(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -2294,20 +2226,6 @@ void _serialize_contacts_blockedSlice(MTPStringLogger &to, int32 stage, int32 le } } -void _serialize_contacts_suggested(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_suggested"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" results: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" users: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_messages_dialogs(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -2458,14 +2376,6 @@ void _serialize_inputMessagesFilterDocument(MTPStringLogger &to, int32 stage, in to.add("{ inputMessagesFilterDocument }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } -void _serialize_inputMessagesFilterAudio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - to.add("{ inputMessagesFilterAudio }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); -} - -void _serialize_inputMessagesFilterAudioDocuments(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - to.add("{ inputMessagesFilterAudioDocuments }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); -} - void _serialize_inputMessagesFilterUrl(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { to.add("{ inputMessagesFilterUrl }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } @@ -2474,6 +2384,14 @@ void _serialize_inputMessagesFilterGif(MTPStringLogger &to, int32 stage, int32 l to.add("{ inputMessagesFilterGif }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } +void _serialize_inputMessagesFilterVoice(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + to.add("{ inputMessagesFilterVoice }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + +void _serialize_inputMessagesFilterMusic(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + to.add("{ inputMessagesFilterMusic }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + void _serialize_updateNewMessage(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -3067,6 +2985,21 @@ void _serialize_updateBotInlineQuery(MTPStringLogger &to, int32 stage, int32 lev } } +void _serialize_updateBotInlineSend(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ updateBotInlineSend"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" query: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" id: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_updates_state(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -3673,24 +3606,6 @@ void _serialize_messages_sentEncryptedFile(MTPStringLogger &to, int32 stage, int } } -void _serialize_inputAudioEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - to.add("{ inputAudioEmpty }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); -} - -void _serialize_inputAudio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputAudio"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputDocumentEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { to.add("{ inputDocumentEmpty }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } @@ -3709,38 +3624,6 @@ void _serialize_inputDocument(MTPStringLogger &to, int32 stage, int32 lev, Types } } -void _serialize_audioEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ audioEmpty"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - -void _serialize_audio(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ audio"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" mime_type: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" size: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" dc_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_documentEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -3908,10 +3791,18 @@ void _serialize_inputPrivacyKeyStatusTimestamp(MTPStringLogger &to, int32 stage, to.add("{ inputPrivacyKeyStatusTimestamp }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } +void _serialize_inputPrivacyKeyChatInvite(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + to.add("{ inputPrivacyKeyChatInvite }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + void _serialize_privacyKeyStatusTimestamp(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { to.add("{ privacyKeyStatusTimestamp }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } +void _serialize_privacyKeyChatInvite(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + to.add("{ privacyKeyChatInvite }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); +} + void _serialize_inputPrivacyValueAllowContacts(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { to.add("{ inputPrivacyValueAllowContacts }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } @@ -4092,9 +3983,12 @@ void _serialize_documentAttributeAudio(MTPStringLogger &to, int32 stage, int32 l to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" title: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" performer: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" voice: "); ++stages.back(); if (flag & MTPDdocumentAttributeAudio::flag_voice) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 2: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" title: "); ++stages.back(); if (flag & MTPDdocumentAttributeAudio::flag_title) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 4: to.add(" performer: "); ++stages.back(); if (flag & MTPDdocumentAttributeAudio::flag_performer) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 5: to.add(" waveform: "); ++stages.back(); if (flag & MTPDdocumentAttributeAudio::flag_waveform) { types.push_back(mtpc_bytes); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6373,19 +6267,6 @@ void _serialize_contacts_importContacts(MTPStringLogger &to, int32 stage, int32 } } -void _serialize_contacts_getSuggested(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ contacts_getSuggested"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_contacts_deleteContact(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -6482,10 +6363,11 @@ void _serialize_messages_getHistory(MTPStringLogger &to, int32 stage, int32 lev, switch (stage) { case 0: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" offset_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" add_offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" min_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" offset_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" add_offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" min_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6539,10 +6421,11 @@ void _serialize_channels_getImportantHistory(MTPStringLogger &to, int32 stage, i switch (stage) { case 0: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" offset_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" add_offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" min_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" offset_date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" add_offset: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" max_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" min_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -7063,6 +6946,20 @@ void _serialize_channels_deleteChannel(MTPStringLogger &to, int32 stage, int32 l } } +void _serialize_channels_toggleInvites(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_toggleInvites"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" enabled: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_messages_getChats(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -7678,8 +7575,6 @@ namespace { _serializers.insert(mtpc_inputMediaUploadedVideo, _serialize_inputMediaUploadedVideo); _serializers.insert(mtpc_inputMediaUploadedThumbVideo, _serialize_inputMediaUploadedThumbVideo); _serializers.insert(mtpc_inputMediaVideo, _serialize_inputMediaVideo); - _serializers.insert(mtpc_inputMediaUploadedAudio, _serialize_inputMediaUploadedAudio); - _serializers.insert(mtpc_inputMediaAudio, _serialize_inputMediaAudio); _serializers.insert(mtpc_inputMediaUploadedDocument, _serialize_inputMediaUploadedDocument); _serializers.insert(mtpc_inputMediaUploadedThumbDocument, _serialize_inputMediaUploadedThumbDocument); _serializers.insert(mtpc_inputMediaDocument, _serialize_inputMediaDocument); @@ -7697,7 +7592,6 @@ namespace { _serializers.insert(mtpc_inputFileLocation, _serialize_inputFileLocation); _serializers.insert(mtpc_inputVideoFileLocation, _serialize_inputVideoFileLocation); _serializers.insert(mtpc_inputEncryptedFileLocation, _serialize_inputEncryptedFileLocation); - _serializers.insert(mtpc_inputAudioFileLocation, _serialize_inputAudioFileLocation); _serializers.insert(mtpc_inputDocumentFileLocation, _serialize_inputDocumentFileLocation); _serializers.insert(mtpc_inputPhotoCropAuto, _serialize_inputPhotoCropAuto); _serializers.insert(mtpc_inputPhotoCrop, _serialize_inputPhotoCrop); @@ -7751,7 +7645,6 @@ namespace { _serializers.insert(mtpc_messageMediaContact, _serialize_messageMediaContact); _serializers.insert(mtpc_messageMediaUnsupported, _serialize_messageMediaUnsupported); _serializers.insert(mtpc_messageMediaDocument, _serialize_messageMediaDocument); - _serializers.insert(mtpc_messageMediaAudio, _serialize_messageMediaAudio); _serializers.insert(mtpc_messageMediaWebPage, _serialize_messageMediaWebPage); _serializers.insert(mtpc_messageMediaVenue, _serialize_messageMediaVenue); _serializers.insert(mtpc_messageActionEmpty, _serialize_messageActionEmpty); @@ -7802,7 +7695,6 @@ namespace { _serializers.insert(mtpc_contact, _serialize_contact); _serializers.insert(mtpc_importedContact, _serialize_importedContact); _serializers.insert(mtpc_contactBlocked, _serialize_contactBlocked); - _serializers.insert(mtpc_contactSuggested, _serialize_contactSuggested); _serializers.insert(mtpc_contactStatus, _serialize_contactStatus); _serializers.insert(mtpc_contacts_link, _serialize_contacts_link); _serializers.insert(mtpc_contacts_contactsNotModified, _serialize_contacts_contactsNotModified); @@ -7810,7 +7702,6 @@ namespace { _serializers.insert(mtpc_contacts_importedContacts, _serialize_contacts_importedContacts); _serializers.insert(mtpc_contacts_blocked, _serialize_contacts_blocked); _serializers.insert(mtpc_contacts_blockedSlice, _serialize_contacts_blockedSlice); - _serializers.insert(mtpc_contacts_suggested, _serialize_contacts_suggested); _serializers.insert(mtpc_messages_dialogs, _serialize_messages_dialogs); _serializers.insert(mtpc_messages_dialogsSlice, _serialize_messages_dialogsSlice); _serializers.insert(mtpc_messages_messages, _serialize_messages_messages); @@ -7825,10 +7716,10 @@ namespace { _serializers.insert(mtpc_inputMessagesFilterPhotoVideo, _serialize_inputMessagesFilterPhotoVideo); _serializers.insert(mtpc_inputMessagesFilterPhotoVideoDocuments, _serialize_inputMessagesFilterPhotoVideoDocuments); _serializers.insert(mtpc_inputMessagesFilterDocument, _serialize_inputMessagesFilterDocument); - _serializers.insert(mtpc_inputMessagesFilterAudio, _serialize_inputMessagesFilterAudio); - _serializers.insert(mtpc_inputMessagesFilterAudioDocuments, _serialize_inputMessagesFilterAudioDocuments); _serializers.insert(mtpc_inputMessagesFilterUrl, _serialize_inputMessagesFilterUrl); _serializers.insert(mtpc_inputMessagesFilterGif, _serialize_inputMessagesFilterGif); + _serializers.insert(mtpc_inputMessagesFilterVoice, _serialize_inputMessagesFilterVoice); + _serializers.insert(mtpc_inputMessagesFilterMusic, _serialize_inputMessagesFilterMusic); _serializers.insert(mtpc_updateNewMessage, _serialize_updateNewMessage); _serializers.insert(mtpc_updateMessageID, _serialize_updateMessageID); _serializers.insert(mtpc_updateDeleteMessages, _serialize_updateDeleteMessages); @@ -7871,6 +7762,7 @@ namespace { _serializers.insert(mtpc_updateStickerSets, _serialize_updateStickerSets); _serializers.insert(mtpc_updateSavedGifs, _serialize_updateSavedGifs); _serializers.insert(mtpc_updateBotInlineQuery, _serialize_updateBotInlineQuery); + _serializers.insert(mtpc_updateBotInlineSend, _serialize_updateBotInlineSend); _serializers.insert(mtpc_updates_state, _serialize_updates_state); _serializers.insert(mtpc_updates_differenceEmpty, _serialize_updates_differenceEmpty); _serializers.insert(mtpc_updates_difference, _serialize_updates_difference); @@ -7910,12 +7802,8 @@ namespace { _serializers.insert(mtpc_messages_dhConfig, _serialize_messages_dhConfig); _serializers.insert(mtpc_messages_sentEncryptedMessage, _serialize_messages_sentEncryptedMessage); _serializers.insert(mtpc_messages_sentEncryptedFile, _serialize_messages_sentEncryptedFile); - _serializers.insert(mtpc_inputAudioEmpty, _serialize_inputAudioEmpty); - _serializers.insert(mtpc_inputAudio, _serialize_inputAudio); _serializers.insert(mtpc_inputDocumentEmpty, _serialize_inputDocumentEmpty); _serializers.insert(mtpc_inputDocument, _serialize_inputDocument); - _serializers.insert(mtpc_audioEmpty, _serialize_audioEmpty); - _serializers.insert(mtpc_audio, _serialize_audio); _serializers.insert(mtpc_documentEmpty, _serialize_documentEmpty); _serializers.insert(mtpc_document, _serialize_document); _serializers.insert(mtpc_help_support, _serialize_help_support); @@ -7935,7 +7823,9 @@ namespace { _serializers.insert(mtpc_sendMessageChooseContactAction, _serialize_sendMessageChooseContactAction); _serializers.insert(mtpc_contacts_found, _serialize_contacts_found); _serializers.insert(mtpc_inputPrivacyKeyStatusTimestamp, _serialize_inputPrivacyKeyStatusTimestamp); + _serializers.insert(mtpc_inputPrivacyKeyChatInvite, _serialize_inputPrivacyKeyChatInvite); _serializers.insert(mtpc_privacyKeyStatusTimestamp, _serialize_privacyKeyStatusTimestamp); + _serializers.insert(mtpc_privacyKeyChatInvite, _serialize_privacyKeyChatInvite); _serializers.insert(mtpc_inputPrivacyValueAllowContacts, _serialize_inputPrivacyValueAllowContacts); _serializers.insert(mtpc_inputPrivacyValueAllowAll, _serialize_inputPrivacyValueAllowAll); _serializers.insert(mtpc_inputPrivacyValueAllowUsers, _serialize_inputPrivacyValueAllowUsers); @@ -8133,7 +8023,6 @@ namespace { _serializers.insert(mtpc_contacts_getStatuses, _serialize_contacts_getStatuses); _serializers.insert(mtpc_contacts_getContacts, _serialize_contacts_getContacts); _serializers.insert(mtpc_contacts_importContacts, _serialize_contacts_importContacts); - _serializers.insert(mtpc_contacts_getSuggested, _serialize_contacts_getSuggested); _serializers.insert(mtpc_contacts_deleteContact, _serialize_contacts_deleteContact); _serializers.insert(mtpc_contacts_getBlocked, _serialize_contacts_getBlocked); _serializers.insert(mtpc_contacts_exportCard, _serialize_contacts_exportCard); @@ -8180,6 +8069,7 @@ namespace { _serializers.insert(mtpc_channels_inviteToChannel, _serialize_channels_inviteToChannel); _serializers.insert(mtpc_channels_kickFromChannel, _serialize_channels_kickFromChannel); _serializers.insert(mtpc_channels_deleteChannel, _serialize_channels_deleteChannel); + _serializers.insert(mtpc_channels_toggleInvites, _serialize_channels_toggleInvites); _serializers.insert(mtpc_messages_getChats, _serialize_messages_getChats); _serializers.insert(mtpc_channels_getChannels, _serialize_channels_getChannels); _serializers.insert(mtpc_messages_getFullChat, _serialize_messages_getFullChat); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 09450332c47d5b..98bcc93e0e66cf 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -90,8 +90,6 @@ enum { mtpc_inputMediaUploadedVideo = 0x82713fdf, mtpc_inputMediaUploadedThumbVideo = 0x7780ddf9, mtpc_inputMediaVideo = 0x936a4ebd, - mtpc_inputMediaUploadedAudio = 0x4e498cab, - mtpc_inputMediaAudio = 0x89938781, mtpc_inputMediaUploadedDocument = 0x1d89306d, mtpc_inputMediaUploadedThumbDocument = 0xad613491, mtpc_inputMediaDocument = 0x1a77f29c, @@ -109,7 +107,6 @@ enum { mtpc_inputFileLocation = 0x14637196, mtpc_inputVideoFileLocation = 0x3d0364ec, mtpc_inputEncryptedFileLocation = 0xf5235d55, - mtpc_inputAudioFileLocation = 0x74dc404d, mtpc_inputDocumentFileLocation = 0x4e45abe9, mtpc_inputPhotoCropAuto = 0xade6b004, mtpc_inputPhotoCrop = 0xd9915325, @@ -163,7 +160,6 @@ enum { mtpc_messageMediaContact = 0x5e7d2f39, mtpc_messageMediaUnsupported = 0x9f84f49e, mtpc_messageMediaDocument = 0xf3e02ea8, - mtpc_messageMediaAudio = 0xc6b68300, mtpc_messageMediaWebPage = 0xa32dd600, mtpc_messageMediaVenue = 0x7912b71f, mtpc_messageActionEmpty = 0xb6aef7b0, @@ -214,7 +210,6 @@ enum { mtpc_contact = 0xf911c994, mtpc_importedContact = 0xd0028438, mtpc_contactBlocked = 0x561bc879, - mtpc_contactSuggested = 0x3de191a1, mtpc_contactStatus = 0xd3680c61, mtpc_contacts_link = 0x3ace484c, mtpc_contacts_contactsNotModified = 0xb74ba9d2, @@ -222,7 +217,6 @@ enum { mtpc_contacts_importedContacts = 0xad524315, mtpc_contacts_blocked = 0x1c138d15, mtpc_contacts_blockedSlice = 0x900802a1, - mtpc_contacts_suggested = 0x5649dcc5, mtpc_messages_dialogs = 0x15ba6c40, mtpc_messages_dialogsSlice = 0x71e094f3, mtpc_messages_messages = 0x8c718e87, @@ -237,10 +231,10 @@ enum { mtpc_inputMessagesFilterPhotoVideo = 0x56e9f0e4, mtpc_inputMessagesFilterPhotoVideoDocuments = 0xd95e73bb, mtpc_inputMessagesFilterDocument = 0x9eddf188, - mtpc_inputMessagesFilterAudio = 0xcfc87522, - mtpc_inputMessagesFilterAudioDocuments = 0x5afbf764, mtpc_inputMessagesFilterUrl = 0x7ef0dd87, mtpc_inputMessagesFilterGif = 0xffc86587, + mtpc_inputMessagesFilterVoice = 0x50f5c392, + mtpc_inputMessagesFilterMusic = 0x3751b49e, mtpc_updateNewMessage = 0x1f2b0afd, mtpc_updateMessageID = 0x4e90bfd6, mtpc_updateDeleteMessages = 0xa20db0e5, @@ -283,6 +277,7 @@ enum { mtpc_updateStickerSets = 0x43ae3dec, mtpc_updateSavedGifs = 0x9375341e, mtpc_updateBotInlineQuery = 0xc01eea08, + mtpc_updateBotInlineSend = 0xf69e113, mtpc_updates_state = 0xa56c2a3e, mtpc_updates_differenceEmpty = 0x5d75a138, mtpc_updates_difference = 0xf49ca0, @@ -322,12 +317,8 @@ enum { mtpc_messages_dhConfig = 0x2c221edd, mtpc_messages_sentEncryptedMessage = 0x560f8935, mtpc_messages_sentEncryptedFile = 0x9493ff32, - mtpc_inputAudioEmpty = 0xd95adc84, - mtpc_inputAudio = 0x77d440ff, mtpc_inputDocumentEmpty = 0x72f0eaae, mtpc_inputDocument = 0x18798952, - mtpc_audioEmpty = 0x586988d8, - mtpc_audio = 0xf9e35055, mtpc_documentEmpty = 0x36f8c871, mtpc_document = 0xf9a39f4f, mtpc_help_support = 0x17c6b5f6, @@ -347,7 +338,9 @@ enum { mtpc_sendMessageChooseContactAction = 0x628cbc6f, mtpc_contacts_found = 0x1aa1f784, mtpc_inputPrivacyKeyStatusTimestamp = 0x4f96cb18, + mtpc_inputPrivacyKeyChatInvite = 0xbdfb0426, mtpc_privacyKeyStatusTimestamp = 0xbc2eab30, + mtpc_privacyKeyChatInvite = 0x500e6dfa, mtpc_inputPrivacyValueAllowContacts = 0xd09e07b, mtpc_inputPrivacyValueAllowAll = 0x184b35ce, mtpc_inputPrivacyValueAllowUsers = 0x131cc67f, @@ -367,7 +360,7 @@ enum { mtpc_documentAttributeAnimated = 0x11b58939, mtpc_documentAttributeSticker = 0x3a556302, mtpc_documentAttributeVideo = 0x5910cccb, - mtpc_documentAttributeAudio = 0xded218e0, + mtpc_documentAttributeAudio = 0x9852f9c6, mtpc_documentAttributeFilename = 0x15590068, mtpc_messages_stickersNotModified = 0xf1749a22, mtpc_messages_stickers = 0x8a8ecd32, @@ -388,7 +381,7 @@ enum { mtpc_account_noPassword = 0x96dabc18, mtpc_account_password = 0x7c18141c, mtpc_account_passwordSettings = 0xb7b72ab3, - mtpc_account_passwordInputSettings = 0xbcfc532c, + mtpc_account_passwordInputSettings = 0x86916deb, mtpc_auth_passwordRecovery = 0x137948a5, mtpc_receivedNotifyMessage = 0xa384b779, mtpc_chatInviteEmpty = 0x69df3769, @@ -512,7 +505,6 @@ enum { mtpc_contacts_getStatuses = 0xc4a353ee, mtpc_contacts_getContacts = 0x22c6aa08, mtpc_contacts_importContacts = 0xda30b32d, - mtpc_contacts_getSuggested = 0xcd773428, mtpc_contacts_deleteContact = 0x8e953744, mtpc_contacts_deleteContacts = 0x59ab389e, mtpc_contacts_block = 0x332b49fc, @@ -524,7 +516,7 @@ enum { mtpc_contacts_resolveUsername = 0xf93ccba3, mtpc_messages_getMessages = 0x4222fa74, mtpc_messages_getDialogs = 0x6b47f94d, - mtpc_messages_getHistory = 0x8a8ec2da, + mtpc_messages_getHistory = 0xafa92846, mtpc_messages_search = 0xd4569248, mtpc_messages_readHistory = 0xe306d3a, mtpc_messages_deleteHistory = 0xb7c13bd9, @@ -597,7 +589,7 @@ enum { mtpc_help_getAppChangelog = 0x5bab7fb2, mtpc_help_getTermsOfService = 0x37d78f83, mtpc_channels_getDialogs = 0xa9d3d249, - mtpc_channels_getImportantHistory = 0xddb929cb, + mtpc_channels_getImportantHistory = 0x8f494bb2, mtpc_channels_readHistory = 0xcc104937, mtpc_channels_deleteMessages = 0x84c1fd4e, mtpc_channels_deleteUserHistory = 0xd10dd71b, @@ -620,7 +612,8 @@ enum { mtpc_channels_inviteToChannel = 0x199f3a6c, mtpc_channels_kickFromChannel = 0xa672de14, mtpc_channels_exportInvite = 0xc7560885, - mtpc_channels_deleteChannel = 0xc0111fe3 + mtpc_channels_deleteChannel = 0xc0111fe3, + mtpc_channels_toggleInvites = 0x49609307 }; // Type forward declarations @@ -725,8 +718,6 @@ class MTPDinputMediaContact; class MTPDinputMediaUploadedVideo; class MTPDinputMediaUploadedThumbVideo; class MTPDinputMediaVideo; -class MTPDinputMediaUploadedAudio; -class MTPDinputMediaAudio; class MTPDinputMediaUploadedDocument; class MTPDinputMediaUploadedThumbDocument; class MTPDinputMediaDocument; @@ -750,7 +741,6 @@ class MTPinputFileLocation; class MTPDinputFileLocation; class MTPDinputVideoFileLocation; class MTPDinputEncryptedFileLocation; -class MTPDinputAudioFileLocation; class MTPDinputDocumentFileLocation; class MTPinputPhotoCrop; @@ -815,7 +805,6 @@ class MTPDmessageMediaVideo; class MTPDmessageMediaGeo; class MTPDmessageMediaContact; class MTPDmessageMediaDocument; -class MTPDmessageMediaAudio; class MTPDmessageMediaWebPage; class MTPDmessageMediaVenue; @@ -895,9 +884,6 @@ class MTPDimportedContact; class MTPcontactBlocked; class MTPDcontactBlocked; -class MTPcontactSuggested; -class MTPDcontactSuggested; - class MTPcontactStatus; class MTPDcontactStatus; @@ -914,9 +900,6 @@ class MTPcontacts_blocked; class MTPDcontacts_blocked; class MTPDcontacts_blockedSlice; -class MTPcontacts_suggested; -class MTPDcontacts_suggested; - class MTPmessages_dialogs; class MTPDmessages_dialogs; class MTPDmessages_dialogsSlice; @@ -978,6 +961,7 @@ class MTPDupdateChatParticipantAdmin; class MTPDupdateNewStickerSet; class MTPDupdateStickerSetsOrder; class MTPDupdateBotInlineQuery; +class MTPDupdateBotInlineSend; class MTPupdates_state; class MTPDupdates_state; @@ -1050,16 +1034,9 @@ class MTPmessages_sentEncryptedMessage; class MTPDmessages_sentEncryptedMessage; class MTPDmessages_sentEncryptedFile; -class MTPinputAudio; -class MTPDinputAudio; - class MTPinputDocument; class MTPDinputDocument; -class MTPaudio; -class MTPDaudioEmpty; -class MTPDaudio; - class MTPdocument; class MTPDdocumentEmpty; class MTPDdocument; @@ -1344,13 +1321,11 @@ typedef MTPBoxed MTPUserFull; typedef MTPBoxed MTPContact; typedef MTPBoxed MTPImportedContact; typedef MTPBoxed MTPContactBlocked; -typedef MTPBoxed MTPContactSuggested; typedef MTPBoxed MTPContactStatus; typedef MTPBoxed MTPcontacts_Link; typedef MTPBoxed MTPcontacts_Contacts; typedef MTPBoxed MTPcontacts_ImportedContacts; typedef MTPBoxed MTPcontacts_Blocked; -typedef MTPBoxed MTPcontacts_Suggested; typedef MTPBoxed MTPmessages_Dialogs; typedef MTPBoxed MTPmessages_Messages; typedef MTPBoxed MTPmessages_Chats; @@ -1376,9 +1351,7 @@ typedef MTPBoxed MTPInputEncryptedFile; typedef MTPBoxed MTPEncryptedMessage; typedef MTPBoxed MTPmessages_DhConfig; typedef MTPBoxed MTPmessages_SentEncryptedMessage; -typedef MTPBoxed MTPInputAudio; typedef MTPBoxed MTPInputDocument; -typedef MTPBoxed MTPAudio; typedef MTPBoxed MTPDocument; typedef MTPBoxed MTPhelp_Support; typedef MTPBoxed MTPNotifyPeer; @@ -2592,30 +2565,6 @@ class MTPinputMedia : private mtpDataOwner { return *(const MTPDinputMediaVideo*)data; } - MTPDinputMediaUploadedAudio &_inputMediaUploadedAudio() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedAudio); - split(); - return *(MTPDinputMediaUploadedAudio*)data; - } - const MTPDinputMediaUploadedAudio &c_inputMediaUploadedAudio() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedAudio); - return *(const MTPDinputMediaUploadedAudio*)data; - } - - MTPDinputMediaAudio &_inputMediaAudio() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaAudio); - split(); - return *(MTPDinputMediaAudio*)data; - } - const MTPDinputMediaAudio &c_inputMediaAudio() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaAudio); - return *(const MTPDinputMediaAudio*)data; - } - MTPDinputMediaUploadedDocument &_inputMediaUploadedDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedDocument); @@ -2692,8 +2641,6 @@ class MTPinputMedia : private mtpDataOwner { explicit MTPinputMedia(MTPDinputMediaUploadedVideo *_data); explicit MTPinputMedia(MTPDinputMediaUploadedThumbVideo *_data); explicit MTPinputMedia(MTPDinputMediaVideo *_data); - explicit MTPinputMedia(MTPDinputMediaUploadedAudio *_data); - explicit MTPinputMedia(MTPDinputMediaAudio *_data); explicit MTPinputMedia(MTPDinputMediaUploadedDocument *_data); explicit MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data); explicit MTPinputMedia(MTPDinputMediaDocument *_data); @@ -2708,8 +2655,6 @@ class MTPinputMedia : private mtpDataOwner { friend MTPinputMedia MTP_inputMediaUploadedVideo(const MTPInputFile &_file, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaUploadedThumbVideo(const MTPInputFile &_file, const MTPInputFile &_thumb, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaVideo(const MTPInputVideo &_id, const MTPstring &_caption); - friend MTPinputMedia MTP_inputMediaUploadedAudio(const MTPInputFile &_file, MTPint _duration, const MTPstring &_mime_type); - friend MTPinputMedia MTP_inputMediaAudio(const MTPInputAudio &_id); friend MTPinputMedia MTP_inputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaUploadedThumbDocument(const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption); @@ -2930,18 +2875,6 @@ class MTPinputFileLocation : private mtpDataOwner { return *(const MTPDinputEncryptedFileLocation*)data; } - MTPDinputAudioFileLocation &_inputAudioFileLocation() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputAudioFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputAudioFileLocation); - split(); - return *(MTPDinputAudioFileLocation*)data; - } - const MTPDinputAudioFileLocation &c_inputAudioFileLocation() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputAudioFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputAudioFileLocation); - return *(const MTPDinputAudioFileLocation*)data; - } - MTPDinputDocumentFileLocation &_inputDocumentFileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputDocumentFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputDocumentFileLocation); @@ -2966,13 +2899,11 @@ class MTPinputFileLocation : private mtpDataOwner { explicit MTPinputFileLocation(MTPDinputFileLocation *_data); explicit MTPinputFileLocation(MTPDinputVideoFileLocation *_data); explicit MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data); - explicit MTPinputFileLocation(MTPDinputAudioFileLocation *_data); explicit MTPinputFileLocation(MTPDinputDocumentFileLocation *_data); friend MTPinputFileLocation MTP_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret); friend MTPinputFileLocation MTP_inputVideoFileLocation(const MTPlong &_id, const MTPlong &_access_hash); friend MTPinputFileLocation MTP_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash); - friend MTPinputFileLocation MTP_inputAudioFileLocation(const MTPlong &_id, const MTPlong &_access_hash); friend MTPinputFileLocation MTP_inputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash); mtpTypeId _type; @@ -3772,18 +3703,6 @@ class MTPmessageMedia : private mtpDataOwner { return *(const MTPDmessageMediaDocument*)data; } - MTPDmessageMediaAudio &_messageMediaAudio() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_messageMediaAudio) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaAudio); - split(); - return *(MTPDmessageMediaAudio*)data; - } - const MTPDmessageMediaAudio &c_messageMediaAudio() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_messageMediaAudio) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaAudio); - return *(const MTPDmessageMediaAudio*)data; - } - MTPDmessageMediaWebPage &_messageMediaWebPage() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaWebPage) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaWebPage); @@ -3822,7 +3741,6 @@ class MTPmessageMedia : private mtpDataOwner { explicit MTPmessageMedia(MTPDmessageMediaGeo *_data); explicit MTPmessageMedia(MTPDmessageMediaContact *_data); explicit MTPmessageMedia(MTPDmessageMediaDocument *_data); - explicit MTPmessageMedia(MTPDmessageMediaAudio *_data); explicit MTPmessageMedia(MTPDmessageMediaWebPage *_data); explicit MTPmessageMedia(MTPDmessageMediaVenue *_data); @@ -3833,7 +3751,6 @@ class MTPmessageMedia : private mtpDataOwner { friend MTPmessageMedia MTP_messageMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, MTPint _user_id); friend MTPmessageMedia MTP_messageMediaUnsupported(); friend MTPmessageMedia MTP_messageMediaDocument(const MTPDocument &_document, const MTPstring &_caption); - friend MTPmessageMedia MTP_messageMediaAudio(const MTPAudio &_audio); friend MTPmessageMedia MTP_messageMediaWebPage(const MTPWebPage &_webpage); friend MTPmessageMedia MTP_messageMediaVenue(const MTPGeoPoint &_geo, const MTPstring &_title, const MTPstring &_address, const MTPstring &_provider, const MTPstring &_venue_id); @@ -4766,37 +4683,6 @@ class MTPcontactBlocked : private mtpDataOwner { }; typedef MTPBoxed MTPContactBlocked; -class MTPcontactSuggested : private mtpDataOwner { -public: - MTPcontactSuggested(); - MTPcontactSuggested(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactSuggested) : mtpDataOwner(0) { - read(from, end, cons); - } - - MTPDcontactSuggested &_contactSuggested() { - if (!data) throw mtpErrorUninitialized(); - split(); - return *(MTPDcontactSuggested*)data; - } - const MTPDcontactSuggested &c_contactSuggested() const { - if (!data) throw mtpErrorUninitialized(); - return *(const MTPDcontactSuggested*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contactSuggested); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPcontactSuggested(MTPDcontactSuggested *_data); - - friend MTPcontactSuggested MTP_contactSuggested(MTPint _user_id, MTPint _mutual_contacts); -}; -typedef MTPBoxed MTPContactSuggested; - class MTPcontactStatus : private mtpDataOwner { public: MTPcontactStatus(); @@ -4979,37 +4865,6 @@ class MTPcontacts_blocked : private mtpDataOwner { }; typedef MTPBoxed MTPcontacts_Blocked; -class MTPcontacts_suggested : private mtpDataOwner { -public: - MTPcontacts_suggested(); - MTPcontacts_suggested(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_suggested) : mtpDataOwner(0) { - read(from, end, cons); - } - - MTPDcontacts_suggested &_contacts_suggested() { - if (!data) throw mtpErrorUninitialized(); - split(); - return *(MTPDcontacts_suggested*)data; - } - const MTPDcontacts_suggested &c_contacts_suggested() const { - if (!data) throw mtpErrorUninitialized(); - return *(const MTPDcontacts_suggested*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_suggested); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPcontacts_suggested(MTPDcontacts_suggested *_data); - - friend MTPcontacts_suggested MTP_contacts_suggested(const MTPVector &_results, const MTPVector &_users); -}; -typedef MTPBoxed MTPcontacts_Suggested; - class MTPmessages_dialogs : private mtpDataOwner { public: MTPmessages_dialogs() : mtpDataOwner(0), _type(0) { @@ -5243,10 +5098,10 @@ class MTPmessagesFilter { friend MTPmessagesFilter MTP_inputMessagesFilterPhotoVideo(); friend MTPmessagesFilter MTP_inputMessagesFilterPhotoVideoDocuments(); friend MTPmessagesFilter MTP_inputMessagesFilterDocument(); - friend MTPmessagesFilter MTP_inputMessagesFilterAudio(); - friend MTPmessagesFilter MTP_inputMessagesFilterAudioDocuments(); friend MTPmessagesFilter MTP_inputMessagesFilterUrl(); friend MTPmessagesFilter MTP_inputMessagesFilterGif(); + friend MTPmessagesFilter MTP_inputMessagesFilterVoice(); + friend MTPmessagesFilter MTP_inputMessagesFilterMusic(); mtpTypeId _type; }; @@ -5740,6 +5595,18 @@ class MTPupdate : private mtpDataOwner { return *(const MTPDupdateBotInlineQuery*)data; } + MTPDupdateBotInlineSend &_updateBotInlineSend() { + if (!data) throw mtpErrorUninitialized(); + if (_type != mtpc_updateBotInlineSend) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineSend); + split(); + return *(MTPDupdateBotInlineSend*)data; + } + const MTPDupdateBotInlineSend &c_updateBotInlineSend() const { + if (!data) throw mtpErrorUninitialized(); + if (_type != mtpc_updateBotInlineSend) throw mtpErrorWrongTypeId(_type, mtpc_updateBotInlineSend); + return *(const MTPDupdateBotInlineSend*)data; + } + uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); @@ -5789,6 +5656,7 @@ class MTPupdate : private mtpDataOwner { explicit MTPupdate(MTPDupdateNewStickerSet *_data); explicit MTPupdate(MTPDupdateStickerSetsOrder *_data); explicit MTPupdate(MTPDupdateBotInlineQuery *_data); + explicit MTPupdate(MTPDupdateBotInlineSend *_data); friend MTPupdate MTP_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count); friend MTPupdate MTP_updateMessageID(MTPint _id, const MTPlong &_random_id); @@ -5832,6 +5700,7 @@ class MTPupdate : private mtpDataOwner { friend MTPupdate MTP_updateStickerSets(); friend MTPupdate MTP_updateSavedGifs(); friend MTPupdate MTP_updateBotInlineQuery(const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPstring &_offset); + friend MTPupdate MTP_updateBotInlineSend(MTPint _user_id, const MTPstring &_query, const MTPstring &_id); mtpTypeId _type; }; @@ -6697,44 +6566,6 @@ class MTPmessages_sentEncryptedMessage : private mtpDataOwner { }; typedef MTPBoxed MTPmessages_SentEncryptedMessage; -class MTPinputAudio : private mtpDataOwner { -public: - MTPinputAudio() : mtpDataOwner(0), _type(0) { - } - MTPinputAudio(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { - read(from, end, cons); - } - - MTPDinputAudio &_inputAudio() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputAudio); - split(); - return *(MTPDinputAudio*)data; - } - const MTPDinputAudio &c_inputAudio() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputAudio) throw mtpErrorWrongTypeId(_type, mtpc_inputAudio); - return *(const MTPDinputAudio*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPinputAudio(mtpTypeId type); - explicit MTPinputAudio(MTPDinputAudio *_data); - - friend MTPinputAudio MTP_inputAudioEmpty(); - friend MTPinputAudio MTP_inputAudio(const MTPlong &_id, const MTPlong &_access_hash); - - mtpTypeId _type; -}; -typedef MTPBoxed MTPInputAudio; - class MTPinputDocument : private mtpDataOwner { public: MTPinputDocument() : mtpDataOwner(0), _type(0) { @@ -6773,57 +6604,6 @@ class MTPinputDocument : private mtpDataOwner { }; typedef MTPBoxed MTPInputDocument; -class MTPaudio : private mtpDataOwner { -public: - MTPaudio() : mtpDataOwner(0), _type(0) { - } - MTPaudio(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { - read(from, end, cons); - } - - MTPDaudioEmpty &_audioEmpty() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_audioEmpty) throw mtpErrorWrongTypeId(_type, mtpc_audioEmpty); - split(); - return *(MTPDaudioEmpty*)data; - } - const MTPDaudioEmpty &c_audioEmpty() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_audioEmpty) throw mtpErrorWrongTypeId(_type, mtpc_audioEmpty); - return *(const MTPDaudioEmpty*)data; - } - - MTPDaudio &_audio() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_audio) throw mtpErrorWrongTypeId(_type, mtpc_audio); - split(); - return *(MTPDaudio*)data; - } - const MTPDaudio &c_audio() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_audio) throw mtpErrorWrongTypeId(_type, mtpc_audio); - return *(const MTPDaudio*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPaudio(mtpTypeId type); - explicit MTPaudio(MTPDaudioEmpty *_data); - explicit MTPaudio(MTPDaudio *_data); - - friend MTPaudio MTP_audioEmpty(const MTPlong &_id); - friend MTPaudio MTP_audio(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, MTPint _dc_id); - - mtpTypeId _type; -}; -typedef MTPBoxed MTPAudio; - class MTPdocument : private mtpDataOwner { public: MTPdocument() : mtpDataOwner(0), _type(0) { @@ -7064,43 +6844,51 @@ typedef MTPBoxed MTPcontacts_Found; class MTPinputPrivacyKey { public: - MTPinputPrivacyKey() { + MTPinputPrivacyKey() : _type(0) { } - MTPinputPrivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPrivacyKeyStatusTimestamp) { + MTPinputPrivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } uint32 innerLength() const; mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_inputPrivacyKeyStatusTimestamp); + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: + explicit MTPinputPrivacyKey(mtpTypeId type); friend MTPinputPrivacyKey MTP_inputPrivacyKeyStatusTimestamp(); + friend MTPinputPrivacyKey MTP_inputPrivacyKeyChatInvite(); + + mtpTypeId _type; }; typedef MTPBoxed MTPInputPrivacyKey; class MTPprivacyKey { public: - MTPprivacyKey() { + MTPprivacyKey() : _type(0) { } - MTPprivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_privacyKeyStatusTimestamp) { + MTPprivacyKey(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : _type(0) { read(from, end, cons); } uint32 innerLength() const; mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_privacyKeyStatusTimestamp); + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); void write(mtpBuffer &to) const; typedef void ResponseType; private: + explicit MTPprivacyKey(mtpTypeId type); friend MTPprivacyKey MTP_privacyKeyStatusTimestamp(); + friend MTPprivacyKey MTP_privacyKeyChatInvite(); + + mtpTypeId _type; }; typedef MTPBoxed MTPPrivacyKey; @@ -7394,7 +7182,7 @@ class MTPdocumentAttribute : private mtpDataOwner { friend MTPdocumentAttribute MTP_documentAttributeAnimated(); friend MTPdocumentAttribute MTP_documentAttributeSticker(const MTPstring &_alt, const MTPInputStickerSet &_stickerset); friend MTPdocumentAttribute MTP_documentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h); - friend MTPdocumentAttribute MTP_documentAttributeAudio(MTPint _duration, const MTPstring &_title, const MTPstring &_performer); + friend MTPdocumentAttribute MTP_documentAttributeAudio(MTPint _flags, MTPint _duration, const MTPstring &_title, const MTPstring &_performer, const MTPbytes &_waveform); friend MTPdocumentAttribute MTP_documentAttributeFilename(const MTPstring &_file_name); mtpTypeId _type; @@ -9850,28 +9638,6 @@ class MTPDinputMediaVideo : public mtpDataImpl { MTPstring vcaption; }; -class MTPDinputMediaUploadedAudio : public mtpDataImpl { -public: - MTPDinputMediaUploadedAudio() { - } - MTPDinputMediaUploadedAudio(const MTPInputFile &_file, MTPint _duration, const MTPstring &_mime_type) : vfile(_file), vduration(_duration), vmime_type(_mime_type) { - } - - MTPInputFile vfile; - MTPint vduration; - MTPstring vmime_type; -}; - -class MTPDinputMediaAudio : public mtpDataImpl { -public: - MTPDinputMediaAudio() { - } - MTPDinputMediaAudio(const MTPInputAudio &_id) : vid(_id) { - } - - MTPInputAudio vid; -}; - class MTPDinputMediaUploadedDocument : public mtpDataImpl { public: MTPDinputMediaUploadedDocument() { @@ -10024,17 +9790,6 @@ class MTPDinputEncryptedFileLocation : public mtpDataImpl { -public: - MTPDinputAudioFileLocation() { - } - MTPDinputAudioFileLocation(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { - } - - MTPlong vid; - MTPlong vaccess_hash; -}; - class MTPDinputDocumentFileLocation : public mtpDataImpl { public: MTPDinputDocumentFileLocation() { @@ -10314,6 +10069,7 @@ class MTPDchannel : public mtpDataImpl { flag_verified = (1 << 7), flag_megagroup = (1 << 8), flag_restricted = (1 << 9), + flag_invites_enabled = (1 << 10), flag_username = (1 << 6), flag_restriction_reason = (1 << 9), }; @@ -10327,6 +10083,7 @@ class MTPDchannel : public mtpDataImpl { bool is_verified() const { return vflags.v & flag_verified; } bool is_megagroup() const { return vflags.v & flag_megagroup; } bool is_restricted() const { return vflags.v & flag_restricted; } + bool is_invites_enabled() const { return vflags.v & flag_invites_enabled; } bool has_username() const { return vflags.v & flag_username; } bool has_restriction_reason() const { return vflags.v & flag_restriction_reason; } }; @@ -10621,16 +10378,6 @@ class MTPDmessageMediaDocument : public mtpDataImpl { MTPstring vcaption; }; -class MTPDmessageMediaAudio : public mtpDataImpl { -public: - MTPDmessageMediaAudio() { - } - MTPDmessageMediaAudio(const MTPAudio &_audio) : vaudio(_audio) { - } - - MTPAudio vaudio; -}; - class MTPDmessageMediaWebPage : public mtpDataImpl { public: MTPDmessageMediaWebPage() { @@ -11056,17 +10803,6 @@ class MTPDcontactBlocked : public mtpDataImpl { MTPint vdate; }; -class MTPDcontactSuggested : public mtpDataImpl { -public: - MTPDcontactSuggested() { - } - MTPDcontactSuggested(MTPint _user_id, MTPint _mutual_contacts) : vuser_id(_user_id), vmutual_contacts(_mutual_contacts) { - } - - MTPint vuser_id; - MTPint vmutual_contacts; -}; - class MTPDcontactStatus : public mtpDataImpl { public: MTPDcontactStatus() { @@ -11136,17 +10872,6 @@ class MTPDcontacts_blockedSlice : public mtpDataImpl MTPVector vusers; }; -class MTPDcontacts_suggested : public mtpDataImpl { -public: - MTPDcontacts_suggested() { - } - MTPDcontacts_suggested(const MTPVector &_results, const MTPVector &_users) : vresults(_results), vusers(_users) { - } - - MTPVector vresults; - MTPVector vusers; -}; - class MTPDmessages_dialogs : public mtpDataImpl { public: MTPDmessages_dialogs() { @@ -11720,6 +11445,18 @@ class MTPDupdateBotInlineQuery : public mtpDataImpl { MTPstring voffset; }; +class MTPDupdateBotInlineSend : public mtpDataImpl { +public: + MTPDupdateBotInlineSend() { + } + MTPDupdateBotInlineSend(MTPint _user_id, const MTPstring &_query, const MTPstring &_id) : vuser_id(_user_id), vquery(_query), vid(_id) { + } + + MTPint vuser_id; + MTPstring vquery; + MTPstring vid; +}; + class MTPDupdates_state : public mtpDataImpl { public: MTPDupdates_state() { @@ -12257,17 +11994,6 @@ class MTPDmessages_sentEncryptedFile : public mtpDataImpl { -public: - MTPDinputAudio() { - } - MTPDinputAudio(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { - } - - MTPlong vid; - MTPlong vaccess_hash; -}; - class MTPDinputDocument : public mtpDataImpl { public: MTPDinputDocument() { @@ -12279,32 +12005,6 @@ class MTPDinputDocument : public mtpDataImpl { MTPlong vaccess_hash; }; -class MTPDaudioEmpty : public mtpDataImpl { -public: - MTPDaudioEmpty() { - } - MTPDaudioEmpty(const MTPlong &_id) : vid(_id) { - } - - MTPlong vid; -}; - -class MTPDaudio : public mtpDataImpl { -public: - MTPDaudio() { - } - MTPDaudio(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, MTPint _dc_id) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vduration(_duration), vmime_type(_mime_type), vsize(_size), vdc_id(_dc_id) { - } - - MTPlong vid; - MTPlong vaccess_hash; - MTPint vdate; - MTPint vduration; - MTPstring vmime_type; - MTPint vsize; - MTPint vdc_id; -}; - class MTPDdocumentEmpty : public mtpDataImpl { public: MTPDdocumentEmpty() { @@ -12515,12 +12215,26 @@ class MTPDdocumentAttributeAudio : public mtpDataImpl { @@ -15991,45 +15705,6 @@ class MTPcontacts_ImportContacts : public MTPBoxed { } }; -class MTPcontacts_getSuggested { // RPC method 'contacts.getSuggested' -public: - MTPint vlimit; - - MTPcontacts_getSuggested() { - } - MTPcontacts_getSuggested(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getSuggested) { - read(from, end, cons); - } - MTPcontacts_getSuggested(MTPint _limit) : vlimit(_limit) { - } - - uint32 innerLength() const { - return vlimit.innerLength(); - } - mtpTypeId type() const { - return mtpc_contacts_getSuggested; - } - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_contacts_getSuggested) { - vlimit.read(from, end); - } - void write(mtpBuffer &to) const { - vlimit.write(to); - } - - typedef MTPcontacts_Suggested ResponseType; -}; -class MTPcontacts_GetSuggested : public MTPBoxed { -public: - MTPcontacts_GetSuggested() { - } - MTPcontacts_GetSuggested(const MTPcontacts_getSuggested &v) : MTPBoxed(v) { - } - MTPcontacts_GetSuggested(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { - } - MTPcontacts_GetSuggested(MTPint _limit) : MTPBoxed(MTPcontacts_getSuggested(_limit)) { - } -}; - class MTPcontacts_deleteContact { // RPC method 'contacts.deleteContact' public: MTPInputUser vid; @@ -16470,6 +16145,7 @@ class MTPmessages_getHistory { // RPC method 'messages.getHistory' public: MTPInputPeer vpeer; MTPint voffset_id; + MTPint voffset_date; MTPint vadd_offset; MTPint vlimit; MTPint vmax_id; @@ -16480,11 +16156,11 @@ class MTPmessages_getHistory { // RPC method 'messages.getHistory' MTPmessages_getHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getHistory) { read(from, end, cons); } - MTPmessages_getHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : vpeer(_peer), voffset_id(_offset_id), vadd_offset(_add_offset), vlimit(_limit), vmax_id(_max_id), vmin_id(_min_id) { + MTPmessages_getHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : vpeer(_peer), voffset_id(_offset_id), voffset_date(_offset_date), vadd_offset(_add_offset), vlimit(_limit), vmax_id(_max_id), vmin_id(_min_id) { } uint32 innerLength() const { - return vpeer.innerLength() + voffset_id.innerLength() + vadd_offset.innerLength() + vlimit.innerLength() + vmax_id.innerLength() + vmin_id.innerLength(); + return vpeer.innerLength() + voffset_id.innerLength() + voffset_date.innerLength() + vadd_offset.innerLength() + vlimit.innerLength() + vmax_id.innerLength() + vmin_id.innerLength(); } mtpTypeId type() const { return mtpc_messages_getHistory; @@ -16492,6 +16168,7 @@ class MTPmessages_getHistory { // RPC method 'messages.getHistory' void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messages_getHistory) { vpeer.read(from, end); voffset_id.read(from, end); + voffset_date.read(from, end); vadd_offset.read(from, end); vlimit.read(from, end); vmax_id.read(from, end); @@ -16500,6 +16177,7 @@ class MTPmessages_getHistory { // RPC method 'messages.getHistory' void write(mtpBuffer &to) const { vpeer.write(to); voffset_id.write(to); + voffset_date.write(to); vadd_offset.write(to); vlimit.write(to); vmax_id.write(to); @@ -16516,7 +16194,7 @@ class MTPmessages_GetHistory : public MTPBoxed { } MTPmessages_GetHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { } - MTPmessages_GetHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : MTPBoxed(MTPmessages_getHistory(_peer, _offset_id, _add_offset, _limit, _max_id, _min_id)) { + MTPmessages_GetHistory(const MTPInputPeer &_peer, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : MTPBoxed(MTPmessages_getHistory(_peer, _offset_id, _offset_date, _add_offset, _limit, _max_id, _min_id)) { } }; @@ -19672,6 +19350,7 @@ class MTPchannels_getImportantHistory { // RPC method 'channels.getImportantHist public: MTPInputChannel vchannel; MTPint voffset_id; + MTPint voffset_date; MTPint vadd_offset; MTPint vlimit; MTPint vmax_id; @@ -19682,11 +19361,11 @@ class MTPchannels_getImportantHistory { // RPC method 'channels.getImportantHist MTPchannels_getImportantHistory(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getImportantHistory) { read(from, end, cons); } - MTPchannels_getImportantHistory(const MTPInputChannel &_channel, MTPint _offset_id, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : vchannel(_channel), voffset_id(_offset_id), vadd_offset(_add_offset), vlimit(_limit), vmax_id(_max_id), vmin_id(_min_id) { + MTPchannels_getImportantHistory(const MTPInputChannel &_channel, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : vchannel(_channel), voffset_id(_offset_id), voffset_date(_offset_date), vadd_offset(_add_offset), vlimit(_limit), vmax_id(_max_id), vmin_id(_min_id) { } uint32 innerLength() const { - return vchannel.innerLength() + voffset_id.innerLength() + vadd_offset.innerLength() + vlimit.innerLength() + vmax_id.innerLength() + vmin_id.innerLength(); + return vchannel.innerLength() + voffset_id.innerLength() + voffset_date.innerLength() + vadd_offset.innerLength() + vlimit.innerLength() + vmax_id.innerLength() + vmin_id.innerLength(); } mtpTypeId type() const { return mtpc_channels_getImportantHistory; @@ -19694,6 +19373,7 @@ class MTPchannels_getImportantHistory { // RPC method 'channels.getImportantHist void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_getImportantHistory) { vchannel.read(from, end); voffset_id.read(from, end); + voffset_date.read(from, end); vadd_offset.read(from, end); vlimit.read(from, end); vmax_id.read(from, end); @@ -19702,6 +19382,7 @@ class MTPchannels_getImportantHistory { // RPC method 'channels.getImportantHist void write(mtpBuffer &to) const { vchannel.write(to); voffset_id.write(to); + voffset_date.write(to); vadd_offset.write(to); vlimit.write(to); vmax_id.write(to); @@ -19718,7 +19399,7 @@ class MTPchannels_GetImportantHistory : public MTPBoxed(from, end, cons) { } - MTPchannels_GetImportantHistory(const MTPInputChannel &_channel, MTPint _offset_id, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : MTPBoxed(MTPchannels_getImportantHistory(_channel, _offset_id, _add_offset, _limit, _max_id, _min_id)) { + MTPchannels_GetImportantHistory(const MTPInputChannel &_channel, MTPint _offset_id, MTPint _offset_date, MTPint _add_offset, MTPint _limit, MTPint _max_id, MTPint _min_id) : MTPBoxed(MTPchannels_getImportantHistory(_channel, _offset_id, _offset_date, _add_offset, _limit, _max_id, _min_id)) { } }; @@ -20696,6 +20377,48 @@ class MTPchannels_DeleteChannel : public MTPBoxed { } }; +class MTPchannels_toggleInvites { // RPC method 'channels.toggleInvites' +public: + MTPInputChannel vchannel; + MTPBool venabled; + + MTPchannels_toggleInvites() { + } + MTPchannels_toggleInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleInvites) { + read(from, end, cons); + } + MTPchannels_toggleInvites(const MTPInputChannel &_channel, MTPBool _enabled) : vchannel(_channel), venabled(_enabled) { + } + + uint32 innerLength() const { + return vchannel.innerLength() + venabled.innerLength(); + } + mtpTypeId type() const { + return mtpc_channels_toggleInvites; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleInvites) { + vchannel.read(from, end); + venabled.read(from, end); + } + void write(mtpBuffer &to) const { + vchannel.write(to); + venabled.write(to); + } + + typedef MTPUpdates ResponseType; +}; +class MTPchannels_ToggleInvites : public MTPBoxed { +public: + MTPchannels_ToggleInvites() { + } + MTPchannels_ToggleInvites(const MTPchannels_toggleInvites &v) : MTPBoxed(v) { + } + MTPchannels_ToggleInvites(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPchannels_ToggleInvites(const MTPInputChannel &_channel, MTPBool _enabled) : MTPBoxed(MTPchannels_toggleInvites(_channel, _enabled)) { + } +}; + // Inline methods definition inline MTPresPQ::MTPresPQ() : mtpDataOwner(new MTPDresPQ()) { @@ -21968,14 +21691,6 @@ inline uint32 MTPinputMedia::innerLength() const { const MTPDinputMediaVideo &v(c_inputMediaVideo()); return v.vid.innerLength() + v.vcaption.innerLength(); } - case mtpc_inputMediaUploadedAudio: { - const MTPDinputMediaUploadedAudio &v(c_inputMediaUploadedAudio()); - return v.vfile.innerLength() + v.vduration.innerLength() + v.vmime_type.innerLength(); - } - case mtpc_inputMediaAudio: { - const MTPDinputMediaAudio &v(c_inputMediaAudio()); - return v.vid.innerLength(); - } case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); return v.vfile.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength(); @@ -22058,18 +21773,6 @@ inline void MTPinputMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpT v.vid.read(from, end); v.vcaption.read(from, end); } break; - case mtpc_inputMediaUploadedAudio: _type = cons; { - if (!data) setData(new MTPDinputMediaUploadedAudio()); - MTPDinputMediaUploadedAudio &v(_inputMediaUploadedAudio()); - v.vfile.read(from, end); - v.vduration.read(from, end); - v.vmime_type.read(from, end); - } break; - case mtpc_inputMediaAudio: _type = cons; { - if (!data) setData(new MTPDinputMediaAudio()); - MTPDinputMediaAudio &v(_inputMediaAudio()); - v.vid.read(from, end); - } break; case mtpc_inputMediaUploadedDocument: _type = cons; { if (!data) setData(new MTPDinputMediaUploadedDocument()); MTPDinputMediaUploadedDocument &v(_inputMediaUploadedDocument()); @@ -22157,16 +21860,6 @@ inline void MTPinputMedia::write(mtpBuffer &to) const { v.vid.write(to); v.vcaption.write(to); } break; - case mtpc_inputMediaUploadedAudio: { - const MTPDinputMediaUploadedAudio &v(c_inputMediaUploadedAudio()); - v.vfile.write(to); - v.vduration.write(to); - v.vmime_type.write(to); - } break; - case mtpc_inputMediaAudio: { - const MTPDinputMediaAudio &v(c_inputMediaAudio()); - v.vid.write(to); - } break; case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); v.vfile.write(to); @@ -22212,8 +21905,6 @@ inline MTPinputMedia::MTPinputMedia(mtpTypeId type) : mtpDataOwner(0), _type(typ case mtpc_inputMediaUploadedVideo: setData(new MTPDinputMediaUploadedVideo()); break; case mtpc_inputMediaUploadedThumbVideo: setData(new MTPDinputMediaUploadedThumbVideo()); break; case mtpc_inputMediaVideo: setData(new MTPDinputMediaVideo()); break; - case mtpc_inputMediaUploadedAudio: setData(new MTPDinputMediaUploadedAudio()); break; - case mtpc_inputMediaAudio: setData(new MTPDinputMediaAudio()); break; case mtpc_inputMediaUploadedDocument: setData(new MTPDinputMediaUploadedDocument()); break; case mtpc_inputMediaUploadedThumbDocument: setData(new MTPDinputMediaUploadedThumbDocument()); break; case mtpc_inputMediaDocument: setData(new MTPDinputMediaDocument()); break; @@ -22236,10 +21927,6 @@ inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedThumbVideo *_data) : m } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaVideo *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaVideo) { } -inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedAudio *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedAudio) { -} -inline MTPinputMedia::MTPinputMedia(MTPDinputMediaAudio *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaAudio) { -} inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedDocument) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedThumbDocument) { @@ -22274,12 +21961,6 @@ inline MTPinputMedia MTP_inputMediaUploadedThumbVideo(const MTPInputFile &_file, inline MTPinputMedia MTP_inputMediaVideo(const MTPInputVideo &_id, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaVideo(_id, _caption)); } -inline MTPinputMedia MTP_inputMediaUploadedAudio(const MTPInputFile &_file, MTPint _duration, const MTPstring &_mime_type) { - return MTPinputMedia(new MTPDinputMediaUploadedAudio(_file, _duration, _mime_type)); -} -inline MTPinputMedia MTP_inputMediaAudio(const MTPInputAudio &_id) { - return MTPinputMedia(new MTPDinputMediaAudio(_id)); -} inline MTPinputMedia MTP_inputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaUploadedDocument(_file, _mime_type, _attributes, _caption)); } @@ -22535,10 +22216,6 @@ inline uint32 MTPinputFileLocation::innerLength() const { const MTPDinputEncryptedFileLocation &v(c_inputEncryptedFileLocation()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); } - case mtpc_inputAudioFileLocation: { - const MTPDinputAudioFileLocation &v(c_inputAudioFileLocation()); - return v.vid.innerLength() + v.vaccess_hash.innerLength(); - } case mtpc_inputDocumentFileLocation: { const MTPDinputDocumentFileLocation &v(c_inputDocumentFileLocation()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); @@ -22572,12 +22249,6 @@ inline void MTPinputFileLocation::read(const mtpPrime *&from, const mtpPrime *en v.vid.read(from, end); v.vaccess_hash.read(from, end); } break; - case mtpc_inputAudioFileLocation: _type = cons; { - if (!data) setData(new MTPDinputAudioFileLocation()); - MTPDinputAudioFileLocation &v(_inputAudioFileLocation()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - } break; case mtpc_inputDocumentFileLocation: _type = cons; { if (!data) setData(new MTPDinputDocumentFileLocation()); MTPDinputDocumentFileLocation &v(_inputDocumentFileLocation()); @@ -22605,11 +22276,6 @@ inline void MTPinputFileLocation::write(mtpBuffer &to) const { v.vid.write(to); v.vaccess_hash.write(to); } break; - case mtpc_inputAudioFileLocation: { - const MTPDinputAudioFileLocation &v(c_inputAudioFileLocation()); - v.vid.write(to); - v.vaccess_hash.write(to); - } break; case mtpc_inputDocumentFileLocation: { const MTPDinputDocumentFileLocation &v(c_inputDocumentFileLocation()); v.vid.write(to); @@ -22622,7 +22288,6 @@ inline MTPinputFileLocation::MTPinputFileLocation(mtpTypeId type) : mtpDataOwner case mtpc_inputFileLocation: setData(new MTPDinputFileLocation()); break; case mtpc_inputVideoFileLocation: setData(new MTPDinputVideoFileLocation()); break; case mtpc_inputEncryptedFileLocation: setData(new MTPDinputEncryptedFileLocation()); break; - case mtpc_inputAudioFileLocation: setData(new MTPDinputAudioFileLocation()); break; case mtpc_inputDocumentFileLocation: setData(new MTPDinputDocumentFileLocation()); break; default: throw mtpErrorBadTypeId(type, "MTPinputFileLocation"); } @@ -22633,8 +22298,6 @@ inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputVideoFileLocation *_d } inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputEncryptedFileLocation) { } -inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputAudioFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputAudioFileLocation) { -} inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputDocumentFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputDocumentFileLocation) { } inline MTPinputFileLocation MTP_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { @@ -22646,9 +22309,6 @@ inline MTPinputFileLocation MTP_inputVideoFileLocation(const MTPlong &_id, const inline MTPinputFileLocation MTP_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputFileLocation(new MTPDinputEncryptedFileLocation(_id, _access_hash)); } -inline MTPinputFileLocation MTP_inputAudioFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { - return MTPinputFileLocation(new MTPDinputAudioFileLocation(_id, _access_hash)); -} inline MTPinputFileLocation MTP_inputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputFileLocation(new MTPDinputDocumentFileLocation(_id, _access_hash)); } @@ -23796,10 +23456,6 @@ inline uint32 MTPmessageMedia::innerLength() const { const MTPDmessageMediaDocument &v(c_messageMediaDocument()); return v.vdocument.innerLength() + v.vcaption.innerLength(); } - case mtpc_messageMediaAudio: { - const MTPDmessageMediaAudio &v(c_messageMediaAudio()); - return v.vaudio.innerLength(); - } case mtpc_messageMediaWebPage: { const MTPDmessageMediaWebPage &v(c_messageMediaWebPage()); return v.vwebpage.innerLength(); @@ -23851,11 +23507,6 @@ inline void MTPmessageMedia::read(const mtpPrime *&from, const mtpPrime *end, mt v.vdocument.read(from, end); v.vcaption.read(from, end); } break; - case mtpc_messageMediaAudio: _type = cons; { - if (!data) setData(new MTPDmessageMediaAudio()); - MTPDmessageMediaAudio &v(_messageMediaAudio()); - v.vaudio.read(from, end); - } break; case mtpc_messageMediaWebPage: _type = cons; { if (!data) setData(new MTPDmessageMediaWebPage()); MTPDmessageMediaWebPage &v(_messageMediaWebPage()); @@ -23901,10 +23552,6 @@ inline void MTPmessageMedia::write(mtpBuffer &to) const { v.vdocument.write(to); v.vcaption.write(to); } break; - case mtpc_messageMediaAudio: { - const MTPDmessageMediaAudio &v(c_messageMediaAudio()); - v.vaudio.write(to); - } break; case mtpc_messageMediaWebPage: { const MTPDmessageMediaWebPage &v(c_messageMediaWebPage()); v.vwebpage.write(to); @@ -23928,7 +23575,6 @@ inline MTPmessageMedia::MTPmessageMedia(mtpTypeId type) : mtpDataOwner(0), _type case mtpc_messageMediaContact: setData(new MTPDmessageMediaContact()); break; case mtpc_messageMediaUnsupported: break; case mtpc_messageMediaDocument: setData(new MTPDmessageMediaDocument()); break; - case mtpc_messageMediaAudio: setData(new MTPDmessageMediaAudio()); break; case mtpc_messageMediaWebPage: setData(new MTPDmessageMediaWebPage()); break; case mtpc_messageMediaVenue: setData(new MTPDmessageMediaVenue()); break; default: throw mtpErrorBadTypeId(type, "MTPmessageMedia"); @@ -23944,8 +23590,6 @@ inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaContact *_data) : mtpDat } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaDocument *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaDocument) { } -inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaAudio *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaAudio) { -} inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaWebPage *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaWebPage) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaVenue *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaVenue) { @@ -23971,9 +23615,6 @@ inline MTPmessageMedia MTP_messageMediaUnsupported() { inline MTPmessageMedia MTP_messageMediaDocument(const MTPDocument &_document, const MTPstring &_caption) { return MTPmessageMedia(new MTPDmessageMediaDocument(_document, _caption)); } -inline MTPmessageMedia MTP_messageMediaAudio(const MTPAudio &_audio) { - return MTPmessageMedia(new MTPDmessageMediaAudio(_audio)); -} inline MTPmessageMedia MTP_messageMediaWebPage(const MTPWebPage &_webpage) { return MTPmessageMedia(new MTPDmessageMediaWebPage(_webpage)); } @@ -25202,35 +24843,6 @@ inline MTPcontactBlocked MTP_contactBlocked(MTPint _user_id, MTPint _date) { return MTPcontactBlocked(new MTPDcontactBlocked(_user_id, _date)); } -inline MTPcontactSuggested::MTPcontactSuggested() : mtpDataOwner(new MTPDcontactSuggested()) { -} - -inline uint32 MTPcontactSuggested::innerLength() const { - const MTPDcontactSuggested &v(c_contactSuggested()); - return v.vuser_id.innerLength() + v.vmutual_contacts.innerLength(); -} -inline mtpTypeId MTPcontactSuggested::type() const { - return mtpc_contactSuggested; -} -inline void MTPcontactSuggested::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != mtpc_contactSuggested) throw mtpErrorUnexpected(cons, "MTPcontactSuggested"); - - if (!data) setData(new MTPDcontactSuggested()); - MTPDcontactSuggested &v(_contactSuggested()); - v.vuser_id.read(from, end); - v.vmutual_contacts.read(from, end); -} -inline void MTPcontactSuggested::write(mtpBuffer &to) const { - const MTPDcontactSuggested &v(c_contactSuggested()); - v.vuser_id.write(to); - v.vmutual_contacts.write(to); -} -inline MTPcontactSuggested::MTPcontactSuggested(MTPDcontactSuggested *_data) : mtpDataOwner(_data) { -} -inline MTPcontactSuggested MTP_contactSuggested(MTPint _user_id, MTPint _mutual_contacts) { - return MTPcontactSuggested(new MTPDcontactSuggested(_user_id, _mutual_contacts)); -} - inline MTPcontactStatus::MTPcontactStatus() : mtpDataOwner(new MTPDcontactStatus()) { } @@ -25442,35 +25054,6 @@ inline MTPcontacts_blocked MTP_contacts_blockedSlice(MTPint _count, const MTPVec return MTPcontacts_blocked(new MTPDcontacts_blockedSlice(_count, _blocked, _users)); } -inline MTPcontacts_suggested::MTPcontacts_suggested() : mtpDataOwner(new MTPDcontacts_suggested()) { -} - -inline uint32 MTPcontacts_suggested::innerLength() const { - const MTPDcontacts_suggested &v(c_contacts_suggested()); - return v.vresults.innerLength() + v.vusers.innerLength(); -} -inline mtpTypeId MTPcontacts_suggested::type() const { - return mtpc_contacts_suggested; -} -inline void MTPcontacts_suggested::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != mtpc_contacts_suggested) throw mtpErrorUnexpected(cons, "MTPcontacts_suggested"); - - if (!data) setData(new MTPDcontacts_suggested()); - MTPDcontacts_suggested &v(_contacts_suggested()); - v.vresults.read(from, end); - v.vusers.read(from, end); -} -inline void MTPcontacts_suggested::write(mtpBuffer &to) const { - const MTPDcontacts_suggested &v(c_contacts_suggested()); - v.vresults.write(to); - v.vusers.write(to); -} -inline MTPcontacts_suggested::MTPcontacts_suggested(MTPDcontacts_suggested *_data) : mtpDataOwner(_data) { -} -inline MTPcontacts_suggested MTP_contacts_suggested(const MTPVector &_results, const MTPVector &_users) { - return MTPcontacts_suggested(new MTPDcontacts_suggested(_results, _users)); -} - inline uint32 MTPmessages_dialogs::innerLength() const { switch (_type) { case mtpc_messages_dialogs: { @@ -25756,10 +25339,10 @@ inline void MTPmessagesFilter::read(const mtpPrime *&from, const mtpPrime *end, case mtpc_inputMessagesFilterPhotoVideo: _type = cons; break; case mtpc_inputMessagesFilterPhotoVideoDocuments: _type = cons; break; case mtpc_inputMessagesFilterDocument: _type = cons; break; - case mtpc_inputMessagesFilterAudio: _type = cons; break; - case mtpc_inputMessagesFilterAudioDocuments: _type = cons; break; case mtpc_inputMessagesFilterUrl: _type = cons; break; case mtpc_inputMessagesFilterGif: _type = cons; break; + case mtpc_inputMessagesFilterVoice: _type = cons; break; + case mtpc_inputMessagesFilterMusic: _type = cons; break; default: throw mtpErrorUnexpected(cons, "MTPmessagesFilter"); } } @@ -25775,10 +25358,10 @@ inline MTPmessagesFilter::MTPmessagesFilter(mtpTypeId type) : _type(type) { case mtpc_inputMessagesFilterPhotoVideo: break; case mtpc_inputMessagesFilterPhotoVideoDocuments: break; case mtpc_inputMessagesFilterDocument: break; - case mtpc_inputMessagesFilterAudio: break; - case mtpc_inputMessagesFilterAudioDocuments: break; case mtpc_inputMessagesFilterUrl: break; case mtpc_inputMessagesFilterGif: break; + case mtpc_inputMessagesFilterVoice: break; + case mtpc_inputMessagesFilterMusic: break; default: throw mtpErrorBadTypeId(type, "MTPmessagesFilter"); } } @@ -25800,18 +25383,18 @@ inline MTPmessagesFilter MTP_inputMessagesFilterPhotoVideoDocuments() { inline MTPmessagesFilter MTP_inputMessagesFilterDocument() { return MTPmessagesFilter(mtpc_inputMessagesFilterDocument); } -inline MTPmessagesFilter MTP_inputMessagesFilterAudio() { - return MTPmessagesFilter(mtpc_inputMessagesFilterAudio); -} -inline MTPmessagesFilter MTP_inputMessagesFilterAudioDocuments() { - return MTPmessagesFilter(mtpc_inputMessagesFilterAudioDocuments); -} inline MTPmessagesFilter MTP_inputMessagesFilterUrl() { return MTPmessagesFilter(mtpc_inputMessagesFilterUrl); } inline MTPmessagesFilter MTP_inputMessagesFilterGif() { return MTPmessagesFilter(mtpc_inputMessagesFilterGif); } +inline MTPmessagesFilter MTP_inputMessagesFilterVoice() { + return MTPmessagesFilter(mtpc_inputMessagesFilterVoice); +} +inline MTPmessagesFilter MTP_inputMessagesFilterMusic() { + return MTPmessagesFilter(mtpc_inputMessagesFilterMusic); +} inline uint32 MTPupdate::innerLength() const { switch (_type) { @@ -25975,6 +25558,10 @@ inline uint32 MTPupdate::innerLength() const { const MTPDupdateBotInlineQuery &v(c_updateBotInlineQuery()); return v.vquery_id.innerLength() + v.vuser_id.innerLength() + v.vquery.innerLength() + v.voffset.innerLength(); } + case mtpc_updateBotInlineSend: { + const MTPDupdateBotInlineSend &v(c_updateBotInlineSend()); + return v.vuser_id.innerLength() + v.vquery.innerLength() + v.vid.innerLength(); + } } return 0; } @@ -26252,6 +25839,13 @@ inline void MTPupdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeI v.vquery.read(from, end); v.voffset.read(from, end); } break; + case mtpc_updateBotInlineSend: _type = cons; { + if (!data) setData(new MTPDupdateBotInlineSend()); + MTPDupdateBotInlineSend &v(_updateBotInlineSend()); + v.vuser_id.read(from, end); + v.vquery.read(from, end); + v.vid.read(from, end); + } break; default: throw mtpErrorUnexpected(cons, "MTPupdate"); } } @@ -26482,6 +26076,12 @@ inline void MTPupdate::write(mtpBuffer &to) const { v.vquery.write(to); v.voffset.write(to); } break; + case mtpc_updateBotInlineSend: { + const MTPDupdateBotInlineSend &v(c_updateBotInlineSend()); + v.vuser_id.write(to); + v.vquery.write(to); + v.vid.write(to); + } break; } } inline MTPupdate::MTPupdate(mtpTypeId type) : mtpDataOwner(0), _type(type) { @@ -26528,6 +26128,7 @@ inline MTPupdate::MTPupdate(mtpTypeId type) : mtpDataOwner(0), _type(type) { case mtpc_updateStickerSets: break; case mtpc_updateSavedGifs: break; case mtpc_updateBotInlineQuery: setData(new MTPDupdateBotInlineQuery()); break; + case mtpc_updateBotInlineSend: setData(new MTPDupdateBotInlineSend()); break; default: throw mtpErrorBadTypeId(type, "MTPupdate"); } } @@ -26611,6 +26212,8 @@ inline MTPupdate::MTPupdate(MTPDupdateStickerSetsOrder *_data) : mtpDataOwner(_d } inline MTPupdate::MTPupdate(MTPDupdateBotInlineQuery *_data) : mtpDataOwner(_data), _type(mtpc_updateBotInlineQuery) { } +inline MTPupdate::MTPupdate(MTPDupdateBotInlineSend *_data) : mtpDataOwner(_data), _type(mtpc_updateBotInlineSend) { +} inline MTPupdate MTP_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateNewMessage(_message, _pts, _pts_count)); } @@ -26737,6 +26340,9 @@ inline MTPupdate MTP_updateSavedGifs() { inline MTPupdate MTP_updateBotInlineQuery(const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPstring &_offset) { return MTPupdate(new MTPDupdateBotInlineQuery(_query_id, _user_id, _query, _offset)); } +inline MTPupdate MTP_updateBotInlineSend(MTPint _user_id, const MTPstring &_query, const MTPstring &_id) { + return MTPupdate(new MTPDupdateBotInlineSend(_user_id, _query, _id)); +} inline MTPupdates_state::MTPupdates_state() : mtpDataOwner(new MTPDupdates_state()) { } @@ -27983,57 +27589,6 @@ inline MTPmessages_sentEncryptedMessage MTP_messages_sentEncryptedFile(MTPint _d return MTPmessages_sentEncryptedMessage(new MTPDmessages_sentEncryptedFile(_date, _file)); } -inline uint32 MTPinputAudio::innerLength() const { - switch (_type) { - case mtpc_inputAudio: { - const MTPDinputAudio &v(c_inputAudio()); - return v.vid.innerLength() + v.vaccess_hash.innerLength(); - } - } - return 0; -} -inline mtpTypeId MTPinputAudio::type() const { - if (!_type) throw mtpErrorUninitialized(); - return _type; -} -inline void MTPinputAudio::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != _type) setData(0); - switch (cons) { - case mtpc_inputAudioEmpty: _type = cons; break; - case mtpc_inputAudio: _type = cons; { - if (!data) setData(new MTPDinputAudio()); - MTPDinputAudio &v(_inputAudio()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - } break; - default: throw mtpErrorUnexpected(cons, "MTPinputAudio"); - } -} -inline void MTPinputAudio::write(mtpBuffer &to) const { - switch (_type) { - case mtpc_inputAudio: { - const MTPDinputAudio &v(c_inputAudio()); - v.vid.write(to); - v.vaccess_hash.write(to); - } break; - } -} -inline MTPinputAudio::MTPinputAudio(mtpTypeId type) : mtpDataOwner(0), _type(type) { - switch (type) { - case mtpc_inputAudioEmpty: break; - case mtpc_inputAudio: setData(new MTPDinputAudio()); break; - default: throw mtpErrorBadTypeId(type, "MTPinputAudio"); - } -} -inline MTPinputAudio::MTPinputAudio(MTPDinputAudio *_data) : mtpDataOwner(_data), _type(mtpc_inputAudio) { -} -inline MTPinputAudio MTP_inputAudioEmpty() { - return MTPinputAudio(mtpc_inputAudioEmpty); -} -inline MTPinputAudio MTP_inputAudio(const MTPlong &_id, const MTPlong &_access_hash) { - return MTPinputAudio(new MTPDinputAudio(_id, _access_hash)); -} - inline uint32 MTPinputDocument::innerLength() const { switch (_type) { case mtpc_inputDocument: { @@ -28085,81 +27640,6 @@ inline MTPinputDocument MTP_inputDocument(const MTPlong &_id, const MTPlong &_ac return MTPinputDocument(new MTPDinputDocument(_id, _access_hash)); } -inline uint32 MTPaudio::innerLength() const { - switch (_type) { - case mtpc_audioEmpty: { - const MTPDaudioEmpty &v(c_audioEmpty()); - return v.vid.innerLength(); - } - case mtpc_audio: { - const MTPDaudio &v(c_audio()); - return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vduration.innerLength() + v.vmime_type.innerLength() + v.vsize.innerLength() + v.vdc_id.innerLength(); - } - } - return 0; -} -inline mtpTypeId MTPaudio::type() const { - if (!_type) throw mtpErrorUninitialized(); - return _type; -} -inline void MTPaudio::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != _type) setData(0); - switch (cons) { - case mtpc_audioEmpty: _type = cons; { - if (!data) setData(new MTPDaudioEmpty()); - MTPDaudioEmpty &v(_audioEmpty()); - v.vid.read(from, end); - } break; - case mtpc_audio: _type = cons; { - if (!data) setData(new MTPDaudio()); - MTPDaudio &v(_audio()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - v.vdate.read(from, end); - v.vduration.read(from, end); - v.vmime_type.read(from, end); - v.vsize.read(from, end); - v.vdc_id.read(from, end); - } break; - default: throw mtpErrorUnexpected(cons, "MTPaudio"); - } -} -inline void MTPaudio::write(mtpBuffer &to) const { - switch (_type) { - case mtpc_audioEmpty: { - const MTPDaudioEmpty &v(c_audioEmpty()); - v.vid.write(to); - } break; - case mtpc_audio: { - const MTPDaudio &v(c_audio()); - v.vid.write(to); - v.vaccess_hash.write(to); - v.vdate.write(to); - v.vduration.write(to); - v.vmime_type.write(to); - v.vsize.write(to); - v.vdc_id.write(to); - } break; - } -} -inline MTPaudio::MTPaudio(mtpTypeId type) : mtpDataOwner(0), _type(type) { - switch (type) { - case mtpc_audioEmpty: setData(new MTPDaudioEmpty()); break; - case mtpc_audio: setData(new MTPDaudio()); break; - default: throw mtpErrorBadTypeId(type, "MTPaudio"); - } -} -inline MTPaudio::MTPaudio(MTPDaudioEmpty *_data) : mtpDataOwner(_data), _type(mtpc_audioEmpty) { -} -inline MTPaudio::MTPaudio(MTPDaudio *_data) : mtpDataOwner(_data), _type(mtpc_audio) { -} -inline MTPaudio MTP_audioEmpty(const MTPlong &_id) { - return MTPaudio(new MTPDaudioEmpty(_id)); -} -inline MTPaudio MTP_audio(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, MTPint _dc_id) { - return MTPaudio(new MTPDaudio(_id, _access_hash, _date, _duration, _mime_type, _size, _dc_id)); -} - inline uint32 MTPdocument::innerLength() const { switch (_type) { case mtpc_documentEmpty: { @@ -28491,28 +27971,64 @@ inline uint32 MTPinputPrivacyKey::innerLength() const { return 0; } inline mtpTypeId MTPinputPrivacyKey::type() const { - return mtpc_inputPrivacyKeyStatusTimestamp; + if (!_type) throw mtpErrorUninitialized(); + return _type; } inline void MTPinputPrivacyKey::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + switch (cons) { + case mtpc_inputPrivacyKeyStatusTimestamp: _type = cons; break; + case mtpc_inputPrivacyKeyChatInvite: _type = cons; break; + default: throw mtpErrorUnexpected(cons, "MTPinputPrivacyKey"); + } } inline void MTPinputPrivacyKey::write(mtpBuffer &to) const { + switch (_type) { + } +} +inline MTPinputPrivacyKey::MTPinputPrivacyKey(mtpTypeId type) : _type(type) { + switch (type) { + case mtpc_inputPrivacyKeyStatusTimestamp: break; + case mtpc_inputPrivacyKeyChatInvite: break; + default: throw mtpErrorBadTypeId(type, "MTPinputPrivacyKey"); + } } inline MTPinputPrivacyKey MTP_inputPrivacyKeyStatusTimestamp() { - return MTPinputPrivacyKey(); + return MTPinputPrivacyKey(mtpc_inputPrivacyKeyStatusTimestamp); +} +inline MTPinputPrivacyKey MTP_inputPrivacyKeyChatInvite() { + return MTPinputPrivacyKey(mtpc_inputPrivacyKeyChatInvite); } inline uint32 MTPprivacyKey::innerLength() const { return 0; } inline mtpTypeId MTPprivacyKey::type() const { - return mtpc_privacyKeyStatusTimestamp; + if (!_type) throw mtpErrorUninitialized(); + return _type; } inline void MTPprivacyKey::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + switch (cons) { + case mtpc_privacyKeyStatusTimestamp: _type = cons; break; + case mtpc_privacyKeyChatInvite: _type = cons; break; + default: throw mtpErrorUnexpected(cons, "MTPprivacyKey"); + } } inline void MTPprivacyKey::write(mtpBuffer &to) const { + switch (_type) { + } +} +inline MTPprivacyKey::MTPprivacyKey(mtpTypeId type) : _type(type) { + switch (type) { + case mtpc_privacyKeyStatusTimestamp: break; + case mtpc_privacyKeyChatInvite: break; + default: throw mtpErrorBadTypeId(type, "MTPprivacyKey"); + } } inline MTPprivacyKey MTP_privacyKeyStatusTimestamp() { - return MTPprivacyKey(); + return MTPprivacyKey(mtpc_privacyKeyStatusTimestamp); +} +inline MTPprivacyKey MTP_privacyKeyChatInvite() { + return MTPprivacyKey(mtpc_privacyKeyChatInvite); } inline uint32 MTPinputPrivacyRule::innerLength() const { @@ -28782,7 +28298,7 @@ inline uint32 MTPdocumentAttribute::innerLength() const { } case mtpc_documentAttributeAudio: { const MTPDdocumentAttributeAudio &v(c_documentAttributeAudio()); - return v.vduration.innerLength() + v.vtitle.innerLength() + v.vperformer.innerLength(); + return v.vflags.innerLength() + v.vduration.innerLength() + (v.has_title() ? v.vtitle.innerLength() : 0) + (v.has_performer() ? v.vperformer.innerLength() : 0) + (v.has_waveform() ? v.vwaveform.innerLength() : 0); } case mtpc_documentAttributeFilename: { const MTPDdocumentAttributeFilename &v(c_documentAttributeFilename()); @@ -28821,9 +28337,11 @@ inline void MTPdocumentAttribute::read(const mtpPrime *&from, const mtpPrime *en case mtpc_documentAttributeAudio: _type = cons; { if (!data) setData(new MTPDdocumentAttributeAudio()); MTPDdocumentAttributeAudio &v(_documentAttributeAudio()); + v.vflags.read(from, end); v.vduration.read(from, end); - v.vtitle.read(from, end); - v.vperformer.read(from, end); + if (v.has_title()) { v.vtitle.read(from, end); } else { v.vtitle = MTPstring(); } + if (v.has_performer()) { v.vperformer.read(from, end); } else { v.vperformer = MTPstring(); } + if (v.has_waveform()) { v.vwaveform.read(from, end); } else { v.vwaveform = MTPbytes(); } } break; case mtpc_documentAttributeFilename: _type = cons; { if (!data) setData(new MTPDdocumentAttributeFilename()); @@ -28853,9 +28371,11 @@ inline void MTPdocumentAttribute::write(mtpBuffer &to) const { } break; case mtpc_documentAttributeAudio: { const MTPDdocumentAttributeAudio &v(c_documentAttributeAudio()); + v.vflags.write(to); v.vduration.write(to); - v.vtitle.write(to); - v.vperformer.write(to); + if (v.has_title()) v.vtitle.write(to); + if (v.has_performer()) v.vperformer.write(to); + if (v.has_waveform()) v.vwaveform.write(to); } break; case mtpc_documentAttributeFilename: { const MTPDdocumentAttributeFilename &v(c_documentAttributeFilename()); @@ -28896,8 +28416,8 @@ inline MTPdocumentAttribute MTP_documentAttributeSticker(const MTPstring &_alt, inline MTPdocumentAttribute MTP_documentAttributeVideo(MTPint _duration, MTPint _w, MTPint _h) { return MTPdocumentAttribute(new MTPDdocumentAttributeVideo(_duration, _w, _h)); } -inline MTPdocumentAttribute MTP_documentAttributeAudio(MTPint _duration, const MTPstring &_title, const MTPstring &_performer) { - return MTPdocumentAttribute(new MTPDdocumentAttributeAudio(_duration, _title, _performer)); +inline MTPdocumentAttribute MTP_documentAttributeAudio(MTPint _flags, MTPint _duration, const MTPstring &_title, const MTPstring &_performer, const MTPbytes &_waveform) { + return MTPdocumentAttribute(new MTPDdocumentAttributeAudio(_flags, _duration, _title, _performer, _waveform)); } inline MTPdocumentAttribute MTP_documentAttributeFilename(const MTPstring &_file_name) { return MTPdocumentAttribute(new MTPDdocumentAttributeFilename(_file_name)); diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 64bfa2eaa8a414..d8c3c7bb9a4a68 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -153,8 +153,6 @@ inputMediaContact#a6e45987 phone_number:string first_name:string last_name:strin inputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; inputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; inputMediaVideo#936a4ebd id:InputVideo caption:string = InputMedia; -inputMediaUploadedAudio#4e498cab file:InputFile duration:int mime_type:string = InputMedia; -inputMediaAudio#89938781 id:InputAudio = InputMedia; inputMediaUploadedDocument#1d89306d file:InputFile mime_type:string attributes:Vector caption:string = InputMedia; inputMediaUploadedThumbDocument#ad613491 file:InputFile thumb:InputFile mime_type:string attributes:Vector caption:string = InputMedia; inputMediaDocument#1a77f29c id:InputDocument caption:string = InputMedia; @@ -177,7 +175,6 @@ inputVideo#ee579652 id:long access_hash:long = InputVideo; inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation; inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation; inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; -inputAudioFileLocation#74dc404d id:long access_hash:long = InputFileLocation; inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation; inputPhotoCropAuto#ade6b004 = InputPhotoCrop; @@ -219,7 +216,7 @@ userStatusLastMonth#77ebc742 = UserStatus; chatEmpty#9ba2d800 id:int = Chat; chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat; chatForbidden#7328bdb id:int title:string = Chat; -channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; +channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true invites_enabled:flags.10?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; channelForbidden#2d85832c id:int access_hash:long title:string = Chat; chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector = ChatFull; @@ -246,7 +243,6 @@ messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia; messageMediaUnsupported#9f84f49e = MessageMedia; messageMediaDocument#f3e02ea8 document:Document caption:string = MessageMedia; -messageMediaAudio#c6b68300 audio:Audio = MessageMedia; messageMediaWebPage#a32dd600 webpage:WebPage = MessageMedia; messageMediaVenue#7912b71f geo:GeoPoint title:string address:string provider:string venue_id:string = MessageMedia; @@ -319,8 +315,6 @@ importedContact#d0028438 user_id:int client_id:long = ImportedContact; contactBlocked#561bc879 user_id:int date:int = ContactBlocked; -contactSuggested#3de191a1 user_id:int mutual_contacts:int = ContactSuggested; - contactStatus#d3680c61 user_id:int status:UserStatus = ContactStatus; contacts.link#3ace484c my_link:ContactLink foreign_link:ContactLink user:User = contacts.Link; @@ -333,8 +327,6 @@ contacts.importedContacts#ad524315 imported:Vector retry_contac contacts.blocked#1c138d15 blocked:Vector users:Vector = contacts.Blocked; contacts.blockedSlice#900802a1 count:int blocked:Vector users:Vector = contacts.Blocked; -contacts.suggested#5649dcc5 results:Vector users:Vector = contacts.Suggested; - messages.dialogs#15ba6c40 dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs; messages.dialogsSlice#71e094f3 count:int dialogs:Vector messages:Vector chats:Vector users:Vector = messages.Dialogs; @@ -354,10 +346,10 @@ inputMessagesFilterVideo#9fc00e65 = MessagesFilter; inputMessagesFilterPhotoVideo#56e9f0e4 = MessagesFilter; inputMessagesFilterPhotoVideoDocuments#d95e73bb = MessagesFilter; inputMessagesFilterDocument#9eddf188 = MessagesFilter; -inputMessagesFilterAudio#cfc87522 = MessagesFilter; -inputMessagesFilterAudioDocuments#5afbf764 = MessagesFilter; inputMessagesFilterUrl#7ef0dd87 = MessagesFilter; inputMessagesFilterGif#ffc86587 = MessagesFilter; +inputMessagesFilterVoice#50f5c392 = MessagesFilter; +inputMessagesFilterMusic#3751b49e = MessagesFilter; updateNewMessage#1f2b0afd message:Message pts:int pts_count:int = Update; updateMessageID#4e90bfd6 id:int random_id:long = Update; @@ -401,6 +393,7 @@ updateStickerSetsOrder#f0dfb451 order:Vector = Update; updateStickerSets#43ae3dec = Update; updateSavedGifs#9375341e = Update; updateBotInlineQuery#c01eea08 query_id:long user_id:int query:string offset:string = Update; +updateBotInlineSend#f69e113 user_id:int query:string id:string = Update; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; @@ -459,15 +452,9 @@ messages.dhConfig#2c221edd g:int p:bytes version:int random:bytes = messages.DhC messages.sentEncryptedMessage#560f8935 date:int = messages.SentEncryptedMessage; messages.sentEncryptedFile#9493ff32 date:int file:EncryptedFile = messages.SentEncryptedMessage; -inputAudioEmpty#d95adc84 = InputAudio; -inputAudio#77d440ff id:long access_hash:long = InputAudio; - inputDocumentEmpty#72f0eaae = InputDocument; inputDocument#18798952 id:long access_hash:long = InputDocument; -audioEmpty#586988d8 id:long = Audio; -audio#f9e35055 id:long access_hash:long date:int duration:int mime_type:string size:int dc_id:int = Audio; - documentEmpty#36f8c871 id:long = Document; document#f9a39f4f id:long access_hash:long date:int mime_type:string size:int thumb:PhotoSize dc_id:int attributes:Vector = Document; @@ -492,8 +479,10 @@ sendMessageChooseContactAction#628cbc6f = SendMessageAction; contacts.found#1aa1f784 results:Vector chats:Vector users:Vector = contacts.Found; inputPrivacyKeyStatusTimestamp#4f96cb18 = InputPrivacyKey; +inputPrivacyKeyChatInvite#bdfb0426 = InputPrivacyKey; privacyKeyStatusTimestamp#bc2eab30 = PrivacyKey; +privacyKeyChatInvite#500e6dfa = PrivacyKey; inputPrivacyValueAllowContacts#d09e07b = InputPrivacyRule; inputPrivacyValueAllowAll#184b35ce = InputPrivacyRule; @@ -519,7 +508,7 @@ documentAttributeImageSize#6c37c15c w:int h:int = DocumentAttribute; documentAttributeAnimated#11b58939 = DocumentAttribute; documentAttributeSticker#3a556302 alt:string stickerset:InputStickerSet = DocumentAttribute; documentAttributeVideo#5910cccb duration:int w:int h:int = DocumentAttribute; -documentAttributeAudio#ded218e0 duration:int title:string performer:string = DocumentAttribute; +documentAttributeAudio#9852f9c6 flags:# voice:flags.10?true duration:int title:flags.0?string performer:flags.1?string waveform:flags.2?bytes = DocumentAttribute; documentAttributeFilename#15590068 file_name:string = DocumentAttribute; messages.stickersNotModified#f1749a22 = messages.Stickers; @@ -552,7 +541,7 @@ account.password#7c18141c current_salt:bytes new_salt:bytes hint:string has_reco account.passwordSettings#b7b72ab3 email:string = account.PasswordSettings; -account.passwordInputSettings#bcfc532c flags:# new_salt:flags.0?bytes new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string = account.PasswordInputSettings; +account.passwordInputSettings#86916deb flags:# new_salt:flags.0?bytes new_password_hash:flags.0?bytes hint:flags.0?string email:flags.1?string = account.PasswordInputSettings; auth.passwordRecovery#137948a5 email_pattern:string = auth.PasswordRecovery; @@ -717,7 +706,6 @@ users.getFullUser#ca30a5b1 id:InputUser = UserFull; contacts.getStatuses#c4a353ee = Vector; contacts.getContacts#22c6aa08 hash:string = contacts.Contacts; contacts.importContacts#da30b32d contacts:Vector replace:Bool = contacts.ImportedContacts; -contacts.getSuggested#cd773428 limit:int = contacts.Suggested; contacts.deleteContact#8e953744 id:InputUser = contacts.Link; contacts.deleteContacts#59ab389e id:Vector = Bool; contacts.block#332b49fc id:InputUser = Bool; @@ -730,7 +718,7 @@ contacts.resolveUsername#f93ccba3 username:string = contacts.ResolvedPeer; messages.getMessages#4222fa74 id:Vector = messages.Messages; messages.getDialogs#6b47f94d offset_date:int offset_id:int offset_peer:InputPeer limit:int = messages.Dialogs; -messages.getHistory#8a8ec2da peer:InputPeer offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; +messages.getHistory#afa92846 peer:InputPeer offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; messages.search#d4569248 flags:# important_only:flags.0?true peer:InputPeer q:string filter:MessagesFilter min_date:int max_date:int offset:int max_id:int limit:int = messages.Messages; messages.readHistory#e306d3a peer:InputPeer max_id:int = messages.AffectedMessages; messages.deleteHistory#b7c13bd9 peer:InputPeer max_id:int = messages.AffectedHistory; @@ -808,7 +796,7 @@ help.getAppChangelog#5bab7fb2 device_model:string system_version:string app_vers help.getTermsOfService#37d78f83 lang_code:string = help.TermsOfService; channels.getDialogs#a9d3d249 offset:int limit:int = messages.Dialogs; -channels.getImportantHistory#ddb929cb channel:InputChannel offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; +channels.getImportantHistory#8f494bb2 channel:InputChannel offset_id:int offset_date:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; channels.readHistory#cc104937 channel:InputChannel max_id:int = Bool; channels.deleteMessages#84c1fd4e channel:InputChannel id:Vector = messages.AffectedMessages; channels.deleteUserHistory#d10dd71b channel:InputChannel user_id:InputUser = messages.AffectedHistory; @@ -832,3 +820,4 @@ channels.inviteToChannel#199f3a6c channel:InputChannel users:Vector = channels.kickFromChannel#a672de14 channel:InputChannel user_id:InputUser kicked:Bool = Updates; channels.exportInvite#c7560885 channel:InputChannel = ExportedChatInvite; channels.deleteChannel#c0111fe3 channel:InputChannel = Updates; +channels.toggleInvites#49609307 channel:InputChannel enabled:Bool = Updates; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 0c9c0698bae784..84905568bb308d 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -39,7 +39,7 @@ OverviewInner::OverviewInner(OverviewWidget *overview, ScrollArea *scroll, PeerD , _resizeSkip(0) , _peer(peer->migrateTo() ? peer->migrateTo() : peer) , _type(type) -, _reversed(_type != OverviewDocuments && _type != OverviewLinks) +, _reversed(_type != OverviewFiles && _type != OverviewLinks) , _migrated(_peer->migrateFrom() ? App::history(_peer->migrateFrom()->id) : 0) , _history(App::history(_peer->id)) , _channel(peerToChannel(_peer->id)) @@ -108,7 +108,7 @@ OverviewInner::OverviewInner(OverviewWidget *overview, ScrollArea *scroll, PeerD connect(&_searchTimer, SIGNAL(timeout()), this, SLOT(onSearchMessages())); _cancelSearch.hide(); - if (_type == OverviewLinks || _type == OverviewDocuments) { + if (_type == OverviewLinks || _type == OverviewFiles) { _search.show(); } else { _search.hide(); @@ -735,7 +735,7 @@ QPoint OverviewInner::mapMouseToItem(QPoint p, MsgId itemId, int32 itemIndex) { } void OverviewInner::activate() { - if (_type == OverviewLinks || _type == OverviewDocuments) { + if (_type == OverviewLinks || _type == OverviewFiles) { _search.setFocus(); } else { setFocus(); @@ -759,7 +759,7 @@ void OverviewInner::clear() { } int32 OverviewInner::itemTop(const FullMsgId &msgId) const { - if (_type == OverviewAudioDocuments) { + if (_type == OverviewMusicFiles) { int32 itemIndex = -1; fixItemIndex(itemIndex, (msgId.channel == _channel) ? msgId.msg : ((_migrated && msgId.channel == _migrated->channelId()) ? -msgId.msg : 0)); if (itemIndex >= 0) { @@ -1261,9 +1261,9 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _contextMenuLnk = textlnkOver(); PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkPhoto || lnkVideo || lnkAudio || lnkDocument) { + bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; + if (lnkPhoto || lnkVideo || lnkDocument) { _menu = new PopupMenu(); if (App::hoveredLinkItem()) { _menu->addAction(lang(lng_context_to_msg), this, SLOT(goToMessage()))->setEnabled(true); @@ -1271,14 +1271,14 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (lnkPhoto) { _menu->addAction(lang(lng_context_open_image), this, SLOT(openContextUrl()))->setEnabled(true); } else { - if ((lnkVideo && lnkVideo->video()->loading()) || (lnkAudio && lnkAudio->audio()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { + if ((lnkVideo && lnkVideo->video()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { _menu->addAction(lang(lng_context_cancel_download), this, SLOT(cancelContextDownload()))->setEnabled(true); } else { - if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkAudio && !lnkAudio->audio()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { + if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); - _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } if (isUponSelected > 1) { @@ -1420,8 +1420,8 @@ void OverviewInner::switchType(MediaOverviewType type) { if (_type != type) { clear(); _type = type; - _reversed = (_type != OverviewLinks && _type != OverviewDocuments); - if (_type == OverviewLinks || _type == OverviewDocuments) { + _reversed = (_type != OverviewLinks && _type != OverviewFiles); + if (_type == OverviewLinks || _type == OverviewFiles) { _search.show(); } else { _search.hide(); @@ -1502,12 +1502,9 @@ void OverviewInner::selectMessage() { void OverviewInner::cancelContextDownload() { VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); if (lnkVideo) { lnkVideo->video()->cancel(); - } else if (lnkAudio) { - lnkAudio->audio()->cancel(); } else if (lnkDocument) { lnkDocument->document()->cancel(); } @@ -1515,18 +1512,15 @@ void OverviewInner::cancelContextDownload() { void OverviewInner::showContextInFolder() { VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - QString already = lnkVideo ? lnkVideo->video()->already(true) : (lnkAudio ? lnkAudio->audio()->already(true) : (lnkDocument ? lnkDocument->document()->already(true) : QString())); + QString already = lnkVideo ? lnkVideo->video()->already(true) : (lnkDocument ? lnkDocument->document()->already(true) : QString()); if (!already.isEmpty()) psShowInFolder(already); } void OverviewInner::saveContextFile() { VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); if (lnkVideo) VideoSaveLink::doSave(lnkVideo->video(), true); - if (lnkAudio) AudioSaveLink::doSave(lnkAudio->audio(), true); if (lnkDocument) DocumentSaveLink::doSave(lnkDocument->document(), true); } @@ -1534,10 +1528,8 @@ void OverviewInner::openContextFile() { HistoryItem *was = App::hoveredLinkItem(); App::hoveredLinkItem(App::contextItem()); VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); - AudioLink *lnkAudio = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); if (lnkVideo) VideoOpenLink(lnkVideo->video()).onClick(Qt::LeftButton); - if (lnkAudio) AudioOpenLink(lnkAudio->audio()).onClick(Qt::LeftButton); if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); App::hoveredLinkItem(was); } @@ -1581,7 +1573,7 @@ void OverviewInner::onNeedSearchMessages() { } void OverviewInner::onSearchUpdate() { - QString filterText = (_type == OverviewLinks || _type == OverviewDocuments) ? _search.text().trimmed() : QString(); + QString filterText = (_type == OverviewLinks || _type == OverviewFiles) ? _search.text().trimmed() : QString(); bool inSearch = !filterText.isEmpty(), changed = (inSearch != _inSearch); _inSearch = inSearch; @@ -1729,7 +1721,7 @@ void OverviewInner::mediaOverviewUpdated() { _height = countHeight(); } else { - bool dateEveryMonth = (_type == OverviewDocuments), dateEveryDay = (_type == OverviewLinks); + bool dateEveryMonth = (_type == OverviewFiles), dateEveryDay = (_type == OverviewLinks); bool withDates = (dateEveryMonth || dateEveryDay); History::MediaOverview &o(_history->overview[_type]), *migratedOverview = _migrated ? &_migrated->overview[_type] : 0; @@ -1793,7 +1785,7 @@ void OverviewInner::mediaOverviewUpdated() { int32 newHeight = _marginTop + _height + _marginBottom, deltaHeight = newHeight - height(); if (deltaHeight) { resize(_width, newHeight); - if (_type != OverviewLinks && _type != OverviewDocuments) { + if (_type != OverviewLinks && _type != OverviewFiles) { _overview->scrollBy(deltaHeight); } } else { @@ -1909,10 +1901,10 @@ void OverviewInner::recountMargins() { if (_type == OverviewPhotos || _type == OverviewVideos) { _marginBottom = 0; _marginTop = qMax(_minHeight - _height - _marginBottom, 0); - } else if (_type == OverviewAudioDocuments) { + } else if (_type == OverviewMusicFiles) { _marginTop = st::playlistPadding; _marginBottom = qMax(_minHeight - _height - _marginTop, int32(st::playlistPadding)); - } else if (_type == OverviewLinks || _type == OverviewDocuments) { + } else if (_type == OverviewLinks || _type == OverviewFiles) { _marginTop = st::linksSearchMargin.top() + _search.height() + st::linksSearchMargin.bottom(); _marginBottom = qMax(_minHeight - _height - _marginTop, int32(st::playlistPadding)); } else { @@ -1940,15 +1932,15 @@ LayoutMediaItem *OverviewInner::layoutPrepare(HistoryItem *item) { i.value()->initDimensions(); } } - } else if (_type == OverviewAudios) { - if (media && media->type() == MediaTypeAudio) { + } else if (_type == OverviewVoiceFiles) { + if (media && (media->type() == MediaTypeVoiceFile)) { if ((i = _layoutItems.constFind(item)) == _layoutItems.cend()) { - i = _layoutItems.insert(item, new LayoutOverviewAudio(static_cast(media)->audio(), item)); + i = _layoutItems.insert(item, new LayoutOverviewVoice(media->getDocument(), item)); i.value()->initDimensions(); } } - } else if (_type == OverviewDocuments || _type == OverviewAudioDocuments) { - if (media && (media->type() == MediaTypeDocument || media->type() == MediaTypeGif)) { + } else if (_type == OverviewFiles || _type == OverviewMusicFiles) { + if (media && (media->type() == MediaTypeFile || media->type() == MediaTypeMusicFile || media->type() == MediaTypeGif)) { if ((i = _layoutItems.constFind(item)) == _layoutItems.cend()) { i = _layoutItems.insert(item, new LayoutOverviewDocument(media->getDocument(), item)); i.value()->initDimensions(); @@ -2032,7 +2024,7 @@ void OverviewWidget::onScroll() { int32 preloadThreshold = _scroll.height() * 5; bool needToPreload = false; do { - needToPreload = (type() == OverviewLinks || type() == OverviewDocuments) ? (_scroll.scrollTop() + preloadThreshold > _scroll.scrollTopMax()) : (_scroll.scrollTop() < preloadThreshold); + needToPreload = (type() == OverviewLinks || type() == OverviewFiles) ? (_scroll.scrollTop() + preloadThreshold > _scroll.scrollTopMax()) : (_scroll.scrollTop() < preloadThreshold); if (!needToPreload || !_inner.preloadLocal()) { break; } @@ -2097,7 +2089,7 @@ void OverviewWidget::scrollBy(int32 add) { } void OverviewWidget::scrollReset() { - _scroll.scrollToY((type() == OverviewLinks || type() == OverviewDocuments) ? 0 : _scroll.scrollTopMax()); + _scroll.scrollToY((type() == OverviewLinks || type() == OverviewFiles) ? 0 : _scroll.scrollTopMax()); } void OverviewWidget::paintTopBar(QPainter &p, float64 over, int32 decreaseWidth) { @@ -2142,9 +2134,9 @@ void OverviewWidget::switchType(MediaOverviewType type) { switch (type) { case OverviewPhotos: _header = lang(lng_profile_photos_header); break; case OverviewVideos: _header = lang(lng_profile_videos_header); break; - case OverviewAudioDocuments: _header = lang(lng_profile_songs_header); break; - case OverviewDocuments: _header = lang(lng_profile_files_header); break; - case OverviewAudios: _header = lang(lng_profile_audios_header); break; + case OverviewMusicFiles: _header = lang(lng_profile_songs_header); break; + case OverviewFiles: _header = lang(lng_profile_files_header); break; + case OverviewVoiceFiles: _header = lang(lng_profile_audios_header); break; case OverviewLinks: _header = lang(lng_profile_shared_links_header); break; } noSelectingScroll(); @@ -2183,7 +2175,7 @@ int32 OverviewWidget::lastScrollTop() const { } int32 OverviewWidget::countBestScroll() const { - if (type() == OverviewAudioDocuments && audioPlayer()) { + if (type() == OverviewMusicFiles && audioPlayer()) { SongMsgId playing; AudioPlayerState playingState = AudioPlayerStopped; audioPlayer()->currentState(&playing, &playingState); @@ -2193,7 +2185,7 @@ int32 OverviewWidget::countBestScroll() const { return snap(top - int(_scroll.height() - (st::msgPadding.top() + st::mediaThumbSize + st::msgPadding.bottom())) / 2, 0, _scroll.scrollTopMax()); } } - } else if (type() == OverviewLinks || type() == OverviewDocuments) { + } else if (type() == OverviewLinks || type() == OverviewFiles) { return 0; } return _scroll.scrollTopMax(); @@ -2350,7 +2342,7 @@ void OverviewWidget::onScrollTimer() { } void OverviewWidget::onPlayerSongChanged(const FullMsgId &msgId) { - if (type() == OverviewAudioDocuments) { + if (type() == OverviewMusicFiles) { // int32 top = _inner.itemTop(msgId); // if (top > 0) { // _scroll.scrollToY(snap(top - int(_scroll.height() - (st::msgPadding.top() + st::mediaThumbSize + st::msgPadding.bottom())) / 2, 0, _scroll.scrollTopMax())); diff --git a/Telegram/SourceFiles/playerwidget.cpp b/Telegram/SourceFiles/playerwidget.cpp index 7fdaa1b6ddabd1..1ab72f6c515ada 100644 --- a/Telegram/SourceFiles/playerwidget.cpp +++ b/Telegram/SourceFiles/playerwidget.cpp @@ -198,7 +198,7 @@ void PlayerWidget::mousePressEvent(QMouseEvent *e) { audioPlayer()->currentState(&playing, &playingState, &playingPosition, &playingDuration, &playingFrequency); if (playing == _song && playingDuration) { if (playingState == AudioPlayerPlaying || playingState == AudioPlayerStarting || playingState == AudioPlayerResuming) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } _down = OverPlayback; _downProgress = snap((pos.x() - _playbackRect.x()) / float64(_playbackRect.width()), 0., 1.); @@ -210,7 +210,7 @@ void PlayerWidget::mousePressEvent(QMouseEvent *e) { } } else if (_over == OverFull && _song) { if (HistoryItem *item = App::histItemById(_song.msgId)) { - App::main()->showMediaOverview(item->history()->peer, OverviewAudioDocuments); + App::main()->showMediaOverview(item->history()->peer, OverviewMusicFiles); } } else if (_over == OverRepeat) { _repeat = !_repeat; @@ -269,23 +269,23 @@ void PlayerWidget::updateControls() { _fullAvailable = (_index >= 0); History *history = _msgmigrated ? _migrated : _history; - _prevAvailable = _fullAvailable && ((_index > 0) || (_index == 0 && _migrated && !_msgmigrated && !_migrated->overview[OverviewAudioDocuments].isEmpty())); - _nextAvailable = _fullAvailable && ((_index < history->overview[OverviewAudioDocuments].size() - 1) || (_msgmigrated && _index == _migrated->overview[OverviewAudioDocuments].size() - 1 && _history->overviewLoaded(OverviewAudioDocuments) && _history->overviewCount(OverviewAudioDocuments) > 0)); + _prevAvailable = _fullAvailable && ((_index > 0) || (_index == 0 && _migrated && !_msgmigrated && !_migrated->overview[OverviewMusicFiles].isEmpty())); + _nextAvailable = _fullAvailable && ((_index < history->overview[OverviewMusicFiles].size() - 1) || (_msgmigrated && _index == _migrated->overview[OverviewMusicFiles].size() - 1 && _history->overviewLoaded(OverviewMusicFiles) && _history->overviewCount(OverviewMusicFiles) > 0)); resizeEvent(0); update(); if (_index >= 0 && _index < MediaOverviewStartPerPage) { - if (!_history->overviewLoaded(OverviewAudioDocuments) || (_migrated && !_migrated->overviewLoaded(OverviewAudioDocuments))) { + if (!_history->overviewLoaded(OverviewMusicFiles) || (_migrated && !_migrated->overviewLoaded(OverviewMusicFiles))) { if (App::main()) { - if (_msgmigrated || (_migrated && _index == 0 && _history->overviewLoaded(OverviewAudioDocuments))) { - App::main()->loadMediaBack(_migrated->peer, OverviewAudioDocuments); + if (_msgmigrated || (_migrated && _index == 0 && _history->overviewLoaded(OverviewMusicFiles))) { + App::main()->loadMediaBack(_migrated->peer, OverviewMusicFiles); } else { - App::main()->loadMediaBack(_history->peer, OverviewAudioDocuments); - if (_migrated && _index == 0 && _migrated->overview[OverviewAudioDocuments].isEmpty() && !_migrated->overviewLoaded(OverviewAudioDocuments)) { - App::main()->loadMediaBack(_migrated->peer, OverviewAudioDocuments); + App::main()->loadMediaBack(_history->peer, OverviewMusicFiles); + if (_migrated && _index == 0 && _migrated->overview[OverviewMusicFiles].isEmpty() && !_migrated->overviewLoaded(OverviewMusicFiles)) { + App::main()->loadMediaBack(_migrated->peer, OverviewMusicFiles); } } - if (_msgmigrated && !_history->overviewCountLoaded(OverviewAudioDocuments)) { - App::main()->preloadOverview(_history->peer, OverviewAudioDocuments); + if (_msgmigrated && !_history->overviewCountLoaded(OverviewMusicFiles)) { + App::main()->preloadOverview(_history->peer, OverviewMusicFiles); } } } @@ -296,7 +296,7 @@ void PlayerWidget::findCurrent() { _index = -1; if (!_history) return; - const History::MediaOverview *o = &(_msgmigrated ? _migrated : _history)->overview[OverviewAudioDocuments]; + const History::MediaOverview *o = &(_msgmigrated ? _migrated : _history)->overview[OverviewMusicFiles]; if ((_msgmigrated ? _migrated : _history)->channelId() == _song.msgId.channel) { for (int i = 0, l = o->size(); i < l; ++i) { if (o->at(i) == _song.msgId.msg) { @@ -312,14 +312,14 @@ void PlayerWidget::preloadNext() { if (_index < 0) return; History *history = _msgmigrated ? _migrated : _history; - const History::MediaOverview *o = &history->overview[OverviewAudioDocuments]; + const History::MediaOverview *o = &history->overview[OverviewMusicFiles]; HistoryItem *next = 0; if (_index < o->size() - 1) { next = App::histItemById(history->channelId(), o->at(_index + 1)); - } else if (_msgmigrated && _index == o->size() - 1 && _history->overviewLoaded(OverviewAudioDocuments) && _history->overviewCount(OverviewAudioDocuments) > 0) { - next = App::histItemById(_history->channelId(), _history->overview[OverviewAudioDocuments].at(0)); - } else if (_msgmigrated && _index == o->size() - 1 && !_history->overviewCountLoaded(OverviewAudioDocuments)) { - if (App::main()) App::main()->preloadOverview(_history->peer, OverviewAudioDocuments); + } else if (_msgmigrated && _index == o->size() - 1 && _history->overviewLoaded(OverviewMusicFiles) && _history->overviewCount(OverviewMusicFiles) > 0) { + next = App::histItemById(_history->channelId(), _history->overview[OverviewMusicFiles].at(0)); + } else if (_msgmigrated && _index == o->size() - 1 && !_history->overviewCountLoaded(OverviewMusicFiles)) { + if (App::main()) App::main()->preloadOverview(_history->peer, OverviewMusicFiles); } if (next) { if (HistoryDocument *document = static_cast(next->getMedia())) { @@ -348,12 +348,12 @@ void PlayerWidget::clearSelection() { } void PlayerWidget::mediaOverviewUpdated(PeerData *peer, MediaOverviewType type) { - if (_history && (_history->peer == peer || (_migrated && _migrated->peer == peer)) && type == OverviewAudioDocuments) { + if (_history && (_history->peer == peer || (_migrated && _migrated->peer == peer)) && type == OverviewMusicFiles) { _index = -1; History *history = _msgmigrated ? _migrated : _history; if (history->channelId() == _song.msgId.channel) { - for (int i = 0, l = history->overview[OverviewAudioDocuments].size(); i < l; ++i) { - if (history->overview[OverviewAudioDocuments].at(i) == _song.msgId.msg) { + for (int i = 0, l = history->overview[OverviewMusicFiles].size(); i < l; ++i) { + if (history->overview[OverviewMusicFiles].at(i) == _song.msgId.msg) { _index = i; preloadNext(); break; @@ -476,7 +476,7 @@ void PlayerWidget::playPressed() { audioPlayer()->currentState(&playing, &playingState); if (playing == _song && !(playingState & AudioPlayerStoppedMask)) { if (playingState == AudioPlayerPausing || playingState == AudioPlayerPaused || playingState == AudioPlayerPausedAtEnd) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } } else { audioPlayer()->play(_song); @@ -492,7 +492,7 @@ void PlayerWidget::pausePressed() { audioPlayer()->currentState(&playing, &playingState); if (playing == _song && !(playingState & AudioPlayerStoppedMask)) { if (playingState == AudioPlayerStarting || playingState == AudioPlayerResuming || playingState == AudioPlayerPlaying || playingState == AudioPlayerFinishing) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } } } @@ -504,7 +504,7 @@ void PlayerWidget::playPausePressed() { AudioPlayerState playingState = AudioPlayerStopped; audioPlayer()->currentState(&playing, &playingState); if (playing == _song && !(playingState & AudioPlayerStoppedMask)) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } else { audioPlayer()->play(_song); if (App::main()) App::main()->documentPlayProgress(_song); @@ -515,11 +515,11 @@ void PlayerWidget::prevPressed() { if (isHidden()) return; History *history = _msgmigrated ? _migrated : _history; - const History::MediaOverview *o = history ? &history->overview[OverviewAudioDocuments] : 0; + const History::MediaOverview *o = history ? &history->overview[OverviewMusicFiles] : 0; if (audioPlayer() && o && _index > 0 && _index <= o->size() && !o->isEmpty()) { startPlay(FullMsgId(history->channelId(), o->at(_index - 1))); } else if (!_index && _history && _migrated && !_msgmigrated) { - o = &_migrated->overview[OverviewAudioDocuments]; + o = &_migrated->overview[OverviewMusicFiles]; if (!o->isEmpty()) { startPlay(FullMsgId(_migrated->channelId(), o->at(o->size() - 1))); } @@ -530,11 +530,11 @@ void PlayerWidget::nextPressed() { if (isHidden()) return; History *history = _msgmigrated ? _migrated : _history; - const History::MediaOverview *o = history ? &history->overview[OverviewAudioDocuments] : 0; + const History::MediaOverview *o = history ? &history->overview[OverviewMusicFiles] : 0; if (audioPlayer() && o && _index >= 0 && _index < o->size() - 1) { startPlay(FullMsgId(history->channelId(), o->at(_index + 1))); - } else if (o && (_index == o->size() - 1) && _msgmigrated && _history->overviewLoaded(OverviewAudioDocuments)) { - o = &_history->overview[OverviewAudioDocuments]; + } else if (o && (_index == o->size() - 1) && _msgmigrated && _history->overviewLoaded(OverviewMusicFiles)) { + o = &_history->overview[OverviewMusicFiles]; if (!o->isEmpty()) { startPlay(FullMsgId(_history->channelId(), o->at(0))); } @@ -544,7 +544,7 @@ void PlayerWidget::nextPressed() { void PlayerWidget::stopPressed() { if (!_song || isHidden()) return; - audioPlayer()->stop(OverviewDocuments); + audioPlayer()->stop(OverviewFiles); if (App::main()) App::main()->hidePlayer(); } @@ -636,7 +636,7 @@ void PlayerWidget::updateState(SongMsgId playing, AudioPlayerState playingState, display = _song.song->song()->duration; } bool showPause = false, stopped = ((playingState & AudioPlayerStoppedMask) || playingState == AudioPlayerFinishing); - bool wasPlaying = !!_duration; + bool wasPlaying = (_duration != 0); if (!stopped) { showPause = (playingState == AudioPlayerPlaying || playingState == AudioPlayerResuming || playingState == AudioPlayerStarting); } diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index a98dee9507e33a..53df0dedfbb9fc 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -101,7 +101,7 @@ ProfileInner::ProfileInner(ProfileWidget *profile, ScrollArea *scroll, PeerData , _kickOver(0) , _kickDown(0) , _kickConfirm(0) - + , _menu(0) { connect(App::wnd(), SIGNAL(imageLoaded()), this, SLOT(update())); @@ -209,9 +209,9 @@ ProfileInner::ProfileInner(ProfileWidget *profile, ScrollArea *scroll, PeerData // shared media connect((_mediaButtons[OverviewPhotos] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaPhotos())); connect((_mediaButtons[OverviewVideos] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaVideos())); - connect((_mediaButtons[OverviewAudioDocuments] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaSongs())); - connect((_mediaButtons[OverviewDocuments] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaDocuments())); - connect((_mediaButtons[OverviewAudios] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaAudios())); + connect((_mediaButtons[OverviewMusicFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaSongs())); + connect((_mediaButtons[OverviewFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaDocuments())); + connect((_mediaButtons[OverviewVoiceFiles] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaAudios())); connect((_mediaButtons[OverviewLinks] = new LinkButton(this, QString())), SIGNAL(clicked()), this, SLOT(onMediaLinks())); updateMediaLinks(); @@ -261,7 +261,7 @@ void ProfileInner::loadProfilePhotos(int32 yFrom) { int32 yTo = yFrom + (parentWidget() ? parentWidget()->height() : App::wnd()->height()) * 5; MTP::clearLoaderPriorities(); - int32 partfrom = _mediaButtons[OverviewAudios]->y() + _mediaButtons[OverviewAudios]->height() + st::profileHeaderSkip; + int32 partfrom = _mediaButtons[OverviewVoiceFiles]->y() + _mediaButtons[OverviewVoiceFiles]->height() + st::profileHeaderSkip; yFrom -= partfrom; yTo -= partfrom; @@ -279,7 +279,7 @@ void ProfileInner::loadProfilePhotos(int32 yFrom) { void ProfileInner::onUpdatePhoto() { saveError(); - QStringList imgExtensions(cImgExtensions()); + QStringList imgExtensions(cImgExtensions()); QString filter(qsl("Image files (*") + imgExtensions.join(qsl(" *")) + qsl(");;All files (*.*)")); QImage img; @@ -440,15 +440,15 @@ void ProfileInner::onMediaVideos() { } void ProfileInner::onMediaSongs() { - App::main()->showMediaOverview(_peer, OverviewAudioDocuments); + App::main()->showMediaOverview(_peer, OverviewMusicFiles); } void ProfileInner::onMediaDocuments() { - App::main()->showMediaOverview(_peer, OverviewDocuments); + App::main()->showMediaOverview(_peer, OverviewFiles); } void ProfileInner::onMediaAudios() { - App::main()->showMediaOverview(_peer, OverviewAudios); + App::main()->showMediaOverview(_peer, OverviewVoiceFiles); } void ProfileInner::onMediaLinks() { @@ -464,7 +464,7 @@ void ProfileInner::onInvitationLink() { void ProfileInner::onPublicLink() { if (!_peerChannel) return; - + if (_peerChannel->isPublic()) { QApplication::clipboard()->setText(qsl("https://telegram.me/") + _peerChannel->username); Ui::showLayer(new InformBox(lang(lng_channel_public_link_copied))); @@ -776,7 +776,7 @@ void ProfileInner::paintEvent(QPaintEvent *e) { p.setOpacity(1); } } - + int32 namew = _width - st::profilePhotoSize - st::profileNameLeft; p.setPen(st::black->p); if (_peer->isVerified()) { @@ -1271,7 +1271,7 @@ void ProfileInner::resizeEvent(QResizeEvent *e) { _left = (width() - _width) / 2; int32 top = 0, btnWidth = (_width - st::profileButtonSkip) / 2; - + // profile top += st::profilePadding.top(); int32 addbyname = 0; @@ -1446,7 +1446,7 @@ ProfileInner::~ProfileInner() { } _participantsData.clear(); } - + void ProfileInner::openContextImage() { } @@ -1711,9 +1711,9 @@ QString ProfileInner::overviewLinkText(int32 type, int32 count) { switch (type) { case OverviewPhotos: return lng_profile_photos(lt_count, count); case OverviewVideos: return lng_profile_videos(lt_count, count); - case OverviewAudioDocuments: return lng_profile_songs(lt_count, count); - case OverviewDocuments: return lng_profile_files(lt_count, count); - case OverviewAudios: return lng_profile_audios(lt_count, count); + case OverviewMusicFiles: return lng_profile_songs(lt_count, count); + case OverviewFiles: return lng_profile_files(lt_count, count); + case OverviewVoiceFiles: return lng_profile_audios(lt_count, count); case OverviewLinks: return lng_profile_shared_links(lt_count, count); } return QString(); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 274b34f29be6bc..d396ebcb88e71f 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -1013,97 +1013,6 @@ void VideoData::setLocation(const FileLocation &loc) { } } -void AudioOpenLink::onClick(Qt::MouseButton button) const { - if (button != Qt::LeftButton) return; - AudioData *data = audio(); - - if (!data->date) return; - - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - - bool play = audioPlayer() && item; - const FileLocation &location(data->location(true)); - if (!location.isEmpty() || (!data->data().isEmpty() && play)) { - if (play) { - AudioMsgId playing; - AudioPlayerState playingState = AudioPlayerStopped; - audioPlayer()->currentState(&playing, &playingState); - if (playing.msgId == item->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { - audioPlayer()->pauseresume(OverviewAudios); - } else { - AudioMsgId audio(data, item->fullId()); - audioPlayer()->play(audio); - if (App::main()) { - App::main()->audioPlayProgress(audio); - App::main()->audioMarkRead(data); - } - } - } else { - psOpenFile(location.name()); - if (App::main()) App::main()->audioMarkRead(data); - } - return; - } - - if (data->status != FileReady) return; - - QString filename; - if (!data->saveToCache()) { - bool mp3 = (data->mime == qstr("audio/mp3")); - filename = saveFileName(lang(lng_save_audio), mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"), qsl("audio"), mp3 ? qsl(".mp3") : qsl(".ogg"), false); - - if (filename.isEmpty()) return; - } - - data->save(filename, ActionOnLoadOpen, item ? item->fullId() : FullMsgId()); -} - -void AudioSaveLink::doSave(AudioData *data, bool forceSavingAs) { - if (!data->date) return; - - QString already = data->already(true); - bool openWith = !already.isEmpty(); - if (openWith && !forceSavingAs) { - QPoint pos(QCursor::pos()); - if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) { - psOpenFile(already, true); - } - } else { - QFileInfo alreadyInfo(already); - QDir alreadyDir(already.isEmpty() ? QDir() : alreadyInfo.dir()); - bool mp3 = (data->mime == qstr("audio/mp3")); - QString name = already.isEmpty() ? (mp3 ? qsl(".mp3") : qsl(".ogg")) : alreadyInfo.fileName(); - QString filename = saveFileName(lang(lng_save_audio), mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"), qsl("audio"), name, forceSavingAs, alreadyDir); - if (!filename.isEmpty()) { - ActionOnLoad action = already.isEmpty() ? ActionOnLoadNone : ActionOnLoadOpenWith; - FullMsgId actionMsgId = App::hoveredLinkItem() ? App::hoveredLinkItem()->fullId() : (App::contextItem() ? App::contextItem()->fullId() : FullMsgId()); - data->save(filename, action, actionMsgId); - } - } -} - -void AudioSaveLink::onClick(Qt::MouseButton button) const { - if (button != Qt::LeftButton) return; - doSave(audio()); -} - -void AudioCancelLink::onClick(Qt::MouseButton button) const { - AudioData *data = audio(); - if (!data->date || button != Qt::LeftButton) return; - - if (data->uploading()) { - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - if (HistoryMessage *msg = item->toHistoryMessage()) { - if (msg->getMedia() && msg->getMedia()->type() == MediaTypeAudio && static_cast(msg->getMedia())->audio() == data) { - App::contextItem(item); - App::main()->deleteLayer(-2); - } - } - } else { - data->cancel(); - } -} - bool StickerData::setInstalled() const { switch (set.type()) { case mtpc_inputStickerSetID: { @@ -1122,239 +1031,44 @@ bool StickerData::setInstalled() const { return false; } -AudioData::AudioData(const AudioId &id, const uint64 &access, int32 date, const QString &mime, int32 duration, int32 dc, int32 size) -: id(id) -, access(access) -, date(date) -, mime(mime) -, duration(duration) -, dc(dc) -, size(size) -, status(FileReady) -, uploadOffset(0) -, _actionOnLoad(ActionOnLoadNone) -, _loader(0) { - _location = Local::readFileLocation(mediaKey(AudioFileLocation, dc, id)); -} - -bool AudioData::saveToCache() const { - return size < AudioVoiceMsgInMemory; -} - -void AudioData::forget() { - _data.clear(); -} - -void AudioData::automaticLoad(const HistoryItem *item) { - if (loaded() || status != FileReady) return; - - if (saveToCache() && _loader != CancelledMtpFileLoader) { - if (item) { - bool loadFromCloud = false; - if (item->history()->peer->isUser()) { - loadFromCloud = !(cAutoDownloadAudio() & dbiadNoPrivate); - } else { - loadFromCloud = !(cAutoDownloadAudio() & dbiadNoGroups); - } - save(QString(), _actionOnLoad, _actionOnLoadMsgId, loadFromCloud ? LoadFromCloudOrLocal : LoadFromLocalOnly, true); - } - } -} - -void AudioData::automaticLoadSettingsChanged() { - if (loaded() || status != FileReady || !saveToCache() || _loader != CancelledMtpFileLoader) return; - _loader = 0; -} - -void AudioData::performActionOnLoad() { - if (_actionOnLoad == ActionOnLoadNone) return; - - const FileLocation &loc(location(true)); - QString already = loc.name(); - bool play = _actionOnLoadMsgId.msg && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && audioPlayer(); - - if (play) { - if (loaded()) { - AudioMsgId playing; - AudioPlayerState state = AudioPlayerStopped; - audioPlayer()->currentState(&playing, &state); - if (playing.msgId == _actionOnLoadMsgId && !(state & AudioPlayerStoppedMask) && state != AudioPlayerFinishing) { - audioPlayer()->pauseresume(OverviewAudios); - } else { - audioPlayer()->play(AudioMsgId(this, _actionOnLoadMsgId)); - if (App::main()) App::main()->audioMarkRead(this); - } - } - } else { - if (already.isEmpty()) return; - if (_actionOnLoad == ActionOnLoadOpenWith) { - if (already.isEmpty()) return; - - QPoint pos(QCursor::pos()); - if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) { - psOpenFile(already, true); - } - if (App::main()) App::main()->audioMarkRead(this); - } else if (_actionOnLoad == ActionOnLoadOpen || _actionOnLoad == ActionOnLoadPlayInline) { - psOpenFile(already); - if (App::main()) App::main()->audioMarkRead(this); - } - } - _actionOnLoad = ActionOnLoadNone; -} - -bool AudioData::loaded(bool check) const { - if (loading() && _loader->done()) { - if (_loader->fileType() == mtpc_storage_fileUnknown) { - _loader->deleteLater(); - _loader->rpcInvalidate(); - _loader = CancelledMtpFileLoader; - } else { - AudioData *that = const_cast(this); - that->_location = FileLocation(mtpToStorageType(_loader->fileType()), _loader->fileName()); - that->_data = _loader->bytes(); - - _loader->deleteLater(); - _loader->rpcInvalidate(); - _loader = 0; - } - notifyLayoutChanged(); - } - return !_data.isEmpty() || !already(check).isEmpty(); -} - -bool AudioData::loading() const { - return _loader && _loader != CancelledMtpFileLoader; -} - -bool AudioData::displayLoading() const { - return loading() ? (!_loader->loadingLocal() || !_loader->autoLoading()) : uploading(); -} - -float64 AudioData::progress() const { - if (uploading()) { - if (size > 0) { - return float64(uploadOffset) / size; - } - return 0; - } - return loading() ? _loader->currentProgress() : (loaded() ? 1 : 0); -} - -int32 AudioData::loadOffset() const { - return loading() ? _loader->currentOffset() : 0; -} - -bool AudioData::uploading() const { - return status == FileUploading; -} - -void AudioData::save(const QString &toFile, ActionOnLoad action, const FullMsgId &actionMsgId, LoadFromCloudSetting fromCloud, bool autoLoading) { - if (loaded(true)) { - const FileLocation &l(location(true)); - if (!toFile.isEmpty()) { - if (!_data.isEmpty()) { - QFile f(toFile); - f.open(QIODevice::WriteOnly); - f.write(_data); - } else if (l.accessEnable()) { - QFile(l.name()).copy(toFile); - l.accessDisable(); - } - } - return; - } - - if (_loader == CancelledMtpFileLoader) _loader = 0; - if (_loader) { - if (!_loader->setFileName(toFile)) { - cancel(); - _loader = 0; - } - } - - _actionOnLoad = action; - _actionOnLoadMsgId = actionMsgId; - - if (_loader) { - if (fromCloud == LoadFromCloudOrLocal) _loader->permitLoadFromCloud(); - } else { - status = FileReady; - _loader = new mtpFileLoader(dc, id, access, AudioFileLocation, toFile, size, (saveToCache() ? LoadToCacheAsWell : LoadToFileOnly), fromCloud, autoLoading); - _loader->connect(_loader, SIGNAL(progress(FileLoader*)), App::main(), SLOT(audioLoadProgress(FileLoader*))); - _loader->connect(_loader, SIGNAL(failed(FileLoader*,bool)), App::main(), SLOT(audioLoadFailed(FileLoader*,bool))); - _loader->start(); - } - - notifyLayoutChanged(); -} - -void AudioData::cancel() { - if (!loading()) return; - - mtpFileLoader *l = _loader; - _loader = CancelledMtpFileLoader; - if (l) { - l->cancel(); - l->deleteLater(); - l->rpcInvalidate(); - - notifyLayoutChanged(); - } - _actionOnLoad = ActionOnLoadNone; -} - -void AudioData::notifyLayoutChanged() const { - const AudioItems &items(App::audioItems()); - AudioItems::const_iterator i = items.constFind(const_cast(this)); - if (i != items.cend()) { - for (HistoryItemsMap::const_iterator j = i->cbegin(), e = i->cend(); j != e; ++j) { - Notify::historyItemLayoutChanged(j.key()); - } - } -} - -QString AudioData::already(bool check) const { - return location(check).name(); -} - -QByteArray AudioData::data() const { - return _data; -} - -const FileLocation &AudioData::location(bool check) const { - if (check && !_location.check()) { - const_cast(this)->_location = Local::readFileLocation(mediaKey(AudioFileLocation, dc, id)); - } - return _location; -} - -void AudioData::setLocation(const FileLocation &loc) { - if (loc.check()) { - _location = loc; - } -} - void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { if (!data->date) return; HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); + bool playVoice = data->voice() && audioPlayer() && item; bool playMusic = data->song() && audioPlayer() && item; bool playAnimation = data->isAnimation() && item && item->getMedia(); const FileLocation &location(data->location(true)); - if (!location.isEmpty() || (!data->data().isEmpty() && (playMusic || playAnimation))) { - if (playMusic) { + if (!location.isEmpty() || (!data->data().isEmpty() && (playVoice || playMusic || playAnimation))) { + if (playVoice) { + AudioMsgId playing; + AudioPlayerState playingState = AudioPlayerStopped; + audioPlayer()->currentState(&playing, &playingState); + if (playing.msgId == item->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { + audioPlayer()->pauseresume(OverviewVoiceFiles); + } else { + AudioMsgId audio(data, item->fullId()); + audioPlayer()->play(audio); + if (App::main()) { + App::main()->audioPlayProgress(audio); + App::main()->audioMarkRead(data); + } + } + } else if (playMusic) { SongMsgId playing; AudioPlayerState playingState = AudioPlayerStopped; audioPlayer()->currentState(&playing, &playingState); if (playing.msgId == item->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } else { SongMsgId song(data, item->fullId()); audioPlayer()->play(song); if (App::main()) App::main()->documentPlayProgress(song); } + } else if (data->voice()) { + psOpenFile(location.name()); + if (App::main()) App::main()->audioMarkRead(data); } else if (data->size < MediaViewImageSizeLimit) { if (!data->data().isEmpty() && playAnimation) { if (action == ActionOnLoadPlayInline) { @@ -1386,21 +1100,32 @@ void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { QString filename; if (!data->saveToCache()) { - QString name = data->name, filter; + QString name, filter, caption, prefix; MimeType mimeType = mimeTypeForName(data->mime); QStringList p = mimeType.globPatterns(); QString pattern = p.isEmpty() ? QString() : p.front(); - if (name.isEmpty()) { - name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); - } - - if (pattern.isEmpty()) { - filter = QString(); + if (data->voice()) { + bool mp3 = (data->mime == qstr("audio/mp3")); + name = mp3 ? qsl(".mp3") : qsl(".ogg"); + filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"); + caption = lang(lng_save_audio); + prefix = qsl("audio"); } else { - filter = mimeType.filterString() + qsl(";;All files (*.*)"); + if (data->name.isEmpty()) { + name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); + } else { + name = data->name; + } + if (pattern.isEmpty()) { + filter = QString(); + } else { + filter = mimeType.filterString() + qsl(";;All files (*.*)"); + } + caption = lang(lng_save_file); + prefix = qsl("doc"); } - filename = saveFileName(lang(lng_save_file), filter, qsl("doc"), name, false); + filename = saveFileName(caption, filter, prefix, name, false); if (filename.isEmpty()) return; } @@ -1410,16 +1135,17 @@ void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { void DocumentOpenLink::onClick(Qt::MouseButton button) const { if (button != Qt::LeftButton) return; - doOpen(document()); + doOpen(document(), document()->voice() ? ActionOnLoadNone : ActionOnLoadOpen); } -void GifOpenLink::doOpen(DocumentData *data) { - return DocumentOpenLink::doOpen(data, ActionOnLoadPlayInline); +void VoiceSaveLink::onClick(Qt::MouseButton button) const { + if (button != Qt::LeftButton) return; + doOpen(document(), ActionOnLoadNone); } void GifOpenLink::onClick(Qt::MouseButton button) const { if (button != Qt::LeftButton) return; - doOpen(document()); + doOpen(document(), ActionOnLoadPlayInline); } void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) { @@ -1433,23 +1159,34 @@ void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) { psOpenFile(already, true); } } else { + QFileInfo alreadyInfo(already); QDir alreadyDir(already.isEmpty() ? QDir() : alreadyInfo.dir()); - QString name = already.isEmpty() ? data->name : alreadyInfo.fileName(), filter; + QString caption, filter, prefix, name; MimeType mimeType = mimeTypeForName(data->mime); QStringList p = mimeType.globPatterns(); QString pattern = p.isEmpty() ? QString() : p.front(); - if (name.isEmpty()) { - name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); - } - - if (pattern.isEmpty()) { - filter = QString(); + if (data->voice()) { + bool mp3 = (data->mime == qstr("audio/mp3")); + caption = lang(lng_save_audio); + filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"); + prefix = qsl("audio"); + name = already.isEmpty() ? (mp3 ? qsl(".mp3") : qsl(".ogg")) : alreadyInfo.fileName(); } else { - filter = mimeType.filterString() + qsl(";;All files (*.*)"); + caption = lang(lng_save_file); + if (pattern.isEmpty()) { + filter = QString(); + } else { + filter = mimeType.filterString() + qsl(";;All files (*.*)"); + } + prefix = qsl("doc"); + name = already.isEmpty() ? data->name : alreadyInfo.fileName(); + if (name.isEmpty()) { + name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); + } } - QString filename = saveFileName(lang(lng_save_file), filter, qsl("doc"), name, forceSavingAs, alreadyDir); + QString filename = saveFileName(caption, filter, prefix, name, forceSavingAs, alreadyDir); if (!filename.isEmpty()) { ActionOnLoad action = already.isEmpty() ? ActionOnLoadNone : ActionOnLoadOpenWith; FullMsgId actionMsgId = App::hoveredLinkItem() ? App::hoveredLinkItem()->fullId() : (App::contextItem() ? App::contextItem()->fullId() : FullMsgId()); @@ -1482,6 +1219,14 @@ void DocumentCancelLink::onClick(Qt::MouseButton button) const { } } +VoiceData::~VoiceData() { + if (!waveform.isEmpty() && waveform.at(0) == -1 && waveform.size() > sizeof(TaskId)) { + TaskId taskId = 0; + memcpy(&taskId, waveform.constData() + 1, sizeof(taskId)); + Local::cancelTask(taskId); + } +} + DocumentData::DocumentData(const DocumentId &id, const uint64 &access, int32 date, const QVector &attributes, const QString &mime, const ImagePtr &thumb, int32 dc, int32 size) : id(id) , type(FileDocument) , access(access) @@ -1496,8 +1241,8 @@ DocumentData::DocumentData(const DocumentId &id, const uint64 &access, int32 dat , _duration(-1) , _actionOnLoad(ActionOnLoadNone) , _loader(0) { - _location = Local::readFileLocation(mediaKey(DocumentFileLocation, dc, id)); setattributes(attributes); + _location = Local::readFileLocation(mediaKey(voice() ? AudioFileLocation : DocumentFileLocation, dc, id)); } void DocumentData::setattributes(const QVector &attributes) { @@ -1535,11 +1280,27 @@ void DocumentData::setattributes(const QVector &attributes case mtpc_documentAttributeAudio: { const MTPDdocumentAttributeAudio &d(attributes[i].c_documentAttributeAudio()); if (type == FileDocument) { - type = SongDocument; - SongData *song = new SongData(); - _additional = song; + if (d.is_voice()) { + type = VoiceDocument; + VoiceData *voice = new VoiceData(); + _additional = voice; + } else { + type = SongDocument; + SongData *song = new SongData(); + _additional = song; + } } - if (song()) { + if (voice()) { + voice()->duration = d.vduration.v; + VoiceWaveform waveform = documentWaveformDecode(qba(d.vwaveform)); + uchar wavemax = 0; + for (int32 i = 0, l = waveform.size(); i < l; ++i) { + uchar waveat = waveform.at(i); + if (wavemax < waveat) wavemax = waveat; + } + voice()->waveform = waveform; + voice()->wavemax = wavemax; + } else if (song()) { song()->duration = d.vduration.v; song()->title = qs(d.vtitle); song()->performer = qs(d.vperformer); @@ -1558,7 +1319,7 @@ void DocumentData::setattributes(const QVector &attributes } bool DocumentData::saveToCache() const { - return (type == StickerDocument) || (isAnimation() && size < AnimationInMemory); + return (type == StickerDocument) || (isAnimation() && size < AnimationInMemory) || (voice() && size < AudioVoiceMsgInMemory); } void DocumentData::forget() { @@ -1586,12 +1347,22 @@ void DocumentData::automaticLoad(const HistoryItem *item) { loadFromCloud = !(cAutoDownloadGif() & dbiadNoPrivate) || !(cAutoDownloadGif() & dbiadNoGroups); } save(QString(), _actionOnLoad, _actionOnLoadMsgId, loadFromCloud ? LoadFromCloudOrLocal : LoadFromLocalOnly, true); + } else if (voice()) { + if (item) { + bool loadFromCloud = false; + if (item->history()->peer->isUser()) { + loadFromCloud = !(cAutoDownloadAudio() & dbiadNoPrivate); + } else { + loadFromCloud = !(cAutoDownloadAudio() & dbiadNoGroups); + } + save(QString(), _actionOnLoad, _actionOnLoadMsgId, loadFromCloud ? LoadFromCloudOrLocal : LoadFromLocalOnly, true); + } } } } void DocumentData::automaticLoadSettingsChanged() { - if (loaded() || status != FileReady || !isAnimation() || !saveToCache() || _loader != CancelledMtpFileLoader) return; + if (loaded() || status != FileReady || (!isAnimation() && !voice()) || !saveToCache() || _loader != CancelledMtpFileLoader) return; _loader = 0; } @@ -1602,15 +1373,28 @@ void DocumentData::performActionOnLoad() { QString already = loc.name(); HistoryItem *item = _actionOnLoadMsgId.msg ? App::histItemById(_actionOnLoadMsgId) : 0; bool showImage = item && (size < MediaViewImageSizeLimit); + bool playVoice = voice() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && item; bool playMusic = song() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && item; bool playAnimation = isAnimation() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && showImage && item->getMedia(); - if (playMusic) { + if (playVoice) { + if (loaded()) { + AudioMsgId playing; + AudioPlayerState state = AudioPlayerStopped; + audioPlayer()->currentState(&playing, &state); + if (playing.msgId == _actionOnLoadMsgId && !(state & AudioPlayerStoppedMask) && state != AudioPlayerFinishing) { + audioPlayer()->pauseresume(OverviewVoiceFiles); + } else { + audioPlayer()->play(AudioMsgId(this, _actionOnLoadMsgId)); + if (App::main()) App::main()->audioMarkRead(this); + } + } + } else if (playMusic) { if (loaded()) { SongMsgId playing; AudioPlayerState playingState = AudioPlayerStopped; audioPlayer()->currentState(&playing, &playingState); if (playing.msgId == item->fullId() && !(playingState & AudioPlayerStoppedMask) && playingState != AudioPlayerFinishing) { - audioPlayer()->pauseresume(OverviewDocuments); + audioPlayer()->pauseresume(OverviewFiles); } else { SongMsgId song(this, item->fullId()); audioPlayer()->play(song); @@ -1636,7 +1420,10 @@ void DocumentData::performActionOnLoad() { psOpenFile(already, true); } } else if (_actionOnLoad == ActionOnLoadOpen || _actionOnLoad == ActionOnLoadPlayInline) { - if (loc.accessEnable()) { + if (voice()) { + psOpenFile(already); + if (App::main()) App::main()->audioMarkRead(this); + } else if (loc.accessEnable()) { if (showImage && QImageReader(loc.name()).canRead()) { if (_actionOnLoad == ActionOnLoadPlayInline) { item->getMedia()->playInline(item); @@ -1735,7 +1522,8 @@ void DocumentData::save(const QString &toFile, ActionOnLoad action, const FullMs if (fromCloud == LoadFromCloudOrLocal) _loader->permitLoadFromCloud(); } else { status = FileReady; - _loader = new mtpFileLoader(dc, id, access, DocumentFileLocation, toFile, size, (saveToCache() ? LoadToCacheAsWell : LoadToFileOnly), fromCloud, autoLoading); + LocationType type = voice() ? AudioFileLocation : DocumentFileLocation; + _loader = new mtpFileLoader(dc, id, access, type, toFile, size, (saveToCache() ? LoadToCacheAsWell : LoadToFileOnly), fromCloud, autoLoading); _loader->connect(_loader, SIGNAL(progress(FileLoader*)), App::main(), SLOT(documentLoadProgress(FileLoader*))); _loader->connect(_loader, SIGNAL(failed(FileLoader*,bool)), App::main(), SLOT(documentLoadFailed(FileLoader*,bool))); _loader->start(); @@ -1769,6 +1557,24 @@ void DocumentData::notifyLayoutChanged() const { } } +VoiceWaveform documentWaveformDecode(const QByteArray &encoded5bit) { + VoiceWaveform result((encoded5bit.size() * 8) / 5, 0); + for (int32 i = 0, l = result.size(); i < l; ++i) { // read each 5 bit of encoded5bit as 0-31 unsigned char + int32 byte = (i * 5) / 8, shift = (i * 5) % 8; + result[i] = (((*(uint16*)(encoded5bit.constData() + byte)) >> shift) & 0x1F); + } + return result; +} + +QByteArray documentWaveformEncode5bit(const VoiceWaveform &waveform) { + QByteArray result((waveform.size() * 5 + 7) / 8, 0); + for (int32 i = 0, l = waveform.size(); i < l; ++i) { // write each 0-31 unsigned char as 5 bit to result + int32 byte = (i * 5) / 8, shift = (i * 5) % 8; + (*(uint16*)(result.data() + byte)) |= (uint16(waveform.at(i) & 0x1F) << shift); + } + return result; +} + QString DocumentData::already(bool check) const { if (check && _location.name().isEmpty()) return QString(); return location(check).name(); @@ -1780,7 +1586,8 @@ QByteArray DocumentData::data() const { const FileLocation &DocumentData::location(bool check) const { if (check && !_location.check()) { - const_cast(this)->_location = Local::readFileLocation(mediaKey(DocumentFileLocation, dc, id)); + LocationType type = voice() ? AudioFileLocation : DocumentFileLocation; + const_cast(this)->_location = Local::readFileLocation(mediaKey(type, dc, id)); } return _location; } diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 78e899e56e73a1..38ed72308bf6a4 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -914,138 +914,13 @@ class VideoCancelLink : public VideoLink { }; -class AudioData { -public: - AudioData(const AudioId &id, const uint64 &access = 0, int32 date = 0, const QString &mime = QString(), int32 duration = 0, int32 dc = 0, int32 size = 0); - - void automaticLoad(const HistoryItem *item); // auto load voice message - void automaticLoadSettingsChanged(); - - bool loaded(bool check = false) const; - bool loading() const; - bool displayLoading() const; - void save(const QString &toFile, ActionOnLoad action = ActionOnLoadNone, const FullMsgId &actionMsgId = FullMsgId(), LoadFromCloudSetting fromCloud = LoadFromCloudOrLocal, bool autoLoading = false); - void cancel(); - float64 progress() const; - int32 loadOffset() const; - bool uploading() const; - - QString already(bool check = false) const; - QByteArray data() const; - const FileLocation &location(bool check = false) const; - void setLocation(const FileLocation &loc); - - bool saveToCache() const; - - void performActionOnLoad(); - - void forget(); - void setData(const QByteArray &data) { - _data = data; - } - - AudioId id; - uint64 access; - int32 date; - QString mime; - int32 duration; - int32 dc; - int32 size; - - FileStatus status; - int32 uploadOffset; - - int32 md5[8]; - -private: - FileLocation _location; - QByteArray _data; - - ActionOnLoad _actionOnLoad; - FullMsgId _actionOnLoadMsgId; - mutable mtpFileLoader *_loader; - - void notifyLayoutChanged() const; - -}; - -struct AudioMsgId { - AudioMsgId() : audio(0) { - } - AudioMsgId(AudioData *audio, const FullMsgId &msgId) : audio(audio), msgId(msgId) { - } - AudioMsgId(AudioData *audio, ChannelId channelId, MsgId msgId) : audio(audio), msgId(channelId, msgId) { - } - operator bool() const { - return audio; - } - AudioData *audio; - FullMsgId msgId; - -}; - -inline bool operator<(const AudioMsgId &a, const AudioMsgId &b) { - return quintptr(a.audio) < quintptr(b.audio) || (quintptr(a.audio) == quintptr(b.audio) && a.msgId < b.msgId); -} -inline bool operator==(const AudioMsgId &a, const AudioMsgId &b) { - return a.audio == b.audio && a.msgId == b.msgId; -} -inline bool operator!=(const AudioMsgId &a, const AudioMsgId &b) { - return !(a == b); -} - -class AudioLink : public ITextLink { - TEXT_LINK_CLASS(AudioLink) - -public: - AudioLink(AudioData *audio) : _audio(audio) { - } - AudioData *audio() const { - return _audio; - } - -private: - AudioData *_audio; - -}; - -class AudioSaveLink : public AudioLink { - TEXT_LINK_CLASS(AudioSaveLink) - -public: - AudioSaveLink(AudioData *audio) : AudioLink(audio) { - } - static void doSave(AudioData *audio, bool forceSavingAs = false); - void onClick(Qt::MouseButton button) const; - -}; - -class AudioOpenLink : public AudioLink { - TEXT_LINK_CLASS(AudioOpenLink) - -public: - AudioOpenLink(AudioData *audio) : AudioLink(audio) { - } - void onClick(Qt::MouseButton button) const; - -}; - -class AudioCancelLink : public AudioLink { - TEXT_LINK_CLASS(AudioCancelLink) - -public: - AudioCancelLink(AudioData *audio) : AudioLink(audio) { - } - void onClick(Qt::MouseButton button) const; - -}; - enum DocumentType { FileDocument = 0, VideoDocument = 1, SongDocument = 2, StickerDocument = 3, AnimatedDocument = 4, + VoiceDocument = 5, }; struct DocumentAdditionalData { @@ -1072,6 +947,16 @@ struct SongData : public DocumentAdditionalData { }; +typedef QVector VoiceWaveform; // [0] == -1 -- counting, [0] == -2 -- could not count +struct VoiceData : public DocumentAdditionalData { + VoiceData() : duration(0), wavemax(0) { + } + ~VoiceData(); + int32 duration; + VoiceWaveform waveform; + char wavemax; +}; + bool fileIsImage(const QString &name, const QString &mime); class DocumentData { @@ -1126,12 +1011,21 @@ class DocumentData { SongData *song() { return (type == SongDocument) ? static_cast(_additional) : 0; } + VoiceData *voice() { + return (type == VoiceDocument) ? static_cast(_additional) : 0; + } + const VoiceData *voice() const { + return (type == VoiceDocument) ? static_cast(_additional) : 0; + } bool isAnimation() const { return (type == AnimatedDocument) || !mime.compare(qstr("image/gif"), Qt::CaseInsensitive); } bool isGifv() const { return (type == AnimatedDocument) && !mime.compare(qstr("video/mp4"), Qt::CaseInsensitive); } + bool isMusic() const { + return (type == SongDocument) ? !static_cast(_additional)->title.isEmpty() : false; + } int32 duration() const { return (isAnimation() || type == VideoDocument) ? _duration : -1; } @@ -1139,6 +1033,9 @@ class DocumentData { return !isAnimation() && (type != VideoDocument) && (_duration > 0); } void recountIsImage(); + void setData(const QByteArray &data) { + _data = data; + } ~DocumentData(); @@ -1172,6 +1069,9 @@ class DocumentData { }; +VoiceWaveform documentWaveformDecode(const QByteArray &encoded5bit); +QByteArray documentWaveformEncode5bit(const VoiceWaveform &waveform); + struct SongMsgId { SongMsgId() : song(0) { } @@ -1196,6 +1096,31 @@ inline bool operator!=(const SongMsgId &a, const SongMsgId &b) { return !(a == b); } +struct AudioMsgId { + AudioMsgId() : audio(0) { + } + AudioMsgId(DocumentData *audio, const FullMsgId &msgId) : audio(audio), msgId(msgId) { + } + AudioMsgId(DocumentData *audio, ChannelId channelId, MsgId msgId) : audio(audio), msgId(channelId, msgId) { + } + operator bool() const { + return audio; + } + DocumentData *audio; + FullMsgId msgId; + +}; + +inline bool operator<(const AudioMsgId &a, const AudioMsgId &b) { + return quintptr(a.audio) < quintptr(b.audio) || (quintptr(a.audio) == quintptr(b.audio) && a.msgId < b.msgId); +} +inline bool operator==(const AudioMsgId &a, const AudioMsgId &b) { + return a.audio == b.audio && a.msgId == b.msgId; +} +inline bool operator!=(const AudioMsgId &a, const AudioMsgId &b) { + return !(a == b); +} + class DocumentLink : public ITextLink { TEXT_LINK_CLASS(DocumentLink) @@ -1233,13 +1158,22 @@ class DocumentOpenLink : public DocumentLink { }; +class VoiceSaveLink : public DocumentOpenLink { + TEXT_LINK_CLASS(VoiceSaveLink) + +public: + VoiceSaveLink(DocumentData *document) : DocumentOpenLink(document) { + } + void onClick(Qt::MouseButton button) const; + +}; + class GifOpenLink : public DocumentOpenLink { TEXT_LINK_CLASS(GifOpenLink) public: GifOpenLink(DocumentData *document) : DocumentOpenLink(document) { } - static void doOpen(DocumentData *document); void onClick(Qt::MouseButton button) const; }; diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 4647bada865488..11fe4f810852e2 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -532,18 +532,21 @@ inline void destroyImplementation(I *&ptr) { class Interfaces; typedef void(*InterfaceConstruct)(void *location, Interfaces *interfaces); typedef void(*InterfaceDestruct)(void *location); +typedef void(*InterfaceAssign)(void *location, void *waslocation); struct InterfaceWrapStruct { InterfaceWrapStruct() : Size(0), Construct(0), Destruct(0) { } - InterfaceWrapStruct(int size, InterfaceConstruct construct, InterfaceDestruct destruct) + InterfaceWrapStruct(int size, InterfaceConstruct construct, InterfaceDestruct destruct, InterfaceAssign assign) : Size(size) , Construct(construct) - , Destruct(destruct) { + , Destruct(destruct) + , Assign(assign) { } int Size; InterfaceConstruct Construct; InterfaceDestruct Destruct; + InterfaceAssign Assign; }; template @@ -560,6 +563,9 @@ struct InterfaceWrapTemplate { static void Destruct(void *location) { ((Type*)location)->~Type(); } + static void Assign(void *location, void *waslocation) { + *((Type*)location) = *((Type*)waslocation); + } }; extern InterfaceWrapStruct InterfaceWraps[64]; @@ -578,7 +584,7 @@ class BasicInterface { if (InterfaceIndexLast.testAndSetOrdered(last, last + 1)) { t_assert(last < 64); if (_index.testAndSetOrdered(0, last + 1)) { - InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct); + InterfaceWraps[last] = InterfaceWrapStruct(InterfaceWrapTemplate::Size, InterfaceWrapTemplate::Construct, InterfaceWrapTemplate::Destruct, InterfaceWrapTemplate::Assign); } break; } @@ -627,6 +633,10 @@ class InterfacesMetadata { int size, last; int offsets[64]; + bool equals(const uint64 &mask) const { + return _mask == mask; + } + private: uint64 _mask; @@ -637,22 +647,25 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask); class Interfaces { public: - Interfaces(uint64 mask = 0) : _meta(GetInterfacesMetadata(mask)), _data(0) { - if (_meta->size) { - _data = malloc(_meta->size); + Interfaces(uint64 mask = 0) : _data(0) { + if (mask) { + const InterfacesMetadata *meta = GetInterfacesMetadata(mask); + int32 size = sizeof(const InterfacesMetadata *) + meta->size; + _data = malloc(size); if (!_data) { // terminate if we can't allocate memory throw "Can't allocate memory!"; } - for (int i = 0; i < _meta->last; ++i) { - int offset = _meta->offsets[i]; + _meta() = meta; + for (int i = 0; i < meta->last; ++i) { + int offset = meta->offsets[i]; if (offset >= 0) { try { InterfaceWraps[i].Construct(_dataptrunsafe(offset), this); } catch (...) { while (i > 0) { --i; - offset = _meta->offsets[--i]; + offset = meta->offsets[--i]; if (offset >= 0) { InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); } @@ -663,10 +676,28 @@ class Interfaces { } } } + void UpdateInterfaces(uint64 mask = 0) { + if (!_data && !mask) return; + if (!_data || !_meta()->equals(mask)) { + Interfaces tmp(mask); + tmp.swap(*this); + + if (_data && tmp._data) { + const InterfacesMetadata *meta = _meta(), *wasmeta = tmp._meta(); + for (int i = 0; i < meta->last; ++i) { + int offset = meta->offsets[i], wasoffset = wasmeta->offsets[i]; + if (offset >= 0 && wasoffset >= 0) { + InterfaceWraps[i].Assign(_dataptrunsafe(offset), tmp._dataptrunsafe(wasoffset)); + } + } + } + } + } ~Interfaces() { if (_data) { - for (int i = 0; i < _meta->last; ++i) { - int offset = _meta->offsets[i]; + const InterfacesMetadata *meta = _meta(); + for (int i = 0; i < meta->last; ++i) { + int offset = meta->offsets[i]; if (offset >= 0) { InterfaceWraps[i].Destruct(_dataptrunsafe(offset)); } @@ -677,24 +708,33 @@ class Interfaces { template Type *Get() { - return (Type*)_dataptr(_meta->offsets[Type::Index()]); + return static_cast(_dataptr(_meta()->offsets[Type::Index()])); } template const Type *Get() const { - return (const Type*)_dataptr(_meta->offsets[Type::Index()]); + return static_cast(_dataptr(_meta()->offsets[Type::Index()])); } private: void *_dataptrunsafe(int skip) const { - return (char*)_data + skip; + return (char*)_data + sizeof(const InterfacesMetadata*) + skip; } void *_dataptr(int skip) const { return (skip >= 0) ? _dataptrunsafe(skip) : 0; } - const InterfacesMetadata *_meta; + const InterfacesMetadata *&_meta() const { + return *static_cast(_data); + } void *_data; + Interfaces(const Interfaces &other); + Interfaces &operator=(const Interfaces &other); + + void swap(Interfaces &other) { + std::swap(_data, other._data); + } + }; template diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 89fbecc527b034..801b0d0f24026f 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -645,7 +645,7 @@ void Window::sendServiceHistoryRequest() { int32 userFlags = MTPDuser::flag_first_name | MTPDuser::flag_phone | MTPDuser::flag_status | MTPDuser::flag_verified; user = App::feedUsers(MTP_vector(1, MTP_user(MTP_int(userFlags), MTP_int(ServiceUserId), MTPlong(), MTP_string("Telegram"), MTPstring(), MTPstring(), MTP_string("42777"), MTP_userProfilePhotoEmpty(), MTP_userStatusRecently(), MTPint(), MTPstring(), MTPstring()))); } - _serviceHistoryRequest = MTP::send(MTPmessages_GetHistory(user->input, MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), main->rpcDone(&MainWidget::serviceHistoryDone), main->rpcFail(&MainWidget::serviceHistoryFail)); + _serviceHistoryRequest = MTP::send(MTPmessages_GetHistory(user->input, MTP_int(0), MTP_int(0), MTP_int(0), MTP_int(1), MTP_int(0), MTP_int(0)), main->rpcDone(&MainWidget::serviceHistoryDone), main->rpcFail(&MainWidget::serviceHistoryFail)); } void Window::setupMain(bool anim, const MTPUser *self) { From 3579276b49267cc5d012198a112954b93623c3af Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Feb 2016 21:18:32 +0300 Subject: [PATCH 058/133] videos rendered like files, fixed history loading --- Telegram/SourceFiles/app.cpp | 105 +--- Telegram/SourceFiles/app.h | 10 - Telegram/SourceFiles/history.cpp | 51 +- Telegram/SourceFiles/history.h | 8 +- Telegram/SourceFiles/historywidget.cpp | 28 +- Telegram/SourceFiles/layout.cpp | 6 +- Telegram/SourceFiles/layout.h | 4 +- Telegram/SourceFiles/mainwidget.cpp | 46 +- Telegram/SourceFiles/mainwidget.h | 6 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 2 +- .../SourceFiles/mtproto/mtpFileLoader.cpp | 4 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 141 ----- Telegram/SourceFiles/mtproto/mtpScheme.h | 541 ------------------ Telegram/SourceFiles/mtproto/scheme.tl | 11 - Telegram/SourceFiles/overviewwidget.cpp | 26 +- Telegram/SourceFiles/structs.cpp | 343 ++--------- Telegram/SourceFiles/structs.h | 111 +--- Telegram/SourceFiles/types.cpp | 2 + Telegram/SourceFiles/types.h | 18 +- 19 files changed, 136 insertions(+), 1327 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index ed66b1ba110d80..ebd42f899a44a0 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -47,7 +47,6 @@ namespace { UpdatedPeers updatedPeers; PhotosData photosData; - VideosData videosData; DocumentsData documentsData; typedef QHash ImageLinksData; @@ -63,7 +62,6 @@ namespace { ChannelReplyMarkups channelReplyMarkups; PhotoItems photoItems; - VideoItems videoItems; DocumentItems documentItems; WebPageItems webPageItems; SharedContactItems sharedContactItems; @@ -1287,10 +1285,6 @@ namespace App { return App::photoSet(photo.vid.v, convert, 0, 0, ImagePtr(), ImagePtr(), ImagePtr()); } - VideoData *feedVideo(const MTPDvideo &video, VideoData *convert) { - return App::videoSet(video.vid.v, convert, video.vaccess_hash.v, video.vdate.v, video.vduration.v, video.vw.v, video.vh.v, App::image(video.vthumb), video.vdc_id.v, video.vsize.v); - } - DocumentData *feedDocument(const MTPdocument &document, const QPixmap &thumb) { switch (document.type()) { case mtpc_document: { @@ -1496,60 +1490,6 @@ namespace App { return result; } - VideoData *video(const VideoId &video) { - VideosData::const_iterator i = ::videosData.constFind(video); - if (i == ::videosData.cend()) { - i = ::videosData.insert(video, new VideoData(video)); - } - return i.value(); - } - - VideoData *videoSet(const VideoId &video, VideoData *convert, const uint64 &access, int32 date, int32 duration, int32 w, int32 h, const ImagePtr &thumb, int32 dc, int32 size) { - if (convert) { - if (convert->id != video) { - VideosData::iterator i = ::videosData.find(convert->id); - if (i != ::videosData.cend() && i.value() == convert) { - ::videosData.erase(i); - } - convert->id = video; - convert->status = FileReady; - } - if (date) { - convert->access = access; - convert->date = date; - updateImage(convert->thumb, thumb); - convert->duration = duration; - convert->w = w; - convert->h = h; - convert->dc = dc; - convert->size = size; - } - } - VideosData::const_iterator i = ::videosData.constFind(video); - VideoData *result; - if (i == ::videosData.cend()) { - if (convert) { - result = convert; - } else { - result = new VideoData(video, access, date, duration, w, h, thumb, dc, size); - } - ::videosData.insert(video, result); - } else { - result = i.value(); - if (result != convert && date) { - result->access = access; - result->date = date; - result->duration = duration; - result->w = w; - result->h = h; - updateImage(result->thumb, thumb); - result->dc = dc; - result->size = size; - } - } - return result; - } - DocumentData *document(const DocumentId &document) { DocumentsData::const_iterator i = ::documentsData.constFind(document); if (i == ::documentsData.cend()) { @@ -1566,10 +1506,15 @@ namespace App { if (i != ::documentsData.cend() && i.value() == convert) { ::documentsData.erase(i); } - Local::copyStickerImage(mediaKey(DocumentFileLocation, convert->dc, convert->id), mediaKey(DocumentFileLocation, dc, document)); + + // inline bot sent gifs caching + if (!convert->voice() && !convert->isVideo()) { + Local::copyStickerImage(mediaKey(DocumentFileLocation, convert->dc, convert->id), mediaKey(DocumentFileLocation, dc, document)); + } + convert->id = document; convert->status = FileReady; - sentSticker = !!convert->sticker(); + sentSticker = (convert->sticker() != 0); } if (date) { convert->access = access; @@ -1577,7 +1522,7 @@ namespace App { convert->setattributes(attributes); convert->mime = mime; if (!thumb->isNull() && (convert->thumb->isNull() || convert->thumb->width() < thumb->width() || convert->thumb->height() < thumb->height())) { - convert->thumb = thumb; + updateImage(convert->thumb, thumb); } convert->dc = dc; convert->size = size; @@ -1593,7 +1538,7 @@ namespace App { const FileLocation &loc(convert->location(true)); if (!loc.isEmpty()) { - Local::writeFileLocation(mediaKey(DocumentFileLocation, convert->dc, convert->id), loc); + Local::writeFileLocation(convert->mediaKey(), loc); } } DocumentsData::const_iterator i = ::documentsData.constFind(document); @@ -1604,7 +1549,9 @@ namespace App { } else { result = new DocumentData(document, access, date, attributes, mime, thumb, dc, size); result->recountIsImage(); - if (result->sticker()) result->sticker()->loc = thumbLocation; + if (result->sticker()) { + result->sticker()->loc = thumbLocation; + } } ::documentsData.insert(document, result); } else { @@ -1625,7 +1572,9 @@ namespace App { } } } - if (sentSticker && App::main()) App::main()->incrementSticker(result); + if (sentSticker && App::main()) { + App::main()->incrementSticker(result); + } return result; } @@ -1724,9 +1673,6 @@ namespace App { for (PhotosData::const_iterator i = ::photosData.cbegin(), e = ::photosData.cend(); i != e; ++i) { i.value()->forget(); } - for (VideosData::const_iterator i = ::videosData.cbegin(), e = ::videosData.cend(); i != e; ++i) { - i.value()->forget(); - } for (DocumentsData::const_iterator i = ::documentsData.cbegin(), e = ::documentsData.cend(); i != e; ++i) { i.value()->forget(); } @@ -1880,10 +1826,6 @@ namespace App { delete *i; } ::photosData.clear(); - for (VideosData::const_iterator i = ::videosData.cbegin(), e = ::videosData.cend(); i != e; ++i) { - delete *i; - } - ::videosData.clear(); for (DocumentsData::const_iterator i = ::documentsData.cbegin(), e = ::documentsData.cend(); i != e; ++i) { delete *i; } @@ -1901,7 +1843,6 @@ namespace App { cSetLastSavedGifsUpdate(0); cSetReportSpamStatuses(ReportSpamStatuses()); ::photoItems.clear(); - ::videoItems.clear(); ::documentItems.clear(); ::webPageItems.clear(); ::sharedContactItems.clear(); @@ -2300,22 +2241,6 @@ namespace App { return ::photosData; } - void regVideoItem(VideoData *data, HistoryItem *item) { - ::videoItems[data].insert(item, NullType()); - } - - void unregVideoItem(VideoData *data, HistoryItem *item) { - ::videoItems[data].remove(item); - } - - const VideoItems &videoItems() { - return ::videoItems; - } - - const VideosData &videosData() { - return ::videosData; - } - void regDocumentItem(DocumentData *data, HistoryItem *item) { ::documentItems[data].insert(item, NullType()); } diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index c62278798db215..760ea778052ff8 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -36,14 +36,12 @@ class FileUploader; typedef QMap HistoryItemsMap; typedef QHash PhotoItems; -typedef QHash VideoItems; typedef QHash DocumentItems; typedef QHash WebPageItems; typedef QHash SharedContactItems; typedef QHash GifItems; typedef QHash PhotosData; -typedef QHash VideosData; typedef QHash DocumentsData; struct ReplyMarkup { @@ -104,7 +102,6 @@ namespace App { PhotoData *feedPhoto(const MTPPhoto &photo, const PreparedPhotoThumbs &thumbs); PhotoData *feedPhoto(const MTPPhoto &photo, PhotoData *convert = 0); PhotoData *feedPhoto(const MTPDphoto &photo, PhotoData *convert = 0); - VideoData *feedVideo(const MTPDvideo &video, VideoData *convert = 0); DocumentData *feedDocument(const MTPdocument &document, const QPixmap &thumb); DocumentData *feedDocument(const MTPdocument &document, DocumentData *convert = 0); DocumentData *feedDocument(const MTPDdocument &document, DocumentData *convert = 0); @@ -132,8 +129,6 @@ namespace App { QString peerName(const PeerData *peer, bool forDialogs = false); PhotoData *photo(const PhotoId &photo); PhotoData *photoSet(const PhotoId &photo, PhotoData *convert, const uint64 &access, int32 date, const ImagePtr &thumb, const ImagePtr &medium, const ImagePtr &full); - VideoData *video(const VideoId &video); - VideoData *videoSet(const VideoId &video, VideoData *convert, const uint64 &access, int32 date, int32 duration, int32 w, int32 h, const ImagePtr &thumb, int32 dc, int32 size); DocumentData *document(const DocumentId &document); DocumentData *documentSet(const DocumentId &document, DocumentData *convert, const uint64 &access, int32 date, const QVector &attributes, const QString &mime, const ImagePtr &thumb, int32 dc, int32 size, const StorageImageLocation &thumbLocation); WebPageData *webPage(const WebPageId &webPage); @@ -208,11 +203,6 @@ namespace App { const PhotoItems &photoItems(); const PhotosData &photosData(); - void regVideoItem(VideoData *data, HistoryItem *item); - void unregVideoItem(VideoData *data, HistoryItem *item); - const VideoItems &videoItems(); - const VideosData &videosData(); - void regDocumentItem(DocumentData *data, HistoryItem *item); void unregDocumentItem(DocumentData *data, HistoryItem *item); const DocumentItems &documentItems(); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 1fec50eeebd5ed..8c675c0ce8976f 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -1362,13 +1362,6 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo default: badMedia = 1; break; } break; - case mtpc_messageMediaVideo: - switch (m.vmedia.c_messageMediaVideo().vvideo.type()) { - case mtpc_video: break; - case mtpc_videoEmpty: badMedia = 2; break; - default: badMedia = 1; break; - } - break; case mtpc_messageMediaDocument: switch (m.vmedia.c_messageMediaDocument().vdocument.type()) { case mtpc_document: break; @@ -3047,12 +3040,6 @@ void RadialAnimation::draw(Painter &p, const QRect &inner, int32 thickness, cons } namespace { - int32 videoMaxStatusWidth(VideoData *video) { - int32 result = st::normalFont->width(formatDownloadText(video->size, video->size)); - result = qMax(result, st::normalFont->width(formatDurationAndSizeText(video->duration, video->size))); - return result; - } - int32 documentMaxStatusWidth(DocumentData *document) { int32 result = st::normalFont->width(formatDownloadText(document->size, document->size)); if (SongData *song = document->song()) { @@ -3061,6 +3048,8 @@ namespace { } else if (VoiceData *voice = document->voice()) { result = qMax(result, st::normalFont->width(formatPlayedText(voice->duration, voice->duration))); result = qMax(result, st::normalFont->width(formatDurationAndSizeText(voice->duration, document->size))); + } else if (document->isVideo()) { + result = qMax(result, st::normalFont->width(formatDurationAndSizeText(document->duration(), document->size))); } else { result = qMax(result, st::normalFont->width(formatSizeText(document->size))); } @@ -3494,15 +3483,15 @@ ImagePtr HistoryPhoto::replyPreview() { return _data->makeReplyPreview(); } -HistoryVideo::HistoryVideo(const MTPDvideo &video, const QString &caption, HistoryItem *parent) : HistoryFileMedia() -, _data(App::feedVideo(video)) +HistoryVideo::HistoryVideo(DocumentData *document, const QString &caption, HistoryItem *parent) : HistoryFileMedia() +, _data(document) , _thumbw(1) , _caption(st::minPhotoSize - st::msgPadding.left() - st::msgPadding.right()) { if (!caption.isEmpty()) { _caption.setText(st::msgFont, caption + parent->skipBlock(), itemTextNoMonoOptions(parent)); } - setLinks(new VideoOpenLink(_data), new VideoSaveLink(_data), new VideoCancelLink(_data)); + setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); setStatusSize(FileStatusSizeReady); @@ -3513,7 +3502,7 @@ HistoryVideo::HistoryVideo(const HistoryVideo &other) : HistoryFileMedia() , _data(other._data) , _thumbw(other._thumbw) , _caption(other._caption) { - setLinks(new VideoOpenLink(_data), new VideoSaveLink(_data), new VideoCancelLink(_data)); + setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); setStatusSize(other._statusSize); } @@ -3539,8 +3528,8 @@ void HistoryVideo::initDimensions(const HistoryItem *parent) { _thumbw = qMax(tw, 1); int32 minWidth = qMax(st::minPhotoSize, parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x())); - minWidth = qMax(minWidth, videoMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); - _maxw = qMax(_thumbw, int16(minWidth)); + minWidth = qMax(minWidth, documentMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); + _maxw = qMax(_thumbw, int32(minWidth)); _minh = qMax(th, int32(st::minPhotoSize)); if (bubble) { _maxw += st::mediaPadding.left() + st::mediaPadding.right(); @@ -3575,8 +3564,8 @@ int32 HistoryVideo::resize(int32 width, const HistoryItem *parent) { } int32 minWidth = qMax(st::minPhotoSize, parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x())); - minWidth = qMax(minWidth, videoMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); - _width = qMax(_thumbw, int16(minWidth)); + minWidth = qMax(minWidth, documentMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); + _width = qMax(_thumbw, int32(minWidth)); _height = qMax(th, int32(st::minPhotoSize)); if (bubble) { _width += st::mediaPadding.left() + st::mediaPadding.right(); @@ -3722,7 +3711,7 @@ void HistoryVideo::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x } void HistoryVideo::setStatusSize(int32 newSize) const { - HistoryFileMedia::setStatusSize(newSize, _data->size, _data->duration, 0); + HistoryFileMedia::setStatusSize(newSize, _data->size, _data->duration(), 0); } const QString HistoryVideo::inDialogsText() const { @@ -3753,11 +3742,11 @@ void HistoryVideo::updateStatusText(const HistoryItem *parent) const { } void HistoryVideo::regItem(HistoryItem *item) { - App::regVideoItem(_data, item); + App::regDocumentItem(_data, item); } void HistoryVideo::unregItem(HistoryItem *item) { - App::unregVideoItem(_data, item); + App::unregDocumentItem(_data, item); } ImagePtr HistoryVideo::replyPreview() { @@ -4346,9 +4335,9 @@ void HistoryDocument::updateFrom(const MTPMessageMedia &media, HistoryItem *pare App::feedDocument(media.c_messageMediaDocument().vdocument, _data); if (!_data->data().isEmpty()) { if (_data->voice()) { - Local::writeAudio(mediaKey(AudioFileLocation, _data->dc, _data->id), _data->data()); + Local::writeAudio(_data->mediaKey(), _data->data()); } else { - Local::writeStickerImage(mediaKey(DocumentFileLocation, _data->dc, _data->id), _data->data()); + Local::writeStickerImage(_data->mediaKey(), _data->data()); } } } @@ -4887,7 +4876,7 @@ void HistorySticker::updateFrom(const MTPMessageMedia &media, HistoryItem *paren if (media.type() == mtpc_messageMediaDocument) { App::feedDocument(media.c_messageMediaDocument().vdocument, _data); if (!_data->data().isEmpty()) { - Local::writeStickerImage(mediaKey(DocumentFileLocation, _data->dc, _data->id), _data->data()); + Local::writeStickerImage(_data->mediaKey(), _data->data()); } } } @@ -6113,12 +6102,6 @@ void HistoryMessage::initMedia(const MTPMessageMedia *media, QString ¤tTex _media = new HistoryPhoto(App::feedPhoto(photo.vphoto.c_photo()), qs(photo.vcaption), this); } } break; - case mtpc_messageMediaVideo: { - const MTPDmessageMediaVideo &video(media->c_messageMediaVideo()); - if (video.vvideo.type() == mtpc_video) { - _media = new HistoryVideo(video.vvideo.c_video(), qs(video.vcaption), this); - } - } break; case mtpc_messageMediaDocument: { const MTPDocument &document(media->c_messageMediaDocument().vdocument); if (document.type() == mtpc_document) { @@ -6146,6 +6129,8 @@ void HistoryMessage::initMediaFromDocument(DocumentData *doc, const QString &cap _media = new HistorySticker(doc); } else if (doc->isAnimation()) { _media = new HistoryGif(doc, caption, this); + } else if (doc->isVideo()) { + _media = new HistoryVideo(doc, caption, this); } else { _media = new HistoryDocument(doc, caption, this); } diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 045144ccd1392b..0ac06d614017fd 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -1354,7 +1354,7 @@ class HistoryPhoto : public HistoryFileMedia { class HistoryVideo : public HistoryFileMedia { public: - HistoryVideo(const MTPDvideo &video, const QString &caption, HistoryItem *parent); + HistoryVideo(DocumentData *document, const QString &caption, HistoryItem *parent); HistoryVideo(const HistoryVideo &other); HistoryMediaType type() const { return MediaTypeVideo; @@ -1372,7 +1372,7 @@ class HistoryVideo : public HistoryFileMedia { const QString inDialogsText() const; const QString inHistoryText() const; - VideoData *video() const { + DocumentData *getDocument() { return _data; } @@ -1411,8 +1411,8 @@ class HistoryVideo : public HistoryFileMedia { } private: - VideoData *_data; - int16 _thumbw; + DocumentData *_data; + int32 _thumbw; Text _caption; void setStatusSize(int32 newSize) const; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index baf099ec8611fc..59daed82bee440 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -864,10 +864,10 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _contextMenuLnk = textlnkOver(); HistoryItem *item = App::hoveredItem() ? App::hoveredItem() : App::hoveredLinkItem(); PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); + bool lnkIsVideo = lnkDocument ? lnkDocument->document()->isVideo() : false; bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; - if (lnkPhoto || lnkVideo || lnkDocument) { + if (lnkPhoto || lnkDocument) { if (isUponSelected > 0) { _menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true); } @@ -879,17 +879,17 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _menu->addAction(lang(lng_context_save_image), this, SLOT(saveContextImage()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_image), this, SLOT(copyContextImage()))->setEnabled(true); } else { - if ((lnkVideo && lnkVideo->video()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { + if (lnkDocument && lnkDocument->document()->loading()) { _menu->addAction(lang(lng_context_cancel_download), this, SLOT(cancelContextDownload()))->setEnabled(true); } else { if (lnkDocument && lnkDocument->document()->loaded() && lnkDocument->document()->isGifv()) { _menu->addAction(lang(lng_context_save_gif), this, SLOT(saveContextGif()))->setEnabled(true); } - if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { + if (lnkDocument && !lnkDocument->document()->already(true).isEmpty()) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); - _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkIsVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkIsVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } if (isUponSelected > 1) { @@ -1069,9 +1069,7 @@ void HistoryInner::copyContextImage() { } void HistoryInner::cancelContextDownload() { - if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { - lnkVideo->video()->cancel(); - } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { + if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { lnkDocument->document()->cancel(); } else if (HistoryItem *item = App::contextItem()) { if (HistoryMedia *media = item->getMedia()) { @@ -1084,9 +1082,7 @@ void HistoryInner::cancelContextDownload() { void HistoryInner::showContextInFolder() { QString already; - if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { - already = lnkVideo->video()->already(true); - } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { + if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { already = lnkDocument->document()->already(true); } else if (HistoryItem *item = App::contextItem()) { if (HistoryMedia *media = item->getMedia()) { @@ -1101,17 +1097,13 @@ void HistoryInner::showContextInFolder() { void HistoryInner::openContextFile() { HistoryItem *was = App::hoveredLinkItem(); App::hoveredLinkItem(App::contextItem()); - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkVideo) VideoOpenLink(lnkVideo->video()).onClick(Qt::LeftButton); if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); App::hoveredLinkItem(was); } void HistoryInner::saveContextFile() { - if (VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data())) { - VideoSaveLink::doSave(lnkVideo->video(), true); - } else if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { + if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { DocumentSaveLink::doSave(lnkDocument->document(), true); } else if (HistoryItem *item = App::contextItem()) { if (HistoryMedia *media = item->getMedia()) { @@ -4235,7 +4227,7 @@ void HistoryWidget::firstLoadMessages() { if (loadImportant) { _firstLoadRequest = MTP::send(MTPchannels_GetImportantHistory(from->asChannel()->inputChannel, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } else { - _firstLoadRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(offset), MTP_int(0), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); + _firstLoadRequest = MTP::send(MTPmessages_GetHistory(from->input, MTP_int(offset_id), MTP_int(0), MTP_int(offset), MTP_int(loadCount), MTP_int(0), MTP_int(0)), rpcDone(&HistoryWidget::messagesReceived, from), rpcFail(&HistoryWidget::messagesFailed)); } } diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 8540930a8a0f91..20b5ad04cdd32d 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -385,11 +385,11 @@ void LayoutOverviewPhoto::getState(TextLinkPtr &link, HistoryCursorState &cursor } } -LayoutOverviewVideo::LayoutOverviewVideo(VideoData *video, HistoryItem *parent) : LayoutAbstractFileItem(0, parent) +LayoutOverviewVideo::LayoutOverviewVideo(DocumentData *video, HistoryItem *parent) : LayoutAbstractFileItem(0, parent) , _data(video) -, _duration(formatDurationText(_data->duration)) +, _duration(formatDurationText(_data->duration())) , _thumbLoaded(false) { - setLinks(new VideoOpenLink(_data), new VideoSaveLink(_data), new VideoCancelLink(_data)); + setLinks(new DocumentOpenLink(_data), new DocumentSaveLink(_data), new DocumentCancelLink(_data)); } void LayoutOverviewVideo::initDimensions() { diff --git a/Telegram/SourceFiles/layout.h b/Telegram/SourceFiles/layout.h index 7319613a1ee806..9cd62412782bf3 100644 --- a/Telegram/SourceFiles/layout.h +++ b/Telegram/SourceFiles/layout.h @@ -317,7 +317,7 @@ class LayoutOverviewPhoto : public LayoutMediaItem { class LayoutOverviewVideo : public LayoutAbstractFileItem { public: - LayoutOverviewVideo(VideoData *photo, HistoryItem *parent); + LayoutOverviewVideo(DocumentData *video, HistoryItem *parent); virtual void initDimensions(); virtual int32 resizeGetHeight(int32 width); @@ -339,7 +339,7 @@ class LayoutOverviewVideo : public LayoutAbstractFileItem { } private: - VideoData *_data; + DocumentData *_data; QString _duration; mutable QPixmap _pix; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index d64f8004a64abc..085b958d733fe3 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1647,24 +1647,6 @@ void MainWidget::messagesAffected(PeerData *peer, const MTPmessages_AffectedMess } } -void MainWidget::videoLoadProgress(FileLoader *loader) { - mtpFileLoader *l = loader ? loader->mtpLoader() : 0; - if (!l) return; - - VideoData *video = App::video(l->objId()); - if (video->loaded()) { - video->performActionOnLoad(); - } - - const VideoItems &items(App::videoItems()); - VideoItems::const_iterator i = items.constFind(video); - if (i != items.cend()) { - for (HistoryItemsMap::const_iterator j = i->cbegin(), e = i->cend(); j != e; ++j) { - Ui::repaintHistoryItem(j.key()); - } - } -} - void MainWidget::loadFailed(mtpFileLoader *loader, bool started, const char *retrySlot) { failedObjId = loader->objId(); failedFileName = loader->fileName(); @@ -1691,24 +1673,6 @@ void MainWidget::ui_showPeerHistoryAsync(quint64 peerId, qint32 showAtMsgId) { Ui::showPeerHistory(peerId, showAtMsgId); } -void MainWidget::videoLoadFailed(FileLoader *loader, bool started) { - mtpFileLoader *l = loader ? loader->mtpLoader() : 0; - if (!l) return; - - loadFailed(l, started, SLOT(videoLoadRetry())); - VideoData *video = App::video(l->objId()); - if (video) { - if (video->loading()) video->cancel(); - video->status = FileDownloadFailed; - } -} - -void MainWidget::videoLoadRetry() { - Ui::hideLayer(); - VideoData *video = App::video(failedObjId); - if (video) video->save(failedFileName); -} - void MainWidget::audioPlayProgress(const AudioMsgId &audioId) { AudioMsgId playing; AudioPlayerState state = AudioPlayerStopped; @@ -1879,7 +1843,7 @@ void MainWidget::inlineResultLoadFailed(FileLoader *loader, bool started) { //Ui::repaintInlineItem(); } -void MainWidget::audioMarkRead(DocumentData *data) { +void MainWidget::mediaMarkRead(DocumentData *data) { const DocumentItems &items(App::documentItems()); DocumentItems::const_iterator i = items.constFind(data); if (i != items.cend()) { @@ -1887,14 +1851,6 @@ void MainWidget::audioMarkRead(DocumentData *data) { } } -void MainWidget::videoMarkRead(VideoData *data) { - const VideoItems &items(App::videoItems()); - VideoItems::const_iterator i = items.constFind(data); - if (i != items.cend()) { - mediaMarkRead(i.value()); - } -} - void MainWidget::mediaMarkRead(const HistoryItemsMap &items) { QVector markedIds; markedIds.reserve(items.size()); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index b20465ef8a6a0d..31a8989df849a9 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -375,8 +375,7 @@ class MainWidget : public TWidget, public RPCSender { void cancelForwarding(); void finishForwarding(History *hist, bool broadcast); // send them - void audioMarkRead(DocumentData *data); - void videoMarkRead(VideoData *data); + void mediaMarkRead(DocumentData *data); void mediaMarkRead(const HistoryItemsMap &items); void webPageUpdated(WebPageData *page); @@ -445,9 +444,6 @@ public slots: void webPagesUpdate(); - void videoLoadProgress(FileLoader *loader); - void videoLoadFailed(FileLoader *loader, bool started); - void videoLoadRetry(); void audioPlayProgress(const AudioMsgId &audioId); void documentLoadProgress(FileLoader *loader); void documentLoadFailed(FileLoader *loader, bool started); diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index b0059077c1b261..b6dab0b0042ba0 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -368,7 +368,7 @@ static const mtpTypeId mtpLayers[] = { mtpTypeId(mtpc_invokeWithLayer18), }; static const uint32 mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]); -static const mtpPrime mtpCurrentLayer = 46; +static const mtpPrime mtpCurrentLayer = 47; template class MTPBoxed : public bareT { diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index bfbababece7424..04a7b68eb0861c 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -387,8 +387,8 @@ bool mtpFileLoader::loadPart() { limit = DownloadPartSize; } else { switch (_locationType) { - case VideoFileLocation: loc = MTP_inputVideoFileLocation(MTP_long(_id), MTP_long(_access)); break; - case AudioFileLocation: loc = MTP_inputDocumentFileLocation(MTP_long(_id), MTP_long(_access)); break; + case VideoFileLocation: + case AudioFileLocation: case DocumentFileLocation: loc = MTP_inputDocumentFileLocation(MTP_long(_id), MTP_long(_access)); break; default: cancel(true); return false; break; } diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index 4da8bb3337c8ec..e2231a54ae0990 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -642,57 +642,6 @@ void _serialize_inputMediaContact(MTPStringLogger &to, int32 stage, int32 lev, T } } -void _serialize_inputMediaUploadedVideo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputMediaUploadedVideo"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" w: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" h: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" mime_type: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - -void _serialize_inputMediaUploadedThumbVideo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputMediaUploadedThumbVideo"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" file: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" thumb: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" w: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" h: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" mime_type: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - -void _serialize_inputMediaVideo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputMediaVideo"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputMediaUploadedDocument(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -839,24 +788,6 @@ void _serialize_inputPhoto(MTPStringLogger &to, int32 stage, int32 lev, Types &t } } -void _serialize_inputVideoEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - to.add("{ inputVideoEmpty }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); -} - -void _serialize_inputVideo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputVideo"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputFileLocation(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -872,20 +803,6 @@ void _serialize_inputFileLocation(MTPStringLogger &to, int32 stage, int32 lev, T } } -void _serialize_inputVideoFileLocation(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ inputVideoFileLocation"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_inputEncryptedFileLocation(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -1485,20 +1402,6 @@ void _serialize_messageMediaPhoto(MTPStringLogger &to, int32 stage, int32 lev, T } } -void _serialize_messageMediaVideo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ messageMediaVideo"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" video: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" caption: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_messageMediaGeo(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -1816,41 +1719,6 @@ void _serialize_photoCachedSize(MTPStringLogger &to, int32 stage, int32 lev, Typ } } -void _serialize_videoEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ videoEmpty"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - -void _serialize_video(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { - if (stage) { - to.add(",\n").addSpaces(lev); - } else { - to.add("{ video"); - to.add("\n").addSpaces(lev); - } - switch (stage) { - case 0: to.add(" id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" duration: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" mime_type: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" size: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" thumb: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" dc_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" w: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 9: to.add(" h: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; - } -} - void _serialize_geoPointEmpty(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { to.add("{ geoPointEmpty }"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); } @@ -7572,9 +7440,6 @@ namespace { _serializers.insert(mtpc_inputMediaPhoto, _serialize_inputMediaPhoto); _serializers.insert(mtpc_inputMediaGeoPoint, _serialize_inputMediaGeoPoint); _serializers.insert(mtpc_inputMediaContact, _serialize_inputMediaContact); - _serializers.insert(mtpc_inputMediaUploadedVideo, _serialize_inputMediaUploadedVideo); - _serializers.insert(mtpc_inputMediaUploadedThumbVideo, _serialize_inputMediaUploadedThumbVideo); - _serializers.insert(mtpc_inputMediaVideo, _serialize_inputMediaVideo); _serializers.insert(mtpc_inputMediaUploadedDocument, _serialize_inputMediaUploadedDocument); _serializers.insert(mtpc_inputMediaUploadedThumbDocument, _serialize_inputMediaUploadedThumbDocument); _serializers.insert(mtpc_inputMediaDocument, _serialize_inputMediaDocument); @@ -7587,10 +7452,7 @@ namespace { _serializers.insert(mtpc_inputGeoPoint, _serialize_inputGeoPoint); _serializers.insert(mtpc_inputPhotoEmpty, _serialize_inputPhotoEmpty); _serializers.insert(mtpc_inputPhoto, _serialize_inputPhoto); - _serializers.insert(mtpc_inputVideoEmpty, _serialize_inputVideoEmpty); - _serializers.insert(mtpc_inputVideo, _serialize_inputVideo); _serializers.insert(mtpc_inputFileLocation, _serialize_inputFileLocation); - _serializers.insert(mtpc_inputVideoFileLocation, _serialize_inputVideoFileLocation); _serializers.insert(mtpc_inputEncryptedFileLocation, _serialize_inputEncryptedFileLocation); _serializers.insert(mtpc_inputDocumentFileLocation, _serialize_inputDocumentFileLocation); _serializers.insert(mtpc_inputPhotoCropAuto, _serialize_inputPhotoCropAuto); @@ -7640,7 +7502,6 @@ namespace { _serializers.insert(mtpc_messageService, _serialize_messageService); _serializers.insert(mtpc_messageMediaEmpty, _serialize_messageMediaEmpty); _serializers.insert(mtpc_messageMediaPhoto, _serialize_messageMediaPhoto); - _serializers.insert(mtpc_messageMediaVideo, _serialize_messageMediaVideo); _serializers.insert(mtpc_messageMediaGeo, _serialize_messageMediaGeo); _serializers.insert(mtpc_messageMediaContact, _serialize_messageMediaContact); _serializers.insert(mtpc_messageMediaUnsupported, _serialize_messageMediaUnsupported); @@ -7665,8 +7526,6 @@ namespace { _serializers.insert(mtpc_photoSizeEmpty, _serialize_photoSizeEmpty); _serializers.insert(mtpc_photoSize, _serialize_photoSize); _serializers.insert(mtpc_photoCachedSize, _serialize_photoCachedSize); - _serializers.insert(mtpc_videoEmpty, _serialize_videoEmpty); - _serializers.insert(mtpc_video, _serialize_video); _serializers.insert(mtpc_geoPointEmpty, _serialize_geoPointEmpty); _serializers.insert(mtpc_geoPoint, _serialize_geoPoint); _serializers.insert(mtpc_auth_checkedPhone, _serialize_auth_checkedPhone); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 98bcc93e0e66cf..1f32eb20ec7d00 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -87,9 +87,6 @@ enum { mtpc_inputMediaPhoto = 0xe9bfb4f3, mtpc_inputMediaGeoPoint = 0xf9c44144, mtpc_inputMediaContact = 0xa6e45987, - mtpc_inputMediaUploadedVideo = 0x82713fdf, - mtpc_inputMediaUploadedThumbVideo = 0x7780ddf9, - mtpc_inputMediaVideo = 0x936a4ebd, mtpc_inputMediaUploadedDocument = 0x1d89306d, mtpc_inputMediaUploadedThumbDocument = 0xad613491, mtpc_inputMediaDocument = 0x1a77f29c, @@ -102,10 +99,7 @@ enum { mtpc_inputGeoPoint = 0xf3b7acc9, mtpc_inputPhotoEmpty = 0x1cd7bf0d, mtpc_inputPhoto = 0xfb95c6c4, - mtpc_inputVideoEmpty = 0x5508ec75, - mtpc_inputVideo = 0xee579652, mtpc_inputFileLocation = 0x14637196, - mtpc_inputVideoFileLocation = 0x3d0364ec, mtpc_inputEncryptedFileLocation = 0xf5235d55, mtpc_inputDocumentFileLocation = 0x4e45abe9, mtpc_inputPhotoCropAuto = 0xade6b004, @@ -155,7 +149,6 @@ enum { mtpc_messageService = 0xc06b9607, mtpc_messageMediaEmpty = 0x3ded6320, mtpc_messageMediaPhoto = 0x3d8ce53d, - mtpc_messageMediaVideo = 0x5bcf1675, mtpc_messageMediaGeo = 0x56e0d474, mtpc_messageMediaContact = 0x5e7d2f39, mtpc_messageMediaUnsupported = 0x9f84f49e, @@ -180,8 +173,6 @@ enum { mtpc_photoSizeEmpty = 0xe17e23c, mtpc_photoSize = 0x77bfb61b, mtpc_photoCachedSize = 0xe9a734fa, - mtpc_videoEmpty = 0xc10658a8, - mtpc_video = 0xf72887d3, mtpc_geoPointEmpty = 0x1117dd5f, mtpc_geoPoint = 0x2049d70c, mtpc_auth_checkedPhone = 0x811ea28e, @@ -715,9 +706,6 @@ class MTPDinputMediaUploadedPhoto; class MTPDinputMediaPhoto; class MTPDinputMediaGeoPoint; class MTPDinputMediaContact; -class MTPDinputMediaUploadedVideo; -class MTPDinputMediaUploadedThumbVideo; -class MTPDinputMediaVideo; class MTPDinputMediaUploadedDocument; class MTPDinputMediaUploadedThumbDocument; class MTPDinputMediaDocument; @@ -734,12 +722,8 @@ class MTPDinputGeoPoint; class MTPinputPhoto; class MTPDinputPhoto; -class MTPinputVideo; -class MTPDinputVideo; - class MTPinputFileLocation; class MTPDinputFileLocation; -class MTPDinputVideoFileLocation; class MTPDinputEncryptedFileLocation; class MTPDinputDocumentFileLocation; @@ -801,7 +785,6 @@ class MTPDmessageService; class MTPmessageMedia; class MTPDmessageMediaPhoto; -class MTPDmessageMediaVideo; class MTPDmessageMediaGeo; class MTPDmessageMediaContact; class MTPDmessageMediaDocument; @@ -832,10 +815,6 @@ class MTPDphotoSizeEmpty; class MTPDphotoSize; class MTPDphotoCachedSize; -class MTPvideo; -class MTPDvideoEmpty; -class MTPDvideo; - class MTPgeoPoint; class MTPDgeoPoint; @@ -1283,7 +1262,6 @@ typedef MTPBoxed MTPInputMedia; typedef MTPBoxed MTPInputChatPhoto; typedef MTPBoxed MTPInputGeoPoint; typedef MTPBoxed MTPInputPhoto; -typedef MTPBoxed MTPInputVideo; typedef MTPBoxed MTPInputFileLocation; typedef MTPBoxed MTPInputPhotoCrop; typedef MTPBoxed MTPInputAppEvent; @@ -1304,7 +1282,6 @@ typedef MTPBoxed MTPMessageAction; typedef MTPBoxed MTPDialog; typedef MTPBoxed MTPPhoto; typedef MTPBoxed MTPPhotoSize; -typedef MTPBoxed MTPVideo; typedef MTPBoxed MTPGeoPoint; typedef MTPBoxed MTPauth_CheckedPhone; typedef MTPBoxed MTPauth_SentCode; @@ -2529,42 +2506,6 @@ class MTPinputMedia : private mtpDataOwner { return *(const MTPDinputMediaContact*)data; } - MTPDinputMediaUploadedVideo &_inputMediaUploadedVideo() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedVideo); - split(); - return *(MTPDinputMediaUploadedVideo*)data; - } - const MTPDinputMediaUploadedVideo &c_inputMediaUploadedVideo() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedVideo); - return *(const MTPDinputMediaUploadedVideo*)data; - } - - MTPDinputMediaUploadedThumbVideo &_inputMediaUploadedThumbVideo() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedThumbVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedThumbVideo); - split(); - return *(MTPDinputMediaUploadedThumbVideo*)data; - } - const MTPDinputMediaUploadedThumbVideo &c_inputMediaUploadedThumbVideo() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaUploadedThumbVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedThumbVideo); - return *(const MTPDinputMediaUploadedThumbVideo*)data; - } - - MTPDinputMediaVideo &_inputMediaVideo() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaVideo); - split(); - return *(MTPDinputMediaVideo*)data; - } - const MTPDinputMediaVideo &c_inputMediaVideo() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputMediaVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaVideo); - return *(const MTPDinputMediaVideo*)data; - } - MTPDinputMediaUploadedDocument &_inputMediaUploadedDocument() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputMediaUploadedDocument) throw mtpErrorWrongTypeId(_type, mtpc_inputMediaUploadedDocument); @@ -2638,9 +2579,6 @@ class MTPinputMedia : private mtpDataOwner { explicit MTPinputMedia(MTPDinputMediaPhoto *_data); explicit MTPinputMedia(MTPDinputMediaGeoPoint *_data); explicit MTPinputMedia(MTPDinputMediaContact *_data); - explicit MTPinputMedia(MTPDinputMediaUploadedVideo *_data); - explicit MTPinputMedia(MTPDinputMediaUploadedThumbVideo *_data); - explicit MTPinputMedia(MTPDinputMediaVideo *_data); explicit MTPinputMedia(MTPDinputMediaUploadedDocument *_data); explicit MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data); explicit MTPinputMedia(MTPDinputMediaDocument *_data); @@ -2652,9 +2590,6 @@ class MTPinputMedia : private mtpDataOwner { friend MTPinputMedia MTP_inputMediaPhoto(const MTPInputPhoto &_id, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaGeoPoint(const MTPInputGeoPoint &_geo_point); friend MTPinputMedia MTP_inputMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name); - friend MTPinputMedia MTP_inputMediaUploadedVideo(const MTPInputFile &_file, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption); - friend MTPinputMedia MTP_inputMediaUploadedThumbVideo(const MTPInputFile &_file, const MTPInputFile &_thumb, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption); - friend MTPinputMedia MTP_inputMediaVideo(const MTPInputVideo &_id, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaUploadedThumbDocument(const MTPInputFile &_file, const MTPInputFile &_thumb, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption); friend MTPinputMedia MTP_inputMediaDocument(const MTPInputDocument &_id, const MTPstring &_caption); @@ -2793,44 +2728,6 @@ class MTPinputPhoto : private mtpDataOwner { }; typedef MTPBoxed MTPInputPhoto; -class MTPinputVideo : private mtpDataOwner { -public: - MTPinputVideo() : mtpDataOwner(0), _type(0) { - } - MTPinputVideo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { - read(from, end, cons); - } - - MTPDinputVideo &_inputVideo() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputVideo); - split(); - return *(MTPDinputVideo*)data; - } - const MTPDinputVideo &c_inputVideo() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputVideo) throw mtpErrorWrongTypeId(_type, mtpc_inputVideo); - return *(const MTPDinputVideo*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPinputVideo(mtpTypeId type); - explicit MTPinputVideo(MTPDinputVideo *_data); - - friend MTPinputVideo MTP_inputVideoEmpty(); - friend MTPinputVideo MTP_inputVideo(const MTPlong &_id, const MTPlong &_access_hash); - - mtpTypeId _type; -}; -typedef MTPBoxed MTPInputVideo; - class MTPinputFileLocation : private mtpDataOwner { public: MTPinputFileLocation() : mtpDataOwner(0), _type(0) { @@ -2851,18 +2748,6 @@ class MTPinputFileLocation : private mtpDataOwner { return *(const MTPDinputFileLocation*)data; } - MTPDinputVideoFileLocation &_inputVideoFileLocation() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputVideoFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputVideoFileLocation); - split(); - return *(MTPDinputVideoFileLocation*)data; - } - const MTPDinputVideoFileLocation &c_inputVideoFileLocation() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_inputVideoFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputVideoFileLocation); - return *(const MTPDinputVideoFileLocation*)data; - } - MTPDinputEncryptedFileLocation &_inputEncryptedFileLocation() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_inputEncryptedFileLocation) throw mtpErrorWrongTypeId(_type, mtpc_inputEncryptedFileLocation); @@ -2897,12 +2782,10 @@ class MTPinputFileLocation : private mtpDataOwner { private: explicit MTPinputFileLocation(mtpTypeId type); explicit MTPinputFileLocation(MTPDinputFileLocation *_data); - explicit MTPinputFileLocation(MTPDinputVideoFileLocation *_data); explicit MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data); explicit MTPinputFileLocation(MTPDinputDocumentFileLocation *_data); friend MTPinputFileLocation MTP_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret); - friend MTPinputFileLocation MTP_inputVideoFileLocation(const MTPlong &_id, const MTPlong &_access_hash); friend MTPinputFileLocation MTP_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash); friend MTPinputFileLocation MTP_inputDocumentFileLocation(const MTPlong &_id, const MTPlong &_access_hash); @@ -3655,18 +3538,6 @@ class MTPmessageMedia : private mtpDataOwner { return *(const MTPDmessageMediaPhoto*)data; } - MTPDmessageMediaVideo &_messageMediaVideo() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_messageMediaVideo) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaVideo); - split(); - return *(MTPDmessageMediaVideo*)data; - } - const MTPDmessageMediaVideo &c_messageMediaVideo() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_messageMediaVideo) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaVideo); - return *(const MTPDmessageMediaVideo*)data; - } - MTPDmessageMediaGeo &_messageMediaGeo() { if (!data) throw mtpErrorUninitialized(); if (_type != mtpc_messageMediaGeo) throw mtpErrorWrongTypeId(_type, mtpc_messageMediaGeo); @@ -3737,7 +3608,6 @@ class MTPmessageMedia : private mtpDataOwner { private: explicit MTPmessageMedia(mtpTypeId type); explicit MTPmessageMedia(MTPDmessageMediaPhoto *_data); - explicit MTPmessageMedia(MTPDmessageMediaVideo *_data); explicit MTPmessageMedia(MTPDmessageMediaGeo *_data); explicit MTPmessageMedia(MTPDmessageMediaContact *_data); explicit MTPmessageMedia(MTPDmessageMediaDocument *_data); @@ -3746,7 +3616,6 @@ class MTPmessageMedia : private mtpDataOwner { friend MTPmessageMedia MTP_messageMediaEmpty(); friend MTPmessageMedia MTP_messageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption); - friend MTPmessageMedia MTP_messageMediaVideo(const MTPVideo &_video, const MTPstring &_caption); friend MTPmessageMedia MTP_messageMediaGeo(const MTPGeoPoint &_geo); friend MTPmessageMedia MTP_messageMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name, MTPint _user_id); friend MTPmessageMedia MTP_messageMediaUnsupported(); @@ -4076,57 +3945,6 @@ class MTPphotoSize : private mtpDataOwner { }; typedef MTPBoxed MTPPhotoSize; -class MTPvideo : private mtpDataOwner { -public: - MTPvideo() : mtpDataOwner(0), _type(0) { - } - MTPvideo(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) : mtpDataOwner(0), _type(0) { - read(from, end, cons); - } - - MTPDvideoEmpty &_videoEmpty() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_videoEmpty) throw mtpErrorWrongTypeId(_type, mtpc_videoEmpty); - split(); - return *(MTPDvideoEmpty*)data; - } - const MTPDvideoEmpty &c_videoEmpty() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_videoEmpty) throw mtpErrorWrongTypeId(_type, mtpc_videoEmpty); - return *(const MTPDvideoEmpty*)data; - } - - MTPDvideo &_video() { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_video) throw mtpErrorWrongTypeId(_type, mtpc_video); - split(); - return *(MTPDvideo*)data; - } - const MTPDvideo &c_video() const { - if (!data) throw mtpErrorUninitialized(); - if (_type != mtpc_video) throw mtpErrorWrongTypeId(_type, mtpc_video); - return *(const MTPDvideo*)data; - } - - uint32 innerLength() const; - mtpTypeId type() const; - void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); - void write(mtpBuffer &to) const; - - typedef void ResponseType; - -private: - explicit MTPvideo(mtpTypeId type); - explicit MTPvideo(MTPDvideoEmpty *_data); - explicit MTPvideo(MTPDvideo *_data); - - friend MTPvideo MTP_videoEmpty(const MTPlong &_id); - friend MTPvideo MTP_video(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _w, MTPint _h); - - mtpTypeId _type; -}; -typedef MTPBoxed MTPVideo; - class MTPgeoPoint : private mtpDataOwner { public: MTPgeoPoint() : mtpDataOwner(0), _type(0) { @@ -9596,48 +9414,6 @@ class MTPDinputMediaContact : public mtpDataImpl { MTPstring vlast_name; }; -class MTPDinputMediaUploadedVideo : public mtpDataImpl { -public: - MTPDinputMediaUploadedVideo() { - } - MTPDinputMediaUploadedVideo(const MTPInputFile &_file, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption) : vfile(_file), vduration(_duration), vw(_w), vh(_h), vmime_type(_mime_type), vcaption(_caption) { - } - - MTPInputFile vfile; - MTPint vduration; - MTPint vw; - MTPint vh; - MTPstring vmime_type; - MTPstring vcaption; -}; - -class MTPDinputMediaUploadedThumbVideo : public mtpDataImpl { -public: - MTPDinputMediaUploadedThumbVideo() { - } - MTPDinputMediaUploadedThumbVideo(const MTPInputFile &_file, const MTPInputFile &_thumb, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption) : vfile(_file), vthumb(_thumb), vduration(_duration), vw(_w), vh(_h), vmime_type(_mime_type), vcaption(_caption) { - } - - MTPInputFile vfile; - MTPInputFile vthumb; - MTPint vduration; - MTPint vw; - MTPint vh; - MTPstring vmime_type; - MTPstring vcaption; -}; - -class MTPDinputMediaVideo : public mtpDataImpl { -public: - MTPDinputMediaVideo() { - } - MTPDinputMediaVideo(const MTPInputVideo &_id, const MTPstring &_caption) : vid(_id), vcaption(_caption) { - } - - MTPInputVideo vid; - MTPstring vcaption; -}; - class MTPDinputMediaUploadedDocument : public mtpDataImpl { public: MTPDinputMediaUploadedDocument() { @@ -9745,17 +9521,6 @@ class MTPDinputPhoto : public mtpDataImpl { MTPlong vaccess_hash; }; -class MTPDinputVideo : public mtpDataImpl { -public: - MTPDinputVideo() { - } - MTPDinputVideo(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { - } - - MTPlong vid; - MTPlong vaccess_hash; -}; - class MTPDinputFileLocation : public mtpDataImpl { public: MTPDinputFileLocation() { @@ -9768,17 +9533,6 @@ class MTPDinputFileLocation : public mtpDataImpl { MTPlong vsecret; }; -class MTPDinputVideoFileLocation : public mtpDataImpl { -public: - MTPDinputVideoFileLocation() { - } - MTPDinputVideoFileLocation(const MTPlong &_id, const MTPlong &_access_hash) : vid(_id), vaccess_hash(_access_hash) { - } - - MTPlong vid; - MTPlong vaccess_hash; -}; - class MTPDinputEncryptedFileLocation : public mtpDataImpl { public: MTPDinputEncryptedFileLocation() { @@ -10333,17 +10087,6 @@ class MTPDmessageMediaPhoto : public mtpDataImpl { MTPstring vcaption; }; -class MTPDmessageMediaVideo : public mtpDataImpl { -public: - MTPDmessageMediaVideo() { - } - MTPDmessageMediaVideo(const MTPVideo &_video, const MTPstring &_caption) : vvideo(_video), vcaption(_caption) { - } - - MTPVideo vvideo; - MTPstring vcaption; -}; - class MTPDmessageMediaGeo : public mtpDataImpl { public: MTPDmessageMediaGeo() { @@ -10586,35 +10329,6 @@ class MTPDphotoCachedSize : public mtpDataImpl { MTPbytes vbytes; }; -class MTPDvideoEmpty : public mtpDataImpl { -public: - MTPDvideoEmpty() { - } - MTPDvideoEmpty(const MTPlong &_id) : vid(_id) { - } - - MTPlong vid; -}; - -class MTPDvideo : public mtpDataImpl { -public: - MTPDvideo() { - } - MTPDvideo(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _w, MTPint _h) : vid(_id), vaccess_hash(_access_hash), vdate(_date), vduration(_duration), vmime_type(_mime_type), vsize(_size), vthumb(_thumb), vdc_id(_dc_id), vw(_w), vh(_h) { - } - - MTPlong vid; - MTPlong vaccess_hash; - MTPint vdate; - MTPint vduration; - MTPstring vmime_type; - MTPint vsize; - MTPPhotoSize vthumb; - MTPint vdc_id; - MTPint vw; - MTPint vh; -}; - class MTPDgeoPoint : public mtpDataImpl { public: MTPDgeoPoint() { @@ -21679,18 +21393,6 @@ inline uint32 MTPinputMedia::innerLength() const { const MTPDinputMediaContact &v(c_inputMediaContact()); return v.vphone_number.innerLength() + v.vfirst_name.innerLength() + v.vlast_name.innerLength(); } - case mtpc_inputMediaUploadedVideo: { - const MTPDinputMediaUploadedVideo &v(c_inputMediaUploadedVideo()); - return v.vfile.innerLength() + v.vduration.innerLength() + v.vw.innerLength() + v.vh.innerLength() + v.vmime_type.innerLength() + v.vcaption.innerLength(); - } - case mtpc_inputMediaUploadedThumbVideo: { - const MTPDinputMediaUploadedThumbVideo &v(c_inputMediaUploadedThumbVideo()); - return v.vfile.innerLength() + v.vthumb.innerLength() + v.vduration.innerLength() + v.vw.innerLength() + v.vh.innerLength() + v.vmime_type.innerLength() + v.vcaption.innerLength(); - } - case mtpc_inputMediaVideo: { - const MTPDinputMediaVideo &v(c_inputMediaVideo()); - return v.vid.innerLength() + v.vcaption.innerLength(); - } case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); return v.vfile.innerLength() + v.vmime_type.innerLength() + v.vattributes.innerLength() + v.vcaption.innerLength(); @@ -21746,33 +21448,6 @@ inline void MTPinputMedia::read(const mtpPrime *&from, const mtpPrime *end, mtpT v.vfirst_name.read(from, end); v.vlast_name.read(from, end); } break; - case mtpc_inputMediaUploadedVideo: _type = cons; { - if (!data) setData(new MTPDinputMediaUploadedVideo()); - MTPDinputMediaUploadedVideo &v(_inputMediaUploadedVideo()); - v.vfile.read(from, end); - v.vduration.read(from, end); - v.vw.read(from, end); - v.vh.read(from, end); - v.vmime_type.read(from, end); - v.vcaption.read(from, end); - } break; - case mtpc_inputMediaUploadedThumbVideo: _type = cons; { - if (!data) setData(new MTPDinputMediaUploadedThumbVideo()); - MTPDinputMediaUploadedThumbVideo &v(_inputMediaUploadedThumbVideo()); - v.vfile.read(from, end); - v.vthumb.read(from, end); - v.vduration.read(from, end); - v.vw.read(from, end); - v.vh.read(from, end); - v.vmime_type.read(from, end); - v.vcaption.read(from, end); - } break; - case mtpc_inputMediaVideo: _type = cons; { - if (!data) setData(new MTPDinputMediaVideo()); - MTPDinputMediaVideo &v(_inputMediaVideo()); - v.vid.read(from, end); - v.vcaption.read(from, end); - } break; case mtpc_inputMediaUploadedDocument: _type = cons; { if (!data) setData(new MTPDinputMediaUploadedDocument()); MTPDinputMediaUploadedDocument &v(_inputMediaUploadedDocument()); @@ -21836,30 +21511,6 @@ inline void MTPinputMedia::write(mtpBuffer &to) const { v.vfirst_name.write(to); v.vlast_name.write(to); } break; - case mtpc_inputMediaUploadedVideo: { - const MTPDinputMediaUploadedVideo &v(c_inputMediaUploadedVideo()); - v.vfile.write(to); - v.vduration.write(to); - v.vw.write(to); - v.vh.write(to); - v.vmime_type.write(to); - v.vcaption.write(to); - } break; - case mtpc_inputMediaUploadedThumbVideo: { - const MTPDinputMediaUploadedThumbVideo &v(c_inputMediaUploadedThumbVideo()); - v.vfile.write(to); - v.vthumb.write(to); - v.vduration.write(to); - v.vw.write(to); - v.vh.write(to); - v.vmime_type.write(to); - v.vcaption.write(to); - } break; - case mtpc_inputMediaVideo: { - const MTPDinputMediaVideo &v(c_inputMediaVideo()); - v.vid.write(to); - v.vcaption.write(to); - } break; case mtpc_inputMediaUploadedDocument: { const MTPDinputMediaUploadedDocument &v(c_inputMediaUploadedDocument()); v.vfile.write(to); @@ -21902,9 +21553,6 @@ inline MTPinputMedia::MTPinputMedia(mtpTypeId type) : mtpDataOwner(0), _type(typ case mtpc_inputMediaPhoto: setData(new MTPDinputMediaPhoto()); break; case mtpc_inputMediaGeoPoint: setData(new MTPDinputMediaGeoPoint()); break; case mtpc_inputMediaContact: setData(new MTPDinputMediaContact()); break; - case mtpc_inputMediaUploadedVideo: setData(new MTPDinputMediaUploadedVideo()); break; - case mtpc_inputMediaUploadedThumbVideo: setData(new MTPDinputMediaUploadedThumbVideo()); break; - case mtpc_inputMediaVideo: setData(new MTPDinputMediaVideo()); break; case mtpc_inputMediaUploadedDocument: setData(new MTPDinputMediaUploadedDocument()); break; case mtpc_inputMediaUploadedThumbDocument: setData(new MTPDinputMediaUploadedThumbDocument()); break; case mtpc_inputMediaDocument: setData(new MTPDinputMediaDocument()); break; @@ -21921,12 +21569,6 @@ inline MTPinputMedia::MTPinputMedia(MTPDinputMediaGeoPoint *_data) : mtpDataOwne } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaContact *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaContact) { } -inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedVideo *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedVideo) { -} -inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedThumbVideo *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedThumbVideo) { -} -inline MTPinputMedia::MTPinputMedia(MTPDinputMediaVideo *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaVideo) { -} inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedDocument) { } inline MTPinputMedia::MTPinputMedia(MTPDinputMediaUploadedThumbDocument *_data) : mtpDataOwner(_data), _type(mtpc_inputMediaUploadedThumbDocument) { @@ -21952,15 +21594,6 @@ inline MTPinputMedia MTP_inputMediaGeoPoint(const MTPInputGeoPoint &_geo_point) inline MTPinputMedia MTP_inputMediaContact(const MTPstring &_phone_number, const MTPstring &_first_name, const MTPstring &_last_name) { return MTPinputMedia(new MTPDinputMediaContact(_phone_number, _first_name, _last_name)); } -inline MTPinputMedia MTP_inputMediaUploadedVideo(const MTPInputFile &_file, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption) { - return MTPinputMedia(new MTPDinputMediaUploadedVideo(_file, _duration, _w, _h, _mime_type, _caption)); -} -inline MTPinputMedia MTP_inputMediaUploadedThumbVideo(const MTPInputFile &_file, const MTPInputFile &_thumb, MTPint _duration, MTPint _w, MTPint _h, const MTPstring &_mime_type, const MTPstring &_caption) { - return MTPinputMedia(new MTPDinputMediaUploadedThumbVideo(_file, _thumb, _duration, _w, _h, _mime_type, _caption)); -} -inline MTPinputMedia MTP_inputMediaVideo(const MTPInputVideo &_id, const MTPstring &_caption) { - return MTPinputMedia(new MTPDinputMediaVideo(_id, _caption)); -} inline MTPinputMedia MTP_inputMediaUploadedDocument(const MTPInputFile &_file, const MTPstring &_mime_type, const MTPVector &_attributes, const MTPstring &_caption) { return MTPinputMedia(new MTPDinputMediaUploadedDocument(_file, _mime_type, _attributes, _caption)); } @@ -22151,67 +21784,12 @@ inline MTPinputPhoto MTP_inputPhoto(const MTPlong &_id, const MTPlong &_access_h return MTPinputPhoto(new MTPDinputPhoto(_id, _access_hash)); } -inline uint32 MTPinputVideo::innerLength() const { - switch (_type) { - case mtpc_inputVideo: { - const MTPDinputVideo &v(c_inputVideo()); - return v.vid.innerLength() + v.vaccess_hash.innerLength(); - } - } - return 0; -} -inline mtpTypeId MTPinputVideo::type() const { - if (!_type) throw mtpErrorUninitialized(); - return _type; -} -inline void MTPinputVideo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != _type) setData(0); - switch (cons) { - case mtpc_inputVideoEmpty: _type = cons; break; - case mtpc_inputVideo: _type = cons; { - if (!data) setData(new MTPDinputVideo()); - MTPDinputVideo &v(_inputVideo()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - } break; - default: throw mtpErrorUnexpected(cons, "MTPinputVideo"); - } -} -inline void MTPinputVideo::write(mtpBuffer &to) const { - switch (_type) { - case mtpc_inputVideo: { - const MTPDinputVideo &v(c_inputVideo()); - v.vid.write(to); - v.vaccess_hash.write(to); - } break; - } -} -inline MTPinputVideo::MTPinputVideo(mtpTypeId type) : mtpDataOwner(0), _type(type) { - switch (type) { - case mtpc_inputVideoEmpty: break; - case mtpc_inputVideo: setData(new MTPDinputVideo()); break; - default: throw mtpErrorBadTypeId(type, "MTPinputVideo"); - } -} -inline MTPinputVideo::MTPinputVideo(MTPDinputVideo *_data) : mtpDataOwner(_data), _type(mtpc_inputVideo) { -} -inline MTPinputVideo MTP_inputVideoEmpty() { - return MTPinputVideo(mtpc_inputVideoEmpty); -} -inline MTPinputVideo MTP_inputVideo(const MTPlong &_id, const MTPlong &_access_hash) { - return MTPinputVideo(new MTPDinputVideo(_id, _access_hash)); -} - inline uint32 MTPinputFileLocation::innerLength() const { switch (_type) { case mtpc_inputFileLocation: { const MTPDinputFileLocation &v(c_inputFileLocation()); return v.vvolume_id.innerLength() + v.vlocal_id.innerLength() + v.vsecret.innerLength(); } - case mtpc_inputVideoFileLocation: { - const MTPDinputVideoFileLocation &v(c_inputVideoFileLocation()); - return v.vid.innerLength() + v.vaccess_hash.innerLength(); - } case mtpc_inputEncryptedFileLocation: { const MTPDinputEncryptedFileLocation &v(c_inputEncryptedFileLocation()); return v.vid.innerLength() + v.vaccess_hash.innerLength(); @@ -22237,12 +21815,6 @@ inline void MTPinputFileLocation::read(const mtpPrime *&from, const mtpPrime *en v.vlocal_id.read(from, end); v.vsecret.read(from, end); } break; - case mtpc_inputVideoFileLocation: _type = cons; { - if (!data) setData(new MTPDinputVideoFileLocation()); - MTPDinputVideoFileLocation &v(_inputVideoFileLocation()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - } break; case mtpc_inputEncryptedFileLocation: _type = cons; { if (!data) setData(new MTPDinputEncryptedFileLocation()); MTPDinputEncryptedFileLocation &v(_inputEncryptedFileLocation()); @@ -22266,11 +21838,6 @@ inline void MTPinputFileLocation::write(mtpBuffer &to) const { v.vlocal_id.write(to); v.vsecret.write(to); } break; - case mtpc_inputVideoFileLocation: { - const MTPDinputVideoFileLocation &v(c_inputVideoFileLocation()); - v.vid.write(to); - v.vaccess_hash.write(to); - } break; case mtpc_inputEncryptedFileLocation: { const MTPDinputEncryptedFileLocation &v(c_inputEncryptedFileLocation()); v.vid.write(to); @@ -22286,7 +21853,6 @@ inline void MTPinputFileLocation::write(mtpBuffer &to) const { inline MTPinputFileLocation::MTPinputFileLocation(mtpTypeId type) : mtpDataOwner(0), _type(type) { switch (type) { case mtpc_inputFileLocation: setData(new MTPDinputFileLocation()); break; - case mtpc_inputVideoFileLocation: setData(new MTPDinputVideoFileLocation()); break; case mtpc_inputEncryptedFileLocation: setData(new MTPDinputEncryptedFileLocation()); break; case mtpc_inputDocumentFileLocation: setData(new MTPDinputDocumentFileLocation()); break; default: throw mtpErrorBadTypeId(type, "MTPinputFileLocation"); @@ -22294,8 +21860,6 @@ inline MTPinputFileLocation::MTPinputFileLocation(mtpTypeId type) : mtpDataOwner } inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputFileLocation) { } -inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputVideoFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputVideoFileLocation) { -} inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputEncryptedFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputEncryptedFileLocation) { } inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputDocumentFileLocation *_data) : mtpDataOwner(_data), _type(mtpc_inputDocumentFileLocation) { @@ -22303,9 +21867,6 @@ inline MTPinputFileLocation::MTPinputFileLocation(MTPDinputDocumentFileLocation inline MTPinputFileLocation MTP_inputFileLocation(const MTPlong &_volume_id, MTPint _local_id, const MTPlong &_secret) { return MTPinputFileLocation(new MTPDinputFileLocation(_volume_id, _local_id, _secret)); } -inline MTPinputFileLocation MTP_inputVideoFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { - return MTPinputFileLocation(new MTPDinputVideoFileLocation(_id, _access_hash)); -} inline MTPinputFileLocation MTP_inputEncryptedFileLocation(const MTPlong &_id, const MTPlong &_access_hash) { return MTPinputFileLocation(new MTPDinputEncryptedFileLocation(_id, _access_hash)); } @@ -23440,10 +23001,6 @@ inline uint32 MTPmessageMedia::innerLength() const { const MTPDmessageMediaPhoto &v(c_messageMediaPhoto()); return v.vphoto.innerLength() + v.vcaption.innerLength(); } - case mtpc_messageMediaVideo: { - const MTPDmessageMediaVideo &v(c_messageMediaVideo()); - return v.vvideo.innerLength() + v.vcaption.innerLength(); - } case mtpc_messageMediaGeo: { const MTPDmessageMediaGeo &v(c_messageMediaGeo()); return v.vgeo.innerLength(); @@ -23481,12 +23038,6 @@ inline void MTPmessageMedia::read(const mtpPrime *&from, const mtpPrime *end, mt v.vphoto.read(from, end); v.vcaption.read(from, end); } break; - case mtpc_messageMediaVideo: _type = cons; { - if (!data) setData(new MTPDmessageMediaVideo()); - MTPDmessageMediaVideo &v(_messageMediaVideo()); - v.vvideo.read(from, end); - v.vcaption.read(from, end); - } break; case mtpc_messageMediaGeo: _type = cons; { if (!data) setData(new MTPDmessageMediaGeo()); MTPDmessageMediaGeo &v(_messageMediaGeo()); @@ -23531,11 +23082,6 @@ inline void MTPmessageMedia::write(mtpBuffer &to) const { v.vphoto.write(to); v.vcaption.write(to); } break; - case mtpc_messageMediaVideo: { - const MTPDmessageMediaVideo &v(c_messageMediaVideo()); - v.vvideo.write(to); - v.vcaption.write(to); - } break; case mtpc_messageMediaGeo: { const MTPDmessageMediaGeo &v(c_messageMediaGeo()); v.vgeo.write(to); @@ -23570,7 +23116,6 @@ inline MTPmessageMedia::MTPmessageMedia(mtpTypeId type) : mtpDataOwner(0), _type switch (type) { case mtpc_messageMediaEmpty: break; case mtpc_messageMediaPhoto: setData(new MTPDmessageMediaPhoto()); break; - case mtpc_messageMediaVideo: setData(new MTPDmessageMediaVideo()); break; case mtpc_messageMediaGeo: setData(new MTPDmessageMediaGeo()); break; case mtpc_messageMediaContact: setData(new MTPDmessageMediaContact()); break; case mtpc_messageMediaUnsupported: break; @@ -23582,8 +23127,6 @@ inline MTPmessageMedia::MTPmessageMedia(mtpTypeId type) : mtpDataOwner(0), _type } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaPhoto *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaPhoto) { } -inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaVideo *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaVideo) { -} inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaGeo *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaGeo) { } inline MTPmessageMedia::MTPmessageMedia(MTPDmessageMediaContact *_data) : mtpDataOwner(_data), _type(mtpc_messageMediaContact) { @@ -23600,9 +23143,6 @@ inline MTPmessageMedia MTP_messageMediaEmpty() { inline MTPmessageMedia MTP_messageMediaPhoto(const MTPPhoto &_photo, const MTPstring &_caption) { return MTPmessageMedia(new MTPDmessageMediaPhoto(_photo, _caption)); } -inline MTPmessageMedia MTP_messageMediaVideo(const MTPVideo &_video, const MTPstring &_caption) { - return MTPmessageMedia(new MTPDmessageMediaVideo(_video, _caption)); -} inline MTPmessageMedia MTP_messageMediaGeo(const MTPGeoPoint &_geo) { return MTPmessageMedia(new MTPDmessageMediaGeo(_geo)); } @@ -24084,87 +23624,6 @@ inline MTPphotoSize MTP_photoCachedSize(const MTPstring &_type, const MTPFileLoc return MTPphotoSize(new MTPDphotoCachedSize(_type, _location, _w, _h, _bytes)); } -inline uint32 MTPvideo::innerLength() const { - switch (_type) { - case mtpc_videoEmpty: { - const MTPDvideoEmpty &v(c_videoEmpty()); - return v.vid.innerLength(); - } - case mtpc_video: { - const MTPDvideo &v(c_video()); - return v.vid.innerLength() + v.vaccess_hash.innerLength() + v.vdate.innerLength() + v.vduration.innerLength() + v.vmime_type.innerLength() + v.vsize.innerLength() + v.vthumb.innerLength() + v.vdc_id.innerLength() + v.vw.innerLength() + v.vh.innerLength(); - } - } - return 0; -} -inline mtpTypeId MTPvideo::type() const { - if (!_type) throw mtpErrorUninitialized(); - return _type; -} -inline void MTPvideo::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { - if (cons != _type) setData(0); - switch (cons) { - case mtpc_videoEmpty: _type = cons; { - if (!data) setData(new MTPDvideoEmpty()); - MTPDvideoEmpty &v(_videoEmpty()); - v.vid.read(from, end); - } break; - case mtpc_video: _type = cons; { - if (!data) setData(new MTPDvideo()); - MTPDvideo &v(_video()); - v.vid.read(from, end); - v.vaccess_hash.read(from, end); - v.vdate.read(from, end); - v.vduration.read(from, end); - v.vmime_type.read(from, end); - v.vsize.read(from, end); - v.vthumb.read(from, end); - v.vdc_id.read(from, end); - v.vw.read(from, end); - v.vh.read(from, end); - } break; - default: throw mtpErrorUnexpected(cons, "MTPvideo"); - } -} -inline void MTPvideo::write(mtpBuffer &to) const { - switch (_type) { - case mtpc_videoEmpty: { - const MTPDvideoEmpty &v(c_videoEmpty()); - v.vid.write(to); - } break; - case mtpc_video: { - const MTPDvideo &v(c_video()); - v.vid.write(to); - v.vaccess_hash.write(to); - v.vdate.write(to); - v.vduration.write(to); - v.vmime_type.write(to); - v.vsize.write(to); - v.vthumb.write(to); - v.vdc_id.write(to); - v.vw.write(to); - v.vh.write(to); - } break; - } -} -inline MTPvideo::MTPvideo(mtpTypeId type) : mtpDataOwner(0), _type(type) { - switch (type) { - case mtpc_videoEmpty: setData(new MTPDvideoEmpty()); break; - case mtpc_video: setData(new MTPDvideo()); break; - default: throw mtpErrorBadTypeId(type, "MTPvideo"); - } -} -inline MTPvideo::MTPvideo(MTPDvideoEmpty *_data) : mtpDataOwner(_data), _type(mtpc_videoEmpty) { -} -inline MTPvideo::MTPvideo(MTPDvideo *_data) : mtpDataOwner(_data), _type(mtpc_video) { -} -inline MTPvideo MTP_videoEmpty(const MTPlong &_id) { - return MTPvideo(new MTPDvideoEmpty(_id)); -} -inline MTPvideo MTP_video(const MTPlong &_id, const MTPlong &_access_hash, MTPint _date, MTPint _duration, const MTPstring &_mime_type, MTPint _size, const MTPPhotoSize &_thumb, MTPint _dc_id, MTPint _w, MTPint _h) { - return MTPvideo(new MTPDvideo(_id, _access_hash, _date, _duration, _mime_type, _size, _thumb, _dc_id, _w, _h)); -} - inline uint32 MTPgeoPoint::innerLength() const { switch (_type) { case mtpc_geoPoint: { diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index d8c3c7bb9a4a68..499823df8e356f 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -150,9 +150,6 @@ inputMediaUploadedPhoto#f7aff1c0 file:InputFile caption:string = InputMedia; inputMediaPhoto#e9bfb4f3 id:InputPhoto caption:string = InputMedia; inputMediaGeoPoint#f9c44144 geo_point:InputGeoPoint = InputMedia; inputMediaContact#a6e45987 phone_number:string first_name:string last_name:string = InputMedia; -inputMediaUploadedVideo#82713fdf file:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; -inputMediaUploadedThumbVideo#7780ddf9 file:InputFile thumb:InputFile duration:int w:int h:int mime_type:string caption:string = InputMedia; -inputMediaVideo#936a4ebd id:InputVideo caption:string = InputMedia; inputMediaUploadedDocument#1d89306d file:InputFile mime_type:string attributes:Vector caption:string = InputMedia; inputMediaUploadedThumbDocument#ad613491 file:InputFile thumb:InputFile mime_type:string attributes:Vector caption:string = InputMedia; inputMediaDocument#1a77f29c id:InputDocument caption:string = InputMedia; @@ -169,11 +166,7 @@ inputGeoPoint#f3b7acc9 lat:double long:double = InputGeoPoint; inputPhotoEmpty#1cd7bf0d = InputPhoto; inputPhoto#fb95c6c4 id:long access_hash:long = InputPhoto; -inputVideoEmpty#5508ec75 = InputVideo; -inputVideo#ee579652 id:long access_hash:long = InputVideo; - inputFileLocation#14637196 volume_id:long local_id:int secret:long = InputFileLocation; -inputVideoFileLocation#3d0364ec id:long access_hash:long = InputFileLocation; inputEncryptedFileLocation#f5235d55 id:long access_hash:long = InputFileLocation; inputDocumentFileLocation#4e45abe9 id:long access_hash:long = InputFileLocation; @@ -238,7 +231,6 @@ messageService#c06b9607 flags:# unread:flags.0?true out:flags.1?true mentioned:f messageMediaEmpty#3ded6320 = MessageMedia; messageMediaPhoto#3d8ce53d photo:Photo caption:string = MessageMedia; -messageMediaVideo#5bcf1675 video:Video caption:string = MessageMedia; messageMediaGeo#56e0d474 geo:GeoPoint = MessageMedia; messageMediaContact#5e7d2f39 phone_number:string first_name:string last_name:string user_id:int = MessageMedia; messageMediaUnsupported#9f84f49e = MessageMedia; @@ -268,9 +260,6 @@ photoSizeEmpty#e17e23c type:string = PhotoSize; photoSize#77bfb61b type:string location:FileLocation w:int h:int size:int = PhotoSize; photoCachedSize#e9a734fa type:string location:FileLocation w:int h:int bytes:bytes = PhotoSize; -videoEmpty#c10658a8 id:long = Video; -video#f72887d3 id:long access_hash:long date:int duration:int mime_type:string size:int thumb:PhotoSize dc_id:int w:int h:int = Video; - geoPointEmpty#1117dd5f = GeoPoint; geoPoint#2049d70c long:double lat:double = GeoPoint; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 84905568bb308d..1aa2e0da4e4f22 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1260,10 +1260,10 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _contextMenuLnk = textlnkOver(); PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; - if (lnkPhoto || lnkVideo || lnkDocument) { + bool lnkIsVideo = lnkDocument ? lnkDocument->document()->isVideo() : false; + if (lnkPhoto || lnkDocument) { _menu = new PopupMenu(); if (App::hoveredLinkItem()) { _menu->addAction(lang(lng_context_to_msg), this, SLOT(goToMessage()))->setEnabled(true); @@ -1271,14 +1271,14 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (lnkPhoto) { _menu->addAction(lang(lng_context_open_image), this, SLOT(openContextUrl()))->setEnabled(true); } else { - if ((lnkVideo && lnkVideo->video()->loading()) || (lnkDocument && lnkDocument->document()->loading())) { + if (lnkDocument && lnkDocument->document()->loading()) { _menu->addAction(lang(lng_context_cancel_download), this, SLOT(cancelContextDownload()))->setEnabled(true); } else { - if ((lnkVideo && !lnkVideo->video()->already(true).isEmpty()) || (lnkDocument && !lnkDocument->document()->already(true).isEmpty())) { + if (lnkDocument && !lnkDocument->document()->already(true).isEmpty()) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); - _menu->addAction(lang(lnkVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkIsVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); + _menu->addAction(lang(lnkIsVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } if (isUponSelected > 1) { @@ -1501,35 +1501,27 @@ void OverviewInner::selectMessage() { } void OverviewInner::cancelContextDownload() { - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkVideo) { - lnkVideo->video()->cancel(); - } else if (lnkDocument) { + if (lnkDocument) { lnkDocument->document()->cancel(); } } void OverviewInner::showContextInFolder() { - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - QString already = lnkVideo ? lnkVideo->video()->already(true) : (lnkDocument ? lnkDocument->document()->already(true) : QString()); + QString already = lnkDocument ? lnkDocument->document()->already(true) : QString(); if (!already.isEmpty()) psShowInFolder(already); } void OverviewInner::saveContextFile() { - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkVideo) VideoSaveLink::doSave(lnkVideo->video(), true); if (lnkDocument) DocumentSaveLink::doSave(lnkDocument->document(), true); } void OverviewInner::openContextFile() { HistoryItem *was = App::hoveredLinkItem(); App::hoveredLinkItem(App::contextItem()); - VideoLink *lnkVideo = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkVideo) VideoOpenLink(lnkVideo->video()).onClick(Qt::LeftButton); if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); App::hoveredLinkItem(was); } @@ -1928,7 +1920,7 @@ LayoutMediaItem *OverviewInner::layoutPrepare(HistoryItem *item) { } else if (_type == OverviewVideos) { if (media && media->type() == MediaTypeVideo) { if ((i = _layoutItems.constFind(item)) == _layoutItems.cend()) { - i = _layoutItems.insert(item, new LayoutOverviewVideo(static_cast(media)->video(), item)); + i = _layoutItems.insert(item, new LayoutOverviewVideo(media->getDocument(), item)); i.value()->initDimensions(); } } diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index d396ebcb88e71f..506acafa659168 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -785,234 +785,6 @@ QString saveFileName(const QString &title, const QString &filter, const QString return name; } -void VideoOpenLink::onClick(Qt::MouseButton button) const { - if (button != Qt::LeftButton) return; - VideoData *data = video(); - - if (!data->date) return; - - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - - const FileLocation &location(data->location(true)); - if (!location.isEmpty()) { - psOpenFile(location.name()); - if (App::main()) App::main()->videoMarkRead(data); - return; - } - - if (data->status != FileReady) return; - - QString filename; - if (!data->saveToCache()) { - filename = saveFileName(lang(lng_save_video), qsl("MOV Video (*.mov);;All files (*.*)"), qsl("video"), qsl(".mov"), false); - if (filename.isEmpty()) return; - } - - data->save(filename, ActionOnLoadOpen, item ? item->fullId() : FullMsgId()); -} - -void VideoSaveLink::doSave(VideoData *data, bool forceSavingAs) { - if (!data->date) return; - - QString already = data->already(true); - bool openWith = !already.isEmpty(); - if (openWith && !forceSavingAs) { - QPoint pos(QCursor::pos()); - if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) { - psOpenFile(already, true); - } - } else { - QFileInfo alreadyInfo(already); - QDir alreadyDir(already.isEmpty() ? QDir() : alreadyInfo.dir()); - QString name = already.isEmpty() ? QString(".mov") : alreadyInfo.fileName(); - QString filename = saveFileName(lang(lng_save_video), qsl("MOV Video (*.mov);;All files (*.*)"), qsl("video"), name, forceSavingAs, alreadyDir); - if (!filename.isEmpty()) { - ActionOnLoad action = already.isEmpty() ? ActionOnLoadNone : ActionOnLoadOpenWith; - FullMsgId actionMsgId = App::hoveredLinkItem() ? App::hoveredLinkItem()->fullId() : (App::contextItem() ? App::contextItem()->fullId() : FullMsgId()); - data->save(filename, action, actionMsgId); - } - } -} - -void VideoSaveLink::onClick(Qt::MouseButton button) const { - if (button != Qt::LeftButton) return; - doSave(video()); -} - -void VideoCancelLink::onClick(Qt::MouseButton button) const { - VideoData *data = video(); - if (!data->date || button != Qt::LeftButton) return; - - data->cancel(); -} - -VideoData::VideoData(const VideoId &id, const uint64 &access, int32 date, int32 duration, int32 w, int32 h, const ImagePtr &thumb, int32 dc, int32 size) -: id(id) -, access(access) -, date(date) -, duration(duration) -, w(w) -, h(h) -, thumb(thumb) -, dc(dc) -, size(size) -, status(FileReady) -, uploadOffset(0) -, _actionOnLoad(ActionOnLoadNone) -, _loader(0) { - _location = Local::readFileLocation(mediaKey(VideoFileLocation, dc, id)); -} - -void VideoData::forget() { - replyPreview->forget(); - thumb->forget(); -} - -void VideoData::performActionOnLoad() { - if (_actionOnLoad == ActionOnLoadNone) return; - - const FileLocation &loc(location(true)); - QString already = loc.name(); - if (already.isEmpty()) return; - - if (_actionOnLoad == ActionOnLoadOpenWith) { - QPoint pos(QCursor::pos()); - if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) { - psOpenFile(already, true); - } - } else if (_actionOnLoad == ActionOnLoadOpen || _actionOnLoad == ActionOnLoadPlayInline) { - psOpenFile(already); - } - _actionOnLoad = ActionOnLoadNone; -} - -bool VideoData::loaded(bool check) const { - if (loading() && _loader->done()) { - if (_loader->fileType() == mtpc_storage_fileUnknown) { - _loader->deleteLater(); - _loader->rpcInvalidate(); - _loader = CancelledMtpFileLoader; - } else { - VideoData *that = const_cast(this); - that->_location = FileLocation(mtpToStorageType(_loader->fileType()), _loader->fileName()); - - _loader->deleteLater(); - _loader->rpcInvalidate(); - _loader = 0; - } - notifyLayoutChanged(); - } - return !already(check).isEmpty(); -} - -bool VideoData::loading() const { - return _loader && _loader != CancelledMtpFileLoader; -} - -bool VideoData::displayLoading() const { - return loading() ? (!_loader->loadingLocal() || !_loader->autoLoading()) : uploading(); -} - -float64 VideoData::progress() const { - if (uploading()) { - if (size > 0) { - return float64(uploadOffset) / size; - } - return 0; - } - return loading() ? _loader->currentProgress() : (loaded() ? 1 : 0); -} - -int32 VideoData::loadOffset() const { - return loading() ? _loader->currentOffset() : 0; -} - -bool VideoData::uploading() const { - return status == FileUploading; -} - -void VideoData::save(const QString &toFile, ActionOnLoad action, const FullMsgId &actionMsgId, LoadFromCloudSetting fromCloud, bool autoLoading) { - if (loaded(true)) { - const FileLocation &l(location(true)); - if (!toFile.isEmpty()) { - if (l.accessEnable()) { - QFile(l.name()).copy(toFile); - l.accessDisable(); - } - } - return; - } - - if (_loader == CancelledMtpFileLoader) _loader = 0; - if (_loader) { - if (!_loader->setFileName(toFile)) { - cancel(); - _loader = 0; - } - } - - _actionOnLoad = action; - _actionOnLoadMsgId = actionMsgId; - - if (_loader) { - if (fromCloud == LoadFromCloudOrLocal) _loader->permitLoadFromCloud(); - } else { - status = FileReady; - _loader = new mtpFileLoader(dc, id, access, VideoFileLocation, toFile, size, (saveToCache() ? LoadToCacheAsWell : LoadToFileOnly), fromCloud, autoLoading); - _loader->connect(_loader, SIGNAL(progress(FileLoader*)), App::main(), SLOT(videoLoadProgress(FileLoader*))); - _loader->connect(_loader, SIGNAL(failed(FileLoader*,bool)), App::main(), SLOT(videoLoadFailed(FileLoader*,bool))); - _loader->start(); - } - - notifyLayoutChanged(); -} - -void VideoData::cancel() { - if (!loading()) return; - - mtpFileLoader *l = _loader; - _loader = CancelledMtpFileLoader; - if (l) { - l->cancel(); - l->deleteLater(); - l->rpcInvalidate(); - - notifyLayoutChanged(); - } - _actionOnLoad = ActionOnLoadNone; -} - -void VideoData::notifyLayoutChanged() const { - const VideoItems &items(App::videoItems()); - VideoItems::const_iterator i = items.constFind(const_cast(this)); - if (i != items.cend()) { - for (HistoryItemsMap::const_iterator j = i->cbegin(), e = i->cend(); j != e; ++j) { - Notify::historyItemLayoutChanged(j.key()); - } - } -} - -QString VideoData::already(bool check) const { - return location(check).name(); -} - -QByteArray VideoData::data() const { - return QByteArray(); -} - -const FileLocation &VideoData::location(bool check) const { - if (check && !_location.check()) { - const_cast(this)->_location = Local::readFileLocation(mediaKey(VideoFileLocation, dc, id)); - } - return _location; -} - -void VideoData::setLocation(const FileLocation &loc) { - if (loc.check()) { - _location = loc; - } -} - bool StickerData::setInstalled() const { switch (set.type()) { case mtpc_inputStickerSetID: { @@ -1031,6 +803,39 @@ bool StickerData::setInstalled() const { return false; } +QString documentSaveFilename(DocumentData *data, bool forceSavingAs = false, const QString already = QString(), const QDir &dir = QDir()) { + QString name, filter, caption, prefix; + MimeType mimeType = mimeTypeForName(data->mime); + QStringList p = mimeType.globPatterns(); + QString pattern = p.isEmpty() ? QString() : p.front(); + if (data->voice()) { + bool mp3 = (data->mime == qstr("audio/mp3")); + name = already.isEmpty() ? (mp3 ? qsl(".mp3") : qsl(".ogg")) : already; + filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"); + caption = lang(lng_save_audio); + prefix = qsl("audio"); + } else if (data->isVideo()) { + name = already.isEmpty() ? qsl(".mov") : already; + filter = qsl("MOV Video (*.mov);;All files (*.*)"); + caption = lang(lng_save_video); + prefix = qsl("video"); + } else { + name = already.isEmpty() ? data->name : already; + if (name.isEmpty()) { + name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); + } + if (pattern.isEmpty()) { + filter = QString(); + } else { + filter = mimeType.filterString() + qsl(";;All files (*.*)"); + } + caption = lang(lng_save_file); + prefix = qsl("doc"); + } + + return saveFileName(caption, filter, prefix, name, forceSavingAs, dir); +} + void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { if (!data->date) return; @@ -1052,7 +857,7 @@ void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { audioPlayer()->play(audio); if (App::main()) { App::main()->audioPlayProgress(audio); - App::main()->audioMarkRead(data); + App::main()->mediaMarkRead(data); } } } else if (playMusic) { @@ -1066,9 +871,9 @@ void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { audioPlayer()->play(song); if (App::main()) App::main()->documentPlayProgress(song); } - } else if (data->voice()) { + } else if (data->voice() || data->isVideo()) { psOpenFile(location.name()); - if (App::main()) App::main()->audioMarkRead(data); + if (App::main()) App::main()->mediaMarkRead(data); } else if (data->size < MediaViewImageSizeLimit) { if (!data->data().isEmpty() && playAnimation) { if (action == ActionOnLoadPlayInline) { @@ -1100,33 +905,7 @@ void DocumentOpenLink::doOpen(DocumentData *data, ActionOnLoad action) { QString filename; if (!data->saveToCache()) { - QString name, filter, caption, prefix; - MimeType mimeType = mimeTypeForName(data->mime); - QStringList p = mimeType.globPatterns(); - QString pattern = p.isEmpty() ? QString() : p.front(); - if (data->voice()) { - bool mp3 = (data->mime == qstr("audio/mp3")); - name = mp3 ? qsl(".mp3") : qsl(".ogg"); - filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"); - caption = lang(lng_save_audio); - prefix = qsl("audio"); - } else { - if (data->name.isEmpty()) { - name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); - } else { - name = data->name; - } - if (pattern.isEmpty()) { - filter = QString(); - } else { - filter = mimeType.filterString() + qsl(";;All files (*.*)"); - } - caption = lang(lng_save_file); - prefix = qsl("doc"); - } - - filename = saveFileName(caption, filter, prefix, name, false); - + filename = documentSaveFilename(data); if (filename.isEmpty()) return; } @@ -1159,34 +938,10 @@ void DocumentSaveLink::doSave(DocumentData *data, bool forceSavingAs) { psOpenFile(already, true); } } else { - QFileInfo alreadyInfo(already); QDir alreadyDir(already.isEmpty() ? QDir() : alreadyInfo.dir()); - QString caption, filter, prefix, name; - MimeType mimeType = mimeTypeForName(data->mime); - QStringList p = mimeType.globPatterns(); - QString pattern = p.isEmpty() ? QString() : p.front(); - if (data->voice()) { - bool mp3 = (data->mime == qstr("audio/mp3")); - caption = lang(lng_save_audio); - filter = mp3 ? qsl("MP3 Audio (*.mp3);;All files (*.*)") : qsl("OGG Opus Audio (*.ogg);;All files (*.*)"); - prefix = qsl("audio"); - name = already.isEmpty() ? (mp3 ? qsl(".mp3") : qsl(".ogg")) : alreadyInfo.fileName(); - } else { - caption = lang(lng_save_file); - if (pattern.isEmpty()) { - filter = QString(); - } else { - filter = mimeType.filterString() + qsl(";;All files (*.*)"); - } - prefix = qsl("doc"); - name = already.isEmpty() ? data->name : alreadyInfo.fileName(); - if (name.isEmpty()) { - name = pattern.isEmpty() ? qsl(".unknown") : pattern.replace('*', QString()); - } - } - - QString filename = saveFileName(caption, filter, prefix, name, forceSavingAs, alreadyDir); + QString alreadyName(already.isEmpty() ? QString() : alreadyInfo.fileName()); + QString filename = documentSaveFilename(data, forceSavingAs, alreadyName, alreadyDir); if (!filename.isEmpty()) { ActionOnLoad action = already.isEmpty() ? ActionOnLoadNone : ActionOnLoadOpenWith; FullMsgId actionMsgId = App::hoveredLinkItem() ? App::hoveredLinkItem()->fullId() : (App::contextItem() ? App::contextItem()->fullId() : FullMsgId()); @@ -1242,7 +997,7 @@ DocumentData::DocumentData(const DocumentId &id, const uint64 &access, int32 dat , _actionOnLoad(ActionOnLoadNone) , _loader(0) { setattributes(attributes); - _location = Local::readFileLocation(mediaKey(voice() ? AudioFileLocation : DocumentFileLocation, dc, id)); + _location = Local::readFileLocation(mediaKey()); } void DocumentData::setattributes(const QVector &attributes) { @@ -1372,7 +1127,7 @@ void DocumentData::performActionOnLoad() { const FileLocation &loc(location(true)); QString already = loc.name(); HistoryItem *item = _actionOnLoadMsgId.msg ? App::histItemById(_actionOnLoadMsgId) : 0; - bool showImage = item && (size < MediaViewImageSizeLimit); + bool showImage = !isVideo() && item && (size < MediaViewImageSizeLimit); bool playVoice = voice() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && item; bool playMusic = song() && audioPlayer() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && item; bool playAnimation = isAnimation() && (_actionOnLoad == ActionOnLoadPlayInline || _actionOnLoad == ActionOnLoadOpen) && showImage && item->getMedia(); @@ -1385,7 +1140,7 @@ void DocumentData::performActionOnLoad() { audioPlayer()->pauseresume(OverviewVoiceFiles); } else { audioPlayer()->play(AudioMsgId(this, _actionOnLoadMsgId)); - if (App::main()) App::main()->audioMarkRead(this); + if (App::main()) App::main()->mediaMarkRead(this); } } } else if (playMusic) { @@ -1413,16 +1168,14 @@ void DocumentData::performActionOnLoad() { if (already.isEmpty()) return; if (_actionOnLoad == ActionOnLoadOpenWith) { - if (already.isEmpty()) return; - QPoint pos(QCursor::pos()); if (!psShowOpenWithMenu(pos.x(), pos.y(), already)) { psOpenFile(already, true); } } else if (_actionOnLoad == ActionOnLoadOpen || _actionOnLoad == ActionOnLoadPlayInline) { - if (voice()) { + if (voice() || isVideo()) { psOpenFile(already); - if (App::main()) App::main()->audioMarkRead(this); + if (App::main()) App::main()->mediaMarkRead(this); } else if (loc.accessEnable()) { if (showImage && QImageReader(loc.name()).canRead()) { if (_actionOnLoad == ActionOnLoadPlayInline) { @@ -1522,13 +1275,12 @@ void DocumentData::save(const QString &toFile, ActionOnLoad action, const FullMs if (fromCloud == LoadFromCloudOrLocal) _loader->permitLoadFromCloud(); } else { status = FileReady; - LocationType type = voice() ? AudioFileLocation : DocumentFileLocation; + LocationType type = voice() ? AudioFileLocation : (isVideo() ? VideoFileLocation : DocumentFileLocation); _loader = new mtpFileLoader(dc, id, access, type, toFile, size, (saveToCache() ? LoadToCacheAsWell : LoadToFileOnly), fromCloud, autoLoading); _loader->connect(_loader, SIGNAL(progress(FileLoader*)), App::main(), SLOT(documentLoadProgress(FileLoader*))); _loader->connect(_loader, SIGNAL(failed(FileLoader*,bool)), App::main(), SLOT(documentLoadFailed(FileLoader*,bool))); _loader->start(); } - notifyLayoutChanged(); } @@ -1586,8 +1338,7 @@ QByteArray DocumentData::data() const { const FileLocation &DocumentData::location(bool check) const { if (check && !_location.check()) { - LocationType type = voice() ? AudioFileLocation : DocumentFileLocation; - const_cast(this)->_location = Local::readFileLocation(mediaKey(type, dc, id)); + const_cast(this)->_location = Local::readFileLocation(mediaKey()); } return _location; } @@ -1632,7 +1383,7 @@ bool fileIsImage(const QString &name, const QString &mime) { } void DocumentData::recountIsImage() { - if (isAnimation() || type == VideoDocument) return; + if (isAnimation() || isVideo()) return; _duration = fileIsImage(name, mime) ? 1 : -1; // hack } diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 38ed72308bf6a4..887ab0ebf510a0 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -815,105 +815,6 @@ enum FileStatus { FileReady = 1, }; -class VideoData { -public: - VideoData(const VideoId &id, const uint64 &access = 0, int32 date = 0, int32 duration = 0, int32 w = 0, int32 h = 0, const ImagePtr &thumb = ImagePtr(), int32 dc = 0, int32 size = 0); - - void automaticLoad(const HistoryItem *item) { - } - void automaticLoadSettingsChanged() { - } - - bool loaded(bool check = false) const; - bool loading() const; - bool displayLoading() const; - void save(const QString &toFile, ActionOnLoad action = ActionOnLoadNone, const FullMsgId &actionMsgId = FullMsgId(), LoadFromCloudSetting fromCloud = LoadFromCloudOrLocal, bool autoLoading = false); - void cancel(); - float64 progress() const; - int32 loadOffset() const; - bool uploading() const; - - QString already(bool check = false) const; - QByteArray data() const; - const FileLocation &location(bool check = false) const; - void setLocation(const FileLocation &loc); - - bool saveToCache() const { - return false; - } - - void performActionOnLoad(); - - void forget(); - - VideoId id; - uint64 access; - int32 date; - int32 duration; - int32 w, h; - ImagePtr thumb, replyPreview; - int32 dc, size; - // geo, caption - - FileStatus status; - int32 uploadOffset; - -private: - FileLocation _location; - - ActionOnLoad _actionOnLoad; - FullMsgId _actionOnLoadMsgId; - mutable mtpFileLoader *_loader; - - void notifyLayoutChanged() const; - -}; - -class VideoLink : public ITextLink { - TEXT_LINK_CLASS(VideoLink) - -public: - VideoLink(VideoData *video) : _video(video) { - } - VideoData *video() const { - return _video; - } - -private: - VideoData *_video; - -}; - -class VideoSaveLink : public VideoLink { - TEXT_LINK_CLASS(VideoSaveLink) - -public: - VideoSaveLink(VideoData *video) : VideoLink(video) { - } - static void doSave(VideoData *video, bool forceSavingAs = false); - void onClick(Qt::MouseButton button) const; -}; - -class VideoOpenLink : public VideoLink { - TEXT_LINK_CLASS(VideoOpenLink) - -public: - VideoOpenLink(VideoData *video) : VideoLink(video) { - } - void onClick(Qt::MouseButton button) const; - -}; - -class VideoCancelLink : public VideoLink { - TEXT_LINK_CLASS(VideoCancelLink) - -public: - VideoCancelLink(VideoData *video) : VideoLink(video) { - } - void onClick(Qt::MouseButton button) const; - -}; - enum DocumentType { FileDocument = 0, VideoDocument = 1, @@ -1026,11 +927,14 @@ class DocumentData { bool isMusic() const { return (type == SongDocument) ? !static_cast(_additional)->title.isEmpty() : false; } + bool isVideo() const { + return (type == VideoDocument); + } int32 duration() const { - return (isAnimation() || type == VideoDocument) ? _duration : -1; + return (isAnimation() || isVideo()) ? _duration : -1; } bool isImage() const { - return !isAnimation() && (type != VideoDocument) && (_duration > 0); + return !isAnimation() && !isVideo() && (_duration > 0); } void recountIsImage(); void setData(const QByteArray &data) { @@ -1054,6 +958,11 @@ class DocumentData { int32 md5[8]; + MediaKey mediaKey() const { + LocationType t = isVideo() ? VideoFileLocation : (voice() ? AudioFileLocation : DocumentFileLocation); + return ::mediaKey(t, dc, id); + } + private: FileLocation _location; diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index b3fb139f2b8706..497627b7a607a8 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -1044,6 +1044,8 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask) { return i.value(); } +const InterfacesMetadata *Interfaces::ZeroInterfacesMetadata = GetInterfacesMetadata(0); + InterfaceWrapStruct InterfaceWraps[64]; QAtomicInt InterfaceIndexLast(0); diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 11fe4f810852e2..a87d0fa679b1a5 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -647,15 +647,16 @@ const InterfacesMetadata *GetInterfacesMetadata(uint64 mask); class Interfaces { public: - Interfaces(uint64 mask = 0) : _data(0) { + Interfaces(uint64 mask = 0) : _data(zerodata()) { if (mask) { const InterfacesMetadata *meta = GetInterfacesMetadata(mask); int32 size = sizeof(const InterfacesMetadata *) + meta->size; - _data = malloc(size); - if (!_data) { // terminate if we can't allocate memory + void *data = malloc(size); + if (!data) { // terminate if we can't allocate memory throw "Can't allocate memory!"; } + _data = data; _meta() = meta; for (int i = 0; i < meta->last; ++i) { int offset = meta->offsets[i]; @@ -677,12 +678,11 @@ class Interfaces { } } void UpdateInterfaces(uint64 mask = 0) { - if (!_data && !mask) return; - if (!_data || !_meta()->equals(mask)) { + if (!_meta()->equals(mask)) { Interfaces tmp(mask); tmp.swap(*this); - if (_data && tmp._data) { + if (_data != zerodata() && tmp._data != zerodata()) { const InterfacesMetadata *meta = _meta(), *wasmeta = tmp._meta(); for (int i = 0; i < meta->last; ++i) { int offset = meta->offsets[i], wasoffset = wasmeta->offsets[i]; @@ -694,7 +694,7 @@ class Interfaces { } } ~Interfaces() { - if (_data) { + if (_data != zerodata()) { const InterfacesMetadata *meta = _meta(); for (int i = 0; i < meta->last; ++i) { int offset = meta->offsets[i]; @@ -716,6 +716,10 @@ class Interfaces { } private: + static const InterfacesMetadata *ZeroInterfacesMetadata; + static void *zerodata() { + return &ZeroInterfacesMetadata; + } void *_dataptrunsafe(int skip) const { return (char*)_data + sizeof(const InterfacesMetadata*) + skip; From 2e60f23733883d202ebc75cc0fa5cc35109fc87a Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 12 Feb 2016 21:21:03 +0300 Subject: [PATCH 059/133] icons fixed for megagroups in username search results and notifications --- Telegram/SourceFiles/dialogswidget.cpp | 2 +- Telegram/SourceFiles/window.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index ca7b364e03db30..9e59115339d009 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -258,7 +258,7 @@ void DialogsInner::peopleResultPaint(PeerData *peer, Painter &p, int32 w, bool a QRect rectForName(nameleft, st::dlgPaddingVer + st::dlgNameTop, namewidth, st::msgNameFont->height); // draw chat icon - if (peer->isChat()) { + if (peer->isChat() || peer->isMegagroup()) { p.drawPixmap(QPoint(rectForName.left() + st::dlgChatImgPos.x(), rectForName.top() + st::dlgChatImgPos.y()), App::sprite(), (act ? st::dlgActiveChatImg : st::dlgChatImg)); rectForName.setLeft(rectForName.left() + st::dlgImgSkip); } else if (peer->isChannel()) { diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 801b0d0f24026f..aad4e2998235c0 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -183,7 +183,7 @@ void NotifyWindow::updateNotifyDisplay() { QRect rectForName(st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft, st::notifyTextTop, itemWidth, st::msgNameFont->height); if (!App::passcoded() && cNotifyView() <= dbinvShowName) { - if (history->peer->isChat()) { + if (history->peer->isChat() || history->peer->isMegagroup()) { p.drawPixmap(QPoint(rectForName.left() + st::dlgChatImgPos.x(), rectForName.top() + st::dlgChatImgPos.y()), App::sprite(), st::dlgChatImg); rectForName.setLeft(rectForName.left() + st::dlgImgSkip); } else if (history->peer->isChannel()) { From 759e062bcc7f9bcfd0fa66d64381d4a51cbcb935 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 13 Feb 2016 14:21:03 +0300 Subject: [PATCH 060/133] sending only reports with dumps, report tag added --- Telegram/SourceFiles/window.cpp | 34 +++++++++++++++++++++++++-------- Telegram/SourceFiles/window.h | 2 +- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index aad4e2998235c0..593925800e390f 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1995,6 +1995,7 @@ LastCrashedWindow::LastCrashedWindow() : _port(80) , _label(this) , _pleaseSendReport(this) +, _yourReportName(this) , _minidump(this) , _report(this) , _send(this) @@ -2007,7 +2008,7 @@ LastCrashedWindow::LastCrashedWindow() , _reportText(QString::fromUtf8(Sandbox::LastCrashDump())) , _reportShown(false) , _reportSaved(false) -, _sendingState(((!cDevVersion() && !cBetaVersion()) || Sandbox::LastCrashDump().isEmpty()) ? SendingNoReport : SendingUpdateCheck) +, _sendingState(Sandbox::LastCrashDump().isEmpty() ? SendingNoReport : SendingUpdateCheck) , _updating(this) , _sendingProgress(0) , _sendingTotal(0) @@ -2018,7 +2019,9 @@ LastCrashedWindow::LastCrashedWindow() , _updatingSkip(this, false) #endif { - + if (!cDevVersion() && !cBetaVersion()) { + _sendingState = SendingNoReport; + } if (_sendingState != SendingNoReport) { qint64 dumpsize = 0; QString dumpspath = cWorkingDir() + qsl("tdata/dumps"); @@ -2061,8 +2064,11 @@ LastCrashedWindow::LastCrashedWindow() _minidumpFull = maxDumpFull; } } - - _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(dumpsize / 1024)); + if (_minidumpName.isEmpty()) { + _sendingState = SendingNoReport; + } else { + _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(dumpsize / 1024)); + } } _networkSettings.setText(qsl("NETWORK SETTINGS")); @@ -2105,6 +2111,9 @@ LastCrashedWindow::LastCrashedWindow() #endif _pleaseSendReport.setText(qsl("Please send us a crash report.")); + _yourReportName.setText(qsl("Your crash report tag: %1").arg(_minidumpName)); + _yourReportName.setCursor(style::cur_text); + _yourReportName.setTextInteractionFlags(Qt::TextSelectableByMouse); _report.setPlainText(_reportText); @@ -2411,6 +2420,7 @@ void LastCrashedWindow::updateControls() { _sendSkip.hide(); _continue.hide(); _pleaseSendReport.hide(); + _yourReportName.hide(); _getApp.hide(); _showReport.hide(); _report.hide(); @@ -2427,6 +2437,7 @@ void LastCrashedWindow::updateControls() { h += padding + _updatingCheck.height() + padding; if (_sendingState == SendingNoReport) { _pleaseSendReport.hide(); + _yourReportName.hide(); _getApp.hide(); _showReport.hide(); _report.hide(); @@ -2436,14 +2447,17 @@ void LastCrashedWindow::updateControls() { _sendSkip.hide(); _continue.show(); } else { - h += _showReport.height() + padding; + h += _showReport.height() + padding + _yourReportName.height() + padding; _pleaseSendReport.show(); + _yourReportName.show(); if (_sendingState == SendingTooOld || _sendingState == SendingUnofficial) { QString verStr = getReportField(qstr("version"), qstr("Version:")); qint64 ver = verStr.isEmpty() ? 0 : verStr.toLongLong(); if (!ver || (ver == AppVersion) || (ver < 0 && (-ver / 1000) == AppVersion)) { h += _getApp.height() + padding; _getApp.show(); + h -= _yourReportName.height() + padding; // hide report name + _yourReportName.hide(); } else { _getApp.hide(); } @@ -2498,6 +2512,7 @@ void LastCrashedWindow::updateControls() { } else { _getApp.hide(); _pleaseSendReport.hide(); + _yourReportName.hide(); _showReport.hide(); _report.hide(); _minidump.hide(); @@ -2519,6 +2534,7 @@ void LastCrashedWindow::updateControls() { h += padding + _send.height() + padding; if (_sendingState == SendingNoReport) { _pleaseSendReport.hide(); + _yourReportName.hide(); _showReport.hide(); _report.hide(); _minidump.hide(); @@ -2528,8 +2544,9 @@ void LastCrashedWindow::updateControls() { _continue.show(); _networkSettings.hide(); } else { - h += _showReport.height() + padding; + h += _showReport.height() + padding + _yourReportName.height() + padding; _pleaseSendReport.show(); + _yourReportName.show(); if (_reportShown) { h += (_pleaseSendReport.height() * 12.5) + padding + (_minidumpName.isEmpty() ? 0 : (_minidump.height() + padding)); _report.show(); @@ -2771,6 +2788,7 @@ void LastCrashedWindow::resizeEvent(QResizeEvent *e) { #ifndef TDESKTOP_DISABLE_AUTOUPDATE _pleaseSendReport.move(padding, padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + (_showReport.height() - _pleaseSendReport.height()) / 2); _showReport.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding); + _yourReportName.move(padding, _showReport.y() + _showReport.height() + padding); _getApp.move((width() - _getApp.width()) / 2, _showReport.y() + _showReport.height() + padding); if (_sendingState == SendingFail || _sendingState == SendingProgress) { @@ -2791,11 +2809,11 @@ void LastCrashedWindow::resizeEvent(QResizeEvent *e) { _pleaseSendReport.move(padding, padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding + (_showReport.height() - _pleaseSendReport.height()) / 2); _showReport.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding); + _yourReportName.move(padding, _showReport.y() + _showReport.height() + padding); _networkSettings.move(padding * 2 + _pleaseSendReport.width(), padding * 2 + _networkSettings.height() + _networkSettings.height() + padding + _getApp.height() + padding); #endif - - _report.setGeometry(padding, _showReport.y() + _showReport.height() + padding, width() - 2 * padding, _pleaseSendReport.height() * 12.5); + _report.setGeometry(padding, _yourReportName.y() + _yourReportName.height() + padding, width() - 2 * padding, _pleaseSendReport.height() * 12.5); _minidump.move(padding, _report.y() + _report.height() + padding); _saveReport.move(_showReport.x(), _showReport.y()); diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index 4efcdd318cf591..63c1675d003779 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -459,7 +459,7 @@ public slots: QString _host, _username, _password; quint32 _port; - PreLaunchLabel _label, _pleaseSendReport, _minidump; + PreLaunchLabel _label, _pleaseSendReport, _yourReportName, _minidump; PreLaunchLog _report; PreLaunchButton _send, _sendSkip, _networkSettings, _continue, _showReport, _saveReport, _getApp; From f5dd8f8112f0d45beacddc66bd9b88776b492288 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 13 Feb 2016 16:08:28 +0300 Subject: [PATCH 061/133] fixed webpage preview layout, switched to abridged version of the tcp protocol --- Telegram/SourceFiles/gui/text.cpp | 27 +++- .../SourceFiles/mtproto/mtpConnection.cpp | 134 +++++++++++++----- Telegram/SourceFiles/mtproto/mtpConnection.h | 12 +- 3 files changed, 128 insertions(+), 45 deletions(-) diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 0837eaeb8ad81b..00f31d3041ad5a 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -455,6 +455,25 @@ class TextParser { } } + bool readSkipBlockCommand() { + const QChar *afterCmd = textSkipCommand(ptr, end, links.size() < 0x7FFF); + if (afterCmd == ptr) { + return false; + } + + ushort cmd = (++ptr)->unicode(); + ++ptr; + + switch (cmd) { + case TextCommandSkipBlock: + createSkipBlock(ptr->unicode(), (ptr + 1)->unicode()); + break; + } + + ptr = afterCmd; + return true; + } + bool readCommand() { const QChar *afterCmd = textSkipCommand(ptr, end, links.size() < 0x7FFF); if (afterCmd == ptr) { @@ -530,7 +549,6 @@ class TextParser { } break; case TextCommandSkipBlock: - createBlock(); createSkipBlock(ptr->unicode(), (ptr + 1)->unicode()); break; @@ -703,6 +721,13 @@ class TextParser { if (sumFinished || _t->_text.size() >= 0x8000) break; // 32k max } createBlock(); + if (sumFinished && rich) { // we could've skipped the final skip block command + for (; ptr < end; ++ptr) { + if (*ptr == TextCommand && readSkipBlockCommand()) { + break; + } + } + } removeFlags.clear(); _t->_links.resize(maxLnkIndex); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index b1bfac554c44a0..dcde71a52ac381 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -405,33 +405,44 @@ namespace { return mayBeBadKey; } - mtpBuffer _handleTcpResponse(mtpPrime *packet, uint32 size) { - if (size < 4 || size * sizeof(mtpPrime) > MTPPacketSizeMax) { - LOG(("TCP Error: bad packet size %1").arg(size * sizeof(mtpPrime))); - return mtpBuffer(1, -500); + uint32 _tcpPacketSize(const char *packet) { // must have at least 4 bytes readable + uint32 result = (packet[0] > 0) ? packet[0] : 0; + if (result == 0x7f) { + const uchar *bytes = reinterpret_cast(packet); + result = (((uint32(bytes[3]) << 8) | uint32(bytes[2])) << 8) | uint32(bytes[1]); + return (result << 2) + 4; } - if (packet[0] != int32(size * sizeof(mtpPrime))) { - LOG(("TCP Error: bad packet header")); - TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(Logs::mb(packet, size * sizeof(mtpPrime)).str())); + return (result << 2) + 1; + } + + mtpBuffer _handleTcpResponse(const char *packet, uint32 length) { + if (length < 5 || length > MTPPacketSizeMax) { + LOG(("TCP Error: bad packet size %1").arg(length)); return mtpBuffer(1, -500); } - if (packet[size - 1] != hashCrc32(packet, (size - 1) * sizeof(mtpPrime))) { - LOG(("TCP Error: bad packet checksum")); - TCP_LOG(("TCP Error: bad packet checksum, packet: %1").arg(Logs::mb(packet, size * sizeof(mtpPrime)).str())); + int32 size = packet[0], len = length - 1; + if (size == 0x7f) { + const uchar *bytes = reinterpret_cast(packet); + size = (((uint32(bytes[3]) << 8) | uint32(bytes[2])) << 8) | uint32(bytes[1]); + len -= 3; + } + if (size * sizeof(mtpPrime) != len) { + LOG(("TCP Error: bad packet header")); + TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(Logs::mb(packet, length).str())); return mtpBuffer(1, -500); } - TCP_LOG(("TCP Info: packet received, num = %1, size = %2").arg(packet[1]).arg(size * sizeof(mtpPrime))); - if (size == 4) { - if (packet[2] == -429) { + TCP_LOG(("TCP Info: packet received, size = %1").arg(size * sizeof(mtpPrime))); + if (size == 1) { + if (packet[0] == -429) { LOG(("Protocol Error: -429 flood code returned!")); } else { - LOG(("TCP Error: error packet received, code = %1").arg(packet[2])); + LOG(("TCP Error: error packet received, code = %1").arg(packet[0])); } - return mtpBuffer(1, packet[2]); + return mtpBuffer(1, packet[0]); } - mtpBuffer data(size - 3); - memcpy(data.data(), packet + 2, (size - 3) * sizeof(mtpPrime)); + mtpBuffer data(size); + memcpy(data.data(), packet + (length - len), size * sizeof(mtpPrime)); return data; } @@ -557,7 +568,7 @@ void MTPabstractTcpConnection::socketRead() { if (packetLeft) { packetLeft -= bytes; if (!packetLeft) { - socketPacket((mtpPrime*)(currentPos - packetRead), packetRead >> 2); + socketPacket(currentPos - packetRead, packetRead); currentPos = (char*)shortBuffer; packetRead = packetLeft = 0; readingToShort = true; @@ -568,14 +579,14 @@ void MTPabstractTcpConnection::socketRead() { } else { bool move = false; while (packetRead >= 4) { - uint32 packetSize = *(uint32*)(currentPos - packetRead); - if (packetSize < 16 || packetSize > MTPPacketSizeMax || (packetSize & 0x03)) { + uint32 packetSize = _tcpPacketSize(currentPos - packetRead); + if (packetSize < 5 || packetSize > MTPPacketSizeMax) { LOG(("TCP Error: packet size = %1").arg(packetSize)); emit error(); return; } if (packetRead >= packetSize) { - socketPacket((mtpPrime*)(currentPos - packetRead), packetSize >> 2); + socketPacket(currentPos - packetRead, packetSize); packetRead -= packetSize; packetLeft = 0; move = true; @@ -704,15 +715,41 @@ void MTPautoConnection::sendData(mtpBuffer &buffer) { } } -void MTPautoConnection::tcpSend(mtpBuffer &buffer) { - uint32 size = buffer.size(), len = size * 4; +uint32 FourCharsToUInt(char ch1, char ch2, char ch3, char ch4) { + char ch[4] = { ch1, ch2, ch3, ch4 }; + return *reinterpret_cast(ch); +} - buffer[0] = len; - buffer[1] = packetNum++; - buffer[size - 1] = hashCrc32(&buffer[0], len - 4); - TCP_LOG(("TCP Info: write %1 packet %2 bytes").arg(packetNum).arg(len)); +void MTPautoConnection::tcpSend(mtpBuffer &buffer) { + if (!packetNum) { + char nonce[64]; + uint32 *first = reinterpret_cast(nonce), *second = first + 1; + uint32 g1 = FourCharsToUInt('P', 'O', 'S', 'T'), g2 = FourCharsToUInt('G', 'E', 'T', ' '), g3 = FourCharsToUInt('H', 'E', 'A', 'D'); + uint32 first1 = 0x44414548U, first2 = 0x54534f50U, first3 = 0x20544547U, first4 = 0x20544547U, first5 = 0xeeeeeeeeU; + uint32 second1 = 0; + do { + memset_rand(nonce, sizeof(nonce)); + } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || nonce[0] == 0xef); + sock.write(nonce, sizeof(nonce)); + } + ++packetNum; + + uint32 size = buffer.size() - 3, len = size * 4; + char *data = reinterpret_cast(&buffer[0]); + if (size < 0x7f) { + data[7] = char(size); + TCP_LOG(("TCP Info: write %1 packet %2").arg(packetNum).arg(len + 1)); + + sock.write(data + 7, len + 1); + } else { + data[4] = 0x7f; + reinterpret_cast(data)[5] = uchar(size & 0xFF); + reinterpret_cast(data)[6] = uchar((size >> 8) & 0xFF); + reinterpret_cast(data)[7] = uchar((size >> 16) & 0xFF); + TCP_LOG(("TCP Info: write %1 packet %2").arg(packetNum).arg(len + 4)); - sock.write((const char*)&buffer[0], len); + sock.write(data + 4, len + 4); + } } void MTPautoConnection::httpSend(mtpBuffer &buffer) { @@ -831,10 +868,10 @@ void MTPautoConnection::requestFinished(QNetworkReply *reply) { } } -void MTPautoConnection::socketPacket(mtpPrime *packet, uint32 size) { +void MTPautoConnection::socketPacket(const char *packet, uint32 length) { if (status == FinishedWork) return; - mtpBuffer data = _handleTcpResponse(packet, size); + mtpBuffer data = _handleTcpResponse(packet, length); if (data.size() == 1) { if (status == WaitingBoth) { status = WaitingHttp; @@ -984,14 +1021,35 @@ void MTPtcpConnection::sendData(mtpBuffer &buffer) { return; } - uint32 size = buffer.size(), len = size * 4; + if (!packetNum) { + char nonce[64]; + uint32 *first = reinterpret_cast(nonce), *second = first + 1; + uint32 g1 = FourCharsToUInt('P', 'O', 'S', 'T'), g2 = FourCharsToUInt('G', 'E', 'T', ' '), g3 = FourCharsToUInt('H', 'E', 'A', 'D'); + uint32 first1 = 0x44414548U, first2 = 0x54534f50U, first3 = 0x20544547U, first4 = 0x20544547U, first5 = 0xeeeeeeeeU; + uint32 second1 = 0; + do { + memset_rand(nonce, sizeof(nonce)); + } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || nonce[0] == 0xef); + sock.write(nonce, sizeof(nonce)); + } + ++packetNum; - buffer[0] = len; - buffer[1] = packetNum++; - buffer[size - 1] = hashCrc32(&buffer[0], len - 4); - TCP_LOG(("TCP Info: write %1 packet %2 bytes %3").arg(packetNum).arg(len).arg(Logs::mb(&buffer[0], len).str())); + uint32 size = buffer.size() - 3, len = size * 4; + char *data = reinterpret_cast(&buffer[0]); + if (size < 0x7f) { + data[7] = char(size); + TCP_LOG(("TCP Info: write %1 packet %2").arg(packetNum).arg(len + 1)); - sock.write((const char*)&buffer[0], len); + sock.write(data + 7, len + 1); + } else { + data[4] = 0x7f; + reinterpret_cast(data)[5] = uchar(size & 0xFF); + reinterpret_cast(data)[6] = uchar((size >> 8) & 0xFF); + reinterpret_cast(data)[7] = uchar((size >> 16) & 0xFF); + TCP_LOG(("TCP Info: write %1 packet %2").arg(packetNum).arg(len + 4)); + + sock.write(data + 4, len + 4); + } } void MTPtcpConnection::disconnectFromServer() { @@ -1011,10 +1069,10 @@ void MTPtcpConnection::connectToServer(const QString &addr, int32 port, int32 fl sock.connectToHost(QHostAddress(_addr), _port); } -void MTPtcpConnection::socketPacket(mtpPrime *packet, uint32 size) { +void MTPtcpConnection::socketPacket(const char *packet, uint32 length) { if (status == FinishedWork) return; - mtpBuffer data = _handleTcpResponse(packet, size); + mtpBuffer data = _handleTcpResponse(packet, length); if (data.size() == 1) { bool mayBeBadKey = (data[0] == -410) && _sentEncrypted; emit error(mayBeBadKey); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.h b/Telegram/SourceFiles/mtproto/mtpConnection.h index 74d281ae4c4c45..5674fc4012a96a 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.h +++ b/Telegram/SourceFiles/mtproto/mtpConnection.h @@ -168,7 +168,7 @@ public slots: char *currentPos; mtpBuffer longBuffer; mtpPrime shortBuffer[MTPShortBufferSize]; - virtual void socketPacket(mtpPrime *packet, uint32 packetSize) = 0; + virtual void socketPacket(const char *packet, uint32 length) = 0; }; @@ -203,7 +203,7 @@ public slots: protected: - void socketPacket(mtpPrime *packet, uint32 packetSize); + void socketPacket(const char *packet, uint32 length); private: @@ -261,7 +261,7 @@ public slots: protected: - void socketPacket(mtpPrime *packet, uint32 packetSize); + void socketPacket(const char *packet, uint32 length); private: @@ -285,7 +285,7 @@ class MTPhttpConnection : public MTPabstractConnection { public: MTPhttpConnection(QThread *thread); - + void sendData(mtpBuffer &buffer); void disconnectFromServer(); void connectToServer(const QString &addr, int32 port, int32 flags); @@ -441,7 +441,7 @@ public slots: // if badTime received - search for ids in sessionData->haveSent and sessionData->wereAcked and sync time/salt, return true if found bool requestsFixTimeSalt(const QVector &ids, int32 serverTime, uint64 serverSalt); - + // remove msgs with such ids from sessionData->haveSent, add to sessionData->wereAcked void requestsAcked(const QVector &ids, bool byResponse = false); @@ -491,7 +491,7 @@ public slots: MTPlong retry_id; int32 g; - + uchar aesKey[32], aesIV[32]; uint32 auth_key[64]; MTPlong auth_key_hash; From e492b1e93ddcebb72fc80066afd2294a2802fe22 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 14 Feb 2016 18:58:39 +0300 Subject: [PATCH 062/133] some crashes fixed --- Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/application.cpp | 38 ++++++++++++++----------- Telegram/SourceFiles/application.h | 2 +- Telegram/SourceFiles/dialogswidget.cpp | 11 ++++--- Telegram/SourceFiles/gui/animation.cpp | 6 ++-- Telegram/SourceFiles/historywidget.cpp | 6 ++-- Telegram/SourceFiles/mainwidget.cpp | 2 +- Telegram/SourceFiles/overviewwidget.cpp | 9 +++--- Telegram/SourceFiles/structs.cpp | 4 ++- 9 files changed, 47 insertions(+), 33 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index d36731ff797c58..9002e8aedfb731 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -2469,7 +2469,7 @@ namespace App { QString phoneFromSharedContact(int32 userId) { SharedContactItems::const_iterator i = ::sharedContactItems.constFind(userId); - if (i != ::sharedContactItems.cend()) { + if (i != ::sharedContactItems.cend() && !i->isEmpty()) { HistoryMedia *media = i->cbegin().key()->getMedia(); if (media && media->type() == MediaTypeContact) { return static_cast(media)->phone(); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 41d26b0a74e26d..1f8c6a8b506390 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -689,6 +689,8 @@ namespace Sandbox { } AppClass::AppClass() : QObject() +, _lastActionTime(0) +, _window(0) , _uploader(0) , _translator(0) { AppObject = this; @@ -749,20 +751,21 @@ AppClass::AppClass() : QObject() application()->installNativeEventFilter(psNativeEventFilter()); - Sandbox::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); + cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat)); connect(&_mtpUnpauseTimer, SIGNAL(timeout()), this, SLOT(doMtpUnpause())); connect(&killDownloadSessionsTimer, SIGNAL(timeout()), this, SLOT(killDownloadSessions())); - cChangeTimeFormat(QLocale::system().timeFormat(QLocale::ShortFormat)); - DEBUG_LOG(("Application Info: starting app..")); QMimeDatabase().mimeTypeForName(qsl("text/plain")); // create mime database - _window.createWinId(); - _window.init(); + _window = new Window(); + _window->createWinId(); + _window->init(); + + Sandbox::connect(SIGNAL(applicationStateChanged(Qt::ApplicationState)), this, SLOT(onAppStateChanged(Qt::ApplicationState))); DEBUG_LOG(("Application Info: window created..")); @@ -785,18 +788,18 @@ AppClass::AppClass() : QObject() DEBUG_LOG(("Application Info: showing.")); if (state == Local::ReadMapPassNeeded) { - _window.setupPasscode(false); + _window->setupPasscode(false); } else { if (MTP::authedId()) { - _window.setupMain(false); + _window->setupMain(false); } else { - _window.setupIntro(false); + _window->setupIntro(false); } } - _window.firstShow(); + _window->firstShow(); if (cStartToSettings()) { - _window.showSettings(); + _window->showSettings(); } QNetworkProxyFactory::setUseSystemConfiguration(true); @@ -805,7 +808,7 @@ AppClass::AppClass() : QObject() checkMapVersion(); } - _window.updateIsActive(cOnlineFocusTimeout()); + _window->updateIsActive(cOnlineFocusTimeout()); } void AppClass::regPhotoUpdate(const PeerId &peer, const FullMsgId &msgId) { @@ -922,7 +925,7 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); - _window.updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); } void AppClass::killDownloadSessions() { @@ -1058,7 +1061,7 @@ void AppClass::checkMapVersion() { } if (!versionFeatures.isEmpty()) { versionFeatures = lng_new_version_wrap(lt_version, QString::fromStdWString(AppVersionStr), lt_changes, versionFeatures, lt_link, qsl("https://desktop.telegram.org/#changelog")); - _window.serviceNotification(versionFeatures); + _window->serviceNotification(versionFeatures); } } } @@ -1068,7 +1071,10 @@ void AppClass::checkMapVersion() { } AppClass::~AppClass() { - _window.setParent(0); + if (Window *w = _window) { + _window = 0; + delete w; + } anim::stopManager(); stopWebLoadManager(); @@ -1097,9 +1103,9 @@ AppClass *AppClass::app() { } Window *AppClass::wnd() { - return AppObject ? &AppObject->_window : 0; + return AppObject ? AppObject->_window : 0; } MainWidget *AppClass::main() { - return AppObject ? AppObject->_window.mainWidget() : 0; + return (AppObject && AppObject->_window) ? AppObject->_window->mainWidget() : 0; } diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index c5a11080f128e9..d823ab1f2c7796 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -208,7 +208,7 @@ public slots: uint64 _lastActionTime; - Window _window; + Window *_window; FileUploader *_uploader; Translator *_translator; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index ca7b364e03db30..e7a700bd300e21 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -1040,13 +1040,16 @@ bool DialogsInner::searchReceived(const QVector &messages, DialogsSe _lastSearchDate = lastDateFound; } } - if (type == DialogsSearchFromStart || type == DialogsSearchFromOffset) { - _lastSearchPeer = item->history()->peer; + if (item) { + if (type == DialogsSearchFromStart || type == DialogsSearchFromOffset) { + _lastSearchPeer = item->history()->peer; + } } + MsgId msgId = item ? item->id : idFromMessage(*i); if (type == DialogsSearchMigratedFromStart || type == DialogsSearchMigratedFromOffset) { - _lastSearchMigratedId = item->id; + _lastSearchMigratedId = msgId; } else { - _lastSearchId = item->id; + _lastSearchId = msgId; } } if (type == DialogsSearchMigratedFromStart || type == DialogsSearchMigratedFromOffset) { diff --git a/Telegram/SourceFiles/gui/animation.cpp b/Telegram/SourceFiles/gui/animation.cpp index 98d756bb0728cb..c5c1e02c4ab975 100644 --- a/Telegram/SourceFiles/gui/animation.cpp +++ b/Telegram/SourceFiles/gui/animation.cpp @@ -142,7 +142,7 @@ void AnimationManager::stop(Animation *obj) { if (_iterating) { _stopping.insert(obj, NullType()); if (!_starting.isEmpty()) { - _starting.insert(obj, NullType()); + _starting.remove(obj); } } else { AnimatingObjects::iterator i = _objects.find(obj); @@ -159,7 +159,9 @@ void AnimationManager::timeout() { _iterating = true; uint64 ms = getms(); for (AnimatingObjects::const_iterator i = _objects.begin(), e = _objects.end(); i != e; ++i) { - i.key()->step(ms, true); + if (!_stopping.contains(i.key())) { + i.key()->step(ms, true); + } } _iterating = false; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 05c757ee7749e0..b4103258c5e8ca 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -680,8 +680,6 @@ void HistoryInner::itemRemoved(HistoryItem *item) { _widget->updateTopBarSelection(); } - if (_dragAction == NoDrag) return; - if (_dragItem == item) { dragActionCancel(); } @@ -733,8 +731,9 @@ void HistoryInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton but if (needClick) { DEBUG_LOG(("Clicked link: %1 (%2) %3").arg(needClick->text()).arg(needClick->readable()).arg(needClick->encoded())); - needClick->onClick(button); dragActionCancel(); + + needClick->onClick(button); // this possibly can delete this object return; } if (_dragAction == PrepareSelect && !_dragWasInactive && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection) { @@ -777,6 +776,7 @@ void HistoryInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton but } } _dragAction = NoDrag; + _dragItem = 0; _dragSelType = TextSelectLetters; _widget->noSelectingScroll(); _widget->updateTopBarSelection(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 779a93bacc3274..76efb6a1c549fa 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1185,7 +1185,7 @@ void MainWidget::checkedHistory(PeerData *peer, const MTPmessages_Messages &resu History *h = App::history(peer->id); if (!h->lastMsg) { HistoryItem *item = h->addNewMessage((*v)[0], NewMessageLast); - if (collapsed && !collapsed->isEmpty() && collapsed->at(0).type() == mtpc_messageGroup && h->isChannel()) { + if (item && collapsed && !collapsed->isEmpty() && collapsed->at(0).type() == mtpc_messageGroup && h->isChannel()) { if (collapsed->at(0).c_messageGroup().vmax_id.v > item->id) { if (h->asChannelHistory()->onlyImportant()) { h->asChannelHistory()->clearOther(); diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 0c9c0698bae784..797c76bead6469 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -265,12 +265,13 @@ void OverviewInner::searchReceived(SearchRequestType type, const MTPmessages_Mes } for (QVector::const_iterator i = messages->cbegin(), e = messages->cend(); i != e; ++i) { HistoryItem *item = App::histories().addNewMessage(*i, NewMessageExisting); + MsgId msgId = item ? item->id : idFromMessage(*i); if (migratedSearch) { - _searchResults.push_front(-item->id); - _lastSearchMigratedId = item->id; + if (item) _searchResults.push_front(-item->id); + _lastSearchMigratedId = msgId; } else { - _searchResults.push_front(item->id); - _lastSearchId = item->id; + if (item) _searchResults.push_front(item->id); + _lastSearchId = msgId; } } mediaOverviewUpdated(); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 274b34f29be6bc..db43d233772819 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -189,7 +189,9 @@ void UserData::setPhoto(const MTPUserProfilePhoto &p) { // see Local::readPeer a photoId = newPhotoId; photo = newPhoto; photoLoc = newPhotoLoc; - emit App::main()->peerPhotoChanged(this); + if (App::main()) { + emit App::main()->peerPhotoChanged(this); + } } } From 3281b81565e72fb488235d9101820d285795e6b3 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 14 Feb 2016 21:29:17 +0300 Subject: [PATCH 063/133] using new privacy settings (error display), crash reports collecting improved, colors for waveforms imporved, preparing for 0.9.22.dev (next commit) --- Telegram/Resources/lang.strings | 2 + Telegram/Resources/style.txt | 8 +++- Telegram/SourceFiles/_other/updater.cpp | 9 ++++- Telegram/SourceFiles/application.cpp | 4 +- Telegram/SourceFiles/config.h | 4 +- Telegram/SourceFiles/dropdown.cpp | 2 + Telegram/SourceFiles/history.cpp | 9 ++++- Telegram/SourceFiles/mainwidget.cpp | 4 ++ Telegram/SourceFiles/profilewidget.cpp | 12 ++++-- Telegram/SourceFiles/pspecific_wnd.cpp | 42 --------------------- Telegram/SourceFiles/structs.h | 3 ++ Telegram/SourceFiles/window.cpp | 13 +++++-- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++-- Telegram/Telegram.xcodeproj/project.pbxproj | 12 +++--- Telegram/Version | 6 +-- 16 files changed, 67 insertions(+), 73 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 57da8554cc58ff..0ee26c103f8404 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Sorry, you can only add mutual contacts\nto groups at the moment. {more_info}"; "lng_cant_invite_not_contact_channel" = "Sorry, you can only add mutual contacts\nto channels at the moment. {more_info}"; "lng_cant_more_info" = "More info »"; +"lng_cant_invite_privacy" = "Sorry, you cannot add this user to groups because of the privacy settings."; +"lng_cant_invite_privacy_channel" = "Sorry, you cannot add this user to channels because of the privacy settings."; "lng_send_button" = "Send"; "lng_message_ph" = "Write a message.."; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 5cd2bda889f093..92e1622b5685d2 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1291,9 +1291,13 @@ msgWaveformSkip: 1px; msgWaveformMin: 2px; msgWaveformMax: 20px; msgWaveformInActive: #59b6eb; -msgWaveformInInactive: #deeaf1; +msgWaveformInActiveSelected: #51a3d3; +msgWaveformInInactive: #d4dee6; +msgWaveformInInactiveSelected: #9cc1e1; msgWaveformOutActive: #78c67f; -msgWaveformOutInactive: #c4e8c5; +msgWaveformOutActiveSelected: #6badad; +msgWaveformOutInactive: #b3e2b4; +msgWaveformOutInactiveSelected: #91c3c3; sendPadding: 9px; btnSend: flatButton(btnDefFlat) { diff --git a/Telegram/SourceFiles/_other/updater.cpp b/Telegram/SourceFiles/_other/updater.cpp index 9dea213aa9f185..d89efcd95022ce 100644 --- a/Telegram/SourceFiles/_other/updater.cpp +++ b/Telegram/SourceFiles/_other/updater.cpp @@ -482,13 +482,18 @@ HANDLE _generateDumpFileAtPath(const WCHAR *path) { static const int maxFileLen = MAX_PATH * 10; WCHAR szPath[maxFileLen]; - wsprintf(szPath, L"%stdumps\\", path); - + wsprintf(szPath, L"%stdata\\", path); if (!CreateDirectory(szPath, NULL)) { if (GetLastError() != ERROR_ALREADY_EXISTS) { return 0; } } + wsprintf(szPath, L"%sdumps\\", path); + if (!CreateDirectory(szPath, NULL)) { + if (GetLastError() != ERROR_ALREADY_EXISTS) { + return 0; + } + } WCHAR szFileName[maxFileLen]; WCHAR szExeName[maxFileLen]; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index afc5e6bc0742c5..89e667eb112a90 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1052,9 +1052,9 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9020) { + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9022) { if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); } else { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Ctrl+W or Ctrl+F4 closes Telegram window\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); } diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 0878f1a6d70b7d..1816d479cae2dd 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,8 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9021; -static const wchar_t *AppVersionStr = L"0.9.21"; +static const int32 AppVersion = 9022; +static const wchar_t *AppVersionStr = L"0.9.22"; static const bool DevVersion = true; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index f4b9ac2a583a9b..737e70d0b60071 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -1698,6 +1698,7 @@ bool StickerPanInner::inlineRowFinalize(InlineRow &row, int32 &sumWidth, bool fo void StickerPanInner::refreshSavedGifs() { if (_showingSavedGifs) { + _settings.hide(); clearInlineRows(false); if (_showingInlineItems) { const SavedGifs &saved(cSavedGifs()); @@ -1919,6 +1920,7 @@ int32 StickerPanInner::refreshInlineRows(UserData *bot, const InlineResults &res _showingInlineItems = true; _showingSavedGifs = false; + _settings.hide(); int32 count = results.size(), from = validateExistingInlineRows(results), added = 0; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 8c675c0ce8976f..8d1ed775ae3c5a 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -4059,9 +4059,12 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r float64 prg = voice->_playback ? voice->_playback->a_progress.current() : 0; // rescale waveform by going in waveform.size * bar_count 1D grid - style::color active(outbg ? st::msgWaveformOutActive : st::msgWaveformInActive); - style::color inactive(outbg ? st::msgWaveformOutInactive : st::msgWaveformInInactive); + style::color active(outbg ? (selected ? st::msgWaveformOutActiveSelected : st::msgWaveformOutActive) : (selected ? st::msgWaveformInActiveSelected : st::msgWaveformInActive)); + style::color inactive(outbg ? (selected ? st::msgWaveformOutInactiveSelected : st::msgWaveformOutInactive) : (selected ? st::msgWaveformInInactiveSelected : st::msgWaveformInInactive)); int32 wf_size = wf ? wf->size() : WaveformSamplesCount, availw = int32(namewidth + st::msgWaveformSkip), activew = qRound(availw * prg); + if (!outbg && !voice->_playback && parent->isMediaUnread()) { + activew = availw; + } int32 bar_count = qMin(availw / int32(st::msgWaveformBar + st::msgWaveformSkip), wf_size); uchar max_value = 0; int32 max_delta = st::msgWaveformMax - st::msgWaveformMin, bottom = st::msgFilePadding.top() + st::msgWaveformMax; @@ -7531,6 +7534,8 @@ void HistoryServiceMsg::draw(Painter &p, const QRect &r, uint32 selection, uint6 } int32 HistoryServiceMsg::resize(int32 width) { + int32 maxwidth = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + if (width > maxwidth) width = maxwidth; width -= st::msgServiceMargin.left() + st::msgServiceMargin.left(); // two small margins if (width < st::msgServicePadding.left() + st::msgServicePadding.right() + 1) width = st::msgServicePadding.left() + st::msgServicePadding.right() + 1; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 085b958d733fe3..e5be52e9828bb1 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1084,6 +1084,8 @@ bool MainWidget::addParticipantFail(UserData *user, const RPCError &error) { QString text = lang(lng_failed_add_participant); if (error.type() == "USER_LEFT_CHAT") { // trying to return banned user to his group + } else if (error.type() == "USER_PRIVACY_RESTRICTED") { + text = lang(lng_cant_invite_privacy); } else if (error.type() == "USER_NOT_MUTUAL_CONTACT") { // trying to return user who does not have me in contacts text = lang(lng_failed_add_not_mutual); } else if (error.type() == "USER_ALREADY_PARTICIPANT" && user->botInfo) { @@ -1100,6 +1102,8 @@ bool MainWidget::addParticipantsFail(ChannelData *channel, const RPCError &error QString text = lang(lng_failed_add_participant); if (error.type() == "USER_LEFT_CHAT") { // trying to return banned user to his group + } else if (error.type() == "USER_PRIVACY_RESTRICTED") { + text = lang(lng_cant_invite_privacy_channel); } else if (error.type() == "USER_NOT_MUTUAL_CONTACT") { // trying to return user who does not have me in contacts text = lang(channel->isMegagroup() ? lng_failed_add_not_mutual : lng_failed_add_not_mutual_channel); } else if (error.type() == "PEER_FLOOD") { diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 53df0dedfbb9fc..313709f181fb58 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -817,7 +817,7 @@ void ProfileInner::paintEvent(QPaintEvent *e) { top += st::profilePhotoSize; top += st::profileButtonTop; - if ((!_peerChat || _peerChat->canEdit()) && (!_peerChannel || _amCreator || (_peerChannel->amEditor() && _peerChannel->isMegagroup()))) { + if ((!_peerChat || _peerChat->canEdit()) && (!_peerChannel || _amCreator || (_peerChannel->canAddParticipants() && _peerChannel->isMegagroup()))) { top += _shareContact.height(); } else { top -= st::profileButtonTop; @@ -1294,13 +1294,17 @@ void ProfileInner::resizeEvent(QResizeEvent *e) { top += st::profileButtonTop; _uploadPhoto.setGeometry(_left, top, btnWidth, _uploadPhoto.height()); - _addParticipant.setGeometry(_left + _width - btnWidth, top, btnWidth, _addParticipant.height()); + if (_peerChannel && _peerChannel->count < cMaxMegaGroupCount() && _peerChannel->isMegagroup() && !_amCreator && !_peerChannel->amEditor() && _peerChannel->canAddParticipants()) { + _addParticipant.setGeometry(_left, top, btnWidth, _addParticipant.height()); + } else { + _addParticipant.setGeometry(_left + _width - btnWidth, top, btnWidth, _addParticipant.height()); + } _sendMessage.setGeometry(_left, top, btnWidth, _sendMessage.height()); _shareContact.setGeometry(_left + _width - btnWidth, top, btnWidth, _shareContact.height()); _inviteToGroup.setGeometry(_left + _width - btnWidth, top, btnWidth, _inviteToGroup.height()); - if ((!_peerChat || _peerChat->canEdit()) && (!_peerChannel || _amCreator || (_peerChannel->amEditor() && _peerChannel->isMegagroup()))) { + if ((!_peerChat || _peerChat->canEdit()) && (!_peerChannel || _amCreator || (_peerChannel->canAddParticipants() && _peerChannel->isMegagroup()))) { top += _shareContact.height(); } else { top -= st::profileButtonTop; @@ -1634,7 +1638,7 @@ void ProfileInner::showAll() { _invitationLink.hide(); } } - if (_peerChannel->count < cMaxMegaGroupCount() && _peerChannel->isMegagroup() && (_amCreator || _peerChannel->amEditor())) { + if (_peerChannel->count < cMaxMegaGroupCount() && _peerChannel->isMegagroup() && _peerChannel->canAddParticipants()) { _addParticipant.show(); } else { _addParticipant.hide(); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index b29ff4c1f876cf..044827de67dbd6 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2475,48 +2475,6 @@ BOOL __stdcall ReadProcessMemoryRoutine64( return bRet; } -HANDLE _generateDumpFileAtPath(const WCHAR *path) { - static const int maxFileLen = MAX_PATH * 10; - - WCHAR szPath[maxFileLen]; - wsprintf(szPath, L"%stdumps\\", path); - - if (!CreateDirectory(szPath, NULL)) { - DWORD errCode = GetLastError(); - if (errCode && errCode != ERROR_ALREADY_EXISTS) { - return 0; - } - } - - WCHAR szFileName[maxFileLen]; - WCHAR szExeName[maxFileLen]; - - wcscpy_s(szExeName, _exeName); - WCHAR *dotFrom = wcschr(szExeName, WCHAR(L'.')); - if (dotFrom) { - wsprintf(dotFrom, L""); - } - - SYSTEMTIME stLocalTime; - - GetLocalTime(&stLocalTime); - - if (cBetaVersion()) { - wsprintf(szFileName, L"%s%s-%ld-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp", - szPath, szExeName, cBetaVersion(), - stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay, - stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond, - GetCurrentProcessId(), GetCurrentThreadId()); - } else { - wsprintf(szFileName, L"%s%s-%s-%04d%02d%02d-%02d%02d%02d-%ld-%ld.dmp", - szPath, szExeName, AppVersionStr, - stLocalTime.wYear, stLocalTime.wMonth, stLocalTime.wDay, - stLocalTime.wHour, stLocalTime.wMinute, stLocalTime.wSecond, - GetCurrentProcessId(), GetCurrentThreadId()); - } - return CreateFile(szFileName, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_WRITE|FILE_SHARE_READ, 0, CREATE_ALWAYS, 0, 0); -} - // **************************************** ToolHelp32 ************************ #define MAX_MODULE_NAME32 255 #define TH32CS_SNAPMODULE 0x00000008 diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 887ab0ebf510a0..625b300db3a350 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -626,6 +626,9 @@ class ChannelData : public PeerData { bool isVerified() const { return flags & MTPDchannel::flag_verified; } + bool canAddParticipants() const { + return amCreator() || amEditor() || (flags & MTPDchannel::flag_invites_enabled); + } // ImagePtr photoFull; QString invitationUrl; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 593925800e390f..932d464df502b3 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2019,7 +2019,7 @@ LastCrashedWindow::LastCrashedWindow() , _updatingSkip(this, false) #endif { - if (!cDevVersion() && !cBetaVersion()) { + if (!cDevVersion() && !cBetaVersion()) { // currently accept crash reports only from testers _sendingState = SendingNoReport; } if (_sendingState != SendingNoReport) { @@ -2064,12 +2064,19 @@ LastCrashedWindow::LastCrashedWindow() _minidumpFull = maxDumpFull; } } - if (_minidumpName.isEmpty()) { + if (_minidumpName.isEmpty()) { // currently don't accept crash reports without dumps from google libraries _sendingState = SendingNoReport; } else { _minidump.setText(qsl("+ %1 (%2 KB)").arg(_minidumpName).arg(dumpsize / 1024)); } } + if (_sendingState != SendingNoReport) { + QString version = getReportField(qstr("version"), qstr("Version:")); + QString current = cBetaVersion() ? qsl("-%1").arg(cBetaVersion()) : QString::number(AppVersion); + if (version != current) { // currently don't accept crash reports from not current app version + _sendingState = SendingNoReport; + } + } _networkSettings.setText(qsl("NETWORK SETTINGS")); connect(&_networkSettings, SIGNAL(clicked()), this, SLOT(onNetworkSettings())); @@ -2201,7 +2208,7 @@ void LastCrashedWindow::onSendReport() { App::setProxySettings(_sendManager); QString apiid = getReportField(qstr("apiid"), qstr("ApiId:")), version = getReportField(qstr("version"), qstr("Version:")); - _checkReply = _sendManager.get(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=query_report&apiid=%1&version=%2&dmp=%3").arg(apiid).arg(version).arg(minidumpFileName().isEmpty() ? 0 : 1))); + _checkReply = _sendManager.get(QNetworkRequest(qsl("https://tdesktop.com/crash.php?act=query_report&apiid=%1&version=%2&dmp=%3&platform=%4").arg(apiid).arg(version).arg(minidumpFileName().isEmpty() ? 0 : 1).arg(cPlatformString()))); connect(_checkReply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(onSendingError(QNetworkReply::NetworkError))); connect(_checkReply, SIGNAL(finished()), this, SLOT(onCheckingFinished())); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 9e4f736360089a..8bc5a45e021e22 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.21 + 0.9.22 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 353487466520e7..8dd9cd58c18b0d 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,21,0 - PRODUCTVERSION 0,9,21,0 + FILEVERSION 0,9,22,0 + PRODUCTVERSION 0,9,22,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.21.0" + VALUE "FileVersion", "0.9.22.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.21.0" + VALUE "ProductVersion", "0.9.22.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 0e234ad04dde75..8454cab8379b4a 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.21; + CURRENT_PROJECT_VERSION = 0.9.22; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.21; + CURRENT_PROJECT_VERSION = 0.9.22; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.21; + CURRENT_PROJECT_VERSION = 0.9.22; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.21; + DYLIB_CURRENT_VERSION = 0.9.22; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.21; + CURRENT_PROJECT_VERSION = 0.9.22; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.21; + DYLIB_CURRENT_VERSION = 0.9.22; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index 58252de8fc2f61..bcf8c071a901bc 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9021 +AppVersion 9022 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.21 -AppVersionStr 0.9.21 +AppVersionStrSmall 0.9.22 +AppVersionStr 0.9.22 DevChannel 1 BetaVersion 0 9019002 From 0154be513868b21d95b474452e8ffff094a09f90 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 14 Feb 2016 22:46:01 +0300 Subject: [PATCH 064/133] fixed errors for 0.9.22 dev version --- Telegram/SourceFiles/audio.cpp | 8 ++++---- Telegram/SourceFiles/history.cpp | 2 +- Telegram/SourceFiles/historywidget.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpConnection.cpp | 13 +++++++------ Telegram/SourceFiles/overviewwidget.cpp | 2 +- Telegram/SourceFiles/structs.cpp | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index 7771eb39e92144..a074ad3f88a7e6 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -1867,10 +1867,10 @@ struct AudioCapturePrivate { , swrContext(0) , lastUpdate(0) , levelMax(0) + , dataPos(0) , waveformMod(0) , waveformEach(AudioVoiceMsgFrequency / 100) - , waveformPeak(0) - , dataPos(0) { + , waveformPeak(0) { } ALCdevice *device; AVOutputFormat *fmt; @@ -2548,7 +2548,7 @@ class FFMpegWaveformCounter : public FFMpegLoader { const char *data = buffer.data(); if (fmt == AL_FORMAT_MONO8 || fmt == AL_FORMAT_STEREO8) { - for (int32 i = 0, l = buffer.size(); i + sizeof(uchar) <= l;) { + for (int32 i = 0, l = buffer.size(); i + int32(sizeof(uchar)) <= l;) { uint16 sample = qAbs((int32(*(uchar*)(data + i)) - 128) * 256); if (peak < sample) { peak = sample; @@ -2563,7 +2563,7 @@ class FFMpegWaveformCounter : public FFMpegLoader { } } } else if (fmt == AL_FORMAT_MONO16 || fmt == AL_FORMAT_STEREO16) { - for (int32 i = 0, l = buffer.size(); i + sizeof(uint16) <= l;) { + for (int32 i = 0, l = buffer.size(); i + int32(sizeof(uint16)) <= l;) { uint16 sample = qAbs(int32(*(int16*)(data + i))); if (peak < sample) { peak = sample; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 8d1ed775ae3c5a..8c38444160285a 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -4069,7 +4069,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r uchar max_value = 0; int32 max_delta = st::msgWaveformMax - st::msgWaveformMin, bottom = st::msgFilePadding.top() + st::msgWaveformMax; p.setPen(Qt::NoPen); - for (uint32 i = 0, bar_x = 0, sum_i = 0; i < wf_size; ++i) { + for (int32 i = 0, bar_x = 0, sum_i = 0; i < wf_size; ++i) { uchar value = wf ? wf->at(i) : 0; if (sum_i + bar_count >= wf_size) { // draw bar sum_i = sum_i + bar_count - wf_size; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index ad23e890b5e1d3..01a3cb2b6ec845 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -866,7 +866,7 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); bool lnkIsVideo = lnkDocument ? lnkDocument->document()->isVideo() : false; - bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; + bool lnkIsAudio = lnkDocument ? (lnkDocument->document()->voice() != 0) : false; if (lnkPhoto || lnkDocument) { if (isUponSelected > 0) { _menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index dcde71a52ac381..0ef1430e0556c2 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -431,18 +431,19 @@ namespace { TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(Logs::mb(packet, length).str())); return mtpBuffer(1, -500); } + const mtpPrime *packetdata = reinterpret_cast(packet + (length - len)); TCP_LOG(("TCP Info: packet received, size = %1").arg(size * sizeof(mtpPrime))); if (size == 1) { - if (packet[0] == -429) { + if (*packetdata == -429) { LOG(("Protocol Error: -429 flood code returned!")); } else { - LOG(("TCP Error: error packet received, code = %1").arg(packet[0])); + LOG(("TCP Error: error packet received, code = %1").arg(*packetdata)); } - return mtpBuffer(1, packet[0]); + return mtpBuffer(1, *packetdata); } mtpBuffer data(size); - memcpy(data.data(), packet + (length - len), size * sizeof(mtpPrime)); + memcpy(data.data(), packetdata, size * sizeof(mtpPrime)); return data; } @@ -729,7 +730,7 @@ void MTPautoConnection::tcpSend(mtpBuffer &buffer) { uint32 second1 = 0; do { memset_rand(nonce, sizeof(nonce)); - } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || nonce[0] == 0xef); + } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || *reinterpret_cast(nonce) == 0xef); sock.write(nonce, sizeof(nonce)); } ++packetNum; @@ -1029,7 +1030,7 @@ void MTPtcpConnection::sendData(mtpBuffer &buffer) { uint32 second1 = 0; do { memset_rand(nonce, sizeof(nonce)); - } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || nonce[0] == 0xef); + } while (*first == first1 || *first == first2 || *first == first3 || *first == first4 || *first == first5 || *second == second1 || *reinterpret_cast(nonce) == 0xef); sock.write(nonce, sizeof(nonce)); } ++packetNum; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index dd9cf6dbe667b3..919f770a2e18e3 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1262,7 +1262,7 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _contextMenuLnk = textlnkOver(); PhotoLink *lnkPhoto = dynamic_cast(_contextMenuLnk.data()); DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - bool lnkIsAudio = lnkDocument ? lnkDocument->document()->voice() : false; + bool lnkIsAudio = lnkDocument ? (lnkDocument->document()->voice() != 0) : false; bool lnkIsVideo = lnkDocument ? lnkDocument->document()->isVideo() : false; if (lnkPhoto || lnkDocument) { _menu = new PopupMenu(); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 6a9f25ed9a3570..90757d14e78bbe 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -977,7 +977,7 @@ void DocumentCancelLink::onClick(Qt::MouseButton button) const { } VoiceData::~VoiceData() { - if (!waveform.isEmpty() && waveform.at(0) == -1 && waveform.size() > sizeof(TaskId)) { + if (!waveform.isEmpty() && waveform.at(0) == -1 && waveform.size() > int32(sizeof(TaskId))) { TaskId taskId = 0; memcpy(&taskId, waveform.constData() + 1, sizeof(taskId)); Local::cancelTask(taskId); From bbc804bd5623af30fa4f4a616b7e1a2fc4b1a769 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 14 Feb 2016 22:53:42 +0300 Subject: [PATCH 065/133] added numeric header, v 0.9.22 dev --- Telegram/SourceFiles/stdafx.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index fa832467859f02..b9d77d66ba91b3 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -26,6 +26,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #ifdef __cplusplus +#include + #include #include #include From 01c26cedb12f46b4bbbef1eacad410599cc619c8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 10:09:14 +0300 Subject: [PATCH 066/133] three crashes fixed --- Telegram/SourceFiles/audio.cpp | 2 +- Telegram/SourceFiles/history.cpp | 12 +++++++----- Telegram/SourceFiles/mtproto/mtpConnection.cpp | 11 +++++++---- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/Telegram/SourceFiles/audio.cpp b/Telegram/SourceFiles/audio.cpp index a074ad3f88a7e6..6393fc3dd59df6 100644 --- a/Telegram/SourceFiles/audio.cpp +++ b/Telegram/SourceFiles/audio.cpp @@ -2403,7 +2403,7 @@ class FFMpegAttributesReader : public AbstractFFMpegLoader { } bool open(qint64 position = 0) { - if (!AbstractFFMpegLoader::openFile()) { + if (!AbstractFFMpegLoader::open()) { return false; } diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 8c38444160285a..540f83bc636ab6 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2536,13 +2536,14 @@ void History::clear(bool leaveItems) { if (App::wnd() && !App::quiting()) App::wnd()->mediaOverviewUpdated(peer, MediaOverviewType(i)); } } - for (Blocks::const_iterator i = blocks.cbegin(), e = blocks.cend(); i != e; ++i) { + Blocks lst = blocks; + blocks.clear(); + for (Blocks::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { if (leaveItems) { (*i)->clear(true); } delete *i; } - blocks.clear(); if (leaveItems) { lastKeyboardInited = false; } else { @@ -2698,16 +2699,17 @@ int32 HistoryBlock::geomResize(int32 newWidth, int32 *ytransform, const HistoryI } void HistoryBlock::clear(bool leaveItems) { + Items lst = items; + items.clear(); if (leaveItems) { - for (Items::const_iterator i = items.cbegin(), e = items.cend(); i != e; ++i) { + for (Items::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { (*i)->detachFast(); } } else { - for (Items::const_iterator i = items.cbegin(), e = items.cend(); i != e; ++i) { + for (Items::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) { delete *i; } } - items.clear(); } void HistoryBlock::removeItem(HistoryItem *item) { diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 0ef1430e0556c2..e9c8502db6a384 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -546,21 +546,21 @@ void MTPabstractTcpConnection::socketRead() { } do { - char *readTo = currentPos; uint32 toRead = packetLeft ? packetLeft : (readingToShort ? (MTPShortBufferSize * sizeof(mtpPrime)-packetRead) : 4); if (readingToShort) { if (currentPos + toRead > ((char*)shortBuffer) + MTPShortBufferSize * sizeof(mtpPrime)) { longBuffer.resize(((packetRead + toRead) >> 2) + 1); memcpy(&longBuffer[0], shortBuffer, packetRead); - readTo = ((char*)&longBuffer[0]) + packetRead; + currentPos = ((char*)&longBuffer[0]) + packetRead; + readingToShort = false; } } else { if (longBuffer.size() * sizeof(mtpPrime) < packetRead + toRead) { longBuffer.resize(((packetRead + toRead) >> 2) + 1); - readTo = ((char*)&longBuffer[0]) + packetRead; + currentPos = ((char*)&longBuffer[0]) + packetRead; } } - int32 bytes = (int32)sock.read(readTo, toRead); + int32 bytes = (int32)sock.read(currentPos, toRead); if (bytes > 0) { TCP_LOG(("TCP Info: read %1 bytes").arg(bytes)); @@ -573,6 +573,7 @@ void MTPabstractTcpConnection::socketRead() { currentPos = (char*)shortBuffer; packetRead = packetLeft = 0; readingToShort = true; + longBuffer.clear(); } else { TCP_LOG(("TCP Info: not enough %1 for packet! read %2").arg(packetLeft).arg(packetRead)); emit receivedSome(); @@ -602,10 +603,12 @@ void MTPabstractTcpConnection::socketRead() { if (!packetRead) { currentPos = (char*)shortBuffer; readingToShort = true; + longBuffer.clear(); } else if (!readingToShort && packetRead < MTPShortBufferSize * sizeof(mtpPrime)) { memcpy(shortBuffer, currentPos - packetRead, packetRead); currentPos = (char*)shortBuffer; readingToShort = true; + longBuffer.clear(); } } } From 517358c8e9a1c172d44bdfefcfef23ce28db861a Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 14:11:07 +0300 Subject: [PATCH 067/133] clearing media autodownload settings on logout, fixed history clearing --- Telegram/SourceFiles/app.cpp | 3 +++ Telegram/SourceFiles/mainwidget.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 67ad444262c272..2915f02ac67e87 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1842,6 +1842,9 @@ namespace App { cSetSavedGifs(SavedGifs()); cSetLastSavedGifsUpdate(0); cSetReportSpamStatuses(ReportSpamStatuses()); + cSetAutoDownloadPhoto(0); + cSetAutoDownloadAudio(0); + cSetAutoDownloadGif(0); ::photoItems.clear(); ::documentItems.clear(); ::webPageItems.clear(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index c632b510d05474..8944d59f3805ee 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -994,7 +994,7 @@ void MainWidget::deleteHistoryPart(PeerData *peer, const MTPmessages_AffectedHis return; } - MTP::send(MTPmessages_DeleteHistory(peer->input, d.voffset), rpcDone(&MainWidget::deleteHistoryPart, peer)); + MTP::send(MTPmessages_DeleteHistory(peer->input, MTP_int(0)), rpcDone(&MainWidget::deleteHistoryPart, peer)); } void MainWidget::deleteMessages(PeerData *peer, const QVector &ids) { From bb30b71b8686bd017467b7df3335079c8c10b0ed Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 14:23:45 +0300 Subject: [PATCH 068/133] 0.9.23 dev version, convertScale() added to inline result thumbs in some places --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 4 ++-- Telegram/SourceFiles/history.cpp | 4 ++-- Telegram/SourceFiles/layout.cpp | 10 +++++----- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 6 +++--- 8 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 84520a5b73f7d6..0f2300491a8094 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1052,7 +1052,7 @@ void AppClass::checkMapVersion() { if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); } else { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Testing new crash reporting system\n\xe2\x80\x94 Conversation history is centered in wide windows\n\xe2\x80\x94 New cute link and timestamp tooltips design\n\xe2\x80\x94 Ctrl+W or Ctrl+F4 closes Telegram window\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); } } else if (Local::oldMapVersion() < 9016) { versionFeatures = lng_new_version_text(lt_gifs_link, qsl("https://telegram.org/blog/gif-revolution"), lt_bots_link, qsl("https://telegram.org/blog/inline-bots")).trimmed(); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 1816d479cae2dd..363e19b564ceec 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,8 +20,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9022; -static const wchar_t *AppVersionStr = L"0.9.22"; +static const int32 AppVersion = 9023; +static const wchar_t *AppVersionStr = L"0.9.23"; static const bool DevVersion = true; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 540f83bc636ab6..890cd38b5194eb 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -3754,7 +3754,7 @@ void HistoryVideo::unregItem(HistoryItem *item) { ImagePtr HistoryVideo::replyPreview() { if (_data->replyPreview->isNull() && !_data->thumb->isNull()) { if (_data->thumb->loaded()) { - int w = _data->thumb->width(), h = _data->thumb->height(); + int w = convertScale(_data->thumb->width()), h = convertScale(_data->thumb->height()); if (w <= 0) w = 1; if (h <= 0) h = 1; _data->replyPreview = ImagePtr(w > h ? _data->thumb->pix(w * st::msgReplyBarSize.height() / h, st::msgReplyBarSize.height()) : _data->thumb->pix(st::msgReplyBarSize.height()), "PNG"); @@ -3857,7 +3857,7 @@ void HistoryDocument::initDimensions(const HistoryItem *parent) { HistoryDocumentThumbed *thumbed = Get(); if (thumbed) { _data->thumb->load(); - int32 tw = _data->thumb->width(), th = _data->thumb->height(); + int32 tw = convertScale(_data->thumb->width()), th = convertScale(_data->thumb->height()); if (tw > th) { thumbed->_thumbw = (tw * st::msgFileThumbSize) / th; } else { diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 20b5ad04cdd32d..549b442e8a8336 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -756,7 +756,7 @@ LayoutOverviewDocument::LayoutOverviewDocument(DocumentData *document, HistoryIt if (withThumb()) { _data->thumb->load(); - int32 tw = _data->thumb->width(), th = _data->thumb->height(); + int32 tw = convertScale(_data->thumb->width()), th = convertScale(_data->thumb->height()); if (tw > th) { _thumbw = (tw * st::overviewFileSize) / th; } else { @@ -1651,7 +1651,7 @@ int32 LayoutInlineGif::content_width() const { return doc->dimensions.width(); } if (!doc->thumb->isNull()) { - return doc->thumb->width(); + return convertScale(doc->thumb->width()); } } else if (_result) { return _result->width; @@ -1666,7 +1666,7 @@ int32 LayoutInlineGif::content_height() const { return doc->dimensions.height(); } if (!doc->thumb->isNull()) { - return doc->thumb->height(); + return convertScale(doc->thumb->height()); } } else if (_result) { return _result->height; @@ -1920,7 +1920,7 @@ void LayoutInlineWebVideo::getState(TextLinkPtr &link, HistoryCursorState &curso void LayoutInlineWebVideo::prepareThumb(int32 width, int32 height) const { if (_result->thumb->loaded()) { if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) { - int32 w = qMax(_result->thumb->width(), 1), h = qMax(_result->thumb->height(), 1); + int32 w = qMax(convertScale(_result->thumb->width()), 1), h = qMax(convertScale(_result->thumb->height()), 1); if (w * height > h * width) { if (height < h) { w = w * height / h; @@ -2068,7 +2068,7 @@ void LayoutInlineArticle::prepareThumb(int32 width, int32 height) const { if (_result->thumb->loaded()) { if (_thumb.width() != width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) { - int32 w = qMax(_result->thumb->width(), 1), h = qMax(_result->thumb->height(), 1); + int32 w = qMax(convertScale(_result->thumb->width()), 1), h = qMax(convertScale(_result->thumb->height()), 1); if (w * height > h * width) { if (height < h) { w = w * height / h; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 8bc5a45e021e22..468ce68fd65e9f 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.22 + 0.9.23 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 8dd9cd58c18b0d..036e34bc70b3da 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,22,0 - PRODUCTVERSION 0,9,22,0 + FILEVERSION 0,9,23,0 + PRODUCTVERSION 0,9,23,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.22.0" + VALUE "FileVersion", "0.9.23.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.22.0" + VALUE "ProductVersion", "0.9.23.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 8454cab8379b4a..3f464ec555705e 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.22; + CURRENT_PROJECT_VERSION = 0.9.23; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.22; + CURRENT_PROJECT_VERSION = 0.9.23; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.22; + CURRENT_PROJECT_VERSION = 0.9.23; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.22; + DYLIB_CURRENT_VERSION = 0.9.23; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.22; + CURRENT_PROJECT_VERSION = 0.9.23; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.22; + DYLIB_CURRENT_VERSION = 0.9.23; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index bcf8c071a901bc..98e88320e90178 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9022 +AppVersion 9023 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.22 -AppVersionStr 0.9.22 +AppVersionStrSmall 0.9.23 +AppVersionStr 0.9.23 DevChannel 1 BetaVersion 0 9019002 From 4081af12dd2503f9b7860d6cf97b10d4f3f25498 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 14:46:01 +0300 Subject: [PATCH 069/133] words selection fixed, wide mode starts from 720px conversation width, hiding tooltips on app state changed to inactive, 0.9.23 dev version --- Telegram/Resources/style.txt | 2 +- Telegram/SourceFiles/application.cpp | 3 +++ Telegram/SourceFiles/history.cpp | 11 +++++++++-- Telegram/SourceFiles/historywidget.cpp | 3 +-- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 98b23e2dbcb9de..5999c47f4f151b 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1016,7 +1016,7 @@ historyToEndSkip: 10px; activeFadeInDuration: 500; activeFadeOutDuration: 3000; -historyMaxWidth: 680px; +historyMaxWidth: 720px; msgRadius: 3px; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 0f2300491a8094..dc3fc7505d2d01 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -926,6 +926,9 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + if (state != Qt::ApplicationActive) { + PopupTooltip::Hide(); + } } void AppClass::killDownloadSessions() { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 890cd38b5194eb..b27b6aac0e4dcd 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -7462,7 +7462,11 @@ void HistoryServiceMsg::initDimensions() { void HistoryServiceMsg::countPositionAndSize(int32 &left, int32 &width) const { left = st::msgServiceMargin.left(); - width = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)) - st::msgServiceMargin.left() - st::msgServiceMargin.left(); + int32 maxwidth = _history->width; + if (Adaptive::Wide()) { + maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + } + width = maxwidth - st::msgServiceMargin.left() - st::msgServiceMargin.left(); } QString HistoryServiceMsg::selectedText(uint32 selection) const { @@ -7536,7 +7540,10 @@ void HistoryServiceMsg::draw(Painter &p, const QRect &r, uint32 selection, uint6 } int32 HistoryServiceMsg::resize(int32 width) { - int32 maxwidth = qMin(_history->width, int(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + int32 maxwidth = _history->width; + if (Adaptive::Wide()) { + maxwidth = qMin(maxwidth, int32(st::msgMaxWidth + 2 * st::msgPhotoSkip)); + } if (width > maxwidth) width = maxwidth; width -= st::msgServiceMargin.left() + st::msgServiceMargin.left(); // two small margins if (width < st::msgServicePadding.left() + st::msgServicePadding.right() + 1) width = st::msgServicePadding.left() + st::msgServicePadding.right() + 1; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 01a3cb2b6ec845..e8b35396672191 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -792,6 +792,7 @@ void HistoryInner::mouseReleaseEvent(QMouseEvent *e) { void HistoryInner::mouseDoubleClickEvent(QMouseEvent *e) { if (!_history) return; + dragActionStart(e->globalPos(), e->button()); if (((_dragAction == Selecting && !_selected.isEmpty() && _selected.cbegin().value() != FullSelection) || (_dragAction == NoDrag && (_selected.isEmpty() || _selected.cbegin().value() != FullSelection))) && _dragSelType == TextSelectLetters && _dragItem) { bool afterDragSymbol, uponSelected; uint16 symbol; @@ -813,8 +814,6 @@ void HistoryInner::mouseDoubleClickEvent(QMouseEvent *e) { _trippleClickPoint = e->globalPos(); _trippleClickTimer.start(QApplication::doubleClickInterval()); } - } else { - mousePressEvent(e); } } From ebd77ba71de75c7f5426844c84df698835e19831 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 14:52:27 +0300 Subject: [PATCH 070/133] re-fixed crash in ffmpeg, 0.9.23 dev --- Telegram/SourceFiles/types.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 497627b7a607a8..67adc1560c33ac 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -293,7 +293,7 @@ namespace ThirdParty { av_register_all(); avcodec_register_all(); -// av_lockmgr_register(_ffmpegLockManager); + av_lockmgr_register(_ffmpegLockManager); _sslInited = true; } From 71e544e0fcda061aab5c2f65f73f2a1b93c74fef Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 15 Feb 2016 18:52:11 +0300 Subject: [PATCH 071/133] added user tag for reports, fixed couple of compile warnings in gcc --- Telegram/SourceFiles/facades.cpp | 28 +++++++++++++++++-- Telegram/SourceFiles/facades.h | 2 ++ Telegram/SourceFiles/history.cpp | 1 + Telegram/SourceFiles/logs.cpp | 1 + .../SourceFiles/mtproto/mtpConnection.cpp | 2 +- Telegram/SourceFiles/types.h | 11 ++++++++ Telegram/SourceFiles/window.cpp | 2 +- 7 files changed, 43 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 1750f0250bae41..69d1584cdf76f2 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -215,6 +215,7 @@ struct SandboxDataStruct { ConnectionProxy PreLaunchProxy; }; SandboxDataStruct *SandboxData = 0; +uint64 SandboxUserTag = 0; namespace Sandbox { @@ -276,6 +277,27 @@ namespace Sandbox { f.write("1"); } } + + srand((int32)time(NULL)); + + SandboxUserTag = 0; + QFile usertag(cWorkingDir() + qsl("tdata/usertag")); + if (usertag.open(QIODevice::ReadOnly)) { + if (usertag.read(reinterpret_cast(&SandboxUserTag), sizeof(uint64)) != sizeof(uint64)) { + SandboxUserTag = 0; + } + usertag.close(); + } + if (!SandboxUserTag) { + do { + memsetrnd_bad(SandboxUserTag); + } while (!SandboxUserTag); + + if (usertag.open(QIODevice::WriteOnly)) { + usertag.write(reinterpret_cast(&SandboxUserTag), sizeof(uint64)); + usertag.close(); + } + } } void start() { @@ -290,8 +312,6 @@ namespace Sandbox { break; } } - - srand((int32)time(NULL)); } void finish() { @@ -299,6 +319,10 @@ namespace Sandbox { SandboxData = 0; } + uint64 UserTag() { + return SandboxUserTag; + } + DefineReadOnlyVar(Sandbox, QString, LangSystemISO); DefineReadOnlyVar(Sandbox, int32, LangSystem); DefineVar(Sandbox, QByteArray, LastCrashDump); diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 43da4a0268d1b4..0e32721934c0c0 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -112,6 +112,8 @@ namespace Sandbox { void start(); void finish(); + uint64 UserTag(); + DeclareReadOnlyVar(QString, LangSystemISO); DeclareReadOnlyVar(int32, LangSystem); DeclareVar(QByteArray, LastCrashDump); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index b27b6aac0e4dcd..fc0cbceb480948 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -3803,6 +3803,7 @@ HistoryDocument::HistoryDocument(DocumentData *document, const QString &caption, } HistoryDocument::HistoryDocument(const HistoryDocument &other) : HistoryFileMedia() +, Interfaces() , _parent(0) , _data(other._data) { const HistoryDocumentCaptioned *captioned = other.Get(); diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 502644d7a17266..4a90c14aa18b94 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -868,6 +868,7 @@ namespace SignalHandlers { 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(); + ProcessAnnotations["UserTag"] = QString::number(Sandbox::UserTag(), 16).toUtf8().constData(); QString dumpspath = cWorkingDir() + qsl("tdata/dumps"); QDir().mkpath(dumpspath); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index e9c8502db6a384..0410baf2644362 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -426,7 +426,7 @@ namespace { size = (((uint32(bytes[3]) << 8) | uint32(bytes[2])) << 8) | uint32(bytes[1]); len -= 3; } - if (size * sizeof(mtpPrime) != len) { + if (size * int32(sizeof(mtpPrime)) != len) { LOG(("TCP Error: bad packet header")); TCP_LOG(("TCP Error: bad packet header, packet: %1").arg(Logs::mb(packet, length).str())); return mtpBuffer(1, -500); diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index a87d0fa679b1a5..b93bf822d3dcc2 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -222,6 +222,17 @@ inline void memsetrnd(T &value) { memset_rand(&value, sizeof(value)); } +inline void memset_rand_bad(void *data, uint32 len) { + for (uchar *i = reinterpret_cast(data), *e = i + len; i != e; ++i) { + *i = uchar(rand() & 0xFF); + } +} + +template +inline void memsetrnd_bad(T &value) { + memset_rand_bad(&value, sizeof(value)); +} + class ReadLockerAttempt { public: diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9c6b19c6496124..87022c4d942c64 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2118,7 +2118,7 @@ LastCrashedWindow::LastCrashedWindow() #endif _pleaseSendReport.setText(qsl("Please send us a crash report.")); - _yourReportName.setText(qsl("Your crash report tag: %1").arg(_minidumpName)); + _yourReportName.setText(qsl("Your Report Tag: %1\nYour User Tag: %2").arg(QString(_minidumpName).replace(".dmp", "")).arg(Sandbox::UserTag(), 0, 16)); _yourReportName.setCursor(style::cur_text); _yourReportName.setTextInteractionFlags(Qt::TextSelectableByMouse); From a5b466ec054c71f0039e1abfb092571f90e62faa Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2016 14:21:39 +0300 Subject: [PATCH 072/133] link clicks and popup menu items activated async, some crashes fixed --- Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/facades.cpp | 19 +++++++++++++++++-- Telegram/SourceFiles/facades.h | 2 ++ Telegram/SourceFiles/gui/popupmenu.cpp | 2 +- Telegram/SourceFiles/history.cpp | 3 ++- Telegram/SourceFiles/historywidget.cpp | 14 +++++++------- .../SourceFiles/mtproto/mtpConnection.cpp | 2 +- Telegram/SourceFiles/structs.cpp | 6 +++--- Telegram/SourceFiles/types.cpp | 3 +-- Telegram/SourceFiles/window.cpp | 4 ++++ Telegram/SourceFiles/window.h | 2 ++ 11 files changed, 41 insertions(+), 18 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 2915f02ac67e87..d196f324936300 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1410,7 +1410,7 @@ namespace App { QString uname(username.trimmed()); for (PeersData::const_iterator i = peersData.cbegin(), e = peersData.cend(); i != e; ++i) { if (!i.value()->userName().compare(uname, Qt::CaseInsensitive)) { - return i.value()->asUser(); + return i.value(); } } return 0; diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 1750f0250bae41..fda6a00a271f66 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -63,11 +63,26 @@ namespace App { } void removeDialog(History *history) { - if (MainWidget *m = main()) m->removeDialog(history); + if (MainWidget *m = main()) { + m->removeDialog(history); + } } void showSettings() { - if (Window *win = wnd()) win->showSettings(); + if (Window *w = wnd()) { + w->showSettings(); + } + } + + Q_DECLARE_METATYPE(TextLinkPtr); + Q_DECLARE_METATYPE(Qt::MouseButton); + + void activateTextLink(TextLinkPtr link, Qt::MouseButton button) { + if (Window *w = wnd()) { + qRegisterMetaType(); + qRegisterMetaType(); + QMetaObject::invokeMethod(w, "app_activateTextLink", Qt::QueuedConnection, Q_ARG(TextLinkPtr, link), Q_ARG(Qt::MouseButton, button)); + } } } diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 43da4a0268d1b4..074e0ab24b7dda 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -35,6 +35,8 @@ namespace App { void removeDialog(History *history); void showSettings(); + void activateTextLink(TextLinkPtr link, Qt::MouseButton button); + }; namespace Ui { diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index f116dce00cbc07..8fb99d7d52ffd4 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -81,7 +81,7 @@ void PopupMenu::init() { QAction *PopupMenu::addAction(const QString &text, const QObject *receiver, const char* member) { QAction *a = new QAction(text, this); - connect(a, SIGNAL(triggered(bool)), receiver, member); + connect(a, SIGNAL(triggered(bool)), receiver, member, Qt::QueuedConnection); return addAction(a); } diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index b27b6aac0e4dcd..6ad8a9bca85074 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -681,8 +681,9 @@ HistoryJoined *ChannelHistory::insertJoinedMessage(bool unread) { int32 addToH = 0, skip = 0; if (!blocks.isEmpty()) { // remove date block if (width) addToH = -blocks.front()->height; - delete blocks.front(); + HistoryBlock *dateblock = blocks.front(); blocks.pop_front(); + delete dateblock; } HistoryItem *till = blocks.isEmpty() ? 0 : blocks.front()->items.front(); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index e8b35396672191..a7e5a359582580 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -684,11 +684,12 @@ void HistoryInner::itemRemoved(HistoryItem *item) { dragActionCancel(); } + if (_dragSelFrom == item || _dragSelTo == item) { + _dragSelFrom = 0; + _dragSelTo = 0; + update(); + } onUpdateSelected(); - - if (_dragSelFrom == item) _dragSelFrom = 0; - if (_dragSelTo == item) _dragSelTo = 0; - updateDragSelection(_dragSelFrom, _dragSelTo, _dragSelecting, true); } void HistoryInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton button) { @@ -730,10 +731,9 @@ void HistoryInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton but _wasSelectedText = false; if (needClick) { - DEBUG_LOG(("Clicked link: %1 (%2) %3").arg(needClick->text()).arg(needClick->readable()).arg(needClick->encoded())); + DEBUG_LOG(("Will click link: %1 (%2) %3").arg(needClick->text()).arg(needClick->readable()).arg(needClick->encoded())); dragActionCancel(); - - needClick->onClick(button); // this possibly can delete this object + App::activateTextLink(needClick, button); return; } if (_dragAction == PrepareSelect && !_dragWasInactive && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection) { diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index e9c8502db6a384..5f42edecda518a 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -606,7 +606,7 @@ void MTPabstractTcpConnection::socketRead() { longBuffer.clear(); } else if (!readingToShort && packetRead < MTPShortBufferSize * sizeof(mtpPrime)) { memcpy(shortBuffer, currentPos - packetRead, packetRead); - currentPos = (char*)shortBuffer; + currentPos = (char*)shortBuffer + packetRead; readingToShort = true; longBuffer.clear(); } diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 90757d14e78bbe..3803850684f84f 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -199,15 +199,15 @@ void PeerData::fillNames() { names.clear(); chars.clear(); QString toIndex = textAccentFold(name); + if (cRussianLetters().match(toIndex).hasMatch()) { + toIndex += ' ' + translitRusEng(toIndex); + } if (isUser()) { if (!asUser()->nameOrPhone.isEmpty() && asUser()->nameOrPhone != name) toIndex += ' ' + textAccentFold(asUser()->nameOrPhone); if (!asUser()->username.isEmpty()) toIndex += ' ' + textAccentFold(asUser()->username); } else if (isChannel()) { if (!asChannel()->username.isEmpty()) toIndex += ' ' + textAccentFold(asChannel()->username); } - if (cRussianLetters().match(toIndex).hasMatch()) { - toIndex += ' ' + translitRusEng(toIndex); - } toIndex += ' ' + rusKeyboardLayoutSwitch(toIndex); QStringList namesList = toIndex.toLower().split(cWordSplit(), QString::SkipEmptyParts); diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 67adc1560c33ac..706cae9c472fb2 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -811,8 +811,7 @@ QString translitRusEng(const QString &rus) { result.reserve(rus.size() * 2); int32 toSkip = 0; - for (QString::const_iterator i = rus.cbegin(), e = rus.cend(); i != e;) { - i += toSkip; + for (QString::const_iterator i = rus.cbegin(), e = rus.cend(); i != e; i += toSkip) { result += translitLetterRusEng(*i, (i + 1 == e) ? ' ' : *(i + 1), toSkip); } return result; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 9c6b19c6496124..749c7a977444d7 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1651,6 +1651,10 @@ void Window::notifyUpdateAllPhotos() { if (_mediaView && !_mediaView->isHidden()) _mediaView->updateControls(); } +void Window::app_activateTextLink(TextLinkPtr link, Qt::MouseButton button) { + link->onClick(button); +} + void Window::notifyUpdateAll() { if (cCustomNotifies()) { for (NotifyWindows::const_iterator i = notifyWindows.cbegin(), e = notifyWindows.cend(); i != e; ++i) { diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index 63c1675d003779..af821859f0381b 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -281,6 +281,8 @@ public slots: void notifyUpdateAllPhotos(); + void app_activateTextLink(TextLinkPtr link, Qt::MouseButton button); + signals: void resized(const QSize &size); From d178b84baf3701edfc8f62ad1aca5fa028f8467a Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2016 16:06:27 +0300 Subject: [PATCH 073/133] langs updated --- Telegram/Resources/lang.strings | 2 +- Telegram/SourceFiles/langs/lang_de.strings | 4 +++- Telegram/SourceFiles/langs/lang_es.strings | 6 ++++-- Telegram/SourceFiles/langs/lang_it.strings | 6 ++++-- Telegram/SourceFiles/langs/lang_ko.strings | 4 +++- Telegram/SourceFiles/langs/lang_nl.strings | 4 +++- Telegram/SourceFiles/langs/lang_pt_BR.strings | 4 +++- 7 files changed, 21 insertions(+), 9 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 0ee26c103f8404..a03f486635521c 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -836,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}"; "lng_new_version_minor" = "— Bug fixes and other minor improvements"; -"lng_new_version_text" = "GIF revolution: 10x faster sending and downloading, autoplay, save your favorite GIFs to a dedicated tab on the sticker panel.\n\nMore about GIFs:\n{gifs_link}\n\nInline bots: A new way to add bot content to any chat. Type a bot's username and your query in the text field to get instant results and send them to your chat partner. Try typing “@gif dog” in your next chat. Sample bots: @gif, @wiki, @bing, @vid, @bold.\n\nMore about inline bots:\n{bots_link}\n\nAlso in this release: New cute design for media, automatic download settings for photos, voice messages and GIFs."; +"lng_new_version_text" = "— New waveform visualizations for voice messages\n— Sticker suggestions when you type an emoji"; "lng_menu_insert_unicode" = "Insert Unicode control character"; diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index 98f775bac2692a..364c5849a88bd1 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Du kannst nur Personen hinzufügen, wenn ihr eure Nummern ausgetauscht habt. {more_info}"; "lng_cant_invite_not_contact_channel" = "Du kannst nur Personen hinzufügen,wenn ihr\neure Nummern ausgetauscht habt. {more_info}\n"; "lng_cant_more_info" = "Weitere Infos »"; +"lng_cant_invite_privacy" = "Du kannst mit diesen Nutzern keine Gruppe erstellen, weil sie es nicht erlauben."; +"lng_cant_invite_privacy_channel" = "Du kannst diese Nutzer keinen Kanälen hinzufügen, weil sie es nicht erlauben."; "lng_send_button" = "Senden"; "lng_message_ph" = "Schreibe deine Nachricht.."; @@ -834,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}"; "lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen"; -"lng_new_version_text" = "GIF-Revolution: 10x schnelleres Senden und Herunterladen, Autoplay und Speichern von GIFs in einem eigenen Tab im Sticker-Panel.\n\nMehr Infos über GIFs:\n{gifs_link}\n\nInline-Bots: Ein neuer Weg um Bot-Inhalte dem Chat hinzuzufügen. Einfach den Bot-Benutzernamen gefolgt vom Suchbegriff im Eingabefeld eintippen um Echtzeitsuchergebnisse zu erhalten und im Chat zu senden. Probier doch mal “@gif dog” im nächsten Chat aus. Beispiel-Bots: @gif, @wiki, @bing, @vid, @bold.\n\nAusführliche Informationen zu den neuen Inline-Bots:\n{bot_link}\n\nAußerdem neu: Ein neues niedliches Design für Medien, automatische Download-Einstellungen für Bilder, Sprachnachrichten und GIFs.\n\nPS: Unseren deutschsprachigen Infokanal findest du hier: https://telegram.me/TelegramDE"; +"lng_new_version_text" = "— Neue Optik für Sprachnachrichten\n— Sticker werden nach Emoji-Eingabe vorgeschlagen"; "lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index fb3020bfafb556..2c0e037f935983 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -638,9 +638,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Por ahora, sólo puedes añadir contactos \nmutuos a grupos. {more_info}"; "lng_cant_invite_not_contact_channel" = "Lo sentimos, sólo puedes añadir contactos\nmutuos a canales. {more_info}"; "lng_cant_more_info" = "Más información »"; +"lng_cant_invite_privacy" = "No puedes añadir a este usuario a grupos por sus ajustes de privacidad."; +"lng_cant_invite_privacy_channel" = "No puedes añadir a este usuario a canales por sus ajustes de privacidad."; "lng_send_button" = "Enviar"; -"lng_message_ph" = "Escribir un mensaje..."; +"lng_message_ph" = "Escribe un mensaje..."; "lng_comment_ph" = "Escribe un comentario..."; "lng_broadcast_ph" = "Difunde un mensaje..."; "lng_record_cancel" = "Suelta fuera de aquí para cancelar"; @@ -834,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}"; "lng_new_version_minor" = "— Corrección de errores y otras mejoras menores"; -"lng_new_version_text" = "Revolución del GIF: envío y descarga 10 veces más rápido, reproducción automática, guarda tus GIF favoritos en una pestaña especial en el panel de stickers.\n\nMás sobre los GIF:\n{gifs_link}\n\nBots integrados: una nueva forma para añadir contenidos en los chats. Escribe el alias del bot y tu solicitud, en el campo de escritura, para obtener resultados inmediatamente y enviarlos a tu compañero de chat. Prueba escribiendo “@gif dog” en un chat. Algunos ejemplos: @gif, @wiki, @bing, @vid, @bold.\n\nMás sobre los bots integrados:\n{bots_link}\n\nTambién encontrarás un lindo nuevo diseño para la multimedia y ajustes de descarga automática para fotos, mensajes de voz y GIF."; +"lng_new_version_text" = "– Nueva visualización de ondas para los mensajes de voz\n– Sugerencias de stickers cuando escribes un emoji"; "lng_menu_insert_unicode" = "Insertar caracteres de control Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index 441b872c8acad6..c1d8564f623d32 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Spiacenti, ma al momento puoi aggiungere\nai gruppi solo contatti in comune. {more_info}"; "lng_cant_invite_not_contact_channel" = "Spiacenti, ma al momento puoi aggiungere\nai canali solo contatti in comune. {more_info}"; "lng_cant_more_info" = "Più info »"; +"lng_cant_invite_privacy" = "Spiacenti, non puoi aggiungere questo utente al gruppo a causa delle sue impostazioni di privacy."; +"lng_cant_invite_privacy_channel" = "Spiacenti, non puoi aggiungere questo utente al canale a causa delle sue impostazioni di privacy."; "lng_send_button" = "Invia"; "lng_message_ph" = "Scrivi un messaggio.."; @@ -833,8 +835,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_authorization" = "{name},\nAbbiamo rilevato un accesso al tuo account da un nuovo dispositivo il {day}, {date} alle {time}\n\nDispositivo: {device}\nPosizione: {location}\n\nSe non sei tu, puoi andare su Impostazioni – Mostra tutte le sessioni e terminare quella sessione.\n\nSe credi che qualcuno si sia collegato al tuo account contro il tuo volere, puoi attivare la verifica in due passaggi nelle Impostazioni. \n\nGrazie, \nIl Team di Telegram"; "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; -"lng_new_version_minor" = "— Bug fix e altri miglioramenti minori"; -"lng_new_version_text" = "Rivoluzione GIF: L'invio e il download delle GIF sono ora 10 volte più veloci, riproduci automaticamente le GIF e salva le tue GIF preferite in una pagina dedicata nel pannello sticker.\n\nPiù info sulle GIF:\n{gifs_link}\n\nInline Bot: Un nuovo modo di aggiungere contenuto dai bot in qualsiasi chat. Scrivi l'username di un bot e la tua domanda nel campo di scrittura per ricevere risultati immediati e inviarli nella chat. Prova a scrivere “@gif dog” nella tua prossima chat. Bot di esempio: @gif, @wiki, @bing, @vid, @bold.\n\nPiù info sugli Inline Bot:\n{bots_link}\n\nInoltre in questa versione: Nuovo design per i media, impostazioni di download automatico per foto, note vocali e GIF."; +"lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori"; +"lng_new_version_text" = "— Nuova visualizzazione delle onde sonore per i messaggi vocali\n— Suggerimento per gli sticker quando digiti un'emoji"; "lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index 17bfe72f9d0506..1d401e7e302038 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "죄송하지만, 현재 서로 연락처가 추가된\n회원들끼리만 추가 가능합니다. {more_info}"; "lng_cant_invite_not_contact_channel" = "죄송하지만, 현재 서로 연락처가 추가된\n회원들끼리만 추가 가능합니다. {more_info}"; "lng_cant_more_info" = "자세한 정보 »"; +"lng_cant_invite_privacy" = "죄송합니다, 개인설정으로 인하여 이 사용자를 그룹에 초대할 수 없습니다."; +"lng_cant_invite_privacy_channel" = "죄송합니다, 개인설정으로 인하여 이 사용자를 채널에 초대할 수 없습니다."; "lng_send_button" = "보내기"; "lng_message_ph" = "메시지 쓰기"; @@ -834,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}"; "lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상"; -"lng_new_version_text" = "GIF 혁명: 10배 빠른 전송, 다운로드 및 자동재생이 가능하며, 스티커 패널에서 즐겨찾는 GIF를 저장가능\n\nGIF에 대한 자세한 정보:\n{gifs_link}\n\n@-봇 : 모든 대화에 봇 기능을 추가 할 수 있습니다. 봇 아이디를 입력란에 같이 입력해주시면 즉시 결과값을 확인 할 수 있습니다.“@gif dog”와 같은 명령어를 입력란에 같이 입력해보세요. 예시:@gif, @wiki, @bing, @vid, @bold.\n\n@-봇에 대한 자세한 정보\n{bots_link}\n\n업데이트 추가사항: 미디어, 사진, 음성메시지 및 GIF 파일 자동다운로드 설정화면 새로운 디자인 적용"; +"lng_new_version_text" = "— 음성 메시지에 웨이브 시각 효과 추가\n— 이모티콘 입력시 스티커 추천"; "lng_menu_insert_unicode" = "유니코드 문자를 입력하세요."; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index 4a6b48ee17c4ff..6f6d5dca079b92 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Op dit moment kun je alleen onderlinge\ncontacten aan groepen toevoegen. {more_info}"; "lng_cant_invite_not_contact_channel" = "Je kunt momenteel alleen onderlinge\ncontacten aan kanalen toevoegen.\n{more_info}"; "lng_cant_more_info" = "Meer informatie »"; +"lng_cant_invite_privacy" = "Je kunt deze gebruiker niet toevoegen aan groepen door zijn/haar privacyinstellingen."; +"lng_cant_invite_privacy_channel" = "Je kunt deze gebruiker niet toevoegen aan kanalen door zijn/haar privacyinstellingen."; "lng_send_button" = "Stuur"; "lng_message_ph" = "Bericht schrijven"; @@ -834,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}"; "lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen"; -"lng_new_version_text" = "GIF-revolutie: 10 keer zo snel GIF's sturen en downloaden. Speel ze automatisch af en sla je favorieten op in het stickerpaneel.\n\nMeer over GIFs:\n{gifs_link}\n\nInline-bots: Voeg botcontent toe aan chats op een nieuwe manier! Geef in het invoerveld de naam van een bot en je commando in en stuur de resultaten naar je chatpartner. Probeer het eens met “@gif dog”. Voorbeelden: @gif, @wiki, @bing, @vid, @bold.\n\nMeer over inline-bots:\n{bots_link}\n\nIn deze release hebben we nog meer voor je. Een nieuw design voor media en automatische download-instellingen voor foto's, spraakberichten en GIF's."; +"lng_new_version_text" = "— Nieuwe visualisatie voor spraakberichten\n— Stickersuggesties als een emoji typt"; "lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index e4a7a676cd6931..bc77b4a3152690 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -638,6 +638,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_cant_invite_not_contact" = "Você só pode adicionar contatos\nmútuos ao grupo no momento. {more_info}"; "lng_cant_invite_not_contact_channel" = "Desculpe, você só pode adicionar contatos\nmútuos para canais no momento. {more_info}"; "lng_cant_more_info" = "Informações »"; +"lng_cant_invite_privacy" = "Você não pode adicionar esse usuário em grupos devido as configurações de privacidade."; +"lng_cant_invite_privacy_channel" = "Você não pode adicionar esse usuário em canais devido as configurações de privacidade."; "lng_send_button" = "Enviar"; "lng_message_ph" = "Escrever a mensagem.."; @@ -834,7 +836,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop foi atualizado para a versão {version}\n\n{changes}\n\nHistórico completo de mudanças disponível aqui:\n{link}"; "lng_new_version_minor" = "— Resolução de bugs e outras melhorias menores"; -"lng_new_version_text" = "Revolução dos GIFs: download e envio 10x mais rápido, reprodução automática, salve seus GIFs favoritos em um guia dedicada no painel de stickers.\n\nMais sobre GIFs:\n{gifs_link}\n\nBots integrados: Uma nova maneira de adicionar conteúdo de um bot a qualquer conversa. Digite o nome de usuário do bot seguido do comando no campo de texto para obter resultados imediatos e enviá-los na conversa. Experimente digitar “@gif dog” na sua próxima conversa. Bots de exemplo: @gif, @wiki, @bing, @vid, @bold.\n\nMais sobre bots integrados:\n{bots_link}\n\nTambém nessa versão: Novo design para mídias, configuração de download automático para fotos, mensagens de voz e GIFs."; +"lng_new_version_text" = "— Nova visualização em ondas para mensagens de voz\n— Sugestões de sticker quando você inicia com emoji"; "lng_menu_insert_unicode" = "Inserir caractere de controle Unicode"; From 80455492b02fff2c7965fa93bb3f444a9b924bf6 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2016 16:14:19 +0300 Subject: [PATCH 074/133] a couple of crashes fixed, version 0.9.24 stable --- Telegram/SourceFiles/application.cpp | 13 +++++-------- Telegram/SourceFiles/config.h | 6 +++--- Telegram/SourceFiles/dialogswidget.cpp | 8 ++++++-- Telegram/SourceFiles/overviewwidget.cpp | 18 ++++++++++++------ Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 8 ++++---- 8 files changed, 41 insertions(+), 34 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index dc3fc7505d2d01..f9c77dfc0f1ac5 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1051,14 +1051,11 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9022) { - if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); - } else { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); - } - } else if (Local::oldMapVersion() < 9016) { - versionFeatures = lng_new_version_text(lt_gifs_link, qsl("https://telegram.org/blog/gif-revolution"), lt_bots_link, qsl("https://telegram.org/blog/inline-bots")).trimmed(); + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9024) { +// versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); + versionFeatures = lang(lng_new_version_minor).trimmed(); + } else if (Local::oldMapVersion() < 9024) { + versionFeatures = lang(lng_new_version_text).trimmed(); } else { versionFeatures = lang(lng_new_version_minor).trimmed(); } diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 363e19b564ceec..e8981faaeee9fc 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,9 +20,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9023; -static const wchar_t *AppVersionStr = L"0.9.23"; -static const bool DevVersion = true; +static const int32 AppVersion = 9024; +static const wchar_t *AppVersionStr = L"0.9.24"; +static const bool DevVersion = false; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index f968d3d57179f9..889580af448950 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -963,7 +963,9 @@ void DialogsInner::dialogsReceived(const QVector &added) { case mtpc_dialog: { const MTPDdialog &d(i->c_dialog()); history = App::historyFromDialog(peerFromMTP(d.vpeer), d.vunread_count.v, d.vread_inbox_max_id.v); - App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history); + if (App::main()) { + App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history); + } } break; case mtpc_dialogChannel: { @@ -986,7 +988,9 @@ void DialogsInner::dialogsReceived(const QVector &added) { if (!history->isMegagroup() && d.vtop_message.v > d.vtop_important_message.v) { history->setNotLoadedAtBottom(); } - App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history); + if (App::main()) { + App::main()->applyNotifySetting(MTP_notifyPeer(d.vpeer), d.vnotify_settings, history); + } } break; } diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index 919f770a2e18e3..f00799cf63d41d 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1821,19 +1821,25 @@ void OverviewInner::itemRemoved(HistoryItem *item) { _overview->updateTopBarSelection(); } - onUpdateSelected(); + LayoutItems::iterator j = _layoutItems.find(item); + if (j != _layoutItems.cend()) { + int32 index = _items.indexOf(j.value()); + if (index >= 0) { + _items.remove(index); + } + delete j.value(); + _layoutItems.erase(j); + } - if (_dragSelFrom == msgId) { + if (_dragSelFrom == msgId || _dragSelTo == msgId) { _dragSelFrom = 0; _dragSelFromIndex = -1; - } - if (_dragSelTo == msgId) { _dragSelTo = 0; _dragSelToIndex = -1; + update(); } - updateDragSelection(_dragSelFrom, _dragSelFromIndex, _dragSelTo, _dragSelToIndex, _dragSelecting); - update(); + onUpdateSelected(); } void OverviewInner::repaintItem(const HistoryItem *msg) { diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 468ce68fd65e9f..48739e2a3e9a24 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.23 + 0.9.24 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 036e34bc70b3da..a73c381b165a26 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,23,0 - PRODUCTVERSION 0,9,23,0 + FILEVERSION 0,9,24,0 + PRODUCTVERSION 0,9,24,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.23.0" + VALUE "FileVersion", "0.9.24.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.23.0" + VALUE "ProductVersion", "0.9.24.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 3f464ec555705e..90ee768992e33b 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.23; + CURRENT_PROJECT_VERSION = 0.9.24; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.23; + CURRENT_PROJECT_VERSION = 0.9.24; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.23; + CURRENT_PROJECT_VERSION = 0.9.24; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.23; + DYLIB_CURRENT_VERSION = 0.9.24; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.23; + CURRENT_PROJECT_VERSION = 0.9.24; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.23; + DYLIB_CURRENT_VERSION = 0.9.24; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index 98e88320e90178..5108f1ff6f0085 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9023 +AppVersion 9024 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.23 -AppVersionStr 0.9.23 -DevChannel 1 +AppVersionStrSmall 0.9.24 +AppVersionStr 0.9.24 +DevChannel 0 BetaVersion 0 9019002 From 6a299e32d31001aad32f90ec9b1e76ef8868b898 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 16 Feb 2016 16:33:33 +0300 Subject: [PATCH 075/133] fixed metatypes declaration for 0.9.24 version --- Telegram/SourceFiles/facades.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 6f74d9021f186a..e6b3c22f0ae5ff 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -26,6 +26,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "layerwidget.h" #include "lang.h" +Q_DECLARE_METATYPE(TextLinkPtr); +Q_DECLARE_METATYPE(Qt::MouseButton); + namespace App { void sendBotCommand(const QString &cmd, MsgId replyTo) { @@ -74,9 +77,6 @@ namespace App { } } - Q_DECLARE_METATYPE(TextLinkPtr); - Q_DECLARE_METATYPE(Qt::MouseButton); - void activateTextLink(TextLinkPtr link, Qt::MouseButton button) { if (Window *w = wnd()) { qRegisterMetaType(); From 7433cea0fdc8970cad8348aa566fdd0962abdd9b Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 17 Feb 2016 19:37:21 +0300 Subject: [PATCH 076/133] fixed copy selected text, post author display added, post links handling added, windows bingmaps opening added, sticker previews from mentionsdropdown and stickersetbox added --- Telegram/Resources/style.txt | 1 + Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/app.h | 2 +- Telegram/SourceFiles/application.cpp | 4 +- Telegram/SourceFiles/boxes/stickersetbox.cpp | 58 +++- Telegram/SourceFiles/boxes/stickersetbox.h | 15 +- Telegram/SourceFiles/dropdown.cpp | 54 +++- Telegram/SourceFiles/dropdown.h | 10 +- Telegram/SourceFiles/facades.cpp | 12 +- Telegram/SourceFiles/facades.h | 2 +- Telegram/SourceFiles/gui/text.cpp | 24 +- Telegram/SourceFiles/gui/text.h | 32 +- Telegram/SourceFiles/history.cpp | 316 +++++++++++-------- Telegram/SourceFiles/history.h | 103 +++--- Telegram/SourceFiles/historywidget.cpp | 93 +++--- Telegram/SourceFiles/mainwidget.cpp | 109 ++++--- Telegram/SourceFiles/mainwidget.h | 10 +- Telegram/SourceFiles/mediaview.cpp | 6 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 2 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 193 +++++++---- Telegram/SourceFiles/mtproto/mtpScheme.h | 236 ++++++++++++-- Telegram/SourceFiles/mtproto/scheme.tl | 22 +- Telegram/SourceFiles/overviewwidget.cpp | 9 +- Telegram/SourceFiles/profilewidget.cpp | 18 +- Telegram/SourceFiles/pspecific_linux.cpp | 4 + Telegram/SourceFiles/pspecific_linux.h | 2 + Telegram/SourceFiles/pspecific_mac.cpp | 4 + Telegram/SourceFiles/pspecific_mac.h | 2 + Telegram/SourceFiles/pspecific_wnd.cpp | 4 + Telegram/SourceFiles/pspecific_wnd.h | 2 + Telegram/SourceFiles/structs.cpp | 22 +- Telegram/SourceFiles/structs.h | 6 +- Telegram/SourceFiles/window.cpp | 50 ++- Telegram/SourceFiles/window.h | 5 + 34 files changed, 1009 insertions(+), 425 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 5999c47f4f151b..d06880d6171fb3 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -2074,6 +2074,7 @@ minPhotoSize: 100px; maxMediaSize: 420px; maxStickerSize: 256px; maxGifSize: 320px; +maxSignatureSize: 144px; mvBgColor: #222; mvBgOpacity: 0.92; diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index d196f324936300..22cad42f6e15fc 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1654,7 +1654,7 @@ namespace App { return i.value(); } - ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type, const QString &url) { + ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type) { ImageLinksData::const_iterator i = imageLinksData.constFind(imageLink); ImageLinkData *result; if (i == imageLinksData.cend()) { diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index 760ea778052ff8..2f4144e85fc569 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -134,7 +134,7 @@ namespace App { WebPageData *webPage(const WebPageId &webPage); WebPageData *webPageSet(const WebPageId &webPage, WebPageData *convert, const QString &, const QString &url, const QString &displayUrl, const QString &siteName, const QString &title, const QString &description, PhotoData *photo, DocumentData *doc, int32 duration, const QString &author, int32 pendingTill); ImageLinkData *imageLink(const QString &imageLink); - ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type, const QString &url); + ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type); void forgetMedia(); MTPPhoto photoFromUserPhoto(MTPint userId, MTPint date, const MTPUserProfilePhoto &photo); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f9c77dfc0f1ac5..b414fdb3997aff 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -925,7 +925,9 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); - _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + if (_window) { + _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + } if (state != Qt::ApplicationActive) { PopupTooltip::Hide(); } diff --git a/Telegram/SourceFiles/boxes/stickersetbox.cpp b/Telegram/SourceFiles/boxes/stickersetbox.cpp index 8b756c4ee4d2c3..65fdd9b32a37ea 100644 --- a/Telegram/SourceFiles/boxes/stickersetbox.cpp +++ b/Telegram/SourceFiles/boxes/stickersetbox.cpp @@ -29,9 +29,17 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "localstorage.h" -StickerSetInner::StickerSetInner(const MTPInputStickerSet &set) : -_loaded(false), _setId(0), _setAccess(0), _setCount(0), _setHash(0), _setFlags(0), _bottom(0), -_input(set), _installRequest(0) { +StickerSetInner::StickerSetInner(const MTPInputStickerSet &set) : TWidget() +, _loaded(false) +, _setId(0) +, _setAccess(0) +, _setCount(0) +, _setHash(0) +, _setFlags(0) +, _bottom(0) +, _input(set) +, _installRequest(0) +, _previewShown(-1) { connect(App::wnd(), SIGNAL(imageLoaded()), this, SLOT(update())); switch (set.type()) { case mtpc_inputStickerSetID: _setId = set.c_inputStickerSetID().vid.v; _setAccess = set.c_inputStickerSetID().vaccess_hash.v; break; @@ -39,6 +47,9 @@ _input(set), _installRequest(0) { } MTP::send(MTPmessages_GetStickerSet(_input), rpcDone(&StickerSetInner::gotSet), rpcFail(&StickerSetInner::failedSet)); App::main()->updateStickers(); + + _previewTimer.setSingleShot(true); + connect(&_previewTimer, SIGNAL(timeout()), this, SLOT(onPreview())); } void StickerSetInner::gotSet(const MTPmessages_StickerSet &set) { @@ -148,6 +159,47 @@ bool StickerSetInner::installFailed(const RPCError &error) { return true; } +void StickerSetInner::mousePressEvent(QMouseEvent *e) { + int32 index = stickerFromGlobalPos(e->globalPos()); + if (index >= 0 && index < _pack.size()) { + _previewTimer.start(QApplication::startDragTime()); + } +} + +void StickerSetInner::mouseMoveEvent(QMouseEvent *e) { + if (_previewShown >= 0) { + int32 index = stickerFromGlobalPos(e->globalPos()); + if (index >= 0 && index < _pack.size() && index != _previewShown) { + _previewShown = index; + Ui::showStickerPreview(_pack.at(_previewShown)); + } + } +} + +void StickerSetInner::mouseReleaseEvent(QMouseEvent *e) { + _previewTimer.stop(); +} + +void StickerSetInner::onPreview() { + int32 index = stickerFromGlobalPos(QCursor::pos()); + if (index >= 0 && index < _pack.size()) { + _previewShown = index; + Ui::showStickerPreview(_pack.at(_previewShown)); + } +} + +int32 StickerSetInner::stickerFromGlobalPos(const QPoint &p) const { + QPoint l(mapFromGlobal(p)); + if (rtl()) l.setX(width() - l.x()); + int32 row = (l.y() >= st::stickersPadding.top()) ? qFloor((l.y() - st::stickersPadding.top()) / st::stickersSize.height()) : -1; + int32 col = (l.x() >= st::stickersPadding.left()) ? qFloor((l.x() - st::stickersPadding.left()) / st::stickersSize.width()) : -1; + if (row >= 0 && col >= 0 && col < StickerPanPerRow) { + int32 result = row * StickerPanPerRow + col; + return (result < _pack.size()) ? result : -1; + } + return -1; +} + void StickerSetInner::paintEvent(QPaintEvent *e) { QRect r(e->rect()); Painter p(this); diff --git a/Telegram/SourceFiles/boxes/stickersetbox.h b/Telegram/SourceFiles/boxes/stickersetbox.h index d2fd4749ee493c..356fd4b60f75e3 100644 --- a/Telegram/SourceFiles/boxes/stickersetbox.h +++ b/Telegram/SourceFiles/boxes/stickersetbox.h @@ -29,7 +29,9 @@ class StickerSetInner : public TWidget, public RPCSender { StickerSetInner(const MTPInputStickerSet &set); - void init(); + void mousePressEvent(QMouseEvent *e); + void mouseMoveEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); void paintEvent(QPaintEvent *e); @@ -42,10 +44,12 @@ class StickerSetInner : public TWidget, public RPCSender { void setScrollBottom(int32 bottom); void install(); - QString getTitle() const; - ~StickerSetInner(); +public slots: + + void onPreview(); + signals: void updateButtons(); @@ -53,6 +57,8 @@ class StickerSetInner : public TWidget, public RPCSender { private: + int32 stickerFromGlobalPos(const QPoint &p) const; + void gotSet(const MTPmessages_StickerSet &set); bool failedSet(const RPCError &error); @@ -70,6 +76,9 @@ class StickerSetInner : public TWidget, public RPCSender { MTPInputStickerSet _input; mtpRequestId _installRequest; + + QTimer _previewTimer; + int32 _previewShown; }; class StickerSetBox : public ScrollableBox, public RPCSender { diff --git a/Telegram/SourceFiles/dropdown.cpp b/Telegram/SourceFiles/dropdown.cpp index 737e70d0b60071..0241da6b795248 100644 --- a/Telegram/SourceFiles/dropdown.cpp +++ b/Telegram/SourceFiles/dropdown.cpp @@ -3852,8 +3852,12 @@ MentionsInner::MentionsInner(MentionsDropdown *parent, MentionRows *mrows, Hasht , _stickersPerRow(1) , _recentInlineBotsInRows(0) , _sel(-1) +, _down(-1) , _mouseSel(false) -, _overDelete(false) { +, _overDelete(false) +, _previewShown(false) { + _previewTimer.setSingleShot(true); + connect(&_previewTimer, SIGNAL(timeout()), this, SLOT(onPreview())); } void MentionsInner::paintEvent(QPaintEvent *e) { @@ -4030,9 +4034,13 @@ void MentionsInner::mouseMoveEvent(QMouseEvent *e) { onUpdateSelected(true); } -void MentionsInner::clearSel() { +void MentionsInner::clearSel(bool hidden) { _mouseSel = _overDelete = false; setSel((_mrows->isEmpty() && _brows->isEmpty() && _hrows->isEmpty()) ? -1 : 0); + if (hidden) { + _down = -1; + _previewShown = false; + } } bool MentionsInner::moveSel(int key) { @@ -4140,12 +4148,35 @@ void MentionsInner::mousePressEvent(QMouseEvent *e) { _mouseSel = true; onUpdateSelected(true); - } else { + } else if (_srows->isEmpty()) { select(); + } else { + _down = _sel; + _previewTimer.start(QApplication::startDragTime()); } } } +void MentionsInner::mouseReleaseEvent(QMouseEvent *e) { + _previewTimer.stop(); + + int32 pressed = _down; + _down = -1; + + _mousePos = mapToGlobal(e->pos()); + _mouseSel = true; + onUpdateSelected(true); + + if (_previewShown) { + _previewShown = false; + return; + } + + if (_sel < 0 || _sel != pressed || _srows->isEmpty()) return; + + select(); +} + void MentionsInner::enterEvent(QEvent *e) { setMouseTracking(true); _mousePos = QCursor::pos(); @@ -4189,6 +4220,8 @@ void MentionsInner::onUpdateSelected(bool force) { QPoint mouse(mapFromGlobal(_mousePos)); if ((!force && !rect().contains(mouse)) || !_mouseSel) return; + if (_down >= 0 && !_previewShown) return; + int32 sel = -1, maxSel = 0; if (!_srows->isEmpty()) { int32 rows = rowscount(_srows->size(), _stickersPerRow); @@ -4209,6 +4242,12 @@ void MentionsInner::onUpdateSelected(bool force) { } if (sel != _sel) { setSel(sel); + if (_down >= 0 && _sel >= 0 && _down != _sel) { + _down = _sel; + if (_down >= 0 && _down < _srows->size()) { + Ui::showStickerPreview(_srows->at(_down)); + } + } } } @@ -4220,6 +4259,13 @@ void MentionsInner::onParentGeometryChanged() { } } +void MentionsInner::onPreview() { + if (_down >= 0 && _down < _srows->size()) { + Ui::showStickerPreview(_srows->at(_down)); + _previewShown = true; + } +} + MentionsDropdown::MentionsDropdown(QWidget *parent) : TWidget(parent) , _scroll(this, st::mentionScroll) , _inner(this, &_mrows, &_hrows, &_brows, &_srows) @@ -4569,7 +4615,7 @@ void MentionsDropdown::hideFinish() { hide(); _hiding = false; _filter = qsl("-"); - _inner.clearSel(); + _inner.clearSel(true); } void MentionsDropdown::showStart() { diff --git a/Telegram/SourceFiles/dropdown.h b/Telegram/SourceFiles/dropdown.h index 5ff587a236fdd0..bacf6149c13075 100644 --- a/Telegram/SourceFiles/dropdown.h +++ b/Telegram/SourceFiles/dropdown.h @@ -744,8 +744,9 @@ class MentionsInner : public TWidget { void mousePressEvent(QMouseEvent *e); void mouseMoveEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); - void clearSel(); + void clearSel(bool hidden = false); bool moveSel(int key); bool select(); @@ -763,6 +764,7 @@ public slots: void onParentGeometryChanged(); void onUpdateSelected(bool force = false); + void onPreview(); private: @@ -775,11 +777,15 @@ public slots: BotCommandRows *_brows; StickerPack *_srows; int32 _stickersPerRow, _recentInlineBotsInRows; - int32 _sel; + int32 _sel, _down; bool _mouseSel; QPoint _mousePos; bool _overDelete; + + bool _previewShown; + + QTimer _previewTimer; }; class MentionsDropdown : public TWidget { diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index e6b3c22f0ae5ff..d65081f517beed 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -44,8 +44,8 @@ namespace App { if (MainWidget *m = main()) m->searchMessages(tag + ' ', (inPeer && inPeer->isChannel()) ? inPeer : 0); } - void openPeerByName(const QString &username, bool toProfile, const QString &startToken) { - if (MainWidget *m = main()) m->openPeerByName(username, toProfile, startToken); + void openPeerByName(const QString &username, MsgId msgId, const QString &startToken) { + if (MainWidget *m = main()) m->openPeerByName(username, msgId, startToken); } void joinGroupByHash(const QString &hash) { @@ -90,11 +90,15 @@ namespace App { namespace Ui { void showStickerPreview(DocumentData *sticker) { - if (MainWidget *m = App::main()) m->ui_showStickerPreview(sticker); + if (Window *w = App::wnd()) { + w->ui_showStickerPreview(sticker); + } } void hideStickerPreview() { - if (MainWidget *m = App::main()) m->ui_hideStickerPreview(); + if (Window *w = App::wnd()) { + w->ui_hideStickerPreview(); + } } void showLayer(LayeredWidget *box, ShowLayerOptions options) { diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 328773f2de4119..e89c2da1806e67 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -27,7 +27,7 @@ namespace App { void sendBotCommand(const QString &cmd, MsgId replyTo = 0); bool insertBotCommand(const QString &cmd, bool specialGif = false); void searchByHashtag(const QString &tag, PeerData *inPeer); - void openPeerByName(const QString &username, bool toProfile = false, const QString &startToken = QString()); + void openPeerByName(const QString &username, MsgId msgId = ShowAtUnreadMsgId, const QString &startToken = QString()); void joinGroupByHash(const QString &hash); void stickersBox(const QString &name); void openLocalUrl(const QString &url); diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 00f31d3041ad5a..6e7a772c8b066c 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -914,19 +914,22 @@ void TextLink::onClick(Qt::MouseButton button) const { PopupTooltip::Hide(); QString url = TextLink::encoded(); - QRegularExpressionMatch telegramMeUser = QRegularExpression(qsl("^https?://telegram\\.me/([a-zA-Z0-9\\.\\_]+)/?(\\?|$)"), QRegularExpression::CaseInsensitiveOption).match(url); + QRegularExpressionMatch telegramMeUser = QRegularExpression(qsl("^https?://telegram\\.me/([a-zA-Z0-9\\.\\_]+)(/?\\?|/?$|/(\\d+)/?(?:\\?|$))"), QRegularExpression::CaseInsensitiveOption).match(url); QRegularExpressionMatch telegramMeGroup = QRegularExpression(qsl("^https?://telegram\\.me/joinchat/([a-zA-Z0-9\\.\\_\\-]+)(\\?|$)"), QRegularExpression::CaseInsensitiveOption).match(url); QRegularExpressionMatch telegramMeStickers = QRegularExpression(qsl("^https?://telegram\\.me/addstickers/([a-zA-Z0-9\\.\\_]+)(\\?|$)"), QRegularExpression::CaseInsensitiveOption).match(url); QRegularExpressionMatch telegramMeShareUrl = QRegularExpression(qsl("^https?://telegram\\.me/share/url\\?(.+)$"), QRegularExpression::CaseInsensitiveOption).match(url); - if (telegramMeUser.hasMatch()) { - QString params = url.mid(telegramMeUser.captured(0).size()); - url = qsl("tg://resolve/?domain=") + myUrlEncode(telegramMeUser.captured(1)) + (params.isEmpty() ? QString() : '&' + params); - } else if (telegramMeGroup.hasMatch()) { + if (telegramMeGroup.hasMatch()) { url = qsl("tg://join?invite=") + myUrlEncode(telegramMeGroup.captured(1)); } else if (telegramMeStickers.hasMatch()) { url = qsl("tg://addstickers?set=") + myUrlEncode(telegramMeStickers.captured(1)); } else if (telegramMeShareUrl.hasMatch()) { url = qsl("tg://msg_url?") + telegramMeShareUrl.captured(1); + } else if (telegramMeUser.hasMatch()) { + QString params = url.mid(telegramMeUser.captured(0).size()), postParam; + if (QRegularExpression(qsl("^/\\d+/?(?:\\?|$)")).match(telegramMeUser.captured(2)).hasMatch()) { + postParam = qsl("&post=") + telegramMeUser.captured(3); + } + url = qsl("tg://resolve/?domain=") + myUrlEncode(telegramMeUser.captured(1)) + postParam + (params.isEmpty() ? QString() : '&' + params); } if (QRegularExpression(qsl("^tg://[a-zA-Z0-9]+"), QRegularExpression::CaseInsensitiveOption).match(url).hasMatch()) { @@ -951,6 +954,17 @@ void CustomTextLink::onClick(Qt::MouseButton button) const { Ui::showLayer(new ConfirmLinkBox(text())); } +void LocationLink::onClick(Qt::MouseButton button) const { + if (!psLaunchMaps(_lat, _lon)) { + QDesktopServices::openUrl(_text); + } +} + +void LocationLink::setup() { + QString latlon = _lat + ',' + _lon; + _text = qsl("https://maps.google.com/maps?q=") + latlon + qsl("&ll=") + latlon + qsl("&z=16"); +} + void MentionLink::onClick(Qt::MouseButton button) const { if (button == Qt::LeftButton || button == Qt::MiddleButton) { App::openPeerByName(_tag.mid(1), true); diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index 1312bc759ffc29..341ebb9034b686 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -374,7 +374,7 @@ class TextLink : public ITextLink { QUrl u(_url), good(u.isValid() ? u.toEncoded() : QString()); QString result(good.isValid() ? QString::fromUtf8(good.toEncoded()) : _url); - if (!QRegularExpression(qsl("^[a-zA-Z]+://")).match(result).hasMatch()) { // no protocol + if (!QRegularExpression(qsl("^[a-zA-Z]+:")).match(result).hasMatch()) { // no protocol return qsl("http://") + result; } return result; @@ -423,6 +423,36 @@ class EmailLink : public ITextLink { }; +class LocationLink : public ITextLink { + TEXT_LINK_CLASS(LocationLink) + +public: + + LocationLink(const QString &lat, const QString &lon) : _lat(lat), _lon(lon) { + setup(); + } + + const QString &text() const { + return _text; + } + + void onClick(Qt::MouseButton button) const; + + const QString &readable() const { + return _text; + } + + QString encoded() const { + return _text; + } + +private: + + void setup(); + QString _lat, _lon, _text; + +}; + class MentionLink : public ITextLink { TEXT_LINK_CLASS(MentionLink) diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index e64facc5b46f69..eeda88bf71eddf 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -88,10 +88,10 @@ namespace { return item ? item->toHistoryForwarded() : 0; } inline const TextParseOptions &itemTextOptions(HistoryItem *item) { - return itemTextOptions(item->history(), item->from()); + return itemTextOptions(item->history(), item->author()); } inline const TextParseOptions &itemTextNoMonoOptions(const HistoryItem *item) { - return itemTextNoMonoOptions(item->history(), item->from()); + return itemTextNoMonoOptions(item->history(), item->author()); } } @@ -1385,7 +1385,7 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo QString text(lng_message_unsupported(lt_link, qsl("https://desktop.telegram.org"))); EntitiesInText entities = textParseEntities(text, _historyTextNoMonoOptions.flags); entities.push_front(EntityInText(EntityInTextItalic, 0, text.size())); - result = new HistoryMessage(this, block, m.vid.v, m.vflags.v, m.vvia_bot_id.v, date(m.vdate), m.vfrom_id.v, text, entities, 0); + result = new HistoryMessage(this, block, m.vid.v, m.vflags.v, m.vvia_bot_id.v, date(m.vdate), m.vfrom_id.v, text, entities, -1, 0); } else if (badMedia) { result = new HistoryServiceMsg(this, block, m.vid.v, date(m.vdate), lang(lng_message_empty), m.vflags.v, 0, m.has_from_id() ? m.vfrom_id.v : 0); } else { @@ -1532,8 +1532,8 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo return regItem(result); } -HistoryItem *History::createItemForwarded(HistoryBlock *block, MsgId id, QDateTime date, int32 from, HistoryMessage *msg) { - return regItem(new HistoryForwarded(this, block, id, date, from, msg)); +HistoryItem *History::createItemForwarded(HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg) { + return regItem(new HistoryForwarded(this, block, id, flags, date, from, msg)); } HistoryItem *History::createItemDocument(HistoryBlock *block, MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, DocumentData *doc, const QString &caption) { @@ -1609,7 +1609,7 @@ HistoryItem *History::addToHistory(const MTPMessage &msg) { return createItem(0, msg, false); } -HistoryItem *History::addNewForwarded(MsgId id, QDateTime date, int32 from, HistoryMessage *item) { +HistoryItem *History::addNewForwarded(MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *item) { HistoryBlock *to = 0; bool newBlock = blocks.isEmpty(); if (newBlock) { @@ -1617,7 +1617,7 @@ HistoryItem *History::addNewForwarded(MsgId id, QDateTime date, int32 from, Hist } else { to = blocks.back(); } - return addNewItem(to, newBlock, createItemForwarded(to, id, date, from, item), true); + return addNewItem(to, newBlock, createItemForwarded(to, id, flags, date, from, item), true); } HistoryItem *History::addNewDocument(MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, DocumentData *doc, const QString &caption) { @@ -1823,7 +1823,9 @@ void History::unregTyping(UserData *from) { void History::newItemAdded(HistoryItem *item) { App::checkImageCacheSize(); if (item->from() && item->from()->isUser()) { - unregTyping(item->from()->asUser()); + if (item->from() == item->author()) { + unregTyping(item->from()->asUser()); + } item->from()->asUser()->madeAction(); } if (item->out()) { @@ -2001,28 +2003,30 @@ void History::addOlderSlice(const QVector &slice, const QVectorauthor()->id) { if (markupSenders) { // chats with bots if (!lastKeyboardInited && item->hasReplyMarkup() && !item->out()) { int32 markupFlags = App::replyMarkup(channelId(), item->id).flags; if (!(markupFlags & MTPDreplyKeyboardMarkup::flag_selective) || item->mentionsMe()) { - bool wasKeyboardHide = markupSenders->contains(item->from()); + bool wasKeyboardHide = markupSenders->contains(item->author()); if (!wasKeyboardHide) { - markupSenders->insert(item->from(), true); + markupSenders->insert(item->author(), true); } if (!(markupFlags & MTPDreplyKeyboardMarkup_flag_ZERO)) { if (!lastKeyboardInited) { bool botNotInChat = false; if (peer->isChat()) { - botNotInChat = (!peer->canWrite() || !peer->asChat()->participants.isEmpty()) && item->from()->isUser() && !peer->asChat()->participants.contains(item->from()->asUser()); + botNotInChat = (!peer->canWrite() || !peer->asChat()->participants.isEmpty()) && item->author()->isUser() && !peer->asChat()->participants.contains(item->author()->asUser()); } else if (peer->isMegagroup()) { - botNotInChat = (!peer->canWrite() || peer->asChannel()->mgInfo->botStatus != 0) && item->from()->isUser() && !peer->asChannel()->mgInfo->bots.contains(item->from()->asUser()); + botNotInChat = (!peer->canWrite() || peer->asChannel()->mgInfo->botStatus != 0) && item->author()->isUser() && !peer->asChannel()->mgInfo->bots.contains(item->author()->asUser()); } if (wasKeyboardHide || botNotInChat) { clearLastKeyboard(); } else { lastKeyboardInited = true; lastKeyboardId = item->id; - lastKeyboardFrom = item->from()->id; + lastKeyboardFrom = item->author()->id; lastKeyboardUsed = false; } } @@ -2037,7 +2041,7 @@ void History::addOlderSlice(const QVector &slice, const QVectorid; - lastKeyboardFrom = item->from()->id; + lastKeyboardFrom = item->author()->id; lastKeyboardUsed = false; } } @@ -2828,7 +2832,7 @@ void HistoryBlock::removeItem(HistoryItem *item) { dh = item->height(); items.remove(i); int32 l = items.size(); - if ((!item->out() || item->fromChannel()) && item->unread() && history->unreadCount) { + if ((!item->out() || item->isPost()) && item->unread() && history->unreadCount) { history->setUnreadCount(history->unreadCount - 1); } int32 itemType = item->type(); @@ -2856,11 +2860,10 @@ HistoryItem::HistoryItem(History *history, HistoryBlock *block, MsgId msgId, int , id(msgId) , date(msgDate) , _from(from ? App::user(from) : history->peer) -, _fromVersion(_from->nameVersion) , _history(history) , _block(block) , _flags(flags) -{ +, _authorNameVersion(author()->nameVersion) { } void HistoryItem::destroy() { @@ -2913,7 +2916,7 @@ void HistoryItem::setId(MsgId newId) { } bool HistoryItem::displayFromPhoto() const { - return (Adaptive::Wide() || (!out() && !history()->peer->isUser())) && !fromChannel(); + return (Adaptive::Wide() || (!out() && !history()->peer->isUser())) && !isPost(); } void HistoryItem::clipCallback(ClipReaderNotification notification) { @@ -3280,7 +3283,7 @@ void HistoryPhoto::draw(Painter &p, const HistoryItem *parent, const QRect &r, b bool notChild = (parent->getMedia() == this); int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; int32 captionw = width - st::msgPadding.left() - st::msgPadding.right(); @@ -3362,7 +3365,7 @@ void HistoryPhoto::draw(Painter &p, const HistoryItem *parent, const QRect &r, b // date if (_caption.isEmpty()) { - if (notChild) { + if (notChild && (_data->uploading() || App::hoveredItem() == parent)) { int32 fullRight = skipx + width, fullBottom = skipy + height; parent->drawInfo(p, fullRight, fullBottom, 2 * skipx + width, selected, InfoDisplayOverImage); } @@ -3589,7 +3592,7 @@ void HistoryVideo::draw(Painter &p, const HistoryItem *parent, const QRect &r, b int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; int32 captionw = width - st::msgPadding.left() - st::msgPadding.right(); @@ -3829,11 +3832,11 @@ HistoryDocument::HistoryDocument(const HistoryDocument &other) : HistoryFileMedi } void HistoryDocument::create(bool caption) { - uint64 mask; + uint64 mask = 0; if (_data->voice()) { - mask = HistoryDocumentVoice::Bit(); + mask |= HistoryDocumentVoice::Bit(); } else { - mask = HistoryDocumentNamed::Bit(); + mask |= HistoryDocumentNamed::Bit(); if (caption) { mask |= HistoryDocumentCaptioned::Bit(); } @@ -3924,7 +3927,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r int32 captionw = _width - st::msgPadding.left() - st::msgPadding.right(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; if (displayLoading) { ensureAnimation(parent); @@ -4139,7 +4142,7 @@ void HistoryDocument::draw(Painter &p, const HistoryItem *parent, const QRect &r void HistoryDocument::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; bool loaded = _data->loaded(); bool showPause = updateStatusText(parent); @@ -4508,7 +4511,7 @@ void HistoryGif::draw(Painter &p, const HistoryItem *parent, const QRect &r, boo int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; int32 captionw = width - st::msgPadding.left() - st::msgPadding.right(); @@ -4789,13 +4792,13 @@ void HistorySticker::draw(Painter &p, const HistoryItem *parent, const QRect &r, _data->checkSticker(); bool loaded = _data->loaded(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel, hovered, pressed; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost, hovered, pressed; int32 usew = _maxw, usex = 0; const HistoryReply *reply = toHistoryReply(parent); if (reply) { usew -= st::msgReplyPadding.left() + reply->replyToWidth(); - if (fromChannel) { + if (isPost) { } else if (out) { usex = _width - usew; } @@ -4821,7 +4824,7 @@ void HistorySticker::draw(Painter &p, const HistoryItem *parent, const QRect &r, if (reply) { int32 rw = _width - usew - st::msgReplyPadding.left(), rh = st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom(); - int32 rx = fromChannel ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left())), ry = _height - rh; + int32 rx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left())), ry = _height - rh; if (rtl()) rx = _width - rx - rw; App::roundRect(p, rx, ry, rw, rh, selected ? App::msgServiceSelectBg() : App::msgServiceBg(), selected ? ServiceSelectedCorners : ServiceCorners); @@ -4834,13 +4837,13 @@ void HistorySticker::draw(Painter &p, const HistoryItem *parent, const QRect &r, void HistorySticker::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; int32 usew = _maxw, usex = 0; const HistoryReply *reply = toHistoryReply(parent); if (reply) { usew -= reply->replyToWidth(); - if (fromChannel) { + if (isPost) { } else if (out) { usex = _width - usew; } @@ -4848,7 +4851,7 @@ void HistorySticker::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 if (rtl()) usex = _width - usex - usew; if (reply) { int32 rw = _width - usew, rh = st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom(); - int32 rx = fromChannel ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left())), ry = _height - rh; + int32 rx = isPost ? (usew + st::msgReplyPadding.left()) : (out ? 0 : (usew + st::msgReplyPadding.left())), ry = _height - rh; if (rtl()) rx = _width - rx - rw; if (x >= rx && y >= ry && x < rx + rw && y < ry + rh) { lnk = reply->replyToLink(); @@ -4964,7 +4967,7 @@ void HistoryContact::draw(Painter &p, const HistoryItem *parent, const QRect &r, if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; int32 skipx = 0, skipy = 0, width = _width, height = _height; - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; if (width >= _maxw) { width = _maxw; @@ -5015,7 +5018,7 @@ void HistoryContact::draw(Painter &p, const HistoryItem *parent, const QRect &r, } void HistoryContact::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0; if (_userId) { @@ -5341,7 +5344,7 @@ void HistoryWebPage::draw(Painter &p, const HistoryItem *parent, const QRect &r, if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; int32 skipx = 0, skipy = 0, width = _width, height = _height; - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; style::color barfg = (selected ? (outbg ? st::msgOutReplyBarSelColor : st::msgInReplyBarSelColor) : (outbg ? st::msgOutReplyBarColor : st::msgInReplyBarColor)); style::color semibold = (selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); @@ -5745,11 +5748,10 @@ _description(st::msgMinWidth) { _description.setText(st::webPageDescriptionFont, textClean(description), _webpageDescriptionOptions); } - if (url.startsWith(qsl("location:"))) { - QString lnk = qsl("https://maps.google.com/maps?q=") + url.mid(9) + qsl("&ll=") + url.mid(9) + qsl("&z=17"); - _link.reset(new TextLink(lnk)); - - _data = App::imageLinkSet(url, GoogleMapsLink, lnk); + QRegularExpressionMatch m = QRegularExpression(qsl("^location:(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)$")).match(url); + if (m.hasMatch()) { + _link.reset(new LocationLink(m.captured(1), m.captured(2))); + _data = App::imageLinkSet(url, GoogleMapsLink); } else { _link.reset(new TextLink(url)); } @@ -5831,7 +5833,7 @@ void HistoryImageLink::draw(Painter &p, const HistoryItem *parent, const QRect & if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); - bool out = parent->out(), fromChannel = parent->fromChannel(), outbg = out && !fromChannel; + bool out = parent->out(), isPost = parent->isPost(), outbg = out && !isPost; if (bubble) { skipx = st::mediaPadding.left(); @@ -5973,18 +5975,24 @@ void ViaInlineBotLink::onClick(Qt::MouseButton button) const { App::insertBotCommand('@' + _bot->username); } -HistoryMessageVia::HistoryMessageVia(int32 userId) -: bot(App::userLoaded(peerFromUser(userId))) +HistoryMessageVia::HistoryMessageVia(Interfaces *) +: bot(0) , width(0) -, maxWidth(bot ? st::msgServiceNameFont->width(lng_inline_bot_via(lt_inline_bot, '@' + bot->username)) : 0) -, lnk(new ViaInlineBotLink(bot)) { +, maxWidth(0) { +} + +void HistoryMessageVia::create(int32 userId) { + if (bot = App::userLoaded(peerFromUser(userId))) { + maxWidth = st::msgServiceNameFont->width(lng_inline_bot_via(lt_inline_bot, '@' + bot->username)); + lnk.reset(new ViaInlineBotLink(bot)); + } } bool HistoryMessageVia::isNull() const { return !bot || bot->username.isEmpty(); } -void HistoryMessageVia::resize(int32 availw) { +void HistoryMessageVia::resize(int32 availw) const { if (availw < 0) { text = QString(); width = 0; @@ -5999,29 +6007,46 @@ void HistoryMessageVia::resize(int32 availw) { } } +HistoryMessageViews::HistoryMessageViews(Interfaces *) +: _views(0) +, _viewsWidth(0) { +} + +HistoryMessageSigned::HistoryMessageSigned(Interfaces *) { +} + +void HistoryMessageSigned::create(UserData *from, const QDateTime &date) { + QString time = qsl(", ") + date.toString(cTimeFormat()), name = App::peerName(from); + int32 timew = st::msgDateFont->width(time), namew = st::msgDateFont->width(name); + if (timew + namew > st::maxSignatureSize) { + name = st::msgDateFont->elided(from->firstName, st::maxSignatureSize - timew); + } + _signature.setText(st::msgDateFont, name + time, _textNameOptions); +} + +int32 HistoryMessageSigned::maxWidth() const { + return _signature.maxWidth(); +} + HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg) : HistoryItem(history, block, msg.vid.v, msg.vflags.v, ::date(msg.vdate), msg.has_from_id() ? msg.vfrom_id.v : 0) , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) -, _via(msg.has_via_bot_id() ? new HistoryMessageVia(msg.vvia_bot_id.v) : 0) -, _media(0) -, _views(msg.has_views() ? msg.vviews.v : -1) { +, _media(0) { + create(msg.has_via_bot_id() ? msg.vvia_bot_id.v : 0, msg.has_views() ? msg.vviews.v : -1); QString text(textClean(qs(msg.vmessage))); - initTime(); initMedia(msg.has_media() ? (&msg.vmedia) : 0, text); setText(text, msg.has_entities() ? entitiesFromMTP(msg.ventities.c_vector().v) : EntitiesInText()); } -HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, HistoryMedia *fromMedia) : +HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, int32 fromViews, HistoryMedia *fromMedia) : HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_id) ? from : 0) , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) -, _via((flags & MTPDmessage::flag_via_bot_id) ? new HistoryMessageVia(viaBotId) : 0) -, _media(0) -, _views(fromChannel() ? 1 : -1) { - initTime(); +, _media(0) { + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, (fromViews > 0) ? fromViews : (isPost() ? 1 : -1)); if (fromMedia) { _media = fromMedia->clone(); _media->regItem(this); @@ -6034,10 +6059,8 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) -, _via((flags & MTPDmessage::flag_via_bot_id) ? new HistoryMessageVia(viaBotId) : 0) -, _media(0) -, _views(fromChannel() ? 1 : -1) { - initTime(); +, _media(0) { + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); initMediaFromDocument(doc, caption); setText(QString(), EntitiesInText()); } @@ -6047,15 +6070,37 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) -, _via((flags & MTPDmessage::flag_via_bot_id) ? new HistoryMessageVia(viaBotId) : 0) -, _media(0) -, _views(fromChannel() ? 1 : -1) { - initTime(); +, _media(0) { + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); _media = new HistoryPhoto(photo, caption, this); _media->regItem(this); setText(QString(), EntitiesInText()); } +void HistoryMessage::create(int32 viaBotId, int32 viewsCount) { + uint64 mask = 0; + if (viaBotId) { + mask |= HistoryMessageVia::Bit(); + } + if (viewsCount >= 0) { + mask |= HistoryMessageViews::Bit(); + } + if (isPost() && _from->isUser()) { + mask |= HistoryMessageSigned::Bit(); + } + UpdateInterfaces(mask); + if (HistoryMessageVia *via = Get()) { + via->create(viaBotId); + } + if (HistoryMessageViews *views = Get()) { + views->_views = viewsCount; + } + if (HistoryMessageSigned *msgsigned = Get()) { + msgsigned->create(_from->asUser(), date); + } + initTime(); +} + QString formatViewsCount(int32 views) { if (views > 999999) { views /= 100000; @@ -6076,11 +6121,16 @@ QString formatViewsCount(int32 views) { } void HistoryMessage::initTime() { - _timeText = date.toString(cTimeFormat()); - _timeWidth = st::msgDateFont->width(_timeText); - - _viewsText = (_views >= 0) ? formatViewsCount(_views) : QString(); - _viewsWidth = _viewsText.isEmpty() ? 0 : st::msgDateFont->width(_viewsText); + if (HistoryMessageSigned *msgsigned = Get()) { + _timeWidth = msgsigned->maxWidth(); + } else { + _timeText = date.toString(cTimeFormat()); + _timeWidth = st::msgDateFont->width(_timeText); + } + if (HistoryMessageViews *views = Get()) { + views->_viewsText = (views->_views >= 0) ? formatViewsCount(views->_views) : QString(); + views->_viewsWidth = views->_viewsText.isEmpty() ? 0 : st::msgDateFont->width(views->_viewsText); + } } void HistoryMessage::initMedia(const MTPMessageMedia *media, QString ¤tText) { @@ -6178,7 +6228,7 @@ void HistoryMessage::initDimensions() { } if (!_media) { if (displayFromName()) { - int32 namew = st::msgPadding.left() + _from->nameText.maxWidth() + st::msgPadding.right(); + int32 namew = st::msgPadding.left() + author()->nameText.maxWidth() + st::msgPadding.right(); if (via() && !toHistoryForwarded()) { namew += st::msgServiceFont->spacew + via()->maxWidth; } @@ -6206,7 +6256,7 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { if (Adaptive::Wide()) { hwidth = hmaxwidth; } - left += (!fromChannel() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); + left += (!isPost() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { left += st::msgPhotoSkip; // } else if (!Adaptive::Wide() && !out() && !fromChannel() && st::msgPhotoSkip - (hmaxwidth - hwidth) > 0) { @@ -6215,7 +6265,7 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { width = hwidth - st::msgMargin.left() - st::msgMargin.right(); if (width > maxwidth) { - if (!fromChannel() && out() && !Adaptive::Wide()) { + if (!isPost() && out() && !Adaptive::Wide()) { left += width - maxwidth; } width = maxwidth; @@ -6223,10 +6273,10 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { } void HistoryMessage::fromNameUpdated(int32 width) const { - _fromVersion = _from->nameVersion; + _authorNameVersion = author()->nameVersion; if (drawBubble() && displayFromName()) { if (via() && !toHistoryForwarded()) { - via()->resize(width - st::msgPadding.left() - st::msgPadding.right() - _from->nameText.maxWidth() - st::msgServiceFont->spacew); + via()->resize(width - st::msgPadding.left() - st::msgPadding.right() - author()->nameText.maxWidth() - st::msgServiceFont->spacew); } } } @@ -6304,7 +6354,7 @@ void HistoryMessage::setMedia(const MTPMessageMedia *media) { } void HistoryMessage::setText(const QString &text, const EntitiesInText &entities) { - textstyleSet(&((out() && !fromChannel()) ? st::outTextStyle : st::inTextStyle)); + textstyleSet(&((out() && !isPost()) ? st::outTextStyle : st::inTextStyle)); if (_media && _media->isDisplayed()) { _text.setMarkedText(st::msgFont, text, entities, itemTextOptions(this)); } else { @@ -6337,7 +6387,7 @@ bool HistoryMessage::textHasLinks() { void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width, bool selected, InfoDisplayType type) const { p.setFont(st::msgDateFont); - bool outbg = out() && !fromChannel(), overimg = (type == InfoDisplayOverImage); + bool outbg = out() && !isPost(), overimg = (type == InfoDisplayOverImage); int32 infoRight = right, infoBottom = bottom; switch (type) { case InfoDisplayDefault: @@ -6363,22 +6413,26 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width } dateX += HistoryMessage::timeLeft(); - p.drawText(dateX, dateY + st::msgDateFont->ascent, _timeText); + if (const HistoryMessageSigned *msgsigned = Get()) { + msgsigned->_signature.drawElided(p, dateX, dateY, _timeWidth); + } else { + p.drawText(dateX, dateY + st::msgDateFont->ascent, _timeText); + } QPoint iconPos; const QRect *iconRect = 0; - if (!_viewsText.isEmpty()) { + if (const HistoryMessageViews *views = Get()) { iconPos = QPoint(infoRight - infoW + st::msgViewsPos.x(), infoBottom - st::msgViewsImg.pxHeight() + st::msgViewsPos.y()); if (id > 0) { - if (out() && !fromChannel()) { + if (outbg) { iconRect = &(overimg ? st::msgInvViewsImg : (selected ? st::msgSelectOutViewsImg : st::msgOutViewsImg)); } else { iconRect = &(overimg ? st::msgInvViewsImg : (selected ? st::msgSelectViewsImg : st::msgViewsImg)); } - p.drawText(iconPos.x() + st::msgViewsImg.pxWidth() + st::msgDateCheckSpace, infoBottom - st::msgDateFont->descent, _viewsText); + p.drawText(iconPos.x() + st::msgViewsImg.pxWidth() + st::msgDateCheckSpace, infoBottom - st::msgDateFont->descent, views->_viewsText); } else { - iconPos.setX(iconPos.x() + st::msgDateViewsSpace + _viewsWidth); - if (out() && !fromChannel()) { + iconPos.setX(iconPos.x() + st::msgDateViewsSpace + views->_viewsWidth); + if (outbg) { iconRect = &(overimg ? st::msgInvSendingViewsImg : st::msgSendingOutViewsImg); } else { iconRect = &(overimg ? st::msgInvSendingViewsImg : st::msgSendingViewsImg); @@ -6390,7 +6444,7 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width iconRect = &(overimg ? st::msgInvSendingViewsImg : st::msgSendingViewsImg); p.drawPixmap(iconPos, App::sprite(), *iconRect); } - if (out() && !fromChannel()) { + if (outbg) { iconPos = QPoint(infoRight - st::msgCheckImg.pxWidth() + st::msgCheckPos.x(), infoBottom - st::msgCheckImg.pxHeight() + st::msgCheckPos.y()); if (id > 0) { if (unread()) { @@ -6406,13 +6460,14 @@ void HistoryMessage::drawInfo(Painter &p, int32 right, int32 bottom, int32 width } void HistoryMessage::setViewsCount(int32 count, bool reinit) { - if (_views == count || (count >= 0 && _views > count)) return; - - int32 was = _viewsWidth; - _views = count; - _viewsText = (_views >= 0) ? formatViewsCount(_views) : QString(); - _viewsWidth = _viewsText.isEmpty() ? 0 : st::msgDateFont->width(_viewsText); - if (was == _viewsWidth) { + HistoryMessageViews *views = Get(); + if (!views || views->_views == count || (count >= 0 && views->_views > count)) return; + + int32 was = views->_viewsWidth; + views->_views = count; + views->_viewsText = (views->_views >= 0) ? formatViewsCount(views->_views) : QString(); + views->_viewsWidth = views->_viewsText.isEmpty() ? 0 : st::msgDateFont->width(views->_viewsText); + if (was == views->_viewsWidth) { Ui::repaintHistoryItem(this); } else { if (_text.hasSkipBlock()) { @@ -6444,7 +6499,7 @@ void HistoryMessage::setId(MsgId newId) { } void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const { - bool outbg = out() && !fromChannel(), bubble = drawBubble(), selected = (selection == FullSelection); + bool outbg = out() && !isPost(), bubble = drawBubble(), selected = (selection == FullSelection); textstyleSet(&(outbg ? st::outTextStyle : st::inTextStyle)); @@ -6464,13 +6519,13 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m int32 left = 0, width = 0; countPositionAndSize(left, width); - if (_from->nameVersion > _fromVersion) { + if (author()->nameVersion > _authorNameVersion) { fromNameUpdated(width); } if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); - p.drawPixmap(photoleft, _height - st::msgMargin.bottom() - st::msgPhotoSize, _from->photo->pixRounded(st::msgPhotoSize)); + int32 photoleft = left + ((outbg && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + p.drawPixmap(photoleft, _height - st::msgMargin.bottom() - st::msgPhotoSize, author()->photo->pixRounded(st::msgPhotoSize)); } if (width < 1) return; @@ -6484,15 +6539,15 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m if (displayFromName()) { p.setFont(st::msgNameFont); - if (fromChannel()) { + if (isPost()) { p.setPen(selected ? st::msgInServiceFgSelected : st::msgInServiceFg); } else { - p.setPen(_from->color); + p.setPen(author()->color); } - _from->nameText.drawElided(p, r.left() + st::msgPadding.left(), r.top() + st::msgPadding.top(), width - st::msgPadding.left() - st::msgPadding.right()); - if (via() && !toHistoryForwarded() && width > st::msgPadding.left() + st::msgPadding.right() + _from->nameText.maxWidth() + st::msgServiceFont->spacew) { + author()->nameText.drawElided(p, r.left() + st::msgPadding.left(), r.top() + st::msgPadding.top(), width - st::msgPadding.left() - st::msgPadding.right()); + if (via() && !toHistoryForwarded() && width > st::msgPadding.left() + st::msgPadding.right() + author()->nameText.maxWidth() + st::msgServiceFont->spacew) { p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); - p.drawText(r.left() + st::msgPadding.left() + _from->nameText.maxWidth() + st::msgServiceFont->spacew, r.top() + st::msgPadding.top() + st::msgServiceFont->ascent, via()->text); + p.drawText(r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew, r.top() + st::msgPadding.top() + st::msgServiceFont->ascent, via()->text); } r.setTop(r.top() + st::msgNameFont->height); } @@ -6524,7 +6579,7 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m } void HistoryMessage::drawMessageText(Painter &p, QRect trect, uint32 selection) const { - bool outbg = out() && !fromChannel(), selected = (selection == FullSelection); + bool outbg = out() && !isPost(), selected = (selection == FullSelection); if (!displayFromName() && via() && !toHistoryForwarded()) { p.setFont(st::msgServiceNameFont); p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); @@ -6564,7 +6619,7 @@ int32 HistoryMessage::resize(int32 width) { } else { int32 textWidth = qMax(width - st::msgPadding.left() - st::msgPadding.right(), 1); if (textWidth != _textWidth) { - textstyleSet(&((out() && !fromChannel()) ? st::outTextStyle : st::inTextStyle)); + textstyleSet(&((out() && !isPost()) ? st::outTextStyle : st::inTextStyle)); _textWidth = textWidth; _textHeight = _text.countHeight(textWidth); textstyleRestore(); @@ -6637,9 +6692,9 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!isPost() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize && y >= _height - st::msgMargin.bottom() - st::msgPhotoSize && y < _height - st::msgMargin.bottom()) { - lnk = _from->lnk; + lnk = author()->lnk; return; } } @@ -6649,11 +6704,11 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); if (displayFromName()) { // from user left name if (y >= r.top() + st::msgPadding.top() && y < r.top() + st::msgPadding.top() + st::msgNameFont->height) { - if (x >= r.left() + st::msgPadding.left() && x < r.left() + r.width() - st::msgPadding.right() && x < r.left() + st::msgPadding.left() + _from->nameText.maxWidth()) { - lnk = _from->lnk; + if (x >= r.left() + st::msgPadding.left() && x < r.left() + r.width() - st::msgPadding.right() && x < r.left() + st::msgPadding.left() + author()->nameText.maxWidth()) { + lnk = author()->lnk; return; } - if (via() && !toHistoryForwarded() && x >= r.left() + st::msgPadding.left() + _from->nameText.maxWidth() + st::msgServiceFont->spacew && x < r.left() + st::msgPadding.left() + _from->nameText.maxWidth() + st::msgServiceFont->spacew + via()->width) { + if (via() && !toHistoryForwarded() && x >= r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew && x < r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew + via()->width) { lnk = via()->lnk; return; } @@ -6694,7 +6749,7 @@ void HistoryMessage::getStateFromMessageText(TextLinkPtr &lnk, HistoryCursorStat inDate = HistoryMessage::pointInTime(r.x() + r.width(), r.y() + r.height(), x, y, InfoDisplayDefault); } - textstyleSet(&((out() && !fromChannel()) ? st::outTextStyle : st::inTextStyle)); + textstyleSet(&((out() && !isPost()) ? st::outTextStyle : st::inTextStyle)); bool inText = false; _text.getState(lnk, inText, x - trect.x(), y - trect.y(), trect.width()); textstyleRestore(); @@ -6728,7 +6783,7 @@ void HistoryMessage::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, trect.setBottom(trect.bottom() - _media->height()); } - textstyleSet(&((out() && !fromChannel()) ? st::outTextStyle : st::inTextStyle)); + textstyleSet(&((out() && !isPost()) ? st::outTextStyle : st::inTextStyle)); _text.getSymbol(symbol, after, upon, x - trect.x(), y - trect.y(), trect.width()); textstyleRestore(); } @@ -6738,10 +6793,10 @@ void HistoryMessage::drawInDialog(Painter &p, const QRect &r, bool act, const Hi if (cacheFor != this) { cacheFor = this; QString msg(inDialogsText()); - if ((!_history->peer->isUser() || out()) && !fromChannel()) { + if ((!_history->peer->isUser() || out()) && !isPost()) { TextCustomTagsMap custom; custom.insert(QChar('c'), qMakePair(textcmdStartLink(1), textcmdStopLink())); - msg = lng_message_with_from(lt_from, textRichPrepare((_from == App::self()) ? lang(lng_from_you) : _from->shortName()), lt_message, textRichPrepare(msg)); + msg = lng_message_with_from(lt_from, textRichPrepare((author() == App::self()) ? lang(lng_from_you) : author()->shortName()), lt_message, textRichPrepare(msg)); cache.setRichText(st::dlgHistFont, msg, _textDlgOptions, custom); } else { cache.setText(st::dlgHistFont, msg, _textDlgOptions); @@ -6757,7 +6812,7 @@ void HistoryMessage::drawInDialog(Painter &p, const QRect &r, bool act, const Hi } QString HistoryMessage::notificationHeader() const { - return (!_history->peer->isUser() && !fromChannel()) ? from()->name : QString(); + return (!_history->peer->isUser() && !isPost()) ? from()->name : QString(); } QString HistoryMessage::notificationText() const { @@ -6771,7 +6826,6 @@ HistoryMessage::~HistoryMessage() { _media->unregItem(this); deleteAndMark(_media); } - deleteAndMark(_via); if (_flags & MTPDmessage::flag_reply_markup) { App::clearReplyMarkup(channelId(), id); } @@ -6785,8 +6839,8 @@ HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, const , fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { } -HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, MsgId id, QDateTime date, int32 from, HistoryMessage *msg) -: HistoryMessage(history, block, id, newForwardedFlags(history->peer, from, msg), msg->via() ? peerToUser(msg->viaBot()->id) : 0, date, from, msg->HistoryMessage::originalText(), msg->HistoryMessage::originalEntities(), msg->getMedia()) +HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg) +: HistoryMessage(history, block, id, newForwardedFlags(history->peer, from, msg) | flags, msg->via() ? peerToUser(msg->viaBot()->id) : 0, date, from, msg->HistoryMessage::originalText(), msg->HistoryMessage::originalEntities(), msg->HistoryMessage::viewsCount(), msg->getMedia()) , fwdDate(msg->dateForwarded()) , fwdFrom(msg->fromForwarded()) , fwdFromVersion(fwdFrom->nameVersion) @@ -6834,7 +6888,7 @@ void HistoryForwarded::draw(Painter &p, const QRect &r, uint32 selection, uint64 void HistoryForwarded::drawForwardedFrom(Painter &p, int32 x, int32 y, int32 w, bool selected) const { style::font serviceFont(st::msgServiceFont), serviceName(st::msgServiceNameFont); - bool outbg = out() && !fromChannel(); + bool outbg = out() && !isPost(); p.setPen((selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg))->p); p.setFont(serviceFont); @@ -6902,7 +6956,7 @@ void HistoryForwarded::getState(TextLinkPtr &lnk, HistoryCursorState &state, int int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!isPost() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize) { return HistoryMessage::getState(lnk, state, x, y); } @@ -7010,8 +7064,8 @@ HistoryReply::HistoryReply(History *history, HistoryBlock *block, MsgId msgId, i QString HistoryReply::selectedText(uint32 selection) const { if (selection != FullSelection || !replyToMsg) return HistoryMessage::selectedText(selection); QString result, original = HistoryMessage::selectedText(selection); - result.reserve(lang(lng_in_reply_to).size() + replyToMsg->from()->name.size() + 4 + original.size()); - result.append('[').append(lang(lng_in_reply_to)).append(' ').append(replyToMsg->from()->name).append(qsl("]\n")).append(original); + result.reserve(lang(lng_in_reply_to).size() + replyToMsg->author()->name.size() + 4 + original.size()); + result.append('[').append(lang(lng_in_reply_to)).append(' ').append(replyToMsg->author()->name).append(qsl("]\n")).append(original); return result; } @@ -7040,7 +7094,8 @@ bool HistoryReply::updateReplyTo(bool force) { replyToLnk = TextLinkPtr(new MessageLink(replyToMsg->history()->peer->id, replyToMsg->id)); if (!replyToMsg->toHistoryForwarded()) { if (UserData *bot = replyToMsg->viaBot()) { - _replyToVia = new HistoryMessageVia(peerToUser(bot->id)); + _replyToVia = new HistoryMessageVia(0); + _replyToVia->create(peerToUser(bot->id)); } } } else if (force) { @@ -7055,9 +7110,9 @@ bool HistoryReply::updateReplyTo(bool force) { void HistoryReply::replyToNameUpdated() const { if (replyToMsg) { - QString name = (replyToVia() && replyToMsg->from()->isUser()) ? replyToMsg->from()->asUser()->firstName : App::peerName(replyToMsg->from()); + QString name = (replyToVia() && replyToMsg->author()->isUser()) ? replyToMsg->author()->asUser()->firstName : App::peerName(replyToMsg->author()); replyToName.setText(st::msgServiceNameFont, name, _textNameOptions); - replyToVersion = replyToMsg->from()->nameVersion; + replyToVersion = replyToMsg->author()->nameVersion; bool hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false; int32 previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0; int32 w = replyToName.maxWidth(); @@ -7098,14 +7153,15 @@ void HistoryReply::replyToReplaced(HistoryItem *oldItem, HistoryItem *newItem) { initDimensions(); } else if (!replyToMsg->toHistoryForwarded()) { if (UserData *bot = replyToMsg->viaBot()) { - _replyToVia = new HistoryMessageVia(peerToUser(bot->id)); + _replyToVia = new HistoryMessageVia(0); + _replyToVia->create(peerToUser(bot->id)); } } } } void HistoryReply::draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const { - if (replyToMsg && replyToMsg->from()->nameVersion > replyToVersion) { + if (replyToMsg && replyToMsg->author()->nameVersion > replyToVersion) { replyToNameUpdated(); } HistoryMessage::draw(p, r, selection, ms); @@ -7113,7 +7169,7 @@ void HistoryReply::draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) void HistoryReply::drawReplyTo(Painter &p, int32 x, int32 y, int32 w, bool selected, bool likeService) const { style::color bar; - bool outbg = out() && !fromChannel(); + bool outbg = out() && !isPost(); if (likeService) { bar = st::white; } else { @@ -7223,7 +7279,7 @@ void HistoryReply::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x int32 left = 0, width = 0; countPositionAndSize(left, width); if (displayFromPhoto()) { - int32 photoleft = left + ((!fromChannel() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); + int32 photoleft = left + ((!isPost() && out()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize) { return HistoryMessage::getState(lnk, state, x, y); } @@ -7372,7 +7428,7 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) { case mtpc_messageActionChannelCreate: { const MTPDmessageActionChannelCreate &d(action.c_messageActionChannelCreate()); - if (fromChannel()) { + if (isPost()) { text = lng_action_created_channel(lt_title, textClean(qs(d.vtitle))); } else { text = lng_action_created_chat(lt_from, from, lt_title, textClean(qs(d.vtitle))); @@ -7380,7 +7436,7 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) { } break; case mtpc_messageActionChatDeletePhoto: { - text = fromChannel() ? lang(lng_action_removed_photo_channel) : lng_action_removed_photo(lt_from, from); + text = isPost() ? lang(lng_action_removed_photo_channel) : lng_action_removed_photo(lt_from, from); } break; case mtpc_messageActionChatDeleteUser: { @@ -7399,12 +7455,12 @@ void HistoryServiceMsg::setMessageByAction(const MTPmessageAction &action) { if (d.vphoto.type() == mtpc_photo) { _media = new HistoryPhoto(history()->peer, d.vphoto.c_photo(), st::msgServicePhotoWidth); } - text = fromChannel() ? lang(lng_action_changed_photo_channel) : lng_action_changed_photo(lt_from, from); + text = isPost() ? lang(lng_action_changed_photo_channel) : lng_action_changed_photo(lt_from, from); } break; case mtpc_messageActionChatEditTitle: { const MTPDmessageActionChatEditTitle &d(action.c_messageActionChatEditTitle()); - text = fromChannel() ? lng_action_changed_title_channel(lt_title, textClean(qs(d.vtitle))) : lng_action_changed_title(lt_from, from, lt_title, textClean(qs(d.vtitle))); + text = isPost() ? lng_action_changed_title_channel(lt_title, textClean(qs(d.vtitle))) : lng_action_changed_title(lt_from, from, lt_title, textClean(qs(d.vtitle))); } break; case mtpc_messageActionChatMigrateTo: { @@ -7483,7 +7539,7 @@ QString HistoryServiceMsg::inDialogsText() const { QString HistoryServiceMsg::inReplyText() const { QString result = HistoryServiceMsg::inDialogsText(); - return result.trimmed().startsWith(from()->name) ? result.trimmed().mid(from()->name.size()).trimmed() : result; + return result.trimmed().startsWith(author()->name) ? result.trimmed().mid(author()->name.size()).trimmed() : result; } void HistoryServiceMsg::setServiceText(const QString &text) { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 0ac06d614017fd..c5f667f2535012 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -189,14 +189,14 @@ class History { } HistoryItem *createItem(HistoryBlock *block, const MTPMessage &msg, bool applyServiceAction); - HistoryItem *createItemForwarded(HistoryBlock *block, MsgId id, QDateTime date, int32 from, HistoryMessage *msg); + HistoryItem *createItemForwarded(HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg); HistoryItem *createItemDocument(HistoryBlock *block, MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, DocumentData *doc, const QString &caption); HistoryItem *createItemPhoto(HistoryBlock *block, MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, PhotoData *photo, const QString &caption); HistoryItem *addNewService(MsgId msgId, QDateTime date, const QString &text, int32 flags = 0, HistoryMedia *media = 0, bool newMsg = true); HistoryItem *addNewMessage(const MTPMessage &msg, NewMessageType type); HistoryItem *addToHistory(const MTPMessage &msg); - HistoryItem *addNewForwarded(MsgId id, QDateTime date, int32 from, HistoryMessage *item); + HistoryItem *addNewForwarded(MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *item); HistoryItem *addNewDocument(MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, DocumentData *doc, const QString &caption); HistoryItem *addNewPhoto(MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, PhotoData *photo, const QString &caption); @@ -779,7 +779,7 @@ enum InfoDisplayType { }; inline bool isImportantChannelMessage(MsgId id, int32 flags) { // client-side important msgs always has_views or has_from_id - return (flags & MTPDmessage::flag_out) || (flags & MTPDmessage::flag_mentioned) || ((id > 0 || flags != 0) && !(flags & MTPDmessage::flag_from_id)); + return (flags & MTPDmessage::flag_out) || (flags & MTPDmessage::flag_mentioned) || (flags & MTPDmessage::flag_post); } enum HistoryItemType { @@ -860,14 +860,20 @@ class HistoryItem : public HistoryElem { bool hasViews() const { return _flags & MTPDmessage::flag_views; } - bool fromChannel() const { - return _from->isChannel(); + bool isPost() const { + return _flags & MTPDmessage::flag_post; } bool isImportant() const { return _history->isChannel() && isImportantChannelMessage(id, _flags); } bool indexInOverview() const { - return (id > 0) && (!history()->isChannel() || history()->isMegagroup() || fromChannel()); + return (id > 0) && (!history()->isChannel() || history()->isMegagroup() || isPost()); + } + bool isSilent() const { + return _flags & MTPDmessage::flag_silent; + } + virtual int32 viewsCount() const { + return hasViews() ? 1 : -1; } virtual bool needCheck() const { @@ -937,7 +943,7 @@ class HistoryItem : public HistoryElem { if (id == 1) return false; if (channel->amCreator()) return true; - if (fromChannel()) { + if (isPost()) { if (channel->amEditor() && out()) return true; return false; } @@ -979,12 +985,6 @@ class HistoryItem : public HistoryElem { virtual int32 timeWidth() const { return 0; } - virtual QString viewsText() const { - return QString(); - } - virtual int32 viewsWidth() const { - return 0; - } virtual bool pointInTime(int32 right, int32 bottom, int32 x, int32 y, InfoDisplayType type) const { return false; } @@ -1019,7 +1019,10 @@ class HistoryItem : public HistoryElem { } bool hasFromName() const { - return (!out() || fromChannel()) && !history()->peer->isUser(); + return (!out() || isPost()) && !history()->peer->isUser(); + } + PeerData *author() const { + return isPost() ? history()->peer : _from; } bool displayFromPhoto() const; @@ -1030,11 +1033,12 @@ class HistoryItem : public HistoryElem { protected: PeerData *_from; - mutable int32 _fromVersion; History *_history; HistoryBlock *_block; int32 _flags; + mutable int32 _authorNameVersion; + }; class MessageLink : public ITextLink { @@ -1931,25 +1935,40 @@ class ViaInlineBotLink : public ITextLink { }; -class HistoryMessageVia { -public: - HistoryMessageVia(int32 userId); +struct HistoryMessageVia : public BasicInterface { + HistoryMessageVia(Interfaces *); + + void create(int32 userId); bool isNull() const; - void resize(int32 availw); + void resize(int32 availw) const; UserData *bot; - QString text; - int32 width, maxWidth; + mutable QString text; + mutable int32 width, maxWidth; TextLinkPtr lnk; +}; + +struct HistoryMessageViews : public BasicInterface { + HistoryMessageViews(Interfaces *); + QString _viewsText; + int32 _views, _viewsWidth; +}; + +struct HistoryMessageSigned : public BasicInterface { + HistoryMessageSigned(Interfaces *); + void create(UserData *from, const QDateTime &date); + int32 maxWidth() const; + + Text _signature; }; -class HistoryMessage : public HistoryItem { +class HistoryMessage : public HistoryItem, public Interfaces { public: HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg); - HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, HistoryMedia *media); // local forwarded + HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, int32 fromViews, HistoryMedia *fromMedia); // local forwarded HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, DocumentData *doc, const QString &caption); // local document HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, PhotoData *photo, const QString &caption); // local photo @@ -1959,8 +1978,9 @@ class HistoryMessage : public HistoryItem { void initDimensions(); void fromNameUpdated(int32 width) const; - virtual HistoryMessageVia *via() const { - return (_via && !_via->isNull()) ? _via : 0; + const HistoryMessageVia *via() const { + const HistoryMessageVia *result = Get(); + return (result && !result->isNull()) ? result : 0; } virtual UserData *viaBot() const { return via() ? via()->bot : 0; @@ -2037,20 +2057,20 @@ class HistoryMessage : public HistoryItem { int32 infoWidth() const { int32 result = _timeWidth; - if (!_viewsText.isEmpty()) { - result += st::msgDateViewsSpace + _viewsWidth + st::msgDateCheckSpace + st::msgViewsImg.pxWidth(); + if (const HistoryMessageViews *views = Get()) { + result += st::msgDateViewsSpace + views->_viewsWidth + st::msgDateCheckSpace + st::msgViewsImg.pxWidth(); } else if (id < 0 && history()->peer->isSelf()) { result += st::msgDateCheckSpace + st::msgCheckImg.pxWidth(); } - if (out() && !fromChannel()) { + if (out() && !isPost()) { result += st::msgDateCheckSpace + st::msgCheckImg.pxWidth(); } return result; } int32 timeLeft() const { int32 result = 0; - if (!_viewsText.isEmpty()) { - result += st::msgDateViewsSpace + _viewsWidth + st::msgDateCheckSpace + st::msgViewsImg.pxWidth(); + if (const HistoryMessageViews *views = Get()) { + result += st::msgDateViewsSpace + views->_viewsWidth + st::msgDateCheckSpace + st::msgViewsImg.pxWidth(); } else if (id < 0 && history()->peer->isSelf()) { result += st::msgDateCheckSpace + st::msgCheckImg.pxWidth(); } @@ -2059,18 +2079,19 @@ class HistoryMessage : public HistoryItem { int32 timeWidth() const { return _timeWidth; } - QString viewsText() const { - return _viewsText; - } - int32 viewsWidth() const { - return _viewsWidth; + + int32 viewsCount() const { + if (const HistoryMessageViews *views = Get()) { + return views->_views; + } + return HistoryItem::viewsCount(); } virtual QDateTime dateForwarded() const { // dynamic_cast optimize return date; } virtual PeerData *fromForwarded() const { // dynamic_cast optimize - return from(); + return author(); } HistoryMessage *toHistoryMessage() { // dynamic_cast optimize @@ -2084,25 +2105,23 @@ class HistoryMessage : public HistoryItem { protected: + void create(int32 viaBotId, int32 viewsCount); + Text _text; int32 _textWidth, _textHeight; - HistoryMessageVia *_via; HistoryMedia *_media; QString _timeText; int32 _timeWidth; - QString _viewsText; - int32 _views, _viewsWidth; - }; class HistoryForwarded : public HistoryMessage { public: HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg); - HistoryForwarded(History *history, HistoryBlock *block, MsgId id, QDateTime date, int32 from, HistoryMessage *msg); + HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg); void initDimensions(); void fwdNameUpdated() const; @@ -2175,7 +2194,7 @@ class HistoryReply : public HistoryMessage { void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const; PeerData *replyTo() const { - return replyToMsg ? replyToMsg->from() : 0; + return replyToMsg ? replyToMsg->author() : 0; } QString selectedText(uint32 selection) const; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index a7e5a359582580..d197e545937ea4 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -844,10 +844,10 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } else { uint16 symbol, selFrom = (_selected.cbegin().value() >> 16) & 0xFFFF, selTo = _selected.cbegin().value() & 0xFFFF; hasSelected = (selTo > selFrom) ? 1 : 0; - if (_dragItem && _dragItem == App::hoveredItem()) { - QPoint mousePos(mapMouseToItem(mapFromGlobal(_dragPos), _dragItem)); + if (App::mousedItem() && App::mousedItem() == App::hoveredItem()) { + QPoint mousePos(mapMouseToItem(mapFromGlobal(_dragPos), App::mousedItem())); bool afterDragSymbol, uponSymbol; - _dragItem->getSymbol(symbol, afterDragSymbol, uponSymbol, mousePos.x(), mousePos.y()); + App::mousedItem()->getSymbol(symbol, afterDragSymbol, uponSymbol, mousePos.x(), mousePos.y()); if (uponSymbol && symbol >= selFrom && symbol < selTo) { isUponSelected = 1; } @@ -963,16 +963,17 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } } - if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + QLatin1String linktype = _contextMenuLnk ? _contextMenuLnk->type() : qstr(""); + if (linktype == qstr("TextLink") || linktype == qstr("LocationLink")) { _menu->addAction(lang(lng_context_open_link), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_link), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + } else if (linktype == qstr("EmailLink")) { _menu->addAction(lang(lng_context_open_email), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_email), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + } else if (linktype == qstr("MentionLink")) { _menu->addAction(lang(lng_context_open_mention), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_mention), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + } else if (linktype == qstr("HashtagLink")) { _menu->addAction(lang(lng_context_open_hashtag), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_hashtag), this, SLOT(copyContextUrl()))->setEnabled(true); } else { @@ -1159,12 +1160,12 @@ QString HistoryInner::getSelectedText() const { if (item->detached()) continue; QString text, sel = item->selectedText(FullSelection), time = item->date.toString(timeFormat); - int32 size = item->from()->name.size() + time.size() + sel.size(); + int32 size = item->author()->name.size() + time.size() + sel.size(); text.reserve(size); int32 y = itemTop(item); if (y >= 0) { - texts.insert(y, text.append(item->from()->name).append(time).append(sel)); + texts.insert(y, text.append(item->author()->name).append(time).append(sel)); fullSize += size; } } @@ -3474,7 +3475,7 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re _canSendMessages = canSendMessages(_peer); if (_peer && _peer->isChannel()) { _peer->asChannel()->updateFull(); - _joinChannel.setText(lang(lng_channel_join)); + _joinChannel.setText(lang(_peer->isMegagroup() ? lng_group_invite_join : lng_channel_join)); } _unblockRequest = _reportSpamRequest = 0; @@ -4553,14 +4554,17 @@ void HistoryWidget::shareContact(const PeerId &peer, const QString &phone, const sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = p->isChannel() && !p->isMegagroup() && p->asChannel()->canPublish() && (p->asChannel()->isBroadcast() || _broadcast.checked()); - if (fromChannelName) { + bool channelPost = p->isChannel() && !p->isMegagroup() && p->asChannel()->canPublish() && (p->asChannel()->isBroadcast() || _broadcast.checked()); + bool showFromName = !channelPost || p->asChannel()->addsSignature(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; flags |= MTPDmessage::flag_views; - } else { + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(peer), MTPPeer(), MTPint(), MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); h->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), p->input, MTP_int(replyTo), MTP_inputMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, h->sendRequestId); App::historyRegRandom(randomId, newId); @@ -5518,21 +5522,24 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif int32 flags = newMessageFlags(h->peer) | MTPDmessage::flag_media; // unread, out if (file->to.replyTo) flags |= MTPDmessage::flag_reply_to_msg_id; - bool fromChannelName = h->peer->isChannel() && !h->peer->isMegagroup() && h->peer->asChannel()->canPublish() && (h->peer->asChannel()->isBroadcast() || file->to.broadcast); - if (fromChannelName) { + bool channelPost = h->peer->isChannel() && !h->peer->isMegagroup() && h->peer->asChannel()->canPublish() && (h->peer->asChannel()->isBroadcast() || file->to.broadcast); + bool showFromName = !channelPost || h->peer->asChannel()->addsSignature(); + if (channelPost) { flags |= MTPDmessage::flag_views; - } else { + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } if (file->type == PreparePhoto) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } else if (file->type == PrepareDocument) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } else if (file->type == PrepareAudio) { if (!h->peer->isChannel()) { flags |= MTPDmessage::flag_media_unread; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } if (_peer && file->to.peer == _peer->id) { @@ -5583,8 +5590,8 @@ void HistoryWidget::onPhotoUploaded(const FullMsgId &newId, const MTPInputFile & sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->fromChannel(); - if (fromChannelName) { + bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); @@ -5631,8 +5638,8 @@ void HistoryWidget::onDocumentUploaded(const FullMsgId &newId, const MTPInputFil sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->fromChannel(); - if (fromChannelName) { + bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); @@ -5656,8 +5663,8 @@ void HistoryWidget::onThumbDocumentUploaded(const FullMsgId &newId, const MTPInp sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->fromChannel(); - if (fromChannelName) { + bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); @@ -5670,7 +5677,7 @@ void HistoryWidget::onPhotoProgress(const FullMsgId &newId) { if (!MTP::authedId()) return; if (HistoryItem *item = App::histItemById(newId)) { PhotoData *photo = (item->getMedia() && item->getMedia()->type() == MediaTypePhoto) ? static_cast(item->getMedia())->photo() : 0; - if (!item->fromChannel()) { + if (!item->isPost()) { updateSendAction(item->history(), SendActionUploadPhoto, 0); } Ui::repaintHistoryItem(item); @@ -5682,7 +5689,7 @@ void HistoryWidget::onDocumentProgress(const FullMsgId &newId) { if (HistoryItem *item = App::histItemById(newId)) { HistoryMedia *media = item->getMedia(); DocumentData *doc = media ? media->getDocument() : 0; - if (!item->fromChannel()) { + if (!item->isPost()) { updateSendAction(item->history(), (doc && doc->voice()) ? SendActionUploadVoice : SendActionUploadFile, doc ? doc->uploadOffset : 0); } Ui::repaintHistoryItem(item); @@ -5693,7 +5700,7 @@ void HistoryWidget::onPhotoFailed(const FullMsgId &newId) { if (!MTP::authedId()) return; HistoryItem *item = App::histItemById(newId); if (item) { - if (!item->fromChannel()) { + if (!item->isPost()) { updateSendAction(item->history(), SendActionUploadPhoto, -1); } // Ui::repaintHistoryItem(item); @@ -5706,7 +5713,7 @@ void HistoryWidget::onDocumentFailed(const FullMsgId &newId) { if (item) { HistoryMedia *media = item->getMedia(); DocumentData *doc = media ? media->getDocument() : 0; - if (!item->fromChannel()) { + if (!item->isPost()) { updateSendAction(item->history(), (doc && doc->voice()) ? SendActionUploadVoice : SendActionUploadFile, -1); } Ui::repaintHistoryItem(item); @@ -6355,10 +6362,14 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { flags |= MTPDmessage::flag_reply_to_msg_id; sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); - if (fromChannelName) { + bool channelPost = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); + bool showFromName = !channelPost || _peer->asChannel()->addsSignature(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; - } else { + flags |= MTPDmessage::flag_views; + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } if (bot) { @@ -6367,9 +6378,9 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { if (result->message.isEmpty()) { if (result->doc) { - _history->addNewDocument(newId.msg, flags, bot ? peerToUser(bot->id) : 0, replyToId(), date(MTP_int(unixtime())), fromChannelName ? 0 : MTP::authedId(), result->doc, result->caption); + _history->addNewDocument(newId.msg, flags, bot ? peerToUser(bot->id) : 0, replyToId(), date(MTP_int(unixtime())), showFromName ? MTP::authedId() : 0, result->doc, result->caption); } else if (result->photo) { - _history->addNewPhoto(newId.msg, flags, bot ? peerToUser(bot->id) : 0, replyToId(), date(MTP_int(unixtime())), fromChannelName ? 0 : MTP::authedId(), result->photo, result->caption); + _history->addNewPhoto(newId.msg, flags, bot ? peerToUser(bot->id) : 0, replyToId(), date(MTP_int(unixtime())), showFromName ? MTP::authedId() : 0, result->photo, result->caption); } else if (result->type == qstr("gif")) { MTPPhotoSize thumbSize; QPixmap thumb; @@ -6399,7 +6410,7 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { App::feedDocument(document, thumb); } Local::writeStickerImage(mediaKey(DocumentFileLocation, MTP::maindc(), docId), result->data()); - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(document, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(document, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } else if (result->type == qstr("photo")) { QImage fileThumb(result->thumb->pix().toImage()); @@ -6418,14 +6429,14 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { PhotoData *ph = App::photoSet(photoId, 0, 0, unixtime(), thumbPtr, ImagePtr(medium.width(), medium.height()), ImagePtr(result->width, result->height)); MTPPhoto photo = MTP_photo(MTP_long(photoId), MTP_long(0), MTP_int(ph->date), MTP_vector(photoSizes)); - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(photo, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(photo, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); } } else { flags |= MTPDmessage::flag_entities; if (result->noWebPage) { sendFlags |= MTPmessages_SendMessage::flag_no_webpage; } - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(result->message), MTP_messageMediaEmpty(), MTPnullMarkup, linksToMTP(result->entities), MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(result->message), MTP_messageMediaEmpty(), MTPnullMarkup, linksToMTP(result->entities), MTP_int(1)), NewMessageUnread); } _history->sendRequestId = MTP::send(MTPmessages_SendInlineBotResult(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_long(randomId), MTP_long(result->queryId), MTP_string(result->id)), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId); App::main()->finishForwarding(_history, _broadcast.checked()); @@ -7016,8 +7027,8 @@ void HistoryWidget::updateForwarding(bool force) { void HistoryWidget::updateReplyToName() { if (!_replyTo && (_replyToId || !_kbReplyTo)) return; - _replyToName.setText(st::msgServiceNameFont, App::peerName((_replyTo ? _replyTo : _kbReplyTo)->from()), _textNameOptions); - _replyToNameVersion = (_replyTo ? _replyTo : _kbReplyTo)->from()->nameVersion; + _replyToName.setText(st::msgServiceNameFont, App::peerName((_replyTo ? _replyTo : _kbReplyTo)->author()), _textNameOptions); + _replyToNameVersion = (_replyTo ? _replyTo : _kbReplyTo)->author()->nameVersion; } void HistoryWidget::updateField() { @@ -7032,7 +7043,7 @@ void HistoryWidget::drawField(Painter &p) { ImagePtr preview; HistoryItem *drawReplyTo = _replyToId ? _replyTo : _kbReplyTo; if (_replyToId || (!hasForward && _kbReplyTo)) { - if (drawReplyTo && drawReplyTo->from()->nameVersion > _replyToNameVersion) { + if (drawReplyTo && drawReplyTo->author()->nameVersion > _replyToNameVersion) { updateReplyToName(); } backy -= st::replyHeight; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 8944d59f3805ee..181fd9b840600b 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -395,7 +395,6 @@ MainWidget::MainWidget(Window *window) : TWidget(window) , _hider(0) , _peerInStack(0) , _msgIdInStack(0) -, _stickerPreview(0) , _playerHeight(0) , _contentScrollAddToY(0) , _mediaType(this) @@ -541,7 +540,7 @@ void MainWidget::fillForwardingInfo(Text *&from, Text *&text, bool &serviceColor if (HistoryForwarded *fwd = i.value()->toHistoryForwarded()) { version += fwd->fromForwarded()->nameVersion; } else { - version += i.value()->from()->nameVersion; + version += i.value()->author()->nameVersion; } } if (version != _toForwardNameVersion) { @@ -563,7 +562,7 @@ void MainWidget::updateForwardingTexts() { QVector fromUsers; fromUsers.reserve(_toForward.size()); for (SelectedItemSet::const_iterator i = _toForward.cbegin(), e = _toForward.cend(); i != e; ++i) { - PeerData *from = i.value()->from(); + PeerData *from = i.value()->author(); if (HistoryForwarded *fwd = i.value()->toHistoryForwarded()) { from = fwd->fromForwarded(); } @@ -571,7 +570,7 @@ void MainWidget::updateForwardingTexts() { fromUsersMap.insert(from, true); fromUsers.push_back(from); } - version += i.value()->from()->nameVersion; + version += from->nameVersion; } if (fromUsers.size() > 2) { from = lng_forwarding_from(lt_user, fromUsers.at(0)->shortName(), lt_count, fromUsers.size() - 1); @@ -602,13 +601,22 @@ void MainWidget::cancelForwarding() { void MainWidget::finishForwarding(History *hist, bool broadcast) { if (!hist) return; - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); if (!_toForward.isEmpty()) { bool genClientSideMessage = (_toForward.size() < 2); PeerData *forwardFrom = 0; App::main()->readServerHistory(hist, false); - int32 flags = fromChannelName ? MTPmessages_ForwardMessages::flag_broadcast : 0; + int32 sendFlags = 0, flags = 0; + bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); + bool showFromName = !channelPost || hist->peer->asChannel()->addsSignature(); + if (channelPost) { + sendFlags |= MTPmessages_ForwardMessages::flag_broadcast; + flags |= MTPDmessage::flag_views; + flags |= MTPDmessage::flag_post; + } + if (showFromName) { + flags |= MTPDmessage::flag_from_id; + } QVector ids; QVector randomIds; @@ -619,7 +627,7 @@ void MainWidget::finishForwarding(History *hist, bool broadcast) { if (genClientSideMessage) { FullMsgId newId(peerToChannel(hist->peer->id), clientMsgId()); HistoryMessage *msg = static_cast(_toForward.cbegin().value()); - hist->addNewForwarded(newId.msg, date(MTP_int(unixtime())), fromChannelName ? 0 : MTP::authedId(), msg); + hist->addNewForwarded(newId.msg, flags, date(MTP_int(unixtime())), showFromName ? MTP::authedId() : 0, msg); if (HistoryMedia *media = msg->getMedia()) { if (media->type() == MediaTypeSticker) { App::main()->incrementSticker(media->getDocument()); @@ -629,7 +637,7 @@ void MainWidget::finishForwarding(History *hist, bool broadcast) { } if (forwardFrom != i.value()->history()->peer) { if (forwardFrom) { - hist->sendRequestId = MTP::send(MTPmessages_ForwardMessages(MTP_int(flags), forwardFrom->input, MTP_vector(ids), MTP_vector(randomIds), hist->peer->input), rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId); + hist->sendRequestId = MTP::send(MTPmessages_ForwardMessages(MTP_int(sendFlags), forwardFrom->input, MTP_vector(ids), MTP_vector(randomIds), hist->peer->input), rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId); ids.resize(0); randomIds.resize(0); } @@ -638,7 +646,7 @@ void MainWidget::finishForwarding(History *hist, bool broadcast) { ids.push_back(MTP_int(i.value()->id)); randomIds.push_back(MTP_long(randomId)); } - hist->sendRequestId = MTP::send(MTPmessages_ForwardMessages(MTP_int(flags), forwardFrom->input, MTP_vector(ids), MTP_vector(randomIds), hist->peer->input), rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId); + hist->sendRequestId = MTP::send(MTPmessages_ForwardMessages(MTP_int(sendFlags), forwardFrom->input, MTP_vector(ids), MTP_vector(randomIds), hist->peer->input), rpcDone(&MainWidget::sentUpdatesReceived), RPCFailHandlerPtr(), 0, 0, hist->sendRequestId); if (history.peer() == hist->peer) { history.peerMessagesUpdated(); @@ -741,20 +749,6 @@ QPixmap MainWidget::grabTopBar() { } } -void MainWidget::ui_showStickerPreview(DocumentData *sticker) { - if (!sticker || ((!sticker->isAnimation() || !sticker->loaded()) && !sticker->sticker())) return; - if (!_stickerPreview) { - _stickerPreview = new StickerPreviewWidget(this); - resizeEvent(0); - } - _stickerPreview->showPreview(sticker); -} - -void MainWidget::ui_hideStickerPreview() { - if (!_stickerPreview) return; - _stickerPreview->hidePreview(); -} - void MainWidget::notify_botCommandsChanged(UserData *bot) { history.notify_botCommandsChanged(bot); } @@ -1320,18 +1314,21 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, media = MTP_messageMediaWebPage(MTP_webPagePending(MTP_long(page->id), MTP_int(page->pendingTill))); flags |= MTPDmessage::flag_media; } - bool fromChannelName = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); - if (fromChannelName) { + bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); + bool showFromName = !channelPost || hist->peer->asChannel()->addsSignature(); + if (channelPost) { sendFlags |= MTPmessages_SendMessage::flag_broadcast; flags |= MTPDmessage::flag_views; - } else { + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } MTPVector localEntities = linksToMTP(sendingEntities), sentEntities = linksToMTP(sendingEntities, true); if (!sentEntities.c_vector().v.isEmpty()) { sendFlags |= MTPmessages_SendMessage::flag_entities; } - hist->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(fromChannelName ? 0 : MTP::authedId()), peerToMTP(hist->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1)), NewMessageUnread); + hist->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1)), NewMessageUnread); hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_int(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } @@ -1915,7 +1912,7 @@ void MainWidget::serviceNotification(const QString &msg, const MTPMessageMedia & HistoryItem *item = 0; while (textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) { MTPVector localEntities = linksToMTP(sendingEntities); - item = App::histories().addNewMessage(MTP_message(MTP_int(flags), MTP_int(clientMsgId()), MTP_int(ServiceUserId), MTP_peerUser(MTP_int(MTP::authedId())), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(unixtime()), MTP_string(sendingText), media, MTPnullMarkup, localEntities, MTPint()), NewMessageUnread); + item = App::histories().addNewMessage(MTP_message(MTP_int(flags), MTP_int(clientMsgId()), MTP_int(ServiceUserId), MTP_peerUser(MTP_int(MTP::authedId())), MTPPeer(), MTPint(), MTPint(), MTPint(), MTPint(), MTP_int(unixtime()), MTP_string(sendingText), media, MTPnullMarkup, localEntities, MTPint()), NewMessageUnread); } if (item) { history.peerMessagesUpdated(item->history()->peer->id); @@ -2502,7 +2499,6 @@ void MainWidget::orderWidgets() { dialogs.raise(); _mediaType.raise(); if (_hider) _hider->raise(); - if (_stickerPreview) _stickerPreview->raise(); } QRect MainWidget::historyRect() const { @@ -2751,7 +2747,6 @@ void MainWidget::resizeEvent(QResizeEvent *e) { _mediaType.moveToLeft(width() - _mediaType.width(), _playerHeight + st::topBarHeight); if (profile) profile->setGeometry(history.geometry()); if (overview) overview->setGeometry(history.geometry()); - if (_stickerPreview) _stickerPreview->setGeometry(rect()); _contentScrollAddToY = 0; } @@ -3405,10 +3400,24 @@ bool MainWidget::started() { void MainWidget::openLocalUrl(const QString &url) { QString u(url.trimmed()); if (u.startsWith(qstr("tg://resolve"), Qt::CaseInsensitive)) { - QRegularExpressionMatch m = QRegularExpression(qsl("^tg://resolve/?\\?domain=([a-zA-Z0-9\\.\\_]+)(&(start|startgroup)=([a-zA-Z0-9\\.\\_\\-]+))?(&|$)"), QRegularExpression::CaseInsensitiveOption).match(u); + QRegularExpressionMatch m = QRegularExpression(qsl("^tg://resolve/?\\?domain=([a-zA-Z0-9\\.\\_]+)(&|$)"), QRegularExpression::CaseInsensitiveOption).match(u); if (m.hasMatch()) { - QString start = m.captured(3), startToken = m.captured(4); - openPeerByName(m.captured(1), (start == qsl("startgroup")), startToken); + QString params = u.mid(m.capturedLength(0)); + + QString start, startToken; + QRegularExpressionMatch startparam = QRegularExpression(qsl("(^|&)(start|startgroup)=([a-zA-Z0-9\\.\\_\\-]+)(&|$)")).match(params); + if (startparam.hasMatch()) { + start = startparam.captured(2); + startToken = startparam.captured(3); + } + + MsgId post = (start == qsl("startgroup")) ? ShowAtProfileMsgId : ShowAtUnreadMsgId; + QRegularExpressionMatch postparam = QRegularExpression(qsl("(^|&)post=(\\d+)(&|$)")).match(params); + if (postparam.hasMatch()) { + post = postparam.captured(2).toInt(); + } + + openPeerByName(m.captured(1), post, startToken); } } else if (u.startsWith(qstr("tg://join"), Qt::CaseInsensitive)) { QRegularExpressionMatch m = QRegularExpression(qsl("^tg://join/?\\?invite=([a-zA-Z0-9\\.\\_\\-]+)(&|$)"), QRegularExpression::CaseInsensitiveOption).match(u); @@ -3439,12 +3448,12 @@ void MainWidget::openLocalUrl(const QString &url) { } } -void MainWidget::openPeerByName(const QString &username, bool toProfile, const QString &startToken) { +void MainWidget::openPeerByName(const QString &username, MsgId msgId, const QString &startToken) { App::wnd()->hideMediaview(); PeerData *peer = App::peerByName(username); if (peer) { - if (toProfile && !peer->isChannel()) { + if (msgId == ShowAtProfileMsgId && !peer->isChannel()) { if (peer->isUser() && peer->asUser()->botInfo && !peer->asUser()->botInfo->cantJoinGroups && !startToken.isEmpty()) { peer->asUser()->botInfo->startGroupToken = startToken; Ui::showLayer(new ContactsBox(peer->asUser())); @@ -3452,6 +3461,9 @@ void MainWidget::openPeerByName(const QString &username, bool toProfile, const Q showPeerProfile(peer); } } else { + if (msgId == ShowAtProfileMsgId) { + msgId = ShowAtUnreadMsgId; + } if (peer->isUser() && peer->asUser()->botInfo) { peer->asUser()->botInfo->startToken = startToken; if (peer == history.peer()) { @@ -3459,10 +3471,10 @@ void MainWidget::openPeerByName(const QString &username, bool toProfile, const Q history.resizeEvent(0); } } - Ui::showPeerHistoryAsync(peer->id, ShowAtUnreadMsgId); + Ui::showPeerHistoryAsync(peer->id, msgId); } } else { - MTP::send(MTPcontacts_ResolveUsername(MTP_string(username)), rpcDone(&MainWidget::usernameResolveDone, qMakePair(toProfile, startToken)), rpcFail(&MainWidget::usernameResolveFail, username)); + MTP::send(MTPcontacts_ResolveUsername(MTP_string(username)), rpcDone(&MainWidget::usernameResolveDone, qMakePair(msgId, startToken)), rpcFail(&MainWidget::usernameResolveFail, username)); } } @@ -3508,7 +3520,7 @@ bool MainWidget::contentOverlapped(const QRect &globalRect) { _mediaType.overlaps(globalRect)); } -void MainWidget::usernameResolveDone(QPair toProfileStartToken, const MTPcontacts_ResolvedPeer &result) { +void MainWidget::usernameResolveDone(QPair msgIdAndStartToken, const MTPcontacts_ResolvedPeer &result) { Ui::hideLayer(); if (result.type() != mtpc_contacts_resolvedPeer) return; @@ -3519,24 +3531,27 @@ void MainWidget::usernameResolveDone(QPair toProfileStartToken, c if (!peerId) return; PeerData *peer = App::peer(peerId); - if (toProfileStartToken.first) { - if (peer->isUser() && peer->asUser()->botInfo && !peer->asUser()->botInfo->cantJoinGroups && !toProfileStartToken.second.isEmpty()) { - peer->asUser()->botInfo->startGroupToken = toProfileStartToken.second; + MsgId msgId = msgIdAndStartToken.first; + QString startToken = msgIdAndStartToken.second; + if (msgId == ShowAtProfileMsgId && !peer->isChannel()) { + if (peer->isUser() && peer->asUser()->botInfo && !peer->asUser()->botInfo->cantJoinGroups && !startToken.isEmpty()) { + peer->asUser()->botInfo->startGroupToken = startToken; Ui::showLayer(new ContactsBox(peer->asUser())); - } else if (peer->isChannel()) { - Ui::showPeerHistory(peer->id, ShowAtUnreadMsgId); } else { showPeerProfile(peer); } } else { + if (msgId == ShowAtProfileMsgId) { + msgId = ShowAtUnreadMsgId; + } if (peer->isUser() && peer->asUser()->botInfo) { - peer->asUser()->botInfo->startToken = toProfileStartToken.second; + peer->asUser()->botInfo->startToken = startToken; if (peer == history.peer()) { history.updateControlsVisibility(); history.resizeEvent(0); } } - Ui::showPeerHistory(peer->id, ShowAtUnreadMsgId); + Ui::showPeerHistory(peer->id, msgId); } } @@ -4007,7 +4022,7 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) { // update before applying skipped int32 flags = d.vflags.v | MTPDmessage::flag_from_id; - HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.is_out() ? MTP_int(MTP::authedId()) : d.vuser_id, MTP_peerUser(d.is_out() ? d.vuser_id : MTP_int(MTP::authedId())), d.vfwd_from_id, d.vfwd_date, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); + HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.is_out() ? MTP_int(MTP::authedId()) : d.vuser_id, MTP_peerUser(d.is_out() ? d.vuser_id : MTP_int(MTP::authedId())), d.vfwd_from_id, d.vfwd_date, d.vfwd_post, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); if (item) { history.peerMessagesUpdated(item->history()->peer->id); } @@ -4032,7 +4047,7 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) { // update before applying skipped int32 flags = d.vflags.v | MTPDmessage::flag_from_id; - HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.vfrom_id, MTP_peerChat(d.vchat_id), d.vfwd_from_id, d.vfwd_date, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); + HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.vfrom_id, MTP_peerChat(d.vchat_id), d.vfwd_from_id, d.vfwd_date, d.vfwd_post, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); if (item) { history.peerMessagesUpdated(item->history()->peer->id); } diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 31a8989df849a9..075a37474da5d2 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -183,8 +183,6 @@ inline int chatsListWidth(int windowWidth) { return snap((windowWidth * 5) / 14, st::dlgMinWidth, st::dlgMaxWidth); } -class StickerPreviewWidget; - class MainWidget : public TWidget, public RPCSender { Q_OBJECT @@ -212,7 +210,7 @@ class MainWidget : public TWidget, public RPCSender { void start(const MTPUser &user); void openLocalUrl(const QString &str); - void openPeerByName(const QString &name, bool toProfile = false, const QString &startToken = QString()); + void openPeerByName(const QString &name, MsgId msgId = ShowAtUnreadMsgId, const QString &startToken = QString()); void joinGroupByHash(const QString &hash); void stickersBox(const MTPInputStickerSet &set); @@ -410,8 +408,6 @@ class MainWidget : public TWidget, public RPCSender { bool isItemVisible(HistoryItem *item); - void ui_showStickerPreview(DocumentData *sticker); - void ui_hideStickerPreview(); void ui_repaintHistoryItem(const HistoryItem *item); void ui_repaintInlineItem(const LayoutInlineItem *layout); bool ui_isInlineItemVisible(const LayoutInlineItem *layout); @@ -544,7 +540,7 @@ public slots: void updateReceived(const mtpPrime *from, const mtpPrime *end); bool updateFail(const RPCError &e); - void usernameResolveDone(QPair toProfileStartToken, const MTPcontacts_ResolvedPeer &result); + void usernameResolveDone(QPair msgIdAndStartToken, const MTPcontacts_ResolvedPeer &result); bool usernameResolveFail(QString name, const RPCError &error); void inviteCheckDone(QString hash, const MTPChatInvite &invite); @@ -578,8 +574,6 @@ public slots: PeerData *_peerInStack; MsgId _msgIdInStack; - StickerPreviewWidget *_stickerPreview; - int32 _playerHeight; int32 _contentScrollAddToY; diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index a73603e0166660..c8719fb3f0786b 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -883,7 +883,7 @@ void MediaView::displayPhoto(PhotoData *photo, HistoryItem *item) { _caption = Text(); if (HistoryMessage *itemMsg = item ? item->toHistoryMessage() : 0) { if (HistoryPhoto *photoMsg = dynamic_cast(itemMsg->getMedia())) { - _caption.setText(st::mvCaptionFont, photoMsg->getCaption(), (item->from()->isUser() && item->from()->asUser()->botInfo) ? _captionBotOptions : _captionTextOptions); + _caption.setText(st::mvCaptionFont, photoMsg->getCaption(), (item->author()->isUser() && item->author()->asUser()->botInfo) ? _captionBotOptions : _captionTextOptions); } } @@ -912,7 +912,7 @@ void MediaView::displayPhoto(PhotoData *photo, HistoryItem *item) { if (HistoryForwarded *fwd = item->toHistoryForwarded()) { _from = fwd->fromForwarded(); } else { - _from = item->from(); + _from = item->author(); } } else { _from = _user; @@ -1065,7 +1065,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty if (HistoryForwarded *fwd = item->toHistoryForwarded()) { _from = fwd->fromForwarded(); } else { - _from = item->from(); + _from = item->author(); } _full = 1; updateControls(); diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index b6dab0b0042ba0..b1f655dc49803a 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -368,7 +368,7 @@ static const mtpTypeId mtpLayers[] = { mtpTypeId(mtpc_invokeWithLayer18), }; static const uint32 mtpLayerMaxSingle = sizeof(mtpLayers) / sizeof(mtpLayers[0]); -static const mtpPrime mtpCurrentLayer = 47; +static const mtpPrime mtpCurrentLayer = 48; template class MTPBoxed : public bareT { diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index e2231a54ae0990..462d46aeafb973 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -1154,15 +1154,16 @@ void _serialize_channel(MTPStringLogger &to, int32 stage, int32 lev, Types &type case 7: to.add(" verified: "); ++stages.back(); if (flag & MTPDchannel::flag_verified) { to.add("YES [ BY BIT 7 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; case 8: to.add(" megagroup: "); ++stages.back(); if (flag & MTPDchannel::flag_megagroup) { to.add("YES [ BY BIT 8 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; case 9: to.add(" restricted: "); ++stages.back(); if (flag & MTPDchannel::flag_restricted) { to.add("YES [ BY BIT 9 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; - case 10: to.add(" invites_enabled: "); ++stages.back(); if (flag & MTPDchannel::flag_invites_enabled) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; - case 11: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 12: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 13: to.add(" title: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 14: to.add(" username: "); ++stages.back(); if (flag & MTPDchannel::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; - case 15: to.add(" photo: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 16: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 17: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 18: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDchannel::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; + case 10: to.add(" admin_invites: "); ++stages.back(); if (flag & MTPDchannel::flag_admin_invites) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 11: to.add(" signatures: "); ++stages.back(); if (flag & MTPDchannel::flag_signatures) { to.add("YES [ BY BIT 11 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 12: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 13: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 14: to.add(" title: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 15: to.add(" username: "); ++stages.back(); if (flag & MTPDchannel::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 16: to.add(" photo: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 17: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 18: to.add(" version: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 19: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDchannel::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -1345,19 +1346,22 @@ void _serialize_message(MTPStringLogger &to, int32 stage, int32 lev, Types &type case 2: to.add(" out: "); ++stages.back(); if (flag & MTPDmessage::flag_out) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 3: to.add(" mentioned: "); ++stages.back(); if (flag & MTPDmessage::flag_mentioned) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 4: to.add(" media_unread: "); ++stages.back(); if (flag & MTPDmessage::flag_media_unread) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 5: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; - case 7: to.add(" to_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 9: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 10: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDmessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 11: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 12: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 13: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 14: to.add(" media: "); ++stages.back(); if (flag & MTPDmessage::flag_media) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; - case 15: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; - case 16: to.add(" entities: "); ++stages.back(); if (flag & MTPDmessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; - case 17: to.add(" views: "); ++stages.back(); if (flag & MTPDmessage::flag_views) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 5: to.add(" silent: "); ++stages.back(); if (flag & MTPDmessage::flag_silent) { to.add("YES [ BY BIT 13 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 13 IN FIELD flags ]"); } break; + case 6: to.add(" post: "); ++stages.back(); if (flag & MTPDmessage::flag_post) { to.add("YES [ BY BIT 14 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 14 IN FIELD flags ]"); } break; + case 7: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; + case 9: to.add(" to_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 10: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 11: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 12: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; + case 13: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDmessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 14: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 15: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 16: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 17: to.add(" media: "); ++stages.back(); if (flag & MTPDmessage::flag_media) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; + case 18: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 19: to.add(" entities: "); ++stages.back(); if (flag & MTPDmessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 20: to.add(" views: "); ++stages.back(); if (flag & MTPDmessage::flag_views) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -2952,17 +2956,19 @@ void _serialize_updateShortMessage(MTPStringLogger &to, int32 stage, int32 lev, case 2: to.add(" out: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_out) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 3: to.add(" mentioned: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_mentioned) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 4: to.add(" media_unread: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_media_unread) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 5: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 9: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 10: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 11: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 12: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 13: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 14: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 15: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 5: to.add(" silent: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_silent) { to.add("YES [ BY BIT 13 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 13 IN FIELD flags ]"); } break; + case 6: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" user_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 9: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 10: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 11: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 12: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 13: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 14: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; + case 15: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 16: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 17: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -2980,18 +2986,20 @@ void _serialize_updateShortChatMessage(MTPStringLogger &to, int32 stage, int32 l case 2: to.add(" out: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_out) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 3: to.add(" mentioned: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_mentioned) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 4: to.add(" media_unread: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_media_unread) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 5: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" from_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 9: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 10: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 11: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 12: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 13: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 14: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 15: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 16: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 5: to.add(" silent: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_silent) { to.add("YES [ BY BIT 13 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 13 IN FIELD flags ]"); } break; + case 6: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" from_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" chat_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 9: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 10: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 11: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 12: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 13: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 14: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 15: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; + case 16: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 17: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 18: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -3135,9 +3143,10 @@ void _serialize_dcOption(MTPStringLogger &to, int32 stage, int32 lev, Types &typ case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" ipv6: "); ++stages.back(); if (flag & MTPDdcOption::flag_ipv6) { to.add("YES [ BY BIT 0 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; case 2: to.add(" media_only: "); ++stages.back(); if (flag & MTPDdcOption::flag_media_only) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; - case 3: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" ip_address: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" port: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" tcpo_only: "); ++stages.back(); if (flag & MTPDdcOption::flag_tcpo_only) { to.add("YES [ BY BIT 2 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 4: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" ip_address: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" port: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -5071,6 +5080,19 @@ void _serialize_messages_botResults(MTPStringLogger &to, int32 stage, int32 lev, } } +void _serialize_exportedMessageLink(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ exportedMessageLink"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" link: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_req_pq(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -6448,12 +6470,13 @@ void _serialize_messages_sendMessage(MTPStringLogger &to, int32 stage, int32 lev case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" no_webpage: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_no_webpage) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 2: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; - case 3: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 5: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 8: to.add(" entities: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 3: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; + case 4: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 6: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 9: to.add(" entities: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6468,11 +6491,12 @@ void _serialize_messages_sendMedia(MTPStringLogger &to, int32 stage, int32 lev, switch (stage) { case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; - case 2: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 4: to.add(" media: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; + case 3: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 5: to.add(" media: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6487,10 +6511,11 @@ void _serialize_messages_forwardMessages(MTPStringLogger &to, int32 stage, int32 switch (stage) { case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_forwardMessages::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; - case 2: to.add(" from_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" random_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_long); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" to_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_forwardMessages::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; + case 3: to.add(" from_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" random_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_long); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" to_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6663,11 +6688,12 @@ void _serialize_messages_sendInlineBotResult(MTPStringLogger &to, int32 stage, i switch (stage) { case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; - case 2: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 4: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" query_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" id: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; + case 3: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 5: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" query_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" id: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6828,6 +6854,20 @@ void _serialize_channels_toggleInvites(MTPStringLogger &to, int32 stage, int32 l } } +void _serialize_channels_toggleSignatures(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_toggleSignatures"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" enabled: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_messages_getChats(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -7341,6 +7381,20 @@ void _serialize_channels_getParticipant(MTPStringLogger &to, int32 stage, int32 } } +void _serialize_channels_exportMessageLink(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_exportMessageLink"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_rpc_result(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -7799,6 +7853,7 @@ namespace { _serializers.insert(mtpc_botInlineMediaResultPhoto, _serialize_botInlineMediaResultPhoto); _serializers.insert(mtpc_botInlineResult, _serialize_botInlineResult); _serializers.insert(mtpc_messages_botResults, _serialize_messages_botResults); + _serializers.insert(mtpc_exportedMessageLink, _serialize_exportedMessageLink); _serializers.insert(mtpc_req_pq, _serialize_req_pq); _serializers.insert(mtpc_req_DH_params, _serialize_req_DH_params); @@ -7929,6 +7984,7 @@ namespace { _serializers.insert(mtpc_channels_kickFromChannel, _serialize_channels_kickFromChannel); _serializers.insert(mtpc_channels_deleteChannel, _serialize_channels_deleteChannel); _serializers.insert(mtpc_channels_toggleInvites, _serialize_channels_toggleInvites); + _serializers.insert(mtpc_channels_toggleSignatures, _serialize_channels_toggleSignatures); _serializers.insert(mtpc_messages_getChats, _serialize_messages_getChats); _serializers.insert(mtpc_channels_getChannels, _serialize_channels_getChannels); _serializers.insert(mtpc_messages_getFullChat, _serialize_messages_getFullChat); @@ -7968,6 +8024,7 @@ namespace { _serializers.insert(mtpc_help_getTermsOfService, _serialize_help_getTermsOfService); _serializers.insert(mtpc_channels_getParticipants, _serialize_channels_getParticipants); _serializers.insert(mtpc_channels_getParticipant, _serialize_channels_getParticipant); + _serializers.insert(mtpc_channels_exportMessageLink, _serialize_channels_exportMessageLink); _serializers.insert(mtpc_rpc_result, _serialize_rpc_result); _serializers.insert(mtpc_msg_container, _serialize_msg_container); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 1f32eb20ec7d00..0f15155a175641 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -145,7 +145,7 @@ enum { mtpc_chatPhotoEmpty = 0x37c1011c, mtpc_chatPhoto = 0x6153276a, mtpc_messageEmpty = 0x83e5de54, - mtpc_message = 0xc992e15c, + mtpc_message = 0xef11cef6, mtpc_messageService = 0xc06b9607, mtpc_messageMediaEmpty = 0x3ded6320, mtpc_messageMediaPhoto = 0x3d8ce53d, @@ -274,8 +274,8 @@ enum { mtpc_updates_difference = 0xf49ca0, mtpc_updates_differenceSlice = 0xa8fb1981, mtpc_updatesTooLong = 0xe317af7e, - mtpc_updateShortMessage = 0x13e4deaa, - mtpc_updateShortChatMessage = 0x248afa62, + mtpc_updateShortMessage = 0x3afbe9d1, + mtpc_updateShortChatMessage = 0xca2ef195, mtpc_updateShort = 0x78d4dec1, mtpc_updatesCombined = 0x725b04c3, mtpc_updates = 0x74ae4240, @@ -446,6 +446,7 @@ enum { mtpc_botInlineMediaResultPhoto = 0xc5528587, mtpc_botInlineResult = 0x9bebaeb9, mtpc_messages_botResults = 0x1170b0a3, + mtpc_exportedMessageLink = 0x1f486803, mtpc_invokeAfterMsg = 0xcb9f372d, mtpc_invokeAfterMsgs = 0x3dc4b4f0, mtpc_initConnection = 0x69796de9, @@ -604,7 +605,9 @@ enum { mtpc_channels_kickFromChannel = 0xa672de14, mtpc_channels_exportInvite = 0xc7560885, mtpc_channels_deleteChannel = 0xc0111fe3, - mtpc_channels_toggleInvites = 0x49609307 + mtpc_channels_toggleInvites = 0x49609307, + mtpc_channels_exportMessageLink = 0xc846d22d, + mtpc_channels_toggleSignatures = 0x1f69b606 }; // Type forward declarations @@ -1227,6 +1230,9 @@ class MTPDbotInlineResult; class MTPmessages_botResults; class MTPDmessages_botResults; +class MTPexportedMessageLink; +class MTPDexportedMessageLink; + // Boxed types definitions typedef MTPBoxed MTPResPQ; @@ -1388,6 +1394,7 @@ typedef MTPBoxed MTPInputBotInlineResult; typedef MTPBoxed MTPBotInlineMessage; typedef MTPBoxed MTPBotInlineResult; typedef MTPBoxed MTPmessages_BotResults; +typedef MTPBoxed MTPExportedMessageLink; // Type classes definitions @@ -3511,7 +3518,7 @@ class MTPmessage : private mtpDataOwner { explicit MTPmessage(MTPDmessageService *_data); friend MTPmessage MTP_messageEmpty(MTPint _id); - friend MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views); + friend MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views); friend MTPmessage MTP_messageService(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _date, const MTPMessageAction &_action); mtpTypeId _type; @@ -5717,8 +5724,8 @@ class MTPupdates : private mtpDataOwner { explicit MTPupdates(MTPDupdateShortSentMessage *_data); friend MTPupdates MTP_updatesTooLong(); - friend MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); - friend MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); + friend MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); + friend MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); friend MTPupdates MTP_updateShort(const MTPUpdate &_update, MTPint _date); friend MTPupdates MTP_updatesCombined(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq_start, MTPint _seq); friend MTPupdates MTP_updates(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq); @@ -8956,6 +8963,37 @@ class MTPmessages_botResults : private mtpDataOwner { }; typedef MTPBoxed MTPmessages_BotResults; +class MTPexportedMessageLink : private mtpDataOwner { +public: + MTPexportedMessageLink(); + MTPexportedMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_exportedMessageLink) : mtpDataOwner(0) { + read(from, end, cons); + } + + MTPDexportedMessageLink &_exportedMessageLink() { + if (!data) throw mtpErrorUninitialized(); + split(); + return *(MTPDexportedMessageLink*)data; + } + const MTPDexportedMessageLink &c_exportedMessageLink() const { + if (!data) throw mtpErrorUninitialized(); + return *(const MTPDexportedMessageLink*)data; + } + + uint32 innerLength() const; + mtpTypeId type() const; + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_exportedMessageLink); + void write(mtpBuffer &to) const; + + typedef void ResponseType; + +private: + explicit MTPexportedMessageLink(MTPDexportedMessageLink *_data); + + friend MTPexportedMessageLink MTP_exportedMessageLink(const MTPstring &_link); +}; +typedef MTPBoxed MTPExportedMessageLink; + // Type constructors with data class MTPDresPQ : public mtpDataImpl { @@ -9823,7 +9861,8 @@ class MTPDchannel : public mtpDataImpl { flag_verified = (1 << 7), flag_megagroup = (1 << 8), flag_restricted = (1 << 9), - flag_invites_enabled = (1 << 10), + flag_admin_invites = (1 << 10), + flag_signatures = (1 << 11), flag_username = (1 << 6), flag_restriction_reason = (1 << 9), }; @@ -9837,7 +9876,8 @@ class MTPDchannel : public mtpDataImpl { bool is_verified() const { return vflags.v & flag_verified; } bool is_megagroup() const { return vflags.v & flag_megagroup; } bool is_restricted() const { return vflags.v & flag_restricted; } - bool is_invites_enabled() const { return vflags.v & flag_invites_enabled; } + bool is_admin_invites() const { return vflags.v & flag_admin_invites; } + bool is_signatures() const { return vflags.v & flag_signatures; } bool has_username() const { return vflags.v & flag_username; } bool has_restriction_reason() const { return vflags.v & flag_restriction_reason; } }; @@ -9998,7 +10038,7 @@ class MTPDmessage : public mtpDataImpl { public: MTPDmessage() { } - MTPDmessage(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vmessage(_message), vmedia(_media), vreply_markup(_reply_markup), ventities(_entities), vviews(_views) { + MTPDmessage(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vmessage(_message), vmedia(_media), vreply_markup(_reply_markup), ventities(_entities), vviews(_views) { } MTPint vflags; @@ -10007,6 +10047,7 @@ class MTPDmessage : public mtpDataImpl { MTPPeer vto_id; MTPPeer vfwd_from_id; MTPint vfwd_date; + MTPint vfwd_post; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPint vdate; @@ -10021,9 +10062,12 @@ class MTPDmessage : public mtpDataImpl { flag_out = (1 << 1), flag_mentioned = (1 << 4), flag_media_unread = (1 << 5), + flag_silent = (1 << 13), + flag_post = (1 << 14), flag_from_id = (1 << 8), flag_fwd_from_id = (1 << 2), flag_fwd_date = (1 << 2), + flag_fwd_post = (1 << 12), flag_via_bot_id = (1 << 11), flag_reply_to_msg_id = (1 << 3), flag_media = (1 << 9), @@ -10036,9 +10080,12 @@ class MTPDmessage : public mtpDataImpl { bool is_out() const { return vflags.v & flag_out; } bool is_mentioned() const { return vflags.v & flag_mentioned; } bool is_media_unread() const { return vflags.v & flag_media_unread; } + bool is_silent() const { return vflags.v & flag_silent; } + bool is_post() const { return vflags.v & flag_post; } bool has_from_id() const { return vflags.v & flag_from_id; } bool has_fwd_from_id() const { return vflags.v & flag_fwd_from_id; } bool has_fwd_date() const { return vflags.v & flag_fwd_date; } + bool has_fwd_post() const { return vflags.v & flag_fwd_post; } bool has_via_bot_id() const { return vflags.v & flag_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_media() const { return vflags.v & flag_media; } @@ -11230,7 +11277,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { public: MTPDupdateShortMessage() { } - MTPDupdateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vuser_id(_user_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { + MTPDupdateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vuser_id(_user_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPint vflags; @@ -11242,6 +11289,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { MTPint vdate; MTPPeer vfwd_from_id; MTPint vfwd_date; + MTPint vfwd_post; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPVector ventities; @@ -11251,8 +11299,10 @@ class MTPDupdateShortMessage : public mtpDataImpl { flag_out = (1 << 1), flag_mentioned = (1 << 4), flag_media_unread = (1 << 5), + flag_silent = (1 << 13), flag_fwd_from_id = (1 << 2), flag_fwd_date = (1 << 2), + flag_fwd_post = (1 << 12), flag_via_bot_id = (1 << 11), flag_reply_to_msg_id = (1 << 3), flag_entities = (1 << 7), @@ -11262,8 +11312,10 @@ class MTPDupdateShortMessage : public mtpDataImpl { bool is_out() const { return vflags.v & flag_out; } bool is_mentioned() const { return vflags.v & flag_mentioned; } bool is_media_unread() const { return vflags.v & flag_media_unread; } + bool is_silent() const { return vflags.v & flag_silent; } bool has_fwd_from_id() const { return vflags.v & flag_fwd_from_id; } bool has_fwd_date() const { return vflags.v & flag_fwd_date; } + bool has_fwd_post() const { return vflags.v & flag_fwd_post; } bool has_via_bot_id() const { return vflags.v & flag_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_entities() const { return vflags.v & flag_entities; } @@ -11273,7 +11325,7 @@ class MTPDupdateShortChatMessage : public mtpDataImpl &_entities) : vflags(_flags), vid(_id), vfrom_id(_from_id), vchat_id(_chat_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { + MTPDupdateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vfrom_id(_from_id), vchat_id(_chat_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPint vflags; @@ -11286,6 +11338,7 @@ class MTPDupdateShortChatMessage : public mtpDataImpl ventities; @@ -11295,8 +11348,10 @@ class MTPDupdateShortChatMessage : public mtpDataImpl { enum { flag_ipv6 = (1 << 0), flag_media_only = (1 << 1), + flag_tcpo_only = (1 << 2), }; bool is_ipv6() const { return vflags.v & flag_ipv6; } bool is_media_only() const { return vflags.v & flag_media_only; } + bool is_tcpo_only() const { return vflags.v & flag_tcpo_only; } }; class MTPDconfig : public mtpDataImpl { @@ -13023,6 +13082,16 @@ class MTPDmessages_botResults : public mtpDataImpl { bool has_next_offset() const { return vflags.v & flag_next_offset; } }; +class MTPDexportedMessageLink : public mtpDataImpl { +public: + MTPDexportedMessageLink() { + } + MTPDexportedMessageLink(const MTPstring &_link) : vlink(_link) { + } + + MTPstring vlink; +}; + // RPC methods class MTPreq_pq { // RPC method 'req_pq' @@ -16206,6 +16275,7 @@ class MTPmessages_sendMessage { // RPC method 'messages.sendMessage' enum { flag_no_webpage = (1 << 1), flag_broadcast = (1 << 4), + flag_silent = (1 << 5), flag_reply_to_msg_id = (1 << 0), flag_reply_markup = (1 << 2), flag_entities = (1 << 3), @@ -16213,6 +16283,7 @@ class MTPmessages_sendMessage { // RPC method 'messages.sendMessage' bool is_no_webpage() const { return vflags.v & flag_no_webpage; } bool is_broadcast() const { return vflags.v & flag_broadcast; } + bool is_silent() const { return vflags.v & flag_silent; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & flag_reply_markup; } bool has_entities() const { return vflags.v & flag_entities; } @@ -16275,11 +16346,13 @@ class MTPmessages_sendMedia { // RPC method 'messages.sendMedia' enum { flag_broadcast = (1 << 4), + flag_silent = (1 << 5), flag_reply_to_msg_id = (1 << 0), flag_reply_markup = (1 << 2), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } + bool is_silent() const { return vflags.v & flag_silent; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & flag_reply_markup; } @@ -16338,9 +16411,11 @@ class MTPmessages_forwardMessages { // RPC method 'messages.forwardMessages' enum { flag_broadcast = (1 << 4), + flag_silent = (1 << 5), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } + bool is_silent() const { return vflags.v & flag_silent; } uint32 innerLength() const { return vflags.innerLength() + vfrom_peer.innerLength() + vid.innerLength() + vrandom_id.innerLength() + vto_peer.innerLength(); @@ -18230,10 +18305,12 @@ class MTPmessages_sendInlineBotResult { // RPC method 'messages.sendInlineBotRes enum { flag_broadcast = (1 << 4), + flag_silent = (1 << 5), flag_reply_to_msg_id = (1 << 0), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } + bool is_silent() const { return vflags.v & flag_silent; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } uint32 innerLength() const { @@ -20133,6 +20210,90 @@ class MTPchannels_ToggleInvites : public MTPBoxed { } }; +class MTPchannels_exportMessageLink { // RPC method 'channels.exportMessageLink' +public: + MTPInputChannel vchannel; + MTPint vid; + + MTPchannels_exportMessageLink() { + } + MTPchannels_exportMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportMessageLink) { + read(from, end, cons); + } + MTPchannels_exportMessageLink(const MTPInputChannel &_channel, MTPint _id) : vchannel(_channel), vid(_id) { + } + + uint32 innerLength() const { + return vchannel.innerLength() + vid.innerLength(); + } + mtpTypeId type() const { + return mtpc_channels_exportMessageLink; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_exportMessageLink) { + vchannel.read(from, end); + vid.read(from, end); + } + void write(mtpBuffer &to) const { + vchannel.write(to); + vid.write(to); + } + + typedef MTPExportedMessageLink ResponseType; +}; +class MTPchannels_ExportMessageLink : public MTPBoxed { +public: + MTPchannels_ExportMessageLink() { + } + MTPchannels_ExportMessageLink(const MTPchannels_exportMessageLink &v) : MTPBoxed(v) { + } + MTPchannels_ExportMessageLink(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPchannels_ExportMessageLink(const MTPInputChannel &_channel, MTPint _id) : MTPBoxed(MTPchannels_exportMessageLink(_channel, _id)) { + } +}; + +class MTPchannels_toggleSignatures { // RPC method 'channels.toggleSignatures' +public: + MTPInputChannel vchannel; + MTPBool venabled; + + MTPchannels_toggleSignatures() { + } + MTPchannels_toggleSignatures(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleSignatures) { + read(from, end, cons); + } + MTPchannels_toggleSignatures(const MTPInputChannel &_channel, MTPBool _enabled) : vchannel(_channel), venabled(_enabled) { + } + + uint32 innerLength() const { + return vchannel.innerLength() + venabled.innerLength(); + } + mtpTypeId type() const { + return mtpc_channels_toggleSignatures; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_toggleSignatures) { + vchannel.read(from, end); + venabled.read(from, end); + } + void write(mtpBuffer &to) const { + vchannel.write(to); + venabled.write(to); + } + + typedef MTPUpdates ResponseType; +}; +class MTPchannels_ToggleSignatures : public MTPBoxed { +public: + MTPchannels_ToggleSignatures() { + } + MTPchannels_ToggleSignatures(const MTPchannels_toggleSignatures &v) : MTPBoxed(v) { + } + MTPchannels_ToggleSignatures(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPchannels_ToggleSignatures(const MTPInputChannel &_channel, MTPBool _enabled) : MTPBoxed(MTPchannels_toggleSignatures(_channel, _enabled)) { + } +}; + // Inline methods definition inline MTPresPQ::MTPresPQ() : mtpDataOwner(new MTPDresPQ()) { @@ -22885,7 +23046,7 @@ inline uint32 MTPmessage::innerLength() const { } case mtpc_message: { const MTPDmessage &v(c_message()); - return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vmessage.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_views() ? v.vviews.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vmessage.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_views() ? v.vviews.innerLength() : 0); } case mtpc_messageService: { const MTPDmessageService &v(c_messageService()); @@ -22915,6 +23076,7 @@ inline void MTPmessage::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vto_id.read(from, end); if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } + if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } v.vdate.read(from, end); @@ -22951,6 +23113,7 @@ inline void MTPmessage::write(mtpBuffer &to) const { v.vto_id.write(to); if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); if (v.has_fwd_date()) v.vfwd_date.write(to); + if (v.has_fwd_post()) v.vfwd_post.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); v.vdate.write(to); @@ -22988,8 +23151,8 @@ inline MTPmessage::MTPmessage(MTPDmessageService *_data) : mtpDataOwner(_data), inline MTPmessage MTP_messageEmpty(MTPint _id) { return MTPmessage(new MTPDmessageEmpty(_id)); } -inline MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) { - return MTPmessage(new MTPDmessage(_flags, _id, _from_id, _to_id, _fwd_from_id, _fwd_date, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views)); +inline MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) { + return MTPmessage(new MTPDmessage(_flags, _id, _from_id, _to_id, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views)); } inline MTPmessage MTP_messageService(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _date, const MTPMessageAction &_action) { return MTPmessage(new MTPDmessageService(_flags, _id, _from_id, _to_id, _date, _action)); @@ -25946,11 +26109,11 @@ inline uint32 MTPupdates::innerLength() const { switch (_type) { case mtpc_updateShortMessage: { const MTPDupdateShortMessage &v(c_updateShortMessage()); - return v.vflags.innerLength() + v.vid.innerLength() + v.vuser_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + v.vuser_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShortChatMessage: { const MTPDupdateShortChatMessage &v(c_updateShortChatMessage()); - return v.vflags.innerLength() + v.vid.innerLength() + v.vfrom_id.innerLength() + v.vchat_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + v.vfrom_id.innerLength() + v.vchat_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShort: { const MTPDupdateShort &v(c_updateShort()); @@ -25991,6 +26154,7 @@ inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vdate.read(from, end); if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } + if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } if (v.has_entities()) { v.ventities.read(from, end); } else { v.ventities = MTPVector(); } @@ -26008,6 +26172,7 @@ inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vdate.read(from, end); if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } + if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } if (v.has_entities()) { v.ventities.read(from, end); } else { v.ventities = MTPVector(); } @@ -26064,6 +26229,7 @@ inline void MTPupdates::write(mtpBuffer &to) const { v.vdate.write(to); if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); if (v.has_fwd_date()) v.vfwd_date.write(to); + if (v.has_fwd_post()) v.vfwd_post.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); @@ -26080,6 +26246,7 @@ inline void MTPupdates::write(mtpBuffer &to) const { v.vdate.write(to); if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); if (v.has_fwd_date()) v.vfwd_date.write(to); + if (v.has_fwd_post()) v.vfwd_post.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); @@ -26145,11 +26312,11 @@ inline MTPupdates::MTPupdates(MTPDupdateShortSentMessage *_data) : mtpDataOwner( inline MTPupdates MTP_updatesTooLong() { return MTPupdates(mtpc_updatesTooLong); } -inline MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { - return MTPupdates(new MTPDupdateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _via_bot_id, _reply_to_msg_id, _entities)); +inline MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { + return MTPupdates(new MTPDupdateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _entities)); } -inline MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { - return MTPupdates(new MTPDupdateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _via_bot_id, _reply_to_msg_id, _entities)); +inline MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { + return MTPupdates(new MTPDupdateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _entities)); } inline MTPupdates MTP_updateShort(const MTPUpdate &_update, MTPint _date) { return MTPupdates(new MTPDupdateShort(_update, _date)); @@ -30417,5 +30584,32 @@ inline MTPmessages_botResults MTP_messages_botResults(MTPint _flags, const MTPlo return MTPmessages_botResults(new MTPDmessages_botResults(_flags, _query_id, _next_offset, _results)); } +inline MTPexportedMessageLink::MTPexportedMessageLink() : mtpDataOwner(new MTPDexportedMessageLink()) { +} + +inline uint32 MTPexportedMessageLink::innerLength() const { + const MTPDexportedMessageLink &v(c_exportedMessageLink()); + return v.vlink.innerLength(); +} +inline mtpTypeId MTPexportedMessageLink::type() const { + return mtpc_exportedMessageLink; +} +inline void MTPexportedMessageLink::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + if (cons != mtpc_exportedMessageLink) throw mtpErrorUnexpected(cons, "MTPexportedMessageLink"); + + if (!data) setData(new MTPDexportedMessageLink()); + MTPDexportedMessageLink &v(_exportedMessageLink()); + v.vlink.read(from, end); +} +inline void MTPexportedMessageLink::write(mtpBuffer &to) const { + const MTPDexportedMessageLink &v(c_exportedMessageLink()); + v.vlink.write(to); +} +inline MTPexportedMessageLink::MTPexportedMessageLink(MTPDexportedMessageLink *_data) : mtpDataOwner(_data) { +} +inline MTPexportedMessageLink MTP_exportedMessageLink(const MTPstring &_link) { + return MTPexportedMessageLink(new MTPDexportedMessageLink(_link)); +} + // Human-readable text serialization void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons); diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 499823df8e356f..8c3a8a5ddac29d 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -209,7 +209,7 @@ userStatusLastMonth#77ebc742 = UserStatus; chatEmpty#9ba2d800 id:int = Chat; chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat; chatForbidden#7328bdb id:int title:string = Chat; -channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true invites_enabled:flags.10?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; +channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true admin_invites:flags.10?true signatures:flags.11?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; channelForbidden#2d85832c id:int access_hash:long title:string = Chat; chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector = ChatFull; @@ -226,7 +226,7 @@ chatPhotoEmpty#37c1011c = ChatPhoto; chatPhoto#6153276a photo_small:FileLocation photo_big:FileLocation = ChatPhoto; messageEmpty#83e5de54 id:int = Message; -message#c992e15c flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:flags.8?int to_id:Peer fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int = Message; +message#ef11cef6 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int = Message; messageService#c06b9607 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:flags.8?int to_id:Peer date:int action:MessageAction = Message; messageMediaEmpty#3ded6320 = MessageMedia; @@ -391,8 +391,8 @@ updates.difference#f49ca0 new_messages:Vector new_encrypted_messages:Ve updates.differenceSlice#a8fb1981 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector intermediate_state:updates.State = updates.Difference; updatesTooLong#e317af7e = Updates; -updateShortMessage#13e4deaa flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; -updateShortChatMessage#248afa62 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShortMessage#3afbe9d1 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShortChatMessage#ca2ef195 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; updateShort#78d4dec1 update:Update date:int = Updates; updatesCombined#725b04c3 updates:Vector users:Vector chats:Vector date:int seq_start:int seq:int = Updates; updates#74ae4240 updates:Vector users:Vector chats:Vector date:int seq:int = Updates; @@ -405,7 +405,7 @@ photos.photo#20212ca8 photo:Photo users:Vector = photos.Photo; upload.file#96a18d5 type:storage.FileType mtime:int bytes:bytes = upload.File; -dcOption#5d8c6cc flags:# ipv6:flags.0?true media_only:flags.1?true id:int ip_address:string port:int = DcOption; +dcOption#5d8c6cc flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true id:int ip_address:string port:int = DcOption; config#6bbc5f8 date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int disabled_features:Vector = Config; @@ -639,6 +639,8 @@ botInlineResult#9bebaeb9 flags:# id:string type:string title:flags.1?string desc messages.botResults#1170b0a3 flags:# gallery:flags.0?true query_id:long next_offset:flags.1?string results:Vector = messages.BotResults; +exportedMessageLink#1f486803 link:string = ExportedMessageLink; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -714,9 +716,9 @@ messages.deleteHistory#b7c13bd9 peer:InputPeer max_id:int = messages.AffectedHis messages.deleteMessages#a5f18925 id:Vector = messages.AffectedMessages; messages.receivedMessages#5a954c0 max_id:int = Vector; messages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool; -messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; -messages.sendMedia#c8f16791 flags:# broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates; -messages.forwardMessages#708e0195 flags:# broadcast:flags.4?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer = Updates; +messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; +messages.sendMedia#c8f16791 flags:# broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates; +messages.forwardMessages#708e0195 flags:# broadcast:flags.4?true silent:flags.5?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer = Updates; messages.reportSpam#cf1592db peer:InputPeer = Bool; messages.getChats#3c6aa187 id:Vector = messages.Chats; messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull; @@ -760,7 +762,7 @@ messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs; messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool; messages.getInlineBotResults#9324600d bot:InputUser query:string offset:string = messages.BotResults; messages.setInlineBotResults#3f23ec12 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector cache_time:int next_offset:flags.2?string = Bool; -messages.sendInlineBotResult#b16e06fe flags:# broadcast:flags.4?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates; +messages.sendInlineBotResult#b16e06fe flags:# broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates; updates.getState#edd4882a = updates.State; updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference; @@ -810,3 +812,5 @@ channels.kickFromChannel#a672de14 channel:InputChannel user_id:InputUser kicked: channels.exportInvite#c7560885 channel:InputChannel = ExportedChatInvite; channels.deleteChannel#c0111fe3 channel:InputChannel = Updates; channels.toggleInvites#49609307 channel:InputChannel enabled:Bool = Updates; +channels.exportMessageLink#c846d22d channel:InputChannel id:int = ExportedMessageLink; +channels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index f00799cf63d41d..d0246cf7766e67 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1306,16 +1306,17 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (_selectedMsgId) repaintItem(_selectedMsgId, -1); } else if (!ignoreMousedItem && App::mousedItem() && App::mousedItem()->channelId() == itemChannel(_mousedItem) && App::mousedItem()->id == itemMsgId(_mousedItem)) { _menu = new PopupMenu(); - if ((_contextMenuLnk && dynamic_cast(_contextMenuLnk.data()))) { + QLatin1String linktype = _contextMenuLnk ? _contextMenuLnk->type() : qstr(""); + if (linktype == qstr("TextLink") || linktype == qstr("LocationLink")) { _menu->addAction(lang(lng_context_open_link), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_link), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if ((_contextMenuLnk && dynamic_cast(_contextMenuLnk.data()))) { + } else if (linktype == qstr("EmailLink")) { _menu->addAction(lang(lng_context_open_email), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_email), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + } else if (linktype == qstr("MentionLink")) { _menu->addAction(lang(lng_context_open_mention), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_mention), this, SLOT(copyContextUrl()))->setEnabled(true); - } else if (_contextMenuLnk && dynamic_cast(_contextMenuLnk.data())) { + } else if (linktype == qstr("HashtagLink")) { _menu->addAction(lang(lng_context_open_hashtag), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_hashtag), this, SLOT(copyContextUrl()))->setEnabled(true); } else { diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 313709f181fb58..665ed2b66850d9 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -1077,6 +1077,15 @@ void ProfileInner::mouseReleaseEvent(QMouseEvent *e) { connect(box, SIGNAL(confirmed()), this, SLOT(onKickConfirm())); Ui::showLayer(box); } + + _kickDown = 0; + if (!_photoLink && (_peerUser || (_peerChat && !_peerChat->canEdit()) || (_peerChannel && !_amCreator))) { + setCursor((_kickOver || _kickDown || textlnkOver()) ? style::cur_pointer : style::cur_default); + } else { + setCursor((_kickOver || _kickDown || _photoOver || textlnkOver()) ? style::cur_pointer : style::cur_default); + } + update(); + if (textlnkDown()) { TextLinkPtr lnk = textlnkDown(); textlnkDown(TextLinkPtr()); @@ -1087,17 +1096,10 @@ void ProfileInner::mouseReleaseEvent(QMouseEvent *e) { if (reBotCommand().match(lnk->encoded()).hasMatch()) { Ui::showPeerHistory(_peer, ShowAtTheEndMsgId); } - lnk->onClick(e->button()); + App::activateTextLink(lnk, e->button()); } } } - _kickDown = 0; - if (!_photoLink && (_peerUser || (_peerChat && !_peerChat->canEdit()) || (_peerChannel && !_amCreator))) { - setCursor((_kickOver || _kickDown || textlnkOver()) ? style::cur_pointer : style::cur_default); - } else { - setCursor((_kickOver || _kickDown || _photoOver || textlnkOver()) ? style::cur_pointer : style::cur_default); - } - update(); } void ProfileInner::onKickConfirm() { diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 6b1e982da9d4b0..146e6fc759777b 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -1488,3 +1488,7 @@ bool linuxMoveFile(const char *from, const char *to) { return true; } + +bool psLaunchMaps(const QString &lat, const QString &lon) { + return false; +} diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index 8a527b1f73f418..748a5639c96c5e 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -194,3 +194,5 @@ class PsFileBookmark { }; bool linuxMoveFile(const char *from, const char *to); + +bool psLaunchMaps(const QString &lat, const QString &lon); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 84349d6160e61c..edaaa92ab152a5 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -926,3 +926,7 @@ QString strNeedToRefresh2() { const uint32 letters[] = { 0x8F001546, 0xAF007A49, 0xB8002B5F, 0x1A000B54, 0xD003E49, 0xE0003663, 0x4900796F, 0x500836E, 0x9A00D156, 0x5E00FF69, 0x5900C765, 0x3D00D177 }; return strMakeFromLetters(letters, sizeof(letters) / sizeof(letters[0])); } + +bool psLaunchMaps(const QString &lat, const QString &lon) { + return false; +} diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index 70ca3ade6d62db..979e9825fd55fc 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -223,3 +223,5 @@ QString strStyleOfInterface(); QString strNeedToReload(); QString strNeedToRefresh1(); QString strNeedToRefresh2(); + +bool psLaunchMaps(const QString &lat, const QString &lon); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 044827de67dbd6..a2c4e879ee9855 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -3650,3 +3650,7 @@ bool InitToastManager() { QDir().mkpath(cWorkingDir() + qsl("tdata/temp")); return true; } + +bool psLaunchMaps(const QString &lat, const QString &lon) { + return QDesktopServices::openUrl(qsl("bingmaps:?lvl=16&collection=point.") + lat + '_' + lon + '_' + qsl("Point")); +} diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index ce46b80cc9aef2..90bc466c460262 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -194,3 +194,5 @@ class PsFileBookmark { } }; + +bool psLaunchMaps(const QString &lat, const QString &lon); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 3803850684f84f..1c05b266ab1fe9 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -688,11 +688,12 @@ void PhotoCancelLink::onClick(Qt::MouseButton button) const { if (!data->date) return; if (data->uploading()) { - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - if (HistoryMessage *msg = item->toHistoryMessage()) { - if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast(msg->getMedia())->photo() == data) { - App::contextItem(item); - App::main()->deleteLayer(-2); + if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) { + if (HistoryMessage *msg = item->toHistoryMessage()) { + if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast(msg->getMedia())->photo() == data) { + App::contextItem(item); + App::main()->deleteLayer(-2); + } } } } else { @@ -964,11 +965,12 @@ void DocumentCancelLink::onClick(Qt::MouseButton button) const { if (!data->date) return; if (data->uploading()) { - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - if (HistoryMessage *msg = item->toHistoryMessage()) { - if (msg->getMedia() && msg->getMedia()->getDocument() == data) { - App::contextItem(item); - App::main()->deleteLayer(-2); + if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) { + if (HistoryMessage *msg = item->toHistoryMessage()) { + if (msg->getMedia() && msg->getMedia()->getDocument() == data) { + App::contextItem(item); + App::main()->deleteLayer(-2); + } } } } else { diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 625b300db3a350..3afef5e2b1eba7 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -156,6 +156,7 @@ inline bool isClientMsgId(MsgId id) { } static const MsgId ShowAtTheEndMsgId = -0x40000000; static const MsgId SwitchAtTopMsgId = -0x3FFFFFFF; +static const MsgId ShowAtProfileMsgId = -0x3FFFFFFE; static const MsgId ServerMaxMsgId = 0x3FFFFFFF; static const MsgId ShowAtUnreadMsgId = 0; @@ -622,12 +623,15 @@ class ChannelData : public PeerData { bool canViewParticipants() const { return flagsFull & MTPDchannelFull::flag_can_view_participants; } + bool addsSignature() const { + return flags & MTPDchannel::flag_signatures; + } bool isForbidden; bool isVerified() const { return flags & MTPDchannel::flag_verified; } bool canAddParticipants() const { - return amCreator() || amEditor() || (flags & MTPDchannel::flag_invites_enabled); + return amCreator() || amEditor() || (flags & MTPDchannel::flag_admin_invites); } // ImagePtr photoFull; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 52f823b27eda6a..83679b68de30e9 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -210,8 +210,8 @@ void NotifyWindow::updateNotifyDisplay() { item->drawInDialog(p, r, active, textCachedFor, itemTextCache); } else { p.setFont(st::dlgHistFont->f); - if (item->hasFromName() && !item->fromChannel()) { - itemTextCache.setText(st::dlgHistFont, item->from()->name); + if (item->hasFromName() && !item->isPost()) { + itemTextCache.setText(st::dlgHistFont, item->author()->name); p.setPen(st::dlgSystemColor->p); itemTextCache.drawElided(p, r.left(), r.top(), r.width(), st::dlgHistFont->height); r.setTop(r.top() + st::dlgHistFont->height); @@ -363,9 +363,22 @@ NotifyWindow::~NotifyWindow() { if (App::wnd()) App::wnd()->notifyShowNext(this); } -Window::Window(QWidget *parent) : PsMainWindow(parent), _serviceHistoryRequest(0), title(0), -_passcode(0), intro(0), main(0), settings(0), layerBg(0), _isActive(false), -_connecting(0), _clearManager(0), dragging(false), _inactivePress(false), _shouldLockAt(0), _mediaView(0) { +Window::Window(QWidget *parent) : PsMainWindow(parent) +, _serviceHistoryRequest(0) +, title(0) +, _passcode(0) +, intro(0) +, main(0) +, settings(0) +, layerBg(0) +, _stickerPreview(0) +, _isActive(false) +, _connecting(0) +, _clearManager(0) +, dragging(false) +, _inactivePress(false) +, _shouldLockAt(0) +, _mediaView(0) { icon16 = icon256.scaledToWidth(16, Qt::SmoothTransformation); icon32 = icon256.scaledToWidth(32, Qt::SmoothTransformation); @@ -842,6 +855,23 @@ bool Window::ui_isMediaViewShown() { return _mediaView && !_mediaView->isHidden(); } +void Window::ui_showStickerPreview(DocumentData *sticker) { + if (!sticker || ((!sticker->isAnimation() || !sticker->loaded()) && !sticker->sticker())) return; + if (!_stickerPreview) { + _stickerPreview = new StickerPreviewWidget(this); + resizeEvent(0); + } + if (_stickerPreview->isHidden()) { + fixOrder(); + } + _stickerPreview->showPreview(sticker); +} + +void Window::ui_hideStickerPreview() { + if (!_stickerPreview) return; + _stickerPreview->hidePreview(); +} + void Window::showConnecting(const QString &text, const QString &reconnect) { if (_connecting) { _connecting->set(text, reconnect); @@ -1169,6 +1199,7 @@ void Window::layerFinishedHide(BackgroundWidget *was) { void Window::fixOrder() { title->raise(); if (layerBg) layerBg->raise(); + if (_stickerPreview) _stickerPreview->raise(); if (_connecting) _connecting->raise(); } @@ -1242,6 +1273,7 @@ void Window::resizeEvent(QResizeEvent *e) { } title->setGeometry(0, 0, width(), st::titleHeight); if (layerBg) layerBg->resize(width(), height()); + if (_stickerPreview) _stickerPreview->setGeometry(0, title->height(), width(), height() - title->height()); if (_connecting) _connecting->setGeometry(0, height() - _connecting->height(), _connecting->width(), _connecting->height()); emit resized(QSize(width(), height() - st::titleHeight)); } @@ -1317,6 +1349,11 @@ void Window::notifySchedule(History *history, HistoryItem *item) { PeerData *notifyByFrom = (!history->peer->isUser() && item->mentionsMe()) ? item->from() : 0; + if (item->isSilent()) { + history->popNotification(item); + return; + } + bool haveSetting = (history->peer->notify != UnknownNotifySettings); if (haveSetting) { if (history->peer->notify != EmptyNotifySettings && history->peer->notify->mute > unixtime()) { @@ -1824,6 +1861,7 @@ void Window::updateIsActive(int timeout) { Window::~Window() { notifyClearFast(); + deleteAndMark(_stickerPreview); delete _clearManager; delete _connecting; delete _mediaView; @@ -2730,7 +2768,7 @@ void LastCrashedWindow::onUpdateFailed() { void LastCrashedWindow::onContinue() { if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); - } else { + } else if (!Global::started()) { Sandbox::launch(); } close(); diff --git a/Telegram/SourceFiles/window.h b/Telegram/SourceFiles/window.h index af821859f0381b..ab34c00d9271cf 100644 --- a/Telegram/SourceFiles/window.h +++ b/Telegram/SourceFiles/window.h @@ -121,6 +121,8 @@ public slots: typedef QList NotifyWindows; +class StickerPreviewWidget; + class Window : public PsMainWindow { Q_OBJECT @@ -239,6 +241,8 @@ class Window : public PsMainWindow { void ui_showLayer(LayeredWidget *box, ShowLayerOptions options); bool ui_isLayerShown(); bool ui_isMediaViewShown(); + void ui_showStickerPreview(DocumentData *sticker); + void ui_hideStickerPreview(); public slots: @@ -311,6 +315,7 @@ public slots: MainWidget *main; SettingsWidget *settings; BackgroundWidget *layerBg; + StickerPreviewWidget *_stickerPreview; QTimer _isActiveTimer; bool _isActive; From 57b771c879499f13eeac0b9f37d0ebe39782e382 Mon Sep 17 00:00:00 2001 From: John Preston Date: Wed, 17 Feb 2016 20:14:09 +0300 Subject: [PATCH 077/133] some possible crashes fixed, showing maps app on os x --- Telegram/SourceFiles/apiwrap.cpp | 4 +++- Telegram/SourceFiles/dialogswidget.cpp | 2 ++ Telegram/SourceFiles/history.cpp | 3 ++- Telegram/SourceFiles/historywidget.cpp | 2 +- Telegram/SourceFiles/pspecific_mac.cpp | 8 ++++---- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index ac903405903945..e529b1f74d1f5e 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -346,7 +346,9 @@ void ApiWrap::gotUserFull(PeerData *peer, const MTPUserFull &result, mtpRequestI App::feedUsers(MTP_vector(1, d.vuser), false); App::feedPhoto(d.vprofile_photo); App::feedUserLink(MTP_int(peerToUser(peer->id)), d.vlink.c_contacts_link().vmy_link, d.vlink.c_contacts_link().vforeign_link, false); - App::main()->gotNotifySetting(MTP_inputNotifyPeer(peer->input), d.vnotify_settings); + if (App::main()) { + App::main()->gotNotifySetting(MTP_inputNotifyPeer(peer->input), d.vnotify_settings); + } peer->asUser()->setBotInfo(d.vbot_info); peer->asUser()->blocked = mtpIsTrue(d.vblocked) ? UserIsBlocked : UserIsNotBlocked; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 889580af448950..fca26a14b19391 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -1366,6 +1366,8 @@ void DialogsInner::selectSkipPage(int32 pixels, int32 direction) { } void DialogsInner::loadPeerPhotos(int32 yFrom) { + if (!parentWidget()) return; + int32 yTo = yFrom + parentWidget()->height() * 5; MTP::clearLoaderPriorities(); if (_state == DefaultState) { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index eeda88bf71eddf..66f3608474fa6e 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -5982,7 +5982,8 @@ HistoryMessageVia::HistoryMessageVia(Interfaces *) } void HistoryMessageVia::create(int32 userId) { - if (bot = App::userLoaded(peerFromUser(userId))) { + bot = App::userLoaded(peerFromUser(userId)); + if (bot) { maxWidth = st::msgServiceNameFont->width(lng_inline_bot_via(lt_inline_bot, '@' + bot->username)); lnk.reset(new ViaInlineBotLink(bot)); } diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index d197e545937ea4..24105a3722388d 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -7159,7 +7159,7 @@ void HistoryWidget::drawRecording(Painter &p) { } void HistoryWidget::paintEvent(QPaintEvent *e) { - if (App::wnd() && App::wnd()->contentOverlapped(this, e)) return; + if (!App::main() || (App::wnd() && App::wnd()->contentOverlapped(this, e))) return; Painter p(this); QRect r(e->rect()); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index edaaa92ab152a5..c3bbde72bb6543 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -902,6 +902,10 @@ QByteArray psPathBookmark(const QString &path) { return objc_pathBookmark(path); } +bool psLaunchMaps(const QString &lat, const QString &lon) { + return QDesktopServices::openUrl(qsl("https://maps.apple.com/?q=Point&z=16&ll=%1,%2").arg(lat).arg(lon)); +} + QString strNotificationAboutThemeChange() { const uint32 letters[] = { 0xE9005541, 0x5600DC70, 0x88001570, 0xF500D86C, 0x8100E165, 0xEE005949, 0x2900526E, 0xAE00FB74, 0x96000865, 0x7000CD72, 0x3B001566, 0x5F007361, 0xAE00B663, 0x74009A65, 0x29003054, 0xC6002668, 0x98003865, 0xFA00336D, 0xA3007A65, 0x93001443, 0xBB007868, 0xE100E561, 0x3500366E, 0xC0007A67, 0x200CA65, 0xBE00DF64, 0xE300BB4E, 0x2900D26F, 0xD500D374, 0xE900E269, 0x86008F66, 0xC4006669, 0x1C00A863, 0xE600A761, 0x8E00EE74, 0xB300B169, 0xCF00B36F, 0xE600D36E }; return strMakeFromLetters(letters, sizeof(letters) / sizeof(letters[0])); @@ -926,7 +930,3 @@ QString strNeedToRefresh2() { const uint32 letters[] = { 0x8F001546, 0xAF007A49, 0xB8002B5F, 0x1A000B54, 0xD003E49, 0xE0003663, 0x4900796F, 0x500836E, 0x9A00D156, 0x5E00FF69, 0x5900C765, 0x3D00D177 }; return strMakeFromLetters(letters, sizeof(letters) / sizeof(letters[0])); } - -bool psLaunchMaps(const QString &lat, const QString &lon) { - return false; -} From 803d1a429d938ac5a5ee6fb71a60d0d3cb235dbd Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 18 Feb 2016 19:36:33 +0300 Subject: [PATCH 078/133] scheme updated, config vars moved to Global namespace --- Telegram/SourceFiles/apiwrap.cpp | 4 +- Telegram/SourceFiles/app.cpp | 81 +-- Telegram/SourceFiles/app.h | 1 + Telegram/SourceFiles/application.cpp | 8 +- Telegram/SourceFiles/boxes/addcontactbox.cpp | 2 +- Telegram/SourceFiles/boxes/confirmbox.cpp | 2 +- Telegram/SourceFiles/boxes/contactsbox.cpp | 18 +- Telegram/SourceFiles/facades.cpp | 36 +- Telegram/SourceFiles/facades.h | 17 + Telegram/SourceFiles/history.cpp | 59 +-- Telegram/SourceFiles/history.h | 48 +- Telegram/SourceFiles/historywidget.cpp | 18 +- Telegram/SourceFiles/layout.cpp | 6 +- Telegram/SourceFiles/localstorage.cpp | 16 +- Telegram/SourceFiles/mainwidget.cpp | 89 +++- Telegram/SourceFiles/mediaview.cpp | 12 +- Telegram/SourceFiles/mtproto/mtp.cpp | 12 +- Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp | 4 + Telegram/SourceFiles/mtproto/mtpCoreTypes.h | 7 +- Telegram/SourceFiles/mtproto/mtpDC.cpp | 20 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 166 +++++-- Telegram/SourceFiles/mtproto/mtpScheme.h | 468 +++++++++++++++--- Telegram/SourceFiles/mtproto/scheme.tl | 19 +- Telegram/SourceFiles/profilewidget.cpp | 16 +- Telegram/SourceFiles/settings.cpp | 13 +- Telegram/SourceFiles/settings.h | 11 - Telegram/SourceFiles/structs.cpp | 6 +- Telegram/SourceFiles/types.h | 4 +- Telegram/SourceFiles/window.cpp | 12 +- 29 files changed, 848 insertions(+), 327 deletions(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index e529b1f74d1f5e..29550022599b20 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -421,13 +421,13 @@ void ApiWrap::requestLastParticipants(ChannelData *peer, bool fromStart) { return; } } - mtpRequestId req = MTP::send(MTPchannels_GetParticipants(peer->inputChannel, MTP_channelParticipantsRecent(), MTP_int(fromStart ? 0 : peer->mgInfo->lastParticipants.size()), MTP_int(cMaxGroupCount())), rpcDone(&ApiWrap::lastParticipantsDone, peer), rpcFail(&ApiWrap::lastParticipantsFail, peer)); + mtpRequestId req = MTP::send(MTPchannels_GetParticipants(peer->inputChannel, MTP_channelParticipantsRecent(), MTP_int(fromStart ? 0 : peer->mgInfo->lastParticipants.size()), MTP_int(Global::ChatSizeMax())), rpcDone(&ApiWrap::lastParticipantsDone, peer), rpcFail(&ApiWrap::lastParticipantsFail, peer)); _participantsRequests.insert(peer, fromStart ? req : -req); } void ApiWrap::requestBots(ChannelData *peer) { if (!peer || !peer->isMegagroup() || _botsRequests.contains(peer)) return; - _botsRequests.insert(peer, MTP::send(MTPchannels_GetParticipants(peer->inputChannel, MTP_channelParticipantsBots(), MTP_int(0), MTP_int(cMaxGroupCount())), rpcDone(&ApiWrap::lastParticipantsDone, peer), rpcFail(&ApiWrap::lastParticipantsFail, peer))); + _botsRequests.insert(peer, MTP::send(MTPchannels_GetParticipants(peer->inputChannel, MTP_channelParticipantsBots(), MTP_int(0), MTP_int(Global::ChatSizeMax())), rpcDone(&ApiWrap::lastParticipantsDone, peer), rpcFail(&ApiWrap::lastParticipantsFail, peer))); } void ApiWrap::gotChat(PeerData *peer, const MTPmessages_Chats &result) { diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 22cad42f6e15fc..367f4f90b4522e 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -350,7 +350,7 @@ namespace App { for (QVector::const_iterator i = v.cbegin(), e = v.cend(); i != e; ++i) { const MTPuser &user(*i); data = 0; - bool wasContact = false; + bool wasContact = false, minimal = false; const MTPUserStatus *status = 0, emptyStatus = MTP_userStatusEmpty(); switch (user.type()) { @@ -372,19 +372,22 @@ namespace App { } break; case mtpc_user: { const MTPDuser &d(user.c_user()); + minimal = d.is_min(); PeerId peer(peerFromUser(d.vid.v)); data = App::user(peer); - data->flags = d.vflags.v; - if (d.is_self()) { - data->input = MTP_inputPeerSelf(); - data->inputUser = MTP_inputUserSelf(); - } else if (!d.has_access_hash()) { - data->input = MTP_inputPeerUser(d.vid, MTP_long((data->access == UserNoAccess) ? 0 : data->access)); - data->inputUser = MTP_inputUser(d.vid, MTP_long((data->access == UserNoAccess) ? 0 : data->access)); - } else { - data->input = MTP_inputPeerUser(d.vid, d.vaccess_hash); - data->inputUser = MTP_inputUser(d.vid, d.vaccess_hash); + if (!minimal) { + data->flags = d.vflags.v; + if (d.is_self()) { + data->input = MTP_inputPeerSelf(); + data->inputUser = MTP_inputUserSelf(); + } else if (!d.has_access_hash()) { + data->input = MTP_inputPeerUser(d.vid, MTP_long((data->access == UserNoAccess) ? 0 : data->access)); + data->inputUser = MTP_inputUser(d.vid, MTP_long((data->access == UserNoAccess) ? 0 : data->access)); + } else { + data->input = MTP_inputPeerUser(d.vid, d.vaccess_hash); + data->inputUser = MTP_inputUser(d.vid, d.vaccess_hash); + } } if (d.is_deleted()) { data->setPhone(QString()); @@ -393,10 +396,10 @@ namespace App { data->access = UserNoAccess; status = &emptyStatus; } else { - QString phone = d.has_phone() ? qs(d.vphone) : QString(); + QString phone = minimal ? data->phone : (d.has_phone() ? qs(d.vphone) : QString()); QString fname = d.has_first_name() ? textOneLine(qs(d.vfirst_name)) : QString(); QString lname = d.has_last_name() ? textOneLine(qs(d.vlast_name)) : QString(); - QString uname = d.has_username() ? textOneLine(qs(d.vusername)) : QString(); + QString uname = minimal ? data->username : (d.has_username() ? textOneLine(qs(d.vusername)) : QString()); bool phoneChanged = (data->phone != phone); if (phoneChanged) data->setPhone(phone); @@ -420,22 +423,24 @@ namespace App { status = d.has_status() ? &d.vstatus : &emptyStatus; } wasContact = (data->contact > 0); - if (d.has_bot_info_version()) { - data->setBotInfoVersion(d.vbot_info_version.v); - data->botInfo->readsAllHistory = d.is_bot_chat_history(); - data->botInfo->cantJoinGroups = d.is_bot_nochats(); - data->botInfo->inlinePlaceholder = d.has_bot_inline_placeholder() ? '_' + qs(d.vbot_inline_placeholder) : QString(); - } else { - data->setBotInfoVersion(-1); - } - data->contact = (d.is_contact() || d.is_mutual_contact()) ? 1 : (data->phone.isEmpty() ? -1 : 0); - if (data->contact == 1 && cReportSpamStatuses().value(data->id, dbiprsNoButton) != dbiprsNoButton) { - cRefReportSpamStatuses().insert(data->id, dbiprsNoButton); - Local::writeReportSpamStatuses(); - } - if (d.is_self() && ::self != data) { - ::self = data; - if (App::wnd()) App::wnd()->updateGlobalMenu(); + if (!minimal) { + if (d.has_bot_info_version()) { + data->setBotInfoVersion(d.vbot_info_version.v); + data->botInfo->readsAllHistory = d.is_bot_chat_history(); + data->botInfo->cantJoinGroups = d.is_bot_nochats(); + data->botInfo->inlinePlaceholder = d.has_bot_inline_placeholder() ? '_' + qs(d.vbot_inline_placeholder) : QString(); + } else { + data->setBotInfoVersion(-1); + } + data->contact = (d.is_contact() || d.is_mutual_contact()) ? 1 : (data->phone.isEmpty() ? -1 : 0); + if (data->contact == 1 && cReportSpamStatuses().value(data->id, dbiprsNoButton) != dbiprsNoButton) { + cRefReportSpamStatuses().insert(data->id, dbiprsNoButton); + Local::writeReportSpamStatuses(); + } + if (d.is_self() && ::self != data) { + ::self = data; + if (App::wnd()) App::wnd()->updateGlobalMenu(); + } } } break; } @@ -443,7 +448,7 @@ namespace App { if (!data) continue; data->loaded = true; - if (status) switch (status->type()) { + if (status && !minimal) switch (status->type()) { case mtpc_userStatusEmpty: data->onlineTill = 0; break; case mtpc_userStatusRecently: if (data->onlineTill > -10) { // don't modify pseudo-online @@ -916,13 +921,27 @@ namespace App { return false; } + void updateEditedMessage(const MTPDmessage &m) { + PeerId peerId = peerFromMTP(m.vto_id); + if (m.has_from_id() && peerToUser(peerId) == MTP::authedId()) { + peerId = peerFromUser(m.vfrom_id); + } + if (HistoryItem *existing = App::histItemById(peerToChannel(peerId), m.vid.v)) { + existing->setText(qs(m.vmessage), m.has_entities() ? entitiesFromMTP(m.ventities.c_vector().v) : EntitiesInText()); + existing->updateMedia(m.has_media() ? (&m.vmedia) : 0, true); + existing->setViewsCount(m.has_views() ? m.vviews.v : -1, false); + existing->initDimensions(); + Notify::historyItemResized(existing); + } + } + void addSavedGif(DocumentData *doc) { SavedGifs &saved(cRefSavedGifs()); int32 index = saved.indexOf(doc); if (index) { if (index > 0) saved.remove(index); saved.push_front(doc); - if (saved.size() > cSavedGifsLimit()) saved.pop_back(); + if (saved.size() > Global::SavedGifsLimit()) saved.pop_back(); Local::writeSavedGifs(); if (App::main()) emit App::main()->savedGifsUpdated(); diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index 2f4144e85fc569..a23c92c39a93cb 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -81,6 +81,7 @@ namespace App { void feedChatAdmins(const MTPDupdateChatAdmins &d, bool emitPeerUpdated = true); void feedParticipantAdmin(const MTPDupdateChatParticipantAdmin &d, bool emitPeerUpdated = true); bool checkEntitiesAndViewsUpdate(const MTPDmessage &m); // returns true if item found and it is not detached + void updateEditedMessage(const MTPDmessage &m); void addSavedGif(DocumentData *doc); void checkSavedGif(HistoryItem *item); void feedMsgs(const QVector &msgs, NewMessageType type); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index b414fdb3997aff..2e68ddd31c9ec2 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -384,8 +384,6 @@ void Application::closeApplication() { i->first->close(); } _localClients.clear(); - - MTP::stop(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE @@ -808,7 +806,7 @@ AppClass::AppClass() : QObject() checkMapVersion(); } - _window->updateIsActive(cOnlineFocusTimeout()); + _window->updateIsActive(Global::OnlineFocusTimeout()); } void AppClass::regPhotoUpdate(const PeerId &peer, const FullMsgId &msgId) { @@ -926,7 +924,7 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); if (_window) { - _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + _window->updateIsActive((state == Qt::ApplicationActive) ? Global::OnlineFocusTimeout() : Global::OfflineBlurTimeout()); } if (state != Qt::ApplicationActive) { PopupTooltip::Hide(); @@ -1083,6 +1081,8 @@ AppClass::~AppClass() { App::deinitMedia(); deinitImageLinkManager(); + MTP::stop(); + AppObject = 0; deleteAndMark(_uploader); deleteAndMark(_translator); diff --git a/Telegram/SourceFiles/boxes/addcontactbox.cpp b/Telegram/SourceFiles/boxes/addcontactbox.cpp index d236862a3032de..2a710d7aa865ef 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.cpp +++ b/Telegram/SourceFiles/boxes/addcontactbox.cpp @@ -275,7 +275,7 @@ NewGroupBox::NewGroupBox() : AbstractBox(), _group(this, qsl("group_type"), 0, lang(lng_create_group_title), true), _channel(this, qsl("group_type"), 1, lang(lng_create_channel_title)), _aboutGroupWidth(width() - st::boxPadding.left() - st::boxButtonPadding.right() - st::newGroupPadding.left() - st::defaultRadiobutton.textPosition.x()), -_aboutGroup(st::normalFont, lng_create_group_about(lt_count, cMaxGroupCount()), _defaultOptions, _aboutGroupWidth), +_aboutGroup(st::normalFont, lng_create_group_about(lt_count, Global::ChatSizeMax()), _defaultOptions, _aboutGroupWidth), _aboutChannel(st::normalFont, lang(lng_create_channel_about), _defaultOptions, _aboutGroupWidth), _next(this, lang(lng_create_group_next), st::defaultBoxButton), _cancel(this, lang(lng_cancel), st::cancelBoxButton) { diff --git a/Telegram/SourceFiles/boxes/confirmbox.cpp b/Telegram/SourceFiles/boxes/confirmbox.cpp index b114ffa18b863f..f7d3bfc64d9d44 100644 --- a/Telegram/SourceFiles/boxes/confirmbox.cpp +++ b/Telegram/SourceFiles/boxes/confirmbox.cpp @@ -189,7 +189,7 @@ void ConfirmLinkBox::onOpenLink() { MaxInviteBox::MaxInviteBox(const QString &link) : AbstractBox(st::boxWidth) , _close(this, lang(lng_box_ok), st::defaultBoxButton) -, _text(st::boxTextFont, lng_participant_invite_sorry(lt_count, cMaxGroupCount()), _confirmBoxTextOptions, st::boxWidth - st::boxPadding.left() - st::boxButtonPadding.right()) +, _text(st::boxTextFont, lng_participant_invite_sorry(lt_count, Global::ChatSizeMax()), _confirmBoxTextOptions, st::boxWidth - st::boxPadding.left() - st::boxButtonPadding.right()) , _link(link) , _linkOver(false) , a_goodOpacity(0, 0) diff --git a/Telegram/SourceFiles/boxes/contactsbox.cpp b/Telegram/SourceFiles/boxes/contactsbox.cpp index e295611fe8297b..80eca993576453 100644 --- a/Telegram/SourceFiles/boxes/contactsbox.cpp +++ b/Telegram/SourceFiles/boxes/contactsbox.cpp @@ -427,7 +427,7 @@ void ContactsInner::paintDialog(Painter &p, PeerData *peer, ContactData *data, b sel = false; } } else { - if (data->inchat || data->check || selectedCount() >= ((_channel && _channel->isMegagroup()) ? cMaxMegaGroupCount() : cMaxGroupCount())) { + if (data->inchat || data->check || selectedCount() >= ((_channel && _channel->isMegagroup()) ? Global::MegagroupSizeMax() : Global::ChatSizeMax())) { sel = false; } } @@ -767,7 +767,7 @@ void ContactsInner::changeCheckState(ContactData *data, PeerData *peer) { data->check = false; _checkedContacts.remove(peer); --_selCount; - } else if (selectedCount() < ((_channel && _channel->isMegagroup()) ? cMaxMegaGroupCount() : cMaxGroupCount())) { + } else if (selectedCount() < ((_channel && _channel->isMegagroup()) ? Global::MegagroupSizeMax() : Global::ChatSizeMax())) { data->check = true; _checkedContacts.insert(peer, true); ++_selCount; @@ -1535,7 +1535,7 @@ void ContactsBox::paintEvent(QPaintEvent *e) { paintTitle(p, lang(lng_channel_admins)); } else if (_inner.chat() || _inner.creating() != CreatingGroupNone) { QString title(lang(addingAdmin ? lng_channel_add_admin : lng_profile_add_participant)); - QString additional(addingAdmin ? QString() : QString("%1 / %2").arg(_inner.selectedCount()).arg(((_inner.channel() && _inner.channel()->isMegagroup()) ? cMaxMegaGroupCount() : cMaxGroupCount()))); + QString additional(addingAdmin ? QString() : QString("%1 / %2").arg(_inner.selectedCount()).arg(((_inner.channel() && _inner.channel()->isMegagroup()) ? Global::MegagroupSizeMax() : Global::ChatSizeMax()))); paintTitle(p, title, additional); } else if (_inner.bot()) { paintTitle(p, lang(lng_bot_choose_group)); @@ -1757,7 +1757,7 @@ bool ContactsBox::creationFail(const RPCError &error) { MembersInner::MembersInner(ChannelData *channel, MembersFilter filter) : TWidget() , _rowHeight(st::contactsPadding.top() + st::contactsPhotoSize + st::contactsPadding.bottom()) -, _newItemHeight((channel->amCreator() && (channel->count < (channel->isMegagroup() ? cMaxMegaGroupCount() : cMaxGroupCount()) || (!channel->isMegagroup() && !channel->isPublic()) || filter == MembersFilterAdmins)) ? st::contactsNewItemHeight : 0) +, _newItemHeight((channel->amCreator() && (channel->count < (channel->isMegagroup() ? Global::MegagroupSizeMax() : Global::ChatSizeMax()) || (!channel->isMegagroup() && !channel->isPublic()) || filter == MembersFilterAdmins)) ? st::contactsNewItemHeight : 0) , _newItemSel(false) , _channel(channel) , _filter(filter) @@ -1787,7 +1787,7 @@ MembersInner::MembersInner(ChannelData *channel, MembersFilter filter) : TWidget void MembersInner::load() { if (!_loadingRequestId) { - _loadingRequestId = MTP::send(MTPchannels_GetParticipants(_channel->inputChannel, (_filter == MembersFilterRecent) ? MTP_channelParticipantsRecent() : MTP_channelParticipantsAdmins(), MTP_int(0), MTP_int(cMaxGroupCount())), rpcDone(&MembersInner::membersReceived), rpcFail(&MembersInner::membersFailed)); + _loadingRequestId = MTP::send(MTPchannels_GetParticipants(_channel->inputChannel, (_filter == MembersFilterRecent) ? MTP_channelParticipantsRecent() : MTP_channelParticipantsAdmins(), MTP_int(0), MTP_int(Global::ChatSizeMax())), rpcDone(&MembersInner::membersReceived), rpcFail(&MembersInner::membersFailed)); } } @@ -1826,7 +1826,7 @@ void MembersInner::paintEvent(QPaintEvent *e) { paintDialog(p, _rows[from], data(from), sel, kickSel, kickDown); p.translate(0, _rowHeight); } - if (to == _rows.size() && _filter == MembersFilterRecent && (_rows.size() < _channel->count || _rows.size() >= cMaxGroupCount())) { + if (to == _rows.size() && _filter == MembersFilterRecent && (_rows.size() < _channel->count || _rows.size() >= Global::ChatSizeMax())) { p.setPen(st::stickersReorderFg); _about.draw(p, st::contactsPadding.left(), st::stickersReorderPadding.top(), _aboutWidth, style::al_center); } @@ -2005,7 +2005,7 @@ void MembersInner::refresh() { } else { _about.setText(st::boxTextFont, lng_channel_only_last_shown(lt_count, _rows.size())); _aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom(); - if (_filter != MembersFilterRecent || (_rows.size() >= _channel->count && _rows.size() < cMaxGroupCount())) { + if (_filter != MembersFilterRecent || (_rows.size() >= _channel->count && _rows.size() < Global::ChatSizeMax())) { _aboutHeight = 0; } resize(width(), st::membersPadding.top() + _newItemHeight + _rows.size() * _rowHeight + st::membersPadding.bottom() + _aboutHeight); @@ -2220,7 +2220,7 @@ void MembersInner::kickAdminDone(const MTPUpdates &result, mtpRequestId req) { bool MembersInner::kickFail(const RPCError &error, mtpRequestId req) { if (mtpIsFlood(error)) return false; - + if (_kickBox) _kickBox->onClose(); load(); return true; @@ -2297,7 +2297,7 @@ void MembersBox::onScroll() { } void MembersBox::onAdd() { - if (_inner.filter() == MembersFilterRecent && _inner.channel()->count >= (_inner.channel()->isMegagroup() ? cMaxMegaGroupCount() : cMaxGroupCount())) { + if (_inner.filter() == MembersFilterRecent && _inner.channel()->count >= (_inner.channel()->isMegagroup() ? Global::MegagroupSizeMax() : Global::ChatSizeMax())) { Ui::showLayer(new MaxInviteBox(_inner.channel()->invitationUrl), KeepOtherLayers); return; } diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index d65081f517beed..70c257e9a2b607 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -160,7 +160,7 @@ namespace Ui { return w->minimizeToTray(); } else if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { w->hide(); - w->updateIsActive(cOfflineBlurTimeout()); + w->updateIsActive(Global::OfflineBlurTimeout()); w->updateGlobalMenu(); return true; } @@ -352,6 +352,23 @@ namespace Sandbox { struct GlobalDataStruct { uint64 LaunchId = 0; Adaptive::Layout AdaptiveLayout = Adaptive::NormalLayout; + + // config + int32 ChatSizeMax = 200; + int32 MegagroupSizeMax = 1000; + int32 ForwardedCountMax = 100; + int32 OnlineUpdatePeriod = 120000; + int32 OfflineBlurTimeout = 5000; + int32 OfflineIdleTimeout = 30000; + int32 OnlineFocusTimeout = 1000; + int32 OnlineCloudTimeout = 300000; + int32 NotifyCloudDelay = 30000; + int32 NotifyDefaultDelay = 1500; + int32 ChatBigSize = 190; // ? + int32 PushChatPeriod = 0; // ? + int32 PushChatLimit = 0; // ? + int32 SavedGifsLimit = 100; + int32 EditTimeLimit = 0; // ? }; GlobalDataStruct *GlobalData = 0; @@ -375,4 +392,21 @@ namespace Global { DefineReadOnlyVar(Global, uint64, LaunchId); DefineVar(Global, Adaptive::Layout, AdaptiveLayout); + // config + DefineVar(Global, int32, ChatSizeMax); + DefineVar(Global, int32, MegagroupSizeMax); + DefineVar(Global, int32, ForwardedCountMax); + DefineVar(Global, int32, OnlineUpdatePeriod); + DefineVar(Global, int32, OfflineBlurTimeout); + DefineVar(Global, int32, OfflineIdleTimeout); + DefineVar(Global, int32, OnlineFocusTimeout); + DefineVar(Global, int32, OnlineCloudTimeout); + DefineVar(Global, int32, NotifyCloudDelay); + DefineVar(Global, int32, NotifyDefaultDelay); + DefineVar(Global, int32, ChatBigSize); + DefineVar(Global, int32, PushChatPeriod); + DefineVar(Global, int32, PushChatLimit); + DefineVar(Global, int32, SavedGifsLimit); + DefineVar(Global, int32, EditTimeLimit); + }; diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index e89c2da1806e67..96ee166872d9f3 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -140,6 +140,23 @@ namespace Global { DeclareReadOnlyVar(uint64, LaunchId); DeclareVar(Adaptive::Layout, AdaptiveLayout); + // config + DeclareVar(int32, ChatSizeMax); + DeclareVar(int32, MegagroupSizeMax); + DeclareVar(int32, ForwardedCountMax); + DeclareVar(int32, OnlineUpdatePeriod); + DeclareVar(int32, OfflineBlurTimeout); + DeclareVar(int32, OfflineIdleTimeout); + DeclareVar(int32, OnlineFocusTimeout); // not from config + DeclareVar(int32, OnlineCloudTimeout); + DeclareVar(int32, NotifyCloudDelay); + DeclareVar(int32, NotifyDefaultDelay); + DeclareVar(int32, ChatBigSize); + DeclareVar(int32, PushChatPeriod); + DeclareVar(int32, PushChatLimit); + DeclareVar(int32, SavedGifsLimit); + DeclareVar(int32, EditTimeLimit); + }; namespace Adaptive { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 66f3608474fa6e..a1dcac2c32fab8 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -1389,8 +1389,8 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo } else if (badMedia) { result = new HistoryServiceMsg(this, block, m.vid.v, date(m.vdate), lang(lng_message_empty), m.vflags.v, 0, m.has_from_id() ? m.vfrom_id.v : 0); } else { - if ((m.has_fwd_date() && m.vfwd_date.v > 0) || (m.has_fwd_from_id() && peerFromMTP(m.vfwd_from_id) != 0)) { - result = new HistoryForwarded(this, block, m); + if (m.has_fwd_from() && m.vfwd_from.type() == mtpc_messageFwdHeader) { + result = new HistoryForwarded(this, block, m, m.vfwd_from.c_messageFwdHeader()); } else if (m.has_reply_to_msg_id() && m.vreply_to_msg_id.v > 0) { result = new HistoryReply(this, block, m); } else { @@ -6832,27 +6832,28 @@ HistoryMessage::~HistoryMessage() { } } -HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg) +HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg, const MTPDmessageFwdHeader &f) : HistoryMessage(history, block, msg) -, fwdDate(::date(msg.vfwd_date)) -, fwdFrom(App::peer(peerFromMTP(msg.vfwd_from_id))) -, fwdFromVersion(fwdFrom->nameVersion) -, fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { +, _fwdDate(::date(f.vdate)) +, _fwdAuthor(App::peer(f.has_channel_id() ? peerFromChannel(f.vchannel_id) : peerFromUser(f.vfrom_id))) +, _fwdFrom(App::peer(f.has_from_id() ? peerFromUser(f.vfrom_id) : peerFromChannel(f.vchannel_id))) +, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { } HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg) : HistoryMessage(history, block, id, newForwardedFlags(history->peer, from, msg) | flags, msg->via() ? peerToUser(msg->viaBot()->id) : 0, date, from, msg->HistoryMessage::originalText(), msg->HistoryMessage::originalEntities(), msg->HistoryMessage::viewsCount(), msg->getMedia()) -, fwdDate(msg->dateForwarded()) -, fwdFrom(msg->fromForwarded()) -, fwdFromVersion(fwdFrom->nameVersion) -, fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { +, _fwdDate(msg->fwdDate()) +, _fwdAuthor(msg->fwdAuthor()) +, _fwdFrom(msg->fwdFrom()) +, _fwdAuthorVersion(_fwdAuthor->nameVersion) +, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { } QString HistoryForwarded::selectedText(uint32 selection) const { if (selection != FullSelection) return HistoryMessage::selectedText(selection); QString result, original = HistoryMessage::selectedText(selection); - result.reserve(lang(lng_forwarded_from).size() + fwdFrom->name.size() + 4 + original.size()); - result.append('[').append(lang(lng_forwarded_from)).append(' ').append(fwdFrom->name).append(qsl("]\n")).append(original); + result.reserve(lang(lng_forwarded_from).size() + _fwdAuthor->name.size() + 4 + original.size()); + result.append('[').append(lang(lng_forwarded_from)).append(' ').append(_fwdAuthor->name).append(qsl("]\n")).append(original); return result; } @@ -6860,7 +6861,7 @@ void HistoryForwarded::initDimensions() { fwdNameUpdated(); HistoryMessage::initDimensions(); if (!_media) { - int32 _namew = st::msgPadding.left() + fromWidth + fwdFromName.maxWidth() + st::msgPadding.right(); + int32 _namew = st::msgPadding.left() + _fromWidth + _fwdAuthorName.maxWidth() + st::msgPadding.right(); if (via()) { _namew += st::msgServiceFont->spacew + via()->maxWidth; } @@ -6869,19 +6870,19 @@ void HistoryForwarded::initDimensions() { } void HistoryForwarded::fwdNameUpdated() const { - QString fwdName((via() && fwdFrom->isUser()) ? fwdFrom->asUser()->firstName : App::peerName(fwdFrom)); - fwdFromName.setText(st::msgServiceNameFont, fwdName, _textNameOptions); + QString fwdName((via() && _fwdAuthor->isUser()) ? _fwdAuthor->asUser()->firstName : App::peerName(_fwdAuthor)); + _fwdAuthorName.setText(st::msgServiceNameFont, fwdName, _textNameOptions); if (via()) { int32 l = 0, w = 0; countPositionAndSize(l, w); - via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - fromWidth - fwdFromName.maxWidth() - st::msgServiceFont->spacew); + via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - _fromWidth - _fwdAuthorName.maxWidth() - st::msgServiceFont->spacew); } } void HistoryForwarded::draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const { - if (drawBubble() && fwdFrom->nameVersion > fwdFromVersion) { + if (drawBubble() && _fwdAuthor->nameVersion > _fwdAuthorVersion) { fwdNameUpdated(); - fwdFromVersion = fwdFrom->nameVersion; + _fwdAuthorVersion = _fwdAuthor->nameVersion; } HistoryMessage::draw(p, r, selection, ms); } @@ -6893,18 +6894,18 @@ void HistoryForwarded::drawForwardedFrom(Painter &p, int32 x, int32 y, int32 w, p.setPen((selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg))->p); p.setFont(serviceFont); - if (via() && w > fromWidth + fwdFromName.maxWidth() + serviceFont->spacew) { + if (via() && w > _fromWidth + _fwdAuthorName.maxWidth() + serviceFont->spacew) { p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); p.setFont(serviceName); - fwdFromName.draw(p, x + fromWidth, y, w - fromWidth); + _fwdAuthorName.draw(p, x + _fromWidth, y, w - _fromWidth); - p.drawText(x + fromWidth + fwdFromName.maxWidth() + serviceFont->spacew, y + serviceFont->ascent, via()->text); - } else if (w > fromWidth) { + p.drawText(x + _fromWidth + _fwdAuthorName.maxWidth() + serviceFont->spacew, y + serviceFont->ascent, via()->text); + } else if (w > _fromWidth) { p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); p.setFont(serviceName); - fwdFromName.drawElided(p, x + fromWidth, y, w - fromWidth); + _fwdAuthorName.drawElided(p, x + _fromWidth, y, w - _fromWidth); } else { p.drawText(x, y + serviceFont->ascent, serviceFont->elided(lang(lng_forwarded_from), w)); } @@ -6930,7 +6931,7 @@ int32 HistoryForwarded::resize(int32 width) { if (via()) { int32 l = 0, w = 0; countPositionAndSize(l, w); - via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - fromWidth - fwdFromName.maxWidth() - st::msgServiceFont->spacew); + via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - _fromWidth - _fwdAuthorName.maxWidth() - st::msgServiceFont->spacew); } } } @@ -6992,9 +6993,9 @@ void HistoryForwarded::getStateFromMessageText(TextLinkPtr &lnk, HistoryCursorSt void HistoryForwarded::getForwardedState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 w) const { state = HistoryDefaultCursorState; - if (x >= fromWidth && x < w && x < fromWidth + fwdFromName.maxWidth()) { - lnk = fwdFrom->lnk; - } else if (via() && x >= fromWidth + fwdFromName.maxWidth() + st::msgServiceFont->spacew && x < w && x < fromWidth + fwdFromName.maxWidth() + st::msgServiceFont->spacew + via()->maxWidth) { + if (x >= _fromWidth && x < w && x < _fromWidth + _fwdAuthorName.maxWidth()) { + lnk = _fwdAuthor->lnk; + } else if (via() && x >= _fromWidth + _fwdAuthorName.maxWidth() + st::msgServiceFont->spacew && x < w && x < _fromWidth + _fwdAuthorName.maxWidth() + st::msgServiceFont->spacew + via()->maxWidth) { lnk = via()->lnk; } else { lnk = TextLinkPtr(); @@ -7121,7 +7122,7 @@ void HistoryReply::replyToNameUpdated() const { w += st::msgServiceFont->spacew + replyToVia()->maxWidth; } - _maxReplyWidth = previewSkip + qMax(w, qMin(replyToText.maxWidth(), 4 * w)); + _maxReplyWidth = previewSkip + qMax(w, qMin(replyToText.maxWidth(), int32(st::maxSignatureSize))); } else { _maxReplyWidth = st::msgDateFont->width(lang(replyToMsgId ? lng_profile_loading : lng_deleted_message)); } diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index c5f667f2535012..0435cd00bf87f5 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -904,7 +904,7 @@ class HistoryItem : public HistoryElem { virtual bool serviceMsg() const { return false; } - virtual void updateMedia(const MTPMessageMedia *media) { + virtual void updateMedia(const MTPMessageMedia *media, bool edited = false) { } virtual int32 addToOverview(AddToOverviewMethod method) { return 0; @@ -1026,6 +1026,16 @@ class HistoryItem : public HistoryElem { } bool displayFromPhoto() const; + virtual QDateTime fwdDate() const { // dynamic_cast optimize + return date; + } + virtual PeerData *fwdFrom() const { // dynamic_cast optimize + return from(); + } + virtual PeerData *fwdAuthor() const { // dynamic_cast optimize + return author(); + } + void clipCallback(ClipReaderNotification notification); virtual ~HistoryItem(); @@ -2036,8 +2046,8 @@ class HistoryMessage : public HistoryItem, public Interfaces { QString notificationHeader() const; QString notificationText() const; - void updateMedia(const MTPMessageMedia *media) { - if (media && _media && _media->type() != MediaTypeWebPage) { + void updateMedia(const MTPMessageMedia *media, bool edited = false) { + if (!edited && media && _media && _media->type() != MediaTypeWebPage) { _media->updateFrom(*media, this); } else { setMedia(media); @@ -2087,13 +2097,6 @@ class HistoryMessage : public HistoryItem, public Interfaces { return HistoryItem::viewsCount(); } - virtual QDateTime dateForwarded() const { // dynamic_cast optimize - return date; - } - virtual PeerData *fromForwarded() const { // dynamic_cast optimize - return author(); - } - HistoryMessage *toHistoryMessage() { // dynamic_cast optimize return this; } @@ -2120,7 +2123,7 @@ class HistoryMessage : public HistoryItem, public Interfaces { class HistoryForwarded : public HistoryMessage { public: - HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg); + HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg, const MTPDmessageFwdHeader &f); HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg); void initDimensions(); @@ -2136,15 +2139,18 @@ class HistoryForwarded : public HistoryMessage { void getForwardedState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 w) const; void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const; - QDateTime dateForwarded() const { - return fwdDate; + QDateTime fwdDate() const { + return _fwdDate; + } + PeerData *fwdAuthor() const { + return _fwdAuthor; } - PeerData *fromForwarded() const { - return fwdFrom; + PeerData *fwdFrom() const { + return _fwdFrom; } QString selectedText(uint32 selection) const; bool displayForwardedFrom() const { - return via() || !_media || !_media->isDisplayed() || (fwdFrom->isChannel() || !_media->hideForwardedFrom()); + return via() || !_media || !_media->isDisplayed() || _fwdAuthor->isChannel() || !_media->hideForwardedFrom(); } HistoryForwarded *toHistoryForwarded() { @@ -2156,11 +2162,11 @@ class HistoryForwarded : public HistoryMessage { protected: - QDateTime fwdDate; - PeerData *fwdFrom; - mutable Text fwdFromName; - mutable int32 fwdFromVersion; - int32 fromWidth; + QDateTime _fwdDate; + PeerData *_fwdAuthor, *_fwdFrom; + mutable Text _fwdAuthorName; + mutable int32 _fwdAuthorVersion; + int32 _fromWidth; }; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 24105a3722388d..d995e8bc524fc6 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4564,7 +4564,7 @@ void HistoryWidget::shareContact(const PeerId &peer, const QString &phone, const if (showFromName) { flags |= MTPDmessage::flag_from_id; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(peer), MTPnullFwdHeader, MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); h->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), p->input, MTP_int(replyTo), MTP_inputMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, h->sendRequestId); App::historyRegRandom(randomId, newId); @@ -4894,7 +4894,7 @@ void HistoryWidget::sendBotCommand(const QString &cmd, MsgId replyTo) { // reply bool lastKeyboardUsed = (_keyboard.forMsgId() == FullMsgId(_channel, _history->lastKeyboardId)) && (_keyboard.forMsgId() == FullMsgId(_channel, replyTo)); QString toSend = cmd; - PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? (App::hoveredLinkItem()->toHistoryForwarded() ? App::hoveredLinkItem()->toHistoryForwarded()->fromForwarded() : App::hoveredLinkItem()->from()) : 0); + PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->toHistoryForwarded()->fwdFrom() : 0); if (bot && (!bot->isUser() || !bot->asUser()->botInfo)) bot = 0; QString username = bot ? bot->asUser()->username : QString(); int32 botStatus = _peer->isChat() ? _peer->asChat()->botStatus : (_peer->isMegagroup() ? _peer->asChannel()->mgInfo->botStatus : -1); @@ -4919,7 +4919,7 @@ bool HistoryWidget::insertBotCommand(const QString &cmd, bool specialGif) { QString toInsert = cmd; if (!toInsert.isEmpty() && toInsert.at(0) != '@') { - PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? (App::hoveredLinkItem()->toHistoryForwarded() ? App::hoveredLinkItem()->toHistoryForwarded()->fromForwarded() : App::hoveredLinkItem()->from()) : 0); + PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->toHistoryForwarded()->fwdFrom() : 0); if (!bot->isUser() || !bot->asUser()->botInfo) bot = 0; QString username = bot ? bot->asUser()->username : QString(); int32 botStatus = _peer->isChat() ? _peer->asChat()->botStatus : (_peer->isMegagroup() ? _peer->asChannel()->mgInfo->botStatus : -1); @@ -5532,14 +5532,14 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif flags |= MTPDmessage::flag_from_id; } if (file->type == PreparePhoto) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (file->type == PrepareDocument) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (file->type == PrepareAudio) { if (!h->peer->isChannel()) { flags |= MTPDmessage::flag_media_unread; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } if (_peer && file->to.peer == _peer->id) { @@ -6410,7 +6410,7 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { App::feedDocument(document, thumb); } Local::writeStickerImage(mediaKey(DocumentFileLocation, MTP::maindc(), docId), result->data()); - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(document, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPnullFwdHeader, MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(document, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (result->type == qstr("photo")) { QImage fileThumb(result->thumb->pix().toImage()); @@ -6429,14 +6429,14 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { PhotoData *ph = App::photoSet(photoId, 0, 0, unixtime(), thumbPtr, ImagePtr(medium.width(), medium.height()), ImagePtr(result->width, result->height)); MTPPhoto photo = MTP_photo(MTP_long(photoId), MTP_long(0), MTP_int(ph->date), MTP_vector(photoSizes)); - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(photo, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPnullFwdHeader, MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(photo, MTP_string(result->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } } else { flags |= MTPDmessage::flag_entities; if (result->noWebPage) { sendFlags |= MTPmessages_SendMessage::flag_no_webpage; } - _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPPeer(), MTPint(), MTPint(), MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(result->message), MTP_messageMediaEmpty(), MTPnullMarkup, linksToMTP(result->entities), MTP_int(1)), NewMessageUnread); + _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPnullFwdHeader, MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(result->message), MTP_messageMediaEmpty(), MTPnullMarkup, linksToMTP(result->entities), MTP_int(1), MTPint()), NewMessageUnread); } _history->sendRequestId = MTP::send(MTPmessages_SendInlineBotResult(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_long(randomId), MTP_long(result->queryId), MTP_string(result->id)), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId); App::main()->finishForwarding(_history, _broadcast.checked()); diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 549b442e8a8336..bcc91d717182ae 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -582,7 +582,7 @@ void LayoutOverviewVoice::paint(Painter &p, const QRect &clip, uint32 selection, } bool showPause = updateStatusText(); int32 nameVersion = _parent->from()->nameVersion; - if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) nameVersion = fwd->fromForwarded()->nameVersion; + if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) nameVersion = fwd->fwdFrom()->nameVersion; if (nameVersion > _nameVersion) { updateName(); } @@ -701,8 +701,8 @@ void LayoutOverviewVoice::getState(TextLinkPtr &link, HistoryCursorState &cursor void LayoutOverviewVoice::updateName() const { int32 version = 0; if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) { - _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(fwd->fromForwarded()), _textNameOptions); - version = fwd->fromForwarded()->nameVersion; + _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(fwd->fwdFrom()), _textNameOptions); + version = fwd->fwdFrom()->nameVersion; } else { _name.setText(st::semiboldFont, App::peerName(_parent->from()), _textNameOptions); version = _parent->from()->nameVersion; diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index da64f2cb96fa35..f8e622375a5fff 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -822,12 +822,12 @@ namespace { if (_dcOpts) _dcOpts->insert(dcIdWithShift, mtpDcOption(dcIdWithShift % _mtp_internal::dcShift, flags, ip.toUtf8().constData(), port)); } break; - case dbiMaxGroupCount: { + case dbiChatSizeMax: { qint32 maxSize; stream >> maxSize; if (!_checkStreamStatus(stream)) return false; - cSetMaxGroupCount(maxSize); + Global::SetChatSizeMax(maxSize); } break; case dbiSavedGifsLimit: { @@ -835,15 +835,15 @@ namespace { stream >> limit; if (!_checkStreamStatus(stream)) return false; - cSetSavedGifsLimit(limit); + Global::SetSavedGifsLimit(limit); } break; - case dbiMaxMegaGroupCount: { + case dbiMegagroupSizeMax: { qint32 maxSize; stream >> maxSize; if (!_checkStreamStatus(stream)) return false; - cSetMaxMegaGroupCount(maxSize); + Global::SetMegagroupSizeMax(maxSize); } break; case dbiUser: { @@ -2124,9 +2124,9 @@ namespace Local { size += sizeof(quint32) + sizeof(qint32) * 6; EncryptedDescriptor data(size); - data.stream << quint32(dbiMaxGroupCount) << qint32(cMaxGroupCount()); - data.stream << quint32(dbiMaxMegaGroupCount) << qint32(cMaxMegaGroupCount()); - data.stream << quint32(dbiSavedGifsLimit) << qint32(cSavedGifsLimit()); + data.stream << quint32(dbiChatSizeMax) << qint32(Global::ChatSizeMax()); + data.stream << quint32(dbiMegagroupSizeMax) << qint32(Global::MegagroupSizeMax()); + data.stream << quint32(dbiSavedGifsLimit) << qint32(Global::SavedGifsLimit()); data.stream << quint32(dbiAutoStart) << qint32(cAutoStart()); data.stream << quint32(dbiStartMinimized) << qint32(cStartMinimized()); data.stream << quint32(dbiSendToMenu) << qint32(cSendToMenu()); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 181fd9b840600b..8d45382beae980 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -537,11 +537,7 @@ void MainWidget::fillForwardingInfo(Text *&from, Text *&text, bool &serviceColor if (_toForward.isEmpty()) return; int32 version = 0; for (SelectedItemSet::const_iterator i = _toForward.cbegin(), e = _toForward.cend(); i != e; ++i) { - if (HistoryForwarded *fwd = i.value()->toHistoryForwarded()) { - version += fwd->fromForwarded()->nameVersion; - } else { - version += i.value()->author()->nameVersion; - } + version += i.value()->fwdAuthor()->nameVersion; } if (version != _toForwardNameVersion) { updateForwardingTexts(); @@ -562,10 +558,7 @@ void MainWidget::updateForwardingTexts() { QVector fromUsers; fromUsers.reserve(_toForward.size()); for (SelectedItemSet::const_iterator i = _toForward.cbegin(), e = _toForward.cend(); i != e; ++i) { - PeerData *from = i.value()->author(); - if (HistoryForwarded *fwd = i.value()->toHistoryForwarded()) { - from = fwd->fromForwarded(); - } + PeerData *from = i.value()->fwdAuthor(); if (!fromUsersMap.contains(from)) { fromUsersMap.insert(from, true); fromUsers.push_back(from); @@ -1328,7 +1321,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, if (!sentEntities.c_vector().v.isEmpty()) { sendFlags |= MTPmessages_SendMessage::flag_entities; } - hist->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPPeer(), MTPint(), MTPint(), MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1)), NewMessageUnread); + hist->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(hist->peer->id), MTPnullFwdHeader, MTPint(), MTP_int(replyTo), MTP_int(unixtime()), msgText, media, MTPnullMarkup, localEntities, MTP_int(1), MTPint()), NewMessageUnread); hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_int(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } @@ -1912,7 +1905,7 @@ void MainWidget::serviceNotification(const QString &msg, const MTPMessageMedia & HistoryItem *item = 0; while (textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) { MTPVector localEntities = linksToMTP(sendingEntities); - item = App::histories().addNewMessage(MTP_message(MTP_int(flags), MTP_int(clientMsgId()), MTP_int(ServiceUserId), MTP_peerUser(MTP_int(MTP::authedId())), MTPPeer(), MTPint(), MTPint(), MTPint(), MTPint(), MTP_int(unixtime()), MTP_string(sendingText), media, MTPnullMarkup, localEntities, MTPint()), NewMessageUnread); + item = App::histories().addNewMessage(MTP_message(MTP_int(flags), MTP_int(clientMsgId()), MTP_int(ServiceUserId), MTP_peerUser(MTP_int(MTP::authedId())), MTPnullFwdHeader, MTPint(), MTPint(), MTP_int(unixtime()), MTP_string(sendingText), media, MTPnullMarkup, localEntities, MTPint(), MTPint()), NewMessageUnread); } if (item) { history.peerMessagesUpdated(item->history()->peer->id); @@ -3461,7 +3454,7 @@ void MainWidget::openPeerByName(const QString &username, MsgId msgId, const QStr showPeerProfile(peer); } } else { - if (msgId == ShowAtProfileMsgId) { + if (msgId == ShowAtProfileMsgId || !peer->isChannel()) { // show specific posts only in channels / supergroups msgId = ShowAtUnreadMsgId; } if (peer->isUser() && peer->asUser()->botInfo) { @@ -3541,7 +3534,7 @@ void MainWidget::usernameResolveDone(QPair msgIdAndStartToken, c showPeerProfile(peer); } } else { - if (msgId == ShowAtProfileMsgId) { + if (msgId == ShowAtProfileMsgId || !peer->isChannel()) { // show specific posts only in channels / supergroups msgId = ShowAtUnreadMsgId; } if (peer->isUser() && peer->asUser()->botInfo) { @@ -3892,21 +3885,21 @@ void MainWidget::updateOnline(bool gotOtherOffline) { App::wnd()->checkAutoLock(); bool isOnline = App::wnd()->isActive(); - int updateIn = cOnlineUpdatePeriod(); + int updateIn = Global::OnlineUpdatePeriod(); if (isOnline) { uint64 idle = psIdleTime(); - if (idle >= uint64(cOfflineIdleTimeout())) { + if (idle >= uint64(Global::OfflineIdleTimeout())) { isOnline = false; if (!_isIdle) { _isIdle = true; _idleFinishTimer.start(900); } } else { - updateIn = qMin(updateIn, int(cOfflineIdleTimeout() - idle)); + updateIn = qMin(updateIn, int(Global::OfflineIdleTimeout() - idle)); } } uint64 ms = getms(true); - if (isOnline != _lastWasOnline || (isOnline && _lastSetOnline + cOnlineUpdatePeriod() <= ms) || (isOnline && gotOtherOffline)) { + if (isOnline != _lastWasOnline || (isOnline && _lastSetOnline + Global::OnlineUpdatePeriod() <= ms) || (isOnline && gotOtherOffline)) { if (_onlineRequest) { MTP::cancel(_onlineRequest); _onlineRequest = 0; @@ -3916,20 +3909,20 @@ void MainWidget::updateOnline(bool gotOtherOffline) { _lastSetOnline = ms; _onlineRequest = MTP::send(MTPaccount_UpdateStatus(MTP_bool(!isOnline))); - if (App::self()) App::self()->onlineTill = unixtime() + (isOnline ? (cOnlineUpdatePeriod() / 1000) : -1); + if (App::self()) App::self()->onlineTill = unixtime() + (isOnline ? (Global::OnlineUpdatePeriod() / 1000) : -1); _lastSetOnline = getms(true); updateOnlineDisplay(); } else if (isOnline) { - updateIn = qMin(updateIn, int(_lastSetOnline + cOnlineUpdatePeriod() - ms)); + updateIn = qMin(updateIn, int(_lastSetOnline + Global::OnlineUpdatePeriod() - ms)); } _onlineTimer.start(updateIn); } void MainWidget::checkIdleFinish() { if (this != App::main()) return; - if (psIdleTime() < uint64(cOfflineIdleTimeout())) { + if (psIdleTime() < uint64(Global::OfflineIdleTimeout())) { _idleFinishTimer.stop(); _isIdle = false; updateOnline(); @@ -4011,18 +4004,28 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) { case mtpc_updateShortMessage: { const MTPDupdateShortMessage &d(updates.c_updateShortMessage()); - if (!App::userLoaded(d.vuser_id.v) || (d.has_fwd_from_id() && !App::peerLoaded(peerFromMTP(d.vfwd_from_id))) || (d.has_via_bot_id() && !App::peerLoaded(peerFromUser(d.vvia_bot_id)))) { + if (!App::userLoaded(d.vuser_id.v) || (d.has_via_bot_id() && !App::peerLoaded(peerFromUser(d.vvia_bot_id)))) { MTP_LOG(0, ("getDifference { good - getting user for updateShortMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); return getDifference(); } - + if (d.has_fwd_from() && d.vfwd_from.type() == mtpc_messageFwdHeader) { + const MTPDmessageFwdHeader &f(d.vfwd_from.c_messageFwdHeader()); + if (f.has_from_id() && !App::peerLoaded(peerFromUser(f.vfrom_id))) { + MTP_LOG(0, ("getDifference { good - getting user for updateShortMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); + return getDifference(); + } + if (f.has_channel_id() && !App::peerLoaded(peerFromChannel(f.vchannel_id))) { + MTP_LOG(0, ("getDifference { good - getting user for updateShortMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); + return getDifference(); + } + } if (!ptsUpdated(d.vpts.v, d.vpts_count.v, updates)) { return; } // update before applying skipped int32 flags = d.vflags.v | MTPDmessage::flag_from_id; - HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.is_out() ? MTP_int(MTP::authedId()) : d.vuser_id, MTP_peerUser(d.is_out() ? d.vuser_id : MTP_int(MTP::authedId())), d.vfwd_from_id, d.vfwd_date, d.vfwd_post, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); + HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.is_out() ? MTP_int(MTP::authedId()) : d.vuser_id, MTP_peerUser(d.is_out() ? d.vuser_id : MTP_int(MTP::authedId())), d.vfwd_from, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint(), MTPint()), NewMessageUnread); if (item) { history.peerMessagesUpdated(item->history()->peer->id); } @@ -4035,19 +4038,29 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) { case mtpc_updateShortChatMessage: { const MTPDupdateShortChatMessage &d(updates.c_updateShortChatMessage()); bool noFrom = !App::userLoaded(d.vfrom_id.v); - if (!App::chatLoaded(d.vchat_id.v) || noFrom || (d.has_fwd_from_id() && !App::peerLoaded(peerFromMTP(d.vfwd_from_id))) || (d.has_via_bot_id() && !App::peerLoaded(peerFromUser(d.vvia_bot_id)))) { + if (!App::chatLoaded(d.vchat_id.v) || noFrom || (d.has_via_bot_id() && !App::peerLoaded(peerFromUser(d.vvia_bot_id)))) { MTP_LOG(0, ("getDifference { good - getting user for updateShortChatMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); if (noFrom && App::api()) App::api()->requestFullPeer(App::chatLoaded(d.vchat_id.v)); return getDifference(); } - + if (d.has_fwd_from() && d.vfwd_from.type() == mtpc_messageFwdHeader) { + const MTPDmessageFwdHeader &f(d.vfwd_from.c_messageFwdHeader()); + if (f.has_from_id() && !App::peerLoaded(peerFromUser(f.vfrom_id))) { + MTP_LOG(0, ("getDifference { good - getting user for updateShortChatMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); + return getDifference(); + } + if (f.has_channel_id() && !App::peerLoaded(peerFromChannel(f.vchannel_id))) { + MTP_LOG(0, ("getDifference { good - getting user for updateShortChatMessage }%1").arg(cTestMode() ? " TESTMODE" : "")); + return getDifference(); + } + } if (!ptsUpdated(d.vpts.v, d.vpts_count.v, updates)) { return; } // update before applying skipped int32 flags = d.vflags.v | MTPDmessage::flag_from_id; - HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.vfrom_id, MTP_peerChat(d.vchat_id), d.vfwd_from_id, d.vfwd_date, d.vfwd_post, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint()), NewMessageUnread); + HistoryItem *item = App::histories().addNewMessage(MTP_message(MTP_int(flags), d.vid, d.vfrom_id, MTP_peerChat(d.vchat_id), d.vfwd_from, d.vvia_bot_id, d.vreply_to_msg_id, d.vdate, d.vmessage, MTP_messageMediaEmpty(), MTPnullMarkup, d.has_entities() ? d.ventities : MTPnullEntities, MTPint(), MTPint()), NewMessageUnread); if (item) { history.peerMessagesUpdated(item->history()->peer->id); } @@ -4436,6 +4449,7 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { const MTPDupdatePrivacy &d(update.c_updatePrivacy()); } break; + /////// Channel updates case mtpc_updateChannel: { const MTPDupdateChannel &d(update.c_updateChannel()); if (ChannelData *channel = App::channelLoaded(d.vchannel_id.v)) { @@ -4481,6 +4495,27 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { } } break; + case mtpc_updateEditChannelMessage: { + const MTPDupdateEditChannelMessage &d(update.c_updateEditChannelMessage()); + ChannelData *channel = App::channelLoaded(peerToChannel(peerFromMessage(d.vmessage))); + + if (channel && !_handlingChannelDifference) { + if (channel->ptsRequesting()) { // skip global updates while getting channel difference + return; + } else if (!channel->ptsUpdated(d.vpts.v, d.vpts_count.v, update)) { + return; + } + } + + // update before applying skipped + if (d.vmessage.type() == mtpc_message) { // apply message edit + App::updateEditedMessage(d.vmessage.c_message()); + } + if (channel && !_handlingChannelDifference) { + channel->ptsApplySkippedUpdates(); + } + } break; + case mtpc_updateReadChannelInbox: { const MTPDupdateReadChannelInbox &d(update.c_updateReadChannelInbox()); ChannelData *channel = App::channelLoaded(d.vchannel_id.v); @@ -4528,6 +4563,7 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { } } break; + ////// Cloud sticker sets case mtpc_updateNewStickerSet: { const MTPDupdateNewStickerSet &d(update.c_updateNewStickerSet()); if (d.vstickerset.type() == mtpc_messages_stickerSet) { @@ -4624,6 +4660,5 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { cSetLastSavedGifsUpdate(0); App::main()->updateStickers(); } break; - } } diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index c8719fb3f0786b..56fe2baeccd460 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -909,11 +909,7 @@ void MediaView::displayPhoto(PhotoData *photo, HistoryItem *item) { _y = (height() - _h) / 2; _width = _w; if (_msgid && item) { - if (HistoryForwarded *fwd = item->toHistoryForwarded()) { - _from = fwd->fromForwarded(); - } else { - _from = item->author(); - } + _from = item->fwdAuthor(); } else { _from = _user; } @@ -1062,11 +1058,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty } _x = (width() - _w) / 2; _y = (height() - _h) / 2; - if (HistoryForwarded *fwd = item->toHistoryForwarded()) { - _from = fwd->fromForwarded(); - } else { - _from = item->author(); - } + _from = item->fwdAuthor(); _full = 1; updateControls(); if (isHidden()) { diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index fdd03e1229627d..a6847bf34f177c 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -39,7 +39,7 @@ namespace { bool _started = false; uint32 layer; - + typedef QMap ParserMap; ParserMap parserMap; QMutex parserMapLock; @@ -209,7 +209,7 @@ namespace { return true; } else if (code < 0 || code >= 500 || (m = QRegularExpression("^FLOOD_WAIT_(\\d+)$").match(err)).hasMatch()) { if (!requestId) return false; - + int32 secs = 1; if (code < 0 || code >= 500) { RequestsDelays::iterator i = requestsDelays.find(requestId); @@ -366,13 +366,13 @@ namespace _mtp_internal { if (!(dcWithShift % _mtp_internal::dcShift)) { dcWithShift += (mainSession->getDcWithShift() % _mtp_internal::dcShift); } - + Sessions::const_iterator i = sessions.constFind(dcWithShift); if (i != sessions.cend()) return *i; MTProtoSessionPtr result(new MTProtoSession()); result->start(dcWithShift); - + sessions.insert(dcWithShift, result); return result; } @@ -380,7 +380,7 @@ namespace _mtp_internal { bool paused() { return _paused; } - + void registerRequest(mtpRequestId requestId, int32 dcWithShift) { { QMutexLocker locker(&requestByDCLock); @@ -704,7 +704,7 @@ namespace MTP { if (!(dc % _mtp_internal::dcShift)) { dc += (mainSession->getDcWithShift() % _mtp_internal::dcShift); } - + Sessions::const_iterator i = sessions.constFind(dc); if (i != sessions.cend()) return (*i)->getState(); diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp index 858394a319d22b..48bd7fd52d85e7 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.cpp @@ -149,6 +149,10 @@ void mtpTextSerializeCore(MTPStringLogger &to, const mtpPrime *&from, const mtpP } } +const MTPReplyMarkup MTPnullMarkup = MTP_replyKeyboardMarkup(MTP_int(0), MTP_vector(0)); +const MTPVector MTPnullEntities = MTP_vector(0); +const MTPMessageFwdHeader MTPnullFwdHeader = MTP_messageFwdHeader(MTPint(), MTPint(), MTPint(), MTPint(), MTPint()); + QString stickerSetTitle(const MTPDstickerSet &s) { QString title = qs(s.vtitle); if ((s.vflags.v & MTPDstickerSet::flag_official) && !title.compare(qstr("Great Minds"), Qt::CaseInsensitive)) { diff --git a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h index b1f655dc49803a..dc16848d75af50 100644 --- a/Telegram/SourceFiles/mtproto/mtpCoreTypes.h +++ b/Telegram/SourceFiles/mtproto/mtpCoreTypes.h @@ -985,7 +985,8 @@ enum { // client side flags MTPDstickerSet_flag_NOT_LOADED = (1 << 31), // sticker set is not yet loaded }; -static const MTPReplyMarkup MTPnullMarkup = MTP_replyKeyboardMarkup(MTP_int(0), MTP_vector(0)); -static const MTPVector MTPnullEntities = MTP_vector(0); +extern const MTPReplyMarkup MTPnullMarkup; +extern const MTPVector MTPnullEntities; +extern const MTPMessageFwdHeader MTPnullFwdHeader; -QString stickerSetTitle(const MTPDstickerSet &s); \ No newline at end of file +QString stickerSetTitle(const MTPDstickerSet &s); diff --git a/Telegram/SourceFiles/mtproto/mtpDC.cpp b/Telegram/SourceFiles/mtproto/mtpDC.cpp index 1a9bf11d767616..899e21a2ca26c6 100644 --- a/Telegram/SourceFiles/mtproto/mtpDC.cpp +++ b/Telegram/SourceFiles/mtproto/mtpDC.cpp @@ -25,7 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "localstorage.h" namespace { - + MTProtoDCMap gDCs; bool configLoadedOnce = false; bool mainDCChanged = false; @@ -152,9 +152,21 @@ namespace { DEBUG_LOG(("MTP Info: got config, chat_size_max: %1, date: %2, test_mode: %3, this_dc: %4, dc_options.length: %5").arg(data.vchat_size_max.v).arg(data.vdate.v).arg(mtpIsTrue(data.vtest_mode)).arg(data.vthis_dc.v).arg(data.vdc_options.c_vector().v.size())); mtpUpdateDcOptions(data.vdc_options.c_vector().v); - cSetMaxGroupCount(data.vchat_size_max.v); - cSetMaxMegaGroupCount(data.vmegagroup_size_max.v); - cSetSavedGifsLimit(data.vsaved_gifs_limit.v); + + Global::SetChatSizeMax(data.vchat_size_max.v); + Global::SetMegagroupSizeMax(data.vmegagroup_size_max.v); + Global::SetForwardedCountMax(data.vforwarded_count_max.v); + Global::SetOnlineUpdatePeriod(data.vonline_update_period_ms.v); + Global::SetOfflineBlurTimeout(data.voffline_blur_timeout_ms.v); + Global::SetOfflineIdleTimeout(data.voffline_idle_timeout_ms.v); + Global::SetOnlineCloudTimeout(data.vonline_cloud_timeout_ms.v); + Global::SetNotifyCloudDelay(data.vnotify_cloud_delay_ms.v); + Global::SetNotifyDefaultDelay(data.vnotify_default_delay_ms.v); + Global::SetChatBigSize(data.vchat_big_size.v); // ? + Global::SetPushChatPeriod(data.vpush_chat_period_ms.v); // ? + Global::SetPushChatLimit(data.vpush_chat_limit.v); // ? + Global::SetSavedGifsLimit(data.vsaved_gifs_limit.v); + Global::SetEditTimeLimit(data.vedit_time_limit.v); // ? configLoadedOnce = true; Local::writeSettings(); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index 462d46aeafb973..0d1eb87c257e31 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -1007,17 +1007,18 @@ void _serialize_user(MTPStringLogger &to, int32 stage, int32 lev, Types &types, case 7: to.add(" bot_nochats: "); ++stages.back(); if (flag & MTPDuser::flag_bot_nochats) { to.add("YES [ BY BIT 16 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 16 IN FIELD flags ]"); } break; case 8: to.add(" verified: "); ++stages.back(); if (flag & MTPDuser::flag_verified) { to.add("YES [ BY BIT 17 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 17 IN FIELD flags ]"); } break; case 9: to.add(" restricted: "); ++stages.back(); if (flag & MTPDuser::flag_restricted) { to.add("YES [ BY BIT 18 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 18 IN FIELD flags ]"); } break; - case 10: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 11: to.add(" access_hash: "); ++stages.back(); if (flag & MTPDuser::flag_access_hash) { types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 12: to.add(" first_name: "); ++stages.back(); if (flag & MTPDuser::flag_first_name) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; - case 13: to.add(" last_name: "); ++stages.back(); if (flag & MTPDuser::flag_last_name) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 14: to.add(" username: "); ++stages.back(); if (flag & MTPDuser::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 15: to.add(" phone: "); ++stages.back(); if (flag & MTPDuser::flag_phone) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; - case 16: to.add(" photo: "); ++stages.back(); if (flag & MTPDuser::flag_photo) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 17: to.add(" status: "); ++stages.back(); if (flag & MTPDuser::flag_status) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; - case 18: to.add(" bot_info_version: "); ++stages.back(); if (flag & MTPDuser::flag_bot_info_version) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 14 IN FIELD flags ]"); } break; - case 19: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDuser::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 18 IN FIELD flags ]"); } break; - case 20: to.add(" bot_inline_placeholder: "); ++stages.back(); if (flag & MTPDuser::flag_bot_inline_placeholder) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 19 IN FIELD flags ]"); } break; + case 10: to.add(" min: "); ++stages.back(); if (flag & MTPDuser::flag_min) { to.add("YES [ BY BIT 20 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 20 IN FIELD flags ]"); } break; + case 11: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 12: to.add(" access_hash: "); ++stages.back(); if (flag & MTPDuser::flag_access_hash) { types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 13: to.add(" first_name: "); ++stages.back(); if (flag & MTPDuser::flag_first_name) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 14: to.add(" last_name: "); ++stages.back(); if (flag & MTPDuser::flag_last_name) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 15: to.add(" username: "); ++stages.back(); if (flag & MTPDuser::flag_username) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 16: to.add(" phone: "); ++stages.back(); if (flag & MTPDuser::flag_phone) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; + case 17: to.add(" photo: "); ++stages.back(); if (flag & MTPDuser::flag_photo) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; + case 18: to.add(" status: "); ++stages.back(); if (flag & MTPDuser::flag_status) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 19: to.add(" bot_info_version: "); ++stages.back(); if (flag & MTPDuser::flag_bot_info_version) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 14 IN FIELD flags ]"); } break; + case 20: to.add(" restriction_reason: "); ++stages.back(); if (flag & MTPDuser::flag_restriction_reason) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 18 IN FIELD flags ]"); } break; + case 21: to.add(" bot_inline_placeholder: "); ++stages.back(); if (flag & MTPDuser::flag_bot_inline_placeholder) { types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 19 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -1351,17 +1352,16 @@ void _serialize_message(MTPStringLogger &to, int32 stage, int32 lev, Types &type case 7: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 8: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; case 9: to.add(" to_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 10: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 11: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 12: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; - case 13: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDmessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 14: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 15: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 16: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 17: to.add(" media: "); ++stages.back(); if (flag & MTPDmessage::flag_media) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; - case 18: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; - case 19: to.add(" entities: "); ++stages.back(); if (flag & MTPDmessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; - case 20: to.add(" views: "); ++stages.back(); if (flag & MTPDmessage::flag_views) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 10: to.add(" fwd_from: "); ++stages.back(); if (flag & MTPDmessage::flag_fwd_from) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 11: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDmessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 12: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 13: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 14: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 15: to.add(" media: "); ++stages.back(); if (flag & MTPDmessage::flag_media) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; + case 16: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPDmessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 17: to.add(" entities: "); ++stages.back(); if (flag & MTPDmessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 18: to.add(" views: "); ++stages.back(); if (flag & MTPDmessage::flag_views) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 19: to.add(" edit_date: "); ++stages.back(); if (flag & MTPDmessage::flag_edit_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 15 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -1379,11 +1379,13 @@ void _serialize_messageService(MTPStringLogger &to, int32 stage, int32 lev, Type case 2: to.add(" out: "); ++stages.back(); if (flag & MTPDmessageService::flag_out) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 3: to.add(" mentioned: "); ++stages.back(); if (flag & MTPDmessageService::flag_mentioned) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 4: to.add(" media_unread: "); ++stages.back(); if (flag & MTPDmessageService::flag_media_unread) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 5: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessageService::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; - case 7: to.add(" to_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 9: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" silent: "); ++stages.back(); if (flag & MTPDmessageService::flag_silent) { to.add("YES [ BY BIT 13 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 13 IN FIELD flags ]"); } break; + case 6: to.add(" post: "); ++stages.back(); if (flag & MTPDmessageService::flag_post) { to.add("YES [ BY BIT 14 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 14 IN FIELD flags ]"); } break; + case 7: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessageService::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; + case 9: to.add(" to_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 10: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 11: to.add(" action: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -2872,6 +2874,21 @@ void _serialize_updateBotInlineSend(MTPStringLogger &to, int32 stage, int32 lev, } } +void _serialize_updateEditChannelMessage(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ updateEditChannelMessage"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" message: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 2: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_updates_state(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -2963,12 +2980,10 @@ void _serialize_updateShortMessage(MTPStringLogger &to, int32 stage, int32 lev, case 9: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 10: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 11: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 12: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 13: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 14: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; - case 15: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 16: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 17: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 12: to.add(" fwd_from: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_fwd_from) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 13: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 14: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 15: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -2994,12 +3009,10 @@ void _serialize_updateShortChatMessage(MTPStringLogger &to, int32 stage, int32 l case 10: to.add(" pts: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 11: to.add(" pts_count: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 12: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 13: to.add(" fwd_from_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_from_id) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 14: to.add(" fwd_date: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 15: to.add(" fwd_post: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 12 IN FIELD flags ]"); } break; - case 16: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; - case 17: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; - case 18: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; + case 13: to.add(" fwd_from: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_fwd_from) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 14: to.add(" via_bot_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_via_bot_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; + case 15: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 16: to.add(" entities: "); ++stages.back(); if (flag & MTPDupdateShortChatMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -3177,7 +3190,8 @@ void _serialize_config(MTPStringLogger &to, int32 stage, int32 lev, Types &types case 15: to.add(" push_chat_period_ms: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 16: to.add(" push_chat_limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 17: to.add(" saved_gifs_limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 18: to.add(" disabled_features: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 18: to.add(" edit_time_limit: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 19: to.add(" disabled_features: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -5093,6 +5107,41 @@ void _serialize_exportedMessageLink(MTPStringLogger &to, int32 stage, int32 lev, } } +void _serialize_messageFwdHeader(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ messageFwdHeader"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" from_id: "); ++stages.back(); if (flag & MTPDmessageFwdHeader::flag_from_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 2: to.add(" date: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" channel_id: "); ++stages.back(); if (flag & MTPDmessageFwdHeader::flag_channel_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 4: to.add(" channel_post: "); ++stages.back(); if (flag & MTPDmessageFwdHeader::flag_channel_post) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + +void _serialize_channels_messageEditData(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_messageEditData"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" caption: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_caption) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 2: to.add(" from_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" edit_by: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_edit_by) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 4: to.add(" edit_date: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_edit_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 5: to.add(" users: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_req_pq(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -6868,6 +6917,24 @@ void _serialize_channels_toggleSignatures(MTPStringLogger &to, int32 stage, int3 } } +void _serialize_channels_editMessage(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_editMessage"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" no_webpage: "); ++stages.back(); if (flag & MTPchannels_editMessage::flag_no_webpage) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 2: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" entities: "); ++stages.back(); if (flag & MTPchannels_editMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_messages_getChats(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -7395,6 +7462,20 @@ void _serialize_channels_exportMessageLink(MTPStringLogger &to, int32 stage, int } } +void _serialize_channels_getMessageEditData(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { + if (stage) { + to.add(",\n").addSpaces(lev); + } else { + to.add("{ channels_getMessageEditData"); + to.add("\n").addSpaces(lev); + } + switch (stage) { + case 0: to.add(" channel: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; + } +} + void _serialize_rpc_result(MTPStringLogger &to, int32 stage, int32 lev, Types &types, Types &vtypes, StagesFlags &stages, StagesFlags &flags, const mtpPrime *start, const mtpPrime *end, int32 flag) { if (stage) { to.add(",\n").addSpaces(lev); @@ -7676,6 +7757,7 @@ namespace { _serializers.insert(mtpc_updateSavedGifs, _serialize_updateSavedGifs); _serializers.insert(mtpc_updateBotInlineQuery, _serialize_updateBotInlineQuery); _serializers.insert(mtpc_updateBotInlineSend, _serialize_updateBotInlineSend); + _serializers.insert(mtpc_updateEditChannelMessage, _serialize_updateEditChannelMessage); _serializers.insert(mtpc_updates_state, _serialize_updates_state); _serializers.insert(mtpc_updates_differenceEmpty, _serialize_updates_differenceEmpty); _serializers.insert(mtpc_updates_difference, _serialize_updates_difference); @@ -7854,6 +7936,8 @@ namespace { _serializers.insert(mtpc_botInlineResult, _serialize_botInlineResult); _serializers.insert(mtpc_messages_botResults, _serialize_messages_botResults); _serializers.insert(mtpc_exportedMessageLink, _serialize_exportedMessageLink); + _serializers.insert(mtpc_messageFwdHeader, _serialize_messageFwdHeader); + _serializers.insert(mtpc_channels_messageEditData, _serialize_channels_messageEditData); _serializers.insert(mtpc_req_pq, _serialize_req_pq); _serializers.insert(mtpc_req_DH_params, _serialize_req_DH_params); @@ -7985,6 +8069,7 @@ namespace { _serializers.insert(mtpc_channels_deleteChannel, _serialize_channels_deleteChannel); _serializers.insert(mtpc_channels_toggleInvites, _serialize_channels_toggleInvites); _serializers.insert(mtpc_channels_toggleSignatures, _serialize_channels_toggleSignatures); + _serializers.insert(mtpc_channels_editMessage, _serialize_channels_editMessage); _serializers.insert(mtpc_messages_getChats, _serialize_messages_getChats); _serializers.insert(mtpc_channels_getChannels, _serialize_channels_getChannels); _serializers.insert(mtpc_messages_getFullChat, _serialize_messages_getFullChat); @@ -8025,6 +8110,7 @@ namespace { _serializers.insert(mtpc_channels_getParticipants, _serialize_channels_getParticipants); _serializers.insert(mtpc_channels_getParticipant, _serialize_channels_getParticipant); _serializers.insert(mtpc_channels_exportMessageLink, _serialize_channels_exportMessageLink); + _serializers.insert(mtpc_channels_getMessageEditData, _serialize_channels_getMessageEditData); _serializers.insert(mtpc_rpc_result, _serialize_rpc_result); _serializers.insert(mtpc_msg_container, _serialize_msg_container); diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 0f15155a175641..87a972c7e2844f 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -145,7 +145,7 @@ enum { mtpc_chatPhotoEmpty = 0x37c1011c, mtpc_chatPhoto = 0x6153276a, mtpc_messageEmpty = 0x83e5de54, - mtpc_message = 0xef11cef6, + mtpc_message = 0xc09be45f, mtpc_messageService = 0xc06b9607, mtpc_messageMediaEmpty = 0x3ded6320, mtpc_messageMediaPhoto = 0x3d8ce53d, @@ -269,13 +269,14 @@ enum { mtpc_updateSavedGifs = 0x9375341e, mtpc_updateBotInlineQuery = 0xc01eea08, mtpc_updateBotInlineSend = 0xf69e113, + mtpc_updateEditChannelMessage = 0x1b3f4df7, mtpc_updates_state = 0xa56c2a3e, mtpc_updates_differenceEmpty = 0x5d75a138, mtpc_updates_difference = 0xf49ca0, mtpc_updates_differenceSlice = 0xa8fb1981, mtpc_updatesTooLong = 0xe317af7e, - mtpc_updateShortMessage = 0x3afbe9d1, - mtpc_updateShortChatMessage = 0xca2ef195, + mtpc_updateShortMessage = 0x914fbf11, + mtpc_updateShortChatMessage = 0x16812688, mtpc_updateShort = 0x78d4dec1, mtpc_updatesCombined = 0x725b04c3, mtpc_updates = 0x74ae4240, @@ -285,7 +286,7 @@ enum { mtpc_photos_photo = 0x20212ca8, mtpc_upload_file = 0x96a18d5, mtpc_dcOption = 0x5d8c6cc, - mtpc_config = 0x6bbc5f8, + mtpc_config = 0x317ceef4, mtpc_nearestDc = 0x8e1a1775, mtpc_help_appUpdate = 0x8987f311, mtpc_help_noAppUpdate = 0xc45a6536, @@ -447,6 +448,8 @@ enum { mtpc_botInlineResult = 0x9bebaeb9, mtpc_messages_botResults = 0x1170b0a3, mtpc_exportedMessageLink = 0x1f486803, + mtpc_messageFwdHeader = 0xc786ddcb, + mtpc_channels_messageEditData = 0xb86fd3cf, mtpc_invokeAfterMsg = 0xcb9f372d, mtpc_invokeAfterMsgs = 0x3dc4b4f0, mtpc_initConnection = 0x69796de9, @@ -607,7 +610,9 @@ enum { mtpc_channels_deleteChannel = 0xc0111fe3, mtpc_channels_toggleInvites = 0x49609307, mtpc_channels_exportMessageLink = 0xc846d22d, - mtpc_channels_toggleSignatures = 0x1f69b606 + mtpc_channels_toggleSignatures = 0x1f69b606, + mtpc_channels_getMessageEditData = 0x27ea3a28, + mtpc_channels_editMessage = 0xdcda80ed }; // Type forward declarations @@ -944,6 +949,7 @@ class MTPDupdateNewStickerSet; class MTPDupdateStickerSetsOrder; class MTPDupdateBotInlineQuery; class MTPDupdateBotInlineSend; +class MTPDupdateEditChannelMessage; class MTPupdates_state; class MTPDupdates_state; @@ -1233,6 +1239,12 @@ class MTPDmessages_botResults; class MTPexportedMessageLink; class MTPDexportedMessageLink; +class MTPmessageFwdHeader; +class MTPDmessageFwdHeader; + +class MTPchannels_messageEditData; +class MTPDchannels_messageEditData; + // Boxed types definitions typedef MTPBoxed MTPResPQ; @@ -1395,6 +1407,8 @@ typedef MTPBoxed MTPBotInlineMessage; typedef MTPBoxed MTPBotInlineResult; typedef MTPBoxed MTPmessages_BotResults; typedef MTPBoxed MTPExportedMessageLink; +typedef MTPBoxed MTPMessageFwdHeader; +typedef MTPBoxed MTPchannels_MessageEditData; // Type classes definitions @@ -3518,7 +3532,7 @@ class MTPmessage : private mtpDataOwner { explicit MTPmessage(MTPDmessageService *_data); friend MTPmessage MTP_messageEmpty(MTPint _id); - friend MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views); + friend MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date); friend MTPmessage MTP_messageService(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _date, const MTPMessageAction &_action); mtpTypeId _type; @@ -5432,6 +5446,18 @@ class MTPupdate : private mtpDataOwner { return *(const MTPDupdateBotInlineSend*)data; } + MTPDupdateEditChannelMessage &_updateEditChannelMessage() { + if (!data) throw mtpErrorUninitialized(); + if (_type != mtpc_updateEditChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditChannelMessage); + split(); + return *(MTPDupdateEditChannelMessage*)data; + } + const MTPDupdateEditChannelMessage &c_updateEditChannelMessage() const { + if (!data) throw mtpErrorUninitialized(); + if (_type != mtpc_updateEditChannelMessage) throw mtpErrorWrongTypeId(_type, mtpc_updateEditChannelMessage); + return *(const MTPDupdateEditChannelMessage*)data; + } + uint32 innerLength() const; mtpTypeId type() const; void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons); @@ -5482,6 +5508,7 @@ class MTPupdate : private mtpDataOwner { explicit MTPupdate(MTPDupdateStickerSetsOrder *_data); explicit MTPupdate(MTPDupdateBotInlineQuery *_data); explicit MTPupdate(MTPDupdateBotInlineSend *_data); + explicit MTPupdate(MTPDupdateEditChannelMessage *_data); friend MTPupdate MTP_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count); friend MTPupdate MTP_updateMessageID(MTPint _id, const MTPlong &_random_id); @@ -5526,6 +5553,7 @@ class MTPupdate : private mtpDataOwner { friend MTPupdate MTP_updateSavedGifs(); friend MTPupdate MTP_updateBotInlineQuery(const MTPlong &_query_id, MTPint _user_id, const MTPstring &_query, const MTPstring &_offset); friend MTPupdate MTP_updateBotInlineSend(MTPint _user_id, const MTPstring &_query, const MTPstring &_id); + friend MTPupdate MTP_updateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count); mtpTypeId _type; }; @@ -5724,8 +5752,8 @@ class MTPupdates : private mtpDataOwner { explicit MTPupdates(MTPDupdateShortSentMessage *_data); friend MTPupdates MTP_updatesTooLong(); - friend MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); - friend MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); + friend MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); + friend MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities); friend MTPupdates MTP_updateShort(const MTPUpdate &_update, MTPint _date); friend MTPupdates MTP_updatesCombined(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq_start, MTPint _seq); friend MTPupdates MTP_updates(const MTPVector &_updates, const MTPVector &_users, const MTPVector &_chats, MTPint _date, MTPint _seq); @@ -5906,7 +5934,7 @@ class MTPconfig : private mtpDataOwner { private: explicit MTPconfig(MTPDconfig *_data); - friend MTPconfig MTP_config(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, const MTPVector &_disabled_features); + friend MTPconfig MTP_config(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, const MTPVector &_disabled_features); }; typedef MTPBoxed MTPConfig; @@ -8994,6 +9022,68 @@ class MTPexportedMessageLink : private mtpDataOwner { }; typedef MTPBoxed MTPExportedMessageLink; +class MTPmessageFwdHeader : private mtpDataOwner { +public: + MTPmessageFwdHeader(); + MTPmessageFwdHeader(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageFwdHeader) : mtpDataOwner(0) { + read(from, end, cons); + } + + MTPDmessageFwdHeader &_messageFwdHeader() { + if (!data) throw mtpErrorUninitialized(); + split(); + return *(MTPDmessageFwdHeader*)data; + } + const MTPDmessageFwdHeader &c_messageFwdHeader() const { + if (!data) throw mtpErrorUninitialized(); + return *(const MTPDmessageFwdHeader*)data; + } + + uint32 innerLength() const; + mtpTypeId type() const; + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_messageFwdHeader); + void write(mtpBuffer &to) const; + + typedef void ResponseType; + +private: + explicit MTPmessageFwdHeader(MTPDmessageFwdHeader *_data); + + friend MTPmessageFwdHeader MTP_messageFwdHeader(MTPint _flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post); +}; +typedef MTPBoxed MTPMessageFwdHeader; + +class MTPchannels_messageEditData : private mtpDataOwner { +public: + MTPchannels_messageEditData(); + MTPchannels_messageEditData(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_messageEditData) : mtpDataOwner(0) { + read(from, end, cons); + } + + MTPDchannels_messageEditData &_channels_messageEditData() { + if (!data) throw mtpErrorUninitialized(); + split(); + return *(MTPDchannels_messageEditData*)data; + } + const MTPDchannels_messageEditData &c_channels_messageEditData() const { + if (!data) throw mtpErrorUninitialized(); + return *(const MTPDchannels_messageEditData*)data; + } + + uint32 innerLength() const; + mtpTypeId type() const; + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_messageEditData); + void write(mtpBuffer &to) const; + + typedef void ResponseType; + +private: + explicit MTPchannels_messageEditData(MTPDchannels_messageEditData *_data); + + friend MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags, MTPint _from_id, MTPint _edit_by, MTPint _edit_date, const MTPVector &_users); +}; +typedef MTPBoxed MTPchannels_MessageEditData; + // Type constructors with data class MTPDresPQ : public mtpDataImpl { @@ -9713,6 +9803,7 @@ class MTPDuser : public mtpDataImpl { flag_bot_nochats = (1 << 16), flag_verified = (1 << 17), flag_restricted = (1 << 18), + flag_min = (1 << 20), flag_access_hash = (1 << 0), flag_first_name = (1 << 1), flag_last_name = (1 << 2), @@ -9734,6 +9825,7 @@ class MTPDuser : public mtpDataImpl { bool is_bot_nochats() const { return vflags.v & flag_bot_nochats; } bool is_verified() const { return vflags.v & flag_verified; } bool is_restricted() const { return vflags.v & flag_restricted; } + bool is_min() const { return vflags.v & flag_min; } bool has_access_hash() const { return vflags.v & flag_access_hash; } bool has_first_name() const { return vflags.v & flag_first_name; } bool has_last_name() const { return vflags.v & flag_last_name; } @@ -10038,16 +10130,14 @@ class MTPDmessage : public mtpDataImpl { public: MTPDmessage() { } - MTPDmessage(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vmessage(_message), vmedia(_media), vreply_markup(_reply_markup), ventities(_entities), vviews(_views) { + MTPDmessage(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date) : vflags(_flags), vid(_id), vfrom_id(_from_id), vto_id(_to_id), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), vdate(_date), vmessage(_message), vmedia(_media), vreply_markup(_reply_markup), ventities(_entities), vviews(_views), vedit_date(_edit_date) { } MTPint vflags; MTPint vid; MTPint vfrom_id; MTPPeer vto_id; - MTPPeer vfwd_from_id; - MTPint vfwd_date; - MTPint vfwd_post; + MTPMessageFwdHeader vfwd_from; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPint vdate; @@ -10056,6 +10146,7 @@ class MTPDmessage : public mtpDataImpl { MTPReplyMarkup vreply_markup; MTPVector ventities; MTPint vviews; + MTPint vedit_date; enum { flag_unread = (1 << 0), @@ -10065,15 +10156,14 @@ class MTPDmessage : public mtpDataImpl { flag_silent = (1 << 13), flag_post = (1 << 14), flag_from_id = (1 << 8), - flag_fwd_from_id = (1 << 2), - flag_fwd_date = (1 << 2), - flag_fwd_post = (1 << 12), + flag_fwd_from = (1 << 2), flag_via_bot_id = (1 << 11), flag_reply_to_msg_id = (1 << 3), flag_media = (1 << 9), flag_reply_markup = (1 << 6), flag_entities = (1 << 7), flag_views = (1 << 10), + flag_edit_date = (1 << 15), }; bool is_unread() const { return vflags.v & flag_unread; } @@ -10083,15 +10173,14 @@ class MTPDmessage : public mtpDataImpl { bool is_silent() const { return vflags.v & flag_silent; } bool is_post() const { return vflags.v & flag_post; } bool has_from_id() const { return vflags.v & flag_from_id; } - bool has_fwd_from_id() const { return vflags.v & flag_fwd_from_id; } - bool has_fwd_date() const { return vflags.v & flag_fwd_date; } - bool has_fwd_post() const { return vflags.v & flag_fwd_post; } + bool has_fwd_from() const { return vflags.v & flag_fwd_from; } bool has_via_bot_id() const { return vflags.v & flag_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_media() const { return vflags.v & flag_media; } bool has_reply_markup() const { return vflags.v & flag_reply_markup; } bool has_entities() const { return vflags.v & flag_entities; } bool has_views() const { return vflags.v & flag_views; } + bool has_edit_date() const { return vflags.v & flag_edit_date; } }; class MTPDmessageService : public mtpDataImpl { @@ -10113,6 +10202,8 @@ class MTPDmessageService : public mtpDataImpl { flag_out = (1 << 1), flag_mentioned = (1 << 4), flag_media_unread = (1 << 5), + flag_silent = (1 << 13), + flag_post = (1 << 14), flag_from_id = (1 << 8), }; @@ -10120,6 +10211,8 @@ class MTPDmessageService : public mtpDataImpl { bool is_out() const { return vflags.v & flag_out; } bool is_mentioned() const { return vflags.v & flag_mentioned; } bool is_media_unread() const { return vflags.v & flag_media_unread; } + bool is_silent() const { return vflags.v & flag_silent; } + bool is_post() const { return vflags.v & flag_post; } bool has_from_id() const { return vflags.v & flag_from_id; } }; @@ -11218,6 +11311,18 @@ class MTPDupdateBotInlineSend : public mtpDataImpl { MTPstring vid; }; +class MTPDupdateEditChannelMessage : public mtpDataImpl { +public: + MTPDupdateEditChannelMessage() { + } + MTPDupdateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) : vmessage(_message), vpts(_pts), vpts_count(_pts_count) { + } + + MTPMessage vmessage; + MTPint vpts; + MTPint vpts_count; +}; + class MTPDupdates_state : public mtpDataImpl { public: MTPDupdates_state() { @@ -11277,7 +11382,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { public: MTPDupdateShortMessage() { } - MTPDupdateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vuser_id(_user_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { + MTPDupdateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vuser_id(_user_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPint vflags; @@ -11287,9 +11392,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { MTPint vpts; MTPint vpts_count; MTPint vdate; - MTPPeer vfwd_from_id; - MTPint vfwd_date; - MTPint vfwd_post; + MTPMessageFwdHeader vfwd_from; MTPint vvia_bot_id; MTPint vreply_to_msg_id; MTPVector ventities; @@ -11300,9 +11403,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { flag_mentioned = (1 << 4), flag_media_unread = (1 << 5), flag_silent = (1 << 13), - flag_fwd_from_id = (1 << 2), - flag_fwd_date = (1 << 2), - flag_fwd_post = (1 << 12), + flag_fwd_from = (1 << 2), flag_via_bot_id = (1 << 11), flag_reply_to_msg_id = (1 << 3), flag_entities = (1 << 7), @@ -11313,9 +11414,7 @@ class MTPDupdateShortMessage : public mtpDataImpl { bool is_mentioned() const { return vflags.v & flag_mentioned; } bool is_media_unread() const { return vflags.v & flag_media_unread; } bool is_silent() const { return vflags.v & flag_silent; } - bool has_fwd_from_id() const { return vflags.v & flag_fwd_from_id; } - bool has_fwd_date() const { return vflags.v & flag_fwd_date; } - bool has_fwd_post() const { return vflags.v & flag_fwd_post; } + bool has_fwd_from() const { return vflags.v & flag_fwd_from; } bool has_via_bot_id() const { return vflags.v & flag_via_bot_id; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_entities() const { return vflags.v & flag_entities; } @@ -11325,7 +11424,7 @@ class MTPDupdateShortChatMessage : public mtpDataImpl &_entities) : vflags(_flags), vid(_id), vfrom_id(_from_id), vchat_id(_chat_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from_id(_fwd_from_id), vfwd_date(_fwd_date), vfwd_post(_fwd_post), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { + MTPDupdateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) : vflags(_flags), vid(_id), vfrom_id(_from_id), vchat_id(_chat_id), vmessage(_message), vpts(_pts), vpts_count(_pts_count), vdate(_date), vfwd_from(_fwd_from), vvia_bot_id(_via_bot_id), vreply_to_msg_id(_reply_to_msg_id), ventities(_entities) { } MTPint vflags; @@ -11336,9 +11435,7 @@ class MTPDupdateShortChatMessage : public mtpDataImpl ventities; @@ -11349,9 +11446,7 @@ class MTPDupdateShortChatMessage : public mtpDataImpl { public: MTPDconfig() { } - MTPDconfig(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, const MTPVector &_disabled_features) : vdate(_date), vexpires(_expires), vtest_mode(_test_mode), vthis_dc(_this_dc), vdc_options(_dc_options), vchat_size_max(_chat_size_max), vmegagroup_size_max(_megagroup_size_max), vforwarded_count_max(_forwarded_count_max), vonline_update_period_ms(_online_update_period_ms), voffline_blur_timeout_ms(_offline_blur_timeout_ms), voffline_idle_timeout_ms(_offline_idle_timeout_ms), vonline_cloud_timeout_ms(_online_cloud_timeout_ms), vnotify_cloud_delay_ms(_notify_cloud_delay_ms), vnotify_default_delay_ms(_notify_default_delay_ms), vchat_big_size(_chat_big_size), vpush_chat_period_ms(_push_chat_period_ms), vpush_chat_limit(_push_chat_limit), vsaved_gifs_limit(_saved_gifs_limit), vdisabled_features(_disabled_features) { + MTPDconfig(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, const MTPVector &_disabled_features) : vdate(_date), vexpires(_expires), vtest_mode(_test_mode), vthis_dc(_this_dc), vdc_options(_dc_options), vchat_size_max(_chat_size_max), vmegagroup_size_max(_megagroup_size_max), vforwarded_count_max(_forwarded_count_max), vonline_update_period_ms(_online_update_period_ms), voffline_blur_timeout_ms(_offline_blur_timeout_ms), voffline_idle_timeout_ms(_offline_idle_timeout_ms), vonline_cloud_timeout_ms(_online_cloud_timeout_ms), vnotify_cloud_delay_ms(_notify_cloud_delay_ms), vnotify_default_delay_ms(_notify_default_delay_ms), vchat_big_size(_chat_big_size), vpush_chat_period_ms(_push_chat_period_ms), vpush_chat_limit(_push_chat_limit), vsaved_gifs_limit(_saved_gifs_limit), vedit_time_limit(_edit_time_limit), vdisabled_features(_disabled_features) { } MTPint vdate; @@ -11532,6 +11625,7 @@ class MTPDconfig : public mtpDataImpl { MTPint vpush_chat_period_ms; MTPint vpush_chat_limit; MTPint vsaved_gifs_limit; + MTPint vedit_time_limit; MTPVector vdisabled_features; }; @@ -13092,6 +13186,54 @@ class MTPDexportedMessageLink : public mtpDataImpl { MTPstring vlink; }; +class MTPDmessageFwdHeader : public mtpDataImpl { +public: + MTPDmessageFwdHeader() { + } + MTPDmessageFwdHeader(MTPint _flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post) : vflags(_flags), vfrom_id(_from_id), vdate(_date), vchannel_id(_channel_id), vchannel_post(_channel_post) { + } + + MTPint vflags; + MTPint vfrom_id; + MTPint vdate; + MTPint vchannel_id; + MTPint vchannel_post; + + enum { + flag_from_id = (1 << 0), + flag_channel_id = (1 << 1), + flag_channel_post = (1 << 2), + }; + + bool has_from_id() const { return vflags.v & flag_from_id; } + bool has_channel_id() const { return vflags.v & flag_channel_id; } + bool has_channel_post() const { return vflags.v & flag_channel_post; } +}; + +class MTPDchannels_messageEditData : public mtpDataImpl { +public: + MTPDchannels_messageEditData() { + } + MTPDchannels_messageEditData(MTPint _flags, MTPint _from_id, MTPint _edit_by, MTPint _edit_date, const MTPVector &_users) : vflags(_flags), vfrom_id(_from_id), vedit_by(_edit_by), vedit_date(_edit_date), vusers(_users) { + } + + MTPint vflags; + MTPint vfrom_id; + MTPint vedit_by; + MTPint vedit_date; + MTPVector vusers; + + enum { + flag_caption = (1 << 1), + flag_edit_by = (1 << 0), + flag_edit_date = (1 << 0), + }; + + bool is_caption() const { return vflags.v & flag_caption; } + bool has_edit_by() const { return vflags.v & flag_edit_by; } + bool has_edit_date() const { return vflags.v & flag_edit_date; } +}; + // RPC methods class MTPreq_pq { // RPC method 'req_pq' @@ -20294,6 +20436,107 @@ class MTPchannels_ToggleSignatures : public MTPBoxed { +public: + MTPchannels_GetMessageEditData() { + } + MTPchannels_GetMessageEditData(const MTPchannels_getMessageEditData &v) : MTPBoxed(v) { + } + MTPchannels_GetMessageEditData(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPchannels_GetMessageEditData(const MTPInputChannel &_channel, MTPint _id) : MTPBoxed(MTPchannels_getMessageEditData(_channel, _id)) { + } +}; + +class MTPchannels_editMessage { // RPC method 'channels.editMessage' +public: + MTPint vflags; + MTPInputChannel vchannel; + MTPint vid; + MTPstring vmessage; + MTPVector ventities; + + MTPchannels_editMessage() { + } + MTPchannels_editMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editMessage) { + read(from, end, cons); + } + MTPchannels_editMessage(MTPint _flags, const MTPInputChannel &_channel, MTPint _id, const MTPstring &_message, const MTPVector &_entities) : vflags(_flags), vchannel(_channel), vid(_id), vmessage(_message), ventities(_entities) { + } + + enum { + flag_no_webpage = (1 << 1), + flag_entities = (1 << 3), + }; + + bool is_no_webpage() const { return vflags.v & flag_no_webpage; } + bool has_entities() const { return vflags.v & flag_entities; } + + uint32 innerLength() const { + return vflags.innerLength() + vchannel.innerLength() + vid.innerLength() + vmessage.innerLength() + (has_entities() ? ventities.innerLength() : 0); + } + mtpTypeId type() const { + return mtpc_channels_editMessage; + } + void read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = mtpc_channels_editMessage) { + vflags.read(from, end); + vchannel.read(from, end); + vid.read(from, end); + vmessage.read(from, end); + if (has_entities()) { ventities.read(from, end); } else { ventities = MTPVector(); } + } + void write(mtpBuffer &to) const { + vflags.write(to); + vchannel.write(to); + vid.write(to); + vmessage.write(to); + if (has_entities()) ventities.write(to); + } + + typedef MTPUpdates ResponseType; +}; +class MTPchannels_EditMessage : public MTPBoxed { +public: + MTPchannels_EditMessage() { + } + MTPchannels_EditMessage(const MTPchannels_editMessage &v) : MTPBoxed(v) { + } + MTPchannels_EditMessage(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons = 0) : MTPBoxed(from, end, cons) { + } + MTPchannels_EditMessage(MTPint _flags, const MTPInputChannel &_channel, MTPint _id, const MTPstring &_message, const MTPVector &_entities) : MTPBoxed(MTPchannels_editMessage(_flags, _channel, _id, _message, _entities)) { + } +}; + // Inline methods definition inline MTPresPQ::MTPresPQ() : mtpDataOwner(new MTPDresPQ()) { @@ -23046,7 +23289,7 @@ inline uint32 MTPmessage::innerLength() const { } case mtpc_message: { const MTPDmessage &v(c_message()); - return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vmessage.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_views() ? v.vviews.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vto_id.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + v.vdate.innerLength() + v.vmessage.innerLength() + (v.has_media() ? v.vmedia.innerLength() : 0) + (v.has_reply_markup() ? v.vreply_markup.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0) + (v.has_views() ? v.vviews.innerLength() : 0) + (v.has_edit_date() ? v.vedit_date.innerLength() : 0); } case mtpc_messageService: { const MTPDmessageService &v(c_messageService()); @@ -23074,9 +23317,7 @@ inline void MTPmessage::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vid.read(from, end); if (v.has_from_id()) { v.vfrom_id.read(from, end); } else { v.vfrom_id = MTPint(); } v.vto_id.read(from, end); - if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } - if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } - if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } + if (v.has_fwd_from()) { v.vfwd_from.read(from, end); } else { v.vfwd_from = MTPMessageFwdHeader(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } v.vdate.read(from, end); @@ -23085,6 +23326,7 @@ inline void MTPmessage::read(const mtpPrime *&from, const mtpPrime *end, mtpType if (v.has_reply_markup()) { v.vreply_markup.read(from, end); } else { v.vreply_markup = MTPReplyMarkup(); } if (v.has_entities()) { v.ventities.read(from, end); } else { v.ventities = MTPVector(); } if (v.has_views()) { v.vviews.read(from, end); } else { v.vviews = MTPint(); } + if (v.has_edit_date()) { v.vedit_date.read(from, end); } else { v.vedit_date = MTPint(); } } break; case mtpc_messageService: _type = cons; { if (!data) setData(new MTPDmessageService()); @@ -23111,9 +23353,7 @@ inline void MTPmessage::write(mtpBuffer &to) const { v.vid.write(to); if (v.has_from_id()) v.vfrom_id.write(to); v.vto_id.write(to); - if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); - if (v.has_fwd_date()) v.vfwd_date.write(to); - if (v.has_fwd_post()) v.vfwd_post.write(to); + if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); v.vdate.write(to); @@ -23122,6 +23362,7 @@ inline void MTPmessage::write(mtpBuffer &to) const { if (v.has_reply_markup()) v.vreply_markup.write(to); if (v.has_entities()) v.ventities.write(to); if (v.has_views()) v.vviews.write(to); + if (v.has_edit_date()) v.vedit_date.write(to); } break; case mtpc_messageService: { const MTPDmessageService &v(c_messageService()); @@ -23151,8 +23392,8 @@ inline MTPmessage::MTPmessage(MTPDmessageService *_data) : mtpDataOwner(_data), inline MTPmessage MTP_messageEmpty(MTPint _id) { return MTPmessage(new MTPDmessageEmpty(_id)); } -inline MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views) { - return MTPmessage(new MTPDmessage(_flags, _id, _from_id, _to_id, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views)); +inline MTPmessage MTP_message(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, MTPint _date, const MTPstring &_message, const MTPMessageMedia &_media, const MTPReplyMarkup &_reply_markup, const MTPVector &_entities, MTPint _views, MTPint _edit_date) { + return MTPmessage(new MTPDmessage(_flags, _id, _from_id, _to_id, _fwd_from, _via_bot_id, _reply_to_msg_id, _date, _message, _media, _reply_markup, _entities, _views, _edit_date)); } inline MTPmessage MTP_messageService(MTPint _flags, MTPint _id, MTPint _from_id, const MTPPeer &_to_id, MTPint _date, const MTPMessageAction &_action) { return MTPmessage(new MTPDmessageService(_flags, _id, _from_id, _to_id, _date, _action)); @@ -25184,6 +25425,10 @@ inline uint32 MTPupdate::innerLength() const { const MTPDupdateBotInlineSend &v(c_updateBotInlineSend()); return v.vuser_id.innerLength() + v.vquery.innerLength() + v.vid.innerLength(); } + case mtpc_updateEditChannelMessage: { + const MTPDupdateEditChannelMessage &v(c_updateEditChannelMessage()); + return v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength(); + } } return 0; } @@ -25468,6 +25713,13 @@ inline void MTPupdate::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeI v.vquery.read(from, end); v.vid.read(from, end); } break; + case mtpc_updateEditChannelMessage: _type = cons; { + if (!data) setData(new MTPDupdateEditChannelMessage()); + MTPDupdateEditChannelMessage &v(_updateEditChannelMessage()); + v.vmessage.read(from, end); + v.vpts.read(from, end); + v.vpts_count.read(from, end); + } break; default: throw mtpErrorUnexpected(cons, "MTPupdate"); } } @@ -25704,6 +25956,12 @@ inline void MTPupdate::write(mtpBuffer &to) const { v.vquery.write(to); v.vid.write(to); } break; + case mtpc_updateEditChannelMessage: { + const MTPDupdateEditChannelMessage &v(c_updateEditChannelMessage()); + v.vmessage.write(to); + v.vpts.write(to); + v.vpts_count.write(to); + } break; } } inline MTPupdate::MTPupdate(mtpTypeId type) : mtpDataOwner(0), _type(type) { @@ -25751,6 +26009,7 @@ inline MTPupdate::MTPupdate(mtpTypeId type) : mtpDataOwner(0), _type(type) { case mtpc_updateSavedGifs: break; case mtpc_updateBotInlineQuery: setData(new MTPDupdateBotInlineQuery()); break; case mtpc_updateBotInlineSend: setData(new MTPDupdateBotInlineSend()); break; + case mtpc_updateEditChannelMessage: setData(new MTPDupdateEditChannelMessage()); break; default: throw mtpErrorBadTypeId(type, "MTPupdate"); } } @@ -25836,6 +26095,8 @@ inline MTPupdate::MTPupdate(MTPDupdateBotInlineQuery *_data) : mtpDataOwner(_dat } inline MTPupdate::MTPupdate(MTPDupdateBotInlineSend *_data) : mtpDataOwner(_data), _type(mtpc_updateBotInlineSend) { } +inline MTPupdate::MTPupdate(MTPDupdateEditChannelMessage *_data) : mtpDataOwner(_data), _type(mtpc_updateEditChannelMessage) { +} inline MTPupdate MTP_updateNewMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { return MTPupdate(new MTPDupdateNewMessage(_message, _pts, _pts_count)); } @@ -25965,6 +26226,9 @@ inline MTPupdate MTP_updateBotInlineQuery(const MTPlong &_query_id, MTPint _user inline MTPupdate MTP_updateBotInlineSend(MTPint _user_id, const MTPstring &_query, const MTPstring &_id) { return MTPupdate(new MTPDupdateBotInlineSend(_user_id, _query, _id)); } +inline MTPupdate MTP_updateEditChannelMessage(const MTPMessage &_message, MTPint _pts, MTPint _pts_count) { + return MTPupdate(new MTPDupdateEditChannelMessage(_message, _pts, _pts_count)); +} inline MTPupdates_state::MTPupdates_state() : mtpDataOwner(new MTPDupdates_state()) { } @@ -26109,11 +26373,11 @@ inline uint32 MTPupdates::innerLength() const { switch (_type) { case mtpc_updateShortMessage: { const MTPDupdateShortMessage &v(c_updateShortMessage()); - return v.vflags.innerLength() + v.vid.innerLength() + v.vuser_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + v.vuser_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShortChatMessage: { const MTPDupdateShortChatMessage &v(c_updateShortChatMessage()); - return v.vflags.innerLength() + v.vid.innerLength() + v.vfrom_id.innerLength() + v.vchat_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from_id() ? v.vfwd_from_id.innerLength() : 0) + (v.has_fwd_date() ? v.vfwd_date.innerLength() : 0) + (v.has_fwd_post() ? v.vfwd_post.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); + return v.vflags.innerLength() + v.vid.innerLength() + v.vfrom_id.innerLength() + v.vchat_id.innerLength() + v.vmessage.innerLength() + v.vpts.innerLength() + v.vpts_count.innerLength() + v.vdate.innerLength() + (v.has_fwd_from() ? v.vfwd_from.innerLength() : 0) + (v.has_via_bot_id() ? v.vvia_bot_id.innerLength() : 0) + (v.has_reply_to_msg_id() ? v.vreply_to_msg_id.innerLength() : 0) + (v.has_entities() ? v.ventities.innerLength() : 0); } case mtpc_updateShort: { const MTPDupdateShort &v(c_updateShort()); @@ -26152,9 +26416,7 @@ inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vpts.read(from, end); v.vpts_count.read(from, end); v.vdate.read(from, end); - if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } - if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } - if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } + if (v.has_fwd_from()) { v.vfwd_from.read(from, end); } else { v.vfwd_from = MTPMessageFwdHeader(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } if (v.has_entities()) { v.ventities.read(from, end); } else { v.ventities = MTPVector(); } @@ -26170,9 +26432,7 @@ inline void MTPupdates::read(const mtpPrime *&from, const mtpPrime *end, mtpType v.vpts.read(from, end); v.vpts_count.read(from, end); v.vdate.read(from, end); - if (v.has_fwd_from_id()) { v.vfwd_from_id.read(from, end); } else { v.vfwd_from_id = MTPPeer(); } - if (v.has_fwd_date()) { v.vfwd_date.read(from, end); } else { v.vfwd_date = MTPint(); } - if (v.has_fwd_post()) { v.vfwd_post.read(from, end); } else { v.vfwd_post = MTPint(); } + if (v.has_fwd_from()) { v.vfwd_from.read(from, end); } else { v.vfwd_from = MTPMessageFwdHeader(); } if (v.has_via_bot_id()) { v.vvia_bot_id.read(from, end); } else { v.vvia_bot_id = MTPint(); } if (v.has_reply_to_msg_id()) { v.vreply_to_msg_id.read(from, end); } else { v.vreply_to_msg_id = MTPint(); } if (v.has_entities()) { v.ventities.read(from, end); } else { v.ventities = MTPVector(); } @@ -26227,9 +26487,7 @@ inline void MTPupdates::write(mtpBuffer &to) const { v.vpts.write(to); v.vpts_count.write(to); v.vdate.write(to); - if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); - if (v.has_fwd_date()) v.vfwd_date.write(to); - if (v.has_fwd_post()) v.vfwd_post.write(to); + if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); @@ -26244,9 +26502,7 @@ inline void MTPupdates::write(mtpBuffer &to) const { v.vpts.write(to); v.vpts_count.write(to); v.vdate.write(to); - if (v.has_fwd_from_id()) v.vfwd_from_id.write(to); - if (v.has_fwd_date()) v.vfwd_date.write(to); - if (v.has_fwd_post()) v.vfwd_post.write(to); + if (v.has_fwd_from()) v.vfwd_from.write(to); if (v.has_via_bot_id()) v.vvia_bot_id.write(to); if (v.has_reply_to_msg_id()) v.vreply_to_msg_id.write(to); if (v.has_entities()) v.ventities.write(to); @@ -26312,11 +26568,11 @@ inline MTPupdates::MTPupdates(MTPDupdateShortSentMessage *_data) : mtpDataOwner( inline MTPupdates MTP_updatesTooLong() { return MTPupdates(mtpc_updatesTooLong); } -inline MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { - return MTPupdates(new MTPDupdateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _entities)); +inline MTPupdates MTP_updateShortMessage(MTPint _flags, MTPint _id, MTPint _user_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { + return MTPupdates(new MTPDupdateShortMessage(_flags, _id, _user_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities)); } -inline MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPPeer &_fwd_from_id, MTPint _fwd_date, MTPint _fwd_post, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { - return MTPupdates(new MTPDupdateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from_id, _fwd_date, _fwd_post, _via_bot_id, _reply_to_msg_id, _entities)); +inline MTPupdates MTP_updateShortChatMessage(MTPint _flags, MTPint _id, MTPint _from_id, MTPint _chat_id, const MTPstring &_message, MTPint _pts, MTPint _pts_count, MTPint _date, const MTPMessageFwdHeader &_fwd_from, MTPint _via_bot_id, MTPint _reply_to_msg_id, const MTPVector &_entities) { + return MTPupdates(new MTPDupdateShortChatMessage(_flags, _id, _from_id, _chat_id, _message, _pts, _pts_count, _date, _fwd_from, _via_bot_id, _reply_to_msg_id, _entities)); } inline MTPupdates MTP_updateShort(const MTPUpdate &_update, MTPint _date) { return MTPupdates(new MTPDupdateShort(_update, _date)); @@ -26498,7 +26754,7 @@ inline MTPconfig::MTPconfig() : mtpDataOwner(new MTPDconfig()) { inline uint32 MTPconfig::innerLength() const { const MTPDconfig &v(c_config()); - return v.vdate.innerLength() + v.vexpires.innerLength() + v.vtest_mode.innerLength() + v.vthis_dc.innerLength() + v.vdc_options.innerLength() + v.vchat_size_max.innerLength() + v.vmegagroup_size_max.innerLength() + v.vforwarded_count_max.innerLength() + v.vonline_update_period_ms.innerLength() + v.voffline_blur_timeout_ms.innerLength() + v.voffline_idle_timeout_ms.innerLength() + v.vonline_cloud_timeout_ms.innerLength() + v.vnotify_cloud_delay_ms.innerLength() + v.vnotify_default_delay_ms.innerLength() + v.vchat_big_size.innerLength() + v.vpush_chat_period_ms.innerLength() + v.vpush_chat_limit.innerLength() + v.vsaved_gifs_limit.innerLength() + v.vdisabled_features.innerLength(); + return v.vdate.innerLength() + v.vexpires.innerLength() + v.vtest_mode.innerLength() + v.vthis_dc.innerLength() + v.vdc_options.innerLength() + v.vchat_size_max.innerLength() + v.vmegagroup_size_max.innerLength() + v.vforwarded_count_max.innerLength() + v.vonline_update_period_ms.innerLength() + v.voffline_blur_timeout_ms.innerLength() + v.voffline_idle_timeout_ms.innerLength() + v.vonline_cloud_timeout_ms.innerLength() + v.vnotify_cloud_delay_ms.innerLength() + v.vnotify_default_delay_ms.innerLength() + v.vchat_big_size.innerLength() + v.vpush_chat_period_ms.innerLength() + v.vpush_chat_limit.innerLength() + v.vsaved_gifs_limit.innerLength() + v.vedit_time_limit.innerLength() + v.vdisabled_features.innerLength(); } inline mtpTypeId MTPconfig::type() const { return mtpc_config; @@ -26526,6 +26782,7 @@ inline void MTPconfig::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeI v.vpush_chat_period_ms.read(from, end); v.vpush_chat_limit.read(from, end); v.vsaved_gifs_limit.read(from, end); + v.vedit_time_limit.read(from, end); v.vdisabled_features.read(from, end); } inline void MTPconfig::write(mtpBuffer &to) const { @@ -26548,12 +26805,13 @@ inline void MTPconfig::write(mtpBuffer &to) const { v.vpush_chat_period_ms.write(to); v.vpush_chat_limit.write(to); v.vsaved_gifs_limit.write(to); + v.vedit_time_limit.write(to); v.vdisabled_features.write(to); } inline MTPconfig::MTPconfig(MTPDconfig *_data) : mtpDataOwner(_data) { } -inline MTPconfig MTP_config(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, const MTPVector &_disabled_features) { - return MTPconfig(new MTPDconfig(_date, _expires, _test_mode, _this_dc, _dc_options, _chat_size_max, _megagroup_size_max, _forwarded_count_max, _online_update_period_ms, _offline_blur_timeout_ms, _offline_idle_timeout_ms, _online_cloud_timeout_ms, _notify_cloud_delay_ms, _notify_default_delay_ms, _chat_big_size, _push_chat_period_ms, _push_chat_limit, _saved_gifs_limit, _disabled_features)); +inline MTPconfig MTP_config(MTPint _date, MTPint _expires, MTPBool _test_mode, MTPint _this_dc, const MTPVector &_dc_options, MTPint _chat_size_max, MTPint _megagroup_size_max, MTPint _forwarded_count_max, MTPint _online_update_period_ms, MTPint _offline_blur_timeout_ms, MTPint _offline_idle_timeout_ms, MTPint _online_cloud_timeout_ms, MTPint _notify_cloud_delay_ms, MTPint _notify_default_delay_ms, MTPint _chat_big_size, MTPint _push_chat_period_ms, MTPint _push_chat_limit, MTPint _saved_gifs_limit, MTPint _edit_time_limit, const MTPVector &_disabled_features) { + return MTPconfig(new MTPDconfig(_date, _expires, _test_mode, _this_dc, _dc_options, _chat_size_max, _megagroup_size_max, _forwarded_count_max, _online_update_period_ms, _offline_blur_timeout_ms, _offline_idle_timeout_ms, _online_cloud_timeout_ms, _notify_cloud_delay_ms, _notify_default_delay_ms, _chat_big_size, _push_chat_period_ms, _push_chat_limit, _saved_gifs_limit, _edit_time_limit, _disabled_features)); } inline MTPnearestDc::MTPnearestDc() : mtpDataOwner(new MTPDnearestDc()) { @@ -30611,5 +30869,75 @@ inline MTPexportedMessageLink MTP_exportedMessageLink(const MTPstring &_link) { return MTPexportedMessageLink(new MTPDexportedMessageLink(_link)); } +inline MTPmessageFwdHeader::MTPmessageFwdHeader() : mtpDataOwner(new MTPDmessageFwdHeader()) { +} + +inline uint32 MTPmessageFwdHeader::innerLength() const { + const MTPDmessageFwdHeader &v(c_messageFwdHeader()); + return v.vflags.innerLength() + (v.has_from_id() ? v.vfrom_id.innerLength() : 0) + v.vdate.innerLength() + (v.has_channel_id() ? v.vchannel_id.innerLength() : 0) + (v.has_channel_post() ? v.vchannel_post.innerLength() : 0); +} +inline mtpTypeId MTPmessageFwdHeader::type() const { + return mtpc_messageFwdHeader; +} +inline void MTPmessageFwdHeader::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + if (cons != mtpc_messageFwdHeader) throw mtpErrorUnexpected(cons, "MTPmessageFwdHeader"); + + if (!data) setData(new MTPDmessageFwdHeader()); + MTPDmessageFwdHeader &v(_messageFwdHeader()); + v.vflags.read(from, end); + if (v.has_from_id()) { v.vfrom_id.read(from, end); } else { v.vfrom_id = MTPint(); } + v.vdate.read(from, end); + if (v.has_channel_id()) { v.vchannel_id.read(from, end); } else { v.vchannel_id = MTPint(); } + if (v.has_channel_post()) { v.vchannel_post.read(from, end); } else { v.vchannel_post = MTPint(); } +} +inline void MTPmessageFwdHeader::write(mtpBuffer &to) const { + const MTPDmessageFwdHeader &v(c_messageFwdHeader()); + v.vflags.write(to); + if (v.has_from_id()) v.vfrom_id.write(to); + v.vdate.write(to); + if (v.has_channel_id()) v.vchannel_id.write(to); + if (v.has_channel_post()) v.vchannel_post.write(to); +} +inline MTPmessageFwdHeader::MTPmessageFwdHeader(MTPDmessageFwdHeader *_data) : mtpDataOwner(_data) { +} +inline MTPmessageFwdHeader MTP_messageFwdHeader(MTPint _flags, MTPint _from_id, MTPint _date, MTPint _channel_id, MTPint _channel_post) { + return MTPmessageFwdHeader(new MTPDmessageFwdHeader(_flags, _from_id, _date, _channel_id, _channel_post)); +} + +inline MTPchannels_messageEditData::MTPchannels_messageEditData() : mtpDataOwner(new MTPDchannels_messageEditData()) { +} + +inline uint32 MTPchannels_messageEditData::innerLength() const { + const MTPDchannels_messageEditData &v(c_channels_messageEditData()); + return v.vflags.innerLength() + v.vfrom_id.innerLength() + (v.has_edit_by() ? v.vedit_by.innerLength() : 0) + (v.has_edit_date() ? v.vedit_date.innerLength() : 0) + v.vusers.innerLength(); +} +inline mtpTypeId MTPchannels_messageEditData::type() const { + return mtpc_channels_messageEditData; +} +inline void MTPchannels_messageEditData::read(const mtpPrime *&from, const mtpPrime *end, mtpTypeId cons) { + if (cons != mtpc_channels_messageEditData) throw mtpErrorUnexpected(cons, "MTPchannels_messageEditData"); + + if (!data) setData(new MTPDchannels_messageEditData()); + MTPDchannels_messageEditData &v(_channels_messageEditData()); + v.vflags.read(from, end); + v.vfrom_id.read(from, end); + if (v.has_edit_by()) { v.vedit_by.read(from, end); } else { v.vedit_by = MTPint(); } + if (v.has_edit_date()) { v.vedit_date.read(from, end); } else { v.vedit_date = MTPint(); } + v.vusers.read(from, end); +} +inline void MTPchannels_messageEditData::write(mtpBuffer &to) const { + const MTPDchannels_messageEditData &v(c_channels_messageEditData()); + v.vflags.write(to); + v.vfrom_id.write(to); + if (v.has_edit_by()) v.vedit_by.write(to); + if (v.has_edit_date()) v.vedit_date.write(to); + v.vusers.write(to); +} +inline MTPchannels_messageEditData::MTPchannels_messageEditData(MTPDchannels_messageEditData *_data) : mtpDataOwner(_data) { +} +inline MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags, MTPint _from_id, MTPint _edit_by, MTPint _edit_date, const MTPVector &_users) { + return MTPchannels_messageEditData(new MTPDchannels_messageEditData(_flags, _from_id, _edit_by, _edit_date, _users)); +} + // Human-readable text serialization void mtpTextSerializeType(MTPStringLogger &to, const mtpPrime *&from, const mtpPrime *end, mtpPrime cons, uint32 level, mtpPrime vcons); diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 8c3a8a5ddac29d..94df0ec3e70cb7 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -194,7 +194,7 @@ fileLocationUnavailable#7c596b46 volume_id:long local_id:int secret:long = FileL fileLocation#53d69076 dc_id:int volume_id:long local_id:int secret:long = FileLocation; userEmpty#200250ba id:int = User; -user#d10d979a flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_inline_placeholder:flags.19?string = User; +user#d10d979a flags:# self:flags.10?true contact:flags.11?true mutual_contact:flags.12?true deleted:flags.13?true bot:flags.14?true bot_chat_history:flags.15?true bot_nochats:flags.16?true verified:flags.17?true restricted:flags.18?true min:flags.20?true id:int access_hash:flags.0?long first_name:flags.1?string last_name:flags.2?string username:flags.3?string phone:flags.4?string photo:flags.5?UserProfilePhoto status:flags.6?UserStatus bot_info_version:flags.14?int restriction_reason:flags.18?string bot_inline_placeholder:flags.19?string = User; userProfilePhotoEmpty#4f11bae1 = UserProfilePhoto; userProfilePhoto#d559d8c8 photo_id:long photo_small:FileLocation photo_big:FileLocation = UserProfilePhoto; @@ -226,8 +226,8 @@ chatPhotoEmpty#37c1011c = ChatPhoto; chatPhoto#6153276a photo_small:FileLocation photo_big:FileLocation = ChatPhoto; messageEmpty#83e5de54 id:int = Message; -message#ef11cef6 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int = Message; -messageService#c06b9607 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true id:int from_id:flags.8?int to_id:Peer date:int action:MessageAction = Message; +message#c09be45f flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int date:int message:string media:flags.9?MessageMedia reply_markup:flags.6?ReplyMarkup entities:flags.7?Vector views:flags.10?int edit_date:flags.15?int = Message; +messageService#c06b9607 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true post:flags.14?true id:int from_id:flags.8?int to_id:Peer date:int action:MessageAction = Message; messageMediaEmpty#3ded6320 = MessageMedia; messageMediaPhoto#3d8ce53d photo:Photo caption:string = MessageMedia; @@ -383,6 +383,7 @@ updateStickerSets#43ae3dec = Update; updateSavedGifs#9375341e = Update; updateBotInlineQuery#c01eea08 query_id:long user_id:int query:string offset:string = Update; updateBotInlineSend#f69e113 user_id:int query:string id:string = Update; +updateEditChannelMessage#1b3f4df7 message:Message pts:int pts_count:int = Update; updates.state#a56c2a3e pts:int qts:int date:int seq:int unread_count:int = updates.State; @@ -391,8 +392,8 @@ updates.difference#f49ca0 new_messages:Vector new_encrypted_messages:Ve updates.differenceSlice#a8fb1981 new_messages:Vector new_encrypted_messages:Vector other_updates:Vector chats:Vector users:Vector intermediate_state:updates.State = updates.Difference; updatesTooLong#e317af7e = Updates; -updateShortMessage#3afbe9d1 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; -updateShortChatMessage#ca2ef195 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from_id:flags.2?Peer fwd_date:flags.2?int fwd_post:flags.12?int via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShortMessage#914fbf11 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int user_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; +updateShortChatMessage#16812688 flags:# unread:flags.0?true out:flags.1?true mentioned:flags.4?true media_unread:flags.5?true silent:flags.13?true id:int from_id:int chat_id:int message:string pts:int pts_count:int date:int fwd_from:flags.2?MessageFwdHeader via_bot_id:flags.11?int reply_to_msg_id:flags.3?int entities:flags.7?Vector = Updates; updateShort#78d4dec1 update:Update date:int = Updates; updatesCombined#725b04c3 updates:Vector users:Vector chats:Vector date:int seq_start:int seq:int = Updates; updates#74ae4240 updates:Vector users:Vector chats:Vector date:int seq:int = Updates; @@ -407,7 +408,7 @@ upload.file#96a18d5 type:storage.FileType mtime:int bytes:bytes = upload.File; dcOption#5d8c6cc flags:# ipv6:flags.0?true media_only:flags.1?true tcpo_only:flags.2?true id:int ip_address:string port:int = DcOption; -config#6bbc5f8 date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int disabled_features:Vector = Config; +config#317ceef4 date:int expires:int test_mode:Bool this_dc:int dc_options:Vector chat_size_max:int megagroup_size_max:int forwarded_count_max:int online_update_period_ms:int offline_blur_timeout_ms:int offline_idle_timeout_ms:int online_cloud_timeout_ms:int notify_cloud_delay_ms:int notify_default_delay_ms:int chat_big_size:int push_chat_period_ms:int push_chat_limit:int saved_gifs_limit:int edit_time_limit:int disabled_features:Vector = Config; nearestDc#8e1a1775 country:string this_dc:int nearest_dc:int = NearestDc; @@ -641,6 +642,10 @@ messages.botResults#1170b0a3 flags:# gallery:flags.0?true query_id:long next_off exportedMessageLink#1f486803 link:string = ExportedMessageLink; +messageFwdHeader#c786ddcb flags:# from_id:flags.0?int date:int channel_id:flags.1?int channel_post:flags.2?int = MessageFwdHeader; + +channels.messageEditData#b86fd3cf flags:# caption:flags.1?true from_id:int edit_by:flags.0?int edit_date:flags.0?int users:Vector = channels.MessageEditData; + ---functions--- invokeAfterMsg#cb9f372d {X:Type} msg_id:long query:!X = X; @@ -814,3 +819,5 @@ channels.deleteChannel#c0111fe3 channel:InputChannel = Updates; channels.toggleInvites#49609307 channel:InputChannel enabled:Bool = Updates; channels.exportMessageLink#c846d22d channel:InputChannel id:int = ExportedMessageLink; channels.toggleSignatures#1f69b606 channel:InputChannel enabled:Bool = Updates; +channels.getMessageEditData#27ea3a28 channel:InputChannel id:int = channels.MessageEditData; +channels.editMessage#dcda80ed flags:# no_webpage:flags.1?true channel:InputChannel id:int message:string entities:flags.3?Vector = Updates; diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 665ed2b66850d9..19f23036c7e2f0 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -72,7 +72,7 @@ ProfileInner::ProfileInner(ProfileWidget *profile, ScrollArea *scroll, PeerData , _photoOver(false) // migrate to megagroup -, _showMigrate(_peerChat && _amCreator && !_peerChat->isMigrated() && _peerChat->count >= cMaxGroupCount()) +, _showMigrate(_peerChat && _amCreator && !_peerChat->isMigrated() && _peerChat->count >= Global::ChatSizeMax()) , _forceShowMigrate(false) , _aboutMigrate(st::normalFont, lang(lng_profile_migrate_about), _defaultOptions, st::wndMinWidth - st::profilePadding.left() - st::profilePadding.right()) , _migrate(this, lang(lng_profile_migrate_button), st::btnMigrateToMega) @@ -537,7 +537,7 @@ void ProfileInner::onFullPeerUpdated(PeerData *peer) { } } else if (_peerChat) { updateInvitationLink(); - _showMigrate = (_peerChat && _amCreator && !_peerChat->isMigrated() && (_forceShowMigrate || _peerChat->count >= cMaxGroupCount())); + _showMigrate = (_peerChat && _amCreator && !_peerChat->isMigrated() && (_forceShowMigrate || _peerChat->count >= Global::ChatSizeMax())); showAll(); resizeEvent(0); _admins.setText(lng_channel_admins_link(lt_count, _peerChat->adminsEnabled() ? (_peerChat->admins.size() + 1) : 0)); @@ -597,7 +597,7 @@ void ProfileInner::peerUpdated(PeerData *data) { } else if (_peerChat) { if (_peerChat->photoId && _peerChat->photoId != UnknownPeerPhotoId) photo = App::photo(_peerChat->photoId); _admins.setText(lng_channel_admins_link(lt_count, _peerChat->adminsEnabled() ? (_peerChat->admins.size() + 1) : 0)); - _showMigrate = (_peerChat && _amCreator && !_peerChat->isMigrated() && (_forceShowMigrate || _peerChat->count >= cMaxGroupCount())); + _showMigrate = (_peerChat && _amCreator && !_peerChat->isMigrated() && (_forceShowMigrate || _peerChat->count >= Global::ChatSizeMax())); if (App::main()) App::main()->topBar()->showAll(); } else if (_peerChannel) { if (_peerChannel->photoId && _peerChannel->photoId != UnknownPeerPhotoId) photo = App::photo(_peerChannel->photoId); @@ -838,13 +838,13 @@ void ProfileInner::paintEvent(QPaintEvent *e) { if (_showMigrate) { p.setFont(st::profileHeaderFont->f); p.setPen(st::profileHeaderColor->p); - p.drawText(_left + st::profileHeaderLeft, top + st::profileHeaderTop + st::profileHeaderFont->ascent, lng_profile_migrate_reached(lt_count, cMaxGroupCount())); + p.drawText(_left + st::profileHeaderLeft, top + st::profileHeaderTop + st::profileHeaderFont->ascent, lng_profile_migrate_reached(lt_count, Global::ChatSizeMax())); top += st::profileHeaderSkip; _aboutMigrate.draw(p, _left, top, _width); top += _aboutMigrate.countHeight(_width) + st::setLittleSkip; p.setFont(st::normalFont); p.setPen(st::black); - p.drawText(_left, top + st::normalFont->ascent, lng_profile_migrate_feature1(lt_count, cMaxMegaGroupCount())); top += st::normalFont->height + st::setLittleSkip; + p.drawText(_left, top + st::normalFont->ascent, lng_profile_migrate_feature1(lt_count, Global::MegagroupSizeMax())); top += st::normalFont->height + st::setLittleSkip; p.drawText(_left, top + st::normalFont->ascent, lang(lng_profile_migrate_feature2)); top += st::normalFont->height + st::setLittleSkip; p.drawText(_left, top + st::normalFont->ascent, lang(lng_profile_migrate_feature3)); top += st::normalFont->height + st::setLittleSkip; p.drawText(_left, top + st::normalFont->ascent, lang(lng_profile_migrate_feature4)); top += st::normalFont->height + st::setSectionSkip; @@ -1296,7 +1296,7 @@ void ProfileInner::resizeEvent(QResizeEvent *e) { top += st::profileButtonTop; _uploadPhoto.setGeometry(_left, top, btnWidth, _uploadPhoto.height()); - if (_peerChannel && _peerChannel->count < cMaxMegaGroupCount() && _peerChannel->isMegagroup() && !_amCreator && !_peerChannel->amEditor() && _peerChannel->canAddParticipants()) { + if (_peerChannel && _peerChannel->count < Global::MegagroupSizeMax() && _peerChannel->isMegagroup() && !_amCreator && !_peerChannel->amEditor() && _peerChannel->canAddParticipants()) { _addParticipant.setGeometry(_left, top, btnWidth, _addParticipant.height()); } else { _addParticipant.setGeometry(_left + _width - btnWidth, top, btnWidth, _addParticipant.height()); @@ -1592,7 +1592,7 @@ void ProfileInner::showAll() { _createInvitationLink.hide(); _invitationLink.hide(); } - if (_peerChat->count < cMaxGroupCount() && !_showMigrate) { + if (_peerChat->count < Global::ChatSizeMax() && !_showMigrate) { _addParticipant.show(); } else { _addParticipant.hide(); @@ -1640,7 +1640,7 @@ void ProfileInner::showAll() { _invitationLink.hide(); } } - if (_peerChannel->count < cMaxMegaGroupCount() && _peerChannel->isMegagroup() && _peerChannel->canAddParticipants()) { + if (_peerChannel->count < Global::MegagroupSizeMax() && _peerChannel->isMegagroup() && _peerChannel->canAddParticipants()) { _addParticipant.show(); } else { _addParticipant.hide(); diff --git a/Telegram/SourceFiles/settings.cpp b/Telegram/SourceFiles/settings.cpp index bd6578eb7631ca..c98fe4a55dc53e 100644 --- a/Telegram/SourceFiles/settings.cpp +++ b/Telegram/SourceFiles/settings.cpp @@ -74,8 +74,6 @@ bool gRestartingUpdate = false, gRestarting = false, gRestartingToSettings = fal int32 gLastUpdateCheck = 0; bool gNoStartUpdate = false; bool gStartToSettings = false; -int32 gMaxGroupCount = 200; -int32 gMaxMegaGroupCount = 500; DBIDefaultAttach gDefaultAttach = dbidaDocument; bool gReplaceEmojis = true; bool gAskDownloadPath = false; @@ -119,7 +117,6 @@ uint64 gLastStickersUpdate = 0; SavedGifs gSavedGifs; uint64 gLastSavedGifsUpdate = 0; bool gShowingSavedGifs = false; -int32 gSavedGifsLimit = 100; RecentHashtagPack gRecentWriteHashtags, gRecentSearchHashtags; @@ -155,14 +152,6 @@ bool gIsElCapitan = false; bool gContactsReceived = false; bool gDialogsReceived = false; -int gOnlineUpdatePeriod = 120000; -int gOfflineBlurTimeout = 5000; -int gOfflineIdleTimeout = 30000; -int gOnlineFocusTimeout = 1000; -int gOnlineCloudTimeout = 300000; -int gNotifyCloudDelay = 30000; -int gNotifyDefaultDelay = 1500; - int gOtherOnline = 0; float64 gSongVolume = 0.9; @@ -185,7 +174,7 @@ void settingsParseArgs(int argc, char *argv[]) { gPlatform = dbipMacOld; } #endif - + switch (cPlatform()) { case dbipWindows: gUpdateURL = QUrl(qsl("http://tdesktop.com/win/tupdates/current")); diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index dc4adaaa64d352..b57a6b4f1520e5 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -140,8 +140,6 @@ DeclareSetting(bool, WriteProtected); DeclareSetting(int32, LastUpdateCheck); DeclareSetting(bool, NoStartUpdate); DeclareSetting(bool, StartToSettings); -DeclareSetting(int32, MaxGroupCount); -DeclareSetting(int32, MaxMegaGroupCount); DeclareSetting(bool, ReplaceEmojis); DeclareReadSetting(bool, ManyInstance); DeclareSetting(bool, AskDownloadPath); @@ -240,7 +238,6 @@ typedef QVector SavedGifs; DeclareRefSetting(SavedGifs, SavedGifs); DeclareSetting(uint64, LastSavedGifsUpdate); DeclareSetting(bool, ShowingSavedGifs); -DeclareSetting(int32, SavedGifsLimit); typedef QList > RecentHashtagPack; DeclareRefSetting(RecentHashtagPack, RecentWriteHashtags); @@ -324,14 +321,6 @@ DeclareReadSetting(QUrl, UpdateURL); DeclareSetting(bool, ContactsReceived); DeclareSetting(bool, DialogsReceived); -DeclareSetting(int, OnlineUpdatePeriod); -DeclareSetting(int, OfflineBlurTimeout); -DeclareSetting(int, OfflineIdleTimeout); -DeclareSetting(int, OnlineFocusTimeout); -DeclareSetting(int, OnlineCloudTimeout); -DeclareSetting(int, NotifyCloudDelay); -DeclareSetting(int, NotifyDefaultDelay); - DeclareSetting(int, OtherOnline); DeclareSetting(float64, SongVolume); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 1c05b266ab1fe9..0ce99caad25a34 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -98,15 +98,15 @@ ImagePtr channelDefPhoto(int32 index) { NotifySettings globalNotifyAll, globalNotifyUsers, globalNotifyChats; NotifySettingsPtr globalNotifyAllPtr = UnknownNotifySettings, globalNotifyUsersPtr = UnknownNotifySettings, globalNotifyChatsPtr = UnknownNotifySettings; -PeerData::PeerData(const PeerId &id) : id(id), lnk(new PeerLink(this)) +PeerData::PeerData(const PeerId &id) : id(id) +, lnk(new PeerLink(this)) , loaded(false) , colorIndex(peerColorIndex(id)) , color(peerColor(colorIndex)) , photo((isChat() || isMegagroup()) ? chatDefPhoto(colorIndex) : (isChannel() ? channelDefPhoto(colorIndex) : userDefPhoto(colorIndex))) , photoId(UnknownPeerPhotoId) , nameVersion(0) -, notify(UnknownNotifySettings) -{ +, notify(UnknownNotifySettings) { if (!peerIsUser(id) && !peerIsChannel(id)) updateName(QString(), QString(), QString()); } diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index b93bf822d3dcc2..2e983d57069f26 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -305,7 +305,7 @@ enum DataBlockId { dbiKey = 0x00, dbiUser = 0x01, dbiDcOptionOld = 0x02, - dbiMaxGroupCount = 0x03, + dbiChatSizeMax = 0x03, dbiMutePeer = 0x04, dbiSendKey = 0x05, dbiAutoStart = 0x06, @@ -346,7 +346,7 @@ enum DataBlockId { dbiSongVolume = 0x29, dbiWindowsNotifications = 0x30, dbiIncludeMuted = 0x31, - dbiMaxMegaGroupCount = 0x32, + dbiMegagroupSizeMax = 0x32, dbiDownloadPath = 0x33, dbiAutoDownload = 0x34, dbiSavedGifsLimit = 0x35, diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 83679b68de30e9..24c24101f51a47 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -435,7 +435,7 @@ void Window::onInactiveTimer() { void Window::stateChanged(Qt::WindowState state) { psUserActionDone(); - updateIsActive((state == Qt::WindowMinimized) ? cOfflineBlurTimeout() : cOnlineFocusTimeout()); + updateIsActive((state == Qt::WindowMinimized) ? Global::OfflineBlurTimeout() : Global::OnlineFocusTimeout()); psUpdateSysMenu(state); if (state == Qt::WindowMinimized && cWorkMode() == dbiwmTrayOnly) { @@ -1075,7 +1075,7 @@ bool Window::minimizeToTray() { cSetSeenTrayTooltip(true); Local::writeSettings(); } - updateIsActive(cOfflineBlurTimeout()); + updateIsActive(Global::OfflineBlurTimeout()); updateTrayMenu(); updateGlobalMenu(); return true; @@ -1157,7 +1157,7 @@ void Window::activate() { setVisible(true); psActivateProcess(); activateWindow(); - updateIsActive(cOnlineFocusTimeout()); + updateIsActive(Global::OnlineFocusTimeout()); if (wasHidden) { if (main) { main->windowShown(); @@ -1382,12 +1382,12 @@ void Window::notifySchedule(History *history, HistoryItem *item) { HistoryForwarded *fwd = item->toHistoryForwarded(); int delay = fwd ? 500 : 100, t = unixtime(); uint64 ms = getms(true); - bool isOnline = main->lastWasOnline(), otherNotOld = ((cOtherOnline() * uint64(1000)) + cOnlineCloudTimeout() > t * uint64(1000)); + bool isOnline = main->lastWasOnline(), otherNotOld = ((cOtherOnline() * uint64(1000)) + Global::OnlineCloudTimeout() > t * uint64(1000)); bool otherLaterThanMe = (cOtherOnline() * uint64(1000) + (ms - main->lastSetOnline()) > t * uint64(1000)); if (!isOnline && otherNotOld && otherLaterThanMe) { - delay = cNotifyCloudDelay(); + delay = Global::NotifyCloudDelay(); } else if (cOtherOnline() >= t) { - delay = cNotifyDefaultDelay(); + delay = Global::NotifyDefaultDelay(); } uint64 when = getms(true) + delay; From c3845ead85adc4092aeb25e312a3b41f760febce Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 18 Feb 2016 22:12:50 +0300 Subject: [PATCH 079/133] moved forwarded to an interface, testing required --- Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/history.cpp | 491 +++++++++++-------------- Telegram/SourceFiles/history.h | 185 ++++------ Telegram/SourceFiles/historywidget.cpp | 4 +- Telegram/SourceFiles/layout.cpp | 10 +- Telegram/SourceFiles/mainwidget.cpp | 4 +- Telegram/SourceFiles/mediaview.cpp | 4 +- Telegram/SourceFiles/types.h | 4 + Telegram/SourceFiles/window.cpp | 9 +- 9 files changed, 316 insertions(+), 397 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 367f4f90b4522e..a96c182e7ff455 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -951,7 +951,7 @@ namespace App { } void checkSavedGif(HistoryItem *item) { - if (!item->toHistoryForwarded() && (item->out() || item->history()->peer == App::self())) { + if (!item->Is() && (item->out() || item->history()->peer == App::self())) { if (HistoryMedia *media = item->getMedia()) { if (DocumentData *doc = media->getDocument()) { if (doc->isGifv()) { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index a1dcac2c32fab8..3ebc83230033f1 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -81,12 +81,6 @@ namespace { inline const HistoryReply *toHistoryReply(const HistoryItem *item) { return item ? item->toHistoryReply() : 0; } - inline HistoryForwarded *toHistoryForwarded(HistoryItem *item) { - return item ? item->toHistoryForwarded() : 0; - } - inline const HistoryForwarded *toHistoryForwarded(const HistoryItem *item) { - return item ? item->toHistoryForwarded() : 0; - } inline const TextParseOptions &itemTextOptions(HistoryItem *item) { return itemTextOptions(item->history(), item->author()); } @@ -1385,13 +1379,11 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo QString text(lng_message_unsupported(lt_link, qsl("https://desktop.telegram.org"))); EntitiesInText entities = textParseEntities(text, _historyTextNoMonoOptions.flags); entities.push_front(EntityInText(EntityInTextItalic, 0, text.size())); - result = new HistoryMessage(this, block, m.vid.v, m.vflags.v, m.vvia_bot_id.v, date(m.vdate), m.vfrom_id.v, text, entities, -1, 0); + result = new HistoryMessage(this, block, m.vid.v, m.vflags.v, m.vvia_bot_id.v, date(m.vdate), m.vfrom_id.v, text, entities); } else if (badMedia) { result = new HistoryServiceMsg(this, block, m.vid.v, date(m.vdate), lang(lng_message_empty), m.vflags.v, 0, m.has_from_id() ? m.vfrom_id.v : 0); } else { - if (m.has_fwd_from() && m.vfwd_from.type() == mtpc_messageFwdHeader) { - result = new HistoryForwarded(this, block, m, m.vfwd_from.c_messageFwdHeader()); - } else if (m.has_reply_to_msg_id() && m.vreply_to_msg_id.v > 0) { + if (m.has_reply_to_msg_id() && m.vreply_to_msg_id.v > 0) { result = new HistoryReply(this, block, m); } else { result = new HistoryMessage(this, block, m); @@ -1533,7 +1525,7 @@ HistoryItem *History::createItem(HistoryBlock *block, const MTPMessage &msg, boo } HistoryItem *History::createItemForwarded(HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg) { - return regItem(new HistoryForwarded(this, block, id, flags, date, from, msg)); + return regItem(new HistoryMessage(this, block, id, flags, date, from, msg)); } HistoryItem *History::createItemDocument(HistoryBlock *block, MsgId id, int32 flags, int32 viaBotId, MsgId replyTo, QDateTime date, int32 from, DocumentData *doc, const QString &caption) { @@ -5781,7 +5773,7 @@ void HistoryImageLink::initDimensions(const HistoryItem *parent) { _minh += st::mediaPadding.top() + st::mediaPadding.bottom(); if (!_title.isEmpty() || !_description.isEmpty()) { _minh += st::webPagePhotoSkip; - if (!parent->toHistoryForwarded() && !parent->toHistoryReply()) { + if (!parent->Is() && !parent->toHistoryReply()) { _minh += st::msgPadding.top(); } } @@ -5821,7 +5813,7 @@ int32 HistoryImageLink::resize(int32 width, const HistoryItem *parent) { } if (!_title.isEmpty() || !_description.isEmpty()) { _height += st::webPagePhotoSkip; - if (!parent->toHistoryForwarded() && !parent->toHistoryReply()) { + if (!parent->Is() && !parent->toHistoryReply()) { _height += st::msgPadding.top(); } } @@ -5840,7 +5832,7 @@ void HistoryImageLink::draw(Painter &p, const HistoryItem *parent, const QRect & skipy = st::mediaPadding.top(); if (!_title.isEmpty() || !_description.isEmpty()) { - if (!parent->toHistoryForwarded() && !parent->toHistoryReply()) { + if (!parent->Is() && !parent->toHistoryReply()) { skipy += st::msgPadding.top(); } } @@ -5903,7 +5895,7 @@ void HistoryImageLink::getState(TextLinkPtr &lnk, HistoryCursorState &state, int skipy = st::mediaPadding.top(); if (!_title.isEmpty() || !_description.isEmpty()) { - if (!parent->toHistoryForwarded() && !parent->toHistoryReply()) { + if (!parent->Is() && !parent->toHistoryReply()) { skipy += st::msgPadding.top(); } } @@ -5976,34 +5968,28 @@ void ViaInlineBotLink::onClick(Qt::MouseButton button) const { } HistoryMessageVia::HistoryMessageVia(Interfaces *) -: bot(0) -, width(0) -, maxWidth(0) { +: _bot(0) +, _width(0) +, _maxWidth(0) { } void HistoryMessageVia::create(int32 userId) { - bot = App::userLoaded(peerFromUser(userId)); - if (bot) { - maxWidth = st::msgServiceNameFont->width(lng_inline_bot_via(lt_inline_bot, '@' + bot->username)); - lnk.reset(new ViaInlineBotLink(bot)); - } -} - -bool HistoryMessageVia::isNull() const { - return !bot || bot->username.isEmpty(); + _bot = App::user(peerFromUser(userId)); + _maxWidth = st::msgServiceNameFont->width(lng_inline_bot_via(lt_inline_bot, '@' + _bot->username)); + _lnk.reset(new ViaInlineBotLink(_bot)); } void HistoryMessageVia::resize(int32 availw) const { if (availw < 0) { - text = QString(); - width = 0; + _text = QString(); + _width = 0; } else { - text = lng_inline_bot_via(lt_inline_bot, '@' + bot->username); - if (availw < maxWidth) { - text = st::msgServiceNameFont->elided(text, availw); - width = st::msgServiceNameFont->width(text); - } else if (width < maxWidth) { - width = maxWidth; + _text = lng_inline_bot_via(lt_inline_bot, '@' + _bot->username); + if (availw < _maxWidth) { + _text = st::msgServiceNameFont->elided(_text, availw); + _width = st::msgServiceNameFont->width(_text); + } else if (_width < _maxWidth) { + _width = _maxWidth; } } } @@ -6029,29 +6015,66 @@ int32 HistoryMessageSigned::maxWidth() const { return _signature.maxWidth(); } +HistoryMessageForwarded::HistoryMessageForwarded(Interfaces *) +: _authorOriginal(0) +, _fromOriginal(0) +, _authorOriginalVersion(0) +, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { +} + +void HistoryMessageForwarded::authorNameUpdated(bool hasVia) const { + QString name((hasVia && _authorOriginal->isUser()) ? _authorOriginal->asUser()->firstName : App::peerName(_authorOriginal)); + _authorOriginalName.setText(st::msgServiceNameFont, name, _textNameOptions); + _authorOriginalVersion = _authorOriginal->nameVersion; +} + HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg) : HistoryItem(history, block, msg.vid.v, msg.vflags.v, ::date(msg.vdate), msg.has_from_id() ? msg.vfrom_id.v : 0) , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) , _media(0) { - create(msg.has_via_bot_id() ? msg.vvia_bot_id.v : 0, msg.has_views() ? msg.vviews.v : -1); + PeerId fwdAuthorId = 0, fwdFromId = 0; + if (msg.has_fwd_from() && msg.vfwd_from.type() == mtpc_messageFwdHeader) { + const MTPDmessageFwdHeader &f(msg.vfwd_from.c_messageFwdHeader()); + if (f.has_from_id() || f.has_channel_id()) { + fwdAuthorId = f.has_channel_id() ? peerFromChannel(f.vchannel_id) : peerFromUser(f.vfrom_id); + fwdFromId = f.has_from_id() ? peerFromUser(f.vfrom_id) : peerFromChannel(f.vchannel_id); + } + } + create(msg.has_via_bot_id() ? msg.vvia_bot_id.v : 0, msg.has_views() ? msg.vviews.v : -1, fwdAuthorId, fwdFromId); + QString text(textClean(qs(msg.vmessage))); initMedia(msg.has_media() ? (&msg.vmedia) : 0, text); setText(text, msg.has_entities() ? entitiesFromMTP(msg.ventities.c_vector().v) : EntitiesInText()); } -HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, int32 fromViews, HistoryMedia *fromMedia) : -HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_id) ? from : 0) +HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *fwd) +: HistoryItem(history, block, id, newForwardedFlags(history->peer, from, fwd) | flags, date, from) , _text(st::msgMinWidth) , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, (fromViews > 0) ? fromViews : (isPost() ? 1 : -1)); - if (fromMedia) { - _media = fromMedia->clone(); + UserData *fwdViaBot = fwd->viaBot(); + int32 viaBotId = fwdViaBot ? peerToUser(fwdViaBot->id) : 0; + int32 fwdViewsCount = fwd->viewsCount(), views = (fwdViewsCount > 0) ? fwdViewsCount : (isPost() ? 1 : -1); + create(viaBotId, views, fwd->authorOriginal()->id, fwd->fromOriginal()->id); + + if (HistoryMedia *mediaOriginal = fwd->getMedia()) { + _media = mediaOriginal->clone(); _media->regItem(this); } + setText(fwd->originalText(), fwd->originalEntities()); +} + +HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId id, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities) + : HistoryItem(history, block, id, flags, date, (flags & MTPDmessage::flag_from_id) ? from : 0) + , _text(st::msgMinWidth) + , _textWidth(0) + , _textHeight(0) + , _media(0) { + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + setText(msg, entities); } @@ -6061,7 +6084,8 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + initMediaFromDocument(doc, caption); setText(QString(), EntitiesInText()); } @@ -6072,13 +6096,14 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + _media = new HistoryPhoto(photo, caption, this); _media->regItem(this); setText(QString(), EntitiesInText()); } -void HistoryMessage::create(int32 viaBotId, int32 viewsCount) { +void HistoryMessage::create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal, const PeerId &fromIdOriginal) { uint64 mask = 0; if (viaBotId) { mask |= HistoryMessageVia::Bit(); @@ -6089,6 +6114,12 @@ void HistoryMessage::create(int32 viaBotId, int32 viewsCount) { if (isPost() && _from->isUser()) { mask |= HistoryMessageSigned::Bit(); } + if (authorIdOriginal && fromIdOriginal) { + mask |= HistoryMessageForwarded::Bit(); + if (authorIdOriginal != fromIdOriginal) { + mask |= HistoryMessageSigned::Bit(); + } + } UpdateInterfaces(mask); if (HistoryMessageVia *via = Get()) { via->create(viaBotId); @@ -6099,6 +6130,10 @@ void HistoryMessage::create(int32 viaBotId, int32 viewsCount) { if (HistoryMessageSigned *msgsigned = Get()) { msgsigned->create(_from->asUser(), date); } + if (HistoryMessageForwarded *fwd = Get()) { + fwd->_authorOriginal = App::peer(authorIdOriginal); + fwd->_fromOriginal = App::peer(fromIdOriginal); + } initTime(); } @@ -6201,6 +6236,12 @@ int32 HistoryMessage::plainMaxWidth() const { void HistoryMessage::initDimensions() { if (drawBubble()) { + HistoryMessageForwarded *fwd = Get(); + HistoryMessageVia *via = Get(); + if (fwd) { + fwd->authorNameUpdated(via != 0); + } + if (_media) { _media->initDimensions(this); if (_media->isDisplayed()) { @@ -6230,14 +6271,21 @@ void HistoryMessage::initDimensions() { if (!_media) { if (displayFromName()) { int32 namew = st::msgPadding.left() + author()->nameText.maxWidth() + st::msgPadding.right(); - if (via() && !toHistoryForwarded()) { - namew += st::msgServiceFont->spacew + via()->maxWidth; + if (via && !fwd) { + namew += st::msgServiceFont->spacew + via->_maxWidth; } if (namew > _maxw) _maxw = namew; - } else if (via() && !toHistoryForwarded()) { - if (st::msgPadding.left() + via()->maxWidth + st::msgPadding.right() > _maxw) { - _maxw = st::msgPadding.left() + via()->maxWidth + st::msgPadding.right(); + } else if (via && !fwd) { + if (st::msgPadding.left() + via->_maxWidth + st::msgPadding.right() > _maxw) { + _maxw = st::msgPadding.left() + via->_maxWidth + st::msgPadding.right(); + } + } + if (fwd) { + int32 _namew = st::msgPadding.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgPadding.right(); + if (via) { + _namew += st::msgServiceFont->spacew + via->_maxWidth; } + if (_namew > _maxw) _maxw = _namew; } } } else { @@ -6275,9 +6323,9 @@ void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { void HistoryMessage::fromNameUpdated(int32 width) const { _authorNameVersion = author()->nameVersion; - if (drawBubble() && displayFromName()) { - if (via() && !toHistoryForwarded()) { - via()->resize(width - st::msgPadding.left() - st::msgPadding.right() - author()->nameText.maxWidth() - st::msgServiceFont->spacew); + if (!Is()) { + if (const HistoryMessageVia *via = Get()) { + via->resize(width - st::msgPadding.left() - st::msgPadding.right() - author()->nameText.maxWidth() - st::msgServiceFont->spacew); } } } @@ -6315,13 +6363,24 @@ void HistoryMessage::eraseFromOverview() { } QString HistoryMessage::selectedText(uint32 selection) const { + QString result; if (_media && selection == FullSelection) { QString text = _text.original(0, 0xFFFF, Text::ExpandLinksAll), mediaText = _media->inHistoryText(); - return text.isEmpty() ? mediaText : (mediaText.isEmpty() ? text : (text + ' ' + mediaText)); + result = text.isEmpty() ? mediaText : (mediaText.isEmpty() ? text : (text + ' ' + mediaText)); + } else { + uint16 selectedFrom = (selection == FullSelection) ? 0 : ((selection >> 16) & 0xFFFF); + uint16 selectedTo = (selection == FullSelection) ? 0xFFFF : (selection & 0xFFFF); + result = _text.original(selectedFrom, selectedTo, Text::ExpandLinksAll); } - uint16 selectedFrom = (selection == FullSelection) ? 0 : ((selection >> 16) & 0xFFFF); - uint16 selectedTo = (selection == FullSelection) ? 0xFFFF : (selection & 0xFFFF); - return _text.original(selectedFrom, selectedTo, Text::ExpandLinksAll); + if (const HistoryMessageForwarded *fwd = Get()) { + if (selection == FullSelection) { + QString wrapped; + wrapped.reserve(lang(lng_forwarded_from).size() + fwd->_authorOriginal->name.size() + 4 + result.size()); + wrapped.append('[').append(lang(lng_forwarded_from)).append(' ').append(fwd->_authorOriginal->name).append(qsl("]\n")).append(result); + result = wrapped; + } + } + return result; } QString HistoryMessage::inDialogsText() const { @@ -6520,9 +6579,6 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m int32 left = 0, width = 0; countPositionAndSize(left, width); - if (author()->nameVersion > _authorNameVersion) { - fromNameUpdated(width); - } if (displayFromPhoto()) { int32 photoleft = left + ((outbg && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); @@ -6531,6 +6587,18 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m if (width < 1) return; if (bubble) { + const HistoryMessageForwarded *fwd = Get(); + const HistoryMessageVia *via = Get(); + if (displayFromName() && author()->nameVersion > _authorNameVersion) { + fromNameUpdated(width); + } + if (fwd && fwd->_authorOriginal->nameVersion > fwd->_authorOriginalVersion) { + fwd->authorNameUpdated(via != 0); + if (via) { + via->resize(width - st::msgPadding.left() - st::msgPadding.right() - fwd->_fromWidth - fwd->_authorOriginalName.maxWidth() - st::msgServiceFont->spacew); + } + } + QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); style::color bg(selected ? (outbg ? st::msgOutBgSelected : st::msgInBgSelected) : (outbg ? st::msgOutBg : st::msgInBg)); @@ -6546,9 +6614,9 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m p.setPen(author()->color); } author()->nameText.drawElided(p, r.left() + st::msgPadding.left(), r.top() + st::msgPadding.top(), width - st::msgPadding.left() - st::msgPadding.right()); - if (via() && !toHistoryForwarded() && width > st::msgPadding.left() + st::msgPadding.right() + author()->nameText.maxWidth() + st::msgServiceFont->spacew) { + if (via && !fwd && width > st::msgPadding.left() + st::msgPadding.right() + author()->nameText.maxWidth() + st::msgServiceFont->spacew) { p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); - p.drawText(r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew, r.top() + st::msgPadding.top() + st::msgServiceFont->ascent, via()->text); + p.drawText(r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew, r.top() + st::msgPadding.top() + st::msgServiceFont->ascent, via->_text); } r.setTop(r.top() + st::msgNameFont->height); } @@ -6580,14 +6648,21 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m } void HistoryMessage::drawMessageText(Painter &p, QRect trect, uint32 selection) const { - bool outbg = out() && !isPost(), selected = (selection == FullSelection); - if (!displayFromName() && via() && !toHistoryForwarded()) { - p.setFont(st::msgServiceNameFont); - p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); - p.drawTextLeft(trect.left(), trect.top(), _history->width, via()->text); + if (displayForwardedFrom()) { + paintForwardedInfo(p, trect.x(), trect.y(), trect.width(), (selection == FullSelection)); trect.setY(trect.y() + st::msgServiceNameFont->height); } + bool outbg = out() && !isPost(), selected = (selection == FullSelection); + if (!displayFromName() && !Is()) { + if (const HistoryMessageVia *via = Get()) { + p.setFont(st::msgServiceNameFont); + p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); + p.drawTextLeft(trect.left(), trect.top(), _history->width, via->_text); + trect.setY(trect.y() + st::msgServiceNameFont->height); + } + } + p.setPen(st::msgColor); p.setFont(st::msgFont); uint16 selectedFrom = (selection == FullSelection) ? 0 : (selection >> 16) & 0xFFFF; @@ -6610,6 +6685,9 @@ int32 HistoryMessage::resize(int32 width) { width = st::msgMaxWidth; } if (drawBubble()) { + HistoryMessageForwarded *fwd = Get(); + HistoryMessageVia *via = Get(); + bool media = (_media && _media->isDisplayed()); if (width >= _maxw) { _height = _minh; @@ -6639,16 +6717,29 @@ int32 HistoryMessage::resize(int32 width) { int32 l = 0, w = 0; countPositionAndSize(l, w); fromNameUpdated(w); - } else if (via() && !toHistoryForwarded()) { + } else if (via && !fwd) { int32 l = 0, w = 0; countPositionAndSize(l, w); - via()->resize(w - st::msgPadding.left() - st::msgPadding.right()); + via->resize(w - st::msgPadding.left() - st::msgPadding.right()); if (emptyText() && !displayFromName()) { _height += st::msgPadding.top() + st::msgNameFont->height + st::mediaHeaderSkip; } else { _height += st::msgNameFont->height; } } + + if (displayForwardedFrom()) { + if (emptyText() && !displayFromName()) { + _height += st::msgPadding.top() + st::msgServiceNameFont->height + st::mediaHeaderSkip; + } else { + _height += st::msgServiceNameFont->height; + } + if (via) { + int32 l = 0, w = 0; + countPositionAndSize(l, w); + via->resize(w - st::msgPadding.left() - st::msgPadding.right() - fwd->_fromWidth - fwd->_authorOriginalName.maxWidth() - st::msgServiceFont->spacew); + } + } } else { _height = _media->resize(width, this); } @@ -6662,6 +6753,10 @@ bool HistoryMessage::hasPoint(int32 x, int32 y) const { if (width < 1) return false; if (drawBubble()) { + if (displayForwardedFrom()) { + QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); + return r.contains(x, y); + } QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); return r.contains(x, y); } else { @@ -6687,11 +6782,12 @@ bool HistoryMessage::pointInTime(int32 right, int32 bottom, int32 x, int32 y, In } void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y) const { - state = HistoryDefaultCursorState; lnk = TextLinkPtr(); + state = HistoryDefaultCursorState; int32 left = 0, width = 0; countPositionAndSize(left, width); + if (displayFromPhoto()) { int32 photoleft = left + ((!isPost() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); if (x >= photoleft && x < photoleft + st::msgPhotoSize && y >= _height - st::msgMargin.bottom() - st::msgPhotoSize && y < _height - st::msgMargin.bottom()) { @@ -6702,6 +6798,9 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 if (width < 1) return; if (drawBubble()) { + const HistoryMessageForwarded *fwd = Get(); + const HistoryMessageVia *via = Get(); + QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); if (displayFromName()) { // from user left name if (y >= r.top() + st::msgPadding.top() && y < r.top() + st::msgPadding.top() + st::msgNameFont->height) { @@ -6709,13 +6808,28 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 lnk = author()->lnk; return; } - if (via() && !toHistoryForwarded() && x >= r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew && x < r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew + via()->width) { - lnk = via()->lnk; + if (via && !fwd && x >= r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew && x < r.left() + st::msgPadding.left() + author()->nameText.maxWidth() + st::msgServiceFont->spacew + via->_width) { + lnk = via->_lnk; return; } } r.setTop(r.top() + st::msgNameFont->height); } + if (displayForwardedFrom()) { + QRect trect(r.marginsAdded(-st::msgPadding)); + if (y >= trect.top() && y < trect.top() + st::msgServiceNameFont->height) { + if (x >= trect.left() + fwd->_fromWidth && x < trect.right() && x < trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth()) { + lnk = fwd->_authorOriginal->lnk; + } else if (via && x >= trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgServiceFont->spacew && x < trect.right() && x < trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgServiceFont->spacew + via->_maxWidth) { + lnk = via->_lnk; + } else { + lnk = TextLinkPtr(); + } + return; + } + y -= st::msgServiceNameFont->height; + r.setHeight(r.height() - st::msgServiceNameFont->height); + } getStateFromMessageText(lnk, state, x, y, r); } else { _media->getState(lnk, state, x - left, y - st::msgMargin.top(), this); @@ -6727,12 +6841,15 @@ void HistoryMessage::getStateFromMessageText(TextLinkPtr &lnk, HistoryCursorStat QRect trect(r.marginsAdded(-st::msgPadding)); - if (!displayFromName() && via() && !toHistoryForwarded()) { - if (x >= trect.left() && y >= trect.top() && y < trect.top() + st::msgNameFont->height && x < trect.left() + via()->width) { - lnk = via()->lnk; - return; + const HistoryMessageForwarded *fwd = Get(); + if (!displayFromName() && !fwd) { + if (const HistoryMessageVia *via = Get()) { + if (x >= trect.left() && y >= trect.top() && y < trect.top() + st::msgNameFont->height && x < trect.left() + via->_width) { + lnk = via->_lnk; + return; + } + trect.setTop(trect.top() + st::msgNameFont->height); } - trect.setTop(trect.top() + st::msgNameFont->height); } TextLinkPtr medialnk; @@ -6773,12 +6890,19 @@ void HistoryMessage::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, countPositionAndSize(left, width); if (width < 1) return; + const HistoryMessageForwarded *fwd = Get(); + const HistoryMessageVia *via = Get(); + QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); if (displayFromName()) { // from user left name r.setTop(r.top() + st::msgNameFont->height); - } else if (via() && !toHistoryForwarded()) { + } else if (via && !fwd) { r.setTop(r.top() + st::msgNameFont->height); } + if (displayForwardedFrom()) { + y -= st::msgServiceNameFont->height; + r.setHeight(r.height() - st::msgServiceNameFont->height); + } QRect trect(r.marginsAdded(-st::msgPadding)); if (_media && _media->isDisplayed()) { trect.setBottom(trect.bottom() - _media->height()); @@ -6832,201 +6956,32 @@ HistoryMessage::~HistoryMessage() { } } -HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg, const MTPDmessageFwdHeader &f) -: HistoryMessage(history, block, msg) -, _fwdDate(::date(f.vdate)) -, _fwdAuthor(App::peer(f.has_channel_id() ? peerFromChannel(f.vchannel_id) : peerFromUser(f.vfrom_id))) -, _fwdFrom(App::peer(f.has_from_id() ? peerFromUser(f.vfrom_id) : peerFromChannel(f.vchannel_id))) -, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { -} - -HistoryForwarded::HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg) -: HistoryMessage(history, block, id, newForwardedFlags(history->peer, from, msg) | flags, msg->via() ? peerToUser(msg->viaBot()->id) : 0, date, from, msg->HistoryMessage::originalText(), msg->HistoryMessage::originalEntities(), msg->HistoryMessage::viewsCount(), msg->getMedia()) -, _fwdDate(msg->fwdDate()) -, _fwdAuthor(msg->fwdAuthor()) -, _fwdFrom(msg->fwdFrom()) -, _fwdAuthorVersion(_fwdAuthor->nameVersion) -, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { -} - -QString HistoryForwarded::selectedText(uint32 selection) const { - if (selection != FullSelection) return HistoryMessage::selectedText(selection); - QString result, original = HistoryMessage::selectedText(selection); - result.reserve(lang(lng_forwarded_from).size() + _fwdAuthor->name.size() + 4 + original.size()); - result.append('[').append(lang(lng_forwarded_from)).append(' ').append(_fwdAuthor->name).append(qsl("]\n")).append(original); - return result; -} - -void HistoryForwarded::initDimensions() { - fwdNameUpdated(); - HistoryMessage::initDimensions(); - if (!_media) { - int32 _namew = st::msgPadding.left() + _fromWidth + _fwdAuthorName.maxWidth() + st::msgPadding.right(); - if (via()) { - _namew += st::msgServiceFont->spacew + via()->maxWidth; - } - if (_namew > _maxw) _maxw = _namew; - } -} - -void HistoryForwarded::fwdNameUpdated() const { - QString fwdName((via() && _fwdAuthor->isUser()) ? _fwdAuthor->asUser()->firstName : App::peerName(_fwdAuthor)); - _fwdAuthorName.setText(st::msgServiceNameFont, fwdName, _textNameOptions); - if (via()) { - int32 l = 0, w = 0; - countPositionAndSize(l, w); - via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - _fromWidth - _fwdAuthorName.maxWidth() - st::msgServiceFont->spacew); - } -} - -void HistoryForwarded::draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const { - if (drawBubble() && _fwdAuthor->nameVersion > _fwdAuthorVersion) { - fwdNameUpdated(); - _fwdAuthorVersion = _fwdAuthor->nameVersion; - } - HistoryMessage::draw(p, r, selection, ms); -} - -void HistoryForwarded::drawForwardedFrom(Painter &p, int32 x, int32 y, int32 w, bool selected) const { +void HistoryMessage::paintForwardedInfo(Painter &p, int32 x, int32 y, int32 w, bool selected) const { style::font serviceFont(st::msgServiceFont), serviceName(st::msgServiceNameFont); bool outbg = out() && !isPost(); p.setPen((selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg))->p); p.setFont(serviceFont); - if (via() && w > _fromWidth + _fwdAuthorName.maxWidth() + serviceFont->spacew) { + const HistoryMessageForwarded *fwd = Get(); + const HistoryMessageVia *via = Get(); + if (via && w > fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + serviceFont->spacew) { p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); p.setFont(serviceName); - _fwdAuthorName.draw(p, x + _fromWidth, y, w - _fromWidth); + fwd->_authorOriginalName.draw(p, x + fwd->_fromWidth, y, w - fwd->_fromWidth); - p.drawText(x + _fromWidth + _fwdAuthorName.maxWidth() + serviceFont->spacew, y + serviceFont->ascent, via()->text); - } else if (w > _fromWidth) { + p.drawText(x + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + serviceFont->spacew, y + serviceFont->ascent, via->_text); + } else if (w > fwd->_fromWidth) { p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); p.setFont(serviceName); - _fwdAuthorName.drawElided(p, x + _fromWidth, y, w - _fromWidth); + fwd->_authorOriginalName.drawElided(p, x + fwd->_fromWidth, y, w - fwd->_fromWidth); } else { p.drawText(x, y + serviceFont->ascent, serviceFont->elided(lang(lng_forwarded_from), w)); } } -void HistoryForwarded::drawMessageText(Painter &p, QRect trect, uint32 selection) const { - if (displayForwardedFrom()) { - drawForwardedFrom(p, trect.x(), trect.y(), trect.width(), (selection == FullSelection)); - trect.setY(trect.y() + st::msgServiceNameFont->height); - } - HistoryMessage::drawMessageText(p, trect, selection); -} - -int32 HistoryForwarded::resize(int32 width) { - HistoryMessage::resize(width); - if (drawBubble()) { - if (displayForwardedFrom()) { - if (emptyText() && !displayFromName()) { - _height += st::msgPadding.top() + st::msgServiceNameFont->height + st::mediaHeaderSkip; - } else { - _height += st::msgServiceNameFont->height; - } - if (via()) { - int32 l = 0, w = 0; - countPositionAndSize(l, w); - via()->resize(w - st::msgPadding.left() - st::msgPadding.right() - _fromWidth - _fwdAuthorName.maxWidth() - st::msgServiceFont->spacew); - } - } - } - return _height; -} - -bool HistoryForwarded::hasPoint(int32 x, int32 y) const { - if (drawBubble() && displayForwardedFrom()) { - int32 left = 0, width = 0; - countPositionAndSize(left, width); - if (width < 1) return false; - - QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); - return r.contains(x, y); - } - return HistoryMessage::hasPoint(x, y); -} - -void HistoryForwarded::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y) const { - lnk = TextLinkPtr(); - state = HistoryDefaultCursorState; - - if (drawBubble() && displayForwardedFrom()) { - int32 left = 0, width = 0; - countPositionAndSize(left, width); - if (displayFromPhoto()) { - int32 photoleft = left + ((!isPost() && out() && !Adaptive::Wide()) ? (width + (st::msgPhotoSkip - st::msgPhotoSize)) : (-st::msgPhotoSkip)); - if (x >= photoleft && x < photoleft + st::msgPhotoSize) { - return HistoryMessage::getState(lnk, state, x, y); - } - } - if (width < 1) return; - - QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); - if (displayFromName()) { - style::font nameFont(st::msgNameFont); - if (y >= r.top() + st::msgPadding.top() && y < r.top() + st::msgPadding.top() + nameFont->height) { - return HistoryMessage::getState(lnk, state, x, y); - } - r.setTop(r.top() + nameFont->height); - } - QRect trect(r.marginsAdded(-st::msgPadding)); - - if (y >= trect.top() && y < trect.top() + st::msgServiceNameFont->height) { - return getForwardedState(lnk, state, x - trect.left(), trect.right() - trect.left()); - } - y -= st::msgServiceNameFont->height; - } - return HistoryMessage::getState(lnk, state, x, y); -} - -void HistoryForwarded::getStateFromMessageText(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const QRect &r) const { - QRect realr(r); - if (drawBubble() && displayForwardedFrom()) { - realr.setHeight(r.height() - st::msgServiceNameFont->height); - } - HistoryMessage::getStateFromMessageText(lnk, state, x, y, realr); -} - -void HistoryForwarded::getForwardedState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 w) const { - state = HistoryDefaultCursorState; - if (x >= _fromWidth && x < w && x < _fromWidth + _fwdAuthorName.maxWidth()) { - lnk = _fwdAuthor->lnk; - } else if (via() && x >= _fromWidth + _fwdAuthorName.maxWidth() + st::msgServiceFont->spacew && x < w && x < _fromWidth + _fwdAuthorName.maxWidth() + st::msgServiceFont->spacew + via()->maxWidth) { - lnk = via()->lnk; - } else { - lnk = TextLinkPtr(); - } -} - -void HistoryForwarded::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const { - symbol = 0; - after = false; - upon = false; - - if (drawBubble() && displayForwardedFrom()) { - int32 left = 0, width = 0; - countPositionAndSize(left, width); - if (width < 1) return; - - QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); - if (displayFromName()) { - style::font nameFont(st::msgNameFont); - if (y >= r.top() + st::msgPadding.top() && y < r.top() + st::msgPadding.top() + nameFont->height) { - return HistoryMessage::getSymbol(symbol, after, upon, x, y); - } - r.setTop(r.top() + nameFont->height); - } - QRect trect(r.marginsAdded(-st::msgPadding)); - - y -= st::msgServiceNameFont->height; - } - return HistoryMessage::getSymbol(symbol, after, upon, x, y); -} - HistoryReply::HistoryReply(History *history, HistoryBlock *block, const MTPDmessage &msg) : HistoryMessage(history, block, msg) , replyToMsgId(msg.vreply_to_msg_id.v) , replyToMsg(0) @@ -7076,8 +7031,8 @@ void HistoryReply::initDimensions() { HistoryMessage::initDimensions(); if (!_media) { int32 replyw = st::msgPadding.left() + _maxReplyWidth - st::msgReplyPadding.left() - st::msgReplyPadding.right() + st::msgPadding.right(); - if (replyToVia()) { - replyw += st::msgServiceFont->spacew + replyToVia()->maxWidth; + if (_replyToVia) { + replyw += st::msgServiceFont->spacew + _replyToVia->_maxWidth; } if (replyw > _maxw) _maxw = replyw; } @@ -7094,7 +7049,7 @@ bool HistoryReply::updateReplyTo(bool force) { replyToNameUpdated(); replyToLnk = TextLinkPtr(new MessageLink(replyToMsg->history()->peer->id, replyToMsg->id)); - if (!replyToMsg->toHistoryForwarded()) { + if (!replyToMsg->Is()) { if (UserData *bot = replyToMsg->viaBot()) { _replyToVia = new HistoryMessageVia(0); _replyToVia->create(peerToUser(bot->id)); @@ -7112,14 +7067,14 @@ bool HistoryReply::updateReplyTo(bool force) { void HistoryReply::replyToNameUpdated() const { if (replyToMsg) { - QString name = (replyToVia() && replyToMsg->author()->isUser()) ? replyToMsg->author()->asUser()->firstName : App::peerName(replyToMsg->author()); + QString name = (_replyToVia && replyToMsg->author()->isUser()) ? replyToMsg->author()->asUser()->firstName : App::peerName(replyToMsg->author()); replyToName.setText(st::msgServiceNameFont, name, _textNameOptions); replyToVersion = replyToMsg->author()->nameVersion; bool hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false; int32 previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0; int32 w = replyToName.maxWidth(); - if (replyToVia()) { - w += st::msgServiceFont->spacew + replyToVia()->maxWidth; + if (_replyToVia) { + w += st::msgServiceFont->spacew + _replyToVia->_maxWidth; } _maxReplyWidth = previewSkip + qMax(w, qMin(replyToText.maxWidth(), int32(st::maxSignatureSize))); @@ -7153,7 +7108,7 @@ void HistoryReply::replyToReplaced(HistoryItem *oldItem, HistoryItem *newItem) { if (!newItem) { replyToMsgId = 0; initDimensions(); - } else if (!replyToMsg->toHistoryForwarded()) { + } else if (!replyToMsg->Is()) { if (UserData *bot = replyToMsg->viaBot()) { _replyToVia = new HistoryMessageVia(0); _replyToVia->create(peerToUser(bot->id)); @@ -7202,9 +7157,9 @@ void HistoryReply::drawReplyTo(Painter &p, int32 x, int32 y, int32 w, bool selec p.setPen(selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); } replyToName.drawLeftElided(p, x + st::msgReplyBarSkip + previewSkip, y + st::msgReplyPadding.top(), w - st::msgReplyBarSkip - previewSkip, w + 2 * x); - if (replyToVia() && w > st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew) { + if (_replyToVia && w > st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew) { p.setFont(st::msgServiceFont); - p.drawText(x + st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew, y + st::msgReplyPadding.top() + st::msgServiceFont->ascent, replyToVia()->text); + p.drawText(x + st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew, y + st::msgReplyPadding.top() + st::msgServiceFont->ascent, _replyToVia->_text); } HistoryMessage *replyToAsMsg = replyToMsg->toHistoryMessage(); @@ -7239,26 +7194,26 @@ int32 HistoryReply::resize(int32 width) { HistoryMessage::resize(width); if (drawBubble()) { - if (emptyText() && !displayFromName() && !via()) { + if (emptyText() && !displayFromName() && !Is()) { _height += st::msgPadding.top() + st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom() + st::mediaHeaderSkip; } else { _height += st::msgReplyPadding.top() + st::msgReplyBarSize.height() + st::msgReplyPadding.bottom(); } - if (replyToVia()) { + if (_replyToVia) { bool hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false; int previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0; - replyToVia()->resize(width - st::msgPadding.left() - st::msgPadding.right() - st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew); + _replyToVia->resize(width - st::msgPadding.left() - st::msgPadding.right() - st::msgReplyBarSkip + previewSkip + replyToName.maxWidth() + st::msgServiceFont->spacew); } } return _height; } void HistoryReply::resizeVia(int32 w) const { - if (!replyToVia()) return; + if (!_replyToVia) return; bool hasPreview = replyToMsg->getMedia() ? replyToMsg->getMedia()->hasReplyPreview() : false; int previewSkip = hasPreview ? (st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x()) : 0; - replyToVia()->resize(w - st::msgReplyBarSkip - previewSkip - replyToName.maxWidth() - st::msgServiceFont->spacew); + _replyToVia->resize(w - st::msgReplyBarSkip - previewSkip - replyToName.maxWidth() - st::msgServiceFont->spacew); } bool HistoryReply::hasPoint(int32 x, int32 y) const { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 0435cd00bf87f5..fbcc1e7da97da0 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -765,7 +765,6 @@ class HistoryElem { class HistoryReply; // dynamic_cast optimize class HistoryMessage; // dynamic_cast optimize -class HistoryForwarded; // dynamic_cast optimize enum HistoryCursorState { HistoryDefaultCursorState, @@ -791,8 +790,46 @@ enum HistoryItemType { HistoryItemJoined }; +struct HistoryMessageVia : public BasicInterface { + HistoryMessageVia(Interfaces *); + void create(int32 userId); + void resize(int32 availw) const; + + UserData *_bot; + mutable QString _text; + mutable int32 _width, _maxWidth; + TextLinkPtr _lnk; +}; + +struct HistoryMessageViews : public BasicInterface { + HistoryMessageViews(Interfaces *); + + QString _viewsText; + int32 _views, _viewsWidth; +}; + +struct HistoryMessageSigned : public BasicInterface { + HistoryMessageSigned(Interfaces *); + + void create(UserData *from, const QDateTime &date); + int32 maxWidth() const; + + Text _signature; +}; + +struct HistoryMessageForwarded : public BasicInterface { + HistoryMessageForwarded(Interfaces *); + void authorNameUpdated(bool hasVia) const; + bool display(bool hasVia) const; + + PeerData *_authorOriginal, *_fromOriginal; + mutable Text _authorOriginalName; + mutable int32 _authorOriginalVersion; + int32 _fromWidth; +}; + class HistoryMedia; -class HistoryItem : public HistoryElem { +class HistoryItem : public HistoryElem, public Interfaces { public: HistoryItem(History *history, HistoryBlock *block, MsgId msgId, int32 flags, QDateTime msgDate, int32 from); @@ -1005,12 +1042,6 @@ class HistoryItem : public HistoryElem { virtual const HistoryMessage *toHistoryMessage() const { // dynamic_cast optimize return 0; } - virtual HistoryForwarded *toHistoryForwarded() { // dynamic_cast optimize - return 0; - } - virtual const HistoryForwarded *toHistoryForwarded() const { // dynamic_cast optimize - return 0; - } virtual HistoryReply *toHistoryReply() { // dynamic_cast optimize return 0; } @@ -1026,13 +1057,16 @@ class HistoryItem : public HistoryElem { } bool displayFromPhoto() const; - virtual QDateTime fwdDate() const { // dynamic_cast optimize - return date; - } - virtual PeerData *fwdFrom() const { // dynamic_cast optimize + PeerData *fromOriginal() const { + if (const HistoryMessageForwarded *fwd = Get()) { + return fwd->_fromOriginal; + } return from(); } - virtual PeerData *fwdAuthor() const { // dynamic_cast optimize + PeerData *authorOriginal() const { + if (const HistoryMessageForwarded *fwd = Get()) { + return fwd->_authorOriginal; + } return author(); } @@ -1042,6 +1076,9 @@ class HistoryItem : public HistoryElem { protected: + HistoryItem(const HistoryItem &); + HistoryItem &operator=(const HistoryItem &); + PeerData *_from; History *_history; HistoryBlock *_block; @@ -1337,7 +1374,7 @@ class HistoryPhoto : public HistoryFileMedia { return _caption.original(); } bool needsBubble(const HistoryItem *parent) const { - return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot(); + return !_caption.isEmpty() || parent->Is() || parent->toHistoryReply() || parent->viaBot(); } bool customInfoLayout() const { return _caption.isEmpty(); @@ -1403,7 +1440,7 @@ class HistoryVideo : public HistoryFileMedia { ImagePtr replyPreview(); bool needsBubble(const HistoryItem *parent) const { - return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot(); + return !_caption.isEmpty() || parent->Is() || parent->toHistoryReply() || parent->viaBot(); } bool customInfoLayout() const { return _caption.isEmpty(); @@ -1605,7 +1642,7 @@ class HistoryGif : public HistoryFileMedia { return _caption.original(); } bool needsBubble(const HistoryItem *parent) const { - return !_caption.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot(); + return !_caption.isEmpty() || parent->Is() || parent->toHistoryReply() || parent->viaBot(); } bool customInfoLayout() const { return _caption.isEmpty(); @@ -1916,7 +1953,7 @@ class HistoryImageLink : public HistoryMedia { } bool needsBubble(const HistoryItem *parent) const { - return !_title.isEmpty() || !_description.isEmpty() || parent->toHistoryForwarded() || parent->toHistoryReply() || parent->viaBot(); + return !_title.isEmpty() || !_description.isEmpty() || parent->Is() || parent->toHistoryReply() || parent->viaBot(); } bool customInfoLayout() const { return true; @@ -1945,40 +1982,12 @@ class ViaInlineBotLink : public ITextLink { }; -struct HistoryMessageVia : public BasicInterface { - HistoryMessageVia(Interfaces *); - - void create(int32 userId); - - bool isNull() const; - void resize(int32 availw) const; - - UserData *bot; - mutable QString text; - mutable int32 width, maxWidth; - TextLinkPtr lnk; -}; - -struct HistoryMessageViews : public BasicInterface { - HistoryMessageViews(Interfaces *); - - QString _viewsText; - int32 _views, _viewsWidth; -}; - -struct HistoryMessageSigned : public BasicInterface { - HistoryMessageSigned(Interfaces *); - void create(UserData *from, const QDateTime &date); - int32 maxWidth() const; - - Text _signature; -}; - -class HistoryMessage : public HistoryItem, public Interfaces { +class HistoryMessage : public HistoryItem { public: HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg); - HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities, int32 fromViews, HistoryMedia *fromMedia); // local forwarded + HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, QDateTime date, int32 from, HistoryMessage *fwd); // local forwarded + HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, const QString &msg, const EntitiesInText &entities); // local message HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, DocumentData *doc, const QString &caption); // local document HistoryMessage(History *history, HistoryBlock *block, MsgId msgId, int32 flags, int32 viaBotId, QDateTime date, int32 from, PhotoData *photo, const QString &caption); // local photo @@ -1988,12 +1997,11 @@ class HistoryMessage : public HistoryItem, public Interfaces { void initDimensions(); void fromNameUpdated(int32 width) const; - const HistoryMessageVia *via() const { - const HistoryMessageVia *result = Get(); - return (result && !result->isNull()) ? result : 0; - } virtual UserData *viaBot() const { - return via() ? via()->bot : 0; + if (const HistoryMessageVia *via = Get()) { + return via->_bot; + } + return 0; } int32 plainMaxWidth() const; @@ -2009,7 +2017,7 @@ class HistoryMessage : public HistoryItem, public Interfaces { return drawBubble(); } bool displayFromName() const { - return hasFromName() && (!emptyText() || !_media || !_media->isDisplayed() || toHistoryReply() || toHistoryForwarded() || viaBot() || !_media->hideFromName()); + return hasFromName() && (!emptyText() || !_media || !_media->isDisplayed() || toHistoryReply() || Is() || viaBot() || !_media->hideFromName()); } bool uploading() const { return _media && _media->uploading(); @@ -2108,7 +2116,15 @@ class HistoryMessage : public HistoryItem, public Interfaces { protected: - void create(int32 viaBotId, int32 viewsCount); + void create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal, const PeerId &fromIdOriginal); + + bool displayForwardedFrom() const { + if (const HistoryMessageForwarded *fwd = Get()) { + return Is() || !_media || !_media->isDisplayed() || fwd->_authorOriginal->isChannel() || !_media->hideForwardedFrom(); + } + return false; + } + void paintForwardedInfo(Painter &p, int32 x, int32 y, int32 w, bool selected) const; Text _text; @@ -2120,56 +2136,6 @@ class HistoryMessage : public HistoryItem, public Interfaces { }; -class HistoryForwarded : public HistoryMessage { -public: - - HistoryForwarded(History *history, HistoryBlock *block, const MTPDmessage &msg, const MTPDmessageFwdHeader &f); - HistoryForwarded(History *history, HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg); - - void initDimensions(); - void fwdNameUpdated() const; - - void draw(Painter &p, const QRect &r, uint32 selection, uint64 ms) const; - void drawForwardedFrom(Painter &p, int32 x, int32 y, int32 w, bool selected) const; - void drawMessageText(Painter &p, QRect trect, uint32 selection) const; - int32 resize(int32 width); - bool hasPoint(int32 x, int32 y) const; - void getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y) const; - void getStateFromMessageText(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const QRect &r) const; - void getForwardedState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 w) const; - void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y) const; - - QDateTime fwdDate() const { - return _fwdDate; - } - PeerData *fwdAuthor() const { - return _fwdAuthor; - } - PeerData *fwdFrom() const { - return _fwdFrom; - } - QString selectedText(uint32 selection) const; - bool displayForwardedFrom() const { - return via() || !_media || !_media->isDisplayed() || _fwdAuthor->isChannel() || !_media->hideForwardedFrom(); - } - - HistoryForwarded *toHistoryForwarded() { - return this; - } - const HistoryForwarded *toHistoryForwarded() const { - return this; - } - -protected: - - QDateTime _fwdDate; - PeerData *_fwdAuthor, *_fwdFrom; - mutable Text _fwdAuthorName; - mutable int32 _fwdAuthorVersion; - int32 _fromWidth; - -}; - class HistoryReply : public HistoryMessage { public: @@ -2222,9 +2188,6 @@ class HistoryReply : public HistoryMessage { mutable int32 replyToVersion; mutable int32 _maxReplyWidth; HistoryMessageVia *_replyToVia; - HistoryMessageVia *replyToVia() const { - return (_replyToVia && !_replyToVia->isNull()) ? _replyToVia : 0; - } int32 toWidth; }; @@ -2232,13 +2195,13 @@ class HistoryReply : public HistoryMessage { inline int32 newMessageFlags(PeerData *p) { return p->isSelf() ? 0 : (((p->isChat() || (p->isUser() && !p->asUser()->botInfo)) ? MTPDmessage::flag_unread : 0) | MTPDmessage::flag_out); } -inline int32 newForwardedFlags(PeerData *p, int32 from, HistoryMessage *msg) { +inline int32 newForwardedFlags(PeerData *p, int32 from, HistoryMessage *fwd) { int32 result = newMessageFlags(p) | (from ? MTPDmessage::flag_from_id : 0); - if (msg->via()) { + if (fwd->Is()) { result |= MTPDmessage::flag_via_bot_id; } if (!p->isChannel()) { - if (HistoryMedia *media = msg->getMedia()) { + if (HistoryMedia *media = fwd->getMedia()) { if (media->type() == MediaTypeVoiceFile) { result |= MTPDmessage::flag_media_unread; // } else if (media->type() == MediaTypeVideo) { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index d995e8bc524fc6..99e07198d3a857 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4894,7 +4894,7 @@ void HistoryWidget::sendBotCommand(const QString &cmd, MsgId replyTo) { // reply bool lastKeyboardUsed = (_keyboard.forMsgId() == FullMsgId(_channel, _history->lastKeyboardId)) && (_keyboard.forMsgId() == FullMsgId(_channel, replyTo)); QString toSend = cmd; - PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->toHistoryForwarded()->fwdFrom() : 0); + PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->fromOriginal() : 0); if (bot && (!bot->isUser() || !bot->asUser()->botInfo)) bot = 0; QString username = bot ? bot->asUser()->username : QString(); int32 botStatus = _peer->isChat() ? _peer->asChat()->botStatus : (_peer->isMegagroup() ? _peer->asChannel()->mgInfo->botStatus : -1); @@ -4919,7 +4919,7 @@ bool HistoryWidget::insertBotCommand(const QString &cmd, bool specialGif) { QString toInsert = cmd; if (!toInsert.isEmpty() && toInsert.at(0) != '@') { - PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->toHistoryForwarded()->fwdFrom() : 0); + PeerData *bot = _peer->isUser() ? _peer : (App::hoveredLinkItem() ? App::hoveredLinkItem()->fromOriginal() : 0); if (!bot->isUser() || !bot->asUser()->botInfo) bot = 0; QString username = bot ? bot->asUser()->username : QString(); int32 botStatus = _peer->isChat() ? _peer->asChat()->botStatus : (_peer->isMegagroup() ? _peer->asChannel()->mgInfo->botStatus : -1); diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index bcc91d717182ae..90f1415c650cd4 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -581,8 +581,7 @@ void LayoutOverviewVoice::paint(Painter &p, const QRect &clip, uint32 selection, } } bool showPause = updateStatusText(); - int32 nameVersion = _parent->from()->nameVersion; - if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) nameVersion = fwd->fwdFrom()->nameVersion; + int32 nameVersion = _parent->fromOriginal()->nameVersion; if (nameVersion > _nameVersion) { updateName(); } @@ -700,13 +699,12 @@ void LayoutOverviewVoice::getState(TextLinkPtr &link, HistoryCursorState &cursor void LayoutOverviewVoice::updateName() const { int32 version = 0; - if (HistoryForwarded *fwd = _parent->toHistoryForwarded()) { - _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(fwd->fwdFrom()), _textNameOptions); - version = fwd->fwdFrom()->nameVersion; + if (const HistoryMessageForwarded *fwd = _parent->Get()) { + _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(_parent->fromOriginal()), _textNameOptions); } else { _name.setText(st::semiboldFont, App::peerName(_parent->from()), _textNameOptions); - version = _parent->from()->nameVersion; } + version = _parent->fromOriginal()->nameVersion; _nameVersion = version; } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 8d45382beae980..aef60bc1dc7967 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -537,7 +537,7 @@ void MainWidget::fillForwardingInfo(Text *&from, Text *&text, bool &serviceColor if (_toForward.isEmpty()) return; int32 version = 0; for (SelectedItemSet::const_iterator i = _toForward.cbegin(), e = _toForward.cend(); i != e; ++i) { - version += i.value()->fwdAuthor()->nameVersion; + version += i.value()->authorOriginal()->nameVersion; } if (version != _toForwardNameVersion) { updateForwardingTexts(); @@ -558,7 +558,7 @@ void MainWidget::updateForwardingTexts() { QVector fromUsers; fromUsers.reserve(_toForward.size()); for (SelectedItemSet::const_iterator i = _toForward.cbegin(), e = _toForward.cend(); i != e; ++i) { - PeerData *from = i.value()->fwdAuthor(); + PeerData *from = i.value()->authorOriginal(); if (!fromUsersMap.contains(from)) { fromUsersMap.insert(from, true); fromUsers.push_back(from); diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 56fe2baeccd460..5330c1331e3740 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -909,7 +909,7 @@ void MediaView::displayPhoto(PhotoData *photo, HistoryItem *item) { _y = (height() - _h) / 2; _width = _w; if (_msgid && item) { - _from = item->fwdAuthor(); + _from = item->authorOriginal(); } else { _from = _user; } @@ -1058,7 +1058,7 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty } _x = (width() - _w) / 2; _y = (height() - _h) / 2; - _from = item->fwdAuthor(); + _from = item->authorOriginal(); _full = 1; updateControls(); if (isHidden()) { diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 2e983d57069f26..a0e196255add59 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -725,6 +725,10 @@ class Interfaces { const Type *Get() const { return static_cast(_dataptr(_meta()->offsets[Type::Index()])); } + template + bool Is() const { + return (_meta()->offsets[Type::Index()] >= 0); + } private: static const InterfacesMetadata *ZeroInterfacesMetadata; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 24c24101f51a47..0ca9a5d82027b5 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1379,8 +1379,7 @@ void Window::notifySchedule(History *history, HistoryItem *item) { App::wnd()->getNotifySetting(MTP_inputNotifyPeer(history->peer->input)); } - HistoryForwarded *fwd = item->toHistoryForwarded(); - int delay = fwd ? 500 : 100, t = unixtime(); + int delay = item->Is() ? 500 : 100, t = unixtime(); uint64 ms = getms(true); bool isOnline = main->lastWasOnline(), otherNotOld = ((cOtherOnline() * uint64(1000)) + Global::OnlineCloudTimeout() > t * uint64(1000)); bool otherLaterThanMe = (cOtherOnline() * uint64(1000) + (ms - main->lastSetOnline()) > t * uint64(1000)); @@ -1581,7 +1580,7 @@ void Window::notifyShowNext(NotifyWindow *remove) { notifyWaitTimer.start(next - ms); break; } else { - HistoryForwarded *fwd = notifyItem->toHistoryForwarded(); // forwarded notify grouping + HistoryItem *fwd = notifyItem->Is() ? notifyItem : 0; // forwarded notify grouping int32 fwdCount = 1; uint64 ms = getms(true); @@ -1609,8 +1608,8 @@ void Window::notifyShowNext(NotifyWindow *remove) { } while (history->hasNotification()); if (nextNotify) { if (fwd) { - HistoryForwarded *nextFwd = nextNotify->toHistoryForwarded(); - if (nextFwd && fwd->from() == nextFwd->from() && qAbs(int64(nextFwd->date.toTime_t()) - int64(fwd->date.toTime_t())) < 2) { + HistoryItem *nextFwd = nextNotify->Is() ? nextNotify : 0; + if (nextFwd && fwd->author() == nextFwd->author() && qAbs(int64(nextFwd->date.toTime_t()) - int64(fwd->date.toTime_t())) < 2) { fwd = nextFwd; ++fwdCount; } else { From 6d423506918613cfd36d4fb33f4f8e082a996e12 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 19 Feb 2016 14:53:49 +0300 Subject: [PATCH 080/133] forwarded display improved --- Telegram/Resources/lang.strings | 4 +- Telegram/Resources/style.txt | 18 +++ Telegram/SourceFiles/gui/text.cpp | 20 ++-- Telegram/SourceFiles/gui/text.h | 16 +-- Telegram/SourceFiles/history.cpp | 153 ++++++++++++------------- Telegram/SourceFiles/history.h | 12 +- Telegram/SourceFiles/historywidget.cpp | 16 ++- Telegram/SourceFiles/layout.cpp | 2 +- 8 files changed, 131 insertions(+), 110 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index a03f486635521c..be3832f2a18f13 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -555,7 +555,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link copied to clipboard."; -"lng_forwarded_from" = "Forwarded from"; +"lng_forwarded" = "Forwarded from {original}"; +"lng_forwarded_via" = "Forwarded from {original} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "In reply to"; "lng_attach_failed" = "Failed"; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index d06880d6171fb3..3a9794fe14fc70 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1163,6 +1163,24 @@ outTextStyle: textStyle(defaultTextStyle) { selectBg: msgOutBgSelected; selectOverlay: msgSelectOverlay; } +inFwdTextStyle: textStyle(defaultTextStyle) { + linkFlags: semiboldFont; + linkFlagsOver: semiboldFont; + linkFg: msgInServiceFg; + linkFgDown: msgInServiceFg; +} +outFwdTextStyle: textStyle(inFwdTextStyle) { + linkFg: msgOutServiceFg; + linkFgDown: msgOutServiceFg; +} +inFwdTextStyleSelected: textStyle(inFwdTextStyle) { + linkFg: msgInServiceFgSelected; + linkFgDown: msgInServiceFgSelected; +} +outFwdTextStyleSelected: textStyle(inFwdTextStyle) { + linkFg: msgOutServiceFgSelected; + linkFgDown: msgOutServiceFgSelected; +} medviewSaveAsTextStyle: textStyle(defaultTextStyle) { linkFg: #91d9ff; linkFgDown: #91d9ff; diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 6e7a772c8b066c..3939945add6ec5 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -994,7 +994,7 @@ class TextPainter { return _blockEnd(t, i, e) - (*i)->from(); } - TextPainter(QPainter *p, const Text *t) : _p(p), _t(t), _elideLast(false), _elideRemoveFromEnd(0), _str(0), _elideSavedBlock(0), _lnkResult(0), _inTextFlag(0), _getSymbol(0), _getSymbolAfter(0), _getSymbolUpon(0) { + TextPainter(QPainter *p, const Text *t) : _p(p), _t(t), _elideLast(false), _breakEverywhere(false), _elideRemoveFromEnd(0), _str(0), _elideSavedBlock(0), _lnkResult(0), _inTextFlag(0), _getSymbol(0), _getSymbolAfter(0), _getSymbolUpon(0) { } void initNextParagraph(Text::TextBlocks::const_iterator i) { @@ -1192,7 +1192,7 @@ class TextPainter { bool elidedLine = _elideLast && (_y + elidedLineHeight >= _yToElide); if (elidedLine) { _lineHeight = elidedLineHeight; - } else if (f != j) { + } else if (f != j && !_breakEverywhere) { // word did not fit completely, so we roll back the state to the beginning of this long word j = f; _wLeft = f_wLeft; @@ -1251,7 +1251,7 @@ class TextPainter { } } - void drawElided(int32 left, int32 top, int32 w, style::align align, int32 lines, int32 yFrom, int32 yTo, int32 removeFromEnd) { + void drawElided(int32 left, int32 top, int32 w, style::align align, int32 lines, int32 yFrom, int32 yTo, int32 removeFromEnd, bool breakEverywhere) { if (lines <= 0 || _t->isNull()) return; if (yTo < 0 || (lines - 1) * _t->_font->height < yTo) { @@ -1259,6 +1259,7 @@ class TextPainter { _elideLast = true; _elideRemoveFromEnd = removeFromEnd; } + _breakEverywhere = breakEverywhere; draw(left, top, w, align, yFrom, yTo); } @@ -1272,7 +1273,7 @@ class TextPainter { return *_lnkResult; } - void getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 w, style::align align) { + void getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 w, style::align align, bool breakEverywhere) { lnk = TextLinkPtr(); inText = false; @@ -1281,6 +1282,7 @@ class TextPainter { _lnkY = y; _lnkResult = &lnk; _inTextFlag = &inText; + _breakEverywhere = breakEverywhere; draw(0, 0, w, align, _lnkY, _lnkY + 1); lnk = *_lnkResult; } @@ -2437,7 +2439,7 @@ class TextPainter { QPainter *_p; const Text *_t; - bool _elideLast; + bool _elideLast, _breakEverywhere; int32 _elideRemoveFromEnd; style::align _align; QPen _originalPen; @@ -2984,10 +2986,10 @@ void Text::draw(QPainter &painter, int32 left, int32 top, int32 w, style::align p.draw(left, top, w, align, yFrom, yTo, selectedFrom, selectedTo); } -void Text::drawElided(QPainter &painter, int32 left, int32 top, int32 w, int32 lines, style::align align, int32 yFrom, int32 yTo, int32 removeFromEnd) const { +void Text::drawElided(QPainter &painter, int32 left, int32 top, int32 w, int32 lines, style::align align, int32 yFrom, int32 yTo, int32 removeFromEnd, bool breakEverywhere) const { // painter.fillRect(QRect(left, top, w, countHeight(w)), QColor(0, 0, 0, 32)); // debug TextPainter p(&painter, this); - p.drawElided(left, top, w, align, lines, yFrom, yTo, removeFromEnd); + p.drawElided(left, top, w, align, lines, yFrom, yTo, removeFromEnd, breakEverywhere); } const TextLinkPtr &Text::link(int32 x, int32 y, int32 width, style::align align) const { @@ -2995,9 +2997,9 @@ const TextLinkPtr &Text::link(int32 x, int32 y, int32 width, style::align align) return p.link(x, y, width, align); } -void Text::getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, style::align align) const { +void Text::getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, style::align align, bool breakEverywhere) const { TextPainter p(0, this); - p.getState(lnk, inText, x, y, width, align); + p.getState(lnk, inText, x, y, width, align, breakEverywhere); } void Text::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y, int32 width, style::align align) const { diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index 341ebb9034b686..731e9962174e30 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -604,27 +604,27 @@ class Text { void replaceFont(style::font f); // does not recount anything, use at your own risk! void draw(QPainter &p, int32 left, int32 top, int32 width, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, uint16 selectedFrom = 0, uint16 selectedTo = 0) const; - void drawElided(QPainter &p, int32 left, int32 top, int32 width, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0) const; + void drawElided(QPainter &p, int32 left, int32 top, int32 width, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0, bool breakEverywhere = false) const; void drawLeft(QPainter &p, int32 left, int32 top, int32 width, int32 outerw, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, uint16 selectedFrom = 0, uint16 selectedTo = 0) const { draw(p, rtl() ? (outerw - left - width) : left, top, width, align, yFrom, yTo, selectedFrom, selectedTo); } - void drawLeftElided(QPainter &p, int32 left, int32 top, int32 width, int32 outerw, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0) const { - drawElided(p, rtl() ? (outerw - left - width) : left, top, width, lines, align, yFrom, yTo, removeFromEnd); + void drawLeftElided(QPainter &p, int32 left, int32 top, int32 width, int32 outerw, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0, bool breakEverywhere = false) const { + drawElided(p, rtl() ? (outerw - left - width) : left, top, width, lines, align, yFrom, yTo, removeFromEnd, breakEverywhere); } void drawRight(QPainter &p, int32 right, int32 top, int32 width, int32 outerw, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, uint16 selectedFrom = 0, uint16 selectedTo = 0) const { draw(p, rtl() ? right : (outerw - right - width), top, width, align, yFrom, yTo, selectedFrom, selectedTo); } - void drawRightElided(QPainter &p, int32 right, int32 top, int32 width, int32 outerw, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0) const { - drawElided(p, rtl() ? right : (outerw - right - width), top, width, lines, align, yFrom, yTo, removeFromEnd); + void drawRightElided(QPainter &p, int32 right, int32 top, int32 width, int32 outerw, int32 lines = 1, style::align align = style::al_left, int32 yFrom = 0, int32 yTo = -1, int32 removeFromEnd = 0, bool breakEverywhere = false) const { + drawElided(p, rtl() ? right : (outerw - right - width), top, width, lines, align, yFrom, yTo, removeFromEnd, breakEverywhere); } const TextLinkPtr &link(int32 x, int32 y, int32 width, style::align align = style::al_left) const; const TextLinkPtr &linkLeft(int32 x, int32 y, int32 width, int32 outerw, style::align align = style::al_left) const { return link(rtl() ? (outerw - x - width) : x, y, width, align); } - void getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, style::align align = style::al_left) const; - void getStateLeft(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, int32 outerw, style::align align = style::al_left) const { - return getState(lnk, inText, rtl() ? (outerw - x - width) : x, y, width, align); + void getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, style::align align = style::al_left, bool breakEverywhere = false) const; + void getStateLeft(TextLinkPtr &lnk, bool &inText, int32 x, int32 y, int32 width, int32 outerw, style::align align = style::al_left, bool breakEverywhere = false) const { + return getState(lnk, inText, rtl() ? (outerw - x - width) : x, y, width, align, breakEverywhere); } void getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y, int32 width, style::align align = style::al_left) const; void getSymbolLeft(uint16 &symbol, bool &after, bool &upon, int32 x, int32 y, int32 width, int32 outerw, style::align align = style::al_left) const { diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 3ebc83230033f1..6ef6b30c578415 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -6018,14 +6018,30 @@ int32 HistoryMessageSigned::maxWidth() const { HistoryMessageForwarded::HistoryMessageForwarded(Interfaces *) : _authorOriginal(0) , _fromOriginal(0) -, _authorOriginalVersion(0) -, _fromWidth(st::msgServiceFont->width(lang(lng_forwarded_from)) + st::msgServiceFont->spacew) { +, _originalId(0) +, _text(1) { } -void HistoryMessageForwarded::authorNameUpdated(bool hasVia) const { - QString name((hasVia && _authorOriginal->isUser()) ? _authorOriginal->asUser()->firstName : App::peerName(_authorOriginal)); - _authorOriginalName.setText(st::msgServiceNameFont, name, _textNameOptions); - _authorOriginalVersion = _authorOriginal->nameVersion; +void HistoryMessageForwarded::create(const HistoryMessageVia *via) const { + QString text; + if (_authorOriginal != _fromOriginal) { + text = lng_forwarded_signed(lt_channel, App::peerName(_authorOriginal), lt_user, App::peerName(_fromOriginal)); + } else { + text = App::peerName(_authorOriginal); + } + if (via) { + text = lng_forwarded_via(lt_original, textcmdLink(1, text), lt_inline_bot, textcmdLink(2, '@' + via->_bot->username)); + } else { + text = lng_forwarded(lt_original, textcmdLink(1, text)); + } + TextParseOptions opts = { TextParseRichText, 0, 0, Qt::LayoutDirectionAuto }; + textstyleSet(&st::inFwdTextStyle); + _text.setText(st::msgServiceNameFont, text, opts); + textstyleRestore(); + _text.setLink(1, (_originalId && _authorOriginal->isChannel()) ? TextLinkPtr(new MessageLink(_authorOriginal->id, _originalId)) : _authorOriginal->lnk); + if (via) { + _text.setLink(2, via->_lnk); + } } HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, const MTPDmessage &msg) : @@ -6034,15 +6050,17 @@ HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, const MTPD , _textWidth(0) , _textHeight(0) , _media(0) { - PeerId fwdAuthorId = 0, fwdFromId = 0; + PeerId authorOriginalId = 0, fromOriginalId = 0; + MsgId originalId = 0; if (msg.has_fwd_from() && msg.vfwd_from.type() == mtpc_messageFwdHeader) { const MTPDmessageFwdHeader &f(msg.vfwd_from.c_messageFwdHeader()); if (f.has_from_id() || f.has_channel_id()) { - fwdAuthorId = f.has_channel_id() ? peerFromChannel(f.vchannel_id) : peerFromUser(f.vfrom_id); - fwdFromId = f.has_from_id() ? peerFromUser(f.vfrom_id) : peerFromChannel(f.vchannel_id); + authorOriginalId = f.has_channel_id() ? peerFromChannel(f.vchannel_id) : peerFromUser(f.vfrom_id); + fromOriginalId = f.has_from_id() ? peerFromUser(f.vfrom_id) : peerFromChannel(f.vchannel_id); + if (f.has_channel_post()) originalId = f.vchannel_post.v; } } - create(msg.has_via_bot_id() ? msg.vvia_bot_id.v : 0, msg.has_views() ? msg.vviews.v : -1, fwdAuthorId, fwdFromId); + create(msg.has_via_bot_id() ? msg.vvia_bot_id.v : 0, msg.has_views() ? msg.vviews.v : -1, authorOriginalId, fromOriginalId, originalId); QString text(textClean(qs(msg.vmessage))); initMedia(msg.has_media() ? (&msg.vmedia) : 0, text); @@ -6058,7 +6076,7 @@ HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId id, UserData *fwdViaBot = fwd->viaBot(); int32 viaBotId = fwdViaBot ? peerToUser(fwdViaBot->id) : 0; int32 fwdViewsCount = fwd->viewsCount(), views = (fwdViewsCount > 0) ? fwdViewsCount : (isPost() ? 1 : -1); - create(viaBotId, views, fwd->authorOriginal()->id, fwd->fromOriginal()->id); + create(viaBotId, views, fwd->authorOriginal()->id, fwd->fromOriginal()->id, fwd->authorOriginal()->isChannel() ? fwd->id : 0); if (HistoryMedia *mediaOriginal = fwd->getMedia()) { _media = mediaOriginal->clone(); @@ -6073,7 +6091,7 @@ HistoryMessage::HistoryMessage(History *history, HistoryBlock *block, MsgId id, , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); setText(msg, entities); } @@ -6084,7 +6102,7 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); initMediaFromDocument(doc, caption); setText(QString(), EntitiesInText()); @@ -6096,14 +6114,14 @@ HistoryItem(history, block, msgId, flags, date, (flags & MTPDmessage::flag_from_ , _textWidth(0) , _textHeight(0) , _media(0) { - create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1, 0, 0); + create((flags & MTPDmessage::flag_via_bot_id) ? viaBotId : 0, isPost() ? 1 : -1); _media = new HistoryPhoto(photo, caption, this); _media->regItem(this); setText(QString(), EntitiesInText()); } -void HistoryMessage::create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal, const PeerId &fromIdOriginal) { +void HistoryMessage::create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal, const PeerId &fromIdOriginal, MsgId originalId) { uint64 mask = 0; if (viaBotId) { mask |= HistoryMessageVia::Bit(); @@ -6116,9 +6134,6 @@ void HistoryMessage::create(int32 viaBotId, int32 viewsCount, const PeerId &auth } if (authorIdOriginal && fromIdOriginal) { mask |= HistoryMessageForwarded::Bit(); - if (authorIdOriginal != fromIdOriginal) { - mask |= HistoryMessageSigned::Bit(); - } } UpdateInterfaces(mask); if (HistoryMessageVia *via = Get()) { @@ -6133,6 +6148,7 @@ void HistoryMessage::create(int32 viaBotId, int32 viewsCount, const PeerId &auth if (HistoryMessageForwarded *fwd = Get()) { fwd->_authorOriginal = App::peer(authorIdOriginal); fwd->_fromOriginal = App::peer(fromIdOriginal); + fwd->_originalId = originalId; } initTime(); } @@ -6239,7 +6255,7 @@ void HistoryMessage::initDimensions() { HistoryMessageForwarded *fwd = Get(); HistoryMessageVia *via = Get(); if (fwd) { - fwd->authorNameUpdated(via != 0); + fwd->create(via); } if (_media) { @@ -6281,7 +6297,7 @@ void HistoryMessage::initDimensions() { } } if (fwd) { - int32 _namew = st::msgPadding.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgPadding.right(); + int32 _namew = st::msgPadding.left() + fwd->_text.maxWidth() + st::msgPadding.right(); if (via) { _namew += st::msgServiceFont->spacew + via->_maxWidth; } @@ -6374,9 +6390,9 @@ QString HistoryMessage::selectedText(uint32 selection) const { } if (const HistoryMessageForwarded *fwd = Get()) { if (selection == FullSelection) { - QString wrapped; - wrapped.reserve(lang(lng_forwarded_from).size() + fwd->_authorOriginal->name.size() + 4 + result.size()); - wrapped.append('[').append(lang(lng_forwarded_from)).append(' ').append(fwd->_authorOriginal->name).append(qsl("]\n")).append(result); + QString fwdinfo = fwd->_text.original(0, 0xFFFF, Text::ExpandLinksAll), wrapped; + wrapped.reserve(fwdinfo.size() + 4 + result.size()); + wrapped.append('[').append(fwdinfo).append(qsl("]\n")).append(result); result = wrapped; } } @@ -6592,12 +6608,6 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m if (displayFromName() && author()->nameVersion > _authorNameVersion) { fromNameUpdated(width); } - if (fwd && fwd->_authorOriginal->nameVersion > fwd->_authorOriginalVersion) { - fwd->authorNameUpdated(via != 0); - if (via) { - via->resize(width - st::msgPadding.left() - st::msgPadding.right() - fwd->_fromWidth - fwd->_authorOriginalName.maxWidth() - st::msgServiceFont->spacew); - } - } QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); @@ -6649,8 +6659,19 @@ void HistoryMessage::draw(Painter &p, const QRect &r, uint32 selection, uint64 m void HistoryMessage::drawMessageText(Painter &p, QRect trect, uint32 selection) const { if (displayForwardedFrom()) { - paintForwardedInfo(p, trect.x(), trect.y(), trect.width(), (selection == FullSelection)); - trect.setY(trect.y() + st::msgServiceNameFont->height); + style::font serviceFont(st::msgServiceFont), serviceName(st::msgServiceNameFont); + + bool outbg = out() && !isPost(); + p.setPen((selection == FullSelection) ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg)); + p.setFont(serviceFont); + + const HistoryMessageForwarded *fwd = Get(); + bool breakEverywhere = (fwd->_text.countHeight(trect.width()) > 2 * serviceFont->height); + textstyleSet(&((selection == FullSelection) ? (outbg ? st::outFwdTextStyleSelected : st::inFwdTextStyleSelected) : (outbg ? st::outFwdTextStyle : st::inFwdTextStyle))); + fwd->_text.drawElided(p, trect.x(), trect.y(), trect.width(), 2, style::al_left, 0, -1, 0, breakEverywhere); + textstyleRestore(); + + trect.setY(trect.y() + (((fwd->_text.maxWidth() > trect.width()) ? 2 : 1) * serviceFont->height)); } bool outbg = out() && !isPost(), selected = (selection == FullSelection); @@ -6729,15 +6750,14 @@ int32 HistoryMessage::resize(int32 width) { } if (displayForwardedFrom()) { + int32 l = 0, w = 0; + countPositionAndSize(l, w); + int32 fwdheight = ((fwd->_text.maxWidth() > (w - st::msgPadding.left() - st::msgPadding.right())) ? 2 : 1) * st::semiboldFont->height; + if (emptyText() && !displayFromName()) { - _height += st::msgPadding.top() + st::msgServiceNameFont->height + st::mediaHeaderSkip; + _height += st::msgPadding.top() + fwdheight + st::mediaHeaderSkip; } else { - _height += st::msgServiceNameFont->height; - } - if (via) { - int32 l = 0, w = 0; - countPositionAndSize(l, w); - via->resize(w - st::msgPadding.left() - st::msgPadding.right() - fwd->_fromWidth - fwd->_authorOriginalName.maxWidth() - st::msgServiceFont->spacew); + _height += fwdheight; } } } else { @@ -6753,10 +6773,6 @@ bool HistoryMessage::hasPoint(int32 x, int32 y) const { if (width < 1) return false; if (drawBubble()) { - if (displayForwardedFrom()) { - QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); - return r.contains(x, y); - } QRect r(left, st::msgMargin.top(), width, _height - st::msgMargin.top() - st::msgMargin.bottom()); return r.contains(x, y); } else { @@ -6817,18 +6833,20 @@ void HistoryMessage::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 } if (displayForwardedFrom()) { QRect trect(r.marginsAdded(-st::msgPadding)); - if (y >= trect.top() && y < trect.top() + st::msgServiceNameFont->height) { - if (x >= trect.left() + fwd->_fromWidth && x < trect.right() && x < trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth()) { - lnk = fwd->_authorOriginal->lnk; - } else if (via && x >= trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgServiceFont->spacew && x < trect.right() && x < trect.left() + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + st::msgServiceFont->spacew + via->_maxWidth) { - lnk = via->_lnk; - } else { - lnk = TextLinkPtr(); + int32 fwdheight = ((fwd->_text.maxWidth() > trect.width()) ? 2 : 1) * st::semiboldFont->height; + if (y >= trect.top() && y < trect.top() + fwdheight) { + bool inText = false; + bool breakEverywhere = (fwd->_text.countHeight(trect.width()) > 2 * st::semiboldFont->height); + textstyleSet(&st::inFwdTextStyle); + fwd->_text.getState(lnk, inText, x - trect.left(), y - trect.top(), trect.right() - trect.left(), style::al_left, breakEverywhere); + textstyleRestore(); + if (breakEverywhere) { + state = HistoryInForwardedCursorState; } return; } - y -= st::msgServiceNameFont->height; - r.setHeight(r.height() - st::msgServiceNameFont->height); + y -= fwdheight; + r.setHeight(r.height() - fwdheight); } getStateFromMessageText(lnk, state, x, y, r); } else { @@ -6899,11 +6917,12 @@ void HistoryMessage::getSymbol(uint16 &symbol, bool &after, bool &upon, int32 x, } else if (via && !fwd) { r.setTop(r.top() + st::msgNameFont->height); } + QRect trect(r.marginsAdded(-st::msgPadding)); if (displayForwardedFrom()) { - y -= st::msgServiceNameFont->height; - r.setHeight(r.height() - st::msgServiceNameFont->height); + int32 fwdheight = ((fwd->_text.maxWidth() > trect.width()) ? 2 : 1) * st::semiboldFont->height; + y -= fwdheight; + r.setHeight(r.height() - fwdheight); } - QRect trect(r.marginsAdded(-st::msgPadding)); if (_media && _media->isDisplayed()) { trect.setBottom(trect.bottom() - _media->height()); } @@ -6956,32 +6975,6 @@ HistoryMessage::~HistoryMessage() { } } -void HistoryMessage::paintForwardedInfo(Painter &p, int32 x, int32 y, int32 w, bool selected) const { - style::font serviceFont(st::msgServiceFont), serviceName(st::msgServiceNameFont); - - bool outbg = out() && !isPost(); - p.setPen((selected ? (outbg ? st::msgOutServiceFgSelected : st::msgInServiceFgSelected) : (outbg ? st::msgOutServiceFg : st::msgInServiceFg))->p); - p.setFont(serviceFont); - - const HistoryMessageForwarded *fwd = Get(); - const HistoryMessageVia *via = Get(); - if (via && w > fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + serviceFont->spacew) { - p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); - - p.setFont(serviceName); - fwd->_authorOriginalName.draw(p, x + fwd->_fromWidth, y, w - fwd->_fromWidth); - - p.drawText(x + fwd->_fromWidth + fwd->_authorOriginalName.maxWidth() + serviceFont->spacew, y + serviceFont->ascent, via->_text); - } else if (w > fwd->_fromWidth) { - p.drawText(x, y + serviceFont->ascent, lang(lng_forwarded_from)); - - p.setFont(serviceName); - fwd->_authorOriginalName.drawElided(p, x + fwd->_fromWidth, y, w - fwd->_fromWidth); - } else { - p.drawText(x, y + serviceFont->ascent, serviceFont->elided(lang(lng_forwarded_from), w)); - } -} - HistoryReply::HistoryReply(History *history, HistoryBlock *block, const MTPDmessage &msg) : HistoryMessage(history, block, msg) , replyToMsgId(msg.vreply_to_msg_id.v) , replyToMsg(0) diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index fbcc1e7da97da0..6b20310bed5200 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -769,7 +769,8 @@ class HistoryMessage; // dynamic_cast optimize enum HistoryCursorState { HistoryDefaultCursorState, HistoryInTextCursorState, - HistoryInDateCursorState + HistoryInDateCursorState, + HistoryInForwardedCursorState, }; enum InfoDisplayType { @@ -819,13 +820,12 @@ struct HistoryMessageSigned : public BasicInterface { struct HistoryMessageForwarded : public BasicInterface { HistoryMessageForwarded(Interfaces *); - void authorNameUpdated(bool hasVia) const; + void create(const HistoryMessageVia *via) const; bool display(bool hasVia) const; PeerData *_authorOriginal, *_fromOriginal; - mutable Text _authorOriginalName; - mutable int32 _authorOriginalVersion; - int32 _fromWidth; + MsgId _originalId; + mutable Text _text; }; class HistoryMedia; @@ -2116,7 +2116,7 @@ class HistoryMessage : public HistoryItem { protected: - void create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal, const PeerId &fromIdOriginal); + void create(int32 viaBotId, int32 viewsCount, const PeerId &authorIdOriginal = 0, const PeerId &fromIdOriginal = 0, MsgId originalId = 0); bool displayForwardedFrom() const { if (const HistoryMessageForwarded *fwd = Get()) { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 99e07198d3a857..30048f24f1b4e6 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -1610,10 +1610,10 @@ void HistoryInner::onUpdateSelected() { } } } - if (_dragCursorState == HistoryInDateCursorState && cursorState != HistoryInDateCursorState) { + if (cursorState != _dragCursorState) { PopupTooltip::Hide(); } - if (lnk || cursorState == HistoryInDateCursorState) { + if (lnk || cursorState == HistoryInDateCursorState || cursorState == HistoryInForwardedCursorState) { PopupTooltip::Show(1000, this); } @@ -1859,6 +1859,12 @@ QString HistoryInner::tooltipText() const { if (App::hoveredItem()) { return App::hoveredItem()->date.toString(QLocale::system().dateTimeFormat(QLocale::LongFormat)); } + } else if (_dragCursorState == HistoryInForwardedCursorState && _dragAction == NoDrag) { + if (App::hoveredItem()) { + if (HistoryMessageForwarded *fwd = App::hoveredItem()->Get()) { + return fwd->_text.original(0, 0xFFFF, Text::ExpandLinksNone); + } + } } return QString(); } @@ -5532,14 +5538,14 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif flags |= MTPDmessage::flag_from_id; } if (file->type == PreparePhoto) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (file->type == PrepareDocument) { - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (file->type == PrepareAudio) { if (!h->peer->isChannel()) { flags |= MTPDmessage::flag_media_unread; } - h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? 0 : MTP::authedId()), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); + h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaDocument(file->document, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } if (_peer && file->to.peer == _peer->id) { diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 90f1415c650cd4..3e792b014546ac 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -700,7 +700,7 @@ void LayoutOverviewVoice::getState(TextLinkPtr &link, HistoryCursorState &cursor void LayoutOverviewVoice::updateName() const { int32 version = 0; if (const HistoryMessageForwarded *fwd = _parent->Get()) { - _name.setText(st::semiboldFont, lang(lng_forwarded_from) + ' ' + App::peerName(_parent->fromOriginal()), _textNameOptions); + _name.setText(st::semiboldFont, lng_forwarded(lt_original, App::peerName(_parent->fromOriginal())), _textNameOptions); } else { _name.setText(st::semiboldFont, App::peerName(_parent->from()), _textNameOptions); } From 29fefbc4bb0b33bdd218020d8238a65d8159a90b Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 15:30:16 +0300 Subject: [PATCH 081/133] post edit started, sign messages checkbox added in channel edit by creator --- Telegram/Resources/lang.strings | 5 + Telegram/Resources/style.txt | 5 + Telegram/SourceFiles/boxes/addcontactbox.cpp | 82 ++++- Telegram/SourceFiles/boxes/addcontactbox.h | 5 +- Telegram/SourceFiles/boxes/photosendbox.cpp | 306 +++++++++++++++++++ Telegram/SourceFiles/boxes/photosendbox.h | 57 +++- Telegram/SourceFiles/facades.cpp | 10 +- Telegram/SourceFiles/history.cpp | 33 +- Telegram/SourceFiles/history.h | 2 + Telegram/SourceFiles/historywidget.cpp | 36 ++- Telegram/SourceFiles/historywidget.h | 1 + Telegram/SourceFiles/mainwidget.cpp | 2 +- Telegram/SourceFiles/structs.h | 2 + 13 files changed, 508 insertions(+), 38 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index be3832f2a18f13..a1badd427f55d8 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -123,6 +123,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Internal server error."; "lng_flood_error" = "Too many tries. Please try again later."; "lng_gif_error" = "An error has occured while reading GIF animation :("; +"lng_edit_error" = "You cannot edit this message"; "lng_deleted" = "Unknown"; "lng_deleted_message" = "Deleted message"; @@ -737,6 +738,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "Save GIF"; "lng_context_to_msg" = "Go To Message"; "lng_context_reply_msg" = "Reply"; +"lng_context_edit_msg" = "Edit"; "lng_context_forward_msg" = "Forward Message"; "lng_context_delete_msg" = "Delete Message"; "lng_context_select_msg" = "Select Message"; @@ -753,6 +755,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_send_image_too_large" = "Could not send a file, because it is larger than 1.5 GB :("; "lng_send_folder" = "Could not send «{name}» because it is a directory :("; +"lng_edit_placeholder" = "Message text"; + "lng_forward_choose" = "Choose recipient.."; "lng_forward_cant" = "Sorry, no way to forward here :("; "lng_forward_confirm" = "Forward to {recipient}?"; @@ -773,6 +777,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Edit group name"; "lng_edit_contact_title" = "Edit contact name"; "lng_edit_channel_title" = "Edit channel"; +"lng_edit_sign_messages" = "Sign messages"; "lng_edit_group" = "Edit group"; "lng_edit_self_title" = "Edit your name"; "lng_confirm_contact_data" = "New Contact"; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 3a9794fe14fc70..a8f7e3c32e41ba 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -2438,3 +2438,8 @@ inlineRowBorder: linksBorder; inlineRowBorderFg: linksBorderFg; inlineResultsMinWidth: 64px; inlineDurationMargin: 3px; + +editTextArea: InputArea(defaultInputArea) { + textMargins: margins(1px, 6px, 1px, 4px); + heightMax: 256px; +} diff --git a/Telegram/SourceFiles/boxes/addcontactbox.cpp b/Telegram/SourceFiles/boxes/addcontactbox.cpp index 2a710d7aa865ef..86accc4bc9afb1 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.cpp +++ b/Telegram/SourceFiles/boxes/addcontactbox.cpp @@ -1150,14 +1150,17 @@ void EditNameTitleBox::onSaveChatDone(const MTPUpdates &updates) { emit closed(); } -EditChannelBox::EditChannelBox(ChannelData *channel) : -_channel(channel), -_save(this, lang(lng_settings_save), st::defaultBoxButton), -_cancel(this, lang(lng_cancel), st::cancelBoxButton), -_title(this, st::defaultInputField, lang(lng_dlg_new_channel_name), _channel->name), -_description(this, st::newGroupDescription, lang(lng_create_group_description), _channel->about), -_publicLink(this, lang(channel->isPublic() ? lng_profile_edit_public_link : lng_profile_create_public_link), st::defaultBoxLinkButton), -_saveTitleRequestId(0), _saveDescriptionRequestId(0) { +EditChannelBox::EditChannelBox(ChannelData *channel) : AbstractBox() +, _channel(channel) +, _save(this, lang(lng_settings_save), st::defaultBoxButton) +, _cancel(this, lang(lng_cancel), st::cancelBoxButton) +, _title(this, st::defaultInputField, lang(lng_dlg_new_channel_name), _channel->name) +, _description(this, st::newGroupDescription, lang(lng_create_group_description), _channel->about) +, _sign(this, lang(lng_edit_sign_messages), channel->addsSignature()) +, _publicLink(this, lang(channel->isPublic() ? lng_profile_edit_public_link : lng_profile_create_public_link), st::defaultBoxLinkButton) +, _saveTitleRequestId(0) +, _saveDescriptionRequestId(0) +, _saveSignRequestId(0) { connect(App::main(), SIGNAL(peerNameChanged(PeerData*, const PeerData::Names&, const PeerData::NameFirstChars&)), this, SLOT(peerUpdated(PeerData*))); setMouseTracking(true); @@ -1183,6 +1186,7 @@ _saveTitleRequestId(0), _saveDescriptionRequestId(0) { void EditChannelBox::hideAll() { _title.hide(); _description.hide(); + _sign.hide(); _save.hide(); _cancel.hide(); _publicLink.hide(); @@ -1195,8 +1199,10 @@ void EditChannelBox::showAll() { _cancel.show(); if (_channel->isMegagroup()) { _publicLink.hide(); + _sign.hide(); } else { _publicLink.show(); + _sign.show(); } } @@ -1224,6 +1230,7 @@ void EditChannelBox::paintEvent(QPaintEvent *e) { void EditChannelBox::peerUpdated(PeerData *peer) { if (peer == _channel) { _publicLink.setText(lang(_channel->isPublic() ? lng_profile_edit_public_link : lng_profile_create_public_link)); + _sign.setChecked(_channel->addsSignature()); } } @@ -1235,6 +1242,9 @@ void EditChannelBox::onDescriptionResized() { void EditChannelBox::updateMaxHeight() { int32 h = st::boxTitleHeight + st::newGroupInfoPadding.top() + _title.height(); h += st::newGroupDescriptionPadding.top() + _description.height() + st::newGroupDescriptionPadding.bottom(); + if (!_channel->isMegagroup()) { + h += st::newGroupPublicLinkPadding.top() + _sign.height() + st::newGroupPublicLinkPadding.bottom(); + } h += st::newGroupPublicLinkPadding.top() + _publicLink.height() + st::newGroupPublicLinkPadding.bottom(); h += st::boxPadding.bottom() + st::newGroupInfoPadding.bottom() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom(); setMaxHeight(h); @@ -1246,14 +1256,16 @@ void EditChannelBox::resizeEvent(QResizeEvent *e) { _description.moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _title.y() + _title.height() + st::newGroupDescriptionPadding.top()); - _publicLink.moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _description.y() + _description.height() + st::newGroupDescriptionPadding.bottom() + st::newGroupPublicLinkPadding.top()); + _sign.moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _description.y() + _description.height() + st::newGroupDescriptionPadding.bottom() + st::newGroupPublicLinkPadding.top()); + + _publicLink.moveToLeft(st::boxPadding.left() + st::newGroupInfoPadding.left(), _sign.y() + _sign.height() + st::newGroupDescriptionPadding.bottom() + st::newGroupPublicLinkPadding.top()); _save.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save.height()); _cancel.moveToRight(st::boxButtonPadding.right() + _save.width() + st::boxButtonPadding.left(), _save.y()); } void EditChannelBox::onSave() { - if (_saveTitleRequestId || _saveDescriptionRequestId) return; + if (_saveTitleRequestId || _saveDescriptionRequestId || _saveSignRequestId) return; QString title = prepareText(_title.getLastText()), description = prepareText(_description.getLastText(), true); if (title.isEmpty()) { @@ -1263,7 +1275,11 @@ void EditChannelBox::onSave() { } _sentTitle = title; _sentDescription = description; - _saveTitleRequestId = MTP::send(MTPchannels_EditTitle(_channel->inputChannel, MTP_string(_sentTitle)), rpcDone(&EditChannelBox::onSaveTitleDone), rpcFail(&EditChannelBox::onSaveFail)); + if (_sentTitle == _channel->name) { + saveDescription(); + } else { + _saveTitleRequestId = MTP::send(MTPchannels_EditTitle(_channel->inputChannel, MTP_string(_sentTitle)), rpcDone(&EditChannelBox::onSaveTitleDone), rpcFail(&EditChannelBox::onSaveFail)); + } } void EditChannelBox::onPublicLink() { @@ -1271,7 +1287,19 @@ void EditChannelBox::onPublicLink() { } void EditChannelBox::saveDescription() { - _saveDescriptionRequestId = MTP::send(MTPchannels_EditAbout(_channel->inputChannel, MTP_string(_sentDescription)), rpcDone(&EditChannelBox::onSaveDescriptionDone), rpcFail(&EditChannelBox::onSaveFail)); + if (_sentDescription == _channel->about) { + saveSign(); + } else { + _saveDescriptionRequestId = MTP::send(MTPchannels_EditAbout(_channel->inputChannel, MTP_string(_sentDescription)), rpcDone(&EditChannelBox::onSaveDescriptionDone), rpcFail(&EditChannelBox::onSaveFail)); + } +} + +void EditChannelBox::saveSign() { + if (_channel->isMegagroup() || _channel->addsSignature() == _sign.checked()) { + onClose(); + } else { + _saveSignRequestId = MTP::send(MTPchannels_ToggleSignatures(_channel->inputChannel, MTP_bool(_sign.checked())), rpcDone(&EditChannelBox::onSaveSignDone), rpcFail(&EditChannelBox::onSaveFail)); + } } bool EditChannelBox::onSaveFail(const RPCError &error, mtpRequestId req) { @@ -1295,24 +1323,46 @@ bool EditChannelBox::onSaveFail(const RPCError &error, mtpRequestId req) { _saveDescriptionRequestId = 0; if (err == qstr("CHAT_ABOUT_NOT_MODIFIED")) { _channel->about = _sentDescription; - if (App::api()) emit App::api()->fullPeerUpdated(_channel); - onClose(); + if (App::api()) { + emit App::api()->fullPeerUpdated(_channel); + } + saveSign(); + return true; } else { _description.setFocus(); } + } else if (req == _saveSignRequestId) { + _saveSignRequestId = 0; + if (err == qstr("CHAT_NOT_MODIFIED")) { + onClose(); + return true; + } } return true; } void EditChannelBox::onSaveTitleDone(const MTPUpdates &updates) { _saveTitleRequestId = 0; - App::main()->sentUpdatesReceived(updates); + if (App::main()) { + App::main()->sentUpdatesReceived(updates); + } saveDescription(); } void EditChannelBox::onSaveDescriptionDone(const MTPBool &result) { _saveDescriptionRequestId = 0; _channel->about = _sentDescription; - if (App::api()) emit App::api()->fullPeerUpdated(_channel); + if (App::api()) { + emit App::api()->fullPeerUpdated(_channel); + } + saveSign(); +} + +void EditChannelBox::onSaveSignDone(const MTPUpdates &updates) { + _saveSignRequestId = 0; + if (App::main()) { + App::main()->sentUpdatesReceived(updates); + } onClose(); } + diff --git a/Telegram/SourceFiles/boxes/addcontactbox.h b/Telegram/SourceFiles/boxes/addcontactbox.h index 0289bc3d53a06e..55e89f3e68adab 100644 --- a/Telegram/SourceFiles/boxes/addcontactbox.h +++ b/Telegram/SourceFiles/boxes/addcontactbox.h @@ -315,18 +315,21 @@ public slots: void onSaveTitleDone(const MTPUpdates &updates); void onSaveDescriptionDone(const MTPBool &result); + void onSaveSignDone(const MTPUpdates &updates); bool onSaveFail(const RPCError &e, mtpRequestId req); void saveDescription(); + void saveSign(); ChannelData *_channel; BoxButton _save, _cancel; InputField _title; InputArea _description; + Checkbox _sign; LinkButton _publicLink; - mtpRequestId _saveTitleRequestId, _saveDescriptionRequestId; + mtpRequestId _saveTitleRequestId, _saveDescriptionRequestId, _saveSignRequestId; QString _sentTitle, _sentDescription; }; diff --git a/Telegram/SourceFiles/boxes/photosendbox.cpp b/Telegram/SourceFiles/boxes/photosendbox.cpp index 1a25dd55ec10da..4bc63c021d89b5 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.cpp +++ b/Telegram/SourceFiles/boxes/photosendbox.cpp @@ -359,3 +359,309 @@ void PhotoSendBox::onSend(bool ctrlShiftEnter) { _confirmed = true; onClose(); } + +EditPostBox::EditPostBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) +, _msg(msg) +, _animated(false) +, _photo(false) +, _doc(false) +, _text(0) +, _save(this, lang(lng_settings_save), st::defaultBoxButton) +, _cancel(this, lang(lng_cancel), st::cancelBoxButton) +, _thumbx(0) +, _thumby(0) +, _thumbw(0) +, _thumbh(0) +, _statusw(0) +, _isImage(false) +, _previewCancelled(false) +, _saveRequestId(0) { + connect(&_save, SIGNAL(clicked()), this, SLOT(onSave())); + connect(&_cancel, SIGNAL(clicked()), this, SLOT(onClose())); + + QSize dimensions; + ImagePtr image; + QString caption; + DocumentData *doc = 0; + if (HistoryMedia *media = _msg->getMedia()) { + HistoryMediaType t = media->type(); + switch (t) { + case MediaTypeGif: { + _animated = true; + doc = static_cast(media)->getDocument(); + dimensions = doc->dimensions; + image = doc->thumb; + } break; + + case MediaTypePhoto: { + _photo = true; + PhotoData *photo = static_cast(media)->photo(); + dimensions = QSize(photo->full->width(), photo->full->height()); + image = photo->full; + } break; + + case MediaTypeVideo: { + _animated = true; + doc = static_cast(media)->getDocument(); + dimensions = doc->dimensions; + image = doc->thumb; + } break; + + case MediaTypeFile: + case MediaTypeMusicFile: + case MediaTypeVoiceFile: { + _doc = true; + doc = static_cast(media)->getDocument(); + image = doc->thumb; + } break; + } + caption = media->getCaption(); + } + if (!_animated && (dimensions.isEmpty() || doc) || image->isNull()) { + _animated = false; + if (image->isNull()) { + _thumbw = 0; + } else { + int32 tw = image->width(), th = image->height(); + if (tw > th) { + _thumbw = (tw * st::msgFileThumbSize) / th; + } else { + _thumbw = st::msgFileThumbSize; + } + _thumb = imagePix(image->pix().toImage(), _thumbw * cIntRetinaFactor(), 0, true, false, true, st::msgFileThumbSize, st::msgFileThumbSize); + } + + if (doc) { + if (doc->voice()) { + _name.setText(st::semiboldFont, lang(lng_media_audio), _textNameOptions); + } else { + _name.setText(st::semiboldFont, documentName(doc), _textNameOptions); + } + _status = formatSizeText(doc->size); + _statusw = qMax(_name.maxWidth(), st::normalFont->width(_status)); + _isImage = doc->isImage(); + } + } else { + int32 maxW = 0, maxH = 0; + if (_animated) { + int32 limitW = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(); + int32 limitH = st::confirmMaxHeight; + maxW = dimensions.width(); + maxH = dimensions.height(); + if (maxW * limitH > maxH * limitW) { + if (maxW < limitW) { + maxH = maxH * limitW / maxW; + maxW = limitW; + } + } else { + if (maxH < limitH) { + maxW = maxW * limitH / maxH; + maxH = limitH; + } + } + _thumb = image->pixNoCache(maxW * cIntRetinaFactor(), maxH * cIntRetinaFactor(), true, true, false, maxW, maxH); + } else { + maxW = dimensions.width(); + maxH = dimensions.height(); + _thumb = image->pixNoCache(maxW * cIntRetinaFactor(), maxH * cIntRetinaFactor(), true, false, false, maxW, maxH); + } + int32 tw = _thumb.width(), th = _thumb.height(); + if (!tw || !th) { + tw = th = 1; + } + _thumbw = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(); + if (_thumb.width() < _thumbw) { + _thumbw = (_thumb.width() > 20) ? _thumb.width() : 20; + } + int32 maxthumbh = qMin(qRound(1.5 * _thumbw), int(st::confirmMaxHeight)); + _thumbh = qRound(th * float64(_thumbw) / tw); + if (_thumbh > maxthumbh) { + _thumbw = qRound(_thumbw * float64(maxthumbh) / _thumbh); + _thumbh = maxthumbh; + if (_thumbw < 10) { + _thumbw = 10; + } + } + _thumbx = (width() - _thumbw) / 2; + + _thumb = QPixmap::fromImage(_thumb.toImage().scaled(_thumbw * cIntRetinaFactor(), _thumbh * cIntRetinaFactor(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation), Qt::ColorOnly); + _thumb.setDevicePixelRatio(cRetinaFactor()); + } + + if (_animated || _photo || _doc) { + _text = new InputArea(this, st::confirmCaptionArea, lang(lng_photo_caption), caption); + _text->setMaxLength(MaxPhotoCaption); + _text->setCtrlEnterSubmit(CtrlEnterSubmitBoth); + } else { + _text = new InputArea(this, st::editTextArea, lang(lng_edit_placeholder), msg->originalText()); + _text->setMaxLength(MaxMessageSize); + _text->setCtrlEnterSubmit(cCtrlEnter() ? CtrlEnterSubmitCtrlEnter : CtrlEnterSubmitEnter); + } + updateBoxSize(); + connect(_text, SIGNAL(resized()), this, SLOT(onCaptionResized())); + connect(_text, SIGNAL(submitted(bool)), this, SLOT(onSave(bool))); + connect(_text, SIGNAL(cancelled()), this, SLOT(onClose())); + + QTextCursor c(_text->textCursor()); + c.movePosition(QTextCursor::End); + _text->setTextCursor(c); + + prepare(); +} + +void EditPostBox::onCaptionResized() { + updateBoxSize(); + resizeEvent(0); + update(); +} + +void EditPostBox::updateBoxSize() { + if (_photo || _animated) { + setMaxHeight(st::boxPhotoPadding.top() + _thumbh + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + } else if (_thumbw) { + setMaxHeight(st::boxPhotoPadding.top() + st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom() + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + } else if (_doc) { + setMaxHeight(st::boxPhotoPadding.top() + st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom() + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + } else { + setMaxHeight(st::boxPhotoPadding.top() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + } +} + +void EditPostBox::paintEvent(QPaintEvent *e) { + Painter p(this); + if (paint(p)) return; + + if (_photo || _animated) { + if (_thumbx > st::boxPhotoPadding.left()) { + p.fillRect(st::boxPhotoPadding.left(), st::boxPhotoPadding.top(), _thumbx - st::boxPhotoPadding.left(), _thumbh, st::confirmBg->b); + } + if (_thumbx + _thumbw < width() - st::boxPhotoPadding.right()) { + p.fillRect(_thumbx + _thumbw, st::boxPhotoPadding.top(), width() - st::boxPhotoPadding.right() - _thumbx - _thumbw, _thumbh, st::confirmBg->b); + } + p.drawPixmap(_thumbx, st::boxPhotoPadding.top(), _thumb); + if (_animated) { + QRect inner(_thumbx + (_thumbw - st::msgFileSize) / 2, st::boxPhotoPadding.top() + (_thumbh - st::msgFileSize) / 2, st::msgFileSize, st::msgFileSize); + p.setPen(Qt::NoPen); + p.setBrush(st::msgDateImgBg); + + p.setRenderHint(QPainter::HighQualityAntialiasing); + p.drawEllipse(inner); + p.setRenderHint(QPainter::HighQualityAntialiasing, false); + + p.drawSpriteCenter(inner, st::msgFileInPlay); + } + } else if (_doc) { + int32 w = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(); + int32 h = _thumbw ? (st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom()) : (st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom()); + int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0; + if (_thumbw) { + nameleft = st::msgFileThumbPadding.left() + st::msgFileThumbSize + st::msgFileThumbPadding.right(); + nametop = st::msgFileThumbNameTop; + nameright = st::msgFileThumbPadding.left(); + statustop = st::msgFileThumbStatusTop; + linktop = st::msgFileThumbLinkTop; + } else { + nameleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); + nametop = st::msgFileNameTop; + nameright = st::msgFilePadding.left(); + statustop = st::msgFileStatusTop; + } + int32 namewidth = w - nameleft - (_thumbw ? st::msgFileThumbPadding.left() : st::msgFilePadding.left()); + if (namewidth > _statusw) { + w -= (namewidth - _statusw); + namewidth = _statusw; + } + int32 x = (width() - w) / 2, y = st::boxPhotoPadding.top(); + + App::roundRect(p, x, y, w, h, st::msgOutBg, MessageOutCorners, &st::msgOutShadow); + + if (_thumbw) { + QRect rthumb(rtlrect(x + st::msgFileThumbPadding.left(), y + st::msgFileThumbPadding.top(), st::msgFileThumbSize, st::msgFileThumbSize, width())); + p.drawPixmap(rthumb.topLeft(), _thumb); + } else { + QRect inner(rtlrect(x + st::msgFilePadding.left(), y + st::msgFilePadding.top(), st::msgFileSize, st::msgFileSize, width())); + p.setPen(Qt::NoPen); + p.setBrush(st::msgFileOutBg); + + p.setRenderHint(QPainter::HighQualityAntialiasing); + p.drawEllipse(inner); + p.setRenderHint(QPainter::HighQualityAntialiasing, false); + + p.drawSpriteCenter(inner, _isImage ? st::msgFileOutImage : st::msgFileOutFile); + } + p.setFont(st::semiboldFont); + p.setPen(st::black); + _name.drawLeftElided(p, x + nameleft, y + nametop, namewidth, width()); + + style::color status(st::mediaOutFg); + p.setFont(st::normalFont); + p.setPen(status); + p.drawTextLeft(x + nameleft, y + statustop, width(), _status); + } +} + +void EditPostBox::resizeEvent(QResizeEvent *e) { + _save.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save.height()); + _cancel.moveToRight(st::boxButtonPadding.right() + _save.width() + st::boxButtonPadding.left(), _save.y()); + _text->resize(st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(), _text->height()); + _text->moveToLeft(st::boxPhotoPadding.left(), _save.y() - st::boxButtonPadding.top() - _text->height()); +} + +void EditPostBox::hideAll() { + _save.hide(); + _cancel.hide(); + _text->hide(); +} + +void EditPostBox::showAll() { + _save.show(); + _cancel.show(); + _text->show(); +} + +void EditPostBox::showDone() { + setInnerFocus(); +} + +void EditPostBox::onSave(bool ctrlShiftEnter) { + if (_saveRequestId) return; + + int32 flags = 0; + if (_previewCancelled) { + flags |= MTPchannels_EditMessage::flag_no_webpage; + } + EntitiesInText sendingEntities; + MTPVector sentEntities = linksToMTP(sendingEntities, true); + if (!sentEntities.c_vector().v.isEmpty()) { + flags |= MTPmessages_SendMessage::flag_entities; + } + _saveRequestId = MTP::send(MTPchannels_EditMessage(MTP_int(flags), _msg->history()->peer->asChannel()->inputChannel, MTP_int(_msg->id), MTP_string(_text->getLastText()), sentEntities), rpcDone(&EditPostBox::saveDone), rpcFail(&EditPostBox::saveFail)); +} + +void EditPostBox::saveDone(const MTPUpdates &updates) { + _saveRequestId = 0; + onClose(); + if (App::main()) { + App::main()->sentUpdatesReceived(updates); + } +} + +bool EditPostBox::saveFail(const RPCError &error) { + if (mtpIsFlood(error)) return false; + + _saveRequestId = 0; + QString err = error.type(); + if (err == qstr("MESSAGE_ID_INVALID") || err == qstr("CHAT_ADMIN_REQUIRED") || err == qstr("MESSAGE_EDIT_TIME_EXPIRED")) { + _error = lang(lng_edit_error); + } else if (err == qstr("MESSAGE_NOT_MODIFIED")) { + onClose(); + return true; + } else if (err == qstr("MESSAGE_EMPTY")) { + _text->setFocus(); + _text->showError(); + } else { + _error = lang(lng_edit_error); + } + update(); + return true; +} diff --git a/Telegram/SourceFiles/boxes/photosendbox.h b/Telegram/SourceFiles/boxes/photosendbox.h index 1cd4bbf00ea274..462e8bc503be5e 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.h +++ b/Telegram/SourceFiles/boxes/photosendbox.h @@ -42,11 +42,6 @@ class PhotoSendBox : public AbstractBox { } } -signals: - - void confirmed(); - void cancelled(); - public slots: void onCompressedChange(); @@ -87,3 +82,55 @@ public slots: bool _confirmed; }; + +class EditPostBox : public AbstractBox, public RPCSender { + Q_OBJECT + +public: + + EditPostBox(HistoryItem *msg); + void paintEvent(QPaintEvent *e); + void resizeEvent(QResizeEvent *e); + + void setInnerFocus() { + _text->setFocus(); + } + +public slots: + + void onCaptionResized(); + void onSave(bool ctrlShiftEnter = false); + +protected: + + void hideAll(); + void showAll(); + void showDone(); + +private: + + void updateBoxSize(); + + void saveDone(const MTPUpdates &updates); + bool saveFail(const RPCError &error); + + HistoryItem *_msg; + bool _animated, _photo, _doc; + + QPixmap _thumb; + + InputArea *_text; + BoxButton _save, _cancel; + + int32 _thumbx, _thumby, _thumbw, _thumbh; + Text _name; + QString _status; + int32 _statusw; + bool _isImage; + + bool _previewCancelled; + mtpRequestId _saveRequestId; + + QString _error; + +}; diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index 70c257e9a2b607..6e7a621c3eb56f 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -364,11 +364,11 @@ struct GlobalDataStruct { int32 OnlineCloudTimeout = 300000; int32 NotifyCloudDelay = 30000; int32 NotifyDefaultDelay = 1500; - int32 ChatBigSize = 190; // ? - int32 PushChatPeriod = 0; // ? - int32 PushChatLimit = 0; // ? - int32 SavedGifsLimit = 100; - int32 EditTimeLimit = 0; // ? + int32 ChatBigSize = 10; + int32 PushChatPeriod = 60000; + int32 PushChatLimit = 2; + int32 SavedGifsLimit = 200; + int32 EditTimeLimit = 172800; }; GlobalDataStruct *GlobalData = 0; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 6ef6b30c578415..ffa79820b904e1 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -2911,6 +2911,33 @@ bool HistoryItem::displayFromPhoto() const { return (Adaptive::Wide() || (!out() && !history()->peer->isUser())) && !isPost(); } +bool HistoryItem::canEdit(const QDateTime &cur) const { + ChannelData *channel = _history->peer->asChannel(); + int32 s = date.secsTo(cur); + if (!channel || id < 0 || date.secsTo(cur) >= Global::EditTimeLimit()) return false; + + if (const HistoryMessage *msg = toHistoryMessage()) { + if (msg->Is() || msg->Is()) return false; + + if (HistoryMedia *media = msg->getMedia()) { + HistoryMediaType t = media->type(); + if (t != MediaTypePhoto && + t != MediaTypeVideo && + t != MediaTypeFile && + t != MediaTypeGif && + t != MediaTypeMusicFile && + t != MediaTypeVoiceFile) { + return false; + } + } + if (isPost()) { + return (channel->amCreator() || (channel->amEditor() && out())); + } + return out(); + } + return false; +} + void HistoryItem::clipCallback(ClipReaderNotification notification) { HistoryMedia *media = getMedia(); if (!media) return; @@ -3829,13 +3856,13 @@ void HistoryDocument::create(bool caption) { mask |= HistoryDocumentVoice::Bit(); } else { mask |= HistoryDocumentNamed::Bit(); - if (caption) { - mask |= HistoryDocumentCaptioned::Bit(); - } if (!_data->song() && !_data->thumb->isNull() && _data->thumb->width() && _data->thumb->height()) { mask |= HistoryDocumentThumbed::Bit(); } } + if (caption) { + mask |= HistoryDocumentCaptioned::Bit(); + } UpdateInterfaces(mask); if (HistoryDocumentThumbed *thumbed = Get()) { thumbed->_linksavel.reset(new DocumentSaveLink(_data)); diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 6b20310bed5200..d1e410d1fdf8dd 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -987,6 +987,8 @@ class HistoryItem : public HistoryElem, public Interfaces { return (channel->amEditor() || channel->amModerator() || out()); } + bool canEdit(const QDateTime &cur) const; + int32 y; MsgId id; QDateTime date; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 30048f24f1b4e6..8835be63bfa90c 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -870,8 +870,13 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (isUponSelected > 0) { _menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true); } - if (item && item->id > 0 && isUponSelected != 2 && isUponSelected != -2 && canSendMessages) { - _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + if (item && item->id > 0 && isUponSelected != 2 && isUponSelected != -2) { + if (canSendMessages) { + _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + } + if (item->canEdit(::date(unixtime()))) { + _menu->addAction(lang(lng_context_edit_msg), _widget, SLOT(onEditMessage())); + } } if (lnkPhoto) { _menu->addAction(lang(lng_context_open_image), this, SLOT(openContextUrl()))->setEnabled(true); @@ -920,12 +925,22 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (isUponSelected > 0) { _menu->addAction(lang(lng_context_copy_selected), this, SLOT(copySelectedText()))->setEnabled(true); - if (item && item->id > 0 && isUponSelected != 2 && canSendMessages) { - _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + if (item && item->id > 0 && isUponSelected != 2) { + if (canSendMessages) { + _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + } + if (item->canEdit(::date(unixtime()))) { + _menu->addAction(lang(lng_context_edit_msg), _widget, SLOT(onEditMessage())); + } } } else { - if (item && item->id > 0 && isUponSelected != -2 && canSendMessages) { - _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + if (item && item->id > 0 && isUponSelected != -2) { + if (canSendMessages) { + _menu->addAction(lang(lng_context_reply_msg), _widget, SLOT(onReplyToMessage())); + } + if (item->canEdit(::date(unixtime()))) { + _menu->addAction(lang(lng_context_edit_msg), _widget, SLOT(onEditMessage())); + } } if (item && !isUponSelected && !_contextMenuLnk) { if (HistoryMedia *media = (msg ? msg->getMedia() : 0)) { @@ -4422,7 +4437,7 @@ void HistoryWidget::onSend(bool ctrlShiftEnter, MsgId replyTo) { bool lastKeyboardUsed = lastForceReplyReplied(FullMsgId(_channel, replyTo)); - WebPageId webPageId = _previewCancelled ? 0xFFFFFFFFFFFFFFFFULL : ((_previewData && _previewData->pendingTill >= 0) ? _previewData->id : 0); + WebPageId webPageId = _previewCancelled ? CancelledWebPageId : ((_previewData && _previewData->pendingTill >= 0) ? _previewData->id : 0); App::main()->sendMessage(_history, _field.getLastText(), replyTo, _broadcast.checked(), webPageId); setFieldText(QString()); @@ -6617,6 +6632,13 @@ void HistoryWidget::onReplyToMessage() { _field.setFocus(); } +void HistoryWidget::onEditMessage() { + HistoryItem *to = App::contextItem(); + if (!to || !to->history()->peer->isChannel()) return; + + Ui::showLayer(new EditPostBox(to)); +} + bool HistoryWidget::lastForceReplyReplied(const FullMsgId &replyTo) const { if (replyTo.msg > 0 && replyTo.channel != _channel) return false; return _keyboard.forceReply() && _keyboard.forMsgId() == FullMsgId(_channel, _history->lastKeyboardId) && _keyboard.forMsgId().msg == (replyTo.msg < 0 ? replyToId() : replyTo.msg); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index fcf4c537718866..d18f08103530e6 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -594,6 +594,7 @@ public slots: void onCancel(); void onReplyToMessage(); + void onEditMessage(); void onReplyForwardPreviewCancel(); void onCancelSendAction(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index aef60bc1dc7967..27175c2f3fb154 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -1300,7 +1300,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, sendFlags |= MTPmessages_SendMessage::flag_reply_to_msg_id; } MTPMessageMedia media = MTP_messageMediaEmpty(); - if (webPageId == 0xFFFFFFFFFFFFFFFFULL) { + if (webPageId == CancelledWebPageId) { sendFlags |= MTPmessages_SendMessage::flag_no_webpage; } else if (webPageId) { WebPageData *page = App::webPage(webPageId); diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 3afef5e2b1eba7..69604e5017ad5c 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -131,6 +131,8 @@ typedef uint64 VideoId; typedef uint64 AudioId; typedef uint64 DocumentId; typedef uint64 WebPageId; +static const WebPageId CancelledWebPageId = 0xFFFFFFFFFFFFFFFFULL; + typedef int32 MsgId; struct FullMsgId { FullMsgId() : channel(NoChannel), msg(0) { From 9fec887044aae5342d8b766f7f205ce00245de17 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 15:47:30 +0300 Subject: [PATCH 082/133] langs updated, link click async in overviewwidget --- Telegram/Resources/lang.strings | 3 ++- Telegram/SourceFiles/langs/lang_de.strings | 2 +- Telegram/SourceFiles/langs/lang_it.strings | 4 ++-- Telegram/SourceFiles/overviewwidget.cpp | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index a03f486635521c..93d274595e6e19 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Choose from gallery"; "lng_settings_bg_from_file" = "Choose from file"; "lng_settings_bg_tile" = "Tile background"; +"lng_settings_adaptive_wide" = "Adaptive layout for wide screens"; "lng_backgrounds_header" = "Choose your new chat background"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}"; "lng_new_version_minor" = "— Bug fixes and other minor improvements"; -"lng_new_version_text" = "— New waveform visualizations for voice messages\n— Sticker suggestions when you type an emoji"; +"lng_new_version_text" = "— Adaptive layout for wide screens switch added to Settings\n— Linux version crash fix"; "lng_menu_insert_unicode" = "Insert Unicode control character"; diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index 364c5849a88bd1..f9ea8f55ec69fc 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -525,7 +525,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_profile_migrate_reached" = "Limit von {count:_not_used_|# Mitglied|# Mitgliedern} erreicht"; "lng_profile_migrate_about" = "Für weitere Funktionen und um das Limit aufzuheben in Supergruppe ändern:"; -"lng_profile_migrate_feature1" = "— Bis zu {count:_not_used_|# Mitglied|# ;Mitglieder} sind nun möglich"; +"lng_profile_migrate_feature1" = "— Bis zu {count:_not_used_|# Mitglied|# Mitglieder} sind nun möglich"; "lng_profile_migrate_feature2" = "— Neue Mitglieder sehen gesamten Verlauf"; "lng_profile_migrate_feature3" = "— Admins können alle Nachrichten löschen"; "lng_profile_migrate_feature4" = "— Mitteilungen sind standardmäßig stumm"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index c1d8564f623d32..fac88aef7ad537 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -33,7 +33,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_open_from_tray" = "Apri Telegram"; "lng_minimize_to_tray" = "Riduci a icona"; "lng_quit_from_tray" = "Chiudi Telegram"; -"lng_tray_icon_text" = "Telegram è ancora attivo qui,\npuoi cambiarlo nelle impostazioni.\nSe l'icona scompare dall'area di notifica,\npuoi ripristinarla dalle icone nascoste."; +"lng_tray_icon_text" = "Telegram è ancora attivo qui,\npuoi cambiarlo nelle impostazioni.\nSe l'icona scompare dall'area di notifica,\npuoi trascinarla qui dalle icone nascoste."; "lng_month1" = "Gennaio"; "lng_month2" = "Febbraio"; @@ -276,7 +276,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_download_path_dir_radio" = "Cartella personalizzata, pulita a mano"; "lng_download_path_choose" = "Scegli il percorso di download"; "lng_sure_clear_downloads" = "Vuoi eliminare tutti i file scaricati nella cartella temporanea? Sarà fatto automaticamente alla disconnessione o alla disinstallazione del programma"; -"lng_download_path_failed" = "Il download del file non può iniziare. Potrebbe accadere a causa di un'errata posizione di download.\n\nPuoi cambiare il percorso di download nelle Impostazioni."; +"lng_download_path_failed" = "Il download del file non può iniziare. La causa potrebbe essere una posizione sbagliata per i download.\n\nPuoi cambiare il percorso di download nelle Impostazioni."; "lng_download_path_settings" = "Impostazioni"; "lng_download_finish_failed" = "Il download del file non può essere concluso.\n\nVuoi riprovare?"; "lng_download_path_clearing" = "Eliminazione.."; diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index f00799cf63d41d..ad6c8473a596a4 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -560,8 +560,9 @@ void OverviewInner::dragActionFinish(const QPoint &screenPos, Qt::MouseButton bu } } if (needClick) { - needClick->onClick(button); + DEBUG_LOG(("Will click link: %1 (%2) %3").arg(needClick->text()).arg(needClick->readable()).arg(needClick->encoded())); dragActionCancel(); + App::activateTextLink(needClick, button); return; } if (_dragAction == PrepareSelect && !needClick && !_dragWasInactive && !_selected.isEmpty() && _selected.cbegin().value() == FullSelection) { From fb0f2971c0cb7e6e9694539e102a6a2878f3bff2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 16:00:46 +0300 Subject: [PATCH 083/133] fixed some possible crashes, fixed copy selected text to clipboard --- Telegram/SourceFiles/apiwrap.cpp | 4 +++- Telegram/SourceFiles/application.cpp | 4 +++- Telegram/SourceFiles/dialogswidget.cpp | 2 ++ Telegram/SourceFiles/historywidget.cpp | 8 ++++---- Telegram/SourceFiles/profilewidget.cpp | 18 ++++++++++-------- Telegram/SourceFiles/structs.cpp | 22 ++++++++++++---------- Telegram/SourceFiles/window.cpp | 2 +- 7 files changed, 35 insertions(+), 25 deletions(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index ac903405903945..e529b1f74d1f5e 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -346,7 +346,9 @@ void ApiWrap::gotUserFull(PeerData *peer, const MTPUserFull &result, mtpRequestI App::feedUsers(MTP_vector(1, d.vuser), false); App::feedPhoto(d.vprofile_photo); App::feedUserLink(MTP_int(peerToUser(peer->id)), d.vlink.c_contacts_link().vmy_link, d.vlink.c_contacts_link().vforeign_link, false); - App::main()->gotNotifySetting(MTP_inputNotifyPeer(peer->input), d.vnotify_settings); + if (App::main()) { + App::main()->gotNotifySetting(MTP_inputNotifyPeer(peer->input), d.vnotify_settings); + } peer->asUser()->setBotInfo(d.vbot_info); peer->asUser()->blocked = mtpIsTrue(d.vblocked) ? UserIsBlocked : UserIsNotBlocked; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f9c77dfc0f1ac5..b414fdb3997aff 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -925,7 +925,9 @@ void AppClass::checkLocalTime() { void AppClass::onAppStateChanged(Qt::ApplicationState state) { checkLocalTime(); - _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + if (_window) { + _window->updateIsActive((state == Qt::ApplicationActive) ? cOnlineFocusTimeout() : cOfflineBlurTimeout()); + } if (state != Qt::ApplicationActive) { PopupTooltip::Hide(); } diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 889580af448950..fca26a14b19391 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -1366,6 +1366,8 @@ void DialogsInner::selectSkipPage(int32 pixels, int32 direction) { } void DialogsInner::loadPeerPhotos(int32 yFrom) { + if (!parentWidget()) return; + int32 yTo = yFrom + parentWidget()->height() * 5; MTP::clearLoaderPriorities(); if (_state == DefaultState) { diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index a7e5a359582580..35ca99daae0fe3 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -844,10 +844,10 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } else { uint16 symbol, selFrom = (_selected.cbegin().value() >> 16) & 0xFFFF, selTo = _selected.cbegin().value() & 0xFFFF; hasSelected = (selTo > selFrom) ? 1 : 0; - if (_dragItem && _dragItem == App::hoveredItem()) { - QPoint mousePos(mapMouseToItem(mapFromGlobal(_dragPos), _dragItem)); + if (App::mousedItem() && App::mousedItem() == App::hoveredItem()) { + QPoint mousePos(mapMouseToItem(mapFromGlobal(_dragPos), App::mousedItem())); bool afterDragSymbol, uponSymbol; - _dragItem->getSymbol(symbol, afterDragSymbol, uponSymbol, mousePos.x(), mousePos.y()); + App::mousedItem()->getSymbol(symbol, afterDragSymbol, uponSymbol, mousePos.x(), mousePos.y()); if (uponSymbol && symbol >= selFrom && symbol < selTo) { isUponSelected = 1; } @@ -7148,7 +7148,7 @@ void HistoryWidget::drawRecording(Painter &p) { } void HistoryWidget::paintEvent(QPaintEvent *e) { - if (App::wnd() && App::wnd()->contentOverlapped(this, e)) return; + if (!App::main() || (App::wnd() && App::wnd()->contentOverlapped(this, e))) return; Painter p(this); QRect r(e->rect()); diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 313709f181fb58..665ed2b66850d9 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -1077,6 +1077,15 @@ void ProfileInner::mouseReleaseEvent(QMouseEvent *e) { connect(box, SIGNAL(confirmed()), this, SLOT(onKickConfirm())); Ui::showLayer(box); } + + _kickDown = 0; + if (!_photoLink && (_peerUser || (_peerChat && !_peerChat->canEdit()) || (_peerChannel && !_amCreator))) { + setCursor((_kickOver || _kickDown || textlnkOver()) ? style::cur_pointer : style::cur_default); + } else { + setCursor((_kickOver || _kickDown || _photoOver || textlnkOver()) ? style::cur_pointer : style::cur_default); + } + update(); + if (textlnkDown()) { TextLinkPtr lnk = textlnkDown(); textlnkDown(TextLinkPtr()); @@ -1087,17 +1096,10 @@ void ProfileInner::mouseReleaseEvent(QMouseEvent *e) { if (reBotCommand().match(lnk->encoded()).hasMatch()) { Ui::showPeerHistory(_peer, ShowAtTheEndMsgId); } - lnk->onClick(e->button()); + App::activateTextLink(lnk, e->button()); } } } - _kickDown = 0; - if (!_photoLink && (_peerUser || (_peerChat && !_peerChat->canEdit()) || (_peerChannel && !_amCreator))) { - setCursor((_kickOver || _kickDown || textlnkOver()) ? style::cur_pointer : style::cur_default); - } else { - setCursor((_kickOver || _kickDown || _photoOver || textlnkOver()) ? style::cur_pointer : style::cur_default); - } - update(); } void ProfileInner::onKickConfirm() { diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 3803850684f84f..1c05b266ab1fe9 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -688,11 +688,12 @@ void PhotoCancelLink::onClick(Qt::MouseButton button) const { if (!data->date) return; if (data->uploading()) { - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - if (HistoryMessage *msg = item->toHistoryMessage()) { - if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast(msg->getMedia())->photo() == data) { - App::contextItem(item); - App::main()->deleteLayer(-2); + if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) { + if (HistoryMessage *msg = item->toHistoryMessage()) { + if (msg->getMedia() && msg->getMedia()->type() == MediaTypePhoto && static_cast(msg->getMedia())->photo() == data) { + App::contextItem(item); + App::main()->deleteLayer(-2); + } } } } else { @@ -964,11 +965,12 @@ void DocumentCancelLink::onClick(Qt::MouseButton button) const { if (!data->date) return; if (data->uploading()) { - HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0); - if (HistoryMessage *msg = item->toHistoryMessage()) { - if (msg->getMedia() && msg->getMedia()->getDocument() == data) { - App::contextItem(item); - App::main()->deleteLayer(-2); + if (HistoryItem *item = App::hoveredLinkItem() ? App::hoveredLinkItem() : (App::contextItem() ? App::contextItem() : 0)) { + if (HistoryMessage *msg = item->toHistoryMessage()) { + if (msg->getMedia() && msg->getMedia()->getDocument() == data) { + App::contextItem(item); + App::main()->deleteLayer(-2); + } } } } else { diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 52f823b27eda6a..1209ffc3e070ab 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -2730,7 +2730,7 @@ void LastCrashedWindow::onUpdateFailed() { void LastCrashedWindow::onContinue() { if (SignalHandlers::restart() == SignalHandlers::CantOpen) { new NotStartedWindow(); - } else { + } else if (!Global::started()) { Sandbox::launch(); } close(); From fc9d75b4f01fed32f3b4d5827ac47c5724ea5787 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 17:27:54 +0300 Subject: [PATCH 084/133] adaptive layout checkbox added to settings --- Telegram/SourceFiles/facades.cpp | 2 ++ Telegram/SourceFiles/facades.h | 3 ++- Telegram/SourceFiles/historywidget.cpp | 1 + Telegram/SourceFiles/localstorage.cpp | 9 +++++++ Telegram/SourceFiles/settingswidget.cpp | 36 +++++++++++++++++++++++-- Telegram/SourceFiles/settingswidget.h | 5 +++- Telegram/SourceFiles/types.h | 1 + 7 files changed, 53 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/facades.cpp b/Telegram/SourceFiles/facades.cpp index e6b3c22f0ae5ff..4ddf6aa6b44654 100644 --- a/Telegram/SourceFiles/facades.cpp +++ b/Telegram/SourceFiles/facades.cpp @@ -348,6 +348,7 @@ namespace Sandbox { struct GlobalDataStruct { uint64 LaunchId = 0; Adaptive::Layout AdaptiveLayout = Adaptive::NormalLayout; + bool AdaptiveForWide = true; }; GlobalDataStruct *GlobalData = 0; @@ -370,5 +371,6 @@ namespace Global { DefineReadOnlyVar(Global, uint64, LaunchId); DefineVar(Global, Adaptive::Layout, AdaptiveLayout); + DefineVar(Global, bool, AdaptiveForWide); }; diff --git a/Telegram/SourceFiles/facades.h b/Telegram/SourceFiles/facades.h index 328773f2de4119..5d54267d5403dd 100644 --- a/Telegram/SourceFiles/facades.h +++ b/Telegram/SourceFiles/facades.h @@ -139,6 +139,7 @@ namespace Global { DeclareReadOnlyVar(uint64, LaunchId); DeclareVar(Adaptive::Layout, AdaptiveLayout); + DeclareVar(bool, AdaptiveForWide); }; @@ -150,6 +151,6 @@ namespace Adaptive { return Global::AdaptiveLayout() == NormalLayout; } inline bool Wide() { - return Global::AdaptiveLayout() == WideLayout; + return Global::AdaptiveForWide() && (Global::AdaptiveLayout() == WideLayout); } } diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 35ca99daae0fe3..e0883fe375bf48 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -4690,6 +4690,7 @@ void HistoryWidget::doneShow() { void HistoryWidget::updateAdaptiveLayout() { _sideShadow.setVisible(!Adaptive::OneColumn()); + update(); } void HistoryWidget::animStop() { diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index da64f2cb96fa35..bc7757d133a5a1 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -1121,6 +1121,14 @@ namespace { } } break; + case dbiAdaptiveForWide: { + qint32 v; + stream >> v; + if (!_checkStreamStatus(stream)) return false; + + Global::SetAdaptiveForWide(v == 1); + } break; + case dbiAutoLock: { qint32 v; stream >> v; @@ -1506,6 +1514,7 @@ namespace { EncryptedDescriptor data(size); data.stream << quint32(dbiSendKey) << qint32(cCtrlEnter() ? dbiskCtrlEnter : dbiskEnter); data.stream << quint32(dbiTileBackground) << qint32(cTileBackground() ? 1 : 0); + data.stream << quint32(dbiAdaptiveForWide) << qint32(Global::AdaptiveForWide() ? 1 : 0); data.stream << quint32(dbiAutoLock) << qint32(cAutoLock()); data.stream << quint32(dbiReplaceEmojis) << qint32(cReplaceEmojis() ? 1 : 0); data.stream << quint32(dbiDefaultAttach) << qint32(cDefaultAttach()); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index 36c4fa1df08a19..89e0925c5eb3fb 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -187,6 +187,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) , _backFromGallery(this, lang(lng_settings_bg_from_gallery)) , _backFromFile(this, lang(lng_settings_bg_from_file)) , _tileBackground(this, lang(lng_settings_bg_tile), cTileBackground()) +, _adaptiveForWide(this, lang(lng_settings_adaptive_wide), Global::AdaptiveForWide()) , _needBackgroundUpdate(false) // advanced @@ -310,6 +311,7 @@ SettingsInner::SettingsInner(SettingsWidget *parent) : TWidget(parent) connect(&_backFromGallery, SIGNAL(clicked()), this, SLOT(onBackFromGallery())); connect(&_backFromFile, SIGNAL(clicked()), this, SLOT(onBackFromFile())); connect(&_tileBackground, SIGNAL(changed()), this, SLOT(onTileBackground())); + connect(&_adaptiveForWide, SIGNAL(changed()), this, SLOT(onAdaptiveForWide())); // advanced connect(&_passcodeEdit, SIGNAL(clicked()), this, SLOT(onPasscode())); @@ -635,6 +637,10 @@ void SettingsInner::paintEvent(QPaintEvent *e) { top += st::setBackgroundSize; top += st::setLittleSkip; top += _tileBackground.height(); + if (Global::AdaptiveLayout() == Adaptive::WideLayout) { + top += st::setLittleSkip; + top += _adaptiveForWide.height(); + } } // advanced @@ -753,6 +759,10 @@ void SettingsInner::resizeEvent(QResizeEvent *e) { top += st::setLittleSkip; _tileBackground.move(_left, top); top += _tileBackground.height(); + if (Global::AdaptiveLayout() == Adaptive::WideLayout) { + top += st::setLittleSkip; + _adaptiveForWide.move(_left, top); top += _adaptiveForWide.height(); + } } // advanced @@ -855,6 +865,11 @@ void SettingsInner::mousePressEvent(QMouseEvent *e) { void SettingsInner::contextMenuEvent(QContextMenuEvent *e) { } +void SettingsInner::updateAdaptiveLayout() { + showAll(); + resizeEvent(0); +} + void SettingsInner::step_photo(float64 ms, bool timer) { float64 dt = ms / st::setPhotoDuration; if (dt >= 1) { @@ -1093,10 +1108,16 @@ void SettingsInner::showAll() { _backFromGallery.show(); _backFromFile.show(); _tileBackground.show(); + if (Global::AdaptiveLayout() == Adaptive::WideLayout) { + _adaptiveForWide.show(); + } else { + _adaptiveForWide.hide(); + } } else { _backFromGallery.hide(); _backFromFile.hide(); _tileBackground.hide(); + _adaptiveForWide.hide(); } // advanced @@ -1628,6 +1649,16 @@ void SettingsInner::onTileBackground() { } } +void SettingsInner::onAdaptiveForWide() { + if (Global::AdaptiveForWide() != _adaptiveForWide.checked()) { + Global::SetAdaptiveForWide(_adaptiveForWide.checked()); + if (App::wnd()) { + App::wnd()->updateAdaptiveLayout(); + } + Local::writeUserSettings(); + } +} + void SettingsInner::onDontAskDownloadPath() { cSetAskDownloadPath(!_dontAskDownloadPath.checked()); Local::writeUserSettings(); @@ -1898,10 +1929,11 @@ void SettingsWidget::updateAdaptiveLayout() { } else { _close.show(); } + _inner.updateAdaptiveLayout(); + resizeEvent(0); } -void SettingsWidget::updateDisplayNotify() -{ +void SettingsWidget::updateDisplayNotify() { _inner.enableDisplayNotify(cDesktopNotify()); } diff --git a/Telegram/SourceFiles/settingswidget.h b/Telegram/SourceFiles/settingswidget.h index 08499ca60d58ca..65e222fcb39d58 100644 --- a/Telegram/SourceFiles/settingswidget.h +++ b/Telegram/SourceFiles/settingswidget.h @@ -71,6 +71,8 @@ class SettingsInner : public TWidget, public RPCSender { void mousePressEvent(QMouseEvent *e); void contextMenuEvent(QContextMenuEvent *e); + void updateAdaptiveLayout(); + void step_photo(float64 ms, bool timer); void updateSize(int32 newWidth); @@ -156,6 +158,7 @@ public slots: void onBackFromGallery(); void onBackFromFile(); void onTileBackground(); + void onAdaptiveForWide(); void onLocalStorageClear(); @@ -273,7 +276,7 @@ public slots: // chat background QPixmap _background; LinkButton _backFromGallery, _backFromFile; - FlatCheckbox _tileBackground; + FlatCheckbox _tileBackground, _adaptiveForWide; bool _needBackgroundUpdate; // advanced diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index b93bf822d3dcc2..99f12ef31cedc8 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -352,6 +352,7 @@ enum DataBlockId { dbiSavedGifsLimit = 0x35, dbiShowingSavedGifs = 0x36, dbiAutoPlay = 0x37, + dbiAdaptiveForWide = 0x38, dbiEncryptedWithSalt = 333, dbiEncrypted = 444, From 23a8090a7337ce75ee01baf4df586d0409cd1ba4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 17:45:07 +0300 Subject: [PATCH 085/133] static linked openssl in Qt, gobject dynamic linked, moved gtk/appindicator init after Qt Application creation, trying to enable rdynamic flag --- QTCREATOR.md | 13 +++++++++- Telegram/Build.sh | 4 +-- Telegram/FixMake.sh | 9 ++++--- Telegram/SourceFiles/pspecific.h | 5 ++++ Telegram/SourceFiles/pspecific_linux.cpp | 31 ++++++++++++++---------- Telegram/SourceFiles/pspecific_mac.cpp | 8 ++++++ Telegram/SourceFiles/pspecific_wnd.cpp | 8 ++++++ Telegram/SourceFiles/types.cpp | 4 +++ Telegram/Telegram.pro | 6 ++--- 9 files changed, 65 insertions(+), 23 deletions(-) diff --git a/QTCREATOR.md b/QTCREATOR.md index 9576e30dd575ef..28184888b9fb33 100644 --- a/QTCREATOR.md +++ b/QTCREATOR.md @@ -101,6 +101,17 @@ then go to **/home/user/TBuild/Libraries/openal-soft/build** and run make sudo make install +####OpenSSL + +In Terminal go to **/home/user/TBuild/Libraries** and run + + git clone https://github.com/openssl/openssl + cd openssl + git checkout OpenSSL_1_0_1-stable + ./config + make + sudo make install + ####libxkbcommon (required for Fcitx Qt plugin) In Terminal go to **/home/user/TBuild/Libraries** and run @@ -136,7 +147,7 @@ Install some packages for Qt (see **/home/user/TBuild/Libraries/QtStatic/qtbase/ In Terminal go to **/home/user/TBuild/Libraries/QtStatic** and there run - ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests + OPENSSL_LIBS='/usr/local/ssl/lib/libssl.a /usr/local/ssl/lib/libcrypto.a' ./configure -release -opensource -confirm-license -qt-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb -qt-xkbcommon-x11 -no-opengl -static -openssl-linked -nomake examples -nomake tests make -j4 sudo make -j4 install diff --git a/Telegram/Build.sh b/Telegram/Build.sh index f7a64597ffa33e..615639257f33d5 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -111,14 +111,14 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then mkdir -p "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater" - /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" + /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Updater.pro" -r -spec linux-g++ make echo "Updater build complete!" cd "$HomePath" mkdir -p "$WorkPath/ReleaseIntermediate" cd "$WorkPath/ReleaseIntermediate" - /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" + /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++ eval "$FixScript" make echo "Telegram build complete!" diff --git a/Telegram/FixMake.sh b/Telegram/FixMake.sh index e03c47d215baf3..a92840e7c1e6e6 100755 --- a/Telegram/FixMake.sh +++ b/Telegram/FixMake.sh @@ -11,10 +11,10 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' -Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' -Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' -Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' -Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a' +#Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' +#Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' +#Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' +Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a \/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a' Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' Replace '\-lfontconfig' '\/usr\/lib\/x86_64\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/x86_64\-linux\-gnu\/libexpat\.a' @@ -28,3 +28,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a' Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lva' '\/usr\/local\/lib\/libva\.a' +Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a' diff --git a/Telegram/SourceFiles/pspecific.h b/Telegram/SourceFiles/pspecific.h index 98c84114660588..7362f15da0ea0b 100644 --- a/Telegram/SourceFiles/pspecific.h +++ b/Telegram/SourceFiles/pspecific.h @@ -43,4 +43,9 @@ namespace PlatformSpecific { ~Initializer(); }; + namespace ThirdParty { + void start(); + void finish(); + } + } diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 6b1e982da9d4b0..3ee28e7741a11d 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -752,9 +752,6 @@ void PsMainWindow::psUpdatedPosition() { void PsMainWindow::psCreateTrayIcon() { if (!noQtTrayIcon) { cSetSupportTray(QSystemTrayIcon::isSystemTrayAvailable()); - if (!noTryUnity) { - useUnityCount = false; - } return; } @@ -1241,16 +1238,6 @@ void psShowInFolder(const QString &name) { namespace PlatformSpecific { Initializer::Initializer() { - QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); - noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); - tryAppIndicator = (cdesktop == qstr("xfce")); - noTryUnity = (cdesktop != qstr("unity")); - - if (noQtTrayIcon) cSetSupportTray(false); - - DEBUG_LOG(("Loading libraries")); - setupGtk(); - setupUnity(); } Initializer::~Initializer() { @@ -1258,6 +1245,24 @@ namespace PlatformSpecific { _psEventFilter = 0; } + namespace ThirdParty { + void start() { + QString cdesktop = QString(getenv("XDG_CURRENT_DESKTOP")).toLower(); + noQtTrayIcon = (cdesktop == qstr("pantheon")) || (cdesktop == qstr("gnome")); + tryAppIndicator = (cdesktop == qstr("xfce")); + noTryUnity = (cdesktop != qstr("unity")); + + if (noQtTrayIcon) cSetSupportTray(false); + + DEBUG_LOG(("Loading libraries")); + setupGtk(); + setupUnity(); + } + + void finish() { + } + } + } namespace { diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 84349d6160e61c..9d9c66cc03aecd 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -861,6 +861,14 @@ namespace PlatformSpecific { objc_finish(); } + namespace ThirdParty { + void start() { + } + + void finish() { + } + } + } void psNewVersion() { diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 044827de67dbd6..dc8b32d6033725 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2170,6 +2170,14 @@ namespace PlatformSpecific { } } + namespace ThirdParty { + void start() { + } + + void finish() { + } + } + } namespace { diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 706cae9c472fb2..ce77262ae43358 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -267,6 +267,8 @@ namespace { namespace ThirdParty { void start() { + PlatformSpecific::ThirdParty::start(); + if (!RAND_status()) { // should be always inited in all modern OS char buf[16]; memcpy(buf, &_msStart, 8); @@ -303,6 +305,8 @@ namespace ThirdParty { delete[] _sslLocks; _sslLocks = 0; + + PlatformSpecific::ThirdParty::finish(); } } diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 408bd819048c8d..4ff476e8b3aa68 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -288,10 +288,10 @@ CONFIG(release, debug|release) { QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE += -Ofast -flto -fno-strict-aliasing -g QMAKE_LFLAGS_RELEASE -= -O1 - QMAKE_LFLAGS_RELEASE += -Ofast -flto -g + QMAKE_LFLAGS_RELEASE += -Ofast -flto -g -rdynamic } CONFIG(debug, debug|release) { - QMAKE_LFLAGS_DEBUG += -g + QMAKE_LFLAGS_DEBUG += -g -rdynamic } INCLUDEPATH += ./../../Libraries/QtStatic/qtbase/include/QtGui/5.5.1/QtGui\ @@ -319,7 +319,7 @@ INCLUDEPATH += "/usr/include/atk-1.0" INCLUDEPATH += "/usr/include/dee-1.0" INCLUDEPATH += "/usr/include/libdbusmenu-glib-0.4" -LIBS += -lcrypto -lssl -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva +LIBS += -ldl -llzma -lopenal -lavformat -lavcodec -lswresample -lswscale -lavutil -lopus -lva LIBS += ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libibusplatforminputcontextplugin.a \ ./../../../Libraries/QtStatic/qtbase/plugins/platforminputcontexts/libfcitxplatforminputcontextplugin.a From 90d104cf6135db5e24481d1087d04bf719289178 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 17:54:00 +0300 Subject: [PATCH 086/133] version 0.9.25 dev --- Telegram/FixMake.sh | 3 --- Telegram/FixMake32.sh | 4 +--- Telegram/SourceFiles/application.cpp | 5 ++--- Telegram/SourceFiles/config.h | 6 +++--- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 8 ++++---- 8 files changed, 21 insertions(+), 27 deletions(-) diff --git a/Telegram/FixMake.sh b/Telegram/FixMake.sh index a92840e7c1e6e6..74b2c6b0369bed 100755 --- a/Telegram/FixMake.sh +++ b/Telegram/FixMake.sh @@ -11,9 +11,6 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/x86_64\-linux\-gnu\/liblzma\.a' -#Replace '\-lssl' '\/usr\/lib\/x86_64\-linux\-gnu\/libssl\.a' -#Replace '\-lcrypto' '\/usr\/lib\/x86_64\-linux\-gnu\/libcrypto\.a' -#Replace '\-lgobject\-2\.0' '\/usr\/lib\/x86_64\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/x86_64\-linux\-gnu\/libffi\.a' Replace '\-lXi' '\/usr\/lib\/x86_64\-linux\-gnu\/libXi\.a \/usr\/lib\/x86_64\-linux\-gnu\/libXext\.a' Replace '\-lSM' '\/usr\/lib\/x86_64\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/x86_64\-linux\-gnu\/libICE\.a' diff --git a/Telegram/FixMake32.sh b/Telegram/FixMake32.sh index b3a601925c8048..0f17f8bc10a856 100755 --- a/Telegram/FixMake32.sh +++ b/Telegram/FixMake32.sh @@ -11,9 +11,6 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a' -Replace '\-lssl' '\/usr\/lib\/i386\-linux\-gnu\/libssl\.a' -Replace '\-lcrypto' '\/usr\/lib\/i386\-linux\-gnu\/libcrypto\.a' -Replace '\-lgobject\-2\.0' '\/usr\/lib\/i386\-linux\-gnu\/libgobject\-2\.0\.a \/usr\/lib\/i386\-linux\-gnu\/libffi\.a' Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a' Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/i386\-linux\-gnu\/libICE\.a' @@ -28,3 +25,4 @@ Replace '\-lswresample' '\/usr\/local\/lib\/libswresample\.a' Replace '\-lswscale' '\/usr\/local\/lib\/libswscale\.a' Replace '\-lavutil' '\/usr\/local\/lib\/libavutil\.a' Replace '\-lva' '\/usr\/local\/lib\/libva\.a' +Replace '\-lQt5Network' '\/usr\/local\/Qt-5.5.1\/lib\/libQt5Network.a \/usr\/local\/ssl\/lib\/libssl.a \/usr\/local\/ssl\/lib\/libcrypto.a' diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index b414fdb3997aff..f507c4492ab371 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1053,9 +1053,8 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9024) { -// versionFeatures = QString::fromUtf8("\xe2\x80\x94 Voice messages waveform visualizations\n\xe2\x80\x94 Bug fixes and other minor improvements");// .replace('@', qsl("@") + QChar(0x200D)); - versionFeatures = lang(lng_new_version_minor).trimmed(); + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9025) { + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Adaptive layout for wide screens switch added to Settings\n\xe2\x80\x94 Linux version crash fix");// .replace('@', qsl("@") + QChar(0x200D)); } else if (Local::oldMapVersion() < 9024) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index e8981faaeee9fc..1f6fd6588e42c3 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,9 +20,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9024; -static const wchar_t *AppVersionStr = L"0.9.24"; -static const bool DevVersion = false; +static const int32 AppVersion = 9025; +static const wchar_t *AppVersionStr = L"0.9.25"; +static const bool DevVersion = true; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 48739e2a3e9a24..789cf25856c85f 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.24 + 0.9.25 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index a73c381b165a26..04b48ea0380c49 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,24,0 - PRODUCTVERSION 0,9,24,0 + FILEVERSION 0,9,25,0 + PRODUCTVERSION 0,9,25,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.24.0" + VALUE "FileVersion", "0.9.25.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.24.0" + VALUE "ProductVersion", "0.9.25.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 90ee768992e33b..ba4d36601deedd 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.24; + CURRENT_PROJECT_VERSION = 0.9.25; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.24; + CURRENT_PROJECT_VERSION = 0.9.25; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.24; + CURRENT_PROJECT_VERSION = 0.9.25; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.24; + DYLIB_CURRENT_VERSION = 0.9.25; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.24; + CURRENT_PROJECT_VERSION = 0.9.25; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.24; + DYLIB_CURRENT_VERSION = 0.9.25; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index 5108f1ff6f0085..ba8449dac8b5cb 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9024 +AppVersion 9025 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.24 -AppVersionStr 0.9.24 -DevChannel 0 +AppVersionStrSmall 0.9.25 +AppVersionStr 0.9.25 +DevChannel 1 BetaVersion 0 9019002 From 4716c258756e65eecb8cda9f2497c0b1854467eb Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 21 Feb 2016 18:41:17 +0300 Subject: [PATCH 087/133] build script for linux32 fixed, 0.9.25 dev --- Telegram/FixMake32.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/FixMake32.sh b/Telegram/FixMake32.sh index 0f17f8bc10a856..24d5e677f9a223 100755 --- a/Telegram/FixMake32.sh +++ b/Telegram/FixMake32.sh @@ -11,7 +11,7 @@ Replace () { } Replace '\-llzma' '\/usr\/lib\/i386\-linux\-gnu\/liblzma\.a' -Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a' +Replace '\-lXi' '\/usr\/lib\/i386\-linux\-gnu\/libXi\.a \/usr\/lib\/i386\-linux\-gnu\/libXext\.a' Replace '\-lSM' '\/usr\/lib\/i386\-linux\-gnu\/libSM\.a' Replace '\-lICE' '\/usr\/lib\/i386\-linux\-gnu\/libICE\.a' Replace '\-lfontconfig' '\/usr\/lib\/i386\-linux\-gnu\/libfontconfig\.a \/usr\/lib\/i386\-linux\-gnu\/libexpat\.a' From 640587665632025035dd3cd5a94f433f67db568e Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Thu, 18 Feb 2016 21:09:30 -0300 Subject: [PATCH 088/133] Document how to build via qmake Signed-off-by: Hugo Osvaldo Barrera (github: hobarrera) --- doc/building-qmake.md | 130 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 doc/building-qmake.md diff --git a/doc/building-qmake.md b/doc/building-qmake.md new file mode 100644 index 00000000000000..37f091331eac53 --- /dev/null +++ b/doc/building-qmake.md @@ -0,0 +1,130 @@ +Building via qmake +================== + +The following commands assume the following environment variables are set: + + * `$srcdir`: The directory into which the source has been downloaded and + unpacked. + * `_qtver`: The Qt version being used (eg: `5.5.1`). + * `$pkgdir`: The directory into which installable files are places. This is + `/` for local installations, or can be different directory when preparing a + redistributable package. + +Either set them accordingly, or replace them in the below commands as desired. + +The following sources should be downloaded and unpacked into `$srcdir`: + + * This repository (either `master` or a specific tag). + * The Qt sources: `http://download.qt-project.org/official_releases/qt/${_qtver%.*}/$_qtver/single/qt-everywhere-opensource-src-$_qtver.tar.xz` + * `git clone git+https://chromium.googlesource.com/breakpad/breakpad breakpad` + * `git clone git+https://chromium.googlesource.com/linux-syscall-support breakpad-lss` + * telegramdesktop.desktop (The intention is to include this file inside the + source package at some point): + `https://aur.archlinux.org/cgit/aur.git/plain/telegramdesktop.desktop?h=telegram-desktop` + * tg.protocol: `https://aur.archlinux.org/cgit/aur.git/plain/tg.protocol?h=telegram-desktop` + +Preparation +----------- + + cd "$srcdir/tdesktop" + + mkdir -p "$srcdir/Libraries" + + local qt_patch_file="$srcdir/tdesktop/Telegram/_qtbase_${_qtver//./_}_patch.diff" + if [ "$qt_patch_file" -nt "$srcdir/Libraries/QtStatic" ]; then + rm -rf "$srcdir/Libraries/QtStatic" + mv "$srcdir/qt-everywhere-opensource-src-$_qtver" "$srcdir/Libraries/QtStatic" + cd "$srcdir/Libraries/QtStatic/qtbase" + patch -p1 -i "$qt_patch_file" + fi + + if [ ! -h "$srcdir/Libraries/breakpad" ]; then + ln -s "$srcdir/breakpad" "$srcdir/Libraries/breakpad" + ln -s "$srcdir/breakpad-lss" "$srcdir/Libraries/breakpad/src/third_party/lss" + fi + + sed -i 's/CUSTOM_API_ID//g' "$srcdir/tdesktop/Telegram/Telegram.pro" + sed -i 's,LIBS += /usr/local/lib/libxkbcommon.a,,g' "$srcdir/tdesktop/Telegram/Telegram.pro" + sed -i 's,LIBS += /usr/local/lib/libz.a,LIBS += -lz,g' "$srcdir/tdesktop/Telegram/Telegram.pro" + + ( + echo "DEFINES += TDESKTOP_DISABLE_AUTOUPDATE" + echo "DEFINES += TDESKTOP_DISABLE_REGISTER_CUSTOM_SCHEME" + echo 'INCLUDEPATH += "/usr/lib/glib-2.0/include"' + echo 'INCLUDEPATH += "/usr/lib/gtk-2.0/include"' + echo 'INCLUDEPATH += "/usr/include/opus"' + ) >> "$srcdir/tdesktop/Telegram/Telegram.pro" + +Building +-------- + + + # Build patched Qt + cd "$srcdir/Libraries/QtStatic" + ./configure -prefix "$srcdir/qt" -release -opensource -confirm-license -qt-zlib \ + -qt-libpng -qt-libjpeg -qt-freetype -qt-harfbuzz -qt-pcre -qt-xcb \ + -qt-xkbcommon-x11 -no-opengl -static -nomake examples -nomake tests + make module-qtbase module-qtimageformats + make module-qtbase-install_subtargets module-qtimageformats-install_subtargets + + export PATH="$srcdir/qt/bin:$PATH" + + # Build breakpad + cd "$srcdir/Libraries/breakpad" + ./configure + make + + # Build MetaStyle + mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateStyle" + cd "$srcdir/tdesktop/Linux/DebugIntermediateStyle" + qmake CONFIG+=debug "../../Telegram/MetaStyle.pro" + make + + # Build MetaLang + mkdir -p "$srcdir/tdesktop/Linux/DebugIntermediateLang" + cd "$srcdir/tdesktop/Linux/DebugIntermediateLang" + qmake CONFIG+=debug "../../Telegram/MetaLang.pro" + make + + # Build Telegram Desktop + mkdir -p "$srcdir/tdesktop/Linux/ReleaseIntermediate" + cd "$srcdir/tdesktop/Linux/ReleaseIntermediate" + + qmake CONFIG+=release "../../Telegram/Telegram.pro" + local pattern="^PRE_TARGETDEPS +=" + grep "$pattern" "$srcdir/tdesktop/Telegram/Telegram.pro" | sed "s/$pattern//g" | xargs make + + qmake CONFIG+=release "../../Telegram/Telegram.pro" + make + +Installation +------------ + + + install -dm755 "$pkgdir/usr/bin" + install -m755 "$srcdir/tdesktop/Linux/Release/Telegram" "$pkgdir/usr/bin/telegram-desktop" + + install -d "$pkgdir/usr/share/applications" + install -m644 "$srcdir/telegramdesktop.desktop" "$pkgdir/usr/share/applications/telegramdesktop.desktop" + + install -d "$pkgdir/usr/share/kde4/services" + install -m644 "$srcdir/tg.protocol" "$pkgdir/usr/share/kde4/services/tg.protocol" + + local icon_size icon_dir + for icon_size in 16 32 48 64 128 256 512; do + icon_dir="$pkgdir/usr/share/icons/hicolor/${icon_size}x${icon_size}/apps" + + install -d "$icon_dir" + install -m644 "$srcdir/tdesktop/Telegram/SourceFiles/art/icon${icon_size}.png" "$icon_dir/telegram-desktop.png" + done + +Notes +----- + +These instructions are based on the [ArchLinux package][arch-package] for +telegram-desktop. + +In case these instructions are at some point out of date, the above may serve +as an update reference. + +[arch-package]: https://aur.archlinux.org/packages/telegram-desktop/ From 0315568b80676906481948ee84d1e237460bf8f3 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Thu, 18 Feb 2016 21:23:23 -0300 Subject: [PATCH 089/133] Link to qmake documentation in the README Signed-off-by: Hugo Osvaldo Barrera (github: hobarrera) --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index be9a15977402a4..3c891840dda842 100644 --- a/README.md +++ b/README.md @@ -33,6 +33,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is * [XCode 7][xcode] * [XCode 7 for OS X 10.6 and 10.7][xcode_old] * [Qt Creator 3.5.1 Ubuntu][qtcreator] +* [Using qmake on GNU/Linux][qmake] ## Projects in Telegram solution @@ -93,3 +94,4 @@ The source code is published under GPLv3 with OpenSSL exception, the license is [xcode]: XCODE.md [xcode_old]: XCODEold.md [qtcreator]: QTCREATOR.md +[qmake]: doc/building-qmake.md From 3546fe421c09e2811d18186e5281baee044e4849 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Thu, 18 Feb 2016 21:23:43 -0300 Subject: [PATCH 090/133] Move all build documentation into /doc Signed-off-by: Hugo Osvaldo Barrera (github: hobarrera) --- README.md | 8 ++++---- MSVC.md => doc/building-msvc.md | 0 QTCREATOR.md => doc/building-qtcreator.md | 0 XCODEold.md => doc/building-xcode-old.md | 0 XCODE.md => doc/building-xcode.md | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename MSVC.md => doc/building-msvc.md (100%) rename QTCREATOR.md => doc/building-qtcreator.md (100%) rename XCODEold.md => doc/building-xcode-old.md (100%) rename XCODE.md => doc/building-xcode.md (100%) diff --git a/README.md b/README.md index 3c891840dda842..4f9b406f713b3b 100644 --- a/README.md +++ b/README.md @@ -90,8 +90,8 @@ The source code is published under GPLv3 with OpenSSL exception, the license is [telegram_api]: https://core.telegram.org [telegram_proto]: https://core.telegram.org/mtproto [license]: LICENSE -[msvc]: MSVC.md -[xcode]: XCODE.md -[xcode_old]: XCODEold.md -[qtcreator]: QTCREATOR.md +[msvc]: doc/building-msvc.md +[xcode]: doc/building-xcode.md +[xcode_old]: doc/building-xcode-old.md +[qtcreator]: doc/building-qtcreator.md [qmake]: doc/building-qmake.md diff --git a/MSVC.md b/doc/building-msvc.md similarity index 100% rename from MSVC.md rename to doc/building-msvc.md diff --git a/QTCREATOR.md b/doc/building-qtcreator.md similarity index 100% rename from QTCREATOR.md rename to doc/building-qtcreator.md diff --git a/XCODEold.md b/doc/building-xcode-old.md similarity index 100% rename from XCODEold.md rename to doc/building-xcode-old.md diff --git a/XCODE.md b/doc/building-xcode.md similarity index 100% rename from XCODE.md rename to doc/building-xcode.md From 841daa2a6efa09277f1cfadd0a03dd2a52b5eb2a Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Fri, 19 Feb 2016 18:07:31 -0300 Subject: [PATCH 091/133] Deduplicate links to build instructions Signed-off-by: Hugo Osvaldo Barrera (github: hobarrera) --- CONTRIBUTING.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 435e40e9dc2e15..68c80c0a700443 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,10 +73,8 @@ For more info, see [GitHub Help][help_change_commit_message]. ## Build instructions -* [Visual Studio 2013][msvc] -* [XCode 6.4][xcode] -* [XCode 6.4 for OS X 10.6 and 10.7][xcode_old] -* [Qt Creator 3.2.0 Ubuntu][qtcreator] +See the [readme][README.md#build-instructions] for details on the various build +environments. ## Pull upstream changes into your fork regularly From 7de5e24df538ff6e69a74ed91a5929d0f8acd827 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 22 Feb 2016 10:01:10 +0300 Subject: [PATCH 092/133] adaptive layout starts after 1366px window, langs updated, hiding tooltip on window deactivation --- Telegram/Resources/style.txt | 3 +-- Telegram/SourceFiles/gui/popupmenu.cpp | 8 ++++++++ Telegram/SourceFiles/gui/popupmenu.h | 1 + Telegram/SourceFiles/history.cpp | 8 ++------ Telegram/SourceFiles/langs/lang_de.strings | 3 ++- Telegram/SourceFiles/langs/lang_es.strings | 3 ++- Telegram/SourceFiles/langs/lang_it.strings | 3 ++- Telegram/SourceFiles/langs/lang_ko.strings | 3 ++- Telegram/SourceFiles/langs/lang_nl.strings | 3 ++- Telegram/SourceFiles/langs/lang_pt_BR.strings | 3 ++- Telegram/SourceFiles/window.cpp | 10 ++++------ 11 files changed, 28 insertions(+), 20 deletions(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 5999c47f4f151b..9ee65766406992 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -53,6 +53,7 @@ color8: #ce671b; // orange wndMinWidth: 380px; adaptiveNormalWidth: 640px; +adaptiveWideWidth: 1366px; wndMinHeight: 480px; wndDefWidth: 800px; @@ -1016,8 +1017,6 @@ historyToEndSkip: 10px; activeFadeInDuration: 500; activeFadeOutDuration: 3000; -historyMaxWidth: 720px; - msgRadius: 3px; msgMaxWidth: 430px; diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index 8fb99d7d52ffd4..cad98ebe0d946a 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -539,6 +539,8 @@ PopupTooltip::PopupTooltip() : TWidget(0) _showTimer.setSingleShot(true); connect(&_showTimer, SIGNAL(timeout()), this, SLOT(onShow())); + + connect(App::wnd()->windowHandle(), SIGNAL(activeChanged()), this, SLOT(onWndActiveChanged())); } void PopupTooltip::onShow() { @@ -552,6 +554,12 @@ void PopupTooltip::onShow() { } } +void PopupTooltip::onWndActiveChanged() { + if (!App::wnd()->windowHandle()->isActive()) { + PopupTooltip::Hide(); + } +} + bool PopupTooltip::eventFilter(QObject *o, QEvent *e) { if (e->type() == QEvent::Leave) { _hideByLeaveTimer.start(10); diff --git a/Telegram/SourceFiles/gui/popupmenu.h b/Telegram/SourceFiles/gui/popupmenu.h index caf65492dfe5b3..4d7968bfc96d1f 100644 --- a/Telegram/SourceFiles/gui/popupmenu.h +++ b/Telegram/SourceFiles/gui/popupmenu.h @@ -133,6 +133,7 @@ class PopupTooltip : public TWidget { public slots: void onShow(); + void onWndActiveChanged(); void onHideByLeave(); protected: diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index e64facc5b46f69..574164736fb7d6 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -6197,16 +6197,12 @@ void HistoryMessage::initDimensions() { } void HistoryMessage::countPositionAndSize(int32 &left, int32 &width) const { - int32 maxwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width, hmaxwidth = st::historyMaxWidth; + int32 maxwidth = qMin(int(st::msgMaxWidth), _maxw), hwidth = _history->width; if (_media && _media->currentWidth() < maxwidth) { maxwidth = qMax(_media->currentWidth(), qMin(maxwidth, plainMaxWidth())); } - left = 0; - if (Adaptive::Wide()) { - hwidth = hmaxwidth; - } - left += (!fromChannel() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); + left = (!fromChannel() && out() && !Adaptive::Wide()) ? st::msgMargin.right() : st::msgMargin.left(); if (displayFromPhoto()) { left += st::msgPhotoSkip; // } else if (!Adaptive::Wide() && !out() && !fromChannel() && st::msgPhotoSkip - (hmaxwidth - hwidth) > 0) { diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index f9ea8f55ec69fc..145671347117ea 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Aus der Galerie"; "lng_settings_bg_from_file" = "Durchsuchen"; "lng_settings_bg_tile" = "Nebeneinander"; +"lng_settings_adaptive_wide" = "Flexibles Layout für breite Bildschirme"; "lng_backgrounds_header" = "Neuen Chat-Hintergrund wählen"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}"; "lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen"; -"lng_new_version_text" = "— Neue Optik für Sprachnachrichten\n— Sticker werden nach Emoji-Eingabe vorgeschlagen"; +"lng_new_version_text" = "— Neue Option in den Einstellungen hinzugefügt (\"Flexibles Layout für breite Bildschirme\"), um das Layout bei besonders breiten Bildschirmen zu ändern\n— Abstürze in der Linux-Version behoben"; "lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index 2c0e037f935983..4370b950bc5876 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Elegir desde la galería"; "lng_settings_bg_from_file" = "Elegir desde archivos"; "lng_settings_bg_tile" = "Fondo con mosaico"; +"lng_settings_adaptive_wide" = "Diseño adaptable para pantallas anchas"; "lng_backgrounds_header" = "Elige tu nuevo fondo de chat"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}"; "lng_new_version_minor" = "— Corrección de errores y otras mejoras menores"; -"lng_new_version_text" = "– Nueva visualización de ondas para los mensajes de voz\n– Sugerencias de stickers cuando escribes un emoji"; +"lng_new_version_text" = "— Ajuste para activar o desactivar el diseño adaptable para pantallas anchas \n— Arreglado el cierre inesperado en la versión para Linux"; "lng_menu_insert_unicode" = "Insertar caracteres de control Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index fac88aef7ad537..9babab03f17b18 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Scegli dalla galleria"; "lng_settings_bg_from_file" = "Scegli da file"; "lng_settings_bg_tile" = "Affianca sfondo"; +"lng_settings_adaptive_wide" = "Layout adattivo per grandi schermi"; "lng_backgrounds_header" = "Scegli un nuovo sfondo per la chat"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; "lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori"; -"lng_new_version_text" = "— Nuova visualizzazione delle onde sonore per i messaggi vocali\n— Suggerimento per gli sticker quando digiti un'emoji"; +"lng_new_version_text" = "— Interruttore per il layout adattivo per grandi schermi aggiunto nelle Impostazioni\n— Risoluzione dei crash su Linux"; "lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index 1d401e7e302038..4164413533424e 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "이미지 선택"; "lng_settings_bg_from_file" = "파일 선택"; "lng_settings_bg_tile" = "타일형 배경화면"; +"lng_settings_adaptive_wide" = "와이드 스크린 레이아웃 적용"; "lng_backgrounds_header" = "새로운 대화창 배경화면을 선택"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}"; "lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상"; -"lng_new_version_text" = "— 음성 메시지에 웨이브 시각 효과 추가\n— 이모티콘 입력시 스티커 추천"; +"lng_new_version_text" = "— 와이드 스크린 레이아웃 설정 적용\n— 리눅스 버전 크래시 수정"; "lng_menu_insert_unicode" = "유니코드 문자를 입력하세요."; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index 6f6d5dca079b92..5d5e5d0cf9888c 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Uit galerij kiezen"; "lng_settings_bg_from_file" = "Bestand kiezen"; "lng_settings_bg_tile" = "Naast elkaar"; +"lng_settings_adaptive_wide" = "Adaptieve layout voor brede schermen"; "lng_backgrounds_header" = "Kies je nieuwe achtergrond"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}"; "lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen"; -"lng_new_version_text" = "— Nieuwe visualisatie voor spraakberichten\n— Stickersuggesties als een emoji typt"; +"lng_new_version_text" = "— Adaptieve layout voor brede schermen toegevoegd aan instellingen\n— Crashes in de Linuxversie opgelost"; "lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index bc77b4a3152690..fb36ee6188be5a 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -262,6 +262,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_bg_from_gallery" = "Escolher da galeria"; "lng_settings_bg_from_file" = "Escolher dos arquivos"; "lng_settings_bg_tile" = "Lado-a-lado"; +"lng_settings_adaptive_wide" = "Layout adaptativo para wide screens"; "lng_backgrounds_header" = "Escolha o seu novo papel de parede"; @@ -836,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop foi atualizado para a versão {version}\n\n{changes}\n\nHistórico completo de mudanças disponível aqui:\n{link}"; "lng_new_version_minor" = "— Resolução de bugs e outras melhorias menores"; -"lng_new_version_text" = "— Nova visualização em ondas para mensagens de voz\n— Sugestões de sticker quando você inicia com emoji"; +"lng_new_version_text" = "— Layout adaptativo para wide screens adicionado em Configurações\n— Resolvido crash nas versões Linux"; "lng_menu_insert_unicode" = "Inserir caractere de controle Unicode"; diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 1209ffc3e070ab..0f10218b3cc201 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1229,12 +1229,10 @@ void Window::resizeEvent(QResizeEvent *e) { if (!title) return; Adaptive::Layout layout = Adaptive::OneColumnLayout; - if (width() >= st::adaptiveNormalWidth) { - if (width() - chatsListWidth(width()) >= st::historyMaxWidth) { - layout = Adaptive::WideLayout; - } else { - layout = Adaptive::NormalLayout; - } + if (width() > st::adaptiveWideWidth) { + layout = Adaptive::WideLayout; + } else if (width() >= st::adaptiveNormalWidth) { + layout = Adaptive::NormalLayout; } if (layout != Global::AdaptiveLayout()) { Global::SetAdaptiveLayout(layout); From a7b9fd2f2bc0ec3a0ae9a58fe6c72a37af4bb655 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 22 Feb 2016 10:07:44 +0300 Subject: [PATCH 093/133] version 0.9.26 --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 6 +++--- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 2 +- Telegram/Version | 8 ++++---- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index f507c4492ab371..c923078e84d7a8 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1055,7 +1055,7 @@ void AppClass::checkMapVersion() { QString versionFeatures; if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9025) { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Adaptive layout for wide screens switch added to Settings\n\xe2\x80\x94 Linux version crash fix");// .replace('@', qsl("@") + QChar(0x200D)); - } else if (Local::oldMapVersion() < 9024) { + } else if (Local::oldMapVersion() < 9026) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { versionFeatures = lang(lng_new_version_minor).trimmed(); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 1f6fd6588e42c3..acd3cd83fb804a 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,9 +20,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9025; -static const wchar_t *AppVersionStr = L"0.9.25"; -static const bool DevVersion = true; +static const int32 AppVersion = 9026; +static const wchar_t *AppVersionStr = L"0.9.26"; +static const bool DevVersion = false; //#define BETA_VERSION (9019002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 789cf25856c85f..733bd0e84ec53c 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.25 + 0.9.26 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 04b48ea0380c49..af8188834ce9fc 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,25,0 - PRODUCTVERSION 0,9,25,0 + FILEVERSION 0,9,26,0 + PRODUCTVERSION 0,9,26,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.25.0" + VALUE "FileVersion", "0.9.26.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.25.0" + VALUE "ProductVersion", "0.9.26.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index ba4d36601deedd..30dc689c9ba250 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.25; + CURRENT_PROJECT_VERSION = 0.9.26; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; diff --git a/Telegram/Version b/Telegram/Version index ba8449dac8b5cb..bc8bffbaf85651 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9025 +AppVersion 9026 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.25 -AppVersionStr 0.9.25 -DevChannel 1 +AppVersionStrSmall 0.9.26 +AppVersionStr 0.9.26 +DevChannel 0 BetaVersion 0 9019002 From 2a0a3b5cbb4562ba2338fc0ab587d99a6d409b95 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 22 Feb 2016 14:15:24 +0300 Subject: [PATCH 094/133] tooltip showing only in active window --- Telegram/SourceFiles/gui/popupmenu.cpp | 2 +- Telegram/SourceFiles/mainwidget.cpp | 5 +- Telegram/SourceFiles/mtproto/mtpScheme.cpp | 70 ++++++++------- Telegram/SourceFiles/mtproto/mtpScheme.h | 100 +++++++++++---------- Telegram/SourceFiles/mtproto/scheme.tl | 16 ++-- Telegram/SourceFiles/structs.h | 14 +-- 6 files changed, 107 insertions(+), 100 deletions(-) diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index cad98ebe0d946a..035ada7e31bfd5 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -545,7 +545,7 @@ PopupTooltip::PopupTooltip() : TWidget(0) void PopupTooltip::onShow() { if (_shower) { - QString text = _shower->tooltipText(); + QString text = (App::wnd() && App::wnd()->isActive(false)) ? _shower->tooltipText() : QString(); if (text.isEmpty()) { Hide(); } else { diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 27175c2f3fb154..05d65d9a72e2ac 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2854,7 +2854,7 @@ void MainWidget::onUpdateNotifySettings() { if (peer->notify == UnknownNotifySettings || peer->notify == EmptyNotifySettings) { peer->notify = new NotifySettings(); } - MTP::send(MTPaccount_UpdateNotifySettings(MTP_inputNotifyPeer(peer->input), MTP_inputPeerNotifySettings(MTP_int(peer->notify->mute), MTP_string(peer->notify->sound), MTP_bool(peer->notify->previews), MTP_int(peer->notify->events))), RPCResponseHandler(), 0, updateNotifySettingPeers.isEmpty() ? 0 : 10); + MTP::send(MTPaccount_UpdateNotifySettings(MTP_inputNotifyPeer(peer->input), MTP_inputPeerNotifySettings(MTP_int(peer->notify->flags), MTP_int(peer->notify->mute), MTP_string(peer->notify->sound))), RPCResponseHandler(), 0, updateNotifySettingPeers.isEmpty() ? 0 : 10); } } @@ -3668,10 +3668,9 @@ void MainWidget::applyNotifySetting(const MTPNotifyPeer &peer, const MTPPeerNoti } if (setTo == UnknownNotifySettings) break; + setTo->flags = d.vflags.v; setTo->mute = d.vmute_until.v; setTo->sound = d.vsound.c_string().v; - setTo->previews = mtpIsTrue(d.vshow_previews); - setTo->events = d.vevents_mask.v; if (updatePeer) { if (!h) h = App::history(updatePeer->id); int32 changeIn = 0; diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.cpp b/Telegram/SourceFiles/mtproto/mtpScheme.cpp index 0d1eb87c257e31..57bc8ec59854b4 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.cpp +++ b/Telegram/SourceFiles/mtproto/mtpScheme.cpp @@ -1155,7 +1155,7 @@ void _serialize_channel(MTPStringLogger &to, int32 stage, int32 lev, Types &type case 7: to.add(" verified: "); ++stages.back(); if (flag & MTPDchannel::flag_verified) { to.add("YES [ BY BIT 7 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 7 IN FIELD flags ]"); } break; case 8: to.add(" megagroup: "); ++stages.back(); if (flag & MTPDchannel::flag_megagroup) { to.add("YES [ BY BIT 8 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 8 IN FIELD flags ]"); } break; case 9: to.add(" restricted: "); ++stages.back(); if (flag & MTPDchannel::flag_restricted) { to.add("YES [ BY BIT 9 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 9 IN FIELD flags ]"); } break; - case 10: to.add(" admin_invites: "); ++stages.back(); if (flag & MTPDchannel::flag_admin_invites) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; + case 10: to.add(" democracy: "); ++stages.back(); if (flag & MTPDchannel::flag_democracy) { to.add("YES [ BY BIT 10 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 10 IN FIELD flags ]"); } break; case 11: to.add(" signatures: "); ++stages.back(); if (flag & MTPDchannel::flag_signatures) { to.add("YES [ BY BIT 11 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 11 IN FIELD flags ]"); } break; case 12: to.add(" id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 13: to.add(" access_hash: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; @@ -1856,10 +1856,11 @@ void _serialize_inputPeerNotifySettings(MTPStringLogger &to, int32 stage, int32 to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" mute_until: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" sound: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" show_previews: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" events_mask: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" show_previews: "); ++stages.back(); if (flag & MTPDinputPeerNotifySettings::flag_show_previews) { to.add("YES [ BY BIT 0 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPDinputPeerNotifySettings::flag_silent) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 3: to.add(" mute_until: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" sound: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -1884,10 +1885,11 @@ void _serialize_peerNotifySettings(MTPStringLogger &to, int32 stage, int32 lev, to.add("\n").addSpaces(lev); } switch (stage) { - case 0: to.add(" mute_until: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" sound: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 2: to.add(" show_previews: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" events_mask: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" show_previews: "); ++stages.back(); if (flag & MTPDpeerNotifySettings::flag_show_previews) { to.add("YES [ BY BIT 0 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPDpeerNotifySettings::flag_silent) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; + case 3: to.add(" mute_until: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 4: to.add(" sound: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -5133,11 +5135,7 @@ void _serialize_channels_messageEditData(MTPStringLogger &to, int32 stage, int32 } switch (stage) { case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 1: to.add(" caption: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_caption) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; - case 2: to.add(" from_id: "); ++stages.back(); types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 3: to.add(" edit_by: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_edit_by) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 4: to.add(" edit_date: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_edit_date) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 5: to.add(" users: "); ++stages.back(); types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 1: to.add(" caption: "); ++stages.back(); if (flag & MTPDchannels_messageEditData::flag_caption) { to.add("YES [ BY BIT 0 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6520,12 +6518,13 @@ void _serialize_messages_sendMessage(MTPStringLogger &to, int32 stage, int32 lev case 1: to.add(" no_webpage: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_no_webpage) { to.add("YES [ BY BIT 1 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 1 IN FIELD flags ]"); } break; case 2: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 3: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 4: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 6: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 8: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; - case 9: to.add(" entities: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; + case 4: to.add(" background: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_background) { to.add("YES [ BY BIT 6 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 5: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 7: to.add(" message: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 9: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 10: to.add(" entities: "); ++stages.back(); if (flag & MTPmessages_sendMessage::flag_entities) { types.push_back(00); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 3 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6541,11 +6540,12 @@ void _serialize_messages_sendMedia(MTPStringLogger &to, int32 stage, int32 lev, case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 3: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 5: to.add(" media: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; + case 3: to.add(" background: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_background) { to.add("YES [ BY BIT 6 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 4: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 6: to.add(" media: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" reply_markup: "); ++stages.back(); if (flag & MTPmessages_sendMedia::flag_reply_markup) { types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 2 IN FIELD flags ]"); } break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6561,10 +6561,11 @@ void _serialize_messages_forwardMessages(MTPStringLogger &to, int32 stage, int32 case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_forwardMessages::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_forwardMessages::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 3: to.add(" from_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; - case 5: to.add(" random_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_long); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" to_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" background: "); ++stages.back(); if (flag & MTPmessages_forwardMessages::flag_background) { to.add("YES [ BY BIT 6 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 4: to.add(" from_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_int); stages.push_back(0); flags.push_back(0); break; + case 6: to.add(" random_id: "); ++stages.back(); types.push_back(0); vtypes.push_back(mtpc_long); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" to_peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } @@ -6738,11 +6739,12 @@ void _serialize_messages_sendInlineBotResult(MTPStringLogger &to, int32 stage, i case 0: to.add(" flags: "); ++stages.back(); if (start >= end) throw Exception("start >= end in flags"); else flags.back() = *start; types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; case 1: to.add(" broadcast: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_broadcast) { to.add("YES [ BY BIT 4 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 4 IN FIELD flags ]"); } break; case 2: to.add(" silent: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_silent) { to.add("YES [ BY BIT 5 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 5 IN FIELD flags ]"); } break; - case 3: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 4: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; - case 5: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 6: to.add(" query_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; - case 7: to.add(" id: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 3: to.add(" background: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_background) { to.add("YES [ BY BIT 6 IN FIELD flags ]"); } else { to.add("[ SKIPPED BY BIT 6 IN FIELD flags ]"); } break; + case 4: to.add(" peer: "); ++stages.back(); types.push_back(0); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 5: to.add(" reply_to_msg_id: "); ++stages.back(); if (flag & MTPmessages_sendInlineBotResult::flag_reply_to_msg_id) { types.push_back(mtpc_int); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); } else { to.add("[ SKIPPED BY BIT 0 IN FIELD flags ]"); } break; + case 6: to.add(" random_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 7: to.add(" query_id: "); ++stages.back(); types.push_back(mtpc_long); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; + case 8: to.add(" id: "); ++stages.back(); types.push_back(mtpc_string); vtypes.push_back(0); stages.push_back(0); flags.push_back(0); break; default: to.add("}"); types.pop_back(); vtypes.pop_back(); stages.pop_back(); flags.pop_back(); break; } } diff --git a/Telegram/SourceFiles/mtproto/mtpScheme.h b/Telegram/SourceFiles/mtproto/mtpScheme.h index 87a972c7e2844f..94cd2994a56391 100644 --- a/Telegram/SourceFiles/mtproto/mtpScheme.h +++ b/Telegram/SourceFiles/mtproto/mtpScheme.h @@ -186,11 +186,11 @@ enum { mtpc_inputNotifyAll = 0xa429b886, mtpc_inputPeerNotifyEventsEmpty = 0xf03064d8, mtpc_inputPeerNotifyEventsAll = 0xe86a2c74, - mtpc_inputPeerNotifySettings = 0x46a2ce98, + mtpc_inputPeerNotifySettings = 0x38935eb2, mtpc_peerNotifyEventsEmpty = 0xadd53cb3, mtpc_peerNotifyEventsAll = 0x6d1ded88, mtpc_peerNotifySettingsEmpty = 0x70a68512, - mtpc_peerNotifySettings = 0x8d5e11ee, + mtpc_peerNotifySettings = 0x9acda4c0, mtpc_wallPaper = 0xccb03657, mtpc_wallPaperSolid = 0x63117f24, mtpc_inputReportReasonSpam = 0x58dbcab8, @@ -449,7 +449,7 @@ enum { mtpc_messages_botResults = 0x1170b0a3, mtpc_exportedMessageLink = 0x1f486803, mtpc_messageFwdHeader = 0xc786ddcb, - mtpc_channels_messageEditData = 0xb86fd3cf, + mtpc_channels_messageEditData = 0x67e1255f, mtpc_invokeAfterMsg = 0xcb9f372d, mtpc_invokeAfterMsgs = 0x3dc4b4f0, mtpc_initConnection = 0x69796de9, @@ -4240,7 +4240,7 @@ class MTPinputPeerNotifySettings : private mtpDataOwner { private: explicit MTPinputPeerNotifySettings(MTPDinputPeerNotifySettings *_data); - friend MTPinputPeerNotifySettings MTP_inputPeerNotifySettings(MTPint _mute_until, const MTPstring &_sound, MTPBool _show_previews, MTPint _events_mask); + friend MTPinputPeerNotifySettings MTP_inputPeerNotifySettings(MTPint _flags, MTPint _mute_until, const MTPstring &_sound); }; typedef MTPBoxed MTPInputPeerNotifySettings; @@ -4301,7 +4301,7 @@ class MTPpeerNotifySettings : private mtpDataOwner { explicit MTPpeerNotifySettings(MTPDpeerNotifySettings *_data); friend MTPpeerNotifySettings MTP_peerNotifySettingsEmpty(); - friend MTPpeerNotifySettings MTP_peerNotifySettings(MTPint _mute_until, const MTPstring &_sound, MTPBool _show_previews, MTPint _events_mask); + friend MTPpeerNotifySettings MTP_peerNotifySettings(MTPint _flags, MTPint _mute_until, const MTPstring &_sound); mtpTypeId _type; }; @@ -9080,7 +9080,7 @@ class MTPchannels_messageEditData : private mtpDataOwner { private: explicit MTPchannels_messageEditData(MTPDchannels_messageEditData *_data); - friend MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags, MTPint _from_id, MTPint _edit_by, MTPint _edit_date, const MTPVector &_users); + friend MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags); }; typedef MTPBoxed MTPchannels_MessageEditData; @@ -9953,7 +9953,7 @@ class MTPDchannel : public mtpDataImpl { flag_verified = (1 << 7), flag_megagroup = (1 << 8), flag_restricted = (1 << 9), - flag_admin_invites = (1 << 10), + flag_democracy = (1 << 10), flag_signatures = (1 << 11), flag_username = (1 << 6), flag_restriction_reason = (1 << 9), @@ -9968,7 +9968,7 @@ class MTPDchannel : public mtpDataImpl { bool is_verified() const { return vflags.v & flag_verified; } bool is_megagroup() const { return vflags.v & flag_megagroup; } bool is_restricted() const { return vflags.v & flag_restricted; } - bool is_admin_invites() const { return vflags.v & flag_admin_invites; } + bool is_democracy() const { return vflags.v & flag_democracy; } bool is_signatures() const { return vflags.v & flag_signatures; } bool has_username() const { return vflags.v & flag_username; } bool has_restriction_reason() const { return vflags.v & flag_restriction_reason; } @@ -10551,26 +10551,40 @@ class MTPDinputPeerNotifySettings : public mtpDataImpl { public: MTPDpeerNotifySettings() { } - MTPDpeerNotifySettings(MTPint _mute_until, const MTPstring &_sound, MTPBool _show_previews, MTPint _events_mask) : vmute_until(_mute_until), vsound(_sound), vshow_previews(_show_previews), vevents_mask(_events_mask) { + MTPDpeerNotifySettings(MTPint _flags, MTPint _mute_until, const MTPstring &_sound) : vflags(_flags), vmute_until(_mute_until), vsound(_sound) { } + MTPint vflags; MTPint vmute_until; MTPstring vsound; - MTPBool vshow_previews; - MTPint vevents_mask; + + enum { + flag_show_previews = (1 << 0), + flag_silent = (1 << 1), + }; + + bool is_show_previews() const { return vflags.v & flag_show_previews; } + bool is_silent() const { return vflags.v & flag_silent; } }; class MTPDwallPaper : public mtpDataImpl { @@ -13214,24 +13228,16 @@ class MTPDchannels_messageEditData : public mtpDataImpl &_users) : vflags(_flags), vfrom_id(_from_id), vedit_by(_edit_by), vedit_date(_edit_date), vusers(_users) { + MTPDchannels_messageEditData(MTPint _flags) : vflags(_flags) { } MTPint vflags; - MTPint vfrom_id; - MTPint vedit_by; - MTPint vedit_date; - MTPVector vusers; enum { - flag_caption = (1 << 1), - flag_edit_by = (1 << 0), - flag_edit_date = (1 << 0), + flag_caption = (1 << 0), }; bool is_caption() const { return vflags.v & flag_caption; } - bool has_edit_by() const { return vflags.v & flag_edit_by; } - bool has_edit_date() const { return vflags.v & flag_edit_date; } }; // RPC methods @@ -16418,6 +16424,7 @@ class MTPmessages_sendMessage { // RPC method 'messages.sendMessage' flag_no_webpage = (1 << 1), flag_broadcast = (1 << 4), flag_silent = (1 << 5), + flag_background = (1 << 6), flag_reply_to_msg_id = (1 << 0), flag_reply_markup = (1 << 2), flag_entities = (1 << 3), @@ -16426,6 +16433,7 @@ class MTPmessages_sendMessage { // RPC method 'messages.sendMessage' bool is_no_webpage() const { return vflags.v & flag_no_webpage; } bool is_broadcast() const { return vflags.v & flag_broadcast; } bool is_silent() const { return vflags.v & flag_silent; } + bool is_background() const { return vflags.v & flag_background; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & flag_reply_markup; } bool has_entities() const { return vflags.v & flag_entities; } @@ -16489,12 +16497,14 @@ class MTPmessages_sendMedia { // RPC method 'messages.sendMedia' enum { flag_broadcast = (1 << 4), flag_silent = (1 << 5), + flag_background = (1 << 6), flag_reply_to_msg_id = (1 << 0), flag_reply_markup = (1 << 2), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } bool is_silent() const { return vflags.v & flag_silent; } + bool is_background() const { return vflags.v & flag_background; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } bool has_reply_markup() const { return vflags.v & flag_reply_markup; } @@ -16554,10 +16564,12 @@ class MTPmessages_forwardMessages { // RPC method 'messages.forwardMessages' enum { flag_broadcast = (1 << 4), flag_silent = (1 << 5), + flag_background = (1 << 6), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } bool is_silent() const { return vflags.v & flag_silent; } + bool is_background() const { return vflags.v & flag_background; } uint32 innerLength() const { return vflags.innerLength() + vfrom_peer.innerLength() + vid.innerLength() + vrandom_id.innerLength() + vto_peer.innerLength(); @@ -18448,11 +18460,13 @@ class MTPmessages_sendInlineBotResult { // RPC method 'messages.sendInlineBotRes enum { flag_broadcast = (1 << 4), flag_silent = (1 << 5), + flag_background = (1 << 6), flag_reply_to_msg_id = (1 << 0), }; bool is_broadcast() const { return vflags.v & flag_broadcast; } bool is_silent() const { return vflags.v & flag_silent; } + bool is_background() const { return vflags.v & flag_background; } bool has_reply_to_msg_id() const { return vflags.v & flag_reply_to_msg_id; } uint32 innerLength() const { @@ -24333,7 +24347,7 @@ inline MTPinputPeerNotifySettings::MTPinputPeerNotifySettings() : mtpDataOwner(n inline uint32 MTPinputPeerNotifySettings::innerLength() const { const MTPDinputPeerNotifySettings &v(c_inputPeerNotifySettings()); - return v.vmute_until.innerLength() + v.vsound.innerLength() + v.vshow_previews.innerLength() + v.vevents_mask.innerLength(); + return v.vflags.innerLength() + v.vmute_until.innerLength() + v.vsound.innerLength(); } inline mtpTypeId MTPinputPeerNotifySettings::type() const { return mtpc_inputPeerNotifySettings; @@ -24343,22 +24357,20 @@ inline void MTPinputPeerNotifySettings::read(const mtpPrime *&from, const mtpPri if (!data) setData(new MTPDinputPeerNotifySettings()); MTPDinputPeerNotifySettings &v(_inputPeerNotifySettings()); + v.vflags.read(from, end); v.vmute_until.read(from, end); v.vsound.read(from, end); - v.vshow_previews.read(from, end); - v.vevents_mask.read(from, end); } inline void MTPinputPeerNotifySettings::write(mtpBuffer &to) const { const MTPDinputPeerNotifySettings &v(c_inputPeerNotifySettings()); + v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); - v.vshow_previews.write(to); - v.vevents_mask.write(to); } inline MTPinputPeerNotifySettings::MTPinputPeerNotifySettings(MTPDinputPeerNotifySettings *_data) : mtpDataOwner(_data) { } -inline MTPinputPeerNotifySettings MTP_inputPeerNotifySettings(MTPint _mute_until, const MTPstring &_sound, MTPBool _show_previews, MTPint _events_mask) { - return MTPinputPeerNotifySettings(new MTPDinputPeerNotifySettings(_mute_until, _sound, _show_previews, _events_mask)); +inline MTPinputPeerNotifySettings MTP_inputPeerNotifySettings(MTPint _flags, MTPint _mute_until, const MTPstring &_sound) { + return MTPinputPeerNotifySettings(new MTPDinputPeerNotifySettings(_flags, _mute_until, _sound)); } inline uint32 MTPpeerNotifyEvents::innerLength() const { @@ -24397,7 +24409,7 @@ inline uint32 MTPpeerNotifySettings::innerLength() const { switch (_type) { case mtpc_peerNotifySettings: { const MTPDpeerNotifySettings &v(c_peerNotifySettings()); - return v.vmute_until.innerLength() + v.vsound.innerLength() + v.vshow_previews.innerLength() + v.vevents_mask.innerLength(); + return v.vflags.innerLength() + v.vmute_until.innerLength() + v.vsound.innerLength(); } } return 0; @@ -24413,10 +24425,9 @@ inline void MTPpeerNotifySettings::read(const mtpPrime *&from, const mtpPrime *e case mtpc_peerNotifySettings: _type = cons; { if (!data) setData(new MTPDpeerNotifySettings()); MTPDpeerNotifySettings &v(_peerNotifySettings()); + v.vflags.read(from, end); v.vmute_until.read(from, end); v.vsound.read(from, end); - v.vshow_previews.read(from, end); - v.vevents_mask.read(from, end); } break; default: throw mtpErrorUnexpected(cons, "MTPpeerNotifySettings"); } @@ -24425,10 +24436,9 @@ inline void MTPpeerNotifySettings::write(mtpBuffer &to) const { switch (_type) { case mtpc_peerNotifySettings: { const MTPDpeerNotifySettings &v(c_peerNotifySettings()); + v.vflags.write(to); v.vmute_until.write(to); v.vsound.write(to); - v.vshow_previews.write(to); - v.vevents_mask.write(to); } break; } } @@ -24444,8 +24454,8 @@ inline MTPpeerNotifySettings::MTPpeerNotifySettings(MTPDpeerNotifySettings *_dat inline MTPpeerNotifySettings MTP_peerNotifySettingsEmpty() { return MTPpeerNotifySettings(mtpc_peerNotifySettingsEmpty); } -inline MTPpeerNotifySettings MTP_peerNotifySettings(MTPint _mute_until, const MTPstring &_sound, MTPBool _show_previews, MTPint _events_mask) { - return MTPpeerNotifySettings(new MTPDpeerNotifySettings(_mute_until, _sound, _show_previews, _events_mask)); +inline MTPpeerNotifySettings MTP_peerNotifySettings(MTPint _flags, MTPint _mute_until, const MTPstring &_sound) { + return MTPpeerNotifySettings(new MTPDpeerNotifySettings(_flags, _mute_until, _sound)); } inline uint32 MTPwallPaper::innerLength() const { @@ -30909,7 +30919,7 @@ inline MTPchannels_messageEditData::MTPchannels_messageEditData() : mtpDataOwner inline uint32 MTPchannels_messageEditData::innerLength() const { const MTPDchannels_messageEditData &v(c_channels_messageEditData()); - return v.vflags.innerLength() + v.vfrom_id.innerLength() + (v.has_edit_by() ? v.vedit_by.innerLength() : 0) + (v.has_edit_date() ? v.vedit_date.innerLength() : 0) + v.vusers.innerLength(); + return v.vflags.innerLength(); } inline mtpTypeId MTPchannels_messageEditData::type() const { return mtpc_channels_messageEditData; @@ -30920,23 +30930,15 @@ inline void MTPchannels_messageEditData::read(const mtpPrime *&from, const mtpPr if (!data) setData(new MTPDchannels_messageEditData()); MTPDchannels_messageEditData &v(_channels_messageEditData()); v.vflags.read(from, end); - v.vfrom_id.read(from, end); - if (v.has_edit_by()) { v.vedit_by.read(from, end); } else { v.vedit_by = MTPint(); } - if (v.has_edit_date()) { v.vedit_date.read(from, end); } else { v.vedit_date = MTPint(); } - v.vusers.read(from, end); } inline void MTPchannels_messageEditData::write(mtpBuffer &to) const { const MTPDchannels_messageEditData &v(c_channels_messageEditData()); v.vflags.write(to); - v.vfrom_id.write(to); - if (v.has_edit_by()) v.vedit_by.write(to); - if (v.has_edit_date()) v.vedit_date.write(to); - v.vusers.write(to); } inline MTPchannels_messageEditData::MTPchannels_messageEditData(MTPDchannels_messageEditData *_data) : mtpDataOwner(_data) { } -inline MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags, MTPint _from_id, MTPint _edit_by, MTPint _edit_date, const MTPVector &_users) { - return MTPchannels_messageEditData(new MTPDchannels_messageEditData(_flags, _from_id, _edit_by, _edit_date, _users)); +inline MTPchannels_messageEditData MTP_channels_messageEditData(MTPint _flags) { + return MTPchannels_messageEditData(new MTPDchannels_messageEditData(_flags)); } // Human-readable text serialization diff --git a/Telegram/SourceFiles/mtproto/scheme.tl b/Telegram/SourceFiles/mtproto/scheme.tl index 94df0ec3e70cb7..8e4b7bf2f71b1e 100644 --- a/Telegram/SourceFiles/mtproto/scheme.tl +++ b/Telegram/SourceFiles/mtproto/scheme.tl @@ -209,7 +209,7 @@ userStatusLastMonth#77ebc742 = UserStatus; chatEmpty#9ba2d800 id:int = Chat; chat#d91cdd54 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true admins_enabled:flags.3?true admin:flags.4?true deactivated:flags.5?true id:int title:string photo:ChatPhoto participants_count:int date:int version:int migrated_to:flags.6?InputChannel = Chat; chatForbidden#7328bdb id:int title:string = Chat; -channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true admin_invites:flags.10?true signatures:flags.11?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; +channel#4b1b7506 flags:# creator:flags.0?true kicked:flags.1?true left:flags.2?true editor:flags.3?true moderator:flags.4?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true democracy:flags.10?true signatures:flags.11?true id:int access_hash:long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?string = Chat; channelForbidden#2d85832c id:int access_hash:long title:string = Chat; chatFull#2e02a614 id:int participants:ChatParticipants chat_photo:Photo notify_settings:PeerNotifySettings exported_invite:ExportedChatInvite bot_info:Vector = ChatFull; @@ -280,13 +280,13 @@ inputNotifyAll#a429b886 = InputNotifyPeer; inputPeerNotifyEventsEmpty#f03064d8 = InputPeerNotifyEvents; inputPeerNotifyEventsAll#e86a2c74 = InputPeerNotifyEvents; -inputPeerNotifySettings#46a2ce98 mute_until:int sound:string show_previews:Bool events_mask:int = InputPeerNotifySettings; +inputPeerNotifySettings#38935eb2 flags:# show_previews:flags.0?true silent:flags.1?true mute_until:int sound:string = InputPeerNotifySettings; peerNotifyEventsEmpty#add53cb3 = PeerNotifyEvents; peerNotifyEventsAll#6d1ded88 = PeerNotifyEvents; peerNotifySettingsEmpty#70a68512 = PeerNotifySettings; -peerNotifySettings#8d5e11ee mute_until:int sound:string show_previews:Bool events_mask:int = PeerNotifySettings; +peerNotifySettings#9acda4c0 flags:# show_previews:flags.0?true silent:flags.1?true mute_until:int sound:string = PeerNotifySettings; wallPaper#ccb03657 id:int title:string sizes:Vector color:int = WallPaper; wallPaperSolid#63117f24 id:int title:string bg_color:int color:int = WallPaper; @@ -644,7 +644,7 @@ exportedMessageLink#1f486803 link:string = ExportedMessageLink; messageFwdHeader#c786ddcb flags:# from_id:flags.0?int date:int channel_id:flags.1?int channel_post:flags.2?int = MessageFwdHeader; -channels.messageEditData#b86fd3cf flags:# caption:flags.1?true from_id:int edit_by:flags.0?int edit_date:flags.0?int users:Vector = channels.MessageEditData; +channels.messageEditData#67e1255f flags:# caption:flags.0?true = channels.MessageEditData; ---functions--- @@ -721,9 +721,9 @@ messages.deleteHistory#b7c13bd9 peer:InputPeer max_id:int = messages.AffectedHis messages.deleteMessages#a5f18925 id:Vector = messages.AffectedMessages; messages.receivedMessages#5a954c0 max_id:int = Vector; messages.setTyping#a3825e50 peer:InputPeer action:SendMessageAction = Bool; -messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; -messages.sendMedia#c8f16791 flags:# broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates; -messages.forwardMessages#708e0195 flags:# broadcast:flags.4?true silent:flags.5?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer = Updates; +messages.sendMessage#fa88427a flags:# no_webpage:flags.1?true broadcast:flags.4?true silent:flags.5?true background:flags.6?true peer:InputPeer reply_to_msg_id:flags.0?int message:string random_id:long reply_markup:flags.2?ReplyMarkup entities:flags.3?Vector = Updates; +messages.sendMedia#c8f16791 flags:# broadcast:flags.4?true silent:flags.5?true background:flags.6?true peer:InputPeer reply_to_msg_id:flags.0?int media:InputMedia random_id:long reply_markup:flags.2?ReplyMarkup = Updates; +messages.forwardMessages#708e0195 flags:# broadcast:flags.4?true silent:flags.5?true background:flags.6?true from_peer:InputPeer id:Vector random_id:Vector to_peer:InputPeer = Updates; messages.reportSpam#cf1592db peer:InputPeer = Bool; messages.getChats#3c6aa187 id:Vector = messages.Chats; messages.getFullChat#3b831c66 chat_id:int = messages.ChatFull; @@ -767,7 +767,7 @@ messages.getSavedGifs#83bf3d52 hash:int = messages.SavedGifs; messages.saveGif#327a30cb id:InputDocument unsave:Bool = Bool; messages.getInlineBotResults#9324600d bot:InputUser query:string offset:string = messages.BotResults; messages.setInlineBotResults#3f23ec12 flags:# gallery:flags.0?true private:flags.1?true query_id:long results:Vector cache_time:int next_offset:flags.2?string = Bool; -messages.sendInlineBotResult#b16e06fe flags:# broadcast:flags.4?true silent:flags.5?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates; +messages.sendInlineBotResult#b16e06fe flags:# broadcast:flags.4?true silent:flags.5?true background:flags.6?true peer:InputPeer reply_to_msg_id:flags.0?int random_id:long query_id:long id:string = Updates; updates.getState#edd4882a = updates.State; updates.getDifference#a041495 pts:int date:int qts:int = updates.Difference; diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 69604e5017ad5c..16df19fcd58541 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -163,12 +163,16 @@ static const MsgId ServerMaxMsgId = 0x3FFFFFFF; static const MsgId ShowAtUnreadMsgId = 0; struct NotifySettings { - NotifySettings() : mute(0), sound("default"), previews(true), events(1) { + NotifySettings() : flags(MTPDinputPeerNotifySettings::flag_show_previews), mute(0), sound("default") { } - int32 mute; + int32 flags, mute; string sound; - bool previews; - int32 events; + bool previews() const { + return flags & MTPDinputPeerNotifySettings::flag_show_previews; + } + bool silent() const { + return flags & MTPDinputPeerNotifySettings::flag_silent; + } }; typedef NotifySettings *NotifySettingsPtr; @@ -633,7 +637,7 @@ class ChannelData : public PeerData { return flags & MTPDchannel::flag_verified; } bool canAddParticipants() const { - return amCreator() || amEditor() || (flags & MTPDchannel::flag_admin_invites); + return amCreator() || amEditor() || (flags & MTPDchannel::flag_democracy); } // ImagePtr photoFull; From 46e562c86e5c688ab0abf15680075e99a2dce692 Mon Sep 17 00:00:00 2001 From: auchri Date: Mon, 22 Feb 2016 16:55:35 +0100 Subject: [PATCH 095/133] Update qmake for v0.9.26 --- doc/building-qmake.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/building-qmake.md b/doc/building-qmake.md index 37f091331eac53..ad86748b08e4af 100644 --- a/doc/building-qmake.md +++ b/doc/building-qmake.md @@ -53,6 +53,7 @@ Preparation echo 'INCLUDEPATH += "/usr/lib/glib-2.0/include"' echo 'INCLUDEPATH += "/usr/lib/gtk-2.0/include"' echo 'INCLUDEPATH += "/usr/include/opus"' ++ echo 'LIBS += -lcrypto -lssl' ) >> "$srcdir/tdesktop/Telegram/Telegram.pro" Building From aebe15acdaef117e53a83fbdd066f48206f914a8 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Mon, 22 Feb 2016 17:02:57 +0100 Subject: [PATCH 096/133] Fix last commit (Update qmake for v0.9.26) Signed-off-by: Christoph Auer --- doc/building-qmake.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/building-qmake.md b/doc/building-qmake.md index ad86748b08e4af..ff6ac22e156305 100644 --- a/doc/building-qmake.md +++ b/doc/building-qmake.md @@ -53,7 +53,7 @@ Preparation echo 'INCLUDEPATH += "/usr/lib/glib-2.0/include"' echo 'INCLUDEPATH += "/usr/lib/gtk-2.0/include"' echo 'INCLUDEPATH += "/usr/include/opus"' -+ echo 'LIBS += -lcrypto -lssl' + echo 'LIBS += -lcrypto -lssl' ) >> "$srcdir/tdesktop/Telegram/Telegram.pro" Building From 0ffc2ce1413673aa4c1c5e5c1139e0c43eda3a21 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 23 Feb 2016 12:52:18 +0300 Subject: [PATCH 097/133] applying flags from dcOptions --- Telegram/SourceFiles/config.h | 2 +- Telegram/SourceFiles/mtproto/mtp.cpp | 19 ++- Telegram/SourceFiles/mtproto/mtp.h | 22 +-- .../SourceFiles/mtproto/mtpConnection.cpp | 139 ++++++++++++------ Telegram/SourceFiles/mtproto/mtpConnection.h | 19 ++- Telegram/SourceFiles/mtproto/mtpDC.cpp | 12 +- 6 files changed, 141 insertions(+), 72 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index acd3cd83fb804a..205e87895b5669 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -55,7 +55,7 @@ enum { MTPDownloadSessionsCount = 4, // max 4 download sessions is created MTPKillFileSessionTimeout = 5000, // how much time without upload / download causes additional session kill - MTPEnumDCTimeout = 4000, // 4 seconds timeout for help_getConfig to work (them move to other dc) + MTPEnumDCTimeout = 8000, // 8 seconds timeout for help_getConfig to work (then move to other dc) MTPDebugBufferSize = 1024 * 1024, // 1 mb start size diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index a6847bf34f177c..6f443783c79029 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -622,7 +622,24 @@ namespace _mtp_internal { namespace MTP { - void start() { + const uint32 cfg = 1 * _mtp_internal::dcShift; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum + const uint32 lgt = 2 * _mtp_internal::dcShift; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum + const uint32 dld[MTPDownloadSessionsCount] = { // send(req, callbacks, MTP::dld[i] + dc) - for download + 0x10 * _mtp_internal::dcShift, + 0x11 * _mtp_internal::dcShift, + 0x12 * _mtp_internal::dcShift, + 0x13 * _mtp_internal::dcShift, + }; + const uint32 upl[MTPUploadSessionsCount] = { // send(req, callbacks, MTP::upl[i] + dc) - for upload + 0x20 * _mtp_internal::dcShift, + 0x21 * _mtp_internal::dcShift, + 0x22 * _mtp_internal::dcShift, + 0x23 * _mtp_internal::dcShift, + }; + const uint32 dldStart = dld[0], dldEnd = dld[(sizeof(dld) / sizeof(dld[0])) - 1] + _mtp_internal::dcShift; + const uint32 uplStart = upl[0], uplEnd = upl[(sizeof(upl) / sizeof(upl[0])) - 1] + _mtp_internal::dcShift; + + void start() { if (started()) return; unixtimeInit(); diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index 2e830ae69f4a55..ed2882e2415f03 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -68,20 +68,12 @@ namespace _mtp_internal { namespace MTP { - static const uint32 cfg = 1 * _mtp_internal::dcShift; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum - static const uint32 lgt = 2 * _mtp_internal::dcShift; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum - static const uint32 dld[MTPDownloadSessionsCount] = { // send(req, callbacks, MTP::dld[i] + dc) - for download - 0x10 * _mtp_internal::dcShift, - 0x11 * _mtp_internal::dcShift, - 0x12 * _mtp_internal::dcShift, - 0x13 * _mtp_internal::dcShift, - }; - static const uint32 upl[MTPUploadSessionsCount] = { // send(req, callbacks, MTP::upl[i] + dc) - for upload - 0x20 * _mtp_internal::dcShift, - 0x21 * _mtp_internal::dcShift, - 0x22 * _mtp_internal::dcShift, - 0x23 * _mtp_internal::dcShift, - }; + extern const uint32 cfg; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum + extern const uint32 lgt; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum + extern const uint32 dld[MTPDownloadSessionsCount]; // send(req, callbacks, MTP::dld[i] + dc) - for download + extern const uint32 upl[MTPUploadSessionsCount]; // send(req, callbacks, MTP::upl[i] + dc) - for upload + extern const uint32 dldStart, dldEnd; // dc >= dldStart && dc < dldEnd => dc in dld + extern const uint32 uplStart, uplEnd; // dc >= uplStart && dc < uplEnd => dc in upl void start(); bool started(); @@ -119,7 +111,7 @@ namespace MTP { void cancel(mtpRequestId req); void killSession(int32 dc); void stopSession(int32 dc); - + enum { RequestSent = 0, RequestConnecting = 1, diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index d35912658d3ba7..3604baf5749b19 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -623,8 +623,13 @@ void MTPabstractTcpConnection::socketRead() { } while (sock.state() == QAbstractSocket::ConnectedState && sock.bytesAvailable()); } -MTPautoConnection::MTPautoConnection(QThread *thread) : status(WaitingBoth), -tcpNonce(MTP::nonce()), httpNonce(MTP::nonce()), _tcpTimeout(MTPMinReceiveDelay), _flags(0) { +MTPautoConnection::MTPautoConnection(QThread *thread) : MTPabstractTcpConnection() +, status(WaitingBoth) +, tcpNonce(MTP::nonce()) +, httpNonce(MTP::nonce()) +, _flagsTcp(0) +, _flagsHttp(0) +, _tcpTimeout(MTPMinReceiveDelay) { moveToThread(thread); manager.moveToThread(thread); @@ -647,7 +652,7 @@ tcpNonce(MTP::nonce()), httpNonce(MTP::nonce()), _tcpTimeo void MTPautoConnection::onHttpStart() { if (status == HttpReady) { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by timer").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by timer").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; sock.disconnectFromHost(); emit connected(); @@ -658,7 +663,7 @@ void MTPautoConnection::onSocketConnected() { if (status == HttpReady || status == WaitingBoth || status == WaitingTcp) { mtpBuffer buffer(_preparePQFake(tcpNonce)); - DEBUG_LOG(("Connection Info: sending fake req_pq through TCP/%1 transport").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: sending fake req_pq through TCP/%1 transport").arg((_flagsTcp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); if (_tcpTimeout < 0) _tcpTimeout = -_tcpTimeout; tcpTimeoutTimer.start(_tcpTimeout); @@ -678,7 +683,7 @@ void MTPautoConnection::onTcpTimeoutTimer() { if (state == QAbstractSocket::ConnectedState || state == QAbstractSocket::ConnectingState || state == QAbstractSocket::HostLookupState) { sock.disconnectFromHost(); } else if (state != QAbstractSocket::ClosingState) { - sock.connectToHost(QHostAddress(_addr), _port); + sock.connectToHost(QHostAddress(_addrTcp), _portTcp); } } } @@ -687,7 +692,7 @@ void MTPautoConnection::onSocketDisconnected() { if (_tcpTimeout < 0) { _tcpTimeout = -_tcpTimeout; if (status == HttpReady || status == WaitingBoth || status == WaitingTcp) { - sock.connectToHost(QHostAddress(_addr), _port); + sock.connectToHost(QHostAddress(_addrTcp), _portTcp); return; } } @@ -696,7 +701,7 @@ void MTPautoConnection::onSocketDisconnected() { } else if (status == WaitingTcp || status == UsingTcp) { emit disconnected(); } else if (status == HttpReady) { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by socket disconnect").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by socket disconnect").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; emit connected(); } @@ -788,21 +793,27 @@ void MTPautoConnection::disconnectFromServer() { httpStartTimer.stop(); } -void MTPautoConnection::connectToServer(const QString &addr, int32 port, int32 flags) { +void MTPautoConnection::connectTcp(const QString &addr, int32 port, int32 flags) { + _addrTcp = addr; + _portTcp = port; + _flagsTcp = flags; + + connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead())); + sock.connectToHost(QHostAddress(_addrTcp), _portTcp); +} + +void MTPautoConnection::connectHttp(const QString &addr, int32 port, int32 flags) { address = QUrl(((flags & MTPDdcOption::flag_ipv6) ? qsl("http://[%1]:%2/api") : qsl("http://%1:%2/api")).arg(addr).arg(80));//not p - always 80 port for http transport TCP_LOG(("HTTP Info: address is %1").arg(address.toDisplayString())); connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); - _addr = addr; - _port = port; - _flags = flags; - - connect(&sock, SIGNAL(readyRead()), this, SLOT(socketRead())); - sock.connectToHost(QHostAddress(_addr), _port); + _addrHttp = addr; + _portHttp = port; + _flagsHttp = flags; mtpBuffer buffer(_preparePQFake(httpNonce)); - DEBUG_LOG(("Connection Info: sending fake req_pq through HTTP/%1 transport").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: sending fake req_pq through HTTP/%1 transport").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); httpSend(buffer); } @@ -838,7 +849,7 @@ void MTPautoConnection::requestFinished(QNetworkReply *reply) { status = HttpReady; httpStartTimer.start(MTPTcpConnectionWaitTimeout); } else { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by pq-response, awaited").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by pq-response, awaited").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; sock.disconnectFromHost(); emit connected(); @@ -881,7 +892,7 @@ void MTPautoConnection::socketPacket(const char *packet, uint32 length) { status = WaitingHttp; sock.disconnectFromHost(); } else if (status == HttpReady) { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, ready").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, ready").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; sock.disconnectFromHost(); emit connected(); @@ -900,7 +911,7 @@ void MTPautoConnection::socketPacket(const char *packet, uint32 length) { MTPResPQ res_pq = _readPQFakeReply(data); const MTPDresPQ &res_pq_data(res_pq.c_resPQ()); if (res_pq_data.vnonce == tcpNonce) { - DEBUG_LOG(("Connection Info: TCP/%1-transport chosen by pq-response").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: TCP/%1-transport chosen by pq-response").arg((_flagsTcp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingTcp; emit connected(); } @@ -910,7 +921,7 @@ void MTPautoConnection::socketPacket(const char *packet, uint32 length) { status = WaitingHttp; sock.disconnectFromHost(); } else if (status == HttpReady) { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, awaited").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by bad tcp response, awaited").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; sock.disconnectFromHost(); emit connected(); @@ -950,7 +961,7 @@ void MTPautoConnection::socketError(QAbstractSocket::SocketError e) { if (status == WaitingBoth) { status = WaitingHttp; } else if (status == HttpReady) { - DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by tcp error, ready").arg((_flags & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); + DEBUG_LOG(("Connection Info: HTTP/%1-transport chosen by tcp error, ready").arg((_flagsHttp & MTPDdcOption::flag_ipv6) ? "IPv6" : "IPv4")); status = UsingHttp; emit connected(); } else if (status == WaitingTcp || status == UsingTcp) { @@ -1064,7 +1075,7 @@ void MTPtcpConnection::disconnectFromServer() { sock.close(); } -void MTPtcpConnection::connectToServer(const QString &addr, int32 port, int32 flags) { +void MTPtcpConnection::connectTcp(const QString &addr, int32 port, int32 flags) { _addr = addr; _port = port; _flags = flags; @@ -1161,7 +1172,7 @@ void MTPhttpConnection::disconnectFromServer() { address = QUrl(); } -void MTPhttpConnection::connectToServer(const QString &addr, int32 p, int32 flags) { +void MTPhttpConnection::connectHttp(const QString &addr, int32 p, int32 flags) { address = QUrl(((flags & MTPDdcOption::flag_ipv6) ? qsl("http://[%1]:%2/api") : qsl("http://%1:%2/api")).arg(addr).arg(80));//not p - always 80 port for http transport TCP_LOG(("HTTP Info: address is %1").arg(address.toDisplayString())); connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))); @@ -1955,34 +1966,70 @@ void MTProtoConnectionPrivate::restartNow() { } void MTProtoConnectionPrivate::socketStart(bool afterConfig) { - int32 flags4 = 0, flags6 = 0; - std::string ip4, ip6; - uint32 port4 = 0, port6 = 0; + bool isDldDc = (dc >= MTP::dldStart) && (dc < MTP::dldEnd); + int32 baseDc = (dc % _mtp_internal::dcShift); + + static const int IPv4address = 0, IPv6address = 1; + static const int TcpProtocol = 0, HttpProtocol = 1; + int32 flags[2][2] = { { 0 } }; + string ip[2][2]; + uint32 port[2][2] = { { 0 } }; { QReadLocker lock(mtpDcOptionsMutex()); const mtpDcOptions &options(cDcOptions()); - mtpDcOptions::const_iterator dcIndex4 = options.constFind(dc % _mtp_internal::dcShift); - if (dcIndex4 != options.cend()) { - ip4 = dcIndex4->ip; - flags4 = dcIndex4->flags; - port4 = dcIndex4->port; - } - mtpDcOptions::const_iterator dcIndex6 = options.constFind((dc % _mtp_internal::dcShift) + (_mtp_internal::dcShift * MTPDdcOption::flag_ipv6)); - if (dcIndex6 != options.cend()) { - ip6 = dcIndex6->ip; - flags6 = dcIndex6->flags; - port6 = dcIndex6->port; + int32 shifts[2][2][4] = { + { // IPv4 + { // TCP IPv4 + isDldDc ? (MTPDdcOption::flag_media_only | MTPDdcOption::flag_tcpo_only) : -1, + MTPDdcOption::flag_tcpo_only, + isDldDc ? (MTPDdcOption::flag_media_only) : -1, + 0 + }, { // HTTP IPv4 + -1, + -1, + isDldDc ? (MTPDdcOption::flag_media_only) : -1, + 0 + }, + }, { // IPv6 + { // TCP IPv6 + isDldDc ? (MTPDdcOption::flag_media_only | MTPDdcOption::flag_tcpo_only | MTPDdcOption::flag_ipv6) : -1, + MTPDdcOption::flag_tcpo_only | MTPDdcOption::flag_ipv6, + isDldDc ? (MTPDdcOption::flag_media_only | MTPDdcOption::flag_ipv6) : -1, + MTPDdcOption::flag_ipv6 + }, { // HTTP IPv6 + -1, + -1, + isDldDc ? (MTPDdcOption::flag_media_only | MTPDdcOption::flag_ipv6) : -1, + MTPDdcOption::flag_ipv6 + }, + }, + }; + for (int32 address = 0, acount = sizeof(shifts) / sizeof(shifts[0]); address < acount; ++address) { + for (int32 protocol = 0, pcount = sizeof(shifts[0]) / sizeof(shifts[0][0]); protocol < pcount; ++protocol) { + for (int32 shift = 0, scount = sizeof(shifts[0][0]) / sizeof(shifts[0][0][0]); shift < scount; ++shift) { + int32 mask = shifts[address][protocol][shift]; + if (mask < 0) continue; + + mtpDcOptions::const_iterator index = options.constFind(baseDc + _mtp_internal::dcShift * mask); + if (index != options.cend()) { + ip[address][protocol] = index->ip; + flags[address][protocol] = index->flags; + port[address][protocol] = index->port; + break; + } + } + } } } - bool noIPv4 = (!port4 || ip4.empty()), noIPv6 = (!cTryIPv6() || !port6 || ip6.empty()); + bool noIPv4 = !port[IPv4address][HttpProtocol], noIPv6 = (!cTryIPv6() || !port[IPv6address][HttpProtocol]); if (noIPv4 && noIPv6) { if (afterConfig) { - if (noIPv4) LOG(("MTP Error: DC %1 options for IPv4 not found right after config load!").arg(dc)); - if (cTryIPv6() && noIPv6) LOG(("MTP Error: DC %1 options for IPv6 not found right after config load!").arg(dc)); + if (noIPv4) LOG(("MTP Error: DC %1 options for IPv4 over HTTP not found right after config load!").arg(dc)); + if (cTryIPv6() && noIPv6) LOG(("MTP Error: DC %1 options for IPv6 over HTTP not found right after config load!").arg(dc)); return restart(); } - if (noIPv4) DEBUG_LOG(("MTP Info: DC %1 options for IPv4 not found, waiting for config").arg(dc)); - if (cTryIPv6() && noIPv6) DEBUG_LOG(("MTP Info: DC %1 options for IPv6 not found, waiting for config").arg(dc)); + if (noIPv4) DEBUG_LOG(("MTP Info: DC %1 options for IPv4 over HTTP not found, waiting for config").arg(dc)); + if (cTryIPv6() && noIPv6) DEBUG_LOG(("MTP Info: DC %1 options for IPv6 over HTTP not found, waiting for config").arg(dc)); connect(mtpConfigLoader(), SIGNAL(loaded()), this, SLOT(onConfigLoaded())); mtpConfigLoader()->load(); return; @@ -1998,19 +2045,21 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) { _pingId = _pingMsgId = _pingIdToSend = _pingSendAt = 0; _pingSender.stop(); - if (!noIPv4) DEBUG_LOG(("MTP Info: creating IPv4 connection to %1:%2..").arg(ip4.c_str()).arg(port4)); - if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv6 connection to [%1]:%2..").arg(ip6.c_str()).arg(port6)); + if (!noIPv4) DEBUG_LOG(("MTP Info: creating IPv4 connection to %1:%2 (tcp) and %1:%2 (http)..").arg(ip[IPv4address][TcpProtocol].c_str()).arg(port[IPv4address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); + if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv4 connection to [%1]:%2 (tcp) and [%1]:%2 (http)..").arg(ip[IPv6address][TcpProtocol].c_str()).arg(port[IPv6address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); _waitForConnectedTimer.start(_waitForConnected); if (_conn4) { connect(_conn4, SIGNAL(connected()), this, SLOT(onConnected4())); connect(_conn4, SIGNAL(disconnected()), this, SLOT(onDisconnected4())); - _conn4->connectToServer(ip4.c_str(), port4, flags4); + _conn4->connectTcp(ip[IPv4address][TcpProtocol].c_str(), port[IPv4address][TcpProtocol], flags[IPv4address][TcpProtocol]); + _conn4->connectHttp(ip[IPv4address][HttpProtocol].c_str(), port[IPv4address][HttpProtocol], flags[IPv4address][HttpProtocol]); } if (_conn6) { connect(_conn6, SIGNAL(connected()), this, SLOT(onConnected6())); connect(_conn6, SIGNAL(disconnected()), this, SLOT(onDisconnected6())); - _conn6->connectToServer(ip6.c_str(), port6, flags6); + _conn6->connectTcp(ip[IPv6address][TcpProtocol].c_str(), port[IPv6address][TcpProtocol], flags[IPv6address][TcpProtocol]); + _conn6->connectHttp(ip[IPv6address][HttpProtocol].c_str(), port[IPv6address][HttpProtocol], flags[IPv6address][HttpProtocol]); } } diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.h b/Telegram/SourceFiles/mtproto/mtpConnection.h index 5674fc4012a96a..1d2d684cf7d21f 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.h +++ b/Telegram/SourceFiles/mtproto/mtpConnection.h @@ -113,7 +113,8 @@ class MTPabstractConnection : public QObject { virtual void sendData(mtpBuffer &buffer) = 0; // has size + 3, buffer[0] = len, buffer[1] = packetnum, buffer[last] = crc32 virtual void disconnectFromServer() = 0; - virtual void connectToServer(const QString &addr, int32 port, int32 flags) = 0; + virtual void connectTcp(const QString &addr, int32 port, int32 flags) = 0; + virtual void connectHttp(const QString &addr, int32 port, int32 flags) = 0; virtual bool isConnected() const = 0; virtual bool usingHttpWait() { return false; @@ -181,7 +182,8 @@ class MTPautoConnection : public MTPabstractTcpConnection { void sendData(mtpBuffer &buffer); void disconnectFromServer(); - void connectToServer(const QString &addr, int32 port, int32 flags); + void connectTcp(const QString &addr, int32 port, int32 flags); + void connectHttp(const QString &addr, int32 port, int32 flags); bool isConnected() const; bool usingHttpWait(); bool needHttpWait(); @@ -228,8 +230,9 @@ public slots: typedef QSet Requests; Requests requests; - QString _addr; - int32 _port, _tcpTimeout, _flags; + QString _addrTcp, _addrHttp; + int32 _portTcp, _portHttp, _flagsTcp, _flagsHttp; + int32 _tcpTimeout; QTimer tcpTimeoutTimer; }; @@ -243,7 +246,9 @@ class MTPtcpConnection : public MTPabstractTcpConnection { void sendData(mtpBuffer &buffer); void disconnectFromServer(); - void connectToServer(const QString &addr, int32 port, int32 flags); + void connectTcp(const QString &addr, int32 port, int32 flags); + void connectHttp(const QString &addr, int32 port, int32 flags) { // not supported + } bool isConnected() const; int32 debugState() const; @@ -288,7 +293,9 @@ class MTPhttpConnection : public MTPabstractConnection { void sendData(mtpBuffer &buffer); void disconnectFromServer(); - void connectToServer(const QString &addr, int32 port, int32 flags); + void connectTcp(const QString &addr, int32 port, int32 flags) { // not supported + } + void connectHttp(const QString &addr, int32 port, int32 flags); bool isConnected() const; bool usingHttpWait(); bool needHttpWait(); diff --git a/Telegram/SourceFiles/mtproto/mtpDC.cpp b/Telegram/SourceFiles/mtproto/mtpDC.cpp index 899e21a2ca26c6..0cb0c3bff54f2a 100644 --- a/Telegram/SourceFiles/mtproto/mtpDC.cpp +++ b/Telegram/SourceFiles/mtproto/mtpDC.cpp @@ -258,16 +258,20 @@ void MTProtoConfigLoader::enumDC() { } else { MTP::killSession(MTP::cfg + _enumCurrent); } + OrderedSet dcs; { QReadLocker lock(mtpDcOptionsMutex()); const mtpDcOptions &options(cDcOptions()); for (mtpDcOptions::const_iterator i = options.cbegin(), e = options.cend(); i != e; ++i) { - if (i.key() == _enumCurrent) { - _enumCurrent = (++i == e) ? options.cbegin().key() : i.key(); - break; - } + dcs.insert(i.key() % _mtp_internal::dcShift); } } + OrderedSet::const_iterator i = dcs.constFind(_enumCurrent); + if (i == dcs.cend() || (++i) == dcs.cend()) { + _enumCurrent = dcs.cbegin().key(); + } else { + _enumCurrent = i.key(); + } _enumRequest = MTP::send(MTPhelp_GetConfig(), rpcDone(configLoaded), rpcFail(configFailed), MTP::cfg + _enumCurrent); _enumDCTimer.start(MTPEnumDCTimeout); From 9c8ae7f32b3562971b5a7a40304094882aa491e8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 23 Feb 2016 17:31:06 +0300 Subject: [PATCH 098/133] improved media caption edit in box, need to make post edit in message field --- Telegram/Resources/lang.strings | 3 + Telegram/SourceFiles/boxes/abstractbox.cpp | 8 ++ Telegram/SourceFiles/boxes/photosendbox.cpp | 137 +++++++++++--------- Telegram/SourceFiles/boxes/photosendbox.h | 12 +- Telegram/SourceFiles/gui/text.cpp | 52 ++++++++ Telegram/SourceFiles/gui/text.h | 1 + Telegram/SourceFiles/historywidget.cpp | 8 +- 7 files changed, 157 insertions(+), 64 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 30f567731ab4c2..e89b8be690055d 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -124,6 +124,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_flood_error" = "Too many tries. Please try again later."; "lng_gif_error" = "An error has occured while reading GIF animation :("; "lng_edit_error" = "You cannot edit this message"; +"lng_edit_deleted" = "This message was deleted"; +"lng_edit_too_long" = "Your message text is too long"; +"lng_edit_message" = "Edit message"; "lng_deleted" = "Unknown"; "lng_deleted_message" = "Deleted message"; diff --git a/Telegram/SourceFiles/boxes/abstractbox.cpp b/Telegram/SourceFiles/boxes/abstractbox.cpp index ca02a614a79a41..e9d1783ad5a57d 100644 --- a/Telegram/SourceFiles/boxes/abstractbox.cpp +++ b/Telegram/SourceFiles/boxes/abstractbox.cpp @@ -178,6 +178,14 @@ void AbstractBox::resizeMaxHeight(int32 newWidth, int32 maxHeight) { _maxHeight = maxHeight; resize(newWidth, countHeight()); if (parentWidget()) { + QRect r = geometry(); + int32 parenth = parentWidget()->height(); + if (r.top() + r.height() + st::boxVerticalMargin > parenth) { + int32 newTop = qMax(parenth - int(st::boxVerticalMargin) - r.height(), (parenth - r.height()) / 2); + if (newTop != r.top()) { + move(r.left(), newTop); + } + } parentWidget()->update(geometry().united(g).marginsAdded(QMargins(st::boxShadow.pxWidth(), st::boxShadow.pxHeight(), st::boxShadow.pxWidth(), st::boxShadow.pxHeight()))); } } diff --git a/Telegram/SourceFiles/boxes/photosendbox.cpp b/Telegram/SourceFiles/boxes/photosendbox.cpp index 4bc63c021d89b5..a64a17f357a1eb 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.cpp +++ b/Telegram/SourceFiles/boxes/photosendbox.cpp @@ -360,12 +360,12 @@ void PhotoSendBox::onSend(bool ctrlShiftEnter) { onClose(); } -EditPostBox::EditPostBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) -, _msg(msg) +EditCaptionBox::EditCaptionBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) +, _msgId(msg->fullId()) , _animated(false) , _photo(false) , _doc(false) -, _text(0) +, _field(0) , _save(this, lang(lng_settings_save), st::defaultBoxButton) , _cancel(this, lang(lng_cancel), st::cancelBoxButton) , _thumbx(0) @@ -383,7 +383,7 @@ EditPostBox::EditPostBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) ImagePtr image; QString caption; DocumentData *doc = 0; - if (HistoryMedia *media = _msg->getMedia()) { + if (HistoryMedia *media = msg->getMedia()) { HistoryMediaType t = media->type(); switch (t) { case MediaTypeGif: { @@ -489,45 +489,51 @@ EditPostBox::EditPostBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) } if (_animated || _photo || _doc) { - _text = new InputArea(this, st::confirmCaptionArea, lang(lng_photo_caption), caption); - _text->setMaxLength(MaxPhotoCaption); - _text->setCtrlEnterSubmit(CtrlEnterSubmitBoth); + _field = new InputArea(this, st::confirmCaptionArea, lang(lng_photo_caption), caption); + _field->setMaxLength(MaxPhotoCaption); + _field->setCtrlEnterSubmit(CtrlEnterSubmitBoth); } else { - _text = new InputArea(this, st::editTextArea, lang(lng_edit_placeholder), msg->originalText()); - _text->setMaxLength(MaxMessageSize); - _text->setCtrlEnterSubmit(cCtrlEnter() ? CtrlEnterSubmitCtrlEnter : CtrlEnterSubmitEnter); + QString text = textApplyEntities(msg->originalText(), msg->originalEntities()); + _field = new InputArea(this, st::editTextArea, lang(lng_edit_placeholder), text); +// _field->setMaxLength(MaxMessageSize); // entities can make text in input field larger but still valid + _field->setCtrlEnterSubmit(cCtrlEnter() ? CtrlEnterSubmitCtrlEnter : CtrlEnterSubmitEnter); } updateBoxSize(); - connect(_text, SIGNAL(resized()), this, SLOT(onCaptionResized())); - connect(_text, SIGNAL(submitted(bool)), this, SLOT(onSave(bool))); - connect(_text, SIGNAL(cancelled()), this, SLOT(onClose())); + connect(_field, SIGNAL(submitted(bool)), this, SLOT(onSave(bool))); + connect(_field, SIGNAL(cancelled()), this, SLOT(onClose())); + connect(_field, SIGNAL(resized()), this, SLOT(onCaptionResized())); - QTextCursor c(_text->textCursor()); + QTextCursor c(_field->textCursor()); c.movePosition(QTextCursor::End); - _text->setTextCursor(c); + _field->setTextCursor(c); prepare(); } -void EditPostBox::onCaptionResized() { +bool EditCaptionBox::captionFound() const { + return _animated || _photo || _doc; +} + +void EditCaptionBox::onCaptionResized() { updateBoxSize(); resizeEvent(0); update(); } -void EditPostBox::updateBoxSize() { +void EditCaptionBox::updateBoxSize() { + int32 bottomh = st::boxPhotoCompressedPadding.bottom() + _field->height() + st::normalFont->height + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom(); if (_photo || _animated) { - setMaxHeight(st::boxPhotoPadding.top() + _thumbh + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + setMaxHeight(st::boxPhotoPadding.top() + _thumbh + bottomh); } else if (_thumbw) { - setMaxHeight(st::boxPhotoPadding.top() + st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom() + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + setMaxHeight(st::boxPhotoPadding.top() + 0 + st::msgFileThumbSize + 0 + bottomh); } else if (_doc) { - setMaxHeight(st::boxPhotoPadding.top() + st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom() + st::boxPhotoPadding.bottom() + st::boxPhotoCompressedPadding.bottom() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + setMaxHeight(st::boxPhotoPadding.top() + 0 + st::msgFileSize + 0 + bottomh); } else { - setMaxHeight(st::boxPhotoPadding.top() + _text->height() + st::boxButtonPadding.top() + _save.height() + st::boxButtonPadding.bottom()); + setMaxHeight(st::boxPhotoPadding.top() + st::boxTitleFont->height + bottomh); } } -void EditPostBox::paintEvent(QPaintEvent *e) { +void EditCaptionBox::paintEvent(QPaintEvent *e) { Painter p(this); if (paint(p)) return; @@ -552,93 +558,108 @@ void EditPostBox::paintEvent(QPaintEvent *e) { } } else if (_doc) { int32 w = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(); - int32 h = _thumbw ? (st::msgFileThumbPadding.top() + st::msgFileThumbSize + st::msgFileThumbPadding.bottom()) : (st::msgFilePadding.top() + st::msgFileSize + st::msgFilePadding.bottom()); - int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0, linktop = 0; + int32 h = _thumbw ? (0 + st::msgFileThumbSize + 0) : (0 + st::msgFileSize + 0); + int32 nameleft = 0, nametop = 0, nameright = 0, statustop = 0; if (_thumbw) { - nameleft = st::msgFileThumbPadding.left() + st::msgFileThumbSize + st::msgFileThumbPadding.right(); - nametop = st::msgFileThumbNameTop; - nameright = st::msgFileThumbPadding.left(); - statustop = st::msgFileThumbStatusTop; - linktop = st::msgFileThumbLinkTop; + nameleft = 0 + st::msgFileThumbSize + st::msgFileThumbPadding.right(); + nametop = st::msgFileThumbNameTop - st::msgFileThumbPadding.top(); + nameright = 0; + statustop = st::msgFileThumbStatusTop - st::msgFileThumbPadding.top(); } else { - nameleft = st::msgFilePadding.left() + st::msgFileSize + st::msgFilePadding.right(); - nametop = st::msgFileNameTop; - nameright = st::msgFilePadding.left(); - statustop = st::msgFileStatusTop; + nameleft = 0 + st::msgFileSize + st::msgFilePadding.right(); + nametop = st::msgFileNameTop - st::msgFilePadding.top(); + nameright = 0; + statustop = st::msgFileStatusTop - st::msgFilePadding.top(); } - int32 namewidth = w - nameleft - (_thumbw ? st::msgFileThumbPadding.left() : st::msgFilePadding.left()); + int32 namewidth = w - nameleft - 0; if (namewidth > _statusw) { - w -= (namewidth - _statusw); - namewidth = _statusw; + //w -= (namewidth - _statusw); + //namewidth = _statusw; } int32 x = (width() - w) / 2, y = st::boxPhotoPadding.top(); - App::roundRect(p, x, y, w, h, st::msgOutBg, MessageOutCorners, &st::msgOutShadow); +// App::roundRect(p, x, y, w, h, st::msgInBg, MessageInCorners, &st::msgInShadow); if (_thumbw) { - QRect rthumb(rtlrect(x + st::msgFileThumbPadding.left(), y + st::msgFileThumbPadding.top(), st::msgFileThumbSize, st::msgFileThumbSize, width())); + QRect rthumb(rtlrect(x + 0, y + 0, st::msgFileThumbSize, st::msgFileThumbSize, width())); p.drawPixmap(rthumb.topLeft(), _thumb); } else { - QRect inner(rtlrect(x + st::msgFilePadding.left(), y + st::msgFilePadding.top(), st::msgFileSize, st::msgFileSize, width())); + QRect inner(rtlrect(x + 0, y + 0, st::msgFileSize, st::msgFileSize, width())); p.setPen(Qt::NoPen); - p.setBrush(st::msgFileOutBg); + p.setBrush(st::msgFileInBg); p.setRenderHint(QPainter::HighQualityAntialiasing); p.drawEllipse(inner); p.setRenderHint(QPainter::HighQualityAntialiasing, false); - p.drawSpriteCenter(inner, _isImage ? st::msgFileOutImage : st::msgFileOutFile); + p.drawSpriteCenter(inner, _isImage ? st::msgFileInImage : st::msgFileInFile); } p.setFont(st::semiboldFont); p.setPen(st::black); _name.drawLeftElided(p, x + nameleft, y + nametop, namewidth, width()); - style::color status(st::mediaOutFg); + style::color status(st::mediaInFg); p.setFont(st::normalFont); p.setPen(status); p.drawTextLeft(x + nameleft, y + statustop, width(), _status); + } else { + p.setFont(st::boxTitleFont); + p.setPen(st::black); + p.drawTextLeft(_field->x(), st::boxPhotoPadding.top(), width(), lang(lng_edit_message)); + } + + if (!_error.isEmpty()) { + p.setFont(st::normalFont); + p.setPen(st::setErrColor); + p.drawTextLeft(_field->x(), _field->y() + _field->height() + (st::boxButtonPadding.top() / 2), width(), _error); } } -void EditPostBox::resizeEvent(QResizeEvent *e) { +void EditCaptionBox::resizeEvent(QResizeEvent *e) { _save.moveToRight(st::boxButtonPadding.right(), height() - st::boxButtonPadding.bottom() - _save.height()); _cancel.moveToRight(st::boxButtonPadding.right() + _save.width() + st::boxButtonPadding.left(), _save.y()); - _text->resize(st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(), _text->height()); - _text->moveToLeft(st::boxPhotoPadding.left(), _save.y() - st::boxButtonPadding.top() - _text->height()); + _field->resize(st::boxWideWidth - st::boxPhotoPadding.left() - st::boxPhotoPadding.right(), _field->height()); + _field->moveToLeft(st::boxPhotoPadding.left(), _save.y() - st::boxButtonPadding.top() - st::normalFont->height - _field->height()); } -void EditPostBox::hideAll() { +void EditCaptionBox::hideAll() { _save.hide(); _cancel.hide(); - _text->hide(); + _field->hide(); } -void EditPostBox::showAll() { +void EditCaptionBox::showAll() { _save.show(); _cancel.show(); - _text->show(); + _field->show(); } -void EditPostBox::showDone() { +void EditCaptionBox::showDone() { setInnerFocus(); } -void EditPostBox::onSave(bool ctrlShiftEnter) { +void EditCaptionBox::onSave(bool ctrlShiftEnter) { if (_saveRequestId) return; + HistoryItem *item = App::histItemById(_msgId); + if (!item) { + _error = lang(lng_edit_deleted); + update(); + return; + } + int32 flags = 0; if (_previewCancelled) { flags |= MTPchannels_EditMessage::flag_no_webpage; } - EntitiesInText sendingEntities; - MTPVector sentEntities = linksToMTP(sendingEntities, true); + MTPVector sentEntities; if (!sentEntities.c_vector().v.isEmpty()) { flags |= MTPmessages_SendMessage::flag_entities; } - _saveRequestId = MTP::send(MTPchannels_EditMessage(MTP_int(flags), _msg->history()->peer->asChannel()->inputChannel, MTP_int(_msg->id), MTP_string(_text->getLastText()), sentEntities), rpcDone(&EditPostBox::saveDone), rpcFail(&EditPostBox::saveFail)); + _saveRequestId = MTP::send(MTPchannels_EditMessage(MTP_int(flags), item->history()->peer->asChannel()->inputChannel, MTP_int(item->id), MTP_string(_field->getLastText()), sentEntities), rpcDone(&EditCaptionBox::saveDone), rpcFail(&EditCaptionBox::saveFail)); } -void EditPostBox::saveDone(const MTPUpdates &updates) { +void EditCaptionBox::saveDone(const MTPUpdates &updates) { _saveRequestId = 0; onClose(); if (App::main()) { @@ -646,7 +667,7 @@ void EditPostBox::saveDone(const MTPUpdates &updates) { } } -bool EditPostBox::saveFail(const RPCError &error) { +bool EditCaptionBox::saveFail(const RPCError &error) { if (mtpIsFlood(error)) return false; _saveRequestId = 0; @@ -657,8 +678,8 @@ bool EditPostBox::saveFail(const RPCError &error) { onClose(); return true; } else if (err == qstr("MESSAGE_EMPTY")) { - _text->setFocus(); - _text->showError(); + _field->setFocus(); + _field->showError(); } else { _error = lang(lng_edit_error); } diff --git a/Telegram/SourceFiles/boxes/photosendbox.h b/Telegram/SourceFiles/boxes/photosendbox.h index 462e8bc503be5e..cc5801b7a7b65b 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.h +++ b/Telegram/SourceFiles/boxes/photosendbox.h @@ -83,17 +83,19 @@ public slots: }; -class EditPostBox : public AbstractBox, public RPCSender { +class EditCaptionBox : public AbstractBox, public RPCSender { Q_OBJECT public: - EditPostBox(HistoryItem *msg); + EditCaptionBox(HistoryItem *msg); void paintEvent(QPaintEvent *e); void resizeEvent(QResizeEvent *e); + bool captionFound() const; + void setInnerFocus() { - _text->setFocus(); + _field->setFocus(); } public slots: @@ -114,12 +116,12 @@ public slots: void saveDone(const MTPUpdates &updates); bool saveFail(const RPCError &error); - HistoryItem *_msg; + FullMsgId _msgId; bool _animated, _photo, _doc; QPixmap _thumb; - InputArea *_text; + InputArea *_field; BoxButton _save, _cancel; int32 _thumbx, _thumby, _thumbw, _thumbh; diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 3939945add6ec5..b65e30f2c8d151 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -5049,6 +5049,58 @@ EntitiesInText textParseEntities(QString &text, int32 flags, bool rich) { // som return result; } +QString textApplyEntities(const QString &text, const EntitiesInText &entities) { + if (entities.isEmpty()) return text; + + QMultiMap closingTags; + QString code(qsl("`")), pre(qsl("```")); + + QString result; + int32 size = text.size(); + const QChar *b = text.constData(), *already = b, *e = b + size; + EntitiesInText::const_iterator entity = entities.cbegin(), end = entities.cend(); + while (entity != end && ((entity->type != EntityInTextCode && entity->type != EntityInTextPre) || entity->length <= 0 || entity->offset >= size)) { + ++entity; + } + while (entity != end || !closingTags.isEmpty()) { + int32 nextOpenEntity = (entity == end) ? (size + 1) : entity->offset; + int32 nextCloseEntity = closingTags.isEmpty() ? (size + 1) : closingTags.cbegin().key(); + if (nextOpenEntity <= nextCloseEntity) { + QString tag = (entity->type == EntityInTextCode) ? code : pre; + if (result.isEmpty()) result.reserve(text.size() + entities.size() * pre.size() * 2); + + const QChar *offset = b + nextOpenEntity; + if (offset > already) { + result.append(already, offset - already); + already = offset; + } + result.append(tag); + closingTags.insert(qMin(entity->offset + entity->length, size), tag); + + ++entity; + while (entity != end && ((entity->type != EntityInTextCode && entity->type != EntityInTextPre) || entity->length <= 0 || entity->offset >= size)) { + ++entity; + } + } else { + const QChar *offset = b + nextCloseEntity; + if (offset > already) { + result.append(already, offset - already); + already = offset; + } + result.append(closingTags.cbegin().value()); + closingTags.erase(closingTags.begin()); + } + } + if (result.isEmpty()) { + return text; + } + const QChar *offset = b + size; + if (offset > already) { + result.append(already, offset - already); + } + return result; +} + void emojiDraw(QPainter &p, EmojiPtr e, int x, int y) { p.drawPixmap(QPoint(x, y), App::emoji(), QRect(e->x * ESize, e->y * ESize, ESize, ESize)); } diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index 731e9962174e30..7e270d81e9afa1 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -110,6 +110,7 @@ inline MTPVector linksToMTP(const EntitiesInText &links, bool return result; } EntitiesInText textParseEntities(QString &text, int32 flags, bool rich = false); // changes text if (flags & TextParseMono) +QString textApplyEntities(const QString &text, const EntitiesInText &entities); #include "gui/emoji_config.h" diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index fd713cf66199f5..bba4594afaa139 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -6637,7 +6637,13 @@ void HistoryWidget::onEditMessage() { HistoryItem *to = App::contextItem(); if (!to || !to->history()->peer->isChannel()) return; - Ui::showLayer(new EditPostBox(to)); + EditCaptionBox *box = new EditCaptionBox(to); + if (box->captionFound()) { + Ui::showLayer(box); + } else { + delete box; + // edit post + } } bool HistoryWidget::lastForceReplyReplied(const FullMsgId &replyTo) const { From 4ec579112c4c1505cbebf3168899323c8eb4bf3d Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 13:32:31 +0300 Subject: [PATCH 099/133] beta 9026001 message/post edit done --- Telegram/Resources/lang.strings | 4 + Telegram/Resources/style.txt | 1 + Telegram/SourceFiles/art/sprite.png | Bin 180813 -> 181268 bytes Telegram/SourceFiles/art/sprite_200x.png | Bin 243908 -> 245187 bytes Telegram/SourceFiles/config.h | 2 +- Telegram/SourceFiles/history.cpp | 15 +- Telegram/SourceFiles/history.h | 58 +- Telegram/SourceFiles/historywidget.cpp | 576 ++++++++++++++------ Telegram/SourceFiles/historywidget.h | 28 +- Telegram/SourceFiles/localstorage.cpp | 172 ++++-- Telegram/SourceFiles/localstorage.h | 13 +- Telegram/SourceFiles/mainwidget.cpp | 8 +- Telegram/SourceFiles/structs.h | 4 + Telegram/SourceFiles/types.cpp | 2 + Telegram/SourceFiles/types.h | 16 + Telegram/Telegram.rc | 8 +- Telegram/Telegram.xcodeproj/project.pbxproj | 10 +- Telegram/Version | 2 +- 18 files changed, 660 insertions(+), 259 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index e89b8be690055d..cfc0023038b9b6 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -127,6 +127,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_deleted" = "This message was deleted"; "lng_edit_too_long" = "Your message text is too long"; "lng_edit_message" = "Edit message"; +"lng_edit_message_text" = "New message text.."; "lng_deleted" = "Unknown"; "lng_deleted_message" = "Deleted message"; @@ -653,6 +654,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_comment_ph" = "Write a comment.."; "lng_broadcast_ph" = "Broadcast a message.."; "lng_record_cancel" = "Release outside this field to cancel"; +"lng_will_be_notified" = "Members will be notified when you post"; +"lng_wont_be_notified" = "Members will not be notified when you post"; "lng_empty_history" = ""; "lng_willbe_history" = "Please select a chat to start messaging"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -712,6 +715,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Open Link"; "lng_context_copy_link" = "Copy Link"; +"lng_context_copy_post_link" = "Copy Post Link"; "lng_context_open_email" = "Write to this address"; "lng_context_copy_email" = "Copy email address"; "lng_context_open_hashtag" = "Search by hashtag"; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 56382786654502..2068c1fe5b20ca 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1429,6 +1429,7 @@ replyTop: 8px; replyBottom: 6px; replyIconPos: point(13px, 13px); replyIcon: sprite(343px, 197px, 24px, 24px); +editIcon: sprite(371px, 286px, 24px, 24px); replyCancel: iconedButton(btnDefIconed) { icon: sprite(165px, 24px, 14px, 14px); iconPos: point(17px, 17px); diff --git a/Telegram/SourceFiles/art/sprite.png b/Telegram/SourceFiles/art/sprite.png index ce32997180845c214bfe77e720afd2f259214f31..11d3fbb61b14acdf5d354db367b911179094fe38 100644 GIT binary patch delta 15980 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®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 delta 15516 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 diff --git a/Telegram/SourceFiles/art/sprite_200x.png b/Telegram/SourceFiles/art/sprite_200x.png index 16b454f0570083120156ac334862d07f4734f772..daa7b16f35a39439cd138bb9030cfda00ecc16d0 100644 GIT binary patch delta 36648 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 delta 35380 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 || (peer->isUser() && peer->asUser()->botInfo)) { outboxReadBefore = INT_MAX; } @@ -2674,6 +2674,12 @@ void History::removeBlock(HistoryBlock *block) { delete block; } +History::~History() { + clear(); + deleteAndMark(msgDraft); + deleteAndMark(editDraft); +} + int32 HistoryBlock::geomResize(int32 newWidth, int32 *ytransform, const HistoryItem *resizedItem) { int32 y = 0; for (Items::iterator i = items.begin(), e = items.end(); i != e; ++i) { @@ -2926,7 +2932,8 @@ bool HistoryItem::canEdit(const QDateTime &cur) const { t != MediaTypeFile && t != MediaTypeGif && t != MediaTypeMusicFile && - t != MediaTypeVoiceFile) { + t != MediaTypeVoiceFile && + t != MediaTypeWebPage) { return false; } } diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index d1e410d1fdf8dd..6bf69c08f5472e 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -149,6 +149,42 @@ struct SendAction { int32 progress; }; +struct HistoryDraft { + HistoryDraft() : msgId(0), previewCancelled(false) { + } + HistoryDraft(const QString &text, MsgId msgId, const MessageCursor &cursor, bool previewCancelled) + : text(text) + , msgId(msgId) + , cursor(cursor) + , previewCancelled(previewCancelled) { + } + HistoryDraft(const FlatTextarea &field, MsgId msgId, bool previewCancelled) + : text(field.getLastText()) + , msgId(msgId) + , cursor(field) + , previewCancelled(previewCancelled) { + } + QString text; + MsgId msgId; // replyToId for message draft, editMsgId for edit draft + MessageCursor cursor; + bool previewCancelled; +}; +struct HistoryEditDraft : public HistoryDraft { + HistoryEditDraft() + : HistoryDraft() + , saveRequest(0) { + } + HistoryEditDraft(const QString &text, MsgId msgId, const MessageCursor &cursor, bool previewCancelled, mtpRequestId saveRequest = 0) + : HistoryDraft(text, msgId, cursor, previewCancelled) + , saveRequest(saveRequest) { + } + HistoryEditDraft(const FlatTextarea &field, MsgId msgId, bool previewCancelled, mtpRequestId saveRequest = 0) + : HistoryDraft(field, msgId, previewCancelled) + , saveRequest(saveRequest) { + } + mtpRequestId saveRequest; +}; + class HistoryMedia; class HistoryMessage; class HistoryUnreadBar; @@ -184,9 +220,7 @@ class History { void blockResized(HistoryBlock *block, int32 dh); void removeBlock(HistoryBlock *block); - virtual ~History() { - clear(); - } + virtual ~History(); HistoryItem *createItem(HistoryBlock *block, const MTPMessage &msg, bool applyServiceAction); HistoryItem *createItemForwarded(HistoryBlock *block, MsgId id, int32 flags, QDateTime date, int32 from, HistoryMessage *msg); @@ -284,10 +318,20 @@ class History { typedef QList NotifyQueue; NotifyQueue notifies; - QString draft; - MsgId draftToId; - MessageCursor draftCursor; - bool draftPreviewCancelled; + HistoryDraft *msgDraft; + HistoryEditDraft *editDraft; + HistoryDraft *draft() { + return editDraft ? editDraft : msgDraft; + } + void setMsgDraft(HistoryDraft *draft) { + if (msgDraft) delete msgDraft; + msgDraft = draft; + } + void setEditDraft(HistoryEditDraft *draft) { + if (editDraft) delete editDraft; + editDraft = draft; + } + int32 lastWidth, lastScrollTop; MsgId lastShowAtMsgId; bool mute; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index bba4594afaa139..b21d9f3cd59349 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -2609,9 +2609,11 @@ void CollapseButton::paintEvent(QPaintEvent *e) { HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _replyToId(0) -, _replyTo(0) , _replyToNameVersion(0) -, _replyForwardPreviewCancel(this, st::replyCancel) +, _editMsgId(0) +, _replyEditMsg(0) +, _fieldBarCancel(this, st::replyCancel) +, _saveEditMsgRequestId(0) , _reportSpamStatus(dbiprsUnknown) , _previewData(0) , _previewRequest(0) @@ -2661,7 +2663,10 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _field(this, st::taMsgField, lang(lng_message_ph)) , _a_record(animation(this, &HistoryWidget::step_record)) , _a_recording(animation(this, &HistoryWidget::step_recording)) -, _recording(false), _inRecord(false), _inField(false), _inReply(false) +, _recording(false) +, _inRecord(false) +, _inField(false) +, _inReplyEdit(false) , a_recordingLevel(0, 0), _recordingSamples(0) , a_recordOver(0, 0), a_recordDown(0, 0), a_recordCancel(st::recordCancel->c, st::recordCancel->c) , _recordCancelWidth(st::recordFont->width(lang(lng_record_cancel))) @@ -2697,7 +2702,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) connect(&_reportSpamPanel, SIGNAL(clearClicked()), this, SLOT(onReportSpamClear())); connect(&_toHistoryEnd, SIGNAL(clicked()), this, SLOT(onHistoryToEnd())); connect(&_collapseComments, SIGNAL(clicked()), this, SLOT(onCollapseComments())); - connect(&_replyForwardPreviewCancel, SIGNAL(clicked()), this, SLOT(onReplyForwardPreviewCancel())); + connect(&_fieldBarCancel, SIGNAL(clicked()), this, SLOT(onFieldBarCancel())); connect(&_send, SIGNAL(clicked()), this, SLOT(onSend())); connect(&_unblock, SIGNAL(clicked()), this, SLOT(onUnblock())); connect(&_botStart, SIGNAL(clicked()), this, SLOT(onBotStart())); @@ -2745,7 +2750,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) connect(&_field, SIGNAL(cursorPositionChanged()), this, SLOT(onDraftSaveDelayed())); connect(&_field, SIGNAL(cursorPositionChanged()), this, SLOT(onCheckMentionDropdown()), Qt::QueuedConnection); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); _scroll.hide(); _scroll.move(0, 0); @@ -2897,20 +2902,20 @@ void HistoryWidget::onTextChange() { updateStickersByEmoji(); if (_peer && (!_peer->isChannel() || _peer->isMegagroup() || !_peer->asChannel()->canPublish() || (!_peer->asChannel()->isBroadcast() && !_broadcast.checked()))) { - if (!_inlineBot && (_textUpdateEventsFlags & TextUpdateEventsSendTyping)) { + if (!_inlineBot && !_editMsgId && (_textUpdateEventsFlags & TextUpdateEventsSendTyping)) { updateSendAction(_history, SendActionTyping); } } if (cHasAudioCapture()) { - if (!_field.hasSendText() && !readyToForward()) { + if (!_field.hasSendText() && !readyToForward() && !_editMsgId) { _previewCancelled = false; _send.hide(); - setMouseTracking(true); + updateMouseTracking(); mouseMoveEvent(0); } else if (!_field.isHidden() && _send.isHidden()) { _send.show(); - setMouseTracking(false); + updateMouseTracking(); _a_record.stop(); _inRecord = _inField = false; a_recordOver = a_recordDown = anim::fvalue(0, 0); @@ -2931,7 +2936,9 @@ void HistoryWidget::onTextChange() { void HistoryWidget::onDraftSaveDelayed() { if (!_peer || !(_textUpdateEventsFlags & TextUpdateEventsSaveDraft)) return; if (!_field.textCursor().anchor() && !_field.textCursor().position() && !_field.verticalScrollBar()->value()) { - if (!Local::hasDraftPositions(_peer->id)) return; + if (!Local::hasDraftCursors(_peer->id)) { + return; + } } onDraftSave(true); } @@ -2947,30 +2954,77 @@ void HistoryWidget::onDraftSave(bool delayed) { return _saveDraftTimer.start(SaveDraftTimeout); } } - writeDraft(); + writeDrafts(Nil, Nil); } -void HistoryWidget::writeDraft(MsgId *replyTo, const QString *text, const MessageCursor *cursor, bool *previewCancelled) { +void HistoryWidget::writeDrafts(HistoryDraft **msgDraft, HistoryEditDraft **editDraft) { + if (!msgDraft && _editMsgId) msgDraft = &_history->msgDraft; + bool save = _peer && (_saveDraftStart > 0); _saveDraftStart = 0; _saveDraftTimer.stop(); if (_saveDraftText) { if (save) { - Local::writeDraft(_peer->id, Local::MessageDraft(replyTo ? (*replyTo) : _replyToId, text ? (*text) : _field.getLastText(), previewCancelled ? (*previewCancelled) : _previewCancelled)); + Local::MessageDraft localMsgDraft, localEditDraft; + if (msgDraft) { + if (*msgDraft) { + localMsgDraft = Local::MessageDraft((*msgDraft)->msgId, (*msgDraft)->text, (*msgDraft)->previewCancelled); + } + } else { + localMsgDraft = Local::MessageDraft(_replyToId, _field.getLastText(), _previewCancelled); + } + if (editDraft) { + if (*editDraft) { + localEditDraft = Local::MessageDraft((*editDraft)->msgId, (*editDraft)->text, (*editDraft)->previewCancelled); + } + } else if (_editMsgId) { + localEditDraft = Local::MessageDraft(_editMsgId, _field.getLastText(), _previewCancelled); + } + Local::writeDrafts(_peer->id, localMsgDraft, localEditDraft); if (_migrated) { - Local::writeDraft(_migrated->peer->id, Local::MessageDraft()); + Local::writeDrafts(_migrated->peer->id, Local::MessageDraft(), Local::MessageDraft()); } } _saveDraftText = false; } if (save) { - Local::writeDraftPositions(_peer->id, cursor ? (*cursor) : MessageCursor(_field)); + MessageCursor msgCursor, editCursor; + if (msgDraft) { + if (*msgDraft) { + msgCursor = (*msgDraft)->cursor; + } + } else { + msgCursor = MessageCursor(_field); + } + if (editDraft) { + if (*editDraft) { + editCursor = (*editDraft)->cursor; + } + } else if (_editMsgId) { + editCursor = MessageCursor(_field); + } + Local::writeDraftCursors(_peer->id, msgCursor, editCursor); if (_migrated) { - Local::writeDraftPositions(_migrated->peer->id, MessageCursor()); + Local::writeDraftCursors(_migrated->peer->id, MessageCursor(), MessageCursor()); } } } +void HistoryWidget::writeDrafts(History *history) { + Local::MessageDraft localMsgDraft, localEditDraft; + MessageCursor msgCursor, editCursor; + if (history->msgDraft) { + localMsgDraft = Local::MessageDraft(history->msgDraft->msgId, history->msgDraft->text, history->msgDraft->previewCancelled); + msgCursor = history->msgDraft->cursor; + } + if (history->editDraft) { + localEditDraft = Local::MessageDraft(history->editDraft->msgId, history->editDraft->text, history->editDraft->previewCancelled); + editCursor = history->editDraft->cursor; + } + Local::writeDrafts(history->peer->id, localMsgDraft, localEditDraft); + Local::writeDraftCursors(history->peer->id, msgCursor, editCursor); +} + void HistoryWidget::cancelSendAction(History *history, SendActionType type) { QMap, mtpRequestId>::iterator i = _sendActionRequests.find(qMakePair(history, type)); if (i != _sendActionRequests.cend()) { @@ -3374,16 +3428,36 @@ void HistoryWidget::fastShowAtEnd(History *h) { } void HistoryWidget::applyDraft(bool parseLinks) { - if (!_history) return; - setFieldText(_history->draft); - _field.setFocus(); + HistoryDraft *draft = _history ? _history->draft() : 0; + if (!draft) { + setFieldText(QString()); + _field.setFocus(); + _editMsgId = _replyToId = 0; + return; + } + _textUpdateEventsFlags = 0; - _history->draftCursor.applyTo(_field); + setFieldText(draft->text); + _field.setFocus(); + draft->cursor.applyTo(_field); _textUpdateEventsFlags = TextUpdateEventsSaveDraft | TextUpdateEventsSendTyping; - _previewCancelled = _history->draftPreviewCancelled; + _previewCancelled = draft->previewCancelled; + if (_history->editDraft) { + _editMsgId = _history->editDraft->msgId; + _replyToId = 0; + } else { + _editMsgId = 0; + _replyToId = readyToForward() ? 0 : _history->msgDraft->msgId; + } if (parseLinks) { onPreviewParse(); } + if (_editMsgId || _replyToId) { + updateReplyEditTexts(); + if (!_replyEditMsg && App::api()) { + App::api()->requestReplyTo(0, _peer->asChannel(), _editMsgId ? _editMsgId : _replyToId); + } + } } void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool reload) { @@ -3441,13 +3515,22 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re clearAllLoadRequests(); if (_history) { - _history->draft = _field.getLastText(); - if (_migrated) _migrated->draft = QString(); // use migrated draft only once - _history->draftCursor.fillFrom(_field); - _history->draftToId = _replyToId; - _history->draftPreviewCancelled = _previewCancelled; + if (_editMsgId) { + _history->setEditDraft(new HistoryEditDraft(_field, _editMsgId, _previewCancelled, _saveEditMsgRequestId)); + } else { + if (_replyToId || !_field.getLastText().isEmpty()) { + _history->setMsgDraft(new HistoryDraft(_field, _replyToId, _previewCancelled)); + } else { + _history->setMsgDraft(Nil); + } + _history->setEditDraft(Nil); + } + if (_migrated) { + _migrated->setMsgDraft(Nil); // use migrated draft only once + _migrated->setEditDraft(Nil); + } - writeDraft(&_history->draftToId, &_history->draft, &_history->draftCursor, &_history->draftPreviewCancelled); + writeDrafts(&_history->msgDraft, &_history->editDraft); if (_scroll.scrollTop() + 1 <= _scroll.scrollTopMax()) { _history->lastWidth = _list->width(); @@ -3467,16 +3550,14 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re updateBotKeyboard(); } - if (_replyToId) { - _replyTo = 0; - _replyToId = 0; - _replyForwardPreviewCancel.hide(); - } - if (_previewData && _previewData->pendingTill >= 0) { - _previewData = 0; - _replyForwardPreviewCancel.hide(); - } + _editMsgId = 0; + _saveEditMsgRequestId = 0; + _replyToId = 0; + _replyEditMsg = 0; + _previewData = 0; _previewCache.clear(); + _fieldBarCancel.hide(); + if (_list) _list->deleteLater(); _list = 0; _scroll.takeWidget(); @@ -3552,39 +3633,20 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re App::main()->peerUpdated(_peer); - if (_history->draftToId > 0 || !_history->draft.isEmpty()) { - applyDraft(false); - _replyToId = readyToForward() ? 0 : _history->draftToId; - } else if (_migrated && !_migrated->draft.isEmpty()) { - _history->draft = _migrated->draft; - _history->draftCursor = _migrated->draftCursor; - _history->draftPreviewCancelled = _migrated->draftPreviewCancelled; - _history->draftToId = 0; - _migrated->draft = QString(); // use migrated draft only once - applyDraft(false); - _replyToId = 0; - } else { - bool fromMigrated = false; - Local::MessageDraft draft = Local::readDraft(_peer->id); - if (draft.replyTo <= 0 && draft.text.isEmpty() && _migrated) { - fromMigrated = true; - draft = Local::readDraft(_migrated->peer->id); - } - setFieldText(draft.text); - _field.setFocus(); - if (!draft.text.isEmpty()) { - MessageCursor cur = Local::readDraftPositions(fromMigrated ? _migrated->peer->id : _peer->id); - _textUpdateEventsFlags = 0; - cur.applyTo(_field); - _textUpdateEventsFlags = TextUpdateEventsSaveDraft | TextUpdateEventsSendTyping; + Local::readDraftsWithCursors(_history); + if (_migrated) { + Local::readDraftsWithCursors(_migrated); + _migrated->setEditDraft(Nil); + if (_migrated->msgDraft && !_migrated->msgDraft->text.isEmpty()) { + _migrated->msgDraft->msgId = 0; // edit and reply to drafts can't migrate + if (!_history->msgDraft) { + _history->setMsgDraft(new HistoryDraft(*_migrated->msgDraft)); + } } - _replyToId = readyToForward() ? 0 : draft.replyTo; - _previewCancelled = draft.previewCancelled; - } - if (_replyToId) { - updateReplyTo(); - if (!_replyTo && App::api()) App::api()->requestReplyTo(0, _peer->asChannel(), _replyToId); + _migrated->setMsgDraft(Nil); } + applyDraft(false); + resizeEvent(0); if (!_previewCancelled) { onPreviewParse(); @@ -3755,7 +3817,7 @@ void HistoryWidget::updateControlsVisibility() { _muteUnmute.hide(); _attachMention.hide(); _field.hide(); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); _attachDocument.hide(); _attachPhoto.hide(); _attachEmoji.hide(); @@ -3812,7 +3874,7 @@ void HistoryWidget::updateControlsVisibility() { _attachPhoto.hide(); _broadcast.hide(); _kbScroll.hide(); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); _attachDocument.hide(); _attachPhoto.hide(); _attachEmoji.hide(); @@ -3849,7 +3911,7 @@ void HistoryWidget::updateControlsVisibility() { _attachPhoto.hide(); _broadcast.hide(); _kbScroll.hide(); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); } else { _unblock.hide(); _botStart.hide(); @@ -3857,11 +3919,9 @@ void HistoryWidget::updateControlsVisibility() { _muteUnmute.hide(); if (cHasAudioCapture() && !_field.hasSendText() && !readyToForward()) { _send.hide(); - setMouseTracking(true); mouseMoveEvent(0); } else { _send.show(); - setMouseTracking(false); _a_record.stop(); _inRecord = _inField = false; a_recordOver = anim::fvalue(0, 0); @@ -3924,14 +3984,14 @@ void HistoryWidget::updateControlsVisibility() { } updateFieldPlaceholder(); } - if (_replyToId || readyToForward() || (_previewData && _previewData->pendingTill >= 0) || _kbReplyTo) { - if (_replyForwardPreviewCancel.isHidden()) { - _replyForwardPreviewCancel.show(); + if (_editMsgId || _replyToId || readyToForward() || (_previewData && _previewData->pendingTill >= 0) || _kbReplyTo) { + if (_fieldBarCancel.isHidden()) { + _fieldBarCancel.show(); resizeEvent(0); update(); } } else { - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); } } } else { @@ -3945,7 +4005,7 @@ void HistoryWidget::updateControlsVisibility() { _attachPhoto.hide(); _broadcast.hide(); _kbScroll.hide(); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); _attachDocument.hide(); _attachPhoto.hide(); _attachEmoji.hide(); @@ -3961,6 +4021,12 @@ void HistoryWidget::updateControlsVisibility() { update(); } } + updateMouseTracking(); +} + +void HistoryWidget::updateMouseTracking() { + bool trackMouse = !_fieldBarCancel.isHidden() || (cHasAudioCapture() && _send.isHidden() && !_field.isHidden()); + setMouseTracking(trackMouse); } void HistoryWidget::newUnreadMsg(History *history, HistoryItem *item) { @@ -4432,12 +4498,84 @@ void HistoryWidget::onCollapseComments() { showHistory(_peer->id, switchAt); } +void HistoryWidget::saveEditMsg() { + if (_saveEditMsgRequestId) return; + + WebPageId webPageId = _previewCancelled ? CancelledWebPageId : ((_previewData && _previewData->pendingTill >= 0) ? _previewData->id : 0); + + EntitiesInText sendingEntities, leftEntities; + QString sendingText, leftText = prepareTextWithEntities(_field.getLastText(), leftEntities, itemTextOptions(_history, App::self()).flags); + + if (!textSplit(sendingText, sendingEntities, leftText, leftEntities, MaxMessageSize)) { + _field.selectAll(); + _field.setFocus(); + return; + } else if (!leftText.isEmpty()) { + Ui::showLayer(new InformBox(lang(lng_edit_too_long))); + return; + } + + int32 sendFlags = 0; + if (webPageId == CancelledWebPageId) { + sendFlags |= MTPmessages_SendMessage::flag_no_webpage; + } + MTPVector localEntities = linksToMTP(sendingEntities), sentEntities = linksToMTP(sendingEntities, true); + if (!sentEntities.c_vector().v.isEmpty()) { + sendFlags |= MTPmessages_SendMessage::flag_entities; + } + _saveEditMsgRequestId = MTP::send(MTPchannels_EditMessage(MTP_int(sendFlags), _history->peer->asChannel()->inputChannel, MTP_int(_editMsgId), MTP_string(sendingText), sentEntities), rpcDone(&HistoryWidget::saveEditMsgDone, _history), rpcFail(&HistoryWidget::saveEditMsgFail, _history)); +} + +void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates, mtpRequestId req) { + if (App::main()) { + App::main()->sentUpdatesReceived(updates); + } + if (req == _saveEditMsgRequestId) { + _saveEditMsgRequestId = 0; + cancelEdit(); + } + if (history->editDraft && history->editDraft->saveRequest == req) { + history->setEditDraft(Nil); + writeDrafts(history); + } +} + +bool HistoryWidget::saveEditMsgFail(History *history, const RPCError &error, mtpRequestId req) { + if (mtpIsFlood(error)) return false; + if (req == _saveEditMsgRequestId) { + _saveEditMsgRequestId = 0; + } + if (history->editDraft && history->editDraft->saveRequest == req) { + history->editDraft->saveRequest = 0; + } + + QString err = error.type(); + if (err == qstr("MESSAGE_ID_INVALID") || err == qstr("CHAT_ADMIN_REQUIRED") || err == qstr("MESSAGE_EDIT_TIME_EXPIRED")) { + Ui::showLayer(new InformBox(lang(lng_edit_error))); + } else if (err == qstr("MESSAGE_NOT_MODIFIED")) { + cancelEdit(); + } else if (err == qstr("MESSAGE_EMPTY")) { + _field.selectAll(); + _field.setFocus(); + } else { + Ui::showLayer(new InformBox(lang(lng_edit_error))); + } + update(); + return true; +} + void HistoryWidget::onSend(bool ctrlShiftEnter, MsgId replyTo) { if (!_history) return; + if (_editMsgId) { + saveEditMsg(); + return; + } + bool lastKeyboardUsed = lastForceReplyReplied(FullMsgId(_channel, replyTo)); WebPageId webPageId = _previewCancelled ? CancelledWebPageId : ((_previewData && _previewData->pendingTill >= 0) ? _previewData->id : 0); + App::main()->sendMessage(_history, _field.getLastText(), replyTo, _broadcast.checked(), webPageId); setFieldText(QString()); @@ -4658,7 +4796,7 @@ void HistoryWidget::animShow(const QPixmap &bgAnimCache, const QPixmap &bgAnimTo _kbHide.hide(); _cmdStart.hide(); _field.hide(); - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); _send.hide(); _unblock.hide(); _botStart.hide(); @@ -4846,7 +4984,7 @@ void HistoryWidget::mouseMoveEvent(QMouseEvent *e) { QPoint pos(e ? e->pos() : mapFromGlobal(QCursor::pos())); bool inRecord = _send.geometry().contains(pos); bool inField = pos.y() >= (_scroll.y() + _scroll.height()) && pos.y() < height() && pos.x() >= 0 && pos.x() < width(); - bool inReply = QRect(st::replySkip, _field.y() - st::sendPadding - st::replyHeight, width() - st::replySkip - _replyForwardPreviewCancel.width(), st::replyHeight).contains(pos) && replyToId(); + bool inReplyEdit = QRect(st::replySkip, _field.y() - st::sendPadding - st::replyHeight, width() - st::replySkip - _fieldBarCancel.width(), st::replyHeight).contains(pos) && (_editMsgId || replyToId()); bool startAnim = false; if (inRecord != _inRecord) { _inRecord = inRecord; @@ -4862,9 +5000,9 @@ void HistoryWidget::mouseMoveEvent(QMouseEvent *e) { a_recordCancel.start(_inField ? st::recordCancel->c : st::recordCancelActive->c); startAnim = true; } - if (inReply != _inReply) { - _inReply = inReply; - setCursor(inReply ? style::cur_pointer : style::cur_default); + if (inReplyEdit != _inReplyEdit) { + _inReplyEdit = inReplyEdit; + setCursor(inReplyEdit ? style::cur_pointer : style::cur_default); } if (startAnim) _a_record.start(); } @@ -5204,8 +5342,9 @@ void HistoryWidget::onKbToggle(bool manual) { _field.setMaxHeight(st::maxFieldHeight); _kbReplyTo = 0; - if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_replyToId) { - _replyForwardPreviewCancel.hide(); + if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_editMsgId && !_replyToId) { + _fieldBarCancel.hide(); + updateMouseTracking(); } } else { if (_history) { @@ -5223,10 +5362,11 @@ void HistoryWidget::onKbToggle(bool manual) { _field.setMaxHeight(st::maxFieldHeight); _kbReplyTo = (_peer->isChat() || _peer->isChannel() || _keyboard.forceReply()) ? App::histItemById(_keyboard.forMsgId()) : 0; - if (_kbReplyTo && !_replyToId) { + if (_kbReplyTo && !_editMsgId && !_replyToId) { updateReplyToName(); - _replyToText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); - _replyForwardPreviewCancel.show(); + _replyEditMsgText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); + _fieldBarCancel.show(); + updateMouseTracking(); } if (manual && _history) { _history->lastKeyboardHiddenId = 0; @@ -5241,10 +5381,11 @@ void HistoryWidget::onKbToggle(bool manual) { _field.setMaxHeight(st::maxFieldHeight - maxh); _kbReplyTo = (_peer->isChat() || _peer->isChannel() || _keyboard.forceReply()) ? App::histItemById(_keyboard.forMsgId()) : 0; - if (_kbReplyTo && !_replyToId) { + if (_kbReplyTo && !_editMsgId && !_replyToId) { updateReplyToName(); - _replyToText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); - _replyForwardPreviewCancel.show(); + _replyEditMsgText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); + _fieldBarCancel.show(); + updateMouseTracking(); } if (manual && _history) { _history->lastKeyboardHiddenId = 0; @@ -5414,7 +5555,7 @@ void HistoryWidget::onFieldResize() { _kbScroll.setGeometry(0, height() - kbh, width(), kbh); } _field.move(_attachDocument.x() + _attachDocument.width(), height() - kbh - _field.height() - st::sendPadding); - _replyForwardPreviewCancel.move(width() - _replyForwardPreviewCancel.width(), _field.y() - st::sendPadding - _replyForwardPreviewCancel.height()); + _fieldBarCancel.move(width() - _fieldBarCancel.width(), _field.y() - st::sendPadding - _fieldBarCancel.height()); _attachDocument.move(0, height() - kbh - _attachDocument.height()); _attachPhoto.move(_attachDocument.x(), _attachDocument.y()); @@ -5454,12 +5595,18 @@ void HistoryWidget::onCheckMentionDropdown() { } void HistoryWidget::updateFieldPlaceholder() { - if (_inlineBot && _inlineBot != InlineBotLookingUpData) { - _field.setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2); - } else if (hasBroadcastToggle()) { - _field.setPlaceholder(lang(_broadcast.checked() ? lng_broadcast_ph : lng_comment_ph)); + if (_editMsgId) { + _field.setPlaceholder(lang(lng_edit_message_text)); + _send.setText(lang(lng_settings_save)); } else { - _field.setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_peer->asChannel()->canPublish() ? lng_broadcast_ph : lng_comment_ph) : lng_message_ph)); + if (_inlineBot && _inlineBot != InlineBotLookingUpData) { + _field.setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2); + } else if (hasBroadcastToggle()) { + _field.setPlaceholder(lang(_broadcast.checked() ? lng_broadcast_ph : lng_comment_ph)); + } else { + _field.setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_peer->asChannel()->canPublish() ? lng_broadcast_ph : lng_comment_ph) : lng_message_ph)); + } + _send.setText(lang(lng_send_button)); } } @@ -5896,7 +6043,7 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { _attachDocument.move(0, height() - kbh - _attachDocument.height()); _attachPhoto.move(_attachDocument.x(), _attachDocument.y()); - _replyForwardPreviewCancel.move(width() - _replyForwardPreviewCancel.width(), _field.y() - st::sendPadding - _replyForwardPreviewCancel.height()); + _fieldBarCancel.move(width() - _fieldBarCancel.width(), _field.y() - st::sendPadding - _fieldBarCancel.height()); updateListSize(App::main() ? App::main()->contentScrollAddToY() : 0); bool kbShowShown = _history && !_kbShown && _keyboard.hasMarkup(); @@ -5945,8 +6092,12 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { void HistoryWidget::itemRemoved(HistoryItem *item) { if (_list) _list->itemRemoved(item); - if (item == _replyTo) { - cancelReply(); + if (item == _replyEditMsg) { + if (_editMsgId) { + cancelEdit(); + } else { + cancelReply(); + } } if (item == _replyReturn) { calcNextReplyReturn(); @@ -5980,7 +6131,7 @@ void HistoryWidget::updateListSize(int32 addToY, bool initial, bool loadedDown, if (_canSendMessages) { newScrollHeight -= (_field.height() + 2 * st::sendPadding); } - if (replyToId() || readyToForward() || (_previewData && _previewData->pendingTill >= 0)) { + if (_editMsgId || replyToId() || readyToForward() || (_previewData && _previewData->pendingTill >= 0)) { newScrollHeight -= st::replyHeight; } if (_kbShown) { @@ -6163,22 +6314,22 @@ void HistoryWidget::updateBotKeyboard(History *h) { bool changed = false; bool wasVisible = _kbShown || _kbReplyTo; - if ((_replyToId && !_replyTo) || !_history) { + if ((_replyToId && !_replyEditMsg) || _editMsgId || !_history) { changed = _keyboard.updateMarkup(0); - } else if (_replyTo) { - changed = _keyboard.updateMarkup(_replyTo); + } else if (_replyToId && _replyEditMsg) { + changed = _keyboard.updateMarkup(_replyEditMsg); } else { changed = _keyboard.updateMarkup(_history->lastKeyboardId ? App::histItemById(_channel, _history->lastKeyboardId) : 0); } updateCmdStartShown(); if (!changed) return; - bool hasMarkup = _keyboard.hasMarkup(), forceReply = _keyboard.forceReply() && !_replyTo; + bool hasMarkup = _keyboard.hasMarkup(), forceReply = _keyboard.forceReply() && (!_replyToId || !_replyEditMsg); if (hasMarkup || forceReply) { if (_keyboard.singleUse() && _keyboard.hasMarkup() && _keyboard.forMsgId() == FullMsgId(_channel, _history->lastKeyboardId) && _history->lastKeyboardUsed) { _history->lastKeyboardHiddenId = _history->lastKeyboardId; } - if (!isBotStart() && !isBlocked() && _canSendMessages && (wasVisible || _replyTo || (!_field.hasSendText() && !kbWasHidden()))) { + if (!isBotStart() && !isBlocked() && _canSendMessages && (wasVisible || (_replyToId && _replyEditMsg) || (!_field.hasSendText() && !kbWasHidden()))) { if (!_a_show.animating()) { if (hasMarkup) { _kbScroll.show(); @@ -6198,8 +6349,9 @@ void HistoryWidget::updateBotKeyboard(History *h) { _kbReplyTo = (_peer->isChat() || _peer->isChannel() || _keyboard.forceReply()) ? App::histItemById(_keyboard.forMsgId()) : 0; if (_kbReplyTo && !_replyToId) { updateReplyToName(); - _replyToText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); - _replyForwardPreviewCancel.show(); + _replyEditMsgText.setText(st::msgFont, _kbReplyTo->inDialogsText(), _textDlgOptions); + _fieldBarCancel.show(); + updateMouseTracking(); } } else { if (!_a_show.animating()) { @@ -6213,7 +6365,8 @@ void HistoryWidget::updateBotKeyboard(History *h) { _kbShown = false; _kbReplyTo = 0; if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_replyToId) { - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); + updateMouseTracking(); } } } else { @@ -6227,8 +6380,9 @@ void HistoryWidget::updateBotKeyboard(History *h) { _field.setMaxHeight(st::maxFieldHeight); _kbShown = false; _kbReplyTo = 0; - if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_replyToId) { - _replyForwardPreviewCancel.hide(); + if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_replyToId && !_editMsgId) { + _fieldBarCancel.hide(); + updateMouseTracking(); } } resizeEvent(0); @@ -6271,7 +6425,7 @@ void HistoryWidget::updateCollapseCommentsVisibility() { void HistoryWidget::mousePressEvent(QMouseEvent *e) { _replyForwardPressed = QRect(0, _field.y() - st::sendPadding - st::replyHeight, st::replySkip, st::replyHeight).contains(e->pos()); - if (_replyForwardPressed && !_replyForwardPreviewCancel.isHidden()) { + if (_replyForwardPressed && !_fieldBarCancel.isHidden()) { updateField(); } else if (_inRecord && cHasAudioCapture()) { audioCapture()->start(); @@ -6285,8 +6439,8 @@ void HistoryWidget::mousePressEvent(QMouseEvent *e) { a_recordDown.start(1); a_recordOver.restart(); _a_record.start(); - } else if (_inReply) { - Ui::showPeerHistory(_peer, replyToId()); + } else if (_inReplyEdit) { + Ui::showPeerHistory(_peer, _editMsgId ? _editMsgId : replyToId()); } } @@ -6615,16 +6769,25 @@ void HistoryWidget::onReplyToMessage() { App::main()->cancelForwarding(); - _replyTo = to; - _replyToId = to->id; - _replyToText.setText(st::msgFont, _replyTo->inDialogsText(), _textDlgOptions); + if (_editMsgId) { + if (!_history->msgDraft) { + _history->setMsgDraft(new HistoryDraft(QString(), to->id, MessageCursor(), false)); + } else { + _history->msgDraft->msgId = to->id; + } + } else { + _replyEditMsg = to; + _replyToId = to->id; + _replyEditMsgText.setText(st::msgFont, _replyEditMsg->inDialogsText(), _textDlgOptions); - updateBotKeyboard(); + updateBotKeyboard(); - if (!_field.isHidden()) _replyForwardPreviewCancel.show(); - updateReplyToName(); - resizeEvent(0); - updateField(); + if (!_field.isHidden()) _fieldBarCancel.show(); + updateMouseTracking(); + updateReplyToName(); + resizeEvent(0); + updateField(); + } _saveDraftText = true; _saveDraftStart = getms(); @@ -6642,7 +6805,42 @@ void HistoryWidget::onEditMessage() { Ui::showLayer(box); } else { delete box; - // edit post + + if (_replyToId || !_field.getLastText().isEmpty()) { + _history->setMsgDraft(new HistoryDraft(_field, _replyToId, _previewCancelled)); + } else { + _history->setMsgDraft(Nil); + } + + QString text(textApplyEntities(to->originalText(), to->originalEntities())); + _history->setEditDraft(new HistoryEditDraft(text, to->id, MessageCursor(text.size(), text.size(), QFIXED_MAX), false)); + applyDraft(false); + + _previewData = 0; + if (HistoryMedia *media = to->getMedia()) { + if (media->type() == MediaTypeWebPage) { + _previewData = static_cast(media)->webpage(); + updatePreview(); + } + } + if (!_previewData) { + onPreviewParse(); + } + + updateBotKeyboard(); + + if (!_field.isHidden()) _fieldBarCancel.show(); + updateFieldPlaceholder(); + updateMouseTracking(); + updateReplyToName(); + resizeEvent(0); + updateField(); + + _saveDraftText = true; + _saveDraftStart = getms(); + onDraftSave(); + + _field.setFocus(); } } @@ -6652,37 +6850,77 @@ bool HistoryWidget::lastForceReplyReplied(const FullMsgId &replyTo) const { } void HistoryWidget::cancelReply(bool lastKeyboardUsed) { + bool wasReply = _replyToId || (_history && _history->msgDraft && _history->msgDraft->msgId); if (_replyToId) { - _replyTo = 0; + _replyEditMsg = 0; _replyToId = 0; mouseMoveEvent(0); if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !_kbReplyTo) { - _replyForwardPreviewCancel.hide(); + _fieldBarCancel.hide(); + updateMouseTracking(); } updateBotKeyboard(); resizeEvent(0); update(); - + } else if (wasReply) { + if (_history->msgDraft->text.isEmpty()) { + _history->setMsgDraft(Nil); + } else { + _history->msgDraft->msgId = 0; + } + } + if (wasReply) { _saveDraftText = true; _saveDraftStart = getms(); onDraftSave(); } - if (_keyboard.singleUse() && _keyboard.forceReply() && lastKeyboardUsed) { + if (!_editMsgId && _keyboard.singleUse() && _keyboard.forceReply() && lastKeyboardUsed) { if (_kbReplyTo) { onKbToggle(false); } } } +void HistoryWidget::cancelEdit() { + if (!_editMsgId) return; + + _editMsgId = 0; + _replyEditMsg = 0; + _history->setEditDraft(Nil); + applyDraft(); + + if (_saveEditMsgRequestId) { + MTP::cancel(_saveEditMsgRequestId); + _saveEditMsgRequestId = 0; + } + + _saveDraftText = true; + _saveDraftStart = getms(); + onDraftSave(); + + mouseMoveEvent(0); + if (!readyToForward() && (!_previewData || _previewData->pendingTill < 0) && !replyToId()) { + _fieldBarCancel.hide(); + updateMouseTracking(); + } + + onTextChange(); + updateBotKeyboard(); + updateFieldPlaceholder(); + + resizeEvent(0); + update(); +} + void HistoryWidget::cancelForwarding() { updateControlsVisibility(); resizeEvent(0); update(); } -void HistoryWidget::onReplyForwardPreviewCancel() { +void HistoryWidget::onFieldBarCancel() { _replyForwardPressed = false; if (_previewData && _previewData->pendingTill >= 0) { _previewCancelled = true; @@ -6691,6 +6929,8 @@ void HistoryWidget::onReplyForwardPreviewCancel() { _saveDraftText = true; _saveDraftStart = getms(); onDraftSave(); + } else if (_editMsgId) { + cancelEdit(); } else if (readyToForward()) { App::main()->cancelForwarding(); } else if (_replyToId) { @@ -6717,7 +6957,10 @@ void HistoryWidget::previewCancel() { _previewData = 0; _previewLinks.clear(); updatePreview(); - if (!_replyToId && !readyToForward() && !_kbReplyTo) _replyForwardPreviewCancel.hide(); + if (!_editMsgId && !_replyToId && !readyToForward() && !_kbReplyTo) { + _fieldBarCancel.hide(); + updateMouseTracking(); + } } void HistoryWidget::onPreviewParse() { @@ -6781,7 +7024,8 @@ void HistoryWidget::gotPreview(QString links, const MTPMessageMedia &result, mtp void HistoryWidget::updatePreview() { _previewTimer.stop(); if (_previewData && _previewData->pendingTill >= 0) { - _replyForwardPreviewCancel.show(); + _fieldBarCancel.show(); + updateMouseTracking(); if (_previewData->pendingTill) { _previewTitle.setText(st::msgServiceNameFont, lang(lng_preview_loading), _textNameOptions); _previewDescription.setText(st::msgFont, _previewLinks.splitRef(' ').at(0).toString(), _textDlgOptions); @@ -6818,8 +7062,9 @@ void HistoryWidget::updatePreview() { _previewTitle.setText(st::msgServiceNameFont, title, _textNameOptions); _previewDescription.setText(st::msgFont, desc, _textDlgOptions); } - } else if (!readyToForward() && !replyToId()) { - _replyForwardPreviewCancel.hide(); + } else if (!readyToForward() && !replyToId() && !_editMsgId) { + _fieldBarCancel.hide(); + updateMouseTracking(); } resizeEvent(0); update(); @@ -7035,19 +7280,28 @@ void HistoryWidget::updateTopBarSelection() { update(); } -void HistoryWidget::updateReplyTo(bool force) { - if (!_replyToId || _replyTo) return; - _replyTo = App::histItemById(_channel, _replyToId); - if (_replyTo) { - _replyToText.setText(st::msgFont, _replyTo->inDialogsText(), _textDlgOptions); +void HistoryWidget::updateReplyEditTexts(bool force) { + if (_replyEditMsg || (!_editMsgId && !_replyToId)) { + return; + } + _replyEditMsg = App::histItemById(_channel, _editMsgId ? _editMsgId : _replyToId); + if (_replyEditMsg) { + _replyEditMsgText.setText(st::msgFont, _replyEditMsg->inDialogsText(), _textDlgOptions); updateBotKeyboard(); - if (!_field.isHidden() || _recording) _replyForwardPreviewCancel.show(); + if (!_field.isHidden() || _recording) { + _fieldBarCancel.show(); + updateMouseTracking(); + } updateReplyToName(); updateField(); } else if (force) { - cancelReply(); + if (_editMsgId) { + cancelEdit(); + } else { + cancelReply(); + } } } @@ -7061,9 +7315,10 @@ void HistoryWidget::updateForwarding(bool force) { } void HistoryWidget::updateReplyToName() { - if (!_replyTo && (_replyToId || !_kbReplyTo)) return; - _replyToName.setText(st::msgServiceNameFont, App::peerName((_replyTo ? _replyTo : _kbReplyTo)->author()), _textNameOptions); - _replyToNameVersion = (_replyTo ? _replyTo : _kbReplyTo)->author()->nameVersion; + if (_editMsgId) return; + if (!_replyEditMsg && (_replyToId || !_kbReplyTo)) return; + _replyToName.setText(st::msgServiceNameFont, App::peerName((_replyEditMsg ? _replyEditMsg : _kbReplyTo)->author()), _textNameOptions); + _replyToNameVersion = (_replyEditMsg ? _replyEditMsg : _kbReplyTo)->author()->nameVersion; } void HistoryWidget::updateField() { @@ -7076,9 +7331,9 @@ void HistoryWidget::drawField(Painter &p) { Text *from = 0, *text = 0; bool serviceColor = false, hasForward = readyToForward(); ImagePtr preview; - HistoryItem *drawReplyTo = _replyToId ? _replyTo : _kbReplyTo; - if (_replyToId || (!hasForward && _kbReplyTo)) { - if (drawReplyTo && drawReplyTo->author()->nameVersion > _replyToNameVersion) { + HistoryItem *drawMsgText = (_editMsgId || _replyToId) ? _replyEditMsg : _kbReplyTo; + if (_editMsgId || _replyToId || (!hasForward && _kbReplyTo)) { + if (!_editMsgId && drawMsgText && drawMsgText->author()->nameVersion > _replyToNameVersion) { updateReplyToName(); } backy -= st::replyHeight; @@ -7093,27 +7348,32 @@ void HistoryWidget::drawField(Painter &p) { } bool drawPreview = (_previewData && _previewData->pendingTill >= 0) && !_replyForwardPressed; p.fillRect(0, backy, width(), backh, st::taMsgField.bgColor->b); - if (_replyToId || (!hasForward && _kbReplyTo)) { + if (_editMsgId || _replyToId || (!hasForward && _kbReplyTo)) { int32 replyLeft = st::replySkip; - p.drawPixmap(QPoint(st::replyIconPos.x(), backy + st::replyIconPos.y()), App::sprite(), st::replyIcon); + p.drawPixmap(QPoint(st::replyIconPos.x(), backy + st::replyIconPos.y()), App::sprite(), _editMsgId ? st::editIcon : st::replyIcon); if (!drawPreview) { - if (drawReplyTo) { - if (drawReplyTo->getMedia() && drawReplyTo->getMedia()->hasReplyPreview()) { - ImagePtr replyPreview = drawReplyTo->getMedia()->replyPreview(); + if (drawMsgText) { + if (drawMsgText->getMedia() && drawMsgText->getMedia()->hasReplyPreview()) { + ImagePtr replyPreview = drawMsgText->getMedia()->replyPreview(); if (!replyPreview->isNull()) { QRect to(replyLeft, backy + st::msgReplyPadding.top(), st::msgReplyBarSize.height(), st::msgReplyBarSize.height()); p.drawPixmap(to.x(), to.y(), replyPreview->pixSingle(replyPreview->width() / cIntRetinaFactor(), replyPreview->height() / cIntRetinaFactor(), to.width(), to.height())); } replyLeft += st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x(); } - p.setPen(st::replyColor->p); - _replyToName.drawElided(p, replyLeft, backy + st::msgReplyPadding.top(), width() - replyLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); - p.setPen((((drawReplyTo->toHistoryMessage() && drawReplyTo->toHistoryMessage()->emptyText()) || drawReplyTo->serviceMsg()) ? st::msgInDateFg : st::msgColor)->p); - _replyToText.drawElided(p, replyLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - replyLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); + p.setPen(st::replyColor); + if (_editMsgId) { + p.setFont(st::msgServiceNameFont); + p.drawText(replyLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->ascent, lang(lng_edit_message)); + } else { + _replyToName.drawElided(p, replyLeft, backy + st::msgReplyPadding.top(), width() - replyLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); + } + p.setPen((((drawMsgText->toHistoryMessage() && drawMsgText->toHistoryMessage()->emptyText()) || drawMsgText->serviceMsg()) ? st::msgInDateFg : st::msgColor)->p); + _replyEditMsgText.drawElided(p, replyLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - replyLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); } else { p.setFont(st::msgDateFont->f); p.setPen(st::msgInDateFg->p); - p.drawText(replyLeft, backy + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - replyLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right())); + p.drawText(replyLeft, backy + st::msgReplyPadding.top() + (st::msgReplyBarSize.height() - st::msgDateFont->height) / 2 + st::msgDateFont->ascent, st::msgDateFont->elided(lang(lng_profile_loading), width() - replyLeft - _fieldBarCancel.width() - st::msgReplyPadding.right())); } } } else if (from && text) { @@ -7131,9 +7391,9 @@ void HistoryWidget::drawField(Painter &p) { forwardLeft += st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x(); } p.setPen(st::replyColor->p); - from->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top(), width() - forwardLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); + from->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top(), width() - forwardLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); p.setPen((serviceColor ? st::msgInDateFg : st::msgColor)->p); - text->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - forwardLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); + text->drawElided(p, forwardLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - forwardLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); } } if (drawPreview) { @@ -7153,9 +7413,9 @@ void HistoryWidget::drawField(Painter &p) { previewLeft += st::msgReplyBarSize.height() + st::msgReplyBarSkip - st::msgReplyBarSize.width() - st::msgReplyBarPos.x(); } p.setPen(st::replyColor->p); - _previewTitle.drawElided(p, previewLeft, backy + st::msgReplyPadding.top(), width() - previewLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); + _previewTitle.drawElided(p, previewLeft, backy + st::msgReplyPadding.top(), width() - previewLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); p.setPen(st::msgColor->p); - _previewDescription.drawElided(p, previewLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - previewLeft - _replyForwardPreviewCancel.width() - st::msgReplyPadding.right()); + _previewDescription.drawElided(p, previewLeft, backy + st::msgReplyPadding.top() + st::msgServiceNameFont->height, width() - previewLeft - _fieldBarCancel.width() - st::msgReplyPadding.right()); } } diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index d18f08103530e6..4c82a863123fea 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -505,9 +505,10 @@ class HistoryWidget : public TWidget, public RPCSender { void updateScrollColors(); MsgId replyToId() const; - void updateReplyTo(bool force = false); + void updateReplyEditTexts(bool force = false); bool lastForceReplyReplied(const FullMsgId &replyTo = FullMsgId(NoChannel, -1)) const; void cancelReply(bool lastKeyboardUsed = false); + void cancelEdit(); void updateForwarding(bool force = false); void cancelForwarding(); // called by MainWidget @@ -595,7 +596,7 @@ public slots: void onCancel(); void onReplyToMessage(); void onEditMessage(); - void onReplyForwardPreviewCancel(); + void onFieldBarCancel(); void onCancelSendAction(); @@ -689,12 +690,17 @@ public slots: private: MsgId _replyToId; - HistoryItem *_replyTo; - Text _replyToName, _replyToText; + Text _replyToName; int32 _replyToNameVersion; - IconedButton _replyForwardPreviewCancel; void updateReplyToName(); + MsgId _editMsgId; + + HistoryItem *_replyEditMsg; + Text _replyEditMsgText; + + IconedButton _fieldBarCancel; + void sendExistingDocument(DocumentData *doc, const QString &caption); void sendExistingPhoto(PhotoData *photo, const QString &caption); @@ -702,6 +708,13 @@ public slots: void drawRecordButton(Painter &p); void drawRecording(Painter &p); + void updateMouseTracking(); + + mtpRequestId _saveEditMsgRequestId; + void saveEditMsg(); + void saveEditMsgDone(History *history, const MTPUpdates &updates, mtpRequestId req); + bool saveEditMsgFail(History *history, const RPCError &error, mtpRequestId req); + DBIPeerReportSpamStatus _reportSpamStatus; void updateReportSpamStatus(); @@ -747,7 +760,8 @@ public slots: void savedGifsGot(const MTPmessages_SavedGifs &gifs); bool savedGifsFailed(const RPCError &error); - void writeDraft(MsgId *replyTo = 0, const QString *text = 0, const MessageCursor *cursor = 0, bool *previewCancelled = 0); + void writeDrafts(HistoryDraft **msgDraft, HistoryEditDraft **editDraft); + void writeDrafts(History *history); void setFieldText(const QString &text, int32 textUpdateEventsFlags = 0, bool clearUndoHistory = true); QStringList getMediasFromMime(const QMimeData *d); @@ -806,7 +820,7 @@ public slots: bool _cmdStartShown; MessageField _field; Animation _a_record, _a_recording; - bool _recording, _inRecord, _inField, _inReply; + bool _recording, _inRecord, _inField, _inReplyEdit; anim::ivalue a_recordingLevel; int32 _recordingSamples; anim::fvalue a_recordOver, a_recordDown; diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index 1c0c7f55408975..fb5ed2fbdaeaee 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -557,7 +557,7 @@ namespace { }; typedef QMap DraftsMap; - DraftsMap _draftsMap, _draftsPositionsMap; + DraftsMap _draftsMap, _draftCursorsMap; typedef QMap DraftsNotReadMap; DraftsNotReadMap _draftsNotReadMap; @@ -1672,7 +1672,7 @@ namespace { } LOG(("App Info: reading encrypted map..")); - DraftsMap draftsMap, draftsPositionsMap; + DraftsMap draftsMap, draftCursorsMap; DraftsNotReadMap draftsNotReadMap; StorageMap imagesMap, stickerImagesMap, audiosMap; qint64 storageImagesSize = 0, storageStickersSize = 0, storageAudiosSize = 0; @@ -1701,7 +1701,7 @@ namespace { FileKey key; quint64 p; map.stream >> key >> p; - draftsPositionsMap.insert(p, key); + draftCursorsMap.insert(p, key); } } break; case lskImages: { @@ -1781,7 +1781,7 @@ namespace { } _draftsMap = draftsMap; - _draftsPositionsMap = draftsPositionsMap; + _draftCursorsMap = draftCursorsMap; _draftsNotReadMap = draftsNotReadMap; _imagesMap = imagesMap; @@ -1860,7 +1860,7 @@ namespace { uint32 mapSize = 0; if (!_draftsMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _draftsMap.size() * sizeof(quint64) * 2; - if (!_draftsPositionsMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _draftsPositionsMap.size() * sizeof(quint64) * 2; + if (!_draftCursorsMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _draftCursorsMap.size() * sizeof(quint64) * 2; if (!_imagesMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _imagesMap.size() * (sizeof(quint64) * 3 + sizeof(qint32)); if (!_stickerImagesMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _stickerImagesMap.size() * (sizeof(quint64) * 3 + sizeof(qint32)); if (!_audiosMap.isEmpty()) mapSize += sizeof(quint32) * 2 + _audiosMap.size() * (sizeof(quint64) * 3 + sizeof(qint32)); @@ -1880,9 +1880,9 @@ namespace { mapData.stream << quint64(i.value()) << quint64(i.key()); } } - if (!_draftsPositionsMap.isEmpty()) { - mapData.stream << quint32(lskDraftPosition) << quint32(_draftsPositionsMap.size()); - for (DraftsMap::const_iterator i = _draftsPositionsMap.cbegin(), e = _draftsPositionsMap.cend(); i != e; ++i) { + if (!_draftCursorsMap.isEmpty()) { + mapData.stream << quint32(lskDraftPosition) << quint32(_draftCursorsMap.size()); + for (DraftsMap::const_iterator i = _draftCursorsMap.cbegin(), e = _draftCursorsMap.cend(); i != e; ++i) { mapData.stream << quint64(i.value()) << quint64(i.key()); } } @@ -2180,7 +2180,7 @@ namespace Local { _passKeySalt.clear(); // reset passcode, local key _draftsMap.clear(); - _draftsPositionsMap.clear(); + _draftCursorsMap.clear(); _fileLocations.clear(); _fileLocationPairs.clear(); _fileLocationAliases.clear(); @@ -2237,10 +2237,10 @@ namespace Local { return _oldSettingsVersion; } - void writeDraft(const PeerId &peer, const MessageDraft &draft) { + void writeDrafts(const PeerId &peer, const MessageDraft &msgDraft, const MessageDraft &editDraft) { if (!_working()) return; - if (draft.replyTo <= 0 && draft.text.isEmpty()) { + if (msgDraft.msgId <= 0 && msgDraft.text.isEmpty() && editDraft.msgId <= 0) { DraftsMap::iterator i = _draftsMap.find(peer); if (i != _draftsMap.cend()) { clearKey(i.value()); @@ -2257,8 +2257,12 @@ namespace Local { _mapChanged = true; _writeMap(WriteMapFast); } - EncryptedDescriptor data(sizeof(quint64) + _stringSize(draft.text) + sizeof(qint32)); - data.stream << quint64(peer) << draft.text << qint32(draft.replyTo) << qint32(draft.previewCancelled ? 1 : 0); + + EncryptedDescriptor data(sizeof(quint64) + _stringSize(msgDraft.text) + 2 * sizeof(qint32) + _stringSize(editDraft.text) + 2 * sizeof(qint32)); + data.stream << quint64(peer); + data.stream << msgDraft.text << qint32(msgDraft.msgId) << qint32(msgDraft.previewCancelled ? 1 : 0); + data.stream << editDraft.text << qint32(editDraft.msgId) << qint32(editDraft.previewCancelled ? 1 : 0); + FileWriteDescriptor file(i.value()); file.writeEncrypted(data); @@ -2266,75 +2270,123 @@ namespace Local { } } - MessageDraft readDraft(const PeerId &peer) { - if (!_draftsNotReadMap.remove(peer)) return MessageDraft(); + void clearDraftCursors(const PeerId &peer) { + DraftsMap::iterator i = _draftCursorsMap.find(peer); + if (i != _draftCursorsMap.cend()) { + clearKey(i.value()); + _draftCursorsMap.erase(i); + _mapChanged = true; + _writeMap(); + } + } + + void _readDraftCursors(const PeerId &peer, MessageCursor &msgCursor, MessageCursor &editCursor) { + DraftsMap::iterator j = _draftCursorsMap.find(peer); + if (j == _draftCursorsMap.cend()) { + return; + } + + FileReadDescriptor draft; + if (!readEncryptedFile(draft, j.value())) { + clearDraftCursors(peer); + return; + } + quint64 draftPeer; + qint32 msgPosition = 0, msgAnchor = 0, msgScroll = QFIXED_MAX; + qint32 editPosition = 0, editAnchor = 0, editScroll = QFIXED_MAX; + draft.stream >> draftPeer >> msgPosition >> msgAnchor >> msgScroll; + if (!draft.stream.atEnd()) { + draft.stream >> editPosition >> editAnchor >> editScroll; + } + + if (draftPeer != peer) { + clearDraftCursors(peer); + return; + } + + msgCursor = MessageCursor(msgPosition, msgAnchor, msgScroll); + editCursor = MessageCursor(editPosition, editAnchor, editScroll); + } + + void readDraftsWithCursors(History *h) { + PeerId peer = h->peer->id; + if (!_draftsNotReadMap.remove(peer)) { + clearDraftCursors(peer); + return; + } DraftsMap::iterator j = _draftsMap.find(peer); if (j == _draftsMap.cend()) { - return MessageDraft(); + clearDraftCursors(peer); + return; } FileReadDescriptor draft; if (!readEncryptedFile(draft, j.value())) { clearKey(j.value()); _draftsMap.erase(j); - return MessageDraft(); + clearDraftCursors(peer); + return; } - quint64 draftPeer; - QString draftText; - qint32 draftReplyTo = 0, draftPreviewCancelled = 0; - draft.stream >> draftPeer >> draftText; - if (draft.version >= 7021) draft.stream >> draftReplyTo; - if (draft.version >= 8001) draft.stream >> draftPreviewCancelled; - return (draftPeer == peer) ? MessageDraft(MsgId(draftReplyTo), draftText, (draftPreviewCancelled == 1)) : MessageDraft(); + quint64 draftPeer = 0; + QString msgText, editText; + qint32 msgReplyTo = 0, msgPreviewCancelled = 0, editMsgId = 0, editPreviewCancelled = 0; + draft.stream >> draftPeer >> msgText; + if (draft.version >= 7021) { + draft.stream >> msgReplyTo; + if (draft.version >= 8001) { + draft.stream >> msgPreviewCancelled; + if (!draft.stream.atEnd()) { + draft.stream >> editText >> editMsgId >> editPreviewCancelled; + } + } + } + if (draftPeer != peer) { + clearKey(j.value()); + _draftsMap.erase(j); + clearDraftCursors(peer); + return; + } + + MessageCursor msgCursor, editCursor; + _readDraftCursors(peer, msgCursor, editCursor); + + if (msgText.isEmpty() && !msgReplyTo) { + h->setMsgDraft(Nil); + } else { + h->setMsgDraft(new HistoryDraft(msgText, msgReplyTo, msgCursor, msgPreviewCancelled)); + } + if (!editMsgId) { + h->setEditDraft(Nil); + } else { + h->setEditDraft(new HistoryEditDraft(editText, editMsgId, editCursor, editPreviewCancelled)); + } } - void writeDraftPositions(const PeerId &peer, const MessageCursor &cur) { + void writeDraftCursors(const PeerId &peer, const MessageCursor &msgCursor, const MessageCursor &editCursor) { if (!_working()) return; - if (cur.position == 0 && cur.anchor == 0 && cur.scroll == QFIXED_MAX) { - DraftsMap::iterator i = _draftsPositionsMap.find(peer); - if (i != _draftsPositionsMap.cend()) { - clearKey(i.value()); - _draftsPositionsMap.erase(i); - _mapChanged = true; - _writeMap(); - } + if (msgCursor == MessageCursor() && editCursor == MessageCursor()) { + clearDraftCursors(peer); } else { - DraftsMap::const_iterator i = _draftsPositionsMap.constFind(peer); - if (i == _draftsPositionsMap.cend()) { - i = _draftsPositionsMap.insert(peer, genKey()); + DraftsMap::const_iterator i = _draftCursorsMap.constFind(peer); + if (i == _draftCursorsMap.cend()) { + i = _draftCursorsMap.insert(peer, genKey()); _mapChanged = true; _writeMap(WriteMapFast); } + EncryptedDescriptor data(sizeof(quint64) + sizeof(qint32) * 3); - data.stream << quint64(peer) << qint32(cur.position) << qint32(cur.anchor) << qint32(cur.scroll); + data.stream << quint64(peer) << qint32(msgCursor.position) << qint32(msgCursor.anchor) << qint32(msgCursor.scroll); + data.stream << qint32(editCursor.position) << qint32(editCursor.anchor) << qint32(editCursor.scroll); + FileWriteDescriptor file(i.value()); file.writeEncrypted(data); } } - MessageCursor readDraftPositions(const PeerId &peer) { - DraftsMap::iterator j = _draftsPositionsMap.find(peer); - if (j == _draftsPositionsMap.cend()) { - return MessageCursor(); - } - FileReadDescriptor draft; - if (!readEncryptedFile(draft, j.value())) { - clearKey(j.value()); - _draftsPositionsMap.erase(j); - return MessageCursor(); - } - - quint64 draftPeer; - qint32 curPosition, curAnchor, curScroll; - draft.stream >> draftPeer >> curPosition >> curAnchor >> curScroll; - - return (draftPeer == peer) ? MessageCursor(curPosition, curAnchor, curScroll) : MessageCursor(); - } - - bool hasDraftPositions(const PeerId &peer) { - return (_draftsPositionsMap.constFind(peer) != _draftsPositionsMap.cend()); + bool hasDraftCursors(const PeerId &peer) { + return (_draftCursorsMap.constFind(peer) != _draftCursorsMap.cend()); } void writeFileLocation(MediaKey location, const FileLocation &local) { @@ -3795,8 +3847,8 @@ namespace Local { _draftsMap.clear(); _mapChanged = true; } - if (!_draftsPositionsMap.isEmpty()) { - _draftsPositionsMap.clear(); + if (!_draftCursorsMap.isEmpty()) { + _draftCursorsMap.clear(); _mapChanged = true; } if (_locationsKey) { diff --git a/Telegram/SourceFiles/localstorage.h b/Telegram/SourceFiles/localstorage.h index 607ec9d0ff9819..58df7dc7dff64b 100644 --- a/Telegram/SourceFiles/localstorage.h +++ b/Telegram/SourceFiles/localstorage.h @@ -106,17 +106,16 @@ namespace Local { int32 oldSettingsVersion(); struct MessageDraft { - MessageDraft(MsgId replyTo = 0, QString text = QString(), bool previewCancelled = false) : replyTo(replyTo), text(text), previewCancelled(previewCancelled) { + MessageDraft(MsgId msgId = 0, QString text = QString(), bool previewCancelled = false) : msgId(msgId), text(text), previewCancelled(previewCancelled) { } - MsgId replyTo; + MsgId msgId; QString text; bool previewCancelled; }; - void writeDraft(const PeerId &peer, const MessageDraft &draft); - MessageDraft readDraft(const PeerId &peer); - void writeDraftPositions(const PeerId &peer, const MessageCursor &cur); - MessageCursor readDraftPositions(const PeerId &peer); - bool hasDraftPositions(const PeerId &peer); + void writeDrafts(const PeerId &peer, const MessageDraft &msgDraft, const MessageDraft &editDraft); + void readDraftsWithCursors(History *h); + void writeDraftCursors(const PeerId &peer, const MessageCursor &msgCursor, const MessageCursor &editCursor); + bool hasDraftCursors(const PeerId &peer); void writeFileLocation(MediaKey location, const FileLocation &local); FileLocation readFileLocation(MediaKey location, bool check = true); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 05d65d9a72e2ac..349568c2bac294 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -516,10 +516,8 @@ bool MainWidget::onShareUrl(const PeerId &peer, const QString &url, const QStrin return false; } History *h = App::history(peer); - h->draft = url + '\n' + text; - h->draftCursor.anchor = url.size() + 1; - h->draftCursor.position = h->draftCursor.anchor + text.size(); - h->draftPreviewCancelled = false; + h->setMsgDraft(new HistoryDraft(url + '\n' + text, 0, MessageCursor(url.size() + 1, url.size() + 1 + text.size(), QFIXED_MAX), false)); + h->setEditDraft(Nil); bool opened = history.peer() && (history.peer()->id == peer); if (opened) { history.applyDraft(); @@ -2039,7 +2037,7 @@ ApiWrap *MainWidget::api() { } void MainWidget::updateReplyTo() { - history.updateReplyTo(true); + history.updateReplyEditTexts(true); } void MainWidget::updateBotKeyboard(History *h) { diff --git a/Telegram/SourceFiles/structs.h b/Telegram/SourceFiles/structs.h index 16df19fcd58541..86dd227bd090c2 100644 --- a/Telegram/SourceFiles/structs.h +++ b/Telegram/SourceFiles/structs.h @@ -1217,3 +1217,7 @@ struct MessageCursor { } int position, anchor, scroll; }; + +inline bool operator==(const MessageCursor &a, const MessageCursor &b) { + return (a.position == b.position) && (a.anchor == b.anchor) && (a.scroll == b.scroll); +} diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index ce77262ae43358..0b16ead7f2a7c2 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -35,6 +35,8 @@ uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 }; // Base types compile-time check +NilPointer Nil; + namespace { template class _TypeSizeCheckerHelper { diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 97a1fe7423e49b..00ef2c51f0161e 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -36,6 +36,22 @@ T *exchange(T *&ptr) { struct NullType { }; +class NilPointer { +public: + template + operator T*() const { + return 0; + } + template + operator T C::*() const { + return 0; + } + +private: + void operator&() const; +}; +extern NilPointer Nil; + template class OrderedSet : public QMap { public: diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index af8188834ce9fc..878e146e64bbf1 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,26,0 - PRODUCTVERSION 0,9,26,0 + FILEVERSION 0,9,26,1 + PRODUCTVERSION 0,9,26,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.26.0" + VALUE "FileVersion", "0.9.26.1" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.26.0" + VALUE "ProductVersion", "0.9.26.1" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 30dc689c9ba250..c7f7c5580fc782 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.25; + CURRENT_PROJECT_VERSION = 0.9.26; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.25; + CURRENT_PROJECT_VERSION = 0.9.26; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.25; + DYLIB_CURRENT_VERSION = 0.9.26; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.25; + CURRENT_PROJECT_VERSION = 0.9.26; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.25; + DYLIB_CURRENT_VERSION = 0.9.26; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index bc8bffbaf85651..7e97206f14ccbb 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.26 AppVersionStr 0.9.26 DevChannel 0 -BetaVersion 0 9019002 +BetaVersion 9026001 From 0a9ec55b43c751687f8f1a1a3989ebce237c139a Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 13:33:40 +0300 Subject: [PATCH 100/133] fixed gif start bug on retina displays, langs updated --- Telegram/SourceFiles/gui/animation.cpp | 1 + Telegram/SourceFiles/langs/lang_de.strings | 2 +- Telegram/SourceFiles/langs/lang_it.strings | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/gui/animation.cpp b/Telegram/SourceFiles/gui/animation.cpp index c5c1e02c4ab975..c667d28f9ed9b6 100644 --- a/Telegram/SourceFiles/gui/animation.cpp +++ b/Telegram/SourceFiles/gui/animation.cpp @@ -378,6 +378,7 @@ QPixmap ClipReader::current(int32 framew, int32 frameh, int32 outerw, int32 oute frame->request.outerh = outerh * factor; QImage cacheForResize; + frame->original.setDevicePixelRatio(factor); frame->pix = QPixmap(); frame->pix = _prepareFrame(frame->request, frame->original, true, cacheForResize); diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index 145671347117ea..f1fad4804b2656 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -837,7 +837,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}"; "lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen"; -"lng_new_version_text" = "— Neue Option in den Einstellungen hinzugefügt (\"Flexibles Layout für breite Bildschirme\"), um das Layout bei besonders breiten Bildschirmen zu ändern\n— Abstürze in der Linux-Version behoben"; +"lng_new_version_text" = "— Neue Option in den Einstellungen unter 'Hintergrund' hinzugefügt (nennt sich dort \"Flexibles Layout für breite Bildschirme\"), um das Layout bei besonders breiten Bildschirmen zu ändern\n— Abstürze in der Linux-Version behoben"; "lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index 9babab03f17b18..7563d169ceb824 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -287,7 +287,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_settings_section_cache" = "Archivio locale"; "lng_settings_no_data_cached" = "Non ci sono dati nella cache!"; "lng_settings_images_cached" = "{count:_not_used_|# immagine|# immagini}, {size}"; -"lng_settings_audios_cached" = "{count:_not_used_|# nota vocale|# note vocali}, {size}"; +"lng_settings_audios_cached" = "{count:_not_used_|# messaggio vocale|# messaggi vocali}, {size}"; "lng_local_storage_clear" = "Elimina tutto"; "lng_local_storage_clearing" = "Eliminando.."; "lng_local_storage_cleared" = "Eliminato!"; @@ -438,8 +438,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_profile_songs_header" = "Panoramica file audio"; "lng_profile_files" = "{count:_not_used_|# file|# file} »"; "lng_profile_files_header" = "Panoramica file"; -"lng_profile_audios" = "{count:_not_used_|# nota vocale|# note vocali} »"; -"lng_profile_audios_header" = "Panoramica note vocali"; +"lng_profile_audios" = "{count:_not_used_|# messaggio vocale|# messaggi vocali} »"; +"lng_profile_audios_header" = "Panoramica messaggi vocali"; "lng_profile_shared_links" = "{count:_not_used_|# link condiviso|# link condivisi} »"; "lng_profile_shared_links_header" = "Panoramica link condivisi"; "lng_profile_copy_phone" = "Copia numero di telefono"; @@ -568,18 +568,18 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_media_type_videos" = "Video"; "lng_media_type_songs" = "File audio"; "lng_media_type_files" = "File"; -"lng_media_type_audios" = "Note vocali"; +"lng_media_type_audios" = "Messaggi vocali"; "lng_media_type_links" = "Link condivisi"; "lng_media_open_with" = "Apri con"; "lng_media_download" = "Scarica"; "lng_media_cancel" = "Annulla"; "lng_media_video" = "Video"; -"lng_media_audio" = "Nota vocale"; +"lng_media_audio" = "Messaggio vocale"; "lng_media_auto_settings" = "Impostazioni di download automatico"; "lng_media_auto_photo" = "Download automatico foto"; -"lng_media_auto_audio" = "Download automatico audio"; +"lng_media_auto_audio" = "Download automatico messaggi vocali"; "lng_media_auto_gif" = "Download automatico GIF"; "lng_media_auto_private_chats" = "Chat"; "lng_media_auto_groups" = "Gruppi e canali"; From fe71cb962ef0f87e4274924290c71e7223f2ad34 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 14:38:33 +0300 Subject: [PATCH 101/133] build without resource recompile added in os x --- Telegram/Build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Telegram/Build.sh b/Telegram/Build.sh index 615639257f33d5..c0efe0de8b5f5a 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -1,5 +1,7 @@ set -e +FastParam="$1" + while IFS='' read -r line || [[ -n "$line" ]]; do set $line eval $1="$2" @@ -189,7 +191,9 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols" - touch "./SourceFiles/telegram.qrc" + if [ "$FastParam" != "fast" ]; then + touch "./SourceFiles/telegram.qrc" + fi xcodebuild -project Telegram.xcodeproj -alltargets -configuration Release build if [ ! -d "$ReleasePath/$BinaryName.app" ]; then From 1313cd1a337b2e1909a791082264a762b37298e1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 18:05:36 +0300 Subject: [PATCH 102/133] lang updated --- Telegram/Resources/lang.strings | 11 ++++++----- Telegram/SourceFiles/boxes/photosendbox.cpp | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index cfc0023038b9b6..533f036b5e8c51 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -561,8 +561,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link copied to clipboard."; -"lng_forwarded" = "Forwarded from {original}"; -"lng_forwarded_via" = "Forwarded from {original} via {inline_bot}"; +"lng_forwarded" = "Forwarded from {user}"; +"lng_forwarded_channel" = "Forwarded from {channel}"; +"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; +"lng_forwarded_via" = "Forwarded from {channel} via {inline_bot}"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "In reply to"; @@ -653,6 +655,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Write a message.."; "lng_comment_ph" = "Write a comment.."; "lng_broadcast_ph" = "Broadcast a message.."; +"lng_broadcast_silent_ph" = "Silent broadcast.."; "lng_record_cancel" = "Release outside this field to cancel"; "lng_will_be_notified" = "Members will be notified when you post"; "lng_wont_be_notified" = "Members will not be notified when you post"; @@ -763,8 +766,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_send_image_too_large" = "Could not send a file, because it is larger than 1.5 GB :("; "lng_send_folder" = "Could not send «{name}» because it is a directory :("; -"lng_edit_placeholder" = "Message text"; - "lng_forward_choose" = "Choose recipient.."; "lng_forward_cant" = "Sorry, no way to forward here :("; "lng_forward_confirm" = "Forward to {recipient}?"; @@ -851,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop was updated to version {version}\n\n{changes}\n\nFull version history is available here:\n{link}"; "lng_new_version_minor" = "— Bug fixes and other minor improvements"; -"lng_new_version_text" = "— Adaptive layout for wide screens switch added to Settings\n— Linux version crash fix"; +"lng_new_version_text" = "— Edit your messages in channels and supergroups.\n— Share links to specific posts in channels via the post context menu.\n— Add admin signatures to messages in channels.\n— Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting."; "lng_menu_insert_unicode" = "Insert Unicode control character"; diff --git a/Telegram/SourceFiles/boxes/photosendbox.cpp b/Telegram/SourceFiles/boxes/photosendbox.cpp index a64a17f357a1eb..934a8a41ce945a 100644 --- a/Telegram/SourceFiles/boxes/photosendbox.cpp +++ b/Telegram/SourceFiles/boxes/photosendbox.cpp @@ -494,7 +494,7 @@ EditCaptionBox::EditCaptionBox(HistoryItem *msg) : AbstractBox(st::boxWideWidth) _field->setCtrlEnterSubmit(CtrlEnterSubmitBoth); } else { QString text = textApplyEntities(msg->originalText(), msg->originalEntities()); - _field = new InputArea(this, st::editTextArea, lang(lng_edit_placeholder), text); + _field = new InputArea(this, st::editTextArea, lang(lng_photo_caption), text); // _field->setMaxLength(MaxMessageSize); // entities can make text in input field larger but still valid _field->setCtrlEnterSubmit(cCtrlEnter() ? CtrlEnterSubmitCtrlEnter : CtrlEnterSubmitEnter); } From 2b6e30bcb58f44bb3f0d55446c144630423762b9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 19:19:54 +0300 Subject: [PATCH 103/133] silent broadcast done --- Telegram/Resources/lang.strings | 2 +- Telegram/Resources/style.txt | 14 +- Telegram/SourceFiles/application.cpp | 4 +- Telegram/SourceFiles/art/sprite.png | Bin 181268 -> 181707 bytes Telegram/SourceFiles/art/sprite_200x.png | Bin 245187 -> 247697 bytes Telegram/SourceFiles/boxes/photosendbox.cpp | 2 +- Telegram/SourceFiles/dialogswidget.cpp | 2 +- Telegram/SourceFiles/fileuploader.cpp | 7 +- Telegram/SourceFiles/fileuploader.h | 6 +- Telegram/SourceFiles/history.cpp | 12 +- Telegram/SourceFiles/historywidget.cpp | 176 ++++++++++++++++---- Telegram/SourceFiles/historywidget.h | 24 ++- Telegram/SourceFiles/layout.cpp | 6 +- Telegram/SourceFiles/localimageloader.h | 8 +- Telegram/SourceFiles/mainwidget.cpp | 51 ++++-- Telegram/SourceFiles/mainwidget.h | 17 +- Telegram/SourceFiles/profilewidget.cpp | 2 +- 17 files changed, 256 insertions(+), 77 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 533f036b5e8c51..96f55498e700a9 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -564,7 +564,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_forwarded" = "Forwarded from {user}"; "lng_forwarded_channel" = "Forwarded from {channel}"; "lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; -"lng_forwarded_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "In reply to"; diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 2068c1fe5b20ca..015fb86da78766 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -1395,7 +1395,7 @@ broadcastToggle: flatCheckbox { bgColor: white; disColor: black; - width: 36px; + width: 34px; height: 46px; duration: 200; bgFunc: transition(easeOutCirc); @@ -1410,7 +1410,17 @@ broadcastToggle: flatCheckbox { disImageRect: sprite(18px, 125px, 22px, 21px); chkDisImageRect: sprite(18px, 125px, 22px, 21px); - imagePos: point(7px, 12px); + imagePos: point(6px, 12px); +} +silentToggle: flatCheckbox(broadcastToggle) { + width: 33px; + + imageRect: sprite(354px, 242px, 21px, 21px); + chkImageRect: sprite(354px, 221px, 21px, 21px); + overImageRect: sprite(375px, 242px, 21px, 21px); + chkOverImageRect: sprite(375px, 221px, 21px, 21px); + disImageRect: sprite(354px, 242px, 21px, 21px); + chkDisImageRect: sprite(354px, 221px, 21px, 21px); } btnRecordAudio: sprite(379px, 390px, 16px, 24px); btnRecordAudioActive: sprite(379px, 366px, 16px, 24px); diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 2d3a4c4cbab3de..dc1f0baee985c7 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1051,8 +1051,8 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9025) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Adaptive layout for wide screens switch added to Settings\n\xe2\x80\x94 Linux version crash fix");// .replace('@', qsl("@") + QChar(0x200D)); + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9027) { + versionFeatures = QString::fromUtf8("\xe2\x80\x94 Edit your messages in channels and supergroups.\n\xe2\x80\x94 Share links to specific posts in channels via the post context menu.\n\xe2\x80\x94 Add admin signatures to messages in channels.\n\xe2\x80\x94 Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting.");// .replace('@', qsl("@") + QChar(0x200D)); } else if (Local::oldMapVersion() < 9026) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { diff --git a/Telegram/SourceFiles/art/sprite.png b/Telegram/SourceFiles/art/sprite.png index 11d3fbb61b14acdf5d354db367b911179094fe38..33ee6037f923e9e8912229cd06054c9fb81832d3 100644 GIT binary patch delta 57485 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 delta 57043 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

fPq{T5obIVpyBsFoZ29U1#{ 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 } - if (!_animated && (dimensions.isEmpty() || doc) || image->isNull()) { + if ((!_animated && (dimensions.isEmpty() || doc)) || image->isNull()) { _animated = false; if (image->isNull()) { _thumbw = 0; diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index fca26a14b19391..f7bf3298f7e60c 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -651,7 +651,7 @@ void DialogsInner::onContextProfile() { void DialogsInner::onContextToggleNotifications() { if (!_menuPeer) return; - App::main()->updateNotifySetting(_menuPeer, menuPeerMuted()); + App::main()->updateNotifySetting(_menuPeer, menuPeerMuted() ? NotifySettingSetNotify : NotifySettingSetMuted); } void DialogsInner::onContextSearch() { diff --git a/Telegram/SourceFiles/fileuploader.cpp b/Telegram/SourceFiles/fileuploader.cpp index c93f8dbb6adb59..1bb0eb42e23e94 100644 --- a/Telegram/SourceFiles/fileuploader.cpp +++ b/Telegram/SourceFiles/fileuploader.cpp @@ -140,17 +140,18 @@ void FileUploader::sendNext() { if (parts.isEmpty()) { if (i->docSentParts >= i->docPartsCount) { if (requestsSent.isEmpty() && docRequestsSent.isEmpty()) { + bool silent = i->file && i->file->to.silent; if (i->type() == PreparePhoto) { - emit photoReady(uploading, MTP_inputFile(MTP_long(i->id()), MTP_int(i->partsCount), MTP_string(i->filename()), MTP_string(i->file ? i->file->filemd5 : i->media.jpeg_md5))); + emit photoReady(uploading, silent, MTP_inputFile(MTP_long(i->id()), MTP_int(i->partsCount), MTP_string(i->filename()), MTP_string(i->file ? i->file->filemd5 : i->media.jpeg_md5))); } else if (i->type() == PrepareDocument || i->type() == PrepareAudio) { QByteArray docMd5(32, Qt::Uninitialized); hashMd5Hex(i->md5Hash.result(), docMd5.data()); MTPInputFile doc = (i->docSize > UseBigFilesFrom) ? MTP_inputFileBig(MTP_long(i->id()), MTP_int(i->docPartsCount), MTP_string(i->filename())) : MTP_inputFile(MTP_long(i->id()), MTP_int(i->docPartsCount), MTP_string(i->filename()), MTP_string(docMd5)); if (i->partsCount) { - emit thumbDocumentReady(uploading, doc, MTP_inputFile(MTP_long(i->thumbId()), MTP_int(i->partsCount), MTP_string(i->file ? i->file->thumbname : (qsl("thumb.") + i->media.thumbExt)), MTP_string(i->file ? i->file->thumbmd5 : i->media.jpeg_md5))); + emit thumbDocumentReady(uploading, silent, doc, MTP_inputFile(MTP_long(i->thumbId()), MTP_int(i->partsCount), MTP_string(i->file ? i->file->thumbname : (qsl("thumb.") + i->media.thumbExt)), MTP_string(i->file ? i->file->thumbmd5 : i->media.jpeg_md5))); } else { - emit documentReady(uploading, doc); + emit documentReady(uploading, silent, doc); } } queue.remove(uploading); diff --git a/Telegram/SourceFiles/fileuploader.h b/Telegram/SourceFiles/fileuploader.h index 8e038fd9d12692..5ae1c6dbcd1ec0 100644 --- a/Telegram/SourceFiles/fileuploader.h +++ b/Telegram/SourceFiles/fileuploader.h @@ -48,9 +48,9 @@ public slots: signals: - void photoReady(const FullMsgId &msgId, const MTPInputFile &file); - void documentReady(const FullMsgId &msgId, const MTPInputFile &file); - void thumbDocumentReady(const FullMsgId &msgId, const MTPInputFile &file, const MTPInputFile &thumb); + void photoReady(const FullMsgId &msgId, bool silent, const MTPInputFile &file); + void documentReady(const FullMsgId &msgId, bool silent, const MTPInputFile &file); + void thumbDocumentReady(const FullMsgId &msgId, bool silent, const MTPInputFile &file, const MTPInputFile &thumb); void photoProgress(const FullMsgId &msgId); void documentProgress(const FullMsgId &msgId); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 98fa3b9f4dc427..6c348beec754a3 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -6064,9 +6064,17 @@ void HistoryMessageForwarded::create(const HistoryMessageVia *via) const { text = App::peerName(_authorOriginal); } if (via) { - text = lng_forwarded_via(lt_original, textcmdLink(1, text), lt_inline_bot, textcmdLink(2, '@' + via->_bot->username)); + if (_authorOriginal->isChannel()) { + text = lng_forwarded_channel_via(lt_channel, textcmdLink(1, text), lt_inline_bot, textcmdLink(2, '@' + via->_bot->username)); + } else { + text = lng_forwarded_via(lt_user, textcmdLink(1, text), lt_inline_bot, textcmdLink(2, '@' + via->_bot->username)); + } } else { - text = lng_forwarded(lt_original, textcmdLink(1, text)); + if (_authorOriginal->isChannel()) { + text = lng_forwarded_channel(lt_channel, textcmdLink(1, text)); + } else { + text = lng_forwarded(lt_user, textcmdLink(1, text)); + } } TextParseOptions opts = { TextParseRichText, 0, 0, Qt::LayoutDirectionAuto }; textstyleSet(&st::inFwdTextStyle); diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index b21d9f3cd59349..5b3dfc9cf3d752 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -2607,6 +2607,40 @@ void CollapseButton::paintEvent(QPaintEvent *e) { FlatButton::paintEvent(e); } +SilentToggle::SilentToggle(QWidget *parent) : FlatCheckbox(parent, QString(), false, st::silentToggle) { + setMouseTracking(true); +} + +void SilentToggle::mouseMoveEvent(QMouseEvent *e) { + FlatCheckbox::mouseMoveEvent(e); + if (rect().contains(e->pos())) { + PopupTooltip::Show(1000, this); + } else { + PopupTooltip::Hide(); + } +} + +void SilentToggle::leaveEvent(QEvent *e) { + PopupTooltip::Hide(); +} + +void SilentToggle::mouseReleaseEvent(QMouseEvent *e) { + FlatCheckbox::mouseReleaseEvent(e); + PopupTooltip::Show(0, this); + PeerData *p = App::main() ? App::main()->peer() : Nil; + if (p && p->isChannel() && p->notify != UnknownNotifySettings) { + App::main()->updateNotifySetting(p, NotifySettingDontChange, checked() ? SilentNotifiesSetSilent : SilentNotifiesSetNotify); + } +} + +QString SilentToggle::tooltipText() const { + return lang(checked() ? lng_wont_be_notified : lng_will_be_notified); +} + +QPoint SilentToggle::tooltipPos() const { + return QCursor::pos(); +} + HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _replyToId(0) , _replyToNameVersion(0) @@ -2659,6 +2693,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _kbHide(this, st::btnBotKbHide) , _cmdStart(this, st::btnBotCmdStart) , _broadcast(this, QString(), true, st::broadcastToggle) +, _silent(this) , _cmdStartShown(false) , _field(this, st::taMsgField, lang(lng_message_ph)) , _a_record(animation(this, &HistoryWidget::step_record)) @@ -2667,8 +2702,11 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) , _inRecord(false) , _inField(false) , _inReplyEdit(false) -, a_recordingLevel(0, 0), _recordingSamples(0) -, a_recordOver(0, 0), a_recordDown(0, 0), a_recordCancel(st::recordCancel->c, st::recordCancel->c) +, a_recordingLevel(0, 0) +, _recordingSamples(0) +, a_recordOver(0, 0) +, a_recordDown(0, 0) +, a_recordCancel(st::recordCancel->c, st::recordCancel->c) , _recordCancelWidth(st::recordFont->width(lang(lng_record_cancel))) , _kbShown(false) , _kbReplyTo(0) @@ -2708,7 +2746,8 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) connect(&_botStart, SIGNAL(clicked()), this, SLOT(onBotStart())); connect(&_joinChannel, SIGNAL(clicked()), this, SLOT(onJoinChannel())); connect(&_muteUnmute, SIGNAL(clicked()), this, SLOT(onMuteUnmute())); - connect(&_broadcast, SIGNAL(changed()), this, SLOT(onBroadcastChange())); + connect(&_broadcast, SIGNAL(changed()), this, SLOT(onBroadcastSilentChange())); + connect(&_silent, SIGNAL(clicked()), this, SLOT(onBroadcastSilentChange())); connect(&_attachDocument, SIGNAL(clicked()), this, SLOT(onDocumentSelect())); connect(&_attachPhoto, SIGNAL(clicked()), this, SLOT(onPhotoSelect())); connect(&_field, SIGNAL(submitted(bool)), this, SLOT(onSend(bool))); @@ -2793,6 +2832,7 @@ HistoryWidget::HistoryWidget(QWidget *parent) : TWidget(parent) _kbShow.hide(); _kbHide.hide(); _broadcast.hide(); + _silent.hide(); _cmdStart.hide(); _attachDocument.installEventFilter(&_attachType); @@ -3119,7 +3159,7 @@ void HistoryWidget::onRecordDone(QByteArray result, VoiceWaveform waveform, qint App::wnd()->activateWindow(); int32 duration = samples / AudioVoiceMsgFrequency; - _fileLoader.addTask(new FileLoadTask(result, duration, waveform, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()))); + _fileLoader.addTask(new FileLoadTask(result, duration, waveform, FileLoadTo(_peer->id, _broadcast.checked(), _silent.checked(), replyToId()))); cancelReply(lastForceReplyReplied()); } @@ -3604,7 +3644,12 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re _history = App::history(_peer->id); _migrated = _peer->migrateFrom() ? App::history(_peer->migrateFrom()->id) : 0; - if (_channel) updateNotifySettings(); + if (_channel) { + updateNotifySettings(); + if (_peer->notify == UnknownNotifySettings) { + App::wnd()->getNotifySetting(MTP_inputNotifyPeer(_peer->input)); + } + } if (_showAtMsgId == ShowAtUnreadMsgId) { if (_history->lastWidth) { @@ -3702,6 +3747,12 @@ void HistoryWidget::updateNotifySettings() { if (!_peer || !_peer->isChannel()) return; _muteUnmute.setText(lang(_history->mute ? lng_channel_unmute : lng_channel_mute)); + if (_peer->notify != UnknownNotifySettings) { + _silent.setChecked(_peer->notify != EmptyNotifySettings && (_peer->notify->flags & MTPDpeerNotifySettings::flag_silent)); + if (_silent.isHidden() && hasSilentToggle()) { + updateControlsVisibility(); + } + } } bool HistoryWidget::contentOverlapped(const QRect &globalRect) { @@ -3822,6 +3873,7 @@ void HistoryWidget::updateControlsVisibility() { _attachPhoto.hide(); _attachEmoji.hide(); _broadcast.hide(); + _silent.hide(); _toHistoryEnd.hide(); _collapseComments.hide(); _kbShow.hide(); @@ -3873,6 +3925,7 @@ void HistoryWidget::updateControlsVisibility() { _attachDocument.hide(); _attachPhoto.hide(); _broadcast.hide(); + _silent.hide(); _kbScroll.hide(); _fieldBarCancel.hide(); _attachDocument.hide(); @@ -3910,6 +3963,7 @@ void HistoryWidget::updateControlsVisibility() { _attachDocument.hide(); _attachPhoto.hide(); _broadcast.hide(); + _silent.hide(); _kbScroll.hide(); _fieldBarCancel.hide(); } else { @@ -3935,6 +3989,7 @@ void HistoryWidget::updateControlsVisibility() { _attachDocument.hide(); _attachPhoto.hide(); _broadcast.hide(); + _silent.hide(); if (_kbShown) { _kbScroll.show(); } else { @@ -3982,6 +4037,11 @@ void HistoryWidget::updateControlsVisibility() { } else { _broadcast.hide(); } + if (hasSilentToggle()) { + _silent.show(); + } else { + _silent.hide(); + } updateFieldPlaceholder(); } if (_editMsgId || _replyToId || readyToForward() || (_previewData && _previewData->pendingTill >= 0) || _kbReplyTo) { @@ -4004,6 +4064,7 @@ void HistoryWidget::updateControlsVisibility() { _attachDocument.hide(); _attachPhoto.hide(); _broadcast.hide(); + _silent.hide(); _kbScroll.hide(); _fieldBarCancel.hide(); _attachDocument.hide(); @@ -4576,7 +4637,7 @@ void HistoryWidget::onSend(bool ctrlShiftEnter, MsgId replyTo) { WebPageId webPageId = _previewCancelled ? CancelledWebPageId : ((_previewData && _previewData->pendingTill >= 0) ? _previewData->id : 0); - App::main()->sendMessage(_history, _field.getLastText(), replyTo, _broadcast.checked(), webPageId); + App::main()->sendMessage(_history, _field.getLastText(), replyTo, _broadcast.checked(), _silent.checked(), webPageId); setFieldText(QString()); _saveDraftText = true; @@ -4677,10 +4738,10 @@ bool HistoryWidget::joinFail(const RPCError &error, mtpRequestId req) { } void HistoryWidget::onMuteUnmute() { - App::main()->updateNotifySetting(_peer, _history->mute); + App::main()->updateNotifySetting(_peer, _history->mute ? NotifySettingSetNotify : NotifySettingSetMuted); } -void HistoryWidget::onBroadcastChange() { +void HistoryWidget::onBroadcastSilentChange() { updateFieldPlaceholder(); } @@ -4715,6 +4776,7 @@ void HistoryWidget::shareContact(const PeerId &peer, const QString &phone, const bool channelPost = p->isChannel() && !p->isMegagroup() && p->asChannel()->canPublish() && (p->asChannel()->isBroadcast() || _broadcast.checked()); bool showFromName = !channelPost || p->asChannel()->addsSignature(); + bool silentPost = channelPost && _silent.checked(); if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; flags |= MTPDmessage::flag_views; @@ -4723,12 +4785,15 @@ void HistoryWidget::shareContact(const PeerId &peer, const QString &phone, const if (showFromName) { flags |= MTPDmessage::flag_from_id; } + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(peer), MTPnullFwdHeader, MTPint(), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname), MTP_int(userId)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); h->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), p->input, MTP_int(replyTo), MTP_inputMediaContact(MTP_string(phone), MTP_string(fname), MTP_string(lname)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, h->sendRequestId); App::historyRegRandom(randomId, newId); - App::main()->finishForwarding(h, _broadcast.checked()); + App::main()->finishForwarding(h, _broadcast.checked(), _silent.checked()); cancelReply(lastKeyboardUsed); } @@ -4792,6 +4857,7 @@ void HistoryWidget::animShow(const QPixmap &bgAnimCache, const QPixmap &bgAnimTo _attachEmoji.hide(); _attachMention.hide(); _broadcast.hide(); + _silent.hide(); _kbShow.hide(); _kbHide.hide(); _cmdStart.hide(); @@ -5062,7 +5128,7 @@ void HistoryWidget::sendBotCommand(const QString &cmd, MsgId replyTo) { // reply toSend += '@' + username; } - App::main()->sendMessage(_history, toSend, replyTo ? ((!_peer->isUser()/* && (botStatus == 0 || botStatus == 2)*/) ? replyTo : -1) : 0, false); + App::main()->sendMessage(_history, toSend, replyTo ? ((!_peer->isUser()/* && (botStatus == 0 || botStatus == 2)*/) ? replyTo : -1) : 0, false, false); if (replyTo) { cancelReply(); if (_keyboard.singleUse() && _keyboard.hasMarkup() && lastKeyboardUsed) { @@ -5211,6 +5277,10 @@ bool HistoryWidget::hasBroadcastToggle() const { return _peer && _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && !_peer->asChannel()->isBroadcast(); } +bool HistoryWidget::hasSilentToggle() const { + return _peer && _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && _peer->notify != UnknownNotifySettings; +} + void HistoryWidget::inlineBotResolveDone(const MTPcontacts_ResolvedPeer &result) { _inlineBotResolveRequestId = 0; // Notify::inlineBotRequesting(false); @@ -5569,6 +5639,7 @@ void HistoryWidget::onFieldResize() { _kbShow.move(_attachEmoji.x() - _kbShow.width(), height() - kbh - _kbShow.height()); _kbHide.move(_attachEmoji.x(), _attachEmoji.y()); _cmdStart.move(_attachEmoji.x() - _cmdStart.width(), height() - kbh - _cmdStart.height()); + _silent.move(_attachEmoji.x() - _silent.width(), height() - kbh - _silent.height()); _attachType.move(0, _attachDocument.y() - _attachType.height()); _emojiPan.moveBottom(_attachEmoji.y()); @@ -5602,9 +5673,9 @@ void HistoryWidget::updateFieldPlaceholder() { if (_inlineBot && _inlineBot != InlineBotLookingUpData) { _field.setPlaceholder(_inlineBot->botInfo->inlinePlaceholder.mid(1), _inlineBot->username.size() + 2); } else if (hasBroadcastToggle()) { - _field.setPlaceholder(lang(_broadcast.checked() ? lng_broadcast_ph : lng_comment_ph)); + _field.setPlaceholder(lang(_broadcast.checked() ? (_silent.checked() ? lng_broadcast_silent_ph : lng_broadcast_ph) : lng_comment_ph)); } else { - _field.setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_peer->asChannel()->canPublish() ? lng_broadcast_ph : lng_comment_ph) : lng_message_ph)); + _field.setPlaceholder(lang((_history && _history->isChannel() && !_history->isMegagroup()) ? (_peer->asChannel()->canPublish() ? (_silent.checked() ? lng_broadcast_silent_ph : lng_broadcast_ph) : lng_comment_ph) : lng_message_ph)); } _send.setText(lang(lng_send_button)); } @@ -5614,7 +5685,7 @@ void HistoryWidget::uploadImage(const QImage &img, PrepareMediaType type, FileLo if (!_history) return; App::wnd()->activateWindow(); - FileLoadTask *task = new FileLoadTask(img, type, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()), confirm, source); + FileLoadTask *task = new FileLoadTask(img, type, FileLoadTo(_peer->id, _broadcast.checked(), _silent.checked(), replyToId()), confirm, source); if (withText) { _confirmWithTextId = task->fileid(); } @@ -5625,7 +5696,7 @@ void HistoryWidget::uploadFile(const QString &file, PrepareMediaType type, FileL if (!_history) return; App::wnd()->activateWindow(); - FileLoadTask *task = new FileLoadTask(file, type, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()), confirm); + FileLoadTask *task = new FileLoadTask(file, type, FileLoadTo(_peer->id, _broadcast.checked(), _silent.checked(), replyToId()), confirm); if (withText) { _confirmWithTextId = task->fileid(); } @@ -5639,7 +5710,7 @@ void HistoryWidget::uploadFiles(const QStringList &files, PrepareMediaType type) App::wnd()->activateWindow(); - FileLoadTo to(_peer->id, _broadcast.checked(), replyToId()); + FileLoadTo to(_peer->id, _broadcast.checked(), _silent.checked(), replyToId()); TasksList tasks; tasks.reserve(files.size()); @@ -5655,7 +5726,7 @@ void HistoryWidget::uploadFileContent(const QByteArray &fileContent, PrepareMedi if (!_history) return; App::wnd()->activateWindow(); - _fileLoader.addTask(new FileLoadTask(fileContent, type, FileLoadTo(_peer->id, _broadcast.checked(), replyToId()))); + _fileLoader.addTask(new FileLoadTask(fileContent, type, FileLoadTo(_peer->id, _broadcast.checked(), _silent.checked(), replyToId()))); cancelReply(lastForceReplyReplied()); } @@ -5675,9 +5746,9 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif FullMsgId newId(peerToChannel(file->to.peer), clientMsgId()); - connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&, const MTPInputFile&)), this, SLOT(onPhotoUploaded(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); - connect(App::uploader(), SIGNAL(documentReady(const FullMsgId&, const MTPInputFile&)), this, SLOT(onDocumentUploaded(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); - connect(App::uploader(), SIGNAL(thumbDocumentReady(const FullMsgId&, const MTPInputFile&, const MTPInputFile&)), this, SLOT(onThumbDocumentUploaded(const FullMsgId&, const MTPInputFile&, const MTPInputFile&)), Qt::UniqueConnection); + connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&,bool,const MTPInputFile&)), this, SLOT(onPhotoUploaded(const FullMsgId&,bool,const MTPInputFile&)), Qt::UniqueConnection); + connect(App::uploader(), SIGNAL(documentReady(const FullMsgId&,bool,const MTPInputFile&)), this, SLOT(onDocumentUploaded(const FullMsgId&,bool,const MTPInputFile&)), Qt::UniqueConnection); + connect(App::uploader(), SIGNAL(thumbDocumentReady(const FullMsgId&,bool,const MTPInputFile&,const MTPInputFile&)), this, SLOT(onThumbDocumentUploaded(const FullMsgId&,bool,const MTPInputFile&, const MTPInputFile&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(photoProgress(const FullMsgId&)), this, SLOT(onPhotoProgress(const FullMsgId&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(documentProgress(const FullMsgId&)), this, SLOT(onDocumentProgress(const FullMsgId&)), Qt::UniqueConnection); connect(App::uploader(), SIGNAL(photoFailed(const FullMsgId&)), this, SLOT(onPhotoFailed(const FullMsgId&)), Qt::UniqueConnection); @@ -5693,6 +5764,7 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif if (file->to.replyTo) flags |= MTPDmessage::flag_reply_to_msg_id; bool channelPost = h->peer->isChannel() && !h->peer->isMegagroup() && h->peer->asChannel()->canPublish() && (h->peer->asChannel()->isBroadcast() || file->to.broadcast); bool showFromName = !channelPost || h->peer->asChannel()->addsSignature(); + bool silentPost = channelPost && file->to.silent; if (channelPost) { flags |= MTPDmessage::flag_views; flags |= MTPDmessage::flag_post; @@ -5700,6 +5772,9 @@ void HistoryWidget::confirmSendFile(const FileLoadResultPtr &file, bool ctrlShif if (showFromName) { flags |= MTPDmessage::flag_from_id; } + if (silentPost) { + flags |= MTPDmessage::flag_silent; + } if (file->type == PreparePhoto) { h->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(file->to.peer), MTPnullFwdHeader, MTPint(), MTP_int(file->to.replyTo), MTP_int(unixtime()), MTP_string(""), MTP_messageMediaPhoto(file->photo, MTP_string(file->caption)), MTPnullMarkup, MTPnullEntities, MTP_int(1), MTPint()), NewMessageUnread); } else if (file->type == PrepareDocument) { @@ -5746,7 +5821,7 @@ void HistoryWidget::cancelShareContact() { } } -void HistoryWidget::onPhotoUploaded(const FullMsgId &newId, const MTPInputFile &file) { +void HistoryWidget::onPhotoUploaded(const FullMsgId &newId, bool silent, const MTPInputFile &file) { if (!MTP::authedId()) return; HistoryItem *item = App::histItemById(newId); if (item) { @@ -5760,9 +5835,13 @@ void HistoryWidget::onPhotoUploaded(const FullMsgId &newId, const MTPInputFile & } bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + bool silentPost = channelPost && silent; if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedPhoto(file, MTP_string(caption)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } @@ -5792,7 +5871,7 @@ namespace { } } -void HistoryWidget::onDocumentUploaded(const FullMsgId &newId, const MTPInputFile &file) { +void HistoryWidget::onDocumentUploaded(const FullMsgId &newId, bool silent, const MTPInputFile &file) { if (!MTP::authedId()) return; HistoryMessage *item = dynamic_cast(App::histItemById(newId)); if (item) { @@ -5808,16 +5887,20 @@ void HistoryWidget::onDocumentUploaded(const FullMsgId &newId, const MTPInputFil } bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + bool silentPost = channelPost && silent; if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedDocument(file, MTP_string(document->mime), _composeDocumentAttributes(document), MTP_string(caption)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } } } -void HistoryWidget::onThumbDocumentUploaded(const FullMsgId &newId, const MTPInputFile &file, const MTPInputFile &thumb) { +void HistoryWidget::onThumbDocumentUploaded(const FullMsgId &newId, bool silent, const MTPInputFile &file, const MTPInputFile &thumb) { if (!MTP::authedId()) return; HistoryMessage *item = dynamic_cast(App::histItemById(newId)); if (item) { @@ -5833,9 +5916,13 @@ void HistoryWidget::onThumbDocumentUploaded(const FullMsgId &newId, const MTPInp } bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && item->isPost(); + bool silentPost = channelPost && silent; if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; } + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } QString caption = item->getMedia() ? item->getMedia()->getCaption() : QString(); hist->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), item->history()->peer->input, MTP_int(replyTo), MTP_inputMediaUploadedThumbDocument(file, thumb, MTP_string(document->mime), _composeDocumentAttributes(document), MTP_string(caption)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } @@ -6047,7 +6134,7 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { updateListSize(App::main() ? App::main()->contentScrollAddToY() : 0); bool kbShowShown = _history && !_kbShown && _keyboard.hasMarkup(); - _field.resize(width() - _send.width() - _attachDocument.width() - _attachEmoji.width() - (kbShowShown ? _kbShow.width() : 0) - (_cmdStartShown ? _cmdStart.width() : 0) - (hasBroadcastToggle() ? _broadcast.width() : 0), _field.height()); + _field.resize(width() - _send.width() - _attachDocument.width() - _attachEmoji.width() - (kbShowShown ? _kbShow.width() : 0) - (_cmdStartShown ? _cmdStart.width() : 0) - (hasBroadcastToggle() ? _broadcast.width() : 0) - (hasSilentToggle() ? _silent.width() : 0), _field.height()); _toHistoryEnd.move((width() - _toHistoryEnd.width()) / 2, _scroll.y() + _scroll.height() - _toHistoryEnd.height() - st::historyToEndSkip); updateCollapseCommentsVisibility(); @@ -6062,6 +6149,7 @@ void HistoryWidget::resizeEvent(QResizeEvent *e) { _kbShow.move(_attachEmoji.x() - _kbShow.width(), height() - kbh - _kbShow.height()); _kbHide.move(_attachEmoji.x(), _attachEmoji.y()); _cmdStart.move(_attachEmoji.x() - _cmdStart.width(), height() - kbh - _cmdStart.height()); + _silent.move(_attachEmoji.x() - _silent.width(), height() - kbh - _silent.height()); _attachType.move(0, _attachDocument.y() - _attachType.height()); _emojiPan.moveBottom(_attachEmoji.y()); @@ -6540,6 +6628,7 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { } bool channelPost = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); bool showFromName = !channelPost || _peer->asChannel()->addsSignature(); + bool silentPost = channelPost && _silent.checked(); if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; flags |= MTPDmessage::flag_views; @@ -6548,6 +6637,9 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { if (showFromName) { flags |= MTPDmessage::flag_from_id; } + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } if (bot) { flags |= MTPDmessage::flag_via_bot_id; } @@ -6615,7 +6707,7 @@ void HistoryWidget::onInlineResultSend(InlineResult *result, UserData *bot) { _history->addNewMessage(MTP_message(MTP_int(flags), MTP_int(newId.msg), MTP_int(showFromName ? MTP::authedId() : 0), peerToMTP(_history->peer->id), MTPnullFwdHeader, MTP_int(bot ? peerToUser(bot->id) : 0), MTP_int(replyToId()), MTP_int(unixtime()), MTP_string(result->message), MTP_messageMediaEmpty(), MTPnullMarkup, linksToMTP(result->entities), MTP_int(1), MTPint()), NewMessageUnread); } _history->sendRequestId = MTP::send(MTPmessages_SendInlineBotResult(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_long(randomId), MTP_long(result->queryId), MTP_string(result->id)), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId); - App::main()->finishForwarding(_history, _broadcast.checked()); + App::main()->finishForwarding(_history, _broadcast.checked(), _silent.checked()); cancelReply(lastKeyboardUsed); App::historyRegRandom(randomId, newId); @@ -6662,16 +6754,24 @@ void HistoryWidget::sendExistingDocument(DocumentData *doc, const QString &capti flags |= MTPDmessage::flag_reply_to_msg_id; sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); - if (fromChannelName) { + bool channelPost = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); + bool showFromName = !channelPost || _peer->asChannel()->addsSignature(); + bool silentPost = channelPost && _silent.checked(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; - } else { + flags |= MTPDmessage::flag_views; + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } - _history->addNewDocument(newId.msg, flags, 0, replyToId(), date(MTP_int(unixtime())), fromChannelName ? 0 : MTP::authedId(), doc, caption); + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } + _history->addNewDocument(newId.msg, flags, 0, replyToId(), date(MTP_int(unixtime())), showFromName ? MTP::authedId() : 0, doc, caption); _history->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_inputMediaDocument(MTP_inputDocument(MTP_long(doc->id), MTP_long(doc->access)), MTP_string(caption)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId); - App::main()->finishForwarding(_history, _broadcast.checked()); + App::main()->finishForwarding(_history, _broadcast.checked(), _silent.checked()); cancelReply(lastKeyboardUsed); if (doc->sticker()) App::main()->incrementSticker(doc); @@ -6710,16 +6810,24 @@ void HistoryWidget::sendExistingPhoto(PhotoData *photo, const QString &caption) flags |= MTPDmessage::flag_reply_to_msg_id; sendFlags |= MTPmessages_SendMedia::flag_reply_to_msg_id; } - bool fromChannelName = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); - if (fromChannelName) { + bool channelPost = _peer->isChannel() && !_peer->isMegagroup() && _peer->asChannel()->canPublish() && (_peer->asChannel()->isBroadcast() || _broadcast.checked()); + bool showFromName = !channelPost || _peer->asChannel()->addsSignature(); + bool silentPost = channelPost && _silent.checked(); + if (channelPost) { sendFlags |= MTPmessages_SendMedia::flag_broadcast; - } else { + flags |= MTPDmessage::flag_views; + flags |= MTPDmessage::flag_post; + } + if (showFromName) { flags |= MTPDmessage::flag_from_id; } - _history->addNewPhoto(newId.msg, flags, 0, replyToId(), date(MTP_int(unixtime())), fromChannelName ? 0 : MTP::authedId(), photo, caption); + if (silentPost) { + sendFlags |= MTPmessages_SendMedia::flag_silent; + } + _history->addNewPhoto(newId.msg, flags, 0, replyToId(), date(MTP_int(unixtime())), showFromName ? MTP::authedId() : 0, photo, caption); _history->sendRequestId = MTP::send(MTPmessages_SendMedia(MTP_int(sendFlags), _peer->input, MTP_int(replyToId()), MTP_inputMediaPhoto(MTP_inputPhoto(MTP_long(photo->id), MTP_long(photo->access)), MTP_string(caption)), MTP_long(randomId), MTPnullMarkup), App::main()->rpcDone(&MainWidget::sentUpdatesReceived), App::main()->rpcFail(&MainWidget::sendMessageFail), 0, 0, _history->sendRequestId); - App::main()->finishForwarding(_history, _broadcast.checked()); + App::main()->finishForwarding(_history, _broadcast.checked(), _silent.checked()); cancelReply(lastKeyboardUsed); App::historyRegRandom(randomId, newId); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 4c82a863123fea..aeb94c7afb380a 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -391,6 +391,20 @@ class CollapseButton : public FlatButton { }; +class SilentToggle : public FlatCheckbox, public AbstractTooltipShower { +public: + + SilentToggle(QWidget *parent); + void mouseMoveEvent(QMouseEvent *e); + void mouseReleaseEvent(QMouseEvent *e); + void leaveEvent(QEvent *e); + + // AbstractTooltipShower + virtual QString tooltipText() const; + virtual QPoint tooltipPos() const; + +}; + enum TextUpdateEventsFlags { TextUpdateEventsSaveDraft = 0x01, TextUpdateEventsSendTyping = 0x02, @@ -609,9 +623,9 @@ public slots: void peerUpdated(PeerData *data); void onFullPeerUpdated(PeerData *data); - void onPhotoUploaded(const FullMsgId &msgId, const MTPInputFile &file); - void onDocumentUploaded(const FullMsgId &msgId, const MTPInputFile &file); - void onThumbDocumentUploaded(const FullMsgId &msgId, const MTPInputFile &file, const MTPInputFile &thumb); + void onPhotoUploaded(const FullMsgId &msgId, bool silent, const MTPInputFile &file); + void onDocumentUploaded(const FullMsgId &msgId, bool silent, const MTPInputFile &file); + void onThumbDocumentUploaded(const FullMsgId &msgId, bool silent, const MTPInputFile &file, const MTPInputFile &thumb); void onPhotoProgress(const FullMsgId &msgId); void onDocumentProgress(const FullMsgId &msgId); @@ -633,7 +647,7 @@ public slots: void onBotStart(); void onJoinChannel(); void onMuteUnmute(); - void onBroadcastChange(); + void onBroadcastSilentChange(); void onPhotoSelect(); void onDocumentSelect(); @@ -770,6 +784,7 @@ public slots: bool readyToForward() const; bool hasBroadcastToggle() const; + bool hasSilentToggle() const; PeerData *_peer, *_clearPeer; // cache _peer in _clearPeer when showing clear history box ChannelId _channel; @@ -817,6 +832,7 @@ public slots: EmojiButton _attachEmoji; IconedButton _kbShow, _kbHide, _cmdStart; FlatCheckbox _broadcast; + SilentToggle _silent; bool _cmdStartShown; MessageField _field; Animation _a_record, _a_recording; diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index 3e792b014546ac..fb5bbe3c1f625c 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -700,7 +700,11 @@ void LayoutOverviewVoice::getState(TextLinkPtr &link, HistoryCursorState &cursor void LayoutOverviewVoice::updateName() const { int32 version = 0; if (const HistoryMessageForwarded *fwd = _parent->Get()) { - _name.setText(st::semiboldFont, lng_forwarded(lt_original, App::peerName(_parent->fromOriginal())), _textNameOptions); + if (_parent->fromOriginal()->isChannel()) { + _name.setText(st::semiboldFont, lng_forwarded_channel(lt_channel, App::peerName(_parent->fromOriginal())), _textNameOptions); + } else { + _name.setText(st::semiboldFont, lng_forwarded(lt_user, App::peerName(_parent->fromOriginal())), _textNameOptions); + } } else { _name.setText(st::semiboldFont, App::peerName(_parent->from()), _textNameOptions); } diff --git a/Telegram/SourceFiles/localimageloader.h b/Telegram/SourceFiles/localimageloader.h index 51edd7310436e2..6e6b5a0ee6b38f 100644 --- a/Telegram/SourceFiles/localimageloader.h +++ b/Telegram/SourceFiles/localimageloader.h @@ -166,10 +166,14 @@ public slots: }; struct FileLoadTo { - FileLoadTo(const PeerId &peer, bool broadcast, MsgId replyTo) : peer(peer), broadcast(broadcast), replyTo(replyTo) { + FileLoadTo(const PeerId &peer, bool broadcast, bool silent, MsgId replyTo) + : peer(peer) + , broadcast(broadcast) + , silent(silent) + , replyTo(replyTo) { } PeerId peer; - bool broadcast; + bool broadcast, silent; MsgId replyTo; }; diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 349568c2bac294..9e35fe6e8372a8 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -589,7 +589,7 @@ void MainWidget::cancelForwarding() { history.cancelForwarding(); } -void MainWidget::finishForwarding(History *hist, bool broadcast) { +void MainWidget::finishForwarding(History *hist, bool broadcast, bool silent) { if (!hist) return; if (!_toForward.isEmpty()) { @@ -600,6 +600,7 @@ void MainWidget::finishForwarding(History *hist, bool broadcast) { int32 sendFlags = 0, flags = 0; bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); bool showFromName = !channelPost || hist->peer->asChannel()->addsSignature(); + bool silentPost = channelPost && silent; if (channelPost) { sendFlags |= MTPmessages_ForwardMessages::flag_broadcast; flags |= MTPDmessage::flag_views; @@ -608,6 +609,9 @@ void MainWidget::finishForwarding(History *hist, bool broadcast) { if (showFromName) { flags |= MTPDmessage::flag_from_id; } + if (silentPost) { + sendFlags |= MTPmessages_ForwardMessages::flag_silent; + } QVector ids; QVector randomIds; @@ -1267,7 +1271,7 @@ DialogsIndexed &MainWidget::dialogsList() { return dialogs.dialogsList(); } -void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, bool broadcast, WebPageId webPageId) { +void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, bool broadcast, bool silent, WebPageId webPageId) { readServerHistory(hist, false); history.fastShowAtEnd(hist); @@ -1307,6 +1311,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, } bool channelPost = hist->peer->isChannel() && !hist->peer->isMegagroup() && hist->peer->asChannel()->canPublish() && (hist->peer->asChannel()->isBroadcast() || broadcast); bool showFromName = !channelPost || hist->peer->asChannel()->addsSignature(); + bool silentPost = channelPost && silent; if (channelPost) { sendFlags |= MTPmessages_SendMessage::flag_broadcast; flags |= MTPDmessage::flag_views; @@ -1315,6 +1320,9 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, if (showFromName) { flags |= MTPDmessage::flag_from_id; } + if (silentPost) { + sendFlags |= MTPmessages_SendMessage::flag_silent; + } MTPVector localEntities = linksToMTP(sendingEntities), sentEntities = linksToMTP(sendingEntities, true); if (!sentEntities.c_vector().v.isEmpty()) { sendFlags |= MTPmessages_SendMessage::flag_entities; @@ -1323,7 +1331,7 @@ void MainWidget::sendMessage(History *hist, const QString &text, MsgId replyTo, hist->sendRequestId = MTP::send(MTPmessages_SendMessage(MTP_int(sendFlags), hist->peer->input, MTP_int(replyTo), msgText, MTP_long(randomId), MTPnullMarkup, sentEntities), rpcDone(&MainWidget::sentUpdatesReceived, randomId), rpcFail(&MainWidget::sendMessageFail), 0, 0, hist->sendRequestId); } - finishForwarding(hist, broadcast); + finishForwarding(hist, broadcast, silent); } void MainWidget::saveRecentHashtags(const QString &text) { @@ -3719,28 +3727,37 @@ bool MainWidget::failNotifySetting(MTPInputNotifyPeer peer, const RPCError &erro return true; } -void MainWidget::updateNotifySetting(PeerData *peer, bool enabled) { +void MainWidget::updateNotifySetting(PeerData *peer, NotifySettingStatus notify, SilentNotifiesStatus silent) { + if (notify == NotifySettingDontChange && silent == SilentNotifiesDontChange) return; + updateNotifySettingPeers.insert(peer); int32 muteFor = 86400 * 365; if (peer->notify == EmptyNotifySettings) { - if (!enabled) { + if (notify == NotifySettingSetMuted || silent == SilentNotifiesSetSilent) { peer->notify = new NotifySettings(); - peer->notify->sound = ""; - peer->notify->mute = unixtime() + muteFor; } - } else { - if (peer->notify == UnknownNotifySettings) { - peer->notify = new NotifySettings(); + } else if (peer->notify == UnknownNotifySettings) { + peer->notify = new NotifySettings(); + } + if (peer->notify != EmptyNotifySettings && peer->notify != UnknownNotifySettings) { + if (notify != NotifySettingDontChange) { + peer->notify->sound = (notify == NotifySettingSetMuted) ? "" : "default"; + peer->notify->mute = (notify == NotifySettingSetMuted) ? (unixtime() + muteFor) : 0; + } + if (silent == SilentNotifiesSetSilent) { + peer->notify->flags |= MTPDpeerNotifySettings::flag_silent; + } else if (silent == SilentNotifiesSetNotify) { + peer->notify->flags &= ~MTPDpeerNotifySettings::flag_silent; } - peer->notify->sound = enabled ? "default" : ""; - peer->notify->mute = enabled ? 0 : (unixtime() + muteFor); } - if (!enabled) { - App::regMuted(peer, muteFor + 1); - } else { - App::unregMuted(peer); + if (notify != NotifySettingDontChange) { + if (notify == NotifySettingSetMuted) { + App::regMuted(peer, muteFor + 1); + } else { + App::unregMuted(peer); + } + App::history(peer->id)->setMute(notify == NotifySettingSetMuted); } - App::history(peer->id)->setMute(!enabled); if (history.peer() == peer) history.updateNotifySettings(); updateNotifySettingTimer.start(NotifySettingSaveTimeout); } diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 075a37474da5d2..ce45674f00e1dd 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -183,6 +183,17 @@ inline int chatsListWidth(int windowWidth) { return snap((windowWidth * 5) / 14, st::dlgMinWidth, st::dlgMaxWidth); } +enum SilentNotifiesStatus { + SilentNotifiesDontChange, + SilentNotifiesSetSilent, + SilentNotifiesSetNotify, +}; +enum NotifySettingStatus { + NotifySettingDontChange, + NotifySettingSetMuted, + NotifySettingSetNotify, +}; + class MainWidget : public TWidget, public RPCSender { Q_OBJECT @@ -220,7 +231,7 @@ class MainWidget : public TWidget, public RPCSender { void gotNotifySetting(MTPInputNotifyPeer peer, const MTPPeerNotifySettings &settings); bool failNotifySetting(MTPInputNotifyPeer peer, const RPCError &error); - void updateNotifySetting(PeerData *peer, bool enabled); + void updateNotifySetting(PeerData *peer, NotifySettingStatus notify, SilentNotifiesStatus silent = SilentNotifiesDontChange); void incrementSticker(DocumentData *sticker); @@ -320,7 +331,7 @@ class MainWidget : public TWidget, public RPCSender { DialogsIndexed &contactsList(); DialogsIndexed &dialogsList(); - void sendMessage(History *hist, const QString &text, MsgId replyTo, bool broadcast, WebPageId webPageId = 0); + void sendMessage(History *hist, const QString &text, MsgId replyTo, bool broadcast, bool silent, WebPageId webPageId = 0); void saveRecentHashtags(const QString &text); void readServerHistory(History *history, bool force = true); @@ -371,7 +382,7 @@ class MainWidget : public TWidget, public RPCSender { void fillForwardingInfo(Text *&from, Text *&text, bool &serviceColor, ImagePtr &preview); void updateForwardingTexts(); void cancelForwarding(); - void finishForwarding(History *hist, bool broadcast); // send them + void finishForwarding(History *hist, bool broadcast, bool silent); // send them void mediaMarkRead(DocumentData *data); void mediaMarkRead(const HistoryItemsMap &items); diff --git a/Telegram/SourceFiles/profilewidget.cpp b/Telegram/SourceFiles/profilewidget.cpp index 19f23036c7e2f0..72e7bf51553a82 100644 --- a/Telegram/SourceFiles/profilewidget.cpp +++ b/Telegram/SourceFiles/profilewidget.cpp @@ -245,7 +245,7 @@ void ProfileInner::onSearchInPeer() { } void ProfileInner::onEnableNotifications() { - App::main()->updateNotifySetting(_peer, _enableNotifications.checked()); + App::main()->updateNotifySetting(_peer, _enableNotifications.checked() ? NotifySettingSetNotify : NotifySettingSetMuted); } void ProfileInner::saveError(const QString &str) { From 37309a91ac36f5a4c745c2d17874a30c303bb9bf Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 20:23:42 +0300 Subject: [PATCH 104/133] fixed media_only dcs, added copy post link to clipboard, fixed signature display in gifs, 0.9.27 dev version --- Telegram/Resources/lang.strings | 8 ----- Telegram/SourceFiles/config.h | 8 ++--- Telegram/SourceFiles/history.cpp | 4 +-- Telegram/SourceFiles/history.h | 6 ++++ Telegram/SourceFiles/historywidget.cpp | 34 +++++++----------- Telegram/SourceFiles/historywidget.h | 3 +- Telegram/SourceFiles/mainwidget.cpp | 36 ++++++++++--------- .../SourceFiles/mtproto/mtpConnection.cpp | 11 +++++- Telegram/SourceFiles/overviewwidget.cpp | 23 ------------ Telegram/SourceFiles/overviewwidget.h | 2 -- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++--- Telegram/Telegram.xcodeproj/project.pbxproj | 12 +++---- Telegram/Version | 10 +++--- 14 files changed, 71 insertions(+), 96 deletions(-) diff --git a/Telegram/Resources/lang.strings b/Telegram/Resources/lang.strings index 96f55498e700a9..387bdd0d77a06b 100644 --- a/Telegram/Resources/lang.strings +++ b/Telegram/Resources/lang.strings @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "View group info"; "lng_context_view_channel" = "View channel info"; -"lng_context_open_link" = "Open Link"; "lng_context_copy_link" = "Copy Link"; "lng_context_copy_post_link" = "Copy Post Link"; -"lng_context_open_email" = "Write to this address"; "lng_context_copy_email" = "Copy email address"; -"lng_context_open_hashtag" = "Search by hashtag"; "lng_context_copy_hashtag" = "Copy hashtag"; -"lng_context_open_mention" = "Open profile"; "lng_context_copy_mention" = "Copy username"; -"lng_context_open_image" = "Open Image"; "lng_context_save_image" = "Save Image As.."; "lng_context_forward_image" = "Forward Image"; "lng_context_delete_image" = "Delete Image"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Cancel Download"; "lng_context_show_in_folder" = "Show in Folder"; "lng_context_show_in_finder" = "Show in Finder"; -"lng_context_open_video" = "Open Video"; "lng_context_save_video" = "Save Video As.."; -"lng_context_open_audio" = "Open Audio"; "lng_context_save_audio" = "Save Audio As.."; "lng_context_pack_info" = "Pack Info"; "lng_context_pack_add" = "Add Stickers"; -"lng_context_open_file" = "Open File"; "lng_context_save_file" = "Save File As.."; "lng_context_forward_file" = "Forward File"; "lng_context_delete_file" = "Delete File"; diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 42473d4699a79d..7f9df339f724a8 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,10 +20,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9026; -static const wchar_t *AppVersionStr = L"0.9.26"; -static const bool DevVersion = false; -#define BETA_VERSION (9026001ULL) // just comment this line to build public version +static const int32 AppVersion = 9027; +static const wchar_t *AppVersionStr = L"0.9.27"; +static const bool DevVersion = true; +//#define BETA_VERSION (9026001ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 6c348beec754a3..3dd6a40d1e0337 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -4455,8 +4455,8 @@ void HistoryGif::initDimensions(const HistoryItem *parent) { _thumbh = th; _maxw = qMax(tw, int32(st::minPhotoSize)); _minh = qMax(th, int32(st::minPhotoSize)); + _maxw = qMax(_maxw, parent->infoWidth() + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); if (!gif() || !_gif->ready()) { - _maxw = qMax(_maxw, parent->infoWidth() + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); _maxw = qMax(_maxw, gifMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); } if (bubble) { @@ -4506,12 +4506,12 @@ int32 HistoryGif::resize(int32 width, const HistoryItem *parent) { _width = qMax(tw, int32(st::minPhotoSize)); _height = qMax(th, int32(st::minPhotoSize)); + _width = qMax(_width, parent->infoWidth() + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); if (gif() && _gif->ready()) { if (!_gif->started()) { _gif->start(_thumbw, _thumbh, _width, _height, true); } } else { - _width = qMax(_width, parent->infoWidth() + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); _width = qMax(_width, gifMaxStatusWidth(_data) + 2 * int32(st::msgDateImgDelta + st::msgDateImgPadding.x())); } if (bubble) { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 6bf69c08f5472e..8d80eb393a64ef 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -1032,6 +1032,12 @@ class HistoryItem : public HistoryElem, public Interfaces { } bool canEdit(const QDateTime &cur) const; + bool hasDirectLink() const { + return id > 0 && _history->peer->isChannel() && _history->peer->asChannel()->isPublic(); + } + QString directLink() const { + return hasDirectLink() ? qsl("https://telegram.me/") + _history->peer->asChannel()->username + '/' + QString::number(id) : QString(); + } int32 y; MsgId id; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 5b3dfc9cf3d752..6bdc9c72a1733e 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -879,7 +879,6 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { } } if (lnkPhoto) { - _menu->addAction(lang(lng_context_open_image), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_save_image), this, SLOT(saveContextImage()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_image), this, SLOT(copyContextImage()))->setEnabled(true); } else { @@ -892,10 +891,12 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (lnkDocument && !lnkDocument->document()->already(true).isEmpty()) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkIsVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); _menu->addAction(lang(lnkIsVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } + if (item && item->hasDirectLink() && isUponSelected != 2 && isUponSelected != -2) { + _menu->addAction(lang(lng_context_copy_post_link), _widget, SLOT(onCopyPostLink())); + } if (isUponSelected > 1) { _menu->addAction(lang(lng_context_forward_selected), _widget, SLOT(onForwardSelected())); if (selectedForDelete == selectedForForward) { @@ -980,19 +981,18 @@ void HistoryInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { QLatin1String linktype = _contextMenuLnk ? _contextMenuLnk->type() : qstr(""); if (linktype == qstr("TextLink") || linktype == qstr("LocationLink")) { - _menu->addAction(lang(lng_context_open_link), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_link), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("EmailLink")) { - _menu->addAction(lang(lng_context_open_email), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_email), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("MentionLink")) { - _menu->addAction(lang(lng_context_open_mention), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_mention), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("HashtagLink")) { - _menu->addAction(lang(lng_context_open_hashtag), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_hashtag), this, SLOT(copyContextUrl()))->setEnabled(true); } else { } + if (item && item->hasDirectLink() && isUponSelected != 2 && isUponSelected != -2) { + _menu->addAction(lang(lng_context_copy_post_link), _widget, SLOT(onCopyPostLink())); + } if (isUponSelected > 1) { _menu->addAction(lang(lng_context_forward_selected), _widget, SLOT(onForwardSelected())); if (selectedForDelete == selectedForForward) { @@ -1044,13 +1044,6 @@ void HistoryInner::copySelectedText() { } } -void HistoryInner::openContextUrl() { - HistoryItem *was = App::hoveredLinkItem(); - App::hoveredLinkItem(App::contextItem()); - _contextMenuLnk->onClick(Qt::LeftButton); - App::hoveredLinkItem(was); -} - void HistoryInner::copyContextUrl() { QString enc = _contextMenuLnk->encoded(); if (!enc.isEmpty()) { @@ -1109,14 +1102,6 @@ void HistoryInner::showContextInFolder() { if (!already.isEmpty()) psShowInFolder(already); } -void HistoryInner::openContextFile() { - HistoryItem *was = App::hoveredLinkItem(); - App::hoveredLinkItem(App::contextItem()); - DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); - App::hoveredLinkItem(was); -} - void HistoryInner::saveContextFile() { if (DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data())) { DocumentSaveLink::doSave(lnkDocument->document(), true); @@ -6952,6 +6937,13 @@ void HistoryWidget::onEditMessage() { } } +void HistoryWidget::onCopyPostLink() { + HistoryItem *to = App::contextItem(); + if (!to || !to->hasDirectLink()) return; + + QApplication::clipboard()->setText(to->directLink()); +} + bool HistoryWidget::lastForceReplyReplied(const FullMsgId &replyTo) const { if (replyTo.msg > 0 && replyTo.channel != _channel) return false; return _keyboard.forceReply() && _keyboard.forMsgId() == FullMsgId(_channel, _history->lastKeyboardId) && _keyboard.forMsgId().msg == (replyTo.msg < 0 ? replyToId() : replyTo.msg); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index aeb94c7afb380a..b263760363c936 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -108,13 +108,11 @@ public slots: void onUpdateSelected(); void onParentGeometryChanged(); - void openContextUrl(); void copyContextUrl(); void saveContextImage(); void copyContextImage(); void cancelContextDownload(); void showContextInFolder(); - void openContextFile(); void saveContextFile(); void saveContextGif(); void copyContextText(); @@ -610,6 +608,7 @@ public slots: void onCancel(); void onReplyToMessage(); void onEditMessage(); + void onCopyPostLink(); void onFieldBarCancel(); void onCancelSendAction(); diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 9e35fe6e8372a8..6df869b326df7f 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -3769,16 +3769,17 @@ void MainWidget::incrementSticker(DocumentData *sticker) { RecentStickerPack::iterator i = recent.begin(), e = recent.end(); for (; i != e; ++i) { if (i->first == sticker) { - ++i->second; - if (i->second > 0x8000) { - for (RecentStickerPack::iterator j = recent.begin(); j != e; ++j) { - if (j->second > 1) { - j->second /= 2; - } else { - j->second = 1; - } - } - } + i->second = recent.begin()->second; // throw to the first place + //++i->second; + //if (i->second > 0x8000) { + // for (RecentStickerPack::iterator j = recent.begin(); j != e; ++j) { + // if (j->second > 1) { + // j->second /= 2; + // } else { + // j->second = 1; + // } + // } + //} for (; i != recent.begin(); --i) { if ((i - 1)->second > i->second) { break; @@ -3790,13 +3791,14 @@ void MainWidget::incrementSticker(DocumentData *sticker) { } if (i == e) { while (recent.size() >= StickerPanPerRow * StickerPanRowsPerPage) recent.pop_back(); - recent.push_back(qMakePair(sticker, 1)); - for (i = recent.end() - 1; i != recent.begin(); --i) { - if ((i - 1)->second > i->second) { - break; - } - qSwap(*i, *(i - 1)); - } + recent.push_front(qMakePair(sticker, recent.isEmpty() ? 1 : recent.begin()->second)); + //recent.push_back(qMakePair(sticker, 1)); + //for (i = recent.end() - 1; i != recent.begin(); --i) { + // if ((i - 1)->second > i->second) { + // break; + // } + // qSwap(*i, *(i - 1)); + //} } Local::writeUserSettings(); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 3604baf5749b19..3da86198529c01 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -1967,6 +1967,15 @@ void MTProtoConnectionPrivate::restartNow() { void MTProtoConnectionPrivate::socketStart(bool afterConfig) { bool isDldDc = (dc >= MTP::dldStart) && (dc < MTP::dldEnd); + if (isDldDc) { // using media_only addresses only if key for this dc is already created + QReadLocker lockFinished(&sessionDataMutex); + if (sessionData) { + if (!sessionData->getKey()) { + isDldDc = false; + } + } + + } int32 baseDc = (dc % _mtp_internal::dcShift); static const int IPv4address = 0, IPv6address = 1; @@ -2046,7 +2055,7 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) { _pingSender.stop(); if (!noIPv4) DEBUG_LOG(("MTP Info: creating IPv4 connection to %1:%2 (tcp) and %1:%2 (http)..").arg(ip[IPv4address][TcpProtocol].c_str()).arg(port[IPv4address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); - if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv4 connection to [%1]:%2 (tcp) and [%1]:%2 (http)..").arg(ip[IPv6address][TcpProtocol].c_str()).arg(port[IPv6address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); + if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv6 connection to [%1]:%2 (tcp) and [%1]:%2 (http)..").arg(ip[IPv6address][TcpProtocol].c_str()).arg(port[IPv6address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); _waitForConnectedTimer.start(_waitForConnected); if (_conn4) { diff --git a/Telegram/SourceFiles/overviewwidget.cpp b/Telegram/SourceFiles/overviewwidget.cpp index c95cce077e519d..2430d02d5cee7e 100644 --- a/Telegram/SourceFiles/overviewwidget.cpp +++ b/Telegram/SourceFiles/overviewwidget.cpp @@ -1271,7 +1271,6 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _menu->addAction(lang(lng_context_to_msg), this, SLOT(goToMessage()))->setEnabled(true); } if (lnkPhoto) { - _menu->addAction(lang(lng_context_open_image), this, SLOT(openContextUrl()))->setEnabled(true); } else { if (lnkDocument && lnkDocument->document()->loading()) { _menu->addAction(lang(lng_context_cancel_download), this, SLOT(cancelContextDownload()))->setEnabled(true); @@ -1279,7 +1278,6 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { if (lnkDocument && !lnkDocument->document()->already(true).isEmpty()) { _menu->addAction(lang((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_context_show_in_finder : lng_context_show_in_folder), this, SLOT(showContextInFolder()))->setEnabled(true); } - _menu->addAction(lang(lnkIsVideo ? lng_context_open_video : (lnkIsAudio ? lng_context_open_audio : lng_context_open_file)), this, SLOT(openContextFile()))->setEnabled(true); _menu->addAction(lang(lnkIsVideo ? lng_context_save_video : (lnkIsAudio ? lng_context_save_audio : lng_context_save_file)), this, SLOT(saveContextFile()))->setEnabled(true); } } @@ -1309,16 +1307,12 @@ void OverviewInner::showContextMenu(QContextMenuEvent *e, bool showFromTouch) { _menu = new PopupMenu(); QLatin1String linktype = _contextMenuLnk ? _contextMenuLnk->type() : qstr(""); if (linktype == qstr("TextLink") || linktype == qstr("LocationLink")) { - _menu->addAction(lang(lng_context_open_link), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_link), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("EmailLink")) { - _menu->addAction(lang(lng_context_open_email), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_email), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("MentionLink")) { - _menu->addAction(lang(lng_context_open_mention), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_mention), this, SLOT(copyContextUrl()))->setEnabled(true); } else if (linktype == qstr("HashtagLink")) { - _menu->addAction(lang(lng_context_open_hashtag), this, SLOT(openContextUrl()))->setEnabled(true); _menu->addAction(lang(lng_context_copy_hashtag), this, SLOT(copyContextUrl()))->setEnabled(true); } else { } @@ -1447,15 +1441,6 @@ void OverviewInner::setSelectMode(bool enabled) { _selMode = enabled; } -void OverviewInner::openContextUrl() { - if (_contextMenuLnk) { - HistoryItem *was = App::hoveredLinkItem(); - App::hoveredLinkItem(App::contextItem()); - _contextMenuLnk->onClick(Qt::LeftButton); - App::hoveredLinkItem(was); - } -} - void OverviewInner::copyContextUrl() { QString enc = _contextMenuLnk ? _contextMenuLnk->encoded() : QString(); if (!enc.isEmpty()) { @@ -1521,14 +1506,6 @@ void OverviewInner::saveContextFile() { if (lnkDocument) DocumentSaveLink::doSave(lnkDocument->document(), true); } -void OverviewInner::openContextFile() { - HistoryItem *was = App::hoveredLinkItem(); - App::hoveredLinkItem(App::contextItem()); - DocumentLink *lnkDocument = dynamic_cast(_contextMenuLnk.data()); - if (lnkDocument) DocumentOpenLink(lnkDocument->document()).onClick(Qt::LeftButton); - App::hoveredLinkItem(was); -} - bool OverviewInner::onSearchMessages(bool searchCache) { _searchTimer.stop(); QString q = _search.text().trimmed(); diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index 58d1efbd54c37d..f06da8a25460ae 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -86,12 +86,10 @@ public slots: void onUpdateSelected(); - void openContextUrl(); void copyContextUrl(); void cancelContextDownload(); void showContextInFolder(); void saveContextFile(); - void openContextFile(); void goToMessage(); void deleteMessage(); diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index 733bd0e84ec53c..a60467d8b60541 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.26 + 0.9.27 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 878e146e64bbf1..7afbfd1598f66d 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,26,1 - PRODUCTVERSION 0,9,26,1 + FILEVERSION 0,9,27,0 + PRODUCTVERSION 0,9,27,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.26.1" + VALUE "FileVersion", "0.9.27.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.26.1" + VALUE "ProductVersion", "0.9.27.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index c7f7c5580fc782..0b392f3d6fd6f2 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.26; + CURRENT_PROJECT_VERSION = 0.9.27; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.26; + CURRENT_PROJECT_VERSION = 0.9.27; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.26; + CURRENT_PROJECT_VERSION = 0.9.27; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.26; + DYLIB_CURRENT_VERSION = 0.9.27; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.26; + CURRENT_PROJECT_VERSION = 0.9.27; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.26; + DYLIB_CURRENT_VERSION = 0.9.27; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index 7e97206f14ccbb..add9a12a4fd471 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9026 +AppVersion 9027 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.26 -AppVersionStr 0.9.26 -DevChannel 0 -BetaVersion 9026001 +AppVersionStrSmall 0.9.27 +AppVersionStr 0.9.27 +DevChannel 1 +BetaVersion 0 9026001 From 08153c944de9695acfbc916abe5a1eab80ca2b0e Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 20:24:56 +0300 Subject: [PATCH 105/133] langs updated, 0.9.27 dev version --- Telegram/SourceFiles/langs/lang_de.strings | 21 ++++++++++++++++--- Telegram/SourceFiles/langs/lang_es.strings | 19 +++++++++++++++-- Telegram/SourceFiles/langs/lang_it.strings | 19 +++++++++++++++-- Telegram/SourceFiles/langs/lang_ko.strings | 19 +++++++++++++++-- Telegram/SourceFiles/langs/lang_nl.strings | 19 +++++++++++++++-- Telegram/SourceFiles/langs/lang_pt_BR.strings | 19 +++++++++++++++-- 6 files changed, 103 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index f1fad4804b2656..90b60d32a64818 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Interner Serverfehler."; "lng_flood_error" = "Zu viele Versuche, bitte später erneut probieren."; "lng_gif_error" = "Ein Fehler ist beim Laden der GIF-Animation aufgetreten :("; +"lng_edit_error" = "Du kannst diese Nachricht nicht bearbeiten"; +"lng_edit_deleted" = "Diese Nachricht wurde gelöscht"; +"lng_edit_too_long" = "Der Text ist leider zu lang"; +"lng_edit_message" = "Nachricht bearbeiten"; +"lng_edit_message_text" = "Neuer Text.."; "lng_deleted" = "Gelöschter Kontakt"; "lng_deleted_message" = "Gelöschte Nachricht"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link in die Zwischenablage kopiert.\n"; -"lng_forwarded_from" = "Weitergeleitet von"; +"lng_forwarded" = "Weitergeleitet von {user}"; +"lng_forwarded_channel" = "Weitergeleitet aus {channel}"; +"lng_forwarded_via" = "Weitergeleitet von {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Weitergeleitet aus {channel} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Antwort auf"; "lng_attach_failed" = "Uploadfehler"; @@ -645,8 +654,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_send_button" = "Senden"; "lng_message_ph" = "Schreibe deine Nachricht.."; "lng_comment_ph" = "Schreibe ein Kommentar.."; -"lng_broadcast_ph" = "Schicke einen Broadcast.."; +"lng_broadcast_ph" = "Sende einen Broadcast.."; +"lng_broadcast_silent_ph" = "Lautloser Broadcast"; "lng_record_cancel" = "Zum Abbrechen rausbewegen"; +"lng_will_be_notified" = "Mitglieder werden benachrichtigt"; +"lng_wont_be_notified" = "Mitglieder werden nicht benachrichtigt"; "lng_empty_history" = ""; "lng_willbe_history" = "Chat auswählen um zu schreiben"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Link öffnen"; "lng_context_copy_link" = "Link kopieren"; +"lng_context_copy_post_link" = "Link kopieren"; "lng_context_open_email" = "Email verfassen"; "lng_context_copy_email" = "E-Mail-Adresse kopieren"; "lng_context_open_hashtag" = "Nach Hashtag suchen"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "GIF speichern"; "lng_context_to_msg" = "Zur Nachricht"; "lng_context_reply_msg" = "Antworten"; +"lng_context_edit_msg" = "Bearbeiten"; "lng_context_forward_msg" = "Nachricht weiterleiten"; "lng_context_delete_msg" = "Nachricht löschen"; "lng_context_select_msg" = "Nachricht auswählen"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Gruppennamen ändern"; "lng_edit_contact_title" = "Kontaktnamen ändern"; "lng_edit_channel_title" = "Kanal bearbeiten"; +"lng_edit_sign_messages" = "Nachrichten unterschreiben"; "lng_edit_group" = "Gruppe bearbeiten"; "lng_edit_self_title" = "Name bearbeiten"; "lng_confirm_contact_data" = "Neuer Kontakt"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop wurde aktualisiert auf Version {version}\n\n{changes}\n\nGesamter Versionsverlauf:\n{link}"; "lng_new_version_minor" = "— Fehlerbehebungen und Softwareoptimierungen"; -"lng_new_version_text" = "— Neue Option in den Einstellungen unter 'Hintergrund' hinzugefügt (nennt sich dort \"Flexibles Layout für breite Bildschirme\"), um das Layout bei besonders breiten Bildschirmen zu ändern\n— Abstürze in der Linux-Version behoben"; +"lng_new_version_text" = "— Bearbeite deine Nachrichten in Kanälen und Supergruppen.\n— Teile direkt Links zu einzelnen Kanal-Nachrichten über das Teilen-Symbol neben der Nachricht.\n— Unterschreibe Nachrichten in Kanälen - so kann jeder sehen, welcher Admin die Nachricht geschrieben hat.\n— Sende 'lautlose Nachrichten' in Kanälen. Klasse, wenn man mal wieder mitten in der Nacht eine Nachricht senden muss."; "lng_menu_insert_unicode" = "Unicode-Steuerzeichen einfügen"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index 4370b950bc5876..eede26f55b04c5 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Error interno del servidor."; "lng_flood_error" = "Muchos intentos. Por favor, reinténtalo más tarde."; "lng_gif_error" = "Ocurrió un error al leer la animación GIF :("; +"lng_edit_error" = "No puedes editar este mensaje"; +"lng_edit_deleted" = "Este mensaje fue eliminado"; +"lng_edit_too_long" = "Tu texto es demasiado largo"; +"lng_edit_message" = "Editar mensaje"; +"lng_edit_message_text" = "Nuevo texto..."; "lng_deleted" = "Desconocido"; "lng_deleted_message" = "Mensaje eliminado"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Enlace copiado al portapapeles."; -"lng_forwarded_from" = "Reenviado desde"; +"lng_forwarded" = "Forwarded from {user}"; +"lng_forwarded_channel" = "Forwarded from {channel}"; +"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Respondiendo a"; "lng_attach_failed" = "Fallido"; @@ -646,7 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Escribe un mensaje..."; "lng_comment_ph" = "Escribe un comentario..."; "lng_broadcast_ph" = "Difunde un mensaje..."; +"lng_broadcast_silent_ph" = "Silent broadcast.."; "lng_record_cancel" = "Suelta fuera de aquí para cancelar"; +"lng_will_be_notified" = "Tu publicación será notificada"; +"lng_wont_be_notified" = "Tu publicación no será notificada"; "lng_empty_history" = ""; "lng_willbe_history" = "Selecciona un chat para comenzar"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Abrir enlace"; "lng_context_copy_link" = "Copiar enlace"; +"lng_context_copy_post_link" = "Copiar enlace"; "lng_context_open_email" = "Escribir a esta dirección"; "lng_context_copy_email" = "Copiar dirección de correo electrónico"; "lng_context_open_hashtag" = "Buscar por hashtag"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "Guardar GIF"; "lng_context_to_msg" = "Ir al mensaje"; "lng_context_reply_msg" = "Responder"; +"lng_context_edit_msg" = "Editar"; "lng_context_forward_msg" = "Reenviar mensaje"; "lng_context_delete_msg" = "Eliminar mensaje"; "lng_context_select_msg" = "Seleccionar mensaje"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Editar nombre del grupo"; "lng_edit_contact_title" = "Editar nombre del contacto"; "lng_edit_channel_title" = "Editar canal"; +"lng_edit_sign_messages" = "Firmar los mensajes"; "lng_edit_group" = "Editar grupo"; "lng_edit_self_title" = "Editar tu nombre"; "lng_confirm_contact_data" = "Nuevo contacto"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop ha sido actualizada a la versión {version}\n\n{changes}\n\nEl historial completo está disponible aquí:\n{link}"; "lng_new_version_minor" = "— Corrección de errores y otras mejoras menores"; -"lng_new_version_text" = "— Ajuste para activar o desactivar el diseño adaptable para pantallas anchas \n— Arreglado el cierre inesperado en la versión para Linux"; +"lng_new_version_text" = "— Edita tus mensajes en canales y supergrupos.\n— Comparte enlaces a publicaciones específicas en canales, a través del menú contextual de la publicación. \n— Añade firmas de los administradores a los mensajes en canales.\n— Envía mensajes silenciosos en canales, que no serán notificados a los miembros. Es útil para publicaciones que no son urgentes o en medio de la noche."; "lng_menu_insert_unicode" = "Insertar caracteres de control Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index 7563d169ceb824..8c49827618b061 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Errore interno del server."; "lng_flood_error" = "Troppi tentativi. Per favore riprova più tardi."; "lng_gif_error" = "C'è stato un errore nel leggere la GIF :("; +"lng_edit_error" = "Non puoi modificare questo messaggio"; +"lng_edit_deleted" = "Questo messaggio è stato eliminato"; +"lng_edit_too_long" = "Il tuo messaggio è troppo lungo"; +"lng_edit_message" = "Modifica messaggio"; +"lng_edit_message_text" = "Nuovo testo messaggio.."; "lng_deleted" = "Sconosciuto"; "lng_deleted_message" = "Messaggio eliminato"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link copiato negli appunti."; -"lng_forwarded_from" = "Inoltrato da"; +"lng_forwarded" = "Inoltrato da {user}"; +"lng_forwarded_channel" = "Inoltrato da {channel}"; +"lng_forwarded_via" = "Inoltrato da {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Inoltrato da {channel} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "In risposta a"; "lng_attach_failed" = "Fallito"; @@ -646,7 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Scrivi un messaggio.."; "lng_comment_ph" = "Scrivi un commento.."; "lng_broadcast_ph" = "Diffondi un messaggio.."; +"lng_broadcast_silent_ph" = "Broadcast silenzioso.."; "lng_record_cancel" = "Rilascia fuori da qui per annullare"; +"lng_will_be_notified" = "I membri saranno notificati quando pubblichi"; +"lng_wont_be_notified" = "I membri non saranno notificati quando pubblichi"; "lng_empty_history" = ""; "lng_willbe_history" = "Seleziona una chat per iniziare a messaggiare"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Apri link"; "lng_context_copy_link" = "Copia link"; +"lng_context_copy_post_link" = "Copia link post"; "lng_context_open_email" = "Scrivi a questo indirizzo"; "lng_context_copy_email" = "Copia indirizzo email"; "lng_context_open_hashtag" = "Cerca via hashtag"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "Salva GIF"; "lng_context_to_msg" = "Vai al messaggio"; "lng_context_reply_msg" = "Rispondi"; +"lng_context_edit_msg" = "Modifica"; "lng_context_forward_msg" = "Inoltra messaggio"; "lng_context_delete_msg" = "Elimina messaggio"; "lng_context_select_msg" = "Seleziona messaggio"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Modifica nome gruppo"; "lng_edit_contact_title" = "Modifica nome contatto"; "lng_edit_channel_title" = "Modifica canale"; +"lng_edit_sign_messages" = "Firma messaggi"; "lng_edit_group" = "Modifica gruppo"; "lng_edit_self_title" = "Modifica il tuo nome"; "lng_confirm_contact_data" = "Nuovo contatto"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop si è aggiornato alla versione {version}\n\n{changes}\n\nLa cronologia degli aggiornamenti è disponibile qui:\n{link}"; "lng_new_version_minor" = "— Risoluzione di problemi e altri miglioramenti minori"; -"lng_new_version_text" = "— Interruttore per il layout adattivo per grandi schermi aggiunto nelle Impostazioni\n— Risoluzione dei crash su Linux"; +"lng_new_version_text" = "— Modifica i tuoi messaggi nei canali e nei supergruppi.\n— Condividi link per post specifici nei canali con il menu contestuale dei post.\n— Aggiungi le firme per i messaggi degli amministratori nei canali.\n— Invia messaggi silenziosi nei canali che non notificheranno i membri.\nUtile per i post non urgenti o fatti di notte."; "lng_menu_insert_unicode" = "Inserisci carattere di controllo Unicode"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index 4164413533424e..bda501dcf0e328 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "내부 서버 오류"; "lng_flood_error" = "시도가 너무 많습니다. 나중에 다시 시도해주세요."; "lng_gif_error" = "GIF 애니메이션을 읽는 동안 에러가 발생하였습니다."; +"lng_edit_error" = "You cannot edit this message"; +"lng_edit_deleted" = "This message was deleted"; +"lng_edit_too_long" = "Your message text is too long"; +"lng_edit_message" = "Edit message"; +"lng_edit_message_text" = "New message text.."; "lng_deleted" = "알 수 없음"; "lng_deleted_message" = "삭제된 메시지"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "클립보드에 링크가 복사되었습니다."; -"lng_forwarded_from" = "전달받음"; +"lng_forwarded" = "Forwarded from {user}"; +"lng_forwarded_channel" = "Forwarded from {channel}"; +"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "다음 유저에게 답장 :"; "lng_attach_failed" = "실패"; @@ -646,7 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "메시지 쓰기"; "lng_comment_ph" = "코멘트 쓰기.."; "lng_broadcast_ph" = "단체메시지 쓰기."; +"lng_broadcast_silent_ph" = "Silent broadcast.."; "lng_record_cancel" = "이 영역 밖에서 마우스 클릭을 해제하시면 취소가 됩니다."; +"lng_will_be_notified" = "Members will be notified when you post"; +"lng_wont_be_notified" = "Members will not be notified when you post"; "lng_empty_history" = ""; "lng_willbe_history" = "대화하실 방을 선택해주세요."; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "링크 열기"; "lng_context_copy_link" = "링크 복사"; +"lng_context_copy_post_link" = "Copy Post Link"; "lng_context_open_email" = "이 주소로 메시지 보내기"; "lng_context_copy_email" = "이메일 복사"; "lng_context_open_hashtag" = "해시태그로 검색"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "GIF 저장"; "lng_context_to_msg" = "메시지로 이동"; "lng_context_reply_msg" = "답장"; +"lng_context_edit_msg" = "Edit"; "lng_context_forward_msg" = "메시지 전달"; "lng_context_delete_msg" = "메시지 삭제"; "lng_context_select_msg" = "메시지 선택"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "그룹 이름 수정"; "lng_edit_contact_title" = "연락처 이름 수정"; "lng_edit_channel_title" = "채널 수정"; +"lng_edit_sign_messages" = "Sign messages"; "lng_edit_group" = "그룹방 수정"; "lng_edit_self_title" = "이름 수정"; "lng_confirm_contact_data" = "새로운 연락처"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}"; "lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상"; -"lng_new_version_text" = "— 와이드 스크린 레이아웃 설정 적용\n— 리눅스 버전 크래시 수정"; +"lng_new_version_text" = "— Edit your messages in channels and supergroups.\n— Share links to specific posts in channels via the post context menu.\n— Add admin signatures to messages in channels.\n— Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting."; "lng_menu_insert_unicode" = "유니코드 문자를 입력하세요."; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index 5d5e5d0cf9888c..5edaad9d5a140e 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Interne serverfout."; "lng_flood_error" = "Teveel pogingen. Probeer het later opnieuw."; "lng_gif_error" = "Er is iets een fout opgetreden bij het lezen van de GIF :("; +"lng_edit_error" = "Je mag dit bericht niet bewerken"; +"lng_edit_deleted" = "Bericht is gewist"; +"lng_edit_too_long" = "Je bericht is te lang"; +"lng_edit_message" = "Bericht bewerken"; +"lng_edit_message_text" = "Nieuw bericht..."; "lng_deleted" = "Onbekend"; "lng_deleted_message" = "Verwijderd bericht"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link gekopieerd naar klembord"; -"lng_forwarded_from" = "Doorgestuurd van"; +"lng_forwarded" = "Forwarded from {user}"; +"lng_forwarded_channel" = "Forwarded from {channel}"; +"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Antwoord op"; "lng_attach_failed" = "Mislukt"; @@ -646,7 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Bericht schrijven"; "lng_comment_ph" = "Reactie"; "lng_broadcast_ph" = "Massabericht"; +"lng_broadcast_silent_ph" = "Silent broadcast.."; "lng_record_cancel" = "Annuleren: uit het vak loslaten"; +"lng_will_be_notified" = "Berichtgeving voor deelnemers"; +"lng_wont_be_notified" = "Geen berichtgeving voor deelnemers"; "lng_empty_history" = ""; "lng_willbe_history" = "Kies een chat om te beginnen"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Link openen"; "lng_context_copy_link" = "Link kopiëren"; +"lng_context_copy_post_link" = "Link kopiëren"; "lng_context_open_email" = "Naar dit adres sturen"; "lng_context_copy_email" = "E-mailadres kopiëren"; "lng_context_open_hashtag" = "Zoeken op hashtag"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "GIF opslaan"; "lng_context_to_msg" = "Naar bericht gaan"; "lng_context_reply_msg" = "Antwoord"; +"lng_context_edit_msg" = "Bewerken"; "lng_context_forward_msg" = "Bericht doorsturen"; "lng_context_delete_msg" = "Bericht verwijderen"; "lng_context_select_msg" = "Bericht kiezen"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Groepsnaam bewerken"; "lng_edit_contact_title" = "Naam bewerken"; "lng_edit_channel_title" = "Kanaal wijzigen"; +"lng_edit_sign_messages" = "Ondertekenen"; "lng_edit_group" = "Groep bewerken"; "lng_edit_self_title" = "Je naam bewerken"; "lng_confirm_contact_data" = "Nieuw contact"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}"; "lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen"; -"lng_new_version_text" = "— Adaptieve layout voor brede schermen toegevoegd aan instellingen\n— Crashes in de Linuxversie opgelost"; +"lng_new_version_text" = "— Edit your messages in channels and supergroups.\n— Share links to specific posts in channels via the post context menu.\n— Add admin signatures to messages in channels.\n— Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting."; "lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index fb36ee6188be5a..2c92adab344f57 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -123,6 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "Erro interno do servidor."; "lng_flood_error" = "Muitas tentativas. Por favor, tente novamente mais tarde."; "lng_gif_error" = "Um erro ocorreu com a animação do GIF :("; +"lng_edit_error" = "Você não pode editar essa mensagem"; +"lng_edit_deleted" = "Essa mensagem foi apagada"; +"lng_edit_too_long" = "Sua mensagem está muito longa"; +"lng_edit_message" = "Editar mensagem"; +"lng_edit_message_text" = "Nova mensagem..."; "lng_deleted" = "Desconhecido"; "lng_deleted_message" = "Mensagem apagada"; @@ -556,7 +561,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link copiado para área de transferência."; -"lng_forwarded_from" = "Encaminhado de"; +"lng_forwarded" = "Encaminhado de {user}"; +"lng_forwarded_channel" = "Encaminhado de {channel}"; +"lng_forwarded_via" = "Encaminhado de {user} via {online_bot}"; +"lng_forwarded_channel_via" = "Encaminhado de {channel} via {online_bot}"; +"lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Em resposta a"; "lng_attach_failed" = "Falhou"; @@ -646,7 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Escrever a mensagem.."; "lng_comment_ph" = "Escreva um comentário..."; "lng_broadcast_ph" = "Transmitir a mensagem..."; +"lng_broadcast_silent_ph" = "Silenciar transmissão..."; "lng_record_cancel" = "Solte fora desse campo para cancelar"; +"lng_will_be_notified" = "Os membros serão notificados quando você postar"; +"lng_wont_be_notified" = "Os membros não serão notificados quando você postar"; "lng_empty_history" = ""; "lng_willbe_history" = "Selecione um chat para começar a conversar"; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -706,6 +718,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_open_link" = "Abrir Link"; "lng_context_copy_link" = "Copiar Link"; +"lng_context_copy_post_link" = "Copiar Link do Post"; "lng_context_open_email" = "Escrever para este endereço"; "lng_context_copy_email" = "Copiar endereço de email"; "lng_context_open_hashtag" = "Buscar pela hashtag"; @@ -736,6 +749,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "Salvar GIF"; "lng_context_to_msg" = "Ir Para Mensagem"; "lng_context_reply_msg" = "Responder"; +"lng_context_edit_msg" = "Editar"; "lng_context_forward_msg" = "Encaminhar Mensagem"; "lng_context_delete_msg" = "Apagar Mensagem"; "lng_context_select_msg" = "Selecionar Mensagem"; @@ -772,6 +786,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "Editar nome do grupo"; "lng_edit_contact_title" = "Editar nome de contato"; "lng_edit_channel_title" = "Editar Canal"; +"lng_edit_sign_messages" = "Assinar mensagens"; "lng_edit_group" = "Editar grupo"; "lng_edit_self_title" = "Editar seu nome"; "lng_confirm_contact_data" = "Novo Contato"; @@ -837,7 +852,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram Desktop foi atualizado para a versão {version}\n\n{changes}\n\nHistórico completo de mudanças disponível aqui:\n{link}"; "lng_new_version_minor" = "— Resolução de bugs e outras melhorias menores"; -"lng_new_version_text" = "— Layout adaptativo para wide screens adicionado em Configurações\n— Resolvido crash nas versões Linux"; +"lng_new_version_text" = "— Edite suas mensagens em canais e supergrupos.\n— Compartilhe links para postagens específicas nos canais pelo menu de contexto do post.\n— Adicione assinaturas de administradores nas mensagens dos canais.\n— Envie mensagens silenciosas em canais, que não notificarão os membros. Útil para mensagens não urgentes ou enviadas tarde da noite."; "lng_menu_insert_unicode" = "Inserir caractere de controle Unicode"; From 16255f159100f6800d64752cf02b9892fb9e74b2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 20:39:35 +0300 Subject: [PATCH 106/133] fixed os x build 0.9.27 dev version --- Telegram/SourceFiles/pspecific_mac.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 245765b9d59f2f..7f2cf9508261cf 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -86,7 +86,7 @@ void MacPrivate::notifyClicked(unsigned long long peer, int msgid) { void MacPrivate::notifyReplied(unsigned long long peer, int msgid, const char *str) { History *history = App::history(PeerId(peer)); - App::main()->sendMessage(history, QString::fromUtf8(str), (msgid > 0 && !history->peer->isUser()) ? msgid : 0, false); + App::main()->sendMessage(history, QString::fromUtf8(str), (msgid > 0 && !history->peer->isUser()) ? msgid : 0, false, false); } PsMainWindow::PsMainWindow(QWidget *parent) : QMainWindow(parent), From 39981835ced6ee10f05698e1b8cb6811bbfb3016 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 25 Feb 2016 20:58:14 +0300 Subject: [PATCH 107/133] mention links bug fixed, 0.9.27 dev version --- Telegram/SourceFiles/gui/text.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index b65e30f2c8d151..958401f1fcf135 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -967,7 +967,7 @@ void LocationLink::setup() { void MentionLink::onClick(Qt::MouseButton button) const { if (button == Qt::LeftButton || button == Qt::MiddleButton) { - App::openPeerByName(_tag.mid(1), true); + App::openPeerByName(_tag.mid(1), ShowAtProfileMsgId); } } From 1bd986d2cb71cdf3edba1872d8b61b76ee0aa6ff Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 12:29:07 +0300 Subject: [PATCH 108/133] added any profile photo delete, fixed profile photo upload --- Telegram/SourceFiles/application.cpp | 4 +-- Telegram/SourceFiles/application.h | 2 +- Telegram/SourceFiles/mediaview.cpp | 26 ++++++++++++++++++- Telegram/SourceFiles/mediaview.h | 4 ++- .../SourceFiles/mtproto/mtpConnection.cpp | 4 +-- 5 files changed, 33 insertions(+), 7 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index dc1f0baee985c7..2c17f7b831d52b 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -951,7 +951,7 @@ void AppClass::killDownloadSessions() { } } -void AppClass::photoUpdated(const FullMsgId &msgId, const MTPInputFile &file) { +void AppClass::photoUpdated(const FullMsgId &msgId, bool silent, const MTPInputFile &file) { if (!App::self()) return; QMap::iterator i = photoUpdates.find(msgId); @@ -1040,7 +1040,7 @@ void AppClass::uploadProfilePhoto(const QImage &tosend, const PeerId &peerId) { ReadyLocalMedia ready(PreparePhoto, file, filename, filesize, data, id, id, qsl("jpg"), peerId, photo, photoThumbs, MTP_documentEmpty(MTP_long(0)), jpeg, false, false, 0); - connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&, const MTPInputFile&)), App::app(), SLOT(photoUpdated(const FullMsgId&, const MTPInputFile&)), Qt::UniqueConnection); + connect(App::uploader(), SIGNAL(photoReady(const FullMsgId&,bool,const MTPInputFile&)), App::app(), SLOT(photoUpdated(const FullMsgId&,bool,const MTPInputFile&)), Qt::UniqueConnection); FullMsgId newId(peerToChannel(peerId), clientMsgId()); App::app()->regPhotoUpdate(peerId, newId); diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index d823ab1f2c7796..acae496077a3ce 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -191,7 +191,7 @@ public slots: void doMtpUnpause(); - void photoUpdated(const FullMsgId &msgId, const MTPInputFile &file); + void photoUpdated(const FullMsgId &msgId, bool silent, const MTPInputFile &file); void onSwitchDebugMode(); void onSwitchTestMode(); diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 5330c1331e3740..492189aa430d74 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -398,7 +398,7 @@ void MediaView::updateDropdown() { _btnSaveAs->setVisible(true); _btnCopy->setVisible((_doc && fileShown()) || (_photo && _photo->loaded())); _btnForward->setVisible(_canForward); - _btnDelete->setVisible(_canDelete || (_photo && App::self() && App::self()->photoId == _photo->id) || (_photo && _photo->peer && _photo->peer->photoId == _photo->id && (_photo->peer->isChat() || (_photo->peer->isChannel() && _photo->peer->asChannel()->amCreator())))); + _btnDelete->setVisible(_canDelete || (_photo && App::self() && _user == App::self()) || (_photo && _photo->peer && _photo->peer->photoId == _photo->id && (_photo->peer->isChat() || (_photo->peer->isChannel() && _photo->peer->asChannel()->amCreator())))); _btnViewAll->setVisible((_overview != OverviewCount) && _history); _btnViewAll->setText(lang(_doc ? lng_mediaview_files_all : lng_mediaview_photos_all)); _dropdown.updateButtons(); @@ -707,6 +707,21 @@ void MediaView::onDelete() { if (!_msgid) { if (App::self() && _photo && App::self()->photoId == _photo->id) { App::app()->peerClearPhoto(App::self()->id); + } else if (_user && _user == App::self()) { + for (int32 i = 0, l = _user->photos.size(); i != l; ++i) { + if (_user->photos.at(i) == _photo) { + _user->photos.removeAt(i); + MTP::send(MTPphotos_DeletePhotos(MTP_vector(1, MTP_inputPhoto(MTP_long(_photo->id), MTP_long(_photo->access)))), rpcDone(&MediaView::deletePhotosDone), rpcFail(&MediaView::deletePhotosFail)); + if (_user->photos.isEmpty()) { + hide(); + } else if (i + 1 < l) { + showPhoto(_user->photos.at(i), _user); + } else { + showPhoto(_user->photos.at(i - 1), _user); + } + break; + } + } } else if (_photo->peer && _photo->peer->photoId == _photo->id) { App::app()->peerClearPhoto(_photo->peer->id); } @@ -2090,6 +2105,15 @@ void MediaView::userPhotosLoaded(UserData *u, const MTPphotos_Photos &photos, mt if (App::wnd()) App::wnd()->mediaOverviewUpdated(u, OverviewCount); } +void MediaView::deletePhotosDone(const MTPVector &result) { +} + +bool MediaView::deletePhotosFail(const RPCError &error) { + if (mtpIsFlood(error)) return false; + + return true; +} + void MediaView::updateHeader() { int32 index = _index, count = 0, addcount = (_migrated && _overview != OverviewCount) ? _migrated->overviewCount(_overview) : 0; if (_history) { diff --git a/Telegram/SourceFiles/mediaview.h b/Telegram/SourceFiles/mediaview.h index 3007e574eb0f2d..1736bcf109a392 100644 --- a/Telegram/SourceFiles/mediaview.h +++ b/Telegram/SourceFiles/mediaview.h @@ -107,7 +107,9 @@ public slots: void loadBack(); void userPhotosLoaded(UserData *u, const MTPphotos_Photos &photos, mtpRequestId req); - void filesLoaded(History *h, const MTPmessages_Messages &msgs, mtpRequestId req); + + void deletePhotosDone(const MTPVector &result); + bool deletePhotosFail(const RPCError &error); void updateHeader(); void snapXY(); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 3da86198529c01..9e0e10a49c99ae 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -2054,8 +2054,8 @@ void MTProtoConnectionPrivate::socketStart(bool afterConfig) { _pingId = _pingMsgId = _pingIdToSend = _pingSendAt = 0; _pingSender.stop(); - if (!noIPv4) DEBUG_LOG(("MTP Info: creating IPv4 connection to %1:%2 (tcp) and %1:%2 (http)..").arg(ip[IPv4address][TcpProtocol].c_str()).arg(port[IPv4address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); - if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv6 connection to [%1]:%2 (tcp) and [%1]:%2 (http)..").arg(ip[IPv6address][TcpProtocol].c_str()).arg(port[IPv6address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); + if (!noIPv4) DEBUG_LOG(("MTP Info: creating IPv4 connection to %1:%2 (tcp) and %3:%4 (http)..").arg(ip[IPv4address][TcpProtocol].c_str()).arg(port[IPv4address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); + if (!noIPv6) DEBUG_LOG(("MTP Info: creating IPv6 connection to [%1]:%2 (tcp) and [%3]:%4 (http)..").arg(ip[IPv6address][TcpProtocol].c_str()).arg(port[IPv6address][TcpProtocol]).arg(ip[IPv4address][HttpProtocol].c_str()).arg(port[IPv4address][HttpProtocol])); _waitForConnectedTimer.start(_waitForConnected); if (_conn4) { From 027c6fb9c087aa8f869db9a58b8d85db7fecf1b1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 14:32:56 +0300 Subject: [PATCH 109/133] langs updated --- Telegram/SourceFiles/langs/lang_de.strings | 8 ---- Telegram/SourceFiles/langs/lang_es.strings | 18 +++------ Telegram/SourceFiles/langs/lang_it.strings | 8 ---- Telegram/SourceFiles/langs/lang_ko.strings | 40 ++++++++----------- Telegram/SourceFiles/langs/lang_nl.strings | 20 +++------- Telegram/SourceFiles/langs/lang_pt_BR.strings | 8 ---- 6 files changed, 27 insertions(+), 75 deletions(-) diff --git a/Telegram/SourceFiles/langs/lang_de.strings b/Telegram/SourceFiles/langs/lang_de.strings index 90b60d32a64818..af025585ccb7cc 100644 --- a/Telegram/SourceFiles/langs/lang_de.strings +++ b/Telegram/SourceFiles/langs/lang_de.strings @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "Gruppeninfo zeigen"; "lng_context_view_channel" = "Kanalinfo anzeigen"; -"lng_context_open_link" = "Link öffnen"; "lng_context_copy_link" = "Link kopieren"; "lng_context_copy_post_link" = "Link kopieren"; -"lng_context_open_email" = "Email verfassen"; "lng_context_copy_email" = "E-Mail-Adresse kopieren"; -"lng_context_open_hashtag" = "Nach Hashtag suchen"; "lng_context_copy_hashtag" = "Hashtag kopieren"; -"lng_context_open_mention" = "Profil öffnen"; "lng_context_copy_mention" = "Benutzername kopieren"; -"lng_context_open_image" = "Bild öffnen"; "lng_context_save_image" = "Bild speichern unter"; "lng_context_forward_image" = "Bild weiterleiten"; "lng_context_delete_image" = "Bild löschen"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Download abbrechen"; "lng_context_show_in_folder" = "Im Ordner anzeigen"; "lng_context_show_in_finder" = "Im Finder zeigen"; -"lng_context_open_video" = "Video öffnen"; "lng_context_save_video" = "Video speichern unter.."; -"lng_context_open_audio" = "Sprachnachricht öffnen"; "lng_context_save_audio" = "Sprachnachricht speichern unter.."; "lng_context_pack_info" = "Sticker-Paket"; "lng_context_pack_add" = "Sticker hinzufügen"; -"lng_context_open_file" = "Datei öffnen"; "lng_context_save_file" = "Datei speichern als.."; "lng_context_forward_file" = "Datei weiterleiten"; "lng_context_delete_file" = "Datei löschen"; diff --git a/Telegram/SourceFiles/langs/lang_es.strings b/Telegram/SourceFiles/langs/lang_es.strings index eede26f55b04c5..6c43144dc02080 100644 --- a/Telegram/SourceFiles/langs/lang_es.strings +++ b/Telegram/SourceFiles/langs/lang_es.strings @@ -561,10 +561,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Enlace copiado al portapapeles."; -"lng_forwarded" = "Forwarded from {user}"; -"lng_forwarded_channel" = "Forwarded from {channel}"; -"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; -"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded" = "Reenviado desde {user}"; +"lng_forwarded_channel" = "Reenviado desde {channel}"; +"lng_forwarded_via" = "Reenviado desde {user} vía {inline_bot}"; +"lng_forwarded_channel_via" = "Reenviado desde {channel} vía {inline_bot}"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Respondiendo a"; @@ -655,7 +655,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Escribe un mensaje..."; "lng_comment_ph" = "Escribe un comentario..."; "lng_broadcast_ph" = "Difunde un mensaje..."; -"lng_broadcast_silent_ph" = "Silent broadcast.."; +"lng_broadcast_silent_ph" = "Difusión en silencio..."; "lng_record_cancel" = "Suelta fuera de aquí para cancelar"; "lng_will_be_notified" = "Tu publicación será notificada"; "lng_wont_be_notified" = "Tu publicación no será notificada"; @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "Ver información"; "lng_context_view_channel" = "Ver información"; -"lng_context_open_link" = "Abrir enlace"; "lng_context_copy_link" = "Copiar enlace"; "lng_context_copy_post_link" = "Copiar enlace"; -"lng_context_open_email" = "Escribir a esta dirección"; "lng_context_copy_email" = "Copiar dirección de correo electrónico"; -"lng_context_open_hashtag" = "Buscar por hashtag"; "lng_context_copy_hashtag" = "Copiar hashtag"; -"lng_context_open_mention" = "Abrir perfil"; "lng_context_copy_mention" = "Copiar alias"; -"lng_context_open_image" = "Abrir imagen"; "lng_context_save_image" = "Guardar como..."; "lng_context_forward_image" = "Reenviar imagen"; "lng_context_delete_image" = "Eliminar imagen"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Cancelar descarga"; "lng_context_show_in_folder" = "Mostrar en la carpeta"; "lng_context_show_in_finder" = "Mostrar en el Finder"; -"lng_context_open_video" = "Abrir vídeo"; "lng_context_save_video" = "Guardar como..."; -"lng_context_open_audio" = "Abrir audio"; "lng_context_save_audio" = "Guardar como..."; "lng_context_pack_info" = "Información del pack"; "lng_context_pack_add" = "Añadir stickers"; -"lng_context_open_file" = "Abrir archivo"; "lng_context_save_file" = "Guardar como..."; "lng_context_forward_file" = "Reenviar archivo"; "lng_context_delete_file" = "Eliminar archivo"; diff --git a/Telegram/SourceFiles/langs/lang_it.strings b/Telegram/SourceFiles/langs/lang_it.strings index 8c49827618b061..071e7d8a7a7834 100644 --- a/Telegram/SourceFiles/langs/lang_it.strings +++ b/Telegram/SourceFiles/langs/lang_it.strings @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "Visualizza info gruppo"; "lng_context_view_channel" = "Visualizza info canale"; -"lng_context_open_link" = "Apri link"; "lng_context_copy_link" = "Copia link"; "lng_context_copy_post_link" = "Copia link post"; -"lng_context_open_email" = "Scrivi a questo indirizzo"; "lng_context_copy_email" = "Copia indirizzo email"; -"lng_context_open_hashtag" = "Cerca via hashtag"; "lng_context_copy_hashtag" = "Copia hashtag"; -"lng_context_open_mention" = "Apri profilo"; "lng_context_copy_mention" = "Copia username"; -"lng_context_open_image" = "Apri immagine"; "lng_context_save_image" = "Salva immagine come.."; "lng_context_forward_image" = "Inoltra immagine"; "lng_context_delete_image" = "Elimina immagine"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Annulla download"; "lng_context_show_in_folder" = "Mostra nella cartella"; "lng_context_show_in_finder" = "Mostra nel Finder"; -"lng_context_open_video" = "Apri video"; "lng_context_save_video" = "Salva video come.."; -"lng_context_open_audio" = "Apri audio"; "lng_context_save_audio" = "Salva audio come.."; "lng_context_pack_info" = "Mostra sticker"; "lng_context_pack_add" = "Aggiungi sticker"; -"lng_context_open_file" = "Apri file"; "lng_context_save_file" = "Salva file come.."; "lng_context_forward_file" = "Inoltra file"; "lng_context_delete_file" = "Elimina file"; diff --git a/Telegram/SourceFiles/langs/lang_ko.strings b/Telegram/SourceFiles/langs/lang_ko.strings index bda501dcf0e328..50a4e229008618 100644 --- a/Telegram/SourceFiles/langs/lang_ko.strings +++ b/Telegram/SourceFiles/langs/lang_ko.strings @@ -123,11 +123,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_server_error" = "내부 서버 오류"; "lng_flood_error" = "시도가 너무 많습니다. 나중에 다시 시도해주세요."; "lng_gif_error" = "GIF 애니메이션을 읽는 동안 에러가 발생하였습니다."; -"lng_edit_error" = "You cannot edit this message"; -"lng_edit_deleted" = "This message was deleted"; -"lng_edit_too_long" = "Your message text is too long"; -"lng_edit_message" = "Edit message"; -"lng_edit_message_text" = "New message text.."; +"lng_edit_error" = "메시지를 수정 할 수 없습니다."; +"lng_edit_deleted" = "메시지는 삭제 되었습니다."; +"lng_edit_too_long" = "메시지 길이가 너무 깁니다."; +"lng_edit_message" = "메시지 수정"; +"lng_edit_message_text" = "새로운 메시지 내용."; "lng_deleted" = "알 수 없음"; "lng_deleted_message" = "삭제된 메시지"; @@ -561,10 +561,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "클립보드에 링크가 복사되었습니다."; -"lng_forwarded" = "Forwarded from {user}"; -"lng_forwarded_channel" = "Forwarded from {channel}"; -"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; -"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded" = "{user}로 부터 전달 받음"; +"lng_forwarded_channel" = "{channel}로 부터 전달 받음"; +"lng_forwarded_via" = "{inline_bot}을 {user}로 부터 전달 받음"; +"lng_forwarded_channel_via" = "{inline_bot}을 {channel}로 부터 전달 받음"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "다음 유저에게 답장 :"; @@ -655,10 +655,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "메시지 쓰기"; "lng_comment_ph" = "코멘트 쓰기.."; "lng_broadcast_ph" = "단체메시지 쓰기."; -"lng_broadcast_silent_ph" = "Silent broadcast.."; +"lng_broadcast_silent_ph" = "음소거 메시지.."; "lng_record_cancel" = "이 영역 밖에서 마우스 클릭을 해제하시면 취소가 됩니다."; -"lng_will_be_notified" = "Members will be notified when you post"; -"lng_wont_be_notified" = "Members will not be notified when you post"; +"lng_will_be_notified" = "메시지 작성시 구성원들에게 알림이 갑니다."; +"lng_wont_be_notified" = "메시지 작성시 구성원들에게 알림이 가지 않습니다."; "lng_empty_history" = ""; "lng_willbe_history" = "대화하실 방을 선택해주세요."; "lng_message_with_from" = "[c]{from}:[/c] {message}"; @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "그룹 정보 보기"; "lng_context_view_channel" = "채널 정보 보기"; -"lng_context_open_link" = "링크 열기"; "lng_context_copy_link" = "링크 복사"; -"lng_context_copy_post_link" = "Copy Post Link"; -"lng_context_open_email" = "이 주소로 메시지 보내기"; +"lng_context_copy_post_link" = "메시지 링크 복사"; "lng_context_copy_email" = "이메일 복사"; -"lng_context_open_hashtag" = "해시태그로 검색"; "lng_context_copy_hashtag" = "해시태그 복사"; -"lng_context_open_mention" = "프로필 열기"; "lng_context_copy_mention" = "아이디 복사"; -"lng_context_open_image" = "이미지 열기"; "lng_context_save_image" = "이미지를 다른 이름으로 저장.."; "lng_context_forward_image" = "이미지 전달"; "lng_context_delete_image" = "이미지 삭제"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "다운로드 취소"; "lng_context_show_in_folder" = "탐색기에서 보기"; "lng_context_show_in_finder" = "탐색기에서 보기"; -"lng_context_open_video" = "비디오 열기"; "lng_context_save_video" = "비디오 이름을 다른이름으로 저장."; -"lng_context_open_audio" = "음성메시지 열기"; "lng_context_save_audio" = "음성메시지를 다른 이름으로 저장.."; "lng_context_pack_info" = "팩 정보"; "lng_context_pack_add" = "스티커 추가"; -"lng_context_open_file" = "파일 열기"; "lng_context_save_file" = "파일을 다른 이름으로 저장.."; "lng_context_forward_file" = "파일 전달"; "lng_context_delete_file" = "파일 삭제"; @@ -749,7 +741,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_save_gif" = "GIF 저장"; "lng_context_to_msg" = "메시지로 이동"; "lng_context_reply_msg" = "답장"; -"lng_context_edit_msg" = "Edit"; +"lng_context_edit_msg" = "수정"; "lng_context_forward_msg" = "메시지 전달"; "lng_context_delete_msg" = "메시지 삭제"; "lng_context_select_msg" = "메시지 선택"; @@ -786,7 +778,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_edit_group_title" = "그룹 이름 수정"; "lng_edit_contact_title" = "연락처 이름 수정"; "lng_edit_channel_title" = "채널 수정"; -"lng_edit_sign_messages" = "Sign messages"; +"lng_edit_sign_messages" = "서명 메시지"; "lng_edit_group" = "그룹방 수정"; "lng_edit_self_title" = "이름 수정"; "lng_confirm_contact_data" = "새로운 연락처"; @@ -852,7 +844,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "텔레그램 데스크탑은 {version} 버전으로 업데이트 되었습니다.\n\n{changes}\n\n전체 버전 히스토리는 아래에서 확인 가능합니다:\n{link}"; "lng_new_version_minor" = "— 버그 수정 및 일부 기능 향상"; -"lng_new_version_text" = "— Edit your messages in channels and supergroups.\n— Share links to specific posts in channels via the post context menu.\n— Add admin signatures to messages in channels.\n— Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting."; +"lng_new_version_text" = "— 채널과 슈퍼그룹에 메시지 수정\n— 메시지 작성란에서 특정 메시지 링크 공유\n— 채널 메시지에 관리자 서명 추가\n— 알림이 가지 않은 채널 메시지 작성. 급하지 않거나 늦은 시간 메시지등에 활용"; "lng_menu_insert_unicode" = "유니코드 문자를 입력하세요."; diff --git a/Telegram/SourceFiles/langs/lang_nl.strings b/Telegram/SourceFiles/langs/lang_nl.strings index 5edaad9d5a140e..99a49c8fb3cf31 100644 --- a/Telegram/SourceFiles/langs/lang_nl.strings +++ b/Telegram/SourceFiles/langs/lang_nl.strings @@ -561,10 +561,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_channel_public_link_copied" = "Link gekopieerd naar klembord"; -"lng_forwarded" = "Forwarded from {user}"; -"lng_forwarded_channel" = "Forwarded from {channel}"; -"lng_forwarded_via" = "Forwarded from {user} via {inline_bot}"; -"lng_forwarded_channel_via" = "Forwarded from {channel} via {inline_bot}"; +"lng_forwarded" = "Doorgestuurd van {user}"; +"lng_forwarded_channel" = "Doorgestuurd van {channel}"; +"lng_forwarded_via" = "Doorgestuurd van {user} via {inline_bot}"; +"lng_forwarded_channel_via" = "Doorgestuurd van {channel} via {inline_bot}"; "lng_forwarded_signed" = "{channel} ({user})"; "lng_in_reply_to" = "Antwoord op"; @@ -655,7 +655,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_message_ph" = "Bericht schrijven"; "lng_comment_ph" = "Reactie"; "lng_broadcast_ph" = "Massabericht"; -"lng_broadcast_silent_ph" = "Silent broadcast.."; +"lng_broadcast_silent_ph" = "Stil massabericht.."; "lng_record_cancel" = "Annuleren: uit het vak loslaten"; "lng_will_be_notified" = "Berichtgeving voor deelnemers"; "lng_wont_be_notified" = "Geen berichtgeving voor deelnemers"; @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "Groepsinformatie weergeven"; "lng_context_view_channel" = "Kanaalinformatie weergeven"; -"lng_context_open_link" = "Link openen"; "lng_context_copy_link" = "Link kopiëren"; "lng_context_copy_post_link" = "Link kopiëren"; -"lng_context_open_email" = "Naar dit adres sturen"; "lng_context_copy_email" = "E-mailadres kopiëren"; -"lng_context_open_hashtag" = "Zoeken op hashtag"; "lng_context_copy_hashtag" = "Hashtag kopiëren"; -"lng_context_open_mention" = "Profiel openen"; "lng_context_copy_mention" = "Gebruikersnaam kopiëren"; -"lng_context_open_image" = "Afbeelding openen"; "lng_context_save_image" = "Afbeelding opslaan als"; "lng_context_forward_image" = "Afbeelding doorsturen"; "lng_context_delete_image" = "Afbeelding verwijderen"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Download annuleren"; "lng_context_show_in_folder" = "Weergeven in map"; "lng_context_show_in_finder" = "Weergeven in Finder"; -"lng_context_open_video" = "Video openen"; "lng_context_save_video" = "Video opslaan als"; -"lng_context_open_audio" = "Geluidsbestand openen"; "lng_context_save_audio" = "Geluidsbestand opslaan als"; "lng_context_pack_info" = "Bundelinformatie"; "lng_context_pack_add" = "Stickers toevoegen"; -"lng_context_open_file" = "Bestand openen"; "lng_context_save_file" = "Bestand opslaan als"; "lng_context_forward_file" = "Bestand doorsturen"; "lng_context_delete_file" = "Bestand verwijderen"; @@ -852,7 +844,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_new_version_wrap" = "Telegram is bijgewerkt naar versie {version}\n\n{changes} \n\nVolledige versiegeschiedenis is hier te vinden:\n{link}"; "lng_new_version_minor" = "— Probleemoplossing en andere kleine verbeteringen"; -"lng_new_version_text" = "— Edit your messages in channels and supergroups.\n— Share links to specific posts in channels via the post context menu.\n— Add admin signatures to messages in channels.\n— Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting."; +"lng_new_version_text" = "— Bewerk nu je berichten in kanalen en supergroepen.\n— Deel links naar specifieke berichten in kanalen via het contextmenu.\n— Onderteken berichten in kanalen.\n— Stuur 'stille berichten' in kanalen. Ideaal voor als je toch echt iets moet sturen in het holst van de nacht."; "lng_menu_insert_unicode" = "Unicode-besturingsteken invoegen"; diff --git a/Telegram/SourceFiles/langs/lang_pt_BR.strings b/Telegram/SourceFiles/langs/lang_pt_BR.strings index 2c92adab344f57..73e7314ec68a9c 100644 --- a/Telegram/SourceFiles/langs/lang_pt_BR.strings +++ b/Telegram/SourceFiles/langs/lang_pt_BR.strings @@ -716,16 +716,11 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_view_group" = "Ver info do grupo"; "lng_context_view_channel" = "Ver info do canal"; -"lng_context_open_link" = "Abrir Link"; "lng_context_copy_link" = "Copiar Link"; "lng_context_copy_post_link" = "Copiar Link do Post"; -"lng_context_open_email" = "Escrever para este endereço"; "lng_context_copy_email" = "Copiar endereço de email"; -"lng_context_open_hashtag" = "Buscar pela hashtag"; "lng_context_copy_hashtag" = "Copiar hashtag"; -"lng_context_open_mention" = "Abrir perfil"; "lng_context_copy_mention" = "Copiar nome de usuário"; -"lng_context_open_image" = "Abrir Imagem"; "lng_context_save_image" = "Salvar Imagem Como.."; "lng_context_forward_image" = "Encaminhar Imagem"; "lng_context_delete_image" = "Apagar Imagem"; @@ -734,13 +729,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org "lng_context_cancel_download" = "Cancelar Download"; "lng_context_show_in_folder" = "Mostrar na Pasta"; "lng_context_show_in_finder" = "Mostrar no Finder"; -"lng_context_open_video" = "Abrir Vídeo"; "lng_context_save_video" = "Salvar Vídeo Como.."; -"lng_context_open_audio" = "Abrir Áudio"; "lng_context_save_audio" = "Salvar Áudio Como.."; "lng_context_pack_info" = "Informação do pacote"; "lng_context_pack_add" = "Adicionar aos Stickers"; -"lng_context_open_file" = "Abrir Arquivo"; "lng_context_save_file" = "Salvar Arquivo Como.."; "lng_context_forward_file" = "Encaminhar Arquivo"; "lng_context_delete_file" = "Apagar Arquivo"; From 6fae60b6bb6325baab90e0b5755d9fa0b5704d20 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 16:00:48 +0300 Subject: [PATCH 110/133] fixed conversations list update on message edit --- Telegram/SourceFiles/app.cpp | 6 ++++++ Telegram/SourceFiles/mtproto/mtp.cpp | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index a96c182e7ff455..521f923ad622d4 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -931,6 +931,12 @@ namespace App { existing->updateMedia(m.has_media() ? (&m.vmedia) : 0, true); existing->setViewsCount(m.has_views() ? m.vviews.v : -1, false); existing->initDimensions(); + if (existing->history()->textCachedFor == existing) { + existing->history()->textCachedFor = 0; + } + if (App::main()) { + App::main()->dlgUpdated(existing->history(), existing->id); + } Notify::historyItemResized(existing); } } diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 6f443783c79029..7b834ce5118b74 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -531,7 +531,10 @@ namespace _mtp_internal { return; } } else { - if (h.onDone) (*h.onDone)(requestId, from, end); + if (h.onDone) { +// t_assert(App::app() != 0); + (*h.onDone)(requestId, from, end); + } } } catch (Exception &e) { if (!rpcErrorOccured(requestId, h, rpcClientError("RESPONSE_PARSE_FAILED", QString("exception text: ") + e.what()))) { From ade6b5aae0b77f6703fd08e432b65f9caab269e2 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 16:10:57 +0300 Subject: [PATCH 111/133] version 0.9.28 --- Telegram/SourceFiles/application.cpp | 2 +- Telegram/SourceFiles/config.h | 6 +++--- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 8 ++++---- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 2c17f7b831d52b..a22be4e6bff747 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1053,7 +1053,7 @@ void AppClass::checkMapVersion() { QString versionFeatures; if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9027) { versionFeatures = QString::fromUtf8("\xe2\x80\x94 Edit your messages in channels and supergroups.\n\xe2\x80\x94 Share links to specific posts in channels via the post context menu.\n\xe2\x80\x94 Add admin signatures to messages in channels.\n\xe2\x80\x94 Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting.");// .replace('@', qsl("@") + QChar(0x200D)); - } else if (Local::oldMapVersion() < 9026) { + } else if (Local::oldMapVersion() < 9027) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { versionFeatures = lang(lng_new_version_minor).trimmed(); diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 7f9df339f724a8..e6f48011432b62 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,9 +20,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9027; -static const wchar_t *AppVersionStr = L"0.9.27"; -static const bool DevVersion = true; +static const int32 AppVersion = 9028; +static const wchar_t *AppVersionStr = L"0.9.28"; +static const bool DevVersion = false; //#define BETA_VERSION (9026001ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index a60467d8b60541..cf5bb6c5ea4ba5 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.27 + 0.9.28 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 7afbfd1598f66d..e93f7903742676 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,27,0 - PRODUCTVERSION 0,9,27,0 + FILEVERSION 0,9,28,0 + PRODUCTVERSION 0,9,28,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.27.0" + VALUE "FileVersion", "0.9.28.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.27.0" + VALUE "ProductVersion", "0.9.28.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 0b392f3d6fd6f2..0f6dbcf6da23ad 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1720,7 +1720,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.27; + CURRENT_PROJECT_VERSION = 0.9.28; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1739,7 +1739,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.27; + CURRENT_PROJECT_VERSION = 0.9.28; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1768,10 +1768,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.27; + CURRENT_PROJECT_VERSION = 0.9.28; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.27; + DYLIB_CURRENT_VERSION = 0.9.28; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1909,10 +1909,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.27; + CURRENT_PROJECT_VERSION = 0.9.28; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.27; + DYLIB_CURRENT_VERSION = 0.9.28; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index add9a12a4fd471..3d7d55000c8c9a 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9027 +AppVersion 9028 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.27 -AppVersionStr 0.9.27 -DevChannel 1 +AppVersionStrSmall 0.9.28 +AppVersionStr 0.9.28 +DevChannel 0 BetaVersion 0 9026001 From f696263460bfeadbce3412c7d22aaefd5a680e26 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 17:41:09 +0300 Subject: [PATCH 112/133] limits for caption and description updated --- Telegram/SourceFiles/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index e6f48011432b62..ddf3f20e0f9f42 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -142,9 +142,9 @@ enum { MaxUsernameLength = 32, UsernameCheckTimeout = 200, - MaxChannelDescription = 120, + MaxChannelDescription = 255, MaxGroupChannelTitle = 255, - MaxPhotoCaption = 140, + MaxPhotoCaption = 200, MaxMessageSize = 4096, MaxHttpRedirects = 5, // when getting external data/images From 9d9b4b83a1e57bd21985976e347d5f54bddf5285 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 19:49:31 +0300 Subject: [PATCH 113/133] improved build script, popupmenu separator adding --- Telegram/Build.sh | 20 ++++++++++---------- Telegram/SourceFiles/gui/popupmenu.cpp | 6 ++++++ Telegram/SourceFiles/gui/popupmenu.h | 1 + Telegram/SourceFiles/mtproto/generate.py | 2 -- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Telegram/Build.sh b/Telegram/Build.sh index c0efe0de8b5f5a..d2bbd2cd753f92 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -69,7 +69,7 @@ elif [ "$BuildTarget" == "macstore" ]; then echo "Building version $AppVersionStrFull for Mac App Store.." ReleasePath="./../Mac/Release" BinaryName="Telegram Desktop" - DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor" + DropboxPath="./../../../Dropbox/$BinaryName/deploy/$AppVersionStrMajor" DropboxDeployPath="$DropboxPath/$AppVersionStrFull" else echo "Invalid target!" @@ -109,7 +109,7 @@ fi if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then - DropboxSymbolsPath="/media/psf/Home/Dropbox/Telegram/symbols" + DropboxSymbolsPath="/media/psf/Home/Dropbox/$BinaryName/symbols" mkdir -p "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater" @@ -123,7 +123,7 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then /usr/local/Qt-5.5.1/bin/qmake "$HomePath/Telegram.pro" -r -spec linux-g++ eval "$FixScript" make - echo "Telegram build complete!" + echo "$BinaryName build complete!" cd "$HomePath" if [ ! -f "$ReleasePath/$BinaryName" ]; then echo "$BinaryName not found!" @@ -178,18 +178,18 @@ if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then echo "Copying $BinaryName, Updater and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStrFull.."; mkdir "$DeployPath" mkdir "$DeployPath/$BinaryName" - mv "$ReleasePath/$BinaryName" "$DeployPath/Telegram/" - mv "$ReleasePath/Updater" "$DeployPath/Telegram/" + mv "$ReleasePath/$BinaryName" "$DeployPath/$BinaryName/" + mv "$ReleasePath/Updater" "$DeployPath/$BinaryName/" mv "$ReleasePath/$UpdateFile" "$DeployPath/" if [ "$BetaVersion" != "0" ]; then mv "$ReleasePath/$BetaKeyFile" "$DeployPath/" fi - cd "$DeployPath" && tar -cJvf "$SetupFile" "Telegram/" && cd "./../../../$HomePath" + cd "$DeployPath" && tar -cJvf "$SetupFile" "$BinaryName/" && cd "./../../../$HomePath" fi if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then - DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols" + DropboxSymbolsPath="./../../../Dropbox/$BinaryName/symbols" if [ "$FastParam" != "fast" ]; then touch "./SourceFiles/telegram.qrc" @@ -307,10 +307,10 @@ if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarg if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ]; then echo "Copying $BinaryName.app and $UpdateFile to deploy/$AppVersionStrMajor/$AppVersionStr.."; mkdir "$DeployPath" - mkdir "$DeployPath/Telegram" - cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/Telegram/" + mkdir "$DeployPath/$BinaryName" + cp -r "$ReleasePath/$BinaryName.app" "$DeployPath/$BinaryName/" if [ "$BetaVersion" != "0" ]; then - cd "$DeployPath" && zip -r "$SetupFile" "Telegram" && mv "$SetupFile" "./../../../" && cd "./../../../$HomePath" + cd "$DeployPath" && zip -r "$SetupFile" "$BinaryName" && mv "$SetupFile" "./../../../" && cd "./../../../$HomePath" mv "$ReleasePath/$BetaKeyFile" "$DeployPath/" fi mv "$ReleasePath/$BinaryName.app.dSYM" "$DeployPath/" diff --git a/Telegram/SourceFiles/gui/popupmenu.cpp b/Telegram/SourceFiles/gui/popupmenu.cpp index 035ada7e31bfd5..38c2d905660431 100644 --- a/Telegram/SourceFiles/gui/popupmenu.cpp +++ b/Telegram/SourceFiles/gui/popupmenu.cpp @@ -103,6 +103,12 @@ QAction *PopupMenu::addAction(QAction *a) { return a; } +QAction *PopupMenu::addSeparator() { + QAction *separator = new QAction(this); + separator->setSeparator(true); + return addAction(separator); +} + int32 PopupMenu::processAction(QAction *a, int32 index, int32 w) { if (a->isSeparator() || a->text().isEmpty()) { _texts[index] = _shortcutTexts[index] = QString(); diff --git a/Telegram/SourceFiles/gui/popupmenu.h b/Telegram/SourceFiles/gui/popupmenu.h index 4d7968bfc96d1f..64ff31fb6b5f74 100644 --- a/Telegram/SourceFiles/gui/popupmenu.h +++ b/Telegram/SourceFiles/gui/popupmenu.h @@ -28,6 +28,7 @@ class PopupMenu : public TWidget { PopupMenu(QMenu *menu, const style::PopupMenu &st = st::defaultPopupMenu); QAction *addAction(const QString &text, const QObject *receiver, const char* member); QAction *addAction(QAction *a); + QAction *addSeparator(); void resetActions(); typedef QVector Actions; diff --git a/Telegram/SourceFiles/mtproto/generate.py b/Telegram/SourceFiles/mtproto/generate.py index 017eca81a608a4..de413ceae1f8d8 100644 --- a/Telegram/SourceFiles/mtproto/generate.py +++ b/Telegram/SourceFiles/mtproto/generate.py @@ -827,5 +827,3 @@ def addTextSerializeInit(lst, dct): outCpp.write(textSerializeFull + '\n'); print('Done, written {0} constructors, {1} functions.'.format(consts, funcs)); - -print('Done, written {0} constructors, {1} functions.'.format(consts, funcs)); From 12f3bb2082b8a5d5376dda30979080e0e8cd3531 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 26 Feb 2016 22:13:18 +0300 Subject: [PATCH 114/133] build script fixed for appstore version --- Telegram/Build.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Telegram/Build.sh b/Telegram/Build.sh index d2bbd2cd753f92..650e3692baee5e 100755 --- a/Telegram/Build.sh +++ b/Telegram/Build.sh @@ -69,7 +69,7 @@ elif [ "$BuildTarget" == "macstore" ]; then echo "Building version $AppVersionStrFull for Mac App Store.." ReleasePath="./../Mac/Release" BinaryName="Telegram Desktop" - DropboxPath="./../../../Dropbox/$BinaryName/deploy/$AppVersionStrMajor" + DropboxPath="./../../../Dropbox/Telegram/deploy/$AppVersionStrMajor" DropboxDeployPath="$DropboxPath/$AppVersionStrFull" else echo "Invalid target!" @@ -109,7 +109,7 @@ fi if [ "$BuildTarget" == "linux" ] || [ "$BuildTarget" == "linux32" ]; then - DropboxSymbolsPath="/media/psf/Home/Dropbox/$BinaryName/symbols" + DropboxSymbolsPath="/media/psf/Home/Dropbox/Telegram/symbols" mkdir -p "$WorkPath/ReleaseIntermediateUpdater" cd "$WorkPath/ReleaseIntermediateUpdater" @@ -189,7 +189,7 @@ fi if [ "$BuildTarget" == "mac" ] || [ "$BuildTarget" == "mac32" ] || [ "$BuildTarget" == "macstore" ]; then - DropboxSymbolsPath="./../../../Dropbox/$BinaryName/symbols" + DropboxSymbolsPath="./../../../Dropbox/Telegram/symbols" if [ "$FastParam" != "fast" ]; then touch "./SourceFiles/telegram.qrc" From 9eee689a76cf810d78b8c6d76756fac82445e38a Mon Sep 17 00:00:00 2001 From: auchri Date: Fri, 26 Feb 2016 22:25:56 +0100 Subject: [PATCH 115/133] Rebase instead of merge It's better to rebase a pull request instead of merging the latest commits Signed-off-by: Christoph Auer --- CONTRIBUTING.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 68c80c0a700443..35cf65c82264cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,9 +89,13 @@ Check the log to be sure that you actually want the changes, before merging: git log upstream/master -Then merge the changes that you fetched: +Then rebase your changes on the latest commits in the `master` branch: - git merge upstream/master + git rebase upstream/master + +After that, you have to force push your commits: + + git push --force For more info, see [GitHub Help][help_fork_repo]. From a385c637995d7e5f46cc46f824f33a210c04a027 Mon Sep 17 00:00:00 2001 From: auchri Date: Wed, 24 Feb 2016 20:59:13 +0100 Subject: [PATCH 116/133] Fix link in CONTRIBUTING.md Signed-off-by: Christoph Auer --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 68c80c0a700443..c37c3d89164ae0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -73,7 +73,7 @@ For more info, see [GitHub Help][help_change_commit_message]. ## Build instructions -See the [readme][README.md#build-instructions] for details on the various build +See the [README.md](README.md#build-instructions) for details on the various build environments. ## Pull upstream changes into your fork regularly From 175968c3c096c48d1fc003448d519ba39755401a Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 27 Feb 2016 14:44:47 +0300 Subject: [PATCH 117/133] active muted unread count uses different color --- Telegram/Resources/style.txt | 1 + Telegram/SourceFiles/history.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Telegram/Resources/style.txt b/Telegram/Resources/style.txt index 015fb86da78766..8d9dd68e6ae00e 100644 --- a/Telegram/Resources/style.txt +++ b/Telegram/Resources/style.txt @@ -955,6 +955,7 @@ dlgActiveUnreadColor: #5b94bf; dlgActiveUnreadBG: white; dlgActiveColor: white; dlgActiveDateColor: #d3e2ee; +dlgActiveUnreadMutedBG: dlgActiveDateColor; topBarHeight: 54px; topBarBG: white; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 3dd6a40d1e0337..4dd68f6bfc7d97 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -175,7 +175,7 @@ void DialogRow::paint(Painter &p, int32 w, bool act, bool sel, bool onlyBackgrou int32 unreadRectLeft = w - st::dlgPaddingHor - unreadRectWidth; int32 unreadRectTop = st::dlgHeight - st::dlgPaddingVer - unreadRectHeight; lastWidth -= unreadRectWidth + st::dlgUnreadPaddingHor; - p.setBrush((act ? st::dlgActiveUnreadBG : (history->mute ? st::dlgUnreadMutedBG : st::dlgUnreadBG))->b); + p.setBrush((act ? (history->mute ? st::dlgActiveUnreadMutedBG : st::dlgActiveUnreadBG) : (history->mute ? st::dlgUnreadMutedBG : st::dlgUnreadBG))->b); p.setPen(Qt::NoPen); p.drawRoundedRect(unreadRectLeft, unreadRectTop, unreadRectWidth, unreadRectHeight, st::dlgUnreadRadius, st::dlgUnreadRadius); p.setFont(st::dlgUnreadFont->f); From a88b6765884af6fdbbfb1714990d0cc88e9649a9 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 27 Feb 2016 22:39:51 +0300 Subject: [PATCH 118/133] global shortcuts with loading from .json map --- Telegram/SourceFiles/application.cpp | 61 ++++-------------- Telegram/SourceFiles/config.h | 2 + Telegram/SourceFiles/gui/twidget.cpp | 5 ++ Telegram/SourceFiles/gui/twidget.h | 2 + Telegram/SourceFiles/historywidget.cpp | 88 +++++++++++--------------- Telegram/SourceFiles/historywidget.h | 4 ++ Telegram/SourceFiles/localstorage.cpp | 4 +- Telegram/SourceFiles/mainwidget.cpp | 14 +++- Telegram/SourceFiles/mainwidget.h | 4 ++ Telegram/SourceFiles/pspecific_wnd.cpp | 1 + Telegram/SourceFiles/stdafx.h | 11 +--- Telegram/SourceFiles/sysbuttons.cpp | 10 +-- Telegram/SourceFiles/sysbuttons.h | 1 - Telegram/SourceFiles/types.cpp | 4 +- Telegram/SourceFiles/types.h | 10 ++- Telegram/SourceFiles/window.cpp | 12 ++-- Telegram/Telegram.pro | 2 + Telegram/Telegram.vcxproj | 2 + Telegram/Telegram.vcxproj.filters | 6 ++ 19 files changed, 116 insertions(+), 127 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index a22be4e6bff747..e128cb5eb8e9c6 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -22,6 +22,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "application.h" #include "style.h" +#include "shortcuts.h" + #include "pspecific.h" #include "fileuploader.h" #include "mainwidget.h" @@ -47,52 +49,6 @@ namespace { } } - class EventFilterForKeys : public QObject { - public: - - EventFilterForKeys(QObject *parent) : QObject(parent) { - } - bool eventFilter(QObject *o, QEvent *e) { - if (e->type() == QEvent::KeyPress) { - QKeyEvent *ev = static_cast(e); - if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { - if (ev->key() == Qt::Key_W && (ev->modifiers() & Qt::ControlModifier)) { - Ui::hideWindowNoQuit(); - return true; - } else if (ev->key() == Qt::Key_M && (ev->modifiers() & Qt::ControlModifier)) { - App::wnd()->setWindowState(Qt::WindowMinimized); - return true; - } - } else { - if ((ev->key() == Qt::Key_W || ev->key() == Qt::Key_F4) && (ev->modifiers() & Qt::ControlModifier)) { - if (cWorkMode() == dbiwmTrayOnly || cWorkMode() == dbiwmWindowAndTray) { - App::wnd()->minimizeToTray(); - return true; - } else { - App::wnd()->close(); - return true; - } - } - } - if (ev->key() == Qt::Key_MediaPlay) { - if (App::main()) App::main()->player()->playPressed(); - } else if (ev->key() == Qt::Key_MediaPause) { - if (App::main()) App::main()->player()->pausePressed(); - } else if (ev->key() == Qt::Key_MediaTogglePlayPause) { - if (App::main()) App::main()->player()->playPausePressed(); - } else if (ev->key() == Qt::Key_MediaStop) { - if (App::main()) App::main()->player()->stopPressed(); - } else if (ev->key() == Qt::Key_MediaPrevious) { - if (App::main()) App::main()->player()->prevPressed(); - } else if (ev->key() == Qt::Key_MediaNext) { - if (App::main()) App::main()->player()->nextPressed(); - } - } - return QObject::eventFilter(o, e); - } - - }; - QChar _toHex(ushort v) { v = v & 0x000F; return QChar::fromLatin1((v >= 10) ? ('a' + (v - 10)) : ('0' + v)); @@ -708,8 +664,6 @@ AppClass::AppClass() : QObject() return; } - application()->installEventFilter(new EventFilterForKeys(this)); - if (cRetina()) { cSetConfigScale(dbisOne); cSetRealScale(dbisOne); @@ -767,6 +721,8 @@ AppClass::AppClass() : QObject() DEBUG_LOG(("Application Info: window created..")); + Shortcuts::start(); + initImageLinkManager(); App::initMedia(); @@ -807,6 +763,13 @@ AppClass::AppClass() : QObject() } _window->updateIsActive(Global::OnlineFocusTimeout()); + + if (!Shortcuts::errors().isEmpty()) { + const QStringList &errors(Shortcuts::errors()); + for (QStringList::const_iterator i = errors.cbegin(), e = errors.cend(); i != e; ++i) { + LOG(("Shortcuts Error: %1").arg(*i)); + } + } } void AppClass::regPhotoUpdate(const PeerId &peer, const FullMsgId &msgId) { @@ -1070,6 +1033,8 @@ void AppClass::checkMapVersion() { } AppClass::~AppClass() { + Shortcuts::finish(); + if (Window *w = _window) { _window = 0; delete w; diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index ddf3f20e0f9f42..2490993ad97428 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -129,6 +129,8 @@ enum { MaxZoomLevel = 7, // x8 ZoomToScreenLevel = 1024, // just constant + ShortcutsCountLimit = 256, // how many shortcuts can be in json file + PreloadHeightsCount = 3, // when 3 screens to scroll left make a preload request EmojiPanPerRow = 7, EmojiPanRowsPerPage = 6, diff --git a/Telegram/SourceFiles/gui/twidget.cpp b/Telegram/SourceFiles/gui/twidget.cpp index 6631a1fa580c9c..eced0da4756dd0 100644 --- a/Telegram/SourceFiles/gui/twidget.cpp +++ b/Telegram/SourceFiles/gui/twidget.cpp @@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "stdafx.h" #include "application.h" +#include "window.h" namespace Fonts { @@ -52,6 +53,10 @@ namespace { } } +bool TWidget::inFocusChain() const { + return !isHidden() && App::wnd() && (App::wnd()->focusWidget() == this || isAncestorOf(App::wnd()->focusWidget())); +} + void myEnsureResized(QWidget *target) { if (target && (target->testAttribute(Qt::WA_PendingResizeEvent) || !target->testAttribute(Qt::WA_WState_Created))) { _sendResizeEvents(target); diff --git a/Telegram/SourceFiles/gui/twidget.h b/Telegram/SourceFiles/gui/twidget.h index f627ad349b5940..ad839e7016eb29 100644 --- a/Telegram/SourceFiles/gui/twidget.h +++ b/Telegram/SourceFiles/gui/twidget.h @@ -183,6 +183,8 @@ class TWidget : public QWidget { virtual void grabFinish() { } + bool inFocusChain() const; + private: }; diff --git a/Telegram/SourceFiles/historywidget.cpp b/Telegram/SourceFiles/historywidget.cpp index 6bdc9c72a1733e..91b027d79156ba 100644 --- a/Telegram/SourceFiles/historywidget.cpp +++ b/Telegram/SourceFiles/historywidget.cpp @@ -2612,7 +2612,7 @@ void SilentToggle::leaveEvent(QEvent *e) { void SilentToggle::mouseReleaseEvent(QMouseEvent *e) { FlatCheckbox::mouseReleaseEvent(e); PopupTooltip::Show(0, this); - PeerData *p = App::main() ? App::main()->peer() : Nil; + PeerData *p = App::main() ? App::main()->peer() : nullptr; if (p && p->isChannel() && p->notify != UnknownNotifySettings) { App::main()->updateNotifySetting(p, NotifySettingDontChange, checked() ? SilentNotifiesSetSilent : SilentNotifiesSetNotify); } @@ -2979,7 +2979,7 @@ void HistoryWidget::onDraftSave(bool delayed) { return _saveDraftTimer.start(SaveDraftTimeout); } } - writeDrafts(Nil, Nil); + writeDrafts(nullptr, nullptr); } void HistoryWidget::writeDrafts(HistoryDraft **msgDraft, HistoryEditDraft **editDraft) { @@ -3228,6 +3228,26 @@ void HistoryWidget::notify_historyItemResized(const HistoryItem *row, bool scrol updateListSize(0, false, false, row, scrollToIt); } +void HistoryWidget::cmd_search() { + if (!inFocusChain() || !_peer) return; + + App::main()->searchInPeer(_peer); +} + +void HistoryWidget::cmd_next_chat() { + PeerData *p = 0; + MsgId m = 0; + App::main()->peerAfter(_peer, qMax(_showAtMsgId, 0), p, m); + if (p) Ui::showPeerHistory(p, m); +} + +void HistoryWidget::cmd_previous_chat() { + PeerData *p = 0; + MsgId m = 0; + App::main()->peerBefore(_peer, qMax(_showAtMsgId, 0), p, m); + if (p) Ui::showPeerHistory(p, m); +} + void HistoryWidget::stickersGot(const MTPmessages_AllStickers &stickers) { cSetLastStickersUpdate(getms(true)); _stickersUpdateRequest = 0; @@ -3546,13 +3566,13 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re if (_replyToId || !_field.getLastText().isEmpty()) { _history->setMsgDraft(new HistoryDraft(_field, _replyToId, _previewCancelled)); } else { - _history->setMsgDraft(Nil); + _history->setMsgDraft(nullptr); } - _history->setEditDraft(Nil); + _history->setEditDraft(nullptr); } if (_migrated) { - _migrated->setMsgDraft(Nil); // use migrated draft only once - _migrated->setEditDraft(Nil); + _migrated->setMsgDraft(nullptr); // use migrated draft only once + _migrated->setEditDraft(nullptr); } writeDrafts(&_history->msgDraft, &_history->editDraft); @@ -3666,14 +3686,14 @@ void HistoryWidget::showHistory(const PeerId &peerId, MsgId showAtMsgId, bool re Local::readDraftsWithCursors(_history); if (_migrated) { Local::readDraftsWithCursors(_migrated); - _migrated->setEditDraft(Nil); + _migrated->setEditDraft(nullptr); if (_migrated->msgDraft && !_migrated->msgDraft->text.isEmpty()) { _migrated->msgDraft->msgId = 0; // edit and reply to drafts can't migrate if (!_history->msgDraft) { _history->setMsgDraft(new HistoryDraft(*_migrated->msgDraft)); } } - _migrated->setMsgDraft(Nil); + _migrated->setMsgDraft(nullptr); } applyDraft(false); @@ -4581,7 +4601,7 @@ void HistoryWidget::saveEditMsgDone(History *history, const MTPUpdates &updates, cancelEdit(); } if (history->editDraft && history->editDraft->saveRequest == req) { - history->setEditDraft(Nil); + history->setEditDraft(nullptr); writeDrafts(history); } } @@ -6520,59 +6540,23 @@ void HistoryWidget::mousePressEvent(QMouseEvent *e) { void HistoryWidget::keyPressEvent(QKeyEvent *e) { if (!_history) return; - MsgId msgid = qMax(_showAtMsgId, 0); if (e->key() == Qt::Key_Escape) { e->ignore(); } else if (e->key() == Qt::Key_Back) { Ui::showChatsList(); emit cancelled(); } else if (e->key() == Qt::Key_PageDown) { - if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::MetaModifier)) { - PeerData *after = 0; - MsgId afterMsgId = 0; - App::main()->peerAfter(_peer, msgid, after, afterMsgId); - if (after) Ui::showPeerHistory(after, afterMsgId); - } else { - _scroll.keyPressEvent(e); - } + _scroll.keyPressEvent(e); } else if (e->key() == Qt::Key_PageUp) { - if ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::MetaModifier)) { - PeerData *before = 0; - MsgId beforeMsgId = 0; - App::main()->peerBefore(_peer, msgid, before, beforeMsgId); - if (before) Ui::showPeerHistory(before, beforeMsgId); - } else { - _scroll.keyPressEvent(e); - } + _scroll.keyPressEvent(e); } else if (e->key() == Qt::Key_Down) { - if (e->modifiers() & Qt::AltModifier) { - PeerData *after = 0; - MsgId afterMsgId = 0; - App::main()->peerAfter(_peer, msgid, after, afterMsgId); - if (after) Ui::showPeerHistory(after, afterMsgId); - } else if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) { + if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) { _scroll.keyPressEvent(e); } } else if (e->key() == Qt::Key_Up) { - if (e->modifiers() & Qt::AltModifier) { - PeerData *before = 0; - MsgId beforeMsgId = 0; - App::main()->peerBefore(_peer, msgid, before, beforeMsgId); - if (before) Ui::showPeerHistory(before, beforeMsgId); - } else if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) { + if (!(e->modifiers() & (Qt::ShiftModifier | Qt::MetaModifier | Qt::ControlModifier))) { _scroll.keyPressEvent(e); } - } else if ((e->key() == Qt::Key_Tab || e->key() == Qt::Key_Backtab) && ((e->modifiers() & Qt::ControlModifier) || (e->modifiers() & Qt::MetaModifier))) { - PeerData *p = 0; - MsgId m = 0; - if ((e->modifiers() & Qt::ShiftModifier) || e->key() == Qt::Key_Backtab) { - App::main()->peerBefore(_peer, msgid, p, m); - } else { - App::main()->peerAfter(_peer, msgid, p, m); - } - if (p) Ui::showPeerHistory(p, m); - } else if (_history && (e->key() == Qt::Key_Search || e == QKeySequence::Find)) { - App::main()->searchInPeer(_peer); } else { e->ignore(); } @@ -6902,7 +6886,7 @@ void HistoryWidget::onEditMessage() { if (_replyToId || !_field.getLastText().isEmpty()) { _history->setMsgDraft(new HistoryDraft(_field, _replyToId, _previewCancelled)); } else { - _history->setMsgDraft(Nil); + _history->setMsgDraft(nullptr); } QString text(textApplyEntities(to->originalText(), to->originalEntities())); @@ -6966,7 +6950,7 @@ void HistoryWidget::cancelReply(bool lastKeyboardUsed) { update(); } else if (wasReply) { if (_history->msgDraft->text.isEmpty()) { - _history->setMsgDraft(Nil); + _history->setMsgDraft(nullptr); } else { _history->msgDraft->msgId = 0; } @@ -6988,7 +6972,7 @@ void HistoryWidget::cancelEdit() { _editMsgId = 0; _replyEditMsg = 0; - _history->setEditDraft(Nil); + _history->setEditDraft(nullptr); applyDraft(); if (_saveEditMsgRequestId) { diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index b263760363c936..2a4b49fe9508cd 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -596,6 +596,10 @@ class HistoryWidget : public TWidget, public RPCSender { void notify_clipStopperHidden(ClipStopperType type); void notify_historyItemResized(const HistoryItem *item, bool scrollToIt); + void cmd_search(); + void cmd_next_chat(); + void cmd_previous_chat(); + ~HistoryWidget(); signals: diff --git a/Telegram/SourceFiles/localstorage.cpp b/Telegram/SourceFiles/localstorage.cpp index fb5ed2fbdaeaee..9764cad6725b99 100644 --- a/Telegram/SourceFiles/localstorage.cpp +++ b/Telegram/SourceFiles/localstorage.cpp @@ -2352,12 +2352,12 @@ namespace Local { _readDraftCursors(peer, msgCursor, editCursor); if (msgText.isEmpty() && !msgReplyTo) { - h->setMsgDraft(Nil); + h->setMsgDraft(nullptr); } else { h->setMsgDraft(new HistoryDraft(msgText, msgReplyTo, msgCursor, msgPreviewCancelled)); } if (!editMsgId) { - h->setEditDraft(Nil); + h->setEditDraft(nullptr); } else { h->setEditDraft(new HistoryEditDraft(editText, editMsgId, editCursor, editPreviewCancelled)); } diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 6df869b326df7f..6c588c6194fe34 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -517,7 +517,7 @@ bool MainWidget::onShareUrl(const PeerId &peer, const QString &url, const QStrin } History *h = App::history(peer); h->setMsgDraft(new HistoryDraft(url + '\n' + text, 0, MessageCursor(url.size() + 1, url.size() + 1 + text.size(), QFIXED_MAX), false)); - h->setEditDraft(Nil); + h->setEditDraft(nullptr); bool opened = history.peer() && (history.peer()->id == peer); if (opened) { history.applyDraft(); @@ -812,6 +812,18 @@ void MainWidget::notify_automaticLoadSettingsChangedGif() { history.notify_automaticLoadSettingsChangedGif(); } +void MainWidget::cmd_search() { + history.cmd_search(); +} + +void MainWidget::cmd_next_chat() { + history.cmd_next_chat(); +} + +void MainWidget::cmd_previous_chat() { + history.cmd_previous_chat(); +} + void MainWidget::notify_historyItemResized(const HistoryItem *item, bool scrollToIt) { if (!item || ((history.peer() == item->history()->peer || (history.peer() && history.peer() == item->history()->peer->migrateTo())) && !item->detached())) { history.notify_historyItemResized(item, scrollToIt); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index ce45674f00e1dd..7f417acbc0b1c8 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -435,6 +435,10 @@ class MainWidget : public TWidget, public RPCSender { void notify_historyItemLayoutChanged(const HistoryItem *item); void notify_automaticLoadSettingsChangedGif(); + void cmd_search(); + void cmd_next_chat(); + void cmd_previous_chat(); + ~MainWidget(); signals: diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index ce6173b801d6dc..02077ba67445dc 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -620,6 +620,7 @@ namespace { case WM_CLOSE: App::wnd()->close(); break; + case WM_NCHITTEST: { int32 xPos = GET_X_LPARAM(lParam), yPos = GET_Y_LPARAM(lParam); switch (i) { diff --git a/Telegram/SourceFiles/stdafx.h b/Telegram/SourceFiles/stdafx.h index b9d77d66ba91b3..22bc15115073f9 100644 --- a/Telegram/SourceFiles/stdafx.h +++ b/Telegram/SourceFiles/stdafx.h @@ -20,7 +20,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #define __HUGE #define PSAPI_VERSION 1 // fix WinXP -//#define Q_NO_TEMPLATE_FRIENDS // fix some compiler difference issues #define __STDC_FORMAT_MACROS // fix breakpad for mac @@ -38,15 +37,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include #include +#include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include #ifdef Q_OS_WIN // use Lzma SDK for win #include diff --git a/Telegram/SourceFiles/sysbuttons.cpp b/Telegram/SourceFiles/sysbuttons.cpp index 44fd04ef5988c5..9a61c847dd0c0c 100644 --- a/Telegram/SourceFiles/sysbuttons.cpp +++ b/Telegram/SourceFiles/sysbuttons.cpp @@ -22,9 +22,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "style.h" #include "lang.h" +#include "shortcuts.h" + #include "sysbuttons.h" -#include "passcodewidget.h" -#include "window.h" #include "application.h" #include "autoupdater.h" @@ -166,9 +166,5 @@ LockBtn::LockBtn(QWidget *parent, Window *window) : SysBtn(parent, st::sysLock), } void LockBtn::onClick() { - if (App::passcoded()) { - App::wnd()->passcodeWidget()->onSubmit(); - } else { - App::wnd()->setupPasscode(true); - } + Shortcuts::launch(qsl("lock_telegram")); } diff --git a/Telegram/SourceFiles/sysbuttons.h b/Telegram/SourceFiles/sysbuttons.h index db6e2ed897f7fa..6cbc284a49f355 100644 --- a/Telegram/SourceFiles/sysbuttons.h +++ b/Telegram/SourceFiles/sysbuttons.h @@ -20,7 +20,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -#include #include "gui/animation.h" #include "gui/button.h" diff --git a/Telegram/SourceFiles/types.cpp b/Telegram/SourceFiles/types.cpp index 0b16ead7f2a7c2..231b9bdf39284f 100644 --- a/Telegram/SourceFiles/types.cpp +++ b/Telegram/SourceFiles/types.cpp @@ -35,7 +35,9 @@ uint64 _SharedMemoryLocation[4] = { 0x00, 0x01, 0x02, 0x03 }; // Base types compile-time check -NilPointer Nil; +#ifdef TDESKTOP_CUSTOM_NULLPTR +NullPointerClass nullptr; +#endif namespace { template diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 00ef2c51f0161e..2814ce5ccb2afe 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -36,7 +36,12 @@ T *exchange(T *&ptr) { struct NullType { }; -class NilPointer { +#if __cplusplus < 199711L +#define TDESKTOP_CUSTOM_NULLPTR +#endif + +#ifdef TDESKTOP_CUSTOM_NULLPTR +class NullPointerClass { public: template operator T*() const { @@ -50,7 +55,8 @@ class NilPointer { private: void operator&() const; }; -extern NilPointer Nil; +extern NullPointerClass nullptr; +#endif template class OrderedSet : public QMap { diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index cead63ab7a9617..6817c6ac5aa298 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -22,6 +22,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "style.h" #include "lang.h" +#include "shortcuts.h" + #include "window.h" #include "application.h" @@ -1008,8 +1010,8 @@ QRect Window::iconRect() const { return QRect(st::titleIconPos + title->geometry().topLeft(), st::titleIconImg.pxSize()); } -bool Window::eventFilter(QObject *obj, QEvent *evt) { - QEvent::Type t = evt->type(); +bool Window::eventFilter(QObject *obj, QEvent *e) { + QEvent::Type t = e->type(); if (t == QEvent::MouseButtonPress || t == QEvent::KeyPress || t == QEvent::TouchBegin || t == QEvent::Wheel) { psUserActionDone(); } else if (t == QEvent::MouseMove) { @@ -1019,13 +1021,15 @@ bool Window::eventFilter(QObject *obj, QEvent *evt) { } } else if (t == QEvent::MouseButtonRelease) { Ui::hideStickerPreview(); + } else if (t == QEvent::Shortcut) { + Shortcuts::launch(static_cast(e)->shortcutId()); } if (obj == Application::instance()) { if (t == QEvent::ApplicationActivate) { psUserActionDone(); QTimer::singleShot(1, this, SLOT(checkHistoryActivation())); } else if (t == QEvent::FileOpen) { - QString url = static_cast(evt)->url().toEncoded(); + QString url = static_cast(e)->url().toEncoded(); if (!url.trimmed().midRef(0, 5).compare(qsl("tg://"), Qt::CaseInsensitive)) { cSetStartUrl(url); if (!cStartUrl().isEmpty() && App::main() && App::self()) { @@ -1043,7 +1047,7 @@ bool Window::eventFilter(QObject *obj, QEvent *evt) { psUpdatedPosition(); } } - return PsMainWindow::eventFilter(obj, evt); + return PsMainWindow::eventFilter(obj, e); } void Window::mouseMoveEvent(QMouseEvent *e) { diff --git a/Telegram/Telegram.pro b/Telegram/Telegram.pro index 4ff476e8b3aa68..3ea190507367be 100644 --- a/Telegram/Telegram.pro +++ b/Telegram/Telegram.pro @@ -108,6 +108,7 @@ SOURCES += \ ./SourceFiles/mainwidget.cpp \ ./SourceFiles/settings.cpp \ ./SourceFiles/settingswidget.cpp \ + ./SourceFiles/shortcuts.cpp \ ./SourceFiles/structs.cpp \ ./SourceFiles/sysbuttons.cpp \ ./SourceFiles/title.cpp \ @@ -197,6 +198,7 @@ HEADERS += \ ./SourceFiles/mainwidget.h \ ./SourceFiles/settings.h \ ./SourceFiles/settingswidget.h \ + ./SourceFiles/shortcuts.h \ ./SourceFiles/structs.h \ ./SourceFiles/style.h \ ./SourceFiles/sysbuttons.h \ diff --git a/Telegram/Telegram.vcxproj b/Telegram/Telegram.vcxproj index 16a8dc9350c84c..6f0ffc653692f9 100644 --- a/Telegram/Telegram.vcxproj +++ b/Telegram/Telegram.vcxproj @@ -1043,6 +1043,7 @@ + Create Create @@ -1060,6 +1061,7 @@ + diff --git a/Telegram/Telegram.vcxproj.filters b/Telegram/Telegram.vcxproj.filters index ddc386b0a05a0d..3c80ea71f089b3 100644 --- a/Telegram/Telegram.vcxproj.filters +++ b/Telegram/Telegram.vcxproj.filters @@ -906,6 +906,9 @@ ThirdParty\minizip + + Source Files + @@ -1004,6 +1007,9 @@ ThirdParty\minizip + + Source Files + From bfa8075acf6c18c7a521c3c38cdce4e8b2400e3e Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 27 Feb 2016 22:41:15 +0300 Subject: [PATCH 119/133] added shortcuts module to git --- Telegram/SourceFiles/shortcuts.cpp | 354 +++++++++++++++++++++++++++++ Telegram/SourceFiles/shortcuts.h | 33 +++ 2 files changed, 387 insertions(+) create mode 100644 Telegram/SourceFiles/shortcuts.cpp create mode 100644 Telegram/SourceFiles/shortcuts.h diff --git a/Telegram/SourceFiles/shortcuts.cpp b/Telegram/SourceFiles/shortcuts.cpp new file mode 100644 index 00000000000000..37731fc81f5d6b --- /dev/null +++ b/Telegram/SourceFiles/shortcuts.cpp @@ -0,0 +1,354 @@ +/* +This file is part of Telegram Desktop, +the official desktop version of Telegram messaging app, see https://telegram.org + +Telegram Desktop is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +It is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +In addition, as a special exception, the copyright holders give permission +to link the code of portions of this program with the OpenSSL library. + +Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org +*/ +#include "stdafx.h" + +#include "shortcuts.h" + +#include "window.h" +#include "passcodewidget.h" +#include "mainwidget.h" + +namespace ShortcutCommands { + typedef void(*Handler)(); + + void lock_telegram() { + if (Window *w = App::wnd()) { + if (App::passcoded()) { + w->passcodeWidget()->onSubmit(); + } else if (cHasPasscode()) { + w->setupPasscode(true); + } + } + } + + void minimize_telegram() { + if (Window *w = App::wnd()) { + if (cWorkMode() == dbiwmTrayOnly) { + w->minimizeToTray(); + } else { + w->setWindowState(Qt::WindowMinimized); + } + } + } + + void close_telegram() { + if (!Ui::hideWindowNoQuit()) { + if (Window *w = App::wnd()) { + App::wnd()->close(); + } + } + } + + void quit_telegram() { + App::quit(); + } + + //void start_stop_recording() { + + //} + + //void cancel_recording() { + + //} + + void media_play() { + if (MainWidget *m = App::main()) { + m->player()->playPressed(); + } + } + + void media_pause() { + if (MainWidget *m = App::main()) { + m->player()->pausePressed(); + } + } + + void media_playpause() { + if (MainWidget *m = App::main()) { + m->player()->playPausePressed(); + } + } + + void media_stop() { + if (MainWidget *m = App::main()) { + m->player()->stopPressed(); + } + } + + void media_previous() { + if (MainWidget *m = App::main()) { + m->player()->prevPressed(); + } + } + + void media_next() { + if (MainWidget *m = App::main()) { + m->player()->nextPressed(); + } + } + + void search() { + if (MainWidget *m = App::main()) { + m->cmd_search(); + } + } + + void previous_chat() { + if (MainWidget *m = App::main()) { + m->cmd_previous_chat(); + } + } + + void next_chat() { + if (MainWidget *m = App::main()) { + m->cmd_next_chat(); + } + } + + // other commands here + +} + +inline bool qMapLessThanKey(const ShortcutCommands::Handler &a, const ShortcutCommands::Handler &b) { + return a < b; +} + +namespace Shortcuts { + + struct DataStruct; + DataStruct *DataPtr = nullptr; + + void _createCommand(const QString &command, ShortcutCommands::Handler handler); + QKeySequence _setShortcut(const QString &keys, const QString &command); + struct DataStruct { + DataStruct() { + t_assert(DataPtr == nullptr); + DataPtr = this; + +#define DeclareAlias(keys, command) _setShortcut(qsl(keys), qsl(#command)) +#define DeclareCommand(keys, command) _createCommand(qsl(#command), ShortcutCommands::command); DeclareAlias(keys, command) + + DeclareCommand("ctrl+w", close_telegram); + DeclareAlias("ctrl+f4", close_telegram); + DeclareCommand("ctrl+l", lock_telegram); + DeclareCommand("ctrl+m", minimize_telegram); + DeclareCommand("ctrl+q", quit_telegram); + + //DeclareCommand("ctrl+r", start_stop_recording); + //DeclareCommand("ctrl+shift+r", cancel_recording); + //DeclareCommand("media record", start_stop_recording); + + DeclareCommand("media play", media_play); + DeclareCommand("media pause", media_pause); + DeclareCommand("toggle media play/pause", media_playpause); + DeclareCommand("media stop", media_stop); + DeclareCommand("media previous", media_previous); + DeclareCommand("media next", media_next); + + DeclareCommand("ctrl+f", search); + DeclareAlias("search", search); + DeclareAlias("find", search); + + DeclareCommand("ctrl+pgdown", next_chat); + DeclareAlias("alt+down", next_chat); + DeclareAlias("ctrl+tab", next_chat); + DeclareCommand("ctrl+pgup", previous_chat); + DeclareAlias("alt+up", previous_chat); + DeclareAlias("ctrl+shift+tab", previous_chat); + DeclareAlias("ctrl+backtab", previous_chat); + + // other commands here + +#undef DeclareCommand +#undef DeclareAlias + } + QStringList errors; + + QMap commands; + QMap commandnames; + + QMap sequences; + QMap handlers; + }; + + void _createCommand(const QString &command, ShortcutCommands::Handler handler) { + t_assert(DataPtr != nullptr); + t_assert(!command.isEmpty()); + + DataPtr->commands.insert(command, handler); + DataPtr->commandnames.insert(handler, command); + } + + QKeySequence _setShortcut(const QString &keys, const QString &command) { + t_assert(DataPtr != nullptr); + t_assert(!command.isEmpty()); + if (keys.isEmpty()) return QKeySequence(); + + QKeySequence seq(keys, QKeySequence::PortableText); + if (seq.isEmpty()) { + DataPtr->errors.push_back(qsl("Could not derive key sequence '%1'!").arg(keys)); + } else { + QMap::const_iterator it = DataPtr->commands.constFind(command); + if (it == DataPtr->commands.cend()) { + LOG(("Warning: could not find shortcut command handler '%1'").arg(command)); + } else { + QShortcut *shortcut(new QShortcut(seq, App::wnd(), nullptr, nullptr, Qt::ApplicationShortcut)); + int shortcutId = shortcut->id(); + if (!shortcutId) { + DataPtr->errors.push_back(qsl("Could not create shortcut '%1'!").arg(keys)); + } else { + QMap::iterator seqIt = DataPtr->sequences.find(seq); + if (seqIt == DataPtr->sequences.cend()) { + seqIt = DataPtr->sequences.insert(seq, shortcut); + } else { + DataPtr->handlers.remove(seqIt.value()->id()); + delete seqIt.value(); + seqIt.value() = shortcut; + } + DataPtr->handlers.insert(shortcutId, it.value()); + } + } + } + return seq; + } + + QKeySequence _removeShortcut(const QString &keys) { + t_assert(DataPtr != nullptr); + if (keys.isEmpty()) return QKeySequence(); + + QKeySequence seq(keys, QKeySequence::PortableText); + if (seq.isEmpty()) { + DataPtr->errors.push_back(qsl("Could not derive key sequence '%1'!").arg(keys)); + } else { + QMap::iterator seqIt = DataPtr->sequences.find(seq); + if (seqIt != DataPtr->sequences.cend()) { + DataPtr->handlers.remove(seqIt.value()->id()); + delete seqIt.value(); + DataPtr->sequences.erase(seqIt); + } + } + return seq; + } + + void start() { + t_assert(Global::started()); + + new DataStruct(); + + QJsonArray shortcuts; + OrderedSet notfound; + QFile f(cWorkingDir() + qsl("tdata/shortcuts.json")); + if (f.exists()) { + if (f.open(QIODevice::ReadOnly)) { + QJsonParseError error = { 0, QJsonParseError::NoError }; + QJsonDocument doc = QJsonDocument::fromJson(f.readAll(), &error); + if (error.error != QJsonParseError::NoError) { + DataPtr->errors.push_back(qsl("Failed to parse '%1'! Error: %2").arg(f.fileName()).arg(error.errorString())); + } else if (!doc.isArray()) { + DataPtr->errors.push_back(qsl("Failed to parse '%1'! Error: array expected").arg(f.fileName())); + } else { + for (QMap::const_iterator i = DataPtr->sequences.cbegin(), e = DataPtr->sequences.cend(); i != e; ++i) { + notfound.insert(i.key()); + } + + shortcuts = doc.array(); + int limit = ShortcutsCountLimit; + for (QJsonArray::const_iterator i = shortcuts.constBegin(), e = shortcuts.constEnd(); i != e; ++i) { + if (!i->isObject()) { + DataPtr->errors.push_back(qsl("Bad entry in '%1'! Error: object expected").arg(f.fileName())); + } else { + QKeySequence seq; + QJsonObject entry(i->toObject()); + QJsonObject::const_iterator keys = entry.constFind(qsl("keys")), command = entry.constFind(qsl("command")); + if (keys == entry.constEnd() || command == entry.constEnd() || !keys->isString() || (!command->isString() && !command->isNull())) { + DataPtr->errors.push_back(qsl("Bad entry in '%1'! Error: {\"keys\": \"..\", \"command\": [ \"..\" | null ]} expected").arg(f.fileName())); + } else if (command->isNull()) { + seq = _removeShortcut(keys->toString()); + } else { + seq = _setShortcut(keys->toString(), command->toString()); + } + if (!--limit) { + DataPtr->errors.push_back(qsl("Too many entries in '%1'!").arg(f.fileName())); + break; + } else if (DataPtr->errors.isEmpty()) { + notfound.remove(seq); + } + } + } + } + f.close(); + } else { + DataPtr->errors.push_back(qsl("Could not read '") + f.fileName() + qsl("'!")); + } + } + if (DataPtr->errors.isEmpty() && (shortcuts.isEmpty() || !notfound.isEmpty()) && f.open(QIODevice::WriteOnly)) { + for (OrderedSet::const_iterator i = notfound.cbegin(), e = notfound.cend(); i != e; ++i) { + QMap::const_iterator s = DataPtr->sequences.constFind(i.key()); + if (s != DataPtr->sequences.cend()) { + QMap::const_iterator h = DataPtr->handlers.constFind(s.value()->id()); + if (h != DataPtr->handlers.cend()) { + QMap::const_iterator n = DataPtr->commandnames.constFind(h.value()); + if (n != DataPtr->commandnames.cend()) { + QJsonObject entry; + entry.insert(qsl("keys"), i.key().toString().toLower()); + entry.insert(qsl("command"), n.value()); + shortcuts.append(entry); + } + } + } + } + + QJsonDocument doc; + doc.setArray(shortcuts); + f.write(doc.toJson(QJsonDocument::Indented)); + f.close(); + } + } + + const QStringList &errors() { + t_assert(DataPtr != nullptr); + return DataPtr->errors; + } + + void launch(int shortcutId) { + t_assert(DataPtr != nullptr); + + QMap::const_iterator it = DataPtr->handlers.constFind(shortcutId); + if (it != DataPtr->handlers.cend()) { + (*it.value())(); + } + } + + void launch(const QString &command) { + t_assert(DataPtr != nullptr); + + QMap::const_iterator it = DataPtr->commands.constFind(command); + if (it != DataPtr->commands.cend()) { + (*it.value())(); + } + } + + void finish() { + delete DataPtr; + DataPtr = nullptr; + } + +} diff --git a/Telegram/SourceFiles/shortcuts.h b/Telegram/SourceFiles/shortcuts.h new file mode 100644 index 00000000000000..e90347898765f6 --- /dev/null +++ b/Telegram/SourceFiles/shortcuts.h @@ -0,0 +1,33 @@ +/* +This file is part of Telegram Desktop, +the official desktop version of Telegram messaging app, see https://telegram.org + +Telegram Desktop is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 3 of the License, or +(at your option) any later version. + +It is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +In addition, as a special exception, the copyright holders give permission +to link the code of portions of this program with the OpenSSL library. + +Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE +Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org +*/ +#pragma once + +namespace Shortcuts { + + void start(); + const QStringList &errors(); + + void launch(int shortcutId); + void launch(const QString &command); + + void finish(); + +} From bb518043bc2ceb4bb7703ad8b46f17062be54ab8 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sat, 27 Feb 2016 23:09:31 +0300 Subject: [PATCH 120/133] shortcuts added for mac os x --- Telegram/SourceFiles/shortcuts.cpp | 12 +++++++++--- Telegram/Telegram.xcodeproj/project.pbxproj | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Telegram/SourceFiles/shortcuts.cpp b/Telegram/SourceFiles/shortcuts.cpp index 37731fc81f5d6b..430622547f3873 100644 --- a/Telegram/SourceFiles/shortcuts.cpp +++ b/Telegram/SourceFiles/shortcuts.cpp @@ -169,11 +169,17 @@ namespace Shortcuts { DeclareCommand("ctrl+pgdown", next_chat); DeclareAlias("alt+down", next_chat); - DeclareAlias("ctrl+tab", next_chat); DeclareCommand("ctrl+pgup", previous_chat); DeclareAlias("alt+up", previous_chat); - DeclareAlias("ctrl+shift+tab", previous_chat); - DeclareAlias("ctrl+backtab", previous_chat); + if (cPlatform() == dbipMac || cPlatform() == dbipMacOld) { + DeclareAlias("meta+tab", next_chat); + DeclareAlias("meta+shift+tab", previous_chat); + DeclareAlias("meta+backtab", previous_chat); + } else { + DeclareAlias("ctrl+tab", next_chat); + DeclareAlias("ctrl+shift+tab", previous_chat); + DeclareAlias("ctrl+backtab", previous_chat); + } // other commands here diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 0f6dbcf6da23ad..496b74e15ba2f0 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -61,6 +61,7 @@ 0755AEDD1AD12A80004D738A /* moc_abstractbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDA1AD12A80004D738A /* moc_abstractbox.cpp */; }; 0755AEDE1AD12A80004D738A /* moc_intropwdcheck.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDB1AD12A80004D738A /* moc_intropwdcheck.cpp */; }; 0755AEDF1AD12A80004D738A /* moc_sessionsbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0755AEDC1AD12A80004D738A /* moc_sessionsbox.cpp */; }; + 075FEBEC1C82336D0003ECA3 /* shortcuts.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 075FEBEA1C82336D0003ECA3 /* shortcuts.cpp */; }; 0764D55A1ABAD6F900FBFEED /* apiwrap.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0764D5581ABAD6F900FBFEED /* apiwrap.cpp */; }; 0764D55D1ABAD71B00FBFEED /* moc_apiwrap.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 0764D55C1ABAD71B00FBFEED /* moc_apiwrap.cpp */; }; 078A2FCA1A811C5900CCC7A0 /* moc_backgroundbox.cpp in Compile Sources */ = {isa = PBXBuildFile; fileRef = 078A2FC91A811C5900CCC7A0 /* moc_backgroundbox.cpp */; }; @@ -307,6 +308,8 @@ 0755AEDC1AD12A80004D738A /* moc_sessionsbox.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_sessionsbox.cpp; path = GeneratedFiles/Debug/moc_sessionsbox.cpp; sourceTree = SOURCE_ROOT; }; 075EB50EB07CF69FD62FB8DF /* /usr/local/Qt-5.5.1/mkspecs/modules/qt_lib_sql_private.pri */ = {isa = PBXFileReference; lastKnownFileType = text; path = "/usr/local/Qt-5.5.1/mkspecs/modules/qt_lib_sql_private.pri"; sourceTree = ""; }; 075F99A91A45EEF200915C72 /* lang_es.strings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = lang_es.strings; path = SourceFiles/langs/lang_es.strings; sourceTree = SOURCE_ROOT; }; + 075FEBEA1C82336D0003ECA3 /* shortcuts.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = shortcuts.cpp; path = SourceFiles/shortcuts.cpp; sourceTree = SOURCE_ROOT; }; + 075FEBEB1C82336D0003ECA3 /* shortcuts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = shortcuts.h; path = SourceFiles/shortcuts.h; sourceTree = SOURCE_ROOT; }; 0764D5581ABAD6F900FBFEED /* apiwrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = apiwrap.cpp; path = SourceFiles/apiwrap.cpp; sourceTree = SOURCE_ROOT; }; 0764D5591ABAD6F900FBFEED /* apiwrap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = apiwrap.h; path = SourceFiles/apiwrap.h; sourceTree = SOURCE_ROOT; }; 0764D55C1ABAD71B00FBFEED /* moc_apiwrap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = moc_apiwrap.cpp; path = GeneratedFiles/Debug/moc_apiwrap.cpp; sourceTree = SOURCE_ROOT; }; @@ -952,6 +955,7 @@ 047DAFB0A7DE92C63033A43C /* mainwidget.cpp */, 8A28F7789408AA839F48A5F2 /* settings.cpp */, 8CCCACE96535180FEB557712 /* settingswidget.cpp */, + 075FEBEA1C82336D0003ECA3 /* shortcuts.cpp */, 07DB67451AD07C4F00A51329 /* structs.cpp */, 6B90F69947805586A6FAE80E /* sysbuttons.cpp */, 2BB2A1BB8DB0993F78F4E3C7 /* title.cpp */, @@ -994,6 +998,7 @@ FE8FD20832B4C226E345CFBA /* mainwidget.h */, 2EA58EF6CDF368B0132BAEB9 /* settings.h */, F80095A026AF9453E9C2B8BD /* settingswidget.h */, + 075FEBEB1C82336D0003ECA3 /* shortcuts.h */, 07DB67461AD07C4F00A51329 /* structs.h */, C913E6A1001E07EE7C13CE93 /* style.h */, 3BE70E2A82DC2BF402165ED5 /* sysbuttons.h */, @@ -1658,6 +1663,7 @@ E8B28580819B882A5964561A /* moc_addcontactbox.cpp in Compile Sources */, 07B604321B46A0EC00CA29FE /* playerwidget.cpp in Compile Sources */, D6874C00733283846ACA9AB2 /* moc_confirmbox.cpp in Compile Sources */, + 075FEBEC1C82336D0003ECA3 /* shortcuts.cpp in Compile Sources */, ED2557A57C6782721DC494AF /* moc_connectionbox.cpp in Compile Sources */, 5FC914F652D1B16FDA8F0634 /* moc_contactsbox.cpp in Compile Sources */, 074968D01A44D14C00394F46 /* languagebox.cpp in Compile Sources */, From 26ffbbc34f39413e7ac7c80cd3ce72791f37b8db Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 12:48:09 +0300 Subject: [PATCH 121/133] divided shortcuts file to default and custom --- Telegram/SourceFiles/shortcuts.cpp | 211 ++++++++++++++++++++++------- Telegram/SourceFiles/shortcuts.h | 4 +- Telegram/SourceFiles/window.cpp | 54 ++++++-- 3 files changed, 207 insertions(+), 62 deletions(-) diff --git a/Telegram/SourceFiles/shortcuts.cpp b/Telegram/SourceFiles/shortcuts.cpp index 37731fc81f5d6b..b18a4399a1c7f2 100644 --- a/Telegram/SourceFiles/shortcuts.cpp +++ b/Telegram/SourceFiles/shortcuts.cpp @@ -133,6 +133,76 @@ inline bool qMapLessThanKey(const ShortcutCommands::Handler &a, const ShortcutCo namespace Shortcuts { + // inspired by https://github.com/sindresorhus/strip-json-comments + QByteArray _stripJsonComments(const QByteArray &json) { + enum InsideComment { + InsideCommentNone, + InsideCommentSingleLine, + InsideCommentMultiLine, + }; + InsideComment insideComment = InsideCommentNone; + bool insideString = false; + + QByteArray result; + + const char *b = json.cbegin(), *e = json.cend(), *offset = b; + for (const char *ch = offset; ch != e; ++ch) { + char currentChar = *ch; + char nextChar = (ch + 1 == e) ? 0 : *(ch + 1); + + if (insideComment == InsideCommentNone && currentChar == '"') { + bool escaped = ((ch > b) && *(ch - 1) == '\\') && ((ch - 1 < b) || *(ch - 2) != '\\'); + if (!escaped) { + insideString = !insideString; + } + } + + if (insideString) { + continue; + } + + if (insideComment == InsideCommentNone && currentChar == '/' && nextChar == '/') { + if (ch > offset) { + if (result.isEmpty()) result.reserve(json.size() - 2); + result.append(offset, ch - offset); + offset = ch; + } + insideComment = InsideCommentSingleLine; + ++ch; + } else if (insideComment == InsideCommentSingleLine && currentChar == '\r' && nextChar == '\n') { + if (ch > offset) { + offset = ch; + } + ++ch; + insideComment = InsideCommentNone; + } else if (insideComment == InsideCommentSingleLine && currentChar == '\n') { + if (ch > offset) { + offset = ch; + } + insideComment = InsideCommentNone; + } else if (insideComment == InsideCommentNone && currentChar == '/' && nextChar == '*') { + if (ch > offset) { + if (result.isEmpty()) result.reserve(json.size() - 2); + result.append(offset, ch - offset); + offset = ch; + } + insideComment = InsideCommentMultiLine; + ++ch; + } else if (insideComment == InsideCommentMultiLine && currentChar == '*' && nextChar == '/') { + if (ch > offset) { + offset = ch; + } + ++ch; + insideComment = InsideCommentNone; + } + } + + if (insideComment == InsideCommentNone && e > offset && !result.isEmpty()) { + result.append(offset, e - offset); + } + return result.isEmpty() ? json : result; + } + struct DataStruct; DataStruct *DataPtr = nullptr; @@ -253,73 +323,116 @@ namespace Shortcuts { new DataStruct(); - QJsonArray shortcuts; - OrderedSet notfound; - QFile f(cWorkingDir() + qsl("tdata/shortcuts.json")); - if (f.exists()) { - if (f.open(QIODevice::ReadOnly)) { + // write default shortcuts to a file if they are not there already + bool defaultValid = false; + QFile defaultFile(cWorkingDir() + qsl("tdata/shortcuts-default.json")); + if (defaultFile.open(QIODevice::ReadOnly)) { + QJsonParseError error = { 0, QJsonParseError::NoError }; + QJsonDocument doc = QJsonDocument::fromJson(_stripJsonComments(defaultFile.readAll()), &error); + defaultFile.close(); + + if (error.error == QJsonParseError::NoError && doc.isArray()) { + QJsonArray shortcuts(doc.array()); + if (!shortcuts.isEmpty() && shortcuts.constBegin()->isObject()) { + QJsonObject versionObject(shortcuts.constBegin()->toObject()); + QJsonObject::const_iterator version = versionObject.constFind(qsl("version")); + if (version != versionObject.constEnd() && version->isString() && version->toString() == QString::number(AppVersion)) { + defaultValid = true; + } + } + } + } + if (!defaultValid && defaultFile.open(QIODevice::WriteOnly)) { + const char *defaultHeader = "\ +// This is a list of default shortcuts for Telegram Desktop\n\ +// Please don't modify it, its content is not used in any way\n\ +// You can place your own shortcuts in the 'shortcuts-custom.json' file\n\n"; + defaultFile.write(defaultHeader); + + QJsonArray shortcuts; + + QJsonObject version; + version.insert(qsl("version"), QString::number(AppVersion)); + shortcuts.push_back(version); + + for (QMap::const_iterator i = DataPtr->sequences.cbegin(), e = DataPtr->sequences.cend(); i != e; ++i) { + QMap::const_iterator h = DataPtr->handlers.constFind(i.value()->id()); + if (h != DataPtr->handlers.cend()) { + QMap::const_iterator n = DataPtr->commandnames.constFind(h.value()); + if (n != DataPtr->commandnames.cend()) { + QJsonObject entry; + entry.insert(qsl("keys"), i.key().toString().toLower()); + entry.insert(qsl("command"), n.value()); + shortcuts.append(entry); + } + } + } + + QJsonDocument doc; + doc.setArray(shortcuts); + defaultFile.write(doc.toJson(QJsonDocument::Indented)); + defaultFile.close(); + } + + // read custom shortcuts from file if it exists or write an empty custom shortcuts file + QFile customFile(cWorkingDir() + qsl("tdata/shortcuts-custom.json")); + if (customFile.exists()) { + if (customFile.open(QIODevice::ReadOnly)) { QJsonParseError error = { 0, QJsonParseError::NoError }; - QJsonDocument doc = QJsonDocument::fromJson(f.readAll(), &error); + QJsonDocument doc = QJsonDocument::fromJson(_stripJsonComments(customFile.readAll()), &error); + customFile.close(); + if (error.error != QJsonParseError::NoError) { - DataPtr->errors.push_back(qsl("Failed to parse '%1'! Error: %2").arg(f.fileName()).arg(error.errorString())); + DataPtr->errors.push_back(qsl("Failed to parse! Error: %2").arg(error.errorString())); } else if (!doc.isArray()) { - DataPtr->errors.push_back(qsl("Failed to parse '%1'! Error: array expected").arg(f.fileName())); + DataPtr->errors.push_back(qsl("Failed to parse! Error: array expected")); } else { - for (QMap::const_iterator i = DataPtr->sequences.cbegin(), e = DataPtr->sequences.cend(); i != e; ++i) { - notfound.insert(i.key()); - } - - shortcuts = doc.array(); + QJsonArray shortcuts = doc.array(); int limit = ShortcutsCountLimit; for (QJsonArray::const_iterator i = shortcuts.constBegin(), e = shortcuts.constEnd(); i != e; ++i) { if (!i->isObject()) { - DataPtr->errors.push_back(qsl("Bad entry in '%1'! Error: object expected").arg(f.fileName())); + DataPtr->errors.push_back(qsl("Bad entry! Error: object expected")); } else { QKeySequence seq; QJsonObject entry(i->toObject()); QJsonObject::const_iterator keys = entry.constFind(qsl("keys")), command = entry.constFind(qsl("command")); if (keys == entry.constEnd() || command == entry.constEnd() || !keys->isString() || (!command->isString() && !command->isNull())) { - DataPtr->errors.push_back(qsl("Bad entry in '%1'! Error: {\"keys\": \"..\", \"command\": [ \"..\" | null ]} expected").arg(f.fileName())); + DataPtr->errors.push_back(qsl("Bad entry! {\"keys\": \"...\", \"command\": [ \"...\" | null ]} expected")); } else if (command->isNull()) { seq = _removeShortcut(keys->toString()); } else { seq = _setShortcut(keys->toString(), command->toString()); } if (!--limit) { - DataPtr->errors.push_back(qsl("Too many entries in '%1'!").arg(f.fileName())); + DataPtr->errors.push_back(qsl("Too many entries! Limit is %1").arg(ShortcutsCountLimit)); break; - } else if (DataPtr->errors.isEmpty()) { - notfound.remove(seq); } } } } - f.close(); } else { - DataPtr->errors.push_back(qsl("Could not read '") + f.fileName() + qsl("'!")); + DataPtr->errors.push_back(qsl("Could not read the file!")); } - } - if (DataPtr->errors.isEmpty() && (shortcuts.isEmpty() || !notfound.isEmpty()) && f.open(QIODevice::WriteOnly)) { - for (OrderedSet::const_iterator i = notfound.cbegin(), e = notfound.cend(); i != e; ++i) { - QMap::const_iterator s = DataPtr->sequences.constFind(i.key()); - if (s != DataPtr->sequences.cend()) { - QMap::const_iterator h = DataPtr->handlers.constFind(s.value()->id()); - if (h != DataPtr->handlers.cend()) { - QMap::const_iterator n = DataPtr->commandnames.constFind(h.value()); - if (n != DataPtr->commandnames.cend()) { - QJsonObject entry; - entry.insert(qsl("keys"), i.key().toString().toLower()); - entry.insert(qsl("command"), n.value()); - shortcuts.append(entry); - } - } - } + if (!DataPtr->errors.isEmpty()) { + DataPtr->errors.push_front(qsl("While reading file '%1'...").arg(customFile.fileName())); } - - QJsonDocument doc; - doc.setArray(shortcuts); - f.write(doc.toJson(QJsonDocument::Indented)); - f.close(); + } else if (customFile.open(QIODevice::WriteOnly)) { + const char *customContent = "\ +// This is a list of your own shortcuts for Telegram Desktop\n\ +// You can see full list of commands in the 'shortcuts-default.json' file\n\ +// Place a null value instead of a command string to switch the shortcut off\n\n\ +[\n\ + // {\n\ + // \"command\": \"close_telegram\",\n\ + // \"keys\": \"ctrl+f4\"\n\ + // },\n\ + // {\n\ + // \"command\": \"quit_telegram\",\n\ + // \"keys\": \"ctrl+q\"\n\ + // }\n\ +]\n"; + customFile.write(customContent); + customFile.close(); } } @@ -328,22 +441,26 @@ namespace Shortcuts { return DataPtr->errors; } - void launch(int shortcutId) { + bool launch(int shortcutId) { t_assert(DataPtr != nullptr); QMap::const_iterator it = DataPtr->handlers.constFind(shortcutId); - if (it != DataPtr->handlers.cend()) { - (*it.value())(); + if (it == DataPtr->handlers.cend()) { + return false; } + (*it.value())(); + return true; } - void launch(const QString &command) { + bool launch(const QString &command) { t_assert(DataPtr != nullptr); QMap::const_iterator it = DataPtr->commands.constFind(command); - if (it != DataPtr->commands.cend()) { - (*it.value())(); + if (it == DataPtr->commands.cend()) { + return false; } + (*it.value())(); + return true; } void finish() { diff --git a/Telegram/SourceFiles/shortcuts.h b/Telegram/SourceFiles/shortcuts.h index e90347898765f6..8d2483dd1588c6 100644 --- a/Telegram/SourceFiles/shortcuts.h +++ b/Telegram/SourceFiles/shortcuts.h @@ -25,8 +25,8 @@ namespace Shortcuts { void start(); const QStringList &errors(); - void launch(int shortcutId); - void launch(const QString &command); + bool launch(int shortcutId); + bool launch(const QString &command); void finish(); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 6817c6ac5aa298..96a9b0a4a01b59 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -1011,24 +1011,43 @@ QRect Window::iconRect() const { } bool Window::eventFilter(QObject *obj, QEvent *e) { - QEvent::Type t = e->type(); - if (t == QEvent::MouseButtonPress || t == QEvent::KeyPress || t == QEvent::TouchBegin || t == QEvent::Wheel) { + switch (e->type()) { + case QEvent::MouseButtonPress: + case QEvent::KeyPress: + case QEvent::TouchBegin: + case QEvent::Wheel: psUserActionDone(); - } else if (t == QEvent::MouseMove) { + break; + + case QEvent::MouseMove: if (main && main->isIdle()) { psUserActionDone(); main->checkIdleFinish(); } - } else if (t == QEvent::MouseButtonRelease) { + break; + + case QEvent::MouseButtonRelease: Ui::hideStickerPreview(); - } else if (t == QEvent::Shortcut) { - Shortcuts::launch(static_cast(e)->shortcutId()); - } - if (obj == Application::instance()) { - if (t == QEvent::ApplicationActivate) { + break; + + case QEvent::ShortcutOverride: // handle shortcuts ourselves + return true; + + case QEvent::Shortcut: + if (Shortcuts::launch(static_cast(e)->shortcutId())) { + return true; + } + break; + + case QEvent::ApplicationActivate: + if (obj == Application::instance()) { psUserActionDone(); QTimer::singleShot(1, this, SLOT(checkHistoryActivation())); - } else if (t == QEvent::FileOpen) { + } + break; + + case QEvent::FileOpen: + if (obj == Application::instance()) { QString url = static_cast(e)->url().toEncoded(); if (!url.trimmed().midRef(0, 5).compare(qsl("tg://"), Qt::CaseInsensitive)) { cSetStartUrl(url); @@ -1039,14 +1058,23 @@ bool Window::eventFilter(QObject *obj, QEvent *e) { } activate(); } - } else if (obj == this) { - if (t == QEvent::WindowStateChange) { + break; + + case QEvent::WindowStateChange: + if (obj == this) { Qt::WindowState state = (windowState() & Qt::WindowMinimized) ? Qt::WindowMinimized : ((windowState() & Qt::WindowMaximized) ? Qt::WindowMaximized : ((windowState() & Qt::WindowFullScreen) ? Qt::WindowFullScreen : Qt::WindowNoState)); stateChanged(state); - } else if (t == QEvent::Move || t == QEvent::Resize) { + } + break; + + case QEvent::Move: + case QEvent::Resize: + if (obj == this) { psUpdatedPosition(); } + break; } + return PsMainWindow::eventFilter(obj, e); } From 798f800913b2932bb86fbd4eea238102056e7e8a Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 14:58:30 +0300 Subject: [PATCH 122/133] History::dialogs and Histories::unread are private now, counting only chats from dialogs list to the badge --- Telegram/SourceFiles/apiwrap.cpp | 2 +- Telegram/SourceFiles/app.cpp | 2 +- Telegram/SourceFiles/dialogswidget.cpp | 32 ++++--- Telegram/SourceFiles/dialogswidget.h | 3 +- Telegram/SourceFiles/history.cpp | 110 ++++++++++++++++------- Telegram/SourceFiles/history.h | 91 +++++++++++++------ Telegram/SourceFiles/mainwidget.cpp | 8 +- Telegram/SourceFiles/pspecific_linux.cpp | 14 +-- Telegram/SourceFiles/pspecific_mac.cpp | 4 +- Telegram/SourceFiles/pspecific_wnd.cpp | 4 +- Telegram/SourceFiles/title.cpp | 4 +- Telegram/SourceFiles/types.h | 36 ++++++++ 12 files changed, 213 insertions(+), 97 deletions(-) diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp index 29550022599b20..78b74c727b06ff 100644 --- a/Telegram/SourceFiles/apiwrap.cpp +++ b/Telegram/SourceFiles/apiwrap.cpp @@ -273,7 +273,7 @@ void ApiWrap::gotChatFull(PeerData *peer, const MTPmessages_ChatFull &result, mt if (!h->isEmpty()) { h->clear(true); } - if (!hto->dialogs.isEmpty() && !h->dialogs.isEmpty()) { + if (hto->inChatList() && h->inChatList()) { App::removeDialog(h); } } diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index 521f923ad622d4..dc77d01e83c46d 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -522,7 +522,7 @@ namespace App { if (!h->isEmpty()) { h->clear(true); } - if (!hto->dialogs.isEmpty() && !h->dialogs.isEmpty()) { + if (hto->inChatList() && h->inChatList()) { App::removeDialog(h); } } diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index f7bf3298f7e60c..29d3437f0c5a4d 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -443,16 +443,12 @@ void DialogsInner::onDialogRowReplaced(DialogRow *oldRow, DialogRow *newRow) { } void DialogsInner::createDialog(History *history) { - bool creating = history->dialogs.isEmpty(); + bool creating = !history->inChatList(); if (creating) { - history->dialogs = dialogs.addToEnd(history); - contactsNoDialogs.del(history->peer, history->dialogs[0]); + DialogRow *mainRow = history->addToChatList(dialogs); + contactsNoDialogs.del(history->peer, mainRow); } - - History::DialogLinks links = history->dialogs; - int32 movedFrom = links[0]->pos * st::dlgHeight; - dialogs.adjustByPos(links); - int32 movedTo = links[0]->pos * st::dlgHeight; + RefPair(int32, movedFrom, int32, movedTo) = history->adjustByPosInChatsList(dialogs); emit dialogMoved(movedFrom, movedTo); @@ -471,8 +467,7 @@ void DialogsInner::removeDialog(History *history) { if (sel && sel->history == history) { sel = 0; } - dialogs.del(history->peer); - history->dialogs = History::DialogLinks(); + history->removeFromChatList(dialogs); history->clearNotifications(); if (App::wnd()) App::wnd()->notifyClear(history); if (contacts.list.rowByPeer.constFind(history->peer->id) != contacts.list.rowByPeer.cend()) { @@ -550,8 +545,8 @@ void DialogsInner::updateSelectedRow(PeerData *peer) { if (_state == DefaultState) { if (peer) { if (History *h = App::historyLoaded(peer->id)) { - if (h->dialogs.contains(0)) { - update(0, h->dialogs.value(0)->pos * st::dlgHeight, fullWidth(), st::dlgHeight); + if (h->inChatList()) { + update(0, h->posInChatList() * st::dlgHeight, fullWidth(), st::dlgHeight); } } } else if (sel) { @@ -1019,7 +1014,7 @@ void DialogsInner::addSavedPeersAfter(const QDateTime &date) { SavedPeersByTime &saved(cRefSavedPeersByTime()); while (!saved.isEmpty() && (date.isNull() || date < saved.lastKey())) { History *history = App::history(saved.last()->id); - history->setPosInDialogsDate(saved.lastKey()); + history->setChatsListDate(saved.lastKey()); contactsNoDialogs.del(history->peer); saved.remove(saved.lastKey(), saved.last()); } @@ -1074,8 +1069,11 @@ void DialogsInner::peopleReceived(const QString &query, const QVector & _peopleResults.reserve(people.size()); for (QVector::const_iterator i = people.cbegin(), e = people.cend(); i != e; ++i) { PeerId peerId = peerFromMTP(*i); - History *h = App::historyLoaded(peerId); - if (h && !h->dialogs.isEmpty()) continue; // skip dialogs + if (History *h = App::historyLoaded(peerId)) { + if (h->inChatList()) { + continue; // skip existing chats + } + } _peopleResults.push_back(App::peer(peerId)); } @@ -1786,11 +1784,11 @@ void DialogsWidget::activate() { } void DialogsWidget::createDialog(History *history) { - bool creating = history->dialogs.isEmpty(); + bool creating = !history->inChatList(); _inner.createDialog(history); if (creating && history->peer->migrateFrom()) { if (History *h = App::historyLoaded(history->peer->migrateFrom()->id)) { - if (!h->dialogs.isEmpty()) { + if (h->inChatList()) { removeDialog(h); } } diff --git a/Telegram/SourceFiles/dialogswidget.h b/Telegram/SourceFiles/dialogswidget.h index a535d2fa15426b..dfa643f5bda686 100644 --- a/Telegram/SourceFiles/dialogswidget.h +++ b/Telegram/SourceFiles/dialogswidget.h @@ -67,7 +67,6 @@ class DialogsInner : public SplittedWidget, public RPCSender { void selectSkipPage(int32 pixels, int32 direction); void createDialog(History *history); - void moveDialogToTop(const History::DialogLinks &links); void dlgUpdated(DialogRow *row); void dlgUpdated(History *row, MsgId msgId); void removeDialog(History *history); @@ -219,7 +218,7 @@ class DialogsWidget : public TWidget, public RPCSender { void contactsReceived(const MTPcontacts_Contacts &contacts); void searchReceived(DialogsSearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req); void peopleReceived(const MTPcontacts_Found &result, mtpRequestId req); - + void dragEnterEvent(QDragEnterEvent *e); void dragMoveEvent(QDragMoveEvent *e); void dragLeaveEvent(QDragLeaveEvent *e); diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 4dd68f6bfc7d97..4a69bdd3d3d473 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -294,7 +294,7 @@ History::History(const PeerId &peerId) : width(0), height(0) , sendRequestId(0) , textCachedFor(0) , lastItemTextCache(st::dlgRichMinWidth) -, posInDialogs(0) +, _sortKeyInChatList(0) , typingText(st::dlgRichMinWidth) { if (peer->isChannel() || (peer->isUser() && peer->asUser()->botInfo)) { outboxReadBefore = INT_MAX; @@ -367,7 +367,7 @@ bool History::updateTyping(uint64 ms, bool force) { } } if (changed && App::main()) { - if (!dialogs.isEmpty()) App::main()->dlgUpdated(dialogs[0]); + updateChatListEntry(); if (App::main()->historyPeer() == peer) { App::main()->topBar()->update(); } @@ -1180,7 +1180,7 @@ void DialogsIndexed::peerNameChanged(PeerData *peer, const PeerData::Names &oldN } } for (PeerData::NameFirstChars::const_iterator i = toRemove.cbegin(), e = toRemove.cend(); i != e; ++i) { - if (sortMode == DialogsSortByDate) history->dialogs.remove(*i); + if (sortMode == DialogsSortByDate) history->removeChatListEntryByLetter(*i); DialogsIndex::iterator j = index.find(*i); if (j != index.cend()) { j.value()->del(peer->id, mainRow); @@ -1191,11 +1191,8 @@ void DialogsIndexed::peerNameChanged(PeerData *peer, const PeerData::Names &oldN if (j == index.cend()) { j = index.insert(*i, new DialogsList(sortMode)); } - if (sortMode == DialogsSortByDate) { - history->dialogs.insert(*i, j.value()->addToEnd(history)); - } else { - j.value()->addToEnd(history); - } + DialogRow *row = j.value()->addToEnd(history); + if (sortMode == DialogsSortByDate) history->addChatListEntryByLetter(*i, row); } } } @@ -2175,16 +2172,10 @@ MsgId History::inboxRead(MsgId upTo) { if (!upTo) upTo = msgIdForRead(); inboxReadBefore = qMax(inboxReadBefore, upTo + 1); - if (App::main()) { - if (!dialogs.isEmpty()) { - App::main()->dlgUpdated(dialogs[0]); - } - if (peer->migrateTo()) { - if (History *h = App::historyLoaded(peer->migrateTo()->id)) { - if (!h->dialogs.isEmpty()) { - App::main()->dlgUpdated(h->dialogs[0]); - } - } + updateChatListEntry(); + if (peer->migrateTo()) { + if (History *h = App::historyLoaded(peer->migrateTo()->id)) { + h->updateChatListEntry(); } } @@ -2235,10 +2226,13 @@ void History::setUnreadCount(int32 newUnreadCount, bool psUpdate) { showFrom = 0; inboxReadBefore = qMax(inboxReadBefore, msgIdForRead() + 1); } - App::histories().unreadFull += newUnreadCount - unreadCount; - if (mute) App::histories().unreadMuted += newUnreadCount - unreadCount; + if (inChatList()) { + App::histories().unreadIncrement(newUnreadCount - unreadCount, mute); + if (psUpdate && (!mute || cIncludeMuted()) && App::wnd()) { + App::wnd()->updateCounter(); + } + } unreadCount = newUnreadCount; - if (psUpdate && (!mute || cIncludeMuted()) && App::wnd()) App::wnd()->updateCounter(); if (unreadBar) { int32 count = unreadCount; if (peer->migrateTo()) { @@ -2253,10 +2247,12 @@ void History::setUnreadCount(int32 newUnreadCount, bool psUpdate) { void History::setMute(bool newMute) { if (mute != newMute) { - App::histories().unreadMuted += newMute ? unreadCount : (-unreadCount); mute = newMute; - if (App::wnd()) App::wnd()->updateCounter(); - if (!dialogs.isEmpty() && App::main()) App::main()->dlgUpdated(dialogs[0]); + if (inChatList() && unreadCount) { + App::histories().unreadMuteChanged(unreadCount, newMute); + if (App::wnd()) App::wnd()->updateCounter(); + } + updateChatListEntry(); } } @@ -2420,25 +2416,25 @@ void History::setLastMessage(HistoryItem *msg) { if (msg) { if (!lastMsg) Local::removeSavedPeer(peer); lastMsg = msg; - setPosInDialogsDate(msg->date); + setChatsListDate(msg->date); } else { lastMsg = 0; } - if (!dialogs.isEmpty() && App::main()) App::main()->dlgUpdated(dialogs[0]); + updateChatListEntry(); } -void History::setPosInDialogsDate(const QDateTime &date) { - bool updateDialog = (App::main() && (!peer->isChannel() || peer->asChannel()->amIn() || !dialogs.isEmpty())); - if (peer->migrateTo() && dialogs.isEmpty()) { +void History::setChatsListDate(const QDateTime &date) { + bool updateDialog = (App::main() && (!peer->isChannel() || peer->asChannel()->amIn() || !_chatListLinks.isEmpty())); + if (peer->migrateTo() && _chatListLinks.isEmpty()) { updateDialog = false; } if (!lastMsgDate.isNull() && lastMsgDate >= date) { - if (!updateDialog || !dialogs.isEmpty()) { + if (!updateDialog || !_chatListLinks.isEmpty()) { return; } } lastMsgDate = date; - posInDialogs = dialogPosFromDate(lastMsgDate); + _sortKeyInChatList = dialogPosFromDate(lastMsgDate); if (updateDialog) { App::main()->createDialog(this); } @@ -2560,6 +2556,58 @@ void History::clear(bool leaveItems) { if (leaveItems && App::main()) App::main()->historyCleared(this); } +QPair History::adjustByPosInChatsList(DialogsIndexed &indexed) { + int32 movedFrom = _chatListLinks[0]->pos * st::dlgHeight; + indexed.adjustByPos(_chatListLinks); + int32 movedTo = _chatListLinks[0]->pos * st::dlgHeight; + return qMakePair(movedFrom, movedTo); +} + +DialogRow *History::addToChatList(DialogsIndexed &indexed) { + if (!inChatList()) { + _chatListLinks = indexed.addToEnd(this); + if (unreadCount) { + App::histories().unreadIncrement(unreadCount, mute); + if (App::wnd()) App::wnd()->updateCounter(); + } + } + t_assert(!_chatListLinks.isEmpty()); + return _chatListLinks[0]; +} + +void History::removeFromChatList(DialogsIndexed &indexed) { + if (inChatList()) { + indexed.del(peer); + _chatListLinks.clear(); + if (unreadCount) { + App::histories().unreadIncrement(-unreadCount, mute); + if (App::wnd()) App::wnd()->updateCounter(); + } + } +} + +void History::removeChatListEntryByLetter(QChar letter) { + t_assert(letter != 0); + if (inChatList()) { + _chatListLinks.remove(letter); + } +} + +void History::addChatListEntryByLetter(QChar letter, DialogRow *row) { + t_assert(letter != 0); + if (inChatList()) { + _chatListLinks.insert(letter, row); + } +} + +void History::updateChatListEntry() const { + if (MainWidget *m = App::main()) { + if (inChatList()) { + m->dlgUpdated(_chatListLinks[0]); + } + } +} + void History::overviewSliceDone(int32 overviewIndex, const MTPmessages_Messages &result, bool onlyCounts) { const QVector *v = 0; switch (result.type()) { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 8d80eb393a64ef..237670ecff87af 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -40,7 +40,7 @@ class Histories { typedef QHash Map; Map map; - Histories() : _a_typings(animation(this, &Histories::step_typings)), unreadFull(0), unreadMuted(0) { + Histories() : _a_typings(animation(this, &Histories::step_typings)), _unreadFull(0), _unreadMuted(0) { } void regSendAction(History *history, UserData *user, const MTPSendMessageAction &action); @@ -52,7 +52,7 @@ class Histories { void clear(); void remove(const PeerId &peer); ~Histories() { - unreadFull = unreadMuted = 0; + _unreadFull = _unreadMuted = 0; } HistoryItem *addNewMessage(const MTPMessage &msg, NewMessageType type); @@ -62,7 +62,29 @@ class Histories { TypingHistories typing; Animation _a_typings; - int32 unreadFull, unreadMuted; + int32 unreadBadge() const { + return _unreadFull - (cIncludeMuted() ? 0 : _unreadMuted); + } + bool unreadOnlyMuted() const { + return cIncludeMuted() ? (_unreadMuted >= _unreadFull) : false; + } + void unreadIncrement(int32 count, bool muted) { + _unreadFull += count; + if (muted) { + _unreadMuted += count; + } + } + void unreadMuteChanged(int32 count, bool muted) { + if (muted) { + _unreadMuted += count; + } else { + _unreadMuted -= count; + } + } + +private: + int32 _unreadFull, _unreadMuted; + }; class HistoryBlock; @@ -195,6 +217,7 @@ enum AddToOverviewMethod { AddToOverviewBack, // when new messages slice was received and it is the last one, we index all media }; +struct DialogsIndexed; class ChannelHistory; class History { public: @@ -264,9 +287,27 @@ class History { void getReadyFor(MsgId msgId, MsgId &fixInScrollMsgId, int32 &fixInScrollMsgTop); void setLastMessage(HistoryItem *msg); - void setPosInDialogsDate(const QDateTime &date); void fixLastMessage(bool wasAtBottom); + typedef QMap ChatListLinksMap; + void setChatsListDate(const QDateTime &date); + QPair adjustByPosInChatsList(DialogsIndexed &indexed); + uint64 sortKeyInChatList() const { + return _sortKeyInChatList; + } + bool inChatList() const { + return !_chatListLinks.isEmpty(); + } + int32 posInChatList() const { + t_assert(inChatList()); + return _chatListLinks[0]->pos; + } + DialogRow *addToChatList(DialogsIndexed &indexed); + void removeFromChatList(DialogsIndexed &indexed); + void removeChatListEntryByLetter(QChar letter); + void addChatListEntryByLetter(QChar letter, DialogRow *row); + void updateChatListEntry() const; + MsgId minMsgId() const; MsgId maxMsgId() const; MsgId msgIdForRead() const; @@ -345,10 +386,6 @@ class History { mutable const HistoryItem *textCachedFor; // cache mutable Text lastItemTextCache; - typedef QMap DialogLinks; - DialogLinks dialogs; - uint64 posInDialogs; // like ((unixtime) << 32) | (incremented counter) - typedef QMap TypingUsers; TypingUsers typing; typedef QMap SendActionUsers; @@ -395,6 +432,9 @@ class History { private: + ChatListLinksMap _chatListLinks; + uint64 _sortKeyInChatList; // like ((unixtime) << 32) | (incremented counter) + typedef QMap MediaOverviewIds; MediaOverviewIds overviewIds[OverviewCount]; int32 overviewCountData[OverviewCount]; // -1 - not loaded, 0 - all loaded, > 0 - count, but not all loaded @@ -632,15 +672,15 @@ struct DialogsList { if (sortMode != DialogsSortByDate) return; DialogRow *change = row; - if (change != begin && begin->history->posInDialogs < row->history->posInDialogs) { + if (change != begin && begin->history->sortKeyInChatList() < row->history->sortKeyInChatList()) { change = begin; - } else while (change->prev && change->prev->history->posInDialogs < row->history->posInDialogs) { + } else while (change->prev && change->prev->history->sortKeyInChatList() < row->history->sortKeyInChatList()) { change = change->prev; } if (!insertBefore(row, change)) { - if (change->next != end && end->prev->history->posInDialogs > row->history->posInDialogs) { + if (change->next != end && end->prev->history->sortKeyInChatList() > row->history->sortKeyInChatList()) { change = end->prev; - } else while (change->next != end && change->next->history->posInDialogs > row->history->posInDialogs) { + } else while (change->next != end && change->next->history->sortKeyInChatList() > row->history->sortKeyInChatList()) { change = change->next; } insertAfter(row, change); @@ -688,22 +728,19 @@ struct DialogsIndexed { DialogsIndexed(DialogsSortMode sortMode) : sortMode(sortMode), list(sortMode) { } - History::DialogLinks addToEnd(History *history) { - History::DialogLinks result; + History::ChatListLinksMap addToEnd(History *history) { + History::ChatListLinksMap result; DialogsList::RowByPeer::const_iterator i = list.rowByPeer.find(history->peer->id); - if (i != list.rowByPeer.cend()) { - return i.value()->history->dialogs; - } - - result.insert(0, list.addToEnd(history)); - for (PeerData::NameFirstChars::const_iterator i = history->peer->chars.cbegin(), e = history->peer->chars.cend(); i != e; ++i) { - DialogsIndex::iterator j = index.find(*i); - if (j == index.cend()) { - j = index.insert(*i, new DialogsList(sortMode)); + if (i == list.rowByPeer.cend()) { + result.insert(0, list.addToEnd(history)); + for (PeerData::NameFirstChars::const_iterator i = history->peer->chars.cbegin(), e = history->peer->chars.cend(); i != e; ++i) { + DialogsIndex::iterator j = index.find(*i); + if (j == index.cend()) { + j = index.insert(*i, new DialogsList(sortMode)); + } + result.insert(*i, j.value()->addToEnd(history)); } - result.insert(*i, j.value()->addToEnd(history)); } - return result; } @@ -724,8 +761,8 @@ struct DialogsIndexed { return res; } - void adjustByPos(const History::DialogLinks &links) { - for (History::DialogLinks::const_iterator i = links.cbegin(), e = links.cend(); i != e; ++i) { + void adjustByPos(const History::ChatListLinksMap &links) { + for (History::ChatListLinksMap::const_iterator i = links.cbegin(), e = links.cend(); i != e; ++i) { if (i.key() == QChar(0)) { list.adjustByPos(i.value()); } else { diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 6c588c6194fe34..735892f4d2a072 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -785,8 +785,8 @@ void MainWidget::notify_clipStopperHidden(ClipStopperType type) { void MainWidget::ui_repaintHistoryItem(const HistoryItem *item) { history.ui_repaintHistoryItem(item); - if (!item->history()->dialogs.isEmpty() && item->history()->lastMsg == item) { - dialogs.dlgUpdated(item->history()->dialogs[0]); + if (item->history()->lastMsg == item) { + item->history()->updateChatListEntry(); } if (overview) overview->ui_repaintHistoryItem(item); } @@ -4246,9 +4246,7 @@ void MainWidget::feedUpdate(const MTPUpdate &update) { if (h->lastMsg && h->lastMsg->out() && h->lastMsg->id <= d.vmax_id.v) { dlgUpdated(h, h->lastMsg->id); } - if (!h->dialogs.isEmpty()) { - dlgUpdated(h->dialogs[0]); - } + h->updateChatListEntry(); } ptsApplySkippedUpdates(); diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index b734e9f0b6e100..7221645bc6f8fc 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -250,8 +250,8 @@ namespace { #define GTK_ALPHA 3 QImage _trayIconImageGen() { - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted), counterSlice = (counter >= 1000) ? (1000 + (counter % 100)) : counter; - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + int32 counter = App::histories().unreadBadge(), counterSlice = (counter >= 1000) ? (1000 + (counter % 100)) : counter; + bool muted = App::histories().unreadOnlyMuted(); if (_trayIconImage.isNull() || _trayIconImage.width() != _trayIconSize || muted != _trayIconMuted || counterSlice != _trayIconCount) { if (_trayIconImageBack.isNull() || _trayIconImageBack.width() != _trayIconSize) { _trayIconImageBack = App::wnd()->iconLarge().scaled(_trayIconSize, _trayIconSize, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); @@ -286,8 +286,8 @@ namespace { } QString _trayIconImageFile() { - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted), counterSlice = (counter >= 1000) ? (1000 + (counter % 100)) : counter; - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + int32 counter = App::histories().unreadBadge(), counterSlice = (counter >= 1000) ? (1000 + (counter % 100)) : counter; + bool muted = App::histories().unreadOnlyMuted(); QString name = cWorkingDir() + qsl("tdata/ticons/ico%1_%2_%3.png").arg(muted ? "mute" : "").arg(_trayIconSize).arg(counterSlice); QFileInfo info(name); @@ -621,7 +621,7 @@ void PsMainWindow::psUpdateIndicator() { void PsMainWindow::psUpdateCounter() { setWindowIcon(wndIcon); - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); + int32 counter = App::histories().unreadBadge(); setWindowTitle((counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram")); if (_psUnityLauncherEntry) { @@ -645,8 +645,8 @@ void PsMainWindow::psUpdateCounter() { ps_gtk_status_icon_set_from_pixbuf(_trayIcon, _trayPixbuf); } } else if (trayIcon) { - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + int32 counter = App::histories().unreadBadge(); + bool muted = App::histories().unreadOnlyMuted(); style::color bg = muted ? st::counterMuteBG : st::counterBG; QIcon iconSmall; diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 7f2cf9508261cf..2f8971696f5c19 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -176,7 +176,7 @@ void _placeCounter(QImage &img, int size, int count, style::color bg, style::col } void PsMainWindow::psUpdateCounter() { - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); + int32 counter = App::histories().unreadBadge(); setWindowTitle((counter > 0) ? qsl("Telegram (%1)").arg(counter) : qsl("Telegram")); setWindowIcon(wndIcon); @@ -185,7 +185,7 @@ void PsMainWindow::psUpdateCounter() { _private.setWindowBadge(counter ? cnt : QString()); if (trayIcon) { - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + bool muted = App::histories().unreadOnlyMuted(); bool dm = objc_darkMode(); style::color bg = muted ? st::counterMuteBG : st::counterBG; diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 02077ba67445dc..6b91561ebaa3e6 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -1133,8 +1133,8 @@ static HICON _qt_createHIcon(const QIcon &icon, int xSize, int ySize) { } void PsMainWindow::psUpdateCounter() { - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + int32 counter = App::histories().unreadBadge(); + bool muted = App::histories().unreadOnlyMuted(); style::color bg = muted ? st::counterMuteBG : st::counterBG; QIcon iconSmall, iconBig; diff --git a/Telegram/SourceFiles/title.cpp b/Telegram/SourceFiles/title.cpp index 2bc52abc63804a..28069d257bdb00 100644 --- a/Telegram/SourceFiles/title.cpp +++ b/Telegram/SourceFiles/title.cpp @@ -266,8 +266,8 @@ void TitleWidget::updateAdaptiveLayout() { void TitleWidget::updateCounter() { if (!Adaptive::OneColumn() || !MTP::authedId()) return; - int32 counter = App::histories().unreadFull - (cIncludeMuted() ? 0 : App::histories().unreadMuted); - bool muted = cIncludeMuted() ? (App::histories().unreadMuted >= counter) : false; + int32 counter = App::histories().unreadBadge(); + bool muted = App::histories().unreadOnlyMuted(); style::color bg = muted ? st::counterMuteBG : st::counterBG; diff --git a/Telegram/SourceFiles/types.h b/Telegram/SourceFiles/types.h index 2814ce5ccb2afe..68d6864ced02a8 100644 --- a/Telegram/SourceFiles/types.h +++ b/Telegram/SourceFiles/types.h @@ -554,6 +554,42 @@ static int32 QuarterArcLength = (FullArcLength / 4); static int32 MinArcLength = (FullArcLength / 360); static int32 AlmostFullArcLength = (FullArcLength - MinArcLength); +template +class RefPairImplementation { +public: + template + const RefPairImplementation &operator=(const RefPairImplementation &other) const { + _first = other._first; + _second = other._second; + return *this; + } + + template + const RefPairImplementation &operator=(const QPair &other) const { + _first = other.first; + _second = other.second; + return *this; + } + +private: + RefPairImplementation(T1 &first, T2 &second) : _first(first), _second(second) { + } + RefPairImplementation(const RefPairImplementation &other); + + template + friend RefPairImplementation RefPairCreator(T3 &first, T4 &second); + + T1 &_first; + T2 &_second; +}; + +template +inline RefPairImplementation RefPairCreator(T1 &first, T2 &second) { + return RefPairImplementation(first, second); +} + +#define RefPair(Type1, Name1, Type2, Name2) Type1 Name1; Type2 Name2; RefPairCreator(Name1, Name2) + template inline void destroyImplementation(I *&ptr) { if (ptr) { From b678913da539ca7ea3759d1991620e8c65a62ee1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 15:36:23 +0300 Subject: [PATCH 123/133] improved rpcClear() when deleting a complex RPCSender, clearing recent inline bots on logout --- Telegram/SourceFiles/app.cpp | 1 + Telegram/SourceFiles/dialogswidget.h | 5 +++++ Telegram/SourceFiles/historywidget.h | 4 ++-- Telegram/SourceFiles/intro/intro.cpp | 10 +++++----- Telegram/SourceFiles/intro/intro.h | 4 ++-- Telegram/SourceFiles/intro/intropwdcheck.h | 2 +- Telegram/SourceFiles/intro/introsteps.h | 1 - Telegram/SourceFiles/mainwidget.cpp | 12 ++++++------ Telegram/SourceFiles/mainwidget.h | 13 +++++++++++-- Telegram/SourceFiles/mtproto/mtp.cpp | 2 +- Telegram/SourceFiles/mtproto/mtpFileLoader.h | 2 +- Telegram/SourceFiles/mtproto/mtpRPC.h | 14 ++++++++++---- Telegram/SourceFiles/overviewwidget.h | 16 ++++++++++------ Telegram/SourceFiles/profilewidget.h | 12 ++++++++---- Telegram/SourceFiles/settingswidget.cpp | 4 ++-- Telegram/SourceFiles/settingswidget.h | 2 +- Telegram/SourceFiles/structs.cpp | 6 +++--- Telegram/SourceFiles/window.cpp | 10 +++++----- 18 files changed, 74 insertions(+), 46 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index dc77d01e83c46d..e88ba331c41303 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -1843,6 +1843,7 @@ namespace App { updatedPeers.clear(); cSetSavedPeers(SavedPeers()); cSetSavedPeersByTime(SavedPeersByTime()); + cSetRecentInlineBots(RecentInlineBots()); for (PeersData::const_iterator i = peersData.cbegin(), e = peersData.cend(); i != e; ++i) { delete *i; } diff --git a/Telegram/SourceFiles/dialogswidget.h b/Telegram/SourceFiles/dialogswidget.h index dfa643f5bda686..6443a08d6022cd 100644 --- a/Telegram/SourceFiles/dialogswidget.h +++ b/Telegram/SourceFiles/dialogswidget.h @@ -259,6 +259,11 @@ class DialogsWidget : public TWidget, public RPCSender { void updateNotifySettings(PeerData *peer); + void rpcClear() override { + _inner.rpcClear(); + RPCSender::rpcClear(); + } + void notify_userIsContactChanged(UserData *user, bool fromThisApp); signals: diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 2a4b49fe9508cd..786de935307286 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -569,12 +569,12 @@ class HistoryWidget : public TWidget, public RPCSender { bool contentOverlapped(const QRect &globalRect); - void grabStart() { + void grabStart() override { _sideShadow.hide(); _inGrab = true; resizeEvent(0); } - void grabFinish() { + void grabFinish() override { _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); diff --git a/Telegram/SourceFiles/intro/intro.cpp b/Telegram/SourceFiles/intro/intro.cpp index c62b8d55cb86f1..ec2c1bafde179e 100644 --- a/Telegram/SourceFiles/intro/intro.cpp +++ b/Telegram/SourceFiles/intro/intro.cpp @@ -428,11 +428,11 @@ void IntroWidget::keyPressEvent(QKeyEvent *e) { void IntroWidget::updateAdaptiveLayout() { } -void IntroWidget::rpcInvalidate() { - if (phone) phone->rpcInvalidate(); - if (code) code->rpcInvalidate(); - if (signup) signup->rpcInvalidate(); - if (pwdcheck) pwdcheck->rpcInvalidate(); +void IntroWidget::rpcClear() { + if (phone) phone->rpcClear(); + if (code) code->rpcClear(); + if (signup) signup->rpcClear(); + if (pwdcheck) pwdcheck->rpcClear(); } IntroWidget::~IntroWidget() { diff --git a/Telegram/SourceFiles/intro/intro.h b/Telegram/SourceFiles/intro/intro.h index 7ce176f0cae3e4..bec0f7eb0832f9 100644 --- a/Telegram/SourceFiles/intro/intro.h +++ b/Telegram/SourceFiles/intro/intro.h @@ -29,7 +29,7 @@ class IntroPwdCheck; class IntroStage; class Text; -class IntroWidget : public TWidget { +class IntroWidget final : public TWidget { Q_OBJECT public: @@ -71,7 +71,7 @@ class IntroWidget : public TWidget { void finish(const MTPUser &user, const QImage &photo = QImage()); - void rpcInvalidate(); + void rpcClear(); void langChangeTo(int32 langId); ~IntroWidget(); diff --git a/Telegram/SourceFiles/intro/intropwdcheck.h b/Telegram/SourceFiles/intro/intropwdcheck.h index 5f29c9b3c5c67b..9a0d1c1f693d0c 100644 --- a/Telegram/SourceFiles/intro/intropwdcheck.h +++ b/Telegram/SourceFiles/intro/intropwdcheck.h @@ -25,7 +25,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "gui/flatinput.h" #include "intro.h" -class IntroPwdCheck : public IntroStage, public RPCSender { +class IntroPwdCheck final : public IntroStage, public RPCSender { Q_OBJECT public: diff --git a/Telegram/SourceFiles/intro/introsteps.h b/Telegram/SourceFiles/intro/introsteps.h index 4522f46622931e..e554f11fb934a6 100644 --- a/Telegram/SourceFiles/intro/introsteps.h +++ b/Telegram/SourceFiles/intro/introsteps.h @@ -20,7 +20,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -#include #include "gui/flatbutton.h" #include "intro.h" diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 735892f4d2a072..1cd34b51dff5f5 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -2240,14 +2240,14 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, bool bac profile->hide(); profile->clear(); profile->deleteLater(); - profile->rpcInvalidate(); + profile->rpcClear(); profile = 0; } if (overview) { overview->hide(); overview->clear(); overview->deleteLater(); - overview->rpcInvalidate(); + overview->rpcClear(); overview = 0; } clearBotStartToken(_peerInStack); @@ -2390,13 +2390,13 @@ void MainWidget::showMediaOverview(PeerData *peer, MediaOverviewType type, bool overview->hide(); overview->clear(); overview->deleteLater(); - overview->rpcInvalidate(); + overview->rpcClear(); } if (profile) { profile->hide(); profile->clear(); profile->deleteLater(); - profile->rpcInvalidate(); + profile->rpcClear(); profile = 0; } overview = new OverviewWidget(this, peer, type); @@ -2446,14 +2446,14 @@ void MainWidget::showPeerProfile(PeerData *peer, bool back, int32 lastScrollTop) overview->hide(); overview->clear(); overview->deleteLater(); - overview->rpcInvalidate(); + overview->rpcClear(); overview = 0; } if (profile) { profile->hide(); profile->clear(); profile->deleteLater(); - profile->rpcInvalidate(); + profile->rpcClear(); } profile = new ProfileWidget(this, peer); _topBar.show(); diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 7f417acbc0b1c8..660793df49dc6f 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -59,10 +59,10 @@ class TopBarWidget : public TWidget { FlatButton *mediaTypeButton(); - void grabStart() { + void grabStart() override { _sideShadow.hide(); } - void grabFinish() { + void grabFinish() override { _sideShadow.setVisible(!Adaptive::OneColumn()); } @@ -417,6 +417,15 @@ class MainWidget : public TWidget, public RPCSender { QPixmap grabTopBar(); QPixmap grabInner(); + void rpcClear() override { + history.rpcClear(); + dialogs.rpcClear(); + if (profile) profile->rpcClear(); + if (overview) overview->rpcClear(); + if (_api) _api->rpcClear(); + RPCSender::rpcClear(); + } + bool isItemVisible(HistoryItem *item); void ui_repaintHistoryItem(const HistoryItem *item); diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 7b834ce5118b74..781e6f2ff43ba0 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -154,7 +154,7 @@ namespace { bool onErrorDefault(mtpRequestId requestId, const RPCError &error) { const QString &err(error.type()); int32 code = error.code(); - if (!mtpIsFlood(error)) { + if (!mtpIsFlood(error) && err != qsl("AUTH_KEY_UNREGISTERED")) { int breakpoint = 0; } bool badGuestDC = (code == 400) && (err == qsl("FILE_ID_INVALID")); diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.h b/Telegram/SourceFiles/mtproto/mtpFileLoader.h index 9446c979b5a689..f64ac4d456d458 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.h +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.h @@ -236,7 +236,7 @@ class mtpFileLoader : public FileLoader, public RPCSender { } virtual void stop() { - rpcInvalidate(); + rpcClear(); } ~mtpFileLoader(); diff --git a/Telegram/SourceFiles/mtproto/mtpRPC.h b/Telegram/SourceFiles/mtproto/mtpRPC.h index c12f4c3f5936da..09b13781ad35aa 100644 --- a/Telegram/SourceFiles/mtproto/mtpRPC.h +++ b/Telegram/SourceFiles/mtproto/mtpRPC.h @@ -791,6 +791,16 @@ class RPCSender { return RPCFailHandlerPtr(new RPCBindedFailHandlerOwnedNo(b, static_cast(this), onFail)); } + virtual void rpcClear() { + rpcInvalidate(); + } + + virtual ~RPCSender() { + rpcInvalidate(); + } + +protected: + void rpcInvalidate() { for (DoneHandlers::iterator i = _rpcDoneHandlers.begin(), e = _rpcDoneHandlers.end(); i != e; ++i) { (*i)->invalidate(); @@ -802,10 +812,6 @@ class RPCSender { _rpcFailHandlers.clear(); } - ~RPCSender() { - rpcInvalidate(); - } - }; typedef void (*MTPStateChangedHandler)(int32 dcId, int32 state); diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index f06da8a25460ae..968ccd773b1319 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -71,7 +71,7 @@ class OverviewInner : public QWidget, public AbstractTooltipShower, public RPCSe void changingMsgId(HistoryItem *row, MsgId newId); void repaintItem(const HistoryItem *msg); void itemRemoved(HistoryItem *item); - + void getSelectionState(int32 &selectedForForward, int32 &selectedForDelete) const; void clearSelectedItems(bool onlyTextSelection = false); void fillSelectedItems(SelectedItemSet &sel, bool forDelete = true); @@ -146,7 +146,7 @@ public slots: bool _reversed; History *_migrated, *_history; ChannelId _channel; - + bool _selMode; uint32 itemSelectedValue(int32 index) const; @@ -275,30 +275,34 @@ class OverviewWidget : public TWidget, public RPCSender { void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); void changingMsgId(HistoryItem *row, MsgId newId); void itemRemoved(HistoryItem *item); - + QPoint clampMousePosition(QPoint point); void checkSelectingScroll(QPoint point); void noSelectingScroll(); bool touchScroll(const QPoint &delta); - + void fillSelectedItems(SelectedItemSet &sel, bool forDelete); void updateScrollColors(); void updateAfterDrag(); - void grabStart() { + void grabStart() override { _sideShadow.hide(); _inGrab = true; resizeEvent(0); } - void grabFinish() { + void grabFinish() override { _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); } + void rpcClear() override { + _inner.rpcClear(); + RPCSender::rpcClear(); + } void ui_repaintHistoryItem(const HistoryItem *item); diff --git a/Telegram/SourceFiles/profilewidget.h b/Telegram/SourceFiles/profilewidget.h index 73fcf2f2419258..89da54afb0bc12 100644 --- a/Telegram/SourceFiles/profilewidget.h +++ b/Telegram/SourceFiles/profilewidget.h @@ -48,7 +48,7 @@ class ProfileInner : public TWidget, public RPCSender { PeerData *peer() const; bool allMediaShown() const; - + void updateOnlineDisplay(); void updateOnlineDisplayTimer(); void reorderParticipants(); @@ -65,7 +65,7 @@ class ProfileInner : public TWidget, public RPCSender { void allowDecreaseHeight(int32 decreaseBy); ~ProfileInner(); - + public slots: void peerUpdated(PeerData *data); @@ -247,16 +247,20 @@ class ProfileWidget : public TWidget, public RPCSender { void mediaOverviewUpdated(PeerData *peer, MediaOverviewType type); void updateAdaptiveLayout(); - void grabStart() { + void grabStart() override { _sideShadow.hide(); _inGrab = true; resizeEvent(0); } - void grabFinish() { + void grabFinish() override { _sideShadow.setVisible(!Adaptive::OneColumn()); _inGrab = false; resizeEvent(0); } + void rpcClear() override { + _inner.rpcClear(); + RPCSender::rpcClear(); + } void clear(); ~ProfileWidget(); diff --git a/Telegram/SourceFiles/settingswidget.cpp b/Telegram/SourceFiles/settingswidget.cpp index 89e0925c5eb3fb..a6c0b8d8877d64 100644 --- a/Telegram/SourceFiles/settingswidget.cpp +++ b/Telegram/SourceFiles/settingswidget.cpp @@ -1945,8 +1945,8 @@ void SettingsWidget::updateConnectionType() { _inner.updateConnectionType(); } -void SettingsWidget::rpcInvalidate() { - _inner.rpcInvalidate(); +void SettingsWidget::rpcClear() { + _inner.rpcClear(); } void SettingsWidget::usernameChanged() { diff --git a/Telegram/SourceFiles/settingswidget.h b/Telegram/SourceFiles/settingswidget.h index 65e222fcb39d58..d2ed56902ddd2c 100644 --- a/Telegram/SourceFiles/settingswidget.h +++ b/Telegram/SourceFiles/settingswidget.h @@ -330,7 +330,7 @@ class SettingsWidget : public TWidget { void updateDisplayNotify(); - void rpcInvalidate(); + void rpcClear(); void usernameChanged(); void setInnerFocus(); diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 0ce99caad25a34..3664b9bf0520cf 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -1203,7 +1203,7 @@ bool DocumentData::loaded(bool check) const { if (loading() && _loader->done()) { if (_loader->fileType() == mtpc_storage_fileUnknown) { _loader->deleteLater(); - _loader->rpcInvalidate(); + _loader->rpcClear(); _loader = CancelledMtpFileLoader; } else { DocumentData *that = const_cast(this); @@ -1214,7 +1214,7 @@ bool DocumentData::loaded(bool check) const { } _loader->deleteLater(); - _loader->rpcInvalidate(); + _loader->rpcClear(); _loader = 0; } notifyLayoutChanged(); @@ -1296,7 +1296,7 @@ void DocumentData::cancel() { if (l) { l->cancel(); l->deleteLater(); - l->rpcInvalidate(); + l->rpcClear(); notifyLayoutChanged(); } diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index 96a9b0a4a01b59..c3ecdbd686bd4f 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -504,21 +504,21 @@ void Window::clearWidgets() { settings->stop_show(); settings->hide(); settings->deleteLater(); - settings->rpcInvalidate(); + settings->rpcClear(); settings = 0; } if (main) { main->animStop_show(); main->hide(); main->deleteLater(); - main->rpcInvalidate(); + main->rpcClear(); main = 0; } if (intro) { intro->stop_show(); intro->hide(); intro->deleteLater(); - intro->rpcInvalidate(); + intro->rpcClear(); intro = 0; } title->updateBackButton(); @@ -724,7 +724,7 @@ void Window::hideSettings(bool fast) { settings->stop_show(); settings->hide(); settings->deleteLater(); - settings->rpcInvalidate(); + settings->rpcClear(); settings = 0; if (intro) { intro->show(); @@ -737,7 +737,7 @@ void Window::hideSettings(bool fast) { settings->stop_show(); settings->hide(); settings->deleteLater(); - settings->rpcInvalidate(); + settings->rpcClear(); settings = 0; if (intro) { intro->animShow(bg, true); From 5b345cbc2dfc8e67701ef560882b24994662797e Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 16:23:03 +0300 Subject: [PATCH 124/133] some asserts added to imagePix() --- Telegram/SourceFiles/gui/images.cpp | 25 +++++++++++++++++++++++-- Telegram/SourceFiles/layout.cpp | 3 +-- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/gui/images.cpp b/Telegram/SourceFiles/gui/images.cpp index 8bebc9ddf0cf33..eda12110312a84 100644 --- a/Telegram/SourceFiles/gui/images.cpp +++ b/Telegram/SourceFiles/gui/images.cpp @@ -264,6 +264,7 @@ QImage imageBlur(QImage img) { QImage::Format fmt = img.format(); if (fmt != QImage::Format_RGB32 && fmt != QImage::Format_ARGB32_Premultiplied) { img = img.convertToFormat(QImage::Format_ARGB32_Premultiplied); + t_assert(!img.isNull()); } uchar *pix = img.bits(); @@ -287,6 +288,8 @@ QImage imageBlur(QImage img) { QImage was = img; img = imgsmall; imgsmall = QImage(); + t_assert(!img.isNull()); + pix = img.bits(); if (!pix) return was; } @@ -373,12 +376,18 @@ yi += stride; } void imageRound(QImage &img) { + t_assert(!img.isNull()); + img.setDevicePixelRatio(cRetinaFactor()); img = img.convertToFormat(QImage::Format_ARGB32_Premultiplied); + t_assert(!img.isNull()); QImage **masks = App::cornersMask(); int32 w = masks[0]->width(), h = masks[0]->height(); int32 tw = img.width(), th = img.height(); + if (tw < 2 * w || th < 2 * h) { + return; + } uchar *bits = img.bits(); const uchar *c0 = masks[0]->constBits(), *c1 = masks[1]->constBits(), *c2 = masks[2]->constBits(), *c3 = masks[3]->constBits(); @@ -427,12 +436,18 @@ QImage imageColored(const style::color &add, QImage img) { } QPixmap imagePix(QImage img, int32 w, int32 h, bool smooth, bool blurred, bool rounded, int32 outerw, int32 outerh) { - if (blurred) img = imageBlur(img); + t_assert(!img.isNull()); + if (blurred) { + img = imageBlur(img); + t_assert(!img.isNull()); + } if (w <= 0 || (w == img.width() && (h <= 0 || h == img.height()))) { } else if (h <= 0) { img = img.scaledToWidth(w, smooth ? Qt::SmoothTransformation : Qt::FastTransformation); + t_assert(!img.isNull()); } else { img = img.scaled(w, h, Qt::IgnoreAspectRatio, smooth ? Qt::SmoothTransformation : Qt::FastTransformation); + t_assert(!img.isNull()); } if (outerw > 0 && outerh > 0) { outerw *= cIntRetinaFactor(); @@ -449,9 +464,13 @@ QPixmap imagePix(QImage img, int32 w, int32 h, bool smooth, bool blurred, bool r p.drawImage((result.width() - img.width()) / (2 * cIntRetinaFactor()), (result.height() - img.height()) / (2 * cIntRetinaFactor()), img); } img = result; + t_assert(!img.isNull()); } } - if (rounded) imageRound(img); + if (rounded) { + imageRound(img); + t_assert(!img.isNull()); + } img.setDevicePixelRatio(cRetinaFactor()); return QPixmap::fromImage(img, Qt::ColorOnly); } @@ -459,6 +478,7 @@ QPixmap imagePix(QImage img, int32 w, int32 h, bool smooth, bool blurred, bool r QPixmap Image::pixNoCache(int32 w, int32 h, bool smooth, bool blurred, bool rounded, int32 outerw, int32 outerh) const { if (!loading()) const_cast(this)->load(); restore(); + if (_data.isNull()) { if (h <= 0 && height() > 0) { h = qRound(width() * w / float64(height())); @@ -489,6 +509,7 @@ QPixmap Image::pixNoCache(int32 w, int32 h, bool smooth, bool blurred, bool roun if (rounded) imageRound(result); return QPixmap::fromImage(result, Qt::ColorOnly); } + return imagePix(_data.toImage(), w, h, smooth, blurred, rounded, outerw, outerh); } diff --git a/Telegram/SourceFiles/layout.cpp b/Telegram/SourceFiles/layout.cpp index fb5bbe3c1f625c..31605b763c7051 100644 --- a/Telegram/SourceFiles/layout.cpp +++ b/Telegram/SourceFiles/layout.cpp @@ -422,8 +422,7 @@ void LayoutOverviewVideo::paint(Painter &p, const QRect &clip, uint32 selection, if (_thumbLoaded && !_data->thumb->isNull()) { int32 size = _width * cIntRetinaFactor(); - QImage img = _data->thumb->pix().toImage(); - img = imageBlur(img); + QImage img = imageBlur(_data->thumb->pix().toImage()); if (img.width() == img.height()) { if (img.width() != size) { img = img.scaled(size, size, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation); From 0e49c1396874da9a5fe899197ba6bd3d73764ae4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 16:54:04 +0300 Subject: [PATCH 125/133] rpcClear for mediaview, ImageLink changed to Location --- Telegram/SourceFiles/app.cpp | 27 ++--- Telegram/SourceFiles/app.h | 3 +- Telegram/SourceFiles/gui/text.cpp | 4 +- Telegram/SourceFiles/gui/text.h | 22 +++- Telegram/SourceFiles/history.cpp | 127 +++++++++-------------- Telegram/SourceFiles/history.h | 39 +++---- Telegram/SourceFiles/pspecific_linux.cpp | 2 +- Telegram/SourceFiles/pspecific_linux.h | 2 +- Telegram/SourceFiles/pspecific_mac.cpp | 4 +- Telegram/SourceFiles/pspecific_mac.h | 2 +- Telegram/SourceFiles/pspecific_wnd.cpp | 4 +- Telegram/SourceFiles/pspecific_wnd.h | 2 +- Telegram/SourceFiles/window.cpp | 6 ++ 13 files changed, 108 insertions(+), 136 deletions(-) diff --git a/Telegram/SourceFiles/app.cpp b/Telegram/SourceFiles/app.cpp index e88ba331c41303..d434bc26ea9834 100644 --- a/Telegram/SourceFiles/app.cpp +++ b/Telegram/SourceFiles/app.cpp @@ -49,8 +49,8 @@ namespace { PhotosData photosData; DocumentsData documentsData; - typedef QHash ImageLinksData; - ImageLinksData imageLinksData; + typedef QHash LocationsData; + LocationsData locationsData; typedef QHash WebPagesData; WebPagesData webPagesData; @@ -1671,27 +1671,14 @@ namespace App { return result; } - ImageLinkData *imageLink(const QString &imageLink) { - ImageLinksData::const_iterator i = imageLinksData.constFind(imageLink); - if (i == imageLinksData.cend()) { - i = imageLinksData.insert(imageLink, new ImageLinkData(imageLink)); + LocationData *location(const LocationCoords &coords) { + LocationsData::const_iterator i = locationsData.constFind(coords); + if (i == locationsData.cend()) { + i = locationsData.insert(coords, new LocationData(coords)); } return i.value(); } - ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type) { - ImageLinksData::const_iterator i = imageLinksData.constFind(imageLink); - ImageLinkData *result; - if (i == imageLinksData.cend()) { - result = new ImageLinkData(imageLink); - imageLinksData.insert(imageLink, result); - result->type = type; - } else { - result = i.value(); - } - return result; - } - void forgetMedia() { lastPhotos.clear(); lastPhotosMap.clear(); @@ -1701,7 +1688,7 @@ namespace App { for (DocumentsData::const_iterator i = ::documentsData.cbegin(), e = ::documentsData.cend(); i != e; ++i) { i.value()->forget(); } - for (ImageLinksData::const_iterator i = imageLinksData.cbegin(), e = imageLinksData.cend(); i != e; ++i) { + for (LocationsData::const_iterator i = ::locationsData.cbegin(), e = ::locationsData.cend(); i != e; ++i) { i.value()->thumb->forget(); } } diff --git a/Telegram/SourceFiles/app.h b/Telegram/SourceFiles/app.h index a23c92c39a93cb..b206d462e4011e 100644 --- a/Telegram/SourceFiles/app.h +++ b/Telegram/SourceFiles/app.h @@ -134,8 +134,7 @@ namespace App { DocumentData *documentSet(const DocumentId &document, DocumentData *convert, const uint64 &access, int32 date, const QVector &attributes, const QString &mime, const ImagePtr &thumb, int32 dc, int32 size, const StorageImageLocation &thumbLocation); WebPageData *webPage(const WebPageId &webPage); WebPageData *webPageSet(const WebPageId &webPage, WebPageData *convert, const QString &, const QString &url, const QString &displayUrl, const QString &siteName, const QString &title, const QString &description, PhotoData *photo, DocumentData *doc, int32 duration, const QString &author, int32 pendingTill); - ImageLinkData *imageLink(const QString &imageLink); - ImageLinkData *imageLinkSet(const QString &imageLink, ImageLinkType type); + LocationData *location(const LocationCoords &coords); void forgetMedia(); MTPPhoto photoFromUserPhoto(MTPint userId, MTPint date, const MTPUserProfilePhoto &photo); diff --git a/Telegram/SourceFiles/gui/text.cpp b/Telegram/SourceFiles/gui/text.cpp index 958401f1fcf135..591a6d782f3f91 100644 --- a/Telegram/SourceFiles/gui/text.cpp +++ b/Telegram/SourceFiles/gui/text.cpp @@ -955,13 +955,13 @@ void CustomTextLink::onClick(Qt::MouseButton button) const { } void LocationLink::onClick(Qt::MouseButton button) const { - if (!psLaunchMaps(_lat, _lon)) { + if (!psLaunchMaps(_coords)) { QDesktopServices::openUrl(_text); } } void LocationLink::setup() { - QString latlon = _lat + ',' + _lon; + QString latlon(qsl("%1,%2").arg(_coords.lat).arg(_coords.lon)); _text = qsl("https://maps.google.com/maps?q=") + latlon + qsl("&ll=") + latlon + qsl("&z=16"); } diff --git a/Telegram/SourceFiles/gui/text.h b/Telegram/SourceFiles/gui/text.h index 7e270d81e9afa1..944d83fff9deff 100644 --- a/Telegram/SourceFiles/gui/text.h +++ b/Telegram/SourceFiles/gui/text.h @@ -424,12 +424,29 @@ class EmailLink : public ITextLink { }; +struct LocationCoords { + LocationCoords() : lat(0), lon(0) { + } + LocationCoords(float64 lat, float64 lon) : lat(lat), lon(lon) { + } + float64 lat, lon; +}; +inline bool operator==(const LocationCoords &a, const LocationCoords &b) { + return (a.lat == b.lat) && (a.lon == b.lon); +} +inline bool operator<(const LocationCoords &a, const LocationCoords &b) { + return (a.lat < b.lat) || ((a.lat == b.lat) && (a.lon < b.lon)); +} +inline uint qHash(const LocationCoords &t, uint seed = 0) { + return qHash(QtPrivate::QHashCombine().operator()(qHash(t.lat), t.lon), seed); +} + class LocationLink : public ITextLink { TEXT_LINK_CLASS(LocationLink) public: - LocationLink(const QString &lat, const QString &lon) : _lat(lat), _lon(lon) { + LocationLink(const LocationCoords &coords) : _coords(coords) { setup(); } @@ -450,7 +467,8 @@ class LocationLink : public ITextLink { private: void setup(); - QString _lat, _lon, _text; + LocationCoords _coords; + QString _text; }; diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 4a69bdd3d3d473..30ab9b24e23800 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -5612,10 +5612,10 @@ HistoryWebPage::~HistoryWebPage() { } namespace { - ImageLinkManager manager; + LocationManager manager; } -void ImageLinkManager::init() { +void LocationManager::init() { if (manager) delete manager; manager = new QNetworkAccessManager(); App::setProxySettings(*manager); @@ -5635,11 +5635,11 @@ void ImageLinkManager::init() { black = new ImagePtr(p, "PNG"); } -void ImageLinkManager::reinit() { +void LocationManager::reinit() { if (manager) App::setProxySettings(*manager); } -void ImageLinkManager::deinit() { +void LocationManager::deinit() { if (manager) { delete manager; manager = 0; @@ -5664,33 +5664,27 @@ void deinitImageLinkManager() { manager.deinit(); } -void ImageLinkManager::getData(ImageLinkData *data) { +void LocationManager::getData(LocationData *data) { if (!manager) { DEBUG_LOG(("App Error: getting image link data without manager init!")); return failed(data); } - QString url; - switch (data->type) { - case GoogleMapsLink: { - int32 w = st::locationSize.width(), h = st::locationSize.height(); - int32 zoom = 13, scale = 1; - if (cScale() == dbisTwo || cRetina()) { - scale = 2; - } else { - w = convertScale(w); - h = convertScale(h); - } - url = qsl("https://maps.googleapis.com/maps/api/staticmap?center=") + data->id.mid(9) + qsl("&zoom=%1&size=%2x%3&maptype=roadmap&scale=%4&markers=color:red|size:big|").arg(zoom).arg(w).arg(h).arg(scale) + data->id.mid(9) + qsl("&sensor=false"); - QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url))); - imageLoadings[reply] = data; - } break; - default: { - failed(data); - } break; + + int32 w = st::locationSize.width(), h = st::locationSize.height(); + int32 zoom = 13, scale = 1; + if (cScale() == dbisTwo || cRetina()) { + scale = 2; + } else { + w = convertScale(w); + h = convertScale(h); } + QString coords = qsl("%1,%2").arg(data->coords.lat).arg(data->coords.lon); + QString url = qsl("https://maps.googleapis.com/maps/api/staticmap?center=") + coords + qsl("&zoom=%1&size=%2x%3&maptype=roadmap&scale=%4&markers=color:red|size:big|").arg(zoom).arg(w).arg(h).arg(scale) + coords + qsl("&sensor=false"); + QNetworkReply *reply = manager->get(QNetworkRequest(QUrl(url))); + imageLoadings[reply] = data; } -void ImageLinkManager::onFinished(QNetworkReply *reply) { +void LocationManager::onFinished(QNetworkReply *reply) { if (!manager) return; if (reply->error() != QNetworkReply::NoError) return onFailed(reply); @@ -5700,9 +5694,9 @@ void ImageLinkManager::onFinished(QNetworkReply *reply) { if (status == 301 || status == 302) { QString loc = reply->header(QNetworkRequest::LocationHeader).toString(); if (!loc.isEmpty()) { - QMap::iterator i = dataLoadings.find(reply); + QMap::iterator i = dataLoadings.find(reply); if (i != dataLoadings.cend()) { - ImageLinkData *d = i.value(); + LocationData *d = i.value(); if (serverRedirects.constFind(d) == serverRedirects.cend()) { serverRedirects.insert(d, 1); } else if (++serverRedirects[d] > MaxHttpRedirects) { @@ -5713,7 +5707,7 @@ void ImageLinkManager::onFinished(QNetworkReply *reply) { dataLoadings.insert(manager->get(QNetworkRequest(loc)), d); return; } else if ((i = imageLoadings.find(reply)) != imageLoadings.cend()) { - ImageLinkData *d = i.value(); + LocationData *d = i.value(); if (serverRedirects.constFind(d) == serverRedirects.cend()) { serverRedirects.insert(d, 1); } else if (++serverRedirects[d] > MaxHttpRedirects) { @@ -5732,8 +5726,8 @@ void ImageLinkManager::onFinished(QNetworkReply *reply) { } } - ImageLinkData *d = 0; - QMap::iterator i = dataLoadings.find(reply); + LocationData *d = 0; + QMap::iterator i = dataLoadings.find(reply); if (i != dataLoadings.cend()) { d = i.value(); dataLoadings.erase(i); @@ -5744,9 +5738,7 @@ void ImageLinkManager::onFinished(QNetworkReply *reply) { DEBUG_LOG(("JSON Error: Bad json received in onFinished() for image link")); return onFailed(reply); } - switch (d->type) { - case GoogleMapsLink: failed(d); break; - } + failed(d); if (App::main()) App::main()->update(); } else { @@ -5777,11 +5769,11 @@ void ImageLinkManager::onFinished(QNetworkReply *reply) { } } -void ImageLinkManager::onFailed(QNetworkReply *reply) { +void LocationManager::onFailed(QNetworkReply *reply) { if (!manager) return; - ImageLinkData *d = 0; - QMap::iterator i = dataLoadings.find(reply); + LocationData *d = 0; + QMap::iterator i = dataLoadings.find(reply); if (i != dataLoadings.cend()) { d = i.value(); dataLoadings.erase(i); @@ -5792,19 +5784,19 @@ void ImageLinkManager::onFailed(QNetworkReply *reply) { imageLoadings.erase(i); } } - DEBUG_LOG(("Network Error: failed to get data for image link %1, error %2").arg(d ? d->id : 0).arg(reply->errorString())); + DEBUG_LOG(("Network Error: failed to get data for image link %1,%2 error %3").arg(d ? d->coords.lat : 0).arg(d ? d->coords.lon : 0).arg(reply->errorString())); if (d) { failed(d); } } -void ImageLinkManager::failed(ImageLinkData *data) { +void LocationManager::failed(LocationData *data) { data->loading = false; data->thumb = *black; serverRedirects.remove(data); } -void ImageLinkData::load() { +void LocationData::load() { if (!thumb->isNull()) return thumb->load(false, false); if (loading) return; @@ -5812,7 +5804,7 @@ void ImageLinkData::load() { manager.getData(this); } -HistoryImageLink::HistoryImageLink(const QString &url, const QString &title, const QString &description) : HistoryMedia(), +HistoryLocation::HistoryLocation(const LocationCoords &coords, const QString &title, const QString &description) : HistoryMedia(), _title(st::msgMinWidth), _description(st::msgMinWidth) { if (!title.isEmpty()) { @@ -5822,16 +5814,11 @@ _description(st::msgMinWidth) { _description.setText(st::webPageDescriptionFont, textClean(description), _webpageDescriptionOptions); } - QRegularExpressionMatch m = QRegularExpression(qsl("^location:(-?\\d+(?:\\.\\d+)?),(-?\\d+(?:\\.\\d+)?)$")).match(url); - if (m.hasMatch()) { - _link.reset(new LocationLink(m.captured(1), m.captured(2))); - _data = App::imageLinkSet(url, GoogleMapsLink); - } else { - _link.reset(new TextLink(url)); - } + _link.reset(new LocationLink(coords)); + _data = App::location(coords); } -void HistoryImageLink::initDimensions(const HistoryItem *parent) { +void HistoryLocation::initDimensions(const HistoryItem *parent) { bool bubble = parent->hasBubble(); int32 tw = fullWidth(), th = fullHeight(); @@ -5862,7 +5849,7 @@ void HistoryImageLink::initDimensions(const HistoryItem *parent) { } } -int32 HistoryImageLink::resize(int32 width, const HistoryItem *parent) { +int32 HistoryLocation::resize(int32 width, const HistoryItem *parent) { bool bubble = parent->hasBubble(); _width = qMin(width, _maxw); @@ -5903,7 +5890,7 @@ int32 HistoryImageLink::resize(int32 width, const HistoryItem *parent) { return _height; } -void HistoryImageLink::draw(Painter &p, const HistoryItem *parent, const QRect &r, bool selected, uint64 ms) const { +void HistoryLocation::draw(Painter &p, const HistoryItem *parent, const QRect &r, bool selected, uint64 ms) const { if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); @@ -5967,7 +5954,7 @@ void HistoryImageLink::draw(Painter &p, const HistoryItem *parent, const QRect & } } -void HistoryImageLink::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { +void HistoryLocation::getState(TextLinkPtr &lnk, HistoryCursorState &state, int32 x, int32 y, const HistoryItem *parent) const { if (_width < st::msgPadding.left() + st::msgPadding.right() + 1) return; int32 skipx = 0, skipy = 0, width = _width, height = _height; bool bubble = parent->hasBubble(); @@ -6009,40 +5996,20 @@ void HistoryImageLink::getState(TextLinkPtr &lnk, HistoryCursorState &state, int } } -const QString HistoryImageLink::inDialogsText() const { - if (_data) { - switch (_data->type) { - case GoogleMapsLink: return lang(lng_maps_point); - } - } - return QString(); +const QString HistoryLocation::inDialogsText() const { + return lang(lng_maps_point); } -const QString HistoryImageLink::inHistoryText() const { - if (_data) { - switch (_data->type) { - case GoogleMapsLink: return qsl("[ ") + lang(lng_maps_point) + qsl(" : ") + _link->text() + qsl(" ]"); - } - } - return qsl("[ Link : ") + _link->text() + qsl(" ]"); +const QString HistoryLocation::inHistoryText() const { + return qsl("[ ") + lang(lng_maps_point) + qsl(" : ") + _link->text() + qsl(" ]"); } -int32 HistoryImageLink::fullWidth() const { - if (_data) { - switch (_data->type) { - case GoogleMapsLink: return st::locationSize.width(); - } - } - return st::minPhotoSize; +int32 HistoryLocation::fullWidth() const { + return st::locationSize.width(); } -int32 HistoryImageLink::fullHeight() const { - if (_data) { - switch (_data->type) { - case GoogleMapsLink: return st::locationSize.height(); - } - } - return st::minPhotoSize; +int32 HistoryLocation::fullHeight() const { + return st::locationSize.height(); } void ViaInlineBotLink::onClick(Qt::MouseButton button) const { @@ -6285,14 +6252,14 @@ void HistoryMessage::initMedia(const MTPMessageMedia *media, QString ¤tTex const MTPGeoPoint &point(media->c_messageMediaGeo().vgeo); if (point.type() == mtpc_geoPoint) { const MTPDgeoPoint &d(point.c_geoPoint()); - _media = new HistoryImageLink(qsl("location:%1,%2").arg(d.vlat.v).arg(d.vlong.v)); + _media = new HistoryLocation(LocationCoords(d.vlat.v, d.vlong.v)); } } break; case mtpc_messageMediaVenue: { const MTPDmessageMediaVenue &d(media->c_messageMediaVenue()); if (d.vgeo.type() == mtpc_geoPoint) { const MTPDgeoPoint &g(d.vgeo.c_geoPoint()); - _media = new HistoryImageLink(qsl("location:%1,%2").arg(g.vlat.v).arg(g.vlong.v), qs(d.vtitle), qs(d.vaddress)); + _media = new HistoryLocation(LocationCoords(g.vlat.v, g.vlong.v), qs(d.vtitle), qs(d.vaddress)); } } break; case mtpc_messageMediaPhoto: { diff --git a/Telegram/SourceFiles/history.h b/Telegram/SourceFiles/history.h index 237670ecff87af..436997fbe31216 100644 --- a/Telegram/SourceFiles/history.h +++ b/Telegram/SourceFiles/history.h @@ -120,7 +120,7 @@ enum HistoryMediaType { MediaTypeFile, MediaTypeGif, MediaTypeSticker, - MediaTypeImageLink, + MediaTypeLocation, MediaTypeWebPage, MediaTypeMusicFile, MediaTypeVoiceFile, @@ -1973,59 +1973,54 @@ void initImageLinkManager(); void reinitImageLinkManager(); void deinitImageLinkManager(); -enum ImageLinkType { - InvalidImageLink = 0, - GoogleMapsLink -}; -struct ImageLinkData { - ImageLinkData(const QString &id) : id(id), type(InvalidImageLink), loading(false) { +struct LocationData { + LocationData(const LocationCoords &coords) : coords(coords), loading(false) { } - QString id; + LocationCoords coords; ImagePtr thumb; - ImageLinkType type; bool loading; void load(); }; -class ImageLinkManager : public QObject { +class LocationManager : public QObject { Q_OBJECT public: - ImageLinkManager() : manager(0), black(0) { + LocationManager() : manager(0), black(0) { } void init(); void reinit(); void deinit(); - void getData(ImageLinkData *data); + void getData(LocationData *data); - ~ImageLinkManager() { + ~LocationManager() { deinit(); } - public slots: +public slots: void onFinished(QNetworkReply *reply); void onFailed(QNetworkReply *reply); private: - void failed(ImageLinkData *data); + void failed(LocationData *data); QNetworkAccessManager *manager; - QMap dataLoadings, imageLoadings; - QMap serverRedirects; + QMap dataLoadings, imageLoadings; + QMap serverRedirects; ImagePtr *black; }; -class HistoryImageLink : public HistoryMedia { +class HistoryLocation : public HistoryMedia { public: - HistoryImageLink(const QString &url, const QString &title = QString(), const QString &description = QString()); + HistoryLocation(const LocationCoords &coords, const QString &title = QString(), const QString &description = QString()); HistoryMediaType type() const { - return MediaTypeImageLink; + return MediaTypeLocation; } HistoryMedia *clone() const { - return new HistoryImageLink(*this); + return new HistoryLocation(*this); } void initDimensions(const HistoryItem *parent); @@ -2049,7 +2044,7 @@ class HistoryImageLink : public HistoryMedia { } private: - ImageLinkData *_data; + LocationData *_data; Text _title, _description; TextLinkPtr _link; diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 7221645bc6f8fc..650c51f10a31bb 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -1494,6 +1494,6 @@ bool linuxMoveFile(const char *from, const char *to) { return true; } -bool psLaunchMaps(const QString &lat, const QString &lon) { +bool psLaunchMaps(const LocationCoords &coords) { return false; } diff --git a/Telegram/SourceFiles/pspecific_linux.h b/Telegram/SourceFiles/pspecific_linux.h index 748a5639c96c5e..0804e8deba9d6a 100644 --- a/Telegram/SourceFiles/pspecific_linux.h +++ b/Telegram/SourceFiles/pspecific_linux.h @@ -195,4 +195,4 @@ class PsFileBookmark { bool linuxMoveFile(const char *from, const char *to); -bool psLaunchMaps(const QString &lat, const QString &lon); +bool psLaunchMaps(const LocationCoords &coords); diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 2f8971696f5c19..854ff00d287a49 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -910,8 +910,8 @@ QByteArray psPathBookmark(const QString &path) { return objc_pathBookmark(path); } -bool psLaunchMaps(const QString &lat, const QString &lon) { - return QDesktopServices::openUrl(qsl("https://maps.apple.com/?q=Point&z=16&ll=%1,%2").arg(lat).arg(lon)); +bool psLaunchMaps(const LocationCoords &coords) { + return QDesktopServices::openUrl(qsl("https://maps.apple.com/?q=Point&z=16&ll=%1,%2").arg(coords.lat).arg(coords.lon)); } QString strNotificationAboutThemeChange() { diff --git a/Telegram/SourceFiles/pspecific_mac.h b/Telegram/SourceFiles/pspecific_mac.h index 979e9825fd55fc..596f9c866af1c6 100644 --- a/Telegram/SourceFiles/pspecific_mac.h +++ b/Telegram/SourceFiles/pspecific_mac.h @@ -224,4 +224,4 @@ QString strNeedToReload(); QString strNeedToRefresh1(); QString strNeedToRefresh2(); -bool psLaunchMaps(const QString &lat, const QString &lon); +bool psLaunchMaps(const LocationCoords &coords); diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 6b91561ebaa3e6..1a2e4614003278 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -3660,6 +3660,6 @@ bool InitToastManager() { return true; } -bool psLaunchMaps(const QString &lat, const QString &lon) { - return QDesktopServices::openUrl(qsl("bingmaps:?lvl=16&collection=point.") + lat + '_' + lon + '_' + qsl("Point")); +bool psLaunchMaps(const LocationCoords &coords) { + return QDesktopServices::openUrl(qsl("bingmaps:?lvl=16&collection=point.%1_%2_Point").arg(coords.lat).arg(coords.lon)); } diff --git a/Telegram/SourceFiles/pspecific_wnd.h b/Telegram/SourceFiles/pspecific_wnd.h index 90bc466c460262..0f149ad29052e5 100644 --- a/Telegram/SourceFiles/pspecific_wnd.h +++ b/Telegram/SourceFiles/pspecific_wnd.h @@ -195,4 +195,4 @@ class PsFileBookmark { }; -bool psLaunchMaps(const QString &lat, const QString &lon); +bool psLaunchMaps(const LocationCoords &coords); diff --git a/Telegram/SourceFiles/window.cpp b/Telegram/SourceFiles/window.cpp index c3ecdbd686bd4f..3431edfd5163a5 100644 --- a/Telegram/SourceFiles/window.cpp +++ b/Telegram/SourceFiles/window.cpp @@ -521,6 +521,12 @@ void Window::clearWidgets() { intro->rpcClear(); intro = 0; } + if (_mediaView) { + if (!_mediaView->isHidden()) { + _mediaView->hide(); + } + _mediaView->rpcClear(); + } title->updateBackButton(); updateGlobalMenu(); } From fcd713b8a6d6ebccef84851d89183e987dfdbe87 Mon Sep 17 00:00:00 2001 From: John Preston Date: Sun, 28 Feb 2016 17:06:56 +0300 Subject: [PATCH 126/133] beta 9028001 --- Telegram/SourceFiles/config.h | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Version | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 2490993ad97428..7c0ab7da00f0aa 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9028; static const wchar_t *AppVersionStr = L"0.9.28"; static const bool DevVersion = false; -//#define BETA_VERSION (9026001ULL) // just comment this line to build public version +#define BETA_VERSION (9028001ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index e93f7903742676..6ad208fd05ca26 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,28,0 - PRODUCTVERSION 0,9,28,0 + FILEVERSION 0,9,28,1 + PRODUCTVERSION 0,9,28,1 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.28.0" + VALUE "FileVersion", "0.9.28.1" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.28.0" + VALUE "ProductVersion", "0.9.28.1" END END BLOCK "VarFileInfo" diff --git a/Telegram/Version b/Telegram/Version index 3d7d55000c8c9a..e3f6eee41c01ab 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.28 AppVersionStr 0.9.28 DevChannel 0 -BetaVersion 0 9026001 +BetaVersion 9028001 From 08072346fd77be9f9de4f8641d77527a627817b1 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 29 Feb 2016 14:34:44 +0300 Subject: [PATCH 127/133] fixed crash in next/previous_chat(), MTP::dld/upl -> functions, download and upload sessions count reduced to 2 --- Telegram/SourceFiles/config.h | 4 ++-- Telegram/SourceFiles/dialogswidget.cpp | 10 ++++++++++ Telegram/SourceFiles/fileuploader.cpp | 10 +++++----- Telegram/SourceFiles/mtproto/mtp.cpp | 16 ++-------------- Telegram/SourceFiles/mtproto/mtp.h | 10 ++++++++-- Telegram/SourceFiles/mtproto/mtpConnection.cpp | 4 ++-- Telegram/SourceFiles/mtproto/mtpFileLoader.cpp | 10 +++++----- 7 files changed, 34 insertions(+), 30 deletions(-) diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 7c0ab7da00f0aa..1bffe5ad4b6f10 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -51,8 +51,8 @@ enum { MTPIPv4ConnectionWaitTimeout = 1000, // 1 seconds waiting for ipv4, until we accept ipv6 MTPMillerRabinIterCount = 30, // 30 Miller-Rabin iterations for dh_prime primality check - MTPUploadSessionsCount = 4, // max 4 upload sessions is created - MTPDownloadSessionsCount = 4, // max 4 download sessions is created + MTPUploadSessionsCount = 2, // max 2 upload sessions is created + MTPDownloadSessionsCount = 2, // max 2 download sessions is created MTPKillFileSessionTimeout = 5000, // how much time without upload / download causes additional session kill MTPEnumDCTimeout = 8000, // 8 seconds timeout for help_getConfig to work (then move to other dc) diff --git a/Telegram/SourceFiles/dialogswidget.cpp b/Telegram/SourceFiles/dialogswidget.cpp index 29d3437f0c5a4d..c2b685e275b668 100644 --- a/Telegram/SourceFiles/dialogswidget.cpp +++ b/Telegram/SourceFiles/dialogswidget.cpp @@ -1522,6 +1522,11 @@ void DialogsInner::destroyData() { } void DialogsInner::peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const { + if (!inPeer) { + outPeer = 0; + outMsg = 0; + return; + } if (_state == DefaultState) { DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(inPeer->id); if (i == dialogs.list.rowByPeer.constEnd()) { @@ -1606,6 +1611,11 @@ void DialogsInner::peerBefore(const PeerData *inPeer, MsgId inMsg, PeerData *&ou } void DialogsInner::peerAfter(const PeerData *inPeer, MsgId inMsg, PeerData *&outPeer, MsgId &outMsg) const { + if (!inPeer) { + outPeer = 0; + outMsg = 0; + return; + } if (_state == DefaultState) { DialogsList::RowByPeer::const_iterator i = dialogs.list.rowByPeer.constFind(inPeer->id); if (i == dialogs.list.rowByPeer.constEnd()) { diff --git a/Telegram/SourceFiles/fileuploader.cpp b/Telegram/SourceFiles/fileuploader.cpp index 1bb0eb42e23e94..a9388ad85cc0e0 100644 --- a/Telegram/SourceFiles/fileuploader.cpp +++ b/Telegram/SourceFiles/fileuploader.cpp @@ -103,7 +103,7 @@ void FileUploader::currentFailed() { void FileUploader::killSessions() { for (int i = 0; i < MTPUploadSessionsCount; ++i) { - MTP::stopSession(MTP::upl[i]); + MTP::stopSession(MTP::upl(i)); } } @@ -187,9 +187,9 @@ void FileUploader::sendNext() { } mtpRequestId requestId; if (i->docSize > UseBigFilesFrom) { - requestId = MTP::send(MTPupload_SaveBigFilePart(MTP_long(i->id()), MTP_int(i->docSentParts), MTP_int(i->docPartsCount), MTP_string(toSend)), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl[todc]); + requestId = MTP::send(MTPupload_SaveBigFilePart(MTP_long(i->id()), MTP_int(i->docSentParts), MTP_int(i->docPartsCount), MTP_string(toSend)), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl(todc)); } else { - requestId = MTP::send(MTPupload_SaveFilePart(MTP_long(i->id()), MTP_int(i->docSentParts), MTP_string(toSend)), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl[todc]); + requestId = MTP::send(MTPupload_SaveFilePart(MTP_long(i->id()), MTP_int(i->docSentParts), MTP_string(toSend)), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl(todc)); } docRequestsSent.insert(requestId, i->docSentParts); dcMap.insert(requestId, todc); @@ -200,7 +200,7 @@ void FileUploader::sendNext() { } else { UploadFileParts::iterator part = parts.begin(); - mtpRequestId requestId = MTP::send(MTPupload_SaveFilePart(MTP_long(partsOfId), MTP_int(part.key()), MTP_string(part.value())), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl[todc]); + mtpRequestId requestId = MTP::send(MTPupload_SaveFilePart(MTP_long(partsOfId), MTP_int(part.key()), MTP_string(part.value())), rpcDone(&FileUploader::partLoaded), rpcFail(&FileUploader::partFailed), MTP::upl(todc)); requestsSent.insert(requestId, part.value()); dcMap.insert(requestId, todc); sentSize += part.value().size(); @@ -246,7 +246,7 @@ void FileUploader::clear() { dcMap.clear(); sentSize = 0; for (int32 i = 0; i < MTPUploadSessionsCount; ++i) { - MTP::stopSession(MTP::upl[i]); + MTP::stopSession(MTP::upl(i)); sentSizes[i] = 0; } killSessionsTimer.stop(); diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 781e6f2ff43ba0..1770bcef1eae6c 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -627,20 +627,8 @@ namespace MTP { const uint32 cfg = 1 * _mtp_internal::dcShift; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum const uint32 lgt = 2 * _mtp_internal::dcShift; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum - const uint32 dld[MTPDownloadSessionsCount] = { // send(req, callbacks, MTP::dld[i] + dc) - for download - 0x10 * _mtp_internal::dcShift, - 0x11 * _mtp_internal::dcShift, - 0x12 * _mtp_internal::dcShift, - 0x13 * _mtp_internal::dcShift, - }; - const uint32 upl[MTPUploadSessionsCount] = { // send(req, callbacks, MTP::upl[i] + dc) - for upload - 0x20 * _mtp_internal::dcShift, - 0x21 * _mtp_internal::dcShift, - 0x22 * _mtp_internal::dcShift, - 0x23 * _mtp_internal::dcShift, - }; - const uint32 dldStart = dld[0], dldEnd = dld[(sizeof(dld) / sizeof(dld[0])) - 1] + _mtp_internal::dcShift; - const uint32 uplStart = upl[0], uplEnd = upl[(sizeof(upl) / sizeof(upl[0])) - 1] + _mtp_internal::dcShift; + const uint32 dldStart = dld(0), dldEnd = dld(MTPDownloadSessionsCount - 1) + _mtp_internal::dcShift; + const uint32 uplStart = upl(0), uplEnd = upl(MTPUploadSessionsCount - 1) + _mtp_internal::dcShift; void start() { if (started()) return; diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index ed2882e2415f03..ac79f5e3c3d55d 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -70,8 +70,14 @@ namespace MTP { extern const uint32 cfg; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum extern const uint32 lgt; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum - extern const uint32 dld[MTPDownloadSessionsCount]; // send(req, callbacks, MTP::dld[i] + dc) - for download - extern const uint32 upl[MTPUploadSessionsCount]; // send(req, callbacks, MTP::upl[i] + dc) - for upload + inline const uint32 dld(int32 index) { // send(req, callbacks, MTP::dld(i) + dc) - for download + t_assert(index >= 0 && index < MTPDownloadSessionsCount); + return (0x10 + index) * _mtp_internal::dcShift; + }; + inline const uint32 upl(int32 index) { // send(req, callbacks, MTP::upl[i] + dc) - for upload + t_assert(index >= 0 && index < MTPUploadSessionsCount); + return (0x20 + index) * _mtp_internal::dcShift; + }; extern const uint32 dldStart, dldEnd; // dc >= dldStart && dc < dldEnd => dc in dld extern const uint32 uplStart, uplEnd; // dc >= uplStart && dc < uplEnd => dc in upl diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index 9e0e10a49c99ae..e5959811b1e73c 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -2119,9 +2119,9 @@ void MTProtoConnectionPrivate::onSentSome(uint64 size) { DEBUG_LOG(("Checking connect for request with size %1 bytes, delay will be %2").arg(size).arg(remain)); } } - if (dc >= MTP::upl[0] && dc < MTP::upl[MTPUploadSessionsCount - 1] + _mtp_internal::dcShift) { + if (dc >= MTP::uplStart && dc < MTP::uplEnd) { remain *= MTPUploadSessionsCount; - } else if (dc >= MTP::dld[0] && dc < MTP::dld[MTPDownloadSessionsCount - 1] + _mtp_internal::dcShift) { + } else if (dc >= MTP::dldStart && dc < MTP::dldEnd) { remain *= MTPDownloadSessionsCount; } _waitForReceivedTimer.start(remain); diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index 04a7b68eb0861c..6fdf6c5e101679 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -349,9 +349,9 @@ mtpFileLoader::mtpFileLoader(const StorageImageLocation *location, int32 size, L , _location(location) , _id(0) , _access(0) { - LoaderQueues::iterator i = queues.find(MTP::dld[0] + _dc); + LoaderQueues::iterator i = queues.find(MTP::dld(0) + _dc); if (i == queues.cend()) { - i = queues.insert(MTP::dld[0] + _dc, FileLoaderQueue(MaxFileQueries)); + i = queues.insert(MTP::dld(0) + _dc, FileLoaderQueue(MaxFileQueries)); } _queue = &i.value(); } @@ -365,9 +365,9 @@ mtpFileLoader::mtpFileLoader(int32 dc, const uint64 &id, const uint64 &access, L , _location(0) , _id(id) , _access(access) { - LoaderQueues::iterator i = queues.find(MTP::dld[0] + _dc); + LoaderQueues::iterator i = queues.find(MTP::dld(0) + _dc); if (i == queues.cend()) { - i = queues.insert(MTP::dld[0] + _dc, FileLoaderQueue(MaxFileQueries)); + i = queues.insert(MTP::dld(0) + _dc, FileLoaderQueue(MaxFileQueries)); } _queue = &i.value(); } @@ -405,7 +405,7 @@ bool mtpFileLoader::loadPart() { App::app()->killDownloadSessionsStop(_dc); - mtpRequestId reqId = MTP::send(MTPupload_GetFile(MTPupload_getFile(loc, MTP_int(offset), MTP_int(limit))), rpcDone(&mtpFileLoader::partLoaded, offset), rpcFail(&mtpFileLoader::partFailed), MTP::dld[dcIndex] + _dc, 50); + mtpRequestId reqId = MTP::send(MTPupload_GetFile(MTPupload_getFile(loc, MTP_int(offset), MTP_int(limit))), rpcDone(&mtpFileLoader::partLoaded, offset), rpcFail(&mtpFileLoader::partFailed), MTP::dld(dcIndex) + _dc, 50); ++_queue->queries; dr.v[dcIndex] += limit; From 99b52d4cc128dc7075f5de49ce40b99ff832caaf Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 29 Feb 2016 19:53:26 +0300 Subject: [PATCH 128/133] all deinit moved to Application::aboutToQuit(), mtproto connection thread management refactored, disabled -style=0 fake argument for Application, beta 9028002 --- Telegram/Build.bat | 1 + Telegram/SourceFiles/_other/updater.cpp | 2 +- Telegram/SourceFiles/application.cpp | 65 ++++++--- Telegram/SourceFiles/application.h | 5 +- Telegram/SourceFiles/config.h | 2 +- Telegram/SourceFiles/logs.cpp | 4 +- Telegram/SourceFiles/logs.h | 6 +- Telegram/SourceFiles/main.cpp | 39 ++---- Telegram/SourceFiles/mtproto/mtp.cpp | 128 +++++++++++------- Telegram/SourceFiles/mtproto/mtp.h | 17 ++- .../SourceFiles/mtproto/mtpConnection.cpp | 122 +++++++++-------- Telegram/SourceFiles/mtproto/mtpConnection.h | 14 +- Telegram/SourceFiles/mtproto/mtpSession.cpp | 120 ++++++++-------- Telegram/SourceFiles/mtproto/mtpSession.h | 16 +-- Telegram/SourceFiles/pspecific.h | 6 +- Telegram/SourceFiles/pspecific_linux.cpp | 4 +- Telegram/SourceFiles/pspecific_mac.cpp | 4 +- Telegram/SourceFiles/pspecific_wnd.cpp | 4 +- Telegram/SourceFiles/settings.h | 1 - Telegram/Telegram.rc | 8 +- Telegram/Version | 2 +- 21 files changed, 300 insertions(+), 270 deletions(-) diff --git a/Telegram/Build.bat b/Telegram/Build.bat index 6f83a43f27000f..788f9c76684e8e 100644 --- a/Telegram/Build.bat +++ b/Telegram/Build.bat @@ -1,4 +1,5 @@ @echo OFF +setlocal FOR /F "tokens=1,2* delims= " %%i in (Version) do set "%%i=%%j" diff --git a/Telegram/SourceFiles/_other/updater.cpp b/Telegram/SourceFiles/_other/updater.cpp index d89efcd95022ce..7050e9bf307eab 100644 --- a/Telegram/SourceFiles/_other/updater.cpp +++ b/Telegram/SourceFiles/_other/updater.cpp @@ -255,7 +255,7 @@ bool update() { } else { break; } - } while (copyTries < 30); + } while (copyTries < 100); if (!copyResult) { writeLog(L"Error: failed to copy, asking to retry.."); WCHAR errMsg[2048]; diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index e128cb5eb8e9c6..fca1d7df402d3a 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -110,6 +110,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) connect(&_localSocket, SIGNAL(readyRead()), this, SLOT(socketReading())); connect(&_localServer, SIGNAL(newConnection()), this, SLOT(newInstanceConnected())); + QTimer::singleShot(0, this, SLOT(startApplication())); connect(this, SIGNAL(aboutToQuit()), this, SLOT(closeApplication())); #ifndef TDESKTOP_DISABLE_AUTOUPDATE @@ -127,27 +128,6 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) } } -Application::~Application() { - App::setQuiting(); - - Sandbox::finish(); - - delete AppObject; - - _localSocket.close(); - closeApplication(); - -#ifndef TDESKTOP_DISABLE_AUTOUPDATE - delete _updateReply; - _updateReply = 0; - if (_updateChecker) _updateChecker->deleteLater(); - _updateChecker = 0; - if (_updateThread) _updateThread->quit(); - _updateThread = 0; -#endif -} - - void Application::socketConnected() { LOG(("Socket connected, this is not the first application instance, sending show command..")); _secondInstance = true; @@ -333,13 +313,54 @@ void Application::removeClients() { } } +void Application::startApplication() { + if (App::quiting()) { + quit(); + } +} + void Application::closeApplication() { + App::quit(); + + delete AppObject; + AppObject = 0; + + Sandbox::finish(); + _localServer.close(); for (LocalClients::iterator i = _localClients.begin(), e = _localClients.end(); i != e; ++i) { disconnect(i->first, SIGNAL(disconnected()), this, SLOT(removeClients())); i->first->close(); } _localClients.clear(); + + _localSocket.close(); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + delete _updateReply; + _updateReply = 0; + if (_updateChecker) _updateChecker->deleteLater(); + _updateChecker = 0; + if (_updateThread) _updateThread->quit(); + _updateThread = 0; +#endif + + DEBUG_LOG(("Telegram finished, result: %1").arg("unknown")); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + if (cRestartingUpdate()) { + DEBUG_LOG(("Application Info: executing updater to install update..")); + psExecUpdater(); + } else +#endif + if (cRestarting()) { + DEBUG_LOG(("Application Info: executing Telegram, because of restart..")); + psExecTelegram(); + } + + SignalHandlers::finish(); + PlatformSpecific::finish(); + Logs::finish(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE @@ -899,7 +920,7 @@ void AppClass::killDownloadSessions() { for (QMap::iterator i = killDownloadSessionTimes.begin(); i != killDownloadSessionTimes.end(); ) { if (i.value() <= ms) { for (int j = 0; j < MTPDownloadSessionsCount; ++j) { - MTP::stopSession(MTP::dld[j] + i.key()); + MTP::stopSession(MTP::dld(j) + i.key()); } i = killDownloadSessionTimes.erase(i); } else { diff --git a/Telegram/SourceFiles/application.h b/Telegram/SourceFiles/application.h index acae496077a3ce..1f69aaaa430a44 100644 --- a/Telegram/SourceFiles/application.h +++ b/Telegram/SourceFiles/application.h @@ -30,7 +30,6 @@ class Application : public QApplication { public: Application(int &argc, char **argv); - ~Application(); // Single instance application public slots: @@ -41,11 +40,13 @@ public slots: void socketWritten(qint64 bytes); void socketReading(); void newInstanceConnected(); - void closeApplication(); void readClients(); void removeClients(); + void startApplication(); // will be done in exec() + void closeApplication(); // will be done in aboutToQuit() + private: typedef QPair LocalClient; diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 1bffe5ad4b6f10..5e68c9995f9ec2 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -23,7 +23,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org static const int32 AppVersion = 9028; static const wchar_t *AppVersionStr = L"0.9.28"; static const bool DevVersion = false; -#define BETA_VERSION (9028001ULL) // just comment this line to build public version +#define BETA_VERSION (9028002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/SourceFiles/logs.cpp b/Telegram/SourceFiles/logs.cpp index 4a90c14aa18b94..67c1e55afe9d57 100644 --- a/Telegram/SourceFiles/logs.cpp +++ b/Telegram/SourceFiles/logs.cpp @@ -292,7 +292,7 @@ namespace SignalHandlers { namespace Logs { - Initializer::Initializer() { + void start() { t_assert(LogsData == 0); if (!Sandbox::CheckBetaVersionDir()) { @@ -378,7 +378,7 @@ namespace Logs { LOG(("Logs started")); } - Initializer::~Initializer() { + void finish() { delete LogsData; LogsData = 0; diff --git a/Telegram/SourceFiles/logs.h b/Telegram/SourceFiles/logs.h index 451fb81795688e..df2398117158b4 100644 --- a/Telegram/SourceFiles/logs.h +++ b/Telegram/SourceFiles/logs.h @@ -23,11 +23,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org class MTPlong; namespace Logs { - struct Initializer { - Initializer(); - ~Initializer(); - }; + void start(); bool started(); + void finish(); bool instanceChecked(); void multipleInstances(); diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index 508fb9052e7c7f..2cbe3e078d10a3 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -25,8 +25,6 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "localstorage.h" int main(int argc, char *argv[]) { - int result = 0; - settingsParseArgs(argc, argv); if (cLaunchMode() == LaunchModeFixPrevious) { return psFixPrevious(); @@ -36,34 +34,15 @@ int main(int argc, char *argv[]) { return showCrashReportWindow(QFileInfo(cStartUrl()).absoluteFilePath()); } - Logs::Initializer _logs; - { - PlatformSpecific::Initializer _ps; - - QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable - static const int a_cnt = sizeof(args) / sizeof(args[0]); - int a_argc = a_cnt + 1; - char *a_argv[a_cnt + 1] = { argv[0], args[0].data() }; - - Application app(a_argc, a_argv); - if (!App::quiting()) { - result = app.exec(); - } - } - - DEBUG_LOG(("Telegram finished, result: %1").arg(result)); + // both are finished in Application::closeApplication + Logs::start(); // must be started before PlatformSpecific is started + PlatformSpecific::start(); // must be started before QApplication is created - #ifndef TDESKTOP_DISABLE_AUTOUPDATE - if (cRestartingUpdate()) { - DEBUG_LOG(("Application Info: executing updater to install update..")); - psExecUpdater(); - } else - #endif - if (cRestarting()) { - DEBUG_LOG(("Application Info: executing Telegram, because of restart..")); - psExecTelegram(); - } + //QByteArray args[] = { "-style=0" }; // prepare fake args to disable QT_STYLE_OVERRIDE env variable + //static const int a_cnt = sizeof(args) / sizeof(args[0]); + //int a_argc = a_cnt + 1; + //char *a_argv[a_cnt + 1] = { argv[0], args[0].data() }; - SignalHandlers::finish(); - return result; + Application app(argc, argv); + return app.exec(); } diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 1770bcef1eae6c..4c2ce87fb20a7b 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -24,10 +24,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "localstorage.h" namespace { - typedef QMap Sessions; + typedef QMap Sessions; Sessions sessions; - QVector sessionsToKill; - MTProtoSessionPtr mainSession; + MTProtoSession *mainSession; typedef QMap RequestsByDC; // holds dcWithShift for request to this dc or -dc for request to main dc RequestsByDC requestsByDC; @@ -62,13 +61,16 @@ namespace { typedef QMap AuthWaiters; // holds request ids waiting for auth import to specific dc AuthWaiters authWaiters; + typedef OrderedSet MTPQuittingConnections; + MTPQuittingConnections quittingConnections; + QMutex toClearLock; RPCCallbackClears toClear; RPCResponseHandler globalHandler; MTPStateChangedHandler stateChangedHandler = 0; MTPSessionResetHandler sessionResetHandler = 0; - _mtp_internal::RequestResender *resender = 0; + _mtp_internal::GlobalSlotCarrier *_globalSlotCarrier = 0; void importDone(const MTPauth_Authorization &result, mtpRequestId req) { QMutexLocker locker1(&requestByDCLock); @@ -111,7 +113,7 @@ namespace { } DEBUG_LOG(("MTP Info: resending request %1 to dc %2 after import auth").arg(requestId).arg(k.value())); } - if (MTProtoSessionPtr session = _mtp_internal::getSession(dcWithShift)) { + if (MTProtoSession *session = _mtp_internal::getSession(dcWithShift)) { session->sendPrepared(j.value()); } } @@ -202,7 +204,7 @@ namespace { } req = i.value(); } - if (MTProtoSessionPtr session = _mtp_internal::getSession(newdcWithShift)) { + if (MTProtoSession *session = _mtp_internal::getSession(newdcWithShift)) { _mtp_internal::registerRequest(requestId, (dcWithShift < 0) ? -newdcWithShift : newdcWithShift); session->sendPrepared(req); } @@ -230,7 +232,7 @@ namespace { } delayedRequests.insert(i, DelayedRequest(requestId, sendAt)); - if (resender) resender->checkDelayed(); + if (_globalSlotCarrier) _globalSlotCarrier->checkDelayed(); return true; } else if (code == 401 || (badGuestDC && badGuestDCRequests.constFind(requestId) == badGuestDCRequests.cend())) { @@ -281,7 +283,7 @@ namespace { } if (!dcWithShift) return false; - if (MTProtoSessionPtr session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { + if (MTProtoSession *session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { req->needsLayer = true; session->sendPrepared(req); } @@ -319,7 +321,7 @@ namespace { if (!dcWithShift) return false; if (!req->after) { - if (MTProtoSessionPtr session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { + if (MTProtoSession *session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { req->needsLayer = true; session->sendPrepared(req); } @@ -346,7 +348,7 @@ namespace { delayedRequests.insert(i, DelayedRequest(requestId, i->second)); } - if (resender) resender->checkDelayed(); + if (_globalSlotCarrier) _globalSlotCarrier->checkDelayed(); } } return true; @@ -360,21 +362,18 @@ namespace { } namespace _mtp_internal { - MTProtoSessionPtr getSession(int32 dcWithShift) { - if (!_started) return MTProtoSessionPtr(); + MTProtoSession *getSession(int32 dcWithShift) { + if (!_started) return 0; if (!dcWithShift) return mainSession; if (!(dcWithShift % _mtp_internal::dcShift)) { dcWithShift += (mainSession->getDcWithShift() % _mtp_internal::dcShift); } Sessions::const_iterator i = sessions.constFind(dcWithShift); - if (i != sessions.cend()) return *i; - - MTProtoSessionPtr result(new MTProtoSession()); - result->start(dcWithShift); - - sessions.insert(dcWithShift, result); - return result; + if (i == sessions.cend()) { + i = sessions.insert(dcWithShift, new MTProtoSession(dcWithShift)); + } + return i.value(); } bool paused() { @@ -580,11 +579,11 @@ namespace _mtp_internal { return true; } - RequestResender::RequestResender() { + GlobalSlotCarrier::GlobalSlotCarrier() { connect(&_timer, SIGNAL(timeout()), this, SLOT(checkDelayed())); } - void RequestResender::checkDelayed() { + void GlobalSlotCarrier::checkDelayed() { uint64 now = getms(true); while (!delayedRequests.isEmpty() && now >= delayedRequests.front().second) { mtpRequestId requestId = delayedRequests.front().first; @@ -612,7 +611,7 @@ namespace _mtp_internal { } req = j.value(); } - if (MTProtoSessionPtr session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { + if (MTProtoSession *session = _mtp_internal::getSession(dcWithShift < 0 ? (-dcWithShift) : dcWithShift)) { session->sendPrepared(req); } } @@ -621,6 +620,25 @@ namespace _mtp_internal { _timer.start(delayedRequests.front().second - now); } } + + void GlobalSlotCarrier::connectionFinished(MTProtoConnection *connection) { + MTPQuittingConnections::iterator i = quittingConnections.find(connection); + if (i != quittingConnections.cend()) { + quittingConnections.erase(i); + } + + connection->waitTillFinish(); + delete connection; + } + + GlobalSlotCarrier *globalSlotCarrier() { + return _globalSlotCarrier; + } + + void queueQuittingConnection(MTProtoConnection *connection) { + quittingConnections.insert(connection); + } + }; namespace MTP { @@ -637,12 +655,12 @@ namespace MTP { MTProtoDCMap &dcs(mtpDCMap()); - mainSession = MTProtoSessionPtr(new MTProtoSession()); - mainSession->start(mtpMainDC()); - sessions[mainSession->getDcWithShift()] = mainSession; + _globalSlotCarrier = new _mtp_internal::GlobalSlotCarrier(); + + mainSession = new MTProtoSession(mtpMainDC()); + sessions.insert(mainSession->getDcWithShift(), mainSession); _started = true; - resender = new _mtp_internal::RequestResender(); if (mtpNeedConfig()) { mtpConfigLoader()->load(); @@ -657,7 +675,7 @@ namespace MTP { if (!_started) return; for (Sessions::const_iterator i = sessions.cbegin(), e = sessions.cend(); i != e; ++i) { - (*i)->restart(); + i.value()->restart(); } } @@ -666,8 +684,8 @@ namespace MTP { dcMask %= _mtp_internal::dcShift; for (Sessions::const_iterator i = sessions.cbegin(), e = sessions.cend(); i != e; ++i) { - if (((*i)->getDcWithShift() % int(_mtp_internal::dcShift)) == dcMask) { - (*i)->restart(); + if ((i.value()->getDcWithShift() % int(_mtp_internal::dcShift)) == dcMask) { + i.value()->restart(); } } } @@ -681,7 +699,7 @@ namespace MTP { if (!_started) return; _paused = false; for (Sessions::const_iterator i = sessions.cbegin(), e = sessions.cend(); i != e; ++i) { - (*i)->unpaused(); + i.value()->unpaused(); } } @@ -714,7 +732,7 @@ namespace MTP { } Sessions::const_iterator i = sessions.constFind(dc); - if (i != sessions.cend()) return (*i)->getState(); + if (i != sessions.cend()) return i.value()->getState(); return MTProtoConnection::Disconnected; } @@ -728,13 +746,13 @@ namespace MTP { } Sessions::const_iterator i = sessions.constFind(dc); - if (i != sessions.cend()) return (*i)->transport(); + if (i != sessions.cend()) return i.value()->transport(); return QString(); } void ping() { - if (MTProtoSessionPtr session = _mtp_internal::getSession(0)) { + if (MTProtoSession *session = _mtp_internal::getSession(0)) { session->ping(); } } @@ -754,7 +772,7 @@ namespace MTP { QMutexLocker locker(&requestByDCLock); RequestsByDC::iterator i = requestsByDC.find(requestId); if (i != requestsByDC.end()) { - if (MTProtoSessionPtr session = _mtp_internal::getSession(abs(i.value()))) { + if (MTProtoSession *session = _mtp_internal::getSession(abs(i.value()))) { session->cancel(requestId, msgId); } requestsByDC.erase(i); @@ -763,26 +781,25 @@ namespace MTP { _mtp_internal::clearCallbacks(requestId); } - void killSessionsDelayed() { - if (!sessionsToKill.isEmpty()) { - sessionsToKill.clear(); - } - } - void killSession(int32 dc) { Sessions::iterator i = sessions.find(dc); - if (i != sessions.end()) { + if (i != sessions.cend()) { bool wasMain = (i.value() == mainSession); i.value()->kill(); - if (sessionsToKill.isEmpty()) QTimer::singleShot(0, killSessionsDelayed); - sessionsToKill.push_back(i.value()); + i.value()->deleteLater(); sessions.erase(i); if (wasMain) { - mainSession = MTProtoSessionPtr(new MTProtoSession()); - mainSession->start(mtpMainDC()); - sessions[mainSession->getDcWithShift()] = mainSession; + mainSession = new MTProtoSession(mtpMainDC()); + int32 newdc = mainSession->getDcWithShift(); + i = sessions.find(newdc); + if (i != sessions.cend()) { + i.value()->kill(); + i.value()->deleteLater(); + sessions.erase(i); + } + sessions.insert(newdc, mainSession); } } } @@ -801,14 +818,14 @@ namespace MTP { QMutexLocker locker(&requestByDCLock); RequestsByDC::iterator i = requestsByDC.find(requestId); if (i != requestsByDC.end()) { - if (MTProtoSessionPtr session = _mtp_internal::getSession(abs(i.value()))) { + if (MTProtoSession *session = _mtp_internal::getSession(abs(i.value()))) { return session->requestState(requestId); } return MTP::RequestConnecting; } return MTP::RequestSent; } - if (MTProtoSessionPtr session = _mtp_internal::getSession(-requestId)) { + if (MTProtoSession *session = _mtp_internal::getSession(-requestId)) { return session->requestState(0); } return MTP::RequestConnecting; @@ -817,11 +834,20 @@ namespace MTP { void stop() { for (Sessions::iterator i = sessions.begin(), e = sessions.end(); i != e; ++i) { i.value()->kill(); + delete i.value(); } sessions.clear(); - mainSession = MTProtoSessionPtr(); - delete resender; - resender = 0; + mainSession = nullptr; + + for (MTPQuittingConnections::const_iterator i = quittingConnections.cbegin(), e = quittingConnections.cend(); i != e; ++i) { + i.key()->waitTillFinish(); + delete i.key(); + } + quittingConnections.clear(); + + delete _globalSlotCarrier; + _globalSlotCarrier = nullptr; + mtpDestroyConfigLoader(); _started = false; diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index ac79f5e3c3d55d..a59c092b972011 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -24,7 +24,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org #include "mtproto/mtpFileLoader.h" namespace _mtp_internal { - MTProtoSessionPtr getSession(int32 dc = 0); // 0 - current set dc + MTProtoSession *getSession(int32 dc); // 0 - current set dc bool paused(); @@ -49,21 +49,28 @@ namespace _mtp_internal { return rpcErrorOccured(requestId, handler.onFail, err); } - class RequestResender : public QObject { + // used for: + // - resending requests by timer which were postponed by flood delay + // - destroying MTProtoConnections whose thread has finished + class GlobalSlotCarrier : public QObject { Q_OBJECT public: - RequestResender(); + GlobalSlotCarrier(); public slots: void checkDelayed(); + void connectionFinished(MTProtoConnection *connection); private: SingleTimer _timer; }; + + GlobalSlotCarrier *globalSlotCarrier(); + void queueQuittingConnection(MTProtoConnection *connection); }; namespace MTP { @@ -99,7 +106,7 @@ namespace MTP { template inline mtpRequestId send(const TRequest &request, RPCResponseHandler callbacks = RPCResponseHandler(), int32 dc = 0, uint64 msCanWait = 0, mtpRequestId after = 0) { - if (MTProtoSessionPtr session = _mtp_internal::getSession(dc)) { + if (MTProtoSession *session = _mtp_internal::getSession(dc)) { return session->send(request, callbacks, msCanWait, true, !dc, after); } return 0; @@ -109,7 +116,7 @@ namespace MTP { return send(request, RPCResponseHandler(onDone, onFail), dc, msCanWait, after); } inline void sendAnything(int32 dc = 0, uint64 msCanWait = 0) { - if (MTProtoSessionPtr session = _mtp_internal::getSession(dc)) { + if (MTProtoSession *session = _mtp_internal::getSession(dc)) { return session->sendAnything(msCanWait); } } diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index e5959811b1e73c..ae2fd23731c23b 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -252,8 +252,6 @@ namespace { typedef QMap PublicRSAKeys; PublicRSAKeys gPublicRSA; - MTProtoConnection gMainConnection; - bool gConfigInited = false; void initRSAConfig() { if (gConfigInited) return; @@ -277,66 +275,75 @@ namespace { } } -MTPThread::MTPThread(QObject *parent) : QThread(parent) { - static uint32 gThreadId = 0; - threadId = ++gThreadId; +uint32 MTPThreadIdIncrement = 0; + +MTPThread::MTPThread() : QThread(0) +, _threadId(++MTPThreadIdIncrement) { } uint32 MTPThread::getThreadId() const { - return threadId; + return _threadId; } -MTProtoConnection::MTProtoConnection() : thread(0), data(0) { +MTPThread::~MTPThread() { +} + +MTProtoConnection::MTProtoConnection() : thread(nullptr), data(nullptr) { } int32 MTProtoConnection::start(MTPSessionData *sessionData, int32 dc) { - initRSAConfig(); + t_assert(thread == nullptr && data == nullptr); - if (thread) { - DEBUG_LOG(("MTP Info: MTP start called for already working connection")); - return dc; - } + initRSAConfig(); - thread = new MTPThread(QApplication::instance()); + thread = new MTPThread(); data = new MTProtoConnectionPrivate(thread, this, sessionData, dc); dc = data->getDC(); if (!dc) { delete data; + data = nullptr; delete thread; - data = 0; - thread = 0; + thread = nullptr; return 0; } + thread->start(); return dc; } -void MTProtoConnection::stop() { - if (data) data->stop(); - if (thread) thread->quit(); +void MTProtoConnection::kill() { + t_assert(data != nullptr && thread != nullptr); + data->stop(); + data = nullptr; // will be deleted in thread::finished signal + thread->quit(); + _mtp_internal::queueQuittingConnection(this); } -void MTProtoConnection::stopped() { - if (thread) thread->deleteLater(); - if (data) data->deleteLater(); - thread = 0; - data = 0; - delete this; +void MTProtoConnection::waitTillFinish() { + t_assert(data == nullptr && thread != nullptr); + + thread->wait(); + delete thread; + thread = nullptr; } int32 MTProtoConnection::state() const { - if (!data) return Disconnected; + t_assert(data != nullptr && thread != nullptr); return data->getState(); } QString MTProtoConnection::transport() const { - if (!data) return QString(); + t_assert(data != nullptr && thread != nullptr); return data->transport(); } +MTProtoConnection::~MTProtoConnection() { + t_assert(data == nullptr && thread == nullptr); +} + namespace { mtpBuffer _handleHttpResponse(QNetworkReply *reply) { QByteArray response = reply->readAll(); @@ -1311,30 +1318,31 @@ void MTProtoConnectionPrivate::destroyConn(MTPabstractConnection **conn) { } } -MTProtoConnectionPrivate::MTProtoConnectionPrivate(QThread *thread, MTProtoConnection *owner, MTPSessionData *data, uint32 _dc) - : QObject(0) - , _state(MTProtoConnection::Disconnected) - , _needSessionReset(false) - , dc(_dc) - , _owner(owner) - , _conn(0), _conn4(0), _conn6(0) - , retryTimeout(1) - , oldConnection(true) - , _waitForReceived(MTPMinReceiveDelay) - , _waitForConnected(MTPMinConnectDelay) - , firstSentAt(-1) - , _pingId(0) - , _pingIdToSend(0) - , _pingSendAt(0) - , _pingMsgId(0) - , restarted(false) - , keyId(0) +MTProtoConnectionPrivate::MTProtoConnectionPrivate(QThread *thread, MTProtoConnection *owner, MTPSessionData *data, uint32 _dc) : QObject(0) +, _state(MTProtoConnection::Disconnected) +, _needSessionReset(false) +, dc(_dc) +, _owner(owner) +, _conn(0) +, _conn4(0) +, _conn6(0) +, retryTimeout(1) +, oldConnection(true) +, _waitForReceived(MTPMinReceiveDelay) +, _waitForConnected(MTPMinConnectDelay) +, firstSentAt(-1) +, _pingId(0) +, _pingIdToSend(0) +, _pingSendAt(0) +, _pingMsgId(0) +, restarted(false) +, _finished(false) +, keyId(0) // , sessionDataMutex(QReadWriteLock::Recursive) - , sessionData(data) - , myKeyLock(false) - , authKeyData(0) - , authKeyStrings(0) { - +, sessionData(data) +, myKeyLock(false) +, authKeyData(0) +, authKeyStrings(0) { oldConnectionTimer.moveToThread(thread); _waitForConnectedTimer.moveToThread(thread); _waitForReceivedTimer.moveToThread(thread); @@ -1357,6 +1365,7 @@ MTProtoConnectionPrivate::MTProtoConnectionPrivate(QThread *thread, MTProtoConne connect(thread, SIGNAL(started()), this, SLOT(socketStart())); connect(thread, SIGNAL(finished()), this, SLOT(doFinish())); + connect(this, SIGNAL(finished(MTProtoConnection*)), _mtp_internal::globalSlotCarrier(), SLOT(connectionFinished(MTProtoConnection*)), Qt::QueuedConnection); connect(&retryTimer, SIGNAL(timeout()), this, SLOT(retryByTimer())); connect(&_waitForConnectedTimer, SIGNAL(timeout()), this, SLOT(onWaitConnectedFailed())); @@ -1966,6 +1975,10 @@ void MTProtoConnectionPrivate::restartNow() { } void MTProtoConnectionPrivate::socketStart(bool afterConfig) { + if (_finished) { + DEBUG_LOG(("MTP Error: socketStart() called for finished connection!")); + return; + } bool isDldDc = (dc >= MTP::dldStart) && (dc < MTP::dldEnd); if (isDldDc) { // using media_only addresses only if key for this dc is already created QReadLocker lockFinished(&sessionDataMutex); @@ -2231,7 +2244,9 @@ void MTProtoConnectionPrivate::doDisconnect() { void MTProtoConnectionPrivate::doFinish() { doDisconnect(); - _owner->stopped(); + _finished = true; + emit finished(_owner); + deleteLater(); } void MTProtoConnectionPrivate::handleReceived() { @@ -3928,7 +3943,7 @@ void MTProtoConnectionPrivate::unlockKey() { } MTProtoConnectionPrivate::~MTProtoConnectionPrivate() { - doDisconnect(); + t_assert(_finished && _conn == nullptr && _conn4 == nullptr && _conn6 == nullptr); } void MTProtoConnectionPrivate::stop() { @@ -3939,9 +3954,6 @@ void MTProtoConnectionPrivate::stop() { sessionData->keyMutex()->unlock(); myKeyLock = false; } - sessionData = 0; + sessionData = nullptr; } } - -MTProtoConnection::~MTProtoConnection() { -} diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.h b/Telegram/SourceFiles/mtproto/mtpConnection.h index 1d2d684cf7d21f..8ac08b94bd3a7b 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.h +++ b/Telegram/SourceFiles/mtproto/mtpConnection.h @@ -58,11 +58,13 @@ class MTPThread : public QThread { Q_OBJECT public: - MTPThread(QObject *parent = 0); + MTPThread(); uint32 getThreadId() const; + ~MTPThread(); private: - uint32 threadId; + uint32 _threadId; + }; class MTProtoConnection { @@ -75,8 +77,8 @@ class MTProtoConnection { MTProtoConnection(); int32 start(MTPSessionData *data, int32 dc = 0); // return dc - void stop(); - void stopped(); + void kill(); + void waitTillFinish(); ~MTProtoConnection(); enum { @@ -358,6 +360,8 @@ class MTProtoConnectionPrivate : public QObject { void resendManyAsync(QVector msgIds, quint64 msCanWait, bool forceContainer, bool sendMsgStateInfo); void resendAllAsync(); + void finished(MTProtoConnection *connection); + public slots: void retryByTimer(); @@ -466,7 +470,7 @@ public slots: template bool readResponseNotSecure(TResponse &response); - bool restarted; + bool restarted, _finished; uint64 keyId; QReadWriteLock sessionDataMutex; diff --git a/Telegram/SourceFiles/mtproto/mtpSession.cpp b/Telegram/SourceFiles/mtproto/mtpSession.cpp index 54ed49cb91b791..a6d6d918cfdcda 100644 --- a/Telegram/SourceFiles/mtproto/mtpSession.cpp +++ b/Telegram/SourceFiles/mtproto/mtpSession.cpp @@ -66,7 +66,8 @@ void MTPSessionData::clear() { } -MTProtoSession::MTProtoSession() : QObject() +MTProtoSession::MTProtoSession(int32 dcenter) : QObject() +, _connection(0) , _killed(false) , _needToReceive(false) , data(this) @@ -75,9 +76,6 @@ MTProtoSession::MTProtoSession() : QObject() , msSendCall(0) , msWait(0) , _ping(false) { -} - -void MTProtoSession::start(int32 dcenter) { if (_killed) { DEBUG_LOG(("Session Error: can't start a killed session")); return; @@ -96,37 +94,32 @@ void MTProtoSession::start(int32 dcenter) { MTProtoDCMap &dcs(mtpDCMap()); - connections.reserve(cConnectionsInSession()); - for (uint32 i = 0; i < cConnectionsInSession(); ++i) { - connections.push_back(new MTProtoConnection()); - dcWithShift = connections.back()->start(&data, dcenter); - if (!dcWithShift) { - for (MTProtoConnections::const_iterator j = connections.cbegin(), e = connections.cend(); j != e; ++j) { - delete *j; - } - connections.clear(); - DEBUG_LOG(("Session Info: could not start connection %1 to dc %2").arg(i).arg(dcenter)); - return; + _connection = new MTProtoConnection(); + dcWithShift = _connection->start(&data, dcenter); + if (!dcWithShift) { + delete _connection; + _connection = 0; + DEBUG_LOG(("Session Info: could not start connection to dc %1").arg(dcenter)); + return; + } + if (!dc) { + dcenter = dcWithShift; + int32 dcId = dcWithShift % _mtp_internal::dcShift; + MTProtoDCMap::const_iterator dcIndex = dcs.constFind(dcId); + if (dcIndex == dcs.cend()) { + dc = MTProtoDCPtr(new MTProtoDC(dcId, mtpAuthKeyPtr())); + dcs.insert(dcWithShift % _mtp_internal::dcShift, dc); + } else { + dc = dcIndex.value(); } - if (!dc) { - dcenter = dcWithShift; - int32 dcId = dcWithShift % _mtp_internal::dcShift; - MTProtoDCMap::const_iterator dcIndex = dcs.constFind(dcId); - if (dcIndex == dcs.cend()) { - dc = MTProtoDCPtr(new MTProtoDC(dcId, mtpAuthKeyPtr())); - dcs.insert(dcWithShift % _mtp_internal::dcShift, dc); - } else { - dc = dcIndex.value(); - } - ReadLockerAttempt lock(keyMutex()); - data.setKey(lock ? dc->getKey() : mtpAuthKeyPtr(0)); - if (lock && dc->connectionInited()) { - data.setLayerWasInited(true); - } - connect(dc.data(), SIGNAL(authKeyCreated()), this, SLOT(authKeyCreatedForDC()), Qt::QueuedConnection); - connect(dc.data(), SIGNAL(layerWasInited(bool)), this, SLOT(layerWasInitedForDC(bool)), Qt::QueuedConnection); + ReadLockerAttempt lock(keyMutex()); + data.setKey(lock ? dc->getKey() : mtpAuthKeyPtr(0)); + if (lock && dc->connectionInited()) { + data.setLayerWasInited(true); } + connect(dc.data(), SIGNAL(authKeyCreated()), this, SLOT(authKeyCreatedForDC()), Qt::QueuedConnection); + connect(dc.data(), SIGNAL(layerWasInited(bool)), this, SLOT(layerWasInitedForDC(bool)), Qt::QueuedConnection); } } @@ -139,10 +132,14 @@ void MTProtoSession::restart() { } void MTProtoSession::stop() { + if (_killed) { + DEBUG_LOG(("Session Error: can't kill a killed session")); + return; + } DEBUG_LOG(("Session Info: stopping session dcWithShift %1").arg(dcWithShift)); - while (!connections.isEmpty()) { - connections.back()->stop(); - connections.pop_back(); + if (_connection) { + _connection->kill(); + _connection = 0; } } @@ -194,22 +191,17 @@ void MTProtoSession::needToResumeAndSend() { DEBUG_LOG(("Session Info: can't resume a killed session")); return; } - if (connections.isEmpty()) { + if (!_connection) { DEBUG_LOG(("Session Info: resuming session dcWithShift %1").arg(dcWithShift)); MTProtoDCMap &dcs(mtpDCMap()); - connections.reserve(cConnectionsInSession()); - for (uint32 i = 0; i < cConnectionsInSession(); ++i) { - connections.push_back(new MTProtoConnection()); - if (!connections.back()->start(&data, dcWithShift)) { - for (MTProtoConnections::const_iterator j = connections.cbegin(), e = connections.cend(); j != e; ++j) { - delete *j; - } - connections.clear(); - DEBUG_LOG(("Session Info: could not start connection %1 to dcWithShift %2").arg(i).arg(dcWithShift)); - dcWithShift = 0; - return; - } + _connection = new MTProtoConnection(); + if (!_connection->start(&data, dcWithShift)) { + delete _connection; + _connection = 0; + DEBUG_LOG(("Session Info: could not start connection to dcWithShift %1").arg(dcWithShift)); + dcWithShift = 0; + return; } } if (_ping) { @@ -324,12 +316,13 @@ void MTProtoSession::ping() { } int32 MTProtoSession::requestState(mtpRequestId requestId) const { - MTProtoConnections::const_iterator j = connections.cbegin(), e = connections.cend(); int32 result = MTP::RequestSent; - for (; j != e; ++j) { - int32 s = (*j)->state(); + + bool connected = false; + if (_connection) { + int32 s = _connection->state(); if (s == MTProtoConnection::Connected) { - break; + connected = true; } else if (s == MTProtoConnection::Connecting || s == MTProtoConnection::Disconnected) { if (result < 0 || result == MTP::RequestSent) { result = MTP::RequestConnecting; @@ -340,7 +333,7 @@ int32 MTProtoSession::requestState(mtpRequestId requestId) const { } } } - if (j == e) { // no one is connected + if (!connected) { return result; } if (!requestId) return MTP::RequestSent; @@ -356,10 +349,10 @@ int32 MTProtoSession::requestState(mtpRequestId requestId) const { } int32 MTProtoSession::getState() const { - MTProtoConnections::const_iterator j = connections.cbegin(), e = connections.cend(); int32 result = -86400000; - for (; j != e; ++j) { - int32 s = (*j)->state(); + + if (_connection) { + int32 s = _connection->state(); if (s == MTProtoConnection::Connected) { return s; } else if (s == MTProtoConnection::Connecting || s == MTProtoConnection::Disconnected) { @@ -379,12 +372,7 @@ int32 MTProtoSession::getState() const { } QString MTProtoSession::transport() const { - MTProtoConnections::const_iterator j = connections.cbegin(), e = connections.cend(); - for (; j != e; ++j) { - QString s = (*j)->transport(); - if (!s.isEmpty()) return s; - } - return QString(); + return _connection ? _connection->transport() : QString(); } mtpRequestId MTProtoSession::resend(quint64 msgId, quint64 msCanWait, bool forceContainer, bool sendMsgStateInfo) { @@ -507,6 +495,10 @@ int32 MTProtoSession::getDcWithShift() const { } void MTProtoSession::tryToReceive() { + if (_killed) { + DEBUG_LOG(("Session Error: can't receive in a killed session")); + return; + } if (_mtp_internal::paused()) { _needToReceive = true; return; @@ -537,9 +529,7 @@ void MTProtoSession::tryToReceive() { } MTProtoSession::~MTProtoSession() { - for (MTProtoConnections::const_iterator i = connections.cbegin(), e = connections.cend(); i != e; ++i) { - delete *i; - } + t_assert(_connection == 0); } MTPrpcError rpcClientError(const QString &type, const QString &description) { diff --git a/Telegram/SourceFiles/mtproto/mtpSession.h b/Telegram/SourceFiles/mtproto/mtpSession.h index 23db4fba382117..a635372f1247e6 100644 --- a/Telegram/SourceFiles/mtproto/mtpSession.h +++ b/Telegram/SourceFiles/mtproto/mtpSession.h @@ -28,7 +28,7 @@ class MTProtoSession; class MTPSessionData { public: - + MTPSessionData(MTProtoSession *creator) : _session(0), _salt(0) , _messagesSent(0), _fakeRequestId(-2000000000) @@ -222,9 +222,8 @@ class MTProtoSession : public QObject { public: - MTProtoSession(); + MTProtoSession(int32 dcenter); - void start(int32 dcenter = 0); void restart(); void stop(); void kill(); @@ -278,13 +277,12 @@ public slots: void sendMsgsStateInfo(quint64 msgId, QByteArray data); private: - - typedef QList MTProtoConnections; - MTProtoConnections connections; + + MTProtoConnection *_connection; bool _killed; bool _needToReceive; - + MTPSessionData data; int32 dcWithShift; @@ -304,7 +302,3 @@ inline QReadWriteLock *MTPSessionData::keyMutex() const { } MTPrpcError rpcClientError(const QString &type, const QString &description = QString()); - -// here - -typedef QSharedPointer MTProtoSessionPtr; diff --git a/Telegram/SourceFiles/pspecific.h b/Telegram/SourceFiles/pspecific.h index 7362f15da0ea0b..7003daa426ef0e 100644 --- a/Telegram/SourceFiles/pspecific.h +++ b/Telegram/SourceFiles/pspecific.h @@ -38,10 +38,8 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org namespace PlatformSpecific { - struct Initializer { - Initializer(); - ~Initializer(); - }; + void start(); + void finish(); namespace ThirdParty { void start(); diff --git a/Telegram/SourceFiles/pspecific_linux.cpp b/Telegram/SourceFiles/pspecific_linux.cpp index 650c51f10a31bb..2134e97dd17ddf 100644 --- a/Telegram/SourceFiles/pspecific_linux.cpp +++ b/Telegram/SourceFiles/pspecific_linux.cpp @@ -1237,10 +1237,10 @@ void psShowInFolder(const QString &name) { namespace PlatformSpecific { - Initializer::Initializer() { + void start() { } - Initializer::~Initializer() { + void finish() { delete _psEventFilter; _psEventFilter = 0; } diff --git a/Telegram/SourceFiles/pspecific_mac.cpp b/Telegram/SourceFiles/pspecific_mac.cpp index 854ff00d287a49..f674e84e65f2aa 100644 --- a/Telegram/SourceFiles/pspecific_mac.cpp +++ b/Telegram/SourceFiles/pspecific_mac.cpp @@ -850,11 +850,11 @@ void psShowInFolder(const QString &name) { namespace PlatformSpecific { - Initializer::Initializer() { + void start() { objc_start(); } - Initializer::~Initializer() { + void finish() { delete _psEventFilter; _psEventFilter = 0; diff --git a/Telegram/SourceFiles/pspecific_wnd.cpp b/Telegram/SourceFiles/pspecific_wnd.cpp index 1a2e4614003278..3dc358887b4c03 100644 --- a/Telegram/SourceFiles/pspecific_wnd.cpp +++ b/Telegram/SourceFiles/pspecific_wnd.cpp @@ -2159,10 +2159,10 @@ void psShowInFolder(const QString &name) { namespace PlatformSpecific { - Initializer::Initializer() { + void start() { } - Initializer::~Initializer() { + void finish() { delete _psEventFilter; _psEventFilter = 0; diff --git a/Telegram/SourceFiles/settings.h b/Telegram/SourceFiles/settings.h index b57a6b4f1520e5..93524bba88bf38 100644 --- a/Telegram/SourceFiles/settings.h +++ b/Telegram/SourceFiles/settings.h @@ -77,7 +77,6 @@ inline QString cInlineGifBotUsername() { return cTestMode() ? qstr("contextbot") : qstr("gif"); } DeclareSetting(QString, LoggedPhoneNumber); -DeclareReadSetting(uint32, ConnectionsInSession); DeclareSetting(bool, AutoStart); DeclareSetting(bool, StartMinimized); DeclareSetting(bool, StartInTray); diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index 6ad208fd05ca26..f82064666b448c 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,28,1 - PRODUCTVERSION 0,9,28,1 + FILEVERSION 0,9,28,2 + PRODUCTVERSION 0,9,28,2 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.28.1" + VALUE "FileVersion", "0.9.28.2" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.28.1" + VALUE "ProductVersion", "0.9.28.2" END END BLOCK "VarFileInfo" diff --git a/Telegram/Version b/Telegram/Version index e3f6eee41c01ab..c6c53f35a05d58 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -3,4 +3,4 @@ AppVersionStrMajor 0.9 AppVersionStrSmall 0.9.28 AppVersionStr 0.9.28 DevChannel 0 -BetaVersion 9028001 +BetaVersion 9028002 From 616354b8e97266926aa2a55b23954a6e2e9dee80 Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 29 Feb 2016 20:30:18 +0300 Subject: [PATCH 129/133] improved for old version of Qt --- Telegram/SourceFiles/history.cpp | 4 ++-- Telegram/SourceFiles/mtproto/mtp.h | 4 ++-- Telegram/SourceFiles/shortcuts.cpp | 18 +++++++++--------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 30ab9b24e23800..88db017feb270d 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -294,8 +294,8 @@ History::History(const PeerId &peerId) : width(0), height(0) , sendRequestId(0) , textCachedFor(0) , lastItemTextCache(st::dlgRichMinWidth) -, _sortKeyInChatList(0) -, typingText(st::dlgRichMinWidth) { +, typingText(st::dlgRichMinWidth) +, _sortKeyInChatList(0) { if (peer->isChannel() || (peer->isUser() && peer->asUser()->botInfo)) { outboxReadBefore = INT_MAX; } diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index a59c092b972011..14a24470be6676 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -77,11 +77,11 @@ namespace MTP { extern const uint32 cfg; // send(MTPhelp_GetConfig(), MTP::cfg + dc) - for dc enum extern const uint32 lgt; // send(MTPauth_LogOut(), MTP::lgt + dc) - for logout of guest dcs enum - inline const uint32 dld(int32 index) { // send(req, callbacks, MTP::dld(i) + dc) - for download + inline uint32 dld(int32 index) { // send(req, callbacks, MTP::dld(i) + dc) - for download t_assert(index >= 0 && index < MTPDownloadSessionsCount); return (0x10 + index) * _mtp_internal::dcShift; }; - inline const uint32 upl(int32 index) { // send(req, callbacks, MTP::upl[i] + dc) - for upload + inline uint32 upl(int32 index) { // send(req, callbacks, MTP::upl(i) + dc) - for upload t_assert(index >= 0 && index < MTPUploadSessionsCount); return (0x20 + index) * _mtp_internal::dcShift; }; diff --git a/Telegram/SourceFiles/shortcuts.cpp b/Telegram/SourceFiles/shortcuts.cpp index 14d64ffbf2b6a1..dd395f8804a911 100644 --- a/Telegram/SourceFiles/shortcuts.cpp +++ b/Telegram/SourceFiles/shortcuts.cpp @@ -339,10 +339,10 @@ namespace Shortcuts { if (error.error == QJsonParseError::NoError && doc.isArray()) { QJsonArray shortcuts(doc.array()); - if (!shortcuts.isEmpty() && shortcuts.constBegin()->isObject()) { - QJsonObject versionObject(shortcuts.constBegin()->toObject()); + if (!shortcuts.isEmpty() && (*shortcuts.constBegin()).isObject()) { + QJsonObject versionObject((*shortcuts.constBegin()).toObject()); QJsonObject::const_iterator version = versionObject.constFind(qsl("version")); - if (version != versionObject.constEnd() && version->isString() && version->toString() == QString::number(AppVersion)) { + if (version != versionObject.constEnd() && (*version).isString() && (*version).toString() == QString::number(AppVersion)) { defaultValid = true; } } @@ -396,18 +396,18 @@ namespace Shortcuts { QJsonArray shortcuts = doc.array(); int limit = ShortcutsCountLimit; for (QJsonArray::const_iterator i = shortcuts.constBegin(), e = shortcuts.constEnd(); i != e; ++i) { - if (!i->isObject()) { + if (!(*i).isObject()) { DataPtr->errors.push_back(qsl("Bad entry! Error: object expected")); } else { QKeySequence seq; - QJsonObject entry(i->toObject()); + QJsonObject entry((*i).toObject()); QJsonObject::const_iterator keys = entry.constFind(qsl("keys")), command = entry.constFind(qsl("command")); - if (keys == entry.constEnd() || command == entry.constEnd() || !keys->isString() || (!command->isString() && !command->isNull())) { + if (keys == entry.constEnd() || command == entry.constEnd() || !(*keys).isString() || (!(*command).isString() && !(*command).isNull())) { DataPtr->errors.push_back(qsl("Bad entry! {\"keys\": \"...\", \"command\": [ \"...\" | null ]} expected")); - } else if (command->isNull()) { - seq = _removeShortcut(keys->toString()); + } else if ((*command).isNull()) { + seq = _removeShortcut((*keys).toString()); } else { - seq = _setShortcut(keys->toString(), command->toString()); + seq = _setShortcut((*keys).toString(), (*command).toString()); } if (!--limit) { DataPtr->errors.push_back(qsl("Too many entries! Limit is %1").arg(ShortcutsCountLimit)); From 32322c4450d6081dafd7076570dba339e9cfbd22 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Mar 2016 05:36:23 +0300 Subject: [PATCH 130/133] fixed some warnings, added debug logs before thread wait calls --- Telegram/SourceFiles/dialogswidget.h | 14 +++++----- Telegram/SourceFiles/gui/animation.cpp | 1 + Telegram/SourceFiles/historywidget.h | 26 +++++++++---------- Telegram/SourceFiles/localimageloader.cpp | 1 + Telegram/SourceFiles/mainwidget.h | 20 +++++++------- .../SourceFiles/mtproto/mtpConnection.cpp | 1 + .../SourceFiles/mtproto/mtpFileLoader.cpp | 1 + Telegram/SourceFiles/overviewwidget.h | 6 ++--- Telegram/SourceFiles/profilewidget.h | 12 ++++----- 9 files changed, 43 insertions(+), 39 deletions(-) diff --git a/Telegram/SourceFiles/dialogswidget.h b/Telegram/SourceFiles/dialogswidget.h index 6443a08d6022cd..75ef10e494ec6c 100644 --- a/Telegram/SourceFiles/dialogswidget.h +++ b/Telegram/SourceFiles/dialogswidget.h @@ -219,15 +219,15 @@ class DialogsWidget : public TWidget, public RPCSender { void searchReceived(DialogsSearchRequestType type, const MTPmessages_Messages &result, mtpRequestId req); void peopleReceived(const MTPcontacts_Found &result, mtpRequestId req); - void dragEnterEvent(QDragEnterEvent *e); - void dragMoveEvent(QDragMoveEvent *e); - void dragLeaveEvent(QDragLeaveEvent *e); - void dropEvent(QDropEvent *e); + void dragEnterEvent(QDragEnterEvent *e) override; + void dragMoveEvent(QDragMoveEvent *e) override; + void dragLeaveEvent(QDragLeaveEvent *e) override; + void dropEvent(QDropEvent *e) override; void updateDragInScroll(bool inScroll); - void resizeEvent(QResizeEvent *e); - void keyPressEvent(QKeyEvent *e); - void paintEvent(QPaintEvent *e); + void resizeEvent(QResizeEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; + void paintEvent(QPaintEvent *e) override; void searchInPeer(PeerData *peer); diff --git a/Telegram/SourceFiles/gui/animation.cpp b/Telegram/SourceFiles/gui/animation.cpp index c667d28f9ed9b6..1e9af9fe207062 100644 --- a/Telegram/SourceFiles/gui/animation.cpp +++ b/Telegram/SourceFiles/gui/animation.cpp @@ -93,6 +93,7 @@ namespace anim { if (!_clipThreads.isEmpty()) { for (int32 i = 0, l = _clipThreads.size(); i < l; ++i) { _clipThreads.at(i)->quit(); + DEBUG_LOG(("Waiting for clipThread to finish: %1").arg(i)); _clipThreads.at(i)->wait(); delete _clipManagers.at(i); delete _clipThreads.at(i); diff --git a/Telegram/SourceFiles/historywidget.h b/Telegram/SourceFiles/historywidget.h index 786de935307286..bd53f26486b5f2 100644 --- a/Telegram/SourceFiles/historywidget.h +++ b/Telegram/SourceFiles/historywidget.h @@ -423,18 +423,18 @@ class HistoryWidget : public TWidget, public RPCSender { void windowShown(); bool isActive() const; - void resizeEvent(QResizeEvent *e); - void keyPressEvent(QKeyEvent *e); - void mousePressEvent(QMouseEvent *e); - void paintEvent(QPaintEvent *e); - void dragEnterEvent(QDragEnterEvent *e); - void dragLeaveEvent(QDragLeaveEvent *e); - void leaveEvent(QEvent *e); - void dropEvent(QDropEvent *e); - void mouseReleaseEvent(QMouseEvent *e); - void mouseMoveEvent(QMouseEvent *e); - void leaveToChildEvent(QEvent *e); - void contextMenuEvent(QContextMenuEvent *e); + void resizeEvent(QResizeEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; + void mousePressEvent(QMouseEvent *e) override; + void paintEvent(QPaintEvent *e) override; + void dragEnterEvent(QDragEnterEvent *e) override; + void dragLeaveEvent(QDragLeaveEvent *e) override; + void leaveEvent(QEvent *e) override; + void dropEvent(QDropEvent *e) override; + void mouseReleaseEvent(QMouseEvent *e) override; + void mouseMoveEvent(QMouseEvent *e) override; + void leaveToChildEvent(QEvent *e) override; + void contextMenuEvent(QContextMenuEvent *e) override; void updateTopBarSelection(); @@ -542,7 +542,7 @@ class HistoryWidget : public TWidget, public RPCSender { void sendBotCommand(const QString &cmd, MsgId replyTo); bool insertBotCommand(const QString &cmd, bool specialGif); - bool eventFilter(QObject *obj, QEvent *e); + bool eventFilter(QObject *obj, QEvent *e) override; void updateBotKeyboard(History *h = 0); DragState getDragState(const QMimeData *d); diff --git a/Telegram/SourceFiles/localimageloader.cpp b/Telegram/SourceFiles/localimageloader.cpp index 49d0cfaf260be2..4ce85fa758598a 100644 --- a/Telegram/SourceFiles/localimageloader.cpp +++ b/Telegram/SourceFiles/localimageloader.cpp @@ -117,6 +117,7 @@ void TaskQueue::stop() { if (_thread) { _thread->requestInterruption(); _thread->quit(); + DEBUG_LOG(("Waiting for taskThread to finish")); _thread->wait(); delete _worker; delete _thread; diff --git a/Telegram/SourceFiles/mainwidget.h b/Telegram/SourceFiles/mainwidget.h index 660793df49dc6f..f0318a1a4b3abc 100644 --- a/Telegram/SourceFiles/mainwidget.h +++ b/Telegram/SourceFiles/mainwidget.h @@ -39,13 +39,13 @@ class TopBarWidget : public TWidget { TopBarWidget(MainWidget *w); - void enterEvent(QEvent *e); - void enterFromChildEvent(QEvent *e); - void leaveEvent(QEvent *e); - void leaveToChildEvent(QEvent *e); - void paintEvent(QPaintEvent *e); - void mousePressEvent(QMouseEvent *e); - void resizeEvent(QResizeEvent *e); + void enterEvent(QEvent *e) override; + void enterFromChildEvent(QEvent *e) override; + void leaveEvent(QEvent *e) override; + void leaveToChildEvent(QEvent *e) override; + void paintEvent(QPaintEvent *e) override; + void mousePressEvent(QMouseEvent *e) override; + void resizeEvent(QResizeEvent *e) override; void step_appearance(float64 ms, bool timer); void enableShadow(bool enable = true); @@ -201,9 +201,9 @@ class MainWidget : public TWidget, public RPCSender { MainWidget(Window *window); - void paintEvent(QPaintEvent *e); - void resizeEvent(QResizeEvent *e); - void keyPressEvent(QKeyEvent *e); + void paintEvent(QPaintEvent *e) override; + void resizeEvent(QResizeEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; void updateAdaptiveLayout(); bool needBackButton(); diff --git a/Telegram/SourceFiles/mtproto/mtpConnection.cpp b/Telegram/SourceFiles/mtproto/mtpConnection.cpp index ae2fd23731c23b..2a089a14f99b6b 100644 --- a/Telegram/SourceFiles/mtproto/mtpConnection.cpp +++ b/Telegram/SourceFiles/mtproto/mtpConnection.cpp @@ -323,6 +323,7 @@ void MTProtoConnection::kill() { void MTProtoConnection::waitTillFinish() { t_assert(data == nullptr && thread != nullptr); + DEBUG_LOG(("Waiting for connectionThread to finish")); thread->wait(); delete thread; thread = nullptr; diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index 6fdf6c5e101679..e53c69dce96f98 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -741,6 +741,7 @@ void reinitWebLoadManager() { void stopWebLoadManager() { if (webLoadManager()) { _webLoadThread->quit(); + DEBUG_LOG(("Waiting for webloadThread to finish")); _webLoadThread->wait(); delete _webLoadManager; delete _webLoadMainManager; diff --git a/Telegram/SourceFiles/overviewwidget.h b/Telegram/SourceFiles/overviewwidget.h index 968ccd773b1319..2b13596be1d7a4 100644 --- a/Telegram/SourceFiles/overviewwidget.h +++ b/Telegram/SourceFiles/overviewwidget.h @@ -245,9 +245,9 @@ class OverviewWidget : public TWidget, public RPCSender { void clear(); - void resizeEvent(QResizeEvent *e); - void paintEvent(QPaintEvent *e); - void contextMenuEvent(QContextMenuEvent *e); + void resizeEvent(QResizeEvent *e) override; + void paintEvent(QPaintEvent *e) override; + void contextMenuEvent(QContextMenuEvent *e) override; void scrollBy(int32 add); void scrollReset(); diff --git a/Telegram/SourceFiles/profilewidget.h b/Telegram/SourceFiles/profilewidget.h index 89da54afb0bc12..d01c91b17d9404 100644 --- a/Telegram/SourceFiles/profilewidget.h +++ b/Telegram/SourceFiles/profilewidget.h @@ -222,12 +222,12 @@ class ProfileWidget : public TWidget, public RPCSender { ProfileWidget(QWidget *parent, PeerData *peer); - void resizeEvent(QResizeEvent *e); - void mousePressEvent(QMouseEvent *e); - void paintEvent(QPaintEvent *e); - void dragEnterEvent(QDragEnterEvent *e); - void dropEvent(QDropEvent *e); - void keyPressEvent(QKeyEvent *e); + void resizeEvent(QResizeEvent *e) override; + void mousePressEvent(QMouseEvent *e) override; + void paintEvent(QPaintEvent *e) override; + void dragEnterEvent(QDragEnterEvent *e) override; + void dropEvent(QDropEvent *e) override; + void keyPressEvent(QKeyEvent *e) override; void paintTopBar(QPainter &p, float64 over, int32 decreaseWidth); void topBarClick(); From ebfeeb6872b8e05c9da916950655cd79dc2e3fea Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Mar 2016 05:46:34 +0300 Subject: [PATCH 131/133] dev version 0.9.29 --- Telegram/SourceFiles/application.cpp | 5 +++-- Telegram/SourceFiles/config.h | 8 ++++---- Telegram/Telegram.plist | 2 +- Telegram/Telegram.rc | 8 ++++---- Telegram/Telegram.xcodeproj/project.pbxproj | 12 ++++++------ Telegram/Version | 10 +++++----- 6 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index fca1d7df402d3a..6989c9b2d63703 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -1035,8 +1035,9 @@ void AppClass::checkMapVersion() { if (Local::oldMapVersion() < AppVersion) { if (Local::oldMapVersion()) { QString versionFeatures; - if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9027) { - versionFeatures = QString::fromUtf8("\xe2\x80\x94 Edit your messages in channels and supergroups.\n\xe2\x80\x94 Share links to specific posts in channels via the post context menu.\n\xe2\x80\x94 Add admin signatures to messages in channels.\n\xe2\x80\x94 Send silent messages in channels that will not notify members. Useful for non-urgent or late night posting.");// .replace('@', qsl("@") + QChar(0x200D)); + if ((cDevVersion() || cBetaVersion()) && Local::oldMapVersion() < 9029) { + QString ctrl = (cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? qsl("Cmd") : qsl("Ctrl"); + versionFeatures = QString::fromUtf8("\xe2\x80\x94 %1+W or %2+F4 for close window\n\xe2\x80\x94 %3+L to lock Telegram if you use a local passcode\n\xe2\x80\x94 Bug fixes and other minor improvements").arg(ctrl).arg(ctrl).arg(ctrl);// .replace('@', qsl("@") + QChar(0x200D)); } else if (Local::oldMapVersion() < 9027) { versionFeatures = lang(lng_new_version_text).trimmed(); } else { diff --git a/Telegram/SourceFiles/config.h b/Telegram/SourceFiles/config.h index 5e68c9995f9ec2..9e4060c8b8dfcb 100644 --- a/Telegram/SourceFiles/config.h +++ b/Telegram/SourceFiles/config.h @@ -20,10 +20,10 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org */ #pragma once -static const int32 AppVersion = 9028; -static const wchar_t *AppVersionStr = L"0.9.28"; -static const bool DevVersion = false; -#define BETA_VERSION (9028002ULL) // just comment this line to build public version +static const int32 AppVersion = 9029; +static const wchar_t *AppVersionStr = L"0.9.29"; +static const bool DevVersion = true; +//#define BETA_VERSION (9028002ULL) // just comment this line to build public version static const wchar_t *AppNameOld = L"Telegram Win (Unofficial)"; static const wchar_t *AppName = L"Telegram Desktop"; diff --git a/Telegram/Telegram.plist b/Telegram/Telegram.plist index cf5bb6c5ea4ba5..d4df84bc4cd60a 100644 --- a/Telegram/Telegram.plist +++ b/Telegram/Telegram.plist @@ -11,7 +11,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 0.9.28 + 0.9.29 CFBundleSignature ???? CFBundleURLTypes diff --git a/Telegram/Telegram.rc b/Telegram/Telegram.rc index f82064666b448c..4a040b97207e75 100644 --- a/Telegram/Telegram.rc +++ b/Telegram/Telegram.rc @@ -34,8 +34,8 @@ IDI_ICON1 ICON "SourceFiles\\art\\icon256.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,9,28,2 - PRODUCTVERSION 0,9,28,2 + FILEVERSION 0,9,29,0 + PRODUCTVERSION 0,9,29,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -51,10 +51,10 @@ BEGIN BLOCK "040904b0" BEGIN VALUE "CompanyName", "Telegram Messenger LLP" - VALUE "FileVersion", "0.9.28.2" + VALUE "FileVersion", "0.9.29.0" VALUE "LegalCopyright", "Copyright (C) 2014-2016" VALUE "ProductName", "Telegram Desktop" - VALUE "ProductVersion", "0.9.28.2" + VALUE "ProductVersion", "0.9.29.0" END END BLOCK "VarFileInfo" diff --git a/Telegram/Telegram.xcodeproj/project.pbxproj b/Telegram/Telegram.xcodeproj/project.pbxproj index 496b74e15ba2f0..f33e49f056805e 100644 --- a/Telegram/Telegram.xcodeproj/project.pbxproj +++ b/Telegram/Telegram.xcodeproj/project.pbxproj @@ -1726,7 +1726,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.28; + CURRENT_PROJECT_VERSION = 0.9.29; DEBUG_INFORMATION_FORMAT = dwarf; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -1745,7 +1745,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; COPY_PHASE_STRIP = YES; - CURRENT_PROJECT_VERSION = 0.9.28; + CURRENT_PROJECT_VERSION = 0.9.29; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = fast; GCC_PREFIX_HEADER = ./SourceFiles/stdafx.h; @@ -1774,10 +1774,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.28; + CURRENT_PROJECT_VERSION = 0.9.29; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.28; + DYLIB_CURRENT_VERSION = 0.9.29; ENABLE_STRICT_OBJC_MSGSEND = YES; FRAMEWORK_SEARCH_PATHS = ""; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; @@ -1915,10 +1915,10 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 0.9.28; + CURRENT_PROJECT_VERSION = 0.9.29; DEBUG_INFORMATION_FORMAT = dwarf; DYLIB_COMPATIBILITY_VERSION = 0.9; - DYLIB_CURRENT_VERSION = 0.9.28; + DYLIB_CURRENT_VERSION = 0.9.29; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; FRAMEWORK_SEARCH_PATHS = ""; diff --git a/Telegram/Version b/Telegram/Version index c6c53f35a05d58..a89b5197dda141 100644 --- a/Telegram/Version +++ b/Telegram/Version @@ -1,6 +1,6 @@ -AppVersion 9028 +AppVersion 9029 AppVersionStrMajor 0.9 -AppVersionStrSmall 0.9.28 -AppVersionStr 0.9.28 -DevChannel 0 -BetaVersion 9028002 +AppVersionStrSmall 0.9.29 +AppVersionStr 0.9.29 +DevChannel 1 +BetaVersion 0 9028002 From cde264e5a1af9ff4803294f1809e64285b4bcd07 Mon Sep 17 00:00:00 2001 From: John Preston Date: Tue, 1 Mar 2016 21:41:06 +0200 Subject: [PATCH 132/133] fixed crash in mtpFileLoader delayed destroy, finishing breakpad at the very end, 0.9.29 dev --- Telegram/SourceFiles/application.cpp | 19 +-------------- Telegram/SourceFiles/main.cpp | 24 +++++++++++++++++-- Telegram/SourceFiles/mtproto/mtp.cpp | 4 +++- Telegram/SourceFiles/mtproto/mtp.h | 4 +--- .../SourceFiles/mtproto/mtpFileLoader.cpp | 2 +- Telegram/SourceFiles/structs.cpp | 6 +++++ 6 files changed, 34 insertions(+), 25 deletions(-) diff --git a/Telegram/SourceFiles/application.cpp b/Telegram/SourceFiles/application.cpp index 6989c9b2d63703..2d3bc56f1a003f 100644 --- a/Telegram/SourceFiles/application.cpp +++ b/Telegram/SourceFiles/application.cpp @@ -344,23 +344,6 @@ void Application::closeApplication() { if (_updateThread) _updateThread->quit(); _updateThread = 0; #endif - - DEBUG_LOG(("Telegram finished, result: %1").arg("unknown")); - -#ifndef TDESKTOP_DISABLE_AUTOUPDATE - if (cRestartingUpdate()) { - DEBUG_LOG(("Application Info: executing updater to install update..")); - psExecUpdater(); - } else -#endif - if (cRestarting()) { - DEBUG_LOG(("Application Info: executing Telegram, because of restart..")); - psExecTelegram(); - } - - SignalHandlers::finish(); - PlatformSpecific::finish(); - Logs::finish(); } #ifndef TDESKTOP_DISABLE_AUTOUPDATE @@ -1067,7 +1050,7 @@ AppClass::~AppClass() { App::deinitMedia(); deinitImageLinkManager(); - MTP::stop(); + MTP::finish(); AppObject = 0; deleteAndMark(_uploader); diff --git a/Telegram/SourceFiles/main.cpp b/Telegram/SourceFiles/main.cpp index 2cbe3e078d10a3..571ef6f72a3df2 100644 --- a/Telegram/SourceFiles/main.cpp +++ b/Telegram/SourceFiles/main.cpp @@ -43,6 +43,26 @@ int main(int argc, char *argv[]) { //int a_argc = a_cnt + 1; //char *a_argv[a_cnt + 1] = { argv[0], args[0].data() }; - Application app(argc, argv); - return app.exec(); + int result = 0; + { + Application app(argc, argv); + result = app.exec(); + } + + DEBUG_LOG(("Telegram finished, result: %1").arg(result)); + +#ifndef TDESKTOP_DISABLE_AUTOUPDATE + if (cRestartingUpdate()) { + DEBUG_LOG(("Application Info: executing updater to install update..")); + psExecUpdater(); + } else +#endif + if (cRestarting()) { + DEBUG_LOG(("Application Info: executing Telegram, because of restart..")); + psExecTelegram(); + } + + SignalHandlers::finish(); + PlatformSpecific::finish(); + Logs::finish(); } diff --git a/Telegram/SourceFiles/mtproto/mtp.cpp b/Telegram/SourceFiles/mtproto/mtp.cpp index 4c2ce87fb20a7b..86493e5224aba0 100644 --- a/Telegram/SourceFiles/mtproto/mtp.cpp +++ b/Telegram/SourceFiles/mtproto/mtp.cpp @@ -758,6 +758,8 @@ namespace MTP { } void cancel(mtpRequestId requestId) { + if (!_started) return; + mtpMsgId msgId = 0; requestsDelays.remove(requestId); { @@ -831,7 +833,7 @@ namespace MTP { return MTP::RequestConnecting; } - void stop() { + void finish() { for (Sessions::iterator i = sessions.begin(), e = sessions.end(); i != e; ++i) { i.value()->kill(); delete i.value(); diff --git a/Telegram/SourceFiles/mtproto/mtp.h b/Telegram/SourceFiles/mtproto/mtp.h index 14a24470be6676..689665b81bcda7 100644 --- a/Telegram/SourceFiles/mtproto/mtp.h +++ b/Telegram/SourceFiles/mtproto/mtp.h @@ -132,9 +132,7 @@ namespace MTP { }; int32 state(mtpRequestId req); // < 0 means waiting for such count of ms - void defOnError(const RPCError &err); - - void stop(); + void finish(); void authed(int32 uid); int32 authedId(); diff --git a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp index e53c69dce96f98..f260f2ca439f1a 100644 --- a/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp +++ b/Telegram/SourceFiles/mtproto/mtpFileLoader.cpp @@ -527,7 +527,7 @@ void mtpFileLoader::cancelRequests() { _queue->queries -= _requests.size(); _requests.clear(); - if (!_queue->queries) { + if (!_queue->queries && App::app()) { App::app()->killDownloadSessionsStart(_dc); } } diff --git a/Telegram/SourceFiles/structs.cpp b/Telegram/SourceFiles/structs.cpp index 3664b9bf0520cf..214622fccd2fa6 100644 --- a/Telegram/SourceFiles/structs.cpp +++ b/Telegram/SourceFiles/structs.cpp @@ -1393,6 +1393,12 @@ void DocumentData::recountIsImage() { DocumentData::~DocumentData() { delete _additional; + + if (loading()) { + _loader->deleteLater(); + _loader->stop(); + _loader = 0; + } } WebPageData::WebPageData(const WebPageId &id, WebPageType type, const QString &url, const QString &displayUrl, const QString &siteName, const QString &title, const QString &description, PhotoData *photo, DocumentData *doc, int32 duration, const QString &author, int32 pendingTill) : id(id) From 4d3762c69633288b3c3705ef51532b1bb33720bb Mon Sep 17 00:00:00 2001 From: The Gitter Badger Date: Wed, 7 Dec 2016 22:17:40 +0000 Subject: [PATCH 133/133] Add Gitter badge --- README.md | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 4f9b406f713b3b..7f626a529431f1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # [Telegram Desktop][telegram_desktop] – Official Messenger +[![Join the chat at https://gitter.im/tdesktop/Lobby](https://badges.gitter.im/tdesktop/Lobby.svg)](https://gitter.im/tdesktop/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) + This is the complete source code and the build instructions for the alpha version of the official desktop client for the [Telegram][telegram] messenger, based on the [Telegram API][telegram_api] and the [MTProto][telegram_proto] secure protocol. The source code is published under GPLv3 with OpenSSL exception, the license is available [here][license]. @@ -20,8 +22,6 @@ The source code is published under GPLv3 with OpenSSL exception, the license is * libexif 0.6.20 ([LGPL](https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html)) * LZMA SDK 9.20 ([public domain](http://www.7-zip.org/sdk.html)) * liblzma ([public domain](http://tukaani.org/xz/)) -* Google Breakpad ([License](https://chromium.googlesource.com/breakpad/breakpad/+/master/LICENSE)) -* Google Crashpad ([Apache License 2.0](https://chromium.googlesource.com/crashpad/crashpad/+/master/LICENSE)) * OpenAL Soft ([LGPL](http://kcat.strangesoft.net/openal.html)) * Opus codec ([BSD license](http://www.opus-codec.org/license/)) * FFmpeg ([LGPL](https://www.ffmpeg.org/legal.html)) @@ -33,7 +33,6 @@ The source code is published under GPLv3 with OpenSSL exception, the license is * [XCode 7][xcode] * [XCode 7 for OS X 10.6 and 10.7][xcode_old] * [Qt Creator 3.5.1 Ubuntu][qtcreator] -* [Using qmake on GNU/Linux][qmake] ## Projects in Telegram solution @@ -49,6 +48,21 @@ The source code is published under GPLv3 with OpenSSL exception, the license is Compiles given files to single update file, compresses it with lzma and signs with a private key. It is not built in **Debug** and **Release** configurations of Telegram solution, because private key is inaccessible. +* ### Prepare + + Prepares a release for deployment, puts all current files to deploy/{version} folder. + + **Windows**: + * tsetup{version}.exe installer + * Telegram.exe + * Telegram.pdb (debug info for crash minidumps view) + * tupdate{updversion} binary lzma update archive + + **Mac**: + * tsetup{version}.dmg + * Telegram.app + * tmacupd{updversion} binary lzma update archive + * ### MetaEmoji Creates four sprites and text2emoji replace code @@ -90,8 +104,7 @@ The source code is published under GPLv3 with OpenSSL exception, the license is [telegram_api]: https://core.telegram.org [telegram_proto]: https://core.telegram.org/mtproto [license]: LICENSE -[msvc]: doc/building-msvc.md -[xcode]: doc/building-xcode.md -[xcode_old]: doc/building-xcode-old.md -[qtcreator]: doc/building-qtcreator.md -[qmake]: doc/building-qmake.md +[msvc]: MSVC.md +[xcode]: XCODE.md +[xcode_old]: XCODEold.md +[qtcreator]: QTCREATOR.md