some windows build updates
This commit is contained in:
@@ -4,7 +4,7 @@ NetHack may be freely redistributed. See license for details.
|
||||
Instructions for compiling NetHack 5.0 on a Windows system
|
||||
(only tested on Windows 10/11 or later)
|
||||
==============================================================
|
||||
Last revision: $NHDT-Date: 1594155895 2020/07/07 21:04:55 $
|
||||
Last revision: $NHDT-Date: 1782065703 2026/06/21 18:15:03 $
|
||||
|
||||
See file dat\History for credits and history of NetHack for Windows.
|
||||
|
||||
@@ -12,8 +12,9 @@ See file dat\History for credits and history of NetHack for Windows.
|
||||
| Download a prebuilt package of NetHack for Windows from NetHack.org |
|
||||
\----------------------------------------------------------- -----------/
|
||||
|
||||
FIXME:
|
||||
|
||||
In your web browser, navigate to
|
||||
https://www.nethack.org/v500/ports/download-win.html
|
||||
and follow the instructions there.
|
||||
|
||||
/-----------------------------------------------------------------------\
|
||||
| Build and package NetHack for Windows yourself |
|
||||
|
||||
+21
-24
@@ -6,23 +6,7 @@ Prerequisite Requirements:
|
||||
A copy of Microsoft Visual Studio Community needs to
|
||||
be installed on your machine. See:
|
||||
https://visualstudio.microsoft.com/vs/community/
|
||||
o Lua
|
||||
NetHack 5.0 for Windows requires 3rd party Lua source that is not part
|
||||
of the NetHack distribution or repository.
|
||||
|
||||
A windows cmd command procedure for fetching prerequisite sources
|
||||
is available, and can be run as follows from the top of the
|
||||
NetHack source tree to obtain lua:
|
||||
sys\windows\fetch.cmd lua
|
||||
o pdcursesmod (Only required if curses interface support is desired)
|
||||
If you want to include curses interface support in NetHack 5.0 for
|
||||
3rd part pdcursesmod source code is required and is not part of the
|
||||
NetHack distribution or repository.
|
||||
|
||||
A windows cmd command procedure for fetching prerequisite
|
||||
sources is available, and can be run as follows from the top of
|
||||
the NetHack source tree to obtain pdcursesmod:
|
||||
sys\windows\fetch.cmd pdcursesmod
|
||||
|
||||
The build Makefiles and procedures produce two executables:
|
||||
a. A TTY and curses version of NetHack in nethack.exe
|
||||
@@ -44,9 +28,9 @@ You can use one of the following build environments:
|
||||
| | | | | | | |
|
||||
| | | | | | | |
|
||||
lua-5.4.8 pdcursesmod share windows tty win32 lua pdcursesmod
|
||||
|
|
||||
vs
|
||||
|
|
||||
|
|
||||
vs
|
||||
|
|
||||
+----------+-------+--------+--------+-----------+-------+-----+------+
|
||||
| | | | | | | | |
|
||||
makedefs NetHack NetHackW PDCurses PDCursesGui tile2bmp tilemap tiles uudecode
|
||||
@@ -99,19 +83,32 @@ Setting Up
|
||||
source tree, if you are at the top of the NetHack source tree.
|
||||
cd sys\windows.
|
||||
|
||||
2. Execute .\nhsetup.bat to place copies of the Makefiles in
|
||||
2. Execute
|
||||
.\nhsetup.bat
|
||||
to place copies of the Makefiles in
|
||||
the src subfolder. The file sys\windows\Makefile.nmake will copied
|
||||
to a file src\Makefile.
|
||||
.\nhsetup.bat
|
||||
3. Execute
|
||||
.\fetch.bat lua
|
||||
to place a copy of Lua into the lib subfolder of the NetHack source
|
||||
tree. NetHack 5.0 for Windows requires 3rd party Lua source that is not part
|
||||
of the NetHack distribution or repository.
|
||||
|
||||
3. Change your current directory to the src subfolder of the nethack
|
||||
4. If you want to include support of the optional curses interface in your
|
||||
build, execute
|
||||
.\fetch.cmd pdcursesmod
|
||||
to place a copy pdcursesmod into the lib subfolder of the NetHack
|
||||
tree.
|
||||
|
||||
5. Change your current directory to the src subfolder of the nethack
|
||||
source tree. The following command assumes you are still in the
|
||||
sys\windows folder from steps #1 and #2 above:
|
||||
cd ..\..\src
|
||||
|
||||
Compiling
|
||||
|
||||
4. Now that everything is set up, you should be ready to start the
|
||||
6. Now that everything is set up, you should be ready to start the
|
||||
process.
|
||||
|
||||
Your current directory should be the NetHack src directory.
|
||||
@@ -125,13 +122,13 @@ Compiling
|
||||
|
||||
Notes:
|
||||
|
||||
1. To rebuild NetHack after changing something, change your current directory
|
||||
N1. To rebuild NetHack after changing something, change your current directory
|
||||
to src and issue the appropriate command for your compiler:
|
||||
|
||||
For Microsoft compiler:
|
||||
nmake package
|
||||
|
||||
2. Depending on the build and compiler and tools used above, the
|
||||
N2. Depending on the build and compiler and tools used above, the
|
||||
package produced by the build will be either contain:
|
||||
- a 32-bit (x86) .exe file,
|
||||
which should run on any recent Win32 environment.
|
||||
|
||||
+28
-17
@@ -1,30 +1,41 @@
|
||||
@echo off
|
||||
if not exist lib\* mkdir lib
|
||||
@echo on
|
||||
|
||||
if exist %cd%\..\sys\windows\Makefile.nmake set LIBDIR=..\lib
|
||||
if exist %cd%\Makefile.nmake set LIBDIR=..\..\lib
|
||||
if exist %cd%\sys\windows\Makefile.nmake set LIBDIR=lib
|
||||
|
||||
set LUA_VERSION=5.4.8
|
||||
set LUASRC=%LIBDIR%/lua
|
||||
set CURLLUASRC=http://www.lua.org/ftp/lua-%LUA_VERSION%.tar.gz
|
||||
set CURLLUADST=lua-%LUA_VERSION%.tar.gz
|
||||
|
||||
set PDCVERSION=4.5.4
|
||||
set CURLPDCSRC=https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v%PDCVERSION%.zip
|
||||
set CURLPDCDST=pdcursesmod.zip
|
||||
|
||||
:proceed
|
||||
|
||||
if not exist %LIBDIR%\* mkdir lib
|
||||
|
||||
if [%1] == [lua] (
|
||||
set LUA_VERSION=5.4.8
|
||||
set LUASRC=../lib/lua
|
||||
set CURLLUASRC=http://www.lua.org/ftp/lua-%LUA_VERSION%.tar.gz
|
||||
set CURLLUADST=lua-%LUA_VERSION%.tar.gz
|
||||
if NOT exist lib/lua.h (
|
||||
cd lib
|
||||
if NOT exist %LIBDIR%\lua.h (
|
||||
pushd %LIBDIR%
|
||||
curl -L %CURLLUASRC% -o %CURLLUADST%
|
||||
tar -xvf %CURLLUADST%
|
||||
cd ..
|
||||
popd
|
||||
)
|
||||
echo Lua placed in lib/lua-%LUA_VERSION%.tar.gz
|
||||
echo Lua placed in %LIBDIR%\lua-%LUA_VERSION%.tar.gz
|
||||
)
|
||||
|
||||
if [%1] == [pdcursesmod] (
|
||||
set PDCVERSION=4.4.0
|
||||
set CURLPDCSRC=https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v%PDCVERSION%.zip
|
||||
set CURLPDCDST=pdcursesmod.zip
|
||||
if NOT exist lib/pdcursesmod/curses.h (
|
||||
cd lib
|
||||
if NOT exist %LIBDIR%\pdcursesmod\curses.h (
|
||||
pushd %LIBDIR%
|
||||
curl -L %CURLPDCSRC% -o %CURLPDCDST%
|
||||
tar -xvf %CURLPDCDST%
|
||||
mkdir pdcursesmod
|
||||
tar -C pdcursesmod --strip-components=1 -xvf %CURLPDCDST%
|
||||
cd ..
|
||||
popd
|
||||
)
|
||||
echo pdcursesmod placed in %LIBDIR%\pdcursesmod
|
||||
)
|
||||
|
||||
:done
|
||||
|
||||
Reference in New Issue
Block a user