rmagick 1.15.17 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (108) hide show
  1. data/ChangeLog +78 -25
  2. data/README.html +117 -188
  3. data/README.txt +116 -181
  4. data/build_tarball.rake +205 -0
  5. data/doc/comtasks.html +2 -2
  6. data/doc/constants.html +118 -44
  7. data/doc/draw.html +57 -99
  8. data/doc/ex/adaptive_threshold.rb +1 -10
  9. data/doc/ex/add_noise.rb +4 -5
  10. data/doc/ex/axes.rb +1 -1
  11. data/doc/ex/bilevel_channel.rb +2 -13
  12. data/doc/ex/bounding_box.rb +3 -4
  13. data/doc/ex/channel.rb +6 -7
  14. data/doc/ex/clip_path.rb +11 -5
  15. data/doc/ex/color_histogram.rb +8 -20
  16. data/doc/ex/composite_layers.rb +53 -0
  17. data/doc/ex/fill_pattern.rb +26 -0
  18. data/doc/ex/get_multiline_type_metrics.rb +26 -37
  19. data/doc/ex/get_type_metrics.rb +25 -25
  20. data/doc/ex/images/notimplemented.gif +0 -0
  21. data/doc/ex/level.rb +1 -1
  22. data/doc/ex/matte_floodfill.rb +5 -6
  23. data/doc/ex/matte_replace.rb +5 -6
  24. data/doc/ex/negate_channel.rb +0 -10
  25. data/doc/ex/opacity.rb +3 -5
  26. data/doc/ex/polaroid.rb +4 -1
  27. data/doc/ex/posterize.rb +1 -12
  28. data/doc/ex/preview.rb +1 -8
  29. data/doc/ex/radial_blur.rb +1 -11
  30. data/doc/ex/raise.rb +1 -4
  31. data/doc/ex/random_threshold_channel.rb +4 -9
  32. data/doc/ex/sepiatone.rb +2 -9
  33. data/doc/ex/shadow.rb +12 -18
  34. data/doc/ex/sketch.rb +2 -9
  35. data/doc/ex/smile.rb +7 -7
  36. data/doc/ex/splice.rb +3 -10
  37. data/doc/ex/stegano.rb +5 -0
  38. data/doc/ex/threshold.rb +2 -2
  39. data/doc/ex/transpose.rb +1 -8
  40. data/doc/ex/transverse.rb +1 -8
  41. data/doc/ex/trim.rb +1 -2
  42. data/doc/ex/viewex.rb +4 -5
  43. data/doc/ex/vignette.rb +1 -8
  44. data/doc/ex/watermark.rb +1 -0
  45. data/doc/ex/wet_floor.rb +8 -14
  46. data/doc/ilist.html +301 -110
  47. data/doc/image1.html +362 -258
  48. data/doc/image2.html +429 -286
  49. data/doc/image3.html +418 -192
  50. data/doc/imageattrs.html +100 -39
  51. data/doc/imusage.html +26 -21
  52. data/doc/index.html +52 -93
  53. data/doc/info.html +160 -64
  54. data/doc/magick.html +37 -71
  55. data/doc/optequiv.html +155 -61
  56. data/doc/rvg.html +3 -3
  57. data/doc/rvgclip.html +2 -2
  58. data/doc/rvggroup.html +2 -2
  59. data/doc/rvgimage.html +3 -3
  60. data/doc/rvgpattern.html +3 -3
  61. data/doc/rvgshape.html +2 -2
  62. data/doc/rvgstyle.html +2 -2
  63. data/doc/rvgtext.html +2 -2
  64. data/doc/rvgtspan.html +4 -4
  65. data/doc/rvgtut.html +4 -4
  66. data/doc/rvguse.html +3 -3
  67. data/doc/rvgxform.html +2 -2
  68. data/doc/struct.html +26 -29
  69. data/doc/usage.html +99 -48
  70. data/examples/crop_with_gravity.rb +46 -0
  71. data/examples/demo.rb +2 -2
  72. data/examples/histogram.rb +11 -11
  73. data/examples/identify.rb +45 -45
  74. data/examples/spinner.rb +3 -2
  75. data/ext/RMagick/MANIFEST +7 -8
  76. data/ext/RMagick/extconf.rb +242 -0
  77. data/ext/RMagick/rmagick.h +136 -222
  78. data/ext/RMagick/rmdraw.c +226 -229
  79. data/ext/RMagick/rmfill.c +69 -118
  80. data/ext/RMagick/rmilist.c +234 -94
  81. data/ext/RMagick/rmimage.c +1719 -2564
  82. data/ext/RMagick/rminfo.c +433 -619
  83. data/ext/RMagick/rmmain.c +249 -487
  84. data/ext/RMagick/rmutil.c +344 -563
  85. data/lib/RMagick.rb +414 -358
  86. data/lib/rvg/clippath.rb +2 -2
  87. data/lib/rvg/container.rb +2 -2
  88. data/lib/rvg/describable.rb +2 -2
  89. data/lib/rvg/embellishable.rb +2 -2
  90. data/lib/rvg/misc.rb +3 -3
  91. data/lib/rvg/paint.rb +2 -7
  92. data/lib/rvg/pathdata.rb +2 -2
  93. data/lib/rvg/rvg.rb +2 -2
  94. data/lib/rvg/stretchable.rb +2 -14
  95. data/lib/rvg/stylable.rb +2 -2
  96. data/lib/rvg/text.rb +2 -2
  97. data/lib/rvg/transformable.rb +2 -2
  98. data/lib/rvg/units.rb +2 -2
  99. data/{metaconfig.in → metaconfig} +0 -1
  100. data/post-setup.rb +1 -1
  101. data/rmagick.gemspec +6 -9
  102. metadata +41 -49
  103. data/Makefile.in +0 -42
  104. data/configure +0 -12358
  105. data/configure.ac +0 -791
  106. data/ext/RMagick/extconf.rb.in +0 -25
  107. data/ext/RMagick/rmagick_config.h.in +0 -285
  108. data/gem_extconf.rb +0 -42
data/README.txt CHANGED
@@ -1,6 +1,6 @@
1
- RMagick 1.15.17 README
1
+ RMagick 2.0.0 README
2
2
  ================================
3
- 12/05/08
3
+ 12/27/07
4
4
  --------
5
5
 
6
6
  Table Of Contents
@@ -8,11 +8,10 @@ Table Of Contents
8
8
 
9
9
  * [Introduction] [intro]
10
10
  * [Contact Information] [contact]
11
+ * [What's new?] [new]
11
12
  * [Prerequisites] [prereq]
12
- * [Tips for installing and configuring ImageMagick and GraphicsMagick] [tips]
13
13
  * [Installing RMagick] [install]
14
14
  + [Configuration options] [options]
15
- + [Running the configure and make scripts] [scripts]
16
15
  * [Things that can go wrong] [uhoh]
17
16
  * [Upgrading] [upgrade]
18
17
  * [Uninstalling] [uninstall]
@@ -25,7 +24,7 @@ Table Of Contents
25
24
  <h2 id="intro">Introduction</h2>
26
25
 
27
26
  RMagick is an interface between the Ruby programming language and the
28
- ImageMagick and GraphicsMagick image processing libraries.
27
+ ImageMagick image processing library.
29
28
 
30
29
  <h2 id="contact">Contact Information</h2>
31
30
 
@@ -35,195 +34,133 @@ __Email:__ <rmagick@rubyforge.org>
35
34
 
36
35
  __RubyForge:__ <http://rubyforge.org/projects/rmagick/>
37
36
 
37
+ <h2 id="new">What's new?</h2>
38
+ RMagick 2.0.0 incorporates all changes and bug fixes from RMagick 1.15.12.
39
+ Additionally,
40
+
41
+ * The installation procedure is pure Ruby.
42
+ * The minimum version of Ruby is 1.8.2.
43
+ * The minimum version of ImageMagick is 6.3.0.
44
+ * GraphicsMagick is not supported.
45
+ * The following GraphicsMagick-only methods are no longer available:
46
+ Image#grayscale\_pseudo\_class, Image#statistics.
47
+ * The following deprecated methods are no longer available:
48
+ Image#random\_channel\_threshold, Image#channel\_threshold, Image#montage=,
49
+ Image#image\_type=, Image::Info#tile\_info, Image#tile\_info=,
50
+ Image::Info#tile, Image::Info#tile=, Image::Info#subimage, Image::Info#subimage=,
51
+ Image::Info#subrange, Image::Info#subrange=, Magick.set_monitor.
52
+ * The following methods have been added:
53
+ Image::Info#stroke=, Image::Info#stroke\_width= and Image::Info#undercolor=,
54
+ Draw#fill_pattern= and Draw#stroke\_pattern=, Image#destroy!, Image#destroyed?,
55
+ Image#check\_destroyed, Magick.trace\_proc, Image.combine, Image#separate,
56
+ Image#distort, Image#each\_pixel.
57
+ * Magick::MaxRGB is deprecated (but still available). Use Magick::QuantumRange
58
+ instead.
59
+ * RMagick works with the Q32 version of ImageMagick.
60
+
61
+ Various other minor bug fixes and upgrades.
62
+
38
63
  <h2 id="prereq">Prerequisites</h2>
39
64
 
40
65
  __O/S:__ Linux, Sun Solaris, Cygwin, FreeBSD, OS X.
41
66
 
42
- __Ruby__ 1.6.7 or later. You can get Ruby from <http://www.ruby-lang.org>.
43
- RVG requires Ruby 1.8.
44
-
45
- Either __ImageMagick__ 6.0.0 or later, or any release of
46
- __GraphicsMagick__. GraphicsMagick is a friendly fork of ImageMagick
47
- 5.5.1. You can get ImageMagick from <http://www.imagemagick.org>. You
48
- can get GraphicsMagick from <http://www.graphicsmagick.org>. ImageMagick
49
- and GraphicsMagick have slightly different capabilities. Please consult
50
- their web sites if you have questions.
51
-
52
- <h2 id="tips">Tips for installing and configuring ImageMagick and GraphicsMagick</h2>
53
-
54
- See <http://rmagick.rubyforge.org/install-faq.html> for the latest version
55
- of these tips.
56
-
57
- If you are installing RMagick by compiling the source code, I strongly
58
- encourage you to install the latest version of ImageMagick or
59
- GraphicsMagick _from source_. If you have never installed ImageMagick or
60
- GraphicsMagick before, I also strongly encourage you to read the
61
- README.txt file as many times as is necessary for you to understand how to
62
- configure it. ImageMagick and GraphicsMagick are large and complicated
63
- programs and can be difficult to configure. Follow these tips to minimize
64
- the amount of time you'll spend and your frustration level.
65
-
66
- _Do not_ simply type `./configure` and expect the defaults to be correct
67
- for you. Since you are installing ImageMagick/GraphicsMagick to use with
68
- Ruby, consider whether you want to skip ImageMagick's/GraphicMagick's
69
- support for Perl and C++ by using the `--without-perl` and
70
- `--without-magick-plus-plus` options. Doing so will speed up the
71
- installation process and save some disk space. You will almost certainly
72
- want to specify the `--enable-shared` and `--disable-static` options.
73
-
74
- Determine which image formats you are interested in using and make sure
75
- that you have installed the libraries that ImageMagick/GraphicsMagick uses
76
- to process these formats. ImageMagick and GraphicsMagick use additional
77
- libraries to support some image formats. If you do not install those
78
- libraries you cannot read and write those image formats. You will need to
79
- configure ImageMagick/GraphicsMagick to support the JPG, PNG, TIFF, and
80
- WMF formats in order to execute all the RMagick sample programs. See
81
- ImageMagick's or GraphicMagick's README.txt file for more information.
82
-
83
- Once you have determined the configuration options you need, run the
84
- configure script. When it completes, read the summary output to see if
85
- configuration worked the way you expected. Here's an example of the
86
- summary output from ImageMagick's configure script. Notice that the
87
- result of each option is listed in the "Configured value" column.
88
-
89
-
90
- Option Value
91
- -------------------------------------------------------------------------
92
- Shared libraries --enable-shared=yes yes
93
- Static libraries --enable-static=no no
94
- Module support --with-modules=yes yes
95
- GNU ld --with-gnu-ld=yes yes
96
- LZW support --enable-lzw=yes yes
97
- Quantum depth --with-quantum-depth=8 8
98
-
99
- Delegate Configuration:
100
- BZLIB --with-bzlib=yes yes
101
- DPS --with-dps=yes yes
102
- FlashPIX --with-fpx=yes no
103
- FreeType 2.0 --with-ttf=yes yes
104
- Ghostscript None gs (7.07.2)
105
- Ghostscript fonts --with-gs-font-dir=default /usr/share/fonts/default/Type1/
106
- Ghostscript lib --with-gslib=no no
107
- Graphviz --with-dot=yes no
108
- JBIG --with-jbig=yes no
109
- JPEG v1 --with-jpeg=yes yes
110
- JPEG-2000 --with-jp2=yes no
111
- LCMS --with-lcms=yes yes
112
- Magick++ --with-magick-plus-plus=no no
113
- PERL --with-perl=no no
114
- PNG --with-png=yes yes
115
- TIFF --with-tiff=yes yes
116
- Windows fonts --with-windows-font-dir=/mnt/windows/windows/fonts /mnt/windows/windows/fonts/
117
- WMF --with-wmf=yes yes
118
- X11 --with-x= yes
119
- XML --with-xml=yes yes
120
- ZLIB --with-zlib=yes yes
121
-
122
- X11 Configuration:
123
- X_CFLAGS = -I/usr/X11R6/include
124
- X_PRE_LIBS = -lSM -lICE
125
- X_LIBS = -L/usr/X11R6/lib
126
- X_EXTRA_LIBS =
127
-
128
- If the results are not what you wanted, install any missing libraries,
129
- choose new or different options, or whatever it takes, erase the
130
- config.cache file, and re-run `configure`. Repeat as often as necessary
131
- before moving to the `make` and `make install` steps.
132
-
133
- Detailed information about all of ImageMagick's and GraphicsMagick's
134
- configuration options may be found in their README.txt and INSTALL.txt
135
- files.
136
-
137
- #### Windows Metafile Format
138
- As noted in the ImageMagick and GraphicsMagick README.txt files, to
139
- support images in the Windows Metafile format, ImageMagick/GraphicsMagick
140
- requires an additional library. Without this library some of the RMagick
141
- sample programs will not work. ImageMagick and GraphicsMagick require
142
- libwmf 0.2.5, 0.2.7, or 0.2.2 to support the WMF format. (Avoid libwmf
143
- 0.2.6!)
144
-
145
- <h2 id="install">Installing RMagick</h2>
146
-
147
- Installing RMagick is much simpler than installing ImageMagick or
148
- GraphicsMagick. Note that the make step runs all the example programs.
149
- This process both builds the example images used in the documentation and
150
- validates your RMagick installation. This step can take 5-15 minutes
151
- depending on the speed of your computer.
67
+ __Ruby__ 1.8.2 or later. You can get Ruby from <http://www.ruby-lang.org>.
152
68
 
153
- <h4 id="options">Configuration Options</h4>
69
+ __ImageMagick__ 6.3.0 or later. You can get ImageMagick from
70
+ <http://www.imagemagick.org>.
154
71
 
155
- Type `./configure --help` to see a list of configuration options. In
156
- addition to the regular options, there are a few RMagick-specific options:
72
+ <h2 id="install">Installation</h2>
157
73
 
158
- * --with-doc-dir=_directory_
159
- > Specify the directory to install the RMagick documentation.
160
- > By default this is $prefix/share/RMagick, where $prefix is the
161
- > prefix specified by --prefix. For example, to install the
162
- > documentation in /home/user/RMagick, specify:
74
+ The installation procedure for RMagick 2.0.0 is different from that used
75
+ in earlier releases. Before installing RMagick, you must install ImageMagick.
76
+ Complete and up-to-date instructions for installing ImageMagick on Linux,
77
+ *BSD, and other *nix-type O/S's are available
78
+ at <http://rmagick.rubyforge.org/install-linux.html>, steps 0, 1, 2.
79
+ Similarly, instructions for installing ImageMagick using MacPorts
80
+ on OS X are available at <http://rmagick.rubyforge.org/install-osx.html>,
81
+ steps 1 and 2. After installing
82
+ ImageMagick, use the instructions in the next section to install RMagick.
163
83
 
164
- > `./configure --with-doc-dir=/home/user/RMagick`
84
+ <h2 id="install">Installing RMagick 2.0.0</h2>
165
85
 
166
- * --enable-allow-example-errors
167
- > Normally the documentation installation terminates if 5 examples fail.
168
- > If you use this option, the installation does not check for failing
169
- > examples and will always complete. This option is useful if you're having
170
- > trouble installing RMagick and you want to see all the failing examples.
86
+ This release of RMagick uses Minero Aoki's setup.rb script for installation.
87
+ See the next section for configuration options. Usually you do not need to
88
+ specify any of these options. You can get more information about setup.rb from
89
+ his web site <http://i.loveruby.net>
171
90
 
172
- * --disable-htmldoc (or --enable-htmldoc=no)
173
- > By default the install process runs all the RMagick example programs
174
- > and generates HTML versions of all the examples. This option causes
175
- > the install process to skip this step. No documentation is installed.
91
+ I assume you've already decompressed the tarball, or you wouldn't be reading
92
+ this. If you have not decompressed the tarball, do so with this command:
176
93
 
177
- * --with-graphics-magick
178
- > If you have both ImageMagick and GraphicsMagick installed, this option will
179
- > force RMagick to be configured with GraphicsMagick.
94
+ tar xvzf RMagick-2.0.0-tar.gz
180
95
 
181
- * --with-so-dir=_directory_
182
- > The directory for ruby extensions.
96
+ or
183
97
 
184
- * --with-ruby-path=_directory_
185
- > The path to set the !# line in Ruby scripts. The default is $prefix/bin/ruby.
98
+ tar xvjf RMagick-2.0.0-tar.bz2
186
99
 
187
- * --with-ruby-prog=_name_
188
- > The name of the Ruby executable. The default is `ruby`.
100
+ Change to the RMagick-2.0.0 directory. If you are not using any
101
+ configuration options (usually you don't need to) enter the command
189
102
 
190
- * --with-make-prog=_name_
191
- > The name of the `make` program.
103
+ ruby setup.rb
192
104
 
193
- * --with-rbconfig=_directory_
194
- > The directory of the rbconfig.rb file to use. The default is Ruby's
195
- > rbconfig.
105
+ Note that setup.rb executes all the example programs, so this can take
106
+ some time. This process both builds the example images used in the
107
+ documentation and validates your RMagick installation.
196
108
 
197
- <h4 id="scripts">Running the <code>configure</code> and <code>make</code> scripts</h4>
109
+ After this command completes, make sure you have root priviledges (that
110
+ is, login as root or use su or sudo) and enter the command
198
111
 
199
- De-compress the RMagick-1.15.17.tar.gz archive and enter the top
200
- directory. Then type:
112
+ ruby setup.rb install
201
113
 
202
- $ ./configure <configuration options>
203
- $ make
204
- ($ su)
205
- $ make install
206
- (optionally)
207
- $ make clean
114
+ <h4 id="options">Configuration Options</h4>
115
+
116
+ Type `ruby setup.rb --help` to see a list of configuration options. In
117
+ addition to the regular options, there are a few RMagick-specific options:
118
+
119
+ * --doc-dir=_directory_
120
+ > Specify the directory to install the RMagick documentation.
121
+ > By default this is $prefix/share/RMagick, where $prefix is the
122
+ > prefix specified by --prefix. For example, to install the
123
+ > documentation in /Users/me/RMagick, specify:
124
+
125
+ > `./configure --doc-dir=/Users/me/RMagick`
126
+
127
+ * --allow-example-errors
128
+ > Normally the documentation installation terminates if 5 examples fail.
129
+ > If you use this option, the installation does not check for failing
130
+ > examples and will always complete. This option is useful if you're
131
+ > having trouble installing RMagick and you want to see all the failing examples.
132
+
133
+ * --disable-htmldoc
134
+ > By default the install process runs all the RMagick example programs
135
+ > and generates HTML versions of all the examples. This option causes
136
+ > the install process to skip this step. No install verification occurs
137
+ > and no documentation is installed.
208
138
 
209
139
  <h2 id="uhoh">Things that can go wrong</h2>
210
140
 
211
- #### Can't install RMagick. Can't find libMagick or one of the dependent libraries. Check the config.log file for more detailed information.
212
- The message can also refer to "libGraphicsMagick". Typically this message means that one or more of the libraries that Imagemagick/GraphicsMagick depends on hasn't been installed. Examine the config.log file in the installation directory for any error messages. These messages typically contain enough additional information for you to be able to diagnose the problem.
141
+ The RMagick installation FAQ [<http://rmagick.rubyforge.org/install-faq.html>]
142
+ has answers to the most commonly reported problems.
143
+
144
+ #### Can't install RMagick. Can't find libMagick or one of the dependent libraries. Check the mkmf.log file for more detailed information.
145
+ Typically this message means that one or more of the libraries that ImageMagick
146
+ depends on hasn't been installed. Examine the mkmf.log file in the ext/RMagick
147
+ subdirectory of the installation directory for any error messages. These messages
148
+ typically contain enough additional information for you to be able to diagnose
149
+ the problem. Also see <http://rmagick.rubyforge.org/install-faq.html#libmagick>.
213
150
 
214
151
  #### Cannot open shared object file
215
152
  When make is running the examples, if you get a message like this:
216
153
 
217
- /home/you/RMagick-1.15.17/lib/RMagick.rb:11:in `require': libMagick.so.0:
154
+ /home/you/RMagick-2.0.0/lib/RMagick.rb:11:in `require': libMagick.so.0:
218
155
  cannot open shared object file: No such file or directory -
219
- /home/you/RMagick-1.15.17/ext/RMagick/RMagick.so (LoadError)
156
+ /home/you/RMagick-2.0.0/ext/RMagick/RMagick.so (LoadError)
220
157
 
221
- you probably do not have the directory in which the ImageMagick or GraphicsMagick
222
- library is installed in your load path. An easy way to fix this is to define the
223
- directory in the LD\_LIBRARY\_PATH environment variable. For example, suppose you
224
- installed the GraphicsMagick library libGraphicsMagick.so in /usr/local/lib.
225
- (By default this is where it is installed.) Create the LD\_LIBRARY\_PATH variable
226
- like this:
158
+ you probably do not have the directory in which the ImageMagick library
159
+ is installed in your load path. An easy way to fix this is to define
160
+ the directory in the LD\_LIBRARY\_PATH environment variable. For
161
+ example, suppose you installed the ImageMagick library libMagick.so in
162
+ /usr/local/lib. (By default this is where it is installed.) Create the
163
+ LD\_LIBRARY\_PATH variable like this:
227
164
 
228
165
  export LD_LIBRARY_PATH=/usr/local/lib
229
166
 
@@ -233,7 +170,7 @@ systems, see the documentation for the dynamic loading facility.
233
170
  #### No such file or directory - "/tmp/rmagick6872.6"
234
171
  When make is running the examples, if you get a message like this:
235
172
 
236
- hook /home/me/src/RMagick-1.15.17/./post-setup.rb failed:
173
+ hook /home/me/src/RMagick-2.0.0/./post-setup.rb failed:
237
174
  No such file or directory - "/tmp/rmagick6872.6"
238
175
 
239
176
  you probably do not have a temporary directory environment variable set. Set
@@ -243,16 +180,16 @@ the TMPDIR environment variable to your temporary directory. For example:
243
180
 
244
181
  <h2 id="upgrade">Upgrading</h2>
245
182
 
246
- If you upgrade to a newer release of ImageMagick or GraphicsMagick, make sure
247
- you're using a release of RMagick that supports that release. Usually I put out
248
- a new release of RMagick with every new release of ImageMagick. It's safe to
249
- install a newer release of RMagick over an earlier release.
183
+ If you upgrade to a newer release of ImageMagick, make sure you're using a
184
+ release of RMagick that supports that release. It's safe to install a newer
185
+ release of RMagick over an earlier release.
250
186
 
251
187
  <h2 id="uninstall">Uninstalling</h2>
252
188
 
253
- The `uninstall` target will uninstall RMagick completely:
189
+ The `uninstall.rb` script will uninstall RMagick completely. Make sure you
190
+ have administrator priviledges. Then run this command:
254
191
 
255
- make uninstall
192
+ ruby uninstall.rb
256
193
 
257
194
  <h2 id="samples">More samples</h2>
258
195
 
@@ -264,21 +201,20 @@ These programs are not installed in the RMagick documentation tree.
264
201
  Please report bugs in RMagick, its documentation, or its installation
265
202
  programs to me via the bug tracker on the [RMagick project page at
266
203
  RubyForge](http://rubyforge.org/projects/rmagick). However, I can't help
267
- with Ruby installation and configuration or ImageMagick or GraphicsMagick
268
- installation and configuration. Please report problems with that software
269
- to their respective authors or distributors.
204
+ with Ruby installation and configuration or ImageMagick
205
+ installation and configuration. Information about reporting problems and
206
+ getting help for ImageMagick is available at the ImageMagick web site
207
+ (http://www.imagemagick.org).
270
208
 
271
209
  <h2 id="credits">Credits</h2>
272
210
 
273
211
  Thanks to
274
212
 
275
- * Simple Systems, for hosting the RMagick documentation online.
276
213
  * ImageMagick Studio LLC, for ImageMagick and for hosting the RMagick documentation.
277
- * Kaspar Schiess and Brett DiFrischia, for the MS Windows gems.
278
214
 
279
215
  <h2 id="license">License</h2>
280
216
 
281
- > Copyright � 2002-2008 by Timothy P. Hunter
217
+ > Copyright � 2002-2007 by Timothy P. Hunter
282
218
  >
283
219
  > Permission is hereby granted, free of charge, to any person obtaining a
284
220
  > copy of this software and associated documentation files (the "Software"),
@@ -315,11 +251,10 @@ The HTML version was produced with [BlueCloth](http://bluecloth.rubyforge.org).
315
251
 
316
252
  [intro]: #intro
317
253
  [contact]: #contact
254
+ [new]: #new
318
255
  [prereq]: #prereq
319
- [tips]: #tips
320
256
  [install]: #install
321
257
  [options]: #options
322
- [scripts]: #scripts
323
258
  [uhoh]: #uhoh
324
259
  [upgrade]: #upgrade
325
260
  [uninstall]: #uninstall
@@ -0,0 +1,205 @@
1
+
2
+ # Build the tar.gz, tar.bz2, and .gem files for an RMagick Release
3
+
4
+ # To use: cd to $HOME
5
+ # run: rake -f path/to/build_tarball.rake clean
6
+ # rake -f path/to/build_tarball.rake release=tag beta=whatever
7
+ #
8
+ # Specify the release as release=RMagick_x-y-z or nothing if release=HEAD
9
+ # Specify a beta Release as beta=beta1
10
+
11
+ require 'rubygems'
12
+ require 'bluecloth'
13
+ require 'find'
14
+ require 'fileutils'
15
+ include FileUtils
16
+
17
+
18
+ CVSSERVER = ":ext:rmagick@rubyforge.org/var/cvs/rmagick"
19
+
20
+
21
+ # CVS_Tag is the CVS tag for this release. Dist_Directory is CVS_Tag,
22
+ # modified for use as a directory name.
23
+ if ENV.include?("release")
24
+ CVS_Tag = ENV["release"]
25
+ Dist_Directory = CVS_Tag.tr('_-','-.')
26
+ else
27
+ CVS_Tag = "HEAD"
28
+ Dist_Directory = "RMagick-0.0.0"
29
+ end
30
+
31
+
32
+ # RMagick_Version is just X.Y.Z
33
+ RMagick_Version = Dist_Directory.sub(/RMagick-/, "")
34
+
35
+ # RMagick_Version2 is X.Y.Z + "-beta1" if beta=beta1
36
+ RMagick_Version2 = RMagick_Version + (ENV.include?("beta") ? "-" + ENV["beta"] : "")
37
+
38
+ # Release is RMagick-X.Y.Z, plus "-beta1" if beta=beta1
39
+ Release = Dist_Directory + (ENV.include?("beta") ? "-" + ENV["beta"] : "")
40
+
41
+ README = "README.html"
42
+ MANIFEST = "ext/RMagick/MANIFEST"
43
+
44
+
45
+
46
+
47
+ # Change the version number placeholders in a file.
48
+ # Returns an array of lines from the file.
49
+ def reversion(name)
50
+ now = Time.new
51
+ now = now.strftime("%m/%d/%y")
52
+
53
+ lines = File.readlines name
54
+ lines.each do |line|
55
+ line.gsub!(%r{0\.0\.0\$}, RMagick_Version2)
56
+ line.gsub!(%r{0\.0\.0}, RMagick_Version)
57
+ line.gsub!(%r{YY/MM/DD}, now)
58
+ end
59
+ lines
60
+ end
61
+
62
+
63
+
64
+
65
+ # Rewrite a file containing embedded version number placeholders.
66
+ def reversion_file(name)
67
+ lines = reversion(name)
68
+ tmp_name = name + "_tmp"
69
+ mv name, tmp_name
70
+ begin
71
+ File.open(name, "w") { |f| f.write lines }
72
+ rescue
73
+ mv tmp_name, name
74
+ ensure
75
+ rm tmp_name
76
+ end
77
+ end
78
+
79
+
80
+
81
+
82
+ task :extconf do
83
+ Dir.chdir(Dist_Directory) { reversion_file "ext/RMagick/extconf.rb" }
84
+ end
85
+
86
+
87
+
88
+
89
+ task :gemspec do
90
+ Dir.chdir(Dist_Directory) { reversion_file "rmagick.gemspec" }
91
+ end
92
+
93
+
94
+
95
+
96
+ task "README.bc" do
97
+ Dir.chdir Dist_Directory do
98
+ reversion_file "README.txt"
99
+ body = File.readlines "README.txt"
100
+ body = BlueCloth.new(body.join).to_html + "\n"
101
+ File.open("README.bc", "w") { |f| f.write body }
102
+ end
103
+ end
104
+
105
+
106
+
107
+
108
+ task README => "README.bc" do
109
+ puts "writing #{README}"
110
+ Dir.chdir Dist_Directory do
111
+ File.open(README, "w") do |html|
112
+ html.write <<END_HTML_HEAD
113
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
114
+ <html>
115
+ <head>
116
+ <title>RMagick #{RMagick_Version2} README</title>
117
+ <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
118
+ <meta name="GENERATOR" content="BlueCloth">
119
+ </head>
120
+ <body>
121
+ END_HTML_HEAD
122
+ html.write File.readlines("README.bc")
123
+ html.write <<END_HTML_TAIL
124
+ </body>
125
+ </html>
126
+ END_HTML_TAIL
127
+ end
128
+ end
129
+ end
130
+
131
+
132
+
133
+
134
+ task :doc do
135
+ Dir.chdir(File.join(Dist_Directory, "doc")) do
136
+ FileList["*.html"].each { |d| reversion_file(d) }
137
+ end
138
+ end
139
+
140
+
141
+
142
+
143
+ # Remove files we don't want in the tarball.
144
+ # Ensure files are not executable. (ref: bug #10080)
145
+ task :fix_files do
146
+ Dir.chdir Dist_Directory do
147
+ rm_rf "test", :verbose => true
148
+ rm "lib/rvg/to_c.rb", :verbose => true
149
+ rm "README.bc", :verbose => true
150
+ chmod 0644, FileList["doc/*.html", "doc/ex/*.rb", "doc/ex/images/*", "examples/*.rb"]
151
+ end
152
+ end
153
+
154
+
155
+
156
+
157
+ task :manifest do
158
+ now = Time.new
159
+ now = now.strftime("%H:%M:%S %m/%d/%y")
160
+ puts "generating #{MANIFEST}"
161
+
162
+ Dir.chdir Dist_Directory do
163
+ File.open(MANIFEST, "w") do |f|
164
+ f.puts "MANIFEST for #{Release} - #{now}\n\n"
165
+ Find.find('.') do |name|
166
+ next if File.directory? name
167
+ f.puts name[2..-1] # remove leading "./"
168
+ end
169
+ end
170
+ end
171
+ end
172
+
173
+
174
+
175
+
176
+ task :export do
177
+ sh "cvs -d#{CVSSERVER} export -r #{CVS_Tag} -d #{Dist_Directory} RMagick"
178
+ end
179
+
180
+
181
+
182
+
183
+ task :collateral => ["README.html", :gemspec, :extconf, :doc]
184
+
185
+ GEM = Dist_Directory.downcase + ".gem"
186
+
187
+ task :default => [:export, :collateral, :fix_files, :manifest] do
188
+ sh "tar cvfz #{Release}.tar.gz #{Dist_Directory}"
189
+ sh "tar cvfj #{Release}.tar.bz2 #{Dist_Directory}"
190
+ Dir.chdir(Dist_Directory) do
191
+ sh "gem build rmagick.gemspec"
192
+ mv GEM, "../", :verbose => true
193
+ end
194
+ end
195
+
196
+
197
+
198
+
199
+ task :clean do
200
+ rm_rf Dist_Directory, :verbose => true
201
+ rm_rf Release+".tar.gz", :verbose => true
202
+ rm_rf Release+".tar.bz2", :verbose => true
203
+ rm_rf GEM, :verbose => true
204
+ end
205
+