#! File: bcc.t
#! Purpose: tmake template file from which makefile.bcc is generated by running
#! tmake -t bcc wxwin.pro -o makefile.bcc
+#!
+#! TODO:
+#! - resourc2.obj is not correctly generated (see list and target).
+#! - cpp is incorrectly substituted into filenames containing 'obj'
+#!
#! Author: Vadim Zeitlin
#! Created: 14.07.99
#! Version: $Id$
}
#! special hack for Borland in 16 bits needs this file
- $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.cpp';
+ $project{"WXCOMMONOBJS"} .= '${MSWDIR}\resourc2.obj';
foreach $file (sort keys %wxMSW) {
#! don't take files not appropriate for 16-bit Windows
$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
erase $(LIBTARGET)
tlib $(LIBTARGET) /P1024 @&&!
-+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
++$(COMMONOBJS:.obj =.obj +)\
++$(GENERICOBJS:.obj =.obj +)\
++$(MSWOBJS:.obj =.obj +)\
++$(PERIPH_LIBS:.lib =.lib +)
!
dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
# Normal, static library
-all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib
-
-
-# $(WXDIR)\lib\wx.lib: dummy.obj $(OBJECTS) $(PERIPH_LIBS)
-# -erase $(LIBTARGET)
-# lib /PAGESIZE:128 @<<
-# $(LIBTARGET)
-# y
-# $(OBJECTS) $(PERIPH_LIBS)
-# nul
-# ;
-# <<
+all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
$(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS)
-erase $(WXDIR)\lib\wx1.lib
;
<<
-$(WXDIR)\lib\wx3.lib: $(MSWOBJS)
+$(WXDIR)\lib\wx3.lib: $(MSWOBJS1)
-erase $(WXDIR)\lib\wx3.lib
lib /PAGESIZE:128 @<<
$(WXDIR)\lib\wx3.lib
y
-$(MSWOBJS)
+$(MSWOBJS1)
+nul
+;
+<<
+
+$(WXDIR)\lib\wx4.lib: $(MSWOBJS2)
+ -erase $(WXDIR)\lib\wx4.lib
+ lib /PAGESIZE:128 @<<
+$(WXDIR)\lib\wx4.lib
+y
+$(MSWOBJS2)
nul
;
<<
symbols, struct packing, etc. are exactly the same for all items in
the project. After this, delete everything (including PCH) and recompile.
-Visual C++ 1.5 compilation
---------------------------
+Visual C++ 1.5 compilation (16-bit)
+-----------------------------------
1. Make sure your WXWIN variable is set, and uses the FAT (short
name) form.
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
+Note (2): unfortunately most samples won't link in 16-bit mode,
+because the automatic data segment exceeds 64K. The minimal
+sample links and runs, however.
+
+Note (3): 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
Further project files for samples will be available in due
course.
-NOTES:
-
-You need CodeWarrior Pro 4 plus the patches to 4.1 from the
+Note (1): you need CodeWarrior Pro 4 plus the patches to 4.1 from the
Metrowerks Web site.
+Note (2): unfortunately these files are not yet up-to-date for the
+current release.
+
Symantec C++ compilation
------------------------
void GetClippingBox(wxCoord *x, wxCoord *y, wxCoord *w, wxCoord *h) const
{ DoGetClippingBox(x, y, w, h); }
void GetClippingBox(wxRect& rect) const
- { DoGetClippingBox(&rect.x, &rect.y, &rect.width, &rect.height); }
+ {
+ // Necessary to use intermediate variables for 16-bit compilation
+ wxCoord x, y, w, h;
+ DoGetClippingBox(&x, &y, &w, &h);
+ rect.x = x; rect.y = y; rect.width = w; rect.height = h;
+ }
// text extent
// -----------
#endif
typedef WXHWND WXWidget;
+
+#if defined(__BORLANDC__) && !defined(__WIN32__)
+#ifndef LPTSTR
+#define LPTSTR LPSTR
+#endif
+#ifndef LPCTSTR
+#define LPCTSTR LPSTR
+#endif
+#endif
+
#endif // MSW
#ifdef __WXMOTIF__
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifndef _WX_CURICO_H_
+#define _WX_CURICO_H_
+
HICON ReadIconFile( wxChar *szFileName, HINSTANCE hInst,
int *W = 0, int *H = 0);
HCURSOR ReadCursorFile( wxChar *szFileName, HINSTANCE hInst,
HCURSOR MakeCursorFromBitmap(HINSTANCE hInst, HBITMAP hBitmap, POINT *pPoint);
HICON MakeIconFromBitmap(HINSTANCE hInst, HBITMAP hBitmap);
+
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// Name: curicop.h
+// Purpose: Private routines for cursor/icon handling
+// Author: Various
+// Modified by:
+// Created: 01/02/97
+// RCS-ID: $Id$
+// Copyright: (c) Julian Smart
+// Licence: wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_CURICOP_H_
+#define _WX_CURICOP_H_
+
// PRIVATE STUFF FOLLOWS UNTIL END
// Header signatures for various resources
HANDLE ReadIcon( wxChar *szFileName, int *W = 0, int *H = 0);
HICON MakeIcon( HANDLE hDIB, HINSTANCE hInst);
+#endif
+
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
+#ifndef _WX_DIB_H_
+#define _WX_DIB_H_
+
// Save (device dependent) wxBitmap as a DIB
bool wxSaveBitmap(wxChar *filename, wxBitmap *bitmap, wxColourMap *colourmap = NULL);
LPSTR wxFindDIBBits (LPSTR lpbi);
HPALETTE wxMakeDIBPalette(LPBITMAPINFOHEADER lpInfo);
+#endif
+
#endif
#if defined(__WXMSW__) && defined(__WATCOMC__)
-#undef wxUSE_ODBC
-#define wxUSE_ODBC 0
-
#undef wxUSE_LIBJPEG
#define wxUSE_LIBJPEG 0
#endif
#if defined(__WXMSW__) && !defined(__WIN32__)
+#undef wxUSE_SOCKETS
+#define wxUSE_SOCKETS 0
+
#undef wxUSE_THREADS
#define wxUSE_THREADS 0
// some common dnd related code
// ============================================================================
+#if wxUSE_DRAG_AND_DROP
+
#include "wx/dnd.h"
// ----------------------------------------------------------------------------
return OnDropFiles(x, y, dobj->GetFilenames()) ? def : wxDragNone;
}
+#endif
+
WXDIR = $(WXWIN)
WXINC = $(WXDIR)\include
-WXLIB=$(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib
+WXLIB=$(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
# Suffixes
OBJSUFF=obj
case wxFONTENCODING_CP1250:
charset = ANSI_CHARSET;
break;
-
+#if !defined(__WIN16__)
case wxFONTENCODING_ISO8859_2:
case wxFONTENCODING_CP1252:
charset = EASTEUROPE_CHARSET;
case wxFONTENCODING_ISO8859_11:
charset = THAI_CHARSET;
break;
+#endif // BC++ 16-bit
case wxFONTENCODING_CP437:
charset = OEM_CHARSET;
$(MSWDIR)\wxexpr.obj \
$(MSWDIR)\zipstrm.obj \
$(MSWDIR)\zstream.obj \
- ${MSWDIR}\resourc2.cpp
+ ${MSWDIR}\resourc2.obj
MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\app.obj \
$(LIBTARGET): $(DUMMY).obj $(OBJECTS) $(PERIPH_LIBS)
erase $(LIBTARGET)
tlib $(LIBTARGET) /P1024 @&&!
-+$(OBJECTS:.obj =.obj +) +$(PERIPH_LIBS:.lib =.lib +)
++$(COMMONOBJS:.obj =.obj +)\
++$(GENERICOBJS:.obj =.obj +)\
++$(MSWOBJS:.obj =.obj +)\
++$(PERIPH_LIBS:.lib =.lib +)
!
+#+$(OBJECTS:.obj =.obj +)
+
dummy.obj: dummy.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
dummydll.obj: dummydll.$(SRCSUFF) $(LOCALHEADERS) $(BASEHEADERS) $(WXDIR)\include\wx\wx.h
$(MSWDIR)\gaugemsw.obj: $(MSWDIR)\gaugemsw.$(SRCSUFF)
-$(MSWDIR)\gdiobj.obj: $(MSWDIR)\gdi$(SRCSUFF).obj
+$(MSWDIR)\gdiobj.obj: $(MSWDIR)\gdiobj.$(SRCSUFF)
$(MSWDIR)\gsocket.obj: $(MSWDIR)\gsocket.c
$(MSWDIR)\dlgcmn.obj: $(COMMDIR)\dlgcmn.$(SRCSUFF)
-$(MSWDIR)\dobjcmn.obj: $(COMMDIR)\d$(SRCSUFF)cmn.obj
+$(MSWDIR)\dobjcmn.obj: $(COMMDIR)\dobjcmn.$(SRCSUFF)
$(MSWDIR)\docmdi.obj: $(COMMDIR)\docmdi.$(SRCSUFF)
$(MSWDIR)\mstream.obj: $(COMMDIR)\mstream.$(SRCSUFF)
-$(MSWDIR)\object.obj: $(COMMDIR)\$(SRCSUFF)ect.obj
+$(MSWDIR)\object.obj: $(COMMDIR)\object.$(SRCSUFF)
-$(MSWDIR)\objstrm.obj: $(COMMDIR)\$(SRCSUFF)strm.obj
+$(MSWDIR)\objstrm.obj: $(COMMDIR)\objstrm.$(SRCSUFF)
$(MSWDIR)\paper.obj: $(COMMDIR)\paper.$(SRCSUFF)
$(MSWDIR)\zstream.obj: $(COMMDIR)\zstream.$(SRCSUFF)
-${MSWDIR}\resourc2.cpp: ${COMMDIR}\resourc2.cpp
-
-
+${MSWDIR}\resourc2.obj: ${COMMDIR}\resourc2.$(SRCSUFF)
########################################################
# Generic objects (not always compiled, depending on
$(COMMDIR)\zipstrm.obj \
$(COMMDIR)\zstream.obj
-MSWOBJS = $(MSWDIR)\accel.obj \
+MSWOBJS1 = $(MSWDIR)\accel.obj \
$(MSWDIR)\app.obj \
$(MSWDIR)\bitmap.obj \
$(MSWDIR)\bmpbuttn.obj \
$(MSWDIR)\nativdlg.obj \
$(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \
- $(MSWDIR)\pen.obj \
- $(MSWDIR)\penwin.obj \
+ $(MSWDIR)\pen.obj
+
+MSWOBJS2 = $(MSWDIR)\penwin.obj \
$(MSWDIR)\printdlg.obj \
$(MSWDIR)\printwin.obj \
$(MSWDIR)\radiobox.obj \
# $(OLEDIR)\xpmhand \
# $(OLEDIR)\pnghand \
-OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS)
+OBJECTS = $(COMMONOBJS) $(GENERICOBJS) $(MSWOBJS1) $(MSWOBJS2)
# Normal, static library
-all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib
-
+all: $(DUMMYOBJ) $(WXDIR)\lib\wx1.lib $(WXDIR)\lib\wx2.lib $(WXDIR)\lib\wx3.lib $(WXDIR)\lib\wx4.lib
-# $(WXDIR)\lib\wx.lib: dummy.obj $(OBJECTS) $(PERIPH_LIBS)
-# -erase $(LIBTARGET)
-# lib /PAGESIZE:128 @<<
-# $(LIBTARGET)
-# y
-# $(OBJECTS) $(PERIPH_LIBS)
-# nul
-# ;
-# <<
$(WXDIR)\lib\wx1.lib: $(COMMONOBJS) $(PERIPH_LIBS)
-erase $(WXDIR)\lib\wx1.lib
;
<<
-$(WXDIR)\lib\wx3.lib: $(MSWOBJS)
+$(WXDIR)\lib\wx3.lib: $(MSWOBJS1)
-erase $(WXDIR)\lib\wx3.lib
lib /PAGESIZE:128 @<<
$(WXDIR)\lib\wx3.lib
y
-$(MSWOBJS)
+$(MSWOBJS1)
+nul
+;
+<<
+
+$(WXDIR)\lib\wx4.lib: $(MSWOBJS2)
+ -erase $(WXDIR)\lib\wx4.lib
+ lib /PAGESIZE:128 @<<
+$(WXDIR)\lib\wx4.lib
+y
+$(MSWOBJS2)
nul
;
<<
$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
<<
-$(MSWDIR)/gsocket.obj: $*.$(SRCSUFF)
+$(MSWDIR)/gsocket.obj: $*.c
cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+$(CPPFLAGS2) /Fo$@ /c $*.c
<<
$(MSWDIR)/helpwin.obj: $*.$(SRCSUFF)
MSWOBJS = $(MSWDIR)\accel.obj \
$(MSWDIR)\app.obj \
- $(MSWDIR)\automtn.obj \
+ $(MSWDIR)\ole\automtn.obj \
$(MSWDIR)\bitmap.obj \
$(MSWDIR)\bmpbuttn.obj \
$(MSWDIR)\brush.obj \
$(MSWDIR)\dibutils.obj \
$(MSWDIR)\dirdlg.obj \
$(MSWDIR)\dragimag.obj \
- $(MSWDIR)\dropsrc.obj \
- $(MSWDIR)\droptgt.obj \
+ $(MSWDIR)\ole\dropsrc.obj \
+ $(MSWDIR)\ole\droptgt.obj \
$(MSWDIR)\filedlg.obj \
$(MSWDIR)\font.obj \
$(MSWDIR)\fontdlg.obj \
$(MSWDIR)\minifram.obj \
$(MSWDIR)\msgdlg.obj \
$(MSWDIR)\nativdlg.obj \
- $(MSWDIR)\oleutils.obj \
+ $(MSWDIR)\ole\oleutils.obj \
$(MSWDIR)\ownerdrw.obj \
$(MSWDIR)\palette.obj \
$(MSWDIR)\pen.obj \
$(MSWDIR)\tooltip.obj \
$(MSWDIR)\utils.obj \
$(MSWDIR)\utilsexc.obj \
- $(MSWDIR)\uuid.obj \
+ $(MSWDIR)\ole\uuid.obj \
$(MSWDIR)\wave.obj \
$(MSWDIR)\window.obj \
$(MSWDIR)\xpmhand.obj
{
// menu is just a normal string (passed in data parameter)
flags |= MF_STRING;
+
+// Don't know what the correct cast should be, but it doesn't
+// compile in BC++/16-bit without this cast.
+#if !defined(__WIN32__)
+ pData = (char*) (const char*) label;
+#else
pData = label;
+#endif
}
if ( !::AppendMenu(GetHmenu(), flags, id, pData) )
#endif //owner drawn
{
flagsOld |= MF_STRING;
+// Don't know what the correct cast should be, but it doesn't
+// compile in BC++/16-bit without this cast.
+#if !defined(__WIN32__)
+ data = (char*) (const char*) strName;
+#else
data = strName;
+#endif
}
if ( ::ModifyMenu(hMenu, id,
bool wxWriteResource(const wxString& section, const wxString& entry, const wxString& value, const wxString& file)
{
if (file != wxT(""))
+// Don't know what the correct cast should be, but it doesn't
+// compile in BC++/16-bit without this cast.
+#if !defined(__WIN32__)
+ return (WritePrivateProfileString((const char*) section, (const char*) entry, (const char*) value, (const char*) file) != 0);
+#else
return (WritePrivateProfileString((LPCTSTR)WXSTRINGCAST section, (LPCTSTR)WXSTRINGCAST entry, (LPCTSTR)value, (LPCTSTR)WXSTRINGCAST file) != 0);
+#endif
else
return (WriteProfileString((LPCTSTR)WXSTRINGCAST section, (LPCTSTR)WXSTRINGCAST entry, (LPCTSTR)WXSTRINGCAST value) != 0);
}