mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
Telegram: bump version
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
From 65b27689f360e7bb125aabc4e5c371bc00145957 Mon Sep 17 00:00:00 2001
|
||||
From b2d99a06c3859641d53c0919c6fc921ceaee1677 Mon Sep 17 00:00:00 2001
|
||||
From: Gerasim Troeglazov <3dEyes@gmail.com>
|
||||
Date: Thu, 5 Mar 2020 20:12:29 +1000
|
||||
Date: Sun, 15 Mar 2020 19:54:39 +1000
|
||||
Subject: Add Haiku support
|
||||
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index d427ad0..73ef023 100644
|
||||
index 645d886..3a0a0e9 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -10,16 +10,17 @@ cmake_policy(SET CMP0091 NEW)
|
||||
@@ -29,8 +29,8 @@ index d427ad0..73ef023 100644
|
||||
+
|
||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram)
|
||||
|
||||
include(cmake/variables.cmake)
|
||||
@@ -31,7 +32,7 @@ include(cmake/generate_target.cmake)
|
||||
get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH)
|
||||
@@ -34,7 +35,7 @@ include(cmake/generate_target.cmake)
|
||||
|
||||
include(cmake/options.cmake)
|
||||
|
||||
@@ -40,11 +40,11 @@ index d427ad0..73ef023 100644
|
||||
add_subdirectory(cmake)
|
||||
add_subdirectory(Telegram)
|
||||
diff --git a/Telegram/CMakeLists.txt b/Telegram/CMakeLists.txt
|
||||
index a760408..6dd7fb9 100644
|
||||
index b7be40f..30e289b 100644
|
||||
--- a/Telegram/CMakeLists.txt
|
||||
+++ b/Telegram/CMakeLists.txt
|
||||
@@ -96,7 +96,7 @@ PRIVATE
|
||||
desktop-app::external_zlib
|
||||
@@ -97,7 +97,7 @@ PRIVATE
|
||||
desktop-app::external_minizip
|
||||
desktop-app::external_qt
|
||||
desktop-app::external_qr_code_generator
|
||||
- desktop-app::external_crash_reports
|
||||
@@ -52,7 +52,7 @@ index a760408..6dd7fb9 100644
|
||||
desktop-app::external_auto_updates
|
||||
tdesktop::lib_tgvoip
|
||||
desktop-app::external_openssl
|
||||
@@ -799,6 +799,18 @@ PRIVATE
|
||||
@@ -800,6 +800,18 @@ PRIVATE
|
||||
platform/win/windows_event_filter.cpp
|
||||
platform/win/windows_event_filter.h
|
||||
platform/win/wrapper_wrl_implements_h.h
|
||||
@@ -71,7 +71,7 @@ index a760408..6dd7fb9 100644
|
||||
platform/platform_audio.h
|
||||
platform/platform_file_utilities.h
|
||||
platform/platform_launcher.h
|
||||
@@ -1165,7 +1177,7 @@ endif()
|
||||
@@ -1166,7 +1178,7 @@ endif()
|
||||
|
||||
set_target_properties(Telegram PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
|
||||
|
||||
@@ -164,27 +164,6 @@ index 6df70cd..6c9727c 100644
|
||||
auto notificationActionText = Global::DesktopNotify()
|
||||
? tr::lng_disable_notifications_from_tray(tr::now)
|
||||
: tr::lng_enable_notifications_from_tray(tr::now);
|
||||
diff --git a/Telegram/SourceFiles/media/audio/media_audio.cpp b/Telegram/SourceFiles/media/audio/media_audio.cpp
|
||||
index c1234c4..4a4f89f 100644
|
||||
--- a/Telegram/SourceFiles/media/audio/media_audio.cpp
|
||||
+++ b/Telegram/SourceFiles/media/audio/media_audio.cpp
|
||||
@@ -83,6 +83,7 @@ bool PlaybackErrorHappened() {
|
||||
void EnumeratePlaybackDevices() {
|
||||
auto deviceNames = QStringList();
|
||||
auto devices = alcGetString(nullptr, ALC_DEVICE_SPECIFIER);
|
||||
+#ifndef __HAIKU__
|
||||
Assert(devices != nullptr);
|
||||
while (*devices != 0) {
|
||||
auto deviceName8Bit = QByteArray(devices);
|
||||
@@ -91,7 +92,7 @@ void EnumeratePlaybackDevices() {
|
||||
devices += deviceName8Bit.size() + 1;
|
||||
}
|
||||
LOG(("Audio Playback Devices: %1").arg(deviceNames.join(';')));
|
||||
-
|
||||
+#endif
|
||||
if (auto device = alcGetString(nullptr, ALC_DEFAULT_DEVICE_SPECIFIER)) {
|
||||
LOG(("Audio Playback Default Device: %1").arg(QString::fromLocal8Bit(device)));
|
||||
} else {
|
||||
diff --git a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp b/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
index df5e243..f825716 100644
|
||||
--- a/Telegram/SourceFiles/media/view/media_view_overlay_widget.cpp
|
||||
@@ -1360,10 +1339,10 @@ index 0000000..e2218b8
|
||||
+} // 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..bd68563
|
||||
index 0000000..06f4d28
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.cpp
|
||||
@@ -0,0 +1,254 @@
|
||||
@@ -0,0 +1,255 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1414,6 +1393,10 @@ index 0000000..bd68563
|
||||
+ + '/' + hash + '-' + cGUIDStr();
|
||||
+}
|
||||
+
|
||||
+QString GetIconName() {
|
||||
+ return "telegram";
|
||||
+}
|
||||
+
|
||||
+} // namespace Platform
|
||||
+
|
||||
+namespace {
|
||||
@@ -1526,11 +1509,11 @@ index 0000000..bd68563
|
||||
+void finish() {
|
||||
+}
|
||||
+
|
||||
+void SetApplicationIcon(const QIcon &icon) {
|
||||
+ qApp->setWindowIcon(icon);
|
||||
+void RegisterCustomScheme(bool force) {
|
||||
+}
|
||||
+
|
||||
+void RegisterCustomScheme() {
|
||||
+void SetApplicationIcon(const QIcon &icon) {
|
||||
+ qApp->setWindowIcon(icon);
|
||||
+}
|
||||
+
|
||||
+PermissionStatus GetPermissionStatus(PermissionType type){
|
||||
@@ -1584,9 +1567,6 @@ index 0000000..bd68563
|
||||
+
|
||||
+} // namespace
|
||||
+
|
||||
+void psRegisterCustomScheme() {
|
||||
+}
|
||||
+
|
||||
+void psNewVersion() {
|
||||
+ Platform::RegisterCustomScheme();
|
||||
+}
|
||||
@@ -1620,10 +1600,10 @@ index 0000000..bd68563
|
||||
+}
|
||||
diff --git a/Telegram/SourceFiles/platform/haiku/specific_haiku.h b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
new file mode 100644
|
||||
index 0000000..c674859
|
||||
index 0000000..d79f6e4
|
||||
--- /dev/null
|
||||
+++ b/Telegram/SourceFiles/platform/haiku/specific_haiku.h
|
||||
@@ -0,0 +1,114 @@
|
||||
@@ -0,0 +1,116 @@
|
||||
+/*
|
||||
+This file is part of Telegram Desktop for Haiku,
|
||||
+
|
||||
@@ -1662,6 +1642,8 @@ index 0000000..c674859
|
||||
+
|
||||
+QString SingleInstanceLocalServerName(const QString &hash);
|
||||
+
|
||||
+QString GetIconName();
|
||||
+
|
||||
+inline std::optional<crl::time> LastUserInputTime() {
|
||||
+ return std::nullopt;
|
||||
+}
|
||||
@@ -1824,7 +1806,7 @@ index 692f4b4..30a9570 100644
|
||||
-#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|
||||
+#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN || Q_OS_LINUX
|
||||
diff --git a/Telegram/SourceFiles/platform/platform_specific.h b/Telegram/SourceFiles/platform/platform_specific.h
|
||||
index f5650f9..599c839 100644
|
||||
index 18ebd6c..c2a85ff 100644
|
||||
--- a/Telegram/SourceFiles/platform/platform_specific.h
|
||||
+++ b/Telegram/SourceFiles/platform/platform_specific.h
|
||||
@@ -51,8 +51,10 @@ void finish();
|
||||
@@ -1900,17 +1882,17 @@ index 9ec30eb..53152ee 100644
|
||||
}
|
||||
return QString();
|
||||
diff --git a/Telegram/SourceFiles/window/main_window.cpp b/Telegram/SourceFiles/window/main_window.cpp
|
||||
index 50b9564..c85e35e 100644
|
||||
index a220b03..92830f6 100644
|
||||
--- a/Telegram/SourceFiles/window/main_window.cpp
|
||||
+++ b/Telegram/SourceFiles/window/main_window.cpp
|
||||
@@ -117,7 +117,7 @@ QIcon CreateOfficialIcon(Main::Account *account) {
|
||||
|
||||
QIcon CreateIcon(Main::Account *account) {
|
||||
auto result = CreateOfficialIcon(account);
|
||||
- if (Platform::IsLinux()) {
|
||||
+ if (Platform::IsLinux() || Platform::IsHaiku()) {
|
||||
return QIcon::fromTheme("telegram", result);
|
||||
}
|
||||
-#ifdef Q_OS_LINUX
|
||||
+#if defined(Q_OS_LINUX) || defined(Q_OS_HAIKU)
|
||||
return QIcon::fromTheme(Platform::GetIconName(), result);
|
||||
#endif
|
||||
return result;
|
||||
diff --git a/Telegram/ThirdParty/libtgvoip/VoIPController.cpp b/Telegram/ThirdParty/libtgvoip/VoIPController.cpp
|
||||
index 88a8260..dfc6478 100644
|
||||
@@ -3456,10 +3438,10 @@ index 0000000..f682740
|
||||
+
|
||||
+#endif // CRL_USE_LINUX_TIME
|
||||
diff --git a/Telegram/lib_spellcheck/CMakeLists.txt b/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
index 349211f..a326222 100644
|
||||
index 4568692..36df305 100644
|
||||
--- a/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
+++ b/Telegram/lib_spellcheck/CMakeLists.txt
|
||||
@@ -44,6 +44,10 @@ if (system_spellchecker)
|
||||
@@ -46,6 +46,10 @@ if (system_spellchecker)
|
||||
spellcheck/platform/mac/spellcheck_mac.mm
|
||||
spellcheck/platform/win/spellcheck_win.cpp
|
||||
spellcheck/platform/win/spellcheck_win.h
|
||||
@@ -3470,7 +3452,7 @@ index 349211f..a326222 100644
|
||||
)
|
||||
else()
|
||||
nice_target_sources(lib_spellcheck ${src_loc}
|
||||
@@ -73,7 +77,7 @@ PUBLIC
|
||||
@@ -75,7 +79,7 @@ PUBLIC
|
||||
desktop-app::lib_ui
|
||||
)
|
||||
|
||||
@@ -4465,44 +4447,46 @@ index 0000000..a6c28f1
|
||||
+ endif()
|
||||
+endforeach()
|
||||
diff --git a/cmake/external/CMakeLists.txt b/cmake/external/CMakeLists.txt
|
||||
index 9c69674..55b22d4 100644
|
||||
index f311761..5b2d6ac 100644
|
||||
--- a/cmake/external/CMakeLists.txt
|
||||
+++ b/cmake/external/CMakeLists.txt
|
||||
@@ -5,22 +5,22 @@
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
@@ -12,23 +12,23 @@ macro(add_checked_subdirectory name)
|
||||
endmacro()
|
||||
|
||||
add_subdirectory(auto_updates)
|
||||
-add_subdirectory(crash_reports)
|
||||
+#add_subdirectory(crash_reports)
|
||||
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_subdirectory(dbusmenu_qt)
|
||||
add_checked_subdirectory(dbusmenu_qt)
|
||||
endif()
|
||||
add_subdirectory(expected)
|
||||
-add_subdirectory(ffmpeg)
|
||||
+#add_subdirectory(ffmpeg)
|
||||
add_subdirectory(gsl)
|
||||
add_checked_subdirectory(expected)
|
||||
-add_checked_subdirectory(ffmpeg)
|
||||
+#add_checked_subdirectory(ffmpeg)
|
||||
add_checked_subdirectory(gsl)
|
||||
if (add_hunspell_library)
|
||||
add_subdirectory(hunspell)
|
||||
add_checked_subdirectory(hunspell)
|
||||
endif()
|
||||
add_subdirectory(iconv)
|
||||
-add_subdirectory(lz4)
|
||||
-add_subdirectory(openal)
|
||||
-add_subdirectory(openssl)
|
||||
-add_subdirectory(opus)
|
||||
-add_subdirectory(qt)
|
||||
+#add_subdirectory(lz4)
|
||||
+#add_subdirectory(openal)
|
||||
+#add_subdirectory(openssl)
|
||||
+#add_subdirectory(opus)
|
||||
+#add_subdirectory(qt)
|
||||
add_subdirectory(qr_code_generator)
|
||||
add_subdirectory(ranges)
|
||||
add_subdirectory(rlottie)
|
||||
@@ -32,4 +32,3 @@ if (LINUX AND NOT DESKTOP_APP_DISABLE_DBUS_INTEGRATION)
|
||||
endif()
|
||||
add_subdirectory(variant)
|
||||
add_subdirectory(xxhash)
|
||||
-add_subdirectory(zlib)
|
||||
add_checked_subdirectory(iconv)
|
||||
-add_checked_subdirectory(lz4)
|
||||
+#add_checked_subdirectory(lz4)
|
||||
add_checked_subdirectory(minizip)
|
||||
-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)
|
||||
add_checked_subdirectory(qr_code_generator)
|
||||
add_checked_subdirectory(ranges)
|
||||
add_checked_subdirectory(rlottie)
|
||||
@@ -41,4 +41,4 @@ endif()
|
||||
add_checked_subdirectory(ton)
|
||||
add_checked_subdirectory(variant)
|
||||
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
|
||||
@@ -4595,7 +4579,7 @@ index 0000000..063f1ce
|
||||
+ $<IF:$<CONFIG:Debug>,,-Ofast>
|
||||
+)
|
||||
diff --git a/cmake/variables.cmake b/cmake/variables.cmake
|
||||
index 3c71216..891d428 100644
|
||||
index cb3303a..1dc7d45 100644
|
||||
--- a/cmake/variables.cmake
|
||||
+++ b/cmake/variables.cmake
|
||||
@@ -57,6 +57,7 @@ set(build_osx 0)
|
||||
@@ -3,10 +3,10 @@ DESCRIPTION="Unofficial build of the original Telegram client for Haiku."
|
||||
HOMEPAGE="https://www.telegram.org/"
|
||||
COPYRIGHT="2013-2020 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="d7bb9ad9e86d33333d733809e67daffc919d5dd32aeeaecd91c9ba9f5b3dfc22"
|
||||
CHECKSUM_SHA256="227bf0eacf4a838df389417946bd2da355c1bf8f2e2b0ddd3bad61478730dc0d"
|
||||
SOURCE_FILENAME="tdesktop-$portVersion-full.tar.gz"
|
||||
SOURCE_DIR="tdesktop-$portVersion-full"
|
||||
srcGitRev_2="0663103551379b958b2e79c51d51d163ec484300"
|
||||
Reference in New Issue
Block a user