Commit Graph
723 Commits
Author SHA1 Message Date
nhmall 2359a9820e prototype fix after Windows gcc complaint 2019-11-11 18:12:39 -05:00
nhmall 3bc26e6c65 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-11 14:33:31 -05:00
nhmall 900a826e8e Merge branch 'NetHack-3.6' 2019-11-11 14:32:09 -05:00
nhmall 6dfbff9d4b --showpaths wasn't returning the paths if there was an error in a config file
Also,
Windows only: Introduces some environment variable substitution for paths
specified in a config file
2019-11-11 12:49:54 -05:00
nhmall bc69fc65d2 Merge branch 'NetHack-3.6' into bart-test 2019-11-11 11:27:50 -05:00
nhmall 632c2efdcd Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-09 12:25:43 -05:00
nhmall afec87a766 Merge branch 'NetHack-3.6' 2019-11-09 12:24:10 -05:00
nhmall c566c01f8d add command line option --showpaths
Add
	--showpaths
early option to show where NetHack is expecting to find certain files
without starting up a game. It exits afterwards.

Windows sample (for illustration only, locations may differ for you):
    Variable playground locations:
        [hackdir   ]="C:\Users\JohnDoe\NetHack\3.6\"
        [leveldir  ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [savedir   ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
        [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
        [datadir   ]="C:\personal\nhdev\363\test\binary\"
        [scoredir  ]="C:\ProgramData\NetHack\3.6\"
        [lockdir   ]="C:\ProgramData\NetHack\3.6\"
        [sysconfdir]="C:\ProgramData\NetHack\3.6\"
        [configdir ]="C:\Users\JohnDoe\NetHack\3.6\"
        [troubledir]="C:\Users\JohnDoe\NetHack\3.6\"
    Your system configuration file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\sysconf"
    Your system symbols file (in sysconfdir):
        "C:\Users\JohnDoe\NetHack\3.6\symbols"
    Your personal configuration file (in configdir):
        "C:\Users\JohnDoe\NetHack\3.6\.nethackrc"

Linux (for illustration only, locations may differ for you):
    Your system configuration file:
        "/home/johndoe/nh/install/games/lib/nethackdir/sysconf"
    Your system symbols file:
        "/home/johndoe/nh/install/games/lib/nethackdir/symbols"
    Your personal configuration file:
        "/home/johndoe/.nethackrc"
2019-11-09 10:57:25 -05:00
nhmall 2709a395be more makefile.msc 2019-11-08 18:01:53 -05:00
nhmall 71be3f8163 some Makefile.msc macro shenanigans 2019-11-08 17:49:07 -05:00
nhmall 293082079c suppress a warning in one lua file build 2019-11-07 12:06:40 -05:00
nhmall fecf930ac0 Makefile updates 2019-11-06 19:47:37 -05:00
nhmall 4053e38af1 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-06 16:53:23 -05:00
nhmall c675b234d8 Merge branch 'NetHack-3.6' 2019-11-06 16:52:25 -05:00
nhmall e3b69ccc43 buffer size 2019-11-06 16:51:47 -05:00
nhmall dc0c95c521 Merge branch 'NetHack-3.7' into paxed-lua-v2-merged 2019-11-06 16:49:33 -05:00
nhmall 0494152aea Merge branch 'NetHack-3.6' 2019-11-06 16:45:43 -05:00
nhmall 88f1d2f365 don't hardcode the version id in windmain 2019-11-06 16:44:25 -05:00
nhmall 223c31af0c some build fix-ups 2019-11-06 13:43:27 -05:00
nhmall bcb627100b Merge branch 'paxed-lua-merged3' into paxed-lua-v2-merged 2019-11-06 12:56:21 -05:00
Pasi Kallinen fd55d9118e Use lua for special level files
Game is playable, and should compile on linux and Windows.
Assumes you have a lua 5.3 library available.

Removes level compiler and associated files.
Replaces special level des-files with lua scripts.
Exposes some NetHack internals to lua:
 - des-table with commands to create special levels
 - nh-table with NetHack core commands
 - nhc-table with some constants
 - u-table with some player-specific data (u-struct)
 - selection userdata

Adds some rudimentary tests.

Adds new extended command #wizloadlua to run a specific script,
and #wizloaddes to run a specific level-creation script.

nhlib.lua is loaded for every lua script.

Download and untar lua:
  mkdir lib
  cd lib
  curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
  tar zxf lua-5.3.5.tar.gz

Then make nethack normally.
2019-11-06 18:43:20 +02:00
nhmall 29002ccf0b No PDCurses right out-of-the-box; requires an edit 2019-11-06 17:25:44 +02:00
nhmall 0c7e740b44 update Windows Makefiles to support TRAVIS CI builds 2019-11-06 17:25:44 +02:00
nhmall be94808d67 build fix for Windows if pdcurses is included after recent changes
cursmain.o : error LNK2001: unresolved external symbol _erase_char
cursmesg.o : error LNK2001: unresolved external symbol _erase_char
cursmain.o : error LNK2001: unresolved external symbol _kill_char
cursmesg.o : error LNK2001: unresolved external symbol _kill_char
2019-11-06 17:25:44 +02:00
Bart House d4ff00cd40 Updated windows directory paths to latest iteration of design. 2019-11-04 19:34:03 -08:00
nhmall f07bf610b8 Merge branch 'NetHack-3.6' 2019-11-04 01:18:24 -05:00
Bart House 6b88a19365 Added new map_mode tiles_fit_to_screen for Windows NetHackW.exe 2019-11-03 17:59:39 -08:00
Bart House 7c5a2adfa5 Lock TROUBLEPREFIX after parsing sysconf. 2019-11-03 14:07:11 -08:00
Bart House da85259782 Fixes to template files . 2019-11-03 14:06:49 -08:00
Bart House f0707fee6e More tweaks to how windows deals with directory paths. 2019-11-03 13:31:17 -08:00
nhmall ffec86b244 Merge branch 'NetHack-3.6' 2019-11-02 22:53:46 -04:00
nhmall 9319e3577b use new Windows file names 2019-11-02 22:43:25 -04:00
nhmall a259d03460 Windows Makefile catch-up bits 2019-11-02 22:33:34 -04:00
Bart House 11018da6b8 Renamed configuration file for windows to .nethackrc.
Also adjusted name of template files populated during windows builds.
2019-11-02 19:11:26 -07:00
Bart House 3a315a7c76 Make type Win10 and gWin10 local to win10.c module. 2019-11-02 12:10:13 -07:00
Bart House 0bbedb2933 Fix cut and paste error in output string. 2019-11-02 11:51:20 -07:00
Bart House 4e11038871 Merge branch 'NetHack-3.6' 2019-11-02 11:40:19 -07:00
Bart House 33149eed0e Move is_desktop_bridge() api to win10 wrapper. 2019-11-02 11:39:11 -07:00
nhmall 28a4c65caa Merge branch 'NetHack-3.6' 2019-11-02 12:12:59 -04:00
nhmall 35fc46e3eb missing constants on mingw build fix
Errors seen during build:
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1

DEFINE_KNOWN_FOLDER is using this particular definition in the mingw
header files:

rather than this one:

So, the known folder values that recent code is using such as
FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are
being declared as external constants.

That is why the error is a link error. We need to include -luuid on
the link command line because those external constants are defined
in uuid.lib.
2019-11-02 09:23:34 -04:00
nhmall 6d385661c0 Merge branch 'NetHack-3.6' 2019-11-02 01:58:32 -04:00
nhmall 3587d8aee9 bump Windows supported version in mingw-w64 sys/winnt/Makefile.gcc
mingw-w64 sys/winnt/Makefile.gcc required a Windows version bump from
0x0501 to 0x0601 (XP level to Windows 7 level) during compile in
order for the mingw system header files to include some of the
needed support for recent Windows port changes.
2019-11-02 01:03:02 -04:00
nhmall 4b163e3d55 Revert "quiet a mingw warning"
This reverts commit e33dfed456.
2019-11-01 16:33:04 -04:00
Bart House d9d47c120b Merge branch 'NetHack-3.6' 2019-10-31 20:46:54 -07:00
nhmall e33dfed456 quiet a mingw warning 2019-10-31 19:43:59 -04:00
nhmall b377771849 Merge branch 'NetHack-3.6' 2019-10-31 12:26:27 -04:00
nhmall 919765f67f Windows: link with ole32.lib and shell32.lib 2019-10-31 12:16:03 -04:00
Bart House 86473526b8 Save a copy of the symbols file to symbols.save when updating. 2019-10-30 19:17:03 -07:00
nhmall 61fe703331 Merge branch 'NetHack-3.6' 2019-10-30 20:22:48 -04:00
nhmall 33d00cf0e4 attempt to get mingw building correctly after recent changes
make typedef of boolean match mingw header files
link with shell32 and ole32 as Makefile.msc now had to do
kludge some stuff missing from mingw headers in sys/winnt/windmain.c
2019-10-30 18:48:28 -04:00