Skip to content

Commit

Permalink
Manifests only work with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 18, 2024
1 parent 7f26f4d commit 7b0f509
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 18 deletions.
21 changes: 12 additions & 9 deletions crates/samples/windows-sys/task_dialog/build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
fn main() {
println!("cargo:rerun-if-changed=manifest.xml");
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");

println!(
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
std::path::Path::new("manifest.xml")
.canonicalize()
.unwrap()
.display()
);
if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc" {
println!("cargo:rerun-if-changed=manifest.xml");
println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");

println!(
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
std::path::Path::new("manifest.xml")
.canonicalize()
.unwrap()
.display()
);
}
}
21 changes: 12 additions & 9 deletions crates/samples/windows/task_dialog/build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
fn main() {
println!("cargo:rerun-if-changed=manifest.xml");
println!("cargo:rerun-if-changed=build.rs");
println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");

println!(
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
std::path::Path::new("manifest.xml")
.canonicalize()
.unwrap()
.display()
);
if std::env::var("CARGO_CFG_TARGET_ENV").unwrap() == "msvc" {
println!("cargo:rerun-if-changed=manifest.xml");
println!("cargo:rustc-link-arg-bins=/MANIFEST:EMBED");

println!(
"cargo:rustc-link-arg-bins=/MANIFESTINPUT:{}",
std::path::Path::new("manifest.xml")
.canonicalize()
.unwrap()
.display()
);
}
}

0 comments on commit 7b0f509

Please sign in to comment.