views:

296

answers:

3

I have an Office add-in project with a setup project for deployment (using VS 2008), and I need to build the same product in a few different flavours.

I'm looking for a good way to make the installer resources dependent on the build configuration. The product name, manufacturer, manufacturer url, author, etc., etc. properties should be different for each of the builds. Also, the images shown in the installer UI will be different as well.

If possible, I'd like to do this without creating a new project for each different UI. I believe this could be done using the ORCAS tool and build events, but this approach seems overly complex and fragile.

Does anyone have any ideas on a clean way to go about doing this?

A: 

I think the best way is to create hand-made NAnt script.

Explaination:

NAnt is a build tool that besides building can execute scripts. By creating scripts and targets you can modify files that are checked out from your SCM, and then order them to build. Check out official NAnt site for more informations.

Migol
...and? Please explain how nAnt would solve this problem.
markt
Added explaination for you.
Migol
I know what nAnt is.. the build is not the issue.
markt
NAnt can execute scripts, scripts can change flavours so you have what you want.
Migol
are you suggesting writing a script that modifies the vdproj file ? your answer is unclear.
markt
Uhm, yes I suggest it. Either use .NET as scripting language or add Perl to it (best on modifying texts).
Migol
A: 

You could manually make copies of the vddproj file and edit them with a text editor. I admit, this is not a very robust solution and you would have to repeat this step every time the content of your setup changes.

cdonner
I thought about doing this.. but I'm not really comfortable with it as it could become very difficult to maintain.
markt
+1  A: 

Another option, although it is a bit more work up front, is to throw the setup project out the window and use e.g. WiX instead (http://wix.sf.net)

mostlytech