Merge remote-tracking branch 'tdesktop/dev' into dev

This commit is contained in:
Eric Kotato 2019-11-08 19:36:21 +03:00
commit 0b617729b1
14 changed files with 44 additions and 47 deletions

View file

@ -63,7 +63,7 @@ GOTO:EOF
) )
echo %BUILD_VERSION% | findstr /C:"disable_crash_reports">nul && ( 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 && ( echo %BUILD_VERSION% | findstr /C:"disable_network_proxy">nul && (

View file

@ -107,7 +107,7 @@ build() {
fi fi
if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then if [[ $BUILD_VERSION == *"disable_crash_reports"* ]]; then
GYP_DEFINES+=",TDESKTOP_DISABLE_CRASH_REPORTS" GYP_DEFINES+=",DESKTOP_APP_DISABLE_CRASH_REPORTS"
fi fi
if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then if [[ $BUILD_VERSION == *"disable_network_proxy"* ]]; then

View file

@ -15,7 +15,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <new> #include <new>
#include <mutex> #include <mutex>
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
// see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/ // see https://blog.inventic.eu/2012/08/qt-and-google-breakpad/
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -49,7 +49,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#endif // Q_OS_LINUX64 || Q_OS_LINUX32 #endif // Q_OS_LINUX64 || Q_OS_LINUX32
#endif // !TDESKTOP_DISABLE_CRASH_REPORTS #endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS
namespace CrashReports { namespace CrashReports {
namespace { namespace {
@ -60,7 +60,7 @@ using AnnotationRefs = std::map<std::string, const QString*>;
Annotations ProcessAnnotations; Annotations ProcessAnnotations;
AnnotationRefs ProcessAnnotationRefs; AnnotationRefs ProcessAnnotationRefs;
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
QString ReportPath; QString ReportPath;
FILE *ReportFile = nullptr; FILE *ReportFile = nullptr;
@ -317,7 +317,7 @@ bool DumpCallback(const google_breakpad::MinidumpDescriptor &md, void *context,
} }
#endif // !Q_OS_MAC || MAC_USE_BREAKPAD #endif // !Q_OS_MAC || MAC_USE_BREAKPAD
#endif // !TDESKTOP_DISABLE_CRASH_REPORTS #endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS
} // namespace } // namespace
@ -341,7 +341,7 @@ QString PlatformString() {
} }
void StartCatching(not_null<Core::Launcher*> launcher) { void StartCatching(not_null<Core::Launcher*> launcher) {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
ProcessAnnotations["Binary"] = cExeName().toUtf8().constData(); ProcessAnnotations["Binary"] = cExeName().toUtf8().constData();
ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData(); ProcessAnnotations["ApiId"] = QString::number(ApiId).toUtf8().constData();
ProcessAnnotations["Version"] = (cAlphaVersion() ? qsl("%1 alpha").arg(cAlphaVersion()) : (AppBetaVersion ? qsl("%1 beta") : qsl("%1")).arg(AppVersion)).toUtf8().constData(); ProcessAnnotations["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<Core::Launcher*> launcher) {
-1 -1
); );
#endif // Q_OS_LINUX64 || Q_OS_LINUX32 #endif // Q_OS_LINUX64 || Q_OS_LINUX32
#endif // !TDESKTOP_DISABLE_CRASH_REPORTS #endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS
} }
void FinishCatching() { void FinishCatching() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
#if !defined Q_OS_MAC || defined MAC_USE_BREAKPAD #if !defined Q_OS_MAC || defined MAC_USE_BREAKPAD
delete base::take(BreakpadExceptionHandler); delete base::take(BreakpadExceptionHandler);
#endif // !Q_OS_MAC || MAC_USE_BREAKPAD #endif // !Q_OS_MAC || MAC_USE_BREAKPAD
#endif // !TDESKTOP_DISABLE_CRASH_REPORTS #endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS
} }
StartResult Start() { StartResult Start() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
ReportPath = cWorkingDir() + qsl("tdata/working"); ReportPath = cWorkingDir() + qsl("tdata/working");
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@ -441,12 +441,12 @@ StartResult Start() {
return lastdump; return lastdump;
} }
#endif // !TDESKTOP_DISABLE_CRASH_REPORTS #endif // !DESKTOP_APP_DISABLE_CRASH_REPORTS
return Restart(); return Restart();
} }
Status Restart() { Status Restart() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
if (ReportFile) { if (ReportFile) {
return Started; return Started;
} }
@ -495,13 +495,13 @@ Status Restart() {
LOG(("FATAL: Could not open '%1' for writing!").arg(ReportPath)); LOG(("FATAL: Could not open '%1' for writing!").arg(ReportPath));
return CantOpen; return CantOpen;
#else // !TDESKTOP_DISABLE_CRASH_REPORTS #else // !DESKTOP_APP_DISABLE_CRASH_REPORTS
return Started; return Started;
#endif // else for !TDESKTOP_DISABLE_CRASH_REPORTS #endif // else for !DESKTOP_APP_DISABLE_CRASH_REPORTS
} }
void Finish() { void Finish() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
FinishCatching(); FinishCatching();
if (ReportFile) { if (ReportFile) {
@ -514,7 +514,7 @@ void Finish() {
unlink(ReportPath.toUtf8().constData()); unlink(ReportPath.toUtf8().constData());
#endif // else for Q_OS_WIN #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) { 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() { dump::~dump() {
if (ReportFile) { if (ReportFile) {
@ -629,6 +629,6 @@ const dump &operator<<(const dump &stream, double num) {
return stream; return stream;
} }
#endif // TDESKTOP_DISABLE_CRASH_REPORTS #endif // DESKTOP_APP_DISABLE_CRASH_REPORTS
} // namespace CrashReports } // namespace CrashReports

View file

@ -15,7 +15,7 @@ namespace CrashReports {
QString PlatformString(); QString PlatformString();
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
struct dump { struct dump {
~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, unsigned long long num);
const dump &operator<<(const dump &stream, double num); const dump &operator<<(const dump &stream, double num);
#endif // TDESKTOP_DISABLE_CRASH_REPORTS #endif // DESKTOP_APP_DISABLE_CRASH_REPORTS
enum Status { enum Status {
CantOpen, CantOpen,

View file

@ -57,10 +57,10 @@ QRect psDesktopRect() {
} }
void psWriteDump() { void psWriteDump() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
double v = objc_appkitVersion(); double v = objc_appkitVersion();
CrashReports::dump() << "OS-Version: " << v; CrashReports::dump() << "OS-Version: " << v;
#endif // TDESKTOP_DISABLE_CRASH_REPORTS #endif // DESKTOP_APP_DISABLE_CRASH_REPORTS
} }
void psDeleteDir(const QString &dir) { void psDeleteDir(const QString &dir) {

View file

@ -563,7 +563,7 @@ void psSendToMenu(bool send, bool silent) {
} }
void psWriteDump() { void psWriteDump() {
#ifndef TDESKTOP_DISABLE_CRASH_REPORTS #ifndef DESKTOP_APP_DISABLE_CRASH_REPORTS
PROCESS_MEMORY_COUNTERS data = { 0 }; PROCESS_MEMORY_COUNTERS data = { 0 };
if (Dlls::GetProcessMemoryInfo if (Dlls::GetProcessMemoryInfo
&& Dlls::GetProcessMemoryInfo( && Dlls::GetProcessMemoryInfo(
@ -584,7 +584,7 @@ void psWriteDump() {
<< (data.PagefileUsage / mb) << (data.PagefileUsage / mb)
<< " MB (current)\n"; << " MB (current)\n";
} }
#endif // TDESKTOP_DISABLE_CRASH_REPORTS #endif // DESKTOP_APP_DISABLE_CRASH_REPORTS
} }
bool psLaunchMaps(const Data::LocationPoint &point) { bool psLaunchMaps(const Data::LocationPoint &point) {

View file

@ -50,7 +50,6 @@
'ko', 'ko',
'pt-BR', '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)', '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_source': '<(src_loc)/stdafx.cpp',
'pch_header': '<(src_loc)/stdafx.h', 'pch_header': '<(src_loc)/stdafx.h',

@ -1 +1 @@
Subproject commit 6c8965430be14476168adc53efce554a5535be73 Subproject commit 1b346350ead307c8d7015a9b4fd6a8af06e0efd2

@ -1 +1 @@
Subproject commit 33f64d6d9de493acb287154a557f25bd8eb50bb4 Subproject commit a94ad7f817c1e1aeb242843d90f2bac313daab7a

View file

@ -44,7 +44,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone --branch 0.9.1 https://github.com/ericniebler/range-v3 git clone --branch 0.9.1 https://github.com/ericniebler/range-v3

View file

@ -32,7 +32,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
cd ThirdParty cd ThirdParty
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
cd gyp cd gyp
@ -64,7 +64,7 @@ Open **x86 Native Tools Command Prompt for VS 2019.bat**, go to ***BuildPath***
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd .. cd ..
git clone --branch 0.9.1 https://github.com/ericniebler/range-v3 range-v3 git clone --branch 0.9.1 https://github.com/ericniebler/range-v3 range-v3

View file

@ -33,7 +33,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
@ -50,7 +50,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone --branch 0.9.1 https://github.com/ericniebler/range-v3 git clone --branch 0.9.1 https://github.com/ericniebler/range-v3
@ -213,12 +213,12 @@ Go to ***BuildPath*** and run
git clone https://chromium.googlesource.com/crashpad/crashpad.git git clone https://chromium.googlesource.com/crashpad/crashpad.git
cd crashpad cd crashpad
git checkout feb3aa3923 git checkout feb3aa3923
git apply ../../patches/crashpad.diff git apply ../patches/crashpad.diff
cd third_party/mini_chromium cd third_party/mini_chromium
git clone https://chromium.googlesource.com/chromium/mini_chromium git clone https://chromium.googlesource.com/chromium/mini_chromium
cd mini_chromium cd mini_chromium
git checkout 7c5b0c1ab4 git checkout 7c5b0c1ab4
git apply ../../../../../patches/mini_chromium.diff git apply ../../../../patches/mini_chromium.diff
cd ../../gtest cd ../../gtest
git clone https://chromium.googlesource.com/external/github.com/google/googletest gtest git clone https://chromium.googlesource.com/external/github.com/google/googletest gtest
cd gtest cd gtest

View file

@ -33,7 +33,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone https://chromium.googlesource.com/external/gyp git clone https://chromium.googlesource.com/external/gyp
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
@ -50,7 +50,7 @@ Go to ***BuildPath*** and run
git clone https://github.com/desktop-app/patches.git git clone https://github.com/desktop-app/patches.git
cd patches cd patches
git checkout b0ec5df git checkout 4aa377c
cd ../ cd ../
git clone --branch 0.9.1 https://github.com/ericniebler/range-v3 git clone --branch 0.9.1 https://github.com/ericniebler/range-v3
@ -213,12 +213,12 @@ Go to ***BuildPath*** and run
git clone https://chromium.googlesource.com/crashpad/crashpad.git git clone https://chromium.googlesource.com/crashpad/crashpad.git
cd crashpad cd crashpad
git checkout feb3aa3923 git checkout feb3aa3923
git apply ../../patches/crashpad.diff git apply ../patches/crashpad.diff
cd third_party/mini_chromium cd third_party/mini_chromium
git clone https://chromium.googlesource.com/chromium/mini_chromium git clone https://chromium.googlesource.com/chromium/mini_chromium
cd mini_chromium cd mini_chromium
git checkout 7c5b0c1ab4 git checkout 7c5b0c1ab4
git apply ../../../../../patches/mini_chromium.diff git apply ../../../../patches/mini_chromium.diff
cd ../../gtest cd ../../gtest
git clone https://chromium.googlesource.com/external/github.com/google/googletest gtest git clone https://chromium.googlesource.com/external/github.com/google/googletest gtest
cd gtest cd gtest

View file

@ -308,16 +308,14 @@ parts:
- xutils-dev - xutils-dev
- bison - bison
- python-xcbgen - python-xcbgen
configflags:
- --disable-x11
prime: [-./*] prime: [-./*]
qt: qt:
plugin: qtbuilder plugin: qtbuilder
qt-version: 5.6.2 qt-version: 5.12.5
qt-source-git: https://code.qt.io/qt/qt5.git qt-source-git: https://code.qt.io/qt/qt5.git
qt-submodules: ['qtbase', 'qtimageformats'] qt-submodules: ['qtbase', 'qtimageformats']
qt-patches-path: Telegram/Patches qt-patches-base-url: https://raw.githubusercontent.com/desktop-app/patches/master
qt-extra-plugins: qt-extra-plugins:
- platforminputcontexts: - platforminputcontexts:
- https://github.com/telegramdesktop/fcitx.git - https://github.com/telegramdesktop/fcitx.git
@ -336,6 +334,7 @@ parts:
- libpulse-dev - libpulse-dev
- libssl-dev - libssl-dev
- libx11-xcb-dev - libx11-xcb-dev
- libxcb-xkb-dev
- libxcb-icccm4-dev - libxcb-icccm4-dev
- libxcb-image0-dev - libxcb-image0-dev
- libxcb-keysyms1-dev - libxcb-keysyms1-dev
@ -356,14 +355,13 @@ parts:
- -qt-zlib - -qt-zlib
- -qt-libpng - -qt-libpng
- -qt-libjpeg - -qt-libjpeg
- -qt-freetype
- -qt-harfbuzz - -qt-harfbuzz
- -qt-pcre - -qt-pcre
- -qt-xcb - -qt-xcb
- -qt-xkbcommon-x11 - -no-gtk
- -no-gstreamer
- -no-gtkstyle
- -no-mirclient - -no-mirclient
- -system-freetype
- -fontconfig
- -no-opengl - -no-opengl
- -static - -static
- -dbus-runtime - -dbus-runtime