Got an interesting scenario today from one of our customers that I wanted to share with you in hopes you'll find this useful.
The customer wants to ship with his main installer a prerequisite that is both large and a bit quirky when it comes to its' folder structure.
The prerequisite in question is Matlab Compiler Runtime.
Here are two limitations I have faced today when trying to package that using the predefined "Prerequisites" support:
1. The folder structure is quirky. The MATLAB Runtime installer isn't a single self-contained exe. It ships as a folder with setup.exe sitting next to a bunch of sibling folders it depends on, things like Archives, Bin, Java, extern, resources, and so on. The Prerequisites page only lets you add files that live in the same folder as the main setup file or below it. Since these sibling folders sit at the same level as setup.exe, not underneath it, that restriction gets in the way.
2. Prerequisites that get embedded in your setup go through a CAB, and CABs have a practical 2GB ceiling. This package is around 5GB - I will let you do the math here.
Note: this is not a limitation of Advanced Installer per-se, but rather a limitation of Windows Installer.
Both of those pushed me towards a new approach, as follows:
- use the "File Download" operation to download the ZIP archive into a folder located under %temp%
- use the "Extract Archive" operation to extract the content of the previously downloaded ZIP
- use a "Launch File" custom action to launch the setup.exe
Here's the complete step-by-step:
1. Create a folder to work in
In the Files and Folders page, go to Windows Volume --> Temporary and add a new Regular folder. I named mine Matlab Compiler Runtime DLFolder, but any name works as long as you're consistent with it in the steps below.
2. Add a File Download operation
Inside that folder, add a File Download operation pointing at the MATLAB Runtime zip. Grab the current link straight from the MathWorks download page for whichever release you need, for example:
Code: Select all
https://ssd.mathworks.com/supportfiles/downloads/R2026a/Release/3/deployment_files/installer/complete/win64/MATLAB_Runtime_R2026a_Update_3_win64.zipIf you need a different release or want to browse what's available, the main MATLAB Runtime download page lists all the currently supported versions with their direct links, both 32-bit and 64-bit where applicable. That's the place to check before grabbing a link for your own project.
3. Add an Extract Archive operation
Right after the download, add an Extract Archive operation with the Source path pointing at the file you just downloaded:
Code: Select all
[TempFolder]\Matlab Compiler Runtime DLFolder\MATLAB_Runtime_R2026a_Update_3_win64.zip4. Add a Launch File custom action in the Custom Actions page, configured as follows:
File to launch: [TempFolder]\Matlab Compiler Runtime DLFolder\setup.exe
Working directory: [TempFolder]\Matlab Compiler Runtime DLFolder
Execution time: After the system has been successfully modified (commit)
Execution Stage Condition: Install only
This should be all.
Attached below you can also find a sample project that implements all the steps presented above:
Hope you will find this useful!
Best regards,
Catalin
FOLLOW US
Get the latest news in Application Packaging