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

Allow specifying additional WiX compiler options #5813

Merged
merged 4 commits into from May 3, 2021

Conversation

p120ph37
Copy link
Contributor

This is necessary to support certain customizations possible via #5752
For example, if you add a <util:CloseApplication/> tag to project.wxs, you must also specify some additional arguments to candle.exe and light.exe in order to include the appropriate extension DLLs.
This would also be useful if you have your own CustomAction DLLs that you need to link into your MSI.

@mmaietta
Copy link
Collaborator

Thanks for the work!

Would you be willing to add testing for this? Probs in: test/src/windows/msiTest.ts

@mmaietta mmaietta self-assigned this Apr 23, 2021
@p120ph37
Copy link
Contributor Author

p120ph37 commented Apr 27, 2021

@bryantb2
Copy link

This would be an amazing feature to have. I know lots of folks, myself included, take issue with the lack of .MSI customization in Electron. ETA on how long before this is merged up, documented, and released?

@p120ph37
Copy link
Contributor Author

p120ph37 commented Apr 28, 2021

@bryantb2 , you can see a basic usage example in the msiTest.ts diff on this PR. In that example, I use the msiProjectCreated hook to access the project.wxs file after it has been generated by electron-builder, but before it has been fed into WiX. I then use fs to modify the file, inserting some custom XML just before the </product> tag. This additional XML refers to a wix-util feature (I could have added the xmlns attribute to the root tag, but it was simpler to include it on the single tag I was adding), and I use the additionalWixArgs property to add the needed arguments for WiX to compile this modified XML properly. Hopefully the example there is useful enough for you to get started once this is released. As far as when it will get merged, and when the next release will happen, I'm not sure. @mmaietta seems to check and merge PRs once a week or so, and releases seem to happen every few months...

@bryantb2
Copy link

@p120ph37 Fantastic work! I will check this out.

@mmaietta mmaietta merged commit 4e2909c into electron-userland:master May 3, 2021
@mmaietta
Copy link
Collaborator

mmaietta commented May 3, 2021

Nice work!

Would you be willing to open a PR for adding content to the docs? It's on the docs branch of this repo
https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#documentation

@p120ph37
Copy link
Contributor Author

p120ph37 commented May 4, 2021

I'm not sure how to correctly add to the docs. It appears that a lot of the files in the docs branch contain autogenerated sections, which I assume are supposed to be produced via tsdoc or something - shouldn't the jsdoc/tsdoc comments I already created end up automatically pulled into the docs branch at some point? I did try pnpm run docs, and it seems to be broken right now... I guess that would explain why the docs site seems out-of-date compared to the comments in the source.

And yes, I cloned the docs branch into a /docs subdirectory before trying pnpm run docs, and it does seem to try to run - it just fails for a variety of reasons, including missing dev depencencies for source-map-support and path-sort, and it also seems to be trying to use jsdocs against documentation comments which contain TypeScript types, which should really be done with tsdocs instead, and I'm not really sure how the output of that is supposed to end up in those <!-- do not edit. start of generated block --> sections in the markdown...

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.

None yet

3 participants