Install/Windows (MSYS)
From Agar
The recommended way of compiling Agar natively under Windows is using MSYS. MSYS provides the basic environment needed to support the ./configure script and the build system. The libraries produced are native and independent of MinGW.
Contents |
Installing MinGW / MSYS
Installing the base MinGW components if you don't already have MSYS installed. To faciliate this task, you can download the Automated MinGW Installer from: http://sourceforge.net/project/showfiles.php?group_id=2435.
Then get the MSYS installer from the MinGW download area (http://www.mingw.org/download.shtml), and proceed with the installation. You will probably want to install the gdb package as well if you are going to be developing applications.
Fixing the MSYS shell under Windows x64
If you are using Windows x64, as of version 1.0.10 of MSYS, the following fix is needed for the MSYS shell to start properly:
Locate the MSYS.BAT file in the MSYS installation directory (by default C:\MSYS\1.0), and open it up in a text editor.
Right after the ":_WindowsNT" label (line 36). Paste the following code:
if not "x%PROCESSOR_ARCHITECTURE%" == "xAMD64" goto _NotX64 set COMSPEC=%WINDIR%\SysWOW64\cmd.exe %COMSPEC% /c %0 %1 %2 %3 %4 %5 %6 %7 %8 %9 goto EOF :_NotX64
Installing SDL (Optional)
The SDL library is needed if you want to use the sdlfb and sdlgl drivers. Download the latest release from the SDL 1.2 series, compile and install the library:
$ tar -xzf SDL-1.2.x.tar.gz $ cd SDL-1.2.x $ ./configure && make && make install
Installing FreeType (Optional / Recommended)
FreeType is needed for high-quality, antialiased font rendering. If FreeType is unavailable, Agar will revert to rendering text using a built-in, monospace bitmap font. Download the latest source package of the 2.1 series (or later, if you're adventurous) from the freetype download area, and install:
$ tar -xzf freetype-2.1.x.tar.gz $ cd freetype-2.1.x $ ./configure && make && make install
Installing Pthreads (Optional / Recommended)
Multithreaded support in Agar requires the POSIX threads API. POSIX threads are supported natively by all modern, decent operating systems. Under Windows, you must use a small library named Pthreads-win32.
Go to the Pthreads-win32 download area, get the latest version (pthreads-w32-2-x-x-release.exe) and extract to in some temporary location. In the Pre-built.2 directory, locate the \lib and \include subdirectories and copy their contents, respectively, to your MSYS library and include paths (for example C:\Msys\1.0\local\lib and C:\Msys\1.0\local\include, or /local/lib and /local/include inside of MSYS).
Copy the DLL files (or at least PthreadVC2.DLL) from the lib\ subdirectory to your C:\Windows\System (or C:\Windows\SysWOW64 with Windows x64).
Installing Agar
At this point, you should be ready to compile and install Agar. Go to the Agar source directory and issue:
$ ./configure && make && make install
Note: If you've compiled Agar with threads support, make sure pthreads is working by passing the --enable-threads option to ./configure, so that configure will fail if there is a problem with it.

