=====================================
How to Compile xu4 from CVS in MacOSX
=====================================

-------------------------------
Things you only have to do once
-------------------------------

1. Download and install the latest MacOSX developer tools from:
   http://developer.apple.com/

2. Grab SDL-devel-1.2.6.pkg.tar.gz from http://www.libsdl.org/download-1.2.php
   Unpack and install it.

3. Grab SDL_mixer-devel-1.2.5.pkg.tar.gz from
   http://www.libsdl.org/projects/SDL_mixer/
   Unpack and install it.

4. Grab gnome-combo-20031108.dmg.gz from
   http://www.zveno.com/open_source/libxml2xslt.html
   Unpack and open the .dmg. Copy the libiconv and libxml frameworks into
   ~/Library/Frameworks

5. Start the Terminal app (usually in /Applications/Utilities)

6. Change to the directory where you want XU4 cvs
   e.g. cd ~/

7. Check out the current xu4 cvs source code
   cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xu4 login
   Just press enter when it asks for password
   cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/xu4 co u4

8. Change to the src directory of the XU4 source code
   i.e. cd u4/src

9. Copy the files SDLMain.h and SDLMain.c into the 'macosx' dir
   cp "/Developer/ProjectBuilder Extras/Project Templates/Application/SDL Application"/SDLMain.* macosx

9. Compile xu4 
   make -f Makefile.macosx install

10. Download the Ultima IV data files and gfx update (if desired) and copy
    them into the appropriate location:
    cp (wherever_you_put_ultima4.zip) ../xu4.app/Contents/Resources
    cp (wherever_you_put_u4upgrad.zip) ../xu4.app/Contents/Resources

------------------------------------------------------------
Things you have to do every time the xu4 source code changes
------------------------------------------------------------

1. Start the Terminal app

2. Change to the xu4 directory
   e.g. cd u4

3. Checkout the latest changes from CVS
   cvs update -d

4. Change to the source directory
   cd src

5. Compile xu4
   make -f Makefile.macosx clean
   make -f Makefile.macosx install

6. If you have moved or deleted the old application bundle, it may be
   necessary to copy the Ultima IV data files and update into the bundle
   again:
   cp (wherever_you_put_ultima4.zip) ../xu4.app/Contents/Resources
   cp (wherever_you_put_u4upgrad.zip) ../xu4.app/Contents/Resources

