Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; CBlacklist has a deprecated constructor in /home/saltybanana/www/blog/peel/scripts/sb_blacklist.php on line 6

Warning: session_start(): Cannot start session when headers already sent in /home/saltybanana/www/blog/peel/index.php on line 11

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 31

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 37

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 43

Warning: strpos(): needle is not a string or an integer in /home/saltybanana/www/blog/peel/index.php on line 49
The Banana Peel
Compiling Freeciv for Mac OS X Panther 
Thursday, December 23, 2004, 5:35 PM
For those wondering how I built my Freeciv packages and how you might do the same, here's a quick write-up on how I compiled it from source. The contents below are written for someone with a development background. If this applies to you, or if you are simply curious, read on.

Requirements
  • Mac OS X Panther
  • BSD subsystem (installed by default)
  • X11
  • X11 SDK
  • Xcode (version 1.2 or 1.5)
  • DarwinPorts
  • Know your way around the command-line interface

Steps
  1. Make sure all Panther components are installed (the first five items in previous list)

  2. Install DarwinPorts. This will get you the port command, related documentation (man pages), and the port files. The DarwinPorts site has excellent documentation on installation, so I won't repeat them here.

    Alternatively, you can compile the Xaw client, which is supported by Apple's X11 installation. I used to build this client, but it is quirky and not Mac-like. If you want to go this route, skip this step and the step about installing components needed by the game client. Additionally, the bit about /opt/local/lib (near the end) doesn't apply as well.

  3. Download Freeciv 2.0.0 Beta 5 source code. I had trouble with the .tar.gz archive, so I used the .tar.bz2 one instead.

  4. Extract the archive, and read the INSTALL file at the top-levle directory of the archive. You can glean some information about how to build Freeciv for Mac OS X here.

  5. To build the Gtk+ 1.2 game client, we need to install the components, or ports, needed. Assuming you have DarwinPorts set up properly, you need to issue these port commands in the order provided:

    % sudo port install glib1
    % sudo port install gtk1
    % sudo port install imlib


    Freeciv requires these components in order to compile. These components in turn require other components, which will be automatically downloaded, compiled, and installed when you execute the above commands.

  6. Now, we are ready to configure the source tree for compilation. Using Terminal.app, navigate to the top-level directory of the source you've extracted from the archive, and type the following command (this is one long command). Note that the command is for C shell (csh or tcsh). You'll have to modify it appropriately if you are using another shell:

    % env CC="gcc -no-cpp-precomp" CFLAGS="-O3" \
    ./autogen.sh --with-included-gettext --disable-nls \
    --enable-client=gtk \
    --prefix=/Users/your_user_name/freeciv-2.0.0-beta5

  7. Now, we aredy to compile Freeciv. Issue the following command:

    % make

  8. If the make command terminated without any errors, issue the following command to install the executables and data files:

    % make install
If all went well, you should have a working installation of Freeciv in your home directory. You can launch the client by double-clicking on

/Users/your_user_name/freeciv-2.0.0-beta5/bin/civclient

from the Finder.

To run the server, you can do so from Terminal.app using this command:

% ~/freeciv-2.0.0-beta5/bin/civserver

Now, the installation you've just made has some limitations:
  • Location specific.

    This means if you rename the freeciv-2.0.0-beta-5 folder or move it to another place, it will fail to run. However, this can be overcome by setting the FREECIV_PATH environment variable to point to the share/freeciv subdirectory of wherever your installation is. My package, in fact, does this.

  • Hard-coded library paths.

    The required components you installed from DarwinPorts consist, among other things, dynamic libraries that are loaded at run-time. By default, they are installed in /opt/local/lib. This means when you run the game client, it is expecting to find the libraries it needs in that directory. This, too, can be overcome. But I will save this one for another day.

  • Uncertain multi-lingual suppport.

    I am not at all familiar on how to support languages other than English. You might want to leave out the --disable-nls option during the configuration step to see how that works out for you.
Hope this helps.
  |  permalink   |   ( 3 / 705 )

Battle for Wesnoth 
Tuesday, December 14, 2004, 8:36 AM


Some time ago, a thread at the Freeciv forum pointed out that Freeciv was no longer ranked the #1 open source game at The Linux Game Tome. That position now belongs to another game named Battle for Wesnoth. Freeciv now holds the #2 spot.

I found some time to try it over the weekend, and I must say, I am impressed. When asked to describe it, my first response is that it reminds me of WarCraft II, but turn-based. However, that is far from the whole truth.

I highly recommend that you try the game out for yourself. Pre-built binaries are available on several platforms, including Mac OS X. And unlike Freeciv, the OS X version runs natively on top of Aqua (that is right, no X11 required).

  |  permalink   |   ( 3 / 694 )

Freeciv 2.0.0 Beta 5 
Monday, December 13, 2004, 10:55 AM
While part of me is anxious to see 2.0.0 released, another part of me is also glad to see the developers doing their due diligence to squash as many bugs as possible. Or, at least that's what I think they are doing. :-)

Anyway, the fifth beta was posted on December 10th, and my package for Mac OS X Panther is here.

Some have asked about Jaguar support. However, I don't have the resources to spin up a Jaguar system to support it. Now, if you are interested in compiling it yourself, feel free to ask, and I can help you get started.
  |  permalink   |   ( 3.1 / 796 )

Freeciv 2.0.0 Beta 4 
Wednesday, November 24, 2004, 2:22 AM
With the fourth beta released so close to Thanksgiving, one wonders if the final release of 2.0.0 will be pushed out to December!

Nonetheless, here is my beta 4 package for Mac OS X Panther.

Enjoy, and happy Thanksgiving!
  |  permalink   |   ( 3 / 690 )

Freeciv 2.0.0 Beta 3 
Wednesday, November 10, 2004, 12:25 AM
Beta 3 was announced on the 5th of November. You can find my package of it here. I've added two utilities to the package to help things out:
  1. Freeciv Server: Double-clicking this AppleScript application will launch the game server in a Terminal window. Games will be saved in the Saved Games folder.
  2. Load Saved Game: Dropping a saved game file on this AppleScript droplet will launch the game server in a Terminal window and load the saved game.
Have fun!
  |  permalink   |   ( 3 / 794 )


Back Next