Sample Installation Walk-Through for Windows 98   (mostly-C version)


TABLE OF CONTENTS


Introduction

This page describes the steps we performed to install the PipTools package on a particular PC running Windows 98. Your mileage may vary, depending on Windows version, system configuration, other software installed, etc., but at least this should give you a feel for what is involved. Also, please note that although these instructions were accurate at the time they were written, the details tend to become outdated quickly (e.g., if ActivePerl reorganizes its web site, or a new version of Boulder becomes available).

We chose to use the Cygwin environment to compile the tools written in C, and ActivePerl (plus the Boulder module) to run those written in Perl. These are popular, high-quality implementations, and all are freely available for download.

Specific folder names are given here for concreteness, but you can substitute different names if you prefer.


Cygwin

The Cygwin package aims to simulate a Unix-like working environment under Windows. It provides many common Unix commands and development tools, including  gcc  and  make , and access to them via the  bash  shell. We recommend using  bash  to compile and install the PipTools, but after that you can run them directly from the Windows command line (i.e., MS-DOS Prompt), as long as you have copied the magic Cygwin DLL file to a place where Windows can find it.

The Cygwin installation is handled by a setup program that can download and install the files you need all in one step. However, the instructions recommend turning off your virus scanner, so we decided to be a little more cautious by downloading, scanning, and then installing in separate phases.

  1. Go to the Cygwin home page and read the FAQ. (It may also be helpful to read the User's Guide.)

  2. Go to their mirror page, choose the closest mirror site to your location, and note its URL for later. Click on the link you chose, then on the link called "latest" and read the  README  file there (if there is no  README  file, try another mirror site).

  3. Create a temporary download folder on your hard drive called, say,  c:\cygwin.tmp , and another folder where the software will actually be installed, say  c:\cygwin .

  4. Go back to the Cygwin home page and click on the "Install Now" icon. When asked, tell Windows you want to save the  setup.exe  program in  c:\cygwin.tmp , rather than running it directly from the server.

  5. Scan the downloaded file for viruses, and then turn off your virus scanner.

  6. Run the  setup.exe  file, making the following choices:

  7. Scan these new files for viruses, and then turn off your virus scanner again.

  8. Run  setup.exe  again, making different choices this time:

  9. Scan the newly-installed files (you can leave your virus scanner on this time).

  10. Copy the file  c:\cygwin\bin\cygwin1.dll  to the  c:\windows\system  folder, so that once you compile the PipTools programs you can run them directly, without having to use the  bash  shell.

  11. If you want to save space on your disk, you can delete the  c:\cygwin.tmp  folder.

ActivePerl

  1. Create a temporary download folder on your hard drive called, say,  c:\perl.tmp , and another folder where the software will actually be installed, say  c:\perl .

  2. Go to the ActivePerl page and click on Download. Make sure you have all the required software installed, as listed for your platform. For example, it says that for Windows 98 you'll need Internet Explorer 5 or higher, and Windows Installer 2.0 or higher. Unless you're sure you have these already, follow the links to download and install them.

  3. Click on the red Next arrow near the bottom right corner of the screen, and then select the Windows MSI link. When asked, tell Windows you want to save the file in  c:\perl.tmp , rather than opening it directly from the server. [Update: as of 20 Apr 2003, you have a choice here between ActivePerl 5.6.1 and ActivePerl 5.8.0; however for Windows, the Boulder PPM module (see below) is currently only available for the 5.8.0 version of ActivePerl.]

  4. Copy the downloaded  ActivePerl...msi  file to  c:\perl , then run it and follow the instructions on the screen, keeping the default choices.

  5. When the installation is complete, a help page will pop up with Release Notes and other information. You can access this again later from Start - Programs - ActiveState ActivePerl 5.6 - Documentation, but you should at least look it over now to familiarize yourself with it.

  6. The Getting Started section of the Readme page (which is located under Getting Started in the documentation's outline) explains how to test the installation using a sample Perl script that is included for this purpose; try it now to make sure your new Perl interpreter is working. Note that you must restart your computer (if you didn't already), in order to make the new path settings take effect so Windows can find the new programs.

  7. Eventually you can delete the  c:\perl.tmp  folder, once everything is working.

Boulder

  1. We had difficulty building the Boulder module directly from its source code, because the MakeMaker module generated a corrupted Makefile. (According to listserv postings, this sort of problem is not uncommon with ActivePerl+Cygwin, and may have something to do with compiler switch settings.) Fortunately ActiveState provides pre-built versions of many CPAN modules (including Boulder) which are much easier to install anyway, thanks to the Perl Package Manager (PPM). The only drawback is that these may not always be quite up to date, but that probably won't matter to the PipTools.

  2. Installing Boulder using PPM is usually very simple. First make sure you are connected to the internet (e.g., dial your modem). Then type the following in the MS-DOS Prompt window (it does not matter what the current directory is):
             ppm 
    install Boulder
    quit 
    Note that if your connection uses a firewall or proxy, there are a few extra steps; please see the PPM, Proxies and Firewalls section of the Using PPM page (which is located under ActivePerl FAQ in the ActivePerl documentation's outline) for details.

PipTools

  1. Create a folder on your hard drive called, say,  c:\piptools . Also create a subfolder for the executables, say  c:\piptools\bin . (We won't use a temporary download folder this time; this way you'll have the source files to refer to later.)

  2. Download  piptools.zip  into  c:\piptools .

  3. Unzip it, using a program that can handle PKZIP format. Make sure the subdirectory structure gets recreated (e.g., by using  pkunzip -d ). This will produce a folder named after the release date of the PipTools version you downloaded (e.g.  piptools.2002-01-24 ) containing all of the source files and documentation.

  4. Use a plain-text editor like Wordpad (not Word!) to edit the  Makefile  in this folder and adjust it as follows: There are more Unix-isms in there, but Cygwin should be able to handle them. Likewise,  piplib\Makefile  should not need any changes. (You could also use Notepad to make these changes, but that is awkward because it doesn't recognize the Unix line-ends in the file. Word is liable to insert non-text characters that will cause errors.)

  5. Double-click on the new Cygwin icon on your desktop to open Cygwin's  bash  shell prompt. Enter the following commands:
             cd c:/piptools/piptools.2002-01-24 
    make
    make install
    exit 

  6. On a Unix system, Perl scripts can be made executable by setting their execute permissions and including a special line at the top which tells the Unix shell that in order to run this script, it should pass it to the program listed on that line, namely the Perl interpreter. However, Windows does not support this  "#!"  syntax, so you need to arrange another way for the Perl interpreter to get called when you run the tools that need it.

    The ActivePerl documentation suggests several workarounds for this problem, but none of them worked well for us. (Batch file "wrappers" do not allow redirection of the output to a file, at least on Win98, and the  pl2exe  utility is apparently no longer included in the ActivePerl distribution.) So until we find a better solution, the simplest thing is to invoke the Perl interpreter manually by typing  perl -S  at the beginning of each PipTools command, as in
             perl -S genbank2exons genbank_file > output_file   
    Of course, this is only necessary for the three tools that use Perl, namely  genbank2exons ,  genbank2repeats , and  sort-exons .

  7. Make sure the installed program files are in your path, so your operating system can find them when you try to run them from another folder. You can do this by adding a new line
             SET PATH=c:\piptools\bin;%PATH%   
    to the end of your  c:\autoexec.bat  file (again, use a plain-text editor like Wordpad or Notepad, not Word!). You will need to restart your computer for this change to take effect.

  8. Copies of the PipTools documentation pages (the same ones from our server) are available in the  c:\piptools\piptools.2002-01-24\docs  folder.

Uninstalling



Cathy Riemer, April 2003