Skip to content

Commit 4464975

Browse files
committed
Merge branch 'dev' of https://github.com/telegramdesktop/tdesktop into bigEmoj
# Conflicts: # Telegram/SourceFiles/core/version.h # Telegram/SourceFiles/history/view/history_view_element.cpp # Telegram/SourceFiles/history/view/history_view_service_message.cpp # Telegram/lib_ui
2 parents 5c751da + 2313349 commit 4464975

File tree

328 files changed

+12496
-4129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

328 files changed

+12496
-4129
lines changed

.devcontainer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,9 @@
55
"vscode": {
66
"settings": {
77
"C_Cpp.intelliSenseEngine": "disabled",
8-
"clangd.arguments": [
9-
"--compile-commands-dir=${workspaceFolder}/out"
10-
],
118
"cmake.generator": "Ninja Multi-Config",
12-
"cmake.buildDirectory": "${workspaceFolder}/out"
9+
"cmake.buildDirectory": "${workspaceFolder}/out",
10+
"cmake.copyCompileCommands": "${workspaceFolder}/compile_commands.json"
1311
},
1412
"extensions": [
1513
"ms-vscode.cpptools-extension-pack",

.github/workflows/linux.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,26 @@ jobs:
8080
- name: Set up Docker Buildx.
8181
uses: docker/setup-buildx-action@v3
8282

83+
- name: Libraries cache.
84+
uses: actions/cache@v4
85+
with:
86+
path: ${{ runner.temp }}/.buildx-cache
87+
key: ${{ runner.OS }}-libs-${{ hashFiles('Telegram/build/docker/centos_env/**') }}
88+
restore-keys: ${{ runner.OS }}-libs-
89+
8390
- name: Libraries.
8491
uses: docker/build-push-action@v6
8592
with:
8693
context: Telegram/build/docker/centos_env
8794
load: ${{ env.ONLY_CACHE == 'false' }}
8895
tags: ${{ env.IMAGE_TAG }}
89-
cache-from: type=gha
90-
cache-to: type=gha,mode=max
96+
cache-from: type=local,src=${{ runner.temp }}/.buildx-cache
97+
cache-to: type=local,dest=${{ runner.temp }}/.buildx-cache-new,mode=max
98+
99+
- name: Move cache.
100+
run: |
101+
rm -rf ${{ runner.temp }}/.buildx-cache
102+
mv ${{ runner.temp }}/.buildx-cache{-new,}
91103
92104
- name: Telegram Desktop build.
93105
if: env.ONLY_CACHE == 'false'
@@ -108,11 +120,9 @@ jobs:
108120
$IMAGE_TAG \
109121
/usr/src/tdesktop/Telegram/build/docker/centos_env/build.sh \
110122
-D CMAKE_CONFIGURATION_TYPES=Debug \
111-
-D CMAKE_C_FLAGS_DEBUG="" \
112-
-D CMAKE_CXX_FLAGS_DEBUG="" \
113-
-D CMAKE_C_FLAGS="-Werror" \
114-
-D CMAKE_CXX_FLAGS="-Werror" \
115-
-D CMAKE_EXE_LINKER_FLAGS="-s" \
123+
-D CMAKE_C_FLAGS_DEBUG="-O0" \
124+
-D CMAKE_CXX_FLAGS_DEBUG="-O0" \
125+
-D CMAKE_COMPILE_WARNING_AS_ERROR=ON \
116126
-D TDESKTOP_API_TEST=ON \
117127
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF \
118128
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF \

.github/workflows/mac.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ jobs:
115115
116116
./configure.sh \
117117
-D CMAKE_CONFIGURATION_TYPES=Debug \
118-
-D CMAKE_C_FLAGS="-Werror" \
119-
-D CMAKE_CXX_FLAGS="-Werror" \
118+
-D CMAKE_COMPILE_WARNING_AS_ERROR=ON \
120119
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=NO \
121120
-D TDESKTOP_API_TEST=ON \
122121
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF \

.github/workflows/mac_packaged.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
run: |
7070
brew update
7171
brew upgrade || true
72-
brew install ada-url autoconf automake boost cmake ffmpeg libtool openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz
72+
brew install ada-url autoconf automake boost cmake ffmpeg jpeg-xl libavif libheif libtool openal-soft openh264 openssl opus ninja pkg-config python qt yasm xz
7373
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
7474
7575
xcodebuild -version > CACHE_KEY.txt
@@ -118,10 +118,38 @@ jobs:
118118
119119
cmake --build build --parallel
120120
121+
- name: TDE2E cache.
122+
id: cache-tde2e
123+
uses: actions/cache@v4
124+
with:
125+
path: ${{ env.LibrariesPath }}/tde2e
126+
key: ${{ runner.OS }}-tde2e-${{ env.CACHE_KEY }}
127+
- name: TDE2E.
128+
if: steps.cache-tde2e.outputs.cache-hit != 'true'
129+
run: |
130+
cd $LibrariesPath
131+
132+
git init tde2e
133+
cd tde2e
134+
git remote add origin $GIT/tdlib/td.git
135+
git fetch --depth=1 origin 51743dfd01dff6179e2d8f7095729caa4e2222e9
136+
git reset --hard FETCH_HEAD
137+
138+
cmake -Bbuild -GNinja . \
139+
-DCMAKE_BUILD_TYPE=Debug \
140+
-DCMAKE_INSTALL_PREFIX=$PWD/build/prefix \
141+
-DCMAKE_C_FLAGS_DEBUG="" \
142+
-DCMAKE_CXX_FLAGS_DEBUG="" \
143+
-DTD_E2E_ONLY=ON
144+
145+
cmake --build build --parallel
146+
cmake --install build
147+
121148
- name: Telegram Desktop build.
122149
if: env.ONLY_CACHE == 'false'
123150
env:
124151
tg_owt_DIR: ${{ env.LibrariesPath }}/tg_owt/build
152+
tde2e_DIR: ${{ env.LibrariesPath }}/tde2e/build/prefix
125153
run: |
126154
cd $REPO_NAME
127155
@@ -138,9 +166,7 @@ jobs:
138166
-DCMAKE_BUILD_TYPE=Debug \
139167
-DCMAKE_C_FLAGS_DEBUG="" \
140168
-DCMAKE_CXX_FLAGS_DEBUG="" \
141-
-DCMAKE_EXE_LINKER_FLAGS="-s" \
142169
-DTDESKTOP_API_TEST=ON \
143-
-DDESKTOP_APP_USE_PACKAGED_LAZY=ON \
144170
$DEFINE
145171
146172
cmake --build build --parallel

.github/workflows/win.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,10 @@ jobs:
178178
%TDESKTOP_BUILD_ARCH% ^
179179
%TDESKTOP_BUILD_API% ^
180180
-D CMAKE_CONFIGURATION_TYPES=Debug ^
181-
-D CMAKE_C_FLAGS="/WX" ^
182-
-D CMAKE_CXX_FLAGS="/WX" ^
181+
-D CMAKE_COMPILE_WARNING_AS_ERROR=ON ^
182+
-D CMAKE_MSVC_DEBUG_INFORMATION_FORMAT= ^
183183
-D DESKTOP_APP_DISABLE_AUTOUPDATE=OFF ^
184184
-D DESKTOP_APP_DISABLE_CRASH_REPORTS=OFF ^
185-
-D DESKTOP_APP_NO_PDB=ON ^
186185
%TDESKTOP_BUILD_DEFINE%
187186
188187
cmake --build ..\out --config Debug --parallel

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ipch/
2020
.vs/
2121
.vscode/
2222
.cache/
23+
compile_commands.json
2324

2425
/Telegram/log.txt
2526
/Telegram/data

CMakeLists.txt

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,17 @@ include(cmake/validate_special_target.cmake)
1212
include(cmake/version.cmake)
1313
desktop_app_parse_version(Telegram/build/version)
1414

15-
set(project_langs C CXX)
16-
if (APPLE)
17-
list(APPEND project_langs OBJC OBJCXX)
18-
elseif (LINUX)
19-
list(APPEND project_langs ASM)
20-
endif()
21-
2215
project(Telegram
23-
LANGUAGES ${project_langs}
16+
LANGUAGES C CXX
2417
VERSION ${desktop_app_version_cmake}
2518
DESCRIPTION "Official Telegram Desktop messenger"
2619
HOMEPAGE_URL "https://desktop.telegram.org"
2720
)
21+
22+
if (APPLE)
23+
enable_language(OBJC OBJCXX)
24+
endif()
25+
2826
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT Telegram)
2927

3028
get_filename_component(third_party_loc "Telegram/ThirdParty" REALPATH)
@@ -39,9 +37,7 @@ include(cmake/variables.cmake)
3937
include(cmake/nice_target_sources.cmake)
4038
include(cmake/target_compile_options_if_exists.cmake)
4139
include(cmake/target_link_frameworks.cmake)
42-
include(cmake/target_link_optional_libraries.cmake)
4340
include(cmake/target_link_options_if_exists.cmake)
44-
include(cmake/target_link_static_libraries.cmake)
4541
include(cmake/init_target.cmake)
4642
include(cmake/generate_target.cmake)
4743
include(cmake/nuget.cmake)

Telegram/CMakeLists.txt

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,8 @@ PRIVATE
836836
history/view/history_view_bottom_info.h
837837
history/view/history_view_chat_preview.cpp
838838
history/view/history_view_chat_preview.h
839+
history/view/history_view_chat_section.cpp
840+
history/view/history_view_chat_section.h
839841
history/view/history_view_contact_status.cpp
840842
history/view/history_view_contact_status.h
841843
history/view/history_view_context_menu.cpp
@@ -870,8 +872,6 @@ PRIVATE
870872
history/view/history_view_pinned_tracker.h
871873
history/view/history_view_quick_action.cpp
872874
history/view/history_view_quick_action.h
873-
history/view/history_view_replies_section.cpp
874-
history/view/history_view_replies_section.h
875875
history/view/history_view_reply.cpp
876876
history/view/history_view_reply.h
877877
history/view/history_view_requests_bar.cpp
@@ -888,8 +888,8 @@ PRIVATE
888888
history/view/history_view_sponsored_click_handler.h
889889
history/view/history_view_sticker_toast.cpp
890890
history/view/history_view_sticker_toast.h
891-
history/view/history_view_sublist_section.cpp
892-
history/view/history_view_sublist_section.h
891+
history/view/history_view_subsection_tabs.cpp
892+
history/view/history_view_subsection_tabs.h
893893
history/view/history_view_text_helper.cpp
894894
history/view/history_view_text_helper.h
895895
history/view/history_view_transcribe_button.cpp
@@ -1446,6 +1446,8 @@ PRIVATE
14461446
settings/cloud_password/settings_cloud_password_start.h
14471447
settings/cloud_password/settings_cloud_password_step.cpp
14481448
settings/cloud_password/settings_cloud_password_step.h
1449+
settings/cloud_password/settings_cloud_password_validate_icon.cpp
1450+
settings/cloud_password/settings_cloud_password_validate_icon.h
14491451
settings/settings_active_sessions.cpp
14501452
settings/settings_active_sessions.h
14511453
settings/settings_advanced.cpp
@@ -1864,11 +1866,7 @@ else()
18641866
set(bundle_identifier "com.tdesktop.Telegram")
18651867
endif()
18661868
set(bundle_entitlements "Telegram.entitlements")
1867-
if (LINUX AND DESKTOP_APP_USE_PACKAGED)
1868-
set(output_name "telegram-desktop")
1869-
else()
1870-
set(output_name "Telegram")
1871-
endif()
1869+
set(output_name "Telegram")
18721870
endif()
18731871

18741872
if (CMAKE_GENERATOR STREQUAL Xcode)
@@ -1910,8 +1908,9 @@ PRIVATE
19101908
G_LOG_DOMAIN="Telegram"
19111909
)
19121910

1911+
get_property(is_multi_config GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
19131912
if (APPLE
1914-
OR "${CMAKE_GENERATOR}" STREQUAL "Ninja Multi-Config"
1913+
OR is_multi_config
19151914
OR NOT CMAKE_EXECUTABLE_SUFFIX STREQUAL ""
19161915
OR NOT "${output_name}" STREQUAL "Telegram")
19171916
set(output_folder ${CMAKE_BINARY_DIR})
@@ -1988,6 +1987,10 @@ if (NOT DESKTOP_APP_DISABLE_AUTOUPDATE AND NOT build_macstore AND NOT build_wins
19881987
desktop-app::external_openssl
19891988
)
19901989

1990+
if (DESKTOP_APP_USE_PACKAGED)
1991+
target_compile_definitions(Packer PRIVATE PACKER_USE_PACKAGED)
1992+
endif()
1993+
19911994
set_target_properties(Packer PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${output_folder})
19921995
endif()
19931996
elseif (build_winstore)
14.9 KB
Binary file not shown.
6.91 KB
Binary file not shown.

0 commit comments

Comments
 (0)