Launcher

Launcher Configuration

Launcher configuration files define the icons and buttons presented in the Launcher and define how programs are launched. These files are expected to be placed in the config/tools/launcher directory and have a .txt extension. The default configuration file is named launcher.txt.

To specify a different configuration file add ‘–config launcher.txt’ when starting the Launcher. For example, on Windows create a new Batch file at the top of your COSMOS configuration that looks like the following:

call tools\Launcher.bat --config launcher_config.txt

On Linux create a new executable file at the top of your COSMOS configuration that looks like the following:

ruby tools\Launcher --config launcher_config.txt

TITLE

Sets the title of the COSMOS Launcher

Parameter Description Required
Title Launcher title. Default is “COSMOS Launcher”. True

TOOL_FONT

Sets the font used for tool buttons

Only set the TOOL_FONT once as the last encountered setting will apply to all button labels

Parameter Description Required
Font Family The font family to use

Valid Values: Arial, Calibri, Cambria, Candara, Castellar, Centaur, Century, Chiller, Consolas, Constantia, Courier, Courier New, Dotum, Elephant, Euphemia, Fixedsys, Georgia, Impact, Lucida, Papyrus, Rockwell, Rod, System, Tahoma, Terminal, Times New Roman, Verdana, Wide Latin
True
Font Size The size of the font in standard points True

LABEL_FONT

Sets the font used for labels

Only set the LABEL_FONT once as the last encountered setting will apply to all text labels

Parameter Description Required
Font Family The font family to use

Valid Values: Arial, Calibri, Cambria, Candara, Castellar, Centaur, Century, Chiller, Consolas, Constantia, Courier, Courier New, Dotum, Elephant, Euphemia, Fixedsys, Georgia, Impact, Lucida, Papyrus, Rockwell, Rod, System, Tahoma, Terminal, Times New Roman, Verdana, Wide Latin
True
Font Size The size of the font in standard points True

LABEL

Creates a label of text in the current font style

Parameter Description Required
Text The text of the label True

DIVIDER

Creates a horizontal line between tools

NUM_COLUMNS

Specifies how many launcher buttons should be created per row

Parameter Description Required
Columns The number of launcher buttons per row before Launcher automatically creates a new row of buttons. Default is 4. True

TOOL

Create a new tool launcher button

Parameter Description Required
Button Text Label that is put on the button that launches the tool True
Shell Command Command that is executed to launch the tool. (The same thing you would type at a command terminal). Note that you can include tool parameters here which will be applied when the tool starts. COSMOS defines three helper keywords to execute tools - LAUNCH, LAUNCH_TERMINAL, and LAUNCH_GEM. LAUNCH starts a GUI Ruby tool without a terminal. LAUNCH_TERMINAL starts a Ruby tool with a terminal window. LAUNCH_GEM launches a Ruby tool distributed with a gem. True
Icon Filename Filename of a an icon located in the data directory. Passing ‘nil’ or an empty string ‘’ will result in Launcher using the default COSMOS icon. False
Tool Parameters Tool parameters as you would type on the command line. Specifying parameters here rather than in the ‘Shell Command’ parameter will cause a dialog box to appear which allows the user to edit parameters if desired. Expected to be in parameter name/parameter value pairs, e.g. –config filename.txt.

Warning: The full configuration option name must be used rather than the short name. These parameters will override any parameters specified in the Shell Command.
False

MULTITOOL_START

Creates a button which launches multiple tools

Parameter Description Required
Button Text Label that is put on the button that launches the tools True
Icon Filename Filename of a an icon located in the data directory. Passing ‘nil’ or an empty string ‘’ will result in Launcher using the default COSMOS icon. False

MULTITOOL_END

Ends the creation of a multi-tool button

AUTO_GEM_TOOLS

Automatically installs COSMOS tool gems

Traverses the installed rubygems looking for COSMOS gems named cosmos-xxxx.gem. If the gem has a tools directory, the tool launcher will be added as a TOOL in the Launcher.

TOOL Modifiers

The following keywords must follow a TOOL keyword.

DONT_CAPTURE_IO

Don’t capture IO when running the command

MULTITOOL_START Modifiers

The following keywords must follow a MULTITOOL_START keyword.

TOOL

Create a new tool launcher button

Parameter Description Required
Shell Command Command that is executed to launch the tool. (The same thing you would type at a command terminal). Note that you can include tool parameters here which will be applied when the tool starts. COSMOS defines three helper keywords to execute tools - LAUNCH, LAUNCH_TERMINAL, and LAUNCH_GEM. LAUNCH starts a GUI Ruby tool without a terminal. LAUNCH_TERMINAL starts a Ruby tool with a terminal window. LAUNCH_GEM launches a Ruby tool distributed with a gem. True

DELAY

Inserts a delay between launching multiple tools

Parameter Description Required
Delay Delay time in seconds True

Example File

Example File: <Cosmos::USERPATH>/config/tools/launcher/launcher.txt

TITLE "Demo Launcher"
FONT tahoma 12
NUM_COLUMNS 4
MULTITOOL_START "COSMOS" NULL
 TOOL "RUBYW tools/CmdTlmServer -x 827 -y 2 -w 756 -t 475 -c cmd_tlm_server.txt"
 DELAY 5
 TOOL "RUBYW tools/TlmViewer -x 827 -y 517 -w 424 -t 111"
 TOOL "RUBYW tools/PacketViewer -x 827 -y 669 -w 422 -t 450"
 TOOL "RUBYW tools/ScriptRunner -x 4 -y 2 -w 805 -t 545"
 TOOL "RUBYW tools/CmdSender -x 4 -y 586 -w 805 -t 533"
MULTITOOL_END
TOOL "Command and Telemetry Server" "RUBYW tools/CmdTlmServer" "cts.png" --config cmd_tlm_server.txt
TOOL "Limits Monitor" "RUBYW tools/LimitsMonitor" "limits_monitor.png"
DIVIDER
LABEL "Commanding and Scripting"
TOOL "Command Sender" "RUBYW tools/CmdSender" "cmd_sender.png"
TOOL "Script Runner" "RUBYW tools/ScriptRunner" "script_runner.png"
TOOL "Test Runner" "RUBYW tools/TestRunner" "test_runner.png"
DIVIDER
LABEL Telemetry
TOOL "Packet Viewer" "RUBYW tools/PacketViewer" "packet_viewer.png"
TOOL "Telemetry Viewer" "RUBYW tools/TlmViewer" "tlm_viewer.png"
TOOL "Telemetry Grapher" "RUBYW tools/TlmGrapher" "tlm_grapher.png"
TOOL "Data Viewer" "RUBYW tools/DataViewer" "data_viewer.png"
DIVIDER
LABEL Utilities
TOOL "Telemetry Extractor" "RUBYW tools/TlmExtractor" "tlm_extractor.png"
TOOL "Command Extractor" "RUBYW tools/CmdExtractor" "cmd_extractor.png"
TOOL "Handbook Creator" "RUBYW -Ku tools/HandbookCreator" "handbook_creator.png"
TOOL "Table Manager" "RUBYW tools/TableManager" "table_manager.png"

Command Line Parameters

Usage: ruby Launcher [options]

    -h, --help                       Show this message
    -v, --version                    Show version
        --system FILE                Use an alternative system.txt file
    -c, --config FILE                Use the specified configuration file
        --stylesheet FILE            Use the specified stylesheet

Window Size Options:
        --minimized                  Start the tool minimized
        --maximized                  Start the tool maximized
        --defaultsize                Start the tool in its default size

Window X & Y Position Options:
  Positive values indicate a position from the top and left of the screen.
  Negative values indicate a position from the bottom and right of the screen.
  A value of -1 indicates to place the right or bottom side of the window
  next to the right or bottom edge of the screen.
    -x, --xpos VALUE                 Window X position
    -y, --ypos VALUE                 Window Y position

Window Width and Height Options:
  Specifing width and height will force the specified dimension.
  Otherwise the window will layout according to its defaults.
    -w, --width VALUE                Window width
    -t, --height VALUE               Window height

Launcher Specific Options:
    -m, --mini                       Create mini launcher