How to Download and Install Prerequisites In Parallel During the Installation Process
When you install an application, you may notice that it can take quite a long time – especially when it needs prerequisites for a successful installation. And that happens because prerequisites slow down the installation process since a prerequisite often doesn't get downloaded until the previous one is installed.
To speed up the installation process, it's best to download and install prerequisites in parallel. How can we do that? That's what I'll show you in this article.
Advanced Installer Helps you Accelerate the Installation Process By Including Support For Parallel Downloading and Installing
Starting with Advanced Installer 20.0, you are able to download and install prerequisites in parallel.
Here’s how it works: the prerequisites are downloaded one at a time, while the already downloaded ones get installed in parallel.
As a result, installing your application takes less time to complete.
How to Activate Parallel Downloading and Installing For Your Prerequisites
In order to enable the new support for prerequisites from Advanced Installer, we require the following property: AI_PARALLEL_DOWNLOAD.
This property unlocks the parallel download and install only when its value is set to 1.
So, we have two options:
- To let the prerequisite be downloaded and installed one by one (the property value set to 0)
- To let the prerequisite be installed while downloading (the property value set to 1)
Let’s imagine we create a package that requires installing several prerequisites.
To see how the prerequisites are installed while downloading, we will add two options to a ComboBox.
To achieve that, follow these steps:
1. You have to link the AI_PARALLEL_DOWNLOAD property to the ComboBox. For this, go to the ComboBox properties. Insert the property name in the Property section.
2. Then, define the value for the AI_PARALLEL_DOWNLOAD property depending on the option selected by the user.
If the user selects the Install while downloading option, then the AI_PARALLEL_DOWNLOAD property value is set to 1, otherwise, the property value is set to 0. That way, the installer will know how to manage prerequisites during installation and download.
New Progress Dialog Customization Using Enhanced User Interface
You can also customize the progress dialog to display the status of the prerequisites' download and installation as they happen.
You have to use Enhanced User Interface in addition to setting the AI_PARALLEL_DOWNLOAD property value to 1.
To use the Enhanced User Interface, go to Themes view → Setting tab and select Always or On Install.
To display the download progress during install, follow these steps:
1. Go to the Subscribed Events tab of the download bar and add a new event.
2. In the opened Event Mapping dialog, choose the Display download progress in parallel during install (Enhanced User Interface only) from Subscribe to and set the attribute to Progress.
To display the install progress, follow the same steps as above, only this time for the Subscribe to we need to choose Display installation progress.
You can also set new events for displaying text during the download process. Here’s what type of text you can display:
1. The state of the download action
1. Go to the Subscribed Events tab of the text field.
2. Create a new event which subscribes to Display action text during download (Enhanced User Interface only).
2. The package name that is downloading at that time
Follow the steps above, but this time create a new event that subscribes to Display action data during download (Enhanced User Interface only).
If you want to display the state of the install action, go to the Subscribed Events of the text field. Create a new event and subscribe to Display action text during install.If you want to display the package name that is installing at that time, go to the Subscribed Events of the text field. Create a new event and subscribe to Display action data during install.
The new Advanced Installer feature allows downloading and installing prerequisites in parallel, which saves time when installing a package.
Moreover, you can customize the installer to have a modern progress dialog. This way, every user will know the status for both downloading and installation process as well as which prerequisite is downloading or installing at a time.
What do you think? Let us know if there are any feature requests you'd like us to consider.
Subscribe to Our Newsletter
Sign up for free and be the first to receive the latest news, videos, exclusive How-Tos, and guides from Advanced Installer.