PDA

View Full Version : Create Project From WiX Files


emuniz
01-09-2009, 10:32 AM
The real benefit of WiX for our needs is the ability to easily wire it into our automated build process and the fact that WiX itself is free. However, this makes the process a little clunky for us with MSI factory. Right now we have to keep the MSI Factory project in source control along with the WiX files. We'd rather not incur a build dependency on the MSI Factory executable so we have to have the WiX files in source control. So, we check out the MSI Factory project then we check out the WiX files then we edit the project, generate the WiX files and check everything back in. What would be ideal would be if we could generate the WiX files put just them in source control and then when we need to change them, check them out and 'import' them into MSI Factory to create a project for that editing session (we could discard the project after regenerating the WiX files). This way, the WiX files are the authoritative source for the content of the MSI. We could even make small changes to the WiX files by hand w/o having to use MSI Factory and then when we need to do something significant that required MSI Factory it would pull in those changes. At the moment we have to use MSI Factory even if all we're doing is something really incidental because otherwise the MSI Factory project and the WiX files will be out of sync.

Lorne
01-09-2009, 11:09 AM
Although the MSI Factory project files are not directly WiX compatible, they are also in XML format, so for small changes it should be possible to edit the MSI Factory project files directly without loading the design environment. You might want to consider altering your workflow in some cases so you edit the MSI Factory project files directly instead of editing the WiX files. You'd have to be careful with your changes, of course.

Another possibility is to bring your WiX edits into the MSI Factory project as WiX fragments. This allows you to basically "insert" your WiX into the build stream. The fragments wouldn't be editable within the MSI Factory design environment -- you'd have to always edit those WiX files by hand -- but you wouldn't need to make any changes to the MSI Factory project whenever you edited those WiX fragment files.

You can add Fragments from Build > Settings > Fragments. You can even specify a list of insertions to be made in the main wxs file that MSI Factory generates during the build, in order to integrate your fragments into the wxs. (The insertions support very advanced XML pathing abilities, see the help topic for details.)