HOWTO install RDtool on Windows NT

Version

Author: Dirk Detering Version: 0.2 Copyright (c) 2003

This Version contains updates regarding Ruby 1.8.0

Convention

In the following there are two placeholders, $ruby_home and $instsrc, which you have to replace by the correct path on your current system.

$ruby_home
declares the path to your ruby installation
$instsrc
declares the path to the temporarily extracted archive of the respective package you want to install.

Problem

When trying to install the standard tarball of rdtool I detected that it needs some prerequisites, i.e. Racc 1.3, strscan, OptionParser, forwardable.

Racc on one hand contains some C-sources and has to be compiled, rdtool on the other hand wants to be installed via a Makefile too.

As normally there are no development tools (compiler, make) on standard Windows NT machines, this HOWTO will describe how to make rdtool on Win NT work.

Installation Base

This howto has been developed on a Windows NT 4.0 machine with ruby1.6.7 installed from the windows-installer ruby167-4.exe found on: <URL:http://rubyinstaller.sourceforge.net/>

You will find in each section additional hints for installing rdtool with ruby1.8.0 from the installer ruby180-10.exe

Prerequisites

First we try to install the prerequisites of rdtool:

Racc

For racc there is a binary distribution available at <URL:ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ext/racc-1.4.3-all-i586-mswin32-1.6.zip>

(The home of it is: <URL:http://www.dm4lab.to/~usa/ruby/index_en.html> )

  1. Extract this archive in a temporary directory (below referred to as $instsrc)
  2. Copy racc.bat from directory $instsrc/bin to $ruby_home/bin
  3. Goto $instsrc/lib/ruby/site_ruby/1.6
  4. Copy files rscan.rb, scanner.rb, strscan.rb to $ruby_home/lib/ruby/site_ruby/1.6
  5. Copy directories amstd and racc to $ruby_home/lib/ruby/site_ruby/1.6
  6. Goto $instsrc/lib/ruby/site_ruby/1.6/i586-mswin32
  7. Copy subdir racc and file cscan.so to $ruby_home/lib/ruby/site_ruby/1.6/i586-mswin32
  8. Goto $instsrc/doc/ruby
  9. Copy subdir racc-1.4.3-all to $ruby_home/doc/ruby

That's it

For Ruby 1.8.0:

  1. Take Racc for Windows from <URL:ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ext/racc-1.4.4-all-i386-mswin32-1.8.zip> Extract this archive in a temporary directory (below referred to as $instsrc)
  2. Copy racc.bat from directory $instsrc/bin to $ruby_home/bin
  3. Goto $instsrc/lib/ruby/site_ruby/1.8
  4. Copy directory racc to $ruby_home/lib/ruby/site_ruby/1.8
  5. Goto $instsrc/doc/ruby
  6. Copy subdir racc-1.4.4-all to $ruby_home/doc/ruby

OptParse

Was installed from optparse-0.10.1.tar.gz (Taken from <URL:http://www.ruby-lang.org/en/raa-list.rhtml?name=OptionParser> as written in Rdtool's README.en). It contains a README.en and an install.rb which will do the job for you.

For Ruby 1.8.0: OptParse is now part of standard Ruby installation

forwardable

Was just installed by the base installer ruby167-4.exe

For Ruby 1.8.0: Is now part of standard Ruby installation

strscan

Was just installed by the OptParse installation

For Ruby 1.8.0: Not needed?

Rdtool installation

Fetch the rdtool tarball (e.g. rdtool-0.6.11.tar.gz) from <URL:http://www.ruby-lang.org/en/raa-list.rhtml?name=RDtool> and extract it in a temporary directory (in the following referred to as $instsrc)

  1. Open a DOS-box (cmd.exe) and go to $instsrc
  2. Execute: racc rd/rdblockparser.ry Note: Your $ruby_home/bin should be in your path, then racc will be found after the installation as described in Racc
  3. Execute: racc rd/rdinlineparser.ry
  4. Copy the directory $instsrc/rd to $ruby_home/lib/ruby/site_ruby/1.6
  5. Copy the file (rd2 to $ruby_home/bin
  6. Goto $ruby_home/bin and create a file rd2.bat containing:

    @echo off
    "$ruby_home\bin\ruby.exe" "$ruby_home\bin\rd2" %1 %2 %3 %4 %5 %6 %7 %8 %9
    (Note: You have to replace $ruby_home with the actual path to
     your Ruby installation).

If $ruby_home/bin is in your search path (%PATH%) as mentioned above, you should be able to start rd2 in any directory. To test it, copy a rd-file (some file from $ruby_home/doc with suffix .rd) to a temporary directory, open the DOS-Box, go to this directory and call

rd2 the-file-you-copied.rd > rdtest.html

This should create the file rdtest.html, which contains the text of the-file-you-copied.rd in html-format.

For Ruby 1.8.0: Take rdtool-0.6.14.tar.gz as mentioned above, do everything as described but replace 1.6 with 1.8