问题
I am working on a WPF project. I have created a Wix project which runs along with the main project and has a program.cs component as well as the XML file.
Although I can see it creates the installer upon re-building the project, what is not clear to me is that why don't I have the actual WPF project inside it or as part of it. So really I don't install anything when I run it. Simply a shell program.cs file which is part of the Wix project.
I don't get the actual project at all. So how do I effectively "add" the WPF project to the WiX project so it generates the .exe or .msi file.
When I used the Windows native build project, I was able to get this however it is really tedious.
Thanks, Ibrahim
回答1:
Most of understanding how WiX works is understanding how Windows Installer works. WiX is mainly a language and compiler to author and build Windows Installer (.MSI) database files. It does have some additional extensions and the ability to create a bootstrappper / chainer (.EXE) and that is additional tech to understand.
MSI and therefore WiX should be thought of in terms of declarative programming rather then imperative. You describe the product, the UI experience, the feature/component/resources relationships or the "what" needs to be installed and MSI handles the "how" to install it.
回答2:
WiX newbie here too. I found that this tutorial to be helpful to get started: Create a simple setup. It walks you through creating a new WiX project in the Visual Studio. It creates a really simple installer (e.g. doesn't even add a shortcut to the Start Menu), but I think it will help with your understanding of how WiX works.
After you get the above example working, I'd suggest reading through this tutorial: How To: Create a Shortcut on the Start Menu. Note: I found that it was easier to copy/paste the entire code sample at the bottom of the page, replace everything in the default Product.wxs file in the WiX Visual Studio Project, and then replace references to your own files as needed.
来源:https://stackoverflow.com/questions/65801042/really-struggling-to-get-how-wix-works