Telegram: bump version

This commit is contained in:
Gerasim Troeglazov
2021-12-31 18:44:00 +10:00
parent 74a884c164
commit f50f4bef93
3 changed files with 78 additions and 49 deletions

View File

@@ -1,11 +1,11 @@
From 09d43562e801c7083f2ec3558a52d26c4aeac2c1 Mon Sep 17 00:00:00 2001
From 38d9c21aa2a14408aa1fe9cd7cc03548df6834e6 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 16 Nov 2021 20:01:25 +1000
Date: Fri, 31 Dec 2021 17:59:23 +1000
Subject: Add Haiku support
diff --git a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
index 22978e3..264cbee 100644
index 0ae7625..7900169 100644
--- a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
+++ b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
@@ -8,6 +8,9 @@
@@ -18,7 +18,7 @@ index 22978e3..264cbee 100644
#include <errno.h>
#include <string.h>
#include <wchar.h>
@@ -3009,6 +3012,10 @@ double VoIPController::GetCurrentTime(){
@@ -3013,6 +3016,10 @@ double VoIPController::GetCurrentTime(){
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return ts.tv_sec+(double)ts.tv_nsec/1000000000.0;
@@ -883,10 +883,10 @@ index 0bc42eb..c87cde9 100644
typedef pid_t PlatformThreadId;
typedef pthread_t PlatformThreadRef;
diff --git a/Telegram/cmake/lib_tgvoip.cmake b/Telegram/cmake/lib_tgvoip.cmake
index f332b18..73c1930 100644
index 68a64ba..319e5b4 100644
--- a/Telegram/cmake/lib_tgvoip.cmake
+++ b/Telegram/cmake/lib_tgvoip.cmake
@@ -123,6 +123,14 @@ if (NOT TGVOIP_FOUND)
@@ -116,6 +116,14 @@ if (NOT TGVOIP_FOUND)
os/linux/AudioPulse.cpp
os/linux/AudioPulse.h
@@ -901,7 +901,7 @@ index f332b18..73c1930 100644
# POSIX
os/posix/NetworkSocketPosix.cpp
os/posix/NetworkSocketPosix.h
@@ -160,6 +168,25 @@ if (NOT TGVOIP_FOUND)
@@ -153,6 +161,25 @@ if (NOT TGVOIP_FOUND)
TGVOIP_NO_OSX_PRIVATE_API
)
endif()

View File

@@ -1,11 +1,11 @@
From 1dbb4e5fe5af234301dbf51d81a7f99967acfb37 Mon Sep 17 00:00:00 2001
From 7673d18ad3b47048733e170474e8257a01d3e809 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Tue, 16 Nov 2021 20:24:45 +1000
Date: Fri, 31 Dec 2021 17:59:55 +1000
Subject: Add Haiku support
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
index 44e5d26..6055d91 100644
index 7e56c73..b06de66 100644
--- a/Telegram/CMakeLists.txt
+++ b/Telegram/CMakeLists.txt
@@ -95,6 +95,15 @@ PRIVATE
@@ -24,7 +24,7 @@ index 44e5d26..6055d91 100644
target_precompile_headers(Telegram PRIVATE ${src_loc}/stdafx.h)
nice_target_sources(Telegram ${src_loc}
PRIVATE
@@ -1215,6 +1224,16 @@ else()
@@ -1240,6 +1249,16 @@ else()
)
endif()
@@ -41,7 +41,7 @@ index 44e5d26..6055d91 100644
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
remove_target_sources(Telegram ${src_loc}
platform/linux/linux_wayland_integration.cpp
@@ -1360,7 +1379,7 @@ if (build_macstore)
@@ -1385,7 +1404,7 @@ if (build_macstore)
else()
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
set(bundle_entitlements "Telegram.entitlements")
@@ -71,10 +71,10 @@ index 0fdaf4c..ea0f606 100644
if (const auto strong = weak.get()) {
showBox(Box(SettingsBox, strong));
diff --git a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
index 870d0c6..581c91f 100644
index f0248ed..d325571 100644
--- a/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
+++ b/Telegram/SourceFiles/calls/group/calls_group_panel.cpp
@@ -1935,7 +1935,9 @@ void Panel::updateButtonsGeometry() {
@@ -1936,7 +1936,9 @@ void Panel::updateButtonsGeometry() {
const auto muteSize = _mute->innerSize().width() + 2 * addSkip;
const auto skip = st::groupCallButtonSkipSmall;
const auto fullWidth = (_video->width() + skip)
@@ -84,7 +84,7 @@ index 870d0c6..581c91f 100644
+ (muteSize + skip)
+ (_settings ->width() + skip)
+ _hangup->width();
@@ -1946,9 +1948,13 @@ void Panel::updateButtonsGeometry() {
@@ -1947,9 +1949,13 @@ void Panel::updateButtonsGeometry() {
- membersWidth
- membersSkip
- fullWidth) / 2;
@@ -99,10 +99,10 @@ index 870d0c6..581c91f 100644
_video->moveToLeft(left, buttonsTop);
left += _video->width() + skip;
diff --git a/Telegram/SourceFiles/core/core_settings.h b/Telegram/SourceFiles/core/core_settings.h
index f8a26f0..a7b7a1e 100644
index b057a1f..3b4b813 100644
--- a/Telegram/SourceFiles/core/core_settings.h
+++ b/Telegram/SourceFiles/core/core_settings.h
@@ -706,7 +706,7 @@ private:
@@ -749,7 +749,7 @@ private:
rpl::variable<float64> _dialogsWidthRatio; // per-window
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
bool _notifyFromAll = true;
@@ -156,10 +156,10 @@ index 0437363..7685881 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 54f2c94..41d942c 100644
index cffa63a..257722c 100644
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
@@ -900,11 +900,17 @@ bool MainWindow::hasTrayIcon() const {
@@ -903,11 +903,17 @@ bool MainWindow::hasTrayIcon() const {
bool MainWindow::isActiveForTrayMenu() {
updateIsActive();
@@ -177,7 +177,7 @@ index 54f2c94..41d942c 100644
}
void MainWindow::psTrayMenuUpdated() {
@@ -943,6 +949,10 @@ void MainWindow::psSetupTrayIcon() {
@@ -946,6 +952,10 @@ void MainWindow::psSetupTrayIcon() {
}
trayIcon->setIcon(TrayIconGen(counter, muted));
@@ -188,7 +188,7 @@ index 54f2c94..41d942c 100644
attachToTrayIcon(trayIcon);
}
updateIconCounters();
@@ -1033,8 +1043,10 @@ void MainWindow::updateIconCounters() {
@@ -1036,8 +1046,10 @@ void MainWindow::updateIconCounters() {
}
void MainWindow::initTrayMenuHook() {
@@ -474,7 +474,7 @@ index 0000000..8605b28
+} // namespace Notifications
+} // namespace Platform
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
index 325e464..ed8feaa 100644
index 8a4c8c3..5b94ed9 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
@@ -497,7 +497,7 @@ index 325e464..ed8feaa 100644
#include <jemalloc/jemalloc.h>
#endif // Q_OS_FREEBSD
@@ -70,8 +74,36 @@ using UiWaylandIntegration = Ui::Platform::WaylandIntegration;
@@ -67,8 +71,36 @@ using UiWaylandIntegration = Ui::Platform::WaylandIntegration;
using Platform::internal::WaylandIntegration;
namespace Platform {
@@ -534,7 +534,7 @@ index 325e464..ed8feaa 100644
constexpr auto kDesktopFile = ":/misc/telegramdesktop.desktop"_cs;
constexpr auto kIconName = "telegram"_cs;
constexpr auto kDarkColorLimit = 192;
@@ -621,37 +653,6 @@ void psActivateProcess(uint64 pid) {
@@ -618,37 +650,6 @@ void psActivateProcess(uint64 pid) {
// objc_activateProgram();
}
@@ -572,7 +572,7 @@ index 325e464..ed8feaa 100644
QString psAppDataPath() {
// Previously we used ~/.TelegramDesktop, so look there first.
// If we find data there, we should still use it.
@@ -665,8 +666,11 @@ QString psAppDataPath() {
@@ -662,8 +663,11 @@ QString psAppDataPath() {
return oldPath;
}
}
@@ -585,7 +585,7 @@ index 325e464..ed8feaa 100644
}
void psDoCleanup() {
@@ -694,8 +698,9 @@ namespace Platform {
@@ -691,8 +695,9 @@ namespace Platform {
void start() {
auto backgroundThread = true;
@@ -596,7 +596,7 @@ index 325e464..ed8feaa 100644
// Prevent any later calls into setlocale() by Qt
QCoreApplicationPrivate::initLocale();
@@ -825,7 +830,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
@@ -828,7 +833,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
} else if (DesktopEnvironment::IsMATE()) {
add("mate-volume-control");
}
@@ -606,10 +606,10 @@ index 325e464..ed8feaa 100644
#endif // __ HAIKU__
add("pavucontrol-qt");
diff --git a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
index fd81ab1..73cdc47 100644
index 057a9b5..68abe1e 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/MediaManager.cpp
@@ -964,7 +964,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
@@ -967,7 +967,7 @@ void MediaManager::fillCallStats(CallStats &callStats) {
}
void MediaManager::setAudioInputDevice(std::string id) {
@@ -619,10 +619,10 @@ index fd81ab1..73cdc47 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 b3fcaea..6a7ac01 100644
index 8898223..615b4eb 100644
--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
@@ -2791,7 +2791,7 @@ public:
@@ -2782,7 +2782,7 @@ public:
}
void setAudioOutputDevice(const std::string &id) {
@@ -631,7 +631,7 @@ index b3fcaea..6a7ac01 100644
_threads->getWorkerThread()->Invoke<void>(RTC_FROM_HERE, [&] {
SetAudioOutputDeviceById(_audioDeviceModule.get(), id);
});
@@ -2799,7 +2799,7 @@ public:
@@ -2790,7 +2790,7 @@ public:
}
void setAudioInputDevice(const std::string &id) {
@@ -747,7 +747,7 @@ index aa65e5e..60b761f 100644
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 1021c85..fd6e541 100644
index 033dcbd..bf7d541 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 @@
@@ -786,6 +786,23 @@ index 1021c85..fd6e541 100644
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
if (::Platform::IsX11()) {
const auto xcbResult = XCBLastUserInputTime();
diff --git a/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux_dummy.cpp b/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux_dummy.cpp
index ba8984d..4876aa7 100644
--- a/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux_dummy.cpp
+++ b/Telegram/lib_base/base/platform/linux/base_system_media_controls_linux_dummy.cpp
@@ -46,6 +46,12 @@ void SystemMediaControls::setIsStopEnabled(bool value) {
void SystemMediaControls::setPlaybackStatus(PlaybackStatus status) {
}
+void SystemMediaControls::setLoopStatus(LoopStatus status) {
+}
+
+void SystemMediaControls::setShuffle(bool value) {
+}
+
void SystemMediaControls::setTitle(const QString &title) {
}
diff --git a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
index 20aed5e..61d46fc 100644
--- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
@@ -802,10 +819,10 @@ index 20aed5e..61d46fc 100644
#include <QtCore/QProcess>
#include <QtGui/QWindow>
diff --git a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
index 2a7fb2d..8eaae4c 100644
index f55ed32..6ec825d 100644
--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
+++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
@@ -609,7 +609,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -618,7 +618,7 @@ TitleControls::Layout TitleControlsLayout() {
}
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
@@ -814,7 +831,7 @@ index 2a7fb2d..8eaae4c 100644
return TitleControls::Layout{
.left = {
TitleControls::Control::Close,
@@ -619,7 +619,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -628,7 +628,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Maximize,
}
};
@@ -823,7 +840,7 @@ index 2a7fb2d..8eaae4c 100644
return TitleControls::Layout{
.right = {
TitleControls::Control::Minimize,
@@ -627,7 +627,7 @@ TitleControls::Layout TitleControlsLayout() {
@@ -636,7 +636,7 @@ TitleControls::Layout TitleControlsLayout() {
TitleControls::Control::Close,
}
};
@@ -832,8 +849,23 @@ index 2a7fb2d..8eaae4c 100644
}
} // namespace Platform
diff --git a/Telegram/lib_ui/ui/ui_utility.cpp b/Telegram/lib_ui/ui/ui_utility.cpp
index e66055d..e31d635 100644
--- a/Telegram/lib_ui/ui/ui_utility.cpp
+++ b/Telegram/lib_ui/ui/ui_utility.cpp
@@ -9,6 +9,10 @@
#include "ui/platform/ui_platform_utility.h"
#include "ui/style/style_core.h"
+#ifdef Q_OS_HAIKU
+#include <base/haiku_types.h>
+#endif
+
#include <QtWidgets/QApplication>
#include <QtGui/QWindow>
#include <QtGui/QtEvents>
diff --git a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
index da05ec0..4daaae5 100644
index 9955bd3..ca023c1 100644
--- a/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
+++ b/Telegram/lib_webrtc/webrtc/details/webrtc_openal_adm.cpp
@@ -4,6 +4,11 @@
@@ -865,10 +897,10 @@ index 092b667..204e259 100644
#include "webrtc/webrtc_create_adm.h"
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
index 1460cf9..624e349 100644
index 28eebaf..7816ead 100644
--- a/cmake/external/CMakeLists.txt
+++ b/cmake/external/CMakeLists.txt
@@ -37,7 +37,7 @@ if (add_hunspell_library)
@@ -40,7 +40,7 @@ if (add_hunspell_library)
add_checked_subdirectory(hunspell)
endif()
add_checked_subdirectory(iconv)
@@ -878,10 +910,10 @@ index 1460cf9..624e349 100644
endif()
add_checked_subdirectory(jpeg)
diff --git a/cmake/options_linux.cmake b/cmake/options_linux.cmake
index 436266d..68dced3 100644
index 9b39c06..e5f45d0 100644
--- a/cmake/options_linux.cmake
+++ b/cmake/options_linux.cmake
@@ -60,10 +60,12 @@ if (DESKTOP_APP_SPECIAL_TARGET)
@@ -61,10 +61,12 @@ if (DESKTOP_APP_SPECIAL_TARGET)
target_link_options(common_options INTERFACE $<IF:$<CONFIG:Debug>,,-g -flto -fuse-linker-plugin>)
endif()

View File

@@ -5,7 +5,7 @@ COPYRIGHT="2013-2021 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="72c51d0f24c78f9362c334091fb2de71ecfe786e8d9076f9f4fca4925809489b"
CHECKSUM_SHA256="8bd9067ba0a044789aa28b321715ba60971dc27ae8d027ef1f9879093c331157"
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
SOURCE_DIR="tdesktop-$portVersion-full"
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
@@ -98,7 +98,7 @@ BUILD_PREREQUIRES="
cmd:cmake
cmd:gawk
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:ninja
cmd:pkg_config$secondaryArchSuffix
cmd:python
cmd:sed
@@ -126,10 +126,7 @@ BUILD()
fi
# build telegram
mkdir -p build
cd build
cmake .. \
cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DDESKTOP_APP_QT6=ON \
-DTDESKTOP_API_TEST=OFF \
@@ -149,7 +146,7 @@ BUILD()
-DTDESKTOP_API_ID=$TELEGRAM_API_ID \
-DTDESKTOP_API_HASH=$TELEGRAM_API_HASH
make $jobArgs
ninja -C build $jobArgs
}
INSTALL()