Files
nethack/sys/be
nethack.rankin 2c0a072ef1 main() reorganization (trunk only)
Move some internals-related code out of port-specific main so that
it isn't duplicated a bunch of times.  One minor side-effect of this
change is that if you auto-pickup something at the very start of a game,
it will happen after any full moon/new moon/Friday 13th message rather
than before.  There's a second change for some:  the shared main() used
by several of the micro ports had a small difference in game play--if you
saved a game while on an engraving, it would automatically be read when
you resume--that will now occur for everybody [Elbereth weenies rejoice!].
pcmain() was also calling update_inventory() at start of play.  That's
unnecessary for new games, where inventory initialization triggers a call
to it for each item added to your pack; but I wasn't sure about restored
games, so everybody gets it there now.

     The Mac and BeOS ports evidently haven't been touched it some time;
they still referenced flags.move which got replaced by context.move quite
a while back.  The Windows GUI code has a declaration for mswin_moveloop()
which appears to be non-existant, but I left it alone.  I assume that the
Qt interface uses the existing main() routines; at least I couldn't find
any start of game code specific to it.  vmsmain's revised main() is the
only one which has been tested.
2006-04-02 07:35:30 +00:00
..
2006-04-02 07:35:30 +00:00
2005-01-02 20:55:41 +00:00

This file is sys/be/README.  It is for those intending to compile
NetHack 3.5 on a BeOS 4.5 system.

BeOS NetHack currently only supports the TTY windowing system.  In
order to compile it, it would benefit you greatly to think of your Be
system as a UNIX variant.  It is possible to compile using BeIDE.
However, there are four executables and several steps involved in making
NetHack.  Unless you are extremely familiar with the build sequence and
are willing to modify the code somewhat, I suggest you avoid it for now.
Let the UNIX Makefiles take care of all that for you.


Known problems:
+ No special characters for walls.  None of the fonts available for use
  in a tty window has the graphics characters needed to improve the look.
  If such a font existed, then all you need to do is set the dungeon,
  object, and/or monter mappings in your defaults file.
+ The arrow keys don't work.



Build instructions.  From a freshly unpacked source tree:

1. Copy the Makfiles in sys/unix to their proper spots.  You may
   use setup.sh or copy them by hand.  Using setup.sh to create
   links instead of copying the Makefiles will work, but BeOS will
   not let you edit a link.   It may be helpful to read
   sys/unix/Install.unx.

2. Edit src/Makefile:
	o Change System to SysBe.
	o Comment out the UNIX versions of SYSSRC and SYSOBJ variables.
	o Uncomment the BeOS versions of SYSRC and SYSOBJ.
	o Uncomment the BeOS versions of CC, CFLAGS, LD, and LFLAGS.  The
	  flags are different for Intel vs BeBox/Mac.
	o Uncomment one of the Intel or BeBox/Mac BeOS versions of CC, CFLAGS,
	  LD, and LFLAGS.
	o Comment out the default CFLAGS and LFLAGS.
	o Change WINTTYLIB to be -ltermcap.

3. Edit util/Makefile:
	o If on a BeBox/Mac:
	  - Uncomment the BeOS versions of CC and CFLAGS
	  - Comment out the default CFLAGS and LFLAGS.
	o If on Intel:
	  - the default values of CFLAGS and LFLAGS work fine
	o Change YACC and LEX to be bison -y and flex respectively.

4. Edit include/config.h to change HACKDIR to be the location of your
   install directory.

5. Edit top level Makefile and change GAMEDIR to match HACKDIR in
   include/config.h.  Make sure the path to GAMEDIR exists.  Change
   SHELLDIR to a "throw away" directory, like /tmp.  We don't use the
   shell.  Change CHOWN and CHGRP commands to "true", there really
   aren't groups on the BeOS.

6. Type "make install" at the top level.



It is possible that some necessary steps needed to make the game have been
omitted.  Feel free to ad-lib as necessary.