0

I am working on Wix Toolset set up project. I need to add files to my installer package. There are so many dll and I am including them individually.

<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
    <Component Id="MyApplication" Guid="53BF1BB4-FEC5-4D6C-AEA3-2D7DE0021695">
        <File Id="MyApplication" Source= "$(var.ServiceAppSourceDir)\MyApp.dll" KeyPath="yes" Checksum="yes"/>
    </Component>
    <Component Id="ExampleFile" Guid="5C7CF06D-420E-44E0-91EC-DE8D55D1E6E8">
        <File Id="ExampleFile" Source="$(var.ServiceAppSourceDir)\ExampleFile.dll" KeyPath="yes" Checksum="yes"/>
    </Component>
</DirectoryRef>

<Feature Id="MainApplication" Title="Main Application" Level="1">
    <ComponentRef Id="MyApplication" />
    <ComponentRef Id="ExampleFile" />
</Feature>

I included only 2 but I have more than 30 dll to import in our application. How can I import all dll in one component ? I tried using "*.dll " did not work. Any suggections ?

Everest
  • 37
  • 1
  • 11
  • 1
    DO not go that route, read this question for more details: http://stackoverflow.com/questions/1602831/wix-one-file-per-component-or-several-files-per-component – Isaiah4110 Apr 02 '15 at 14:56
  • Also if you are looking for easier way to import files, you can use the WixEdit tool. It has a simple GUI and will help you out with creating the WIX script. http://wixedit.sourceforge.net/ – Isaiah4110 Apr 02 '15 at 14:57
  • Have a look at this answer https://stackoverflow.com/questions/1295539/using-wix-to-package-an-installer-with-many-files/1295648#1295648 – CheGueVerra Apr 02 '15 at 15:01
  • @Isaiah4110. I saw that post before posed this question but as we add more dll , it is hard to keep track of them. – Everest Apr 02 '15 at 15:04

1 Answers1

1

If your problem is that you're looking for an automated way to add files to your installer, I'd take a look at WiX's harvester tool (heat.exe) - http://wixtoolset.org/documentation/manual/v3/overview/heat.html

The basic idea is that you can point heat.exe at a build output directory tree, and it will generate a .wxs file with each file in the build tree having its own component. That way if more files are added in the future you won't have to change your installer source code or build process to pick them up.

jbudreau
  • 1,287
  • 1
  • 10
  • 22