I have created a toolbox called Alexandria. Basically the toolbox is contained into a root folder called alexandria which contains one subfolder (also called alexandria) that itself stores other subfolders containing all the functions and scripts needed for the toolbox. The root folder also contains two scripts (alexandria_gui.m and alexandria_ide.m) which can also call functions from the alexandria subfolder:
alexandria --> alexandria_gui.m
--> alexandria_ide.m
--> alexandria --> linear_regression (includes LinearRegression.m, SimpleBayesianRegression.m ...)
--> processor (includes InputProcessor.m, RegressionProcessor.m ...)
--> and so on...
I want to create a toolbox that makes all the scripts and functions available to the user from the console, and not just the two scripts alexandria_gui.m and alexandria_ide.m that are in the root folder. However, when I try to package the toolbox from root alexandria folder, I obtain the following:
the "Toolbox Files and Folders" part shows that the packager finds the two scripts and the alexandria subfolder in the root folder. Fine. The "External Files" says that "No files outside of the toolbox folder are required". This is fine IF that means that all the subfolders in the root folders (in particual the alexandria subfolder) are also included in the packaging and added to the Matlab path, which I am not sure. Indeed, "Install Actions" clearly shows that only the root folder <Toolbox Folder> will be added to the MATLAB path. So seemingly none of the subfolders will be added to the Matlab path at installation, though the subfolders themselves will be packaged and installed. In my case however, packaging the subfolders but not adding them to the Matlab path is pointless, as my toolbox will not detect them and hence not work properly.
So my question is simply; is there a way to force the packager to add all the subfolders to the path when installing? And by the way, how is it that Matlab seems unable to detect subfolder dependencies, which represent elementary software architecture?
As it is, it seems that forcing addition of undetected subfolders to the Matlab path is not possible. The only solution (that I mentioned on a similar subject here) then seems to add the folders to the path manually after installation, which sounds bad. So, is there any solution?
Note: the packager seems unstable. Sometimes in the past I managed to get the dependencies detected, and this way I could upload one version of my software on File Exchange. But now, after an update of my toolbox, the packager just seems unable to propose to add any dependency to the path.