Name
LINKER -- pass options to linker (V8.0)
Synopsis
@LINKER table
Function
This preprocessor command can be used to pass options to Hollywood's linker. Thus, it is only used when compiling scripts to applets or executables. When just running scripts with the Hollywood interpreter it is ignored.

You have to pass a table to the @LINKER preprocessor command. The following tags are currently recognized:

Files:
This tag allows you to pass a list of files that shall be linked to the applet or executable to the linker. This is similar to the ‘-linkfiles’ console argument, but it allows you to store the files to be linked directly in your script which might be more convenient than having to maintain an external database file for this purpose. You need to pass a table containing a list of files to be linked to this tag. Note that it is very important that the file name specifications passed to Files must be exactly identical to the ones passed to Hollywood functions which should then load the linked files instead. If you don't use identical file paths, Hollywood won't be able to map the files linked to the applet or executable to the corresponding commands. See Linking data files for details.

Fonts:
This tag allows you to pass a list of fonts that shall be linked to the applet or executable to the linker. This is similar to the ‘-linkfonts’ console argument, but it allows you to store the fonts to be linked directly in your script which might be more convenient than having to maintain an external database file for this purpose. Your script will then automatically load the linked fonts from your applet or executable when you call SetFont(). Using the Fonts tag of the @LINKER preprocessor command to link fonts into applets or executables is an alternative to using the @FONT preprocessor command. Normally, however, using @FONT should be much easier than using Fonts so you should use Fonts only with good reasons. See Linking fonts for details.

Inputs
table
table containing options to pass to the linker
Example
@LINKER {Files = {"test.jpg", "title.png"},
    {Fonts = {"Arial", "Times New Roman"}}

LoadBGPic(1, "test.jpg")
LoadBrush(1, "title.png")
SetFont("Arial", 36)
NPrint("Hello World")
SetFont("Times New Roman", 72)
NPrint("Hello Hollywood")
The code above links the files test.jpg and title.png to the applet or executable. LoadBGPic() and LoadBrush() will then the load the files directly from the applet or the executable instead of an external source. Additionally, the fonts Arial and Times New Roman will be linked to the applet or executable, and SetFont() will also open those fonts directly from the applet or executable then.

Show TOC