Sample Installation Walk-Through for Windows 98 (mostly-C version)
TABLE OF CONTENTS
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.
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.
- Go to the Cygwin home page
and read the FAQ. (It may also be helpful to read the User's Guide.)
- 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).
- 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 .
- 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.
- Scan the downloaded file for viruses, and then turn off your virus
scanner.
- Run the setup.exe file, making the following
choices:
- download from internet
- c:\cygwin.tmp
- direct connection
- the same mirror site you noted before
- leave "selected packages" at default settings
- Scan these new files for viruses, and then turn off your virus scanner
again.
- Run setup.exe again, making different choices
this time:
- install from local directory
- install root directory = c:/cygwin
- text file type = DOS
- install for = All
- local package directory = c:\cygwin.tmp
- leave "selected packages" at default settings
- Scan the newly-installed files (you can leave your virus scanner on
this time).
- 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.
- If you want to save space on your disk, you can delete the
c:\cygwin.tmp folder.
- 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 .
- 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.
- 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.]
- Copy the downloaded ActivePerl...msi file to
c:\perl , then run it and follow the instructions
on the screen, keeping the default choices.
- 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.
- 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.
- Eventually you can delete the c:\perl.tmp folder,
once everything is working.
- 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.
- 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):
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.
- 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.)
- Download
piptools.zip into c:\piptools .
- 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.
- Use a plain-text editor like Wordpad (not Word!) to edit the
Makefile in this folder and adjust it as follows:
- Change the DEST install location from
/usr/local/bin to
c:/piptools/bin . (Cygwin likes forward
slashes.)
- Remove the "#" character from the beginning
of the SUFF and SUFF2
lines under #-- DOS/Windows -- .
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.)
- 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 |
- 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 .
- 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.
- Copies of the PipTools documentation pages (the same ones from our
server) are available in the
c:\piptools\piptools.2002-01-24\docs folder.
- Cygwin is installed by a specialized setup program which currently
does not have an automated uninstall facility. Please see the
Cygwin FAQ for instructions
on how to uninstall it manually.
- ActivePerl can be uninstalled using the standard Win98 Add/Remove Programs
window (available from Start - Settings - Control Panel). However,
this will leave a few files in your c:\perl folder
(including Boulder), so to remove the Perl stuff completely you'll have
to delete these manually. It may also leave your path set to include
c:\perl\bin ; this shouldn't do any harm, but you can
edit your c:\autoexec.bat file (with Wordpad or
Notepad, not Word!) to remove it if you like.
- To remove the Boulder module without removing ActivePerl, use PPM again:
- To uninstall the PipTools themselves, just delete the
c:\piptools folder and remove the line you added
to your c:\autoexec.bat file.
Cathy Riemer, April 2003