Default Add-in Locations

Mono.Addins provides a flexible model for specifying where add-ins should be looked up. By default, add-ins are searched in two paths:
  • The application startup path (that is, where the main exe resides)
  • An 'addins' directory, located in the add-in registry path

For example, if an application is located in /usr/lib/MyApplication/start.exe, and the application initializes the add-in engine like this:

AddinManager.Initialize ("[ApplicationData]/MyApplication")

then by default add-ins will be searched in:

Including Add-in Directories

Additional paths can be included to the default add-in search paths by using a .addins file. A .addins file is an XML file which looks like this:

	<Directory include-subdirs="true">/some/other/directory</Directory>

When a registry is looking for add-ins in a folder and it finds a .addins file, it will parse it and will start recursively looking for add-ins in the referenced folders (which can also contain other .addins files).

The Directory element can be used to specify new add-in folders. The search is not recursive by default, but it can be made recursive using the include-subdirs attribute.

The Exclude element can be used to exclude a patch from the add-in search. The provided path can be a directory or a specific file.

Last edited Apr 29, 2010 at 1:11 AM by slluis, version 2


No comments yet.