Installation Notes for Serpent on Windows

Roger B. Dannenberg

There are two versions of serpent; one is a command line program and the other is a graphical interface program:
Serpent is currently released as an SVN repository and in three zip files (the "nnn" is the corresponding SVN version number):
The "win" zip file contains compiled executables. The "src" zip file contains sources for all platforms.

Installing Compiled Programs

You should be able to simply download serpent-win-nnn.zip for your machine, extract the executables and run them. The executables are (for Windows): serpent.exe and wx\wxserpent.exe.

Three things to keep in mind:
  1. Both serpent (a command line program) and wxserpent (serpent with graphical toolkit) should be run from the command line.
  2. To run an executable from a command line, your system must be able to find it. I suggest copying the executables to a personal directory of executables, e.g. C:/Users/rbd/bin or /Users/rbd/bin. You then need to modify your PATH to include this directory.
  3. You also need to set up a path for Serpent (called SERPENTPATH). Go to (or create) the registry entry:
    "My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\CMU\Serpent\"
    and add a new string value there named "SERPENTPATH".  On 64-bit Vista or XP, the registry entry should be:
    "My Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\CMU\Serpent"
    (This is because 32-bit code accesses a different section of the registry.) Set the Data (value) to the path. On my machine, this Data is "c:\Users\rbd\serpent\lib\;c:\Users\rbd\serpent\programs\;c:\Users\rbd\serpent\wxslib". (The quotes are not part of the Data.) To set this, go to the Start menu and select "Run...", then type in "regedit" and click "OK". Use this editor to create and set the path. The RegEdit program gives you access to all kinds of critical internal settings for your machine. Be careful.

Testing:

On windows, run wxserpent from a command prompt:
cd serpent
Release\serpent64
> print "hello world"
hello world
> exit()

cd serpent/wxs
Release\wxserpent.exe init.srp
This will run the init.srp in the current directory (wxs), which is a good simple test. Then try typing print "hello world" into the window with the Eval button and click on Eval. Try
cd serpent/wxslib
..\wxs\Release\wxserpent64 wxs_test.srp
for more fun. The screen will look something like this:
wxs_test.srp screen capture

Building From Sources

If you want to build from sources, get the "src" zip file. You can also get the very latest sources from SourceForge using SVN (subversion, a configuration management tool). The Linux command to create a serpent directory (in the current directory) with the lastest sources is:
svn checkout svn://svn.code.sf.net/p/serpent/code/trunk serpent
or, if you are a developer and plan to commit changes back to SourceForge,
svn checkout svn+ssh://rbd@svn.code.sf.net/p/serpent/code/trunk serpent
Important: If your serpent directory contains trunk, tags, and branches, check the code above and try again. For these instructions to work, all the repository files in trunk must be copied to the local working copy named serpent. E.g. you should have serpent/README.txt, serpent/32bit, and serpent/64bit. After you install liblo, you should have serpent/../liblo.

I use Tortoise SVN on Windows. Here's how I build from sources on Windows: