Is it possible to uninstall previous version of a custom toolbox as part of toolbox installation?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Jan
2017년 8월 3일
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
Jan
2017년 8월 3일
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.
참고 항목
카테고리
Help Center 및 File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!