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:. If you add this directory to your path, you can conveniently start the
Hollywood and Miniwood interpreters from a console by just entering Hollywood or Miniwood,
respectively.
Hollywood and Miniwood
(case sensitive!). There's also a file named GUI in that directory but that is a GUI front-end for
Hollywood and Miniwood.
Contents/Resources
directory of Hollywood.app. The interpreters are stored as their own app bundle
which is also named Hollywood.app and Miniwood.app, respectively. To start
the Hollywood interpreter on macOS from the console, you'd have to do something like this:
cd Hollywood.app/Contents/Resources ./Hollywood.app/Contents/MacOS/Hollywood test.hws |
To start Miniwood on macOS from the console, do this:
cd Hollywood.app/Contents/Resources ./Miniwood.app/Contents/MacOS/Miniwood 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. Miniwood
follows the same naming conventions, i.e. there are versions named Miniwood.exe and
Miniwood_Console.exe.
The Hollywood IDE will always use the non-console version of Hollywood/Miniwood, i.e. Hollywood.exe
and Miniwood.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 |
Or like this for Miniwood:
cd "C:/Program Files/Hollywood" Miniwood_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 set the ConsoleMode tag in
the @OPTIONS preprocessor command or pass the ‘-consolemode’
argument to the compiler. See console arguments for details.
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> ./Hollywood -help |
On macOS like this:
cd /Applications/Hollywood.app/Contents/Resources ./Hollywood.app/Contents/MacOS/Hollywood -help |
And on AmigaOS like this:
cd Hollywood: 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> ./Hollywood test.hws -compile ~/MyTest_AmigaOS3 -exetype classic |
See Console arguments for a detailed description of all command-line parameters.
If you plan to use Hollywood from the console, it might be a good idea to add the Hollywood
installation directory to your path. Then you can simply type Hollywood (or Miniwood) in
the console and Hollywood will be started - no matter where you installed the program.