mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Use downloaded plist.h
This commit is contained in:
12
ffi/build.rs
12
ffi/build.rs
@@ -12,10 +12,20 @@ fn main() {
|
||||
)
|
||||
.with_language(cbindgen::Language::C)
|
||||
.with_sys_include("sys/socket.h")
|
||||
.with_sys_include("plist/plist.h")
|
||||
.with_include("plist.h")
|
||||
.generate()
|
||||
.expect("Unable to generate bindings")
|
||||
.write_to_file("idevice.h");
|
||||
|
||||
// download plist.h
|
||||
let h = ureq::get("https://raw.githubusercontent.com/libimobiledevice/libplist/refs/heads/master/include/plist/plist.h")
|
||||
.call()
|
||||
.expect("failed to download plist.h");
|
||||
let h = h
|
||||
.into_body()
|
||||
.read_to_string()
|
||||
.expect("failed to get string content");
|
||||
std::fs::write("plist.h", h).expect("failed to save to string");
|
||||
|
||||
println!("cargo:rustc-link-arg=-lplist-2.0");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user