Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatically keeping WiX installer updated with newly created files

I have a web application solution existing under Visual Studio 2010. Part of this solution is a WiX Project responsible for generating a .msi installer.

I was reading through the WiX tutorial in an attempt to learn how to automatically harvest files when I encountered the following:

http://wix.tramontana.co.hu/tutorial/com-expression-syntax-miscellanea/components-of-a-different-color

A tool in WiX, Heat serves to harvest data from various sources (folders, files, DLLs, ActiveX controls, performance counters, web sites) where the number of entries might be too large to author the corresponding WiX source file manually. Its primary intention is to be run once, to collect the data to be used later in the usual maintenance of the source files, not to be part of a build environment where it is run on a changing set of input data over and over again. If you still want to use it in this second way, you have to be very careful to make sure that changes in the input don't introduce unwelcome effects (mostly breaking the component rules). Heat does have features that help you achieve this goal but be careful when using them.

It seems like I would like to not use its primary function, but the tutorial only teases me with hints about how to do what I would like to accomplish.

Is it really a poor idea to try and automatically maintain the files installed by a WiX installation? I'm tired of broken builds where someone has comitted a new file, but forgotten to update the WiX installers with a reference to that new file.

How are others handling this situation?

Thanks.

Re: teasing -- The tutorial states that 'Heat does have features that help you achieve this goal' but I can't find what features are being referenced. After harvesting a project -- what's next? Does heat become responsible for creating the .wxs file I will eventually use -- or am I supposed to just consume this list of files and build a more ful-featured .wxs file after the fact?

like image 850
Sean Anderson Avatar asked Dec 23 '11 01:12

Sean Anderson


2 Answers

I'm using Heat in my ASP.NET web application to automatically harvest all of the files for the application.

It works quite well. One thing is that each time it runs it generates a new ID for the files, and I believe this makes things a bit harder when doing upgrades. You would probably need to do an uninstall and then an install to get the newer files.

It has been a while since I looked into it and that could have changed though.

like image 120
Daniel Powell Avatar answered Nov 05 '22 03:11

Daniel Powell


There's a tool called Paraffin that fixes some of the shortcomings of Heat. It can, in particular, update file lists. Also see this Google groups thread for a discussion of this.

like image 33
Václav Slavík Avatar answered Nov 05 '22 05:11

Václav Slavík