Monday, February 4, 2008

Freeciv 2.1.3 Available

The Mac OS X package for Freeciv 2.1.3 is now available. Download it here.

1 comment:

La said...

Your Freeciv package copies a lot of stuff to application support (about 25 MB!), way more than is necessary. Instead of copying all of opt, you only need to copy four files into Application Support.

The environment should be configured like this in

os.putenv('PANGO_RC_FILE', os.path.join(SUPPORTDIR, 'pangorc'))
os.putenv('GTK_IM_MODULE_FILE', os.path.join(SUPPORTDIR, 'gtk.immodules'))

os.putenv('GDK_PIXBUF_MODULE_FILE', os.path.join(FREECIVDIR, 'opt/local/etc/gtk-2.0/gdk-pixbuf.loaders'))
os.putenv('FONTCONFIG_FILE', os.path.join(FREECIVDIR, 'opt/local/etc/fonts/fonts.conf'))
os.putenv('FONTCONFIG_DIR', os.path.join(FREECIVDIR, 'opt/local/etc/fonts'))
os.putenv('GTK_EXE_PREFIX', os.path.join(FREECIVDIR, 'opt/local'))

The pangorc template should look like this:

ModuleFiles = /Users/{login}/Library/Application Support/Freeciv/{version}/pango.modules

AliasFiles = {freecivdir}/opt/local/etc/pango/pangox.aliases

The lines in the pango.modules template should look like this:
"{freecivdir}/opt/local/lib/pango/1.6.0/modules/" ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:*

instead of this:
"/Users/{login}/Library/Application Support/Freeciv/{version}/opt/local/lib/pango/1.6.0/modules/" ArabicScriptEngineFc PangoEngineShape PangoRenderFc arabic:* nko:*

Same thing for the gtk.immodules template.

The freeciv launcher should then put these files inside Application Support/Freeciv/2.1.3/:

With the appropriate template substitutions applied.

With these changes, you only need to copy a few KB instead of many MB, which saves disk space and makes startup faster. Also, setting GTK_EXE_PREFIX lets gtk find the "pixmap" theme engine, which makes the theme work correctly (in the current freeciv 2.1.3 package for mac, you get weird things such as blue buttons, since GTK doesn't get the engine module from inside, but instead looks in /opt/local/...; the problem doesn't show up if you have GTK installed via MacPorts, since then you have the theme engine inside /opt, so you might not have noticed the issue).