fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages 2024-07-17 22:37:05 +08:00 committed by GitHub
parent 9e931a6f04
commit b68d7a3054
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 14 additions and 8 deletions

View File

@ -1297,6 +1297,7 @@ jobs:
deb_arch: amd64,
sciter_arch: x64,
vcpkg-triplet: x64-linux,
extra_features: ",hwcodec",
}
- {
arch: armv7,
@ -1306,6 +1307,7 @@ jobs:
deb_arch: armhf,
sciter_arch: arm32,
vcpkg-triplet: arm-linux,
extra_features: "",
}
steps:
- name: Export GitHub Actions cache environment variables
@ -1436,7 +1438,7 @@ jobs:
python3 ./res/inline-sciter.py
export VCPKG_ROOT=/opt/artifacts/vcpkg
export CARGO_INCREMENTAL=0
cargo build --features inline --release --bins --jobs 1
cargo build --features inline${{ matrix.job.extra_features }} --release --bins --jobs 1
# package
mkdir -p ./Release
mv ./target/release/rustdesk ./Release/rustdesk

View File

@ -192,6 +192,7 @@ fn gen_vcpkg_package(package: &str, ffi_header: &str, generated: &str, regex: &s
fn ffmpeg() {
// ffmpeg
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let static_libs = vec!["avcodec", "avutil", "avformat"];
static_libs.iter().for_each(|lib| {
find_package(lib);
@ -201,8 +202,6 @@ fn ffmpeg() {
}
// os
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
let target_arch = std::env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let dyn_libs: Vec<&str> = if target_os == "windows" {
["User32", "bcrypt", "ole32", "advapi32"].to_vec()
} else if target_os == "linux" {

View File

@ -102,6 +102,10 @@ if(VCPKG_TARGET_IS_LINUX)
string(APPEND OPTIONS "\
--target-os=linux \
--enable-pthreads \
")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "arm")
else()
string(APPEND OPTIONS "\
--enable-cuda \
--enable-ffnvcodec \
--enable-encoder=h264_nvenc \
@ -116,10 +120,11 @@ if(VCPKG_TARGET_IS_LINUX)
--enable-encoder=h264_vaapi \
--enable-encoder=hevc_vaapi \
")
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
string(APPEND OPTIONS "\
--enable-cuda_llvm \
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
string(APPEND OPTIONS "\
--enable-cuda_llvm \
")
endif()
endif()
elseif(VCPKG_TARGET_IS_WINDOWS)
string(APPEND OPTIONS "\

View File

@ -69,12 +69,12 @@
"platform": "(windows & static)"
}
],
"platform": "((windows | linux | osx) & static)"
"platform": "((windows | (linux & !arm32) | osx) & static)"
},
{
"name": "ffmpeg",
"host": false,
"platform": "((android | ios) & static)"
"platform": "((android | ios | (linux & arm32)) & static)"
}
],
"vcpkg-configuration": {