diff --git a/.appveyor/install.bat b/.appveyor/install.bat index cf2e8e021..420667e0a 100644 --- a/.appveyor/install.bat +++ b/.appveyor/install.bat @@ -63,7 +63,7 @@ GOTO:EOF ) echo %BUILD_VERSION% | findstr /C:"disable_crash_reports">nul && ( - set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,TDESKTOP_DISABLE_CRASH_REPORTS + set TDESKTOP_BUILD_DEFINES=%TDESKTOP_BUILD_DEFINES%,DESKTOP_APP_DISABLE_CRASH_REPORTS ) echo %BUILD_VERSION% | findstr /C:"disable_network_proxy">nul && ( diff --git a/.travis/build.sh b/.travis/build.sh index e9665847b..91d9e06b1 100755 --- a/.travis/build.sh +++ b/.travis/build.sh @@ -107,7 +107,7 @@ build() { fi if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then - GYP_DEFINES+=",TDESKTOP_DISABLE_CRASH_REPORTS" + GYP_DEFINES+=",DESKTOP_APP_DISABLE_CRASH_REPORTS" fi if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then diff --git a/Telegram/SourceFiles/core/crash_reports.cpp b/Telegram/SourceFiles/core/crash_reports.cpp index 5019eecb1..f4b11d6ab 100644 --- a/Telegram/SourceFiles/core/crash_reports.cpp +++ b/Telegram/SourceFiles/core/crash_reports.cpp @@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #include #include -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS // see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/ #ifdef Q_OS_WIN @@ -49,7 +49,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #endif // Q_OS_LINUX64 || Q_OS_LINUX32 -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS namespace CrashReports { namespace { @@ -60,7 +60,7 @@ using AnnotationRefs = std::map; Annotations ProcessAnnotations; AnnotationRefs ProcessAnnotationRefs; -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS QString ReportPath; FILE *ReportFile = nullptr; @@ -317,7 +317,7 @@ bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context, } #endif // !Q_OS_MAC || MAC_USE_BREAKPAD -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS } // namespace @@ -341,7 +341,7 @@ QString PlatformString() { } void StartCatching(not_null launcher) { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS ProcessAnnotations["Binary"] = cExeName().toUtf8().constData(); ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData(); ProcessAnnotations["Version"] = (cAlphaVersion() ? qsl("%1 alpha").arg(cAlphaVersion()) : (AppBetaVersion ? qsl("%1 beta") : qsl("%1")).arg(AppVersion)).toUtf8().constData(); @@ -401,21 +401,21 @@ void StartCatching(not_null launcher) { -1 ); #endif // Q_OS_LINUX64 || Q_OS_LINUX32 -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS } void FinishCatching() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS #if !defined Q_OS_MAC || defined MAC_USE_BREAKPAD delete base::take(BreakpadExceptionHandler); #endif // !Q_OS_MAC || MAC_USE_BREAKPAD -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS } StartResult Start() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS ReportPath = cWorkingDir() + qsl("tdata/working"); #ifdef Q_OS_WIN @@ -441,12 +441,12 @@ StartResult Start() { return lastdump; } -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS return Restart(); } Status Restart() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS if (ReportFile) { return Started; } @@ -495,13 +495,13 @@ Status Restart() { LOG(("FATAL: Could not open '%1' for writing!").arg(ReportPath)); return CantOpen; -#else // !TDESKTOP_DISABLE_CRASH_REPORTS +#else // !DESKTOP_APP_DISABLE_CRASH_REPORTS return Started; -#endif // else for !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // else for !DESKTOP_APP_DISABLE_CRASH_REPORTS } void Finish() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS FinishCatching(); if (ReportFile) { @@ -514,7 +514,7 @@ void Finish() { unlink(ReportPath.toUtf8().constData()); #endif // else for Q_OS_WIN } -#endif // !TDESKTOP_DISABLE_CRASH_REPORTS +#endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS } void SetAnnotation(const std::string &key, const QString &value) { @@ -564,7 +564,7 @@ void SetAnnotationRef(const std::string &key, const QString *valuePtr) { } } -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS dump::~dump() { if (ReportFile) { @@ -629,6 +629,6 @@ const dump &operator<<(const dump &stream, double num) { return stream; } -#endif // TDESKTOP_DISABLE_CRASH_REPORTS +#endif // DESKTOP_APP_DISABLE_CRASH_REPORTS } // namespace CrashReports diff --git a/Telegram/SourceFiles/core/crash_reports.h b/Telegram/SourceFiles/core/crash_reports.h index 665c431f9..2af269588 100644 --- a/Telegram/SourceFiles/core/crash_reports.h +++ b/Telegram/SourceFiles/core/crash_reports.h @@ -15,7 +15,7 @@ namespace CrashReports { QString PlatformString(); -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS struct dump { ~dump(); @@ -28,7 +28,7 @@ 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); -#endif // TDESKTOP_DISABLE_CRASH_REPORTS +#endif // DESKTOP_APP_DISABLE_CRASH_REPORTS enum Status { CantOpen, diff --git a/Telegram/SourceFiles/platform/mac/specific_mac.mm b/Telegram/SourceFiles/platform/mac/specific_mac.mm index ec7631c78..6d2ecd541 100644 --- a/Telegram/SourceFiles/platform/mac/specific_mac.mm +++ b/Telegram/SourceFiles/platform/mac/specific_mac.mm @@ -57,10 +57,10 @@ QRect psDesktopRect() { } void psWriteDump() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS double v = objc_appkitVersion(); CrashReports::dump() << "OS-Version: " << v; -#endif // TDESKTOP_DISABLE_CRASH_REPORTS +#endif // DESKTOP_APP_DISABLE_CRASH_REPORTS } void psDeleteDir(const QString &dir) { diff --git a/Telegram/SourceFiles/platform/win/specific_win.cpp b/Telegram/SourceFiles/platform/win/specific_win.cpp index 973196c65..74cb0db1d 100644 --- a/Telegram/SourceFiles/platform/win/specific_win.cpp +++ b/Telegram/SourceFiles/platform/win/specific_win.cpp @@ -563,7 +563,7 @@ void psSendToMenu(bool send, bool silent) { } void psWriteDump() { -#ifndef TDESKTOP_DISABLE_CRASH_REPORTS +#ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS PROCESS_MEMORY_COUNTERS data = { 0 }; if (Dlls::GetProcessMemoryInfo && Dlls::GetProcessMemoryInfo( @@ -584,7 +584,7 @@ void psWriteDump() { << (data.PagefileUsage / mb) << " MB (current)\n"; } -#endif // TDESKTOP_DISABLE_CRASH_REPORTS +#endif // DESKTOP_APP_DISABLE_CRASH_REPORTS } bool psLaunchMaps(const Data::LocationPoint &point) { diff --git a/Telegram/gyp/Telegram.gyp b/Telegram/gyp/Telegram.gyp index 1c4eba57e..b141322a9 100644 --- a/Telegram/gyp/Telegram.gyp +++ b/Telegram/gyp/Telegram.gyp @@ -50,7 +50,6 @@ 'ko', 'pt-BR', ], - 'build_defines%': '', 'list_sources_command': 'python <(submodules_loc)/lib_base/gyp/list_sources.py --input <(DEPTH)/telegram/sources.txt --replace src_loc=<(src_loc)', 'pch_source': '<(src_loc)/stdafx.cpp', 'pch_header': '<(src_loc)/stdafx.h', diff --git a/Telegram/gyp/helpers b/Telegram/gyp/helpers index c5ecf9612..1b346350e 160000 --- a/Telegram/gyp/helpers +++ b/Telegram/gyp/helpers @@ -1 +1 @@ -Subproject commit c5ecf9612d8d0ac41891a694d4c787abed66fc2b +Subproject commit 1b346350ead307c8d7015a9b4fd6a8af06e0efd2 diff --git a/Telegram/lib_base b/Telegram/lib_base index 33f64d6d9..a94ad7f81 160000 --- a/Telegram/lib_base +++ b/Telegram/lib_base @@ -1 +1 @@ -Subproject commit 33f64d6d9de493acb287154a557f25bd8eb50bb4 +Subproject commit a94ad7f817c1e1aeb242843d90f2bac313daab7a