mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
Revert vcpkg ffmpeg (#8751)
* Revert "fix linux ffmpeg link, still link ffmpeg in hwcodec (#8747)" This reverts commit48464835f5. * Revert "fix linux armv7 ffmpeg arch, linux x64 sciter add hwcodec feature (#8744)" This reverts commitb68d7a3054. * Revert "arm linux remove cuda-llvm option (#8735)" This reverts commitbc672b3367. * Reapply "try fix arm64 linux ci and publish error log (#8730)" (#8732) This reverts commite283d33f28. * Revert "try fix arm64 linux ci and publish error log (#8730)" This reverts commita4565bf0da. * Revert "F-Droid: enable hwcodec for future builds (#8726)" This reverts commit188f85b042. * Revert "remove unused vcpkg ffmpeg code (#8725)" This reverts commit72c96f22b6. * Revert "install ffmpeg lib with vcpkg (#8724)" This reverts commit0143eaf601. * update hwcodec to reverted Signed-off-by: 21pages <sunboeasy@gmail.com> --------- Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -188,52 +188,6 @@ fn gen_vcpkg_package(package: &str, ffi_header: &str, generated: &str, regex: &s
|
||||
generate_bindings(&ffi_header, &includes, &ffi_rs, &exact_file, regex);
|
||||
}
|
||||
|
||||
// If you have problems installing ffmpeg, you can download $VCPKG_ROOT/installed from ci
|
||||
// Linux require link in hwcodec
|
||||
/*
|
||||
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);
|
||||
});
|
||||
if target_os == "windows" {
|
||||
println!("cargo:rustc-link-lib=static=libmfx");
|
||||
}
|
||||
|
||||
// os
|
||||
let dyn_libs: Vec<&str> = if target_os == "windows" {
|
||||
["User32", "bcrypt", "ole32", "advapi32"].to_vec()
|
||||
} else if target_os == "linux" {
|
||||
let mut v = ["va", "va-drm", "va-x11", "vdpau", "X11", "stdc++"].to_vec();
|
||||
if target_arch == "x86_64" {
|
||||
v.push("z");
|
||||
}
|
||||
v
|
||||
} else if target_os == "macos" || target_os == "ios" {
|
||||
["c++", "m"].to_vec()
|
||||
} else if target_os == "android" {
|
||||
["z", "m", "android", "atomic"].to_vec()
|
||||
} else {
|
||||
panic!("unsupported os");
|
||||
};
|
||||
dyn_libs
|
||||
.iter()
|
||||
.map(|lib| println!("cargo:rustc-link-lib={}", lib))
|
||||
.count();
|
||||
|
||||
if target_os == "macos" || target_os == "ios" {
|
||||
println!("cargo:rustc-link-lib=framework=CoreFoundation");
|
||||
println!("cargo:rustc-link-lib=framework=CoreVideo");
|
||||
println!("cargo:rustc-link-lib=framework=CoreMedia");
|
||||
println!("cargo:rustc-link-lib=framework=VideoToolbox");
|
||||
println!("cargo:rustc-link-lib=framework=AVFoundation");
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
fn main() {
|
||||
// note: all link symbol names in x86 (32-bit) are prefixed wth "_".
|
||||
// run "rustup show" to show current default toolchain, if it is stable-x86-pc-windows-msvc,
|
||||
@@ -250,7 +204,6 @@ fn main() {
|
||||
gen_vcpkg_package("libvpx", "vpx_ffi.h", "vpx_ffi.rs", "^[vV].*");
|
||||
gen_vcpkg_package("aom", "aom_ffi.h", "aom_ffi.rs", "^(aom|AOM|OBU|AV1).*");
|
||||
gen_vcpkg_package("libyuv", "yuv_ffi.h", "yuv_ffi.rs", ".*");
|
||||
// ffmpeg();
|
||||
|
||||
// there is problem with cfg(target_os) in build.rs, so use our workaround
|
||||
let target_os = std::env::var("CARGO_CFG_TARGET_OS").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user