Cygwin Installation Guide

This guide is focused on helping the potential new developer install a working NakedMud server. The difficulty in writing such an install guide relates to the assumptions that must be made in order to determine a starting point for the guide. For this guide I will assume the following are true of the reader:

  • You are a Microsoft Windows user with a good understanding of the operating system.
  • You have (at least) a basic understanding of programming (in C or Python) and the process of compiling a program from source.
  • You do not have a *nix (or similar) server from which you can develop and/or run your MUD server.
  • You are interested in MUDs (and particularly in NakedMud).

If the above assumptions are not true, you may not be reading the proper guide.

This guide will step you through installing cygwin and the needed packages to compile and run a NakedMud server. This guide has been written primarily because many users have asked questions related to the cygwin installation and configuration on the NakedMud mailing list. Likewise, for those users/developers who do not have a server from which to run/develop their own MUD server this may be the only option. In general, if you can run/develop your server on a *nix (or similar) platform, you should.

Cygwin provides a platform for which the NakedMud server may be developed, debugged, and tested locally. Typically, it will not be a good platform to run a publicly available server in which players can use. However, one could run a server in such a way.

Installing Cygwin

Download the cygwin installer from  http://www.cygwin.com/ and launch the program. A default install is not sufficient to compile NakedMud as is, so (at least) the following packages should be selected to successfully complete the compilation process.

  • Additional packages to install:
    • 'Devel - gcc' to add the compiler needed for the C portions of the program.
    • 'Devel - make' to control the build (compile) process in an easier fashion.
    • 'Python - python' to support the Python portions of the program.

If development is desired, the following packages may provide useful as well.

  • Developer packages to install:
    • 'Devel - gdb' to have a debugger for development.
    • 'Devel - subversion' (or similar) for version control of source code.
    • 'Editors - vim' (or similar) for text editing capabilities.

Once these packages are installed, you are now ready to compile and run the NakedMud server.

Getting NakedMud Source

Option 1 - Get the official source package.

There are two options for getting the NakedMud source. The offical source code can be downloaded from Geoff Hollis at his  web page. Currently, NakedMud 3.6 is the most recent version.

You should download the source code archive into your cygwin home directory (by default, a path like 'C:\cygwin\home\<username>'). Launch a cygwin session and extract the file. Issuing a 'tar zxvf nakedmudv3.6.tgz' to extract the source successfully.

Option 2 - Download latest nakedmud.org source from SVN.

The second option for downloading the source code can allow you to get the source code as it stands from the SVN repository. Currently, Geoff does not commit his changes to the repository as development is progressing. There may be new updates, bug fixes, or experimental code available that might make this option attractive. I will use the '/branches/nakedmud-doug' branch (an 'off shoot' from the main source, which just so happens to be mine) as an example.

Issuing a

svn co http://svn.nakedmud.org/branches/nakedmud-doug nakedmud

will check out the latest sources and place them in a subdirectory called 'nakedmud' from the directory that you issue the command.

Updating the Configuration

By default, there will only be one file that needs to be updated. This file controls the python configuration and tells the compiler where the include and shared libraries are located. The file in question is located at 'scr/scripts/module.mk' from the root NakedMud directory.

Instructions are provided on how to properly edit the file within the file itself. It would be advisable to read through these, but the following information should be all that is required to successfully compile NakedMud.

Option 1

For the official source distribution change the following:

# the top level directory of python.
PYTHONTOP = /usr/local/include

# the folder where python headers are located
C_FLAGS  += -I$(PYTHONTOP)/python2.4

# libraries we have to include.
LIBS     += -Xlinker -export-dynamic -lm -ldl -lutil -L/usr/local/lib/python2.4/config -lpython2.4

to:

# the top level directory of python.
PYTHONTOP = /usr/include

# the folder where python headers are located
C_FLAGS  += -I$(PYTHONTOP)/python2.5

# libraries we have to include.
LIBS     += -Xlinker -export-dynamic -lm -ldl -lutil -L/usr/lib/python2.5/config -lpython2.5

Option 2

Since the 'nakedmud-doug' branch has changed this file just a bit, the file looks a little different.

You should update the file from:

PYTHONTOP = /usr/local
PYTHONVERSION = python2.4

to:

PYTHONTOP = /usr
PYTHONVERSION = python2.5

Compiling NakedMud

Compiling the source is a straight forward process. From within the 'src' directory of the NakedMud package you only need to issue 'make' for the compile to take place.

Once the compile is done, you should see something like the following on the screen:

...
Compiling help2/help.c
Compiling help2/hedit.c
NakedMud successfully compiled. To run your mud, use ./NakedMud [port] &


user@machine ~/nakedmud/src
$

Running NakedMud

At this point, you may issue a './NakedMud &' command and the server should be up and running. You may then use a telnet application to connect to your server. Use the address 127.0.0.1 and the port 4000 to connect.

At this point you should have a server ready for exploring and/or development purposes.