From: nethack.allison Date: Wed, 11 Dec 2002 03:12:44 +0000 (+0000) Subject: more win32 build updates (from ) X-Git-Tag: MOVE2GIT~2309 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92206d8f8be408af3a653a7facee88ebca899334;p=nethack more win32 build updates (from ) --- diff --git a/sys/winnt/Install.nt b/sys/winnt/Install.nt index 891120262..42cb52555 100644 --- a/sys/winnt/Install.nt +++ b/sys/winnt/Install.nt @@ -30,15 +30,15 @@ environments: o A copy of Borland C 5.5.1 command line tools. Borland has made a version of its command line tools available for download after registration at: - http://www.borland.com/bcppbuilder/freecompiler/. + http://www.borland.com/bcppbuilder/freecompiler/ - OR + OR o A copy of MinGW 2.0. MinGW is a collection of header files and import libraries with which native Windows32 programs can be made; the MinGW 2.0 distribution contains the GNU Compiler Collection. You can download MinGW at - http://www.mingw.org/ + http://www.mingw.org/ Earlier versions of MinGW will not allow you to build the Windows Graphical version. @@ -51,7 +51,7 @@ Visual C's IDE (Integrated Development Environment.) FIRST STEP The first step in building either version of NetHack is to execute -sys/winnt/nhsetup.bat. +sys\winnt\nhsetup.bat. From the command prompt: cd sys\winnt @@ -87,7 +87,7 @@ executable for Graphical NetHack will be named NetHackW.exe. You can opt to build both; they will be able to use the same datafiles, save files and bones files. -I. Dispelling the Myths: +I. Dispelling the Myths: Compiling NetHack for Win32 is not as easy as it sounds, nor as hard as it looks, however it will behoove you to read this entire section @@ -220,7 +220,7 @@ Compiling make /f Makefile.bcc install For GCC: - make -f Makefile.gcc install + mingw32-make -f Makefile.gcc install If you get any errors along the way then something has not been set up correctly. The time it takes to compile depends on your @@ -245,7 +245,7 @@ Notes: make /f Makefile.bcc For GCC: - make -f Makefile.gcc + mingw32-make -f Makefile.gcc If you add, delete, or reorder monsters or objects, or you change the format of saved level files, delete any save and bones files. @@ -272,7 +272,7 @@ BUILDING USING VISUAL C'S IDE Only the Win32 native port built on the Windows API, or Graphical NetHack, can be built using the Visual C IDE. -I. Dispelling the Myths: +I. Dispelling the Myths: Compiling NetHack using the Visual C IDE is straightforward, as long as you have your compiler and tools correctly installed. @@ -343,34 +343,34 @@ Setting Up functionality and is the officially released build. Start the Visual C IDE. In the Visual C IDE menus, choose: - File | Open Workspace + File | Open Workspace 4. Set up for the build. In the Visual C "Open Workspace" dialog box, navigate to the top of your NetHack source directory. - - In there, highlight "nethack.dsw" and click on Open. - Once the workspace has been opened, you should see the following - list in the Visual C selection window: - + dgncomp files - + dgnstuff files - + dlb_main files - + levcomp files - + levstuff files - + makedefs files - + nethackw files - + recover files - + tile2bmp files - + tilemap files - + uudecode files + + In there, highlight "nethack.dsw" and click on Open. + Once the workspace has been opened, you should see the following + list in the Visual C selection window: + + dgncomp files + + dgnstuff files + + dlb_main files + + levcomp files + + levstuff files + + makedefs files + + nethackw files + + recover files + + tile2bmp files + + tilemap files + + uudecode files On the Visual C menus, choose: Project | Set Active Project | NetHackW On the Visual C menus again, choose either: Build | Set Active Configuration | NetHackW - Win32 Release - or + or Build | Set Active Configuration | NetHackW - Win32 Debug The first will create the Release build of NetHackW which does not @@ -378,7 +378,7 @@ Setting Up quicker. The second will create the Debug build of NetHackW and will spend a lot of time writing debug information to the disk as the game is played. Unless you are debugging or enhancing NetHack - for Windows, choose the Release build. + for Windows, choose the Release build. Building @@ -386,8 +386,8 @@ Building On the Visual C menus once again, choose: Build | Build NetHackW.exe - This starts the build. It is likely that the IDE message window - where you are doing the compiling will be occupied for a while. + This starts the build. It is likely that the IDE message window + where you are doing the compiling will be occupied for a while. 6. If all has gone well to this point, you should now have a NetHack executable called NetHackW.exe in the "binary" directory, along with diff --git a/sys/winnt/Makefile.bcc b/sys/winnt/Makefile.bcc index 67dcc22ec..593296128 100644 --- a/sys/winnt/Makefile.bcc +++ b/sys/winnt/Makefile.bcc @@ -13,22 +13,25 @@ # root, but this can be changed by modifying the bccroot and related # variables. # -# This is used for building a TTY or graphical version of NetHack using -# WIN32 Console I/O and API routines only. +# This is used for building two versions of NetHack: +# A tty port utilizing the Win32 Console I/O subsystem, Console +# NetHack; +# A Win32 native port built on the Windows API, Graphical NetHack or +# NetHackW. # # In addition to your C compiler, # # if you want to change you will need a -# files with suffix workalike for -# .y yacc (such as bison) -# .l lex (such as flex) +# files with suffix workalike for +# .y yacc (such as bison) +# .l lex (such as flex) # # # If you have any questions read the sys/winnt/Install.nt file included # with the distribution. # # -- -# Yitzhak Sapir +# Yitzhak Sapir #============================================================================== # Do not delete the following 3 lines. # @@ -166,19 +169,6 @@ LEXYYC = lex.yy.c RANDOM = $(OBJ)\random.o #RANDOM = -# -# - For debugging ability, comment out the upper two -# macros and uncomment the lower two. -# - -# -# Leave the next two lines uncommented _ONLY_ if you do NOT want any -# debug capability in the object files, or in the NetHack executable. -# Comment them if you want debug capability. - -#cdebug = -#linkdebug = - # # Compiler and Linker flags # @@ -220,10 +210,7 @@ TILEBMP16 = $(SRC)\tiles.bmp TILEUTIL32 = $(UTIL)\til2bm32.exe TILEBMP32 = $(SRC)\tiles32.bmp -# These should be left commented in 3.4.x -# - -#SOUND = $(OBJ)\ntsound.o +SOUND = $(OBJ)\ntsound.o #SOUND = # To store all the level files, @@ -238,10 +225,6 @@ DLBFLG = -DDLB DLBFLG = ! ENDIF -# You can actually build a set of tiles -# with this makefile even though they -# are not used. Use 'nmake o\nhtiles.bmp' -# #========================================== # Setting up the compiler and linker diff --git a/sys/winnt/Makefile.gcc b/sys/winnt/Makefile.gcc index 9e096b89a..a05dd3784 100644 --- a/sys/winnt/Makefile.gcc +++ b/sys/winnt/Makefile.gcc @@ -4,20 +4,24 @@ # NetHack 3.4.x Makefile for MinGW # # Win32 Compilers Tested: -# - gcc version 2.95.3-6 +# - MinGW 1.0 (gcc version 2.95.3-6) (Console NetHack only) +# - MinGW 2.0 (gcc version 3.2) # # If you don't have this compiler, you can get it at: # http://www.mingw.org/ # -# This is used for building a TTY version of NetHack using -# WIN32 Console I/O only. +# This is used for building two versions of NetHack: +# A tty port utilizing the Win32 Console I/O subsystem, Console +# NetHack; +# A Win32 native port built on the Windows API, Graphical NetHack or +# NetHackW. # # In addition to your C compiler, # # if you want to change you will need a -# files with suffix workalike for -# .y yacc (such as bison) -# .l lex (such as flex) +# files with suffix workalike for +# .y yacc (such as bison) +# .l lex (such as flex) # # # If you have any questions read the sys/winnt/Install.nt file included @@ -27,11 +31,10 @@ # Dion Nicolaas #============================================================================== # Graphical interface -# Don't uncomment this line for 3.4.1 # Set to Y for a graphical version # Set to anything else (or undefine) for a tty version -GRAPHICAL = N +#GRAPHICAL = Y # Debug # Set to Y for Debug support (to produce debug information) @@ -159,7 +162,6 @@ WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \ $(O)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \ $(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.o \ $(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o -# WIN32_IE=0x400 is currently unsupported by MinGW WINPFLAG = -DTILES -DMSWIN_GRAPHICS -D_WIN32_IE=0x0400 NHRES = $(O)winres.o WINPINC = -I$(WIN32) @@ -168,14 +170,14 @@ WINPHDR = $(WIN32)/mhaskyn.h $(WIN32)/mhdlg.h $(WIN32)/mhfont.h \ $(WIN32)/mhmenu.h $(WIN32)/mhmsg.h $(WIN32)/mhmsgwnd.h \ $(WIN32)/mhrip.h $(WIN32)/mhstatus.h \ $(WIN32)/mhtext.h $(WIN32)/resource.h $(WIN32)/winMS.h -WINPLIBS = -lcomctl32 +WINPLIBS = -lcomctl32 -lwinmm else WINPORT = $(O)nttty.o WINPFLAG= -DWIN32CON WINPHDR = NHRES = $(O)console.o WINPINC = -WINPLIBS = +WINPLIBS = -lwinmm endif TILEUTIL16 = $(UTIL)/tile2bmp.exe @@ -184,10 +186,8 @@ TILEBMP16 = $(SRC)/tiles.bmp TILEUTIL32 = $(UTIL)/til2bm32.exe TILEBMP32 = $(SRC)/tiles32.bmp -# These should be left commented in 3.4.x -# +SOUND = $(OBJ)/ntsound.o -#SOUND = $(OBJ)/ntsound.o #SOUND = # To store all the level files, diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index a6d9f04f5..7e2c1e61a 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -7,8 +7,11 @@ # - Microsoft 32 bit Visual C++ V4.x # - Microsoft 32 bit Visual C++ V6.0 SP3, SP4 # -# This is used for building a TTY version of NetHack using WIN32 Console -# I/O routines only. +# This is used for building two versions of NetHack: +# A tty port utilizing the Win32 Console I/O subsystem, Console +# NetHack; +# A Win32 native port built on the Windows API, Graphical NetHack or +# NetHackW. # # In addition to your C compiler, # @@ -34,14 +37,13 @@ APPVER=4.0 #GRAPHICAL = Y -# # Set the gamedir according to your preference. # If not present prior to compilation it gets created. !IF "$(GRAPHICAL)" == "Y" -GAME = NetHack # Game Name -!ELSE GAME = NetHackW # Game Name +!ELSE +GAME = NetHack # Game Name !ENDIF GAMEDIR = ..\binary # Game directory @@ -113,11 +115,6 @@ LEXYYC = lexyy.c RANDOM = $(OBJ)\random.o #RANDOM = -# -# - For debugging ability, comment out the upper two -# macros and uncomment the lower two. -# - # # Leave the next two lines uncommented _ONLY_ if you do NOT want any # debug capability in the object files, or in the NetHack executable.