applied patch to build wxMSW with CW7 (patch 550445)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15472 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -354,17 +354,51 @@ compiling the sample again.
|
|||||||
Metrowerks CodeWarrior compilation
|
Metrowerks CodeWarrior compilation
|
||||||
----------------------------------
|
----------------------------------
|
||||||
|
|
||||||
1. Downloaded and unzip wxWindows-x.y.z-cw.zip.
|
1. CodeWarrior Pro7 project files in XML format are already
|
||||||
2. Load the make_cw.mcp project in wx\src, and compile.
|
included in wxMSW-x.y.z.zip and the setup version.
|
||||||
3. Load the make_cw.mcp project in wx\samples\minimal, and compile.
|
2. Review the file include\wx\msw\setup.h (or include\wx\msw\setup0.h if
|
||||||
Further project files for samples will be available in due
|
you are working from the CVS version) to make sure the settings reflect
|
||||||
course.
|
what you want. If you aren't sure, leave it alone and go with the
|
||||||
|
default settings. A few notes:
|
||||||
|
- Don't use wxUSE_DEBUG_NEW_ALWAYS: it doesn't mix well with MSL
|
||||||
|
- wxUSE_GLOBAL_MEMORY_OPERATORS works, but memory leak reports
|
||||||
|
will be rather confusing due to interactions with the MSL ANSI
|
||||||
|
and runtime libs.
|
||||||
|
3. The project file to build the Win32 wxWindows libraries relies on the
|
||||||
|
Batch File Runner plug-in. This plug-in is not installed as part of
|
||||||
|
a normal CW7 installation. However, you can find this plug-in on the
|
||||||
|
CodeWarrior Reference CD, in the Thrill Seekers folder; it's call the
|
||||||
|
"Batch File Post Linker".
|
||||||
|
4. If you choose not to install the Batch File Runner plug-in, then you
|
||||||
|
need to do the following by hand:
|
||||||
|
(1) Create the directories lib\cw7msw\include\wx and copy the file
|
||||||
|
include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
|
||||||
|
working from the CVS version) to lib\cw7msw\include\wx\setup.h
|
||||||
|
(2) Create the directories lib\cw7mswd\include\wx and copy the file
|
||||||
|
include\wx\msw\setup.h (or include\wx\msw\setup0.h if you are
|
||||||
|
working from the CVS version) to lib\cw7mswd\include\wx\setup.h
|
||||||
|
5. Import srcwxWindows.xml to create the project file wxWindows.mcp.
|
||||||
|
Store this project file in directory src. You may get warnings about
|
||||||
|
not being able to find certain project paths; ignore these warnings, the
|
||||||
|
appropriate paths will be created during the build by the Batch File Runner.
|
||||||
|
6. Choose the wxlib Win32 debug or wxlib Win32 Release target and build. You
|
||||||
|
will get some warnings about hidden virtual functions, illegal conversions
|
||||||
|
from const pointers to pointers, etc., all of which you can safely ignore.
|
||||||
|
***Note: if you get errors that the compiler can't find "wx/setup.h", just
|
||||||
|
stop the build and build again. These errors occur because sometimes the
|
||||||
|
compiler starts doing its thing before the copying of setup.h has completed.
|
||||||
|
7. The following libraries will be produced depending on chosen
|
||||||
|
target:
|
||||||
|
- wx_x86.lib ANSI Release (static)
|
||||||
|
- wx_x86_d.lib ANSI Debug (static)
|
||||||
|
8. Sorry, I haven't had time yet to create and test unicode or DLL versions.
|
||||||
|
Volunteers for this are welcome (as neither DLLs nor unicode builds are
|
||||||
|
big priorities for me ;).
|
||||||
|
9. CodeWarrior Pro7 project files (in XML format) are also provided for some
|
||||||
|
of the samples. In particular, for the minimal, controls, dialogs, dnd,
|
||||||
|
and docview samples. You can use these project files as templates for
|
||||||
|
the other samples and for your own projects.
|
||||||
|
|
||||||
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
|
Symantec C++ compilation
|
||||||
------------------------
|
------------------------
|
||||||
|
@@ -309,7 +309,7 @@ GSocketError GAddress_UNIX_SetPath(GAddress *address, const char *path);
|
|||||||
GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
|
GSocketError GAddress_UNIX_GetPath(GAddress *address, char *path, size_t sbuf);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
|
||||||
|
@@ -115,8 +115,8 @@ inline void operator delete[] (void * buf)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// VC++ 6.0
|
// VC++ 6.0 and MWERKS
|
||||||
#if defined(__VISUALC__) && (__VISUALC__ >= 1200)
|
#if ( defined(__VISUALC__) && (__VISUALC__ >= 1200) ) || defined(__MWERKS__)
|
||||||
inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */)
|
inline void operator delete(void* pData, wxChar* /* fileName */, int /* lineNum */)
|
||||||
{
|
{
|
||||||
wxDebugFree(pData, FALSE);
|
wxDebugFree(pData, FALSE);
|
||||||
|
@@ -36,7 +36,7 @@ public:
|
|||||||
|
|
||||||
// override some base class virtuals
|
// override some base class virtuals
|
||||||
virtual void SetTitle(const wxString& title);
|
virtual void SetTitle(const wxString& title);
|
||||||
virtual wxString GetTitle();
|
virtual wxString GetTitle() const;
|
||||||
|
|
||||||
virtual int ShowModal();
|
virtual int ShowModal();
|
||||||
|
|
||||||
|
@@ -126,7 +126,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount);
|
|||||||
// VZ: I don't know it's not done for compilers other than VC++ but I leave it
|
// VZ: I don't know it's not done for compilers other than VC++ but I leave it
|
||||||
// as is. Please note, though, that tracing OLE interface calls may be
|
// as is. Please note, though, that tracing OLE interface calls may be
|
||||||
// incredibly useful when debugging OLE programs.
|
// incredibly useful when debugging OLE programs.
|
||||||
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ >= 1000)
|
#if defined(__WXDEBUG__) && ( ( defined(__VISUALC__) && (__VISUALC__ >= 1000) ) || defined(__MWERKS__) )
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// All OLE specific log functions have DebugTrace level (as LogTrace)
|
// All OLE specific log functions have DebugTrace level (as LogTrace)
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -129,7 +129,7 @@
|
|||||||
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
// In debug mode, causes new to be defined to be WXDEBUG_NEW (see object.h). If
|
||||||
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
// this causes problems (e.g. link errors), set this to 0. You may need to set
|
||||||
// this to 0 if using templates (at least for VC++). This switch is currently
|
// this to 0 if using templates (at least for VC++). This switch is currently
|
||||||
// ignored for mingw / cygwin
|
// ignored for mingw / cygwin / CodeWarrior
|
||||||
//
|
//
|
||||||
// Default is 0
|
// Default is 0
|
||||||
//
|
//
|
||||||
@@ -1056,6 +1056,12 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// wxUSE_DEBUG_NEW_ALWAYS doesn't work with CodeWarrior
|
||||||
|
#if defined(__MWERKS__)
|
||||||
|
#undef wxUSE_DEBUG_NEW_ALWAYS
|
||||||
|
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(__GNUWIN32__)
|
#if defined(__GNUWIN32__)
|
||||||
// These don't work as expected for mingw32 and cygwin32
|
// These don't work as expected for mingw32 and cygwin32
|
||||||
#undef wxUSE_MEMORY_TRACING
|
#undef wxUSE_MEMORY_TRACING
|
||||||
|
@@ -14,9 +14,12 @@
|
|||||||
#define __MAC__
|
#define __MAC__
|
||||||
#define __WXMAC__
|
#define __WXMAC__
|
||||||
#elif (__MWERKS__ >= 0x0900) && __INTEL__
|
#elif (__MWERKS__ >= 0x0900) && __INTEL__
|
||||||
|
#define WIN32
|
||||||
|
#define _WINDOWS
|
||||||
#define __WXMSW__
|
#define __WXMSW__
|
||||||
#define __WINDOWS__
|
#define __WINDOWS__
|
||||||
#define __WIN95__
|
#define __WIN95__
|
||||||
|
#define __WIN32__
|
||||||
#define STRICT
|
#define STRICT
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#elif __BEOS__
|
#elif __BEOS__
|
||||||
@@ -30,7 +33,7 @@
|
|||||||
#include <ansi_prefix.win32.h>
|
#include <ansi_prefix.win32.h>
|
||||||
#include <ansi_parms.h>
|
#include <ansi_parms.h>
|
||||||
#ifdef __MWERKS__
|
#ifdef __MWERKS__
|
||||||
#if defined( __MSL__ ) && __MSL__ >= 0x5012
|
#if defined( __MSL__ ) && __MSL__ >= 0x5012 && __MSL__ < 0x7000
|
||||||
#define fileno _fileno
|
#define fileno _fileno
|
||||||
#define fdopen _fdopen
|
#define fdopen _fdopen
|
||||||
#define tell _tell
|
#define tell _tell
|
||||||
@@ -66,6 +69,6 @@ extern "C"
|
|||||||
char *strdup(const char *s) ;
|
char *strdup(const char *s) ;
|
||||||
int isascii( int c ) ;
|
int isascii( int c ) ;
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} ;
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
// check if to use precompiled headers: do it for most Windows compilers unless
|
// check if to use precompiled headers: do it for most Windows compilers unless
|
||||||
// explicitly disabled by defining NOPCH
|
// explicitly disabled by defining NOPCH
|
||||||
#if ((defined(__BORLANDC__) || defined(__VISUALC__) || defined(__WATCOMC__)) && defined(__WXMSW__)) || defined(__VISAGECPP__)
|
#if ((defined(__BORLANDC__) || defined(__VISUALC__) || defined(__WATCOMC__)) && defined(__WXMSW__)) || defined(__VISAGECPP__) || defined(__MWERKS__)
|
||||||
#if !defined(NOPCH)
|
#if !defined(NOPCH)
|
||||||
#define WX_PRECOMP
|
#define WX_PRECOMP
|
||||||
#endif
|
#endif
|
||||||
|
@@ -1,26 +1,33 @@
|
|||||||
#if __option (profile)
|
#if __option (profile)
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC_prof.mch"
|
#pragma precompile_target "wx_PPC_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#pragma precompile_target "wx_x86_prof.mch"
|
#pragma precompile_target "wx_x86_prof.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfm_prof.mch"
|
#pragma precompile_target "wx_cfm_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68k_prof.mch"
|
#pragma precompile_target "wx_68k_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC.mch"
|
#pragma precompile_target "wx_PPC.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#pragma precompile_target "wx_x86.mch"
|
#pragma precompile_target "wx_x86.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfm.mch"
|
#pragma precompile_target "wx_cfm.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68k.mch"
|
#pragma precompile_target "wx_68k.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma once on
|
|
||||||
#undef WX_PRECOMP
|
#undef WX_PRECOMP
|
||||||
#define wxUSE_GUI 1
|
#define wxUSE_GUI 1
|
||||||
#define OLDP2C 1
|
#define OLDP2C 1
|
||||||
|
@@ -1,26 +1,33 @@
|
|||||||
#if __option (profile)
|
#if __option (profile)
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC++_prof.mch"
|
#pragma precompile_target "wx_PPC++_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL_
|
#elif __INTEL_
|
||||||
#pragma precompile_target "wx_x86Prof++_prof.mch"
|
#pragma precompile_target "wx_x86Prof++_prof.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfmProf++_prof.mch"
|
#pragma precompile_target "wx_cfmProf++_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68kProf++_prof.mch"
|
#pragma precompile_target "wx_68kProf++_prof.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC++.mch"
|
#pragma precompile_target "wx_PPC++.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#pragma precompile_target "wx_x86++.mch"
|
#pragma precompile_target "wx_x86++.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfm++.mch"
|
#pragma precompile_target "wx_cfm++.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68k++.mch"
|
#pragma precompile_target "wx_68k++.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma once on
|
|
||||||
#define WX_PRECOMP
|
#define WX_PRECOMP
|
||||||
#define wxUSE_GUI 1
|
#define wxUSE_GUI 1
|
||||||
#define OLDP2C 1
|
#define OLDP2C 1
|
||||||
|
@@ -3,16 +3,19 @@
|
|||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC_d.mch"
|
#pragma precompile_target "wx_PPC_d.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#pragma precompile_target "wx_x86_d.mch"
|
#pragma precompile_target "wx_x86_d.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfm_d.mch"
|
#pragma precompile_target "wx_cfm_d.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68k_d.mch"
|
#pragma precompile_target "wx_68k_d.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma once on
|
|
||||||
#undef WX_PRECOMP
|
#undef WX_PRECOMP
|
||||||
#define __WXDEBUG__ 1
|
#define __WXDEBUG__ 1
|
||||||
#define wxUSE_GUI 1
|
#define wxUSE_GUI 1
|
||||||
|
@@ -3,16 +3,19 @@
|
|||||||
#else
|
#else
|
||||||
#if __POWERPC__
|
#if __POWERPC__
|
||||||
#pragma precompile_target "wx_PPC++_d.mch"
|
#pragma precompile_target "wx_PPC++_d.mch"
|
||||||
|
#pragma once on
|
||||||
#elif __INTEL__
|
#elif __INTEL__
|
||||||
#pragma precompile_target "wx_x86++_d.mch"
|
#pragma precompile_target "wx_x86++_d.mch"
|
||||||
|
/* Do NOT use #pragma once on for Win32 */
|
||||||
#elif __CFM68K__
|
#elif __CFM68K__
|
||||||
#pragma precompile_target "wx_cfm++_d.mch"
|
#pragma precompile_target "wx_cfm++_d.mch"
|
||||||
|
#pragma once on
|
||||||
#else
|
#else
|
||||||
#pragma precompile_target "wx_68k++_d.mch"
|
#pragma precompile_target "wx_68k++_d.mch"
|
||||||
|
#pragma once on
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#pragma once on
|
|
||||||
#define WX_PRECOMP
|
#define WX_PRECOMP
|
||||||
#define __WXDEBUG__ 1
|
#define __WXDEBUG__ 1
|
||||||
#define wxUSE_GUI 1
|
#define wxUSE_GUI 1
|
||||||
|
1968
samples/controls/controlsW7.xml
Normal file
1968
samples/controls/controlsW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
1969
samples/dialogs/dialogsW7.xml
Normal file
1969
samples/dialogs/dialogsW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
1968
samples/dnd/dndW7.xml
Normal file
1968
samples/dnd/dndW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
2028
samples/docview/docviewW7.xml
Normal file
2028
samples/docview/docviewW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
1968
samples/minimal/minimalW7.xml
Normal file
1968
samples/minimal/minimalW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1396,7 +1396,7 @@ wxString wxFindFirstFile(const wxChar *spec, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxString result;
|
wxString result;
|
||||||
gs_dir->GetFirst(&result, wxFileNameFromPath(spec), dirFlags);
|
gs_dir->GetFirst(&result, wxFileNameFromPath((wxChar) spec), dirFlags);
|
||||||
if ( result.IsEmpty() )
|
if ( result.IsEmpty() )
|
||||||
{
|
{
|
||||||
wxDELETE(gs_dir);
|
wxDELETE(gs_dir);
|
||||||
|
@@ -696,7 +696,7 @@ bool wxDebugContext::Dump(void)
|
|||||||
|
|
||||||
// if (TRUE)
|
// if (TRUE)
|
||||||
{
|
{
|
||||||
wxChar* appName = wxT("application");
|
wxChar* appName = (wxChar*) wxT("application");
|
||||||
wxString appNameStr("");
|
wxString appNameStr("");
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
{
|
{
|
||||||
@@ -755,7 +755,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
|
|||||||
|
|
||||||
// if (TRUE)
|
// if (TRUE)
|
||||||
{
|
{
|
||||||
wxChar* appName = wxT("application");
|
wxChar* appName = (wxChar*) wxT("application");
|
||||||
wxString appNameStr(wxT(""));
|
wxString appNameStr(wxT(""));
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
{
|
{
|
||||||
@@ -789,7 +789,7 @@ bool wxDebugContext::PrintStatistics(bool detailed)
|
|||||||
// if (detailed && (data != (void*)m_debugStream) && (data != (void*) m_streamBuf))
|
// if (detailed && (data != (void*)m_debugStream) && (data != (void*) m_streamBuf))
|
||||||
if (detailed && (data != (void*) wxLog::GetActiveTarget()))
|
if (detailed && (data != (void*) wxLog::GetActiveTarget()))
|
||||||
{
|
{
|
||||||
wxChar *className = wxT("nonobject");
|
wxChar *className = (wxChar*) wxT("nonobject");
|
||||||
if (st->m_isObject && st->GetActualData())
|
if (st->m_isObject && st->GetActualData())
|
||||||
{
|
{
|
||||||
wxObject *obj = (wxObject *)st->GetActualData();
|
wxObject *obj = (wxObject *)st->GetActualData();
|
||||||
@@ -855,7 +855,7 @@ bool wxDebugContext::PrintClasses(void)
|
|||||||
|
|
||||||
// if (TRUE)
|
// if (TRUE)
|
||||||
{
|
{
|
||||||
wxChar* appName = wxT("application");
|
wxChar* appName = (wxChar*) wxT("application");
|
||||||
wxString appNameStr(wxT(""));
|
wxString appNameStr(wxT(""));
|
||||||
if (wxTheApp)
|
if (wxTheApp)
|
||||||
{
|
{
|
||||||
|
@@ -49,7 +49,7 @@
|
|||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__WIN32__) && !defined(HAVE_FTIME)
|
#if defined(__WIN32__) && !defined(HAVE_FTIME) && !defined(__MWERKS__)
|
||||||
#define HAVE_FTIME
|
#define HAVE_FTIME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -294,7 +294,24 @@ wxLongLong wxGetLocalTimeMillis()
|
|||||||
// If possible, use a function which avoids conversions from
|
// If possible, use a function which avoids conversions from
|
||||||
// broken-up time structures to milliseconds
|
// broken-up time structures to milliseconds
|
||||||
|
|
||||||
#if defined(HAVE_GETTIMEOFDAY)
|
#if defined(__WXMSW__) && defined(__MWERKS__)
|
||||||
|
// This should probably be the way all WXMSW compilers should do it
|
||||||
|
// Go direct to the OS for time
|
||||||
|
|
||||||
|
SYSTEMTIME thenst = { 1970, 1, 4, 1, 0, 0, 0, 0 }; // 00:00:00 Jan 1st 1970
|
||||||
|
FILETIME thenft;
|
||||||
|
SystemTimeToFileTime( &thenst, &thenft );
|
||||||
|
wxLongLong then( thenft.dwHighDateTime, thenft.dwLowDateTime ); // time in 100 nanoseconds
|
||||||
|
|
||||||
|
SYSTEMTIME nowst;
|
||||||
|
GetLocalTime( &nowst );
|
||||||
|
FILETIME nowft;
|
||||||
|
SystemTimeToFileTime( &nowst, &nowft );
|
||||||
|
wxLongLong now( nowft.dwHighDateTime, nowft.dwLowDateTime ); // time in 100 nanoseconds
|
||||||
|
|
||||||
|
return ( now - then ) / 10000.0; // time from 00:00:00 Jan 1st 1970 to now in milliseconds
|
||||||
|
|
||||||
|
#elif defined(HAVE_GETTIMEOFDAY)
|
||||||
struct timeval tp;
|
struct timeval tp;
|
||||||
if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
|
if ( wxGetTimeOfDay(&tp, (struct timezone *)NULL) != -1 )
|
||||||
{
|
{
|
||||||
|
32
src/cwcopysetup.bat
Executable file
32
src/cwcopysetup.bat
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
if exist ..\include\wx\msw\setup.h (
|
||||||
|
echo include\wx\msw\setup.h already exists
|
||||||
|
) else (
|
||||||
|
copy /y ..\include\wx\msw\setup0.h ..\include\wx\msw\setup.h
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7msw (
|
||||||
|
echo lib\cw7msw already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7msw
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7msw\include (
|
||||||
|
echo lib\cw7msw\include already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7msw\include
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7msw\include\wx (
|
||||||
|
echo lib\cw7msw\include\wx already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7msw\include\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7msw\include\wx\setup.h (
|
||||||
|
echo lib\cw7msw\include\wx\setup.h already exists
|
||||||
|
) else (
|
||||||
|
copy /y ..\include\wx\msw\setup.h ..\lib\cw7msw\include\wx\setup.h
|
||||||
|
)
|
||||||
|
|
||||||
|
rem pause
|
||||||
|
|
32
src/cwdcopysetup.bat
Executable file
32
src/cwdcopysetup.bat
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
if exist ..\include\wx\msw\setup.h (
|
||||||
|
echo include\wx\msw\setup.h already exists
|
||||||
|
) else (
|
||||||
|
copy /y ..\include\wx\msw\setup0.h ..\include\wx\msw\setup.h
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7mswd (
|
||||||
|
echo lib\cw7mswd already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7mswd
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7mswd\include (
|
||||||
|
echo lib\cw7mswd\include already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7mswd\include
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7mswd\include\wx (
|
||||||
|
echo lib\cw7mswd\include\wx already exists
|
||||||
|
) else (
|
||||||
|
mkdir ..\lib\cw7mswd\include\wx
|
||||||
|
)
|
||||||
|
|
||||||
|
if exist ..\lib\cw7mswd\include\wx\setup.h (
|
||||||
|
echo lib\cw7mswd\include\wx\setup.h already exists
|
||||||
|
) else (
|
||||||
|
copy /y ..\include\wx\msw\setup.h ..\lib\cw7mswd\include\wx\setup.h
|
||||||
|
)
|
||||||
|
|
||||||
|
rem pause
|
||||||
|
|
6
src/jpeg/jpeg_CW_Prefix.h
Normal file
6
src/jpeg/jpeg_CW_Prefix.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
// Special configuration file for building jpeg under CodeWarrior
|
||||||
|
|
||||||
|
|
||||||
|
#define HAVE_BOOLEAN
|
||||||
|
|
||||||
|
|
@@ -175,7 +175,7 @@ void wxColourDialog::SetTitle(const wxString& title)
|
|||||||
m_title = title;
|
m_title = title;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxColourDialog::GetTitle()
|
wxString wxColourDialog::GetTitle() const
|
||||||
{
|
{
|
||||||
return m_title;
|
return m_title;
|
||||||
}
|
}
|
||||||
|
@@ -513,7 +513,7 @@ GSocketError GSocket_Connect(GSocket *sck, GSocketStream stream)
|
|||||||
/* sck->m_error is set in _GSocket_Connect_Timeout */
|
/* sck->m_error is set in _GSocket_Connect_Timeout */
|
||||||
}
|
}
|
||||||
|
|
||||||
return err;
|
return (GSocketError) err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If connect failed with EWOULDBLOCK and the GSocket object
|
/* If connect failed with EWOULDBLOCK and the GSocket object
|
||||||
|
@@ -188,7 +188,7 @@ LRESULT CALLBACK _GSocket_Internal_WinProc(HWND hWnd,
|
|||||||
{
|
{
|
||||||
EnterCriticalSection(&critical);
|
EnterCriticalSection(&critical);
|
||||||
socket = socketList[(uMsg - WM_USER)];
|
socket = socketList[(uMsg - WM_USER)];
|
||||||
event = -1;
|
event = (GSocketEvent) -1;
|
||||||
cback = NULL;
|
cback = NULL;
|
||||||
data = NULL;
|
data = NULL;
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ bool IsIidFromList(REFIID riid, const IID *aIids[], size_t nCount)
|
|||||||
// Debug support
|
// Debug support
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ > 1000)
|
#if defined(__WXDEBUG__) && ( ( defined(__VISUALC__) && (__VISUALC__ > 1000) ) || defined(__MWERKS__) )
|
||||||
static wxString GetIidName(REFIID riid)
|
static wxString GetIidName(REFIID riid)
|
||||||
{
|
{
|
||||||
// an association between symbolic name and numeric value of an IID
|
// an association between symbolic name and numeric value of an IID
|
||||||
@@ -83,7 +83,7 @@ static wxString GetIidName(REFIID riid)
|
|||||||
ADD_KNOWN_IID(AdviseSink2),
|
ADD_KNOWN_IID(AdviseSink2),
|
||||||
ADD_KNOWN_IID(BindCtx),
|
ADD_KNOWN_IID(BindCtx),
|
||||||
ADD_KNOWN_IID(ClassFactory),
|
ADD_KNOWN_IID(ClassFactory),
|
||||||
#if !defined( __VISUALC__) || (__VISUALC__!=1010)
|
#if ( !defined( __VISUALC__) || (__VISUALC__!=1010) ) && !defined(__MWERKS__)
|
||||||
ADD_KNOWN_IID(ContinueCallback),
|
ADD_KNOWN_IID(ContinueCallback),
|
||||||
ADD_KNOWN_IID(EnumOleDocumentViews),
|
ADD_KNOWN_IID(EnumOleDocumentViews),
|
||||||
ADD_KNOWN_IID(OleCommandTarget),
|
ADD_KNOWN_IID(OleCommandTarget),
|
||||||
@@ -176,18 +176,18 @@ static wxString GetIidName(REFIID riid)
|
|||||||
|
|
||||||
void wxLogQueryInterface(const wxChar *szInterface, REFIID riid)
|
void wxLogQueryInterface(const wxChar *szInterface, REFIID riid)
|
||||||
{
|
{
|
||||||
wxLogTrace(wxT("%s::QueryInterface (iid = %s)"),
|
wxLogTrace(wxTRACE_OleCalls, wxT("%s::QueryInterface (iid = %s)"),
|
||||||
szInterface, GetIidName(riid).c_str());
|
szInterface, GetIidName(riid).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxLogAddRef(const wxChar *szInterface, ULONG cRef)
|
void wxLogAddRef(const wxChar *szInterface, ULONG cRef)
|
||||||
{
|
{
|
||||||
wxLogTrace(wxT("After %s::AddRef: m_cRef = %d"), szInterface, cRef + 1);
|
wxLogTrace(wxTRACE_OleCalls, wxT("After %s::AddRef: m_cRef = %d"), szInterface, cRef + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxLogRelease(const wxChar *szInterface, ULONG cRef)
|
void wxLogRelease(const wxChar *szInterface, ULONG cRef)
|
||||||
{
|
{
|
||||||
wxLogTrace(wxT("After %s::Release: m_cRef = %d"), szInterface, cRef - 1);
|
wxLogTrace(wxTRACE_OleCalls, wxT("After %s::Release: m_cRef = %d"), szInterface, cRef - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000)
|
#elif defined(__WXDEBUG__) && defined(__VISUALC__) && (__VISUALC__ <= 1000)
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg,
|
LRESULT APIENTRY _EXPORT wxTaskBarIconWindowProc( HWND hWnd, unsigned msg,
|
||||||
UINT wParam, LONG lParam );
|
UINT wParam, LONG lParam );
|
||||||
|
|
||||||
wxChar *wxTaskBarWindowClass = wxT("wxTaskBarWindowClass");
|
wxChar *wxTaskBarWindowClass = (wxChar*) wxT("wxTaskBarWindowClass");
|
||||||
|
|
||||||
wxList wxTaskBarIcon::sm_taskBarIcons;
|
wxList wxTaskBarIcon::sm_taskBarIcons;
|
||||||
bool wxTaskBarIcon::sm_registeredClass = FALSE;
|
bool wxTaskBarIcon::sm_registeredClass = FALSE;
|
||||||
|
@@ -62,7 +62,7 @@
|
|||||||
#if defined(__VISUALC__) || \
|
#if defined(__VISUALC__) || \
|
||||||
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
|
(defined(__BORLANDC__) && (__BORLANDC__ >= 0x500)) || \
|
||||||
(defined(__GNUG__) && defined(__MSVCRT__)) || \
|
(defined(__GNUG__) && defined(__MSVCRT__)) || \
|
||||||
defined(__WATCOMC__)
|
defined(__WATCOMC__) || defined(__MWERKS__)
|
||||||
|
|
||||||
#undef wxUSE_BEGIN_THREAD
|
#undef wxUSE_BEGIN_THREAD
|
||||||
#define wxUSE_BEGIN_THREAD
|
#define wxUSE_BEGIN_THREAD
|
||||||
|
@@ -858,7 +858,7 @@ bool wxShell(const wxString& command)
|
|||||||
{
|
{
|
||||||
wxChar *shell = wxGetenv(wxT("COMSPEC"));
|
wxChar *shell = wxGetenv(wxT("COMSPEC"));
|
||||||
if ( !shell )
|
if ( !shell )
|
||||||
shell = wxT("\\COMMAND.COM");
|
shell = (wxChar*) wxT("\\COMMAND.COM");
|
||||||
|
|
||||||
wxString cmd;
|
wxString cmd;
|
||||||
if ( !command )
|
if ( !command )
|
||||||
|
12
src/tiff/tiff_CW_Prefix.h
Normal file
12
src/tiff/tiff_CW_Prefix.h
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#define NEED_STRDUP
|
||||||
|
#define WINVER 0x0400
|
||||||
|
|
||||||
|
/*
|
||||||
|
We need to make sure some symbols required for correct use of
|
||||||
|
Win32 SDK headers (and that some of these headers are included
|
||||||
|
to begin with). The best way is to simply include one of the
|
||||||
|
ANSI headers.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
20554
src/wxWindowsW7.xml
Normal file
20554
src/wxWindowsW7.xml
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user