[mojosetup] MojoSetup and splash image

Ryan C. Gordon icculus at icculus.org
Sat Nov 24 04:29:03 EST 2007

> 1) Splash screen support. Is there any? Tried having an image data/splash.jpg, 
> but doesn't work

There is now, as of tonight, in svn revision #379:


Quick HOWTO:
- This is only implemented in the GTK UI for now...none of the others 
are graphic interfaces, so it wouldn't make sense to do anything with 
the stdio UI, of course.  :)   Splash images will fail silently; if they 
can't be displayed for any reason, they won't be, but the installer will 
- Build with MOJOSETUP_IMAGE_JPG (or BMP, PNG, a few others) for image 
decoding support. JPG and PNG are on by default currently. Each option 
adds a few kilobytes to the binary, so turn off the ones you don't need. 
These don't require any external dependency like libpng or libjpeg.
- Put a "meta" directory at the same level as "scripts" and "data" and 
put your splash image file in there. The meta directory will be for odds 
and ends of installer support that don't fit elsewhere.
- In your config.lua, make sure your Setup.Package has:

     splash = "splash.bmp",

...where "splash.bmp" is the file in the "meta" directory.

- .jpg and .png decoders still seem buggy (64-bit issues?), so use .bmp 
for now, since it definitely works. Also, the GTK+ UI can display the 
splash on the top, bottom, left, or right of the window, but it's not 
hooked up in the installer itself yet, so it's always at the top. 
Eventually I'd like to add "background" to the position list, where it 
blends it subtly into the window and layers the UI widgets over it...but 
that's not hooked up at all, yet.

- The duke3d example has been updated to show all this in action, so 
check it out if you have questions.

> 2) Enabled MOJOSETUP_GUI_GTKPLUS2_STATIC. This should give me a separate lib, 
> right? I've got none. Defined MOJOSETUP_GUI_GTKPLUS2, and get a mojosetup 
> which is linked with a large number of system libs. I guess this means 
> trouble if these ar not installed.

Enable MOJOSETUP_GUI_GTKPLUS2 to build the GTK+ target. the *_STATIC 
makes it compile it into the binary instead of a shared library. You 
almost certainly want it as a shared library, though...if a system 
doesn't have required and compatible GTK+ libraries, the shared library 
will fail to load and MojoSetup will cleanly fall back to another UI 
target...the same scenario with a static build will cause the installer 
to not start up at all. In most cases on Unix, the only UI target that 
should be static is the stdio UI, so it can be used when absolutely 
everything else fails with no question that it will be available. Other 
platforms, like Windows, can safely build their UIs as static, since the 
win32 API is always available on that platform...but on Linux, GTK+ may 
not be installed, or it may be binary incompatible, etc, so always make 
it shared.


More information about the mojosetup mailing list