Packages are special categories that you can define in order to group related files together. They're often used as part of a "custom" installation option, presenting optional components and letting users choose which parts of an application they want to install on their system.
You can have as many packages in a Setup Factory project as you want. Each package has a name and an optional description that you can use to provide information about the package to your users. This information will appear on the Select Packages screens that you can include in your installer. The Select Packages screens allow your users to select which packages they want to install.
Each file in a Setup Factory project can be assigned to one or more packages. When a file is assigned to a package, it will only be installed if the user selects that package at run time. In other words, when users choose a package, they automatically enable the installation of all the files that belong to it.
NOTE |
|
|
|
|
A file that is assigned to a package is said to "belong" to that package. |
Each package has a unique custom variable that can be set to either true or false. When the user chooses to enable a package, that package's variable is set to "true". If the user chooses not to enable a package, that package's variable is set to "false".
When you add a Select Packages or Select Install Type screen to your installer, you're really just giving the user an easy way to set the package variables to true or false.
These true or false values are what determine whether the files assigned to each package are installed. When a package variable is set to "true", any files associated with that package will be installed. If a package variable is set to "false", the files associated with that package won't be installed, unless they also belong to another package whose variable is set to true.
NOTE |
|
|
|
|
Files assigned to a single package are only installed if that package's variable is set to "true". Files assigned to multiple packages are installed if any of the packages' variables are set to "true". |
Assigning a file to a package is just like setting a run-time condition for the file.
In fact, you could completely duplicate the functionality of packages by using equivalent run-time conditions.
For example, if you have a package called "Extra Stuff" and it uses a package variable named %PackageExtraStuff%, assigning a file to that package is a lot like adding the following run-time condition to the file:
%PackageExtraStuff% = TRUE
Of course, run-time conditions don't have easily localized names and descriptions like packages do. Assigning a run-time condition to a file also doesn't add that file's size to the package size shown on the Select Packages screen at run time.
TIP |
|
|
|
|
If you ever want to assign a file to a package without having the file's size affect the package size, set up a run-time condition instead. That way, the file will still only be installed if the package variable is set to true, but its size won't affect the package size shown on the Select Packages screen. |
See Also: Packages dialog, Naming Package Variables, Install Types