Added more makefiles; fixed some samples for Cygwin

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1654 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1999-02-09 16:00:23 +00:00
parent fed485e094
commit dbda9e86f0
84 changed files with 1997 additions and 1578 deletions

View File

@@ -10,22 +10,30 @@ tools/gettext/msgunfmt.exe
src/makeb32.env src/makeb32.env
src/makeprog.b32 src/makeprog.b32
src/makelib.b32
src/makebcc.env src/makebcc.env
src/makeprog.bcc src/makeprog.bcc
src/makelib.bcc
src/makemsc.env src/makemsc.env
src/makeprog.msc src/makeprog.msc
src/makelib.msc
src/makewat.env src/makewat.env
src/makeprog.wat src/makeprog.wat
src/makelib.wat
src/makesc.env src/makesc.env
src/makevc.env src/makevc.env
src/makeprog.vc src/makeprog.vc
src/makelib.vc src/makelib.vc
src/makeg95.env src/makeg95.env
src/makeprog.g95
src/makelib.g95
src/makesl.env src/makesl.env
src/makeprog.sl src/makeprog.sl
src/makelib.sl
src/salford.lnk src/salford.lnk
src/maketwin.env src/maketwin.env
src/makeprog.twn src/makeprog.twn
src/makelib.twn
src/makefile.bcc src/makefile.bcc
src/makefile.dos src/makefile.dos
src/makefile.vc src/makefile.vc

View File

@@ -1,6 +1,12 @@
wxWindows 2.0 for Motif installation wxWindows 2.0 for Motif installation
------------------------------------ ------------------------------------
IMPORTANT NOTE: If you experience problems installing, please
re-read this instructions and other related files (todo.txt,
bugs.txt etc.) carefully before mailing wxwin-users or
the author. Preferably, try to fix the problem first and
then send a patch to the author.
- Prerequisites: Motif 1.2 or above, or Lesstif - Prerequisites: Motif 1.2 or above, or Lesstif
(not yet tested). Motif 2.0 and above may also be suitable. (not yet tested). Motif 2.0 and above may also be suitable.

View File

@@ -2,6 +2,12 @@
Installing wxWindows 2.0 Installing wxWindows 2.0
------------------------ ------------------------
IMPORTANT NOTE: If you experience problems installing, please
re-read this instructions and other related files (todo.txt,
bugs.txt etc.) carefully before mailing wxwin-users or
the author. Preferably, try to fix the problem first and
then send a patch to the author.
Unarchiving Unarchiving
----------- -----------
@@ -22,8 +28,7 @@ wx200vc.zip MS VC++ 5.0 project files
wx200cw.zip Metrowerks CodeWarrior project files wx200cw.zip Metrowerks CodeWarrior project files
Unarchive the required files plus any optional documentation Unarchive the required files plus any optional documentation
files into a suitable directory such as c:\wx. Alter your files into a suitable directory such as c:\wx.
WXWIN environment variable to point to this directory.
Other add-on packages are available from the wxWindows Web site, such as: Other add-on packages are available from the wxWindows Web site, such as:
@@ -32,13 +37,21 @@ Other add-on packages are available from the wxWindows Web site, such as:
- tex2rtf3.zip. Tex2RTF: create Windows Help, HTML, and Word RTF files from - tex2rtf3.zip. Tex2RTF: create Windows Help, HTML, and Word RTF files from
the same document source. the same document source.
General installation notes
--------------------------
Alter your WXWIN environment variable to point to this directory.
For Cygwin or Mingw32 compilation, make sure WXWIN contains only
forward slashes.
If installing from the CVS server, copy include/wx/msw/setup0.h to
include/wx/msw/setup.h.
Compilation Compilation
----------- -----------
At present, wxWindows compiles with VC++ 4.0/5.0/6.0, The following sections explain how to compile wxWindows with each supported
BC++ 4.5/5.0, Cygwin b19/b20, and Mingw32. It may compile compiler.
with 16-bit compilers (BC++ and VC++ 1.5) but this hasn't
been tested lately.
Visual C++ 4.0/5.0/6.0 compilation Visual C++ 4.0/5.0/6.0 compilation
---------------------------------- ----------------------------------
@@ -77,6 +90,9 @@ Note (1): if you wish to use templates, please edit
include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0. include\wx\msw\setup.h and set wxUSE_DEBUG_NEW_ALWAYS to 0.
Without this, the redefinition of 'new' will cause problems in Without this, the redefinition of 'new' will cause problems in
the headers. Alternatively, #undef new before including template headers. the headers. Alternatively, #undef new before including template headers.
You will also need to set wxUSE_IOSTREAMH to 0 if you will be
using templates, to avoid the non-template stream files being included
within wxWindows.
Note (2): libraries and applications generated with makefiles and Note (2): libraries and applications generated with makefiles and
project files are unlikely to be compatible, so use one method or project files are unlikely to be compatible, so use one method or
@@ -232,6 +248,9 @@ Here are the steps required:
- Mingw32 may not support winsock.h, so comment out - Mingw32 may not support winsock.h, so comment out
socket-related files in src/msw/makefile.g95. socket-related files in src/msw/makefile.g95.
- Set your WXWIN variable to where wxWindows is installed.
For Cygwin/Mingw32, use forward slashes in the path, not backslashes.
- Use the makefile.g95 files for compiling wxWindows and samples, - Use the makefile.g95 files for compiling wxWindows and samples,
e.g.: e.g.:
> cd c:\wx\src\msw > cd c:\wx\src\msw

View File

@@ -21,6 +21,15 @@
#include "wx/string.h" #include "wx/string.h"
#if wxUSE_TIMEDATE #if wxUSE_TIMEDATE
// These lines necessary to stop VC++ 6 being confused about namespaces
class WXDLLEXPORT wxDate;
bool WXDLLEXPORT operator<(const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator<(const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator <= (const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator > (const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator >= (const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator == (const wxDate &dt1, const wxDate &dt2);
bool WXDLLEXPORT operator != (const wxDate &dt1, const wxDate &dt2);
enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN}; enum wxdate_format_type {wxMDY, wxDAY, wxMONTH, wxFULL, wxEUROPEAN};

View File

@@ -160,11 +160,8 @@
#elif defined(__WATCOMC__) #elif defined(__WATCOMC__)
// typedef unsigned int bool; // typedef unsigned int bool;
#if __WATCOMC__<1100 #if (__WATCOMC__ < 1100)
typedef enum _tagbool { typedef unsigned int bool;
false,
true
} bool ;
#endif #endif
#elif defined(__SUNCC__) #elif defined(__SUNCC__)

View File

@@ -27,6 +27,7 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/intl.h"
#define wxKEY_SHIFT 1 #define wxKEY_SHIFT 1
#define wxKEY_CTRL 2 #define wxKEY_CTRL 2

View File

@@ -132,7 +132,7 @@
#ifndef __MWERKS__ #ifndef __MWERKS__
#define wxUSE_IOSTREAMH 1 #define wxUSE_IOSTREAMH 1
#else #else
#define wxUSE_IOSTREAMH 0 #define wxUSE_IOSTREAMH 1
#endif #endif
// VC++ 4.2 and above allows <iostream> and <iostream.h> // VC++ 4.2 and above allows <iostream> and <iostream.h>
// but you can't mix them. Set to 1 for <iostream.h>, // but you can't mix them. Set to 1 for <iostream.h>,

View File

@@ -27,6 +27,7 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/msw/accel.h" #include "wx/msw/accel.h"
#include "wx/intl.h"
#define wxKEY_SHIFT 1 #define wxKEY_SHIFT 1
#define wxKEY_CTRL 2 #define wxKEY_CTRL 2
@@ -621,9 +622,10 @@ public:
virtual void MSWOnMouseEnter(int x, int y, WXUINT flags); virtual void MSWOnMouseEnter(int x, int y, WXUINT flags);
virtual void MSWOnMouseLeave(int x, int y, WXUINT flags); virtual void MSWOnMouseLeave(int x, int y, WXUINT flags);
virtual void MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); // These return TRUE if an event handler was found, FALSE otherwise (not processed)
virtual void MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); virtual bool MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
virtual void MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE); virtual bool MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
virtual bool MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII = FALSE);
virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate); virtual bool MSWOnActivate(int flag, bool minimized, WXHWND activate);
virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate); virtual long MSWOnMDIActivate(long flag, WXHWND activate, WXHWND deactivate);

View File

@@ -70,7 +70,7 @@ const unsigned int wxSTRING_MAXLEN = UINT_MAX - 100;
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// checks whether the passed in pointer is NULL and if the string is empty // checks whether the passed in pointer is NULL and if the string is empty
inline bool WXDLLEXPORT IsEmpty(const char *p) { return !p || !*p; } inline bool WXDLLEXPORT IsEmpty(const char *p) { return (!p || !*p); }
// safe version of strlen() (returns 0 if passed NULL pointer) // safe version of strlen() (returns 0 if passed NULL pointer)
inline size_t WXDLLEXPORT Strlen(const char *psz) inline size_t WXDLLEXPORT Strlen(const char *psz)
@@ -144,8 +144,8 @@ struct WXDLLEXPORT wxStringData
char* data() const { return (char*)(this + 1); } char* data() const { return (char*)(this + 1); }
// empty string has a special ref count so it's never deleted // empty string has a special ref count so it's never deleted
bool IsEmpty() const { return nRefs == -1; } bool IsEmpty() const { return (nRefs == -1); }
bool IsShared() const { return nRefs > 1; } bool IsShared() const { return (nRefs > 1); }
// lock/unlock // lock/unlock
void Lock() { if ( !IsEmpty() ) nRefs++; } void Lock() { if ( !IsEmpty() ) nRefs++; }
@@ -153,8 +153,8 @@ struct WXDLLEXPORT wxStringData
// if we had taken control over string memory (GetWriteBuf), it's // if we had taken control over string memory (GetWriteBuf), it's
// intentionally put in invalid state // intentionally put in invalid state
void Validate(bool b) { nRefs = b ? 1 : 0; } void Validate(bool b) { nRefs = (b ? 1 : 0); }
bool IsValid() const { return nRefs != 0; } bool IsValid() const { return (nRefs != 0); }
}; };
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -27,6 +27,7 @@
#include "wx/list.h" #include "wx/list.h"
#include "wx/region.h" #include "wx/region.h"
#include "wx/accel.h" #include "wx/accel.h"
#include "wx/intl.h"
#define wxKEY_SHIFT 1 #define wxKEY_SHIFT 1
#define wxKEY_CTRL 2 #define wxKEY_CTRL 2

View File

@@ -38,7 +38,7 @@ public:
// Called when the value in the window must be validated. // Called when the value in the window must be validated.
// This function can pop up an error message. // This function can pop up an error message.
virtual bool Validate(wxWindow *parent) {return true;} virtual bool Validate(wxWindow *parent) {return TRUE;}
// Called to transfer data to the window // Called to transfer data to the window
virtual bool TransferToWindow(void); virtual bool TransferToWindow(void);

16
samples/db/makefile.g95 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=dbtest
OBJECTS = $(TARGET).o listdb.o
include $(WXDIR)/src/makeprog.g95

17
samples/dnd/makefile.unx Normal file
View File

@@ -0,0 +1,17 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for dnd example (UNIX).
PROGRAM=dnd
OBJECTS=$(PROGRAM).o
include ../../src/makeprog.env

View File

@@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=forty
OBJECTS = $(TARGET).obj canvas.obj card.obj game.obj pile.obj playerdg.obj scoredg.obj scorefil.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=image
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=image
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

18
samples/mdi/makefile.sl Normal file
View File

@@ -0,0 +1,18 @@
#
# File: makefile.sl
# Author: Julian Smart
# Created: 1998
#
# Makefile : Builds a wxWindows sample for Salford C++, WIN32
PROGRAM = mdi
OBJECTS = $(PROGRAM).obj
include ..\..\src\makeprog.sl
all: wx $(TARGET)
wx:
cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all
cd $(WXDIR)\samples\mdi

16
samples/mfc/makefile.g95 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=mfctest
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -0,0 +1,36 @@
# Symantec C++ makefile
WXDIR = $(WXWIN)
WXLIB = $(WXDIR)\lib\wx.lib
INCDIR = $(WXDIR)\include
INCLUDE=$(INCDIR)
TARGET=minimal
include $(WXDIR)\src\makesc.env
minimal.exe: minimal.obj $(DEFFILE) minimal.res
*$(CC) $(LDFLAGS) -o$@ $** $(LIBS)
*$(RC) -k minimal.res
sc32.def:
echo EXETYPE NT > sc32.def
echo SUBSYSTEM WINDOWS >> sc32.def
sc16.def:
echo NAME $(TARGET) > sc16.def
echo EXETYPE WINDOWS >> sc16.def
echo STUB 'WINSTUB.EXE' >> sc16.def
echo CODE PRELOAD MOVEABLE DISCARDABLE >> sc16.def
echo DATA PRELOAD MOVEABLE MULTIPLE >> sc16.def
echo HEAPSIZE 1024 >> sc16.def
echo STACKSIZE 8192 >> sc16.def
clean:
-del *.obj
-del *.exe
-del *.res
-del *.map
-del *.rws
-del sc32.def
-del sc16.def

View File

@@ -0,0 +1,18 @@
#
# File: makefile.sl
# Author: Julian Smart
# Created: 1998
#
# Makefile : Builds a wxWindows sample for Salford C++, WIN32
PROGRAM = minimal
OBJECTS = $(PROGRAM).obj
include ..\..\src\makeprog.sl
all: wx $(TARGET)
wx:
cd $(WXDIR)\src\msw ^ mk32 -f makefile.sl all
cd $(WXDIR)\samples\minimal

View File

@@ -0,0 +1,15 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = minimal
OBJECTS = $(PROGRAM).obj
!include $(WXDIR)\src\makeprog.wat

16
samples/png/makefile.b32 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=pngdemo
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

16
samples/png/makefile.g95 Normal file
View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=pngdemo
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -0,0 +1,16 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=regtest
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,17 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Makefile : Builds 16-bit sample, VC++ 1.5
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
TARGET=test
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.msc

View File

@@ -0,0 +1,17 @@
#
# File: makefile.unx
# Author: Julian Smart
# Created: 1998
# Updated:
# Copyright: (c) 1998 Julian Smart
#
# "%W% %G%"
#
# Makefile for validate example (UNIX).
PROGRAM=validate
OBJECTS=$(PROGRAM).o
include ../../src/makeprog.env

View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=client
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -0,0 +1,19 @@
#
# File: makefile.dos
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Makefile : Builds 16-bit sample, VC++ 1.5
# Use FINAL=1 argument to nmake to build final version with no debugging
# info
WXDIR = $(WXWIN)
TARGET=client
OBJECTS = $(TARGET).obj
# TODO: server
!include $(WXDIR)\src\makeprog.msc

View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../..
TARGET=server
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95

View File

@@ -762,7 +762,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream )
#endif #endif
// wxUSE_LIBPNG // wxUSE_LIBPNG
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -974,7 +974,7 @@ bool wxJPEGHandler::SaveFile( wxImage *image, wxOutputStream& stream )
#endif #endif
// wxUSE_LIBJPEG // wxUSE_LIBJPEG
@@ -1230,7 +1230,7 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream )
{ {
if (aByte == 0) if (aByte == 0)
{ {
/* column = width; */ /* column = width; */
} }
else if (aByte == 1) else if (aByte == 1)
{ {
@@ -1342,14 +1342,14 @@ bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream )
wxBitmap wxImage::ConvertToBitmap() const wxBitmap wxImage::ConvertToBitmap() const
{ {
// sizeLimit is the MS upper limit for the DIB size // sizeLimit is the MS upper limit for the DIB size
int sizeLimit = 1024*768*3; int sizeLimit = 1024*768*3;
// width and height of the device-dependent bitmap // width and height of the device-dependent bitmap
int width = GetWidth(); int width = GetWidth();
int bmpHeight = GetHeight(); int bmpHeight = GetHeight();
// calc the number of bytes per scanline and padding // calc the number of bytes per scanline and padding
int bytePerLine = width*3; int bytePerLine = width*3;
int sizeDWORD = sizeof( DWORD ); int sizeDWORD = sizeof( DWORD );
div_t lineBoundary = div( bytePerLine, sizeDWORD ); div_t lineBoundary = div( bytePerLine, sizeDWORD );
@@ -1359,7 +1359,7 @@ wxBitmap wxImage::ConvertToBitmap() const
padding = sizeDWORD - lineBoundary.rem; padding = sizeDWORD - lineBoundary.rem;
bytePerLine += padding; bytePerLine += padding;
} }
// calc the number of DIBs and heights of DIBs // calc the number of DIBs and heights of DIBs
int numDIB = 1; int numDIB = 1;
int hRemain = 0; int hRemain = 0;
int height = sizeLimit/bytePerLine; int height = sizeLimit/bytePerLine;
@@ -1373,33 +1373,33 @@ wxBitmap wxImage::ConvertToBitmap() const
if( hRemain >0 ) numDIB++; if( hRemain >0 ) numDIB++;
} }
// set bitmap parameters // set bitmap parameters
wxBitmap bitmap; wxBitmap bitmap;
wxCHECK_MSG( Ok(), bitmap, "invalid image" ); wxCHECK_MSG( Ok(), bitmap, "invalid image" );
bitmap.SetWidth( width ); bitmap.SetWidth( width );
bitmap.SetHeight( bmpHeight ); bitmap.SetHeight( bmpHeight );
bitmap.SetDepth( wxDisplayDepth() ); bitmap.SetDepth( wxDisplayDepth() );
// create a DIB header // create a DIB header
int headersize = sizeof(BITMAPINFOHEADER); int headersize = sizeof(BITMAPINFOHEADER);
LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize ); LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize );
wxCHECK_MSG( lpDIBh, bitmap, "could not allocate memory for DIB header" ); wxCHECK_MSG( lpDIBh, bitmap, "could not allocate memory for DIB header" );
// Fill in the DIB header // Fill in the DIB header
lpDIBh->bmiHeader.biSize = headersize; lpDIBh->bmiHeader.biSize = headersize;
lpDIBh->bmiHeader.biWidth = (DWORD)width; lpDIBh->bmiHeader.biWidth = (DWORD)width;
lpDIBh->bmiHeader.biHeight = (DWORD)(-height); lpDIBh->bmiHeader.biHeight = (DWORD)(-height);
lpDIBh->bmiHeader.biSizeImage = bytePerLine*height; lpDIBh->bmiHeader.biSizeImage = bytePerLine*height;
// the general formula for biSizeImage: // the general formula for biSizeImage:
// ( ( ( ((DWORD)width*24) +31 ) & ~31 ) >> 3 ) * height; // ( ( ( ((DWORD)width*24) +31 ) & ~31 ) >> 3 ) * height;
lpDIBh->bmiHeader.biPlanes = 1; lpDIBh->bmiHeader.biPlanes = 1;
lpDIBh->bmiHeader.biBitCount = 24; lpDIBh->bmiHeader.biBitCount = 24;
lpDIBh->bmiHeader.biCompression = BI_RGB; lpDIBh->bmiHeader.biCompression = BI_RGB;
lpDIBh->bmiHeader.biClrUsed = 0; lpDIBh->bmiHeader.biClrUsed = 0;
// These seem not really needed for our purpose here. // These seem not really needed for our purpose here.
lpDIBh->bmiHeader.biClrImportant = 0; lpDIBh->bmiHeader.biClrImportant = 0;
lpDIBh->bmiHeader.biXPelsPerMeter = 0; lpDIBh->bmiHeader.biXPelsPerMeter = 0;
lpDIBh->bmiHeader.biYPelsPerMeter = 0; lpDIBh->bmiHeader.biYPelsPerMeter = 0;
// memory for DIB data // memory for DIB data
unsigned char *lpBits; unsigned char *lpBits;
lpBits = (unsigned char *)malloc( lpDIBh->bmiHeader.biSizeImage ); lpBits = (unsigned char *)malloc( lpDIBh->bmiHeader.biSizeImage );
if( !lpBits ) if( !lpBits )
@@ -1409,14 +1409,14 @@ wxBitmap wxImage::ConvertToBitmap() const
return bitmap; return bitmap;
} }
// create and set the device-dependent bitmap // create and set the device-dependent bitmap
HDC hdc = ::GetDC(NULL); HDC hdc = ::GetDC(NULL);
HDC memdc = ::CreateCompatibleDC( hdc ); HDC memdc = ::CreateCompatibleDC( hdc );
HBITMAP hbitmap; HBITMAP hbitmap;
hbitmap = ::CreateCompatibleBitmap( hdc, width, bmpHeight ); hbitmap = ::CreateCompatibleBitmap( hdc, width, bmpHeight );
::SelectObject( memdc, hbitmap); ::SelectObject( memdc, hbitmap);
// copy image data into DIB data and then into DDB (in a loop) // copy image data into DIB data and then into DDB (in a loop)
unsigned char *data = GetData(); unsigned char *data = GetData();
int i, j, n; int i, j, n;
int origin = 0; int origin = 0;
@@ -1449,23 +1449,23 @@ wxBitmap wxImage::ConvertToBitmap() const
::StretchDIBits( memdc, 0, origin, width, height,\ ::StretchDIBits( memdc, 0, origin, width, height,\
0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY); 0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY);
origin += height; origin += height;
// if numDIB = 1, lines below can also be used // if numDIB = 1, lines below can also be used
// hbitmap = CreateDIBitmap( hdc, &(lpDIBh->bmiHeader), CBM_INIT, lpBits, lpDIBh, DIB_RGB_COLORS ); // hbitmap = CreateDIBitmap( hdc, &(lpDIBh->bmiHeader), CBM_INIT, lpBits, lpDIBh, DIB_RGB_COLORS );
// The above line is equivalent to the following two lines. // The above line is equivalent to the following two lines.
// hbitmap = ::CreateCompatibleBitmap( hdc, width, height ); // hbitmap = ::CreateCompatibleBitmap( hdc, width, height );
// ::SetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS); // ::SetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS);
// or the following lines // or the following lines
// hbitmap = ::CreateCompatibleBitmap( hdc, width, height ); // hbitmap = ::CreateCompatibleBitmap( hdc, width, height );
// HDC memdc = ::CreateCompatibleDC( hdc ); // HDC memdc = ::CreateCompatibleDC( hdc );
// ::SelectObject( memdc, hbitmap); // ::SelectObject( memdc, hbitmap);
// ::SetDIBitsToDevice( memdc, 0, 0, width, height, // ::SetDIBitsToDevice( memdc, 0, 0, width, height,
// 0, 0, 0, height, (void *)lpBits, lpDIBh, DIB_RGB_COLORS); // 0, 0, 0, height, (void *)lpBits, lpDIBh, DIB_RGB_COLORS);
// ::SelectObject( memdc, 0 ); // ::SelectObject( memdc, 0 );
// ::DeleteDC( memdc ); // ::DeleteDC( memdc );
} }
bitmap.SetHBITMAP( (WXHBITMAP) hbitmap ); bitmap.SetHBITMAP( (WXHBITMAP) hbitmap );
// similarly, created an mono-bitmap for the possible mask // similarly, created an mono-bitmap for the possible mask
if( HasMask() ) if( HasMask() )
{ {
hbitmap = ::CreateBitmap( (WORD)width, (WORD)bmpHeight, 1, 1, NULL ); hbitmap = ::CreateBitmap( (WORD)width, (WORD)bmpHeight, 1, 1, NULL );
@@ -1493,7 +1493,7 @@ wxBitmap wxImage::ConvertToBitmap() const
ptbits = lpBits; ptbits = lpBits;
for( int j=0; j<height; j++ ) for( int j=0; j<height; j++ )
{ {
for( int i=0; i<width; i++ ) for(i=0; i<width; i++ )
{ {
if( (*(ptdata++)!=r) | (*(ptdata++)!=g) | (*(ptdata++)!=b) ) if( (*(ptdata++)!=r) | (*(ptdata++)!=g) | (*(ptdata++)!=b) )
{ {
@@ -1514,26 +1514,26 @@ wxBitmap wxImage::ConvertToBitmap() const
0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY); 0, 0, width, height, lpBits, lpDIBh, DIB_RGB_COLORS, SRCCOPY);
origin += height; origin += height;
} }
// create a wxMask object // create a wxMask object
wxMask *mask = new wxMask(); wxMask *mask = new wxMask();
mask->SetMaskBitmap( (WXHBITMAP) hbitmap ); mask->SetMaskBitmap( (WXHBITMAP) hbitmap );
bitmap.SetMask( mask ); bitmap.SetMask( mask );
// It will be deleted when the wxBitmap object is deleted (as of 01/1999) // It will be deleted when the wxBitmap object is deleted (as of 01/1999)
/* The following can also be used but is slow to run /* The following can also be used but is slow to run
wxColour colour( GetMaskRed(), GetMaskGreen(), GetMaskBlue()); wxColour colour( GetMaskRed(), GetMaskGreen(), GetMaskBlue());
wxMask *mask = new wxMask( bitmap, colour ); wxMask *mask = new wxMask( bitmap, colour );
bitmap.SetMask( mask ); bitmap.SetMask( mask );
*/ */
} }
// free allocated resources // free allocated resources
::SelectObject( memdc, 0 ); ::SelectObject( memdc, 0 );
::DeleteDC( memdc ); ::DeleteDC( memdc );
::ReleaseDC(NULL, hdc); ::ReleaseDC(NULL, hdc);
free(lpDIBh); free(lpDIBh);
free(lpBits); free(lpBits);
// check the wxBitmap object // check the wxBitmap object
if( bitmap.GetHBITMAP() ) if( bitmap.GetHBITMAP() )
bitmap.SetOk( TRUE ); bitmap.SetOk( TRUE );
else else
@@ -1544,14 +1544,14 @@ wxBitmap wxImage::ConvertToBitmap() const
wxImage::wxImage( const wxBitmap &bitmap ) wxImage::wxImage( const wxBitmap &bitmap )
{ {
// check the bitmap // check the bitmap
if( !bitmap.Ok() ) if( !bitmap.Ok() )
{ {
wxFAIL_MSG( "invalid bitmap" ); wxFAIL_MSG( "invalid bitmap" );
return; return;
} }
// create an wxImage object // create an wxImage object
int width = bitmap.GetWidth(); int width = bitmap.GetWidth();
int height = bitmap.GetHeight(); int height = bitmap.GetHeight();
Create( width, height ); Create( width, height );
@@ -1562,7 +1562,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
return; return;
} }
// calc the number of bytes per scanline and padding in the DIB // calc the number of bytes per scanline and padding in the DIB
int bytePerLine = width*3; int bytePerLine = width*3;
int sizeDWORD = sizeof( DWORD ); int sizeDWORD = sizeof( DWORD );
div_t lineBoundary = div( bytePerLine, sizeDWORD ); div_t lineBoundary = div( bytePerLine, sizeDWORD );
@@ -1573,7 +1573,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
bytePerLine += padding; bytePerLine += padding;
} }
// create a DIB header // create a DIB header
int headersize = sizeof(BITMAPINFOHEADER); int headersize = sizeof(BITMAPINFOHEADER);
LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize ); LPBITMAPINFO lpDIBh = (BITMAPINFO *) malloc( headersize );
if( !lpDIBh ) if( !lpDIBh )
@@ -1582,7 +1582,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
free( data ); free( data );
return; return;
} }
// Fill in the DIB header // Fill in the DIB header
lpDIBh->bmiHeader.biSize = headersize; lpDIBh->bmiHeader.biSize = headersize;
lpDIBh->bmiHeader.biWidth = width; lpDIBh->bmiHeader.biWidth = width;
lpDIBh->bmiHeader.biHeight = -height; lpDIBh->bmiHeader.biHeight = -height;
@@ -1591,11 +1591,11 @@ wxImage::wxImage( const wxBitmap &bitmap )
lpDIBh->bmiHeader.biBitCount = 24; lpDIBh->bmiHeader.biBitCount = 24;
lpDIBh->bmiHeader.biCompression = BI_RGB; lpDIBh->bmiHeader.biCompression = BI_RGB;
lpDIBh->bmiHeader.biClrUsed = 0; lpDIBh->bmiHeader.biClrUsed = 0;
// These seem not really needed for our purpose here. // These seem not really needed for our purpose here.
lpDIBh->bmiHeader.biClrImportant = 0; lpDIBh->bmiHeader.biClrImportant = 0;
lpDIBh->bmiHeader.biXPelsPerMeter = 0; lpDIBh->bmiHeader.biXPelsPerMeter = 0;
lpDIBh->bmiHeader.biYPelsPerMeter = 0; lpDIBh->bmiHeader.biYPelsPerMeter = 0;
// memory for DIB data // memory for DIB data
unsigned char *lpBits; unsigned char *lpBits;
lpBits = (unsigned char *) malloc( lpDIBh->bmiHeader.biSizeImage ); lpBits = (unsigned char *) malloc( lpDIBh->bmiHeader.biSizeImage );
if( !lpBits ) if( !lpBits )
@@ -1606,13 +1606,13 @@ wxImage::wxImage( const wxBitmap &bitmap )
return; return;
} }
// copy data from the device-dependent bitmap to the DIB // copy data from the device-dependent bitmap to the DIB
HDC hdc = ::GetDC(NULL); HDC hdc = ::GetDC(NULL);
HBITMAP hbitmap; HBITMAP hbitmap;
hbitmap = (HBITMAP) bitmap.GetHBITMAP(); hbitmap = (HBITMAP) bitmap.GetHBITMAP();
::GetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS ); ::GetDIBits( hdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS );
// copy DIB data into the wxImage object // copy DIB data into the wxImage object
int i, j; int i, j;
unsigned char *ptdata = data; unsigned char *ptdata = data;
unsigned char *ptbits = lpBits; unsigned char *ptbits = lpBits;
@@ -1628,7 +1628,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
ptbits += padding; ptbits += padding;
} }
// similarly, set data according to the possible mask bitmap // similarly, set data according to the possible mask bitmap
if( bitmap.GetMask() && bitmap.GetMask()->GetMaskBitmap() ) if( bitmap.GetMask() && bitmap.GetMask()->GetMaskBitmap() )
{ {
hbitmap = (HBITMAP) bitmap.GetMask()->GetMaskBitmap(); hbitmap = (HBITMAP) bitmap.GetMask()->GetMaskBitmap();
@@ -1638,7 +1638,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
::SetBkColor( memdc, RGB( 255, 255, 255 ) ); ::SetBkColor( memdc, RGB( 255, 255, 255 ) );
::GetDIBits( memdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS ); ::GetDIBits( memdc, hbitmap, 0, height, lpBits, lpDIBh, DIB_RGB_COLORS );
::DeleteDC( memdc ); ::DeleteDC( memdc );
// background color set to RGB(16,16,16) in consistent with wxGTK // background color set to RGB(16,16,16) in consistent with wxGTK
unsigned char r=16, g=16, b=16; unsigned char r=16, g=16, b=16;
ptdata = data; ptdata = data;
ptbits = lpBits; ptbits = lpBits;
@@ -1665,7 +1665,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
{ {
SetMask( FALSE ); SetMask( FALSE );
} }
// free allocated resources // free allocated resources
::ReleaseDC(NULL, hdc); ::ReleaseDC(NULL, hdc);
free(lpDIBh); free(lpDIBh);
free(lpBits); free(lpBits);
@@ -1975,7 +1975,7 @@ wxBitmap wxImage::ConvertToBitmap() const
bitmap.Create( width, height, bpp ); bitmap.Create( width, height, bpp );
/* /*
// Create mask // Create mask
GdkImage *mask_image = (GdkImage*) NULL; GdkImage *mask_image = (GdkImage*) NULL;
@@ -1991,7 +1991,7 @@ wxBitmap wxImage::ConvertToBitmap() const
bitmap.SetMask( mask ); bitmap.SetMask( mask );
} }
*/ */
// Retrieve depth info // Retrieve depth info
@@ -2031,11 +2031,11 @@ wxBitmap wxImage::ConvertToBitmap() const
else if ((vi->green_mask > vi->blue_mask) && (vi->blue_mask > vi->red_mask)) b_o = GBR; else if ((vi->green_mask > vi->blue_mask) && (vi->blue_mask > vi->red_mask)) b_o = GBR;
} }
/* /*
int r_mask = GetMaskRed(); int r_mask = GetMaskRed();
int g_mask = GetMaskGreen(); int g_mask = GetMaskGreen();
int b_mask = GetMaskBlue(); int b_mask = GetMaskBlue();
*/ */
XColor colors[256]; XColor colors[256];
if (bpp == 8) if (bpp == 8)
@@ -2060,7 +2060,7 @@ wxBitmap wxImage::ConvertToBitmap() const
int b = data[index]; int b = data[index];
index++; index++;
/* /*
if (HasMask()) if (HasMask())
{ {
if ((r == r_mask) && (b == b_mask) && (g == g_mask)) if ((r == r_mask) && (b == b_mask) && (g == g_mask))
@@ -2068,14 +2068,14 @@ wxBitmap wxImage::ConvertToBitmap() const
else else
gdk_image_put_pixel( mask_image, x, y, 0 ); gdk_image_put_pixel( mask_image, x, y, 0 );
} }
*/ */
switch (bpp) switch (bpp)
{ {
case 8: case 8:
{ {
int pixel = -1; int pixel = -1;
/* /*
if (wxTheApp->m_colorCube) if (wxTheApp->m_colorCube)
{ {
pixel = wxTheApp->m_colorCube pixel = wxTheApp->m_colorCube
@@ -2083,7 +2083,7 @@ wxBitmap wxImage::ConvertToBitmap() const
} }
else else
{ {
*/ */
int max = 3 * (65536); int max = 3 * (65536);
for (int i = 0; i < 256; i++) for (int i = 0; i < 256; i++)
{ {
@@ -2093,9 +2093,9 @@ wxBitmap wxImage::ConvertToBitmap() const
int sum = abs (rdiff) + abs (gdiff) + abs (bdiff); int sum = abs (rdiff) + abs (gdiff) + abs (bdiff);
if (sum < max) { pixel = i; max = sum; } if (sum < max) { pixel = i; max = sum; }
} }
/* /*
} }
*/ */
XPutPixel( data_image, x, y, pixel ); XPutPixel( data_image, x, y, pixel );
break; break;
} }
@@ -2141,7 +2141,7 @@ wxBitmap wxImage::ConvertToBitmap() const
XDestroyImage( data_image ); XDestroyImage( data_image );
XFreeGC( dpy, gc ); XFreeGC( dpy, gc );
/* /*
// Blit mask // Blit mask
if (HasMask()) if (HasMask())
@@ -2153,7 +2153,7 @@ wxBitmap wxImage::ConvertToBitmap() const
gdk_image_destroy( mask_image ); gdk_image_destroy( mask_image );
gdk_gc_unref( mask_gc ); gdk_gc_unref( mask_gc );
} }
*/ */
return bitmap; return bitmap;
} }
@@ -2184,7 +2184,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
return; return;
} }
/* /*
GdkImage *gdk_image_mask = (GdkImage*) NULL; GdkImage *gdk_image_mask = (GdkImage*) NULL;
if (bitmap.GetMask()) if (bitmap.GetMask())
{ {
@@ -2194,7 +2194,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
SetMaskColour( 16, 16, 16 ); // anything unlikely and dividable SetMaskColour( 16, 16, 16 ); // anything unlikely and dividable
} }
*/ */
// Retrieve depth info // Retrieve depth info
@@ -2255,7 +2255,7 @@ wxImage::wxImage( const wxBitmap &bitmap )
data[pos+2] = pixel & 0xff; data[pos+2] = pixel & 0xff;
} }
/* /*
if (gdk_image_mask) if (gdk_image_mask)
{ {
int mask_pixel = gdk_image_get_pixel( gdk_image_mask, i, j ); int mask_pixel = gdk_image_get_pixel( gdk_image_mask, i, j );
@@ -2266,15 +2266,15 @@ wxImage::wxImage( const wxBitmap &bitmap )
data[pos+2] = 16; data[pos+2] = 16;
} }
} }
*/ */
pos += 3; pos += 3;
} }
} }
XDestroyImage( ximage ); XDestroyImage( ximage );
/* /*
if (gdk_image_mask) gdk_image_destroy( gdk_image_mask ); if (gdk_image_mask) gdk_image_destroy( gdk_image_mask );
*/ */
} }
#endif #endif

View File

@@ -110,6 +110,10 @@ extern const char WXDLLEXPORT *g_szNul = &g_strEmpty.dummy;
#warning "Using sprintf() because no snprintf()-like function defined" #warning "Using sprintf() because no snprintf()-like function defined"
#elif defined(__MWERKS__) #elif defined(__MWERKS__)
#warning "Using sprintf() because no snprintf()-like function defined" #warning "Using sprintf() because no snprintf()-like function defined"
#elif defined(__WATCOMC__)
// No warning
#elif defined(__BORLANDC__)
// No warning
#elif defined(__SUNCC__) #elif defined(__SUNCC__)
// nothing -- I don't know about "#warning" for Sun's CC // nothing -- I don't know about "#warning" for Sun's CC
#else #else

View File

@@ -50,10 +50,10 @@ WXLIB= $(WXLIBDIR)\wx32.lib
!if "$(WXBUILDDLL)" == "1" !if "$(WXBUILDDLL)" == "1"
DLL_FLAGS= $(DLL_FLAGS) -D_RTLDLL DLL_FLAGS= $(DLL_FLAGS) -D_RTLDLL
LINK_FLAGS= /Tpd /ap /c LINK_FLAGS= /Tpd /ap /c $(EXTRALINKFLAGS)
!endif !endif
CPPFLAGS=$(DLL_FLAGS) @$(CFG) CPPFLAGS=$(DLL_FLAGS) $(EXTRACPPFLAGS) @$(CFG)
DUMMY=dummy DUMMY=dummy

View File

@@ -11,18 +11,16 @@ FINAL=0
!endif !endif
!if "$(FINAL)" == "0" !if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib $(EXTRALINKFLAGS)
OPT = -Od OPT = -Od
DEBUG_FLAGS= -v -D__WXDEBUG__ DEBUG_FLAGS= -v -D__WXDEBUG__
!else !else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib $(EXTRALINKFLAGS)
OPT = -O2 OPT = -O2
DEBUG_FLAGS = DEBUG_FLAGS =
!endif !endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) $(EXTRACPPFLAGS) @$(CFG)
WXLIB= $(WXLIBDIR)\wx.lib WXLIB= $(WXLIBDIR)\wx.lib
SRCSUFF = cpp SRCSUFF = cpp

View File

@@ -121,11 +121,11 @@ WXSRC=$(WXDIR)/src/msw
WXINC=$(WXDIR)/include WXINC=$(WXDIR)/include
WXBASESRC=$(WXDIR)/src/common WXBASESRC=$(WXDIR)/src/common
WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF) WXLIB=$(WXDIR)/lib/$(LIBPREFIX)wx.$(LIBSUFF)
INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC)$(COMPPATHS) INC = -I$(WXINC) -I$(WXDIR)/src/png -I$(WXDIR)/include/wx/msw/gnuwin32 -I$(WXDIR)/src/zlib $(EXTRAINC) $(COMPPATHS)
RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include" RCLFLAGS=-cpp "cpp -lang-c++ -DWIN32 -D_WIN32 -DRCL_INVOKED -I$(WXWIN)\include"
#LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS) #LIBS = -lctl3d32 $(WXLIB) $(WINLIBS) $(COMPLIBS)
LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) LIBS = $(WXLIB) $(WINLIBS) $(COMPLIBS) $(EXTRALIBS)
WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION) WINFLAGS=-D_X86_=1 -DWIN32 -D_WIN32 $(WINVERSION)
@@ -135,13 +135,13 @@ XLIB=$(LIBS)
LDLIBS = $(LIBS) LDLIBS = $(LIBS)
# Directory for object files (don't change) # Directory for object files (don't change)
OBJDIR = objects$(GUISUFFIX) # OBJDIR = objects$(GUISUFFIX)
# You shouldn't need to change these... # You shouldn't need to change these...
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACPPFLAGS)
CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) CFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) $(DEBUGFLAGS) $(WARN) $(OPT) $(EXTRACFLAGS)
WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows WINDOWSLDFLAGS=-Wl,--subsystem,windows -mwindows
LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib $(EXTRALDFLAGS)
.SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c .SUFFIXES: .rc .$(RESSUFF) .$(RSCSUFF) .cpp .c
@@ -150,11 +150,11 @@ LDFLAGS = $(WINDOWSLDFLAGS) -L$(WXDIR)/lib
# CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \ # CPLUS_INCLUDE_PATH=/usr/H-i386-cygwin32/i386-cygwin32/include:/usr/H-i386-cygwin32/lib/gcc-lib/i386-cygwin32/cygnus-2.7.2-961023/include:$(WXDIR)/include/common:$(WXDIR)/include/msw:$(WXDIR)/contrib/fafa:$(WXDIR)/contrib/itsybits; \
# export CPLUS_INCLUDE_PATH RCINCLUDE; \ # export CPLUS_INCLUDE_PATH RCINCLUDE; \
.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc #.rc.$(RESSUFF): $< $(WXDIR)/include/msw/wx.rc
$(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS) # $(RC) $(RESFLAGS1) $< $(RESFLAGS2) $*.$(RESSUFF) $(RCLFLAGS)
.$(RESSUFF).$(RSCSUFF): $< #.$(RESSUFF).$(RSCSUFF): $<
$(CVTRES) $< $*.$(RSCSUFF) # $(CVTRES) $< $*.$(RSCSUFF)
.$(SRCSUFF).$(OBJSUFF): .$(SRCSUFF).$(OBJSUFF):
$(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF) $(CC) -c $(CPPFLAGS) -o $@ $*.$(SRCSUFF)

37
src/makelib.b32 Normal file
View File

@@ -0,0 +1,37 @@
#
# File: makelib.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Include file for libraries. Set LIBTARGET and OBJECTS
# before including this file.
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
$(LIBTARGET): $(OBJECTS)
erase $(LIBTARGET)
tlib $(LIBTARGET) /P512 @&&!
-+$(OBJECTS:.obj =.obj -+)
!
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) -c {$< }
.c.obj:
bcc32 $(CPPFLAGS) -P- -c {$< }
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
-erase $(LIBTARGET)

37
src/makelib.bcc Normal file
View File

@@ -0,0 +1,37 @@
#
# File: makelib.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Include file for libraries. Set LIBTARGET and OBJECTS
# before including this file.
# WXWIN and BCCDIR are set by parent make
WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env
$(LIBTARGET): $(OBJECTS)
erase $(LIBTARGET)
tlib $(LIBTARGET) /P1024 @&&!
-+$(OBJECTS:.obj =.obj -+)
!
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) -c {$< }
.c.obj:
bcc $(CPPFLAGS) -P- -c {$< }
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws
-erase $(LIBTARGET)

23
src/makelib.g95 Normal file
View File

@@ -0,0 +1,23 @@
#
# File: makelib.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Include file for Cygwin/Mingw32 libraries
WXDIR = $(WXWIN)
# All common UNIX compiler flags and options are now in
# this central makefile.
include $(WXDIR)/src/makeg95.env
all: $(LIBTARGET) $(EXTRATARGETS)
$(LIBTARGET): $(OBJECTS)
ar $(AROPTIONS) $@ $(OBJECTS)
$(RANLIB) $@
clean:
rm -f $(OBJECTS) $(LIBTARGET) core *.rsc *.res

26
src/makelib.wat Normal file
View File

@@ -0,0 +1,26 @@
WXDIR = $(%WXWIN)
!include $(WXDIR)\src\makewat.env
WXLIB = $(WXDIR)\lib
LNK = tmp.lbc
all: $(LIBTARGET)
$(LIBTARGET) : $(OBJECTS)
%create tmp.lbc
@for %i in ( $(OBJECTS) ) do @%append tmp.lbc +%i
wlib /b /c /n /p=512 $^@ @tmp.lbc
clean: .SYMBOLIC
-erase *.obj
-erase *.bak
-erase *.err
-erase *.pch
-erase *.lib
-erase *.lbc
-erase *.res
-erase *.exe
-erase *.lbc
-erase $(LIBTARGET)

View File

@@ -13,18 +13,21 @@
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env !include $(WXDIR)\src\makeb32.env
LIBS=$(WXLIB) cw32mt import32 ole2w32 LIBS=$(WXLIB) $(EXTRALIBS) cw32mt import32 ole2w32
!if "$(FINAL)" == "0" !if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib $(EXTRALINKFLAGS)
OPT = -Od OPT = -Od
DEBUG_FLAGS= -v DEBUG_FLAGS= -v
!else !else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib $(EXTRALINKFLAGS)
OPT = -Od OPT = -Od
DEBUG_FLAGS = DEBUG_FLAGS =
!endif !endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CPPFLAGS=$(DEBUG_FLAGS) $(EXTRACPPFLAGS) $(OPT) @$(CFG)
all: $(TARGET).exe $(EXTRATARGETS)
$(TARGET).exe: $(OBJECTS) $(TARGET).res $(TARGET).exe: $(OBJECTS) $(TARGET).res
tlink32 $(LINKFLAGS) @&&! tlink32 $(LINKFLAGS) @&&!

View File

@@ -4,9 +4,9 @@
!include $(WXDIR)\src\makebcc.env !include $(WXDIR)\src\makebcc.env
WXLIB = $(WXDIR)\lib\wx.lib WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) mathwl cwl import ole2w16 LIBS=$(WXLIB) $(EXTRALIBS) mathwl cwl import ole2w16
all: $(TARGET).exe all: $(TARGET).exe $(EXTRATARGETS)
$(TARGET).exe: $(WXLIB) $(OBJECTS) $(TARGET).def $(TARGET).res $(TARGET).exe: $(WXLIB) $(OBJECTS) $(TARGET).def $(TARGET).res
tlink $(LINKFLAGS) @&&! tlink $(LINKFLAGS) @&&!
@@ -21,6 +21,9 @@ $(TARGET).def
.$(SRCSUFF).obj: .$(SRCSUFF).obj:
bcc $(CPPFLAGS) -c {$< } bcc $(CPPFLAGS) -c {$< }
.c.obj:
bcc $(CPPFLAGS) -P- -c {$< }
$(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc $(TARGET).res : $(TARGET).rc $(WXDIR)\include\wx\msw\wx.rc
brc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET) brc -r /i$(BCCDIR)\include /i$(WXDIR)\include $(TARGET)

23
src/makeprog.g95 Normal file
View File

@@ -0,0 +1,23 @@
#
# File: makeprog.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Include file for Cygwin/Mingw32 samples
WXDIR = $(WXWIN)
include $(WXDIR)/src/makeg95.env
all: $(TARGET)$(GUISUFFIX)$(EXESUFF) $(TARGET)_resources.$(OBJSUFF) $(EXTRATARGETS)
$(TARGET)$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(TARGET)_resources.$(OBJSUFF) $(WXLIB)
$(CC) $(LDFLAGS) -o $(TARGET)$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(TARGET)_resources.$(OBJSUFF) $(LDLIBS)
$(TARGET)_resources.o: $(TARGET).rc
$(RESCOMP) $(RCINPUTSWITCH) $(TARGET).rc $(RCOUTPUTSWITCH) $(TARGET)_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) $(TARGET)_resources.o $(TARGET).exe core *.rsc *.res

View File

@@ -5,7 +5,7 @@ WXDIR = $(%WXWIN)
WXLIB = $(WXDIR)\lib WXLIB = $(WXDIR)\lib
LNK = $(PROGRAM).lnk LNK = $(PROGRAM).lnk
all: $(PROGRAM).exe all: $(PROGRAM).exe $(EXTRATARGETS)
$(PROGRAM).exe : $(OBJECTS) $(PROGRAM).res $(LNK) $(WXLIB)\wx.lib $(PROGRAM).exe : $(OBJECTS) $(PROGRAM).res $(LNK) $(WXLIB)\wx.lib
wlink @$(LNK) wlink @$(LNK)
@@ -20,7 +20,7 @@ $(LNK) : makefile.wat
@%append $(LNK) system $(LINKOPTION) @%append $(LNK) system $(LINKOPTION)
@%append $(LNK) $(STACK) @%append $(LNK) $(STACK)
@%append $(LNK) name $(PROGRAM).exe @%append $(LNK) name $(PROGRAM).exe
@%append $(LNK) file $(WXLIB)\wx.lib @for %i in ($(LIBS)) do @%append $(LNK) file %i
@for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i @for %i in ($(EXTRALIBS)) do @%append $(LNK) file %i
@for %i in ($(OBJECTS)) do @%append $(LNK) file %i @for %i in ($(OBJECTS)) do @%append $(LNK) file %i
# @%append $(LNK) $(MINDATA) # @%append $(LNK) $(MINDATA)

View File

@@ -51,7 +51,7 @@ WATLIBDIR = $(WATCOMDIR)\lib386\nt
MINDATA = MINDATA =
MAXDATA = MAXDATA =
STACK = option stack=64k STACK = option stack=64k
EXTRALIBS = $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib & LIBS = $(WXDIR)\lib\wx.lib $(WXDIR)\lib\zlib.lib $(WXDIR)\lib\png.lib $(WXDIR)\lib\xpm.lib &
$(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib & $(WATLIBDIR)\comctl32.lib $(WATLIBDIR)\comdlg32.lib &
$(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib & $(WATLIBDIR)\ole32.lib $(WATLIBDIR)\oleaut32.lib &
$(WATLIBDIR)\uuid.lib # $(WATLIBDIR)\odbc32.lib $(WATLIBDIR)\uuid.lib # $(WATLIBDIR)\odbc32.lib

View File

@@ -47,6 +47,7 @@
#include "wx/metafile.h" #include "wx/metafile.h"
#endif #endif
#include "wx/log.h"
#include "wx/clipbrd.h" #include "wx/clipbrd.h"
#include <windows.h> #include <windows.h>

View File

@@ -29,6 +29,7 @@
#endif #endif
#include "wx/msw/private.h" #include "wx/msw/private.h"
#include "wx/log.h"
#if wxUSE_COMMON_DIALOGS #if wxUSE_COMMON_DIALOGS
#include <commdlg.h> #include <commdlg.h>

View File

@@ -51,11 +51,6 @@ XPMDIR=../xpm
OLEDIR=ole OLEDIR=ole
MSWDIR=. MSWDIR=.
GENERICOBJDIR=../generic/$(OBJDIR)
COMMOBJDIR=../common/$(OBJDIR)
OLEOBJDIR=ole/$(OBJDIR)
MSWDIR=$(OBJDIR)
DOCDIR = $(WXDIR)\docs DOCDIR = $(WXDIR)\docs
GENERICOBJS= \ GENERICOBJS= \
@@ -95,6 +90,7 @@ COMMONOBJS = \
$(COMMDIR)/helpbase.$(OBJSUFF) \ $(COMMDIR)/helpbase.$(OBJSUFF) \
$(COMMDIR)/image.$(OBJSUFF) \ $(COMMDIR)/image.$(OBJSUFF) \
$(COMMDIR)/intl.$(OBJSUFF) \ $(COMMDIR)/intl.$(OBJSUFF) \
$(COMMDIR)/ipcbase.$(OBJSUFF) \
$(COMMDIR)/layout.$(OBJSUFF) \ $(COMMDIR)/layout.$(OBJSUFF) \
$(COMMDIR)/log.$(OBJSUFF) \ $(COMMDIR)/log.$(OBJSUFF) \
$(COMMDIR)/memory.$(OBJSUFF) \ $(COMMDIR)/memory.$(OBJSUFF) \
@@ -263,15 +259,6 @@ $(WXLIB): $(OBJECTS) $(EXTRAOBJS)
ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS) ar $(AROPTIONS) $@ $(EXTRAOBJS) $(OBJECTS)
$(RANLIB) $@ $(RANLIB) $@
#$(MSWOBJDIR):
# mkdir $(OBJDIR)
#$(COMMOBJDIR):
# mkdir $(COMMDIR)/$(OBJDIR)
#$(GENERICOBJDIR):
# mkdir $(GENDIR)/$(OBJDIR)
$(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h $(OBJECTS): $(WXINC)/wx/defs.h $(WXINC)/wx/object.h $(WXINC)/wx/setup.h
$(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c $(COMMDIR)/y_tab.$(OBJSUFF): $(COMMDIR)/y_tab.c $(COMMDIR)/lex_yy.c

View File

@@ -92,6 +92,7 @@ COMMONOBJS = \
$(COMMDIR)/helpbase.$(OBJSUFF) \ $(COMMDIR)/helpbase.$(OBJSUFF) \
$(COMMDIR)/image.$(OBJSUFF) \ $(COMMDIR)/image.$(OBJSUFF) \
$(COMMDIR)/intl.$(OBJSUFF) \ $(COMMDIR)/intl.$(OBJSUFF) \
$(COMMDIR)/ipcbase.$(OBJSUFF) \
$(COMMDIR)/layout.$(OBJSUFF) \ $(COMMDIR)/layout.$(OBJSUFF) \
$(COMMDIR)/log.$(OBJSUFF) \ $(COMMDIR)/log.$(OBJSUFF) \
$(COMMDIR)/memory.$(OBJSUFF) \ $(COMMDIR)/memory.$(OBJSUFF) \

View File

@@ -50,6 +50,8 @@
#include "wx/menuitem.h" #include "wx/menuitem.h"
#include "wx/log.h" #include "wx/log.h"
#include "wx/tooltip.h" #include "wx/tooltip.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/msw/private.h" #include "wx/msw/private.h"
@@ -1223,10 +1225,19 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
} }
case WM_KEYDOWN: case WM_KEYDOWN:
MSWOnKeyDown((WORD) wParam, lParam); {
// we consider these message "not interesting" // If this has been processed by an event handler,
// return 0 now (we've handled it).
if (MSWOnKeyDown((WORD) wParam, lParam))
{
return 0;
}
// we consider these message "not interesting" to OnChar
if ( wParam == VK_SHIFT || wParam == VK_CONTROL ) if ( wParam == VK_SHIFT || wParam == VK_CONTROL )
{
return Default(); return Default();
}
// Avoid duplicate messages to OnChar for these special keys // Avoid duplicate messages to OnChar for these special keys
switch ( wParam ) switch ( wParam )
@@ -1240,27 +1251,36 @@ long wxWindow::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam)
case VK_RIGHT: case VK_RIGHT:
case VK_DOWN: case VK_DOWN:
case VK_UP: case VK_UP:
if ( ::GetKeyState(VK_CONTROL) & 0x100 ) /*
MSWOnChar((WORD)wParam, lParam); // if ( ::GetKeyState(VK_CONTROL) & 0x100 ) // Don't understand purpose of this test
if (!MSWOnChar((WORD)wParam, lParam))
return Default();
break; break;
*/
default: default:
MSWOnChar((WORD)wParam, lParam); if (!MSWOnChar((WORD)wParam, lParam))
{
return Default();
}
/*
if ( ::GetKeyState(VK_CONTROL) & 0x100 ) if ( ::GetKeyState(VK_CONTROL) & 0x100 )
return Default(); return Default();
*/
break; break;
} }
break; break;
}
case WM_KEYUP: case WM_KEYUP:
{ {
MSWOnKeyUp((WORD) wParam, lParam); if (!MSWOnKeyUp((WORD) wParam, lParam))
return Default();
break; break;
} }
case WM_CHAR: // Always an ASCII character case WM_CHAR: // Always an ASCII character
{ {
MSWOnChar((WORD)wParam, lParam, TRUE); if (!MSWOnChar((WORD)wParam, lParam, TRUE))
return Default();
break; break;
} }
@@ -2456,7 +2476,7 @@ void wxWindow::MSWOnMouseLeave(int x, int y, WXUINT flags)
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }
void wxWindow::MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII) bool wxWindow::MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII)
{ {
int id; int id;
bool tempControlDown = FALSE; bool tempControlDown = FALSE;
@@ -2518,12 +2538,16 @@ void wxWindow::MSWOnChar(WXWORD wParam, WXLPARAM lParam, bool isASCII)
event.m_x = pt.x; event.m_y = pt.y; event.m_x = pt.x; event.m_y = pt.y;
if (!GetEventHandler()->ProcessEvent(event)) if (GetEventHandler()->ProcessEvent(event))
Default(); return TRUE;
else
return FALSE;
} }
else
return FALSE;
} }
void wxWindow::MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII) bool wxWindow::MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII)
{ {
int id; int id;
@@ -2552,12 +2576,19 @@ void wxWindow::MSWOnKeyDown(WXWORD wParam, WXLPARAM lParam, bool isASCII)
event.m_x = pt.x; event.m_y = pt.y; event.m_x = pt.x; event.m_y = pt.y;
if (!GetEventHandler()->ProcessEvent(event)) if (GetEventHandler()->ProcessEvent(event))
Default(); {
return TRUE;
}
else return FALSE;
}
else
{
return FALSE;
} }
} }
void wxWindow::MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII) bool wxWindow::MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII)
{ {
int id; int id;
@@ -2586,9 +2617,13 @@ void wxWindow::MSWOnKeyUp(WXWORD wParam, WXLPARAM lParam, bool isASCII)
event.m_x = pt.x; event.m_y = pt.y; event.m_x = pt.x; event.m_y = pt.y;
if (!GetEventHandler()->ProcessEvent(event)) if (GetEventHandler()->ProcessEvent(event))
Default(); return TRUE;
else
return FALSE;
} }
else
return FALSE;
} }
void wxWindow::MSWOnJoyDown(int joystick, int x, int y, WXUINT flags) void wxWindow::MSWOnJoyDown(int joystick, int x, int y, WXUINT flags)
@@ -3666,7 +3701,7 @@ void wxWindow::OnChar(wxKeyEvent& event)
if ( id == -1 ) if ( id == -1 )
id= m_lastWParam; id= m_lastWParam;
if ( !event.ControlDown() ) if ( !event.ControlDown() ) // Why this test?
(void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam); (void) MSWDefWindowProc(m_lastMsg, (WPARAM) id, m_lastLParam);
} }

View File

@@ -14,7 +14,8 @@
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
TARGET=dialoged TARGET=dialoged
OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj edtree.obj edlist.obj symbtable.obj winstyle.obj OBJECTS = dialoged.obj reseditr.obj dlghndlr.obj reswrite.obj winprop.obj\
edtree.obj edlist.obj symbtabl.obj winstyle.obj
!include $(WXDIR)\src\makeb32.env !include $(WXDIR)\src\makeprog.b32

View File

@@ -1,61 +1,17 @@
# #
# File: makefile.g95 # File: makefile.g95
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1999
# Updated: # Updated:
# Copyright: (c) Julian Smart, 1999
# #
# "%W% %G%" # Makefile for wxWindows Dialog Editor (Cygwin/Mingw32).
#
# Makefile for Dialog Editor (GNU-WIN32)
WXDIR = ../../.. WXDIR = ../../..
# All common UNIX compiler flags and options are now in TARGET=dialoged
# this central makefile. OBJECTS = $(TARGET).o reseditr.o dlghndlr.o reswrite.o\
include $(WXDIR)/src/makeg95.env winprop.o edtree.o edlist.o symbtabl.o winstyle.o
OBJECTS = $(OBJDIR)/dialoged.$(OBJSUFF) $(OBJDIR)/reseditr.$(OBJSUFF)\ include $(WXDIR)/src/makeprog.g95
$(OBJDIR)/dlghndlr.$(OBJSUFF) $(OBJDIR)/reswrite.$(OBJSUFF) $(OBJDIR)/winprop.$(OBJSUFF)\
$(OBJDIR)/edlist.$(OBJSUFF) $(OBJDIR)/edtree.$(OBJSUFF) $(OBJDIR)/winstyle.$(OBJSUFF) $(OBJDIR)/symbtabl.$(OBJSUFF)\
$(OBJDIR)/dialoged_resources.$(OBJSUFF)
all: $(OBJDIR) dialoged$(GUISUFFIX)$(EXESUFF)
$(OBJDIR):
mkdir $(OBJDIR)
dialoged$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o dialoged$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(XVIEW_LINK) $(LDLIBS)
$(OBJDIR)/dialoged.$(OBJSUFF): dialoged.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ dialoged.$(SRCSUFF)
$(OBJDIR)/winprop.$(OBJSUFF): winprop.h reseditr.h winprop.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ winprop.$(SRCSUFF)
$(OBJDIR)/reswrite.$(OBJSUFF): winprop.h reseditr.h reswrite.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ reswrite.$(SRCSUFF)
$(OBJDIR)/reseditr.$(OBJSUFF): winprop.h reseditr.h reseditr.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ reseditr.$(SRCSUFF)
$(OBJDIR)/dlghndlr.$(OBJSUFF): winprop.h reseditr.h dlghndlr.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ dlghndlr.$(SRCSUFF)
$(OBJDIR)/edlist.$(OBJSUFF): winprop.h edlist.h edlist.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ edlist.$(SRCSUFF)
$(OBJDIR)/edtree.$(OBJSUFF): winprop.h edtree.h edtree.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ edtree.$(SRCSUFF)
$(OBJDIR)/winstyle.$(OBJSUFF): winstyle.h winstyle.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ winstyle.$(SRCSUFF)
$(OBJDIR)/symbtabl.$(OBJSUFF): symbtabl.h symbtabl.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ symbtabl.$(SRCSUFF)
$(OBJDIR)/dialoged_resources.o: dialoged.rc
$(RESCOMP) -i dialoged.rc -o $(OBJDIR)/dialoged_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) dialoged$(GUISUFFIX).exe core *.rsc *.res

View File

@@ -0,0 +1,18 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=cube
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,21 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=cube
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.bcc

View File

@@ -1,37 +1,18 @@
# #
# File: makefile.unx # File: makefile.g95
# Author: Julian Smart # Author: Julian Smart
# Created: 1993 # Created: 1999
# Updated: # Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh # Copyright: (c) Julian Smart, 1999
# #
# "%W% %G%" # Makefile for wxWindows sample (Cygwin/Mingw32).
#
# Makefile for cube example (UNIX).
WXDIR = ../.. WXDIR = ../../../..
# All common UNIX compiler flags and options are now in TARGET=cube
# this central makefile. EXTRACPPFLAGS=-I../../win
include $(WXDIR)/src/makeg95.env EXTRALIBS=-lglcanvas -lopengl32 -lglu32
OBJECTS = $(TARGET).o
OBJECTS = $(OBJDIR)/cube.$(OBJSUFF) include $(WXDIR)/src/makeprog.g95
all: $(OBJDIR) cube$(GUISUFFIX)$(EXESUFF)
wx:
$(OBJDIR):
mkdir $(OBJDIR)
cube$(GUISUFFIX)$(EXESUFF): $(OBJDIR)/cube.$(OBJSUFF) cube.res $(WXLIB)
$(CC) $(LDFLAGS) -o cube$(GUISUFFIX)$(EXESUFF) $(OBJDIR)/cube.$(OBJSUFF) $(LDLIBS)
$(RSRC) cube.$(RESSUFF) cube.exe
$(OBJDIR)/cube.$(OBJSUFF): cube.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ cube.$(SRCSUFF)
cube.res: cube.rc
clean:
rm -f $(OBJECTS) cube$(GUISUFFIX).exe core *.rsc *.res

View File

@@ -0,0 +1,17 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = cube
OBJECTS = $(PROGRAM).obj
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
!include $(WXDIR)\src\makeprog.wat

View File

@@ -0,0 +1,22 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=isosurf
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj
EXTRATARGETS=isosurf.dat
!include $(WXDIR)\src\makeprog.b32
isosurf.dat: isosurf.dat.gz
gzip -c -d isosurf.dat.gz > isosurf.dat

View File

@@ -0,0 +1,25 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=isosurf
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj
EXTRATARGETS=isosurf.dat
!include $(WXDIR)\src\makeprog.bcc
isosurf.dat: isosurf.dat.gz
gzip -c -d isosurf.dat.gz > isosurf.dat

View File

@@ -0,0 +1,20 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=isosurf
EXTRACPPFLAGS=-I../../win
EXTRALIBS=-lglcanvas -lopengl32 -lglu32
OBJECTS = $(TARGET).o
include $(WXDIR)/src/makeprog.g95
isosurf.dat: isosurf.dat.gz
gzip -c -d isosurf.dat.gz > isosurf.dat

View File

@@ -0,0 +1,20 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = isosurf
OBJECTS = $(PROGRAM).obj
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
EXTRATARGETS=isosurf.dat
!include $(WXDIR)\src\makeprog.wat
isosurf.dat: isosurf.dat.gz
gzip -c -d isosurf.dat.gz > isosurf.dat

View File

@@ -0,0 +1,18 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=penguin
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj lw.obj trackball.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,21 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=cube
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
OBJECTS = $(TARGET).obj
!include $(WXDIR)\src\makeprog.bcc

View File

@@ -0,0 +1,18 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=penguin
EXTRACPPFLAGS=-I../../win
EXTRALIBS=-lglcanvas -lopengl32 -lglu32
OBJECTS = $(TARGET).o lw.o trackball.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -0,0 +1,17 @@
#
# Makefile for WATCOM
#
# Created by Julian Smart, January 1999
#
#
WXDIR = $(%WXWIN)
PROGRAM = cube
OBJECTS = $(PROGRAM).obj
EXTRALIBS=$(WXDIR)\lib\glcanvas.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\glcanvas\win
!include $(WXDIR)\src\makeprog.wat

View File

@@ -0,0 +1,17 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds wxGLCanvas library for 32-bit BC++
WXDIR = $(WXWIN)
LIBTARGET=$(WXDIR)\lib\glcanvas.lib
OBJECTS = glcanvas.obj
!include $(WXDIR)\src\makelib.b32

View File

@@ -0,0 +1,19 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=minimal
OBJECTS=$(TARGET).obj
!include $(WXDIR)\src\makeprog.bcc

View File

@@ -0,0 +1,16 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows wxGLCanvas library Cygwin/Mingw32).
WXDIR = ../../..
LIBTARGET=$(WXDIR)/lib/libglcanvas.a
OBJECTS = glcanvas.o
include $(WXDIR)/src/makelib.g95

View File

@@ -0,0 +1,16 @@
#!/binb/wmake.exe
#
# File: makefile.wat
# Author: Julian Smart
# Created: 1999
#
# Makefile : Builds wxGLCanvas library for Watcom C++, WIN32
WXDIR = $(%WXWIN)
OBJECTS=glcanvas.obj
LIBTARGET=$(WXDIR)\lib\glcanvas.lib
!include $(WXDIR)\src\makelib.wat

View File

@@ -0,0 +1 @@
include ../../../../install/unix/setup/general/makedirs

View File

@@ -0,0 +1,29 @@
# WXXT base directory
WXBASEDIR=@WXBASEDIR@
# set the OS type for compilation
OS=@OS@
# compile a binary only
RULE=bin
# define exexutable name
BIN_TARGET=ogledit
# define library sources
BIN_SRC=\
ogledit.cpp\
doc.cpp\
view.cpp\
palette.cpp
#define library objects
BIN_OBJ=\
$(BIN_CPP_SRC:.cpp=.o)
# additional things needed to link
BIN_LINK=-lwx_ogl_gtk
# additional things needed to compile
ADD_COMPILE=-I../../src
# include the definitions now
include ../../../../../template.mak

View File

@@ -1,88 +1,18 @@
# #
# File: makefile.bcc # File: makefile.b32
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1999
# Updated: # Updated:
# Copyright: (c) 1996 # Copyright:
# #
# "%W% %G%" # Makefile : Builds sample for 32-bit BC++
#
# Makefile : Builds OGL example for BC++, 32-bit.
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
!ifndef FINAL
FINAL=0
!endif
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
THISDIR = $(WXDIR)\utils\ogl\samples\ogledit TARGET=ogledit
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
OGLDIR = ..\.. # $(WXDIR)\utils\ogl # Command line too long! !include $(WXDIR)\src\makeprog.b32
OGLINC = $(OGLDIR)\src
OGLLIB = $(WXDIR)\lib\ogl.lib
WXLIB = $(WXDIR)\lib\wx32.lib
LIBS=$(WXLIB) $(OGLLIB) cw32 import32 ole2w32
INC=/I$(OGLINC)
CFG=$(WXDIR)\src\wxwin32.cfg
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v -DDEBUG=$(DEBUG)
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS = -DDEBUG=$(DEBUG)
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = ogledit.obj doc.obj view.obj palette.obj
all: ogl ogledit.exe
ogl:
cd $(OGLDIR)\src
make -f makefile.b32
cd $(THISDIR)
ogledit.exe: $(WXLIB) $(OBJECTS) ogledit.def ogledit.res
tlink32 $(LINKFLAGS) @&&!
c0w32.obj $(OBJECTS)
ogledit
nul
$(LIBS)
ogledit.def
ogledit.res
!
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) $(INC) -c {$< }
ogledit.obj: ogledit.$(SRCSUFF)
doc.obj: doc.$(SRCSUFF)
view.obj: view.$(SRCSUFF)
palette.obj: palette.$(SRCSUFF)
ogledit.res : ogledit.rc $(WXDIR)\include\msw\wx.rc
brc32 -r /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa ogledit
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws

View File

@@ -1,87 +1,21 @@
# #
# File: makefile.bcc # File: makefile.bcc
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1998
# Updated: # Updated:
# Copyright: (c) 1996
# #
# "%W% %G%" # Builds a BC++ 16-bit sample
#
# Makefile : Builds OGL example for BC++, 16-bit.
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == "" !if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif !endif
!ifndef FINAL
FINAL=0
!endif
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env
THISDIR = $(WXDIR)\utils\ogl\samples\ogledit TARGET=ogledit
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj view.obj palette.obj
OGLDIR = $(WXDIR)\utils\ogl !include $(WXDIR)\src\makeprog.b32
OGLINC = $(OGLDIR)\src
OGLLIB = $(OGLDIR)\lib\ogl.lib
WXLIB = $(WXDIR)\lib\wx.lib
LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import
INC=/I$(OGLINC)
CFG=$(WXDIR)\src\wxwin.cfg
!if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS =
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = ogledit.obj doc.obj view.obj palette.obj
all: ogl ogledit.exe
ogl:
cd $(OGLDIR)\src
make -f makefile.bcc
cd $(THISDIR)
ogledit.exe: $(WXLIB) $(OBJECTS) ogledit.def ogledit.res
tlink $(LINKFLAGS) @&&!
c0wl.obj $(OBJECTS)
ogledit
nul
$(LIBS)
ogledit.def
!
rc -30 -K ogledit.res
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) $(INC) -c {$< }
ogledit.obj: ogledit.$(SRCSUFF)
doc.obj: doc.$(SRCSUFF)
view.obj: view.$(SRCSUFF)
palette.obj: palette.$(SRCSUFF)
ogledit.res : ogledit.rc $(WXDIR)\include\wx\msw\wx.rc
rc -r /i$(BCCDIR)\include /i$(WXDIR)\include ogledit
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase *.map
-erase *.rws

View File

@@ -0,0 +1,18 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=ogledit
EXTRACPPFLAGS=-I../../src
EXTRALIBS=-logl
OBJECTS = $(TARGET).o doc.o view.o palette.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -0,0 +1,19 @@
#
# File: makefile.b32
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright:
#
# Makefile : Builds sample for 32-bit BC++
WXDIR = $(WXWIN)
TARGET=studio
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
mainfrm.obj project.obj dialogs.obj csprint.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,22 @@
#
# File: makefile.bcc
# Author: Julian Smart
# Created: 1998
# Updated:
#
# Builds a BC++ 16-bit sample
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
WXDIR = $(WXWIN)
TARGET=studio
EXTRALIBS=$(WXDIR)\lib\ogl.lib
EXTRACPPFLAGS=-I$(WXDIR)\utils\ogl\src
OBJECTS = $(TARGET).obj doc.obj shapes.obj symbols.obj view.obj cspalette.obj\
mainfrm.obj project.obj dialogs.obj csprint.obj
!include $(WXDIR)\src\makeprog.b32

View File

@@ -0,0 +1,19 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../../..
TARGET=studio
EXTRACPPFLAGS=-I../../src
EXTRALIBS=-logl
OBJECTS = $(TARGET).o doc.o shapes.o symbols.o view.o cspalette.o\
mainfrm.o project.o dialogs.o csprint.o
include $(WXDIR)/src/makeprog.g95

View File

@@ -2007,7 +2007,7 @@ void wxShape::ReadAttributes(wxExpr *clause)
if (brush_string == "") if (brush_string == "")
brush_string = "WHITE"; brush_string = "WHITE";
if (pen_string[0] == '#') if (pen_string.GetChar(0) == '#')
{ {
wxColour col(oglHexToColour(pen_string.After('#'))); wxColour col(oglHexToColour(pen_string.After('#')));
m_pen = wxThePenList->FindOrCreatePen(col, pen_width, pen_style); m_pen = wxThePenList->FindOrCreatePen(col, pen_width, pen_style);
@@ -2018,7 +2018,7 @@ void wxShape::ReadAttributes(wxExpr *clause)
if (!m_pen) if (!m_pen)
m_pen = wxBLACK_PEN; m_pen = wxBLACK_PEN;
if (brush_string[0] == '#') if (brush_string.GetChar(0) == '#')
{ {
wxColour col(oglHexToColour(brush_string.After('#'))); wxColour col(oglHexToColour(brush_string.After('#')));
m_brush = wxTheBrushList->FindOrCreateBrush(col, brush_style); m_brush = wxTheBrushList->FindOrCreateBrush(col, brush_style);

View File

@@ -1158,16 +1158,16 @@ void wxOpPolyDraw::ReadExpr(wxPseudoMetaFile *image, wxExpr *expr)
wxString hexString = expr->Nth(2)->StringValue(); wxString hexString = expr->Nth(2)->StringValue();
while (i < m_noPoints) while (i < m_noPoints)
{ {
buf1[0] = hexString[bufPtr]; buf1[0] = hexString[(size_t)bufPtr];
buf1[1] = hexString[bufPtr + 1]; buf1[1] = hexString[(size_t)(bufPtr + 1)];
buf1[2] = hexString[bufPtr + 2]; buf1[2] = hexString[(size_t)(bufPtr + 2)];
buf1[3] = hexString[bufPtr + 3]; buf1[3] = hexString[(size_t)(bufPtr + 3)];
buf1[4] = 0; buf1[4] = 0;
buf2[0] = hexString[bufPtr + 4]; buf2[0] = hexString[(size_t)(bufPtr + 4)];
buf2[1] = hexString[bufPtr + 5]; buf2[1] = hexString[(size_t)(bufPtr + 5)];
buf2[2] = hexString[bufPtr + 6]; buf2[2] = hexString[(size_t)(bufPtr + 6)];
buf2[3] = hexString[bufPtr + 7]; buf2[3] = hexString[(size_t)(bufPtr + 7)];
buf2[4] = 0; buf2[4] = 0;
bufPtr += 8; bufPtr += 8;

View File

@@ -1,106 +1,18 @@
# #
# File: makefile.b32 # File: makefile.b32
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1999
# Updated: # Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh # Copyright:
# #
# "%W% %G%" # Makefile : Builds OGL library for 32-bit BC++
#
# Makefile : Builds OGL for BC++, 32-bit.
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
# Change WXDIR to wherever wxWindows is found
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makeb32.env
WXLIB = $(WXDIR)\lib\wx32.lib LIBTARGET=$(WXDIR)\lib\ogl.lib
WXINC = $(WXDIR)\include
CFG=$(WXWIN)\src\wxwin32.cfg
OGLDIR = $(WXDIR)\utils\ogl
OGLLIB = $(WXDIR)\lib\ogl.lib
DOCDIR = $(OGLDIR)\docs
INC=/DPROLOGIO=1 # /I$(WXDIR)\include\base /I$(WXDIR)\include\msw
LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import mathwl
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
LINKFLAGS=/v /Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v -DDEBUG=$(DEBUG)
!else
LINKFLAGS=/Tpe /L$(WXLIBDIR);$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS = -DDEBUG=$(DEBUG)
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
composit.obj drawn.obj bmpshape.obj mfutils.obj composit.obj drawn.obj bmpshape.obj mfutils.obj
all: $(OGLLIB) !include $(WXDIR)\src\makelib.b32
.$(SRCSUFF).obj:
bcc32 $(CPPFLAGS) $(INC) -c {$< }
$(OGLLIB): $(OBJECTS)
erase $(OGLLIB)
tlib /P128 @&&!
$(OGLLIB) &
+$(OBJECTS:.obj =.obj +)
!
# Making documents
docs: hlp
hlp: $(DOCDIR)/ogl.hlp
hlp32: $(DOCDIR)/hlp32/ogl.hlp
rtf: $(DOCDIR)/ogl.rtf
$(DOCDIR)/ogl.hlp: $(DOCDIR)/ogl.rtf $(DOCDIR)/ogl.hpj
cd $(DOCDIR)
-erase ogl.ph
hc ogl
cd $(THISDIR)
$(DOCDIR)/hlp32/ogl.hlp: $(DOCDIR)/hlp32/ogl.rtf $(DOCDIR)/hlp32/ogl.hpj
cd $(DOCDIR)/hlp32
-erase ogl.ph
start /w hcw /c /e ogl.hpj
cd $(THISDIR)
$(DOCDIR)/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex
cd $(DOCDIR)
start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -winhelp
cd $(THISDIR)
$(DOCDIR)/hlp32/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex
cd $(DOCDIR)
start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/hlp32/ogl.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini
cd $(THISDIR)
wordrtf:
cd $(DOCDIR)
-wx /W tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -rtf
cd $(THISDIR)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase ..\lib\*.lib $(OGLLIB)

View File

@@ -1,105 +1,21 @@
# #
# File: makefile.bcc # File: makefile.bcc
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1998
# Updated: # Updated:
# Copyright: (c) 1996
# #
# "%W% %G%" # Builds OGL library for BC++, 16-bit
#
# Makefile : Builds OGL for BC++, 16-bit.
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == "" !if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx !error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif !endif
# Change WXDIR to wherever wxWindows is found
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env
WXLIB = $(WXDIR)\lib\wx.lib LIBTARGET=$(WXDIR)\lib\ogl.lib
WXINC = $(WXDIR)\include
CFG=$(WXWIN)\src\wxwin.cfg
OGLDIR = $(WXDIR)\utils\ogl
OGLLIB = $(OGLDIR)\lib\ogl.lib
DOCDIR = $(OGLDIR)\docs
INC=/DPROLOGIO=1 # /I$(WXDIR)\include\base /I$(WXDIR)\include\msw
LIBS=$(WXLIB) $(OGLLIB) mathwl cwl import mathwl
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS=
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\ OBJECTS = basic.obj basic2.obj canvas.obj ogldiag.obj lines.obj misc.obj divided.obj constrnt.obj\
composit.obj drawn.obj bitmap.obj mfutils.obj composit.obj drawn.obj bmpshape.obj mfutils.obj
all: $(OGLLIB) !include $(WXDIR)\src\makelib.bcc
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) $(INC) -c {$< }
$(OGLLIB): $(OBJECTS)
erase $(OGLLIB)
tlib /P128 @&&!
$(OGLLIB) &
+$(OBJECTS:.obj =.obj +)
!
# Making documents
docs: hlp
hlp: $(DOCDIR)/ogl.hlp
hlp32: $(DOCDIR)/hlp32/ogl.hlp
rtf: $(DOCDIR)/ogl.rtf
$(DOCDIR)/ogl.hlp: $(DOCDIR)/ogl.rtf $(DOCDIR)/ogl.hpj
cd $(DOCDIR)
-erase ogl.ph
hc ogl
cd $(THISDIR)
$(DOCDIR)/hlp32/ogl.hlp: $(DOCDIR)/hlp32/ogl.rtf $(DOCDIR)/hlp32/ogl.hpj
cd $(DOCDIR)/hlp32
-erase ogl.ph
start /w hcw /c /e ogl.hpj
cd $(THISDIR)
$(DOCDIR)/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex
cd $(DOCDIR)
start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -winhelp
cd $(THISDIR)
$(DOCDIR)/hlp32/ogl.rtf: $(DOCDIR)/classes.tex $(DOCDIR)/intro.tex $(DOCDIR)/ogl.tex
cd $(DOCDIR)
start /w tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/hlp32/ogl.rtf -twice -winhelp -macros $(DOCDIR)/t2rtf32.ini
cd $(THISDIR)
wordrtf:
cd $(DOCDIR)
-wx /W tex2rtf $(DOCDIR)/ogl.tex $(DOCDIR)/ogl.rtf -twice -rtf
cd $(THISDIR)
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase ..\lib\*.lib

View File

@@ -0,0 +1,17 @@
#
# File: makefile.g95
# Author: Julian Smart
# Created: 1999
# Updated:
# Copyright: (c) Julian Smart, 1999
#
# Makefile for wxWindows OGL library Cygwin/Mingw32).
WXDIR = ../../..
LIBTARGET=$(WXDIR)/lib/libogl.a
OBJECTS = basic.o basic2.o canvas.o ogldiag.o lines.o misc.o divided.o constrnt.o\
composit.o drawn.o bmpshape.o mfutils.o
include $(WXDIR)/src/makelib.g95

View File

@@ -1,61 +1,16 @@
# #
# File: makefile.g95 # File: makefile.g95
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1999
# Updated: # Updated:
# Copyright: (c) Julian Smart, 1999
# #
# "%W% %G%" # Makefile for wxWindows sample (Cygwin/Mingw32).
#
# Makefile for Tex2RTF (GNU-WIN32)
WXDIR = ../../.. WXDIR = ../../..
# All common UNIX compiler flags and options are now in TARGET=tex2rtf
# this central makefile. OBJECTS = $(TARGET).o texutils.o tex2any.o htmlutil.o rtfutils.o xlputils.o table.o readshg.o
include $(WXDIR)/src/makeg95.env
OBJECTS = $(OBJDIR)/tex2rtf.$(OBJSUFF) $(OBJDIR)/texutils.$(OBJSUFF) $(OBJDIR)/tex2any.$(OBJSUFF)\ include $(WXDIR)/src/makeprog.g95
$(OBJDIR)/htmlutil.$(OBJSUFF) $(OBJDIR)/rtfutils.$(OBJSUFF) $(OBJDIR)/xlputils.$(OBJSUFF)\
$(OBJDIR)/table.$(OBJSUFF) $(OBJDIR)/readshg.$(OBJSUFF)\
$(OBJDIR)/tex2rtf_resources.$(OBJSUFF)
all: $(OBJDIR) tex2rtf$(GUISUFFIX)$(EXESUFF)
INC = $(COMPPATHS) -I$(WXDIR)/include/msw -I$(WXDIR)/include/base -I../../wxhelp/src
CPPFLAGS = $(XINCLUDE) $(INC) $(OPTIONS) $(GUI) -DDEBUG='$(DEBUG)' $(DEBUGFLAGS) $(WARN) $(OPT)
$(OBJDIR):
mkdir $(OBJDIR)
tex2rtf$(GUISUFFIX)$(EXESUFF): $(OBJECTS) $(WXLIB)
$(CC) $(LDFLAGS) -o tex2rtf$(GUISUFFIX)$(EXESUFF) $(OBJECTS) $(LDLIBS)
$(OBJDIR)/tex2rtf.$(OBJSUFF): tex2rtf.$(SRCSUFF) tex2rtf.h tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ tex2rtf.$(SRCSUFF)
$(OBJDIR)/texutils.$(OBJSUFF): texutils.$(SRCSUFF) tex2rtf.h tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ texutils.$(SRCSUFF)
$(OBJDIR)/tex2any.$(OBJSUFF): tex2any.$(SRCSUFF) tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ tex2any.$(SRCSUFF)
$(OBJDIR)/htmlutil.$(OBJSUFF): htmlutil.$(SRCSUFF) tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ htmlutil.$(SRCSUFF)
$(OBJDIR)/rtfutils.$(OBJSUFF): rtfutils.$(SRCSUFF) tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ rtfutils.$(SRCSUFF)
$(OBJDIR)/xlputils.$(OBJSUFF): xlputils.$(SRCSUFF) tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ xlputils.$(SRCSUFF)
$(OBJDIR)/table.$(OBJSUFF): table.$(SRCSUFF) tex2any.h
$(CC) -c $(CPPFLAGS) -o $@ table.$(SRCSUFF)
$(OBJDIR)/readshg.$(OBJSUFF): readshg.$(SRCSUFF) readshg.h
$(CC) -c $(CPPFLAGS) -o $@ readshg.$(SRCSUFF)
$(OBJDIR)/tex2rtf_resources.o: tex2rtf.rc
$(RESCOMP) -i tex2rtf.rc -o $(OBJDIR)/tex2rtf_resources.o $(RESFLAGS)
clean:
rm -f $(OBJECTS) tex2rtf$(GUISUFFIX).exe core *.rsc *.res

View File

@@ -402,11 +402,11 @@ void WriteTexReferences(char *filename)
void ReadTexReferences(char *filename) void ReadTexReferences(char *filename)
{ {
#if !wxUSE_IOSTREAMH && __WXMSW__ if (!wxFileExists(filename))
return;
ifstream istr(filename, ios::in); ifstream istr(filename, ios::in);
#else
ifstream istr(filename, ios::nocreate | ios::in);
#endif
if (istr.bad()) return; if (istr.bad()) return;
char label[100]; char label[100];
@@ -569,12 +569,11 @@ void BibReadValue(istream& istr, char *buffer, bool ignoreBraces = TRUE,
bool ReadBib(char *filename) bool ReadBib(char *filename)
{ {
if (!wxFileExists(filename))
return FALSE;
char buf[300]; char buf[300];
#if !wxUSE_IOSTREAMH && __WXMSW__
ifstream istr(filename, ios::in); ifstream istr(filename, ios::in);
#else
ifstream istr(filename, ios::nocreate | ios::in);
#endif
if (istr.bad()) return FALSE; if (istr.bad()) return FALSE;
BibLine = 1; BibLine = 1;
@@ -1291,11 +1290,11 @@ char *RegisterSetting(char *settingName, char *settingValue, bool interactive)
bool ReadCustomMacros(char *filename) bool ReadCustomMacros(char *filename)
{ {
#if !wxUSE_IOSTREAMH && __WXMSW__ if (!wxFileExists(filename))
return FALSE;
ifstream istr(filename, ios::in); ifstream istr(filename, ios::in);
#else
ifstream istr(filename, ios::nocreate | ios::in);
#endif
if (istr.bad()) return FALSE; if (istr.bad()) return FALSE;
CustomMacroList.Clear(); CustomMacroList.Clear();

View File

@@ -1,18 +1,16 @@
# #
# File: makefile.b32 # File: makefile.b32
# Author: Patrick Halke # Author: Julian Smart
# Created: 1995 # Created: 1999
# Updated: # Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
# #
# "%W% %G%"
# #
# Makefile : Builds 32bit wxtree library for 32-bit BC++ # Makefile : Builds wxTree sample for 32-bit BC++
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
TARGET=test TARGET=test
OBJECTS=$(TARGET) OBJECTS=$(TARGET).obj wxtree.obj
!include $(WXDIR)\src\makeprog.b32 !include $(WXDIR)\src\makeprog.b32

View File

@@ -1,96 +1,16 @@
# #
# File: makefile.bcc # File: makefile.bcc
# Author: Julian Smart # Author: Julian Smart
# Created: 1993 # Created: 1999
# Updated: # Updated:
# Copyright: (c) 1993, AIAI, University of Edinburgh
# #
# "%W% %G%"
# #
# Makefile : Builds tree library and example (DOS). # Makefile : Builds wxTree sample for 16-bit BC++
!if "$(BCCDIR)" == ""
!error You must define the BCCDIR variable in autoexec.bat, e.g. BCCDIR=d:\bc4
!endif
!if "$(WXWIN)" == ""
!error You must define the WXWIN variable in autoexec.bat, e.g. WXWIN=c:\wx
!endif
# Change WXDIR to wherever wxWindows is found
WXDIR = $(WXWIN) WXDIR = $(WXWIN)
!include $(WXDIR)\src\makebcc.env
WXLIB = $(WXDIR)\lib\wx.lib TARGET=test
WXINC = $(WXDIR)\include OBJECTS=$(TARGET).obj wxtree.obj
CFG=$(WXWIN)\src\wxwin.cfg
TREEDIR = $(WXDIR)\utils\wxtree !include $(WXDIR)\src\makeprog.bcc
TREELIB = $(TREEDIR)\lib\wxtree.lib
WXHELPDIR = $(WXDIR)\utils\wxhelp
TEX2RTFDIR = $(WXDIR)\utils\tex2rtf
DOCDIR = $(WXHELPDIR)\docs
# Default is to output RTF for WinHelp
!ifndef WINHELP
WINHELP=-winhelp
!endif
INC=/I$(WXDIR)\include\base /I$(WXDIR)\include\msw
LIBS=$(WXLIB) $(TREELIB) mathwl cwl import mathwl
!ifndef FINAL
FINAL=0
!endif
!if "$(FINAL)" == "0"
LINKFLAGS=/v/Vt /Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -Od
DEBUG_FLAGS= -v
!else
LINKFLAGS=/Twe /L$(WXDIR)\lib;$(BCCDIR)\lib
OPT = -O2
DEBUG_FLAGS=
!endif
CPPFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
CFLAGS=$(DEBUG_FLAGS) $(OPT) @$(CFG)
HEADERS = wxtree.h
SOURCES = wxtree.$(SRCSUFF)
OBJECTS = wxtree.obj
all: $(TREELIB)
.$(SRCSUFF).obj:
bcc $(CPPFLAGS) $(INC) -c {$< }
$(TREELIB): $(OBJECTS)
erase $(TREELIB)
tlib /P128 @&&!
$(TREELIB) &
+$(OBJECTS:.obj =.obj +)
!
test.obj: test.$(SRCSUFF)
test.res : test.rc $(WXDIR)\include\msw\wx.rc
rc /i$(BCCDIR)\include /i$(WXDIR)\include\msw /i$(WXDIR)\contrib\fafa -r test
test.exe: test.obj test.def test.res $(TREELIB)
tlink $(LINKFLAGS) @&&!
c0wl.obj test.obj
test
nul
$(LIBS)
test.def
!
rc -K test.res
clean:
-erase *.obj
-erase *.exe
-erase *.res
-erase ..\lib\*.lib

View File

@@ -1,48 +1,16 @@
# #
# File: makefile.g95 # File: makefile.g95
# Author: Julian Smart # Author: Julian Smart
# Created: 1996 # Created: 1999
# # Updated:
# "%W% %G%" # Copyright: (c) Julian Smart, 1999
#
# Makefile : Builds wxTree library and example under GNU-WIN32
# #
# Makefile for wxWindows sample (Cygwin/Mingw32).
WXDIR = ../../.. WXDIR = ../../..
include $(WXDIR)/src/makeg95.env
PROPDIR = $(WXDIR)/utils/wxtree TARGET=test
TREELIB = $(PROPDIR)/lib/$(LIBPREFIX)wxtree.$(LIBSUFF) OBJECTS = $(TARGET).o wxtree.o
THISDIR = $(PROPDIR)/src
OBJECTS = $(OBJDIR)/wxtree.$(OBJSUFF) include $(WXDIR)/src/makeprog.g95
TESTOBJECTS = $(OBJDIR)/test.$(OBJSUFF) $(OBJDIR)/test_resources.$(OBJSUFF)
LDFLAGS = -Wl,--subsystem,windows -mwindows -L$(WXDIR)/lib -L../lib
LDLIBS=-lwxtree $(LIBS)
all: $(OBJDIR) $(TREELIB)
test: $(OBJDIR) test.exe
$(OBJDIR):
mkdir $(OBJDIR)
$(TREELIB): $(OBJECTS)
rm -f $@
ar $(AROPTIONS) $@ $(OBJECTS)
$(RANLIB) $@
$(OBJDIR)/test.$(OBJSUFF): test.h test.$(SRCSUFF) $(TREELIB)
$(CC) -c $(CPPFLAGS) -o $@ test.$(SRCSUFF)
test.exe: $(TESTOBJECTS)
$(CC) $(LDFLAGS) -o test$(GUISUFFIX)$(EXESUFF) $(TESTOBJECTS) $(LDLIBS)
$(OBJDIR)/wxtree.$(OBJSUFF): wxtree.h wxtree.$(SRCSUFF)
$(CC) -c $(CPPFLAGS) -o $@ wxtree.$(SRCSUFF)
$(OBJDIR)/test_resources.o: test.rc
$(RESCOMP) -i test.rc -o $(OBJDIR)/test_resources.o $(RESFLAGS)
clean:
rm -f *.$(OBJSUFF) $(TREELIB) objects/test.o *.exe *.res *.map *.rsc