3.3 Console emulation

Hollywood and programs compiled with Hollywood recognize many console arguments that can be used to control various functions of the program. Most of the time, though, you won't start Hollywood or Hollywood-compiled programs from the console. So how can you pass these arguments to Hollywood programs when you don't have a console? This differs from platform to platform. Below is an overview of how to pass console arguments to Hollywood programs without using a console.

Note that by default, all programs compiled by Hollywood will handle console arguments and arguments passed to them using the mechanisms described below. If you would like to forbid this behaviour, you have to compile your programs using the -locksettings argument. Otherwise, the user will be able to change the appearance of your compiled program by passing arguments to it.

Here is how to specify console arguments to Hollywood programs without using the console:

1) AmigaOS:

Simply create an icon for your program and add the console arguments you want to use as tooltypes to that icon. For example, to add a black-to-blue gradient your program in RAM:MyCoolProg, create an icon named RAM:MyCoolProg.info and add the following tooltypes to it:

 
BACKFILL=GRADIENT
STARTCOLOR=$000000
ENDCOLOR=$0000ff
BORDERLESS
FIXED
(FULLSCREEN)

Note that tooltypes enclosed in parentheses are ignored so in the above case, FULLSCREEN is not handled.

2) Windows:

Under Windows, you can put the console arguments you want to use in an *.ini file accompanying your program. Let's assume you have compiled a program named MyCoolProg.exe with Hollywood. You have installed this program in

 
C:/Program Files/MyCoolProg/MyCoolProg.exe

You can now create an *.ini file which holds further options for this program. The *.ini file must have the same name as your program. Otherwise your program will not be able to detect that there is an *.ini file. Thus, you have to create the *.ini file as follows:

 
C:/Program Files/MyCoolProg/MyCoolProg.ini

You can then use your favorite text editor to add options to this *.ini file. For example, to create a black to blue gradient backfill for your program, you can put the following tags in MyCoolProg.ini:

 
Backfill=Gradient
StartColor=$000000
EndColor=$0000ff
Borderless=True
Fixed=True

See console arguments for more information on which arguments can be specified in the *.ini file.

3) macOS:

Under macOS, you can choose between two different ways of passing console arguments without using a console:

  1. Open the Info.plist inside the application bundle that was compiled by Hollywood with your favorite text editor. Now search for the dictionary entry named CFBundleExecutableArgs. Here you can add all the console arguments you like now. For example:

     
    <key>CFBundleExecutableArgs</key>
    <string>
    -backfill gradient -startcolor $000000 -endcolor $0000ff
    -borderless -fixed
    </string>
    

    With these console arguments specified, your program will open with a black-to-blue gradient.

  2. Alternatively, you can also create an *.ini file just as you can do under Windows. See above for instructions on how to create such an *.ini file. The only difference under macOS is that you have to put the *.ini file inside the Resources directory of your application bundle. For instance, if your app bundle is located in this path:

     
    /Programs/MyCoolProg.app
    

    Your *.ini file has to go here then:

     
    /Programs/MyCoolProg.app/Contents/Resources/MyCoolProg.ini
    

    The rest is exactly the same as under Windows.

4) Linux:

On Linux you can also put all console arguments in an *.ini file. See above for detailed instructions.


Show TOC