I am new to WIX and trying to create a WIX for my Web application.
I have run heat.exe as PreBuild Event of Installer setup project.
"C:\Program Files (x86)\WiX Toolset v3.7\bin\heat.exe" dir "$(Wixdest)" -cg BUDirect -gg -scom -sreg -sfrag -srd -dr INSTALLLOCATION -var env.Wixdest -out "C:\Workspaces\Chatra\BUFragment.wxs"
The BUfragment.wxs is created as specified above and reference structure of all dll,xml,pdb is seen in BUfragment.wxs after compile; and CAB and MSI package is created in Bin\Release folder.
But when i try to see into Cab non of the files related to Web application or TARGETDIR are not their.
What could have been gone wrong and any idea if am I missing some configuration settings?
Have you added the <ComponentGroupRef Id="BUDirect" /> created in the BUFragment.wxs into a feature?
Fragments are only included within the build when you reference one of the elements within the fragment.
Related
I am new to Wix Toolkit. I am creating an .msi for a console application. Below is my one of my line which is generated using heat command :
<Component Id="cmp2B116558C64AF876AD223372FA4B8DFF" Directory="dir99DE416F55C8960850D5A4FCA3758AD4" Guid="PUT-GUID-HERE">
<File Id="fil19E0EEE3E5D0208523116CAFE9E9B06E" KeyPath="yes" Source="$(var.SourceDir)\App.config" />
</Component>
I just need that PUT-GUID-HERE to be get set automatically. Is there anything that i need to change in my heat command. Below is my heat command which i am using.
heat dir "C:\Users\rp5026921\Documents\Project\Automation Testing\SourceCode\MeridianAutomation\bin\Release" -cg ComponentsGroup -out "C:\Users\rp5026921\Documents\Project\Automation Testing\SourceCode\MeridianAutomationSetUp\MeridianAutomationComponents.wxs" –gg
One more issue is that, i am having app.config in my console application. In that i need to change certain values after installing the .msi. But after installation when i go inside the folder its not allowing me to edit the app.config file.
You are using the right command line option but just move the "-gg" before the "-out" command line option as shown below.
-gg : Generate guids now. All components are given a guid when heat is run.
-ag : Auto generate component guids at compile time, e.g. set Guid="*".
heat dir "C:\Users\rp5026921\Documents\Project\Automation Testing\SourceCode\MeridianAutomation\bin\Release" -cg ComponentsGroup -gg -out "C:\Users\rp5026921\Documents\Project\Automation Testing\SourceCode\MeridianAutomationSetUp\MeridianAutomationComponents.wxs"
I have a Compressed file (Self-extracting) that was included as a ExePackage for the current BootStrapper project I'm working on.
I was asked to Unzip the package before including it in the BootStrapper, so that the end user doesn't have to unzip the file before starting the install process of that package.
Excluding the install application, there is two folders (win32 && win64) that contain 288 files each, I need to create a PayloadGroup out of these files. I started doing this by hand, but after looking at Heat element, I saw that Heat can generate Payloadgroup.
How can I harvest from the directories the Payloadgroup that is required for this package.
Doing this manually is a very long process ...
If using Visual Studio you're supposed to be able to go in your setup project's references and click on the reference in question and set Harvest to true.
If I recall this had some issues, and some online sources said it wasn't working for them, I'm not sure at the moment. Which is why I called heat from the command line in a post-build event. Something like this:
call "$(WIX)bin\heat.exe" dir "$(TargetDir)." -var var.$(ProjectName).TargetDir -dr INSTALLFOLDER -cg Binaries -gg -g1 -ag -scom -sreg -sfrag -srd -o "$(SolutionDir)Setup$(ProjectName)\$(ProjectName).Binaries.wxs"
You can even specify an XSLT transform that filters your generated wxs file. For more info check this helpful blog post
I implemented heat.exe dir -generate payloadgroup in v4.0 (https://github.com/wixtoolset/issues/issues/3470). In v3.x, the -generate option was only supported by project harvesting (heat.exe project ...).
need to add Files.wxs file in to Product.wxs file
i added the using include command(include Files.wxs)
this gives and error
Error 1 The Wix element contains an unsupported extension element 'Include'. The Wix element does not currently support extension elements. Is the Include element using the correct XML namespace?
added this for create buldevents
"$(WixToolPath)heat.exe" dir "project path" -var var.SourceDir -gg -sfrag -scom -sreg -suid -t "$(ProjectDir)TransformDirectoryToWix.xslt" -out "$(ProjectDir)Files.wxs
any way to solve this?
Something seems fishy here.
You use include for other WXI files. You don't need to include wxs files with each other.
If you want to reference element that resides in another wxs file, you set ID's and use: DirectoryRef, ComponentRef, ComponentGroupRef, etc..
Check out ComponentGroupRef: http://chriseelmaa.com/harvesting-files-with-wix-heat/
So I am using Wix to install my application, it works great and does everything that I need. The one issue I am having now is this. I am using the following command line argument in my VS 2010 Pre-build Event command:
heat.exe dir "C:\My Main Folder" -cg MyApplication -gg -scom -sreg -sfrag -dr APPLICATIONROOTDIRECTORY -var var.MyApplication -out "..\..\MyApplication.wxs"
My issue is that the .wxs file that is generated gives me the following folder structure:
<Fragment>
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
<Directory Id="dirB19DCB4311BD6C765579FE56A2C72DF8" Name="My Main Folder">
My question is if there is a way to pass in an argument that could change the name of the "My Main Folder" directory, because as of right now I am changing it manually but this is extremely inefficant and makes it so that we cannot have an automated build process. If anyone has any suggestions or places I could look that would be great! Right now I am leveraging the "WiX: A Developer's Guid to Windows Installer XML" book to try and find a solution but am not finding anything.
Depending on exactly what you are aiming to do, I would be tempted to use -srd to suppress the generation of the root directory and then change the -dr parameter to point at the directory with the correct name.
Other than that, I think the only other simple option is probably an XSL transform, which you can use by specifying the -t parameter.
As ChrisPatrick suggested you can use the -srd to suppress the generation of the root directory and use your own with -dr.
heat.exe dir "C:\My Main Folder" -srd -dr "DIRNAMEHERE"
You can find more information here, heat documentation
I have recently converted visual studio setup projects to wix project. Everything great, except that you have to ist every file manually. Is there something similar to adding project output (VS studio setup project). I read something about HeatProject task but don't know how to use it, could not find any documentation or example of the same.First question,is it possible to add project output instead of adding files one by one if yes then how?
Heat offers same functionality like tallow, or paraffin. Paraffin will generate .wxs fragment file containing list of all files which will be deployed. Using parameters you can set which files you want and more.
Example
%1\Paraffin.exe -dir "..\..\..\..\Web\HostDir" -dirref INSTALLLOC -custom APPL ..\..\WebFragment.wxs -guids -ext .csproj -direXclude obj -multiple
We use heat.exe to harvest our app files as follows. The %FULL_PUBLISH_PATH% is the full path to the directory that we instructed msbuild to publish the webapp to.
"%WIX_TOOLS_PATH%heat.exe" dir %FULL_PUBLISH_PATH% -dr WEBAPPLOC -ke -srd -cg ComponentNameToUse -var var.publishDir -gg -out FileNameToUse.wxs