The Win32 and Unix source are currently maintained in the same source files, so that changes to the Unix version are automatically reflected for people compiling under Win32.
The differences needed for Win32 compilation are surrounded by:
#ifdef WIN32
... Win32 statements or declarations ...
#endif
The current source code of PennMUSH can be found at the site:
ftp://pennmush.tinymush.org/pub/DuneMUSH/Source/The file name will look something like this:
pennmush-1.6.10p0.tar.gz
(This example is for PennMUSH 1.6.10 patchlevel 0)
Note that in order to compile the source you will need a C compiler. The one I used to compile the executable version is the Microsoft Visual C++ compiler, version 4.2.
You will also need to un-gzip, and un-tar the file, before you can compile it. To do this I recommend using WinZip, which is available from:
These instructions were tested under the following conditions;
To see how I compiled 1.7.2 p2, follow this link: How to compile version 1.7.2
ftp://pennmush.tinymush.org/pub/DuneMUSH/Source/oldsrc/1.6/pennmush-1.6.9p0.tar.gz
#include "conmagic.h"
to
#include "confmagic.h"
#include <ctype.h>
to the list of includes in ACCESS.C
#include <ctype.h>
to the list of includes in ATTRIB.C
Your finished pennmush\win32\sce directory structure should look like this:
The contents of the "sce" directory should be:
That's it! It should work.
I cannot guarantee that you can compile using other compilers (eg. Borland) however there is no reason why not, provided they support Windows sockets, and multiple threads. In case your compiler cannot read the "mak" file, click on Source Listing to see a listing of all of the source files that should be in your project.
Once a new release of PennMUSH is released, minor changes are made by adding "patches". These are files that are created by using the "diff" utility to find the difference between the newer version and the distributed major version. Under Unix (or Linux) it is a simple matter to run the "patch" utility which reapplies the patches back. Patches for the older source files can be found at:
ftp://pennmush.tinymush.org/pub/DuneMUSH/Source/oldpatches/
*** /tmp/T0a00543 Mon Sep 30 15:24:20 1996
--- src/funmisc.c Tue Sep 24 10:59:31 1996
***************
*** 119,124 ****
--- 119,126 ----
return;
}
strcpy(renv[r], args[1]);
+ if (!strcmp(called_as, "SETR"))
+ safe_str(args[1], buff, bp);
}
What this means is that:
A copy of the PATCH program has been ported to Win32. You can obtain it from:
ftp://ftp.ozemail.com.au/pub/gammon/pennmush/patch.zip
Because the PATCH program has been ported from Unix, it is rather idiosyncratic under Windows :(. After lengthy investigation I have found that the following methods will get it to work reasonably well ...To use it, copy the above code and paste into a file called PATCHIT.BAT. Then, to apply a patch, you would enter (say):
patchit patch01
Note that this patches the original files (ie. in the Unix directories), so that after doing one or more patches you would then copy the .c and .h files back into the win32\sce directory before recompiling.
You may get errors during the patch process, but if the file with the error is not a .c or .h file I wouldn't worry too much. Files like "configure" and suchlike are only used during the Unix compilation process anyway.
Using the above process I successfully applied patches 1 through to 10 for PennMUSH version 1.6.9 and recompiled without any errors.
The latest source for PennMUSH, along with the appropriate patch files, can be found at:
ftp://pennmush.tinymush.org/pub/DuneMUSH/Source/
Comments to Gammon Software support
Page updated on Wednesday, 15 December 2004