Skip to content

Commit 68d5988

Browse files
authored
Merge pull request #1 from telegramdesktop/dev
pull
2 parents 8128f85 + fdd431d commit 68d5988

109 files changed

Lines changed: 4656 additions & 2235 deletions

File tree

Some content is hidden

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

.github/workflows/linux.yml

Lines changed: 69 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ jobs:
3131
CMAKE_VER: "3.16.3"
3232
UPLOAD_ARTIFACT: "false"
3333
ONLY_CACHE: "false"
34-
MANUAL_CACHING: "4"
34+
MANUAL_CACHING: "6"
3535
DOC_PATH: "docs/building-cmake.md"
36+
AUTO_CACHING: "1"
3637

3738
steps:
3839
- name: Get repository name.
@@ -43,7 +44,20 @@ jobs:
4344
with:
4445
submodules: recursive
4546

47+
- name: Disable man for further package installs.
48+
run: |
49+
cfgFile="/etc/dpkg/dpkg.cfg.d/no_man"
50+
sudo touch $cfgFile
51+
p() {
52+
sudo echo "path-exclude=/usr/share/$1/*" >> $cfgFile
53+
}
54+
55+
p man
56+
p locale
57+
p doc
58+
4659
- name: First set up.
60+
shell: bash
4761
run: |
4862
cd ..
4963
mv $REPO_NAME temp
@@ -55,13 +69,13 @@ jobs:
5569
sudo apt-get install software-properties-common -y && \
5670
sudo apt-get install git libexif-dev liblzma-dev libz-dev libssl-dev \
5771
libgtk2.0-dev libice-dev libsm-dev libicu-dev libdrm-dev dh-autoreconf \
58-
autoconf automake build-essential libass-dev libfreetype6-dev \
72+
autoconf automake build-essential libxml2-dev libass-dev libfreetype6-dev \
5973
libgpac-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev \
60-
libvorbis-dev libenchant-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev \
74+
libvorbis-dev libxcb1-dev libxcb-image0-dev libxcb-shm0-dev \
6175
libxcb-xfixes0-dev libxcb-keysyms1-dev libxcb-icccm4-dev libatspi2.0-dev \
6276
libxcb-render-util0-dev libxcb-util0-dev libxcb-xkb-dev libxrender-dev \
63-
libasound-dev libpulse-dev libxcb-sync0-dev libxcb-randr0-dev bison \
64-
libx11-xcb-dev libffi-dev libncurses5-dev pkg-config texi2html yasm \
77+
libasound-dev libpulse-dev libxcb-sync0-dev libxcb-randr0-dev libegl1-mesa-dev \
78+
libx11-xcb-dev libffi-dev libncurses5-dev pkg-config texi2html bison yasm \
6579
zlib1g-dev xutils-dev python-xcbgen chrpath gperf wget -y --force-yes && \
6680
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
6781
sudo apt-get update && \
@@ -75,6 +89,10 @@ jobs:
7589
7690
gcc --version > CACHE_KEY.txt
7791
echo $MANUAL_CACHING >> CACHE_KEY.txt
92+
if [ "$AUTO_CACHING" == "1" ]; then
93+
thisFile=$REPO_NAME/.github/workflows/linux.yml
94+
echo `md5sum $thisFile | cut -c -32` >> CACHE_KEY.txt
95+
fi
7896
md5cache=$(md5sum CACHE_KEY.txt | cut -c -32)
7997
echo ::set-env name=CACHE_KEY::$md5cache
8098
@@ -122,9 +140,8 @@ jobs:
122140
run: |
123141
cd $LibrariesPath
124142
125-
git clone $GIT/xiph/opus
143+
git clone -b v1.3 --depth=1 $GIT/xiph/opus
126144
cd opus
127-
git checkout v1.3
128145
./autogen.sh
129146
./configure
130147
make -j$(nproc)
@@ -142,16 +159,20 @@ jobs:
142159
./autogen.sh --enable-static
143160
make -j$(nproc)
144161
sudo make install
162+
cd ..
163+
rm -rf libva
145164
146165
- name: Libvdpau.
147166
run: |
148167
cd $LibrariesPath
149168
150-
git clone https://gitlab.freedesktop.org/vdpau/libvdpau.git --depth=1 -b libvdpau-1.2
169+
git clone -b libvdpau-1.2 --depth=1 https://gitlab.freedesktop.org/vdpau/libvdpau.git
151170
cd libvdpau
152171
./autogen.sh --enable-static
153172
make -j$(nproc)
154173
sudo make install
174+
cd ..
175+
rm -rf libvdpau
155176
156177
- name: FFmpeg cache.
157178
id: cache-ffmpeg
@@ -267,6 +288,8 @@ jobs:
267288
268289
make -j$(nproc)
269290
sudo make install
291+
cd ..
292+
rm -rf ffmpeg
270293
- name: FFmpeg install.
271294
run: |
272295
cd $LibrariesPath
@@ -293,18 +316,20 @@ jobs:
293316
./configure
294317
make -j$(nproc)
295318
sudo make install
319+
cd ..
320+
rm -rf portaudio
296321
297322
- name: OpenAL Soft.
298323
run: |
299324
cd $LibrariesPath
300325
301-
git clone $GIT/kcat/openal-soft.git
302-
cd openal-soft
303-
git checkout openal-soft-1.19.1
304-
cd build
326+
git clone -b openal-soft-1.19.1 --depth=1 $GIT/kcat/openal-soft.git
327+
cd openal-soft/build
305328
cmake -D LIBTYPE:STRING=STATIC ..
306329
make -j$(nproc)
307330
sudo make install
331+
cd -
332+
rm -rf openal-soft
308333
309334
- name: OpenSSL cache.
310335
id: cache-openssl
@@ -317,12 +342,15 @@ jobs:
317342
run: |
318343
cd $LibrariesPath
319344
320-
git clone $GIT/openssl/openssl openssl_$OPENSSL_VER
321-
cd openssl_$OPENSSL_VER
322-
git checkout OpenSSL_1_1_1-stable
345+
opensslDir=openssl_${OPENSSL_VER}
346+
git clone -b OpenSSL_${OPENSSL_VER}-stable --depth=1 \
347+
$GIT/openssl/openssl $opensslDir
348+
cd $opensslDir
323349
./config --prefix=$LibrariesPath/openssl-cache
324350
make -j$(nproc)
325-
sudo make install
351+
sudo make install_sw
352+
cd ..
353+
rm -rf $opensslDir
326354
- name: OpenSSL install.
327355
run: |
328356
cd $LibrariesPath
@@ -333,12 +361,25 @@ jobs:
333361
run: |
334362
cd $LibrariesPath
335363
336-
git clone $GIT/xkbcommon/libxkbcommon.git
364+
git clone -b xkbcommon-0.8.4 --depth=1 $GIT/xkbcommon/libxkbcommon.git
337365
cd libxkbcommon
338-
git checkout xkbcommon-0.8.4
339366
./autogen.sh
340367
make -j$(nproc)
341368
sudo make install
369+
cd ..
370+
rm -rf libxkbcommon
371+
372+
- name: Libwayland.
373+
run: |
374+
cd $LibrariesPath
375+
376+
git clone -b 1.16 https://gitlab.freedesktop.org/wayland/wayland
377+
cd wayland
378+
./autogen.sh --enable-static --disable-documentation
379+
make -j$(nproc)
380+
sudo make install
381+
cd ..
382+
rm -rf wayland
342383
343384
- name: Qt 5.12.5 cache.
344385
id: cache-qt
@@ -351,15 +392,12 @@ jobs:
351392
run: |
352393
cd $LibrariesPath
353394
354-
git clone git://code.qt.io/qt/qt5.git qt_$QT
355-
cd qt_$QT
356-
perl init-repository --module-subset=qtbase,qtimageformats,qtsvg
357-
git checkout v5.12.5
358-
git submodule update qtbase
359-
git submodule update qtimageformats
360-
git submodule update qtsvg
395+
git clone -b v5.12.5 --depth=1 git://code.qt.io/qt/qt5.git qt_${QT}
396+
cd qt_${QT}
397+
perl init-repository --module-subset=qtbase,qtwayland,qtimageformats,qtsvg
398+
git submodule update qtbase qtwayland qtimageformats qtsvg
361399
cd qtbase
362-
git apply ../../patches/qtbase_$QT.diff
400+
git apply ../../patches/qtbase_${QT}.diff
363401
cd src/plugins/platforminputcontexts
364402
git clone $GIT/desktop-app/fcitx.git
365403
git clone $GIT/desktop-app/hime.git
@@ -379,16 +417,18 @@ jobs:
379417
-qt-xcb \
380418
-system-freetype \
381419
-fontconfig \
382-
-no-opengl \
383420
-no-gtk \
384421
-static \
422+
-dbus-runtime \
385423
-openssl-linked \
386424
-I "$OPENSSL_PREFIX/include" OPENSSL_LIBS="$OPENSSL_PREFIX/lib/libssl.a $OPENSSL_PREFIX/lib/libcrypto.a -ldl -lpthread" \
387425
-nomake examples \
388426
-nomake tests
389427
390428
make -j$(nproc)
391429
sudo make install
430+
cd ..
431+
rm -rf qt_${QT}
392432
- name: Qt 5.12.5 install.
393433
run: |
394434
cd $LibrariesPath
@@ -439,6 +479,8 @@ jobs:
439479
make -j$(nproc) dump_syms
440480
441481
mv dump_syms $BreakpadCache/
482+
cd ..
483+
rm -rf gyp breakpad
442484
- name: Breakpad install.
443485
run: |
444486
cd $LibrariesPath

.github/workflows/mac.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ jobs:
2626
GIT: "https://github.com"
2727
PREFIX: "/usr/local/macos"
2828
MACOSX_DEPLOYMENT_TARGET: "10.12"
29-
XZ: "xz-5.0.5"
29+
XZ: "xz-5.2.4"
3030
QT: "5_12_5"
3131
OPENSSL_VER: "1_1_1"
3232
QT_PREFIX: "/usr/local/desktop-app/Qt-5.12.5"
33-
LIBICONV_VER: "libiconv-1.15"
33+
LIBICONV_VER: "libiconv-1.16"
3434
UPLOAD_ARTIFACT: "false"
3535
ONLY_CACHE: "false"
3636
MANUAL_CACHING: "2"
3737
DOC_PATH: "docs/building-xcode.md"
38+
AUTO_CACHING: "1"
39+
3840
steps:
3941
- name: Get repository name.
4042
run: echo ::set-env name=REPO_NAME::${GITHUB_REPOSITORY##*/}
@@ -61,6 +63,10 @@ jobs:
6163
echo $MIN_MAC >> CACHE_KEY.txt
6264
echo $PREFIX >> CACHE_KEY.txt
6365
echo $MANUAL_CACHING >> CACHE_KEY.txt
66+
if [ "$AUTO_CACHING" == "1" ]; then
67+
thisFile=$REPO_NAME/.github/workflows/mac.yml
68+
echo `md5 -q $thisFile` >> CACHE_KEY.txt
69+
fi
6470
echo ::set-env name=CACHE_KEY::`md5 -q CACHE_KEY.txt`
6571
6672
echo ::add-path::$PWD/Libraries/depot_tools

.github/workflows/snap.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,6 @@ jobs:
4747
md5cache=$(md5sum CMAKE_CACHE_KEY.txt | cut -c -32)
4848
echo ::set-env name=CMAKE_CACHE_KEY::$md5cache
4949
50-
awk -v RS="" -v ORS="\n\n" '/^ enchant:/' snap/snapcraft.yaml > ENCHANT_CACHE_KEY.txt
51-
md5cache=$(md5sum ENCHANT_CACHE_KEY.txt | cut -c -32)
52-
echo ::set-env name=ENCHANT_CACHE_KEY::$md5cache
53-
5450
- name: CMake cache.
5551
id: cache-cmake
5652
uses: actions/cache@v1
@@ -62,17 +58,6 @@ jobs:
6258
if: steps.cache-cmake.outputs.cache-hit != 'true'
6359
run: snapcraft build --destructive-mode cmake
6460

65-
- name: Enchant cache.
66-
id: cache-enchant
67-
uses: actions/cache@v1
68-
with:
69-
path: parts/enchant
70-
key: ${{ runner.OS }}-enchant-${{ env.CACHE_KEY }}-${{ env.ENCHANT_CACHE_KEY }}
71-
72-
- name: Enchant build.
73-
if: steps.cache-enchant.outputs.cache-hit != 'true'
74-
run: snapcraft build --destructive-mode enchant
75-
7661
- name: Telegram Desktop snap build.
7762
if: env.ONLY_CACHE == 'false'
7863
run: snapcraft --destructive-mode
@@ -95,5 +80,5 @@ jobs:
9580

9681
- name: Remove unneeded directories for cache.
9782
run: |
98-
rm -rf parts/{cmake,enchant}/{build,src,ubuntu}
99-
rm -rf parts/{cmake,enchant}/state/{stage,prime}
83+
rm -rf parts/cmake/{build,src,ubuntu}
84+
rm -rf parts/cmake/state/{stage,prime}

.github/workflows/win.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ jobs:
3030
ONLY_CACHE: "false"
3131
MANUAL_CACHING: "2"
3232
DOC_PATH: "docs/building-msvc.md"
33+
AUTO_CACHING: "1"
34+
3335
steps:
3436
- name: Get repository name.
3537
shell: bash
@@ -69,6 +71,10 @@ jobs:
6971
- name: Generate cache key.
7072
shell: bash
7173
run: |
74+
if [ "$AUTO_CACHING" == "1" ]; then
75+
thisFile=$REPO_NAME/.github/workflows/win.yml
76+
echo `md5sum $thisFile | awk '{ print $1 }'` >> CACHE_KEY.txt
77+
fi
7278
echo ::set-env name=CACHE_KEY::`md5sum CACHE_KEY.txt | awk '{ print $1 }'`
7379
7480
- name: Choco installs.

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,6 @@
6464
[submodule "Telegram/ThirdParty/libdbusmenu-qt"]
6565
path = Telegram/ThirdParty/libdbusmenu-qt
6666
url = https://github.com/desktop-app/libdbusmenu-qt.git
67+
[submodule "Telegram/ThirdParty/hunspell"]
68+
path = Telegram/ThirdParty/hunspell
69+
url = https://github.com/hunspell/hunspell

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ The source code is published under GPLv3 with OpenSSL exception, the license is
4848
## Build instructions
4949

5050
* [Visual Studio 2019][msvc]
51-
* [Xcode 10][xcode]
52-
* [GYP/CMake on GNU/Linux][cmake]
51+
* [Xcode 11][xcode]
52+
* [CMake on GNU/Linux][cmake]
5353

5454
[//]: # (LINKS)
5555
[telegram]: https://telegram.org

0 commit comments

Comments
 (0)