]> granicus.if.org Git - nethack/commitdiff
X11 install
authorcohrs <cohrs>
Tue, 26 Aug 2003 15:11:58 +0000 (15:11 +0000)
committercohrs <cohrs>
Tue, 26 Aug 2003 15:11:58 +0000 (15:11 +0000)
Build and install the NetHack.ad file, and change the nethack.sh to append
the HACKDIR to the XUSERFILESEARCHPATH.  This means users do not have to
do anything special to use the NetHack X11 resources, nor does it require
teaching nethack where the X11 app-defaults directory is.  The change also
updates the X11 and linux doc files in a corresponding way.

doc/fixes34.2
sys/unix/Makefile.dat
sys/unix/Makefile.top
sys/unix/README.linux
sys/unix/nethack.sh
win/X11/Install.X11

index 1af41fb61c7f92f2f7c0fa336d843b34ab60a549..1b9b3ecbbdb521be90107fb120200047128e572d 100644 (file)
@@ -176,4 +176,5 @@ win32tty: keystroke handlers can be dynamically loaded to assist in resolving
        internationalization issues
 win32tty: add Ray Chason's code for international keyboard handling
 Solaris (and other SystemV variants): TIMED_DELAY support
+X11: NetHack.ad is now installed and used w/o user intervention
 
index 9c79b320d21a03f17668966aca27841eb9b75569..75a5aa82dbfb633427913577d3ad5c747ca96d79 100644 (file)
@@ -41,6 +41,9 @@ nhtiles.bmp: ../util/tile2bmp ../win/share/monsters.txt ../win/share/objects.txt
                                ../win/share/other.txt
        ../util/tile2bmp $@
 
+NetHack.ad: ../win/X11/NetHack.ad
+       cp ../win/X11/NetHack.ad NetHack.ad
+
 pet_mark.xbm: ../win/X11/pet_mark.xbm
        cp ../win/X11/pet_mark.xbm pet_mark.xbm
 
@@ -138,4 +141,4 @@ dungeon: dungeon.def ../util/makedefs ../util/dgn_comp
 spotless:
        -rm -f spec_levs quest_levs *.lev $(VARDAT) dungeon dungeon.pdf
        -rm -f nhdat x11tiles beostiles pet_mark.xbm rip.xpm mapbg.xpm
-       -rm -f rip.img GEM_RSC.RSC title.img nh16.img
+       -rm -f rip.img GEM_RSC.RSC title.img nh16.img NetHack.ad
index a9889a8d12cf18e8af54a0e2374ce07b69674b20..2f11c35ea1caa9e76a0a627d676db8f05dd74310 100644 (file)
@@ -41,8 +41,8 @@ SHELLDIR = $(PREFIX)/games
 
 # per discussion in Install.X11 and Install.Qt
 VARDATND = 
-# VARDATND = x11tiles pet_mark.xbm
-# VARDATND = x11tiles pet_mark.xbm rip.xpm
+# VARDATND = x11tiles NetHack.ad pet_mark.xbm
+# VARDATND = x11tiles NetHack.ad pet_mark.xbm rip.xpm
 # for Atari/Gem
 # VARDATND = nh16.img title.img GEM_RSC.RSC rip.img
 # for BeOS
@@ -135,6 +135,9 @@ beostiles: $(GAME)
        ( cd util ; $(MAKE) tile2beos )
        ( cd dat ; $(MAKE) beostiles )
 
+NetHack.ad: $(GAME)
+       ( cd dat ; $(MAKE) NetHack.ad )
+
 pet_mark.xbm:
        ( cd dat ; $(MAKE) pet_mark.xbm )
 
index 935a5bbc0a3d21a70bcfb5257ac3ffa9d89e0724..ccdfaf07ddd13e1f93080e762dcf9550a4fb073a 100644 (file)
@@ -38,10 +38,11 @@ it to your home directory as .nethackrc and modifying it to your liking.
 If you are running X11 copy the nh10.pcf and ibm.pcf font files from
 /usr/games/lib/nethackdir to a X11 fonts directory (such as
 /usr/X11/lib/X11/fonts/misc) and run "mkfontdir", then restart X
-windows to load them.  Also consider copying NetHack.ad to
-/usr/X11/lib/X11/app-defaults/NetHack or adding its contents to your
-.Xdefaults or .Xresources.
-
+windows to load them.  If you prefer to use the graphical tiles,
+add the following to your .Xdefaults or .Xresources file:
+       NetHack.tile_file: x11tiles
+You may need to run "xrdb -merge $HOME/.Xdefaults" (or .Xresources) after
+doing this.
 
 The official Linux binary is set up to run setgid games, which allows
 multiple users on your system to play the game and prevents cheating by
index 3491e8d296c53ce50a3cb261fadec5ded2db1dc0..600e1dacdb0555d80125f2f9778aeabe0df79891 100644 (file)
@@ -6,6 +6,15 @@ export HACKDIR
 HACK=$HACKDIR/nethack
 MAXNROFPLAYERS=4
 
+# Since Nethack.ad is installed in HACKDIR, add it to XUSERFILESEARCHPATH
+case "x$XUSERFILESEARCHPATH" in
+x)     XUSERFILESEARCHPATH="$HACKDIR/%N.ad"
+       ;;
+*)     XUSERFILESEARCHPATH="$XUSERFILESEARCHPATH:$HACKDIR/%N.ad"
+       ;;
+esac
+export XUSERFILESEARCHPATH
+
 # see if we can find the full path name of PAGER, so help files work properly
 # assume that if someone sets up a special variable (HACKPAGER) for NetHack,
 # it will already be in a form acceptable to NetHack
index 243ee3a98182cae49570478505b464ae8a5a4384..b4b7a43b534f2046e87b92f4c46e274aaa8e60db 100644 (file)
@@ -109,14 +109,10 @@ prepend an appropriate -I<idirectory> parameter to CFLAGS and a
 find the include and library files for X11.
 
 
-Finally, you should also install the NetHack.ad file as NetHack in the
-normal X11 applications defaults directory.  Alternatively, each person may
-append the contents of this file to their .Xdefaults or .Xresources file,
-depending on how your system is configured and the version of X11 you are
-using.  A second alternative is copy NetHack.ad to NetHack in GAMEDIR
-(from the top Makefile) and add a line to nethack.sh specifying this
-additional applications defaults directory:
-       XAPPLRESDIR=$HACKDIR; export XAPPLRESDIR
+Finally, to ensure NetHack's windows look the way they were intended to
+look, make sure the top Makefile VARDATND also contains NetHack.ad.  If it
+does, running nethack will automatically take the appropriate steps to
+cause this file to be used to initialize NetHack's X11 resources.
 
 
 Three icon suggestions to the window manager are supported:  nh72, nh56,