Compiling for Mac OS X (UFO2000)

From UFOpaedia
Revision as of 15:36, 21 September 2008 by Lonevvolf (talk | contribs) (New page: ==Introduction== It is possible to run UFO2000 on an Intel-based Mac, running Mac OS X Leopard (other configurations have not yet been tested). With minimal knowledge of file editing and...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

It is possible to run UFO2000 on an Intel-based Mac, running Mac OS X Leopard (other configurations have not yet been tested). With minimal knowledge of file editing and the Terminal, you can compile your own version of UFO2000, and run it natively, without the need for emulators or virtual machines. Simply follow the steps below. It is fully functional, though I have not been able to add in support for music.

Requirements

In order to complete the process, you will need the following software installed:

  • XCode development environment

This can be obtained directly from [[1]]

  • A text editor of your choice (XCode itself can also be used)
  • Access to an administrator account on your machine

You will be required to enter the password for a few items

All other requirements will be downloaded in the process of compilation.

HawkNL

UFO2000 requires a networking library called HawkNL. As there is no Mac binary available, you will have to compile this first.

  • Download the source for version 1.68 from http://www.hawksoft.com/download/. Version 1.7 beta 1 will NOT work!
  • Extract the zip file
  • Navigate to the extracted data in the Finder, and open src/sock.c. Change line 93:

typedef int socklen_t; to read //typedef int socklen_t; Save the file.

  • Open a Terminal window, and navigate to the folder where you extracted the zip file. Type the following:

cd src make -f makefile.osx sudo make -f makefile.osx install (type the admin password when prompted)

This will install the HawkNL libraries, for use in the next steps.

Allegro

UFO2000 also requires the Allegro libraries. Like HawkNL, there is no Mac binary available. You must compile this as well.

     chmod +x fix.sh
     ./fix.sh macosx

make depend make sudo make install (type the admin password when prompted)

UFO2000

So now we're ready to compile UFO2000 itself. First, you will have to get the source code for the program. The best thing to do, is get the latest code directly from Subversion. This also has folders for specific releases, if you would like to compile the past releases.