jbright@nucleus.UUCP (Jeff Bright) (10/11/89)
Has anybody been able to get Nethack 3.0 patch level 4 to compile under OS/2 ? If so, I would appreciate somebody posting a list of how they accomplished this miraculous feat. Jeff Bright jbright@Nucleus
thakulin@hila.hut.fi (Timo T Hakulinen) (10/12/89)
In article <5463@nucleus.UUCP> jbright@nucleus.UUCP (Jeff Bright) writes: >Has anybody been able to get Nethack 3.0 patch level 4 to compile under >OS/2 ? If so, I would appreciate somebody posting a list of how they >accomplished this miraculous feat. If you're not actually *dying* to play, I'd wait for the patchlevel 5, which I believe will be released in the near future. PL5 corrects some problems also for the OS/2 version. If you still want to go for PL4, the following checklist may be of some help. 1. The known onames.h / pm.h dilemma. To make makedefs.exe you need these two include files. However, it's makedefs that is supposed to create them. If you have existing versions from patchlevel 3 they can be used. If not, you can always snoop the code in makedefs.c to create them manually. 2. As I compiled PL4, I had some 500+ kB memory available. I don't believe quite that much is required. I've compiled PL3 both in true IBM DOS 3.30, and in IBM OS/2 1.1 EE DOS compatibility box. PL4 only in true DOS though. 3. Need some 3 MB free disk space. Objects take some 1.2 MB and the executable about 800 kB. Compiler needs some work space too. If CodeView options are used, the required disk space is almost doubled. I personally use huge ramdisk (8 MB+) for compilation. 4. I use NDMake 4.5. Some other make utility may also work but forget about Microsoft Make. 5. Compiler is MSC 5.1 with 8087 inline code libraries. Linkers and other development utilities except make are standard MSC 5.1 stuff. 6. To make the special levels compiler lev_comp.exe, you need LEX and YACC utilities. These are rather rare in MSDOS, so they can be used in, say, UN*X to produce updated versions of lev_lex.c, lev_comp.c and lev_comp.h. Snoop Makefile.src for UN*X for details. 7. Makefile.os2 works for me just as it is, since it was created to reflect my personal preferences and setup. You may want to edit it as far as compiler options, paths etc. are concerned. I'd say the wisest thing to do is to arrange the game directories exactly as suggested by the release notes. 8. NH was specified with following options: All nethack game options, NEWS, SCORE_ON_BOTL, OS2, RANDOM, SHELL, ZEROCOMP, ANSI_DEFAULT. Disabled are COMPRESS, HACKDIR, LOGFILE, TERMINFO and TERMLIB (and UNIX of course). Everything else unmodified. 9. Hardware is IBM PS/2 80 with 10 MB ram. 10. One special thing: MSC 5.1 generates incorrect code for the following macro (#defined in rm.h) whenever it's used: #define place_monster(m, x, y) level.monsters[m->mx=x][m->my=y] = m This causes the game to crash every time when level is changed with the pet, wand of create monster is zapped etc. Following correction clears the problem (concatenated to a single line of course): #define place_monster(m, x, y) m->mx=x,m->my=y,level.monsters[m->mx][m->my] = m This will be in PL5. That's it. If you still can't compile, check that your NH3 PL4 version isn't corrupted. As a last resort you can even try to apply all the patches again. (Only 68 shar files, piece of cake...) Timo