mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Adapt snap build for tg_owt
This commit is contained in:
parent
d34eabdc11
commit
a474074705
1 changed files with 17 additions and 81 deletions
|
@ -68,6 +68,7 @@ parts:
|
||||||
parse-info: [usr/share/metainfo/telegramdesktop.appdata.xml]
|
parse-info: [usr/share/metainfo/telegramdesktop.appdata.xml]
|
||||||
build-environment:
|
build-environment:
|
||||||
- LD_LIBRARY_PATH: $SNAPCRAFT_STAGE/usr/lib
|
- LD_LIBRARY_PATH: $SNAPCRAFT_STAGE/usr/lib
|
||||||
|
- tg_owt_DIR: $SNAPCRAFT_STAGE/tg_owt
|
||||||
build-packages:
|
build-packages:
|
||||||
- python
|
- python
|
||||||
- qtbase5-private-dev
|
- qtbase5-private-dev
|
||||||
|
@ -104,7 +105,6 @@ parts:
|
||||||
- -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
|
- -DTDESKTOP_API_HASH=d524b414d21f4d37f08684c1df41ac9c
|
||||||
- -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
|
- -DDESKTOP_APP_USE_PACKAGED_LAZY=ON
|
||||||
- -DDESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS=$SNAPCRAFT_STAGE/usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5/QtWaylandClient/5.12.8
|
- -DDESKTOP_APP_QTWAYLANDCLIENT_PRIVATE_HEADERS=$SNAPCRAFT_STAGE/usr/include/$SNAPCRAFT_ARCH_TRIPLET/qt5/QtWaylandClient/5.12.8
|
||||||
- -DDESKTOP_APP_WEBRTC_LOCATION=$SNAPCRAFT_STAGE/webrtc/src
|
|
||||||
override-pull: |
|
override-pull: |
|
||||||
snapcraftctl pull
|
snapcraftctl pull
|
||||||
|
|
||||||
|
@ -128,14 +128,6 @@ parts:
|
||||||
- qtwayland
|
- qtwayland
|
||||||
- webrtc
|
- webrtc
|
||||||
|
|
||||||
patches:
|
|
||||||
source: https://github.com/desktop-app/patches.git
|
|
||||||
source-depth: 1
|
|
||||||
plugin: dump
|
|
||||||
organize:
|
|
||||||
"*": patches/
|
|
||||||
prime: [-./*]
|
|
||||||
|
|
||||||
telegram-patches:
|
telegram-patches:
|
||||||
source: Telegram/Patches
|
source: Telegram/Patches
|
||||||
plugin: dump
|
plugin: dump
|
||||||
|
@ -143,14 +135,6 @@ parts:
|
||||||
"*": telegram_patches/
|
"*": telegram_patches/
|
||||||
prime: [-./*]
|
prime: [-./*]
|
||||||
|
|
||||||
depot-tools:
|
|
||||||
source: https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
|
||||||
source-depth: 1
|
|
||||||
plugin: dump
|
|
||||||
organize:
|
|
||||||
"*": depot_tools/
|
|
||||||
prime: [-./*]
|
|
||||||
|
|
||||||
desktop-qt5:
|
desktop-qt5:
|
||||||
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
source: https://github.com/ubuntu/snapcraft-desktop-helpers.git
|
||||||
source-subdir: qt
|
source-subdir: qt
|
||||||
|
@ -369,79 +353,31 @@ parts:
|
||||||
qmake
|
qmake
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
|
make INSTALL_ROOT="$SNAPCRAFT_PART_INSTALL" install
|
||||||
after:
|
|
||||||
- desktop-qt5
|
|
||||||
stage: [-./usr/lib]
|
stage: [-./usr/lib]
|
||||||
prime: [-./*]
|
prime: [-./*]
|
||||||
|
after:
|
||||||
|
- desktop-qt5
|
||||||
|
|
||||||
webrtc:
|
webrtc:
|
||||||
plugin: nil
|
source: https://github.com/ilya-fedin/tg_owt.git
|
||||||
|
source-depth: 1
|
||||||
|
source-branch: improve-packaged-build
|
||||||
|
plugin: cmake
|
||||||
build-packages:
|
build-packages:
|
||||||
- curl
|
- yasm
|
||||||
- python2
|
- libjpeg8-dev
|
||||||
- libopus-dev
|
- libopus-dev
|
||||||
- libssl-dev
|
- libssl-dev
|
||||||
stage-packages:
|
stage-packages:
|
||||||
|
- libjpeg8
|
||||||
- libopus0
|
- libopus0
|
||||||
- libssl1.1
|
- libssl1.1
|
||||||
override-pull: |
|
|
||||||
export PATH="$SNAPCRAFT_STAGE/depot_tools:$PATH"
|
|
||||||
|
|
||||||
mkdir webrtc
|
|
||||||
cd webrtc
|
|
||||||
cp "$SNAPCRAFT_STAGE/patches/webrtc/.gclient" .
|
|
||||||
git clone --depth=1 https://github.com/open-webrtc-toolkit/owt-deps-webrtc src
|
|
||||||
gclient sync --no-history
|
|
||||||
|
|
||||||
applyPatch() {
|
|
||||||
cd "$SNAPCRAFT_PART_SRC/webrtc/$1"
|
|
||||||
git apply "$SNAPCRAFT_STAGE/patches/webrtc/$(basename $1).diff"
|
|
||||||
}
|
|
||||||
|
|
||||||
applyPatch src
|
|
||||||
applyPatch src/build
|
|
||||||
applyPatch src/third_party
|
|
||||||
applyPatch src/third_party/libsrtp
|
|
||||||
override-build: |
|
override-build: |
|
||||||
export PATH="$SNAPCRAFT_STAGE/depot_tools:$PATH"
|
cmake "$SNAPCRAFT_PART_SRC" -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build . -- -j$(nproc)
|
||||||
cd webrtc/src
|
cp -a . "$SNAPCRAFT_PART_INSTALL"
|
||||||
|
organize:
|
||||||
ArgumentsList=`echo \
|
"*": tg_owt/
|
||||||
target_os=\"linux\" \
|
|
||||||
treat_warnings_as_errors=false \
|
|
||||||
is_component_build=false \
|
|
||||||
is_debug=false \
|
|
||||||
is_clang=false \
|
|
||||||
proprietary_codecs=true \
|
|
||||||
use_custom_libcxx=false \
|
|
||||||
use_rtti=true \
|
|
||||||
use_gold=false \
|
|
||||||
use_sysroot=false \
|
|
||||||
linux_use_bundled_binutils=false \
|
|
||||||
enable_dsyms=true \
|
|
||||||
rtc_include_tests=false \
|
|
||||||
rtc_build_examples=false \
|
|
||||||
rtc_build_tools=false \
|
|
||||||
rtc_build_opus=false \
|
|
||||||
rtc_build_ssl=false \
|
|
||||||
rtc_ssl_root=\"/usr/include\" \
|
|
||||||
rtc_ssl_libs=[\"ssl\",\"crypto\"] \
|
|
||||||
rtc_builtin_ssl_root_certificates=true \
|
|
||||||
rtc_build_ffmpeg=false \
|
|
||||||
rtc_ffmpeg_root=\"$SNAPCRAFT_STAGE/usr/include\" \
|
|
||||||
rtc_ffmpeg_libs=[\"avcodec\",\"swscale\",\"swresample\",\"avutil\"] \
|
|
||||||
rtc_opus_root=\"/usr/include/opus\" \
|
|
||||||
rtc_enable_protobuf=false`
|
|
||||||
|
|
||||||
gn gen out/Release --args="$ArgumentsList"
|
|
||||||
|
|
||||||
ninja -C out/Release webrtc
|
|
||||||
cd ../..
|
|
||||||
|
|
||||||
cp -a webrtc "$SNAPCRAFT_PART_INSTALL"
|
|
||||||
after:
|
|
||||||
- depot-tools
|
|
||||||
- ffmpeg
|
|
||||||
- patches
|
|
||||||
prime: [-./*]
|
prime: [-./*]
|
||||||
|
after:
|
||||||
|
- ffmpeg
|
||||||
|
|
Loading…
Add table
Reference in a new issue