Freeciv for Windows

This page should mention everything you need to know to run Freeciv on a Windows system. Please let Todd Goodman know if something is unclear or wrong.

Note: If you are looking for the simplest way to run Freeciv on Windows, please look here.


latest modification: September 03, 2002

Here: Freeciv windows linux

  1. I want to run Freeciv on Windows NOW and I don't want to read this whole FAQ because it's too confusing. What should I do?

    There are a number of choices when one wants to run Freeciv on Windows. As with most things in life, more choices leads to potential confusion.

    If you want the most straightforward method then I recommend that you use Andreas Kemnade's native port. If you don't understand what a port or native port is, don't worry about it, just download from the link above. The next question gives more information on how to retrieve and set it up.

  2. Retrieving the Native Windows Freeciv

    The steps to take to download, unpack, and run the native Windows Freeciv are:

    That's it! You've downloaded and unzipped Freeciv for Windows!

  3. OK, I've downloaded and unzipped it, how do I run it?

    The following steps are one way of running it (there are others, but I find this way easy):

    1. Use Windows Explorer and change to the directory you unzipped into (C:\FREECIV-1.13.0 in my case). Windows Explorer is usually located in Start->Programs->Accessories.
    2. Double click on civclient.exe. The Freeciv client will pop up and after a second the Start a game dialog box will pop up on top.
    3. If you want to play against other humans (I think they're human anyway :-) then click on the Join Game button in the Start a game dialog box that popped up. Then either type in the IP address of the server or select the Metaserver tab to play on the freeciv.org server. Then select an available game and click the Connect button. (You may need to click the Update button to get the list of servers initially and to update it after a while.)
    4. If you want to play on your local machine against the AI (all other players are AI controlled) then click on the New Game button.
    5. Then select your difficulty level and the Total players (it includes yourself, so if you wanted to play against four AI players, you'd select 5). You can change the name here as well.
    6. A popup from the client window will allow you to choose your nation, leader name, sex, and city style.

    That's it! Enjoy!

  4. How do I save and restart a saved game?

    You save the game by clicking the Save Game button at the bottom right of the client window.

    To load the saved game, click the Load Game button in step three or four above. (The name you saved under will have a .gz added to the end of it when you look in the file list.)

  5. How do I use a different tileset?

    The first thing to do is to download the tileset you want to use from http://www.freeciv.org/download.phtml#tilesets. Ensure that you download the *-png.tar.gz version (you'll have to go to the dir link for the tileset you're intersted in to locate the *-png.tar.gz file.)

    Then you have to unpack the tileset into the DATA directory in your Freeciv directory (so if your Freeciv directory is C:\FREECIV-1.13.0, then you'd tell WinZip to extract to C:\FREECIV-1.13.0\DATA.) Make sure you tell your extraction program to extract into the subdirectories in the file.

    Once that's done you can start using the new tileset (FINALLY!) You have to pass an argument to CIVCLIENT.EXE so the easiest way to do that is to open a Command Prompt (from Start->Programs->Accessories->Command Prompt in my case, sometimes called an MS-DOS Window). Change to the Freeciv directory (for example, CD \FREECIV-1.13.0) and start the client with the -tiles tilesetname option. For example, CIVCLIENT -tiles ft.

    You should be good to go then!

  6. How come there's a *-png.tar.gz and *.tar.gz for each tileset?

    The graphic format used by Freeciv on UNIX systems (.xpm) differs from that used on Windows systems (.png.)

    The *.tar.gz tileset files contain the .xpm files and the *-png.tar.gz tileset files contain the .png files.

    If you're running the Windows client use the *-png.tar.gz file.

  7. Yeah, but I want to use a tileset that isn't on www.freeciv.org (or that doesn't have a *-png.tar.gz file available?)

    First of all, if there's a tileset on www.freeciv.org and there's not a tilesetname-png.tar.gz please bring it to the attention of the webmasters.

    Next, you'll have to convert all the .xpm files in the tileset directory you installed to .png files. If you don't already have a utility to do this, I have used and can recommend ImageMagick which can be downloaded from http://www.imagemagick.org.

    Once ImageMagick is downloaded and installed, go to the tileset directory (C:\FREECIV-1.13.0\DATA\FT for example if you installed the ft tileset here.)

    Next, you have to run the CONVERT.EXE program from where you installed ImageMagick (in my case it's in C:\PROGRA~1\ImageMagick-5.4.8-Q16) to convert each .xpm to a .png.

    For example, I ran the following commands:
    C:\PROGRA~1\ImageMagick-5.4.8-Q16\CONVERT chiefs.xpm chiefs.png
    C:\PROGRA~1\ImageMagick-5.4.8-Q16\CONVERT cities.xpm cities.png
    (and so on for the rest of the files with .xpm extensions.)

  8. How do I use a different ruleset?

    A different ruleset can be used by downloading the ruleset and extracting it in the Freeciv data directory (C:\FREECIV-1.13.0\DATA, for example). This should create a subdirectory with the ruleset name (ancients, for example.)

    Currently (due to an issue in the Freeciv code), you need to create a regular file in the SHARE directory (C:\FREECIV-1.13.0\SHARE for example) with the same name as the ruleset directory (ancients, for example.) You can create this with NOTEPAD.EXE (or any other editor, or even COPY CON: ANCIENTS followed by a ^Z.) The contents of the file doesn't matter.

    Then you need to tell the server to use it. This is done by typing /rulesetdir ruleset directory in the chat line of the client before pressing the Start Game button.

  9. How can I convert tilesets on a LINUX machine for use on a Windows machine?

    Andreas Kemnade posted the following method that he uses to do this on a LINUX system:

     for name in *.xpm ; do convert $name $(echo $name | sed 's|xpm$|png|') ; done ;
    
     and then I tried
     file *.png
     and looked for files which do not show up as RGBA.
     I have opened the ones, which are not converted correctly, with gimp and saved
     +them as pngs. Then again file *.png.
     And finally
    
     for name in *.png ; do mv $name $name.bak ; pngquant 256 <$name.bak >$name ;
     +done
    
     And a final look at them (with freeciv). Cleanup:
     rm *.xpm 
     rm *.bak
     Then I have created the tarball.
     

  10. More information on Andreas Kemnade's Native Windows Freeciv

    Andreas Kemnade has patched Freeciv to build with the Cygnus compilers (with -mno-cygwin which produces an executable that uses Microsofts runtime instead of Cygwin's runtime) and use native windows for display (no need for an X server!).

    He has two different .ZIP files available (one with sound support and one without).

    The .ZIP with sound support is available at freeciv-1.13.0-win32-sdlsound.zip (4,002 Kbytes).

    The .ZIP without sound support is available at freeciv-1.13.0-win32.zip (3096576 bytes).

    His patch to build the 1.12.0 version is available at freeciv-1.12.0-gtk-win-1.diff.gz (< 38248 bytes).

    Also see http://www.informatik.uni-bremen.de/~akemnade/civhome.html, and his latest message dated March, 21.

  11. What are my options for running Freeciv on Windows?

    Freeciv was written for Unix and the X window system. It is, in fact, extremely portable across Unix versions. One option is to install a Unix variant on your PC (such as Linux) and use that.

    However, it also runs on other platforms, such as Amiga and OS/2, and there are several ways to make the game run on MS Windows 95/98/NT:

    Run a version compiled without the Cygnus tools (but with GTK)
    Andreas Kemnade has patched Freeciv to do this (See below);
    run the client on a Unix variant, displaying on your MS Windows machine
    this requires access to a Unix box with Freeciv, and, either,
    • an X server for MS Windows (See below), or
    • VNC, with vncserver on the Unix host, and the VNC client on the Windows box
    Run a version compiled with the Cygnus Unix tools for MS Windows:
    this requires Freeciv (1.8.0 or higher), a recent version of GTK (at least 1.2.3), other required libraries and an X server. Anders Bruun Olsen has built two different .ZIP files with this method. One is built optimized for the i586 and the second is built optimized for the i686.

    For a list of supported Freeciv platforms, see the requirements and download pages.

    Before you complain to us about how this stupid game won't just install and run the way you're used to, please bear in mind that we have been seeing a strong correlation between use of abusive or indecent language in complaints, and use of the MS Windows platform. Try to be the exception. You're drawing attention from a crowd of volunteers, and most of us aren't much interested in the MS Windows platform to begin with.

    This isn't to say that you should be afraid to contact Todd Goodman or the packager if you're having a problem installing or playing with a Windows version of the game. If you're polite then you'll get a polite answer back. Remember that you're not talking to some large commercial company. We're all gamers that are volunteering our help.

  12. This is all too confusing! I just want to play! What's the easiest way to play on Windows?

    In Todd's opinion, the easiest and best way to play Freeciv on Windows is with Andreas Kemnade's .ZIP package.

    Instructions for installing this are provided below.

  13. Anders Bruun Olsen's Cygwin X-Window Version

    Here is a .ZIP file package of Freeciv 1.12.0 optimized for the i586 freeciv-windows-1.12.0-i586.zip (3139673 bytes). And here is a .ZIP file package of Freeciv 1.12.0 optimized for the i686 freeciv-windows-1.12.0-i686.zip (3139021 bytes).

    Anders has written a HOWTO to help you set up Freeciv to run under Windows with Cygwin and an X-Server. A text version of the howto is available in each of the packages above and also here.

    An HTML version of this howto is available here.

    The packages were built using Cygwin http://sourceware.cygnus.com/cygwin to provide a POSIX layer for Windows and to enable the use of GCC as the compiler.

    The freeciv source used to build this was direct from CVS. However, it is also available here to comply with the GPL. ( csrc-*.tar.bz2 as a bzip2 tar file.

    You can get the source to the Cygwin DLL (cygwin1.dll) that is being distributed as cygwin-src-*.tar.bz2.

    However, it is strongly recommend that you get source directly from Cygnus! This source is included to comply with the GPL. No support will be provided for building it.

    Please note that this version of the Freeciv client requires an X Server. Please see below for a discussion of possible X Servers. The HOWTO describes how to download the Cygwin X-Server.

    Send email with questions/comments/criticisms regarding this version to Todd Goodman.

  14. What's an X Server?

    Most operating systems provide an API (Applications Programming Interface) that provides a mechanism for a program to display graphics.

    On UNIX systems this is typically done via the X Window System. With this system client programs make requests to an X Server (possibly on a different physical machine) that handles conversion of the graphics primitives into instructions to the graphics hardware (or device drivers).

    On Windows systems this can be done via the native Windows API. There are also X Servers that have been written/ported to Windows.

  15. Why do I need an X Server?

    Freeciv was initially written for UNIX systems and uses X Window system primitives (via either the XAW or GTK Toolkits) to display the graphics.

    The package provided by Anders Bruun Olsen is a straightforward port of the UNIX code to Windows. He didn't have to change anything in the source code because he used Cygwin to provide the POSIX layer (system calls used by the code) and X Libraries to provide the graphical display.

    Because of this, that package requires an X Server to run.

    Andreas Kemnade has made a patch (against 1.12.0 sources) to allow the use of a GTK that has been built to display using the native Windows API. This does not require an X Server.

    Todd has been looking into this option, but is not able to build everything using the freely available compilers (from Cygnus) at this time (though Andreas reports that he is using all freely available compilers for his build).

  16. Where can I get an X Server?

    Todd Goodman uses a commercial X Server package called Exceed from Hummingbird. Information is available here .

    Jiri Zelinka reports that a trial version of the Netmanage server is available from Netmanage at ul8win95.zip. He said that a form may be filled out for the serial number and key code at this page but that he didn't need it.

    Starnet is another server that is known to work and provides a demo version of the server (it runs for two hours at a time and then must be restarted).

    WinaXe is another commercial server. In email from the company they mentioned that they changed the name from X-WinPro.

    MI/X, a free server (or possibly low cost) is known not to work. It implements an outdated version of X (X11R5) and fails with this message:

    
    
            X Error: BadLength
            Request Major code 72 ()
            Error Serial #131
            Current Serial #134
    

    Two lists of X servers for MS Windows:

    VNC server for UNIX (which provides an X API) has been ported to Cygwin. With this method you would run the X VNC Server and the Windows VNC client.

    Todd has done this but has experienced problems running it (hangs of the server).

    The Cygwin Xfree group is working on a port of XFree86 to Cygwin/Windows. The versions they currently have are reported to be of pretty good quality.

  17. How do I play?

    1. Start your X Server if you're running a version that requires one
    2. If you're going to play against the AI or are going to host the game you need to start the server. Select Civserver from Start->Programs->Freeciv. Select '(do not announce game on metaserver)' if you do not want your game to show up on the metaserver (so people you don't know can't connect to you and play) otherwise select the just Civserver.
    3. If you started the server, decide how many total players (AI and human you want). Then type in the server window 'set aifill= number'. For example, if I wanted to play against four AI players, I'd type 'set aifill=5' (one for me and four AI players).
    4. Start the Civclient from Start->Programs->Freeciv.
    5. If you're running the server, go back to the server window and type 'start' as soon as all players have connected (if you're just playing against the AI, then do it as soon as you've started the client).
    6. Now go back to the client and select your nation and name and start playing!
    7. To save the game, go back to the server window and type 'save filename'.

  18. It's not working.

    If you're getting a "cannot open display :0" then it means the client cannot talk to the X Server running on your machine or the Server is not letting it display on the default display.

    First make sure that the X Server is really running. Then make sure the server creates Display (or Screen) number 0. The batch files that are run from the Freeciv program group have a line in them that says 'SET DISPLAY=:0'. This line tells the client to connect to the X Display number 0 on the local machine. If your X Server provides a different display number (for example, 1) then you'll need to change that line in the client batch files.

    If you get a "Your getpwuid() call failed, please report" then you can safely ignore the message. Under Cygwin this routine does not do anything and returns failure. It's not really needed under Windows.

    You can ignore any messages like "1: Could not open path/.civclientrc".



--------