Confirmed users
91
edits
(No more well-known directories: plugins are found via API) |
No edit summary |
||
Line 14: | Line 14: | ||
The plugin meta-data file is a UTF-8 text file named with ".info" after the plugin base name. Given our "foobar" example, this would be "foobar.info". | The plugin meta-data file is a UTF-8 text file named with ".info" after the plugin base name. Given our "foobar" example, this would be "foobar.info". | ||
For example, for a gmp-foobar plugin, the disk layout on Windows for version "0.1" would be: | |||
<pre> | |||
gmp-foobar/ | |||
gmp-foobar/0.1 | |||
gmp-foobar/0.1/foobar.dll | |||
gmp-foobar/0.1/foobar.info | |||
</pre> | |||
== The Dynamic Library == | == The Dynamic Library == | ||
Line 52: | Line 61: | ||
Firefox addons and the Firefox addon manager tells Gecko where to look for plugins, using the mozIGeckoMediaPluginService.addPluginDirectory and .removePluginDirectory API. | Firefox addons and the Firefox addon manager tells Gecko where to look for plugins, using the mozIGeckoMediaPluginService.addPluginDirectory and .removePluginDirectory API. | ||
Developers prototyping new addons may also use the environment variable MOZ_GMP_PATH to specify a list of directories. | Developers prototyping new addons may also use the environment variable MOZ_GMP_PATH to specify a list of directories. Note that the paths set in MOZ_GMP_PATH must still conform to the rules in "On Disk Layout" above, i.e. the path points to the "version" subdirectory, which has a parent directory whose name has a "gmp-" prefix. i.e. <code>MOZ_GMP_PATH=/home/username/src/gmp-foobar/0.1/</code>. | ||
It maintains a list of known GMPs, and when an API is requested by a consumer it scans the list for a GMP that can provide the API. | It maintains a list of known GMPs, and when an API is requested by a consumer it scans the list for a GMP that can provide the API. |