extracted common initialization/cleanup functions in common/init.cpp; standardized wxEntry()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
101
include/wx/app.h
101
include/wx/app.h
@@ -24,6 +24,7 @@
|
|||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#include "wx/build.h"
|
#include "wx/build.h"
|
||||||
|
#include "wx/init.h"
|
||||||
|
|
||||||
class WXDLLEXPORT wxApp;
|
class WXDLLEXPORT wxApp;
|
||||||
class WXDLLEXPORT wxAppTraits;
|
class WXDLLEXPORT wxAppTraits;
|
||||||
@@ -89,12 +90,22 @@ public:
|
|||||||
// the virtual functions which may/must be overridden in the derived class
|
// the virtual functions which may/must be overridden in the derived class
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// This is the very first function called for a newly created wxApp object,
|
||||||
|
// it is used by the library to do the global initialization. If, for some
|
||||||
|
// reason, you must override it (instead of just overriding OnInit(), as
|
||||||
|
// usual, for app-specific initializations), do not forget to call the base
|
||||||
|
// class version!
|
||||||
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
|
|
||||||
// Called before OnRun(), this is a good place to do initialization -- if
|
// Called before OnRun(), this is a good place to do initialization -- if
|
||||||
// anything fails, return false from here to prevent the program from
|
// anything fails, return false from here to prevent the program from
|
||||||
// continuing. The command line is normally parsed here, call the base
|
// continuing. The command line is normally parsed here, call the base
|
||||||
// class OnInit() to do it.
|
// class OnInit() to do it.
|
||||||
virtual bool OnInit();
|
virtual bool OnInit();
|
||||||
|
|
||||||
|
// this is here only temproary hopefully (FIXME)
|
||||||
|
virtual bool OnInitGui() { return true; }
|
||||||
|
|
||||||
// This is the replacement for the normal main(): all program work should
|
// This is the replacement for the normal main(): all program work should
|
||||||
// be done here. When OnRun() returns, the programs starts shutting down.
|
// be done here. When OnRun() returns, the programs starts shutting down.
|
||||||
virtual int OnRun() = 0;
|
virtual int OnRun() = 0;
|
||||||
@@ -103,6 +114,11 @@ public:
|
|||||||
// any cleanup matching the initializations done there.
|
// any cleanup matching the initializations done there.
|
||||||
virtual int OnExit();
|
virtual int OnExit();
|
||||||
|
|
||||||
|
// This is the very last function called on wxApp object before it is
|
||||||
|
// destroyed. If you override it (instead of overriding OnExit() as usual)
|
||||||
|
// do not forget to call the base class version!
|
||||||
|
virtual void CleanUp();
|
||||||
|
|
||||||
// Called when a fatal exception occurs, this function should take care not
|
// Called when a fatal exception occurs, this function should take care not
|
||||||
// to do anything which might provoke a nested exception! It may be
|
// to do anything which might provoke a nested exception! It may be
|
||||||
// overridden if you wish to react somehow in non-default way (core dump
|
// overridden if you wish to react somehow in non-default way (core dump
|
||||||
@@ -295,6 +311,11 @@ public:
|
|||||||
// the virtual functions which may/must be overridden in the derived class
|
// the virtual functions which may/must be overridden in the derived class
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// very first initialization function
|
||||||
|
//
|
||||||
|
// Override: very rarely
|
||||||
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
|
|
||||||
// a platform-dependent version of OnInit(): the code here is likely to
|
// a platform-dependent version of OnInit(): the code here is likely to
|
||||||
// depend on the toolkit. default version does nothing.
|
// depend on the toolkit. default version does nothing.
|
||||||
//
|
//
|
||||||
@@ -310,8 +331,10 @@ public:
|
|||||||
// Override: rarely in GUI applications, always in console ones.
|
// Override: rarely in GUI applications, always in console ones.
|
||||||
virtual int OnRun();
|
virtual int OnRun();
|
||||||
|
|
||||||
// exit the main loop thus terminating the application
|
// very last clean up function
|
||||||
virtual void Exit();
|
//
|
||||||
|
// Override: very rarely
|
||||||
|
virtual void CleanUp();
|
||||||
|
|
||||||
|
|
||||||
// the worker functions - usually not used directly by the user code
|
// the worker functions - usually not used directly by the user code
|
||||||
@@ -320,6 +343,9 @@ public:
|
|||||||
// execute the main GUI loop, the function returns when the loop ends
|
// execute the main GUI loop, the function returns when the loop ends
|
||||||
virtual int MainLoop() = 0;
|
virtual int MainLoop() = 0;
|
||||||
|
|
||||||
|
// exit the main loop thus terminating the application
|
||||||
|
virtual void Exit();
|
||||||
|
|
||||||
// exit the main GUI loop during the next iteration (i.e. it does not
|
// exit the main GUI loop during the next iteration (i.e. it does not
|
||||||
// stop the program immediately!)
|
// stop the program immediately!)
|
||||||
virtual void ExitMainLoop() = 0;
|
virtual void ExitMainLoop() = 0;
|
||||||
@@ -419,6 +445,9 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// delete all objects in wxPendingDelete list
|
||||||
|
void DeletePendingObjects();
|
||||||
|
|
||||||
// override base class method to use GUI traits
|
// override base class method to use GUI traits
|
||||||
virtual wxAppTraits *CreateTraits();
|
virtual wxAppTraits *CreateTraits();
|
||||||
|
|
||||||
@@ -505,44 +534,6 @@ extern bool WXDLLEXPORT wxYield();
|
|||||||
// Yield to other apps/messages
|
// Yield to other apps/messages
|
||||||
extern void WXDLLEXPORT wxWakeUpIdle();
|
extern void WXDLLEXPORT wxWakeUpIdle();
|
||||||
|
|
||||||
|
|
||||||
// console applications may avoid using DECLARE_APP and IMPLEMENT_APP macros
|
|
||||||
// and call these functions instead at the program startup and termination
|
|
||||||
// -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
#if !wxUSE_GUI
|
|
||||||
|
|
||||||
// initialize the library (may be called as many times as needed, but each
|
|
||||||
// call to wxInitialize() must be matched by wxUninitialize())
|
|
||||||
extern bool WXDLLEXPORT wxInitialize();
|
|
||||||
|
|
||||||
// clean up - the library can't be used any more after the last call to
|
|
||||||
// wxUninitialize()
|
|
||||||
extern void WXDLLEXPORT wxUninitialize();
|
|
||||||
|
|
||||||
// create an object of this class on stack to initialize/cleanup thel ibrary
|
|
||||||
// automatically
|
|
||||||
class WXDLLEXPORT wxInitializer
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// initialize the library
|
|
||||||
wxInitializer() { m_ok = wxInitialize(); }
|
|
||||||
|
|
||||||
// has the initialization been successful? (explicit test)
|
|
||||||
bool IsOk() const { return m_ok; }
|
|
||||||
|
|
||||||
// has the initialization been successful? (implicit test)
|
|
||||||
operator bool() const { return m_ok; }
|
|
||||||
|
|
||||||
// dtor only does clean up if we initialized the library properly
|
|
||||||
~wxInitializer() { if ( m_ok ) wxUninitialize(); }
|
|
||||||
|
|
||||||
private:
|
|
||||||
bool m_ok;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // !wxUSE_GUI
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// macros for dynamic creation of the application object
|
// macros for dynamic creation of the application object
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -572,22 +563,17 @@ public:
|
|||||||
extern int wxEntry( int argc, char **argv, bool enterLoop = TRUE ); \
|
extern int wxEntry( int argc, char **argv, bool enterLoop = TRUE ); \
|
||||||
int main(int argc, char **argv) { return wxEntry(argc, argv); }
|
int main(int argc, char **argv) { return wxEntry(argc, argv); }
|
||||||
#elif defined(__WXMSW__) && defined(WXUSINGDLL)
|
#elif defined(__WXMSW__) && defined(WXUSINGDLL)
|
||||||
// NT defines APIENTRY, 3.x not
|
|
||||||
#if !defined(WXAPIENTRY)
|
|
||||||
#define WXAPIENTRY WXFAR wxSTDCALL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <windows.h>
|
|
||||||
#include "wx/msw/winundef.h"
|
|
||||||
|
|
||||||
#define IMPLEMENT_WXWIN_MAIN \
|
#define IMPLEMENT_WXWIN_MAIN \
|
||||||
extern "C" int WXAPIENTRY WinMain(HINSTANCE hInstance,\
|
extern int wxEntry(WXHINSTANCE hInstance, \
|
||||||
HINSTANCE hPrevInstance,\
|
WXHINSTANCE hPrevInstance, \
|
||||||
LPSTR m_lpCmdLine, int nCmdShow)\
|
char *pCmdLine, \
|
||||||
|
int nCmdShow); \
|
||||||
|
extern "C" int wxSTDCALL WinMain(WXHINSTANCE hInstance, \
|
||||||
|
WXHINSTANCE hPrevInstance, \
|
||||||
|
char *lpCmdLine, \
|
||||||
|
int nCmdShow) \
|
||||||
{ \
|
{ \
|
||||||
return wxEntry((WXHINSTANCE) hInstance,\
|
return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow); \
|
||||||
(WXHINSTANCE) hPrevInstance,\
|
|
||||||
m_lpCmdLine, nCmdShow);\
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define IMPLEMENT_WXWIN_MAIN
|
#define IMPLEMENT_WXWIN_MAIN
|
||||||
@@ -611,7 +597,8 @@ public:
|
|||||||
wxApp::CheckBuildOptions(wxBuildOptions()); \
|
wxApp::CheckBuildOptions(wxBuildOptions()); \
|
||||||
return new appname; \
|
return new appname; \
|
||||||
} \
|
} \
|
||||||
wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
wxAppInitializer \
|
||||||
|
wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
||||||
appname& wxGetApp() { return *(appname *)wxTheApp; }
|
appname& wxGetApp() { return *(appname *)wxTheApp; }
|
||||||
|
|
||||||
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
|
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
|
||||||
@@ -630,5 +617,5 @@ public:
|
|||||||
// function
|
// function
|
||||||
#define DECLARE_APP(appname) extern appname& wxGetApp();
|
#define DECLARE_APP(appname) extern appname& wxGetApp();
|
||||||
|
|
||||||
#endif
|
#endif // _WX_APP_H_BASE_
|
||||||
// _WX_APP_H_BASE_
|
|
||||||
|
@@ -116,7 +116,7 @@ public:
|
|||||||
// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
|
// wxConsoleAppTraitsBase: wxAppTraits implementation for the console apps
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class wxConsoleAppTraitsBase : public wxAppTraits
|
class WXDLLEXPORT wxConsoleAppTraitsBase : public wxAppTraits
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
@@ -142,7 +142,7 @@ public:
|
|||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
|
|
||||||
class wxGUIAppTraitsBase : public wxAppTraits
|
class WXDLLEXPORT wxGUIAppTraitsBase : public wxAppTraits
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
|
@@ -66,12 +66,11 @@ public:
|
|||||||
// Returns TRUE if more idle time is requested.
|
// Returns TRUE if more idle time is requested.
|
||||||
bool SendIdleEvents(wxWindowCocoa* win);
|
bool SendIdleEvents(wxWindowCocoa* win);
|
||||||
|
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
virtual bool OnInit();
|
virtual bool OnInit();
|
||||||
virtual bool OnInitGui();
|
virtual bool OnInitGui();
|
||||||
void DeletePendingObjects();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_COCOA_APP_H_
|
#endif // _WX_COCOA_APP_H_
|
||||||
|
@@ -58,11 +58,10 @@ public:
|
|||||||
bool SendIdleEvents();
|
bool SendIdleEvents();
|
||||||
bool SendIdleEvents( wxWindow* win );
|
bool SendIdleEvents( wxWindow* win );
|
||||||
|
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static bool InitialzeVisual();
|
virtual void CleanUp();
|
||||||
static void CleanUp();
|
|
||||||
|
|
||||||
void DeletePendingObjects();
|
static bool InitialzeVisual();
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
||||||
|
@@ -58,11 +58,10 @@ public:
|
|||||||
bool SendIdleEvents();
|
bool SendIdleEvents();
|
||||||
bool SendIdleEvents( wxWindow* win );
|
bool SendIdleEvents( wxWindow* win );
|
||||||
|
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static bool InitialzeVisual();
|
virtual void CleanUp();
|
||||||
static void CleanUp();
|
|
||||||
|
|
||||||
void DeletePendingObjects();
|
static bool InitialzeVisual();
|
||||||
|
|
||||||
#ifdef __WXDEBUG__
|
#ifdef __WXDEBUG__
|
||||||
virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
virtual void OnAssert(const wxChar *file, int line, const wxChar *cond, const wxChar *msg);
|
||||||
|
83
include/wx/init.h
Normal file
83
include/wx/init.h
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Name: wx/init.h
|
||||||
|
// Purpose: wxWindows initialization and finalization functions
|
||||||
|
// Author: Vadim Zeitlin
|
||||||
|
// Modified by:
|
||||||
|
// Created: 29.06.2003
|
||||||
|
// RCS-ID: $Id$
|
||||||
|
// Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
|
||||||
|
// Licence: wxWindows licence
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifndef _WX_INIT_H_
|
||||||
|
#define _WX_INIT_H_
|
||||||
|
|
||||||
|
#include "wx/wxchar.h"
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxEntry helper functions which allow to have more fine grained control
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// do common initialization, return true if ok (in this case wxEntryCleanup
|
||||||
|
// must be called later), otherwise the program can't use wxWindows at all
|
||||||
|
//
|
||||||
|
// this function also creates wxTheApp as a side effect, if IMPLEMENT_APP
|
||||||
|
// hadn't been used a dummy default application object is created
|
||||||
|
//
|
||||||
|
// note that the parameters may be modified
|
||||||
|
extern bool WXDLLEXPORT wxEntryStart(int argc, wxChar **argv);
|
||||||
|
|
||||||
|
// free the resources allocated by the library in wxEntryStart() and shut it
|
||||||
|
// down (wxEntryStart() may be called again afterwards if necessary)
|
||||||
|
extern void WXDLLEXPORT wxEntryCleanup();
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxEntry: this function initializes the library, runs the main event loop
|
||||||
|
// and cleans it up
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// note that other, platform-specific, overloads of wxEntry may exist as well
|
||||||
|
// but this one always exists under all platforms
|
||||||
|
//
|
||||||
|
// returns the program exit code
|
||||||
|
extern int WXDLLEXPORT wxEntry(int argc, wxChar **argv);
|
||||||
|
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Using the library without (explicit) application object: you may avoid using
|
||||||
|
// DECLARE_APP and IMPLEMENT_APP macros and call the functions below instead at
|
||||||
|
// the program startup and termination
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// initialize the library (may be called as many times as needed, but each
|
||||||
|
// call to wxInitialize() must be matched by wxUninitialize())
|
||||||
|
extern bool WXDLLEXPORT wxInitialize(int argc = 0, wxChar **argv = NULL);
|
||||||
|
|
||||||
|
// clean up -- the library can't be used any more after the last call to
|
||||||
|
// wxUninitialize()
|
||||||
|
extern void WXDLLEXPORT wxUninitialize();
|
||||||
|
|
||||||
|
// create an object of this class on stack to initialize/cleanup the library
|
||||||
|
// automatically
|
||||||
|
class WXDLLEXPORT wxInitializer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
// initialize the library
|
||||||
|
wxInitializer() { m_ok = wxInitialize(); }
|
||||||
|
|
||||||
|
// has the initialization been successful? (explicit test)
|
||||||
|
bool IsOk() const { return m_ok; }
|
||||||
|
|
||||||
|
// has the initialization been successful? (implicit test)
|
||||||
|
operator bool() const { return m_ok; }
|
||||||
|
|
||||||
|
// dtor only does clean up if we initialized the library properly
|
||||||
|
~wxInitializer() { if ( m_ok ) wxUninitialize(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool m_ok;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _WX_INIT_H_
|
||||||
|
|
@@ -91,10 +91,9 @@ protected:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
void DeletePendingObjects();
|
|
||||||
bool IsExiting() { return !m_keepGoing ; }
|
bool IsExiting() { return !m_keepGoing ; }
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
|
WXEVENTHANDLERREF MacGetEventHandler() { return m_macEventHandler ; }
|
||||||
|
@@ -54,10 +54,8 @@ public:
|
|||||||
bool SendIdleEvents();
|
bool SendIdleEvents();
|
||||||
bool SendIdleEvents(wxWindow* win);
|
bool SendIdleEvents(wxWindow* win);
|
||||||
|
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
void DeletePendingObjects();
|
|
||||||
|
|
||||||
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
virtual bool Yield(bool onlyIfNeeded = FALSE);
|
||||||
|
|
||||||
|
@@ -82,10 +82,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation
|
// Implementation
|
||||||
static bool Initialize();
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
void DeletePendingObjects();
|
|
||||||
|
|
||||||
// Motif-specific
|
// Motif-specific
|
||||||
WXAppContext GetAppContext() const { return m_appContext; }
|
WXAppContext GetAppContext() const { return m_appContext; }
|
||||||
|
@@ -36,6 +36,9 @@ public:
|
|||||||
virtual ~wxApp();
|
virtual ~wxApp();
|
||||||
|
|
||||||
// override base class (pure) virtuals
|
// override base class (pure) virtuals
|
||||||
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
|
virtual void CleanUp();
|
||||||
|
|
||||||
virtual int MainLoop();
|
virtual int MainLoop();
|
||||||
virtual void ExitMainLoop();
|
virtual void ExitMainLoop();
|
||||||
virtual bool Initialized();
|
virtual bool Initialized();
|
||||||
@@ -62,28 +65,17 @@ public:
|
|||||||
// Returns TRUE if more idle time is requested.
|
// Returns TRUE if more idle time is requested.
|
||||||
bool SendIdleEvents(wxWindow* win);
|
bool SendIdleEvents(wxWindow* win);
|
||||||
|
|
||||||
void SetAuto3D(bool flag) { m_auto3D = flag; }
|
|
||||||
bool GetAuto3D() const { return m_auto3D; }
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_showOnInit;
|
|
||||||
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT
|
||||||
bool m_auto3D ; // Always use 3D controls, except where overriden
|
|
||||||
|
|
||||||
/* Windows-specific wxApp definitions */
|
/* Windows-specific wxApp definitions */
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
static bool Initialize();
|
|
||||||
static void CleanUp();
|
|
||||||
|
|
||||||
static bool RegisterWindowClasses();
|
static bool RegisterWindowClasses();
|
||||||
static bool UnregisterWindowClasses();
|
static bool UnregisterWindowClasses();
|
||||||
|
|
||||||
// Convert Windows to argc, argv style
|
|
||||||
void ConvertToStandardCommandArgs(const char* p);
|
|
||||||
|
|
||||||
// message processing
|
// message processing
|
||||||
// ------------------
|
// ------------------
|
||||||
|
|
||||||
@@ -99,8 +91,6 @@ public:
|
|||||||
// idle processing
|
// idle processing
|
||||||
// ---------------
|
// ---------------
|
||||||
|
|
||||||
void DeletePendingObjects();
|
|
||||||
|
|
||||||
#if wxUSE_RICHEDIT
|
#if wxUSE_RICHEDIT
|
||||||
// initialize the richedit DLL of (at least) given version, return TRUE if
|
// initialize the richedit DLL of (at least) given version, return TRUE if
|
||||||
// ok (Win95 has version 1, Win98/NT4 has 1 and 2, W2K has 3)
|
// ok (Win95 has version 1, Win98/NT4 has 1 and 2, W2K has 3)
|
||||||
@@ -112,21 +102,19 @@ public:
|
|||||||
static int GetComCtl32Version();
|
static int GetComCtl32Version();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_nCmdShow;
|
// the SW_XXX value to be used for the frames opened by the application
|
||||||
|
// (currently seems unused which is a bug -- TODO)
|
||||||
|
static int m_nCmdShow;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// we exit the main event loop when this flag becomes false
|
||||||
bool m_keepGoing;
|
bool m_keepGoing;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
|
||||||
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance,
|
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance, WXHINSTANCE hPrevInstance,
|
||||||
char *lpszCmdLine, int nCmdShow, bool enterLoop = TRUE);
|
char *lpszCmdLine, int nCmdShow);
|
||||||
#else
|
|
||||||
int WXDLLEXPORT wxEntry(WXHINSTANCE hInstance);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif // _WX_APP_H_
|
||||||
// _WX_APP_H_
|
|
||||||
|
|
||||||
|
@@ -126,14 +126,13 @@ private:
|
|||||||
public:
|
public:
|
||||||
|
|
||||||
// Implementation
|
// Implementation
|
||||||
static bool Initialize(HAB vHab);
|
virtual bool Initialize(int argc, wxChar **argv);
|
||||||
static void CleanUp(void);
|
virtual void CleanUp(void);
|
||||||
|
|
||||||
static bool RegisterWindowClasses(HAB vHab);
|
static bool RegisterWindowClasses(HAB vHab);
|
||||||
virtual void DoMessage(WXMSG *pMsg);
|
virtual void DoMessage(WXMSG *pMsg);
|
||||||
virtual bool DoMessage(void);
|
virtual bool DoMessage(void);
|
||||||
virtual bool ProcessMessage(WXMSG* pMsg);
|
virtual bool ProcessMessage(WXMSG* pMsg);
|
||||||
void DeletePendingObjects(void);
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int m_nCmdShow;
|
int m_nCmdShow;
|
||||||
|
@@ -89,8 +89,8 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// Implementation
|
// Implementation
|
||||||
static bool Initialize();
|
virtual bool Initialize();
|
||||||
static void CleanUp();
|
virtual void CleanUp();
|
||||||
|
|
||||||
void DeletePendingObjects();
|
void DeletePendingObjects();
|
||||||
|
|
||||||
|
@@ -231,84 +231,23 @@ END_EVENT_TABLE()
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxApp static functions
|
// wxApp static functions
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
/*static*/ bool wxApp::Initialize()
|
|
||||||
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
|
// VZ: apparently this needs to be done a.s.a.p., right? it is done after
|
||||||
|
// wxClassInfo::InitializeClasses() now but usd to be done before, I
|
||||||
|
// hope it's not a problem -- if it is, please let me know, David (if
|
||||||
|
// it isn't, just remove this comment :-)
|
||||||
wxPoseAsInitializer::InitializePosers();
|
wxPoseAsInitializer::InitializePosers();
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
return wxAppBase::Initialize(argc, argv);
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
|
||||||
wxInitializeResourceSystem();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxBitmap::InitStandardHandlers();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules()) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*static*/ void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
#if wxUSE_WX_RESOURCES
|
|
||||||
wxCleanUpResourceSystem();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxDeleteStockObjects() ;
|
|
||||||
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxBitmap::CleanUpHandlers();
|
|
||||||
|
|
||||||
delete wxPendingEvents;
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
// If we don't do the following, we get an apparent memory leak.
|
|
||||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks."));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
// wxDebugContext::SetStream(NULL, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxDC::CocoaShutdownTextSystem();
|
wxDC::CocoaShutdownTextSystem();
|
||||||
#if wxUSE_LOG
|
|
||||||
// do it as the very last thing because everything else can log messages
|
wxAppBase::CleanUp();
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -521,21 +460,3 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Find(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// platform specifics
|
|
||||||
|
|
||||||
|
@@ -36,6 +36,9 @@
|
|||||||
#include "wx/apptrait.h"
|
#include "wx/apptrait.h"
|
||||||
#include "wx/cmdline.h"
|
#include "wx/cmdline.h"
|
||||||
#include "wx/confbase.h"
|
#include "wx/confbase.h"
|
||||||
|
#if wxUSE_FILENAME
|
||||||
|
#include "wx/filename.h"
|
||||||
|
#endif // wxUSE_FILENAME
|
||||||
#if wxUSE_FONTMAP
|
#if wxUSE_FONTMAP
|
||||||
#include "wx/fontmap.h"
|
#include "wx/fontmap.h"
|
||||||
#endif // wxUSE_FONTMAP
|
#endif // wxUSE_FONTMAP
|
||||||
@@ -114,6 +117,33 @@ wxAppConsole::~wxAppConsole()
|
|||||||
delete m_traits;
|
delete m_traits;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// initilization/cleanup
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxAppConsole::Initialize(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
// remember the command line arguments
|
||||||
|
this->argc = argc;
|
||||||
|
this->argv = argv;
|
||||||
|
|
||||||
|
if ( m_appName.empty() )
|
||||||
|
{
|
||||||
|
// the application name is, by default, the name of its executable file
|
||||||
|
#if wxUSE_FILENAME
|
||||||
|
wxFileName::SplitPath(argv[0], NULL, &m_appName, NULL);
|
||||||
|
#else // !wxUSE_FILENAME
|
||||||
|
m_appName = argv[0];
|
||||||
|
#endif // wxUSE_FILENAME/!wxUSE_FILENAME
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxAppConsole::CleanUp()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// OnXXX() callbacks
|
// OnXXX() callbacks
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -49,7 +49,7 @@
|
|||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// initialization and termination
|
// initialization
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxAppBase::wxAppBase()
|
wxAppBase::wxAppBase()
|
||||||
@@ -73,11 +73,75 @@ wxAppBase::wxAppBase()
|
|||||||
m_exitOnFrameDelete = Later;
|
m_exitOnFrameDelete = Later;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool wxAppBase::Initialize(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
if ( !wxAppConsole::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// for compatibility call the old initialization function too
|
||||||
|
if ( !OnInitGui() )
|
||||||
|
{
|
||||||
|
wxAppConsole::CleanUp();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if wxUSE_THREADS
|
||||||
|
wxPendingEventsLocker = new wxCriticalSection;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
||||||
|
wxTheColourDatabase->Initialize();
|
||||||
|
|
||||||
|
wxInitializeStockLists();
|
||||||
|
wxInitializeStockObjects();
|
||||||
|
|
||||||
|
wxBitmap::InitStandardHandlers();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// cleanup
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
wxAppBase::~wxAppBase()
|
wxAppBase::~wxAppBase()
|
||||||
{
|
{
|
||||||
// this destructor is required for Darwin
|
// this destructor is required for Darwin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxAppBase::CleanUp()
|
||||||
|
{
|
||||||
|
// one last chance for pending objects to be cleaned up
|
||||||
|
DeletePendingObjects();
|
||||||
|
|
||||||
|
wxBitmap::CleanUpHandlers();
|
||||||
|
|
||||||
|
wxDeleteStockObjects();
|
||||||
|
|
||||||
|
wxDeleteStockLists();
|
||||||
|
|
||||||
|
delete wxTheColourDatabase;
|
||||||
|
wxTheColourDatabase = NULL;
|
||||||
|
|
||||||
|
#if wxUSE_THREADS
|
||||||
|
delete wxPendingEvents;
|
||||||
|
wxPendingEvents = NULL;
|
||||||
|
|
||||||
|
delete wxPendingEventsLocker;
|
||||||
|
wxPendingEventsLocker = NULL;
|
||||||
|
|
||||||
|
#if wxUSE_VALIDATORS
|
||||||
|
// If we don't do the following, we get an apparent memory leak.
|
||||||
|
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
||||||
|
#endif // wxUSE_VALIDATORS
|
||||||
|
#endif // wxUSE_THREADS
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// OnXXX() hooks
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxAppBase::OnInitGui()
|
bool wxAppBase::OnInitGui()
|
||||||
{
|
{
|
||||||
#ifdef __WXUNIVERSAL__
|
#ifdef __WXUNIVERSAL__
|
||||||
@@ -128,6 +192,24 @@ void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus))
|
|||||||
(void)ProcessEvent(event);
|
(void)ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxAppBase::DeletePendingObjects()
|
||||||
|
{
|
||||||
|
wxNode *node = wxPendingDelete.GetFirst();
|
||||||
|
while (node)
|
||||||
|
{
|
||||||
|
wxObject *obj = node->GetData();
|
||||||
|
|
||||||
|
delete obj;
|
||||||
|
|
||||||
|
if (wxPendingDelete.Member(obj))
|
||||||
|
delete node;
|
||||||
|
|
||||||
|
// Deleting one object may have deleted other pending
|
||||||
|
// objects, so start from beginning of list again.
|
||||||
|
node = wxPendingDelete.GetFirst();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxGUIAppTraitsBase
|
// wxGUIAppTraitsBase
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -19,10 +19,12 @@
|
|||||||
|
|
||||||
#if wxUSE_FILESYSTEM && wxUSE_STREAMS
|
#if wxUSE_FILESYSTEM && wxUSE_STREAMS
|
||||||
|
|
||||||
#include "wx/image.h"
|
|
||||||
#include "wx/bitmap.h"
|
|
||||||
#include "wx/fs_mem.h"
|
#include "wx/fs_mem.h"
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
#include "wx/image.h"
|
||||||
|
#include "wx/bitmap.h"
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
#ifndef WXPRECOMP
|
#ifndef WXPRECOMP
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
|
@@ -28,185 +28,273 @@
|
|||||||
#include "wx/debug.h"
|
#include "wx/debug.h"
|
||||||
#include "wx/filefn.h"
|
#include "wx/filefn.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
#include "wx/thread.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/ptr_scpd.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
|
||||||
|
#if defined(__WXMSW__) && defined(__WXDEBUG__)
|
||||||
|
#include "wx/msw/msvcrt.h"
|
||||||
|
|
||||||
|
static struct EnableMemLeakChecking
|
||||||
|
{
|
||||||
|
EnableMemLeakChecking()
|
||||||
|
{
|
||||||
|
// do check for memory leaks on program exit (another useful flag
|
||||||
|
// is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free deallocated
|
||||||
|
// memory which may be used to simulate low-memory condition)
|
||||||
|
wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
|
||||||
|
}
|
||||||
|
} gs_enableLeakChecks;
|
||||||
|
#endif // __WXMSW__ && __WXDEBUG__
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private classes
|
// private classes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
// we need a dummy app object if the user doesn't want to create a real one
|
// we need a dummy app object if the user doesn't want to create a real one
|
||||||
class wxDummyConsoleApp : public wxApp
|
class wxDummyConsoleApp : public wxAppConsole
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; }
|
virtual int OnRun() { wxFAIL_MSG( _T("unreachable code") ); return 0; }
|
||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// we need a special kind of auto pointer to wxApp which not only deletes the
|
||||||
// private functions
|
// pointer it holds in its dtor but also resets wxTheApp
|
||||||
// ----------------------------------------------------------------------------
|
wxDECLARE_SCOPED_PTR(wxApp, wxAppPtrBase);
|
||||||
|
wxDEFINE_SCOPED_PTR(wxApp, wxAppPtrBase);
|
||||||
|
|
||||||
static bool DoInit();
|
class wxAppPtr : public wxAppPtrBase
|
||||||
static void DoCleanUp();
|
{
|
||||||
|
public:
|
||||||
|
wxEXPLICIT wxAppPtr(wxApp *ptr = NULL) : wxAppPtrBase(ptr) { }
|
||||||
|
~wxAppPtr()
|
||||||
|
{
|
||||||
|
if ( get() )
|
||||||
|
{
|
||||||
|
// the pointer is going to be deleted in the base class dtor, don't
|
||||||
|
// leave the dangling pointer!
|
||||||
|
wxTheApp = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void Set(wxApp *ptr)
|
||||||
|
{
|
||||||
|
reset(ptr);
|
||||||
|
|
||||||
|
wxTheApp = ptr;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// another tiny class which simply exists to ensure that wxEntryCleanup is
|
||||||
|
// always called
|
||||||
|
class wxCleanupOnExit
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~wxCleanupOnExit() { wxEntryCleanup(); }
|
||||||
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// private vars
|
// initialization data
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
static size_t gs_nInitCount = 0;
|
static struct InitData
|
||||||
|
{
|
||||||
|
InitData()
|
||||||
|
{
|
||||||
|
nInitCount = 0;
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
argc = 0;
|
||||||
|
// argv = NULL; -- not even really needed
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
}
|
||||||
|
|
||||||
|
// critical section protecting this struct
|
||||||
|
wxCRIT_SECT_DECLARE_MEMBER(csInit);
|
||||||
|
|
||||||
|
// number of times wxInitialize() was called minus the number of times
|
||||||
|
// wxUninitialize() was
|
||||||
|
size_t nInitCount;
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
int argc;
|
||||||
|
|
||||||
|
// if we receive the command line arguments as ASCII and have to convert
|
||||||
|
// them to Unicode ourselves (this is the case under Unix but not Windows,
|
||||||
|
// for example), we remember the converted argv here because we'll have to
|
||||||
|
// free it when doing cleanup to avoid memory leaks
|
||||||
|
wchar_t *argv;
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
} gs_initData;
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation
|
// implementation
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxBase-specific functions
|
// command line arguments ANSI -> Unicode conversion
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool WXDLLEXPORT wxInitialize()
|
|
||||||
{
|
|
||||||
if ( gs_nInitCount )
|
|
||||||
{
|
|
||||||
// already initialized
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxASSERT_MSG( !wxTheApp,
|
|
||||||
wxT("either call wxInitialize or create app, not both!") );
|
|
||||||
|
|
||||||
if ( !DoInit() )
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxTheApp = new wxDummyConsoleApp;
|
|
||||||
|
|
||||||
if ( !wxTheApp )
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gs_nInitCount++;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
void WXDLLEXPORT wxUninitialize()
|
|
||||||
{
|
|
||||||
if ( !--gs_nInitCount )
|
|
||||||
{
|
|
||||||
DoCleanUp();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
int wxEntry(int argc, char **argv)
|
|
||||||
{
|
|
||||||
// library initialization
|
|
||||||
if ( !DoInit() )
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// create the app
|
|
||||||
if ( !wxTheApp )
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( wxApp::GetInitializerFunction(), -1,
|
|
||||||
wxT("No application object: use IMPLEMENT_APP macro.") );
|
|
||||||
|
|
||||||
wxAppInitializerFunction fnCreate = wxApp::GetInitializerFunction();
|
|
||||||
|
|
||||||
wxTheApp = (wxApp *)fnCreate();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCHECK_MSG( wxTheApp, -1, wxT("wxWindows error: no application object") );
|
|
||||||
|
|
||||||
// app preinitialization
|
|
||||||
wxTheApp->argc = argc;
|
|
||||||
|
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
wxTheApp->argv = new wxChar*[argc+1];
|
|
||||||
for ( int mb_argc = 0; mb_argc < argc; mb_argc++ )
|
static void ConvertArgsToUnicode(int argc, char **argv)
|
||||||
{
|
{
|
||||||
wxTheApp->argv[mb_argc] = wxStrdup(wxConvLocal.cMB2WX(argv[mb_argc]));
|
gs_initData.argv = new wchar_t *[argc + 1];
|
||||||
}
|
for ( int i = 0; i < argc; i++ )
|
||||||
wxTheApp->argv[mb_argc] = (wxChar *)NULL;
|
|
||||||
#else
|
|
||||||
wxTheApp->argv = argv;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxString name = wxFileNameFromPath(wxTheApp->argv[0]);
|
|
||||||
wxStripExtension(name);
|
|
||||||
wxTheApp->SetAppName(name);
|
|
||||||
|
|
||||||
int retValue = 0;
|
|
||||||
|
|
||||||
// app initialization
|
|
||||||
if ( !wxTheApp->OnInit() )
|
|
||||||
retValue = -1;
|
|
||||||
|
|
||||||
// app execution
|
|
||||||
if ( retValue == 0 )
|
|
||||||
{
|
{
|
||||||
retValue = wxTheApp->OnRun();
|
gs_initData.argv[i] = wxStrdup(wxConvLocal.cMB2WX(argv[i]));
|
||||||
|
|
||||||
// app clean up
|
|
||||||
wxTheApp->OnExit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// library clean up
|
gs_initData.argv[argc] = NULL;
|
||||||
DoCleanUp();
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
static void FreeConvertedArgs()
|
||||||
// private functions
|
|
||||||
// ----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
static bool DoInit()
|
|
||||||
{
|
{
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if ( !wxModule::InitializeModules() )
|
|
||||||
{
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void DoCleanUp()
|
|
||||||
{
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// flush the logged messages if any
|
|
||||||
wxLog *log = wxLog::GetActiveTarget();
|
|
||||||
if (log != NULL && log->HasPendingMessages())
|
|
||||||
log->Flush();
|
|
||||||
|
|
||||||
// continuing to use user defined log target is unsafe from now on because
|
|
||||||
// some resources may be already unavailable, so replace it by something
|
|
||||||
// more safe
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
// TODO: this should really be done in ~wxApp
|
|
||||||
#if wxUSE_UNICODE
|
|
||||||
for ( int mb_argc = 0; mb_argc < wxTheApp->argc; mb_argc++ )
|
for ( int mb_argc = 0; mb_argc < wxTheApp->argc; mb_argc++ )
|
||||||
{
|
{
|
||||||
free(wxTheApp->argv[mb_argc]);
|
free(wxTheApp->argv[mb_argc]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif // wxUSE_UNICODE
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
// delete the application object
|
// ----------------------------------------------------------------------------
|
||||||
delete wxTheApp;
|
// start up
|
||||||
wxTheApp = (wxApp *)NULL;
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// initialization which is always done (not customizable) before wxApp creation
|
||||||
|
static bool DoCommonPreInit()
|
||||||
|
{
|
||||||
|
wxClassInfo::InitializeClasses();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// non customizable initialization done after wxApp creation and initialization
|
||||||
|
static bool DoCommonPostInit()
|
||||||
|
{
|
||||||
|
wxModule::RegisterModules();
|
||||||
|
|
||||||
|
return wxModule::InitializeModules();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool wxEntryStart(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
// do minimal, always necessary, initialization
|
||||||
|
// --------------------------------------------
|
||||||
|
|
||||||
|
// initialize wxRTTI
|
||||||
|
if ( !DoCommonPreInit() )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// first of all, we need an application object
|
||||||
|
// -------------------------------------------
|
||||||
|
|
||||||
|
// the user might have already created it himself somehow
|
||||||
|
wxAppPtr app(wxTheApp);
|
||||||
|
if ( !app.get() )
|
||||||
|
{
|
||||||
|
// if not, he might have used IMPLEMENT_APP() to give us a function to
|
||||||
|
// create it
|
||||||
|
wxAppInitializerFunction fnCreate = wxApp::GetInitializerFunction();
|
||||||
|
|
||||||
|
if ( fnCreate )
|
||||||
|
{
|
||||||
|
// he did, try to create the custom wxApp object
|
||||||
|
app.Set((*fnCreate)());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( !app.get() )
|
||||||
|
{
|
||||||
|
// either IMPLEMENT_APP() was not used at all or it failed -- in any
|
||||||
|
// case we still need something
|
||||||
|
//
|
||||||
|
// NB: cast is needed because for the backwards-compatibility reasons
|
||||||
|
// wxTheApp is really a wxApp and not just wxAppConsole...
|
||||||
|
app.Set((wxApp *)new wxDummyConsoleApp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// wxApp initialization: this can be customized
|
||||||
|
// --------------------------------------------
|
||||||
|
|
||||||
|
if ( !wxTheApp->Initialize(argc, argv) )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// common initialization after wxTheApp creation
|
||||||
|
// ---------------------------------------------
|
||||||
|
|
||||||
|
if ( !DoCommonPostInit() )
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// prevent the smart pointer from destroying its contents
|
||||||
|
app.release();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
|
||||||
|
// we provide a wxEntryStart() wrapper taking "char *" pointer too
|
||||||
|
bool wxEntryStart(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ConvertArgsToUnicode(argc, argv);
|
||||||
|
|
||||||
|
if ( !wxEntryStart(argc, gs_initData.argv) )
|
||||||
|
{
|
||||||
|
FreeConvertedArgs();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// clean up
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
// cleanup done before destroying wxTheApp
|
||||||
|
static void DoCommonPreCleanup()
|
||||||
|
{
|
||||||
|
#if wxUSE_LOG
|
||||||
|
// flush the logged messages if any and install a 'safer' log target: the
|
||||||
|
// default one (wxLogGui) can't be used after the resources are freed just
|
||||||
|
// below and the user supplied one might be even more unsafe (using any
|
||||||
|
// wxWindows GUI function is unsafe starting from now)
|
||||||
|
wxLog::DontCreateOnDemand();
|
||||||
|
|
||||||
|
// this will flush the old messages if any
|
||||||
|
delete wxLog::SetActiveTarget(new wxLogStderr);
|
||||||
|
#endif // wxUSE_LOG
|
||||||
|
|
||||||
|
wxModule::CleanUpModules();
|
||||||
|
}
|
||||||
|
|
||||||
|
// cleanup done after destroying wxTheApp
|
||||||
|
static void DoCommonPostCleanup()
|
||||||
|
{
|
||||||
|
wxClassInfo::CleanUpClasses();
|
||||||
|
|
||||||
|
// we can't do this in wxApp itself because it doesn't know if argv had
|
||||||
|
// been allocated
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
FreeConvertedArgs();
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
#if wxUSE_LOG
|
#if wxUSE_LOG
|
||||||
// and now delete the last logger as well
|
// and now delete the last logger as well
|
||||||
@@ -214,3 +302,145 @@ static void DoCleanUp()
|
|||||||
#endif // wxUSE_LOG
|
#endif // wxUSE_LOG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxEntryCleanup()
|
||||||
|
{
|
||||||
|
DoCommonPreCleanup();
|
||||||
|
|
||||||
|
|
||||||
|
// delete the application object
|
||||||
|
if ( wxTheApp )
|
||||||
|
{
|
||||||
|
wxTheApp->CleanUp();
|
||||||
|
|
||||||
|
delete wxTheApp;
|
||||||
|
wxTheApp = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DoCommonPostCleanup();
|
||||||
|
|
||||||
|
// check for memory leaks
|
||||||
|
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
||||||
|
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
||||||
|
{
|
||||||
|
wxLogDebug(wxT("There were memory leaks.\n"));
|
||||||
|
wxDebugContext::Dump();
|
||||||
|
wxDebugContext::PrintStatistics();
|
||||||
|
}
|
||||||
|
#endif // Debug
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxEntry
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if !defined(__WXMSW__) || !wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
#define wxEntryReal wxEntry
|
||||||
|
#endif // !(__WXMSW__ && wxUSE_ON_FATAL_EXCEPTION)
|
||||||
|
|
||||||
|
int wxEntryReal(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
// library initialization
|
||||||
|
if ( !wxEntryStart(argc, argv) )
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// if wxEntryStart succeeded, we must call wxEntryCleanup even if the code
|
||||||
|
// below returns or throws
|
||||||
|
wxCleanupOnExit cleanupOnExit;
|
||||||
|
|
||||||
|
// app initialization
|
||||||
|
if ( !wxTheApp->OnInit() )
|
||||||
|
{
|
||||||
|
// don't call OnExit() if OnInit() failed
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// app execution
|
||||||
|
int retValue = wxTheApp->OnRun();
|
||||||
|
|
||||||
|
// why should we do this? it doesn't close all window, just one of them and
|
||||||
|
// this shouldn't be necessary anyhow...
|
||||||
|
#if 0
|
||||||
|
// close any remaining windows
|
||||||
|
wxWindow *topWindow = wxTheApp->GetTopWindow();
|
||||||
|
if ( topWindow )
|
||||||
|
{
|
||||||
|
// forcibly delete the window.
|
||||||
|
topWindow->Destroy();
|
||||||
|
|
||||||
|
// collect the dead objects
|
||||||
|
wxTheApp->DeletePendingObjects();
|
||||||
|
}
|
||||||
|
#endif // 0
|
||||||
|
|
||||||
|
// app clean up
|
||||||
|
wxTheApp->OnExit();
|
||||||
|
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
// wrap real wxEntry in a try-except block to be able to call
|
||||||
|
// OnFatalException() if necessary
|
||||||
|
#if defined(__WXMSW__) && wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
|
||||||
|
extern unsigned long wxGlobalSEHandler();
|
||||||
|
|
||||||
|
int wxEntry(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
__try
|
||||||
|
{
|
||||||
|
return wxEntryReal(argc, argv);
|
||||||
|
}
|
||||||
|
__except ( wxGlobalSEHandler() )
|
||||||
|
{
|
||||||
|
::ExitProcess(3); // the same exit code as abort()
|
||||||
|
|
||||||
|
// this code is unreachable but put it here to suppress warnings
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // __WXMSW__ && wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
|
||||||
|
#if wxUSE_UNICODE
|
||||||
|
|
||||||
|
// as with wxEntryStart, we provide an ANSI wrapper
|
||||||
|
int wxEntry(int argc, char **argv)
|
||||||
|
{
|
||||||
|
ConvertArgsToUnicode(argc, argv);
|
||||||
|
|
||||||
|
return wxEntry(argc, gs_initData.argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_UNICODE
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxInitialize/wxUninitialize
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxInitialize(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit);
|
||||||
|
|
||||||
|
if ( gs_initData.nInitCount++ )
|
||||||
|
{
|
||||||
|
// already initialized
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return wxEntryStart(argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxUninitialize()
|
||||||
|
{
|
||||||
|
wxCRIT_SECT_LOCKER(lockInit, gs_initData.csInit);
|
||||||
|
|
||||||
|
if ( !--gs_initData.nInitCount )
|
||||||
|
{
|
||||||
|
wxEntryCleanup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -671,91 +671,21 @@ void wxApp::Dispatch()
|
|||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
while (node)
|
return false;
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Find(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
|
||||||
{
|
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEvents = new wxList();
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules())
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxModule::CleanUpModules();
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = (wxApp*) NULL;
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEvents;
|
|
||||||
wxPendingEvents = NULL;
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
wxPendingEventsLocker = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// check for memory leaks
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks.\n"));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
#endif // Debug
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do this as the very last thing because everything else can log messages
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
|
|
||||||
if (oldLog)
|
|
||||||
delete oldLog;
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
@@ -671,91 +671,21 @@ void wxApp::Dispatch()
|
|||||||
gtk_main_iteration();
|
gtk_main_iteration();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
while (node)
|
return false;
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Find(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
|
||||||
{
|
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEvents = new wxList();
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase( wxKEY_STRING );
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules())
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxModule::CleanUpModules();
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = (wxApp*) NULL;
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEvents;
|
|
||||||
wxPendingEvents = NULL;
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
wxPendingEventsLocker = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// check for memory leaks
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks.\n"));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
#endif // Debug
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do this as the very last thing because everything else can log messages
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
|
|
||||||
if (oldLog)
|
|
||||||
delete oldLog;
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
112
src/mac/app.cpp
112
src/mac/app.cpp
@@ -447,7 +447,7 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxAppEventHandler )
|
|||||||
WXIMPORT char std::__throws_bad_alloc ;
|
WXIMPORT char std::__throws_bad_alloc ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
int error = 0 ;
|
int error = 0 ;
|
||||||
|
|
||||||
@@ -535,37 +535,17 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
s_macCursorRgn = ::NewRgn() ;
|
s_macCursorRgn = ::NewRgn() ;
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
#if wxUSE_RESOURCES
|
|
||||||
// wxGetResource(wxT("wxWindows"), wxT("OsVersion"), &wxOsVersion);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxWinMacWindowList = new wxList(wxKEY_INTEGER);
|
wxWinMacWindowList = new wxList(wxKEY_INTEGER);
|
||||||
wxWinMacControlList = new wxList(wxKEY_INTEGER);
|
wxWinMacControlList = new wxList(wxKEY_INTEGER);
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxBitmap::InitStandardHandlers();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules()) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMacCreateNotifierTable() ;
|
wxMacCreateNotifierTable() ;
|
||||||
|
|
||||||
UMAShowArrowCursor() ;
|
UMAShowArrowCursor() ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
@@ -615,51 +595,17 @@ bool wxApp::OnInitGui()
|
|||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxToolTip::RemoveToolTips() ;
|
wxToolTip::RemoveToolTips() ;
|
||||||
#if wxUSE_LOG
|
|
||||||
// flush the logged messages if any and install a 'safer' log target: the
|
|
||||||
// default one (wxLogGui) can't be used after the resources are freed just
|
|
||||||
// below and the user suppliedo ne might be even more unsafe (using any
|
|
||||||
// wxWindows GUI function is unsafe starting from now)
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
// this will flush the old messages if any
|
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
// One last chance for pending objects to be cleaned up
|
// One last chance for pending objects to be cleaned up
|
||||||
wxTheApp->DeletePendingObjects();
|
wxTheApp->DeletePendingObjects();
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxDeleteStockObjects() ;
|
|
||||||
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxBitmap::CleanUpHandlers();
|
|
||||||
|
|
||||||
wxMacDestroyNotifierTable() ;
|
wxMacDestroyNotifierTable() ;
|
||||||
if (wxWinMacWindowList) {
|
|
||||||
delete wxWinMacWindowList ;
|
delete wxWinMacWindowList ;
|
||||||
}
|
wxWinMacWindowList = NULL;
|
||||||
if (wxWinMacControlList) {
|
|
||||||
delete wxWinMacControlList ;
|
delete wxWinMacControlList ;
|
||||||
}
|
wxWinMacControlList = NULL;
|
||||||
delete wxPendingEvents;
|
|
||||||
wxPendingEvents = NULL;
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
// There is still more cleanup code that will try to use this if not NULL.
|
|
||||||
wxPendingEventsLocker = NULL;
|
|
||||||
// If we don't do the following, we get an apparent memory leak.
|
|
||||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
# if __option(profile)
|
# if __option(profile)
|
||||||
@@ -668,28 +614,6 @@ void wxApp::CleanUp()
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks."));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
// wxDebugContext::SetStream(NULL, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
#if defined(WXMAKINGDLL) && defined(__DARWIN__)
|
#if defined(WXMAKINGDLL) && defined(__DARWIN__)
|
||||||
// close shared library resources from here since we don't have
|
// close shared library resources from here since we don't have
|
||||||
// __wxterminate in Mach-O shared libraries
|
// __wxterminate in Mach-O shared libraries
|
||||||
@@ -705,6 +629,8 @@ void wxApp::CleanUp()
|
|||||||
#if 0
|
#if 0
|
||||||
TerminateAE() ;
|
TerminateAE() ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
wxAppBase::CleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -1266,24 +1192,6 @@ bool wxApp::SendIdleEvents(wxWindow* win)
|
|||||||
return needMore ;
|
return needMore ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxApp::Exit()
|
void wxApp::Exit()
|
||||||
{
|
{
|
||||||
wxApp::CleanUp();
|
wxApp::CleanUp();
|
||||||
|
@@ -447,7 +447,7 @@ DEFINE_ONE_SHOT_HANDLER_GETTER( wxAppEventHandler )
|
|||||||
WXIMPORT char std::__throws_bad_alloc ;
|
WXIMPORT char std::__throws_bad_alloc ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
int error = 0 ;
|
int error = 0 ;
|
||||||
|
|
||||||
@@ -535,37 +535,17 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
s_macCursorRgn = ::NewRgn() ;
|
s_macCursorRgn = ::NewRgn() ;
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
#if wxUSE_RESOURCES
|
|
||||||
// wxGetResource(wxT("wxWindows"), wxT("OsVersion"), &wxOsVersion);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxWinMacWindowList = new wxList(wxKEY_INTEGER);
|
wxWinMacWindowList = new wxList(wxKEY_INTEGER);
|
||||||
wxWinMacControlList = new wxList(wxKEY_INTEGER);
|
wxWinMacControlList = new wxList(wxKEY_INTEGER);
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxBitmap::InitStandardHandlers();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules()) {
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxMacCreateNotifierTable() ;
|
wxMacCreateNotifierTable() ;
|
||||||
|
|
||||||
UMAShowArrowCursor() ;
|
UMAShowArrowCursor() ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
@@ -615,51 +595,17 @@ bool wxApp::OnInitGui()
|
|||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxToolTip::RemoveToolTips() ;
|
wxToolTip::RemoveToolTips() ;
|
||||||
#if wxUSE_LOG
|
|
||||||
// flush the logged messages if any and install a 'safer' log target: the
|
|
||||||
// default one (wxLogGui) can't be used after the resources are freed just
|
|
||||||
// below and the user suppliedo ne might be even more unsafe (using any
|
|
||||||
// wxWindows GUI function is unsafe starting from now)
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
// this will flush the old messages if any
|
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
// One last chance for pending objects to be cleaned up
|
// One last chance for pending objects to be cleaned up
|
||||||
wxTheApp->DeletePendingObjects();
|
wxTheApp->DeletePendingObjects();
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxDeleteStockObjects() ;
|
|
||||||
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxBitmap::CleanUpHandlers();
|
|
||||||
|
|
||||||
wxMacDestroyNotifierTable() ;
|
wxMacDestroyNotifierTable() ;
|
||||||
if (wxWinMacWindowList) {
|
|
||||||
delete wxWinMacWindowList ;
|
delete wxWinMacWindowList ;
|
||||||
}
|
wxWinMacWindowList = NULL;
|
||||||
if (wxWinMacControlList) {
|
|
||||||
delete wxWinMacControlList ;
|
delete wxWinMacControlList ;
|
||||||
}
|
wxWinMacControlList = NULL;
|
||||||
delete wxPendingEvents;
|
|
||||||
wxPendingEvents = NULL;
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
// There is still more cleanup code that will try to use this if not NULL.
|
|
||||||
wxPendingEventsLocker = NULL;
|
|
||||||
// If we don't do the following, we get an apparent memory leak.
|
|
||||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
#ifndef __DARWIN__
|
#ifndef __DARWIN__
|
||||||
# if __option(profile)
|
# if __option(profile)
|
||||||
@@ -668,28 +614,6 @@ void wxApp::CleanUp()
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks."));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
// wxDebugContext::SetStream(NULL, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
#if defined(WXMAKINGDLL) && defined(__DARWIN__)
|
#if defined(WXMAKINGDLL) && defined(__DARWIN__)
|
||||||
// close shared library resources from here since we don't have
|
// close shared library resources from here since we don't have
|
||||||
// __wxterminate in Mach-O shared libraries
|
// __wxterminate in Mach-O shared libraries
|
||||||
@@ -705,6 +629,8 @@ void wxApp::CleanUp()
|
|||||||
#if 0
|
#if 0
|
||||||
TerminateAE() ;
|
TerminateAE() ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
wxAppBase::CleanUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -1266,24 +1192,6 @@ bool wxApp::SendIdleEvents(wxWindow* win)
|
|||||||
return needMore ;
|
return needMore ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxApp::Exit()
|
void wxApp::Exit()
|
||||||
{
|
{
|
||||||
wxApp::CleanUp();
|
wxApp::CleanUp();
|
||||||
|
104
src/mgl/app.cpp
104
src/mgl/app.cpp
@@ -383,119 +383,41 @@ void wxApp::Dispatch()
|
|||||||
wxEventLoop::GetActive()->Dispatch();
|
wxEventLoop::GetActive()->Dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
wxNode *node = wxPendingDelete.First();
|
// must do it before calling wxAppBase::Initialize(), because fonts are
|
||||||
while (node)
|
// needed by stock lists which are created there
|
||||||
{
|
wxTheFontsManager = new wxFontsManager;
|
||||||
wxObject *obj = (wxObject *)node->Data();
|
|
||||||
|
|
||||||
delete obj;
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
|
|
||||||
if ( wxPendingDelete.Find(obj) )
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
node = wxPendingDelete.First();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
|
||||||
{
|
|
||||||
if ( MGL_init(".", NULL) == 0 )
|
if ( MGL_init(".", NULL) == 0 )
|
||||||
{
|
{
|
||||||
wxLogError(_("Cannot initialize SciTech MGL!"));
|
wxLogError(_("Cannot initialize SciTech MGL!"));
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
return true;
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEvents = new wxList;
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
// Can't do this in wxModule, because fonts are needed by stock lists
|
|
||||||
wxTheFontsManager = new wxFontsManager;
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules()) return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
#if wxUSE_LOG
|
|
||||||
// continuing to use user defined log target is unsafe from now on because
|
|
||||||
// some resources may be already unavailable, so replace it by something
|
|
||||||
// more safe
|
|
||||||
wxLog *oldlog = wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
if ( oldlog )
|
|
||||||
delete oldlog;
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
delete gs_rootWindow;
|
delete gs_rootWindow;
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
if (wxTheColourDatabase)
|
// must do this after calling base class CleanUp()
|
||||||
delete wxTheColourDatabase;
|
|
||||||
|
|
||||||
wxTheColourDatabase = (wxColourDatabase*) NULL;
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = (wxApp*) NULL;
|
|
||||||
|
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEvents;
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
// Can't do this in wxModule, because fonts are needed by stock lists
|
|
||||||
// (do it after deleting wxTheApp and cleaning modules up, since somebody
|
|
||||||
// may be deleting fonts that lately)
|
|
||||||
delete wxTheFontsManager;
|
delete wxTheFontsManager;
|
||||||
wxTheFontsManager = (wxFontsManager*) NULL;
|
wxTheFontsManager = (wxFontsManager*) NULL;
|
||||||
|
|
||||||
// check for memory leaks
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks.\n"));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
#endif // Debug
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do this as the very last thing because everything else can log messages
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
wxLog *oldLog = wxLog::SetActiveTarget( (wxLog*) NULL );
|
|
||||||
if (oldLog)
|
|
||||||
delete oldLog;
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
wxDestroyMGL_WM();
|
wxDestroyMGL_WM();
|
||||||
MGL_exit();
|
MGL_exit();
|
||||||
}
|
}
|
||||||
|
@@ -86,77 +86,22 @@ END_EVENT_TABLE()
|
|||||||
}
|
}
|
||||||
#endif // __WXDEBUG__
|
#endif // __WXDEBUG__
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
wxClassInfo::InitializeClasses();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
return true;
|
||||||
if (!wxModule::InitializeModules()) return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxDeleteStockObjects() ;
|
|
||||||
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
delete wxWidgetHashTable;
|
delete wxWidgetHashTable;
|
||||||
wxWidgetHashTable = NULL;
|
wxWidgetHashTable = NULL;
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
wxAppBase::CleanUp();
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEvents;
|
|
||||||
wxPendingEvents = NULL;
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
wxPendingEventsLocker = NULL;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug("There were memory leaks.\n");
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::Exit()
|
void wxApp::Exit()
|
||||||
@@ -447,24 +392,6 @@ bool wxApp::SendIdleEvents(wxWindow* win)
|
|||||||
return needMore ;
|
return needMore ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxList::Node *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *fallbackResources[] = {
|
static char *fallbackResources[] = {
|
||||||
"*menuBar.marginHeight: 0",
|
"*menuBar.marginHeight: 0",
|
||||||
"*menuBar.shadowThickness: 1",
|
"*menuBar.shadowThickness: 1",
|
||||||
|
469
src/msw/app.cpp
469
src/msw/app.cpp
@@ -49,7 +49,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/apptrait.h"
|
#include "wx/apptrait.h"
|
||||||
#include "wx/cmdline.h"
|
|
||||||
#include "wx/filename.h"
|
#include "wx/filename.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
|
||||||
@@ -89,10 +88,6 @@
|
|||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __WXMICROWIN__
|
|
||||||
#include "wx/msw/msvcrt.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// conditional compilation
|
// conditional compilation
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -141,32 +136,14 @@ const wxChar *wxMDIFrameClassNameNoRedraw = wxT("wxMDIFrameClassNR");
|
|||||||
const wxChar *wxMDIChildFrameClassName = wxT("wxMDIChildFrameClass");
|
const wxChar *wxMDIChildFrameClassName = wxT("wxMDIChildFrameClass");
|
||||||
const wxChar *wxMDIChildFrameClassNameNoRedraw = wxT("wxMDIChildFrameClassNR");
|
const wxChar *wxMDIChildFrameClassNameNoRedraw = wxT("wxMDIChildFrameClassNR");
|
||||||
|
|
||||||
HICON wxSTD_FRAME_ICON = (HICON) NULL;
|
|
||||||
HICON wxSTD_MDICHILDFRAME_ICON = (HICON) NULL;
|
|
||||||
HICON wxSTD_MDIPARENTFRAME_ICON = (HICON) NULL;
|
|
||||||
|
|
||||||
HICON wxDEFAULT_FRAME_ICON = (HICON) NULL;
|
|
||||||
HICON wxDEFAULT_MDICHILDFRAME_ICON = (HICON) NULL;
|
|
||||||
HICON wxDEFAULT_MDIPARENTFRAME_ICON = (HICON) NULL;
|
|
||||||
|
|
||||||
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
|
HBRUSH wxDisableButtonBrush = (HBRUSH) 0;
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// private functions
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
|
LRESULT WXDLLEXPORT APIENTRY wxWndProc(HWND, UINT, WPARAM, LPARAM);
|
||||||
|
|
||||||
// FIXME wxUSE_ON_FATAL_EXCEPTION is only supported for VC++ now because it
|
|
||||||
// needs compiler support for Win32 SEH. Others (especially Borland)
|
|
||||||
// probably have it too, but I'm not sure about how it works
|
|
||||||
// JACS: get 'Cannot use __try in functions that require unwinding
|
|
||||||
// in Unicode mode, so disabling.
|
|
||||||
#if !defined(__VISUALC__) || defined(__WIN16__) || defined(UNICODE)
|
|
||||||
#undef wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
#define wxUSE_ON_FATAL_EXCEPTION 0
|
|
||||||
#endif // VC++
|
|
||||||
|
|
||||||
#if wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
static bool gs_handleExceptions = FALSE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
// wxGUIAppTraits implementation
|
// wxGUIAppTraits implementation
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
@@ -252,6 +229,8 @@ bool wxGUIAppTraits::DoMessageFromThreadWait()
|
|||||||
// wxApp implementation
|
// wxApp implementation
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
|
||||||
|
int wxApp::m_nCmdShow = SW_SHOWNORMAL;
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// wxWin macros
|
// wxWin macros
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -264,9 +243,29 @@ BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
|
|||||||
EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession)
|
EVT_QUERY_END_SESSION(wxApp::OnQueryEndSession)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
//// Initialize
|
// class to ensure that wxAppBase::CleanUp() is called if our Initialize()
|
||||||
bool wxApp::Initialize()
|
// fails
|
||||||
|
class wxCallBaseCleanup
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
wxCallBaseCleanup(wxApp *app) : m_app(app) { }
|
||||||
|
~wxCallBaseCleanup() { if ( m_app ) m_app->wxAppBase::CleanUp(); }
|
||||||
|
|
||||||
|
void Dismiss() { m_app = NULL; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
wxApp *m_app;
|
||||||
|
};
|
||||||
|
|
||||||
|
//// Initialize
|
||||||
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
|
{
|
||||||
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// ensure that base cleanup is done if we return too early
|
||||||
|
wxCallBaseCleanup callBaseCleanup(this);
|
||||||
|
|
||||||
// the first thing to do is to check if we're trying to run an Unicode
|
// the first thing to do is to check if we're trying to run an Unicode
|
||||||
// program under Win9x w/o MSLU emulation layer - if so, abort right now
|
// program under Win9x w/o MSLU emulation layer - if so, abort right now
|
||||||
// as it has no chance to work
|
// as it has no chance to work
|
||||||
@@ -290,20 +289,6 @@ bool wxApp::Initialize()
|
|||||||
|
|
||||||
wxBuffer = new wxChar[1500]; // FIXME
|
wxBuffer = new wxChar[1500]; // FIXME
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxBitmap::InitStandardHandlers();
|
|
||||||
|
|
||||||
#if defined(__WIN95__) && !defined(__WXMICROWIN__)
|
#if defined(__WIN95__) && !defined(__WXMICROWIN__)
|
||||||
InitCommonControls();
|
InitCommonControls();
|
||||||
#endif // __WIN95__
|
#endif // __WIN95__
|
||||||
@@ -332,17 +317,6 @@ bool wxApp::Initialize()
|
|||||||
Ctl3dAutoSubclass(wxhInstance);
|
Ctl3dAutoSubclass(wxhInstance);
|
||||||
#endif // wxUSE_CTL3D
|
#endif // wxUSE_CTL3D
|
||||||
|
|
||||||
// VZ: these icons are not in wx.rc anyhow (but should they?)!
|
|
||||||
#if 0
|
|
||||||
wxSTD_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_FRAME"));
|
|
||||||
wxSTD_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDIPARENTFRAME"));
|
|
||||||
wxSTD_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxSTD_MDICHILDFRAME"));
|
|
||||||
|
|
||||||
wxDEFAULT_FRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_FRAME"));
|
|
||||||
wxDEFAULT_MDIPARENTFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDIPARENTFRAME"));
|
|
||||||
wxDEFAULT_MDICHILDFRAME_ICON = LoadIcon(wxhInstance, wxT("wxDEFAULT_MDICHILDFRAME"));
|
|
||||||
#endif // 0
|
|
||||||
|
|
||||||
RegisterWindowClasses();
|
RegisterWindowClasses();
|
||||||
|
|
||||||
#ifndef __WXMICROWIN__
|
#ifndef __WXMICROWIN__
|
||||||
@@ -377,10 +351,9 @@ bool wxApp::Initialize()
|
|||||||
wxSetKeyboardHook(TRUE);
|
wxSetKeyboardHook(TRUE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
callBaseCleanup.Dismiss();
|
||||||
if (!wxModule::InitializeModules())
|
|
||||||
return FALSE;
|
return true;
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -525,80 +498,11 @@ bool wxApp::UnregisterWindowClasses()
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
// Convert Windows to argc, argv style
|
|
||||||
// ---------------------------------------------------------------------------
|
|
||||||
|
|
||||||
void wxApp::ConvertToStandardCommandArgs(const char* lpCmdLine)
|
|
||||||
{
|
|
||||||
// break the command line in words
|
|
||||||
wxArrayString args =
|
|
||||||
wxCmdLineParser::ConvertStringToArgs(wxConvertMB2WX(lpCmdLine));
|
|
||||||
|
|
||||||
// +1 here for the program name
|
|
||||||
argc = args.GetCount() + 1;
|
|
||||||
|
|
||||||
// and +1 here for the terminating NULL
|
|
||||||
argv = new wxChar *[argc + 1];
|
|
||||||
|
|
||||||
argv[0] = new wxChar[260]; // 260 is MAX_PATH value from windef.h
|
|
||||||
::GetModuleFileName(wxhInstance, argv[0], 260);
|
|
||||||
|
|
||||||
// also set the app name from argv[0]
|
|
||||||
wxString name;
|
|
||||||
wxFileName::SplitPath(argv[0], NULL, &name, NULL);
|
|
||||||
|
|
||||||
// but don't override the name already set by the user code, if any
|
|
||||||
if ( GetAppName().empty() )
|
|
||||||
SetAppName(name);
|
|
||||||
|
|
||||||
// copy all the other arguments to wxApp::argv[]
|
|
||||||
for ( int i = 1; i < argc; i++ )
|
|
||||||
{
|
|
||||||
argv[i] = copystring(args[i - 1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// argv[] must be NULL-terminated
|
|
||||||
argv[argc] = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
//// Cleans up any wxWindows internal structures left lying around
|
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
//// COMMON CLEANUP
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// flush the logged messages if any and install a 'safer' log target: the
|
|
||||||
// default one (wxLogGui) can't be used after the resources are freed just
|
|
||||||
// below and the user suppliedo ne might be even more unsafe (using any
|
|
||||||
// wxWindows GUI function is unsafe starting from now)
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
// this will flush the old messages if any
|
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
// One last chance for pending objects to be cleaned up
|
|
||||||
wxTheApp->DeletePendingObjects();
|
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxBitmap::CleanUpHandlers();
|
|
||||||
|
|
||||||
delete[] wxBuffer;
|
delete[] wxBuffer;
|
||||||
wxBuffer = NULL;
|
wxBuffer = NULL;
|
||||||
|
|
||||||
//// WINDOWS-SPECIFIC CLEANUP
|
|
||||||
|
|
||||||
#ifndef __WXMICROWIN__
|
#ifndef __WXMICROWIN__
|
||||||
wxSetKeyboardHook(FALSE);
|
wxSetKeyboardHook(FALSE);
|
||||||
#endif
|
#endif
|
||||||
@@ -607,20 +511,6 @@ void wxApp::CleanUp()
|
|||||||
wxCleanUpPenWin();
|
wxCleanUpPenWin();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (wxSTD_FRAME_ICON)
|
|
||||||
DestroyIcon(wxSTD_FRAME_ICON);
|
|
||||||
if (wxSTD_MDICHILDFRAME_ICON)
|
|
||||||
DestroyIcon(wxSTD_MDICHILDFRAME_ICON);
|
|
||||||
if (wxSTD_MDIPARENTFRAME_ICON)
|
|
||||||
DestroyIcon(wxSTD_MDIPARENTFRAME_ICON);
|
|
||||||
|
|
||||||
if (wxDEFAULT_FRAME_ICON)
|
|
||||||
DestroyIcon(wxDEFAULT_FRAME_ICON);
|
|
||||||
if (wxDEFAULT_MDICHILDFRAME_ICON)
|
|
||||||
DestroyIcon(wxDEFAULT_MDICHILDFRAME_ICON);
|
|
||||||
if (wxDEFAULT_MDIPARENTFRAME_ICON)
|
|
||||||
DestroyIcon(wxDEFAULT_MDIPARENTFRAME_ICON);
|
|
||||||
|
|
||||||
if ( wxDisableButtonBrush )
|
if ( wxDisableButtonBrush )
|
||||||
::DeleteObject( wxDisableButtonBrush );
|
::DeleteObject( wxDisableButtonBrush );
|
||||||
|
|
||||||
@@ -628,274 +518,43 @@ void wxApp::CleanUp()
|
|||||||
::OleUninitialize();
|
::OleUninitialize();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WXMAKINGDLL
|
|
||||||
// for an EXE the classes are unregistered when it terminates but DLL may
|
// for an EXE the classes are unregistered when it terminates but DLL may
|
||||||
// be loaded several times (load/unload/load) into the same process in
|
// be loaded several times (load/unload/load) into the same process in
|
||||||
// which case the registration will fail after the first time if we don't
|
// which case the registration will fail after the first time if we don't
|
||||||
// unregister the classes now
|
// unregister the classes now
|
||||||
UnregisterWindowClasses();
|
UnregisterWindowClasses();
|
||||||
#endif // WXMAKINGDLL
|
|
||||||
|
|
||||||
#if wxUSE_CTL3D
|
#if wxUSE_CTL3D
|
||||||
Ctl3dUnregister(wxhInstance);
|
Ctl3dUnregister(wxhInstance);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
delete wxWinHandleHash;
|
delete wxWinHandleHash;
|
||||||
wxWinHandleHash = NULL; // Set to null in case anything later tries to ref it.
|
wxWinHandleHash = NULL;
|
||||||
|
|
||||||
delete wxPendingEvents;
|
wxAppBase::CleanUp();
|
||||||
wxPendingEvents = NULL; // Set to null because wxAppBase::wxEvtHandler is destroyed later.
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
wxPendingEventsLocker = NULL; // Set to null because wxAppBase::wxEvtHandler is destroyed later.
|
|
||||||
// If we don't do the following, we get an apparent memory leak
|
|
||||||
#if wxUSE_VALIDATORS
|
|
||||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
|
||||||
#endif // wxUSE_VALIDATORS
|
|
||||||
#endif // wxUSE_THREADS
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogMessage(wxT("There were memory leaks."));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
// wxDebugContext::SetStream(NULL, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Entry point helpers, used by wxPython
|
// wxApp ctor/dtor
|
||||||
//----------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
int WXDLLEXPORT wxEntryStart( int WXUNUSED(argc), char** WXUNUSED(argv) )
|
|
||||||
{
|
|
||||||
return wxApp::Initialize();
|
|
||||||
}
|
|
||||||
|
|
||||||
int WXDLLEXPORT wxEntryInitGui()
|
|
||||||
{
|
|
||||||
return wxTheApp->OnInitGui();
|
|
||||||
}
|
|
||||||
|
|
||||||
void WXDLLEXPORT wxEntryCleanup()
|
|
||||||
{
|
|
||||||
wxApp::CleanUp();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#if !defined(_WINDLL) || (defined(_WINDLL) && defined(WXMAKINGDLL))
|
|
||||||
|
|
||||||
// temporarily disable this warning which would be generated in release builds
|
|
||||||
// because of __try
|
|
||||||
#ifdef __VISUALC__
|
|
||||||
#pragma warning(disable: 4715) // not all control paths return a value
|
|
||||||
#endif // Visual C++
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Main wxWindows entry point
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
int wxEntry(WXHINSTANCE hInstance,
|
|
||||||
WXHINSTANCE WXUNUSED(hPrevInstance),
|
|
||||||
char *lpCmdLine,
|
|
||||||
int nCmdShow,
|
|
||||||
bool enterLoop)
|
|
||||||
{
|
|
||||||
// do check for memory leaks on program exit
|
|
||||||
// (another useful flag is _CRTDBG_DELAY_FREE_MEM_DF which doesn't free
|
|
||||||
// deallocated memory which may be used to simulate low-memory condition)
|
|
||||||
#ifndef __WXMICROWIN__
|
|
||||||
wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __MWERKS__
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// This seems to be necessary since there are 'rogue'
|
|
||||||
// objects present at this point (perhaps global objects?)
|
|
||||||
// Setting a checkpoint will ignore them as far as the
|
|
||||||
// memory checking facility is concerned.
|
|
||||||
// Of course you may argue that memory allocated in globals should be
|
|
||||||
// checked, but this is a reasonable compromise.
|
|
||||||
wxDebugContext::SetCheckpoint();
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// take everything into a try-except block to be able to call
|
|
||||||
// OnFatalException() if necessary
|
|
||||||
#if wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
__try {
|
|
||||||
#endif
|
|
||||||
wxhInstance = (HINSTANCE) hInstance;
|
|
||||||
|
|
||||||
if (!wxEntryStart(0,0))
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
// create the application object or ensure that one already exists
|
|
||||||
if (!wxTheApp)
|
|
||||||
{
|
|
||||||
// The app may have declared a global application object, but we recommend
|
|
||||||
// the IMPLEMENT_APP macro is used instead, which sets an initializer
|
|
||||||
// function for delayed, dynamic app object construction.
|
|
||||||
wxCHECK_MSG( wxApp::GetInitializerFunction(), 0,
|
|
||||||
wxT("No initializer - use IMPLEMENT_APP macro.") );
|
|
||||||
|
|
||||||
wxTheApp = (wxApp*) (*wxApp::GetInitializerFunction()) ();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCHECK_MSG( wxTheApp, 0, wxT("You have to define an instance of wxApp!") );
|
|
||||||
|
|
||||||
// save the WinMain() parameters
|
|
||||||
if (lpCmdLine) // MicroWindows passes NULL
|
|
||||||
wxTheApp->ConvertToStandardCommandArgs(lpCmdLine);
|
|
||||||
wxTheApp->m_nCmdShow = nCmdShow;
|
|
||||||
|
|
||||||
// We really don't want timestamps by default, because it means
|
|
||||||
// we can't simply double-click on the error message and get to that
|
|
||||||
// line in the source. So VC++ at least, let's have a sensible default.
|
|
||||||
#ifdef __VISUALC__
|
|
||||||
#if wxUSE_LOG
|
|
||||||
wxLog::SetTimestamp(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
#endif // __VISUALC__
|
|
||||||
|
|
||||||
// init the app
|
|
||||||
int retValue = wxEntryInitGui() && wxTheApp->OnInit() ? 0 : -1;
|
|
||||||
|
|
||||||
if ( retValue == 0 )
|
|
||||||
{
|
|
||||||
if ( enterLoop )
|
|
||||||
{
|
|
||||||
// run the main loop
|
|
||||||
wxTheApp->OnRun();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// we want to initialize, but not run or exit immediately.
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//else: app initialization failed, so we skipped OnRun()
|
|
||||||
|
|
||||||
wxWindow *topWindow = wxTheApp->GetTopWindow();
|
|
||||||
if ( topWindow )
|
|
||||||
{
|
|
||||||
// Forcibly delete the window.
|
|
||||||
if ( topWindow->IsKindOf(CLASSINFO(wxFrame)) ||
|
|
||||||
topWindow->IsKindOf(CLASSINFO(wxDialog)) )
|
|
||||||
{
|
|
||||||
topWindow->Close(TRUE);
|
|
||||||
wxTheApp->DeletePendingObjects();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
delete topWindow;
|
|
||||||
wxTheApp->SetTopWindow(NULL);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
retValue = wxTheApp->OnExit();
|
|
||||||
|
|
||||||
wxEntryCleanup();
|
|
||||||
|
|
||||||
return retValue;
|
|
||||||
|
|
||||||
#if wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
}
|
|
||||||
__except ( gs_handleExceptions ? EXCEPTION_EXECUTE_HANDLER
|
|
||||||
: EXCEPTION_CONTINUE_SEARCH ) {
|
|
||||||
if ( wxTheApp )
|
|
||||||
{
|
|
||||||
// give the user a chance to do something special about this
|
|
||||||
wxTheApp->OnFatalException();
|
|
||||||
}
|
|
||||||
|
|
||||||
::ExitProcess(3); // the same exit code as abort()
|
|
||||||
|
|
||||||
// NOTREACHED
|
|
||||||
}
|
|
||||||
#endif // wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
}
|
|
||||||
|
|
||||||
// restore warning state
|
|
||||||
#ifdef __VISUALC__
|
|
||||||
#pragma warning(default: 4715) // not all control paths return a value
|
|
||||||
#endif // Visual C++
|
|
||||||
|
|
||||||
#else /* _WINDLL */
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
// Entry point for wxWindows + the App in a DLL
|
|
||||||
//----------------------------------------------------------------------
|
|
||||||
|
|
||||||
int wxEntry(WXHINSTANCE hInstance)
|
|
||||||
{
|
|
||||||
wxhInstance = (HINSTANCE) hInstance;
|
|
||||||
wxEntryStart(0, 0);
|
|
||||||
|
|
||||||
// The app may have declared a global application object, but we recommend
|
|
||||||
// the IMPLEMENT_APP macro is used instead, which sets an initializer function
|
|
||||||
// for delayed, dynamic app object construction.
|
|
||||||
if (!wxTheApp)
|
|
||||||
{
|
|
||||||
wxCHECK_MSG( wxApp::GetInitializerFunction(), 0,
|
|
||||||
"No initializer - use IMPLEMENT_APP macro." );
|
|
||||||
|
|
||||||
wxTheApp = (* wxApp::GetInitializerFunction()) ();
|
|
||||||
}
|
|
||||||
|
|
||||||
wxCHECK_MSG( wxTheApp, 0, "You have to define an instance of wxApp!" );
|
|
||||||
|
|
||||||
wxTheApp->argc = 0;
|
|
||||||
wxTheApp->argv = NULL;
|
|
||||||
|
|
||||||
wxEntryInitGui();
|
|
||||||
|
|
||||||
wxTheApp->OnInit();
|
|
||||||
|
|
||||||
wxWindow *topWindow = wxTheApp->GetTopWindow();
|
|
||||||
if ( topWindow && topWindow->GetHWND())
|
|
||||||
{
|
|
||||||
topWindow->Show(TRUE);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
#endif // _WINDLL
|
|
||||||
|
|
||||||
//// Static member initialization
|
|
||||||
|
|
||||||
wxApp::wxApp()
|
wxApp::wxApp()
|
||||||
{
|
{
|
||||||
argc = 0;
|
|
||||||
argv = NULL;
|
|
||||||
m_printMode = wxPRINT_WINDOWS;
|
m_printMode = wxPRINT_WINDOWS;
|
||||||
m_auto3D = TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxApp::~wxApp()
|
wxApp::~wxApp()
|
||||||
{
|
{
|
||||||
// Delete command-line args
|
// our cmd line arguments are allocated inside wxEntry(HINSTANCE), they
|
||||||
int i;
|
// don't come from main(), so we have to free them
|
||||||
for (i = 0; i < argc; i++)
|
|
||||||
|
while ( argc )
|
||||||
{
|
{
|
||||||
delete[] argv[i];
|
// m_argv elements were allocated by wxStrdup()
|
||||||
|
free(argv[--argc]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// but m_argv itself -- using new[]
|
||||||
delete [] argv;
|
delete [] argv;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1242,24 +901,6 @@ void wxApp::WakeUpIdle()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))
|
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
if (GetTopWindow())
|
if (GetTopWindow())
|
||||||
@@ -1443,25 +1084,3 @@ bool wxApp::Yield(bool onlyIfNeeded)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxHandleFatalExceptions(bool doit)
|
|
||||||
{
|
|
||||||
#if wxUSE_ON_FATAL_EXCEPTION
|
|
||||||
// assume this can only be called from the main thread
|
|
||||||
gs_handleExceptions = doit;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
#else
|
|
||||||
wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to use this function"));
|
|
||||||
|
|
||||||
(void)doit;
|
|
||||||
return FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// For some reason, with MSVC++ 1.5, WinMain isn't linked in properly
|
|
||||||
// if in a separate file. So include it here to ensure it's linked.
|
|
||||||
#if (defined(__VISUALC__) && !defined(__WIN32__)) || (defined(__GNUWIN32__) && !defined(__WINE__) && !defined(WXMAKINGDLL))
|
|
||||||
#include "main.cpp"
|
|
||||||
#endif
|
|
||||||
|
@@ -506,8 +506,8 @@ void wxFrame::IconizeChildFrames(bool bIconize)
|
|||||||
|
|
||||||
WXHICON wxFrame::GetDefaultIcon() const
|
WXHICON wxFrame::GetDefaultIcon() const
|
||||||
{
|
{
|
||||||
return (WXHICON)(wxSTD_FRAME_ICON ? wxSTD_FRAME_ICON
|
// we don't have any standard icons (any more)
|
||||||
: wxDEFAULT_FRAME_ICON);
|
return (WXHICON)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ===========================================================================
|
// ===========================================================================
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
|
#include "wx/cmdline.h"
|
||||||
|
|
||||||
#include "wx/msw/private.h"
|
#include "wx/msw/private.h"
|
||||||
|
|
||||||
@@ -48,6 +49,8 @@
|
|||||||
#define HINSTANCE HANDLE
|
#define HINSTANCE HANDLE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_GUI
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// function prototypes
|
// function prototypes
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -55,13 +58,35 @@
|
|||||||
// from src/msw/app.cpp
|
// from src/msw/app.cpp
|
||||||
extern void WXDLLEXPORT wxEntryCleanup();
|
extern void WXDLLEXPORT wxEntryCleanup();
|
||||||
|
|
||||||
|
static wxChar **ConvertToStandardCommandArgs(const wxChar *p, int& argc);
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// implementation: various entry points
|
// implementation: various entry points
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// Windows-specific wxEntry
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
int wxEntry(WXHINSTANCE hInstance,
|
||||||
|
WXHINSTANCE WXUNUSED(hPrevInstance),
|
||||||
|
char *pCmdLine,
|
||||||
|
int nCmdShow)
|
||||||
|
{
|
||||||
|
// remember the parameters Windows gave us
|
||||||
|
wxSetInstance((HINSTANCE)hInstance);
|
||||||
|
wxApp::m_nCmdShow = nCmdShow;
|
||||||
|
|
||||||
|
// parse the command line
|
||||||
|
int argc;
|
||||||
|
wxChar **argv = ConvertToStandardCommandArgs(wxConvertMB2WX(pCmdLine), argc);
|
||||||
|
|
||||||
|
return wxEntry(argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
// May wish not to have a DllMain or WinMain, e.g. if we're programming
|
// May wish not to have a DllMain or WinMain, e.g. if we're programming
|
||||||
// a Netscape plugin or if we're writing a console application
|
// a Netscape plugin or if we're writing a console application
|
||||||
#if wxUSE_GUI && !defined(NOMAIN)
|
#if !defined(NOMAIN)
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
@@ -104,8 +129,6 @@ DllMain(HANDLE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved))
|
|||||||
return wxEntry((WXHINSTANCE) hModule);
|
return wxEntry((WXHINSTANCE) hModule);
|
||||||
|
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_PROCESS_DETACH:
|
||||||
if ( wxTheApp )
|
|
||||||
wxTheApp->OnExit();
|
|
||||||
wxEntryCleanup();
|
wxEntryCleanup();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -123,6 +146,42 @@ DllMain(HANDLE hModule, DWORD fdwReason, LPVOID WXUNUSED(lpReserved))
|
|||||||
|
|
||||||
#endif // !NOMAIN
|
#endif // !NOMAIN
|
||||||
|
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
// Convert Windows to argc, argv style
|
||||||
|
// ---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
wxChar **ConvertToStandardCommandArgs(const wxChar *p, int& argc)
|
||||||
|
{
|
||||||
|
// break the command line in words
|
||||||
|
wxArrayString args;
|
||||||
|
if ( p )
|
||||||
|
{
|
||||||
|
args = wxCmdLineParser::ConvertStringToArgs(p);
|
||||||
|
}
|
||||||
|
|
||||||
|
// +1 here for the program name
|
||||||
|
argc = args.GetCount() + 1;
|
||||||
|
|
||||||
|
// and +1 here for the terminating NULL
|
||||||
|
wxChar **argv = new wxChar *[argc + 1];
|
||||||
|
|
||||||
|
argv[0] = new wxChar[MAX_PATH];
|
||||||
|
::GetModuleFileName(wxhInstance, argv[0], MAX_PATH);
|
||||||
|
|
||||||
|
// copy all the other arguments to wxApp::argv[]
|
||||||
|
for ( int i = 1; i < argc; i++ )
|
||||||
|
{
|
||||||
|
argv[i] = wxStrdup(args[i - 1]);
|
||||||
|
}
|
||||||
|
|
||||||
|
// argv[] must be NULL-terminated
|
||||||
|
argv[argc] = NULL;
|
||||||
|
|
||||||
|
return argv;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_GUI
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// global HINSTANCE
|
// global HINSTANCE
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -342,8 +342,8 @@ void wxMDIParentFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
|
|
||||||
WXHICON wxMDIParentFrame::GetDefaultIcon() const
|
WXHICON wxMDIParentFrame::GetDefaultIcon() const
|
||||||
{
|
{
|
||||||
return (WXHICON)(wxSTD_MDIPARENTFRAME_ICON ? wxSTD_MDIPARENTFRAME_ICON
|
// we don't have any standard icons (any more)
|
||||||
: wxDEFAULT_MDIPARENTFRAME_ICON);
|
return (WXHICON)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -811,8 +811,8 @@ void wxMDIChildFrame::InternalSetMenuBar()
|
|||||||
|
|
||||||
WXHICON wxMDIChildFrame::GetDefaultIcon() const
|
WXHICON wxMDIChildFrame::GetDefaultIcon() const
|
||||||
{
|
{
|
||||||
return (WXHICON)(wxSTD_MDICHILDFRAME_ICON ? wxSTD_MDICHILDFRAME_ICON
|
// we don't have any standard icons (any more)
|
||||||
: wxDEFAULT_MDICHILDFRAME_ICON);
|
return (WXHICON)0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
|
@@ -89,6 +89,14 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// module globals
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
#if wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
static bool gs_handleExceptions = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// constants
|
// constants
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1191,3 +1199,40 @@ extern long wxCharsetToCodepage(const wxChar *name)
|
|||||||
|
|
||||||
#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
|
#endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
|
||||||
|
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
// wxApp::OnFatalException() support
|
||||||
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
bool wxHandleFatalExceptions(bool doit)
|
||||||
|
{
|
||||||
|
#if wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
// assume this can only be called from the main thread
|
||||||
|
gs_handleExceptions = doit;
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
#else
|
||||||
|
wxFAIL_MSG(_T("set wxUSE_ON_FATAL_EXCEPTION to 1 to use this function"));
|
||||||
|
|
||||||
|
(void)doit;
|
||||||
|
return FALSE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
|
||||||
|
extern unsigned long wxGlobalSEHandler()
|
||||||
|
{
|
||||||
|
if ( gs_handleExceptions && wxTheApp )
|
||||||
|
{
|
||||||
|
// give the user a chance to do something special about this
|
||||||
|
wxTheApp->OnFatalException();
|
||||||
|
|
||||||
|
// this will execute our handler and terminate the process
|
||||||
|
return EXCEPTION_EXECUTE_HANDLER;
|
||||||
|
}
|
||||||
|
|
||||||
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_ON_FATAL_EXCEPTION
|
||||||
|
|
||||||
|
@@ -1035,7 +1035,7 @@ WXDWORD wxWindowMSW::MSWGetStyle(long flags, WXDWORD *exstyle) const
|
|||||||
// is a more neutral term, we don't necessarily get a sunken effect in
|
// is a more neutral term, we don't necessarily get a sunken effect in
|
||||||
// Windows XP. Instead we get the appropriate style for the theme.
|
// Windows XP. Instead we get the appropriate style for the theme.
|
||||||
|
|
||||||
if (border == wxBORDER_DEFAULT && wxTheApp->GetAuto3D() &&
|
if (border == wxBORDER_DEFAULT &&
|
||||||
IsKindOf(CLASSINFO(wxControl)) &&
|
IsKindOf(CLASSINFO(wxControl)) &&
|
||||||
GetParent() &&
|
GetParent() &&
|
||||||
((GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS))
|
((GetParent()->GetWindowStyleFlag() & wxUSER_COLOURS) != wxUSER_COLOURS))
|
||||||
|
124
src/os2/app.cpp
124
src/os2/app.cpp
@@ -226,10 +226,11 @@ void wxApp::HandleSockets()
|
|||||||
//
|
//
|
||||||
// Initialize
|
// Initialize
|
||||||
//
|
//
|
||||||
bool wxApp::Initialize(
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
HAB vHab
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
|
|
||||||
#if defined(wxUSE_CONSOLEDEBUG)
|
#if defined(wxUSE_CONSOLEDEBUG)
|
||||||
#if wxUSE_CONSOLEDEBUG
|
#if wxUSE_CONSOLEDEBUG
|
||||||
/***********************************************/
|
/***********************************************/
|
||||||
@@ -252,31 +253,20 @@ bool wxApp::Initialize(
|
|||||||
#endif //wxUSE_CONSOLEDEBUG
|
#endif //wxUSE_CONSOLEDEBUG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxBuffer = new wxChar[1500]; // FIXME; why?
|
|
||||||
|
|
||||||
wxClassInfo::InitializeClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxBitmap::InitStandardHandlers();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// OS2 has to have an anchorblock
|
// OS2 has to have an anchorblock
|
||||||
//
|
//
|
||||||
vHab = WinInitialize(0);
|
vHabmain = WinInitialize(0);
|
||||||
|
|
||||||
|
if (!vHabmain)
|
||||||
|
{
|
||||||
|
// TODO: at least give some error message here...
|
||||||
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
if (!vHab)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
else
|
}
|
||||||
vHabmain = vHab;
|
|
||||||
|
wxBuffer = new wxChar[1500]; // FIXME; why?
|
||||||
|
|
||||||
// Some people may wish to use this, but
|
// Some people may wish to use this, but
|
||||||
// probably it shouldn't be here by default.
|
// probably it shouldn't be here by default.
|
||||||
@@ -295,10 +285,8 @@ bool wxApp::Initialize(
|
|||||||
|
|
||||||
// wxSetKeyboardHook(TRUE);
|
// wxSetKeyboardHook(TRUE);
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
|
||||||
if (!wxModule::InitializeModules())
|
|
||||||
return FALSE;
|
|
||||||
RegisterWindowClasses(vHab);
|
RegisterWindowClasses(vHab);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} // end of wxApp::Initialize
|
} // end of wxApp::Initialize
|
||||||
|
|
||||||
@@ -437,45 +425,6 @@ bool wxApp::RegisterWindowClasses(
|
|||||||
//
|
//
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
{
|
{
|
||||||
//
|
|
||||||
// COMMON CLEANUP
|
|
||||||
//
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
|
|
||||||
//
|
|
||||||
// Flush the logged messages if any and install a 'safer' log target: the
|
|
||||||
// default one (wxLogGui) can't be used after the resources are freed just
|
|
||||||
// below and the user suppliedo ne might be even more unsafe (using any
|
|
||||||
// wxWindows GUI function is unsafe starting from now)
|
|
||||||
//
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
|
|
||||||
//
|
|
||||||
// This will flush the old messages if any
|
|
||||||
//
|
|
||||||
delete wxLog::SetActiveTarget(new wxLogStderr);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
|
|
||||||
//
|
|
||||||
// One last chance for pending objects to be cleaned up
|
|
||||||
//
|
|
||||||
wxTheApp->DeletePendingObjects();
|
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
|
|
||||||
//
|
|
||||||
// Destroy all GDI lists, etc.
|
|
||||||
//
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxBitmap::CleanUpHandlers();
|
|
||||||
|
|
||||||
delete[] wxBuffer;
|
delete[] wxBuffer;
|
||||||
wxBuffer = NULL;
|
wxBuffer = NULL;
|
||||||
|
|
||||||
@@ -514,33 +463,11 @@ void wxApp::CleanUp()
|
|||||||
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
((wxEvtHandler&) wxDefaultValidator).ClearEventLocker();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
// Delete Message queue
|
// Delete Message queue
|
||||||
if (wxTheApp->m_hMq)
|
if (wxTheApp->m_hMq)
|
||||||
::WinDestroyMsgQueue(wxTheApp->m_hMq);
|
::WinDestroyMsgQueue(wxTheApp->m_hMq);
|
||||||
|
|
||||||
delete wxTheApp;
|
wxAppBase::CleanUp();
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug(wxT("There were memory leaks."));
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
// wxDebugContext::SetStream(NULL, NULL);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_LOG
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
#endif // wxUSE_LOG
|
|
||||||
} // end of wxApp::CleanUp
|
} // end of wxApp::CleanUp
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
@@ -1051,27 +978,6 @@ bool wxApp::SendIdleEvents(
|
|||||||
return bNeedMore;
|
return bNeedMore;
|
||||||
} // end of wxApp::SendIdleEvents
|
} // end of wxApp::SendIdleEvents
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode* pNode = wxPendingDelete.First();
|
|
||||||
|
|
||||||
while (pNode)
|
|
||||||
{
|
|
||||||
wxObject* pObj = (wxObject *)pNode->Data();
|
|
||||||
|
|
||||||
delete pObj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(pObj))
|
|
||||||
delete pNode;
|
|
||||||
|
|
||||||
//
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
//
|
|
||||||
pNode = wxPendingDelete.First();
|
|
||||||
}
|
|
||||||
} // end of wxApp::DeletePendingObjects
|
|
||||||
|
|
||||||
void wxApp::OnEndSession(
|
void wxApp::OnEndSession(
|
||||||
wxCloseEvent& WXUNUSED(rEvent))
|
wxCloseEvent& WXUNUSED(rEvent))
|
||||||
{
|
{
|
||||||
|
143
src/wxBase.dsp
143
src/wxBase.dsp
@@ -2,8 +2,8 @@
|
|||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
CFG=wxBase - Win32 Debug
|
CFG=wxBase - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
@@ -32,8 +32,6 @@ CFG=wxBase - Win32 Debug
|
|||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "wxBase - Win32 Release Unicode DLL"
|
!IF "$(CFG)" == "wxBase - Win32 Release Unicode DLL"
|
||||||
|
|
||||||
@@ -48,10 +46,13 @@ RSC=rc.exe
|
|||||||
# PROP Intermediate_Dir "../BaseReleaseUnicodeDll"
|
# PROP Intermediate_Dir "../BaseReleaseUnicodeDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/basedllu" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/basedllu" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -59,7 +60,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase250u.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase250u.dll"
|
||||||
# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250u.dll"
|
# ADD LINK32 ../lib/zlib.lib ../lib/regex.lib kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib gdi32.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250u.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode DLL"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode DLL"
|
||||||
|
|
||||||
@@ -74,18 +75,22 @@ LINK32=link.exe
|
|||||||
# PROP Intermediate_Dir "../BaseDebugUnicodeDll"
|
# PROP Intermediate_Dir "../BaseDebugUnicodeDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/basedllud" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/basedllud" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase250ud.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../lib/wxbase250ud.dll" /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250ud.dll"
|
# ADD LINK32 ../lib/zlibd.lib ../lib/regexd.lib kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib gdi32.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250ud.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Release Unicode"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Release Unicode"
|
||||||
|
|
||||||
# PROP BASE Use_MFC 0
|
# PROP BASE Use_MFC 0
|
||||||
@@ -98,8 +103,10 @@ LINK32=link.exe
|
|||||||
# PROP Output_Dir "..\lib"
|
# PROP Output_Dir "..\lib"
|
||||||
# PROP Intermediate_Dir "..\BaseReleaseUnicode"
|
# PROP Intermediate_Dir "..\BaseReleaseUnicode"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/baseu" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/baseu" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -121,13 +128,15 @@ LIB32=link.exe -lib
|
|||||||
# PROP Output_Dir "..\lib"
|
# PROP Output_Dir "..\lib"
|
||||||
# PROP Intermediate_Dir "..\BaseDebugUnicode"
|
# PROP Intermediate_Dir "..\BaseDebugUnicode"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/baseud" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "WIN32" /D "__WXDEBUG__" /D WINVER=0x400 /D "_UNICODE" /D "UNICODE" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/baseud" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D "__WXDEBUG__" /D "_UNICODE" /D "UNICODE" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo /o"../lib/wxbase.bsc"
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\lib\wxbaseud.lib"
|
# ADD LIB32 /nologo /out:"..\lib\wxbaseud.lib"
|
||||||
@@ -145,10 +154,13 @@ LIB32=link.exe -lib
|
|||||||
# PROP Intermediate_Dir "../BaseReleaseDll"
|
# PROP Intermediate_Dir "../BaseReleaseDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/basedll" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/basedll" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D "WXMAKINGDLL" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -156,7 +168,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase250.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../lib/wxbase250.dll"
|
||||||
# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlib.lib ../lib/regex.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250.dll"
|
# ADD LINK32 ../lib/zlib.lib ../lib/regex.lib kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib gdi32.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug DLL"
|
||||||
|
|
||||||
@@ -171,18 +183,21 @@ LINK32=link.exe
|
|||||||
# PROP Intermediate_Dir "../BaseDebugDll"
|
# PROP Intermediate_Dir "../BaseDebugDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_USRDLL" /D "WXBASEDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/basedlld" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /D "WXMAKINGDLL" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/basedlld" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D "WXMAKINGDLL" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxbase250d.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../lib/wxbase250d.dll" /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ../lib/zlibd.lib ../lib/regexd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250d.dll"
|
# ADD LINK32 ../lib/zlibd.lib ../lib/regexd.lib kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib gdi32.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxbase250d.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Release"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Release"
|
||||||
|
|
||||||
@@ -196,8 +211,10 @@ LINK32=link.exe
|
|||||||
# PROP Output_Dir "..\lib"
|
# PROP Output_Dir "..\lib"
|
||||||
# PROP Intermediate_Dir "..\BaseRelease"
|
# PROP Intermediate_Dir "..\BaseRelease"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/base" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/base" /I "../include" /I "./regex" /I "./zlib" /D "NDEBUG" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -205,7 +222,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\lib\wxbase.lib"
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug"
|
||||||
|
|
||||||
@@ -219,13 +236,15 @@ LIB32=link.exe -lib
|
|||||||
# PROP Output_Dir "..\lib"
|
# PROP Output_Dir "..\lib"
|
||||||
# PROP Intermediate_Dir "..\BaseDebug"
|
# PROP Intermediate_Dir "..\BaseDebug"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/based" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D wxUSE_GUI=0 /D "WIN32" /D "__WXDEBUG__" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/based" /I "../include" /I "./regex" /I "./zlib" /D "_DEBUG" /D "__WXDEBUG__" /D wxUSE_BASE=1 /D wxUSE_GUI=0 /D "WIN32" /D WINVER=0x400 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo /o"../lib/wxbase.bsc"
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\lib\wxbased.lib"
|
# ADD LIB32 /nologo /out:"..\lib\wxbased.lib"
|
||||||
@@ -242,7 +261,6 @@ LIB32=link.exe -lib
|
|||||||
# Name "wxBase - Win32 Debug DLL"
|
# Name "wxBase - Win32 Debug DLL"
|
||||||
# Name "wxBase - Win32 Release"
|
# Name "wxBase - Win32 Release"
|
||||||
# Name "wxBase - Win32 Debug"
|
# Name "wxBase - Win32 Debug"
|
||||||
|
|
||||||
# Begin Group "Common Files"
|
# Begin Group "Common Files"
|
||||||
|
|
||||||
# PROP Default_Filter ""
|
# PROP Default_Filter ""
|
||||||
@@ -304,6 +322,11 @@ SOURCE=.\common\event.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\extended.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\ffile.cpp
|
SOURCE=.\common\ffile.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -360,6 +383,10 @@ SOURCE=.\common\http.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\init.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\intl.cpp
|
SOURCE=.\common\intl.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -472,6 +499,11 @@ SOURCE=.\common\txtstrm.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\unzip.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\url.cpp
|
SOURCE=.\common\url.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -498,33 +530,12 @@ SOURCE=.\common\zipstrm.cpp
|
|||||||
|
|
||||||
SOURCE=.\common\zstream.cpp
|
SOURCE=.\common\zstream.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\common\init.cpp
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\common\extended.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\common\unzip.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "MSW Files"
|
# Begin Group "MSW Files"
|
||||||
|
|
||||||
# PROP Default_Filter ""
|
# PROP Default_Filter ""
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\dummy.cpp
|
|
||||||
# ADD CPP /Yc"wx/wxprec.h"
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\basemsw.cpp
|
SOURCE=.\msw\basemsw.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -537,6 +548,21 @@ SOURCE=.\msw\dir.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\dummy.cpp
|
||||||
|
# ADD CPP /Yc"wx/wxprec.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\gsocket.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\gsockmsw.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\main.cpp
|
SOURCE=.\msw\main.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -575,18 +601,6 @@ SOURCE=.\msw\utilsexc.cpp
|
|||||||
|
|
||||||
SOURCE=.\msw\volume.cpp
|
SOURCE=.\msw\volume.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\gsocket.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\gsockmsw.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Headers"
|
# Begin Group "Headers"
|
||||||
|
|
||||||
@@ -597,7 +611,9 @@ SOURCE=.\msw\gsockmsw.c
|
|||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\wx\msw\setup.h
|
SOURCE=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
!IF "$(CFG)" == "wxBase - Win32 Release Unicode DLL"
|
!IF "$(CFG)" == "wxBase - Win32 Release Unicode DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -605,14 +621,19 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\basedllu\wx\setup.h
|
copy "$(InputPath)" ..\lib\basedllu\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode DLL"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
"../lib/basedllud/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"../lib/basedllud/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
copy "$(InputPath)" ..\lib\basedllud\wx\setup.h
|
copy "$(InputPath)" ..\lib\basedllud\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Release Unicode"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Release Unicode"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -620,7 +641,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\baseu\wx\setup.h
|
copy "$(InputPath)" ..\lib\baseu\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug Unicode"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -628,7 +651,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\baseud\wx\setup.h
|
copy "$(InputPath)" ..\lib\baseud\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Release DLL"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Release DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -636,14 +661,19 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\basedll\wx\setup.h
|
copy "$(InputPath)" ..\lib\basedll\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
"../lib/basedlld/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"../lib/basedlld/wx/setup.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
copy "$(InputPath)" ..\lib\basedlld\wx\setup.h
|
copy "$(InputPath)" ..\lib\basedlld\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Release"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Release"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -651,7 +681,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\base\wx\setup.h
|
copy "$(InputPath)" ..\lib\base\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug"
|
!ELSEIF "$(CFG)" == "wxBase - Win32 Debug"
|
||||||
|
|
||||||
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
# Begin Custom Build - Copying $(InputPath) to $(TargetDir)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -659,6 +691,7 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\based\wx\setup.h
|
copy "$(InputPath)" ..\lib\based\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
@@ -1022,7 +1055,6 @@ SOURCE=..\include\wx\zipstrm.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\zstream.h
|
SOURCE=..\include\wx\zstream.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "MSW"
|
# Begin Group "MSW"
|
||||||
|
|
||||||
@@ -1051,7 +1083,6 @@ SOURCE=..\include\wx\msw\mimetype.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\msw\winundef.h
|
SOURCE=..\include\wx\msw\winundef.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
|
@@ -9,12 +9,12 @@ CFG=wxWindows - Win32 Debug
|
|||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
!MESSAGE use the Export Makefile command and run
|
!MESSAGE use the Export Makefile command and run
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "wxWindows.mak".
|
!MESSAGE NMAKE /f "wxMSW.mak".
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE You can specify a configuration when running NMAKE
|
!MESSAGE You can specify a configuration when running NMAKE
|
||||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE NMAKE /f "wxWindows.mak" CFG="wxWindows - Win32 Debug"
|
!MESSAGE NMAKE /f "wxMSW.mak" CFG="wxWindows - Win32 Debug"
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
!MESSAGE Possible choices for configuration are:
|
!MESSAGE Possible choices for configuration are:
|
||||||
!MESSAGE
|
!MESSAGE
|
||||||
@@ -197,7 +197,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw250d.dll" /pdbtype:sept
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw250d.dll" /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250d.dll"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib ../lib/wxbase250d.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250d.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LIB32=link.exe -lib
|
LIB32=link.exe -lib
|
||||||
# ADD BASE LIB32 /nologo
|
# ADD BASE LIB32 /nologo
|
||||||
# ADD LIB32 /nologo /out:"..\lib\wxmsw.lib"
|
# ADD LIB32 /nologo
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug"
|
||||||
|
|
||||||
|
@@ -2,8 +2,8 @@
|
|||||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
# ** DO NOT EDIT **
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
|
||||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||||
|
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||||
|
|
||||||
CFG=wxWindows - Win32 Debug
|
CFG=wxWindows - Win32 Debug
|
||||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||||
@@ -32,8 +32,6 @@ CFG=wxWindows - Win32 Debug
|
|||||||
# PROP AllowPerConfigDependencies 0
|
# PROP AllowPerConfigDependencies 0
|
||||||
# PROP Scc_ProjName ""
|
# PROP Scc_ProjName ""
|
||||||
# PROP Scc_LocalPath ""
|
# PROP Scc_LocalPath ""
|
||||||
CPP=cl.exe
|
|
||||||
RSC=rc.exe
|
|
||||||
|
|
||||||
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
|
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
|
||||||
|
|
||||||
@@ -48,10 +46,13 @@ RSC=rc.exe
|
|||||||
# PROP Intermediate_Dir "../ReleaseUnicodeDll"
|
# PROP Intermediate_Dir "../ReleaseUnicodeDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdllu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdllu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "NDEBUG" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -74,17 +75,20 @@ LINK32=link.exe
|
|||||||
# PROP Intermediate_Dir "../DebugUnicodeDll"
|
# PROP Intermediate_Dir "../DebugUnicodeDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdllud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdllud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "_DEBUG" /D "WXMAKINGDLL" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw250ud.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw250ud.dll" /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250ud.dll"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250ud.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
|
||||||
@@ -99,8 +103,10 @@ LINK32=link.exe
|
|||||||
# PROP Output_Dir "../lib"
|
# PROP Output_Dir "../lib"
|
||||||
# PROP Intermediate_Dir "../ReleaseUnicode"
|
# PROP Intermediate_Dir "../ReleaseUnicode"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswu" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "NDEBUG" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -122,8 +128,10 @@ LIB32=link.exe -lib
|
|||||||
# PROP Output_Dir "../lib"
|
# PROP Output_Dir "../lib"
|
||||||
# PROP Intermediate_Dir "../DebugUnicode"
|
# PROP Intermediate_Dir "../DebugUnicode"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /D "_UNICODE" /D "UNICODE" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswud" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_DEBUG" /D "__WXDEBUG__" /D "_UNICODE" /D "UNICODE" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -146,10 +154,13 @@ LIB32=link.exe -lib
|
|||||||
# PROP Intermediate_Dir "../ReleaseDll"
|
# PROP Intermediate_Dir "../ReleaseDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdll" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/mswdll" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "NDEBUG" /D "WXMAKINGDLL" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "NDEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -172,17 +183,20 @@ LINK32=link.exe
|
|||||||
# PROP Intermediate_Dir "../DebugDll"
|
# PROP Intermediate_Dir "../DebugDll"
|
||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
|
# ADD BASE CPP /nologo /MDd /W4 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "WXWINDLL_EXPORTS" /YX /FD /GZ /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdlld" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "WIN32" /D "_DEBUG" /D WINVER=0x0400 /D "STRICT" /D "WXMAKINGDLL" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswdlld" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_USRDLL" /D "_DEBUG" /D "WXMAKINGDLL" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
MTL=midl.exe
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||||
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
# ADD RSC /l 0x409 /i "../include" /d "_DEBUG"
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=link.exe
|
LINK32=link.exe
|
||||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /pdbtype:sept /out:"../lib/wxmsw250d.dll"
|
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /dll /debug /machine:I386 /out:"../lib/wxmsw250d.dll" /pdbtype:sept
|
||||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250d.dll"
|
# ADD LINK32 kernel32.lib user32.lib gdi32.lib advapi32.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib odbc32.lib uuid.lib rpcrt4.lib comctl32.lib wsock32.lib winmm.lib ..\lib\jpegd.lib ..\lib\tiffd.lib ..\lib\pngd.lib ..\lib\regexd.lib ..\lib\zlibd.lib /nologo /version:2.5 /dll /machine:I386 /out:"../lib/wxmsw250d.dll"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
||||||
@@ -197,8 +211,10 @@ LINK32=link.exe
|
|||||||
# PROP Output_Dir "../lib"
|
# PROP Output_Dir "../lib"
|
||||||
# PROP Intermediate_Dir "../Release"
|
# PROP Intermediate_Dir "../Release"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MD /W4 /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/msw" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "NDEBUG" /D WINVER=0x0400 /D "STRICT" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MD /W4 /O2 /I "../lib/msw" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "NDEBUG" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -220,8 +236,10 @@ LIB32=link.exe -lib
|
|||||||
# PROP Output_Dir "../lib"
|
# PROP Output_Dir "../lib"
|
||||||
# PROP Intermediate_Dir "../Debug"
|
# PROP Intermediate_Dir "../Debug"
|
||||||
# PROP Target_Dir ""
|
# PROP Target_Dir ""
|
||||||
|
CPP=cl.exe
|
||||||
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
# ADD BASE CPP /nologo /MDd /W4 /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||||
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswd" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "WIN32" /D "_DEBUG" /D "__WXDEBUG__" /D WINVER=0x0400 /D "STRICT" /D "__WXBASE__" /Yu"wx/wxprec.h" /FD /c
|
# ADD CPP /nologo /MDd /W4 /Zi /Od /I "../lib/mswd" /I "../include" /I "./zlib" /I "./jpeg" /I "./png" /I "./regex" /I "./tiff" /D "_DEBUG" /D "__WXDEBUG__" /D "WIN32" /D WINVER=0x0400 /D "STRICT" /D wxUSE_BASE=1 /Yu"wx/wxprec.h" /FD /c
|
||||||
|
RSC=rc.exe
|
||||||
# ADD BASE RSC /l 0x409
|
# ADD BASE RSC /l 0x409
|
||||||
# ADD RSC /l 0x409
|
# ADD RSC /l 0x409
|
||||||
BSC32=bscmake.exe
|
BSC32=bscmake.exe
|
||||||
@@ -396,6 +414,11 @@ SOURCE=.\common\event.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\extended.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\fddlgcmn.cpp
|
SOURCE=.\common\fddlgcmn.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -544,6 +567,10 @@ SOURCE=.\common\imagxpm.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\init.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\intl.cpp
|
SOURCE=.\common\intl.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -736,6 +763,11 @@ SOURCE=.\common\txtstrm.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\common\unzip.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\common\url.cpp
|
SOURCE=.\common\url.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -782,18 +814,6 @@ SOURCE=.\common\zipstrm.cpp
|
|||||||
|
|
||||||
SOURCE=.\common\zstream.cpp
|
SOURCE=.\common\zstream.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\common\extended.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\common\unzip.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Generic Files"
|
# Begin Group "Generic Files"
|
||||||
|
|
||||||
@@ -910,7 +930,6 @@ SOURCE=.\generic\treectlg.cpp
|
|||||||
|
|
||||||
SOURCE=.\generic\wizard.cpp
|
SOURCE=.\generic\wizard.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "wxHTML Files"
|
# Begin Group "wxHTML Files"
|
||||||
|
|
||||||
@@ -995,18 +1014,44 @@ SOURCE=.\html\m_tables.cpp
|
|||||||
|
|
||||||
SOURCE=.\html\winpars.cpp
|
SOURCE=.\html\winpars.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "MSW Files"
|
# Begin Group "MSW Files"
|
||||||
|
|
||||||
|
# PROP Default_Filter ""
|
||||||
|
# Begin Group "OLE Files"
|
||||||
|
|
||||||
# PROP Default_Filter ""
|
# PROP Default_Filter ""
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\dummy.cpp
|
SOURCE=.\msw\ole\access.cpp
|
||||||
# ADD CPP /Yc"wx/wxprec.h"
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\automtn.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\dataobj.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\dropsrc.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\droptgt.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\oleutils.cpp
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\ole\uuid.cpp
|
||||||
|
# End Source File
|
||||||
|
# End Group
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\accel.cpp
|
SOURCE=.\msw\accel.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -1131,6 +1176,11 @@ SOURCE=.\msw\dragimag.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\dummy.cpp
|
||||||
|
# ADD CPP /Yc"wx/wxprec.h"
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\enhmeta.cpp
|
SOURCE=.\msw\enhmeta.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -1183,6 +1233,16 @@ SOURCE=.\msw\glcanvas.cpp
|
|||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\gsocket.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\msw\gsockmsw.c
|
||||||
|
# SUBTRACT CPP /YX /Yc /Yu
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\msw\helpbest.cpp
|
SOURCE=.\msw\helpbest.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
@@ -1421,51 +1481,6 @@ SOURCE=.\msw\wave.cpp
|
|||||||
|
|
||||||
SOURCE=.\msw\window.cpp
|
SOURCE=.\msw\window.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\gsocket.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\gsockmsw.c
|
|
||||||
# SUBTRACT CPP /YX /Yc /Yu
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# Begin Group "OLE Files"
|
|
||||||
|
|
||||||
# PROP Default_Filter ""
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\access.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\automtn.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\dataobj.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\dropsrc.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\droptgt.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\oleutils.cpp
|
|
||||||
# End Source File
|
|
||||||
# Begin Source File
|
|
||||||
|
|
||||||
SOURCE=.\msw\ole\uuid.cpp
|
|
||||||
# End Source File
|
|
||||||
|
|
||||||
# End Group
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Headers"
|
# Begin Group "Headers"
|
||||||
|
|
||||||
@@ -1476,7 +1491,9 @@ SOURCE=.\msw\ole\uuid.cpp
|
|||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=..\include\wx\msw\setup.h
|
SOURCE=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
|
!IF "$(CFG)" == "wxWindows - Win32 Release Unicode DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswdllu\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswdllu\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1484,7 +1501,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswdllu\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswdllu\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswdllud\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswdllud\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1492,7 +1511,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswdllud\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswdllud\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release Unicode"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswu\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswu\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1500,7 +1521,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswu\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswu\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug Unicode"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswud\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswud\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1508,7 +1531,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswud\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswud\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswdll\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswdll\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1516,7 +1541,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswdll\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswdll\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug DLL"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswdlld\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswdlld\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1524,7 +1551,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswdlld\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswdlld\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Release"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\msw\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\msw\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1532,7 +1561,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\msw\wx\setup.h
|
copy "$(InputPath)" ..\lib\msw\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug"
|
!ELSEIF "$(CFG)" == "wxWindows - Win32 Debug"
|
||||||
|
|
||||||
# Begin Custom Build - Creating ..\lib\mswd\wx\setup.h from $(InputPath)
|
# Begin Custom Build - Creating ..\lib\mswd\wx\setup.h from $(InputPath)
|
||||||
InputPath=..\include\wx\msw\setup.h
|
InputPath=..\include\wx\msw\setup.h
|
||||||
|
|
||||||
@@ -1540,7 +1571,9 @@ InputPath=..\include\wx\msw\setup.h
|
|||||||
copy "$(InputPath)" ..\lib\mswd\wx\setup.h
|
copy "$(InputPath)" ..\lib\mswd\wx\setup.h
|
||||||
|
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Common"
|
# Begin Group "Common"
|
||||||
@@ -2490,7 +2523,6 @@ SOURCE=..\include\wx\zipstrm.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\zstream.h
|
SOURCE=..\include\wx\zstream.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "MSW"
|
# Begin Group "MSW"
|
||||||
|
|
||||||
@@ -2867,7 +2899,6 @@ SOURCE=..\include\wx\msw\window.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\msw\winundef.h
|
SOURCE=..\include\wx\msw\winundef.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "Generic"
|
# Begin Group "Generic"
|
||||||
|
|
||||||
@@ -3028,7 +3059,6 @@ SOURCE=..\include\wx\generic\treectlg.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\generic\wizard.h
|
SOURCE=..\include\wx\generic\wizard.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# Begin Group "HTML"
|
# Begin Group "HTML"
|
||||||
|
|
||||||
@@ -3085,7 +3115,6 @@ SOURCE=..\include\wx\html\m_templ.h
|
|||||||
|
|
||||||
SOURCE=..\include\wx\html\winpars.h
|
SOURCE=..\include\wx\html\winpars.h
|
||||||
# End Source File
|
# End Source File
|
||||||
|
|
||||||
# End Group
|
# End Group
|
||||||
# End Group
|
# End Group
|
||||||
# End Target
|
# End Target
|
||||||
|
@@ -93,33 +93,19 @@ BEGIN_EVENT_TABLE(wxApp, wxEvtHandler)
|
|||||||
EVT_IDLE(wxApp::OnIdle)
|
EVT_IDLE(wxApp::OnIdle)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
|
|
||||||
bool wxApp::Initialize()
|
bool wxApp::Initialize(int argc, wxChar **argv)
|
||||||
{
|
{
|
||||||
wxClassInfo::InitializeClasses();
|
if ( !wxAppBase::Initialize(argc, argv) )
|
||||||
|
return false;
|
||||||
|
|
||||||
#if wxUSE_INTL
|
#if wxUSE_INTL
|
||||||
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
wxFont::SetDefaultEncoding(wxLocale::GetSystemEncoding());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// GL: I'm annoyed ... I don't know where to put this and I don't want to
|
|
||||||
// create a module for that as it's part of the core.
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
wxPendingEventsLocker = new wxCriticalSection();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxTheColourDatabase = new wxColourDatabase(wxKEY_STRING);
|
|
||||||
wxTheColourDatabase->Initialize();
|
|
||||||
|
|
||||||
wxInitializeStockLists();
|
|
||||||
wxInitializeStockObjects();
|
|
||||||
|
|
||||||
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
wxWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
||||||
wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
wxClientWidgetHashTable = new wxHashTable(wxKEY_INTEGER);
|
||||||
|
|
||||||
wxModule::RegisterModules();
|
return true;
|
||||||
if (!wxModule::InitializeModules()) return FALSE;
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::CleanUp()
|
void wxApp::CleanUp()
|
||||||
@@ -129,42 +115,7 @@ void wxApp::CleanUp()
|
|||||||
delete wxClientWidgetHashTable;
|
delete wxClientWidgetHashTable;
|
||||||
wxClientWidgetHashTable = NULL;
|
wxClientWidgetHashTable = NULL;
|
||||||
|
|
||||||
wxModule::CleanUpModules();
|
wxAppBase::CleanUp();
|
||||||
|
|
||||||
delete wxTheColourDatabase;
|
|
||||||
wxTheColourDatabase = NULL;
|
|
||||||
|
|
||||||
wxDeleteStockObjects();
|
|
||||||
|
|
||||||
wxDeleteStockLists();
|
|
||||||
|
|
||||||
delete wxTheApp;
|
|
||||||
wxTheApp = NULL;
|
|
||||||
|
|
||||||
wxClassInfo::CleanUpClasses();
|
|
||||||
|
|
||||||
#if wxUSE_THREADS
|
|
||||||
delete wxPendingEvents;
|
|
||||||
delete wxPendingEventsLocker;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if (defined(__WXDEBUG__) && wxUSE_MEMORY_TRACING) || wxUSE_DEBUG_CONTEXT
|
|
||||||
// At this point we want to check if there are any memory
|
|
||||||
// blocks that aren't part of the wxDebugContext itself,
|
|
||||||
// as a special case. Then when dumping we need to ignore
|
|
||||||
// wxDebugContext, too.
|
|
||||||
if (wxDebugContext::CountObjectsLeft(TRUE) > 0)
|
|
||||||
{
|
|
||||||
wxLogDebug("There were memory leaks.");
|
|
||||||
wxDebugContext::Dump();
|
|
||||||
wxDebugContext::PrintStatistics();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
wxLog::DontCreateOnDemand();
|
|
||||||
// do it as the very last thing because everything else can log messages
|
|
||||||
delete wxLog::SetActiveTarget(NULL);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// NB: argc and argv may be changed here, pass by reference!
|
// NB: argc and argv may be changed here, pass by reference!
|
||||||
@@ -935,24 +886,6 @@ bool wxApp::SendIdleEvents(wxWindow* win)
|
|||||||
return needMore;
|
return needMore;
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxApp::DeletePendingObjects()
|
|
||||||
{
|
|
||||||
wxNode *node = wxPendingDelete.GetFirst();
|
|
||||||
while (node)
|
|
||||||
{
|
|
||||||
wxObject *obj = (wxObject *)node->GetData();
|
|
||||||
|
|
||||||
delete obj;
|
|
||||||
|
|
||||||
if (wxPendingDelete.Member(obj))
|
|
||||||
delete node;
|
|
||||||
|
|
||||||
// Deleting one object may have deleted other pending
|
|
||||||
// objects, so start from beginning of list again.
|
|
||||||
node = wxPendingDelete.GetFirst();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Create display, and other initialization
|
// Create display, and other initialization
|
||||||
bool wxApp::OnInitGui()
|
bool wxApp::OnInitGui()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user