Is it possible to uninstall previous version of a custom toolbox as part of toolbox installation?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have created a custom MATLAB toolbox. As part of the installation process, is it possible to uninstall the previous version (if installed)? I was looking for a seamless installation so that users don't have to explicitly remember to uninstall the previous version.
0 Kommentare
Antworten (1)
Jan
am 3 Aug. 2017
It depends. If the toolbox is stored in a specific folder, you can delete this folder. But perhaps the users modify the M-files and deleting the folder might not be wanted.
A strategy would be to store the folder location in Matlab's preferences (see setpref). Include a checksum in each file. When a new version is installed, use getpref to obtain the former folder, check if any file was modified and if not ask the user if the former version should be deleted.
I keep older versions of toolboxes for a comparison of the results. This is useful to control, if the new version has bugs or changed output.
2 Kommentare
Jan
am 3 Aug. 2017
uninstall the previous one every time you install the new one
I would hate this as a customer.
I assume the uninstallation can be solved in many ways transparently. Simply start to implement it and solve the problems step by step. It is hard to suggest an exact way without providing the full program.
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!