diff --git a/BuildCVS.txt b/BuildCVS.txt index 5090ca0480..75480522d0 100644 --- a/BuildCVS.txt +++ b/BuildCVS.txt @@ -51,7 +51,10 @@ Instructions are similar to those for Regular Mingw32 except PLEASE APPLY THESE PATCHES BY HAND! There are apparently a few different versions of the headers floating around. -->copy wxWin\src\makeg295.env to wxWin\src\makeg95.env +->Edit wx/src/makeg95.env and set the MINGW32 variable at the top of + the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). + If using MINGW32, also set the MINGW32VERSION variable + appropriately. c) Build instructions @@ -81,7 +84,6 @@ c) Build instructions -> type: cd c:\wxWin\src\msw -> type: make -f makefile.g95 (if using GNU tools) -or type: make -f makefile.g295 (if using Mingw32/gcc-2.95) or type: make -f makefile.vc (if using MS VC++) diff --git a/distrib/msw/generic.rsp b/distrib/msw/generic.rsp index 281cf708fe..c9354a30a7 100644 --- a/distrib/msw/generic.rsp +++ b/distrib/msw/generic.rsp @@ -919,3 +919,15 @@ samples/wizard/*.png samples/wizard/*.ico samples/wizard/*.txt +samples/console/*.cpp +samples/console/*.h +samples/console/makefile* +samples/console/*.rc +samples/console/*.def +samples/console/*.bmp +samples/console/*.xpm +samples/console/*.xbm +samples/console/*.png +samples/console/*.ico +samples/console/*.txt + diff --git a/distrib/msw/tmake/g95.t b/distrib/msw/tmake/g95.t index d685da66fa..0148b7e113 100644 --- a/distrib/msw/tmake/g95.t +++ b/distrib/msw/tmake/g95.t @@ -28,22 +28,39 @@ next if $wxCommon{$file} =~ /\b(16)\b/; #! needs extra files (sql*.h) so not compiled by default. - next if $file =~ /^odbc\./; + #! next if $file =~ /^odbc\./; - $file =~ s/cp?p?$/\$(OBJSUFF)/; - $project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " " + if ( $file =~ /^odbc\./ ) + { + $file =~ s/cp?p?$/\$(OBJSUFF)/; + $project{"ADVANCEDOBJS"} .= '$(COMMDIR)/' . $file . " " + } + else + { + $file =~ s/cp?p?$/\$(OBJSUFF)/; + $project{"WXCOMMONOBJS"} .= '$(COMMDIR)/' . $file . " " + } } foreach $file (sort keys %wxMSW) { - #! Mingw32 doesn't have the OLE headers and has some troubles with - #! socket code - next if $wxMSW{$file} =~ /\b(O|16)\b/; - #! native wxDirDlg can't be compiled due to GnuWin32/OLE limitations, next if $file =~ /^dirdlg\./; - $file =~ s/cp?p?$/\$(OBJSUFF)/; - $project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " " + next if $wxMSW{$file} =~ /\b(16)\b/; + + #! Mingw32 doesn't have the OLE headers and has some troubles with + #! socket code, so put in ADVANCEDOBJS + if ( $wxMSW{$file} =~ /\b(O)\b/ ) + { + $file =~ s/cp?p?$/\$(OBJSUFF)/; + $project{"ADVANCEDOBJS"} .= '$(MSWDIR)/ole/' . $file . " " + } + else + { + $file =~ s/cp?p?$/\$(OBJSUFF)/; + $project{"WXMSWOBJS"} .= '$(MSWDIR)/' . $file . " " + } + } foreach $file (sort keys %wxHTML) { @@ -102,6 +119,9 @@ HTMLOBJS = \ MSWOBJS = \ #$ ExpandList("WXMSWOBJS"); +ADVANCEDOBJS = \ + #$ ExpandList("ADVANCEDOBJS"); + ZLIBOBJS = \ $(ZLIBDIR)/adler32.$(OBJSUFF) \ $(ZLIBDIR)/compress.$(OBJSUFF) \ @@ -197,7 +217,20 @@ XPMOBJECTS = $(XPMDIR)/crbuffri.o\ $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(ADVANCEDOBJS) # $(XPMOBJECTS) + +ifeq ($(MINGW32),1) + ifeq ($(MINGW32VERSION),2.95) + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) $(ADVANCEDOBJS) # $(XPMOBJECTS) + else + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS) + endif +else + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS) +endif all: $(OBJECTS) $(WXLIB) @@ -247,21 +280,21 @@ $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c # mv y.tab.c $(COMMDIR)/y_tab.c clean: - -erase *.o - -erase *.bak - -erase core - -erase ..\common\y_tab.c - -erase ..\common\lex_yy.c - -erase ..\common\*.o - -erase ..\common\*.bak - -erase ..\generic\*.o - -erase ..\generic\*.bak - -erase ..\html\*.o - -erase ..\png\*.o - -erase ..\png\*.bak - -erase ..\zlib\*.o - -erase ..\zlib\*.bak - -erase ..\jpeg\*.o - -erase ..\..\lib\libwx.a + rm -f *.o + rm -f *.bak + rm -f core + rm -f ..\common\y_tab.c + rm -f ..\common\lex_yy.c + rm -f ..\common\*.o + rm -f ..\common\*.bak + rm -f ..\generic\*.o + rm -f ..\generic\*.bak + rm -f ..\html\*.o + rm -f ..\png\*.o + rm -f ..\png\*.bak + rm -f ..\zlib\*.o + rm -f ..\zlib\*.bak + rm -f ..\jpeg\*.o + rm -f ..\..\lib\libwx.a cleanall: clean diff --git a/docs/html/index.htm b/docs/html/index.htm index b9410f8706..a789110d60 100644 --- a/docs/html/index.htm +++ b/docs/html/index.htm @@ -190,6 +190,8 @@ downloaded from the wxWindows Web site.

config: demonstrates use of wxConfig, which defaults to wxRegConfig on WIN32, wxIniConfig on WIN16, and wxFileConfig on other platforms. +

  • console: demonstrates a console application using +console-mode (no-GUI) compilation of wxWindows.
  • controls: sample showing a variety of controls, including wxNotebook.
  • db: wxDB ODBC sample. diff --git a/docs/msw/install.txt b/docs/msw/install.txt index ab597749ba..597f4a7b52 100644 --- a/docs/msw/install.txt +++ b/docs/msw/install.txt @@ -211,10 +211,16 @@ Compiling using the makefiles: 'make -f makefile.b32 FINAL=1' for the library and samples. -Note: the wxWindows library and (some) samples compile in 16-bit mode +Note (1): the wxWindows library and (some) samples compile in 16-bit mode using makefile.bcc, but at present the wxWindows resource system is switched off in this mode. See issues.txt for details. +Note (2): the wxWindows makefiles assume byte structure alignment. Please +make sure that your own project or makefile settings use the +same alignment, or you could experience mysterious crashes. To +change the alignment, add a suitable option to the $(CFG) target code +in src/msw/makefile.b32. + Compiling using the IDE files: 1. Load src\bc32.ide (or src\bc32d.ide for a debugging version). @@ -342,10 +348,10 @@ Here are the steps required: - For Cygwin, make sure there's a \tmp directory on your Windows drive or bison will crash. -- makeg95.env configuation: - - Edit wx/src/makeg95.env and set the MINGW32 variable at the top of the file to either 1 (you have Mingw32) or 0 (you have Cygwin32). + If using MINGW32, also set the MINGW32VERSION variable + appropriately. - Mingw32 may not support winsock.h, so if you have a problem here, comment out socket-related files in src/msw/makefile.g95. diff --git a/include/wx/defs.h b/include/wx/defs.h index 18aefbaaef..5154c388ab 100644 --- a/include/wx/defs.h +++ b/include/wx/defs.h @@ -138,8 +138,10 @@ // we are setting this define because of the complex check // using NORLANDER as Cygwin may follow. (header author is Anders Norlander) #if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +#ifndef wxUSE_NORLANDER_HEADERS # define wxUSE_NORLANDER_HEADERS 1 #endif +#endif ////////////////////////////////////////////////////////////////////////////////// diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index fa3435b1af..1dca866f7e 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -337,7 +337,13 @@ // complains about deallocating // arrays of wxPoints if wxPoint is a class. -#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__)&&!defined(wxUSE_NORLANDER_HEADERS)) +#if defined(__MINGW32__) && ((__GNUC__>2) ||((__GNUC__==2) && (__GNUC_MINOR__>=95))) +#ifndef wxUSE_NORLANDER_HEADERS +# define wxUSE_NORLANDER_HEADERS 1 +#endif +#endif + +#if (!defined(WIN32) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(wxUSE_NORLANDER_HEADERS)) // Can't use OLE drag and drop in Windows 3.1 because we don't know how // to implement UUIDs // GnuWin32 doesn't have appropriate headers for e.g. IUnknown. diff --git a/src/generic/splitter.cpp b/src/generic/splitter.cpp index 70ac816c85..4360b6c9b9 100644 --- a/src/generic/splitter.cpp +++ b/src/generic/splitter.cpp @@ -31,6 +31,7 @@ #include "wx/string.h" #include "wx/splitter.h" #include "wx/dcscreen.h" +#include "wx/settings.h" #if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxSplitterWindow, wxWindow) diff --git a/src/makeg95.env b/src/makeg95.env index 2250b07a5c..d014e9d827 100644 --- a/src/makeg95.env +++ b/src/makeg95.env @@ -7,7 +7,10 @@ # If using Cygwin, set this to 0. # If using Mingw32, set this to 1. -MINGW32=0 +MINGW32=1 + +# Set to the version you have +MINGW32VERSION=2.95 ########################## Compiler ################################## @@ -15,9 +18,13 @@ MINGW32=0 # Put a comment before --pipe for Cygwin, remove comment for Mingw32 2.95 ifeq ($(MINGW32),1) -CC = gcc --pipe -fvtable-thunks + ifeq ($(MINGW32VERSION),2.95) + CC = gcc --pipe -fvtable-thunks + else + CC = gcc + endif else -CC = gcc + CC = gcc endif # C compiler for pure C programs @@ -119,6 +126,14 @@ WXINC=$(WXDIR)/include WXBASESRC=$(WXDIR)/src/common WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) +GNUWIN32EXTRA=-I$(WXDIR)/include/wx/msw/gnuwin32 + +ifeq ($(MINGW32),1) + ifeq ($(MINGW32),2.95) + GNUWIN32EXTRA= + endif +endif + ifeq ($(MINGW32),1) INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/src/jpeg -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS) else diff --git a/src/msw/makefile.g95 b/src/msw/makefile.g95 index acdf0fa1e9..e6f37e0f95 100644 --- a/src/msw/makefile.g95 +++ b/src/msw/makefile.g95 @@ -1,5 +1,5 @@ -# This file was automatically generated by tmake at 15:16, 1999/10/21 +# This file was automatically generated by tmake at 12:32, 1999/10/22 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T! # @@ -258,6 +258,15 @@ MSWOBJS = \ $(MSWDIR)/window.$(OBJSUFF) \ $(MSWDIR)/xpmhand.$(OBJSUFF) +ADVANCEDOBJS = \ + $(COMMDIR)/odbc.$(OBJSUFF) \ + $(MSWDIR)/ole/automtn.$(OBJSUFF) \ + $(MSWDIR)/ole/dataobj.$(OBJSUFF) \ + $(MSWDIR)/ole/dropsrc.$(OBJSUFF) \ + $(MSWDIR)/ole/droptgt.$(OBJSUFF) \ + $(MSWDIR)/ole/oleutils.$(OBJSUFF) \ + $(MSWDIR)/ole/uuid.$(OBJSUFF) + ZLIBOBJS = \ $(ZLIBDIR)/adler32.$(OBJSUFF) \ $(ZLIBDIR)/compress.$(OBJSUFF) \ @@ -353,7 +362,20 @@ XPMOBJECTS = $(XPMDIR)/crbuffri.o\ $(XPMDIR)/wrffrp.o $(XPMDIR)/wrffri.o OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(ADVANCEDOBJS) # $(XPMOBJECTS) + +ifeq ($(MINGW32),1) + ifeq ($(MINGW32VERSION),2.95) + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) $(ADVANCEDOBJS) # $(XPMOBJECTS) + else + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS) + endif +else + OBJECTS = $(MSWOBJS) $(COMMONOBJS) $(GENERICOBJS) $(HTMLOBJS) \ + $(JPEGOBJS) $(PNGOBJS) $(ZLIBOBJS) # $(XPMOBJECTS) +endif all: $(OBJECTS) $(WXLIB) @@ -403,21 +425,21 @@ $(COMMDIR)/lex_yy.c: $(COMMDIR)/doslex.c # mv y.tab.c $(COMMDIR)/y_tab.c clean: - -erase *.o - -erase *.bak - -erase core - -erase ..\common\y_tab.c - -erase ..\common\lex_yy.c - -erase ..\common\*.o - -erase ..\common\*.bak - -erase ..\generic\*.o - -erase ..\generic\*.bak - -erase ..\html\*.o - -erase ..\png\*.o - -erase ..\png\*.bak - -erase ..\zlib\*.o - -erase ..\zlib\*.bak - -erase ..\jpeg\*.o - -erase ..\..\lib\libwx.a + rm -f *.o + rm -f *.bak + rm -f core + rm -f ..\common\y_tab.c + rm -f ..\common\lex_yy.c + rm -f ..\common\*.o + rm -f ..\common\*.bak + rm -f ..\generic\*.o + rm -f ..\generic\*.bak + rm -f ..\html\*.o + rm -f ..\png\*.o + rm -f ..\png\*.bak + rm -f ..\zlib\*.o + rm -f ..\zlib\*.bak + rm -f ..\jpeg\*.o + rm -f ..\..\lib\libwx.a cleanall: clean diff --git a/src/msw/ole/droptgt.cpp b/src/msw/ole/droptgt.cpp index 8ef6c9cdee..897e2279dd 100644 --- a/src/msw/ole/droptgt.cpp +++ b/src/msw/ole/droptgt.cpp @@ -417,7 +417,7 @@ wxDataFormat wxDropTarget::GetSupportedFormat(IDataObject *pIDataSource) const delete [] formats; } - return n < nFormats ? format : wxDF_INVALID; + return (n < nFormats) ? (wxDataFormat) format : (wxDataFormat) wxDF_INVALID; } // ---------------------------------------------------------------------------- diff --git a/src/wxvc.dsp b/src/wxvc.dsp index beaba79fbd..fc79913c22 100644 --- a/src/wxvc.dsp +++ b/src/wxvc.dsp @@ -87,6 +87,10 @@ SOURCE=.\common\choiccmn.cpp # End Source File # Begin Source File +SOURCE=.\common\clipcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\cmndata.cpp # End Source File # Begin Source File @@ -119,6 +123,10 @@ SOURCE=.\common\dcbase.cpp # End Source File # Begin Source File +SOURCE=.\common\dobjcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\dlgcmn.cpp # End Source File # Begin Source File diff --git a/src/wxvc6.dsp b/src/wxvc6.dsp index e32664b1ee..5f2624c4eb 100644 --- a/src/wxvc6.dsp +++ b/src/wxvc6.dsp @@ -93,6 +93,10 @@ SOURCE=.\common\choiccmn.cpp # End Source File # Begin Source File +SOURCE=.\common\clipcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\cmndata.cpp # End Source File # Begin Source File @@ -125,6 +129,10 @@ SOURCE=.\common\dcbase.cpp # End Source File # Begin Source File +SOURCE=.\common\dobjcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\dlgcmn.cpp # End Source File # Begin Source File diff --git a/src/wxvc_dll.dsp b/src/wxvc_dll.dsp index 301e4cd191..51a29716a0 100644 --- a/src/wxvc_dll.dsp +++ b/src/wxvc_dll.dsp @@ -100,6 +100,10 @@ SOURCE=.\common\choiccmn.cpp # End Source File # Begin Source File +SOURCE=.\common\clipcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\cmndata.cpp # End Source File # Begin Source File @@ -132,6 +136,10 @@ SOURCE=.\common\dcbase.cpp # End Source File # Begin Source File +SOURCE=.\common\dobjcmn.cpp +# End Source File +# Begin Source File + SOURCE=.\common\dlgcmn.cpp # End Source File # Begin Source File