3. Installation

Learn how to install EZ-Draw on GNU/Linux (Ubuntu, Debian, Fedora, etc.), on Mac OS X or Windows, all versions.

3.1. Ubuntu or Debian

First install the development packages: open a terminal and type (or copy-paste):

sudo apt-get install libx11-dev x11proto-xext-dev libxext-dev

Download the file EZ-Draw-1.2-pre4.tgz with your web browser, save the file, then move it into your home directory using the file manager. Next, type in the terminal:

tar xvfz EZ-Draw-1.2-pre4.tgz
cd EZ-Draw-1.2-pre4
make all

After a few moments, modules EZ-Draw, demos and games are compiled. To run demo-01, type in the terminal:

./demo-01

and so on for the other demos and games. Next, read the tutorial.

3.2. Fedora

First install the development packages: open a terminal and type (or copy-paste):

sudo yum install gcc libX11-devel libXext-devel xorg-x11-fonts-misc

then type y to validate.

Download the file EZ-Draw-1.2-pre4.tgz with your web browser, save the file, then move it into your home directory using the file manager. Next, type in the terminal:

tar xvfz EZ-Draw-1.2-pre4.tgz
cd EZ-Draw-1.2-pre4
make all

After a few moments, modules EZ-Draw, demos and games are compiled. To run demo-01, type in the terminal:

./demo-01

and so on for the other demos and games. Next, read the tutorial.

3.3. Mac OS X

First install XCode, the development environment for Mac OS X, from Apple Store or from the installation DVD. This manipulation will install at the same time gcc, make, and X11 libraries.

Download the file EZ-Draw-1.2-pre4.tgz with your web browser, save the file, then move it into your home directory using the Finder.

Note:

with some web browser (Safari), the file is directly uncompressed as file EZ-Draw-1.2-pre4.tar. If this is not the case, uncompress the file by typing in the terminal:

gunzip EZ-Draw-1.2-pre4.tgz

Next type in the terminal:

tar xvf EZ-Draw-1.2-pre4.tar
cd EZ-Draw-1.2-pre4
make all
Note :

on some versions of Mac OS X it is possible to have an error message of this kind:

ld: warning: in xxx.o, file was built for i386 which is not the
   architecture being linked (x86_64)
Undefined symbols: ...
ld: symbol(s) not found
collect2: ld returned 1 exit status

In this case, edit the Makefile line 7 and add -m32 at the end:

CC = gcc -m32

then type in the terminal:

make clean all

After a few moments, modules EZ-Draw, demos and games are compiled. To run demo-01, type in the terminal:

./demo-01

and so on for the other demos and games; or double-click the icons in the Finder.

Note:
On earlier versions of Mac OS 10.5, it might be necessary to open an xterm before (so as the X server to be started).

Next, read the tutorial.

3.4. Other Unices

Download the file EZ-Draw-1.2-pre4.tgz with your web browser, save the file, then move it into your home directory using the file manager. Next, type in the terminal:

gunzip EZ-Draw-1.2-pre4.tgz
tar xvf EZ-Draw-1.2-pre4.tar
cd EZ-Draw-1.2-pre4
make all
Note:

in case of errors at compile time, make sure you have on your system:

  • bash
  • gcc and development files .h
  • make (GNU version)
  • X11 development version: check for Xlib.h (probably in /usr/include/X11), for libX11.so (probably in /usr/X11R6/lib or /usr/lib), and for libXext.so (same place).

After a few moments, modules EZ-Draw, demos and games are compiled. To run demo-01, type in the terminal:

./demo-01

and so on for the other demos and games. Next, read the tutorial.

3.5. Windows

Download the file EZ-Draw-1.2-pre4.tgz with your web browser and save the file.

Next, uncompress the file, for example with the free software 7-Zip:

  1. get 7-Zip on http://www.7-zip.org then install it;
  2. in the file manager, right-click on EZ-Draw-1.2-pre4.tgz, menu 7-Zip ‣ Extract here then again on EZ-Draw-1.2-pre4.tar.
  3. You can then leave this folder on the desktop, or drag it in “My Documents” for example.

Install MinGW (“Minimal GNU for Windows”) to get gcc and GNU make :

  1. go to: http://sourceforge.net/projects/tdm-gcc/ ;
  2. click on “Download tdm-gcc-xxx.ex”, wait, then click on “Save file”.
  3. Double-click on the file, then click on “Run”: the installation window appears.
  4. Click on “Create”, then “MinGW/TDM (32-bit)”, “Next”.
  5. Leave “Installation Directory” as c:\MinGW32, click on “Next”.
  6. Select a mirror, for example “[Europe - France] Free France”, then “Next”.
  7. Select the installation “TDM-GCC Recommended, C/C++” then click on “Install”.
  8. When the installation is “Completed successfully”, click “Next” then “Finish”.
  9. If a terminal was open, close it now.

Open a new terminal:

  • On Windows 8, bring up the sidebar to the right of the screen, click on “Search”, then “Command Prompt”;
  • On Windows 7 or earlier versions, click on Start ‣ All programs ‣ Accessories ‣ Command Prompt.

Still in your terminal, go into the directory EZ-Draw-1.2-pre4 by typing :

cd c:\realpath\EZ-Draw-1.2-pre4

replacing c:\realpath\EZ-Draw-1.2-pre4 by the actual path. To know, just drag the folder icon EZ-Draw-1.2-pre4 in the terminal.

Compile by typing:

make all
Note:

If the compilation fails and you get the error message “The specified path was not found”, you must change the PATH, by typing in the terminal:

set PATH=c:\MinGW32\bin;%PATH%

After a few moments, modules EZ-Draw, demos and games are compiled. To run demo-01, type in the terminal:

demo-01

and so on for the other demos and games.

Next, read the tutorial. To edit examples, install GVim for instance, see http://www.vim.org .

Note:
I did not test other compiler. If it is your case, thanks to share the informations with me so I can complete this document.

3.6. Tested Environments

Tested on:

  • Linux Debian and Ubuntu on i86 (intel 32 bits)
  • Linux Ubuntu on x86_64 (intel Xeon/AMD, 64 bits)
  • Linux Raspbian on Raspberry Pi
  • Linux Xandros on Eee-PC
  • Linux Fedora 20 on x86_64 with Virtualbox
  • MacOS X 10.9, 6, 5, 4 on Mac (intel 32 bits)
  • Solaris on Sun
  • Windows XP on PC and on VirtualBox
  • Windows Vista 64 bits with MinGW 32 bits
  • Windows 7 32 bits on PC and on VirtualBox
  • Windows 8 32 bits on Virtualbox

3.7. Changes

1.2 : october 2013, march 2014

  • rewrite Windows timers
  • rewrite documentation using Sphinx
  • translate whole project in english
  • integration of Doodle game by Julien Prudhomme

1.1 : april-june 2013

  • ez-image.c : integration of Benoit Favre’s code and stb_image.c
  • display images in windows using AlphaBlend() and -lmsimg32
  • add ez_get_time, ez_HSV_to_RGB, ez_get_HSV
  • update tutorial
  • renumbering demos 0..8b -> 1..10, rewriting
  • new demos 11..17
  • update snapshots
  • remplace DEBUG by environment variables
  • add pixmaps for display speed
  • Window -> Ez_window

1.0 : june-october 2011

  • split demo8a/demo8b ; update tutorial
  • improve jeu-sudoku, jeu-nim
  • rewrite demo5, demo7
  • ez_error, ez_error_handler
  • ez_win_destroy, ez_win_destroy_all
  • games : taquin, bubblet, ezen, heziom, tangram
  • snapshots : web page, tutorial

1.0-rc5 : june 2010

  • client-data : ez_set_data, ez_get_data
  • jeu-sudoku.c : MVC pattern, space for resolution
  • store windows informations with struct Ez_win_info
  • windows list, delayed show
  • ez_state : check order and unicity of calls ez_init, ez_main_loop
  • meets -Wall -W -ansi -pedantic and -std=c99

0.9 : jully 2009

  • index in xhtml 1.0 strict + css 2.1

0.9 : april - may 2009

  • ez_random, ez_set_thick, ez_draw_triangle, ez_fill_triangle
  • ez_window_show
  • keys ctrl and alt on windows (to improve)
  • update : demo2.c, demo3.c, demo6.c, tutorial
  • jeu-vie.c
  • Birth of EZ-Draw-GTK

0.8 : march - april 2009

  • Manage timers, demo8.c
  • Add a timer in jeu-nim.c
  • 3D maze with Z-buffer and animations (jeu-laby.c)

0.7 : march 2009

  • Double display buffer for X11 and Windows
  • On X11, compile everything with: -lX11 -lXext
  • game of Nim (jeu-nim.c)
  • Birth of EZ-Draw++ for C++, by Eric REMY

0.6 : june-jully 2009, correction in january 2009

  • Adaptation to Windows

0.2 .. 0.5 : may 2008

  • X11 only

0.1 : may 2008

  • birth of the project for X11

3.8. Contributors