Hollywood can also be used from the console. Actually, the GUIs that ship with the Amiga, Linux, and macOS versions as well as the IDE that ships with the Windows version of Hollywood are just front-ends for the Hollywood interpreter which is a console program. Thus, you can also use Hollywood from the console and of course you can also develop console programs with Hollywood since Hollywood has an extensive console library. Here's an overview of where you can find the Hollywood interpreter that can be started from the console:
Hollywood:System/Hollywood
.
Since the Hollywood installer adds Hollywood:System
to your path, you can start
the Hollywood interpreter from the console by just entering Hollywood
.
Interpreter
and can be found
in the root directory of your Hollywood installation. There's also a file named Hollywood
in
that directory but that is just the GUI front-end for the Hollywood interpreter. The Hollywood
interpreter is simply known as Interpreter
.
Contents/Resources
directory of Hollywood.app
. The Hollywood interpreter is stored as its own app bundle
which is named HollywoodInterpreter.app
. To start the Hollywood interpreter on macOS
from the console, you'd have to do something like this:
cd Hollywood.app/Contents/Resources ./HollywoodInterpreter.app/Contents/MacOS/Hollywood test.hws |
Hollywood_Console.exe
and you can find it in the directory where you have
installed Hollywood, typically C:/Program Files/Hollywood
. Additionally, there's
also a non-console version of Hollywood available for Windows. This version is named Hollywood.exe
and it can be found in the very same directory as Hollywood_Console.exe
.
The Hollywood IDE will always use the non-console version of Hollywood, i.e. Hollywood.exe
.
If you want to have console output from Hollywood, however, you need to use the console
version of Hollywood, i.e. Hollywood_Interpreter.exe
. You can start that manually
from a Windows console like this:
cd "C:/Program Files/Hollywood" Hollywood_Console.exe test.hws |
Knowing the difference between console and non-console programs on Windows is also important when it comes to distributing your app: Since Windows distinguishes between console and non-console programs, Hollywood can also compile two different kinds of Windows executables: Windows executables that are console programs and Windows executables that are non-console programs. If you want to compile a console program for Windows, you need to pass the ‘-consolemode’ argument to the compiler. See console arguments for details. Note that this option currently isn't available from the Hollywood IDE or the Hollywood GUI front-ends. If you want to compile a Windows console program, you need to run Hollywood from the console or manually add the ‘-consolemode’ argument to the IDE or Hollywood GUI configuration.
Also note that even non-console programs can open a console on Windows. This can be done using the OpenConsole() function. See OpenConsole for details.
Once you know how to start Hollywood from the console, you could then ask it to print a list of all available options by passing the ‘-help’ argument to it. On Windows, this could be done like this:
cd "C:/Program Files/Hollywood" Hollywood_Console.exe -help |
On Linux like this:
cd <Hollywood-installation-directory> ./Interpreter -help |
On macOS like this:
cd /Applications/Hollywood.app/Contents/Resources ./HollywoodInterpreter.app/Contents/MacOS/Hollywood -help |
And on AmigaOS like this:
Hollywood -help |
Passing ‘-help’ to Hollywood will print a comprehensive list of all available console arguments. See Console arguments for details. If you omit the ‘-help’ argument, Hollywood will open a file requester prompting you to select a Hollywood script or applet to run.
If you want to start a Hollywood script from the console, you could use the following commands on Windows:
cd "C:/Program Files/Hollywood" Hollywood_Console.exe script.hws |
The same is possible on the other platforms, see above.
It is important to know that all of Hollywood's features are available from the console
as well. After all, the Windows, Amiga, Linux and macOS GUIs for Hollywood are just front-ends
for the console-based main program too. Thus, you can do everything from the command line as well.
For example, here is how you would ask Hollywood to compile test.hws
into an
AmigaOS3 executable on Linux:
cd <Hollywood-installation-directory> ./Interpreter test.hws -compile ~/MyTest_AmigaOS3 -exetype classic |
See Console arguments for a detailed description of all command-line parameters.
Note that on AmigaOS and compatible systems Hollywood is automatically added to
your path upon installation. Thus, you can simply type Hollywood
in the console and
Hollywood will be started - no matter where you installed the program.