[Home] [Downloads] [Search] [Help/forum]

How to compile PennMUSH 1.7.2 p2 under Win32

This page describes how to compile and test PennMUSH 1.7.2 patchlevel 2 (the current one as at the time of writing this). It assumes you are using the Microsoft Visual C++ version 5.0 compiler.

Page updated on 20th February 1998.


Download the source files

Download the source from: ftp://ftp.pennmush.org/pub/PennMUSH/Source/

It will be called something like: pennmush.1.7.2p2.tar.gz (however later versions will have a diffent patch number, eg. p3, p4 and so on).


Unzip the source

Use Winzip to unzip it (make sure you preserve folder names). You can get Winzip from: http://www.winzip.com


Set up the project

  1. Create new project: Pennmush - a Win32 console application
  2. Rename SRC\LOCAL.DST as SRC\LOCAL.C
  3. Add all files in SRC directory to the project.
  4. Remove the following files from the project:
    • ANNOUNCE.C
    • COMP_B.C
    • COMP_H.C
    • COMP_W.C
    • CONNECT.C
    • CONVDB.C
    • CSRIMALLOC.C
    • FUNCRYPT.C
    • GMALLOC.C
    • INFO_SLAVE.C
    • MKINDX.C
    • NMALLOC.C
    • PORTMSG.C
    • SMALLOC.C
    • SWITCHINC.C
  5. Bring up the "Project Settings" window, C++ tab, Category "Code Generation" and change "Use run-time library" to "Multithreaded" (or "Debug Multithreaded" if you are doing a debug build)

    Example of setting multithreaded option - 11K

  6. Use Tools > Options > Directories and add the HDRS directory to the directories to be searched for include files - OR - copy all the .h files from the HDRS directory to the SRC directory.
  7. Get a copy of CONFIG.H ( from ftp://ftp.ozemail.com.au/pub/gammon/pennmush/headers.zip)
  8. Copy OPTIONS.H.DIST to HDR\OPTIONS.H
  9. Edit OPTIONS.H and turn on desired options (probably most of them), such as the chat channels and so on. A copy of OPTIONS.H with the appropriate options enabled is in the file: ftp://ftp.ozemail.com.au/pub/gammon/pennmush/headers.zip
  10. Get a copy of DUNE.H ( from ftp://ftp.ozemail.com.au/pub/gammon/pennmush/headers.zip) \
  11. Remove extraneous newline characters from SWITCHINC.C, or get a copy from: ftp://ftp.ozemail.com.au/pub/gammon/pennmush/headers.zip
  12. Copy CONFMAGIC.H to HDRS directory
  13. In OPTIONS.H change MALLOC_PACKAGE to be 6, ie:
    #define MALLOC_PACKAGE 6
    
  14. Add line:
    #include <time.h>
    

    to CONFIG.H, after the line:

    #define _config_h_
    
  15. Use the GNU shell command to make your cmds.h and funs.h files, by going to the UTILS directory and typing:
    sh mkcmds.sh
    

    OR - get a copy of these files from ftp://ftp.ozemail.com.au/pub/gammon/pennmush/headers.zip .

  16. Add: "winmm.lib wsock32.lib" to Project Settings > Link > Object/library modules.
  17. In CONFIG.H change:
    #define HAS_BZERO	/**/
    

    to:

    // #define HAS_BZERO	/**/
    
  18. Add the lines:
    void fork() 
      {
      panic ("Unable to fork under Win32");
      };
    
    void local_commands ()
      {
    // no local commands
      };
    
    void local_functions ()
      {
    // no local functions
      };
    
    void reserve_aliases ()
      {
    // no aliases reserved
      };
    

    to LOCAL.C


Compile

You should now be ready to compile. With a bit of luck you will get a handful or warnings, and no errors. If so, copy the PENNMUSH.EXE file (from the Release or Debug directory) to the GAME directory.

Test

When testing, note that the output from the MUSH is not written to the screen. It is written to the LOG subdirectory, in a file called GAME.LOG. Look in that file to see how well the program is going.

Get a MUSH.CNF file

  1. Rename MUSHCNF.DST as MUSH.CNF
  2. Change the lines:
    compress_program compress
    uncompress_program uncompress
    compress_suffix .Z
    

    to be:

    compress_program
    uncompress_program
    compress_suffix
    
  3. Change the line:
    forking_dump yes
    

    to be:

    forking_dump no
    
  4. Change the lines:
    #events_file txt/events.txt
    #events_index txt/events.idx
    #index_file txt/index.txt
    #index_index txt/index.idx
    #rules_file txt/rules.txt
    #rules_index txt/rules.idx
    

    to be:

    events_file txt/events.txt
    events_index txt/events.idx
    index_file txt/index.txt
    index_index txt/index.idx
    rules_file txt/rules.txt
    rules_index txt/rules.idx
    

Get a database

If you don't already have a database, go to the DATA directory and change the name of:
MINIMAL.DB

to be

INDB

Start up the server

Type:

pennmush /run
If the program does not immediately exit, try editing the file LOG\GAME.LOG and check that the last few lines look like this:
Input database verified. Proceeding to analysis.
ANALYZING: data/indb
ANALYZING: data/indb (done)
LOADING: data/indb
READING: done
LOADING: data/indb (done)
LOADING: data/maildb
LOADING: data/maildb (done)
02/20 12:17:43  RPT: No access.cnf file found.
Listening on port 4201
RESTART FINISHED.

If so, use your client program and try connecting to the MUSH. If you have used the minimal database, connect as character "one" - no password.

[Back] [Home]
Written by Nick Gammon - 5K

Comments to Gammon Software support

[Best viewed with any browser - 2K]    Internet Contents Rating Association (ICRA) - 2K    [Web site powered by FutureQuest.Net]

Page updated on Wednesday, 15 December 2004