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"
|
!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)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
|
||||||
$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.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
|
$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
|
||||||
WINPFLAG = -DTILES -DMSWIN_GRAPHICS
|
WINPHDR = $(WIN32)\mhaskyn.h $(WIN32)\mhdlg.h $(WIN32)\mhfont.h \
|
||||||
NHRES = $(O)winhack.res
|
|
||||||
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)\mhinput.h $(WIN32)\mhmain.h $(WIN32)\mhmap.h $(WIN32)\mhmenu.h \
|
||||||
$(WIN32)\mhmsg.h $(WIN32)\mhmsgwnd.h $(WIN32)\mhrip.h $(WIN32)\mhstatus.h \
|
$(WIN32)\mhmsg.h $(WIN32)\mhmsgwnd.h $(WIN32)\mhrip.h $(WIN32)\mhstatus.h \
|
||||||
$(WIN32)\mhtext.h $(WIN32)\resource.h $(WIN32)\winMS.h
|
$(WIN32)\mhtext.h $(WIN32)\resource.h $(WIN32)\winMS.h
|
||||||
|
WINDLLS =
|
||||||
|
WINPFLAG= -DTILES -DMSWIN_GRAPHICS
|
||||||
|
NHRES = $(O)winhack.res
|
||||||
|
WINPINC = -I$(WIN32)
|
||||||
!ELSE
|
!ELSE
|
||||||
WINPORT = $(O)nttty.o
|
WINPORT = $(O)nttty.o
|
||||||
WINPFLAG = -DWIN32CON
|
WINPHDR =
|
||||||
WINPHDR =
|
WINDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||||
NHRES = $(O)console.res
|
WINPFLAG= -DWIN32CON
|
||||||
WINPINC =
|
NHRES = $(O)console.res
|
||||||
|
WINPINC =
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
||||||
@@ -611,13 +613,17 @@ $(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
|||||||
$(SRC)\uuid.lib: $(bcclib)\uuid.lib
|
$(SRC)\uuid.lib: $(bcclib)\uuid.lib
|
||||||
@copy $(bcclib)\uuid.lib $@
|
@copy $(bcclib)\uuid.lib $@
|
||||||
|
|
||||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(SRC)\uuid.lib \
|
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(SRC)\uuid.lib $(O)gamedir.tag $(WINDLLS)
|
||||||
$(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
|
||||||
@echo Linking....
|
@echo Linking....
|
||||||
@$(link) $(lflags) $(startobjg) $(ALLOBJ), $@, $(GAME).map,$(libsmt),,$(NHRES)
|
@$(link) $(lflags) $(startobjg) $(ALLOBJ), $@, $(GAME).map,$(libsmt),,$(NHRES)
|
||||||
@if exist $(O)install.tag del $(O)install.tag
|
@if exist $(O)install.tag del $(O)install.tag
|
||||||
@if exist $(GAMEDIR)\$(GAME).bak del $(GAMEDIR)\$(GAME).bak
|
@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
|
$(GAME)_.ico : $(NTSYS)\$(GAME).ico
|
||||||
@copy $(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"
|
!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)mhfont.o $(O)mhinput.o $(O)mhmain.o $(O)mhmap.o \
|
||||||
$(O)mhmenu.o $(O)mhmsgwnd.o $(O)mhrip.o $(O)mhsplash.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
|
$(O)mhstatus.o $(O)mhtext.o $(O)mswproc.o $(O)winhack.o
|
||||||
WINPFLAG = -DTILES -DMSWIN_GRAPHICS
|
WINPHDR = $(WIN32)\mhaskyn.h $(WIN32)\mhdlg.h $(WIN32)\mhfont.h \
|
||||||
NHRES = $(O)winhack.res
|
|
||||||
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)\mhinput.h $(WIN32)\mhmain.h $(WIN32)\mhmap.h $(WIN32)\mhmenu.h \
|
||||||
$(WIN32)\mhmsg.h $(WIN32)\mhmsgwnd.h $(WIN32)\mhrip.h $(WIN32)\mhstatus.h \
|
$(WIN32)\mhmsg.h $(WIN32)\mhmsgwnd.h $(WIN32)\mhrip.h $(WIN32)\mhstatus.h \
|
||||||
$(WIN32)\mhtext.h $(WIN32)\resource.h $(WIN32)\winMS.h
|
$(WIN32)\mhtext.h $(WIN32)\resource.h $(WIN32)\winMS.h
|
||||||
|
WINDLLS =
|
||||||
|
WINPFLAG= -DTILES -DMSWIN_GRAPHICS
|
||||||
|
NHRES = $(O)winhack.res
|
||||||
|
WINPINC = -I$(WIN32)
|
||||||
!ELSE
|
!ELSE
|
||||||
WINPORT = $(O)nttty.o
|
WINPORT = $(O)nttty.o
|
||||||
WINPFLAG = -DWIN32CON
|
WINPHDR =
|
||||||
WINPHDR =
|
WINDLLS = $(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
||||||
NHRES = $(O)console.res
|
WINPFLAG= -DWIN32CON
|
||||||
WINPINC =
|
NHRES = $(O)console.res
|
||||||
|
WINPINC =
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
TILEUTIL16 = $(UTIL)\tile2bmp.exe
|
||||||
@@ -572,12 +574,7 @@ $(NHRES): $(NTSYS)\console.rc $(NTSYS)\NetHack.ico
|
|||||||
# DO NOT INDENT THE << below!
|
# DO NOT INDENT THE << below!
|
||||||
#
|
#
|
||||||
|
|
||||||
!IF "$(GRAPHICAL)"=="Y"
|
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag $(WINDLLS)
|
||||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES)
|
|
||||||
!ELSE
|
|
||||||
$(GAMEFILE) : $(ALLOBJ) $(NHRES) $(O)gamedir.tag \
|
|
||||||
$(GAMEDIR)\nhdefkey.dll $(GAMEDIR)\nh340key.dll $(GAMEDIR)\nhraykey.dll
|
|
||||||
!ENDIF
|
|
||||||
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
@if not exist $(GAMEDIR)\*.* mkdir $(GAMEDIR)
|
||||||
@echo Linking....
|
@echo Linking....
|
||||||
$(link) $(LFLAGS) user32.lib winmm.lib -out:$@ @<<$(GAME).lnk
|
$(link) $(LFLAGS) user32.lib winmm.lib -out:$@ @<<$(GAME).lnk
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ END
|
|||||||
IDD_NHTEXT DIALOGEX 0, 0, 172, 178
|
IDD_NHTEXT DIALOGEX 0, 0, 172, 178
|
||||||
STYLE DS_SETFOREGROUND | WS_CHILD | WS_THICKFRAME
|
STYLE DS_SETFOREGROUND | WS_CHILD | WS_THICKFRAME
|
||||||
EXSTYLE WS_EX_CLIENTEDGE
|
EXSTYLE WS_EX_CLIENTEDGE
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,54,163,50,14
|
DEFPUSHBUTTON "OK",IDOK,54,163,50,14
|
||||||
EDITTEXT IDC_TEXT_CONTROL,0,0,172,160,ES_MULTILINE |
|
EDITTEXT IDC_TEXT_CONTROL,0,0,172,160,ES_MULTILINE |
|
||||||
@@ -130,7 +130,7 @@ END
|
|||||||
IDD_MENU DIALOGEX 0, 0, 187, 153
|
IDD_MENU DIALOGEX 0, 0, 187, 153
|
||||||
STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME
|
STYLE WS_CHILD | WS_CLIPSIBLINGS | WS_THICKFRAME
|
||||||
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT
|
EXSTYLE WS_EX_CLIENTEDGE | WS_EX_CONTROLPARENT
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT | NOT WS_TABSTOP
|
DEFPUSHBUTTON "OK",IDOK,7,132,50,14,BS_FLAT | NOT WS_TABSTOP
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,130,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
|
IDD_NHRIP DIALOGEX 0, 0, 281, 209
|
||||||
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Here lies..."
|
CAPTION "Here lies..."
|
||||||
FONT 8, "MS Sans Serif", 0, 0, 0x1
|
FONT 8, "MS Sans Serif", 0, 0
|
||||||
BEGIN
|
BEGIN
|
||||||
DEFPUSHBUTTON "OK",IDOK,82,188,50,14
|
DEFPUSHBUTTON "OK",IDOK,82,188,50,14
|
||||||
END
|
END
|
||||||
|
|||||||
Reference in New Issue
Block a user