mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-27 14:59:02 +08:00
fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
parent
9e931a6f04
commit
b68d7a3054
4
.github/workflows/flutter-build.yml
vendored
4
.github/workflows/flutter-build.yml
vendored
@ -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
|
||||
|
@ -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" {
|
||||
|
@ -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 "\
|
||||
|
@ -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": {
|
||||
|
Loading…
Reference in New Issue
Block a user