How do I generate an uninstall folder when using "compiler.​package.in​staller"?

15 vues (au cours des 30 derniers jours)
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?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 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.

Plus de réponses (0)

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by