diff --git a/net-im/telegram-desktop/patches/telegram_desktop-2.1.12.patchset b/net-im/telegram-desktop/patches/telegram_desktop-2.1.12.patchset index e9c4de74f..22887231c 100644 --- a/net-im/telegram-desktop/patches/telegram_desktop-2.1.12.patchset +++ b/net-im/telegram-desktop/patches/telegram_desktop-2.1.12.patchset @@ -1,65 +1,19 @@ -From 8acce006d96940362f8eaa3e980ec340f48a1448 Mon Sep 17 00:00:00 2001 +From 6180ec679fd27168e0b0d1566021c20231fe7471 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> -Date: Thu, 18 Jun 2020 21:39:15 +1000 +Date: Fri, 19 Jun 2020 20:44:13 +1000 Subject: Add Haiku support -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 645d886..3a0a0e9 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -10,16 +10,17 @@ cmake_policy(SET CMP0091 NEW) - - set_property(GLOBAL PROPERTY USE_FOLDERS ON) - --include(cmake/validate_special_target.cmake) --include(cmake/version.cmake) --desktop_app_parse_version(Telegram/build/version) -- - project(Telegram - LANGUAGES C CXX - VERSION ${desktop_app_version_cmake} - DESCRIPTION "Official Telegram Desktop messenger" - HOMEPAGE_URL "https://desktop.telegram.org" - ) -+ -+include(cmake/validate_special_target.cmake) -+include(cmake/version.cmake) -+desktop_app_parse_version(Telegram/build/version) -+ - set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram) - - get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH) -@@ -34,7 +35,7 @@ include(cmake/generate_target.cmake) - - include(cmake/options.cmake) - --include(cmake/external/qt/package.cmake) -+include(cmake/external.cmake) - - add_subdirectory(cmake) - add_subdirectory(Telegram) diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt -index 9dfcd61..007f744 100644 +index 9dfcd61..28fd5f1 100644 --- a/Telegram/CMakeLists.txt +++ b/Telegram/CMakeLists.txt -@@ -120,7 +120,7 @@ PRIVATE - desktop-app::external_minizip - desktop-app::external_qt - desktop-app::external_qr_code_generator -- desktop-app::external_crash_reports -+# desktop-app::external_crash_reports - desktop-app::external_auto_updates - tdesktop::lib_tgvoip - desktop-app::external_openssl -@@ -840,6 +840,18 @@ PRIVATE +@@ -840,6 +840,16 @@ PRIVATE platform/win/windows_event_filter.cpp platform/win/windows_event_filter.h platform/win/wrapper_wrl_implements_h.h + platform/haiku/file_utilities_haiku.cpp + platform/haiku/file_utilities_haiku.h -+ platform/haiku/haiku_desktop_environment.cpp -+ platform/haiku/haiku_desktop_environment.h + platform/haiku/launcher_haiku.cpp + platform/haiku/launcher_haiku.h + platform/haiku/main_window_haiku.cpp @@ -71,18 +25,6 @@ index 9dfcd61..007f744 100644 platform/platform_audio.h platform/platform_file_utilities.h platform/platform_launcher.h -diff --git a/Telegram/SourceFiles/calls/calls_call.cpp b/Telegram/SourceFiles/calls/calls_call.cpp -index 5119097..5720d73 100644 ---- a/Telegram/SourceFiles/calls/calls_call.cpp -+++ b/Telegram/SourceFiles/calls/calls_call.cpp -@@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service. - For license and copyright information please follow this link: - https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - */ -+ - #include "calls/calls_call.h" - - #include "main/main_session.h" diff --git a/Telegram/SourceFiles/core/application.cpp b/Telegram/SourceFiles/core/application.cpp index fb79b73..cb01f64 100644 --- a/Telegram/SourceFiles/core/application.cpp @@ -181,10 +123,10 @@ index e6ecdb2..262f4a9 100644 } diff --git a/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp new file mode 100644 -index 0000000..dee383c +index 0000000..c3033e7 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.cpp -@@ -0,0 +1,137 @@ +@@ -0,0 +1,58 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -206,35 +148,6 @@ index 0000000..dee383c + +namespace Platform { +namespace File { -+namespace internal { -+ -+QByteArray EscapeShell(const QByteArray &content) { -+ auto result = QByteArray(); -+ -+ auto b = content.constData(), e = content.constEnd(); -+ for (auto ch = b; ch != e; ++ch) { -+ if (*ch == ' ' || *ch == '"' || *ch == '\'' || *ch == '\\') { -+ if (result.isEmpty()) { -+ result.reserve(content.size() * 2); -+ } -+ if (ch > b) { -+ result.append(b, ch - b); -+ } -+ result.append('\\'); -+ b = ch; -+ } -+ } -+ if (result.isEmpty()) { -+ return content; -+ } -+ -+ if (e > b) { -+ result.append(b, e - b); -+ } -+ return result; -+} -+ -+} // namespace internal + +void UnsafeShowInFolder(const QString &filepath) { + Ui::hideLayer(anim::type::instant); // Hide mediaview to make other apps visible. @@ -271,63 +184,13 @@ index 0000000..dee383c +} + +} // namespace File -+ -+namespace FileDialog { -+namespace { -+ -+using Type = ::FileDialog::internal::Type; -+ -+bool NativeSupported() { -+ return false; -+} -+ -+bool PreviewSupported() { -+ return false; -+} -+ -+ -+ -+} // namespace -+ -+bool Get(QPointer parent, QStringList &files, QByteArray &remoteContent, const QString &caption, \ -+ const QString &filter, Type type, QString startFile) { -+ return ::FileDialog::internal::GetDefault(parent, files, remoteContent, caption, filter, type, startFile); -+} -+ -+namespace internal { -+ -+ -+ -+ -+namespace { -+ -+const char *filterRegExp = -+"^(.*)\\(([a-zA-Z0-9_.,*? +;#\\-\\[\\]@\\{\\}/!<>\\$%&=^~:\\|]*)\\)$"; -+ -+// Makes a list of filters from a normal filter string "Image Files (*.png *.jpg)" -+QStringList cleanFilterList(const QString &filter) { -+ QRegExp regexp(QString::fromLatin1(filterRegExp)); -+ Q_ASSERT(regexp.isValid()); -+ QString f = filter; -+ int i = regexp.indexIn(f); -+ if (i >= 0) -+ f = regexp.cap(2); -+ return f.split(QLatin1Char(' '), QString::SkipEmptyParts); -+} -+ -+} // namespace -+ -+ -+ -+} // namespace internal -+} // namespace FileDialog +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h new file mode 100644 -index 0000000..7f186eb +index 0000000..829e17e --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/file_utilities_haiku.h -@@ -0,0 +1,60 @@ +@@ -0,0 +1,68 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -348,11 +211,6 @@ index 0000000..7f186eb + +namespace Platform { +namespace File { -+namespace internal { -+ -+QByteArray EscapeShell(const QByteArray &content); -+ -+} // namespace internal + +inline QString UrlToLocal(const QUrl &url) { + return ::File::internal::UrlToLocalDefault(url); @@ -381,215 +239,32 @@ index 0000000..7f186eb + ::FileDialog::internal::InitLastPathDefault(); +} + -+namespace internal { ++inline bool Get( ++ QPointer parent, ++ QStringList &files, ++ QByteArray &remoteContent, ++ const QString &caption, ++ const QString &filter, ++ ::FileDialog::internal::Type type, ++ QString startFile) { ++ return ::FileDialog::internal::GetDefault( ++ parent, ++ files, ++ remoteContent, ++ caption, ++ filter, ++ type, ++ startFile); ++} + -+ -+ -+} // namespace internal +} // namespace FileDialog +} // namespace Platform -diff --git a/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.cpp b/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.cpp -new file mode 100644 -index 0000000..a26d082 ---- /dev/null -+++ b/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.cpp -@@ -0,0 +1,60 @@ -+/* -+This file is part of Telegram Desktop for Haiku, -+ -+For license and copyright information please follow this link: -+https://github.com/desktop-app/legal/blob/master/LEGAL -+ -+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com -+*/ -+ -+#include "platform/haiku/haiku_desktop_environment.h" -+ -+namespace Platform { -+namespace DesktopEnvironment { -+namespace { -+ -+QString GetEnv(const char *name) { -+ auto result = getenv(name); -+ auto value = result ? QString::fromLatin1(result) : QString(); -+ LOG(("Getting DE, %1: '%2'").arg(name).arg(value)); -+ return value; -+} -+ -+Type Compute() { -+ return Type::Other; -+} -+ -+Type ComputeAndLog() { -+ auto result = Compute(); -+ auto name = [result]() -> QString { -+ switch (result) { -+ case Type::Other: return "Other"; -+ } -+ return QString::number(static_cast(result)); -+ }; -+ LOG(("DE: %1").arg(name())); -+ return result; -+} -+ -+} // namespace -+ -+// Thanks Chromium. -+Type Get() { -+ static const auto result = ComputeAndLog(); -+ return result; -+} -+ -+bool TryQtTrayIcon() { -+ return true; -+} -+ -+bool PreferAppIndicatorTrayIcon() { -+ return false; -+} -+ -+bool TryUnityCounter() { -+ return false; -+} -+ -+} // namespace DesktopEnvironment -+} // namespace Platform -diff --git a/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.h b/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.h -new file mode 100644 -index 0000000..388d3e1 ---- /dev/null -+++ b/Telegram/SourceFiles/platform/haiku/haiku_desktop_environment.h -@@ -0,0 +1,26 @@ -+/* -+This file is part of Telegram Desktop for Haiku, -+ -+For license and copyright information please follow this link: -+https://github.com/desktop-app/legal/blob/master/LEGAL -+ -+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com -+*/ -+ -+#pragma once -+ -+namespace Platform { -+namespace DesktopEnvironment { -+ -+enum class Type { -+ Other -+}; -+ -+Type Get(); -+ -+bool TryQtTrayIcon(); -+bool PreferAppIndicatorTrayIcon(); -+bool TryUnityCounter(); -+ -+} // namespace DesktopEnvironment -+} // namespace Platform -diff --git a/Telegram/SourceFiles/platform/haiku/info_haiku.cpp b/Telegram/SourceFiles/platform/haiku/info_haiku.cpp -new file mode 100644 -index 0000000..5f5bfe5 ---- /dev/null -+++ b/Telegram/SourceFiles/platform/haiku/info_haiku.cpp -@@ -0,0 +1,42 @@ -+/* -+This file is part of Telegram Desktop for Haiku, -+ -+For license and copyright information please follow this link: -+https://github.com/desktop-app/legal/blob/master/LEGAL -+ -+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com -+*/ -+ -+#include "platform/haiku/info_haiku.h" -+ -+namespace Platform { -+ -+QString DeviceModelPretty() { -+ return "PC"; -+} -+ -+QString SystemVersionPretty() { -+ return "Haiku"; -+} -+ -+QString SystemCountry() { -+ return QString(); -+} -+ -+QString SystemLanguage() { -+ return QString(); -+} -+ -+QDate WhenSystemBecomesOutdated() { -+ return QDate(); -+} -+ -+int AutoUpdateVersion() { -+ return 2; -+} -+ -+QString AutoUpdateKey() { -+ return "haiku"; -+} -+ -+} // namespace Platform -diff --git a/Telegram/SourceFiles/platform/haiku/info_haiku.h b/Telegram/SourceFiles/platform/haiku/info_haiku.h -new file mode 100644 -index 0000000..fad7c7c ---- /dev/null -+++ b/Telegram/SourceFiles/platform/haiku/info_haiku.h -@@ -0,0 +1,44 @@ -+/* -+This file is part of Telegram Desktop for Haiku, -+ -+For license and copyright information please follow this link: -+https://github.com/desktop-app/legal/blob/master/LEGAL -+ -+Copyright (c) 2018-2019 Gerasim Troeglazov, 3dEyes@gmail.com -+*/ -+ -+#pragma once -+ -+#include "platform/platform_info.h" -+ -+namespace Platform { -+ -+inline constexpr bool IsHaiku() { -+ return true; -+} -+ -+inline constexpr bool IsWindows() { return false; } -+inline constexpr bool IsWindowsStoreBuild() { return false; } -+inline bool IsWindowsXPOrGreater() { return false; } -+inline bool IsWindowsVistaOrGreater() { return false; } -+inline bool IsWindows7OrGreater() { return false; } -+inline bool IsWindows8OrGreater() { return false; } -+inline bool IsWindows8Point1OrGreater() { return false; } -+inline bool IsWindows10OrGreater() { return false; } -+inline constexpr bool IsMac() { return false; } -+inline constexpr bool IsMacOldBuild() { return false; } -+inline constexpr bool IsMacStoreBuild() { return false; } -+inline bool IsMac10_6OrGreater() { return false; } -+inline bool IsMac10_7OrGreater() { return false; } -+inline bool IsMac10_8OrGreater() { return false; } -+inline bool IsMac10_9OrGreater() { return false; } -+inline bool IsMac10_10OrGreater() { return false; } -+inline bool IsMac10_11OrGreater() { return false; } -+inline bool IsMac10_12OrGreater() { return false; } -+inline bool IsMac10_13OrGreater() { return false; } -+inline bool IsMac10_14OrGreater() { return false; } -+inline constexpr bool IsLinux() { return false; } -+inline constexpr bool IsLinux32Bit() { return false; } -+inline constexpr bool IsLinux64Bit() { return false; } -+ -+} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/launcher_haiku.cpp b/Telegram/SourceFiles/platform/haiku/launcher_haiku.cpp new file mode 100644 -index 0000000..0b5e892 +index 0000000..537a2df --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/launcher_haiku.cpp -@@ -0,0 +1,61 @@ +@@ -0,0 +1,32 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -601,6 +276,7 @@ index 0000000..0b5e892 + +#include "platform/haiku/launcher_haiku.h" + ++#include "base/platform/base_platform_info.h" +#include "core/crash_reports.h" + +#include @@ -611,39 +287,9 @@ index 0000000..0b5e892 +#include + +namespace Platform { -+namespace { -+ -+class Arguments { -+public: -+ void push(QByteArray argument) { -+ argument.append(char(0)); -+ _argumentValues.push_back(argument); -+ _arguments.push_back(_argumentValues.back().data()); -+ } -+ -+ char **result() { -+ _arguments.push_back(nullptr); -+ return _arguments.data(); -+ } -+ -+private: -+ std::vector _argumentValues; -+ std::vector _arguments; -+ -+}; -+ -+QString DeviceModel() { -+ return "PC"; -+} -+ -+QString SystemVersion() { -+ return "Haiku"; -+} -+ -+} // namespace + +Launcher::Launcher(int argc, char *argv[]) -+: Core::Launcher(argc, argv, DeviceModel(), SystemVersion()) { ++: Core::Launcher(argc, argv, DeviceModelPretty(), SystemVersionPretty()) { +} + +bool Launcher::launchUpdater(UpdaterLaunch action) { @@ -684,10 +330,10 @@ index 0000000..45d4cf8 +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp new file mode 100644 -index 0000000..3fcfa02 +index 0000000..4f7a1a3 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.cpp -@@ -0,0 +1,132 @@ +@@ -0,0 +1,91 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -713,34 +359,18 @@ index 0000000..3fcfa02 +#include "facades.h" +#include "app.h" + -+#include -+#include -+#include +#include -+#include + +namespace Platform { + +MainWindow::MainWindow(not_null controller) +: Window::MainWindow(controller) { -+ connect(&_psCheckStatusIconTimer, SIGNAL(timeout()), this, SLOT(psStatusIconCheck())); -+ _psCheckStatusIconTimer.setSingleShot(false); -+ -+ connect(&_psUpdateIndicatorTimer, SIGNAL(timeout()), this, SLOT(psUpdateIndicator())); -+ _psUpdateIndicatorTimer.setSingleShot(true); +} + +bool MainWindow::hasTrayIcon() const { + return true; +} + -+void MainWindow::psStatusIconCheck() { -+ if (cSupportTray() || !--_psCheckStatusIconLeft) { -+ _psCheckStatusIconTimer.stop(); -+ return; -+ } -+} -+ +void MainWindow::psShowTrayMenu() { +} + @@ -773,10 +403,6 @@ index 0000000..3fcfa02 + } +} + -+ -+void MainWindow::psUpdateIndicator() { -+} -+ +void MainWindow::unreadCounterChangedHook() { + setWindowTitle(titleText()); + updateIconCounters(); @@ -795,37 +421,16 @@ index 0000000..3fcfa02 + } +} + -+void MainWindow::LibsLoaded() { -+} -+ -+void MainWindow::psCreateTrayIcon() { -+ -+} -+ -+void MainWindow::psFirstShow() { -+ psCreateTrayIcon(); -+ psUpdateMargins(); -+ bool showShadows = true; -+ show(); -+ setPositionInited(); -+} -+ -+void MainWindow::psInitSysMenu() { -+} -+ -+void MainWindow::psUpdateMargins() { -+} -+ +MainWindow::~MainWindow() { +} + +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/main_window_haiku.h b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h new file mode 100644 -index 0000000..5134cad +index 0000000..7450e60 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/main_window_haiku.h -@@ -0,0 +1,70 @@ +@@ -0,0 +1,52 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -851,25 +456,13 @@ index 0000000..5134cad +public: + explicit MainWindow(not_null controller); + -+ void psFirstShow(); -+ void psInitSysMenu(); -+ void psUpdateMargins(); -+ -+ void psRefreshTaskbarIcon() { -+ } -+ + virtual QImage iconWithCounter(int size, int count, style::color bg, style::color fg, bool smallIcon) = 0; + -+ static void LibsLoaded(); -+ + ~MainWindow(); + +public slots: + void psShowTrayMenu(); + -+ void psStatusIconCheck(); -+ void psUpdateIndicator(); -+ +protected: + void unreadCounterChangedHook() override; + @@ -887,12 +480,6 @@ index 0000000..5134cad + +private: + void updateIconCounters(); -+ void psCreateTrayIcon(); -+ -+ QTimer _psCheckStatusIconTimer; -+ int _psCheckStatusIconLeft = 100; -+ -+ QTimer _psUpdateIndicatorTimer; +}; + +} // namespace Platform @@ -986,10 +573,10 @@ index 0000000..b6f3490 +resource app_signature "application/x-vnd.tg-notify-gate"; diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp new file mode 100644 -index 0000000..20564da +index 0000000..563ddc0 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.cpp -@@ -0,0 +1,230 @@ +@@ -0,0 +1,193 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -1052,12 +639,8 @@ index 0000000..20564da +} + +std::unique_ptr Create(Window::Notifications::System *system) { -+ if (Global::NativeNotifications() && Supported()) { -+ auto result = std::make_unique(system); -+ if (result->init()) { -+ return std::move(result); -+ } -+ } ++ if (Global::NativeNotifications() && Supported()) ++ return std::make_unique(system); + return nullptr; +} + @@ -1091,45 +674,25 @@ index 0000000..20564da + } +} + -+Manager::Private::Private(Manager *instance, Type type) -+: _guarded(std::make_shared(instance)) ++Manager::Private::Private(not_null manager, Type type) ++: _manager(manager) +, _cachedUserpics(type) { -+ _weak = _guarded; -+} -+ -+bool Manager::Private::init() { + portReaderThread = new QThread; + portReader = new NotifyReader(); + portReader->moveToThread(portReaderThread); + connect(portReaderThread, SIGNAL(started()), portReader, SLOT(run())); + qRegisterMetaType("PeerId"); + qRegisterMetaType("MsgId"); -+ connect(portReader, SIGNAL(notificationActivated(PeerId, MsgId)), \ -+ this, SLOT(notificationActivatedSlot(PeerId, MsgId))); ++ connect( ++ portReader, ++ SIGNAL(notificationActivated(PeerId, MsgId)), ++ this, ++ SLOT(notificationActivatedSlot(PeerId, MsgId))); + portReaderThread->start(); -+ return true; +} + -+Manager::Private::~Private() { -+ clearAll(); -+} -+ -+void Manager::Private::clearAll() { -+} -+ -+void Manager::Private::clearFromHistory(History *history) { -+} -+ -+void Manager::Private::beforeNotificationActivated(PeerId peerId, MsgId msgId) { -+} -+ -+void Manager::Private::afterNotificationActivated(PeerId peerId, MsgId msgId) { -+} -+ -+void Manager::Private::clearNotification(PeerId peerId, MsgId msgId) { -+} -+ -+bool Manager::Private::showNotification(PeerData *peer, ++void Manager::Private::showNotification( ++ not_null peer, + std::shared_ptr &userpicView, + MsgId msgId, + const QString &title, @@ -1160,15 +723,13 @@ index 0000000..20564da + notify.SetOnClickFile(&ref); + notify.AddOnClickArg(BString(args.toUtf8().data())); + notify.Send(); -+ -+ return true; +} + -+void Manager::Private::notificationActivatedSlot(PeerId _peerId, MsgId _msgId) -+{ ++void Manager::Private::notificationActivatedSlot(PeerId _peerId, MsgId _msgId) { + qDebug() << _peerId << _msgId; -+ performOnMainQueue([peerId = _peerId, msgId = _msgId](Manager *manager) { -+ manager->notificationActivated(peerId, msgId); ++ const auto manager = _manager; ++ crl::on_main(manager, [=] { ++ manager->notificationActivated(_peerId, _msgId); + }); +} + @@ -1176,12 +737,7 @@ index 0000000..20564da +, _private(std::make_unique(this, Private::Type::Rounded)) { +} + -+bool Manager::init() { -+ return _private->init(); -+} -+ +void Manager::clearNotification(PeerId peerId, MsgId msgId) { -+ _private->clearNotification(peerId, msgId); +} + +Manager::~Manager() = default; @@ -1207,25 +763,19 @@ index 0000000..20564da +} + +void Manager::doClearAllFast() { -+ _private->clearAll(); +} + +void Manager::doClearFromHistory(not_null history) { -+ _private->clearFromHistory(history); -+} -+ -+bool Manager::hasActionsSupport() const { -+ return _private->hasActionsSupport(); +} + +} // namespace Notifications +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h new file mode 100644 -index 0000000..256467b +index 0000000..cc12f7d --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/notifications_manager_haiku.h -@@ -0,0 +1,130 @@ +@@ -0,0 +1,117 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -1286,12 +836,12 @@ index 0000000..256467b +}; + + -+class Manager : public Window::Notifications::NativeManager { ++class Manager ++ : public Window::Notifications::NativeManager ++ , public base::has_weak_ptr { +public: + Manager(Window::Notifications::System *system); + -+ bool init(); -+ + void clearNotification(PeerId peerId, MsgId msgId); + + ~Manager(); @@ -1309,8 +859,6 @@ index 0000000..256467b + void doClearAllFast() override; + void doClearFromHistory(not_null history) override; + -+ bool hasActionsSupport() const; -+ +private: + class Private; + const std::unique_ptr _private; @@ -1318,38 +866,27 @@ index 0000000..256467b + +class Manager::Private : public QObject { + Q_OBJECT ++ +public: + using Type = Window::Notifications::CachedUserpics::Type; -+ explicit Private(Manager *instance, Type type); -+ bool init(); ++ explicit Private(not_null manager, Type type); + -+ bool showNotification(PeerData *peer, std::shared_ptr &userpicView, \ -+ MsgId msgId, const QString &title, const QString &subtitle, \ -+ const QString &msg, bool hideNameAndPhoto, bool hideReplyButton); -+ void clearAll(); -+ void clearFromHistory(History *history); -+ void beforeNotificationActivated(PeerId peerId, MsgId msgId); -+ void afterNotificationActivated(PeerId peerId, MsgId msgId); -+ void clearNotification(PeerId peerId, MsgId msgId); ++ void showNotification( ++ not_null peer, ++ std::shared_ptr &userpicView, ++ MsgId msgId, ++ const QString &title, ++ const QString &subtitle, ++ const QString &msg, ++ bool hideNameAndPhoto, ++ bool hideReplyButton); + -+ bool hasActionsSupport() const { -+ return true; -+ } -+ -+ void performOnMainQueue(FnMut task) { -+ const auto weak = _weak; -+ crl::on_main(weak, [=, task = std::move(task)]() mutable { -+ task(*weak.lock()); -+ }); -+ } -+ -+ ~Private(); +public slots: + void notificationActivatedSlot(PeerId peerId, MsgId msgId); ++ +private: + Window::Notifications::CachedUserpics _cachedUserpics; -+ std::shared_ptr _guarded; -+ std::weak_ptr _weak; ++ base::weak_ptr _manager; + QThread *portReaderThread; + NotifyReader *portReader; +}; @@ -1358,10 +895,10 @@ index 0000000..256467b +} // namespace Platform diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp new file mode 100644 -index 0000000..c36d7c3 +index 0000000..d34b1c8 --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp -@@ -0,0 +1,259 @@ +@@ -0,0 +1,226 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -1383,8 +920,6 @@ index 0000000..c36d7c3 +#include +#include +#include -+#include -+#include + +#include +#include @@ -1395,12 +930,8 @@ index 0000000..c36d7c3 + +#include + -+#include -+ +using namespace Platform; + -+using Platform::File::internal::EscapeShell; -+ +namespace Platform { + +QString CurrentExecutablePath(int argc, char *argv[]) { @@ -1413,11 +944,11 @@ index 0000000..c36d7c3 +} + +QString GetIconName() { -+ return "telegram"; ++ return qsl("telegram"); +} + +bool AutostartSupported() { -+ return false; ++ return true; +} + +} // namespace Platform @@ -1438,14 +969,6 @@ index 0000000..c36d7c3 + return _monitorRect; +} + -+void psShowOverAll(QWidget *w, bool canFocus) { -+ w->show(); -+} -+ -+void psBringToBack(QWidget *w) { -+ w->hide(); -+} -+ +void psWriteDump() { +} + @@ -1484,25 +1007,14 @@ index 0000000..c36d7c3 + _removeDirectory(dir); +} + -+namespace { -+ -+auto _lastUserAction = 0LL; -+ -+} // namespace -+ +void psActivateProcess(uint64 pid) { +// objc_activateProgram(); +} + -+ +QString psAppDataPath() { + return QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation) + '/'; +} + -+QString psDownloadPath() { -+ return QStandardPaths::writableLocation(QStandardPaths::DownloadLocation) + '/' + AppName.utf8() + '/'; -+} -+ +void psDoCleanup() { + try { + psAutoStart(false, true); @@ -1576,57 +1088,49 @@ index 0000000..c36d7c3 + +} // namespace Platform + -+namespace { -+ -+bool _psRunCommand(const QByteArray &command) { -+ auto result = system(command.constData()); -+ if (result) { -+ DEBUG_LOG(("App Error: command failed, code: %1, command (in utf8): %2").arg(result).arg(command.constData())); -+ return false; -+ } -+ DEBUG_LOG(("App Info: command succeeded, command (in utf8): %1").arg(command.constData())); -+ return true; -+} -+ -+} // namespace -+ +void psNewVersion() { + Platform::RegisterCustomScheme(); +} + -+bool _execUpdater(bool update = true, const QString &crashreport = QString()) { -+ return false; -+} -+ -+void psExecUpdater() { -+} -+ -+void psExecTelegram(const QString &crashreport) { -+ _execUpdater(false, crashreport); -+} -+ +bool psShowOpenWithMenu(int x, int y, const QString &file) { + return false; +} + +void psAutoStart(bool start, bool silent) { ++ auto home = QDir::homePath(); ++ if (home.isEmpty()) ++ return; ++ ++ QFile file(home + "/config/settings/boot/launch/telegram-desktop"); ++ if (start) { ++ if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { ++ QTextStream out(&file); ++ out << "#!/bin/bash" << endl ++ << "cd /system/apps" << endl ++ << "./Telegram -autostart" << " &" << endl; ++ file.close(); ++ file.setPermissions(file.permissions() ++ | QFileDevice::ExeOwner ++ | QFileDevice::ExeGroup ++ | QFileDevice::ExeOther); ++ } ++ } else { ++ file.remove(); ++ } +} + +void psSendToMenu(bool send, bool silent) { +} + -+void psUpdateOverlayed(QWidget *widget) { -+} -+ +bool psLaunchMaps(const Data::LocationPoint &point) { + return false; +} diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h new file mode 100644 -index 0000000..7fa4003 +index 0000000..521582d --- /dev/null +++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h -@@ -0,0 +1,126 @@ +@@ -0,0 +1,103 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -1652,19 +1156,6 @@ index 0000000..7fa4003 +inline void IgnoreApplicationActivationRightNow() { +} + -+inline void InitOnTopPanel(QWidget *panel) { -+} -+ -+inline void DeInitOnTopPanel(QWidget *panel) { -+} -+ -+inline void ReInitOnTopPanel(QWidget *panel) { -+} -+ -+QString CurrentExecutablePath(int argc, char *argv[]); -+ -+QString SingleInstanceLocalServerName(const QString &hash); -+ +QString GetIconName(); + +inline std::optional LastUserInputTime() { @@ -1683,9 +1174,6 @@ index 0000000..7fa4003 + +} // namespace Platform + -+inline QString psServerPrefix() { -+ return qsl("/tmp/"); -+} +inline void psCheckLocalSocket(const QString &serverName) { + QFile address(serverName); + if (address.exists()) { @@ -1703,23 +1191,16 @@ index 0000000..7fa4003 +void psActivateProcess(uint64 pid = 0); +QString psLocalServerPrefix(); +QString psAppDataPath(); -+QString psDownloadPath(); +void psAutoStart(bool start, bool silent = false); +void psSendToMenu(bool send, bool silent = false); + +QRect psDesktopRect(); -+void psShowOverAll(QWidget *w, bool canFocus = true); -+void psBringToBack(QWidget *w); + +int psCleanup(); +int psFixPrevious(); + -+void psExecUpdater(); -+void psExecTelegram(const QString &arg = QString()); -+ +void psNewVersion(); + -+void psUpdateOverlayed(QWidget *widget); +inline QByteArray psDownloadPathBookmark(const QString &path) { + return QByteArray(); +} @@ -1819,18 +1300,10 @@ index c05e717..c486176 100644 #include "platform/linux/specific_linux.h" #elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_UNIX diff --git a/Telegram/SourceFiles/settings/settings_calls.cpp b/Telegram/SourceFiles/settings/settings_calls.cpp -index 56acbb9..ef16c47 100644 +index 56acbb9..a33da8e 100644 --- a/Telegram/SourceFiles/settings/settings_calls.cpp +++ b/Telegram/SourceFiles/settings/settings_calls.cpp -@@ -5,6 +5,7 @@ the official desktop application for the Telegram messaging service. - For license and copyright information please follow this link: - https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL - */ -+ - #include "settings/settings_calls.h" - - #include "settings/settings_common.h" -@@ -31,6 +32,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL +@@ -31,6 +31,13 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL #define NEED_TO_RESTORE_SLOTS #endif // slots @@ -2778,7 +2251,7 @@ index 9ec1048..6d54e67 100644 target_compile_options(lib_tgvoip PRIVATE diff --git a/Telegram/lib_base/CMakeLists.txt b/Telegram/lib_base/CMakeLists.txt -index e4ea6be..a728127 100644 +index e4ea6be..fa8c1bc 100644 --- a/Telegram/lib_base/CMakeLists.txt +++ b/Telegram/lib_base/CMakeLists.txt @@ -56,6 +56,18 @@ PRIVATE @@ -2800,15 +2273,6 @@ index e4ea6be..a728127 100644 base/platform/base_platform_info.h base/platform/base_platform_last_input.h base/platform/base_platform_layout_switch.h -@@ -143,7 +155,7 @@ PUBLIC - desktop-app::lib_crl - desktop-app::external_qt - desktop-app::external_openssl -- desktop-app::external_crash_reports -+# desktop-app::external_crash_reports - desktop-app::external_variant - desktop-app::external_ranges - desktop-app::external_gsl diff --git a/Telegram/lib_base/base/crash_report_writer.cpp b/Telegram/lib_base/base/crash_report_writer.cpp index dff7624..c20bb20 100644 --- a/Telegram/lib_base/base/crash_report_writer.cpp @@ -2991,10 +2455,10 @@ index 0000000..6700d58 +} // namespace base::Platform diff --git a/Telegram/lib_base/base/platform/haiku/base_info_haiku.cpp b/Telegram/lib_base/base/platform/haiku/base_info_haiku.cpp new file mode 100644 -index 0000000..cce9d25 +index 0000000..ee5332c --- /dev/null +++ b/Telegram/lib_base/base/platform/haiku/base_info_haiku.cpp -@@ -0,0 +1,75 @@ +@@ -0,0 +1,59 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -3014,15 +2478,6 @@ index 0000000..cce9d25 +#include + +namespace Platform { -+namespace { -+ -+void FallbackFontConfig( -+ const QString &from, -+ const QString &to, -+ bool overwrite) { -+} -+ -+} // namespace + +QString DeviceModelPretty() { + return "PC"; @@ -3057,13 +2512,6 @@ index 0000000..cce9d25 +} + +void Start(QJsonObject options) { -+ const auto from = options.value("custom_font_config_src").toString(); -+ const auto to = options.value("custom_font_config_dst").toString(); -+ if (!from.isEmpty() && !to.isEmpty()) { -+ const auto keep = options.value("custom_font_config_keep").toInt(); -+ const auto overwrite = (keep != 1); -+ FallbackFontConfig(from, to, overwrite); -+ } +} + +void Finish() { @@ -3248,10 +2696,10 @@ index 0000000..4d0bce3 +#include "base/platform/base_platform_process.h" diff --git a/Telegram/lib_base/base/platform/haiku/base_url_scheme_haiku.cpp b/Telegram/lib_base/base/platform/haiku/base_url_scheme_haiku.cpp new file mode 100644 -index 0000000..2aec193 +index 0000000..ca200de --- /dev/null +++ b/Telegram/lib_base/base/platform/haiku/base_url_scheme_haiku.cpp -@@ -0,0 +1,74 @@ +@@ -0,0 +1,21 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -3263,60 +2711,7 @@ index 0000000..2aec193 + +#include "base/platform/haiku/base_url_scheme_haiku.h" + -+#include -+#include -+#include -+#include -+#include -+#include -+ +namespace base::Platform { -+namespace { -+ -+[[nodiscard]] QString GetHomeDir() { -+ const auto result = QDir::homePath(); -+ -+ if (result != QDir::rootPath()) { -+ return result + '/'; -+ } -+ -+ struct passwd *pw = getpwuid(getuid()); -+ return (pw && pw->pw_dir && strlen(pw->pw_dir)) -+ ? (QFile::decodeName(pw->pw_dir) + '/') -+ : QString(); -+} -+ -+bool RunShellCommand(const QByteArray &command) { -+ return (system(command.constData()) == 0); -+} -+ -+[[nodiscard]] QByteArray EscapeShell(const QByteArray &content) { -+ auto result = QByteArray(); -+ -+ auto b = content.constData(), e = content.constEnd(); -+ for (auto ch = b; ch != e; ++ch) { -+ if (*ch == ' ' || *ch == '"' || *ch == '\'' || *ch == '\\') { -+ if (result.isEmpty()) { -+ result.reserve(content.size() * 2); -+ } -+ if (ch > b) { -+ result.append(b, ch - b); -+ } -+ result.append('\\'); -+ b = ch; -+ } -+ } -+ if (result.isEmpty()) { -+ return content; -+ } -+ -+ if (e > b) { -+ result.append(b, e - b); -+ } -+ return result; -+} -+ -+} // namespace + +bool CheckUrlScheme(const UrlSchemeDescriptor &descriptor) { + return false; @@ -3423,10 +2818,10 @@ index 87d41a8..284e7e3 100644 ui/style/style_core.cpp diff --git a/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp new file mode 100644 -index 0000000..d9723c2 +index 0000000..b152b0f --- /dev/null +++ b/Telegram/lib_ui/ui/platform/haiku/ui_utility_haiku.cpp -@@ -0,0 +1,35 @@ +@@ -0,0 +1,29 @@ +/* +This file is part of Telegram Desktop for Haiku, + @@ -3438,13 +2833,7 @@ index 0000000..d9723c2 + +#include "ui/platform/haiku/ui_utility_haiku.h" + -+#include "base/flat_set.h" -+#include "ui/ui_log.h" -+ -+#include +#include -+#include -+#include + +namespace Ui { +namespace Platform { @@ -3585,166 +2974,6 @@ index 570d169..8644d20 100644 if (bold) { #ifdef DESKTOP_APP_USE_PACKAGED_FONTS result.setWeight(QFont::DemiBold); -diff --git a/cmake/external.cmake b/cmake/external.cmake -new file mode 100644 -index 0000000..a6c28f1 ---- /dev/null -+++ b/cmake/external.cmake -@@ -0,0 +1,102 @@ -+find_package(OpenAL REQUIRED) -+find_package(OpenSSL REQUIRED) -+find_package(PkgConfig REQUIRED) -+find_package(Threads REQUIRED) -+ -+pkg_check_modules(FFMPEG REQUIRED -+ libavcodec -+ libavformat -+ libavutil -+ libswscale -+ libswresample -+) -+pkg_check_modules(LZ4 REQUIRED liblz4) -+pkg_check_modules(OPUS REQUIRED opus) -+pkg_check_modules(ZLIB REQUIRED minizip zlib) -+ -+find_package(Qt5 REQUIRED COMPONENTS Core DBus Gui Network Widgets) -+get_target_property(QTCORE_INCLUDE_DIRS Qt5::Core INTERFACE_INCLUDE_DIRECTORIES) -+list(GET QTCORE_INCLUDE_DIRS 0 QT_INCLUDE_DIR) -+ -+foreach(qt_module IN ITEMS QtCore QtGui) -+ list(APPEND QT_PRIVATE_INCLUDE_DIRS -+ ${QT_INCLUDE_DIR}/${qt_module}/${Qt5_VERSION} -+ ${QT_INCLUDE_DIR}/${qt_module}/${Qt5_VERSION}/${qt_module} -+ ) -+endforeach() -+message(STATUS "Using Qt private include directories: ${QT_PRIVATE_INCLUDE_DIRS}") -+ -+set(QT_PLUGINS -+ QGenericEnginePlugin -+ QGifPlugin -+ QJpegPlugin -+ QWebpPlugin -+) -+ -+foreach(qt_plugin IN ITEMS ${QT_PLUGINS}) -+ get_target_property(qt_plugin_loc Qt5::${qt_plugin} LOCATION) -+ list(APPEND QT_PLUGIN_DIRS ${qt_plugin_loc}) -+endforeach() -+message(STATUS "Using Qt plugins: ${QT_PLUGIN_DIRS}") -+ -+set(OPENAL_DEFINITIONS -+ AL_ALEXT_PROTOTYPES -+ AL_LIBTYPE_STATIC -+) -+set(QT_DEFINITIONS -+ _REENTRANT -+ QT_CORE_LIB -+ QT_GUI_LIB -+ QT_NETWORK_LIB -+ QT_PLUGIN -+ QT_STATICPLUGIN -+ QT_WIDGETS_LIB -+) -+ -+if (HAIKU) -+ list(APPEND QT_DEFINITIONS Q_OS_HAIKU) -+endif() -+ -+set(OPENAL_INCLUDE_DIRS ${OPENAL_INCLUDE_DIR}) -+set(QT_INCLUDE_DIRS ${QT_PRIVATE_INCLUDE_DIRS}) -+ -+set(OPENAL_LIBRARIES ${OPENAL_LIBRARY}) -+set(OPENSSL_LIBRARIES -+ OpenSSL::Crypto -+ OpenSSL::SSL -+) -+set(QT_LIBRARIES -+ Qt5::Network -+ Qt5::Widgets Threads::Threads root be media network translation -+) -+ -+set(EXTERNAL_LIBS ffmpeg lz4 openal openssl opus qt zlib) -+ -+if(NOT DESKTOP_APP_DISABLE_CRASH_REPORTS) -+ pkg_check_modules(CRASH_REPORTS REQUIRED breakpad-client) -+ list(APPEND EXTERNAL_LIBS crash_reports) -+endif() -+ -+foreach(LIB IN ITEMS ${EXTERNAL_LIBS}) -+ add_library(external_${LIB} INTERFACE IMPORTED GLOBAL) -+ add_library(desktop-app::external_${LIB} ALIAS external_${LIB}) -+ string(TOUPPER ${LIB} LIB_U) -+ -+ if(DEFINED ${LIB_U}_DEFINITIONS) -+ target_compile_definitions( -+ external_${LIB} INTERFACE ${${LIB_U}_DEFINITIONS} -+ ) -+ endif() -+ -+ if(DEFINED ${LIB_U}_INCLUDE_DIRS) -+ target_include_directories( -+ external_${LIB} SYSTEM INTERFACE ${${LIB_U}_INCLUDE_DIRS} -+ ) -+ endif() -+ -+ if(DEFINED ${LIB_U}_LIBRARIES) -+ target_link_libraries( -+ external_${LIB} INTERFACE ${${LIB_U}_LIBRARIES} -+ ) -+ endif() -+endforeach() -diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt -index 9109233..4f56650 100644 ---- a/cmake/external/CMakeLists.txt -+++ b/cmake/external/CMakeLists.txt -@@ -12,7 +12,7 @@ macro(add_checked_subdirectory name) - endmacro() - - add_checked_subdirectory(auto_updates) --add_checked_subdirectory(crash_reports) -+#add_checked_subdirectory(crash_reports) - if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) - add_checked_subdirectory(dbusmenu_qt) - endif() -@@ -22,7 +22,7 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) - add_checked_subdirectory(fcitx5_qt5) - add_checked_subdirectory(fcitx5_qt5_dbusaddons) - endif() --add_checked_subdirectory(ffmpeg) -+#add_checked_subdirectory(ffmpeg) - add_checked_subdirectory(gsl) - if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) - add_checked_subdirectory(hime_im_client) -@@ -35,7 +35,7 @@ add_checked_subdirectory(iconv) - if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION) - add_checked_subdirectory(lxqt_qtplugin) - endif() --add_checked_subdirectory(lz4) -+#add_checked_subdirectory(lz4) - if (LINUX) - add_checked_subdirectory(materialdecoration) - endif() -@@ -43,10 +43,10 @@ add_checked_subdirectory(minizip) - if (LINUX) - add_checked_subdirectory(nimf_qt5) - endif() --add_checked_subdirectory(openal) --add_checked_subdirectory(openssl) --add_checked_subdirectory(opus) --add_checked_subdirectory(qt) -+#add_checked_subdirectory(openal) -+#add_checked_subdirectory(openssl) -+#add_checked_subdirectory(opus) -+#add_checked_subdirectory(qt) - if (LINUX) - add_checked_subdirectory(qt5ct) - add_checked_subdirectory(qt5ct_qtplugin) -@@ -67,4 +67,4 @@ if (LINUX) - add_checked_subdirectory(xdgiconloader) - endif() - add_checked_subdirectory(xxhash) --add_checked_subdirectory(zlib) -+#add_checked_subdirectory(zlib) diff --git a/cmake/nice_target_sources.cmake b/cmake/nice_target_sources.cmake index 2ac58d4..6aed2b8 100644 --- a/cmake/nice_target_sources.cmake @@ -3802,18 +3031,18 @@ index 80b7405..705de6f 100644 else() diff --git a/cmake/options_haiku.cmake b/cmake/options_haiku.cmake new file mode 100644 -index 0000000..063f1ce +index 0000000..718f37a --- /dev/null +++ b/cmake/options_haiku.cmake -@@ -0,0 +1,30 @@ +@@ -0,0 +1,34 @@ +# This file is part of Telegram Desktop for Haiku +# For license and copyright information please follow this link: +# https://github.com/desktop-app/legal/blob/master/LEGAL -+# Copyright (c) 2019 Gerasim Troeglazov, 3dEyes@gmail.com ++# Copyright (c) 2019-2020 Gerasim Troeglazov, 3dEyes@gmail.com + +target_compile_options(common_options +INTERFACE -+ $,,-Ofast -fno-strict-aliasing> ++ $,,-fno-strict-aliasing> + -fPIC + -mmmx + -msse2 @@ -3832,12 +3061,16 @@ index 0000000..063f1ce + -Wno-error=class-memaccess + -Wno-deprecated-declarations +) -+target_link_options(common_options ++ ++target_link_libraries(common_options +INTERFACE -+ $,,-Ofast> ++ be ++ network ++ media ++ translation +) diff --git a/cmake/variables.cmake b/cmake/variables.cmake -index 17bb351..f02e702 100644 +index 17bb351..6f3a3f0 100644 --- a/cmake/variables.cmake +++ b/cmake/variables.cmake @@ -63,6 +63,7 @@ set(build_osx 0) @@ -3861,17 +3094,6 @@ index 17bb351..f02e702 100644 else() if (CMAKE_SIZEOF_VOID_P EQUAL 4) set(build_linux32 1) -@@ -94,8 +101,8 @@ else() - endif() - endif() - --if (NOT APPLE OR build_osx) -- get_filename_component(libs_loc "../Libraries" REALPATH) -+if (NOT APPLE OR build_osx OR build_haiku) -+ get_filename_component(libs_loc "Telegram/ThirdParty" REALPATH) - else() - get_filename_component(libs_loc "../Libraries/macos" REALPATH) - endif() -- 2.26.0 diff --git a/net-im/telegram-desktop/telegram_desktop-2.1.12.recipe b/net-im/telegram-desktop/telegram_desktop-2.1.12.recipe index 390b95079..968ccba5a 100644 --- a/net-im/telegram-desktop/telegram_desktop-2.1.12.recipe +++ b/net-im/telegram-desktop/telegram_desktop-2.1.12.recipe @@ -3,7 +3,7 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku." HOMEPAGE="https://www.telegram.org/" COPYRIGHT="2013-2020 Telegram" LICENSE="GNU GPL v3" -REVISION="1" +REVISION="2" SOURCE_URI="https://github.com/telegramdesktop/tdesktop/releases/download/v$portVersion/tdesktop-$portVersion-full.tar.gz" CHECKSUM_SHA256="a89ad7e91b7ecbd20fa9c9735b069d5cb319456878b52fb8754cf696567c33ad"