Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2023-01-04 13:59:03 +10:00
parent 6343085584
commit e684a8e346
3 changed files with 51 additions and 47 deletions

View File

@@ -1,11 +1,11 @@
From 19068ecdf1d96b377f9d5e575e8906b50ae452be Mon Sep 17 00:00:00 2001
From 49eb4f90ccd75a777585500a576d64f7b9e7f479 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 8 Dec 2022 00:03:02 +1000
Date: Wed, 4 Jan 2023 11:33:37 +1000
Subject: Add Haiku support
diff --git a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
index 0ae7625..7900169 100644
index 0c0e23b..c41ecd4 100644
--- a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
+++ b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
@@ -8,6 +8,9 @@
@@ -18,7 +18,7 @@ index 0ae7625..7900169 100644
#include <errno.h>
#include <string.h>
#include <wchar.h>
@@ -3013,6 +3016,10 @@ double VoIPController::GetCurrentTime(){
@@ -3018,6 +3021,10 @@ double VoIPController::GetCurrentTime(){
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec+(double)ts.tv_nsec/1000000000.0;
@@ -30,7 +30,7 @@ index 0ae7625..7900169 100644
static pthread_once_t token = PTHREAD_ONCE_INIT;
pthread_once(&token, &initMachTimestart);
diff --git a/Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp b/Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp
index 29d5ad9..994d938 100644
index 8095646..ee4f1a8 100644
--- a/Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp
+++ b/Telegram/ThirdParty/libtgvoip/audio/AudioIO.cpp
@@ -39,6 +39,9 @@
@@ -49,11 +49,11 @@ index 29d5ad9..994d938 100644
return new ContextlessAudioIO<AudioInputWASAPI, AudioOutputWASAPI>(inputDevice, outputDevice);
+#elif defined(__HAIKU__)
+ return new ContextlessAudioIO<AudioInputHaiku, AudioOutputHaiku>();
#elif defined(__linux__) || defined(__FreeBSD__)
#elif defined(__linux__) || defined(__FreeBSD__) || defined(__OpenBSD__)
#ifndef WITHOUT_ALSA
#ifndef WITHOUT_PULSE
diff --git a/Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp b/Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp
index efdc535..12fbc5a 100644
index 1527497..90bbcf9 100644
--- a/Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp
+++ b/Telegram/ThirdParty/libtgvoip/audio/AudioInput.cpp
@@ -33,6 +33,8 @@
@@ -66,7 +66,7 @@ index efdc535..12fbc5a 100644
#error "Unsupported operating system"
#endif
diff --git a/Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp b/Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp
index 3f88799..97820b6 100644
index d42bd4d..3980367 100644
--- a/Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp
+++ b/Telegram/ThirdParty/libtgvoip/audio/AudioOutput.cpp
@@ -37,6 +37,8 @@
@@ -794,7 +794,7 @@ index 78e0583..81bf9fc 100644
diff --git a/Telegram/ThirdParty/libtgvoip/threading.h b/Telegram/ThirdParty/libtgvoip/threading.h
old mode 100755
new mode 100644
index 37de500..2017b83
index 7da4fb2..a96bc52
--- a/Telegram/ThirdParty/libtgvoip/threading.h
+++ b/Telegram/ThirdParty/libtgvoip/threading.h
@@ -9,7 +9,7 @@
@@ -806,15 +806,15 @@ index 37de500..2017b83
#include <pthread.h>
#include <semaphore.h>
@@ -95,6 +95,7 @@ namespace tgvoip{
@@ -94,6 +94,7 @@ namespace tgvoip{
static void* ActualEntryPoint(void* arg){
Thread* self=reinterpret_cast<Thread*>(arg);
if(self->name){
+#ifndef __HAIKU__
#if defined(__linux__) || defined(__FreeBSD__)
pthread_setname_np(self->thread, self->name);
#elif defined(__APPLE__)
@@ -103,6 +104,7 @@ namespace tgvoip{
#elif defined(__OpenBSD__)
@@ -104,6 +105,7 @@ namespace tgvoip{
DarwinSpecific::SetCurrentThreadPriority(DarwinSpecific::THREAD_PRIO_USER_INTERACTIVE);
}
#endif

View File

@@ -1,11 +1,11 @@
From e052b062857185fe123cd4e6e36f67f1f90fd021 Mon Sep 17 00:00:00 2001
From 83b0bb3918e3962eb65232c0bb609b7f47fc00d5 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Thu, 8 Dec 2022 00:03:21 +1000
Date: Wed, 4 Jan 2023 11:33:57 +1000
Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index 7d43100..bc2a84f 100644
index 8f05bd4..8485d2e 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -91,6 +91,15 @@ PRIVATE
@@ -24,7 +24,7 @@ index 7d43100..bc2a84f 100644
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1377,6 +1386,16 @@ else()
@@ -1387,6 +1396,16 @@ else()
)
endif()
@@ -41,7 +41,7 @@ index 7d43100..bc2a84f 100644
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp
@@ -1525,7 +1544,7 @@ if (build_macstore)
@@ -1535,7 +1554,7 @@ if (build_macstore)
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")
@@ -71,10 +71,10 @@ index aad0723..c58929f 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 afabc40..3b385d5 100644
index 652269a..059c536 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -821,7 +821,7 @@ private:
@@ -824,7 +824,7 @@ private:
rpl::variable<float64> _dialogsWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
@@ -157,10 +157,10 @@ index b90b70a..9c6a202 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 02a28c6..d2b93cb 100644
index 01c5ab5..c1e7a04 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
@@ -39,6 +39,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "base/platform/linux/base_linux_xcb_utilities.h"
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
@@ -171,7 +171,7 @@ index 02a28c6..d2b93cb 100644
#include <QtCore/QSize>
#include <QtCore/QMimeData>
#include <QtGui/QWindow>
@@ -255,6 +259,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
@@ -228,6 +232,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
SkipTaskbar(windowHandle(), mode == WorkMode::TrayOnly);
}
@@ -201,10 +201,10 @@ index aa563d4..f7aa7d9 100644
protected:
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..7328a33
index 0000000..f01fa5c
--- /dev/null
+++ b/Telegram/SourceFiles/platform/linux/notifications_manager_haiku.cpp
@@ -0,0 +1,274 @@
@@ -0,0 +1,278 @@
+/*
+This file is part of Telegram Desktop for Haiku,
+
@@ -291,6 +291,10 @@ index 0000000..7328a33
+ return true;
+}
+
+bool WaitForInputForCustom() {
+ return false;
+}
+
+void Create(Window::Notifications::System *system) {
+ if (Core::App().settings().nativeNotifications() && Supported()) {
+ auto result = std::make_unique<Manager>(system);
@@ -480,7 +484,7 @@ index 0000000..7328a33
+} // namespace Notifications
+} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index be60411..718acc2 100644
index 980bdcd..8cb3a5e 100644
--- a/Telegram/SourceFiles/platform/linux/specific_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
@@ -34,6 +34,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
@@ -528,7 +532,7 @@ index be60411..718acc2 100644
constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs;
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -597,6 +628,9 @@ std::optional<bool> IsDarkMode() {
@@ -620,6 +651,9 @@ std::optional<bool> IsDarkMode() {
}
bool AutostartSupported() {
@@ -536,9 +540,9 @@ index be60411..718acc2 100644
+ return true;
+#endif
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
// snap sandbox doesn't allow creating files
// in folders with names started with a dot
@@ -609,6 +643,10 @@ bool AutostartSupported() {
return true;
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -628,6 +662,10 @@ bool AutostartSupported() {
}
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
@@ -547,9 +551,9 @@ index be60411..718acc2 100644
+ return;
+#endif
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
const auto guard = gsl::finally([&] {
if (done) {
@@ -677,7 +715,11 @@ QString psAppDataPath() {
const auto success = [&] {
const auto silent = !done;
@@ -702,7 +740,11 @@ QString psAppDataPath() {
}
}
@@ -561,7 +565,7 @@ index be60411..718acc2 100644
}
void psDoCleanup() {
@@ -859,6 +901,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
@@ -885,6 +927,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
add("mate-volume-control");
}
}
@@ -570,10 +574,10 @@ index be60411..718acc2 100644
add("pavucontrol");
add("alsamixergui");
diff --git a/Telegram/SourceFiles/platform/linux/tray_linux.cpp b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
index ba2a6b7..a13b40d 100644
index 82fe8f7..4b61032 100644
--- a/Telegram/SourceFiles/platform/linux/tray_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/tray_linux.cpp
@@ -300,7 +300,7 @@ void Tray::createIcon() {
@@ -326,7 +326,7 @@ void Tray::createIcon() {
const auto showXEmbed = [=] {
_aboutToShowRequests.fire({});
InvokeQueued(_menuXEmbed.get(), [=] {
@@ -583,10 +587,10 @@ index ba2a6b7..a13b40d 100644
};
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
index df88634..bf4502a 100644
index 43171fb..9f8ce5a 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
@@ -976,7 +976,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
@@ -1038,7 +1038,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
}
void MediaManager::setAudioInputDevice(std::string id) {
@@ -596,25 +600,25 @@ index df88634..bf4502a 100644
SetAudioInputDeviceById(_audioDeviceModule.get(), id);
#endif
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
index e5cc95a..1ab53d0 100644
index 7de4709..f55e0a3 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
@@ -2848,7 +2848,7 @@ public:
@@ -2849,7 +2849,7 @@ public:
}
void setAudioOutputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
_threads->getWorkerThread()->BlockingCall([&] {
SetAudioOutputDeviceById(_audioDeviceModule.get(), id);
});
@@ -2856,7 +2856,7 @@ public:
@@ -2857,7 +2857,7 @@ public:
}
void setAudioInputDevice(const std::string &id) {
-#ifndef WEBRTC_IOS
+#if !defined(WEBRTC_IOS) && !defined(__HAIKU__)
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
_threads->getWorkerThread()->BlockingCall([&] {
SetAudioInputDeviceById(_audioDeviceModule.get(), id);
});
diff --git a/Telegram/lib_base/base/haiku_types.h b/Telegram/lib_base/base/haiku_types.h
@@ -723,7 +727,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 aefae77..5a8c89e 100644
index 891cb96..a49b75a 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 @@
@@ -738,7 +742,7 @@ index aefae77..5a8c89e 100644
namespace base::Platform {
namespace {
@@ -184,9 +189,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
@@ -188,9 +193,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -793,7 +797,7 @@ index 28289fe..cef5cfc 100644
#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
index d0aea2f..dc02314 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 @@

View File

@@ -1,11 +1,11 @@
SUMMARY="Telegram Desktop Messenger"
DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
HOMEPAGE="https://www.telegram.org/"
COPYRIGHT="2013-2022 Telegram"
COPYRIGHT="2013-2023 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="76981e32541c42b3212427e9abb4db2a6f55a14eaba31b3d7ad7d3d5ed8008b1"
CHECKSUM_SHA256="b2c77dc4cd3589a60a7eb124233d339d68eb18ff9c1be52c64c048b42bf45bba"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"