Files
nethack/sys/unix
PatR a1bb10e8f6 unix command line
I wanted to be able to specify -windowtype:foo on the command line so
that I didn't have to use "NETHACKOPTIONS='windowtype:foo' nethack"
and it turned out that such an option already exists, as "-wfoo".
I either never knew about that or had completely forgotten it.  Anyway,
this makes specifying windowtype be more versatile.

"-wX11" still works; now "-w X11", "-windowtype=X11", "-windowtype:X11"
work too, with "--" variations of the latter too also supported.  The
long name can be truncated to any leading substring of "windowtype",
although it has to be at least "wi" for "--"; "--w" is rejected.

Also, any errors reported while processing the command line are
treated like config file processing errors rather than just delivered
with raw_printf().  On tty at least, they used to vanish when the
screen cleared to start the game, with no chance to read them.  Here's
an example from after this change.  It sets windowtype to tty and then
overrides that with X11.

|% ./nethack --w:Qt --win tty -wX11 -windowtype
|
|
| * Unknown option: --w:Qt.
| * Window type [nothing] not recognized.  Choices are:  tty, curses, X11, Qt.
|
|2 errors on command line.
|
|
|Hit return to continue:

This should probably be better integrated with argcheck() or vice
versa but the only change to that was a couple of formatting bits.

Anything that already worked should continue to work just the same,
aside from the improvement to the error feedback.
2022-02-12 11:42:17 -08:00
..
2020-08-03 13:36:40 -07:00
2021-09-27 01:30:53 -07:00
2020-09-28 16:25:31 -04:00
2020-09-05 13:28:46 -07:00
2022-02-09 22:49:25 +02:00
2022-02-12 11:42:17 -08:00
2021-01-26 21:06:16 -05:00
2021-01-26 21:06:16 -05:00

This README provides the instructions for building the unofficial Mac
binaries using the Apple provided developer IDE named XCode.

Establish a developer team in XCode
===================================

Your first step should be to establish a developer team within XCode.
Launch XCode and open the preferences dialog (XCode Menu->Preferences).
Select the "Accounts" tab.  Add an account (usually this should just be
your apple ID account you used to setup the Mac).  After adding the account,
select the account and then add a team (usually this will be just a
personal team for Mac Development).

Obtain your developer team identifier
=====================================

Your DEVELOPMENT_TEAM can be found by opening Keychain Access
(found by Finder->Applications->Utilities).  Click on "My Certificates".
Look for your "Mac Developer" certificate.  Right click on
the certificate to open a dialog that shows certificate details.
Look for "Organizational Unit" among the details.  This ten digit value
is your development team identifier.

Create XCodeLocal.xcconfig file
===============================

Now you need to create the XCodeLocal.xcconfig file that will be used by
XCode to get your development team identifier.  Create the file in
sys/unix and add a single line such as:
DEVELOPMENT_TEAM = XXXXXXXXXX

Where XXXXXXXXXX is replaced with your development team identifier.

Open the project and build
==========================

In XCode open the project file sys/unix/NetHack.xcodeproj, select
the product NetHack and build.  The build results are placed in
~/nethackdir.