Unable to attach manifest
Hello!
I stumbled upon this project when trying to figure a way to get my silly CLI program to require for admin rights (that is needed to hole punch firewall, that is needed to use TFTP that changes the UDP port on the reply ACK..)
My build.rs is following:
fn main() {
if std::env::var_os("CARGO_CFG_WINDOWS").is_some() {
let mani = embed_manifest::new_manifest("SillyCorp.firmware_updater")
.requested_execution_level( embed_manifest::manifest::ExecutionLevel::RequireAdministrator );
embed_manifest::embed_manifest( mani ).expect("unable to embed manifest file");
}
println!("cargo:rerun-if-changed=build.rs");
}
And the build looks like (pasted below) - and to me it looks like its at least trying to include it properly. However, when executing/checking the file it looks like plain file. Any ideas what could go wrong?
Thanks, Pauli
sillycorp@DESKTOP-GFFV3MV MINGW64 ~/my-rust-test-001
$ cargo build --verbose
Fresh autocfg v1.1.0
Fresh embed-manifest v1.3.1
Fresh winapi-x86_64-pc-windows-gnu v0.4.0
Fresh num-traits v0.2.15
Fresh libc v0.2.139
Compiling rust-try-001 v0.1.0 (C:\msys64\home\sillycorp\my-rust-test-001)
Fresh winapi v0.3.9
Fresh num-integer v0.1.45
Running `rustc --crate-name build_script_build --edition=2021 build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=20ccefdcb6a9d115 -C extra-filename=-20ccefdcb6a9d115 --out-dir 'C:\msys64\home\sillycorp\my-rust-test-001\target\debug\build\rust-try-001-20ccefdcb6a9d115' -C 'incremental=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\incremental' -L 'dependency=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\deps' --extern 'embed_manifest=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\deps\libembed_manifest-a091b31e256d2c22.rlib'`
Fresh iana-time-zone v0.1.53
Fresh time v0.1.45
Fresh chrono v0.4.23
Running `C:\msys64\home\sillycorp\my-rust-test-001\target\debug\build\rust-try-001-20ccefdcb6a9d115\build-script-build`
Running `rustc --crate-name rust_try_001 --edition=2021 'src\main.rs' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=b754c22221d0bddf -C extra-filename=-b754c22221d0bddf --out-dir 'C:\msys64\home\sillycorp\my-rust-test-001\target\debug\deps' -C 'incremental=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\incremental' -L 'dependency=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\deps' --extern 'chrono=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\deps\libchrono-bcf3c7e24052d575.rlib' -C 'link-arg=C:\msys64\home\sillycorp\my-rust-test-001\target\debug\build\rust-try-001-768d308457bd6981\out\embed-manifest.o' -L 'native=C:\Users\sillycorp\.cargo\registry\src\github.com-1ecc6299db9ec823\winapi-x86_64-pc-windows-gnu-0.4.0\lib'`
Finished dev [unoptimized + debuginfo] target(s) in 8.20s