init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s

This commit is contained in:
allhaileris
2026-02-16 15:50:16 +03:00
commit afb81b8278
13816 changed files with 3689732 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# This file is part of Telegram Desktop,
# 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
function(generate_appstream_changelog target_name changelog_path metadata_path)
find_package(Python3 REQUIRED)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
set(gen_timestamp ${gen_dst}/${target_name}_appstream_changelog.timestamp)
set(gen_files ${metadata_path})
add_custom_command(
OUTPUT
${gen_timestamp}
COMMAND
${Python3_EXECUTABLE}
${submodules_loc}/build/changelog2appstream.py
-c "${changelog_path}"
-m "${metadata_path}"
-n 10
COMMAND
echo 1> ${gen_timestamp}
COMMENT "Generating AppStream changelog (${target_name})"
DEPENDS
${submodules_loc}/build/changelog2appstream.py
${changelog_path}
${metadata_path}
)
generate_target(${target_name} appstream_changelog ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()

View File

@@ -0,0 +1,32 @@
# This file is part of Telegram Desktop,
# 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
function(generate_lang target_name lang_file)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
set(gen_timestamp ${gen_dst}/lang_auto.timestamp)
set(gen_files
${gen_dst}/lang_auto.cpp
${gen_dst}/lang_auto.h
)
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
COMMAND
codegen_lang
-o${gen_dst}
${lang_file}
COMMENT "Generating lang (${target_name})"
DEPENDS
codegen_lang
${lang_file}
)
generate_target(${target_name} lang ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()

View File

@@ -0,0 +1,54 @@
# This file is part of Telegram Desktop,
# 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
function(generate_midl target_name src_loc)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
if (build_winarm)
set(env arm64)
elseif (build_win64)
set(env x64)
else()
set(env win32)
endif()
set(gen_timestamp ${gen_dst}/${target_name}_midl.timestamp)
set(gen_files "")
set(full_generation_sources "")
set(full_dependencies_list "")
foreach (file ${ARGN})
list(APPEND full_generation_sources ${src_loc}/${file})
get_filename_component(file_name ${file} NAME_WLE)
list(APPEND gen_files
${gen_dst}/${file_name}_i.c
${gen_dst}/${file_name}_h.h
)
list(APPEND gen_commands
COMMAND
midl
/out ${gen_dst}
/h ${file_name}_h.h
/env ${env}
/notlb
${src_loc}/${file}
)
endforeach()
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
${gen_commands}
COMMAND
echo 1> ${gen_timestamp}
COMMENT "Generating headers from IDLs (${target_name})"
DEPENDS
${full_generation_sources}
)
generate_target(${target_name} midl ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()

View File

@@ -0,0 +1,32 @@
# This file is part of Telegram Desktop,
# 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
function(generate_numbers target_name numbers_file)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
set(gen_timestamp ${gen_dst}/numbers.timestamp)
set(gen_files
${gen_dst}/numbers.cpp
${gen_dst}/numbers.h
)
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
COMMAND
codegen_numbers
-o${gen_dst}
${numbers_file}
COMMENT "Generating numbers (${target_name})"
DEPENDS
codegen_numbers
${numbers_file}
)
generate_target(${target_name} numbers ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()

View File

@@ -0,0 +1,38 @@
# This file is part of Telegram Desktop,
# 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
function(generate_scheme target_name script scheme_files)
find_package(Python3 REQUIRED)
set(gen_dst ${CMAKE_CURRENT_BINARY_DIR}/gen)
file(MAKE_DIRECTORY ${gen_dst})
set(gen_timestamp ${gen_dst}/scheme.timestamp)
set(gen_files
${gen_dst}/scheme.cpp
${gen_dst}/scheme.h
${gen_dst}/scheme-dump_to_text.cpp
${gen_dst}/scheme-dump_to_text.h
)
add_custom_command(
OUTPUT
${gen_timestamp}
BYPRODUCTS
${gen_files}
COMMAND
${Python3_EXECUTABLE}
${script}
-o${gen_dst}/scheme
${scheme_files}
COMMENT "Generating scheme (${target_name})"
DEPENDS
${script}
${submodules_loc}/lib_tl/tl/generate_tl.py
${scheme_files}
)
generate_target(${target_name} scheme ${gen_timestamp} "${gen_files}" ${gen_dst})
endfunction()

View File

@@ -0,0 +1,34 @@
# This file is part of Telegram Desktop,
# 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
add_library(lib_ffmpeg OBJECT)
add_library(desktop-app::lib_ffmpeg ALIAS lib_ffmpeg)
init_target(lib_ffmpeg)
nice_target_sources(lib_ffmpeg ${src_loc}
PRIVATE
ffmpeg/ffmpeg_frame_generator.cpp
ffmpeg/ffmpeg_frame_generator.h
ffmpeg/ffmpeg_bytes_io_wrap.h
ffmpeg/ffmpeg_utility.cpp
ffmpeg/ffmpeg_utility.h
)
target_include_directories(lib_ffmpeg
PUBLIC
${src_loc}
)
target_link_libraries(lib_ffmpeg
PUBLIC
desktop-app::lib_base
desktop-app::lib_ui
desktop-app::external_ffmpeg
)
if (DESKTOP_APP_SPECIAL_TARGET)
target_compile_definitions(lib_ffmpeg PRIVATE LIB_FFMPEG_USE_QT_PRIVATE_API)
endif()

View File

@@ -0,0 +1,34 @@
# This file is part of Telegram Desktop,
# 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
add_library(lib_prisma STATIC)
init_target(lib_prisma)
add_library(desktop-app::lib_prisma ALIAS lib_prisma)
set(prisma_loc ${third_party_loc}/libprisma/libprisma)
nice_target_sources(lib_prisma ${prisma_loc}
PRIVATE
Highlight.cpp
Highlight.h
LanguageTree.cpp
LanguageTree.h
SyntaxHighlighter.cpp
SyntaxHighlighter.h
TokenList.cpp
TokenList.h
)
target_include_directories(lib_prisma
PUBLIC
${prisma_loc}
)
target_link_libraries(lib_prisma
PRIVATE
desktop-app::external_boost_regex
)

View File

@@ -0,0 +1,60 @@
# This file is part of Telegram Desktop,
# 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
add_library(lib_stripe OBJECT)
add_library(desktop-app::lib_stripe ALIAS lib_stripe)
init_target(lib_stripe)
set(stripe_src_loc ${src_loc}/payments)
target_precompile_headers(lib_stripe PRIVATE ${stripe_src_loc}/stripe/stripe_pch.h)
nice_target_sources(lib_stripe ${stripe_src_loc}
PRIVATE
stripe/stripe_address.h
stripe/stripe_api_client.cpp
stripe/stripe_api_client.h
stripe/stripe_callbacks.h
stripe/stripe_card.cpp
stripe/stripe_card.h
stripe/stripe_card_params.cpp
stripe/stripe_card_params.h
stripe/stripe_card_validator.cpp
stripe/stripe_card_validator.h
stripe/stripe_decode.cpp
stripe/stripe_decode.h
stripe/stripe_error.cpp
stripe/stripe_error.h
stripe/stripe_form_encodable.h
stripe/stripe_form_encoder.cpp
stripe/stripe_form_encoder.h
stripe/stripe_payment_configuration.h
stripe/stripe_token.cpp
stripe/stripe_token.h
smartglocal/smartglocal_api_client.cpp
smartglocal/smartglocal_api_client.h
smartglocal/smartglocal_callbacks.h
smartglocal/smartglocal_card.cpp
smartglocal/smartglocal_card.h
smartglocal/smartglocal_error.cpp
smartglocal/smartglocal_error.h
smartglocal/smartglocal_token.cpp
smartglocal/smartglocal_token.h
stripe/stripe_pch.h
)
target_include_directories(lib_stripe
PUBLIC
${stripe_src_loc}
)
target_link_libraries(lib_stripe
PUBLIC
desktop-app::lib_base
desktop-app::lib_crl
desktop-app::external_qt
)

View File

@@ -0,0 +1,278 @@
# This file is part of Telegram Desktop,
# 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
add_library(lib_tgcalls STATIC)
init_target(lib_tgcalls) # Can't use std::optional::value on macOS.
add_library(tdesktop::lib_tgcalls ALIAS lib_tgcalls)
set(tgcalls_dir ${third_party_loc}/tgcalls)
set(tgcalls_loc ${tgcalls_dir}/tgcalls)
nice_target_sources(lib_tgcalls ${tgcalls_loc}
PRIVATE
Instance.cpp
Instance.h
)
nice_target_sources(lib_tgcalls ${tgcalls_loc}
PRIVATE
AudioDeviceHelper.cpp
AudioDeviceHelper.h
ChannelManager.cpp
ChannelManager.h
CodecSelectHelper.cpp
CodecSelectHelper.h
CryptoHelper.cpp
CryptoHelper.h
DirectConnectionChannel.h
EncryptedConnection.cpp
EncryptedConnection.h
FakeAudioDeviceModule.cpp
FakeAudioDeviceModule.h
FieldTrialsConfig.cpp
FieldTrialsConfig.h
InstanceImpl.cpp
InstanceImpl.h
LogSinkImpl.cpp
LogSinkImpl.h
Manager.cpp
Manager.h
MediaManager.cpp
MediaManager.h
Message.cpp
Message.h
NetworkManager.cpp
NetworkManager.h
SctpDataChannelProviderInterfaceImpl.cpp
SctpDataChannelProviderInterfaceImpl.h
StaticThreads.cpp
StaticThreads.h
ThreadLocalObject.h
TurnCustomizerImpl.cpp
TurnCustomizerImpl.h
VideoCaptureInterface.cpp
VideoCaptureInterface.h
VideoCaptureInterfaceImpl.cpp
VideoCaptureInterfaceImpl.h
VideoCapturerInterface.h
utils/gzip.cpp
utils/gzip.h
v2/ContentNegotiation.cpp
v2/ContentNegotiation.h
v2/DirectNetworkingImpl.cpp
v2/DirectNetworkingImpl.h
v2/ExternalSignalingConnection.cpp
v2/ExternalSignalingConnection.h
v2/InstanceNetworking.h
v2/InstanceV2ReferenceImpl.cpp
v2/InstanceV2ReferenceImpl.h
v2/InstanceV2Impl.cpp
v2/InstanceV2Impl.h
v2/NativeNetworkingImpl.cpp
v2/NativeNetworkingImpl.h
v2/RawTcpSocket.cpp
v2/RawTcpSocket.h
v2/ReflectorPort.cpp
v2/ReflectorPort.h
v2/ReflectorRelayPortFactory.cpp
v2/ReflectorRelayPortFactory.h
v2/Signaling.cpp
v2/Signaling.h
v2/SignalingConnection.cpp
v2/SignalingConnection.h
v2/SignalingEncryption.cpp
v2/SignalingEncryption.h
v2/SignalingSctpConnection.cpp
v2/SignalingSctpConnection.h
# Desktop capturer
desktop_capturer/DesktopCaptureSource.h
desktop_capturer/DesktopCaptureSource.cpp
desktop_capturer/DesktopCaptureSourceHelper.h
desktop_capturer/DesktopCaptureSourceHelper.cpp
desktop_capturer/DesktopCaptureSourceManager.h
desktop_capturer/DesktopCaptureSourceManager.cpp
# Group calls
group/AVIOContextImpl.cpp
group/AVIOContextImpl.h
group/AudioStreamingPart.cpp
group/AudioStreamingPart.h
group/AudioStreamingPartInternal.cpp
group/AudioStreamingPartInternal.h
group/AudioStreamingPartPersistentDecoder.cpp
group/AudioStreamingPartPersistentDecoder.h
group/GroupInstanceCustomImpl.cpp
group/GroupInstanceCustomImpl.h
group/GroupInstanceImpl.h
group/GroupJoinPayloadInternal.cpp
group/GroupJoinPayloadInternal.h
group/GroupJoinPayload.h
group/GroupNetworkManager.cpp
group/GroupNetworkManager.h
group/StreamingMediaContext.cpp
group/StreamingMediaContext.h
group/VideoStreamingPart.cpp
group/VideoStreamingPart.h
platform/PlatformInterface.h
# Android
platform/android/AndroidContext.cpp
platform/android/AndroidContext.h
platform/android/AndroidInterface.cpp
platform/android/AndroidInterface.h
platform/android/VideoCameraCapturer.cpp
platform/android/VideoCameraCapturer.h
platform/android/VideoCapturerInterfaceImpl.cpp
platform/android/VideoCapturerInterfaceImpl.h
# iOS / macOS
platform/darwin/CustomSimulcastEncoderAdapter.cpp
platform/darwin/CustomSimulcastEncoderAdapter.h
platform/darwin/DarwinFFMpeg.h
platform/darwin/DarwinFFMpeg.mm
platform/darwin/DarwinInterface.h
platform/darwin/DarwinInterface.mm
platform/darwin/DarwinVideoSource.h
platform/darwin/DarwinVideoSource.mm
platform/darwin/DesktopSharingCapturer.h
platform/darwin/DesktopSharingCapturer.mm
platform/darwin/ExtractCVPixelBuffer.h
platform/darwin/ExtractCVPixelBuffer.mm
platform/darwin/h265_nalu_rewriter.cc
platform/darwin/h265_nalu_rewriter.h
platform/darwin/objc_video_encoder_factory.h
platform/darwin/objc_video_encoder_factory.mm
platform/darwin/objc_video_decoder_factory.h
platform/darwin/objc_video_decoder_factory.mm
platform/darwin/RTCCodecSpecificInfoH265+Private.h
platform/darwin/RTCCodecSpecificInfoH265.h
platform/darwin/RTCCodecSpecificInfoH265.mm
platform/darwin/RTCH265ProfileLevelId.h
platform/darwin/RTCH265ProfileLevelId.mm
platform/darwin/TGCMIOCapturer.h
platform/darwin/TGCMIOCapturer.m
platform/darwin/TGCMIODevice.h
platform/darwin/TGCMIODevice.mm
platform/darwin/TGRTCCVPixelBuffer.h
platform/darwin/TGRTCCVPixelBuffer.mm
platform/darwin/TGRTCDefaultVideoDecoderFactory.h
platform/darwin/TGRTCDefaultVideoDecoderFactory.mm
platform/darwin/TGRTCDefaultVideoEncoderFactory.h
platform/darwin/TGRTCDefaultVideoEncoderFactory.mm
platform/darwin/TGRTCVideoDecoderH264.h
platform/darwin/TGRTCVideoDecoderH264.mm
platform/darwin/TGRTCVideoDecoderH265.h
platform/darwin/TGRTCVideoDecoderH265.mm
platform/darwin/TGRTCVideoEncoderH264.h
platform/darwin/TGRTCVideoEncoderH264.mm
platform/darwin/TGRTCVideoEncoderH265.h
platform/darwin/TGRTCVideoEncoderH265.mm
platform/darwin/VideoCameraCapturer.h
platform/darwin/VideoCameraCapturer.mm
platform/darwin/VideoCameraCapturerMac.h
platform/darwin/VideoCameraCapturerMac.mm
platform/darwin/VideoCapturerInterfaceImpl.h
platform/darwin/VideoCapturerInterfaceImpl.mm
platform/darwin/VideoCMIOCapture.h
platform/darwin/VideoCMIOCapture.mm
platform/darwin/VideoMetalView.h
platform/darwin/VideoMetalView.mm
platform/darwin/VideoMetalViewMac.h
platform/darwin/VideoMetalViewMac.mm
# POSIX
# Teleram Desktop
platform/tdesktop/DesktopInterface.cpp
platform/tdesktop/DesktopInterface.h
platform/tdesktop/VideoCapturerInterfaceImpl.cpp
platform/tdesktop/VideoCapturerInterfaceImpl.h
platform/tdesktop/VideoCapturerTrackSource.cpp
platform/tdesktop/VideoCapturerTrackSource.h
platform/tdesktop/VideoCameraCapturer.cpp
platform/tdesktop/VideoCameraCapturer.h
# third-party
third-party/json11.cpp
third-party/json11.hpp
)
target_link_libraries(lib_tgcalls
PRIVATE
desktop-app::external_webrtc
desktop-app::external_ffmpeg
desktop-app::external_openssl
desktop-app::external_rnnoise
desktop-app::external_zlib
)
target_compile_definitions(lib_tgcalls
PUBLIC
TGCALLS_USE_STD_OPTIONAL
PRIVATE
WEBRTC_APP_TDESKTOP
RTC_ENABLE_H265
RTC_ENABLE_VP9
)
if (APPLE)
target_compile_options(lib_tgcalls
PRIVATE
-fobjc-arc
)
remove_target_sources(lib_tgcalls ${tgcalls_loc}
platform/darwin/VideoCameraCapturer.h
platform/darwin/VideoCameraCapturer.mm
platform/darwin/VideoMetalView.h
platform/darwin/VideoMetalView.mm
platform/darwin/VideoMetalViewMac.h
platform/darwin/VideoMetalViewMac.mm
platform/tdesktop/DesktopInterface.cpp
platform/tdesktop/DesktopInterface.h
platform/tdesktop/VideoCapturerInterfaceImpl.cpp
platform/tdesktop/VideoCapturerInterfaceImpl.h
platform/tdesktop/VideoCapturerTrackSource.cpp
platform/tdesktop/VideoCapturerTrackSource.h
platform/tdesktop/VideoCameraCapturer.cpp
platform/tdesktop/VideoCameraCapturer.h
)
endif()
if (NOT MSVC)
target_compile_options_if_exists(lib_tgcalls
PRIVATE
-Wno-deprecated-volatile
-Wno-ambiguous-reversed-operator
-Wno-deprecated-declarations
-Wno-unqualified-std-cast-call
-Wno-unused-function
)
endif()
remove_target_sources(lib_tgcalls ${tgcalls_loc}
platform/android/AndroidContext.cpp
platform/android/AndroidContext.h
platform/android/AndroidInterface.cpp
platform/android/AndroidInterface.h
platform/android/VideoCameraCapturer.cpp
platform/android/VideoCameraCapturer.h
platform/android/VideoCapturerInterfaceImpl.cpp
platform/android/VideoCapturerInterfaceImpl.h
reference/InstanceImplReference.cpp
reference/InstanceImplReference.h
)
target_include_directories(lib_tgcalls
PUBLIC
${tgcalls_dir}
PRIVATE
${tgcalls_loc}
)

View File

@@ -0,0 +1,47 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_export OBJECT)
init_non_host_target(td_export)
add_library(tdesktop::td_export ALIAS td_export)
target_precompile_headers(td_export PRIVATE ${src_loc}/export/export_pch.h)
nice_target_sources(td_export ${src_loc}
PRIVATE
export/export_api_wrap.cpp
export/export_api_wrap.h
export/export_controller.cpp
export/export_controller.h
export/export_pch.h
export/export_settings.cpp
export/export_settings.h
export/data/export_data_types.cpp
export/data/export_data_types.h
export/output/export_output_abstract.cpp
export/output/export_output_abstract.h
export/output/export_output_file.cpp
export/output/export_output_file.h
export/output/export_output_html.cpp
export/output/export_output_html.h
export/output/export_output_html_and_json.cpp
export/output/export_output_html_and_json.h
export/output/export_output_json.cpp
export/output/export_output_json.h
export/output/export_output_result.h
export/output/export_output_stats.cpp
export/output/export_output_stats.h
)
target_include_directories(td_export
PUBLIC
${src_loc}
)
target_link_libraries(td_export
PUBLIC
desktop-app::lib_base
tdesktop::td_scheme
)

View File

@@ -0,0 +1,44 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_iv OBJECT)
init_non_host_target(td_iv)
add_library(tdesktop::td_iv ALIAS td_iv)
target_precompile_headers(td_iv PRIVATE ${src_loc}/iv/iv_pch.h)
nice_target_sources(td_iv ${src_loc}
PRIVATE
iv/iv_controller.cpp
iv/iv_controller.h
iv/iv_data.cpp
iv/iv_data.h
iv/iv_delegate.h
iv/iv_pch.h
iv/iv_prepare.cpp
iv/iv_prepare.h
)
nice_target_sources(td_iv ${res_loc}
PRIVATE
iv_html/page.css
iv_html/page.js
)
target_include_directories(td_iv
PUBLIC
${src_loc}
)
target_link_libraries(td_iv
PUBLIC
desktop-app::lib_ui
tdesktop::td_scheme
PRIVATE
desktop-app::lib_webview
desktop-app::external_ada
tdesktop::td_lang
tdesktop::td_ui
)

View File

@@ -0,0 +1,39 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_lang OBJECT)
init_non_host_target(td_lang)
add_library(tdesktop::td_lang ALIAS td_lang)
include(cmake/generate_lang.cmake)
generate_lang(td_lang ${res_loc}/langs/lang.strings)
target_precompile_headers(td_lang PRIVATE ${src_loc}/lang/lang_pch.h)
nice_target_sources(td_lang ${src_loc}
PRIVATE
lang/lang_file_parser.cpp
lang/lang_file_parser.h
lang/lang_hardcoded.h
lang/lang_keys.cpp
lang/lang_keys.h
lang/lang_pch.h
lang/lang_tag.cpp
lang/lang_tag.h
lang/lang_text_entity.cpp
lang/lang_text_entity.h
lang/lang_values.h
)
target_include_directories(td_lang
PUBLIC
${src_loc}
)
target_link_libraries(td_lang
PUBLIC
desktop-app::lib_ui
)

View File

@@ -0,0 +1,65 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_mtproto OBJECT)
init_non_host_target(td_mtproto)
add_library(tdesktop::td_mtproto ALIAS td_mtproto)
target_precompile_headers(td_mtproto PRIVATE ${src_loc}/mtproto/mtproto_pch.h)
nice_target_sources(td_mtproto ${src_loc}
PRIVATE
mtproto/details/mtproto_abstract_socket.cpp
mtproto/details/mtproto_abstract_socket.h
mtproto/details/mtproto_bound_key_creator.cpp
mtproto/details/mtproto_bound_key_creator.h
mtproto/details/mtproto_dc_key_binder.cpp
mtproto/details/mtproto_dc_key_binder.h
mtproto/details/mtproto_dc_key_creator.cpp
mtproto/details/mtproto_dc_key_creator.h
mtproto/details/mtproto_dcenter.cpp
mtproto/details/mtproto_dcenter.h
mtproto/details/mtproto_domain_resolver.cpp
mtproto/details/mtproto_domain_resolver.h
mtproto/details/mtproto_dump_to_text.cpp
mtproto/details/mtproto_dump_to_text.h
mtproto/details/mtproto_received_ids_manager.cpp
mtproto/details/mtproto_received_ids_manager.h
mtproto/details/mtproto_rsa_public_key.cpp
mtproto/details/mtproto_rsa_public_key.h
mtproto/details/mtproto_serialized_request.cpp
mtproto/details/mtproto_serialized_request.h
mtproto/details/mtproto_tcp_socket.cpp
mtproto/details/mtproto_tcp_socket.h
mtproto/details/mtproto_tls_socket.cpp
mtproto/details/mtproto_tls_socket.h
mtproto/mtproto_auth_key.cpp
mtproto/mtproto_auth_key.h
mtproto/mtproto_concurrent_sender.cpp
mtproto/mtproto_concurrent_sender.h
mtproto/mtproto_config.cpp
mtproto/mtproto_config.h
mtproto/mtproto_dc_options.cpp
mtproto/mtproto_dc_options.h
mtproto/mtproto_dh_utils.cpp
mtproto/mtproto_dh_utils.h
mtproto/mtproto_pch.h
mtproto/mtproto_proxy_data.cpp
mtproto/mtproto_proxy_data.h
mtproto/mtproto_response.cpp
mtproto/mtproto_response.h
)
target_include_directories(td_mtproto
PUBLIC
${src_loc}
)
target_link_libraries(td_mtproto
PUBLIC
tdesktop::td_scheme
PRIVATE
desktop-app::external_zlib
)

View File

@@ -0,0 +1,44 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_scheme OBJECT)
init_non_host_target(td_scheme)
add_library(tdesktop::td_scheme ALIAS td_scheme)
include(cmake/generate_scheme.cmake)
set(scheme_files
${src_loc}/mtproto/scheme/api.tl
${src_loc}/mtproto/scheme/mtproto.tl
)
generate_scheme(td_scheme ${src_loc}/codegen/scheme/codegen_scheme.py "${scheme_files}")
nice_target_sources(td_scheme ${src_loc}/mtproto/scheme
PRIVATE
api.tl
mtproto.tl
)
target_include_directories(td_scheme
PUBLIC
${src_loc}
)
target_link_libraries(td_scheme
PUBLIC
desktop-app::lib_base
desktop-app::lib_tl
)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "mips64")
# Sometimes final linking may fail with error "relocation truncated to fit"
# due to large scheme size.
target_compile_options(td_scheme
PRIVATE
-mxgot
)
endif()

View File

@@ -0,0 +1,30 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_tde2e OBJECT)
init_non_host_target(td_tde2e)
add_library(tdesktop::td_tde2e ALIAS td_tde2e)
nice_target_sources(td_tde2e ${src_loc}
PRIVATE
tde2e/tde2e_api.cpp
tde2e/tde2e_api.h
)
target_include_directories(td_tde2e
PUBLIC
${src_loc}
)
target_link_libraries(td_tde2e
PUBLIC
desktop-app::lib_base
PRIVATE
desktop-app::external_tde2e
)

581
Telegram/cmake/td_ui.cmake Normal file
View File

@@ -0,0 +1,581 @@
# This file is part of Telegram Desktop,
# 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
add_library(td_ui OBJECT)
init_non_host_target(td_ui)
add_library(tdesktop::td_ui ALIAS td_ui)
include(lib_ui/cmake/generate_styles.cmake)
include(cmake/generate_numbers.cmake)
set(style_files
ui/td_common.style
ui/filter_icons.style
ui/menu_icons.style
ui/chat/chat.style
ui/effects/credits.style
ui/effects/premium.style
ui/color_indices.style
boxes/boxes.style
dialogs/dialogs.style
chat_helpers/chat_helpers.style
calls/calls.style
export/view/export.style
info/info.style
info/channel_statistics/boosts/giveaway/giveaway.style
info/channel_statistics/earn/channel_earn.style
info/profile/info_levels.style
info/userpic/info_userpic_builder.style
intro/intro.style
iv/iv.style
media/player/media_player.style
media/stories/media_stories.style
passport/passport.style
payments/ui/payments.style
profile/profile.style
settings/settings.style
media/view/media_view.style
overview/overview.style
window/window.style
editor/editor.style
statistics/statistics.style
)
set(dependent_style_files
${submodules_loc}/lib_ui/ui/colors.palette
${submodules_loc}/lib_ui/ui/basic.style
${submodules_loc}/lib_ui/ui/layers/layers.style
${submodules_loc}/lib_ui/ui/widgets/widgets.style
)
generate_styles(td_ui ${src_loc} "${style_files}" "${dependent_style_files}")
target_precompile_headers(td_ui PRIVATE ${src_loc}/ui/ui_pch.h)
nice_target_sources(td_ui ${src_loc}
PRIVATE
${style_files}
boxes/peers/edit_peer_history_visibility_box.cpp
boxes/peers/edit_peer_history_visibility_box.h
boxes/peers/toggle_topics_box.cpp
boxes/peers/toggle_topics_box.h
calls/group/ui/calls_group_recording_box.cpp
calls/group/ui/calls_group_recording_box.h
calls/group/ui/calls_group_scheduled_labels.cpp
calls/group/ui/calls_group_scheduled_labels.h
calls/group/ui/calls_group_stars_coloring.cpp
calls/group/ui/calls_group_stars_coloring.h
calls/group/ui/desktop_capture_choose_source.cpp
calls/group/ui/desktop_capture_choose_source.h
calls/ui/calls_device_menu.cpp
calls/ui/calls_device_menu.h
chat_helpers/field_characters_count_manager.cpp
chat_helpers/field_characters_count_manager.h
chat_helpers/stickers_emoji_image_loader.cpp
chat_helpers/stickers_emoji_image_loader.h
core/current_geo_location.cpp
core/current_geo_location.h
core/file_location.cpp
core/file_location.h
core/mime_type.cpp
core/mime_type.h
countries/countries_instance.cpp
countries/countries_instance.h
data/raw/raw_countries_bounds.cpp
data/raw/raw_countries_bounds.h
data/data_authorization.h
data/data_birthday.cpp
data/data_birthday.h
data/data_channel_earn.h
data/data_credits.h
data/data_credits_earn.h
data/data_passkey_deserialize.cpp
data/data_passkey_deserialize.h
data/data_peer_colors.h
data/data_premium_subscription_option.h
data/data_statistics_chart.cpp
data/data_statistics_chart.h
data/data_subscriptions.h
dialogs/dialogs_common.h
dialogs/dialogs_three_state_icon.h
dialogs/ui/chat_search_empty.cpp
dialogs/ui/chat_search_empty.h
dialogs/ui/chat_search_in.cpp
dialogs/ui/chat_search_in.h
dialogs/ui/dialogs_quick_action_context.h
dialogs/ui/dialogs_quick_action.h
dialogs/ui/dialogs_stories_list.cpp
dialogs/ui/dialogs_stories_list.h
dialogs/ui/dialogs_top_bar_suggestion_content.cpp
dialogs/ui/dialogs_top_bar_suggestion_content.h
dialogs/ui/posts_search_intro.cpp
dialogs/ui/posts_search_intro.h
dialogs/ui/top_peers_strip.cpp
dialogs/ui/top_peers_strip.h
editor/controllers/undo_controller.cpp
editor/controllers/undo_controller.h
editor/editor_crop.cpp
editor/editor_crop.h
editor/editor_layer_widget.cpp
editor/editor_layer_widget.h
editor/photo_editor_common.cpp
editor/photo_editor_common.h
editor/photo_editor_inner_common.h
editor/scene/scene.cpp
editor/scene/scene.h
editor/scene/scene_item_base.cpp
editor/scene/scene_item_base.h
editor/scene/scene_item_canvas.cpp
editor/scene/scene_item_canvas.h
editor/scene/scene_item_image.cpp
editor/scene/scene_item_image.h
editor/scene/scene_item_line.cpp
editor/scene/scene_item_line.h
history/admin_log/history_admin_log_filter_value.h
history/history_view_top_toast.cpp
history/history_view_top_toast.h
history/view/controls/history_view_characters_limit.cpp
history/view/controls/history_view_characters_limit.h
history/view/controls/history_view_voice_record_button.cpp
history/view/controls/history_view_voice_record_button.h
info/info_flexible_scroll.cpp
info/info_flexible_scroll.h
info/profile/info_profile_icon.cpp
info/profile/info_profile_icon.h
info/profile/info_profile_music_button.cpp
info/profile/info_profile_music_button.h
info/profile/info_profile_text.cpp
info/profile/info_profile_text.h
info/profile/info_profile_top_bar_action_button.cpp
info/profile/info_profile_top_bar_action_button.h
info/userpic/info_userpic_bubble_wrap.cpp
info/userpic/info_userpic_bubble_wrap.h
info/userpic/info_userpic_color_circle_button.cpp
info/userpic/info_userpic_color_circle_button.h
info/userpic/info_userpic_emoji_builder_layer.cpp
info/userpic/info_userpic_emoji_builder_layer.h
info/channel_statistics/boosts/giveaway/boost_badge.cpp
info/channel_statistics/boosts/giveaway/boost_badge.h
info/channel_statistics/boosts/giveaway/giveaway_type_row.cpp
info/channel_statistics/boosts/giveaway/giveaway_type_row.h
info/channel_statistics/boosts/giveaway/select_countries_box.cpp
info/channel_statistics/boosts/giveaway/select_countries_box.h
info/channel_statistics/earn/earn_format.cpp
info/channel_statistics/earn/earn_format.h
info/channel_statistics/earn/earn_icons.cpp
info/channel_statistics/earn/earn_icons.h
intro/intro_code_input.cpp
intro/intro_code_input.h
layout/abstract_layout_item.cpp
layout/abstract_layout_item.h
layout/layout_mosaic.cpp
layout/layout_mosaic.h
layout/layout_position.cpp
layout/layout_position.h
layout/layout_selection.cpp
layout/layout_selection.h
media/clip/media_clip_check_streaming.cpp
media/clip/media_clip_check_streaming.h
media/clip/media_clip_ffmpeg.cpp
media/clip/media_clip_ffmpeg.h
media/clip/media_clip_implementation.cpp
media/clip/media_clip_implementation.h
media/clip/media_clip_reader.cpp
media/clip/media_clip_reader.h
media/player/media_player_button.cpp
media/player/media_player_button.h
media/player/media_player_dropdown.cpp
media/player/media_player_dropdown.h
media/media_common.h
menu/gift_resale_filter.cpp
menu/gift_resale_filter.h
menu/menu_check_item.cpp
menu/menu_check_item.h
menu/menu_item_rate_transcribe.cpp
menu/menu_item_rate_transcribe.h
menu/menu_ttl.cpp
menu/menu_ttl.h
passport/ui/passport_details_row.cpp
passport/ui/passport_details_row.h
passport/ui/passport_form_row.cpp
passport/ui/passport_form_row.h
payments/ui/payments_edit_card.cpp
payments/ui/payments_edit_card.h
payments/ui/payments_edit_information.cpp
payments/ui/payments_edit_information.h
payments/ui/payments_form_summary.cpp
payments/ui/payments_form_summary.h
payments/ui/payments_field.cpp
payments/ui/payments_field.h
payments/ui/payments_panel.cpp
payments/ui/payments_panel.h
payments/ui/payments_panel_data.h
payments/ui/payments_panel_delegate.h
payments/ui/payments_reaction_box.cpp
payments/ui/payments_reaction_box.h
platform/linux/current_geo_location_linux.cpp
platform/linux/current_geo_location_linux.h
platform/linux/text_recognition_linux.h
platform/mac/file_bookmark_mac.h
platform/mac/file_bookmark_mac.mm
platform/mac/current_geo_location_mac.h
platform/mac/current_geo_location_mac.mm
platform/mac/text_recognition_mac.h
platform/mac/text_recognition_mac.mm
platform/win/current_geo_location_win.cpp
platform/win/current_geo_location_win.h
platform/win/text_recognition_win.h
platform/platform_file_bookmark.h
platform/platform_current_geo_location.h
platform/platform_text_recognition.h
settings/settings_common.cpp
settings/settings_common.h
settings/cloud_password/settings_cloud_password_common.cpp
settings/cloud_password/settings_cloud_password_common.h
statistics/chart_lines_filter_controller.cpp
statistics/chart_lines_filter_controller.h
statistics/chart_rulers_data.cpp
statistics/chart_rulers_data.h
statistics/chart_widget.cpp
statistics/chart_widget.h
statistics/segment_tree.cpp
statistics/segment_tree.h
statistics/statistics_common.h
statistics/statistics_data_deserialize.cpp
statistics/statistics_data_deserialize.h
statistics/statistics_format_values.cpp
statistics/statistics_format_values.h
statistics/statistics_graphics.cpp
statistics/statistics_graphics.h
statistics/statistics_types.h
statistics/view/abstract_chart_view.cpp
statistics/view/abstract_chart_view.h
statistics/view/bar_chart_view.cpp
statistics/view/bar_chart_view.h
statistics/view/chart_rulers_view.cpp
statistics/view/chart_rulers_view.h
statistics/view/chart_view_factory.cpp
statistics/view/chart_view_factory.h
statistics/view/linear_chart_view.cpp
statistics/view/linear_chart_view.h
statistics/view/stack_chart_common.cpp
statistics/view/stack_chart_common.h
statistics/view/stack_linear_chart_common.cpp
statistics/view/stack_linear_chart_common.h
statistics/view/stack_linear_chart_view.cpp
statistics/view/stack_linear_chart_view.h
statistics/widgets/chart_header_widget.cpp
statistics/widgets/chart_header_widget.h
statistics/widgets/chart_lines_filter_widget.cpp
statistics/widgets/chart_lines_filter_widget.h
statistics/widgets/point_details_widget.cpp
statistics/widgets/point_details_widget.h
ui/boxes/auto_delete_settings.cpp
ui/boxes/auto_delete_settings.h
ui/boxes/boost_box.cpp
ui/boxes/boost_box.h
ui/boxes/calendar_box.cpp
ui/boxes/calendar_box.h
ui/boxes/choose_date_time.cpp
ui/boxes/choose_date_time.h
ui/boxes/choose_font_box.cpp
ui/boxes/choose_font_box.h
ui/boxes/choose_language_box.cpp
ui/boxes/choose_language_box.h
ui/boxes/choose_time.cpp
ui/boxes/choose_time.h
ui/boxes/collectible_info_box.cpp
ui/boxes/collectible_info_box.h
ui/boxes/confirm_box.cpp
ui/boxes/confirm_box.h
ui/boxes/confirm_phone_box.cpp
ui/boxes/confirm_phone_box.h
ui/boxes/country_select_box.cpp
ui/boxes/country_select_box.h
ui/boxes/edit_birthday_box.cpp
ui/boxes/edit_birthday_box.h
ui/boxes/edit_factcheck_box.cpp
ui/boxes/edit_factcheck_box.h
ui/boxes/edit_invite_link.cpp
ui/boxes/edit_invite_link.h
ui/boxes/rate_call_box.cpp
ui/boxes/rate_call_box.h
ui/boxes/report_box_graphics.cpp
ui/boxes/report_box_graphics.h
ui/boxes/show_or_premium_box.cpp
ui/boxes/show_or_premium_box.h
ui/boxes/single_choice_box.cpp
ui/boxes/single_choice_box.h
ui/boxes/time_picker_box.cpp
ui/boxes/time_picker_box.h
ui/chat/attach/attach_abstract_single_file_preview.cpp
ui/chat/attach/attach_abstract_single_file_preview.h
ui/chat/attach/attach_abstract_single_media_preview.cpp
ui/chat/attach/attach_abstract_single_media_preview.h
ui/chat/attach/attach_abstract_single_preview.h
ui/chat/attach/attach_album_preview.cpp
ui/chat/attach/attach_album_preview.h
ui/chat/attach/attach_album_thumbnail.cpp
ui/chat/attach/attach_album_thumbnail.h
ui/chat/attach/attach_bot_downloads.cpp
ui/chat/attach/attach_bot_downloads.h
ui/chat/attach/attach_bot_webview.cpp
ui/chat/attach/attach_bot_webview.h
ui/chat/attach/attach_controls.cpp
ui/chat/attach/attach_controls.h
ui/chat/attach/attach_extensions.cpp
ui/chat/attach/attach_extensions.h
ui/chat/attach/attach_prepare.cpp
ui/chat/attach/attach_prepare.h
ui/chat/attach/attach_send_files_way.cpp
ui/chat/attach/attach_send_files_way.h
ui/chat/attach/attach_single_file_preview.cpp
ui/chat/attach/attach_single_file_preview.h
ui/chat/attach/attach_single_media_preview.cpp
ui/chat/attach/attach_single_media_preview.h
ui/chat/chat_style.cpp
ui/chat/chat_style.h
ui/chat/chat_style_radius.cpp
ui/chat/chat_style_radius.h
ui/chat/chat_theme.cpp
ui/chat/chat_theme.h
ui/chat/chats_filter_tag.cpp
ui/chat/chats_filter_tag.h
ui/chat/continuous_scroll.cpp
ui/chat/continuous_scroll.h
ui/chat/forward_options_box.cpp
ui/chat/forward_options_box.h
ui/chat/group_call_bar.cpp
ui/chat/group_call_bar.h
ui/chat/group_call_userpics.cpp
ui/chat/group_call_userpics.h
ui/chat/message_bar.cpp
ui/chat/message_bar.h
ui/chat/message_bubble.cpp
ui/chat/message_bubble.h
ui/chat/more_chats_bar.cpp
ui/chat/more_chats_bar.h
ui/chat/pinned_bar.cpp
ui/chat/pinned_bar.h
ui/chat/requests_bar.cpp
ui/chat/requests_bar.h
ui/controls/button_labels.cpp
ui/controls/button_labels.h
ui/controls/call_mute_button.cpp
ui/controls/call_mute_button.h
ui/controls/chat_service_checkbox.cpp
ui/controls/chat_service_checkbox.h
ui/controls/delete_message_context_action.cpp
ui/controls/delete_message_context_action.h
ui/controls/download_bar.cpp
ui/controls/download_bar.h
ui/controls/emoji_button.cpp
ui/controls/emoji_button.h
ui/controls/feature_list.cpp
ui/controls/feature_list.h
ui/controls/filter_link_header.cpp
ui/controls/filter_link_header.h
ui/controls/jump_down_button.cpp
ui/controls/jump_down_button.h
ui/controls/invite_link_buttons.cpp
ui/controls/invite_link_buttons.h
ui/controls/invite_link_label.cpp
ui/controls/invite_link_label.h
ui/controls/peer_list_dummy.cpp
ui/controls/peer_list_dummy.h
ui/controls/round_video_recorder_data.h
ui/controls/round_video_recorder.cpp
ui/controls/round_video_recorder.h
ui/controls/send_as_button.cpp
ui/controls/send_as_button.h
ui/controls/send_button.cpp
ui/controls/send_button.h
ui/controls/stars_rating.cpp
ui/controls/stars_rating.h
ui/controls/subsection_tabs_slider.cpp
ui/controls/subsection_tabs_slider.h
ui/controls/subsection_tabs_slider_reorder.cpp
ui/controls/subsection_tabs_slider_reorder.h
ui/controls/sub_tabs.cpp
ui/controls/sub_tabs.h
ui/controls/swipe_handler.cpp
ui/controls/swipe_handler.h
ui/controls/swipe_handler_data.h
ui/controls/tabbed_search.cpp
ui/controls/tabbed_search.h
ui/controls/ton_common.cpp
ui/controls/ton_common.h
ui/controls/who_reacted_context_action.cpp
ui/controls/who_reacted_context_action.h
ui/controls/window_outdated_bar.cpp
ui/controls/window_outdated_bar_dummy.cpp
ui/controls/window_outdated_bar.h
ui/effects/fireworks_animation.cpp
ui/effects/fireworks_animation.h
ui/effects/glare.cpp
ui/effects/glare.h
ui/effects/loading_element.cpp
ui/effects/loading_element.h
ui/effects/ministar_particles.cpp
ui/effects/ministar_particles.h
ui/effects/outline_segments.cpp
ui/effects/outline_segments.h
ui/effects/premium_bubble.cpp
ui/effects/premium_bubble.h
ui/effects/premium_graphics.cpp
ui/effects/premium_graphics.h
ui/effects/premium_stars.cpp
ui/effects/premium_stars.h
ui/effects/premium_stars_colored.cpp
ui/effects/premium_stars_colored.h
ui/effects/premium_top_bar.cpp
ui/effects/premium_top_bar.h
ui/effects/round_checkbox.cpp
ui/effects/round_checkbox.h
ui/effects/scroll_content_shadow.cpp
ui/effects/scroll_content_shadow.h
ui/effects/shake_animation.cpp
ui/effects/shake_animation.h
ui/effects/snowflakes.cpp
ui/effects/snowflakes.h
ui/effects/toggle_arrow.cpp
ui/effects/toggle_arrow.h
ui/search_field_controller.cpp
ui/search_field_controller.h
ui/text/format_song_name.cpp
ui/text/format_song_name.h
ui/text/format_values.cpp
ui/text/format_values.h
ui/text/text_lottie_custom_emoji.cpp
ui/text/text_lottie_custom_emoji.h
ui/text/text_options.cpp
ui/text/text_options.h
ui/widgets/fields/special_fields.cpp
ui/widgets/fields/special_fields.h
ui/widgets/fields/time_part_input_with_placeholder.cpp
ui/widgets/fields/time_part_input_with_placeholder.h
ui/widgets/chat_filters_tabs_slider.cpp
ui/widgets/chat_filters_tabs_slider.h
ui/widgets/chat_filters_tabs_slider_reorder.cpp
ui/widgets/chat_filters_tabs_slider_reorder.h
ui/widgets/color_editor.cpp
ui/widgets/color_editor.h
ui/widgets/continuous_sliders.cpp
ui/widgets/continuous_sliders.h
ui/widgets/discrete_sliders.cpp
ui/widgets/discrete_sliders.h
ui/widgets/gradient_round_button.cpp
ui/widgets/gradient_round_button.h
ui/widgets/horizontal_fit_container.cpp
ui/widgets/horizontal_fit_container.h
ui/widgets/level_meter.cpp
ui/widgets/level_meter.h
ui/widgets/multi_select.cpp
ui/widgets/multi_select.h
ui/widgets/sent_code_field.cpp
ui/widgets/sent_code_field.h
ui/widgets/participants_check_view.cpp
ui/widgets/participants_check_view.h
ui/widgets/slider_natural_width.h
ui/widgets/vertical_drum_picker.cpp
ui/widgets/vertical_drum_picker.h
ui/cached_round_corners.cpp
ui/cached_round_corners.h
ui/color_contrast.cpp
ui/color_contrast.h
ui/color_int_conversion.cpp
ui/color_int_conversion.h
ui/empty_userpic.cpp
ui/empty_userpic.h
ui/grouped_layout.cpp
ui/grouped_layout.h
ui/new_badges.cpp
ui/new_badges.h
ui/peer/color_sample.cpp
ui/peer/color_sample.h
ui/power_saving.cpp
ui/power_saving.h
ui/vertical_list.cpp
ui/vertical_list.h
ui/unread_badge_paint.cpp
ui/unread_badge_paint.h
ui/unread_counter_format.cpp
ui/unread_counter_format.h
ui/userpic_view.cpp
ui/userpic_view.h
ui/webview_helpers.cpp
ui/webview_helpers.h
window/window_slide_animation.cpp
window/window_slide_animation.h
ui/ui_pch.h
)
nice_target_sources(td_ui ${res_loc}
PRIVATE
picker_html/picker.css
picker_html/picker.js
)
if (DESKTOP_APP_SPECIAL_TARGET)
remove_target_sources(td_ui ${src_loc}
ui/controls/window_outdated_bar_dummy.cpp
)
else()
remove_target_sources(td_ui ${src_loc}
ui/controls/window_outdated_bar.cpp
)
endif()
target_include_directories(td_ui
PUBLIC
${src_loc}
)
target_link_libraries(td_ui
PUBLIC
tdesktop::td_lang
desktop-app::lib_ui
desktop-app::lib_lottie
PRIVATE
tdesktop::lib_tgcalls
desktop-app::lib_ffmpeg
desktop-app::lib_webview
desktop-app::lib_webrtc
desktop-app::lib_spellcheck
desktop-app::lib_stripe
desktop-app::external_kcoreaddons
desktop-app::external_webrtc
)

View File

@@ -0,0 +1,53 @@
# This file is part of Telegram Desktop,
# 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
option(TDESKTOP_API_TEST "Use test API credentials." OFF)
set(TDESKTOP_API_ID "0" CACHE STRING "Provide 'api_id' for the Telegram API access.")
set(TDESKTOP_API_HASH "" CACHE STRING "Provide 'api_hash' for the Telegram API access.")
if (TDESKTOP_API_TEST)
set(TDESKTOP_API_ID 17349)
set(TDESKTOP_API_HASH 344583e45741c457fe1862106095a5eb)
endif()
if (TDESKTOP_API_ID STREQUAL "0" OR TDESKTOP_API_HASH STREQUAL "")
message(FATAL_ERROR
" \n"
" PROVIDE: -D TDESKTOP_API_ID=[API_ID] -D TDESKTOP_API_HASH=[API_HASH]\n"
" \n"
" > To build your version of Telegram Desktop you're required to provide\n"
" > your own 'api_id' and 'api_hash' for the Telegram API access.\n"
" >\n"
" > How to obtain your 'api_id' and 'api_hash' is described here:\n"
" > https://core.telegram.org/api/obtaining_api_id\n"
" >\n"
" > If you're building the application not for deployment,\n"
" > but only for test purposes you can use TEST ONLY credentials,\n"
" > which are very limited by the Telegram API server:\n"
" >\n"
" > api_id: 17349\n"
" > api_hash: 344583e45741c457fe1862106095a5eb\n"
" >\n"
" > Your users will start getting internal server errors on login\n"
" > if you deploy an app using those 'api_id' and 'api_hash'.\n"
" ")
endif()
if (DESKTOP_APP_DISABLE_AUTOUPDATE)
target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_AUTOUPDATE)
endif()
if (DESKTOP_APP_DISABLE_CRASH_REPORTS)
target_compile_definitions(Telegram PRIVATE TDESKTOP_DISABLE_CRASH_REPORTS)
endif()
if (DESKTOP_APP_USE_PACKAGED)
target_compile_definitions(Telegram PRIVATE TDESKTOP_USE_PACKAGED)
endif()
if (DESKTOP_APP_SPECIAL_TARGET)
target_compile_definitions(Telegram PRIVATE TDESKTOP_ALLOW_CLOSED_ALPHA)
endif()

View File

@@ -0,0 +1,44 @@
# This file is part of Telegram Desktop,
# 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
add_executable(test_text WIN32)
init_target(test_text "(tests)")
target_include_directories(test_text PRIVATE ${src_loc})
nice_target_sources(test_text ${src_loc}
PRIVATE
tests/test_main.cpp
tests/test_main.h
tests/test_text.cpp
)
nice_target_sources(test_text ${res_loc}
PRIVATE
qrc/emoji_1.qrc
qrc/emoji_2.qrc
qrc/emoji_3.qrc
qrc/emoji_4.qrc
qrc/emoji_5.qrc
qrc/emoji_6.qrc
qrc/emoji_7.qrc
qrc/emoji_8.qrc
)
target_link_libraries(test_text
PRIVATE
desktop-app::lib_base
desktop-app::lib_crl
desktop-app::lib_ui
desktop-app::external_qt
desktop-app::external_qt_static_plugins
)
set_target_properties(test_text PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_dependencies(Telegram test_text)
target_prepare_qrc(test_text)