Name
OPTIONAL -- declare an optional plugin dependency (V11.0)
Synopsis
@OPTIONAL plugin$[, table]
Library
plugin

Function
This preprocessor command loads and initializes the plugin specified by plugin$ but doesn't fail if the specified plugin is not available. In other words, the @OPTIONAL preprocessor command does the same as the @REQUIRE preprocessor command except that it won't fail if the plugin isn't available. See REQUIRE for details. To find out if a plugin declared using @OPTIONAL could be loaded, your script can use the HavePlugin() function.

Note that plugin$ must not contain any absolute or relative path specifications but just the name of the plugin to be loaded. Hollywood will then look for the plugin in its standard plugin search paths. See Plugins installation for details. Optionally, you can pass additional parameters to the plugin which allows you to control how the plugin is initialized. The parameters accepted in the table argument vary from plugin to plugin. Please consult the documentation of the plugin to find out if it accepts any additional parameters that can be passed to @OPTIONAL. The following two parameters are supported for every plugin:

Version:
Minimum plugin version required. Hollywood will fail if the installed plugin does not have at least this version number. This defaults to 0 which means that any version will do.

Revision:
Minimum plugin revision required. Hollywood will fail if the installed plugin does not have at least this revision number. This defaults to 0 which means that any revision will do.

See Plugins for more information on plugins.

Inputs
plugin$
name of the plugin
table
optional: table containing further options to be passed to the plugin
Example
@OPTIONAL "jpeg2000"
Declares that your script optionally supports the "jpeg2000.hwp" plugin but won't fail if the plugin isn't available. Any version will be accepted.

Show TOC