diff --git a/.travis.yml b/.travis.yml
index bbac8cbe3..4ed41b36f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,7 +3,7 @@ matrix:
include:
- name: linux-xenial-gcc
os: linux
- env: HINTS=linux LUA_VERSION=5.3.5
+ env: HINTS=linux LUA_VERSION=5.4.0
compiler: gcc
script:
- cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../
@@ -12,7 +12,7 @@ matrix:
- make install
- name: linux-xenial-gcc-nocommon
os: linux
- env: HINTS=linux LUA_VERSION=5.3.5
+ env: HINTS=linux LUA_VERSION=5.4.0
compiler: gcc
script:
- echo "CFLAGS+=-fno-common" >>sys/unix/hints/$HINTS
@@ -22,7 +22,7 @@ matrix:
- make install
- name: linux-bionic-gcc
os: linux
- env: HINTS=linux LUA_VERSION=5.3.5
+ env: HINTS=linux LUA_VERSION=5.4.0
dist: bionic
compiler: gcc
script:
@@ -32,7 +32,7 @@ matrix:
- make install
- name: linux-xenial-clang
os: linux
- env: HINTS=linux LUA_VERSION=5.3.5
+ env: HINTS=linux LUA_VERSION=5.4.0
compiler: clang
script:
- cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../
@@ -41,7 +41,7 @@ matrix:
- make install
- name: linux-xenial-gcc-x11
os: linux
- env: HINTS=linux-x11 LUA_VERSION=5.3.5
+ env: HINTS=linux-x11 LUA_VERSION=5.4.0
compiler: gcc
addons:
apt:
@@ -56,7 +56,7 @@ matrix:
- make install
- name: linux-xenial-gcc-qt5
os: linux
- env: HINTS=linux-qt5 LUA_VERSION=5.3.5
+ env: HINTS=linux-qt5 LUA_VERSION=5.4.0
compiler: gcc
addons:
apt:
@@ -74,7 +74,7 @@ matrix:
- make QT_SELECT=5 MOC=moc install
- name: linux-bionic-gcc-x11
os: linux
- env: HINTS=linux-x11 LUA_VERSION=5.3.5
+ env: HINTS=linux-x11 LUA_VERSION=5.4.0
dist: bionic
compiler: gcc
addons:
@@ -90,7 +90,7 @@ matrix:
- make install
- name: linux-xenial-gcc-minimal
os: linux
- env: HINTS=linux-minimal LUA_VERSION=5.3.5
+ env: HINTS=linux-minimal LUA_VERSION=5.4.0
compiler: gcc
script: |
cd sys/unix/ && sh setup.sh hints/$HINTS && cd ../../
@@ -128,7 +128,7 @@ matrix:
script:
- export ADD_CURSES=Y
- export PDCURSES_TOP=../lib/pdcurses
- - export LUA_VERSION=5.3.5
+ - export LUA_VERSION=5.4.0
- sh sys/winnt/travis-gcc.sh
- test -d "lib/lua-$LUA_VERSION/src" || exit 0
- test -d "lib/pdcurses" || exit 0
@@ -137,7 +137,7 @@ matrix:
- mingw32-make install
- name: msdos-linuxhost-crosscompile
os: linux
- env: HINTS=linux LUA_VERSION=5.3.5
+ env: HINTS=linux LUA_VERSION=5.4.0
compiler: gcc
script:
# - export
diff --git a/Cross-compiling b/Cross-compiling
index e0f6df401..b7fc4b58b 100644
--- a/Cross-compiling
+++ b/Cross-compiling
@@ -407,7 +407,7 @@ Using the cross-compiler, build the following targets:
b) Lua (mandatory in 3.7)
- lib/lua-5.3.5/src
+ lib/lua-5.4.0/src
from sources: lua.c, lapi.c, lauxlib.c, lbaselib.c, lcode.c,
lcorolib.c, lctype.c, ldblib.c, ldebug.c,
diff --git a/Porting b/Porting
index cc27f9965..7d4d5153a 100644
--- a/Porting
+++ b/Porting
@@ -207,7 +207,7 @@ need to be included in the packaging of the game.
4.3. Lua
Compile and link into a library, or obtain a prebuilt Lua library for
-your platform. Place the Lua source into lib/lua-5.3.5 (or other folder
+your platform. Place the Lua source into lib/lua-5.4.0 (or other folder
representing an appropriate Lua version); place the compiled Lua library into
lib.
@@ -266,6 +266,6 @@ by code within the game itself. That was done to facilitate cross-compiling of
NetHack on one platform for game execution on another.
-# NetHack 3.6 Porting $NHDT-Date: 1524689603 2018/04/25 20:53:23 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.5 $
+# NetHack 3.6 Porting $NHDT-Date: 1594155866 2020/07/07 21:04:26 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.8 $
# Copyright (c) 2005 by Michael Allison
# NetHack may be freely redistributed. See license for details.
diff --git a/sys/msdos/Makefile.GCC b/sys/msdos/Makefile.GCC
index 95598d5d3..4c7bd6998 100644
--- a/sys/msdos/Makefile.GCC
+++ b/sys/msdos/Makefile.GCC
@@ -1,4 +1,4 @@
-# NetHack 3.6 Makefile.GCC $NHDT-Date: 1519600525 2018/02/25 23:15:25 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.34 $
+# NetHack 3.6 Makefile.GCC $NHDT-Date: 1594155873 2020/07/07 21:04:33 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.51 $
# Copyright (c) NetHack PC Development Team 1996-2019.
# PC NetHack 3.6 Makefile for djgpp V2
#
@@ -38,11 +38,17 @@ GAMEDIR =../binary
ADD_CURSES=Y
PDCURSES_TOP=../../pdcurses
+#---------------------------------------------------------------
+ifeq "$(LUA_VERSION)" "5.3.5"
+LUAVER=5.3.5
+else
+LUAVER=5.4.0
+endif
#---------------------------------------------------------------
# Location of LUA
#
# Original source needs to be obtained from:
-# http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# http://www.lua.org/ftp/lua-5.4.0.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -50,8 +56,7 @@ PDCURSES_TOP=../../pdcurses
# successfully build NetHack-3.7.
#
ADD_LUA=Y
-LUATOP=../lib/lua535
-
+LUATOP=../lib/lua$(subst .,, $(LUAVER))
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
@@ -300,12 +305,12 @@ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
#===============-=================================================
# LUA library
-# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
#=================================================================
LUASRC = $(LUATOP)/src
-LUALIB = $(O)lua535s.a
-LUADLL = $(O)lua535.a
+LUALIB = $(O)lua$(subst .,, $(LUAVER))s.a
+LUADLL = $(O)lua$(subst .,, $(LUAVER)).a
LUAINCL = -I$(LUASRC)
#LUAFLAGS = unix added -lm here?
LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB)
@@ -951,14 +956,14 @@ $(PATCHLEV_H):
lua.exe: $(O)lua.o $(LUALIB)
$(link) $(LFLAGS) -o$@ $(O)lua.o $(LUALIB)
-luac.exe: $(O)luac.o $(O)lua535s.a
+luac.exe: $(O)luac.o $(O)lua$(subst .,, $(LUAVER))s.a
$(link) $(LFLAGSU) -o$@ $(O)luac.o $(LUALIB)
-$(O)lua535.a: $(LUAOBJFILES)
+$(O)lua$(subst .,, $(LUAVER)).a: $(LUAOBJFILES)
$(cc) -shared -Wl,--export-all-symbols \
-Wl,--add-stdcall-alias -o $@ $<
-$(O)lua535s.a: $(LUAOBJFILES)
+$(O)lua$(subst .,, $(LUAVER))s.a: $(LUAOBJFILES)
ar rcS $@ $(LUAOBJFILES1)
ar rcS $@ $(LUAOBJFILES2)
ar rcs $@ $(LUAOBJFILES3)
diff --git a/sys/msdos/Makefile1.cross b/sys/msdos/Makefile1.cross
index 88f7efdd0..ae7e3fe19 100644
--- a/sys/msdos/Makefile1.cross
+++ b/sys/msdos/Makefile1.cross
@@ -312,13 +312,19 @@ $(HOST_O)prereq.tag: $(INCL)/nhlua.h hobj.tag $(U)makedefs \
$(HOST_O)utility.tag $(DAT)/nhdat
echo prereq done >$@
+ifeq "$(LUA_VERSION)" "5.3.5"
+LUAVER=5.3.5
+else
+LUAVER=5.4.0
+endif
+
$(INCL)/nhlua.h:
cd $(INCL); \
echo '/* nhlua.h - generated by Makefile1.cross */' > $@; \
- echo '#include "../lib/lua-5.3.5/src/lua.h"' >> $@; \
- sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-5.3.5/src/lua.h >> $@; \
- echo '#include "../lib/lua-5.3.5/src/lualib.h"' >> $@; \
- echo '#include "../lib/lua-5.3.5/src/lauxlib.h"' >> $@; \
+ echo '#include "../lib/lua-$(LUAVER)/src/lua.h"' >> $@; \
+ sed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < $(LIB)/lua-$(LUAVER)/src/lua.h >> $@; \
+ echo '#include "../lib/lua-$(LUAVER)/src/lualib.h"' >> $@; \
+ echo '#include "../lib/lua-$(LUAVER)/src/lauxlib.h"' >> $@; \
echo '/*nhlua.h*/' >> $@; \
cd $(SRC)
diff --git a/sys/msdos/Makefile2.cross b/sys/msdos/Makefile2.cross
index 8cd94ffc2..d81f80746 100644
--- a/sys/msdos/Makefile2.cross
+++ b/sys/msdos/Makefile2.cross
@@ -43,11 +43,17 @@ PDCURSES_TOP=../lib/pdcurses
# Set top of djgpp if not specified through ENV variables prior to make:
#DJGPP_TOP = $(HOME)/lib/djgpp
+#---------------------------------------------------------------
+ifeq "$(LUA_VERSION)" "5.3.5"
+LUAVER=5.3.5
+else
+LUAVER=5.4.0
+endif
#---------------------------------------------------------------
# Location of LUA
#
# Original source needs to be obtained from:
-# http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# http://www.lua.org/ftp/lua-5.4.0.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -55,7 +61,7 @@ PDCURSES_TOP=../lib/pdcurses
# successfully build NetHack-3.7.
#
ADD_LUA=Y
-LUATOP=../lib/lua-5.3.5
+LUATOP=../lib/lua-$(LUAVER)
#
#
#==============================================================================
@@ -308,18 +314,18 @@ ALLOBJ = $(VOBJ) $(SOBJ) $(TILOBJ) $(TILOBJ2) $(VVOBJ)
ifeq "$(ADD_LUA)" "Y"
#===============-=================================================
# LUA library
-# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
#=================================================================
LUASRC = $(LUATOP)/src
-LUALIB = $(O)lua535s.a
-#LUADLL = $(O)lua535.a
+LUALIB = $(O)lua$(subst .,, $(LUAVER))s.a
+#LUADLL = $(O)lua$(subst .,, $(LUAVER)).a
LUAINCL = -I$(LUASRC)
#LUAFLAGS = unix added -lm here?
LUATARGETS = lua.exe luac.exe $(LUALIB)
#LUATARGETS = $(LUADLL) $(LUALIB)
-LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \
+LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \
lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \
@@ -327,7 +333,7 @@ LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \
ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \
lvm.c lzio.c
-LUAOBJFILES1 = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \
+LUAOBJFILES1 = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
$(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o
LUAOBJFILES2 = $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
$(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o
@@ -336,7 +342,7 @@ LUAOBJFILES3 = $(O)lmathlib.o $(O)lmem.o $(O)loadlib.o $(O)lobject.o \
LUAOBJFILES4 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
$(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
-#LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \
+#LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
# $(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \
# $(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
# $(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \
@@ -345,9 +351,13 @@ LUAOBJFILES4 = $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
# $(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
# $(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
-LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4)
+ifeq "$(LUAVER)" "5.3.5"
+LUASRCFILES = $(LUASRCFILES) lbitlib.c
+LUAOBJFILES1 = $(LUAOBJFILES1) $(O)lbitlib.o
endif
+LUALIBOBJS = $(LUAOBJFILES1) $(LUAOBJFILES2) $(LUAOBJFILES3) $(LUAOBJFILES4)
+endif
ifeq "$(ADD_CURSES)" "Y"
#==========================================
# PDCurses build macros
diff --git a/sys/unix/Makefile.top b/sys/unix/Makefile.top
index 6da467db0..9070d60e8 100644
--- a/sys/unix/Makefile.top
+++ b/sys/unix/Makefile.top
@@ -1,5 +1,5 @@
# NetHack Top-level Makefile.
-# NetHack 3.6 Makefile.top $NHDT-Date: 1589911654 2020/05/19 18:07:34 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.49 $
+# NetHack 3.6 Makefile.top $NHDT-Date: 1594155882 2020/07/07 21:04:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $
# Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
# NetHack may be freely redistributed. See license for details.
@@ -75,7 +75,7 @@ VARDAT = $(VARDATD) $(VARDATND)
#CHGRP = chgrp
# Lua version
-LUA_VERSION = 5.3.5
+LUA_VERSION = 5.4.0
#
# end of configuration
diff --git a/sys/unix/NetHack.xcodeproj/project.pbxproj b/sys/unix/NetHack.xcodeproj/project.pbxproj
index ca03331a8..78a8a4b3b 100644
--- a/sys/unix/NetHack.xcodeproj/project.pbxproj
+++ b/sys/unix/NetHack.xcodeproj/project.pbxproj
@@ -1381,7 +1381,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_INC_DIR}\necho '/* nhlua.h - generated by Xcode script */' > nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lua.h\"' >> nhlua.h\nsed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < ${NH_LIB_DIR}/lua-5.3.5/src/lua.h >> nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lualib.h\"' >> nhlua.h\necho '#include \"../lib/lua-5.3.5/src/lauxlib.h\"' >> nhlua.h\necho '/*nhlua.h*/' >> nhlua.h\n";
+ shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_INC_DIR}\necho '/* nhlua.h - generated by Xcode script */' > nhlua.h\necho '#include \"../lib/lua-5.4.0/src/lua.h\"' >> nhlua.h\nsed -e '/(lua_error)/!d' -e '/(lua_error)/s/;/ NORETURN;/1' < ${NH_LIB_DIR}/lua-5.4.0/src/lua.h >> nhlua.h\necho '#include \"../lib/lua-5.4.0/src/lualib.h\"' >> nhlua.h\necho '#include \"../lib/lua-5.4.0/src/lauxlib.h\"' >> nhlua.h\necho '/*nhlua.h*/' >> nhlua.h\n";
};
544768B8239954B9004B9739 /* Build Lua library */ = {
isa = PBXShellScriptBuildPhase;
@@ -1400,7 +1400,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_LIB_DIR}\nmkdir -p lua\ncd ${NH_LIB_DIR}/lua-5.3.5/src\nmake a\ncp liblua.a ../../lua\ncd ../../..\n\n";
+ shellScript = "# Type a script or drag a script file from your workspace to insert its path.\ncd ${NH_LIB_DIR}\nmkdir -p lua\ncd ${NH_LIB_DIR}/lua-5.4.0/src\nmake a\ncp liblua.a ../../lua\ncd ../../..\n\n";
};
/* End PBXShellScriptBuildPhase section */
diff --git a/sys/vms/Makefile.src b/sys/vms/Makefile.src
index e215ad04d..3ce32ad5c 100644
--- a/sys/vms/Makefile.src
+++ b/sys/vms/Makefile.src
@@ -1,5 +1,5 @@
# NetHack Makefile (VMS) - for building nethack itself.
-# NetHack 3.6 Makefile.src $NHDT-Date: 1573165004 2019/11/07 22:16:44 $ $NHDT-Branch: paxed-lua-v2-merged $:$NHDT-Revision: 1.38 $
+# NetHack 3.6 Makefile.src $NHDT-Date: 1594155889 2020/07/07 21:04:49 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.50 $
# Copyright (c) 2011 by Robert Patrick Rankin
# NetHack may be freely redistributed. See license for details.
@@ -29,7 +29,7 @@ VMS = [-.sys.vms]
WINSHR = [-.win.share]
X11 = [-.win.X11]
#LUA source tree parallel to NetHack tree in lua535 directory
-LUA = [-.-.lua535.src]
+LUA = [-.-.lua540.src]
MAKEFILE= $(SRC)Makefile.
# if you are using gcc as your compiler:
@@ -214,8 +214,17 @@ HOBJ = $(FIRSTOBJ) $(SYSOBJ) $(WINOBJ) $(RANDOBJ) \
$(HOBJ1) $(HOBJ2) $(HOBJ3) $(HOBJ4) $(HOBJ5) $(HOBJ6)
LUAOBJ = nhlua.o,nhlsel.o
+
+# 5.4.0 adds header files ljumptab.h and lopnames.h and removes lbitlib.c
+# so comment top two and uncomment bottom two for the previous version (5.3.5)
+LUA535SRCFILES =
+LUA535OBJFILES =
+#LUA535SRCFILES = $(LUA)lbitlib.c
+#LUA535OBJFILES = lbitlib.o,
+endif
+
LUALIBSRC = $(LUA)lapi.c $(LUA)lauxlib.c $(LUA)lbaselib.c \
- $(LUA)lbitlib.c $(LUA)lcode.c $(LUA)lcorolib.c \
+ $(LUA535SRCFILES) $(LUA)lcode.c $(LUA)lcorolib.c \
$(LUA)lctype.c $(LUA)ldblib.c $(LUA)ldebug.c \
$(LUA)ldo.c $(LUA)ldump.c $(LUA)lfunc.c $(LUA)lgc.c \
$(LUA)linit.c $(LUA)liolib.c $(LUA)llex.c \
@@ -226,7 +235,7 @@ LUALIBSRC = $(LUA)lapi.c $(LUA)lauxlib.c $(LUA)lbaselib.c \
$(LUA)ltm.c $(LUA)lundump.c $(LUA)lutf8lib.c \
$(LUA)lvm.c $(LUA)lzio.c
-LUALIBOBJ1 = lapi.obj,lauxlib.obj,lbaselib.obj,lbitlib.obj, \
+LUALIBOBJ1 = lapi.obj,lauxlib.obj,lbaselib.obj, $(LUA535OBJFILES) \
lcode.obj,lcorolib.obj,lctype.obj,ldblib.obj
LUALIBOBJ2 = ldebug.obj,ldo.obj,ldump.obj,lfunc.obj, \
lgc.obj,linit.obj,liolib.obj,llex.obj
@@ -448,11 +457,12 @@ wintext.obj : $(X11)wintext.c $(HACK_H) $(INC)winX.h $(INC)xwindow.h
winval.obj : $(X11)winval.c $(HACK_H) $(INC)winX.h
tile.obj : $(SRC)tile.c $(HACK_H)
vis_tab.obj : vis_tab.c $(CONFIG_H) $(INC)vis_tab.h
-# lua 5.3.5 code
+# lua 5.4.0 code
lapi.obj : $(LUA)lapi.c
lauxlib.obj : $(LUA)lauxlib.c
lbaselib.obj : $(LUA)lbaselib.c
-lbitlib.obj : $(LUA)lbitlib.c
+#uncomment this for 5.3.5
+#lbitlib.obj : $(LUA)lbitlib.c
lcode.obj : $(LUA)lcode.c
lcorolib.obj : $(LUA)lcorolib.c
lctype.obj : $(LUA)lctype.c
diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt
index 4eb5d1348..22c9f4484 100644
--- a/sys/winnt/Install.nt
+++ b/sys/winnt/Install.nt
@@ -5,7 +5,7 @@
NetHack 3.7 on a Windows system
(Windows 7/8.x/10 or later only)
==============================================================
- Last revision: $NHDT-Date: 1575245156 2019/12/02 00:05:56 $
+ Last revision: $NHDT-Date: 1594155895 2020/07/07 21:04:55 $
Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison.
@@ -47,7 +47,7 @@ version. You can use one of the following build environments:
| | |
+----+ +------+ +-----------+
| | | | | |
- share winnt tty win32 Lua-5.3.5 pdcurses
+ share winnt tty win32 Lua-5.4.0 pdcurses
|
vs2017
diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc
index 29da0a377..363b0d454 100644
--- a/sys/winnt/Makefile.gcc
+++ b/sys/winnt/Makefile.gcc
@@ -1,4 +1,4 @@
-# NetHack 3.7 Makefile.gcc $NHDT-Date: 1546174698 2018/12/30 12:58:18 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.71 $
+# NetHack 3.7 Makefile.gcc $NHDT-Date: 1594155895 2020/07/07 21:04:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.109 $
# Copyright (c) 2010 by Michael Allison
# NetHack may be freely redistributed. See license for details.
#
@@ -126,10 +126,16 @@ TARGET_CPU=x86
# x86libs or x64libs depending on whether you're building for 64 bits.
#
#---------------------------------------------------------------
+ifndef LUA_VERSION
+LUAVER=5.4.0
+else
+LUAVER=$(LUA_VERSION)
+endif
+#---------------------------------------------------------------
# Location of LUA
#
# Original source needs to be obtained from:
-# http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# http://www.lua.org/ftp/lua-5.4.0.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -137,11 +143,7 @@ TARGET_CPU=x86
# successfully build NetHack-3.7.
#
ADD_LUA=Y
-LUATOP=../lib/lua-5.3.5
-ifndef LUA_VERSION
-LUA_VERSION=5.3.5
-endif
-
+LUATOP=../lib/lua-$(LUAVER)
#
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
@@ -412,10 +414,12 @@ OPTIONS_FILE = $(DAT)\options
#===============-=================================================
# LUA library
-# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
#=================================================================
-LUAVER = 5.3.5
+ifndef LUAVER
+LUAVER = 5.4.0
+endif
LUASRC = $(LUATOP)/src
LUALIB = $(O)lua-$(LUAVER).static.a
LUADLL = $(O)lua-$(LUAVER).a
@@ -423,7 +427,7 @@ LUAINCL = -I$(LUASRC)
#LUAFLAGS = unix added -lm here?
LUATARGETS = lua.exe luac.exe $(LUADLL) $(LUALIB)
-LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \
+LUASRCFILES = lapi.c lauxlib.c lbaselib.c lcode.c \
lcorolib.c lctype.c ldblib.c ldebug.c ldo.c \
ldump.c lfunc.c lgc.c linit.c liolib.c llex.c \
lmathlib.c lmem.c loadlib.c lobject.c lopcodes.c \
@@ -431,7 +435,7 @@ LUASRCFILES = lapi.c lauxlib.c lbaselib.c lbitlib.c lcode.c \
ltable.c ltablib.c ltm.c lundump.c lutf8lib.c \
lvm.c lzio.c
-LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \
+LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
$(O)lcode.o $(O)lcorolib.o $(O)lctype.o $(O)ldblib.o \
$(O)ldebug.o $(O)ldo.o $(O)ldump.o $(O)lfunc.o \
$(O)lgc.o $(O)linit.o $(O)liolib.o $(O)llex.o \
@@ -439,6 +443,12 @@ LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o $(O)lbitlib.o \
$(O)lopcodes.o $(O)loslib.o $(O)lparser.o $(O)lstate.o \
$(O)lstring.o $(O)lstrlib.o $(O)ltable.o $(O)ltablib.o \
$(O)ltm.o $(O)lundump.o $(O)lutf8lib.o $(O)lvm.o $(O)lzio.o
+ifeq "$(LUAVER)" "5.3.5"
+# 5.4.0 adds header files ljumptab.h and lopnames.h and removes lbitlib.c
+# so we have to tack those on for the previous version (5.3.5)
+LUASRCFILES = $(LUASRCFILES) lbitlib.c
+LUAOBJFILES = $(LUAOBJFILES) lbitlib.o
+endif
ifeq "$(ADD_CURSES)" "Y"
#==========================================
diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc
index 7a89b93cb..0441ab35a 100644
--- a/sys/winnt/Makefile.msc
+++ b/sys/winnt/Makefile.msc
@@ -130,12 +130,17 @@ DEBUGINFO = Y
#==============================================================================
# This marks the end of the BUILD DECISIONS section.
#==============================================================================
+!IFNDEF LUA_VERSION
+LUAVER=5.4.0
+!ELSE
+LUAVER=$(LUA_VERSION)
+!ENDIF
#==============================================================================
#
# Location of LUA
#
# Original source needs to be obtained from:
-# http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# http://www.lua.org/ftp/lua-5.4.0.tar.gz
#
# This build assumes that the LUA sources are located
# at the specified location. If they are actually elsewhere
@@ -143,7 +148,7 @@ DEBUGINFO = Y
# successfully build NetHack-3.7. You cannot build a functional
# version of NetHack-3.7 Work-in-progress without including Lua.
#
-LUATOP=..\lib\lua-5.3.5
+LUATOP=..\lib\lua-$(LUAVER)
#
#
#==============================================================================
@@ -380,11 +385,12 @@ OPTIONS_FILE = $(DAT)\options
#===============-=================================================
# LUA library
-# Source from http://www.lua.org/ftp/lua-5.3.5.tar.gz
+# Source from http://www.lua.org/ftp/lua-5.4.0.tar.gz
#=================================================================
+!IFNDEF LUAVER
!IFDEF LUATOP
-LUATMP = $(LUATOP:..\..\lua-=) #strip leading "..\..\lua-"
+LUATMP = $(LUATOP:..\lib\lua-=) #strip leading "..\lib\lua-"
LUATMP = $(LUATMP:-beta=) #strip suffix if exists "-beta"
!IF "$(LUATMP)" == "5.4.0"
LUAVER = 5.4.0
@@ -394,12 +400,13 @@ LUAVER = 5.4.0
!ENDIF
!IFNDEF LUAVER
-LUATMP = $(LUATOP:..\..\LUA-=) #strip leading "..\..\LUA-"
+LUATMP = $(LUATOP:..\lib\LUA-=) #strip leading "..\lib\LUA-"
LUATMP = $(LUATMP:-BETA=) #strip suffix if exists "-BETA"
-!IF "$(LUATMP)" == "5.4.0"
-LUAVER = 5.4.0
-!ELSE
+!IF "$(LUATMP)" == "5.3.5"
LUAVER = 5.3.5
+!ELSE
+LUAVER = 5.4.0
+!ENDIF
!ENDIF
!ENDIF
@@ -429,7 +436,7 @@ LUAOBJFILES = $(O)lapi.o $(O)lauxlib.o $(O)lbaselib.o \
!IF "$(LUAVER)" == "5.3.5"
LUASRCFILES = $(LUASRCFILES) lbitlib.c
LUAOBJFILES = $(LUAOBJFILES) $(O)lbitlib.o
-!ELSEIF "$(LUAVER)" == "5.4.0"
+!ELSE
# 5.4.0 adds header files ljumptab.h and lopnames.h
# and removes lbitlib.c
!ENDIF
diff --git a/sys/winnt/travis-gcc.sh b/sys/winnt/travis-gcc.sh
index 6f731cea8..bcf44b5b8 100644
--- a/sys/winnt/travis-gcc.sh
+++ b/sys/winnt/travis-gcc.sh
@@ -3,6 +3,6 @@ mkdir -p lib
cd lib
git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses
#git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags
-curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
-tar zxf lua-5.3.5.tar.gz
+curl -R -O http://www.lua.org/ftp/lua-5.4.0.tar.gz
+tar zxf lua-5.4.0.tar.gz
cd ../
diff --git a/win/win32/vs2017/NetHack.vcxproj b/win/win32/vs2017/NetHack.vcxproj
index 485081cd5..d31325331 100644
--- a/win/win32/vs2017/NetHack.vcxproj
+++ b/win/win32/vs2017/NetHack.vcxproj
@@ -56,7 +56,10 @@
-
+
+ true
+ false
+
diff --git a/win/win32/vs2017/NetHackProperties.props b/win/win32/vs2017/NetHackProperties.props
index 227fe601d..8c3665ce3 100644
--- a/win/win32/vs2017/NetHackProperties.props
+++ b/win/win32/vs2017/NetHackProperties.props
@@ -5,6 +5,8 @@
3
7
0
+ 5.4.0
+ true
@@ -21,5 +23,13 @@
$(PATCHLEVEL)
true
+
+ $(LUA_VERSION)
+ true
+
+
+ $(ADD_PACKAGE)
+ true
+
diff --git a/win/win32/vs2017/NetHackW.vcxproj b/win/win32/vs2017/NetHackW.vcxproj
index e2845b42c..5f8f7a415 100644
--- a/win/win32/vs2017/NetHackW.vcxproj
+++ b/win/win32/vs2017/NetHackW.vcxproj
@@ -50,7 +50,10 @@
-
+
+ true
+ false
+
diff --git a/win/win32/vs2017/dirs.props b/win/win32/vs2017/dirs.props
index 8e884b1d0..05b6543ac 100644
--- a/win/win32/vs2017/dirs.props
+++ b/win/win32/vs2017/dirs.props
@@ -10,7 +10,7 @@
$(RootDir)dat\
$(RootDir)doc\
$(RootDir)include\
- $(RootDir)lib\lua-5.3.5\src\
+ $(RootDir)lib\lua-$(LUA_VERSION)\src\
$(RootDir)src\
$(RootDir)sys\
$(RootDir)util\
diff --git a/win/win32/vs2017/makedefs.vcxproj b/win/win32/vs2017/makedefs.vcxproj
index 00dab103c..190952a6a 100644
--- a/win/win32/vs2017/makedefs.vcxproj
+++ b/win/win32/vs2017/makedefs.vcxproj
@@ -55,10 +55,10 @@
Outputs="$(IncDir)\nhlua.h">
-
+
-
-
+
+
diff --git a/win/win32/vs2017/travisci.sh b/win/win32/vs2017/travisci.sh
index 7c16f6c9c..6eb4fa64a 100644
--- a/win/win32/vs2017/travisci.sh
+++ b/win/win32/vs2017/travisci.sh
@@ -24,13 +24,13 @@ export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER
export LIB=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/$VSVER/$TOOLSVER/VC/Tools/MSVC/$MSVER/lib/x86:$LIB
export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/ucrt/x86:$LIB
export LIB=/c/Program\ Files\ \(x86\)/Windows\ Kits/10/lib/$WKITVER/um/x86:$LIB
-export LUA_VERSION=5.3.5
+export LUA_VERSION=5.4.0
mkdir -p lib
cd lib
git clone --depth 1 https://github.com/wmcbrine/PDCurses.git pdcurses
#git clone --depth 1 https://github.com/universal-ctags/ctags.git ctags
-curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
-tar zxf lua-5.3.5.tar.gz
+curl -R -O http://www.lua.org/ftp/lua-$LUA_VERSION.tar.gz
+tar zxf lua-$LUA_VERSION.tar.gz
#cd ctags
#nmake -f mk_mvc.mak
#cd ../../