mansellan / clickonce

ClickOnce packager
Other
26 stars 7 forks source link

Allow manifest merging #23

Open mansellan opened 4 years ago

mansellan commented 4 years ago

ClickOnce does some magic with manifests. In Visual Studio, if a project is configured to use an embedded manifest, the publish system intercepts it, merges some of it with the ClickOnce manifest it is creating, then suppresses it from being embedded in the executable.

As this project works with compiled files, this approach is not possible. Indeed, if an executable with an embedded manifest is packaged, it will likely fail to install as there is likely to be a mismatch between the embedded and external application identities.

To solve for this, the entry point should be examined for an embedded manifest. If one is found, its contents should be merged with the ClickOnce manifest and then the embedded manifest should be removed. This is likely non-trivial, and would also break any executables that incorporate tamper detection :/

On the way to a full solution, perhaps the embedded manifest could be detected and fail the package with an error.

motisoft commented 1 year ago

I have a project that uses a combination of mage.exe and custom merging of manifests created with mt.exe for creating reg free com manifests from rgs files, your project helped me with some problems with the process so i could maybe help here and #16 when I'm done.