Compiling

From NetHackWiki
Revision as of 16:52, 20 September 2006 by Paxed (talk | contribs) (On Windows: point to patching)
Jump to navigation Jump to search

This page contains help on compiling NetHack from source.

On Windows

This was tested on Win2k.

  • Install MinGW. If you use the 'minimal' installation, remember to also select the optional 'MinGW make' -component, so it gets installed. Use, say, C:\mingw\ as the path to install to.
  • Unpack NetHack's sources somewhere, say, c:\nh343\. You will need WinZip or some other utility that can uncompress it.
  • Go to c:\nh343\sys\winnt\ and run nhsetup.bat
  • If you want to run the graphical windows GUI, edit c:\nh343\src\makefile.gcc and change the line
#GRAPHICAL=Y

to

GRAPHICAL=Y
  • Go to c:\nh343\ and create a new file called 'install.bat' with the following contents:
PATH=c:\mingw\bin
cd src
mingw32-make -f makefile.gcc install
  • Run the install.bat you just created.
  • The NetHack binary should now be in c:\nh343\binary\
  • If you want to patch your NetHack, you should next see the article on patching.