Install Hasard library

Download

Stable version:

  • hasard-1.5.tar.bz2
  • MD5: 8d785a177cf10dfd5840a9bfe0f7ba5a
  • SHA-1: d91563d3a214d34ec2e9ad4c75dcd58d74c22659

Download development version using Mercurial:

hg clone http://bitbucket.org/haypo/hasard/

You can also browse the source code.

Dependencies

Compilation

Command to run on Debian as root:

apt-get install cmake make gcc python

Note: TestBigEndian module of CMake 2.6.0 doesn’t work.

Suggestions

  • Python docutils (rst2html program) used to compile the reST documentation to HTML
  • glib 2.0: RNG engine
  • OpenSSL 0.9+: RNG engines
  • GSL: RNG engine
  • gmp: gmp_mt engine

Command to run on Debian as root:

apt-get install python-docutils libglib2.0-0 openssl libgmp3-dev

Tools

  • PIL (Python Imaging Library), need by draw_pil.py program Debian package: python-imaging

Installation

Hasard library

Quick installation (prefix=/usr):

./build.sh
(cd build; sudo make install)

After the installation, you can run the unit tests using:

./run_tests.sh

If you want to install Hasard is /opt/hasard instead of /usr, use:

mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/opt/hasard ..

If you are a hacker, you may want to compile Hasard in debug mode (to include debugger symbols): use “-D CMAKE_BUILD_TYPE=Debug” option.

Python binding

To install the Python binding (“hasard” module), type:

cd python
sudo ./setup.py install

Windows

Compilation on MinGW with MSYS:

cmake -D CMAKE_BUILD_TYPE=Release -G "MSYS Makefiles" ..

Compilation on MinGW without MSYS:

cmake -D CMAKE_BUILD_TYPE=Release -G "MinGW Makefiles" ..

Status

Hasard 0.9 was tested on:

  • Ubuntu Gutsy on i386
  • Debian Etch on x86_64
  • FreeBSD7 on i386
  • Windows XP with MinGW on i386
  • Debian Etch on ppc32