-
Notifications
You must be signed in to change notification settings - Fork 25
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
WiX V4 support #174
Comments
Good question! I have been distracted with other projects, so I was not aware of WiX v4 and the major change. I have been thinking about a "major new version" for this project for a while, a "Beta-4" or v0.4. There are several things I think could be done better, like workspaces and handling the CRT issue (which may no longer really be an issue). I have just never been sure how much of a rewrite this new version would be. Maybe the next "major version" of this project can target WiX v4, which would require some significant rewriting to support? The However, I could also see rewriting to support both WiX v3 and v4 and maybe there was some way to automatically detect which version is installed/available? A clean slate implementation as a separate None of this answers your questions. I am open to recommendations and would like to hear suggestions on how to move forward with WiX v4. |
WiX v4 has now been released. The release notes are here and there is also some documentation about upgrading from v3 to v4. I haven't really checked everything that has changed, but I think the following changes affect
If you would like to support both versions, there is probably some way to detect for which WiX version Another option could be to continue with the same |
Started experimenting with v4 support in https://github.com/roblabla/cargo-wix/tree/v4 . I think I got most of it working. Here's a braindump: Main difference was dropping It's possible to detect whether the provided template is v3/v4 just by looking at the namespace of the top-level IMO, it's better to have a separate Auto-conversion through |
Interesting! Thank you for experimenting and looking into wix4. I have not had a chance to look at wix4 at all since it was released. Is it possible to have both wix3 and wix4 binaries installed at the same time? I think this would ultimately answer the question of a separate However, I would actually think about renaming this project to The bit about the auto convert and its silent failing is annoying and frustrating. I would equate wix3 vs wix4 to the Python 2 vs 3 change that occurred a while ago in the Python world. It really is a major break. At least the namespace is different and can be used to detect the version. |
Yes, I currently have both versions installed and there's no issue. Wix4 is installed via |
Hi, I understand that this is a major change of the project. However since cargo-wix is the only project to create msi installer for rust applications and the last wix3 (version 3.11.2) was released almost 4 years ago, I believe we need more clarity. Are we talking about we are near to support V4 in couple of months, or we need to do a major rearchitecture with no timelines? I am relatively new to rust (but seasoned developer) so, probably can not help in the second case. However I desperately need a Windows installer solution for my current project and rather not go through the Wix3 route if possible. (Still scared from dealing with customers who have waited too long to migrate .net 4.8 to core) I can test the beta versions of the new project if you are in the first case. |
@erenturkm There hasn't been much movement. There's no real rush to migrate to wix4 - it's still a relatively new piece of software that's likely to have a lot of rough edges (see for instance the whole I've been meaning to move to wix4 at $WORK so I can properly test-drive the fork on a real codebase, but time's been short. I can't promise any timeline here. Unless you need a feature in Wix4, I really recommend sticking to Wix3 for now. A lot of the information about Wix you can find online is incompatible with Wix4, and writing installers is hard enough as-is without the additional hurdle of having to understand the differences between the two... |
I have not had capacity to look too deep into wix4. @roblabla has done an excellent job starting the ball rolling for wix4 support. I defer to roblabla for the immediate future on all things wix4, and I agree with roblabla. There is nothing wrong with WiX v3 and WiX v4 is still very new. I would like to add/mention, it is possible to create an installer for a Rust project without this subcommand. This subcommand is really just a wrapper around the WiX v3 tools that "maps" the project's manifest file to the XML schema of the WiX v3 There is nothing special about a Rust project for creating MSIs. MSIs are an extra or separate publishing step. NSIS, Innosetup, InstallShield, and WiX are all tools that could be used to create installers. All of these tools could be used with a Rust project. WiX was just the easiest (for me) to use, learn, and wrap as a subcommand. |
I was looking into what it would take to support wix4. It's actually not too bad but there are some gotchas.
Finally the command turns into this:
However, without
After adding this to the .wxs file manually the build command will work and an msi will be created. My takeaways are:
@volks73 would you be open to PR's that add some level of support for wix4? |
@juliusl Thank you for the investigation into WiX4 support. The information and summary are greatly appreciated. I would be open to PR's that add support for WiX4. |
WiX is currently in the process of releasing a new version, WiX V4. Its API will be totally incompatible with the current WiX version (it will have only a single command called
wix
that combinescandle
,burn
, etc... - and there are also various breaking changes to the XML).Will
cargo-wix
try to support WiX V4? Or should a newcargo-wix4
project be created, dedicated to WiX v4 support?The text was updated successfully, but these errors were encountered: