Commit Graph

24 Commits

Author SHA1 Message Date
nhmall
14ef7b6005 paste error 2022-10-06 21:39:00 -04:00
nhmall
d1755013b4 less specific re version to reduce doc maintenance 2022-10-06 21:36:23 -04:00
nhmall
a1a00c8753 djgpp cross-compiler version update 2022-10-06 21:17:04 -04:00
Ray Chason
8b6fe9d205 Support wide Curses on MS-DOS
Also, fix IBMGraphics on Curses
2022-10-02 20:41:02 -04:00
nhmall
3db819478f update OS terminology used in some text references 2022-02-04 11:26:14 -05:00
nhmall
7a44b3b52e hints updates
move out-of-date hints files to the outdated folder.

rename the hints files, and hints/include files that are currently
named *.2020 to *.370 (next release number).
2021-12-31 08:48:24 -05:00
nhmall
9bb96322a8 compile NetHack-3.7 without makedefs-generated .h files
This evolves and hopefully eases the game-build requirements by
removing game-compile dependencies on any header files generated
by the makedefs utility, including:

date.h dependency and its inclusion is removed and comparable functionality
is produced at runtime via new file src/date.c.

pm.h dependency and its inclusion is removed and comparable functionality is
produced by moving the monster definitions from monst.c into new header
file called monsters.h and altering them slightly. The former pm.h header
file #define PM_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

onames.h dependency and	its inclusion is removed and comparable functionality
is produced by moving the object definitions from objects.c into new header
file called objects.h and altering them slightly. The former onames.h header
file #define values are now replaced with appropriate emitted enum entries
during the compiler preprocessing.

artilist.h has been slightly altered, and the former onames.h artifact-related
header file #define ART_ values are now replaced with appropriate emitted enum
entries during the compiler preprocessing.

makedefs can still produce date.h (makedefs -v), pm.h (makedefs -p), and
onames.h (makedefs -o) for reference purposes. They won't be used during
the compiler.

The other uses for makedefs remain. They are used to prepare external
file content that the game utilizes, not prerequisite code for the
compile:
    makedefs -d    (database)
    makedefs -r    (rumors)
    makedefs -h    (oracles)
    makedefs -s    (epitaphs, engravings, bogusmons)

date.c

Pull the code for date/time stamping from mdlib.c into date.c.
Set date.o to be dependent on source files, header files, and .o files
so that date.o is rebuilt from date.c when any of those changes, thus
ensuring an accurate date/time stamp. It also includes git sha
functionality formerly done by makedefs writing #define directives
into include/date.h. For unix it passes the git info on
the compile line for date.c (via sys/unix/hints/linux.2020, macOS.2020)

nethack --dumpenums (optional, but on by default)

Allow developer to obtain some internal enum values from NetHack
without having to resort to an external utility such as
makedefs.

Uncomment #define NODUMPENUMS in config.h to disable this.

The updates to sys/windows/Makefile.gcc have not been tested yet.
2021-08-21 07:59:18 -04:00
Dean Luick
3ffd330c31 Remove vision tables from makedefs
Update makdefs source and its man page.

Remove all mentions of the vision table files from:
o .gitattributes
o .gitignore
o Files
o Cross-compiling

Add a brief note in the fixes file.
2021-01-03 13:37:25 -06:00
nhmall
1d94e65e45 finish mapglyph() removal 2021-01-02 09:22:53 -05:00
nhmall
99980376b2 minor corrections to Cross-compiling doc 2020-12-07 08:00:30 -05:00
nhmall
9ea45d7a1f remove some trailing whitespace 2020-11-25 07:23:23 -05:00
nhmall
cb2b710b22 update Cross-compiling document for PR385 Web Assemply and libnethack
Credit: The initial Web Assembly cross compile was found in a pull request:
            https://github.com/NetHack/NetHack/pull/385
        by apowers313. The pull request was merged with some accompanying
        NetHack source tree integration changes in early October 2020.

Cross-compiler used: emscripten
Cross-compiler url: https://emscripten.org/docs/getting_started/downloads.html

    Here's a brief guide to obtaining the cross-compiler sources via git and
    building it on your system.

    For Ubuntu, the build prerequisite packages for building the compiler can
    be easily obtained:

        sudo apt-get install python3 cmake default-jre

    For macOS, you will need to install Xcode, git, cmake, Python 3.5 or new
    (at time of this writing).

    After installing the prerequite packages above, obtain the cross-compiler
    via git and build it from the directory of your choice using steps similar
    to these:

            git clone https://github.com/emscripten-core/emsdk.git
            cd emsdk
            git pull
            ./emsdk install latest
            ./emsdk activate latest
            source ./emsdk_env.sh

    The steps above reflect what was outlined at this url at the time
    of writing:

            https://emscripten.org/docs/getting_started/downloads.html

    That is the definitive source and trumps anything documented here.

    On your linux host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/linux.2020 ; cd ../..
        make fetch-lua

    On your macOS host, prepare to cross-compile NetHack as follows:

        cd sys/unix ; sh setup.sh hints/macOS.2020 ; cd ../..
        make fetch-lua

    Then, cross-compile to targets/wasm as follows:

        make CROSS_TO_WASM=1

    You can build src/nethacklib.a from pull request 385 as follows:

        make WANT_LIBNH=1

    Do not add any additional windowport interfaces to your build
    (such as WANT_WIN_TTY=1 WANT_WIN_CURSES=1 WANT_WIN_X11=1 or
    WANT_WIN_QT=1) as those aren't applicable to the Web Assembly
    or nethacklib builds. A "shim" pseudo-windowport is included
    from pull request 385.

    Result: As mentioned, the wasm cross-compile will end up in
            targets/wasm and the nethacklib.a will end up
            src.

    The cross-compiler hints additions are enclosed inside ifdef sections
    and shouldn't interfere with the non-cross-compile builds using
    hints/linux.2020 or hints/macOS.2020.
2020-10-06 11:00:33 -04:00
nhmall
945d10cfbc cross-compile update
Update the cross-compiling doc at the top.

Remove sys/msdos/Makefile1.cross, sys/msdos/Makefile2.cross, and
sys/msdos/msdos-cross-compile.sh as they are no longer required.

Remove occurrences of CROSSCOMPILE_HOST as the host-side of a
cross-compile can be determined from:
    defined(CROSSCOMPILE) && !defined(CROSSCOMPILE_TARGET)
without the additional macro.
2020-09-29 15:01:37 -04:00
nhmall
b967f73b96 build with the current Lua version 5.4.0 by default if not overridden 2020-07-07 17:36:23 -04:00
nhmall
157d54ca27 Cross-compiling doc update 2020-05-31 12:41:36 -04:00
nhmall
0fed5a06db Cross-compiling, msdos Makefile 2020-05-30 08:41:20 -04:00
nhmall
f1d7676bfb more CROSSCOMPILE fixes 2020-05-05 14:04:29 -04:00
nhmall
28ae203ad7 directory correction bit in Cross-compiling doc
panic.c is in util
2020-05-04 09:16:33 -04:00
nhmall
bfd180a5ac mention a pair of recent file additions in Cross-compiling
[skip travis]
2020-02-01 22:49:21 -05:00
nhmall
bc8c1f8f56 remove field-level savefile code 2019-12-08 07:27:01 -05:00
nhmall
d35db39777 update Cross-compiling 2019-12-04 21:17:44 -05:00
nhmall
3d484f4d4d cut-and-paste correction 2019-12-01 22:31:09 -05:00
nhmall
0db4ddcd5b update Cross-compiling text 2019-12-01 22:25:34 -05:00
nhmall
05fdccd8a6 add placeholder Cross-compiling file to Top 2019-11-25 11:16:58 -05:00