Compiling
Jump to navigation
Jump to search
This page contains help on compiling NetHack from source.
On Windows
This was tested on Win2k.
- Download NetHack's sources from http://nethack.org/v343/download-src.html
- Download MinGW from http://sourceforge.net/project/showfiles.php?group_id=2435 (You want the MinGW-X.Y.Z.exe installer; currently it's MinGW-5.0.3.exe)
- 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:\mingw\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\