How to Install Perl and Emacs on a Windows Machine
How to Install Perl and Emacs on a Windows Machine
There has been a number of questions as regarding installing Perl
and GNU E-macs on the Windows machines in the Psychology Dept. here at
UNC. Here's a quick and easy tutorial on how to do-it-yourself.
The advantages of using Perl are straightforward - it's easy to use,
processes text and data really well, and resembles popular programming
languages such as C. It's main disadvantage is that it requires a Perl
interpreter. Luckily, ActiveState maintains a Perl interpreter for Windows
that's free. But the ActiveState Perl distribution does not have an easy
way to view and edit Perl scripts with ease. So, I recommend using the
GNU Emacs for Windows, which will color-code Perl scripts and provides
many other helpful features.
So first, you want to install ActiveState Perl. Then you want to
install GNU E-macs.
Installing ActiveState Perl
- First, you have to install a program called "Windows
Installer". Depending on what version of Windows your running, you need to
install either this if you are
running Windows NT or this if
you are running Windows 95, 98 or ME. If you are running Windows 2000 or
XP you can skip this step. Remember to run the instmsi.exe to
install it.
- Download ActiveState Perl to your machine. You can either download
the latest distribution from the ActiveState web-site yourself by clicking
here or go to ActiveState's main home page http://www.activestate.com
or just click here
to download the 630 Windows Build. Remember to go to ActiveState's
page and sign up for the mailing list, give them your info, and so on.
(Note that some scripts, such as MultiMRC, do not run property on
Build 630 for reasons unknown).
- Go to wherever you downloaded ActivePerl .MSI file, and again
just click on it to install it.
- Now you have to install the graphics program "Tk" to get it to run
any programs that use graphics. For this to work, you must be connected
to the Internet. To install it, you have to open a DOS
Command Prompt (Under the Start Menu, the Programs folder). Then go to the
directory you installed Perl in. Go to the /bin directory beneath that
installation. Type ppm at the command prompt. Then type
install Tk and Tk will install itself over the net onto your
machine. Below illustrates the process.
D:\Perl\bin>ppm
PPM interactive shell (2.0) - type 'help' for available commands.
PPM> install Tk
-
Now Perl will run any perl script from a command prompt by typing
perl myscript.pl where myscript is the name of your
perl script. Also, it should associated Perl scripts with itself and
allow them to run from Windows Explorer by clicking on them. Perl Scripts
will be highlighted by a yellow sphere icon in Windows. Remember that
a Perl script must end with a .pl to be recognized under Windows
Explorer as a Perl script.
Installing GNU Emacs
For more info on E-macs please go to its distribution page:
http://www.gnu.org/software/emacs/windows/ntemacs.html
- Download GNU Emacs in its zipped (compressed) form to some directory
by clicking here.i
-
Copy the emacs-20.zip file to a temporary folder on your machine
-
Unzip the contents of emacs-20 zip archive into
C:\Program Files'. This will create an emacs-20 folder underneath Program
Files.
- Open a DOS command prompt window (from the Start menu, listed under
Programs).
-
Type in the command:
C:\Progra~1\emacs-20\bin\addpm C:\Progra~1\emacs-20
This initializes some system parameters in Windows' registry to let
Emacs know where to find the Emacs installation.
-
Emacs can now be called from the Start Menu. It is located under the entry
GNU Emacs.
-web-page by Harry Halpin
For any more questions, please e-mail hhalpin@email.unc.edu