4.5 Linking plugins

In contrast to data files and fonts, plugins aren't automatically linked to your executable when you require them in the preprocessor commands. The following code, for example, will not force the linker to link "jpeg2000" into your executable:

@REQUIRE "jpeg2000"

If you want to have jpeg2000.hwp linked into your executable, you have to set the Link tag to True. The code looks like this then:

@REQUIRE "jpeg2000", {Link = True}

In that case, jpeg2000.hwp will be linked to your executable and the user won't need to keep a copy of jpeg2000.hwp because it has already been linked into the executable.

Alternatively, you can also use the ‘-linkplugins’ console argument to link plugins into your executable. See Console arguments for details.

Note that plugins can only be linked to executables, not to applets, since applets are platform-independent and plugins are not.

Before you can use the plugin linker, you first have to copy the plugins you would like to link into a directory named LinkerPlugins. On AmigaOS and compatibles, this directory needs to be created in Hollywood's installation directory, i.e. you need to create Hollywood:LinkerPlugins. On all other systems, you have to create the LinkerPlugins directory in the directory where Hollywood has been installed, i.e. next to the Hollywood executable. Keep in mind that on macOS this will be inside the application bundle, i.e. in HollywoodInterpreter.app/Contents/Resources/LinkerPlugins. Furthermore, you have to create the following architecture subdirectories inside the LinkerPlugins directory:


After that, you have to copy the plugins you want to link to these subdirectories. You need to copy plugins for all the architectures you want to compile executables for. If you don't do that, the linker won't be able to find the plugins to link. Note that the linker will look for plugins only inside the LinkerPlugins directory. It won't look anywhere else, in particular not in the standard plugins location.

Note that when creating executables for the m881-amigaos architecture, the linker will also look for plugins in the m68k-amigaos directory because both architectures are completely compatible. The same is true for ppc-warpup which will also take both, the m68k-amigaos and m881-amigaos architectures, into account. Also, x86-windows-console and x86-windows are compatible as are x64-windows-console and x64-windows.

Important note: Make sure to carefully read the license of every plugin you link to your executable because many licenses are very restrictive when it comes to static linking. For example, if you link a plugin that is licensed under the LGPL license, then your complete project automatically becomes LGPL as well and you must provide all sources and data files. So make sure to study plugin licenses before you link them to your executables. You have been warned.

Show TOC