About Me

My photo
Charleston, South Carolina, United States
Computer Science undergraduate student (Senior) at the College of Charleston.

Labels

Wednesday, February 2, 2011

Building Freeciv

Why in the world am I building a strategy game such as Freeciv?  Its not because I'm bored and enjoy playing Sid Meier's Civilization knock offs.  No, that is what I have Call of Duty for.  Its because its a class exercise/requirement.  Getting the code, building it and running the game took me a total of 58 minutes.  So this was relatively easy compared to readying my computer for contributing to OpenMRS.  Checking the code out was easy enough.  I already have subversion and have been using it often.  Installing the requirements for Freeciv (which were indicated in the install file) was the next step.  The only difficult part about this was figuring out the actual name of what I needed to install.  For example the file states that you need gtk+.  But the name of the actual package is libgtk2.0-dev.

After getting all the side requirements I next attempted to run the configure script.  This failed a couple of times due to missing dependencies.  One such dependency was 'libcurl'.  So I attempted to sudo apt-get install libcurl but of course this didn't work.  Turns out that the actual name of the package is libcurl4-gnutls-dev.  This is one area where I really think OpenMRS has the right idea for building projects.  OpenMRS uses maven for building the code and it (I believe) handles dependency issues for you.  While building OpenMRS, I did not have to go out and download a single dependency, external to the maven build process.  So in this sense, building the OpenMRS project was more simple.  The hard part for me with OpenMRS was spending hours configuring MySQL and Tomcat.

After successfully running the configure script I turned my attention to running the make command on the project.  The online reference book displayed a very powerful (and dare I say cool?) way of doing this.  Here is the command

make 1>/tmp/freeciv-make.out 2>/tmp/freeciv-make.err &

This command puts the process in the background, redirects error messages to freeciv-make.rr and redirects the rest of the output to freeciv-make.out.  This is such a useful command.  I'm used to scrolling through the terminal, attempting to find the error messages and decipher what went wrong.  I'll have to svn commit this to memory (ha, subversion humor).

No comments:

Post a Comment