Washi1337 / AsmResolver

A library for creating, reading and editing PE files and .NET modules.
https://docs.washi.dev/asmresolver/
MIT License
848 stars 127 forks source link

Allow language identifiers to be customized and preserved in `IconResource` #533

Closed Washi1337 closed 3 months ago

Washi1337 commented 6 months ago

Problem Description

Currently, IconResource::WriteToDirectory always constructs resource directories with the language identifier 1033.

Proposal

Add Lcid properties to the classes related to icon resources, similar to how is done in VersionInfoResource (see #457).

Alternatives

None

Additional Context

No response

caesay commented 6 months ago

I'm attempting to replace rcedit in Velopack so I can set PE resources while running on Linux, I think this should be classified as a bug rather than an enhancement. This and #532 are the current blockers.

Washi1337 commented 3 months ago

Initial rework of IconResource can be found in PR #565, which should support LCID customization.

Washi1337 commented 3 months ago

I'm attempting to replace rcedit in Velopack so I can set PE resources while running on Linux, I think this should be classified as a bug rather than an enhancement. This and https://github.com/Washi1337/AsmResolver/issues/532 are the current blockers.

@caesay Sorry for the very late reply, I must have missed the notification for this. It depends on whether you simply need to copy over resources from one PE to another or actually have rich editing where you need full interpretation and reconstruction of the resource data. Copying over is already fully supported (by simply copying the directories in PEImage::Resources). This issue only refers to the latter scenario.

caesay commented 3 months ago

No worries, I am doing rich editing (eg. setting a new icon, re-creating custom version tables) and I managed to find a workaround in the meantime. Thanks for your work on this awesome library!