embed Windows PE resources (version info + app icon) - #30
Merged
Conversation
Embed a PE resource section into Windows builds via the winresource build dependency: version info (FileVersion/ProductVersion auto-derived from Cargo.toml; CompanyName "Project Hazelita", FileDescription "CLI client for Ret2Shell CTF Platform", Comments "YUME∞MITA" via [package.metadata.winresource]) and the application icon. Add assets/icon.ico (converted from assets/icon.png, sizes 256/128/64/48/32/16); the set_icon path resolves relative to the package root through the resource compiler's -I//I CARGO_MANIFEST_DIR include. Keep the version-info language neutral (default 0) so i18n can be added later without reworking the resource. Check CARGO_CFG_TARGET_OS at build-script runtime instead of cfg!(target_os), so resources are also embedded when cross-compiling from Linux/macOS; emit cargo:rerun-if-changed=assets/icon.ico so icon edits rebuild the resource. Verified: cargo check, clippy --all-targets -- -D warnings, cargo fmt --all --check, 75 unit tests, cargo package ships both icon files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Embed a PE resource section into Windows builds via the winresource build dependency: version info (FileVersion/ProductVersion auto-derived from Cargo.toml; CompanyName "Project Hazelita", FileDescription "CLI client for Ret2Shell CTF Platform", Comments "YUME∞MITA" via [package.metadata.winresource]) and the application icon.
Add assets/icon.ico (converted from assets/icon.png, sizes 256/128/64/48/32/16); the set_icon path resolves relative to the package root through the resource compiler's -I//I CARGO_MANIFEST_DIR include.
Keep the version-info language neutral (default 0) so i18n can be added later without reworking the resource.
Check CARGO_CFG_TARGET_OS at build-script runtime instead of cfg!(target_os), so resources are also embedded when cross-compiling from Linux/macOS; emit cargo:rerun-if-changed=assets/icon.ico so icon edits rebuild the resource.
Verified: cargo check, clippy --all-targets -- -D warnings, cargo fmt --all --check, 75 unit tests, cargo package ships both icon files.
据说会使用火的只有人类☝️
因为不怕火 文明才得以发展😤
是不是这个原因呢❓😚
在网络的各个角落每天都有人放火🤗
真是令人发笑呢🤣
只要有火种 之后就只需要看着🚬
提问✋😁
火种燃尽之后会怎么样呢😉
三3️⃣
二2️⃣
一1️⃣
时间到⏰⚡
正确答案是⭕📄
周围会燃烧起来🔥🔥🔥
像朋友 家人👪
那个 叫什么来着 新组建的🤔
对了😮
MewType 什么的🛸💥