Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2022-11-30 18:15:51 +10:00
parent b06839d3a5
commit 6cb4e378f3
3 changed files with 52 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
From b68c0b6927c01fbce11b3d0734d37462e816ae50 Mon Sep 17 00:00:00 2001
From f508f8a25cb93bd21899eac3c3818683f37b797c Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 6 Nov 2022 17:59:39 +1000
Date: Wed, 30 Nov 2022 16:23:56 +1000
Subject: Add Haiku support

View File

@@ -1,11 +1,11 @@
From 27626ec213ebb4da0882956b38719d80b476eb9f Mon Sep 17 00:00:00 2001
From 9ae85ee4d68dbc54cef65200d0b4392d8d542cdb Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 6 Nov 2022 18:00:00 +1000
Date: Wed, 30 Nov 2022 17:47:10 +1000
Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index d9bcc80..0ae173a 100644
index 9614a44..1971834 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -91,6 +91,15 @@ PRIVATE
@@ -24,7 +24,7 @@ index d9bcc80..0ae173a 100644
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1372,6 +1381,16 @@ else()
@@ -1377,6 +1386,16 @@ else()
)
endif()
@@ -41,7 +41,7 @@ index d9bcc80..0ae173a 100644
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp
@@ -1520,7 +1539,7 @@ if (build_macstore)
@@ -1525,7 +1544,7 @@ if (build_macstore)
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")
@@ -71,10 +71,10 @@ index d37085b..90c5f7d 100644
if (const auto strong = weak.get()) {
showBox(Box(SettingsBox, strong));
diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h
index a6502c1..82e2708 100644
index afabc40..3b385d5 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -816,7 +816,7 @@ private:
@@ -821,7 +821,7 @@ private:
rpl::variable<float64> _dialogsWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
@@ -84,10 +84,10 @@ index a6502c1..82e2708 100644
rpl::variable<bool> _systemDarkModeEnabled = false;
WindowPosition _windowPosition; // per-window
diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp
index cc3f1ad..f96cf3a 100644
index 8753681..54911b0 100644
--- a/Telegram/SourceFiles/core/sandbox.cpp
+++ b/Telegram/SourceFiles/core/sandbox.cpp
@@ -256,9 +256,12 @@ Sandbox::~Sandbox() = default;
@@ -247,9 +247,12 @@ Sandbox::~Sandbox() = default;
bool Sandbox::event(QEvent *e) {
if (e->type() == QEvent::Quit && !Quitting()) {
@@ -103,7 +103,7 @@ index cc3f1ad..f96cf3a 100644
} else if (e->type() == QEvent::Close) {
Quit();
}
@@ -268,7 +271,7 @@ bool Sandbox::event(QEvent *e) {
@@ -259,7 +262,7 @@ bool Sandbox::event(QEvent *e) {
void Sandbox::socketConnected() {
LOG(("Socket connected, this is not the first application instance, sending show command..."));
_secondInstance = true;
@@ -157,7 +157,7 @@ index b06d5ba..99069b7 100644
if (internal::ShowXDPOpenWithDialog(filepath)) {
return true;
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
index e7dcff7..e195988 100644
index 79376e3..7ad7213 100644
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -40,6 +40,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -171,7 +171,7 @@ index e7dcff7..e195988 100644
#include <QtCore/QSize>
#include <QtCore/QMimeData>
#include <QtGui/QWindow>
@@ -250,6 +254,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
@@ -255,6 +259,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
SkipTaskbar(windowHandle(), mode == WorkMode::TrayOnly);
}
@@ -481,10 +481,10 @@ index 0000000..6d0c221
+} // namespace Notifications
+} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index 28e0dc5..265a3ca 100644
index 506a450..efb6d91 100644
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
@@ -31,6 +31,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -34,6 +34,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/linux/base_linux_xcb_utilities.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
@@ -495,11 +495,8 @@ index 28e0dc5..265a3ca 100644
#include <QtWidgets/QApplication>
#include <QtWidgets/QSystemTrayIcon>
#include <QtCore/QStandardPaths>
@@ -58,8 +62,36 @@ using namespace Platform;
using Platform::internal::WaylandIntegration;
@@ -115,6 +119,33 @@ static void t_desktop_application_init(TDesktopApplication *application) {
namespace Platform {
+
namespace {
+#ifdef Q_OS_HAIKU
@@ -529,10 +526,10 @@ index 28e0dc5..265a3ca 100644
+}
+#endif // Q_OS_HAIKU
+
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs;
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -335,7 +367,11 @@ bool AutostartSupported() {
@@ -575,17 +606,24 @@ bool AutostartSupported() {
// in folders with names started with a dot
// and doesn't provide any api to add an app to autostart
// thus, autostart isn't supported in snap
@@ -544,31 +541,24 @@ index 28e0dc5..265a3ca 100644
}
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
@@ -344,7 +380,10 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
+#ifdef Q_OS_HAIKU
+ HaikuAutostart(enabled);
+ return;
+#endif
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
const auto guard = gsl::finally([&] {
if (done) {
done(enabled);
}
});
-
+#ifdef Q_OS_HAIKU
+ HaikuAutostart(enabled);
+ return;
+#else
const auto silent = !done;
if (KSandbox::isFlatpak()) {
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -361,6 +400,7 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
QFile::remove(autostart + QGuiApplication::desktopFileName());
PortalAutostart(enabled, silent);
@@ -647,7 +685,11 @@ QString psAppDataPath() {
}
}
+#endif
}
bool AutostartSkip() {
@@ -406,8 +446,11 @@ QString psAppDataPath() {
return oldPath;
}
}
-
+#ifdef Q_OS_HAIKU
+ return QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + '/';
+#else
@@ -577,7 +567,7 @@ index 28e0dc5..265a3ca 100644
}
void psDoCleanup() {
@@ -572,6 +615,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
@@ -824,6 +866,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
add("mate-volume-control");
}
}
@@ -739,7 +729,7 @@ index ffb4dcb..720bd29 100644
if (DBusShowInFolder(filepath)) {
return true;
diff --git a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
index ef5529e..8827a16 100644
index aefae77..5a8c89e 100644
--- a/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_last_input_linux.cpp
@@ -24,6 +24,11 @@
@@ -808,6 +798,21 @@ index 3f86030..395dbdf 100644
#include <QtCore/QProcess>
#include <QtWidgets/QWidget>
diff --git a/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp b/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp
index 0b57438..427fa76 100644
--- a/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp
+++ b/Telegram/lib_spellcheck/spellcheck/third_party/language_cld3.cpp
@@ -4,6 +4,10 @@
// For license and copyright information please follow this link:
// https://github.com/desktop-app/legal/blob/master/LEGAL
//
+#ifdef Q_OS_HAIKU
+#include <base/haiku_types.h>
+#endif
+
#include "spellcheck/third_party/language_cld3.h"
#include "nnet_language_identifier.h"
diff --git a/Telegram/lib_ui/ui/ui_utility.cpp b/Telegram/lib_ui/ui/ui_utility.cpp
index 283b340..fd01c34 100644
--- a/Telegram/lib_ui/ui/ui_utility.cpp
@@ -871,12 +876,12 @@ index bb6d91a..3c4a188 100644
#include "webrtc/webrtc_create_adm.h"
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
index e769380..77db54a 100644
index 9be0e5a..4b15e50 100644
--- a/cmake/external/CMakeLists.txt
+++ b/cmake/external/CMakeLists.txt
@@ -14,7 +14,7 @@ endmacro()
add_checked_subdirectory(angle)
add_checked_subdirectory(auto_updates)
@@ -17,7 +17,7 @@ if (add_cld3_library)
add_checked_subdirectory(cld3)
endif()
add_checked_subdirectory(crash_reports)
-if (LINUX)
+if (LINUX AND NOT HAIKU)

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2022 Telegram"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
CHECKSUM_SHA256="3c1d8c09b72db5c9f5e2d3b467b451a6ba94c3ba8295b9880842a4e3496153dd"
CHECKSUM_SHA256="aa11c52f7812c6e9a5ccf2e3a31d526a1db5562c1bbcb571aa70d681ca909b93"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
@@ -45,6 +45,7 @@ REQUIRES="
lib:libminizip$secondaryArchSuffix
lib:libopenal$secondaryArchSuffix
lib:libopus$secondaryArchSuffix
lib:libprotobuf$secondaryArchSuffix
lib:libQt6Core$secondaryArchSuffix
lib:libQt6Core5Compat$secondaryArchSuffix
lib:libQt6Gui$secondaryArchSuffix
@@ -77,6 +78,7 @@ BUILD_REQUIRES="
devel:libminizip$secondaryArchSuffix
devel:libopenal$secondaryArchSuffix
devel:libopus$secondaryArchSuffix
devel:libprotobuf$secondaryArchSuffix
devel:libqrcodegen$secondaryArchSuffix
devel:libQt6Core$secondaryArchSuffix
devel:libQt6Core5Compat$secondaryArchSuffix