mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-20 08:03:45 +08:00
Move rlottie -> tlottie.
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -4,9 +4,6 @@
|
||||
[submodule "Telegram/ThirdParty/xxHash"]
|
||||
path = Telegram/ThirdParty/xxHash
|
||||
url = https://github.com/Cyan4973/xxHash.git
|
||||
[submodule "Telegram/ThirdParty/rlottie"]
|
||||
path = Telegram/ThirdParty/rlottie
|
||||
url = https://github.com/desktop-app/rlottie.git
|
||||
[submodule "Telegram/ThirdParty/lz4"]
|
||||
path = Telegram/ThirdParty/lz4
|
||||
url = https://github.com/lz4/lz4.git
|
||||
|
||||
@@ -87,7 +87,6 @@ PRIVATE
|
||||
desktop-app::lib_webview
|
||||
desktop-app::lib_ffmpeg
|
||||
desktop-app::lib_stripe
|
||||
desktop-app::external_rlottie
|
||||
desktop-app::external_zlib
|
||||
desktop-app::external_minizip
|
||||
desktop-app::external_kcoreaddons
|
||||
|
||||
1
Telegram/ThirdParty/rlottie
vendored
1
Telegram/ThirdParty/rlottie
vendored
Submodule Telegram/ThirdParty/rlottie deleted from dcfe6f62f2
@@ -1001,6 +1001,33 @@ cd ..
|
||||
rm -rf tde2e
|
||||
EOF
|
||||
|
||||
FROM builder AS tlottie
|
||||
RUN <<EOF
|
||||
RUST_TOOLCHAIN=1.96.1
|
||||
export RUSTUP_HOME=/usr/src/rustup
|
||||
export CARGO_HOME=/usr/src/cargo
|
||||
wget -O rustup-init.sh https://sh.rustup.rs
|
||||
sh rustup-init.sh -y --no-modify-path --profile minimal --default-toolchain $RUST_TOOLCHAIN
|
||||
rm rustup-init.sh
|
||||
export RUSTUP_TOOLCHAIN=$RUST_TOOLCHAIN
|
||||
export PATH=$CARGO_HOME/bin:$PATH
|
||||
export DESTDIR=/usr/src/tlottie-cache
|
||||
git init tlottie
|
||||
cd tlottie
|
||||
git remote add origin https://github.com/dkaraush/tlottie.git
|
||||
git fetch --depth=1 origin 758c7cb74444f1c3c9923065c40fdb3aad8b7d60
|
||||
git reset --hard FETCH_HEAD
|
||||
cargo rustc --lib --release --locked \
|
||||
--features c-api --crate-type staticlib \
|
||||
--target x86_64-unknown-linux-gnu \
|
||||
-- --print native-static-libs
|
||||
mkdir -p $DESTDIR/usr/local/lib $DESTDIR/usr/local/include/tlottie
|
||||
objcopy --strip-debug target/x86_64-unknown-linux-gnu/release/libtlottie.a $DESTDIR/usr/local/lib/libtlottie.a
|
||||
cp include/tlottie.h $DESTDIR/usr/local/include/tlottie/tlottie.h
|
||||
cd ..
|
||||
rm -rf tlottie rustup cargo
|
||||
EOF
|
||||
|
||||
FROM builder
|
||||
COPY --link --from=zlib /usr/src/zlib-cache /
|
||||
COPY --link --from=xz /usr/src/xz-cache /
|
||||
@@ -1043,6 +1070,7 @@ COPY --link --from=breakpad /usr/src/breakpad-cache /
|
||||
COPY --link --from=webrtc /usr/src/webrtc-cache /
|
||||
COPY --link --from=ada /usr/src/ada-cache /
|
||||
COPY --link --from=tde2e /usr/src/tde2e-cache /
|
||||
COPY --link --from=tlottie /usr/src/tlottie-cache /
|
||||
|
||||
COPY --link --from=patches /usr/src/patches patches
|
||||
RUN <<EOF
|
||||
|
||||
@@ -520,6 +520,28 @@ mac:
|
||||
git+https://chromium.googlesource.com/external/gyp@master six
|
||||
""", 'ThirdParty')
|
||||
|
||||
rustToolchain = '1.96.1'
|
||||
stage('rust', """
|
||||
win:
|
||||
powershell -Command "iwr -OutFile ./rustup-init.exe https://static.rust-lang.org/rustup/dist/x86_64-pc-windows-msvc/rustup-init.exe"
|
||||
SET "RUSTUP_HOME=%THIRDPARTY_DIR%\\rust\\rustup"
|
||||
SET "CARGO_HOME=%THIRDPARTY_DIR%\\rust\\cargo"
|
||||
rustup-init.exe -y --no-modify-path --profile minimal ^
|
||||
--default-toolchain """ + rustToolchain + """ ^
|
||||
--component rust-src ^
|
||||
--target aarch64-pc-windows-msvc
|
||||
del rustup-init.exe
|
||||
mac:
|
||||
wget -O rustup-init.sh https://sh.rustup.rs
|
||||
export RUSTUP_HOME=$THIRDPARTY_DIR/rust/rustup
|
||||
export CARGO_HOME=$THIRDPARTY_DIR/rust/cargo
|
||||
sh rustup-init.sh -y --no-modify-path --profile minimal \\
|
||||
--default-toolchain """ + rustToolchain + """ \\
|
||||
--target aarch64-apple-darwin \\
|
||||
--target x86_64-apple-darwin
|
||||
rm rustup-init.sh
|
||||
""", 'ThirdParty')
|
||||
|
||||
stage('lzma', """
|
||||
win:
|
||||
git clone https://github.com/desktop-app/lzma.git
|
||||
@@ -1903,6 +1925,54 @@ release:
|
||||
buildTd Release
|
||||
""")
|
||||
|
||||
stage('tlottie', """
|
||||
git clone https://github.com/dkaraush/tlottie.git
|
||||
cd tlottie
|
||||
git checkout 758c7cb744
|
||||
win:
|
||||
SET "RUSTUP_HOME=%THIRDPARTY_DIR%\\rust\\rustup"
|
||||
SET "CARGO_HOME=%THIRDPARTY_DIR%\\rust\\cargo"
|
||||
SET RUSTUP_TOOLCHAIN=""" + rustToolchain + """
|
||||
SET "PATH=%CARGO_HOME%\\bin;%PATH%"
|
||||
win32:
|
||||
SET "RUST_TARGET=i686-win7-windows-msvc"
|
||||
SET "RUST_BUILD_STD=-Z build-std=std,panic_abort"
|
||||
SET "RUSTC_BOOTSTRAP=1"
|
||||
win64:
|
||||
SET "RUST_TARGET=x86_64-win7-windows-msvc"
|
||||
SET "RUST_BUILD_STD=-Z build-std=std,panic_abort"
|
||||
SET "RUSTC_BOOTSTRAP=1"
|
||||
winarm:
|
||||
SET "RUST_TARGET=aarch64-pc-windows-msvc"
|
||||
SET "RUST_BUILD_STD="
|
||||
win:
|
||||
cargo rustc --lib --release --locked ^
|
||||
--features c-api --crate-type staticlib ^
|
||||
%RUST_BUILD_STD% ^
|
||||
--target %RUST_TARGET% ^
|
||||
--config "target.%RUST_TARGET%.rustflags=['-C','target-feature=+crt-static']" ^
|
||||
-- --print native-static-libs
|
||||
mkdir out\\lib out\\include
|
||||
copy target\\%RUST_TARGET%\\release\\tlottie.lib out\\lib\\tlottie.lib
|
||||
copy include\\tlottie.h out\\include\\tlottie.h
|
||||
mac:
|
||||
export RUSTUP_HOME=$THIRDPARTY_DIR/rust/rustup
|
||||
export CARGO_HOME=$THIRDPARTY_DIR/rust/cargo
|
||||
export RUSTUP_TOOLCHAIN=""" + rustToolchain + """
|
||||
export PATH=$CARGO_HOME/bin:$PATH
|
||||
buildOneArch() {
|
||||
cargo rustc --lib --release --locked \\
|
||||
--features c-api --crate-type staticlib \\
|
||||
--target $1 \\
|
||||
-- --print native-static-libs
|
||||
}
|
||||
buildOneArch aarch64-apple-darwin
|
||||
buildOneArch x86_64-apple-darwin
|
||||
mkdir -p $USED_PREFIX/lib $USED_PREFIX/include/tlottie
|
||||
lipo -create target/aarch64-apple-darwin/release/libtlottie.a target/x86_64-apple-darwin/release/libtlottie.a -output $USED_PREFIX/lib/libtlottie.a
|
||||
cp include/tlottie.h $USED_PREFIX/include/tlottie/tlottie.h
|
||||
""")
|
||||
|
||||
if win:
|
||||
currentCodePage = subprocess.run('chcp', capture_output=True, shell=True, text=True, env=modifiedEnv).stdout.strip().split()[-1]
|
||||
subprocess.run('chcp 65001 > nul', shell=True, env=modifiedEnv)
|
||||
|
||||
Submodule Telegram/lib_lottie updated: 192a35ab14...46e0f003a1
2
cmake
2
cmake
Submodule cmake updated: 428f37a41f...5e21e7ac35
Reference in New Issue
Block a user