win\curses\cursstat.c(886) : error C4703: potentially uninitialized local pointer variable 'p' used
- Copyright (c) NetHack Development Team 1990-2018
+ Copyright (c) NetHack Development Team 1990-2019
NetHack may be freely redistributed. See license for details.
==============================================================
Instructions for compiling and installing
NetHack 3.6 on a Windows system
(Windows 7/8.x/10 or later only. XP may work but is untested)
==============================================================
- Last revision: $NHDT-Date: 1542545993 2018/11/18 12:59:53 $
+ Last revision: $NHDT-Date: 1554784481 2019/04/09 04:34:41 $
Credit for the porting of NetHack to the Win32 Console Subsystem goes to
the NT Porting Team started by Michael Allison.
You can build a TTY version of NetHack and a Windows Graphical
version. You can use one of the following build environments:
- o A copy of Microsoft Visual Studio 2017 Community Edition
+ o A copy of Microsoft Visual Studio 2017 Community Edition or
+ a copy of Microsoft Visual Studio 2019 Community Edition
OR
The Visual Studio 2017 NetHack solution file can be found here:
win\win32\vs2017\NetHack.sln
+You can use that same win\win32\vs2017\NetHack.sln with Visual Studio 2019,
+but you may have to retarget the projects:
+ Windows SDK Version: 10.0.17763.0 [ There have been some reports of
+ difficulties if you instead choose
+ "10.0 (latest installed version)" ]
+ Platform Toolset: Upgrade to v142
+
+
Before executing the steps to build listed in the next paragraph,
decide if you want to include optional curses window-port. See
the note just below entitled "Optional curses window-port support."
-# NetHack 3.6 Makefile.msc $NHDT-Date: 1550344504 2019/02/16 19:15:04 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.152 $ */
+# NetHack 3.6 Makefile.msc $NHDT-Date: 1554784482 2019/04/09 04:34:42 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.153 $ */
# Copyright (c) NetHack PC Development Team 1993-2019
#
#==============================================================================
# NetHack 3.6.x Makefile for MS Visual Studio Visual C++ compiler
#
# Visual Studio Compilers Tested:
-# - Microsoft Visual Studio 2010 Express, with the Platform SDK
-# - Microsoft Visual Studio 2013 Express
# - Microsoft Visual Studio 2017 Community Edition
+# - Microsoft Visual Studio 2019 Community Edition
#
#==============================================================================
# This is used for building two versions of NetHack:
-DHAS_STDINT_H -DHAS_INLINE $(CURSESDEF) \
-EHsc -fp:precise -Gd -GF -GS -Gy \
$(CL_RECENT) -WX- -Zc:forScope -Zc:wchar_t -Zi
-cdebug= -analyze- -D"_DEBUG" -Gm -MTd -RTC1 -Od
-crelease= -analyze- -D"_MBCS" -errorReport:prompt -Gm- -MT -O2 -Ot -Ox -Oy
+cdebug= -analyze- -D"_DEBUG" -MTd -RTC1 -Od
+crelease= -analyze- -D"_MBCS" -errorReport:prompt -MT -O2 -Ot -Ox -Oy
lcommon= /NOLOGO /INCREMENTAL:NO
-@REM NetHack 3.6 nhsetup.bat $NHDT-Date: 1432512794 2015/05/25 00:13:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.33 $ */
+@REM NetHack 3.6 nhsetup.bat $NHDT-Date: 1554784485 2019/04/09 04:34:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.37 $ */
@REM Copyright (c) NetHack PC Development Team 1993-2017
@REM NetHack may be freely redistributed. See license for details.
@REM Win32 setup batch file, see Install.nt for details
echo Done copying files.
+echo Checking version of VC++ installed...
+:vscheck2019
+SET REGTREE=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio
+@REM i can see your house from here... or at least your VC++ folder
+set VCDir="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\"
+if not defined VCDir goto :vscheck2017
+if not exist %VCDir% goto :vscheck2017
+if not "%VSCMD_VER%"=="16.0.0" goto :vscheck2017
+set MSVCVERSION=2019
+set MSVCPROJ=2017
+goto :fallback
+
:vscheck2017
SET REGTREE=HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\SxS\VS7
@REM i can see your house from here... or at least your VC++ folder
-echo Checking version of VC++ installed...
-echo Checking for VC2017 Community Edition...
for /f "usebackq skip=2 tokens=1-2*" %%a IN (`reg query %REGTREE% /v 15.0`) do @set VCDir="%%c"
if not defined VCDir goto :vscheck2015
if not exist %VCDir% goto :vscheck2015
set MSVCVERSION=2017
+set MSVCPROJ=2017
goto :fallback
-:vscheck2015
-rem cannot use the registry trick used for vc2017
-rem 14 = 2015
-SET VCVERS=14
-rem Finally, let's determine the root folder for this VC installation.
-set VCROOT=%%VS%VCVERS%0COMNTOOLS%%
-if "%VCROOT:~-1%"=="\" set VCROOT=%VCROOT:~0,-1%
-rem VCROOT=VSDir\Common7\Tools
-call :dirname VCROOT "%VCROOT%"
-rem VCROOT=VSDir\Common7
-call :dirname VCROOT "%VCROOT%"
-rem VCROOT=VSDir
-set VCDir=%VCROOT%\VC
-SET MSVCVERSION=2015
-
:fallback
echo Using VS%MSVCVERSION%.
-set SRCPATH=%WIN32PATH%\vs%MSVCVERSION%
+set SRCPATH=%WIN32PATH%\vs%MSVCPROJ%
echo NetHack VS%MSVCVERSION% project files are in %SRCPATH%
goto :done
int i, fld, cap_and_hunger, time_and_score, cond_count;
char *text;
#ifdef STATUS_HILITES
- char *p, savedch = '\0';
+ char *p = 0, savedch = '\0';
int coloridx = NO_COLOR, attrmask = 0;
#endif /* STATUS_HILITES */
int height_needed, height, width, x = 0, y = 0;