How do I generate an uninstall folder when using "compiler.package.installer"?
2 views (last 30 days)
Show older comments
MathWorks Support Team
on 6 Nov 2023
Answered: MathWorks Support Team
on 8 Dec 2023
I am creating a standalone application in MATLAB using the "mcc", "compiler.package.InstallerOptions", and "compiler.package.installer" commands. The invocations of the commands resemble the following:
mcc -m script_file.m
opts = compiler.package.InstallerOptions('ApplicationName',application_name,...)
compiler.package.installer(application_name.exe,'.\requiredMCRProducts.txt','Options',opts)
After running the generated installer, the application's directory lacks an uninstall folder, instead containing a folder named "application" and an ICO file. Additionally, the application is not discoverable in the list of apps in Windows Settings.
How do I generate an uninstall folder and make the application discoverable in Settings?
Accepted Answer
MathWorks Support Team
on 6 Nov 2023
This issue stems from the fact that, when calling "compiler.package.installer" with a file list as input, the command does not immediately recognize that it is installing an application.
To achieve the desired functionality, you must tell the compiler that the input files represent an executable. To do this, set the "Shortcut" property of the "InstallerOptions" object to the name of the executable function prior to invoking "compiler.package.installer". The following line of code achieves this:
opts.Shortcut = 'application_name.exe'
After running the installer, the resulting directory should have an "Uninstall" folder, and the application should be discoverable in Settings.
0 Comments
More Answers (0)
See Also
Categories
Find more on C Shared Library Integration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!