How do I run a custom function when my toolbox gets installed?
Afficher commentaires plus anciens
I have a toolbox that is regularly distributed, and I'd like to run a custom function when the toolbox is installed. The purpose of this function is to check for other toolboxes (make sure dependencies are installed) and prompt the user to add a shortcut to launching an app packaged with the toolbox. I'd imagine Matlab doesn't allow you to do this, as that's a pretty easy way to run malicious code, and searching around the internet has yielded no results
1 commentaire
Walter Roberson
le 21 Juil 2021
I imagine that wanting to run a configuration script would be pretty common; it is a reasonable thing to want to do.
Réponses (1)
Jan
le 21 Juil 2021
0 votes
How is the toolbox "regularly distributed"?
It is usual, that a toolbox or software has a "configure" function to set up the environment. Then simply add this to the installation instructions.
Does your toolbox have a main function? Then you could trigger the configuration once automatically e.g. by setting a persistent flag by setpref.
1 commentaire
Thomas Satterly
le 21 Juil 2021
Catégories
En savoir plus sur Introduction to Installation and Licensing dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!