win32 updates (from <Someone>)

- restructured Install.nt quite a bit. It now contains instructions
to build a graphical nethack using NMAKE, too. I merged
the instructions for command line builds, and separated the IDE
build; that made more sense to me. It is shorter, too.
- added some lines to all Makefiles so they now build
NetHackW.exe when GRAPHICAL is "Y", and NetHack.exe
otherwise. I espacially did not test this on Borland.
Previously, the makefiles would always build NetHack.exe.
- changed the IDE files to build NetHackW.exe instead of
nethackw.exe. This is only cosmetic, but consistent with the
other executable.
- made a small change to pcmain.c, as the MinGW linker
cannot decide between main() and WinMain() when both are
present, as explained in <Someone>'s original
message. (I used a #ifndef instead of comments ;-)
The MinGW graphical build indeed seems to work.
This commit is contained in:
nethack.allison
2002-12-09 03:12:47 +00:00
parent 7f50893e13
commit bea789ea2d
7 changed files with 241 additions and 255 deletions
+13 -6
View File
@@ -58,8 +58,13 @@ endif
# Set the gamedir according to your preference.
# If not present prior to compilation it gets created.
ifeq "$(GRAPHICAL)" "Y"
# Game Name
GAME = NetHackW
else
# Game Name
GAME = NetHack
endif
# Game directory
GAMEDIR = ../binary
@@ -156,19 +161,21 @@ WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.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)winhack.o
NHRES = $(O)winres.o
WINPINC = -I$(WIN32)
WINPHDR = $(WIN32)/mhaskyn.h $(WIN32)/mhdlg.h $(WIN32)/mhfont.h \
$(WIN32)/mhinput.h $(WIN32)/mhmain.h $(WIN32)/mhmap.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
else
WINPORT = $(O)nttty.o
WINPFLAG= -DWIN32CON
WINPHDR =
NHRES = $(O)console.o
WINPINC =
WINPLIBS =
endif
TILEUTIL16 = $(UTIL)/tile2bmp.exe
@@ -555,10 +562,10 @@ tileutil: $(U)gif2txt.exe $(U)gif2tx32.exe $(U)txt2ppm.exe
@echo Optional tile development utilities are up to date.
ifeq "$(GRAPHICAL)" "Y"
$(NHRES): $(TILEBMP16) $(WIN32)\winhack.rc $(WIN32)\mnsel.bmp \
$(WIN32)\mnselcnt.bmp $(WIN32)\mnunsel.bmp \
$(WIN32)\petmark.bmp $(WIN32)\NetHack.ico $(WIN32)\rip.bmp \
$(WIN32)\splash.bmp
$(NHRES): $(TILEBMP16) $(WIN32)/winhack.rc $(WIN32)/mnsel.bmp \
$(WIN32)/mnselcnt.bmp $(WIN32)/mnunsel.bmp \
$(WIN32)/petmark.bmp $(WIN32)/NetHack.ico $(WIN32)/rip.bmp \
$(WIN32)/splash.bmp
@$(rc) -o$@ --include-dir $(WIN32) -i $(WIN32)/winhack.rc
else
$(NHRES): $(NTSYS)/console.rc $(NTSYS)/NetHack.ico
@@ -571,7 +578,7 @@ endif
$(GAMEFILE) : $(ALLOBJ) $(NHRES)
@echo Linking....
@$(link) $(lflags) -o$@ $(ALLOBJ) $(NHRES)
@$(link) $(lflags) -o$@ $(ALLOBJ) $(NHRES) $(WINPLIBS)
$(subst /,\,@if exist $(O)install.tag del $(O)install.tag)
$(GAME)_.ico : $(NTSYS)/$(GAME).ico