EGI Packager

The EGI packager is a tool that binds an animation file to a player in a single file. The completed executable program is self-contained: it needs no additional DLLs or other files to run (specifically, the generated executable does not need the EPLAY32.DLL).

The EGI packager supports only animation files that are created with the EGI compiler, or compatible FLIC files. The animation may contain an embedded run-time script that controls the animation.

Input file
The input file must be an existing FLIC file, preferably one that is created by the EGI compiler.

Output file
The output file is in executable format. This output file is a self-contained executable animation: a player that has the animation itself embedded. If you specify the name of a file that already exists, it is replaced with the new file.

Icon file
The window caption, the task bar and the Alt-TAB popup all show a default icon to better identify the animation. You may replace the standard EGI icon with a custom icon by specifying the filename of an “Icon” file here. The the requirements of a custom icon are specified in the topic “Custom icons”.

Caption
The text for the caption of the window in which the animation plays. This caption is also used for the “About…” box.

Description
The description for the “About…” box.

Frame style
The style of the window in which the animation plays. The “fixed” frame cannot be resized by the user, and the “resizeable” frame can. If the animation contains “region masks” (see the EGI manual), choose “No frame” as the frame type.

Both the fixed frame and non-resizeable frame styles have a caption by which the user can drag the animation to a new position, and a system menu by which the user can close the animation. If you set the frametype to “no frame”, you must provide for another means to terminate the animation, see the topic “Allow the user to terminate the animation”.

Position
The animation window can either be centred on the screen or be positioned to absolute coordinates. If the animation contains an embedded script, the script may override the animation position that is specified here.

Icon in Task Tray
The animation player can optionally put an icon in the task tray. This option is especially convenient when the frame style is set to “no frame” (see above).

Tooltip text
If the task tray icon is present, you can optionally a text for the tooltip for the tray icon.

Right-click popup menu
The animation player can optionally present a popup menu when the user clicks on the animation with the right mouse button. This option is especially convenient when the frame style is set to “no frame” (see above).

Allow dragging the animation to a new position
Selecting this option allows the user to move the animation to a new position on the screen by clicking inside the animation and dragging it to a new location. Normally, one can only drag a window by its caption. This option is especially convenient when the frame style is set to “no frame” (see above), because frameless windows do not have a caption.


Custom icons

If you create a custom icon for your animation, that icon should contain the following four images:

•	16 × 16, 16-colours

•	32 × 32, 16-colours

•	16 × 16, 256-colours

•	32 × 32, 256-colours

If not all four images are present in the icon file, the EGI packager attempts to create them from other images in the icon file, but the quality of the icon may be lower than that made by a good icon editor.

More information

The animation player generated by the EGI packager contains four icons: it has icons in both 16 × 16 pixels and 32 × 32 pixels and in both 16 and 256 colours. Depending on the settings of the computer display, the version of Microsoft Windows and the context in which the icon appears, you will see either the 16 × 16 or the 32 × 32 pixels sized icon and in either 16 or 256 colours.

For example, any display that is set to 256 colours or less will only show the 16-colours version of the icons. Microsoft Windows 95 will also only show the 16-colours icons, regardless of the display settings. All other versions of Microsoft Windows show the 256-colours version of an icon in most situations (provided that the display is in an RGB mode), but only Windows XP supports 256-colours icons in the “Task Tray” — other versions of Microsoft Windows revert back to 16-colours icons in the Task Tray.

An “icon file”, a file with a .ICO extension, is actually an icon group and it contains one or more icon images. This should not be confused with “icon libraries” (with the extension .ICL), which contain a set of icon (group) files. Typically, all icon images in an icon file contain the same picture, but rendered at different sizes and different colour depths. Programs or DLLs that have icons (most do) basically contain one or more icon files embedded in the file.

When Microsoft Windows needs to display an icon for an application, for example: when listing the application in the Windows Explorer, it chooses the most applicable icon image from the application’s resource data and then converts that image to the required size and colour depth when necessary. For example, when Microsoft Windows needs a 16 × 16 pixels 256-colours icon and it finds only a 32 × 32 pixels 16-colours icon image, it takes that icon, scales it down to 16 × 16 and converts it to 256 colours. Converting from 16 colours to 256 colours should never degrade quality, but scaling down from 32 × 32 will. Any good artist can do better than an automated algorithm at scaling icon images, which is why it is better to create optimized icons for all resolutions.


Allow the user to terminate the animation

You should allow a user to terminate the animation — i.e., to end the animation program. The easiest way to do so is to select a “frame type” that includes a caption. The caption bar has a “close button” and a system menu by which the user can end the animation. When the frame style is set to “no frame”, there is also no caption bar — and no close button.

A simple alternative is to have the animation player add an icon to the task tray; refer to the “Icon in Task Tray” option in the main dialog of the EGI packager. The user can then right-click on the tray icon and select the item “Exit” from the popup menu.

Instead of a tray icon (or in addition to a tray icon), you can add the enable the option “Right-click popup menu”. This option allows the user to right-click on the animation itself and get the same pop-up menu as that one gets with the task tray icon.

Yet another option is to add a run time script to the animation and to handle any interaction with the user in the script.