How do I create a package that can be installed on any type of
platform and can also install 64-bit components when installing on 64-bit
platforms?AnswerUse the "Mixed 32/64-bit matching the platform" package type Go to the Install Parameters page by selecting it in the left-side
panel. Select for "Package Type" the value Mixed
32/64-bit matching the platform.
32-bit packages can also be installed on both 32 and 64-bit
platforms but they can't install 64-bit binaries to real system paths on
64-bit platforms. Find out more about package types from Packages Types.
Files from your application may be categorized into 3 classes
considering the machine they are designed for: - 32-bit executables or libraries (can run on 32-bit machines) - you
may want them to be installed also on 64-bit machines in order to
interact with other 32-bit applications.
- 64-bit executables or libraries (can run only on 64-bit machines)
- these files should not be installed on 32-bit machines.
- Machine independent files - should be installed on any kind of
machine.
In the following steps we will: - Create a folder structure to keep 32-bit files and 64-bit files
into different folders as well as their shortcuts.
- Set the components types (32-bit/64-bit) and install
condition.
Creating the folders structure Go to the Files and Folders page. Select "Application Folder" and create a new
folder using the "New Folder" toolbar button. Name this
folder 32-bit.
Files Locations- Into the "32-bit" folder you can place your 32-bit binaries.
- The 64-bit binaries and any shared resource files should be placed
directly into "Application Folder".
Redirecting the 32-bit binaries to the root installation
folder If you don't want to install your 32-bit binaries on
64-bit platforms, and since the 64-bit binaries should not be installed
on 32-bit platforms you can redirect the 32-bit folder to
install its content to Application Folder. Use the
"Install folder content into the parent folder"
option from the folder properties page. This way you will have a proper
installation layout on both types of platforms. If you do want to install your 32-bit binaries on 64-bit platforms,
it means that you must redirect the 32-bit folder to
install its content to Application Folder but not for
64-bit platforms. Go to the Custom Actions and select the
"InstallExecuteSequence" sequence. Use the
"Show Standard Action > Before Initialization > Cost
Finalize" toolbar button to display the "Cost Finalize" action.
Use the "New Custom Action > Directory Set With Formatted" toolbar
button, select the "32-bit" folder under "Application Folder" and
configure as follows:
- Formatted Text: [APPDIR]
- Execution Condition Expression: NOT
VersionNT64
Setting the components types Go to the Organization
and select the components that contain your 64-bit binaries and mark
them as "64-bit Component". If you have difficulties in
finding the component that contain a certain file you can select the
file from the Files and Folders and use the "Go To
Component" context-menu button.
If you don't want to install your 32-bit binaries on 64-bit
platforms, select the components that hold your 32-bit binaries and
condition them with NOT VersionNT64. Creating shortcuts Go to the Files and Folders page. Select "Application Shortcut Folder" and
create a new folder using the "New Folder" toolbar
button. Name this folder 32-bit. The shortcuts to the
32-bit binaries should be placed into this folder and those to the
64-bit binaries should be placed into the "Application Shortcut Folder".
For the "32-bit" folder under "Application Shortcut Folder" you must
do the same action like you did for the "32-bit" folder under
"Application Folder" (use a custom action to set it to
[SHORTCUTDIR] or use "Install folder
content into the parent folder" option in case you will not
install the 32-bit binaries on 64-bit platforms). Custom Actions If your package contains any binary file
launched as custom action you may want to condition them using the
VersionNT64 property to be executed only when
desired. Merge Modules If your package contains any merge
modules, all their components will be installed no matter if their
64-bit flag was set or not. You can control the merge module files
installation from the Feature Properties page of its
feature.
|