4.1 Compiling executables

Hollywood's compiler can either be used from the GUI or by using the -compile argument from the console.

Once invoked, the compiler will read the specified script file, compile it and link a special player-only version of Hollywood to it. All external data that is declared using preprocessor commands is linked, too (unless it is explicitly declared that a file should not be linked). The output executable format can be defined by specifying the -exetype argument. This argument can be set to the following executable types:

amigaos4
AmigaOS 4 executable (PowerPC)
aros
AROS executable (x86)
classic
AmigaOS 3.x executable (68020+)
classic881
AmigaOS 3.x executable (68020+) with math co-processor (68881/2 or 68040/68060)
linux
Linux executable (x86)
linux64
Linux executable (x64)
linuxarm
Linux executable (arm)
linuxarm64
Linux executable (arm64)
linuxppc
Linux executable (PowerPC)
macos
macOS application bundle (PowerPC)
macosarm64
macOS application bundle (arm64)
macos86
macOS application bundle (x86)
macos64
macOS application bundle (x64)
morphos
MorphOS executable (PowerPC)
warpos
WarpOS mixed-binary executable (68040/PowerPC)
win32
Windows executable (x86)
win64
Windows executable (x64)
applet
Universal Hollywood applet which can be started on any system with a Hollywood player

In the 68k version of Hollywood, -exetype defaults to classic, in the AmigaOS4 version -exetype defaults to amigaos4 and so on.

If your script uses a lot of external data, your executable might become very big because Hollywood will link all the files declared with preprocessor commands to it. If you do not want that, you can use the Link argument which all preprocessor commands support to tell the linker not to link certain files. Alternatively, you could load the files using normal Hollywood commands instead of preprocessor commands.

Also note that by default Hollywood will link all its libraries to all executables it compiles. This is done for convenience reasons so that scripts don't have to specify which libraries they need. If you want your executables to be smaller, then you can use Miniwood. See Miniwood for details.

You can also link plugins to your executables using the -linkplugins argument or by setting the Link tag to True in @REQUIRE but you have to be very careful with the plugin license to see if static linking is allowed and the effect it can have on your project's license. See Console arguments for details.


Show TOC