Skip to content

Commit

Permalink
update tdlib to 1.8.35 from tdlib/td@8d08b34
Browse files Browse the repository at this point in the history
  • Loading branch information
d99kris committed Aug 25, 2024
1 parent 89954a2 commit 6c109e5
Show file tree
Hide file tree
Showing 114 changed files with 4,490 additions and 1,794 deletions.
2 changes: 1 addition & 1 deletion lib/common/src/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

#pragma once

#define NCHAT_VERSION "5.2.1"
#define NCHAT_VERSION "5.2.2"
4 changes: 3 additions & 1 deletion lib/tgchat/ext/td/CMake/TdSetUpCompiler.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# - Configures C++14 compiler, setting TDLib-specific compilation options.
# Configures C++14 compiler, setting TDLib-specific compilation options.

function(td_set_up_compiler)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1 PARENT_SCOPE)
Expand Down Expand Up @@ -127,6 +127,8 @@ function(td_set_up_compiler)
add_cxx_compiler_flag("-Wodr")
add_cxx_compiler_flag("-flto-odr-type-merging")
add_cxx_compiler_flag("-Wno-psabi")
add_cxx_compiler_flag("-Wunused-member-function")
add_cxx_compiler_flag("-Wunused-private-field")

# add_cxx_compiler_flag("-Werror")

Expand Down
39 changes: 28 additions & 11 deletions lib/tgchat/ext/td/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if (POLICY CMP0065)
cmake_policy(SET CMP0065 NEW)
endif()

project(TDLib VERSION 1.8.34 LANGUAGES CXX C)
project(TDLib VERSION 1.8.35 LANGUAGES CXX C)

if (NOT DEFINED CMAKE_MODULE_PATH)
set(CMAKE_MODULE_PATH "")
Expand Down Expand Up @@ -72,7 +72,7 @@ if (POLICY CMP0069)
endif()
endif()

# Configure CCache if available
# Configure Ccache if available
find_program(CCACHE_FOUND ccache)
#set(CCACHE_FOUND 0)
if (CCACHE_FOUND)
Expand Down Expand Up @@ -221,7 +221,7 @@ if (HAS_PARENT)
endif()


#SOURCE SETS
# SOURCE SETS

set_source_files_properties(${TL_TD_API_AUTO_SOURCE} PROPERTIES GENERATED TRUE)
if (TD_ENABLE_JNI OR ANDROID)
Expand Down Expand Up @@ -361,6 +361,7 @@ set(TDLIB_SOURCE_PART1
td/telegram/CommonDialogManager.cpp
td/telegram/ConfigManager.cpp
td/telegram/ConnectionState.cpp
td/telegram/ConnectionStateManager.cpp
td/telegram/Contact.cpp
td/telegram/CountryInfoManager.cpp
td/telegram/DelayDispatcher.cpp
Expand Down Expand Up @@ -460,6 +461,7 @@ set(TDLIB_SOURCE_PART1
td/telegram/MessageOrigin.cpp
td/telegram/MessageQuote.cpp
td/telegram/MessageReaction.cpp
td/telegram/MessageReactor.cpp
td/telegram/MessageReplyHeader.cpp
td/telegram/MessageReplyInfo.cpp
td/telegram/MessageSearchFilter.cpp
Expand Down Expand Up @@ -504,6 +506,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/NotificationSettingsScope.cpp
td/telegram/NotificationSound.cpp
td/telegram/NotificationType.cpp
td/telegram/OnlineManager.cpp
td/telegram/OptionManager.cpp
td/telegram/OrderedMessage.cpp
td/telegram/OrderInfo.cpp
Expand All @@ -519,6 +522,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/Premium.cpp
td/telegram/PremiumGiftOption.cpp
td/telegram/PrivacyManager.cpp
td/telegram/PromoDataManager.cpp
td/telegram/QueryCombiner.cpp
td/telegram/QueryMerger.cpp
td/telegram/QuickReplyManager.cpp
Expand Down Expand Up @@ -550,6 +554,8 @@ set(TDLIB_SOURCE_PART2
td/telegram/SpecialStickerSetType.cpp
td/telegram/SponsoredMessageManager.cpp
td/telegram/StarManager.cpp
td/telegram/StarSubscription.cpp
td/telegram/StarSubscriptionPricing.cpp
td/telegram/StateManager.cpp
td/telegram/StatisticsManager.cpp
td/telegram/StickerFormat.cpp
Expand All @@ -570,9 +576,11 @@ set(TDLIB_SOURCE_PART2
td/telegram/StoryViewer.cpp
td/telegram/SuggestedAction.cpp
td/telegram/Support.cpp
td/telegram/SynchronousRequests.cpp
td/telegram/Td.cpp
td/telegram/TdDb.cpp
td/telegram/TermsOfService.cpp
td/telegram/TermsOfServiceManager.cpp
td/telegram/ThemeManager.cpp
td/telegram/ThemeSettings.cpp
td/telegram/TimeZoneManager.cpp
Expand Down Expand Up @@ -647,6 +655,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/CommonDialogManager.h
td/telegram/ConfigManager.h
td/telegram/ConnectionState.h
td/telegram/ConnectionStateManager.h
td/telegram/Contact.h
td/telegram/CountryInfoManager.h
td/telegram/CustomEmojiId.h
Expand Down Expand Up @@ -771,6 +780,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/MessageOrigin.h
td/telegram/MessageQuote.h
td/telegram/MessageReaction.h
td/telegram/MessageReactor.h
td/telegram/MessageReplyHeader.h
td/telegram/MessageReplyInfo.h
td/telegram/MessageSearchFilter.h
Expand Down Expand Up @@ -829,6 +839,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/NotificationSound.h
td/telegram/NotificationSoundType.h
td/telegram/NotificationType.h
td/telegram/OnlineManager.h
td/telegram/OptionManager.h
td/telegram/OrderedMessage.h
td/telegram/OrderInfo.h
Expand All @@ -846,6 +857,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/Premium.h
td/telegram/PremiumGiftOption.h
td/telegram/PrivacyManager.h
td/telegram/PromoDataManager.h
td/telegram/PtsManager.h
td/telegram/PublicDialogType.h
td/telegram/QueryCombiner.h
Expand Down Expand Up @@ -888,6 +900,8 @@ set(TDLIB_SOURCE_PART2
td/telegram/SpecialStickerSetType.h
td/telegram/SponsoredMessageManager.h
td/telegram/StarManager.h
td/telegram/StarSubscription.h
td/telegram/StarSubscriptionPricing.h
td/telegram/StateManager.h
td/telegram/StatisticsManager.h
td/telegram/StickerFormat.h
Expand All @@ -912,10 +926,12 @@ set(TDLIB_SOURCE_PART2
td/telegram/StoryViewer.h
td/telegram/SuggestedAction.h
td/telegram/Support.h
td/telegram/SynchronousRequests.h
td/telegram/Td.h
td/telegram/TdCallback.h
td/telegram/TdDb.h
td/telegram/TermsOfService.h
td/telegram/TermsOfServiceManager.h
td/telegram/ThemeManager.h
td/telegram/ThemeSettings.h
td/telegram/TimeZoneManager.h
Expand Down Expand Up @@ -988,6 +1004,7 @@ set(TDLIB_SOURCE_PART2
td/telegram/MessageOrigin.hpp
td/telegram/MessageQuote.hpp
td/telegram/MessageReaction.hpp
td/telegram/MessageReactor.hpp
td/telegram/MessageReplyInfo.hpp
td/telegram/MinChannel.hpp
td/telegram/NotificationGroupInfo.hpp
Expand All @@ -1009,13 +1026,15 @@ set(TDLIB_SOURCE_PART2
td/telegram/SecureValue.hpp
td/telegram/SendCodeHelper.hpp
td/telegram/SharedDialog.hpp
td/telegram/StarSubscriptionPricing.hpp
td/telegram/StickerMaskPosition.hpp
td/telegram/StickerPhotoSize.hpp
td/telegram/StickersManager.hpp
td/telegram/StoryForwardInfo.hpp
td/telegram/StoryInteractionInfo.hpp
td/telegram/StoryStealthMode.hpp
td/telegram/SuggestedAction.hpp
td/telegram/TermsOfService.hpp
td/telegram/ThemeSettings.hpp
td/telegram/TranscriptionInfo.hpp
td/telegram/VideoNotesManager.hpp
Expand Down Expand Up @@ -1046,7 +1065,7 @@ set(MEMPROF_STAT_SOURCE
memprof/memprof_stat.h
)

#LIBRARIES
# LIBRARIES

# memprof - simple library for memory usage profiling
add_library(memprof STATIC ${MEMPROF_SOURCE})
Expand Down Expand Up @@ -1100,7 +1119,7 @@ if (NOT CMAKE_CROSSCOMPILING)
add_dependencies(tdmtproto tl_generate_mtproto)
endif()

# tdcore - mostly internal TDLib interface. One should use tdactor for interactions with it.
# tdcore - internal TDLib interface
if (MSVC AND TD_ENABLE_LTO)
add_library(tdcore_part1 STATIC ${TDLIB_SOURCE_PART1})
target_include_directories(tdcore_part1 PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${TL_TD_AUTO_INCLUDE_DIR}>)
Expand Down Expand Up @@ -1163,7 +1182,7 @@ if (TD_ENABLE_DOTNET)
endif()
endif()

# tdc - TDLib interface in pure c.
# tdc - TDLib interface in pure C
add_library(tdc STATIC EXCLUDE_FROM_ALL ${TL_C_SCHEME_SOURCE} td/telegram/td_c_client.cpp td/telegram/td_c_client.h)
target_include_directories(tdc PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand Down Expand Up @@ -1207,14 +1226,14 @@ target_include_directories(tdjson_static PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)

# EXECUTABLES
if (EMSCRIPTEN)
set(TD_EMSCRIPTEN_SRC td/telegram/td_emscripten.cpp)
add_executable(${TD_EMSCRIPTEN} ${TD_EMSCRIPTEN_SRC})
target_include_directories(${TD_EMSCRIPTEN} PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(${TD_EMSCRIPTEN} PRIVATE tdjson_static tdactor)
endif()

#EXECUTABLES
if (NOT CMAKE_CROSSCOMPILING)
add_executable(tg_cli td/telegram/cli.cpp ${TL_TD_JSON_SOURCE})

Expand Down Expand Up @@ -1245,7 +1264,7 @@ if (NOT CMAKE_CROSSCOMPILING)
add_dependencies(tg_cli tl_generate_json)
endif()

#Exported libraries
# Exported libraries
add_library(TdStatic INTERFACE)
target_link_libraries(TdStatic INTERFACE tdclient)

Expand Down Expand Up @@ -1338,9 +1357,7 @@ install(FILES "TdConfig.cmake" "${CMAKE_CURRENT_BINARY_DIR}/TdConfigVersion.cmak
)

# Add SOVERSION to shared libraries
set_property(TARGET tdclient PROPERTY SOVERSION "${TDLib_VERSION}")
set_property(TARGET tdapi PROPERTY SOVERSION "${TDLib_VERSION}")
set_property(TARGET tdjson PROPERTY SOVERSION "${TDLib_VERSION}")
set_property(TARGET tdapi tdclient tdjson PROPERTY SOVERSION "${TDLib_VERSION}")

# nchat additions start
add_library(tdclientshared SHARED td/telegram/Client.cpp td/telegram/Client.h td/telegram/Log.cpp td/telegram/Log.h)
Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ target_link_libraries(YourTarget PRIVATE Td::TdStatic)

Or you could install `TDLib` and then reference it in your CMakeLists.txt like this:
```
find_package(Td 1.8.34 REQUIRED)
find_package(Td 1.8.35 REQUIRED)
target_link_libraries(YourTarget PRIVATE Td::TdStatic)
```
See [example/cpp/CMakeLists.txt](https://github.com/tdlib/td/blob/master/example/cpp/CMakeLists.txt).
Expand Down
8 changes: 8 additions & 0 deletions lib/tgchat/ext/td/SplitSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ function ($matches) use ($needed_std_headers) {
'ChatId' => 'ChatId',
'chat_manager[_(-](?![.]get[(][)])|ChatManager([^ ;.]| [^*])' => 'ChatManager',
'common_dialog_manager[_(-](?![.]get[(][)])|CommonDialogManager' => 'CommonDialogManager',
'connection_state_manager[_(-](?![.]get[(][)])|ConnectionStateManager' => 'ConnectionStateManager',
'country_info_manager[_(-](?![.]get[(][)])|CountryInfoManager' => 'CountryInfoManager',
'CustomEmojiId' => 'CustomEmojiId',
'device_token_manager[_(-](?![.]get[(][)])|DeviceTokenManager' => 'DeviceTokenManager',
Expand Down Expand Up @@ -377,6 +378,7 @@ function ($matches) use ($needed_std_headers) {
'MessageLinkInfo' => 'MessageLinkInfo',
'MessageQuote' => 'MessageQuote',
'MessageReaction|UnreadMessageReaction|[a-z_]*message[a-z_]*reaction' => 'MessageReaction',
'MessageReactor' => 'MessageReactor',
'MessageSearchOffset' => 'MessageSearchOffset',
'[a-z_]*_message_sender' => 'MessageSender',
'messages_manager[_(-](?![.]get[(][)])|MessagesManager' => 'MessagesManager',
Expand All @@ -385,13 +387,15 @@ function ($matches) use ($needed_std_headers) {
'MissingInvitee' => 'MissingInvitee',
'notification_manager[_(-](?![.]get[(][)])|NotificationManager|notifications[)]' => 'NotificationManager',
'notification_settings_manager[_(-](?![.]get[(][)])|NotificationSettingsManager' => 'NotificationSettingsManager',
'online_manager[_(-](?![.]get[(][)])|OnlineManager' => 'OnlineManager',
'option_manager[_(-](?![.]get[(][)])|OptionManager' => 'OptionManager',
'password_manager[_(-](?![.]get[(][)])|PasswordManager' => 'PasswordManager',
'people_nearby_manager[_(-](?![.]get[(][)])|PeopleNearbyManager' => 'PeopleNearbyManager',
'phone_number_manager[_(-](?![.]get[(][)])|PhoneNumberManager' => 'PhoneNumberManager',
'PhotoSizeSource' => 'PhotoSizeSource',
'poll_manager[_(-](?![.]get[(][)])|PollManager' => 'PollManager',
'privacy_manager[_(-](?![.]get[(][)])|PrivacyManager' => 'PrivacyManager',
'promo_data_manager[_(-](?![.]get[(][)])|PromoDataManager' => 'PromoDataManager',
'PublicDialogType|get_public_dialog_type' => 'PublicDialogType',
'quick_reply_manager[_(-](?![.]get[(][)])|QuickReplyManager' => 'QuickReplyManager',
'ReactionListType|[a-z_]*_reaction_list_type' => 'ReactionListType',
Expand All @@ -409,6 +413,8 @@ function ($matches) use ($needed_std_headers) {
'SharedDialog' => 'SharedDialog',
'sponsored_message_manager[_(-](?![.]get[(][)])|SponsoredMessageManager' => 'SponsoredMessageManager',
'star_manager[_(-](?![.]get[(][)])|StarManager' => 'StarManager',
'StarSubscription[^P]' => 'StarSubscription',
'StarSubscriptionPricing' => 'StarSubscriptionPricing',
'state_manager[_(-](?![.]get[(][)])|StateManager' => 'StateManager',
'statistics_manager[_(-](?![.]get[(][)])|StatisticsManager' => 'StatisticsManager',
'StickerSetId' => 'StickerSetId',
Expand All @@ -418,9 +424,11 @@ function ($matches) use ($needed_std_headers) {
'StoryListId' => 'StoryListId',
'story_manager[_(-](?![.]get[(][)])|StoryManager' => 'StoryManager',
'SuggestedAction|[a-z_]*_suggested_action' => 'SuggestedAction',
'SynchronousRequests' => 'SynchronousRequests',
'td_api' => 'td_api',
'td_db[(][)]|TdDb[^A-Za-z]' => 'TdDb',
'telegram_api' => 'telegram_api',
'terms_of_service_manager[_(-](?![.]get[(][)])|TermsOfServiceManager' => 'TermsOfServiceManager',
'theme_manager[_(-](?![.]get[(][)])|ThemeManager' => 'ThemeManager',
'ThemeSettings' => 'ThemeSettings',
'time_zone_manager[_(-](?![.]get[(][)])|TimeZoneManager' => 'TimeZoneManager',
Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/benchmark/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (NOT OPENSSL_FOUND)
find_package(ZLIB REQUIRED)
endif()

#TODO: all benchmarks in one file
# TODO: all benchmarks in one file
add_executable(bench_crypto bench_crypto.cpp)
target_link_libraries(bench_crypto PRIVATE tdutils ${OPENSSL_CRYPTO_LIBRARY} ${CMAKE_DL_LIBS} ${ZLIB_LIBRARIES})
if (WIN32)
Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/example/android/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=linux/amd64 ubuntu:24.04 as build
FROM --platform=linux/amd64 ubuntu:24.04 AS build

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yq default-jdk g++ git gperf make perl php-cli unzip wget && rm -rf /var/lib/apt/lists/*

Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/example/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4 FATAL_ERROR)

project(TdExample VERSION 1.0 LANGUAGES CXX)

find_package(Td 1.8.34 REQUIRED)
find_package(Td 1.8.35 REQUIRED)

add_executable(tdjson_example tdjson_example.cpp)
target_link_libraries(tdjson_example PRIVATE Td::TdJson)
Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/example/uwp/Telegram.Td.UWP.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata>
<id>Telegram.Td.UWP</id>
<version>1.8.34</version>
<version>1.8.35</version>
<title>TDLib for Universal Windows Platform</title>
<authors>Telegram</authors>
<owners>Telegram</owners>
Expand Down
2 changes: 1 addition & 1 deletion lib/tgchat/ext/td/example/uwp/extension.vsixmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011">
<Metadata>
<Identity Id="Telegram.Td.UWP" Version="1.8.34" Language="en-US" Publisher="Telegram LLC" />
<Identity Id="Telegram.Td.UWP" Version="1.8.35" Language="en-US" Publisher="Telegram LLC" />
<DisplayName>TDLib for Universal Windows Platform</DisplayName>
<Description>TDLib is a library for building Telegram clients</Description>
<MoreInfo>https://core.telegram.org/tdlib</MoreInfo>
Expand Down
Loading

0 comments on commit 6c109e5

Please sign in to comment.