Controlling which folders are added on add-on install and notifying user of updates
1 view (last 30 days)
Show older comments
Hi,
I uploaded a project to the file exchange and I have tried installing it via the add-on manager. This works but MATLAB adds all folders to the path. I wish to have it only add the "code" sub-folder and not add other folders, such as test folders. Is there any way to acheive that?
Secondly, I want to have some way of notifying the user when a new version becomes available on the FEX. At present it seems to me that the only way they can know if there is a new version is if they go to the Add On Manager and look.
3 Comments
Answers (1)
Shuba Nandini
on 1 Mar 2023
Edited: Shuba Nandini
on 1 Mar 2023
Hi Rob,
I understand that you are having an issue with adding only code subfolder but no other folders and update users when there is a new version available on FEX.
Please follow the below steps that can help you the create path for only code subfolder:
- Create a file named “startup.m” in the MATLAB “startup” folder. You can find the folder by typing “userpath” in the MATLAB command window. This will give you the path to your MATLAB user folder, where you can find the “startup” folder.
- In this file, “addpath” and “rmpath” commands can be used to modify the MATLAB path. To add “code” subfolder to the MATLAB path, use this command.
addpath(genpath('path/to/your/project/code'));
3. To remove the other folders from the MATLAB path, you can use the “rmpath” command. To remove all folders named “test” from the MATLAB path, use this command.
rmpath(genpath('path/to/your/project/test'));
4. Save the “startup.m” file and restart the MATLAB. The modified path will be used automatically when MATLAB starts.
Refer this links for more information:
To Update the users when there is a new version available on FEX, you can use the MATLAB Central File Exchange Alerts Service, which allow users to sign up for email notifications.
Here are few steps which you can follow to get updates:
- Go to the FEX page for your add-on.
- Click on the “Alerts” button on the right-hand side of the page.
- Click the “Create Alert” button and select the types of alerts you want to receive (such as new releases or updates to reviews).
Thanks
2 Comments
Rik
on 1 Mar 2023
I don't think it is a good idea to edit the startup.m for users of your FEX submission. I would not appreciate that.
The second part relies on users being savy enough to sign up for notifications on their own, which is a very high barrier. I would be curious to see statistics about what percentage of downloaders sign up for notifications.
See Also
Categories
Find more on Search Path in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!