Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract Icon Resources from PE Files #4340

Open
wixbot opened this issue Mar 5, 2014 · 8 comments
Open

Extract Icon Resources from PE Files #4340

wixbot opened this issue Mar 5, 2014 · 8 comments

Comments

@wixbot
Copy link

wixbot commented Mar 5, 2014

A recent question on stack overflow centered around MSI bloat as an EXE was being included twice when the developer expected it only once (smartcabbing). The bloat was from the Icon table. It would be nice if the Icon element had an optional IconIndex attribute that if present would cause WiX to extract the icon resource during the build and use that as it's source path instead of the primary source path. FWIW, InstallShield does this as it's icon table is Name, Data, ISBuildSourcePath and ISIconIndex where the last two columns are removed from the final MSI.

Originally opened by chrpai

@wixbot
Copy link
Author

wixbot commented Mar 6, 2014

Hello
I have simple shortcut with icon declared in following way:

<Component Id="my.exe" Guid="MY-GUID">
    <File Id="my.exe" Source="$(var.Project.TargetPath)" KeyPath="yes">
      <Shortcut Id="MyShortcut" Directory="ApplicationMenuFolder" Name="My App" WorkingDirectory="ApplicationRootFolder" Icon="my.exe" IconIndex="0"  Advertise="yes">
        <Icon Id="my.exe"  SourceFile="$(var.Project.TargetPath)" />
      </Shortcut>
    </File>
 </Component>

What I'm expecting is adding exe once to msi, but it is added twice, because of Icon Table.

Originally posted by msmolka

@wixbot
Copy link
Author

wixbot commented Mar 13, 2014

Area set to compiler
Release set to v3.x

@wixbot wixbot added this to the v3.x milestone Dec 20, 2015
@chrpai
Copy link

chrpai commented Nov 23, 2023

@robmen @barnson any chance we can do this in v5? I'd suggest an optional attribute like IconIndex that tells wix to extract that resource and place it in the table instead of the actual file. This would be very helpful for IsWiX as I could author a browse/preview in the designer and then author the XML accordingly.

@barnson
Copy link
Member

barnson commented Nov 23, 2023

No, I'm full up for WiX v5.

@chrpai
Copy link

chrpai commented Nov 23, 2023

I'm you actively against such a feature? Assign it to me and I could give it a try. This is a high value feature to me so I'd be willing to fund it if someone wante to give me a price.

@barnson
Copy link
Member

barnson commented Nov 23, 2023

No, but there's overlap with the ARP feature that would need to be address in the WIP.

@chrpai
Copy link

chrpai commented Nov 23, 2023

What/where is the ARP feature? Is that basically the same type of situation but instead of referenced by a shortcut its referenced by ARPPRODUCTICON? If so I can imagine a couple possible paths:

  1. Introduce a new attribute (resource id) and if found extract the resource and stream that into the Icon table.

  2. Auto detect the file type and automatically extract icon 0 and stream that in or stream the file as is.

  3. Other?

@barnson
Copy link
Member

barnson commented Nov 24, 2023

Strongly-typed authoring for product registration.

@chrpai chrpai removed their assignment Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants