This page is horribly out of date.

For quite awhile development for Egoboo has been restricted to Microsoft’s Visual Studio line of products on Windows. While these work well, they aren’t free, and that makes it harder for people to contribute to Egoboo. So I took the time this evening to get a working MinGW development environment going for Egoboo.

I chose to go with straight MinGW + MSYS, rather than a full IDE (like the Bloodshed Dev-C++ IDE) mostly because I’m already comfortable with the Make + GCC way of doing things, and I didn’t really want to learn a new IDE. No time. :)

Here are the general instructions; I’ll put links to the specific files down at the bottom.

Setting up MinGW + MSYS

For starters, go to http://www.mingw.org/ and download MinGW-5.1.3. This program will download the packages you need and install them for you. It will ask you what version you want to install; I’d go with “Current”. Also, it will ask you what components to install. You need gcc, g++, and make. You’ll need g++ if you want to build Egoboo++ (which isn’t covered in this tutorial.)

The program will download and install the packages you need; this will take awhile, depending on your connection speed.

Next, download MSYS-1.0.10. Install this, accepting the defaults until you get to the part where a White on Black text screen comes up and starts asking you questions. It’s going to ask you if you have MinGW installed, and where it’s installed. By default, MinGW will have been installed in C:\MinGW. Unfortunately, MSYS doesn’t like the “" in that path, so you’ll need to enter it as C:/MinGW.

You now have MinGW and MSYS installed, so you have a working compiler and environment to use it in. If you look in your Start Menu, you should have a MinGW folder that will have a link to MSYS. Running that will give you a text window with an funky yellow background color. That’s what you want.

From that MSYS window, run explorer .. (Make sure you get that dot in there.) That will open a Folder window that takes you to where you can find things in MSYS. Leave that open, you’ll need it for the next step.

Setting up SDL and SDL_ttf

Now, you’ll need the SDL library and headers. There are two ways to do this, the easy way, and the proper way.

The easy way is download this file: SDL-mingw.zip and extract it into your MinGW folder (normally C:\MinGW). The zip file contains files that will go into your mingw/bin, mingw/lib, and mingw/include directories. If you choose to do that, skip ahead to “Building Egoboo”, ’cause I did the SDL stuff for you. :)

Just in case you need to know how I set the SDL stuff up, here ya go. Go to http://www.libsdl.org/ and download the SDL-devel-1.2.11-mingw32.tar.gz package. Save it to the folder that you opened in the previous step.

Now go back to the MSYS window, and run the following commands, one after the other:

$ tar xzf SDL-devel-1.2.11-mingw32.tar.gz
$ cd SDL-1.2.11
$ cp -rv bin include lib share /mingw
$ ln -sf /mingw/bin/i386-mingw32msvc-sdl-config /mingw/bin/sdl-config

SDL is now installed properly for MinGW. You should be able to run

$ sdl-config --cflags

and it will spit out something like this:

-L/usr/local/cross-tools/i386-mingw32msvc/lib -lmingw32 -lSDLmain -lSDL -mwindows

That means it’s working right.

The include path listed there is wrong, but we copied the files into the main mingw include and lib directories, so it doesn’t really matter for our purposes.

Almost there! Now we need SDL_ttf. SDL_ttf doesn’t exactly ship ready to go MinGW, but MinGW is smart enough to figure out how to use it anyway. Get SDL_ttf from http://www.libsdl.org/projects/SDL_ttf/, and unzip it somewhere. Now, copy the following files from your SDL_ttf directory into your MinGW one:

SDL_ttf.h   --> C:\MinGW\include
SDL_ttf.dll --> C:\MinGW\bin
SDL_ttf.lib --> C:\MinGW\lib

And finally, rename SDL_ttf.lib to libSDL_ttf.a in your MinGW\lib directory. That’s enough to trick MinGW into using it.

Building Egoboo 2.x

Now, you’re ready to build Egoboo. Download the latest source release from this site, and unzip it into your MSYS home directory. (That’s the folder we opened way earlier). The latest source will already have the makefiles you need.

Now, in that MSYS window, do this:

cd src
make

And Egoboo will build. You’ll be left with a file called “egoboo2x.exe” in the src directory. Copy that to you Egoboo install, and away you go!

Here are direct links to the files you want (at the time of this writing).