Skip to content

feat(rvpm): embed icons in Windows executables - #883

Merged
martian56 merged 1 commit into
mainfrom
agent/windows-executable-icon
Jul 14, 2026
Merged

martian56 merged 1 commit into
mainfrom
agent/windows-executable-icon

Conversation

@martian56

@martian56 martian56 commented Jul 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • reuse [dist.windows].icon for the executable produced by rvpm build
  • compile .ico files with Windows SDK rc.exe on MSVC or MinGW-w64 windres on GNU
  • link the generated resource through Raven's existing native input pipeline
  • retain the same icon for the Inno installer

Validation

  • cargo fmt --check
  • cargo clippy --workspace --all-targets
  • cargo test --workspace
  • Windows acceptance test loads the linked PE and verifies its RT_GROUP_ICON resource

Fixes #872

Summary by CodeRabbit

  • New Features

    • Windows builds now embed the configured .ico file directly into the generated executable.
    • The same icon is used for both the application executable and the Inno Setup installer.
  • Documentation

    • Clarified how the Windows icon setting affects generated executables and installers.
    • Updated native linking documentation to describe supported link inputs.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 52fb86ca-cea3-48dd-8812-405c99c86006

📥 Commits

Reviewing files that changed from the base of the PR and between 3758087 and f53abdd.

📒 Files selected for processing (6)
  • docs/v2/specs/rvpm-dist.md
  • src/codegen/linker.rs
  • src/driver/mod.rs
  • src/manifest/mod.rs
  • src/ops/mod.rs
  • tests/rvpm_build.rs

📝 Walkthrough

Walkthrough

Adds support for embedding the configured [dist.windows].icon into Windows executables during native linking, supports MSVC and GNU resource compilers, updates related documentation, and adds a Windows acceptance test.

Changes

Windows icon embedding

Layer / File(s) Summary
Icon configuration contract
src/manifest/mod.rs, docs/v2/specs/rvpm-dist.md, src/codegen/linker.rs
Documents [dist.windows].icon as both an embedded executable icon and an Inno Setup installer icon, and updates native-link terminology.
Windows resource compilation
src/codegen/linker.rs
Adds ICO validation, resource-script generation, MSVC rc.exe and GNU windres selection, compiler execution, and output validation.
Build integration and validation
src/ops/mod.rs, src/driver/mod.rs, tests/rvpm_build.rs
Adds the compiled icon resource to Windows native link inputs and verifies the generated executable contains an RT_GROUP_ICON resource.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant rvpm_build
  participant gather_native_link
  participant compile_windows_icon
  participant WindowsResourceCompiler
  participant WindowsExecutable
  rvpm_build->>gather_native_link: gather native link inputs
  gather_native_link->>compile_windows_icon: compile configured ICO
  compile_windows_icon->>WindowsResourceCompiler: invoke rc.exe or windres
  WindowsResourceCompiler-->>compile_windows_icon: return resource artifact
  compile_windows_icon-->>gather_native_link: append resource input
  gather_native_link->>WindowsExecutable: link native inputs
Loading

Possibly related PRs

  • martian56/raven#858: Adds the manifest schema that supplies the Windows distribution icon used by this embedding flow.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent/windows-executable-icon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@martian56 martian56 self-assigned this Jul 14, 2026
@martian56
martian56 marked this pull request as ready for review July 14, 2026 07:47
@martian56
martian56 merged commit 8e70959 into main Jul 14, 2026
6 checks passed
@martian56
martian56 deleted the agent/windows-executable-icon branch July 14, 2026 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No way to embed a Windows executable icon when building with rvpm

1 participant