views:

32

answers:

1

Hi,

I've create a setup with WIX and i have a wxi file where i define some properties for the installer. Some of them are read by a custom action and used there. So the variables defined in the wxi file are set as some basic properties values in the main file.

Config File:

<?define MyVariable="fileName.txt" ?>

Main File:

 <Property Id="MyVariableProperty" Value="$(var.MyVariable)"/>

Now i want to create the same setup but using InstallShiled, and i want to use the same file with all the settings, or a similar one in order to avoid duplicating the same information.

My question is how can this be achieved ? What kind of file i should use in order to be able to read the values from it and set them as properties without any custom actions involved, in both WIX and InstallShield.

Thanks.

+1  A: 

This is a build automation issue and I know 2 paths to solve it.

1) Place the properties in merge modules and then use product configurations and release flags to drive which module gets merged into the installer.

2) Write a build step that parses the XPIs out of the wxs/wxi and updates the installer project. This can be done with the IS COM Automation Interface, DTF ( Binary ISM ) and XPath DOM ( XML ISM ).

Christopher Painter
I'm aware of the System Search functionality, i'm trying to achieve something like (e.g.): have one settings file on my build computer where i define the application name(and others). Then when both setups are build this change will be reflected in both of them without any further intervention from me, so i don't have to change the same properties in two different places.
Adrian Faciu
I'm sorry, I thought I read that you were using a custom action to read the XPI at Install time. This is really a build automation issue and I know 2 paths to solve it.1) Place the properties in merge modules and then use product configurations and release flags to drive which module gets merged into the installer.2) Write a build step that parses the XPIs out of the wxs/wxi and updates the installer project. This can be done with the IS COM Automation Interface, DTF ( Binary ISM ) and XPath DOM ( XML ISM ).
Christopher Painter
As an aside, I've been moving towards WiX Merge Modules built using an empty InstallShield template that uses custom build automation and WiX fragments to build the installer up. I use C#/Linq2XML to parse the Wxi files and translate them into COM Automation Interface calls. It scales very nicely and gives me the best of WiX and InstallShield. I use IsWiX and Votive to maintain the WiX merge modules.
Christopher Painter