mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
From 398d7992ed1d8e9b4e9a034482d281adc916741e Mon Sep 17 00:00:00 2001
|
||||
From 7d522be38eef45ce875c6b7c4669673a9b101352 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 28 Apr 2023 19:35:39 +1000
|
||||
Date: Sat, 23 Sep 2023 22:27:34 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@ 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 fab5e1a..f516210 100644
|
||||
index 886cd99..705a6a2 100644
|
||||
--- a/Telegram/cmake/lib_tgvoip.cmake
|
||||
+++ b/Telegram/cmake/lib_tgvoip.cmake
|
||||
@@ -118,6 +118,14 @@ PRIVATE
|
||||
@@ -901,7 +901,7 @@ index fab5e1a..f516210 100644
|
||||
# POSIX
|
||||
os/posix/NetworkSocketPosix.cpp
|
||||
os/posix/NetworkSocketPosix.h
|
||||
@@ -155,6 +163,25 @@ elseif (APPLE)
|
||||
@@ -160,6 +168,25 @@ elseif (APPLE)
|
||||
TGVOIP_NO_OSX_PRIVATE_API
|
||||
)
|
||||
endif()
|
||||
@@ -1,11 +1,11 @@
|
||||
From 8b1eae4131c09b2a741790287bc8e8d2f3635050 Mon Sep 17 00:00:00 2001
|
||||
From 9e5eafd7b1e6280f5ee262c2a26d7eac68495991 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Fri, 28 Apr 2023 19:36:45 +1000
|
||||
Date: Mon, 25 Sep 2023 22:21:24 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index 008c71b..697a399 100644
|
||||
index d555578..b1770d1 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -90,6 +90,15 @@ PRIVATE
|
||||
@@ -24,13 +24,14 @@ index 008c71b..697a399 100644
|
||||
target_precompile_headers(Telegram PRIVATE $<$<COMPILE_LANGUAGE:CXX,OBJCXX>:${src_loc}/stdafx.h>)
|
||||
nice_target_sources(Telegram ${src_loc}
|
||||
PRIVATE
|
||||
@@ -1413,6 +1422,16 @@ else()
|
||||
@@ -1450,6 +1459,17 @@ if (NOT build_winstore)
|
||||
)
|
||||
endif()
|
||||
|
||||
+if (HAIKU)
|
||||
+ remove_target_sources(Telegram ${src_loc}
|
||||
+ platform/linux/notifications_manager_linux_dummy.cpp
|
||||
+ platform/linux/notifications_manager_linux.cpp
|
||||
+ )
|
||||
+ nice_target_sources(Telegram ${src_loc}
|
||||
+ PRIVATE
|
||||
@@ -41,7 +42,7 @@ index 008c71b..697a399 100644
|
||||
if (DESKTOP_APP_DISABLE_WAYLAND_INTEGRATION)
|
||||
remove_target_sources(Telegram ${src_loc}
|
||||
platform/linux/linux_wayland_integration.cpp
|
||||
@@ -1568,7 +1587,7 @@ if (build_macstore)
|
||||
@@ -1608,7 +1628,7 @@ if (build_macstore)
|
||||
else()
|
||||
set(bundle_identifier "com.tdesktop.Telegram$<$<CONFIG:Debug>:Debug>")
|
||||
set(bundle_entitlements "Telegram.entitlements")
|
||||
@@ -51,7 +52,7 @@ index 008c71b..697a399 100644
|
||||
else()
|
||||
set(output_name "Telegram")
|
||||
diff --git a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
|
||||
index aad0723..c58929f 100644
|
||||
index 51a9068..b5296bc 100644
|
||||
--- a/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
|
||||
+++ b/Telegram/SourceFiles/calls/group/calls_group_menu.cpp
|
||||
@@ -572,6 +572,7 @@ void FillMenu(
|
||||
@@ -71,10 +72,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 111bf6c..aecadca 100644
|
||||
index f25345d..e05ce12 100644
|
||||
--- a/Telegram/SourceFiles/core/core_settings.h
|
||||
+++ b/Telegram/SourceFiles/core/core_settings.h
|
||||
@@ -893,7 +893,7 @@ private:
|
||||
@@ -909,7 +909,7 @@ private:
|
||||
rpl::variable<float64> _dialogsWidthRatio; // per-window
|
||||
rpl::variable<int> _thirdColumnWidth = kDefaultThirdColumnWidth; // p-w
|
||||
bool _notifyFromAll = true;
|
||||
@@ -84,10 +85,10 @@ index 111bf6c..aecadca 100644
|
||||
rpl::variable<bool> _systemDarkModeEnabled = false;
|
||||
rpl::variable<WindowTitleContent> _windowTitleContent;
|
||||
diff --git a/Telegram/SourceFiles/core/sandbox.cpp b/Telegram/SourceFiles/core/sandbox.cpp
|
||||
index 741f7d0..30dc2d7 100644
|
||||
index 45d2bef..b8864ec 100644
|
||||
--- a/Telegram/SourceFiles/core/sandbox.cpp
|
||||
+++ b/Telegram/SourceFiles/core/sandbox.cpp
|
||||
@@ -241,7 +241,7 @@ void Sandbox::setupScreenScale() {
|
||||
@@ -247,7 +247,7 @@ void Sandbox::setupScreenScale() {
|
||||
|
||||
const auto screen = Sandbox::primaryScreen();
|
||||
const auto dpi = screen->logicalDotsPerInch();
|
||||
@@ -96,7 +97,7 @@ index 741f7d0..30dc2d7 100644
|
||||
const auto base = (basePair.first + basePair.second) * 0.5;
|
||||
const auto screenScaleExact = dpi / base;
|
||||
const auto screenScale = int(base::SafeRound(screenScaleExact * 20)) * 5;
|
||||
@@ -264,9 +264,12 @@ Sandbox::~Sandbox() = default;
|
||||
@@ -270,9 +270,12 @@ Sandbox::~Sandbox() = default;
|
||||
|
||||
bool Sandbox::event(QEvent *e) {
|
||||
if (e->type() == QEvent::Quit && !Quitting()) {
|
||||
@@ -111,8 +112,8 @@ index 741f7d0..30dc2d7 100644
|
||||
+ }
|
||||
} else if (e->type() == QEvent::Close) {
|
||||
Quit();
|
||||
}
|
||||
@@ -276,7 +279,7 @@ bool Sandbox::event(QEvent *e) {
|
||||
} else if (e->type() == DeadlockDetector::PingPongEvent::Type()) {
|
||||
@@ -286,7 +289,7 @@ bool Sandbox::event(QEvent *e) {
|
||||
void Sandbox::socketConnected() {
|
||||
LOG(("Socket connected, this is not the first application instance, sending show command..."));
|
||||
_secondInstance = true;
|
||||
@@ -122,12 +123,12 @@ index 741f7d0..30dc2d7 100644
|
||||
const QStringList &lst(cSendPaths());
|
||||
for (QStringList::const_iterator i = lst.cbegin(), e = lst.cend(); i != e; ++i) {
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
|
||||
index b90b70a..9c6a202 100644
|
||||
index 027f6de..2b54918 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/linux/file_utilities_linux.cpp
|
||||
@@ -19,6 +19,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include <giomm.h>
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -16,6 +16,15 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
|
||||
using namespace gi::repository;
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <base/haiku_types.h>
|
||||
@@ -141,7 +142,7 @@ index b90b70a..9c6a202 100644
|
||||
namespace Platform {
|
||||
namespace File {
|
||||
|
||||
@@ -43,6 +52,23 @@ void UnsafeOpenEmailLink(const QString &email) {
|
||||
@@ -40,6 +49,23 @@ void UnsafeOpenEmailLink(const QString &email) {
|
||||
}
|
||||
|
||||
bool UnsafeShowOpenWith(const QString &filepath) {
|
||||
@@ -162,14 +163,14 @@ index b90b70a..9c6a202 100644
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
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 ada8cd6..0f19120 100644
|
||||
index 7fec6ec..bd1c804 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
|
||||
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.cpp
|
||||
@@ -39,6 +39,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
@@ -36,6 +36,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/platform/linux/base_linux_xcb_utilities.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
@@ -180,7 +181,7 @@ index ada8cd6..0f19120 100644
|
||||
#include <QtCore/QSize>
|
||||
#include <QtCore/QMimeData>
|
||||
#include <QtGui/QWindow>
|
||||
@@ -228,6 +232,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
|
||||
@@ -221,6 +225,12 @@ void MainWindow::workmodeUpdated(Core::Settings::WorkMode mode) {
|
||||
SkipTaskbar(windowHandle(), mode == WorkMode::TrayOnly);
|
||||
}
|
||||
|
||||
@@ -194,7 +195,7 @@ index ada8cd6..0f19120 100644
|
||||
updateUnityCounter();
|
||||
}
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/main_window_linux.h b/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
index 3f074db..2e1a1f9 100644
|
||||
index 467f690..f1160f2 100644
|
||||
--- a/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
+++ b/Telegram/SourceFiles/platform/linux/main_window_linux.h
|
||||
@@ -21,6 +21,9 @@ namespace Platform {
|
||||
@@ -508,10 +509,10 @@ index 0000000..21935f0
|
||||
+} // namespace Notifications
|
||||
+} // namespace Platform
|
||||
diff --git a/Telegram/SourceFiles/platform/linux/specific_linux.cpp b/Telegram/SourceFiles/platform/linux/specific_linux.cpp
|
||||
index a8b2c6a..c517588 100644
|
||||
index 41828ed..9cb4c73 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
|
||||
@@ -27,6 +27,10 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "base/platform/linux/base_linux_xcb_utilities.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
@@ -522,10 +523,11 @@ index a8b2c6a..c517588 100644
|
||||
#include <QtWidgets/QApplication>
|
||||
#include <QtWidgets/QSystemTrayIcon>
|
||||
#include <QtCore/QStandardPaths>
|
||||
@@ -124,6 +128,33 @@ static void t_desktop_application_init(TDesktopApplication *application) {
|
||||
@@ -53,6 +57,33 @@ using Platform::internal::WaylandIntegration;
|
||||
|
||||
namespace Platform {
|
||||
namespace {
|
||||
|
||||
+
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+void HaikuAutostart(bool start) {
|
||||
+ const auto home = QDir::homePath();
|
||||
@@ -552,32 +554,29 @@ index a8b2c6a..c517588 100644
|
||||
+ }
|
||||
+}
|
||||
+#endif // Q_OS_HAIKU
|
||||
+
|
||||
constexpr auto kDesktopFile = ":/misc/org.telegram.desktop.desktop"_cs;
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -625,6 +656,9 @@ std::optional<bool> IsDarkMode() {
|
||||
}
|
||||
|
||||
bool AutostartSupported() {
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ return true;
|
||||
+#endif
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
return true;
|
||||
#else // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -633,6 +667,10 @@ bool AutostartSupported() {
|
||||
void PortalAutostart(bool enabled, Fn<void(bool)> done) {
|
||||
if (cExeName().isEmpty()) {
|
||||
@@ -477,6 +508,10 @@ bool AutostartSupported() {
|
||||
}
|
||||
|
||||
void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ HaikuAutostart(enabled);
|
||||
+ return;
|
||||
+#else
|
||||
if (KSandbox::isFlatpak()) {
|
||||
PortalAutostart(enabled, done);
|
||||
return;
|
||||
@@ -504,6 +539,7 @@ void AutostartToggle(bool enabled, Fn<void(bool)> done) {
|
||||
if (done) {
|
||||
done(enabled && success);
|
||||
}
|
||||
+#endif
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
const auto success = [&] {
|
||||
const auto silent = !done;
|
||||
@@ -703,7 +741,11 @@ QString psAppDataPath() {
|
||||
}
|
||||
|
||||
bool AutostartSkip() {
|
||||
@@ -569,7 +605,11 @@ QString psAppDataPath() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,7 +588,7 @@ index a8b2c6a..c517588 100644
|
||||
}
|
||||
|
||||
void psDoCleanup() {
|
||||
@@ -845,6 +887,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||
@@ -697,6 +737,7 @@ bool OpenSystemSettings(SystemSettingsType type) {
|
||||
add("mate-volume-control");
|
||||
}
|
||||
}
|
||||
@@ -624,7 +623,7 @@ index 88bdd22..6431130 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 aa2150c..ed7eb62 100644
|
||||
index eaf2172..2e982f8 100644
|
||||
--- a/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
|
||||
+++ b/Telegram/ThirdParty/tgcalls/tgcalls/group/GroupInstanceCustomImpl.cpp
|
||||
@@ -2846,7 +2846,7 @@ public:
|
||||
@@ -676,10 +675,10 @@ index 0000000..3a57ce2
|
||||
+
|
||||
+#endif
|
||||
diff --git a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
|
||||
index ffb4dcb..720bd29 100644
|
||||
index 50fae18..3aed9a8 100644
|
||||
--- a/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
|
||||
+++ b/Telegram/lib_base/base/platform/linux/base_file_utilities_linux.cpp
|
||||
@@ -31,8 +31,58 @@
|
||||
@@ -27,8 +27,58 @@
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
@@ -736,27 +735,36 @@ index ffb4dcb..720bd29 100644
|
||||
+}
|
||||
+#endif
|
||||
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
bool PortalShowInFolder(const QString &filepath) {
|
||||
@@ -125,6 +175,11 @@ bool DBusShowInFolder(const QString &filepath) {
|
||||
void PortalShowInFolder(const QString &filepath, Fn<void()> fail) {
|
||||
const auto connection = [] {
|
||||
@@ -123,6 +173,12 @@ void DBusShowInFolder(const QString &filepath, Fn<void()> fail) {
|
||||
} // namespace
|
||||
|
||||
bool ShowInFolder(const QString &filepath) {
|
||||
void ShowInFolder(const QString &filepath) {
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+ if (HaikuShowInFolder(filepath)) {
|
||||
+ return true;
|
||||
+ if (!HaikuShowInFolder(filepath)) {
|
||||
+ QDesktopServices::openUrl(
|
||||
+ QUrl::fromLocalFile(QFileInfo(filepath).absolutePath()));
|
||||
+ }
|
||||
+#else
|
||||
DBusShowInFolder(filepath, [=] {
|
||||
PortalShowInFolder(filepath, [=] {
|
||||
using namespace gi::repository;
|
||||
@@ -140,6 +196,7 @@ void ShowInFolder(const QString &filepath) {
|
||||
QUrl::fromLocalFile(QFileInfo(filepath).absolutePath()));
|
||||
});
|
||||
});
|
||||
+#endif
|
||||
#ifndef DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
if (DBusShowInFolder(filepath)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
QString CurrentExecutablePath(int argc, char *argv[]) {
|
||||
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 891cb96..a49b75a 100644
|
||||
index b7f1225..7fc8df3 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 @@
|
||||
#include <xcb/screensaver.h>
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
@@ -18,6 +18,11 @@
|
||||
#include <glibmm.h>
|
||||
#include <giomm.h>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <base/haiku_types.h>
|
||||
@@ -766,9 +774,9 @@ index 891cb96..a49b75a 100644
|
||||
namespace base::Platform {
|
||||
namespace {
|
||||
|
||||
@@ -188,9 +193,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
|
||||
@@ -180,9 +185,23 @@ std::optional<crl::time> MutterDBusLastUserInputTime() {
|
||||
return std::nullopt;
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+std::optional<crl::time> HaikuLastUserInputTime() {
|
||||
@@ -790,13 +798,28 @@ index 891cb96..a49b75a 100644
|
||||
#ifndef DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
if (::Platform::IsX11()) {
|
||||
const auto xcbResult = XCBLastUserInputTime();
|
||||
diff --git a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
index 30ea7a4..eb6dcf7 100644
|
||||
--- a/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
+++ b/Telegram/lib_base/base/platform/linux/base_linux_xdp_utilities.cpp
|
||||
@@ -10,6 +10,10 @@
|
||||
|
||||
#include <giomm.h>
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <base/haiku_types.h>
|
||||
+#endif
|
||||
+
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QWindow>
|
||||
#include <qpa/qplatformintegration.h>
|
||||
diff --git a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
|
||||
index 73d37e4..f4277e2 100644
|
||||
index 37c8c41..67ac88c 100644
|
||||
--- a/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
|
||||
+++ b/Telegram/lib_base/base/platform/linux/base_power_save_blocker_linux.cpp
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <giomm.h>
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -16,6 +16,10 @@
|
||||
#include "base/platform/linux/base_linux_xcb_utilities.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <base/haiku_types.h>
|
||||
@@ -804,14 +827,14 @@ index 73d37e4..f4277e2 100644
|
||||
+
|
||||
#include <QtGui/QWindow>
|
||||
|
||||
namespace base::Platform {
|
||||
#include <giomm.h>
|
||||
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 2e6170f..f509ce4 100644
|
||||
index 19da0e8..0873fcb 100644
|
||||
--- a/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
|
||||
+++ b/Telegram/lib_base/base/platform/linux/base_url_scheme_linux.cpp
|
||||
@@ -13,6 +13,10 @@
|
||||
#include "base/platform/linux/base_linux_glibmm_helper.h"
|
||||
#endif // !DESKTOP_APP_DISABLE_DBUS_INTEGRATION
|
||||
@@ -9,6 +9,10 @@
|
||||
#include "base/integration.h"
|
||||
#include "base/debug_log.h"
|
||||
|
||||
+#ifdef Q_OS_HAIKU
|
||||
+#include <base/haiku_types.h>
|
||||
@@ -835,8 +858,30 @@ index efbfb72..9c82321 100644
|
||||
#include "spellcheck/third_party/language_cld3.h"
|
||||
|
||||
#include "nnet_language_identifier.h"
|
||||
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 8a3cf9c..4f3779a 100644
|
||||
--- a/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
|
||||
+++ b/Telegram/lib_ui/ui/platform/linux/ui_utility_linux.cpp
|
||||
@@ -417,7 +417,7 @@ void ShowXCBWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
|
||||
}
|
||||
#endif // !DESKTOP_APP_DISABLE_X11_INTEGRATION
|
||||
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && !defined(Q_OS_HAIKU)
|
||||
void ShowWaylandWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
|
||||
static const auto wl_proxy_marshal_array = [] {
|
||||
void (*result)(
|
||||
@@ -596,7 +596,7 @@ void UnsetWindowMargins(not_null<QWidget*> widget) {
|
||||
}
|
||||
|
||||
void ShowWindowMenu(not_null<QWidget*> widget, const QPoint &point) {
|
||||
-#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
|
||||
+#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) && !defined(Q_OS_HAIKU)
|
||||
if (::Platform::IsWayland()) {
|
||||
ShowWaylandWindowMenu(widget, point);
|
||||
return;
|
||||
diff --git a/Telegram/lib_ui/ui/ui_utility.cpp b/Telegram/lib_ui/ui/ui_utility.cpp
|
||||
index 283b340..fd01c34 100644
|
||||
index 2a5de32..692f8a8 100644
|
||||
--- a/Telegram/lib_ui/ui/ui_utility.cpp
|
||||
+++ b/Telegram/lib_ui/ui/ui_utility.cpp
|
||||
@@ -9,6 +9,10 @@
|
||||
@@ -851,7 +896,7 @@ index 283b340..fd01c34 100644
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QtEvents>
|
||||
diff --git a/Telegram/lib_ui/ui/widgets/popup_menu.cpp b/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
index ff81dbc..4ad5c58 100644
|
||||
index 5ce70cf..53a2fb8 100644
|
||||
--- a/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
+++ b/Telegram/lib_ui/ui/widgets/popup_menu.cpp
|
||||
@@ -18,6 +18,10 @@
|
||||
@@ -898,7 +943,7 @@ index bb6d91a..3c4a188 100644
|
||||
|
||||
#include "webrtc/webrtc_create_adm.h"
|
||||
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
|
||||
index 9be0e5a..4b15e50 100644
|
||||
index 2f9165b..57aa33d 100644
|
||||
--- a/cmake/external/CMakeLists.txt
|
||||
+++ b/cmake/external/CMakeLists.txt
|
||||
@@ -17,7 +17,7 @@ if (add_cld3_library)
|
||||
@@ -3,9 +3,9 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
|
||||
HOMEPAGE="https://www.telegram.org/"
|
||||
COPYRIGHT="2013-2023 Telegram"
|
||||
LICENSE="GNU GPL v3"
|
||||
REVISION="2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz"
|
||||
CHECKSUM_SHA256="96660bb151c035a80c5b32a8fe043cecb54e9fe450329cf612ecb752db68c06f"
|
||||
CHECKSUM_SHA256="c1f7d226ea50de0742b7a273f504da9168293c4feb77ef3f4a542339c5a7f804"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="2b383fe05f8ae78ac99470b9a2b9ea22b3ee5a92"
|
||||
@@ -32,10 +32,15 @@ REQUIRES="
|
||||
lib:libavcodec$secondaryArchSuffix
|
||||
lib:libavformat$secondaryArchSuffix
|
||||
lib:libavutil$secondaryArchSuffix
|
||||
lib:libboost_filesystem$secondaryArchSuffix
|
||||
lib:libboost_system$secondaryArchSuffix
|
||||
lib:libboost_program_options$secondaryArchSuffix
|
||||
lib:libcrypto$secondaryArchSuffix
|
||||
lib:libgiomm_2.4$secondaryArchSuffix
|
||||
lib:libfmt$secondaryArchSuffix
|
||||
lib:libgirepository_1.0$secondaryArchSuffix
|
||||
lib:libgiomm_2.68$secondaryArchSuffix
|
||||
lib:libglib_2.0$secondaryArchSuffix
|
||||
lib:libglibmm_2.4$secondaryArchSuffix
|
||||
lib:libglibmm_2.68$secondaryArchSuffix
|
||||
lib:libgthread_2.0$secondaryArchSuffix
|
||||
lib:libhunspell_1.7$secondaryArchSuffix
|
||||
lib:libintl$secondaryArchSuffix
|
||||
@@ -54,7 +59,7 @@ REQUIRES="
|
||||
lib:libQt6Svg$secondaryArchSuffix
|
||||
lib:libQt6Widgets$secondaryArchSuffix
|
||||
lib:librnnoise$secondaryArchSuffix
|
||||
lib:libsigc_2.0$secondaryArchSuffix
|
||||
lib:libsigc_3.0$secondaryArchSuffix
|
||||
lib:libstdc++$secondaryArchSuffix
|
||||
lib:libswresample$secondaryArchSuffix
|
||||
lib:libswscale$secondaryArchSuffix
|
||||
@@ -66,11 +71,16 @@ REQUIRES="
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
qt6_tools${secondaryArchSuffix}_devel
|
||||
devel:libabsl_strings$secondaryArchSuffix >= 2206.0.0
|
||||
devel:libavcodec$secondaryArchSuffix >= 58
|
||||
devel:libabsl_strings$secondaryArchSuffix >= 2301.0.0
|
||||
devel:libavcodec$secondaryArchSuffix >= 59
|
||||
devel:libboost_filesystem$secondaryArchSuffix >= 1.70.0
|
||||
devel:libboost_system$secondaryArchSuffix >= 1.70.0
|
||||
devel:libboost_program_options$secondaryArchSuffix >= 1.70.0
|
||||
devel:libcrypto$secondaryArchSuffix
|
||||
devel:libfmt$secondaryArchSuffix
|
||||
devel:libgirepository_1.0$secondaryArchSuffix
|
||||
devel:libglib_2.0$secondaryArchSuffix
|
||||
devel:libglibmm_2.4$secondaryArchSuffix
|
||||
devel:libglibmm_2.68$secondaryArchSuffix
|
||||
devel:libgthread_2.0$secondaryArchSuffix
|
||||
devel:libhunspell_1.7$secondaryArchSuffix
|
||||
devel:libjpeg$secondaryArchSuffix
|
||||
@@ -89,11 +99,11 @@ BUILD_REQUIRES="
|
||||
devel:libQt6Widgets$secondaryArchSuffix
|
||||
devel:librapidjson$secondaryArchSuffix
|
||||
devel:librnnoise$secondaryArchSuffix
|
||||
devel:libsigc_3.0$secondaryArchSuffix
|
||||
devel:libtg_owt$secondaryArchSuffix
|
||||
devel:libvpx$secondaryArchSuffix
|
||||
devel:libxxhash$secondaryArchSuffix
|
||||
devel:libz$secondaryArchSuffix
|
||||
devel:range_v3$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
@@ -101,7 +111,7 @@ BUILD_PREREQUIRES="
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:ninja
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python
|
||||
cmd:python3.9
|
||||
cmd:sed
|
||||
cmd:yasm
|
||||
"
|
||||
@@ -109,6 +119,7 @@ BUILD_PREREQUIRES="
|
||||
BUILD()
|
||||
{
|
||||
export DISABLE_ASLR=1
|
||||
export GI_GIR_PATH="`finddir B_SYSTEM_DATA_DIRECTORY`"/gir-1.0
|
||||
|
||||
# disable stack protector (fix build for x86_gcc2)
|
||||
if [ $targetArchitecture == x86_gcc2 ]; then
|
||||
@@ -135,6 +146,8 @@ BUILD()
|
||||
# build telegram
|
||||
cmake -S . -B build -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBoost_USE_STATIC_LIBS=OFF \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-DTDESKTOP_API_TEST=OFF \
|
||||
-DTDESKTOP_DISABLE_GTK_INTEGRATION=ON \
|
||||
-DDESKTOP_APP_DISABLE_CRASH_REPORTS=ON \
|
||||
@@ -151,7 +164,8 @@ BUILD()
|
||||
-DLIBTGVOIP_DISABLE_ALSA=ON \
|
||||
-DLIBTGVOIP_DISABLE_PULSEAUDIO=ON \
|
||||
-DTDESKTOP_API_ID=$TELEGRAM_API_ID \
|
||||
-DTDESKTOP_API_HASH=$TELEGRAM_API_HASH
|
||||
-DTDESKTOP_API_HASH=$TELEGRAM_API_HASH \
|
||||
-DLZ4_INCLUDE_DIRS=/system/$relativeIncludeDir
|
||||
|
||||
ninja -C build $jobArgs
|
||||
}
|
||||
Reference in New Issue
Block a user