How can I use heat.exe to include a constantly changing directory-tree?

so I have successfully used the WiX extension heat.exe to create static fragment of my directory tree I want to install using this tutorial (which is really great by the way!)...

but since its a huge project and there are constant changes being made as I write... it doesn't help much to have a static fragment which you would have to edit and include into the .wxs each time a change is made... I have searched the web yet not found anything useful on this matter... only the hint that using HeatDirectory Task and/or HeatDirectory Target could lead to a solution?

Is there anybody that has some more knowledge in this matter or has already solved a similar problem? I would greatly appreciate your help!

2

1 Answer

We have a WiX project in Visual Studio and we use a pre build step to create our .wxs files.

It creates a temp folder, copies all the files that we would like to have (in this case the result of a Publish action) and then calls heat with this directory and some other info as parameters.

call rd /s /q "$(ProjectDir)gatheredSetupFilesDir"
call md "$(ProjectDir)gatheredSetupFilesDir"
call xcopy "$(SolutionDir)..\ProjectDir\Published\*" "$(ProjectDir)gatheredSetupFilesDir" /S /Y
call "$(WIX)bin\heat.exe" dir "$(ProjectDir)gatheredSetupFilesDir" -cg ProjectComponents -dr INSTALLFOLDER -ag -srd -sfrag -scom -suid -sreg -var var.gatheredSetupFilesDir -out "$(ProjectDir)Includes\ProjectComponents.wxs"
2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

You Might Also Like