[JOY] wxWindows
Dimitrie O. Paun
dpaun at rogers.com
Tue Dec 24 15:25:51 CST 2002
On December 24, 2002 04:36 pm, David Fraser wrote:
> I'd be very interested in this, as I use wxWindows alot in my work...
OK, here are the _raw_ modifications that I had to make.
All trivially fixable also (waiting on the __WINE__ decision).
Look for example to the makeg95.env changes to see how few were
needed!
Here's the diff (against latest wxWindows CVS).
Index: include/wx/filefn.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/filefn.h,v
retrieving revision 1.63
diff -u -r1.63 filefn.h
--- include/wx/filefn.h 2002/12/07 15:41:11 1.63
+++ include/wx/filefn.h 2002/12/24 22:17:25
@@ -74,9 +74,9 @@
// ----------------------------------------------------------------------------
// Microsoft compiler loves underscores, feed them to it
-#if defined( __VISUALC__ ) \
+#if 0 && (defined( __VISUALC__ ) \
|| ( defined(__MINGW32__) && wxCHECK_W32API_VERSION( 0, 5 ) ) \
- || ( defined(__MWERKS__) && defined(__WXMSW__) )
+ || ( defined(__MWERKS__) && defined(__WXMSW__) ))
// functions
#define wxClose _close
#define wxRead _read
Index: include/wx/sckaddr.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/sckaddr.h,v
retrieving revision 1.16
diff -u -r1.16 sckaddr.h
--- include/wx/sckaddr.h 2002/08/31 11:29:11 1.16
+++ include/wx/sckaddr.h 2002/12/24 22:17:26
@@ -102,7 +102,7 @@
#endif
#if defined(__UNIX__) && (!defined(__WXMAC__) || defined(__DARWIN__))
-#include <sys/socket.h>
+//#include <sys/socket.h>
#ifndef __VMS__
# include <sys/un.h>
#endif
Index: include/wx/wxchar.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/wxchar.h,v
retrieving revision 1.102
diff -u -r1.102 wxchar.h
--- include/wx/wxchar.h 2002/12/10 00:43:24 1.102
+++ include/wx/wxchar.h 2002/12/24 22:17:27
@@ -248,6 +248,7 @@
// it in Unicode build as well
// ----------------------------------------------------------------------------
+#undef wxHAVE_TCHAR_SUPPORT
#ifdef wxHAVE_TCHAR_SUPPORT
#include <ctype.h>
Index: include/wx/msw/gccpriv.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/msw/gccpriv.h,v
retrieving revision 1.6
diff -u -r1.6 gccpriv.h
--- include/wx/msw/gccpriv.h 2001/08/02 19:02:17 1.6
+++ include/wx/msw/gccpriv.h 2002/12/24 22:17:28
@@ -48,6 +48,7 @@
// Mingw runtime 1.0-20010604 has some missing _tXXXX functions,
// so let's define them ourselves:
+#include <tchar.h>
#if defined(__GNUWIN32__) && wxCHECK_W32API_VERSION( 1, 0 )
#ifndef _tsetlocale
#if wxUSE_UNICODE
Index: include/wx/msw/gnuwin32/extra.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/msw/gnuwin32/extra.h,v
retrieving revision 1.8
diff -u -r1.8 extra.h
--- include/wx/msw/gnuwin32/extra.h 2001/06/08 15:03:59 1.8
+++ include/wx/msw/gnuwin32/extra.h 2002/12/24 22:17:29
@@ -3,7 +3,7 @@
* have (B18/B19).
*/
-#ifndef _WX_EXTRAH_
+#if 0
#define _WX_EXTRAH_
#ifndef __CYGWIN10__
Index: include/wx/msw/gnuwin32/winresrc.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/include/wx/msw/gnuwin32/winresrc.h,v
retrieving revision 1.2
diff -u -r1.2 winresrc.h
--- include/wx/msw/gnuwin32/winresrc.h 1999/01/19 18:20:15 1.2
+++ include/wx/msw/gnuwin32/winresrc.h 2002/12/24 22:17:32
@@ -1409,12 +1409,12 @@
-#ifdef UNICODE
-#define __TEXT(quote) L##quote
-#else /* UNICODE */
-#define __TEXT(quote) quote
-#endif /* UNICODE */
-#define TEXT(quote) __TEXT(quote)
+#ifdef UNICODE
+#define __TEXT(quote) L##quote
+#else
+#define __TEXT(quote) quote
+#endif
+#define TEXT(quote) __TEXT(quote)
//
// Language IDs.
Index: samples/makefile.g95
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/samples/makefile.g95,v
retrieving revision 1.16
diff -u -r1.16 makefile.g95
--- samples/makefile.g95 2002/04/12 13:15:44 1.16
+++ samples/makefile.g95 2002/12/24 22:17:32
@@ -17,7 +17,7 @@
THISDIR=$(WXDIR)/samples
MAKEFILE=makefile.g95
MAKEFLAGS=WXUSINGDLL=$(WXUSINGDLL) UNICODE=$(UNICODE)
-CMDLINE=-f $(MAKEFILE) $(MAKEFLAGS)
+CMDLINE=-s -f $(MAKEFILE) $(MAKEFLAGS)
# Mingw make may not have a shell to use, so can't use a loop here. Sigh.
# Please add new sample directories alphabetically to make it easier to
Index: src/makeg95.env
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/makeg95.env,v
retrieving revision 1.73
diff -u -r1.73 makeg95.env
--- src/makeg95.env 2002/12/18 08:33:27 1.73
+++ src/makeg95.env 2002/12/24 22:17:37
@@ -22,7 +22,7 @@
# use forward slashes, we need to set this when
# invoking the makefile from DOS, or the wrong separators
# will be assumed.
-#OSTYPE=msys
+OSTYPE=msys
# If building DLL, the version
WXVERSION=250
@@ -81,6 +81,7 @@
else
CC = gcc
endif
+CC=winegcc
# C compiler for pure C programs
CCC = $(CC)
@@ -102,7 +103,7 @@
# Settings for Cyginw/Mingw32
# Some versions of windres cannot cope with the --preprocessor
# option. Uncomment the RCPREPROCESSOR line below if yours can.
-RESCOMP=windres
+RESCOMP=wrc
RCINPUTSWITCH=-i
RCOUTPUTSWITCH=-o
RCINCSWITCH=--include-dir
@@ -125,7 +126,7 @@
# Miscellaneous compiler options
# GRG: the __MINGW32__ option is not needed anymore
# add "-DHAVE_W32API_H" if you have w32api >= 0.5
-OPTIONS = -DSTRICT # -D__MINGW32__
+OPTIONS = -DSTRICT -DwxSIZE_T_IS_UINT -DHAVE_W32API_H -D__MINGW32__ -D_FORCENAMELESSUNION
# Add "-mthreads" if you want to have threads under mingw32
COMMON_THREADFLAGS =
@@ -198,12 +199,12 @@
########################## Directories ###############################
-OLELIBS=-lole32 -loleaut32 -luuid
+OLELIBS=-lole32 -loleaut32 /usr/local/lib/libwine_uuid.a
BASELIBS=-lstdc++ -lgcc -lodbc32 -lwsock32
ifeq ($(wxUSE_GUI),1)
WINLIBS= $(BASELIBS) \
-lwinspool -lwinmm -lshell32 \
- -lcomctl32 -lctl3d32 -lodbc32 -ladvapi32 \
+ -lcomctl32 -lcomdlg32 -lodbc32 -ladvapi32 \
-lodbc32 -lwsock32 -lopengl32 -lglu32 $(OLELIBS) # -loldnames
else
WINLIBS=$(BASELIBS)
@@ -238,7 +239,7 @@
# png, jpeg, etc are exported from wx dll, so skip and save on link time.
LIBS = $(EXTRALIBS) $(WXLIB) $(WINLIBS) $(COMPLIBS)
else
- LIBS = $(EXTRALIBS) $(WXLIB) -lregex -lpng -ljpeg -lzlib -ltiff $(WINLIBS) $(COMPLIBS)
+ LIBS = $(EXTRALIBS) $(WXLIB) /home/dimi/dev/wine/wxWindows/lib/libregex.a /home/dimi/dev/wine/wxWindows/lib/libpng.a /home/dimi/dev/wine/wxWindows/lib/libjpeg.a /home/dimi/dev/wine/wxWindows/lib/libzlib.a /home/dimi/dev/wine/wxWindows/lib/libtiff.a $(WINLIBS) $(COMPLIBS)
endif
WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
Index: src/common/datetime.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/datetime.cpp,v
retrieving revision 1.71
diff -u -r1.71 datetime.cpp
--- src/common/datetime.cpp 2002/12/04 14:06:21 1.71
+++ src/common/datetime.cpp 2002/12/24 22:17:42
@@ -286,7 +286,8 @@
#ifdef WX_GMTOFF_IN_TM
return (int)gmtoffset;
#else
- return (int)WX_TIMEZONE;
+ //return (int)WX_TIMEZONE;
+ return LONG_MAX;
#endif
}
Index: src/common/dynarray.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/dynarray.cpp,v
retrieving revision 1.28
diff -u -r1.28 dynarray.cpp
--- src/common/dynarray.cpp 2002/12/04 14:06:27 1.28
+++ src/common/dynarray.cpp 2002/12/24 22:17:43
@@ -28,6 +28,7 @@
#include <stdlib.h>
#include <string.h> // for memmove
+#include <search.h>
#ifndef max
#define max(a, b) (((a) > (b)) ? (a) : (b))
Index: src/common/encconv.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/encconv.cpp,v
retrieving revision 1.14
diff -u -r1.14 encconv.cpp
--- src/common/encconv.cpp 2002/01/25 14:45:20 1.14
+++ src/common/encconv.cpp 2002/12/24 22:17:44
@@ -23,6 +23,7 @@
#include "wx/encconv.h"
#include <stdlib.h>
+#include <search.h>
// conversion tables, generated by scripts in $(WXWIN)/misc/unictabl:
#ifdef __BORLANDC__
Index: src/common/filefn.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/filefn.cpp,v
retrieving revision 1.161
diff -u -r1.161 filefn.cpp
--- src/common/filefn.cpp 2002/12/10 21:44:08 1.161
+++ src/common/filefn.cpp 2002/12/24 22:17:49
@@ -1258,7 +1258,7 @@
// assume mkdir() has 2 args on non Windows-OS/2 platforms and on Windows too
// for the GNU compiler
-#if (!(defined(__WXMSW__) || defined(__WXPM__) || defined(__DOS__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__)
+#if 1 || (!(defined(__WXMSW__) || defined(__WXPM__) || defined(__DOS__))) || (defined(__GNUWIN32__) && !defined(__MINGW32__)) || defined(__WXWINE__) || defined(__WXMICROWIN__)
if ( mkdir(wxFNCONV(dirname), perm) != 0 )
#elif defined(__WXPM__)
if (::DosCreateDir((PSZ)dirname, NULL) != 0) // enhance for EAB's??
Index: src/common/filename.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/filename.cpp,v
retrieving revision 1.101
diff -u -r1.101 filename.cpp
--- src/common/filename.cpp 2002/12/04 14:06:32 1.101
+++ src/common/filename.cpp 2002/12/24 22:17:51
@@ -99,7 +99,7 @@
#include <sys/types.h>
#include <utime.h>
#include <sys/stat.h>
-#include <unistd.h>
+//#include <unistd.h>
#endif
#ifdef __DJGPP__
Index: src/common/list.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/list.cpp,v
retrieving revision 1.38
diff -u -r1.38 list.cpp
--- src/common/list.cpp 2002/02/06 01:38:08 1.38
+++ src/common/list.cpp 2002/12/24 22:17:52
@@ -31,6 +31,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <search.h>
#ifndef WX_PRECOMP
#include "wx/defs.h"
Index: src/common/mimecmn.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/mimecmn.cpp,v
retrieving revision 1.23
diff -u -r1.23 mimecmn.cpp
--- src/common/mimecmn.cpp 2002/12/04 14:06:45 1.23
+++ src/common/mimecmn.cpp 2002/12/24 22:17:53
@@ -486,7 +486,7 @@
bool wxMimeTypesManager::Unassociate(wxFileType *ft)
{
-#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
+#if 0 && defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
return m_impl->Unassociate(ft);
#else
return ft->Unassociate();
@@ -596,7 +596,7 @@
void wxMimeTypesManager::Initialize(int mcapStyle,
const wxString& sExtraDir)
{
-#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
+#if 0 && defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
EnsureImpl();
m_impl->Initialize(mcapStyle, sExtraDir);
@@ -609,7 +609,7 @@
// and this function clears all the data from the manager
void wxMimeTypesManager::ClearData()
{
-#if defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
+#if 0 && defined(__UNIX__) && !defined(__WXPM__) && !defined(__CYGWIN__) && !defined(__WXWINE__)
EnsureImpl();
m_impl->ClearData();
Index: src/common/string.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/string.cpp,v
retrieving revision 1.166
diff -u -r1.166 string.cpp
--- src/common/string.cpp 2002/12/10 12:13:23 1.166
+++ src/common/string.cpp 2002/12/24 22:17:55
@@ -41,6 +41,7 @@
#include <ctype.h>
#include <string.h>
#include <stdlib.h>
+#include <search.h>
#ifdef __SALFORDC__
#include <clib.h>
Index: src/common/wxchar.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/common/wxchar.cpp,v
retrieving revision 1.51
diff -u -r1.51 wxchar.cpp
--- src/common/wxchar.cpp 2002/12/10 00:43:28 1.51
+++ src/common/wxchar.cpp 2002/12/24 22:17:57
@@ -105,7 +105,7 @@
bool WXDLLEXPORT wxOKlibc()
{
-#if wxUSE_WCHAR_T && defined(__UNIX__) && defined(__GLIBC__)
+#if 0 && wxUSE_WCHAR_T && defined(__UNIX__) && defined(__GLIBC__)
// glibc 2.0 uses UTF-8 even when it shouldn't
wchar_t res = 0;
if ((MB_CUR_MAX == 2) &&
Index: src/jpeg/jmorecfg.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/jpeg/jmorecfg.h,v
retrieving revision 1.19
diff -u -r1.19 jmorecfg.h
--- src/jpeg/jmorecfg.h 2002/05/26 11:49:37 1.19
+++ src/jpeg/jmorecfg.h 2002/12/24 22:17:58
@@ -130,6 +130,7 @@
*/
/* UINT8 must hold at least the values 0..255. */
+#ifndef __WINE_BASETSD_H
#ifdef HAVE_UNSIGNED_CHAR
typedef unsigned char UINT8;
@@ -154,6 +155,8 @@
#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */
typedef short INT16;
#endif
+
+#endif /* __WINE_BASETSD_H */
/* INT32 must hold at least signed 32-bit values. */
Index: src/msw/app.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/app.cpp,v
retrieving revision 1.174
diff -u -r1.174 app.cpp
--- src/msw/app.cpp 2002/12/04 14:09:06 1.174
+++ src/msw/app.cpp 2002/12/24 22:18:01
@@ -1382,5 +1382,5 @@
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
// if in a separate file. So include it here to ensure it's linked.
#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__TWIN32__) && !defined(WXMAKINGDLL))
-#include "main.cpp"
+//#include "main.cpp"
#endif
Index: src/msw/dialup.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/dialup.cpp,v
retrieving revision 1.34
diff -u -r1.34 dialup.cpp
--- src/msw/dialup.cpp 2002/08/30 20:34:25 1.34
+++ src/msw/dialup.cpp 2002/12/24 22:18:02
@@ -50,7 +50,7 @@
// Doesn't yet compile under VC++ 4, BC++, Watcom C++,
// Wine: no wininet.h
-#if !defined(__BORLANDC__) && \
+#if 0 && !defined(__BORLANDC__) && \
(!defined(__GNUWIN32__) || wxCHECK_W32API_VERSION(0, 5)) && \
!defined(__GNUWIN32_OLD__) && \
!defined(__WATCOMC__) && \
Index: src/msw/gsocket.c
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/gsocket.c,v
retrieving revision 1.42
diff -u -r1.42 gsocket.c
--- src/msw/gsocket.c 2002/12/06 16:57:30 1.42
+++ src/msw/gsocket.c 2002/12/24 22:18:04
@@ -11,6 +11,8 @@
* PLEASE don't put C++ comments here - this is a C source file.
*/
+#include <winsock.h>
+
#ifdef _MSC_VER
/* RPCNOTIFICATION_ROUTINE in rasasync.h (included from winsock.h),
* warning: conditional expression is constant.
@@ -55,8 +57,6 @@
#include <stdlib.h>
#include <stddef.h>
#include <ctype.h>
-
-#include <winsock.h>
/* if we use configure for MSW SOCKLEN_T will be already defined */
#ifndef SOCKLEN_T
Index: src/msw/utils.cpp
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/msw/utils.cpp,v
retrieving revision 1.102
diff -u -r1.102 utils.cpp
--- src/msw/utils.cpp 2002/12/07 00:58:11 1.102
+++ src/msw/utils.cpp 2002/12/24 22:18:06
@@ -47,6 +47,7 @@
#endif
#include "wx/timer.h"
+#include <unistd.h>
#if !defined(__GNUWIN32__) && !defined(__WXWINE__) && !defined(__SALFORDC__) && !defined(__WXMICROWIN__)
#include <direct.h>
Index: src/png/pngconf.h
===================================================================
RCS file: /pack/cvsroots/wxwindows/wxWindows/src/png/pngconf.h,v
retrieving revision 1.7
diff -u -r1.7 pngconf.h
--- src/png/pngconf.h 2002/12/04 14:10:03 1.7
+++ src/png/pngconf.h 2002/12/24 22:18:08
@@ -1157,9 +1157,10 @@
# endif
#endif
-#if defined(__CYGWIN__)
+#if 1 || defined(__CYGWIN__)
# undef PNGAPI
-# define PNGAPI __cdecl
+//# define PNGAPI __cdecl
+# define PNGAPI
# undef PNG_IMPEXP
# define PNG_IMPEXP
#endif
--
Dimi.
More information about the wine-devel
mailing list