Saturday 21 February 2015

InstallShield: Project Design To Target Both 32-Bit and 64-Bit Systems

How to: Approaches to support both 32-bit and 64-bit installations within one InstallShield project.

Edit

Ideas:

Go through these topics in InstallShield help manual first to understand the concept of Release Flags and how to use it along with Features DesignTemplate Summary Property and Conditional Launching.

  1. Targeting 64-Bit Operating Systems with Basic MSI and InstallScript MSI Installations :http://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/Targeting64Bit-MSI.htm
  2. Targeting 64-Bit Operating Systems:http://helpnet.flexerasoftware.com/installshield19helplib/helplibrary/IHelp64BitSupport.htm#Introduction_3539228780_1027766
  3. Using the Template Summary Property:http://helpnet.installshield.com/installshield16helplib/IHelpTemplateSummary.htm
  4. Conditionally Launching Custom Actions Based on Release Flags:http://helpnet.installshield.com/installshield16helplib/IHelpCustomActionsReleaseFlags.htm
  5. Preprocessor Directives:http://helpnet.flexerasoftware.com/installshield18helplib/mergedProjects/installshield18langref/LangrefPreprocessor_directives.htm


Background:

We’re using InstallShield Spring 2012 Professional 32-bit version - Basic MSI projects. Therefore, there are three things to note down to help you understand InstallScript functions better.
  1. Any dlls are loaded and called (statically or dynamically) via InstallShield during installation progress must be 32bit dlls. For example, we have built a customized dll called InstallDLL.dll to help communicate with our software database over network during installation progress. When calling InstallDLL.dll via InstallShield, we need to use the 32-bit file. 
  2. InstallShield by default reads registry keys in 32-bit location only. To read registry keys in 64-bit location, we need to redirect first. You can read more by Googling these:
    REGDB_OPTIONS = REGDB_OPTIONS | REGDB_OPTION_WOW64_64KEY;
    Or
    Disable(WOW64FSREDIRECTION); and Enable(WOW64FSREDIRECTION);
  3. Components to create registry keys or files by default target 32-bit locations in system (Program Files (x86) on a 64-bit OS). To target 64-bit locations in system, we need to explicitly set components to 64-bit.
Edit

Implementation:

Take Gateway as the sample project to support full capacity of 32-bit and 64-bit installations. Here are some screenshots to describe the design.

Edit

Design Release Configuration, Template Summary and Release Flags

(Click on the image for a better view)

Design Features

(Click on the image for a better view)

 Design Components

(Click on the image for a better view)


Generic components

All components which can be used for both 32-bit and 64-bit platforms will be shared through feature association. 

(Click on the image for a better view)

Conclusion

Your project is now ready to build both 32-bit and 64-bit packages. Any upcoming request during the product life cycle, you just need to adjust it with your components and features to pick the best slots. I have been running my eight projects for a year so far. No trouble due to this design has been caught yet. 

Have fun with software packaging!

No comments:

Post a Comment

Thanks for leaving your comments

Related Posts Plugin for WordPress, Blogger...