win32 (from Yitzhak)
>The attached is a patch for the makefiles and .rc that makes >Borland compile. Files modified: sys/winnt/Makefile.bcc - changes >Makefile so dependencies on dlls are removed for console, adds >gamedir.tag sys/winnt/Makefile.msc - changes the Makefile a bit to >make it dependent on gamedir.tag in both gui and console, and make >the dlls a dependency only in console but without the !IF for >$(GAMEFILE). The .rc format is made workable for both Borland and >MSC. win/win32/winhack.rc - makes FONT format Borland compatible
This commit is contained in:
@@ -207,23 +207,25 @@ PRECOMPHEAD = N # set to Y if you want to use precomp. headers
|
||||
################################################
|
||||
|
||||
!IF "$(GRAPHICAL)" == "Y"
|
||||
WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \
|
||||
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
|
||||
WINPFLAG = -DTILES -DMSWIN_GRAPHICS
|
||||
NHRES = $(O)winhack.res
|
||||
WINPINC = -I$(WIN32)
|
||||
WINPHDR = $(WIN32)\mhaskyn.h $(WIN32)\mhdlg.h $(WIN32)\mhfont.h \
|
||||
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
|
||||
WINDLLS =
|
||||
WINPFLAG= -DTILES -DMSWIN_GRAPHICS
|
||||
NHRES = $(O)winhack.res
|
||||
WINPINC = -I$(WIN32)
|
||||
!ELSE
|
||||
WINPORT = $(O)nttty.o
|
||||
WINPFLAG = -DWIN32CON
|
||||
WINPHDR =
|
||||
NHRES = $(O)console.res
|
||||
WINPINC =
|
||||
WINPORT = $(O)nttty.o
|
||||
WINPHDR =
|
||||
WINDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||
WINPFLAG= -DWIN32CON
|
||||
NHRES = $(O)console.res
|
||||
WINPINC =
|
||||
!ENDIF
|
||||
|
||||
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
||||
@@ -611,13 +613,17 @@ $(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
||||
$(SRC)\uuid.lib: $(bcclib)\uuid.lib
|
||||
@copy $(bcclib)\uuid.lib $@
|
||||
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(SRC)\uuid.lib \
|
||||
$(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(SRC)\uuid.lib $(O)gamedir.tag $(WINDLLS)
|
||||
@echo Linking....
|
||||
@$(link) $(lflags) $(startobjg) $(ALLOBJ), $@, $(GAME).map,$(libsmt),,$(NHRES)
|
||||
@if exist $(O)install.tag del $(O)install.tag
|
||||
@if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak
|
||||
|
||||
$(O)gamedir.tag:
|
||||
@if not exist $(GAMEDIR)\*.* echo creating directory $(GAMEDIR)
|
||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||
@echo directory created > $@
|
||||
|
||||
$(GAME)_.ico : $(NTSYS)\$(GAME).ico
|
||||
@copy $(NTSYS)\$(GAME).ico $@
|
||||
|
||||
|
||||
@@ -137,23 +137,25 @@ PRECOMPHEAD = N # set to Y if you want to use precomp. headers
|
||||
################################################
|
||||
|
||||
!IF "$(GRAPHICAL)" == "Y"
|
||||
WINPORT = $(O)tile.o $(O)mhaskyn.o $(O)mhdlg.o \
|
||||
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
|
||||
WINPFLAG = -DTILES -DMSWIN_GRAPHICS
|
||||
NHRES = $(O)winhack.res
|
||||
WINPINC = -I$(WIN32)
|
||||
WINPHDR = $(WIN32)\mhaskyn.h $(WIN32)\mhdlg.h $(WIN32)\mhfont.h \
|
||||
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
|
||||
WINDLLS =
|
||||
WINPFLAG= -DTILES -DMSWIN_GRAPHICS
|
||||
NHRES = $(O)winhack.res
|
||||
WINPINC = -I$(WIN32)
|
||||
!ELSE
|
||||
WINPORT = $(O)nttty.o
|
||||
WINPFLAG = -DWIN32CON
|
||||
WINPHDR =
|
||||
NHRES = $(O)console.res
|
||||
WINPINC =
|
||||
WINPORT = $(O)nttty.o
|
||||
WINPHDR =
|
||||
WINDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||
WINPFLAG= -DWIN32CON
|
||||
NHRES = $(O)console.res
|
||||
WINPINC =
|
||||
!ENDIF
|
||||
|
||||
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
||||
@@ -572,12 +574,7 @@ $(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
||||
# DO NOT INDENT THE << below!
|
||||
#
|
||||
|
||||
!IF "$(GRAPHICAL)"=="Y"
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES)
|
||||
!ELSE
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag \
|
||||
$(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||
!ENDIF
|
||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag $(WINDLLS)
|
||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||
@echo Linking....
|
||||
$(link) $(LFLAGS) user32.lib winmm.lib -out:$@ @<<$(GAME).lnk
|
||||
|
||||
@@ -120,7 +120,7 @@ END
|
||||
IDD_NHTEXT DIALOGEX 0, 0, 172, 178
|
||||
STYLE DS_SETFOREGROUND | WS_CHILD | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_CLIENTEDGE
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
FONT 8, "MS Sans Serif", 0, 0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,54,163,50,14
|
||||
EDITTEXT IDC_TEXT_CONTROL,0,0,172,160,ES_MULTILINE |
|
||||
@@ -130,7 +130,7 @@ END
|
||||
IDD_MENU DIALOGEX 0, 0, 187, 153
|
||||
STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME
|
||||
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
FONT 8, "MS Sans Serif", 0, 0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT | NOT WS_TABSTOP
|
||||
PUSHBUTTON "Cancel",IDCANCEL,130,132,50,14,BS_FLAT | NOT WS_TABSTOP
|
||||
@@ -195,7 +195,7 @@ END
|
||||
IDD_NHRIP DIALOGEX 0, 0, 281, 209
|
||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "Here lies..."
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
||||
FONT 8, "MS Sans Serif", 0, 0
|
||||
BEGIN
|
||||
DEFPUSHBUTTON "OK",IDOK,82,188,50,14
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user