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

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?

 采纳的回答

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 个)

类别

帮助中心File Exchange 中查找有关 Package MATLAB Functions 的更多信息

产品

版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by