Adams Basic Package > Adams View > Adams View > Customizing Adams View > Authoring Plugins > Section 3: The Plugin directory structure

Section 3: The Plugin directory structure

A plugin X is represented by a directory X. We already have seen the locations where this plugin directory should reside, in order for the plugin to be discoverable. We will call this directory as the plugin root directory or simply, the root.
Also, a plugin may make use of platform specific files for its functionality (such as a solver.dll or a solver.so as the case may be). Such files should reside in platform specific directories (for example, win32, win64, rh_linux, SuSE linux and so on.) within the root. The platform specific directories are searched automatically for each specified location and as such should not be explicitly specified.
For example,
Let’s say that the a user has set the location “C:/Plugins” through the environment variable MDI_USER_PLUGIN_DIR on the windows 32/64 platform, then the following locations will be searched, for a plugin X,
1. C:/Plugins/
2. C:/Plugins/X
3. C:/Plugins/X/win32 or win64
4. C:/Plugins/win32 or win64
This applies to all locations mentioned in the previous section.
 
Note:  
The Plug-in Manager will display a plug-in, if plug-in .xml file located within any sub-directory inside MDI_USER_PLUGIN_DIR. However the solver and view dll's will only be searched in the paths mentioned above, not within any sub-directory inside MDI_USER_PLUGIN_DIR. So, if there is a plug-in .xml file that is contained in a folder C:/Plugins/Y for plug-in X, then this plug-in X will be displayed in the plug-in manager, but when the user tries to load the plug-in, it may result in an error since the binary and view, solver dll's are searched in the 4 paths mentioned above.
The help files associated with a plugin should be placed in the help directory located inside the root. Similarly examples associated with the plugin should be placed in a directory called as examples. Both, the xml file and the bin file should be located directly in the root and not inside any directory.
A possible directory structure is shown below,
<Plugin searchable location>
X (root directory)
- rh_linux (o)
- win32 (o)
- win64 (o)
- SuSE linux (o)
- help (o)
- examples (o)
Directories that are optional are marked with an (o) beside them.