Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2025-02-16 20:46:06 +10:00
parent c44e198c6b
commit e9028306c2
4 changed files with 238 additions and 184 deletions

View File

@@ -1,6 +1,6 @@
From 3a2543a615c1161ee684dc13db777dc5cf7a19ad Mon Sep 17 00:00:00 2001
From f7ceaddf839fcaf407db1c156416dcb2cb4c9d11 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 4 Feb 2025 21:54:33 +1000
Date: Sat, 15 Feb 2025 10:43:19 +0000
Subject: Add haiku support

View File

@@ -1,6 +1,6 @@
From cb6d03143013a1cf2b2ad96449eeabfbf6f12355 Mon Sep 17 00:00:00 2001
From fefca40e7fefef8e0ef73dcdfaf7fb6581633ece Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 4 Feb 2025 21:55:34 +1000
Date: Sat, 15 Feb 2025 10:44:26 +0000
Subject: Add haiku support
@@ -138,7 +138,7 @@ index 0000000..e5f8b64
+
+resource("BEOS:default_shortcut") "S";
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index b2298db..b0f7f27 100644
index 1c881e2..63e1f1d 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -97,6 +97,15 @@ PRIVATE
@@ -157,7 +157,7 @@ index b2298db..b0f7f27 100644
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1672,6 +1681,16 @@ if (NOT build_winstore)
@@ -1676,6 +1685,16 @@ if (NOT build_winstore)
)
endif()
@@ -174,7 +174,7 @@ index b2298db..b0f7f27 100644
if (DESKTOP_APP_USE_PACKAGED)
remove_target_sources(Telegram ${src_loc}
platform/mac/mac_iconv_helper.c
@@ -1835,7 +1854,7 @@ else()
@@ -1839,7 +1858,7 @@ else()
set(bundle_identifier "com.tdesktop.Telegram")
endif()
set(bundle_entitlements "Telegram.entitlements")
@@ -255,10 +255,10 @@ index 4188882..0e0b448 100644
const QStringList &lst(cSendPaths());
for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) {
diff --git a/Telegram/SourceFiles/iv/iv_controller.cpp b/Telegram/SourceFiles/iv/iv_controller.cpp
index bf699ad..c0e6ce9 100644
index 87befe5..d35cd84 100644
--- a/Telegram/SourceFiles/iv/iv_controller.cpp
+++ b/Telegram/SourceFiles/iv/iv_controller.cpp
@@ -49,7 +49,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -50,7 +50,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <QtGui/QWindow>
#include <charconv>
@@ -268,6 +268,21 @@ index bf699ad..c0e6ce9 100644
namespace Iv {
namespace {
diff --git a/Telegram/SourceFiles/platform/linux/current_geo_location_linux.cpp b/Telegram/SourceFiles/platform/linux/current_geo_location_linux.cpp
index 7015af7..9c528ef 100644
--- a/Telegram/SourceFiles/platform/linux/current_geo_location_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/current_geo_location_linux.cpp
@@ -12,6 +12,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include <gio/gio.h>
+#ifdef __HAIKU__
+#define RTLD_NODELETE 0
+#endif
+
namespace Platform {
namespace {
diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
index f314fb0..331db8a 100644
--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
@@ -396,10 +411,10 @@ index 4ef98ba..ee8b3ad 100644
void updateWindowIcon() override;
diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
new file mode 100644
index 0000000..ed9f6a7
index 0000000..0d7526d
--- /dev/null
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -0,0 +1,271 @@
@@ -0,0 +1,273 @@
+/*
+This file is part of Telegram Desktop for Haiku,
+
@@ -508,8 +523,10 @@ index 0000000..ed9f6a7
+
+void Create(Window::Notifications::System *system) {
+ if (Core::App().settings().nativeNotifications() && Supported()) {
+ auto result = std::make_unique<Manager>(system);
+ system->setManager(std::move(result));
+ system->setManager([=] {
+ auto manager = std::make_unique<Manager>(system);
+ return manager;
+ });
+ return;
+ }
+ system->setManager(nullptr);
@@ -1124,7 +1141,7 @@ index d4c3f30..22fb3d6 100644
#include "webrtc/webrtc_device_common.h"
diff --git a/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp b/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp
index c85e18c..700751b 100644
index 009c732..4752f25 100644
--- a/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp
+++ b/Telegram/lib_webview/webview/platform/linux/webview_linux_webkitgtk_library.cpp
@@ -8,6 +8,10 @@
@@ -1138,6 +1155,37 @@ index c85e18c..700751b 100644
namespace Webview::WebKitGTK::Library {
ResolveResult Resolve(bool wayland) {
diff --git a/Telegram/lib_webview/webview/webview_data_stream_memory.cpp b/Telegram/lib_webview/webview/webview_data_stream_memory.cpp
index efe587e..b9d3509 100644
--- a/Telegram/lib_webview/webview/webview_data_stream_memory.cpp
+++ b/Telegram/lib_webview/webview/webview_data_stream_memory.cpp
@@ -6,7 +6,7 @@
//
#include "webview/webview_data_stream_memory.h"
-#if !defined Q_OS_WIN && !defined Q_OS_MAC
+#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HAIKU
#include <sys/mman.h>
#endif // !Q_OS_WIN && !Q_OS_MAC
@@ -17,7 +17,7 @@ DataStreamFromMemory::DataStreamFromMemory(
std::string mime)
: _data(data)
, _mime(mime) {
-#if !defined Q_OS_WIN && !defined Q_OS_MAC
+#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HAIKU
const auto handle = memfd_create("webview-data-stream", MFD_CLOEXEC);
if (handle == -1) {
return;
@@ -44,7 +44,7 @@ DataStreamFromMemory::DataStreamFromMemory(
}
DataStreamFromMemory::~DataStreamFromMemory() {
-#if !defined Q_OS_WIN && !defined Q_OS_MAC
+#if !defined Q_OS_WIN && !defined Q_OS_MAC && !defined Q_OS_HAIKU
if (_handle) {
munmap((void*)_data.constData(), _data.size());
close(_handle);
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
index 58f2503..65dbe67 100644
--- a/cmake/external/CMakeLists.txt
@@ -1163,30 +1211,3 @@ index 58f2503..65dbe67 100644
--
2.45.2
From 14dd85dabc50121f676831781810159e900ed996 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 4 Feb 2025 23:15:07 +1000
Subject: Fix build
diff --git a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
index ed9f6a7..0d7526d 100644
--- a/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -106,8 +106,10 @@ void MaybeFlashBounceForCustom(Fn<void()> flashBounce) {
void Create(Window::Notifications::System *system) {
if (Core::App().settings().nativeNotifications() && Supported()) {
- auto result = std::make_unique<Manager>(system);
- system->setManager(std::move(result));
+ system->setManager([=] {
+ auto manager = std::make_unique<Manager>(system);
+ return manager;
+ });
return;
}
system->setManager(nullptr);
--
2.45.2

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2025 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="37f5f4108ca052a670a6b28e6eecf7afbc1bccbc562997cf9c89c0c725d96c1e"
CHECKSUM_SHA256="bde842b71064511c5bacb4971e3b2d539614f8dc541dffcb4ccc00e02d80924b"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
SOURCE_URI_2="https://github.com/ada-url/ada/releases/download/v2.9.0/singleheader.zip"
@@ -198,6 +198,11 @@ BUILD()
-DTDESKTOP_API_HASH=$TELEGRAM_API_HASH \
-DLZ4_INCLUDE_DIRS=/system/$relativeIncludeDir
# hack for info_profile_actions.cpp file (fix OOM error)
if [ $targetArchitecture == x86_gcc2 ]; then
sed -i -e '/info_profile_actions\.cpp\.o:/,/^$/{ /^[[:space:]]*FLAGS[[:space:]]*=/s/-O1/-O0/ }' $sourceDir/build/build.ninja
fi
ninja -C build -v $jobArgs
cd SendToAddon