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

This document explains how to download the latest version of the xu4 source code from CVS and how to compile it.
The paths used are just examples; you can change them if you want, as long as you're consistent.

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

1. Download and install MinGW from:
   http://prdownloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe

2. Download and install MSYS from:
   http://prdownloads.sourceforge.net/mingw/MSYS-1.0.9.exe

3. Download and install MSYSDTK from:
   http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe

4. Download the SDL binaries & headers from:
   http://exult.sourceforge.net/snapshots/exult_sdl_win32.zip

5. Download the libpng,libxml and zlib binaries & headers from:
   http://xu4.sourceforge.net/xu4_dev_win32.zip

6. Extract libpng,libxml and zlib binaries & headers to mingw directory

7. Start MSYS

8. Change to the directory where you want xu4 cvs 
   ie cd C:/

9. 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

10. Extract SDL binaries & headers to src directory of xu4 source code

11. Change to src directory of xu4 source code
   ie cd C:/u4/src

12. Open makefile.mingw in a text editor and change C:/xu4 to the directory you want xu4 to be installed to.
   ie C:/Games/Ultima4

13. Compile xu4
   make -f makefile.mingw install

14. Compile xu4 tools (Optional)
   make -f makefile.mingw tools

15. Exit MSYS and enjoy xu4!

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

1. Start MSYS

2. Change to xu4 source code directory
   ie cd C:/u4

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

4. Change to src directory of xu4 source code
   cd src

5. Compile and install xu4
   make -f makefile.mingw clean
   make -f makefile.mingw install

6. Compile and install xu4 tools (Optional)
   make -f makefile.mingw tools

7. exit MSYS
