mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 64a7e0393fa1d982a1c22c95e642651ad667c16f Mon Sep 17 00:00:00 2001
|
||||
From 786c74b4348759bb5e1130b13798284b0ac3d4e0 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 10 Aug 2019 12:08:14 +1000
|
||||
Date: Thu, 12 Sep 2019 18:32:58 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -132,6 +132,19 @@ index fbdcb56..0eb0e4f 100644
|
||||
#include <QFile>
|
||||
|
||||
int (*TestForkedMethod)()/* = nullptr*/;
|
||||
diff --git a/Telegram/SourceFiles/core/crash_reports.cpp b/Telegram/SourceFiles/core/crash_reports.cpp
|
||||
index ce938a3..02066c7 100644
|
||||
--- a/Telegram/SourceFiles/core/crash_reports.cpp
|
||||
+++ b/Telegram/SourceFiles/core/crash_reports.cpp
|
||||
@@ -332,6 +332,8 @@ QString PlatformString() {
|
||||
return qsl("MacOSold");
|
||||
} else if (Platform::IsMac()) {
|
||||
return qsl("MacOS");
|
||||
+ } else if (Platform::IsHaiku()) {
|
||||
+ return qsl("Haiku");
|
||||
} else if (Platform::IsLinux32Bit()) {
|
||||
return qsl("Linux32Bit");
|
||||
} else if (Platform::IsLinux64Bit()) {
|
||||
diff --git a/Telegram/SourceFiles/core/launcher.cpp b/Telegram/SourceFiles/core/launcher.cpp
|
||||
index b5a6d7f..8223fad 100644
|
||||
--- a/Telegram/SourceFiles/core/launcher.cpp
|
||||
@@ -185,19 +198,10 @@ index b5a6d7f..8223fad 100644
|
||||
|
||||
} // namespace Core
|
||||
diff --git a/Telegram/SourceFiles/core/update_checker.cpp b/Telegram/SourceFiles/core/update_checker.cpp
|
||||
index ad19757..246e121 100644
|
||||
index 7655151..9dd6cbb 100644
|
||||
--- a/Telegram/SourceFiles/core/update_checker.cpp
|
||||
+++ b/Telegram/SourceFiles/core/update_checker.cpp
|
||||
@@ -503,6 +503,8 @@ bool ParseCommonMap(
|
||||
return "mac32";
|
||||
} else if (Platform::IsMac()) {
|
||||
return "mac";
|
||||
+ } else if (Platform::IsHaiku()) {
|
||||
+ return "haiku";
|
||||
} else if (Platform::IsLinux32Bit()) {
|
||||
return "linux32";
|
||||
} else if (Platform::IsLinux64Bit()) {
|
||||
@@ -1515,6 +1517,9 @@ bool checkReadyUpdate() {
|
||||
@@ -1510,6 +1510,9 @@ bool checkReadyUpdate() {
|
||||
#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
QString curUpdater = (cExeDir() + qsl("Updater"));
|
||||
QFileInfo updater(cWorkingDir() + qsl("tupdates/temp/Updater"));
|
||||
@@ -230,10 +234,10 @@ index af0935f..2dc99d5 100644
|
||||
} else {
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..47a223f
|
||||
index 0000000..a3bdb80
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp
|
||||
@@ -0,0 +1,133 @@
|
||||
@@ -0,0 +1,135 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -247,7 +251,7 @@ index 0000000..47a223f
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
+Copyright (c) 2018 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+*/
|
||||
+
|
||||
+#include "platform/haiku/file_utilities_haiku.h"
|
||||
@@ -255,6 +259,8 @@ index 0000000..47a223f
|
||||
+#include "mainwindow.h"
|
||||
+#include "storage/localstorage.h"
|
||||
+
|
||||
+#include <QtCore/QProcess>
|
||||
+
|
||||
+namespace Platform {
|
||||
+namespace File {
|
||||
+namespace internal {
|
||||
@@ -369,7 +375,7 @@ index 0000000..47a223f
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..ed8367c
|
||||
index 0000000..a61342c
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h
|
||||
@@ -0,0 +1,67 @@
|
||||
@@ -386,7 +392,7 @@ index 0000000..ed8367c
|
||||
+GNU General Public License for more details.
|
||||
+
|
||||
+Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
||||
+Copyright (c) 2018 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com
|
||||
+*/
|
||||
+
|
||||
+#pragma once
|
||||
@@ -554,10 +560,10 @@ index 0000000..248d8a8
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/info_haiku.cpp b/Telegram/SourceFiles/platform/haiku/info_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..a939825
|
||||
index 0000000..a9e79ac
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/info_haiku.cpp
|
||||
@@ -0,0 +1,41 @@
|
||||
@@ -0,0 +1,49 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -598,6 +604,14 @@ index 0000000..a939825
|
||||
+ return QDate();
|
||||
+}
|
||||
+
|
||||
+int AutoUpdateVersion() {
|
||||
+ return 2;
|
||||
+}
|
||||
+
|
||||
+QString AutoUpdateKey() {
|
||||
+ return "haiku";
|
||||
+}
|
||||
+
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/info_haiku.h b/Telegram/SourceFiles/platform/haiku/info_haiku.h
|
||||
new file mode 100644
|
||||
@@ -1079,10 +1093,10 @@ index 0000000..b6f3490
|
||||
+resource app_signature "application/x-vnd.tg-notify-gate";
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..9b3a71a
|
||||
index 0000000..fd96efa
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
@@ -0,0 +1,214 @@
|
||||
@@ -0,0 +1,219 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1270,27 +1284,32 @@ index 0000000..9b3a71a
|
||||
+
|
||||
+Manager::~Manager() = default;
|
||||
+
|
||||
+void Manager::doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, \
|
||||
+ const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) {
|
||||
+ _private->showNotification(peer, msgId, title, subtitle, msg, hideNameAndPhoto, hideReplyButton);
|
||||
+void Manager::doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
+ const QString &msg,
|
||||
+ bool hideNameAndPhoto,
|
||||
+ bool hideReplyButton) {
|
||||
+ _private->showNotification(
|
||||
+ peer,
|
||||
+ msgId,
|
||||
+ title,
|
||||
+ subtitle,
|
||||
+ msg,
|
||||
+ hideNameAndPhoto,
|
||||
+ hideReplyButton);
|
||||
+}
|
||||
+
|
||||
+void Manager::doClearAllFast() {
|
||||
+ _private->clearAll();
|
||||
+}
|
||||
+
|
||||
+void Manager::doClearFromHistory(History *history) {
|
||||
+void Manager::doClearFromHistory(not_null<History*> history) {
|
||||
+ _private->clearFromHistory(history);
|
||||
+}
|
||||
+
|
||||
+void Manager::onBeforeNotificationActivated(PeerId peerId, MsgId msgId) {
|
||||
+ _private->beforeNotificationActivated(peerId, msgId);
|
||||
+}
|
||||
+
|
||||
+void Manager::onAfterNotificationActivated(PeerId peerId, MsgId msgId) {
|
||||
+ _private->afterNotificationActivated(peerId, msgId);
|
||||
+}
|
||||
+
|
||||
+bool Manager::hasActionsSupport() const {
|
||||
+ return _private->hasActionsSupport();
|
||||
+}
|
||||
@@ -1299,10 +1318,10 @@ index 0000000..9b3a71a
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..25c8e26
|
||||
index 0000000..d905787
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
@@ -0,0 +1,130 @@
|
||||
@@ -0,0 +1,134 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1380,12 +1399,16 @@ index 0000000..25c8e26
|
||||
+ ~Manager();
|
||||
+
|
||||
+protected:
|
||||
+ void doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, \
|
||||
+ const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) override;
|
||||
+ void doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
+ const QString &msg,
|
||||
+ bool hideNameAndPhoto,
|
||||
+ bool hideReplyButton) override;
|
||||
+ void doClearAllFast() override;
|
||||
+ void doClearFromHistory(History *history) override;
|
||||
+ void onBeforeNotificationActivated(PeerId peerId, MsgId msgId) override;
|
||||
+ void onAfterNotificationActivated(PeerId peerId, MsgId msgId) override;
|
||||
+ void doClearFromHistory(not_null<History*> history) override;
|
||||
+
|
||||
+ bool hasActionsSupport() const;
|
||||
+
|
||||
@@ -1435,10 +1458,10 @@ index 0000000..25c8e26
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
new file mode 100644
|
||||
index 0000000..0cc771c
|
||||
index 0000000..8a5b638
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
@@ -0,0 +1,411 @@
|
||||
@@ -0,0 +1,264 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1463,6 +1486,13 @@ index 0000000..0cc771c
|
||||
+#include "storage/localstorage.h"
|
||||
+#include "platform/haiku/file_utilities_haiku.h"
|
||||
+
|
||||
+#include <QtWidgets/QApplication>
|
||||
+#include <QtWidgets/QDesktopWidget>
|
||||
+#include <QtCore/QStandardPaths>
|
||||
+#include <QtCore/QProcess>
|
||||
+#include <QtCore/QVersionNumber>
|
||||
+#include <qpa/qplatformnativeinterface.h>
|
||||
+
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <cstdlib>
|
||||
@@ -1488,17 +1518,6 @@ index 0000000..0cc771c
|
||||
+
|
||||
+namespace {
|
||||
+
|
||||
+class _PsEventFilter : public QAbstractNativeEventFilter {
|
||||
+public:
|
||||
+ bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) {
|
||||
+ //auto wnd = App::wnd();
|
||||
+ //if (!wnd) return false;
|
||||
+
|
||||
+ return false;
|
||||
+ }
|
||||
+};
|
||||
+_PsEventFilter *_psEventFilter = nullptr;
|
||||
+
|
||||
+QRect _monitorRect;
|
||||
+auto _monitorLastGot = 0LL;
|
||||
+
|
||||
@@ -1521,152 +1540,9 @@ index 0000000..0cc771c
|
||||
+ w->hide();
|
||||
+}
|
||||
+
|
||||
+QAbstractNativeEventFilter *psNativeEventFilter() {
|
||||
+ delete _psEventFilter;
|
||||
+ _psEventFilter = new _PsEventFilter();
|
||||
+ return _psEventFilter;
|
||||
+}
|
||||
+
|
||||
+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;
|
||||
+
|
||||
+ QString result;
|
||||
+ char buffer[4096] = { 0 };
|
||||
+ while (!feof(f)) {
|
||||
+ if (fgets(buffer, 4096, f) != NULL) {
|
||||
+ result += buffer;
|
||||
+ }
|
||||
+ }
|
||||
+ pclose(f);
|
||||
+ return result.trimmed();
|
||||
+}
|
||||
+
|
||||
+QStringList addr2linestr(uint64 *addresses, int count) {
|
||||
+ QStringList result;
|
||||
+ if (!count || cExeName().isEmpty()) return result;
|
||||
+
|
||||
+ result.reserve(count);
|
||||
+ QByteArray cmd = "addr2line -e " + EscapeShell(QFile::encodeName(cExeDir() + cExeName()));
|
||||
+ for (int i = 0; i < count; ++i) {
|
||||
+ if (addresses[i]) {
|
||||
+ cmd += qsl(" 0x%1").arg(addresses[i], 0, 16).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 psPrepareCrashDump(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) {
|
||||
+ 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:")) {
|
||||
+ ++i;
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ 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("\n%1. ").arg(i - start));
|
||||
+ if (line.startsWith(qstr("ERROR: "))) {
|
||||
+ result.append(line).append('\n');
|
||||
+ continue;
|
||||
+ }
|
||||
+ 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;
|
||||
+ }
|
||||
+
|
||||
+ 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;
|
||||
+}
|
||||
+
|
||||
+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());
|
||||
@@ -1852,10 +1728,10 @@ index 0000000..0cc771c
|
||||
+}
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..3995ab2
|
||||
index 0000000..80f2062
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
@@ -0,0 +1,126 @@
|
||||
@@ -0,0 +1,123 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1920,7 +1796,6 @@ index 0000000..3995ab2
|
||||
+}
|
||||
+
|
||||
+void psWriteDump();
|
||||
+QString psPrepareCrashDump(const QByteArray &crashdump, QString dumpfile);
|
||||
+
|
||||
+void psDeleteDir(const QString &dir);
|
||||
+
|
||||
@@ -1944,8 +1819,6 @@ index 0000000..3995ab2
|
||||
+void psExecUpdater();
|
||||
+void psExecTelegram(const QString &arg = QString());
|
||||
+
|
||||
+QAbstractNativeEventFilter *psNativeEventFilter();
|
||||
+
|
||||
+void psNewVersion();
|
||||
+
|
||||
+void psUpdateOverlayed(QWidget *widget);
|
||||
@@ -2033,10 +1906,10 @@ index 68b1058..2839790 100644
|
||||
#include "platform/win/file_utilities_win.h"
|
||||
#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WINRT || Q_OS_WIN
|
||||
diff --git a/Telegram/SourceFiles/platform/platform_info.h b/Telegram/SourceFiles/platform/platform_info.h
|
||||
index c8193c5..3457cfb 100644
|
||||
index 3fe92ea..e06b16c 100644
|
||||
--- a/Telegram/SourceFiles/platform/platform_info.h
|
||||
+++ b/Telegram/SourceFiles/platform/platform_info.h
|
||||
@@ -37,6 +37,8 @@ namespace Platform {
|
||||
@@ -39,6 +39,8 @@ namespace Platform {
|
||||
[[nodiscard]] bool IsMac10_13OrGreater();
|
||||
[[nodiscard]] bool IsMac10_14OrGreater();
|
||||
|
||||
@@ -2045,7 +1918,7 @@ index c8193c5..3457cfb 100644
|
||||
[[nodiscard]] constexpr bool IsLinux();
|
||||
[[nodiscard]] constexpr bool IsLinux32Bit();
|
||||
[[nodiscard]] constexpr bool IsLinux64Bit();
|
||||
@@ -47,6 +49,8 @@ namespace Platform {
|
||||
@@ -49,6 +51,8 @@ namespace Platform {
|
||||
#include "platform/mac/info_mac.h"
|
||||
#elif defined Q_OS_LINUX // Q_OS_MAC
|
||||
#include "platform/linux/info_linux.h"
|
||||
@@ -2133,6 +2006,19 @@ index a399684..c9df450 100644
|
||||
inline constexpr bool IsMac() { return false; }
|
||||
inline constexpr bool IsMacOldBuild() { return false; }
|
||||
inline constexpr bool IsMacStoreBuild() { return false; }
|
||||
diff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp
|
||||
index 4a722b8..e987503 100644
|
||||
--- a/Telegram/SourceFiles/qt_functions.cpp
|
||||
+++ b/Telegram/SourceFiles/qt_functions.cpp
|
||||
@@ -31,6 +31,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
+#include <private/qtextengine_p.h>
|
||||
+
|
||||
/* TODO: find a dynamic library with these symbols. */
|
||||
|
||||
/* Debian maintainer: this function is taken from qfiledialog.cpp */
|
||||
diff --git a/Telegram/SourceFiles/rpl/operators_tests.cpp b/Telegram/SourceFiles/rpl/operators_tests.cpp
|
||||
index 548057f..feee15e 100644
|
||||
--- a/Telegram/SourceFiles/rpl/operators_tests.cpp
|
||||
@@ -2303,7 +2189,7 @@ index 4aef7c4..79ee2af 100644
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
diff --git a/Telegram/gyp/common.gypi b/Telegram/gyp/common.gypi
|
||||
index eb90fe2..b12c1d6 100644
|
||||
index a4e240c..64f2f19 100644
|
||||
--- a/Telegram/gyp/common.gypi
|
||||
+++ b/Telegram/gyp/common.gypi
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -2339,15 +2225,15 @@ index eb90fe2..b12c1d6 100644
|
||||
+ 'build_haiku%': '<(build_haiku)',
|
||||
|
||||
'official_build_target%': '',
|
||||
},
|
||||
@@ -52,6 +60,7 @@
|
||||
'build_standard_win%': 'c++17',
|
||||
@@ -53,6 +61,7 @@
|
||||
'build_win%': '<(build_win)',
|
||||
'build_mac%': '<(build_mac)',
|
||||
'build_linux%': '<(build_linux)',
|
||||
+ 'build_haiku%': '<(build_haiku)',
|
||||
'official_build_target%': '<(official_build_target)',
|
||||
'build_standard_win%': '<(build_standard_win)',
|
||||
|
||||
# GYP does not support per-configuration libraries :(
|
||||
diff --git a/Telegram/gyp/generate.py b/Telegram/gyp/generate.py
|
||||
index 4194e16..c2fd3c8 100644
|
||||
--- a/Telegram/gyp/generate.py
|
||||
@@ -2386,6 +2272,19 @@ index f73aabd..07c6b35 100644
|
||||
'<(src_loc)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
'<(submodules_loc)/GSL/include',
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
diff --git a/Telegram/gyp/lib_ffmpeg.gyp b/Telegram/gyp/lib_ffmpeg.gyp
|
||||
index b9ada53..a9a5fa8 100644
|
||||
--- a/Telegram/gyp/lib_ffmpeg.gyp
|
||||
+++ b/Telegram/gyp/lib_ffmpeg.gyp
|
||||
@@ -37,7 +37,7 @@
|
||||
'<(src_loc)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
'<(libs_loc)/ffmpeg',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
'<(submodules_loc)/GSL/include',
|
||||
'<(submodules_loc)/variant/include',
|
||||
@@ -2403,6 +2302,19 @@ index 9767651..cc629fc 100644
|
||||
'<(libs_loc)/zlib',
|
||||
'<(libs_loc)/ffmpeg',
|
||||
'<(rlottie_loc)',
|
||||
diff --git a/Telegram/gyp/lib_mtproto.gyp b/Telegram/gyp/lib_mtproto.gyp
|
||||
index b592cb7..4a401d9 100644
|
||||
--- a/Telegram/gyp/lib_mtproto.gyp
|
||||
+++ b/Telegram/gyp/lib_mtproto.gyp
|
||||
@@ -47,7 +47,7 @@
|
||||
'include_dirs': [
|
||||
'<(src_loc)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
'<(submodules_loc)/GSL/include',
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
diff --git a/Telegram/gyp/lib_storage.gyp b/Telegram/gyp/lib_storage.gyp
|
||||
index d72f4b5..e8740b9 100644
|
||||
--- a/Telegram/gyp/lib_storage.gyp
|
||||
@@ -2722,10 +2634,10 @@ index d9147d6..16c9d3f 100644
|
||||
'variables': {
|
||||
'qrc_files': [
|
||||
diff --git a/Telegram/gyp/telegram_sources.txt b/Telegram/gyp/telegram_sources.txt
|
||||
index c247030..b741ff7 100644
|
||||
index a3f8787..d244dcd 100644
|
||||
--- a/Telegram/gyp/telegram_sources.txt
|
||||
+++ b/Telegram/gyp/telegram_sources.txt
|
||||
@@ -615,6 +615,20 @@
|
||||
@@ -617,6 +617,20 @@
|
||||
<(src_loc)/platform/linux/notifications_manager_linux.h
|
||||
<(src_loc)/platform/linux/specific_linux.cpp
|
||||
<(src_loc)/platform/linux/specific_linux.h
|
||||
@@ -2746,6 +2658,19 @@ index c247030..b741ff7 100644
|
||||
<(src_loc)/platform/mac/file_utilities_mac.mm
|
||||
<(src_loc)/platform/mac/file_utilities_mac.h
|
||||
<(src_loc)/platform/mac/info_mac.mm
|
||||
diff --git a/Telegram/gyp/tests/common_test.gypi b/Telegram/gyp/tests/common_test.gypi
|
||||
index ab9ed3c..e549088 100644
|
||||
--- a/Telegram/gyp/tests/common_test.gypi
|
||||
+++ b/Telegram/gyp/tests/common_test.gypi
|
||||
@@ -15,7 +15,7 @@
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/Catch/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
],
|
||||
'sources': [
|
||||
'<(src_loc)/base/tests_main.cpp',
|
||||
diff --git a/Telegram/gyp/utils.gyp b/Telegram/gyp/utils.gyp
|
||||
index bd46332..d85a403 100644
|
||||
--- a/Telegram/gyp/utils.gyp
|
||||
@@ -2767,160 +2692,3 @@ index bd46332..d85a403 100644
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
From 976c52d85db9e4e41a07cd79a3c3c522bdb1721d Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sat, 10 Aug 2019 19:46:28 +1000
|
||||
Subject: Fix build
|
||||
|
||||
|
||||
diff --git a/Telegram/SourceFiles/qt_functions.cpp b/Telegram/SourceFiles/qt_functions.cpp
|
||||
index 4a722b8..e987503 100644
|
||||
--- a/Telegram/SourceFiles/qt_functions.cpp
|
||||
+++ b/Telegram/SourceFiles/qt_functions.cpp
|
||||
@@ -31,6 +31,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
+#include <private/qtextengine_p.h>
|
||||
+
|
||||
/* TODO: find a dynamic library with these symbols. */
|
||||
|
||||
/* Debian maintainer: this function is taken from qfiledialog.cpp */
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
From aa5f580cd6369eb29bb00780fd5957a732d4c1a8 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 8 Sep 2019 22:27:11 +1000
|
||||
Subject: Fix path for range-v3 submodule
|
||||
|
||||
|
||||
diff --git a/Telegram/gyp/lib_ffmpeg.gyp b/Telegram/gyp/lib_ffmpeg.gyp
|
||||
index b9ada53..a9a5fa8 100644
|
||||
--- a/Telegram/gyp/lib_ffmpeg.gyp
|
||||
+++ b/Telegram/gyp/lib_ffmpeg.gyp
|
||||
@@ -37,7 +37,7 @@
|
||||
'<(src_loc)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
'<(libs_loc)/ffmpeg',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
'<(submodules_loc)/GSL/include',
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
diff --git a/Telegram/gyp/lib_mtproto.gyp b/Telegram/gyp/lib_mtproto.gyp
|
||||
index b592cb7..4a401d9 100644
|
||||
--- a/Telegram/gyp/lib_mtproto.gyp
|
||||
+++ b/Telegram/gyp/lib_mtproto.gyp
|
||||
@@ -47,7 +47,7 @@
|
||||
'include_dirs': [
|
||||
'<(src_loc)',
|
||||
'<(SHARED_INTERMEDIATE_DIR)',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
'<(submodules_loc)/GSL/include',
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
diff --git a/Telegram/gyp/tests/common_test.gypi b/Telegram/gyp/tests/common_test.gypi
|
||||
index ab9ed3c..e549088 100644
|
||||
--- a/Telegram/gyp/tests/common_test.gypi
|
||||
+++ b/Telegram/gyp/tests/common_test.gypi
|
||||
@@ -15,7 +15,7 @@
|
||||
'<(submodules_loc)/variant/include',
|
||||
'<(submodules_loc)/Catch/include',
|
||||
'<(submodules_loc)/crl/src',
|
||||
- '<(libs_loc)/range-v3/include',
|
||||
+ '<(submodules_loc)/range/include',
|
||||
],
|
||||
'sources': [
|
||||
'<(src_loc)/base/tests_main.cpp',
|
||||
--
|
||||
2.23.0
|
||||
|
||||
|
||||
From 669bd6648ab763f34ed1e3763cdb041b9d93c2c7 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Sun, 8 Sep 2019 22:28:17 +1000
|
||||
Subject: Fix for notification api changes
|
||||
|
||||
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
index 9b3a71a..fd96efa 100644
|
||||
--- a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp
|
||||
@@ -185,27 +185,32 @@ void Manager::clearNotification(PeerId peerId, MsgId msgId) {
|
||||
|
||||
Manager::~Manager() = default;
|
||||
|
||||
-void Manager::doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, \
|
||||
- const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) {
|
||||
- _private->showNotification(peer, msgId, title, subtitle, msg, hideNameAndPhoto, hideReplyButton);
|
||||
+void Manager::doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
+ const QString &msg,
|
||||
+ bool hideNameAndPhoto,
|
||||
+ bool hideReplyButton) {
|
||||
+ _private->showNotification(
|
||||
+ peer,
|
||||
+ msgId,
|
||||
+ title,
|
||||
+ subtitle,
|
||||
+ msg,
|
||||
+ hideNameAndPhoto,
|
||||
+ hideReplyButton);
|
||||
}
|
||||
|
||||
void Manager::doClearAllFast() {
|
||||
_private->clearAll();
|
||||
}
|
||||
|
||||
-void Manager::doClearFromHistory(History *history) {
|
||||
+void Manager::doClearFromHistory(not_null<History*> history) {
|
||||
_private->clearFromHistory(history);
|
||||
}
|
||||
|
||||
-void Manager::onBeforeNotificationActivated(PeerId peerId, MsgId msgId) {
|
||||
- _private->beforeNotificationActivated(peerId, msgId);
|
||||
-}
|
||||
-
|
||||
-void Manager::onAfterNotificationActivated(PeerId peerId, MsgId msgId) {
|
||||
- _private->afterNotificationActivated(peerId, msgId);
|
||||
-}
|
||||
-
|
||||
bool Manager::hasActionsSupport() const {
|
||||
return _private->hasActionsSupport();
|
||||
}
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
index 25c8e26..d905787 100644
|
||||
--- a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h
|
||||
@@ -75,12 +75,16 @@ public:
|
||||
~Manager();
|
||||
|
||||
protected:
|
||||
- void doShowNativeNotification(PeerData *peer, MsgId msgId, const QString &title, \
|
||||
- const QString &subtitle, const QString &msg, bool hideNameAndPhoto, bool hideReplyButton) override;
|
||||
+ void doShowNativeNotification(
|
||||
+ not_null<PeerData*> peer,
|
||||
+ MsgId msgId,
|
||||
+ const QString &title,
|
||||
+ const QString &subtitle,
|
||||
+ const QString &msg,
|
||||
+ bool hideNameAndPhoto,
|
||||
+ bool hideReplyButton) override;
|
||||
void doClearAllFast() override;
|
||||
- void doClearFromHistory(History *history) override;
|
||||
- void onBeforeNotificationActivated(PeerId peerId, MsgId msgId) override;
|
||||
- void onAfterNotificationActivated(PeerId peerId, MsgId msgId) override;
|
||||
+ void doClearFromHistory(not_null<History*> history) override;
|
||||
|
||||
bool hasActionsSupport() const;
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
||||
@@ -5,7 +5,7 @@ COPYRIGHT="2013-2019 Telegram"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="09ed75681583a509636ae3fc185fcb5e29ae6a2f6bf06082420833e25829e09d"
|
||||
CHECKSUM_SHA256="32242002f6adc2f322f6bd38b8d225d03cd44b86c0e83b3840acb737f9340915"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion"
|
||||
srcGitRev_2="d4a0f719ffd8d29e88474f67abc9fc862661c3b9"
|
||||
@@ -36,9 +36,9 @@ srcGitRev_8="7cc9639699f64b750c0b82333dced9ea77e8436e"
|
||||
SOURCE_URI_8="https://github.com/Cyan4973/xxHash/archive/$srcGitRev_8.tar.gz"
|
||||
CHECKSUM_SHA256_8="0d1e2b4ae15f98acc49084e23ba94853dba2b0f654865ecedb1072b3959421bf"
|
||||
SOURCE_FILENAME_8="xxHash-$srcGitRev_8.tar.gz"
|
||||
srcGitRev_9="d08a03b6508b390af20491f2dbeee3453594afc8"
|
||||
srcGitRev_9="589db026ec211bc4979e3bffe074f6e48ce7cedc"
|
||||
SOURCE_URI_9="https://github.com/john-preston/rlottie/archive/$srcGitRev_9.zip"
|
||||
CHECKSUM_SHA256_9="f3d29e30da7e63e8eebbe5ccd84cd6697cd0944df237db45889a85779dbd301b"
|
||||
CHECKSUM_SHA256_9="35047dc59500aa9c98459a8d656e07bfc6f0cf7189a902e83b8296f2f007f83a"
|
||||
SOURCE_FILENAME_9="rlottie-$srcGitRev_9.zip"
|
||||
srcGitRev_10="9a2a9f2d0f38a39c5ec9b329042ca5f060b058e0"
|
||||
SOURCE_URI_10="https://github.com/lz4/lz4/archive/$srcGitRev_10.tar.gz"
|
||||
@@ -51,6 +51,7 @@ PATCHES="
|
||||
telegram_desktop-$portVersion-systemqt.patch
|
||||
telegram_desktop-$portVersion.patchset
|
||||
"
|
||||
|
||||
PATCHES_2="
|
||||
telegram_desktop-$portVersion-libtgvoip.patchset
|
||||
"
|
||||
Reference in New Issue
Block a user