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 to run wix with additional extension #95

Closed
2ndTaleStudio opened this issue Feb 6, 2020 · 5 comments
Closed

Allow to run wix with additional extension #95

2ndTaleStudio opened this issue Feb 6, 2020 · 5 comments

Comments

@2ndTaleStudio
Copy link

Hi there,

currently the use of the WixUIExtension is hardcoded when compiling the wxs file. I'd appreciate if there could be an option passed to also allow the WixUtilExtension to be used for example.

Example: cargo wix --ext WixUtilExtension could be passed to call light.exe with the additional -ext attribute.

@2ndTaleStudio
Copy link
Author

Never mind...
I've seen this is already available. I only needed to add the corresponding namespace to the main.wxs file to get this WixUtilExtension to work

@volks73
Copy link
Owner

volks73 commented Feb 6, 2020

I am happy you found a resolution. Just to clarify because it is not called out specifically in the documentation: The WixUtilExtension is already included in the invocation of the compiler (candle.exe) and linker (light.exe) for the create/default subcommand. Add the namespace to the main.wxs enables the Intelisense in Visual Studio per the "How To: Use WiX Extensions" document.

I might re-open this because while there only appears to be the two WiX-developed extensions: (1) WixUI and (2) WixUtil, and there also appears to be no harm in always included these, there might be more in the future or custom ones created by developers specific for their projects that then would like to import into the compiler/linker. The -e,--compiler-extension and -E,--linker-extension options could be added to the create/default command. It is unclear to me the difference between a compiler and linker extension, but the WixUtil extension is only included in the linker while the WixUI is included in both, so there needs to be mechanism to include extensions in either or both the compiler and linker.

@volks73 volks73 reopened this Feb 6, 2020
@volks73
Copy link
Owner

volks73 commented Feb 6, 2020

I have created #96 to track adding documentation about inclusion of the various extensions

@volks73
Copy link
Owner

volks73 commented Feb 10, 2020

I think #97 is probably the better way to approach this, as implementing separate options for compiler and linker extensions seems like unnecessary re-implementation. Thus, I am going to close this.

@volks73 volks73 closed this as completed Feb 10, 2020
@volks73
Copy link
Owner

volks73 commented Feb 10, 2020

Just to close the loop on this, with #97 implemented as of 104b374, extensions can be added to the compiler (candle.exe) or linker (light.exe) using the -C and -L options, respectively. For example:

C:\Path\to\project> cargo wix -C -ext -C UserCompilerExtension1 -C -ext -C UserCompilerExtension2 -L -ext -L UserLinkerExtension

While I acknowledge this is a little verbose and clumsy, I am not sure how often this enhancement is needed and the extensions can be included using the [package.metadata.wix] section of the package's manifest with the compiler-args and linker-args fields, which are TOML arrays. For example,

[package.metadata.wix]
compiler-args = ["-ext", "UserCompilerExtension1", "-ext", "UserCompilerExtension2"]
linker-args = ["-ext", "UserLinkerExtension"]

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

2 participants