Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a whole directory or project output to WiX package

We decided to switch from VS integrated setup to WiX.

However, what we currently do is use projects output files as the input for the setup project. This lets us easily add Application Files to a directory (for images, samples, and other resources...) and those files are automatically added to the setup when we build.

I could not find any similar feature in WiX. WiX seems to require one Directory entry and one File entry for each and every directory and file. This would require us to change the WiX source everytime a file is added which, to my eyes, is prohibitive since we have so many of them.

Is there any integrated way of doing that with WiX or do I have to write my own task that will create a WiX source before calling candle?

like image 637
Coincoin Avatar asked Jan 05 '09 22:01

Coincoin


2 Answers

For WiX 2.0, tallow is very limited; paraffin and mallow offer additional functionality. For WiX 3.0, heat offers the same functionnality as tallow, a little bit better.

In my case I've used mallow source and modified a bit and used it, because paraffin needs 3.5 version of .Net.

You can use Mallow

or Paraffin tool to generate WiX fragments: Getting started, The pain of WiX, A better tallow, Paraffin, Download, Paraffin for WiX 3.0

like image 160
sundar venugopal Avatar answered Sep 22 '22 10:09

sundar venugopal


I've been using heat.exe in WIX 3.5 just for that purpose. Last time I checked though, the documentation wasn't up-to-date with 3.5 release so keep that in mind.

Here is an example:

"$(WIX)bin\heat.exe" dir "$(SourcePath)" -cg MyFiles -gg -scom -sreg -sfrag -dr INSTALLDIR -out "$(ProjectDir)Fragments\FileFragment.wxs" -var wix.InstallerPath

like image 43
stankovski Avatar answered Sep 23 '22 10:09

stankovski