Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
editpe
Resource editor for portable executables.
Enables cross-platform parsing and modification of Windows executables and their resources.
Features
- Parsing and modification of portable executables
- Resource editing including icons, manifests, version info and more
- Resource transfer between files
Compared to other resource editors like rcedit, editpe takes great care to keep the modified executable in a valid state. It does this by parsing and rebuilding the complete resource directory as well as all file and section headers, keeping existing sections intact, and leaving any additional data at the end of the file in place.
Usage
Library
Add editpe as a dependency. Support for converting and resizing images in other formats when setting icons is provided by the image crate.
= "0.2"
= "*" # to support additional icon file types
The std and images features are enabled by default and can be disabled for no-std support.
Examples
Adding an icon or manifest to an executable
let mut image = parse_file?;
let mut resources = image.resource_directory.cloned.unwrap_or_default;
resources.set_main_icon_file?;
let manifest = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>";
resources.set_manifest?;
image.set_resource_directory?;
image.write_file;
Transferring resources between executables
let source = parse_file?;
let resources = image.resource_directory?;
let mut target = parse_file?;
target.set_resource_directory?;
target.write_file;
See the tests for other usage examples.
Note that packed executables (like packed with UPX) might not allow resource replacement. Edit the resources before packing if required.