Expand description
A build script to create, compile and include Windows resource and manifest files in your executables.
§Usage:
Inside build.rs
:
// Check if the target OS is Windows
if std::env::var("CARGO_CFG_WINDOWS").is_ok() {
use winscribe::ResBuilder;
use winscribe::manifest::{Manifest, Feature, DpiMode};
// Creates a resource with some info inferred from cargo environment variables
// Ex: version, name, description
// Same as calling: `ResBuilder::new().push(VersionInfo::from_env()?)`
ResBuilder::from_env()
.expect("Failed to create resource from environment!")
// Creates a manifest with DPI awareness set to Per-Monitor V2
.push(Manifest::from(Feature::DpiAware(DpiMode::PerMonitorV2)))
// Compiles and links the resource to the binary
.compile()
.expect("Failed to compile the resource file!");
}
Modules§
- icon
- Bitmap icon resource. (
ICON
) - manifest
- Application manifest resource. (
RT_MANIFEST
) - version_
info - Version-information resource. (
VERSIONINFO
)
Structs§
- ResBuilder
- Windows Resource file builder.