1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
= Installation Guide
== Requirements
Ruby/GD requires version 1.6.0 or later of the gd library, and
Ruby-1.4.0 or later.
The latest version of gd is available from:
http://www.boutell.com/gd/
The latest version of Ruby is available from:
http://www.ruby-lang.org/
To build the extension library, at least the following libraries
must be correctly installed in your system.
* libpng
* zlib
= Install
1. To generate the Makefile with which Ruby/GD is build, issue this
command from your prompt:
ruby extconf.rb [options...]
The following options can be specified:
* --with-xpm
If your gd has support for XPM format images, add this option. Note
that libX11 and libXpm must be correctly installed in your system.
* --with-ttf
If your gd has support for TrueType fonts, add this option. Note that
Freetype library must be correctly installed in your system.
* --with-freetype
If you want use the newest feature of font rendering provided by
gd-1.8.4, add this option along with '--with-ttf'.
Note that Freetype library must be correctly installed in your system.
* --with-jpeg
If your gd has support for JPEG format images, add this option. Note that
libjpeg-6b or later must be correctly installed in your system.
* --with-gd-include=[dir], --with-gd-lib=[dir]
You can specify explicitly the location in which gd library is
installed.
EXAMPLE
the case libgd.a and header files exist in "/home/foo/gd-1.8.4":
$ ruby extconf.rb --with-gd-include=/home/foo/gd-1.8.4 --with-gd-lib=/home/foo/gd-1.8.4
* --enable-gd2_0
If you want to use the newest features (support for truecolor
images, alpha channels, etc.) provided by gd-2.0.x from Ruby/GD,
add this option. gd-2.0.x must be correctly installed on your system.
2. Build the extension library
issue this command:
$ make
If successful, the library named "GD.so" is generated.
3. Install in your system
type (if needed, as superuser)
# make install
or,
# make site-install
and GD.so will be correctly installed in your system. This finishes
the installation.
|