Using Heat.exe to smash face and inflict "Epic Pwnage" on painfully large installs
Expanding on Si's and
Robert-P's answers about heat.
Translation:
(Using heat to avoid typing individual files into the project by hand and for automating builds for an overall easier process.)
WiX 2.0 Heat Syntax detailed
For newer versions (not all that different from older versions but there are potentially annoying syntax changes....) go to the directory Heat is in from the cmd.exe and just type in heat but I have a example one right here for help with newer versions if needed.
Adding the following to your Build Event in visual studio 2010.
(Right Click Project->Properties ->Build Events-> Pre-Build Events)
$(WIX)bin\heat.exe" dir "$(EnviromentVariable)" -cg GroupVariable -gg -scom -sreg -sfrag -
srd -dr INSTALLLOCATION -var env.LogicPath -out "$(FragmentDir)\FileName.wxs
-gg
Generates Guids when heat is run(as in when you execute the command above)
-scom
Dont grab "COM files"
-sreg
Dont grab "Registry Files"
-sfrag
Dont grab "Fragments"
-srd
Dont grab the "root Dir"
dir
dir indicates you want Heat to look in a folder
"$(EnviromentVariable)"
The name of the variable you would add to the Preprocessor variables in the (Right click project, Go to properties) project properties->Build section where it says Define preprocessor variables (assumes visual studio 2010)
Example:
EnviromentVariable=C:\Project\bin\Debug;
No double quotes but end with a semicolon
-cg GroupVariable
The ComponentGroup that will be referenced from the fragment created to the main wxs file
FragmentDir
The fragment directory where the output wxs fragment will be stored
FileName.wxs
The the name of the file
Full tutorial here, So freakin helpful
Part 1
Part 2