
COMPILING (Linux)
=================

Note: this section deals with compiling the Linux binary.
For information on compiling for Windows and MacOS X, see below.


Dependencies:

1. C++ compiler (GNU's G++) and associated tools
   packages: g++ binutils

2. GNU make
   package: make

3. FLTK 1.3
   website: http://www.fltk.org/
   package: libfltk1.3-dev

   You may also need: libxft-dev
                      libxinerama-dev
                      libfontconfig-dev
                      libjpeg-dev
                      libpng-dev

4. OpenGL
   (recommended but not strictly necessary, see below)

5. zlib
   website: http://www.zlib.net/
   package: zlib1g-dev

6. XDG Utils
   (only needed for Linux, to install the desktop and icon files)
   package: xdg-utils


Assuming all those dependencies are met, then the following shell
command will build the Eureka binary. (the '>' is just the prompt)

   > make


Some systems may need additional CFLAGS and/or LDFLAGS in order
to find the required libraries (especially FLTK).  For example,
the following is reported to work for Gentoo Linux:

   CFLAGS  += -I/usr/include/fltk-1
   LDFLAGS += -L/usr/lib64/fltk-1/


OpenGL is used to greatly speed up the 2D and 3D views, however
Eureka still supports software-only rendering as a compile-time
option.  You will need to edit the Makefile and disable OpenGL
support -- look for the line containing NO_OPENGL and uncomment
that line, and remove all GL libraries from the build.



INSTALLING (Linux)
==================

First make sure the Eureka binary was compiled successfully.

Then become root (via the 'sudo' or 'su' command) and enter the
following shell command:

   > make full-install

That will install the eureka binary, definition files for various
games and source ports, and the desktop and icon files.

There is also a plain "install" target which does not run the
XDG utilities (which install the desktop and icon files).



COMPILING (Windows)
===================

The official windows executable is built using a "cross compiler"
under Linux, using the MingW-w64 tools.

Sorry but compiling Eureka under Windows itself is not currently
supported.  If you want to do this, you will have to figure it
out on your own.


Dependencies:

1. C++ cross compiler and tools
   package: mingw-w64

2. GNU make
   package: make

3. FLTK 1.3.5
   website: http://www.fltk.org/


The FLTK library must be in a directory called "lib_win32" with the
name "fltk-1.3.5" (it can be a symlink to the actual location), and
it needs to be cross-compiled with MingW-w64.  Our makefile assumes
that FLTK was compiled to use its internal copies of the zlib, png
and jpeg libraries.  FLTK has some information on cross-compiling
in the "README.CMake.txt" document.

Assuming all those dependencies are met, then the following shell
command will build the Eureka binary. (the '>' is just the prompt)

   > make -f Makefile.xming



COMPILING (MacOS X)
===================

Compiling the MacOS X binary requires Xcode 4.

See the documents in the osx/ folder for more information.



SETTING UP Eureka
=================

Eureka requires an IWAD file from one of the supported games, for
example "doom2.wad".  Eureka will look for IWADs when it starts up,
but if it cannot find any then the 'Manage Wads' dialog will open
and you can browse for an IWAD file there, which will be remembered
for next time.

Places where Eureka looks for IWADs:

  1. The "iwads" directory in Eureka's home directory.  In Linux
     this will be "~/.eureka/iwads".  It is created automatically
     the first time Eureka is run (though there is no harm in
     creating it yourself).

  2. (a) In Linux: /usr/share/games/doom
     (b) In Windows: C:\DOOM and C:\DOOM2

  3. If you run Eureka from the command line and have the DOOMWADDIR
     or DOOMWADPATH environment variables set, then Eureka should find
     it the specified directory.

  4. If running from the command line, Eureka will look in the current
     directory for the IWAD.

  5. You can specify the IWAD file directly with the --iwad option.

