Subject: Re: pecoff / peace
To: Richard Rauch <rkr@olib.org>
From: Patrick Welche <prlw1@newn.cam.ac.uk>
List: tech-pkg
Date: 05/27/2005 18:54:17
--SkvwRMAIpAhPCcCJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
[was on netbsd-users]
On Fri, May 20, 2005 at 09:00:32PM -0500, Richard Rauch wrote:
> I can't give you any help with PEACE/PECOFF, but I always thought
> that it sounded like the right way to do Monopolysoft emulation
> (WinE just seemed wrong, and never worked for me. (^&)
>
> I think that there's a package for it; have you tried that?
I have just set up a box with pkgsrc, and tried compiling from source.
After adding the attached patch to what comes out of the peace source
tarfile, (there are probably too many -I../common's as I only added one
to Makefile.inc later..) I get as far as
# compile ui.so/string.o
/usr/pkg/cross/bin/i386-netbsdpe-c++ -O2
+-I/usr/pkgsrc/emulators/peace/work.i386/cross/i386-netbsdpe/include
+-I/usr/X11R6/include -I/usr/X11R6/include/freetype2 -I/usr/pkg/include
+-I../common -Wall -c string.cc
string.cc: In function `CHAR* CharLowerA(CHAR*)':
string.cc:46: error: invalid types `const short int*[CHAR*]' for array
subscript
string.cc: In function `WCHAR* CharLowerW(WCHAR*)':
string.cc:63: error: invalid types `const short int*[WCHAR*]' for array
subscript
but now I can't find where WCHAR is defined (nor any trace of w32api.h,
windows.h, basetyps.h - yet according pkg_info:
w32api-2.5 Free headers and libraries for the Win32 API
is installed..)
Thoughts?
Cheers,
Patrick
--SkvwRMAIpAhPCcCJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=ppat
Index: dll/Makefile.inc
===================================================================
RCS file: /cvsroot/peace/peace/dll/Makefile.inc,v
retrieving revision 1.64
diff -u -r1.64 Makefile.inc
--- dll/Makefile.inc 9 Mar 2004 02:45:44 -0000 1.64
+++ dll/Makefile.inc 27 May 2005 17:33:07 -0000
@@ -23,6 +23,7 @@
ICUINC= -I${LOCALBASE}/include
X11INC= -I/usr/X11R6/include
FREETYPEINC= ${X11INC}/freetype2
+CPPFLAGS+= -I../common -Wall
CFLAGS+= -I../common -Wall
LDFLAGS+= -mdll -nostartfiles -Wl,--image-base,${IBASE}
#LDFLAGS+= -Wl,--verbose
Index: dll/advapi32/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/advapi32/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- dll/advapi32/Makefile 29 Nov 2003 10:32:12 -0000 1.16
+++ dll/advapi32/Makefile 27 May 2005 17:33:07 -0000
@@ -3,7 +3,7 @@
DLL= advapi32
SRCS= crt0.c winbase.c winsvc.c wincrypt.c ntsecapi.c \
reg.cc RegistryKey.cc combase.cc handle.c
-CFLAGS+= ${ICUINC}
+CPPFLAGS+= -I../common ${ICUINC}
CXXFLAGS+= -I../kernel32
IBASE= 0x89000000
DLLDEPS= kernel32
Index: dll/comctl32/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/comctl32/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- dll/comctl32/Makefile 29 Nov 2003 19:33:58 -0000 1.11
+++ dll/comctl32/Makefile 27 May 2005 17:33:07 -0000
@@ -4,5 +4,6 @@
SRCS= crt0.c commctrl.c prsht.c statusbar.c imagelist.cc
IBASE= 0x8b000000
DLLDEPS= user32 kernel32
+CPPFLAGS+= ../common
.include <bsd.prog.mk>
Index: dll/ddraw/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/ddraw/Makefile,v
retrieving revision 1.19
diff -u -r1.19 Makefile
--- dll/ddraw/Makefile 29 Nov 2003 19:51:02 -0000 1.19
+++ dll/ddraw/Makefile 27 May 2005 17:33:07 -0000
@@ -6,7 +6,7 @@
comutil.cc combase.cc
IBASE= 0x87000000
DLLDEPS= kernel32 ui.so advapi32 ole32
-CFLAGS+= -I../ui.so
+CPPFLAGS+= -I../common -I../ui.so
LDADD+= ${GUIDLDADD}
.PATH: ../common # for comutil.cc
Index: dll/kernel32/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/kernel32/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- dll/kernel32/Makefile 26 Apr 2004 14:27:40 -0000 1.40
+++ dll/kernel32/Makefile 27 May 2005 17:33:07 -0000
@@ -8,7 +8,7 @@
sync.cc env.c fmtmsg.c fileio.cc upath.cc process.cc dll.cc \
handle.c except.c sysinfo.c time.cc comm.cc debug.cc pipe.cc \
KernelObject.cc
-CFLAGS+= -DDLLMAIN ${RTLDINC} ${ICUINC}
+CPPFLAGS+= -I. -I../common ${RTLDINC} ${ICUINC}
IBASE= 0x81000000
LDFLAGS+= -nostdlib
LDADD+= ${ICULDADD} -lgcc -lpthread -lc
Index: dll/ui.so/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/ui.so/Makefile,v
retrieving revision 1.16
diff -u -r1.16 Makefile
--- dll/ui.so/Makefile 30 Nov 2003 16:11:05 -0000 1.16
+++ dll/ui.so/Makefile 27 May 2005 17:33:07 -0000
@@ -24,7 +24,7 @@
winbase.c window.cc wingdi.cc winuser.cc wndclass.cc \
xevt2msg.cc ximage.cc
-CFLAGS+=${X11INC} ${FREETYPEINC} ${ICUINC} -DDLLMAIN
+CPPFLAGS+=${X11INC} ${FREETYPEINC} ${ICUINC}
IBASE= 0x82200000
DLLDEPS=kernel32
LDADD+= -lXext -lX11 -lgcc ${ICULDADD} ${FREETYPELDADD} -lm
Index: dll/version/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/version/Makefile,v
retrieving revision 1.5
diff -u -r1.5 Makefile
--- dll/version/Makefile 30 Nov 2003 14:20:18 -0000 1.5
+++ dll/version/Makefile 27 May 2005 17:33:07 -0000
@@ -3,5 +3,6 @@
DLL= version
SRCS= crt0.c winver.c
IBASE= 0x8c000000
+CFLAGS+= -I../common
.include <bsd.prog.mk>
Index: dll/winmm/Makefile
===================================================================
RCS file: /cvsroot/peace/peace/dll/winmm/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- dll/winmm/Makefile 30 Nov 2003 14:38:06 -0000 1.14
+++ dll/winmm/Makefile 27 May 2005 17:33:07 -0000
@@ -3,6 +3,7 @@
DLL= winmm
SRCS= crt0.c mmsystem.cc cdinfo.c wave.cc WaveFile.cc midi.cc mixer.cc mmio.cc \
timer.c
+CPPFLAGS+= -I../common
IBASE= 0x86000000
DLLDEPS= user32 advapi32 kernel32
--SkvwRMAIpAhPCcCJ--