Install/Windows (Cygwin)

From Agar

Jump to: navigation, search

Although it is slower than MSYS, Cygwin is still the recommended environment for producing native MinGW32 builds of Agar. Users of the SVN sources will almost always want to use Cygwin, since MSYS requires some work-arounds that are only included in the official source .zip (e.g., renaming INSTALL to INSTALL.txt, etc.)

Contents

Installing Cygwin

Before you continue, make sure that your Cygwin installation is up to date. Execute the Cygwin setup.exe and check that at least the following packages are enabled:

  • Devel / gcc-mingw-core
  • Devel / mingw-runtime
  • Devel / make

The following packages are optional but recommended:

  • X11 / libfreetype2 (highly recommended)
  • Graphics / libjpeg-devel
  • Graphics / libpng12-devel
  • Interpreters / perl (needed for concurrent building)

Installing the MinGW cross-compiler

Formerly, the ./configure script would set the "-mno-cygwin" compiler flag to prevent dependencies against Cygwin. As of recently, this flag has been removed, and the MinGW cross-compiler should be used instead.

Refer to the cross-compiler installation guide: http://www.mingw.org/wiki/LinuxCrossMinGW.

Installing SDL (Optional)

If you wish to use the sdlfb and sdlgl drivers, the SDL library is needed. Download the latest SDL 1.2 release and install via Cygwin using:

 $ tar -xzf SDL-1.2.x.tar.gz
 $ cd SDL-1.2.x
 $ ./configure && make && make install

Installing Agar

The standard Unix compilation and installation method applies. Say you have installed the MinGW cross-compiler in $HOME/mingw32, you can then compile Agar using:

 $ env CC=$HOME/mingw32/bin/i686-pc-mingw32-gcc CFLAGS="-O2 -g" \
     ./configure

You can also build Agar in a separate directory from the source directory (here /path/to/src), using:

  $ mkdir w-agar
  $ cd w-agar
  $ env CC=$HOME/mingw32/bin/i686-pc-mingw32-gcc CFLAGS="-O2 -g" \
      /path/to/src/configure --srcdir=/path/to/src
Personal tools