views:

1667

answers:

1

What is the best way to use InstallShield to generate installers for both 32 and 64-bit environments? The majority of my application is bit-neutral (.net, Java, data files). I would prefer it if I only had to package up those files once. Is there a standard approach to reducing the maintenance of the installshield projects? Currently the only solution I can find is to have two duplicate projects, where each of the components are flagged with 64-bit and the default install directory set to ProgramFiles64. There must be a better way to do this!

Only a very small portion of my application cares how may bits it is being executed on. We have a few C++ DLLs and JNI calls that need to be different. Most of this is determined at runtime by checking if the JRE we are running on is 64-bits.

I would like to avoid distributing two 130 MB files, and ideally ship one big zip file that has both installers in it, each referencing common components. Do I need to create merge modules for the common things and reference them in each of the projects?

We are using InstallShield 2009 (Premier) if that matters.

+2  A: 
  • If you can get away with having zero 64-bit components in your setup, then you can just make it a 100% 32-bit setup, and it will work equally well in 32-bit and 64-bit Windows.

  • If that's not possible, I recommend using Product Configuration Flags. On the "Releases" view, create multiple Product Configurations, such as "XP32" and "XP64". Mark the Template Summary field as appropriate: one as "Intel;1033" and the other as "AMD64;1033". Associate each with a unique Product Configuration Flag to identify it, e.g. "xp32", "xp64". Then, for each Feature, set the appropriate Release Flag. You can set the 64-bit property on your 64-bit components as necessary; just make sure that the Features you mark as "xp32" have no 64-bit components in them. This will allow you to only have 1 InstallShield project file, but generate both 32-bit and 64-bit releases.

William Leara
Is there a way I can set the installation directory to a different value for each Product Configuration? I don't see any options for that. I want to set it to ProgramFiles in 32-bit and ProgramFiles64 in 64-bit so that it always appears to the end user as being installed in C:\Program Files.
galuvian
On the General Information/Product Properties view, set the INSTALLDIR to ProgramFilesFolder. Then, create a "Set Directory" custom action (type 35) and use it to set INSTALLDIR to ProgramFiles64Folder; condition it on VersionNT64 so it only runs on 64-bit systems. This is what I do to use 1 project file to build bot 32/64 bit setups.
William Leara

related questions