Merge with develop
--HG-- branch : feature-crashreport+develop
This commit is contained in:
commit
ea9e32f46d
11 changed files with 62 additions and 13 deletions
|
@ -38,7 +38,7 @@ ELSEIF(WIN32)
|
||||||
ENDIF(UNIX)
|
ENDIF(UNIX)
|
||||||
|
|
||||||
FIND_LIBRARY(LIBOVR_LIBRARY
|
FIND_LIBRARY(LIBOVR_LIBRARY
|
||||||
NAMES ovr
|
NAMES ovr libovr
|
||||||
PATHS
|
PATHS
|
||||||
$ENV{LIBOVR_DIR}/${LIBOVR_LIBRARY_BUILD_PATH}
|
$ENV{LIBOVR_DIR}/${LIBOVR_LIBRARY_BUILD_PATH}
|
||||||
/usr/local/lib
|
/usr/local/lib
|
||||||
|
|
|
@ -88,6 +88,8 @@ namespace NLMISC
|
||||||
virtual void setNoAssert(bool noAssert) =0;
|
virtual void setNoAssert(bool noAssert) =0;
|
||||||
virtual bool getAlreadyCreateSharedAmongThreads() =0;
|
virtual bool getAlreadyCreateSharedAmongThreads() =0;
|
||||||
virtual void setAlreadyCreateSharedAmongThreads(bool b) =0;
|
virtual void setAlreadyCreateSharedAmongThreads(bool b) =0;
|
||||||
|
virtual bool isWindowedApplication() = 0;
|
||||||
|
virtual void setWindowedApplication(bool b = true) = 0;
|
||||||
//@}
|
//@}
|
||||||
protected:
|
protected:
|
||||||
/// Called by derived class to finalize initialisation of context
|
/// Called by derived class to finalize initialisation of context
|
||||||
|
@ -131,6 +133,8 @@ namespace NLMISC
|
||||||
virtual void setNoAssert(bool noAssert);
|
virtual void setNoAssert(bool noAssert);
|
||||||
virtual bool getAlreadyCreateSharedAmongThreads();
|
virtual bool getAlreadyCreateSharedAmongThreads();
|
||||||
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
||||||
|
virtual bool isWindowedApplication();
|
||||||
|
virtual void setWindowedApplication(bool b);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Singleton registry
|
/// Singleton registry
|
||||||
|
@ -147,6 +151,7 @@ namespace NLMISC
|
||||||
bool DebugNeedAssert;
|
bool DebugNeedAssert;
|
||||||
bool NoAssert;
|
bool NoAssert;
|
||||||
bool AlreadyCreateSharedAmongThreads;
|
bool AlreadyCreateSharedAmongThreads;
|
||||||
|
bool WindowedApplication;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** This class implements the context interface for the a library module.
|
/** This class implements the context interface for the a library module.
|
||||||
|
@ -183,6 +188,8 @@ namespace NLMISC
|
||||||
virtual void setNoAssert(bool noAssert);
|
virtual void setNoAssert(bool noAssert);
|
||||||
virtual bool getAlreadyCreateSharedAmongThreads();
|
virtual bool getAlreadyCreateSharedAmongThreads();
|
||||||
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
virtual void setAlreadyCreateSharedAmongThreads(bool b);
|
||||||
|
virtual bool isWindowedApplication();
|
||||||
|
virtual void setWindowedApplication(bool b);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Pointer to the application context.
|
/// Pointer to the application context.
|
||||||
|
|
|
@ -42,11 +42,7 @@ class CGtkDisplayer : public NLMISC::CWindowDisplayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CGtkDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName)
|
CGtkDisplayer (const char *displayerName = "");
|
||||||
{
|
|
||||||
needSlashR = false;
|
|
||||||
createLabel ("@Clear|CLEAR");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~CGtkDisplayer ();
|
virtual ~CGtkDisplayer ();
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
# endif
|
# endif
|
||||||
# ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
# define NL_COMP_VC
|
# define NL_COMP_VC
|
||||||
# if _MSC_VER >= 1700
|
# if _MSC_VER >= 1800
|
||||||
# define NL_COMP_VC12
|
# define NL_COMP_VC12
|
||||||
# define NL_COMP_VC_VERSION 120
|
# define NL_COMP_VC_VERSION 120
|
||||||
# elif _MSC_VER >= 1700
|
# elif _MSC_VER >= 1700
|
||||||
|
@ -463,7 +463,11 @@ typedef uint16 ucchar;
|
||||||
|
|
||||||
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
|
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)
|
||||||
#ifdef NL_COMP_VC
|
#ifdef NL_COMP_VC
|
||||||
# if (NL_COMP_VC_VERSION >= 80)
|
# if (NL_COMP_VC_VERSION >= 120)
|
||||||
|
# define INT64_CONSTANT(c) (c##LL)
|
||||||
|
# define SINT64_CONSTANT(c) (c##LL)
|
||||||
|
# define UINT64_CONSTANT(c) (c##ULL)
|
||||||
|
# elif (NL_COMP_VC_VERSION >= 80)
|
||||||
# define INT64_CONSTANT(c) (c##LL)
|
# define INT64_CONSTANT(c) (c##LL)
|
||||||
# define SINT64_CONSTANT(c) (c##LL)
|
# define SINT64_CONSTANT(c) (c##LL)
|
||||||
# define UINT64_CONSTANT(c) (c##LL)
|
# define UINT64_CONSTANT(c) (c##LL)
|
||||||
|
|
|
@ -57,11 +57,7 @@ class CWinDisplayer : public NLMISC::CWindowDisplayer
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
CWinDisplayer (const char *displayerName = "") : CWindowDisplayer(displayerName), Exit(false)
|
CWinDisplayer(const char *displayerName = "");
|
||||||
{
|
|
||||||
needSlashR = true;
|
|
||||||
createLabel ("@Clear|CLEAR");
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual ~CWinDisplayer ();
|
virtual ~CWinDisplayer ();
|
||||||
|
|
||||||
|
|
|
@ -114,6 +114,7 @@ CApplicationContext::CApplicationContext()
|
||||||
DebugNeedAssert = false;
|
DebugNeedAssert = false;
|
||||||
NoAssert = false;
|
NoAssert = false;
|
||||||
AlreadyCreateSharedAmongThreads = false;
|
AlreadyCreateSharedAmongThreads = false;
|
||||||
|
WindowedApplication = false;
|
||||||
|
|
||||||
contextReady();
|
contextReady();
|
||||||
}
|
}
|
||||||
|
@ -242,6 +243,16 @@ void CApplicationContext::setAlreadyCreateSharedAmongThreads(bool b)
|
||||||
AlreadyCreateSharedAmongThreads = b;
|
AlreadyCreateSharedAmongThreads = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CApplicationContext::isWindowedApplication()
|
||||||
|
{
|
||||||
|
return WindowedApplication;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CApplicationContext::setWindowedApplication(bool b)
|
||||||
|
{
|
||||||
|
WindowedApplication = b;
|
||||||
|
}
|
||||||
|
|
||||||
CLibraryContext::CLibraryContext(INelContext &applicationContext)
|
CLibraryContext::CLibraryContext(INelContext &applicationContext)
|
||||||
: _ApplicationContext(&applicationContext)
|
: _ApplicationContext(&applicationContext)
|
||||||
{
|
{
|
||||||
|
@ -430,6 +441,16 @@ void CLibraryContext::setAlreadyCreateSharedAmongThreads(bool b)
|
||||||
_ApplicationContext->setAlreadyCreateSharedAmongThreads(b);
|
_ApplicationContext->setAlreadyCreateSharedAmongThreads(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CLibraryContext::isWindowedApplication()
|
||||||
|
{
|
||||||
|
return _ApplicationContext->isWindowedApplication();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CLibraryContext::setWindowedApplication(bool b)
|
||||||
|
{
|
||||||
|
_ApplicationContext->setWindowedApplication(b);
|
||||||
|
}
|
||||||
|
|
||||||
void initNelLibrary(NLMISC::CLibrary &lib)
|
void initNelLibrary(NLMISC::CLibrary &lib)
|
||||||
{
|
{
|
||||||
nlassert(lib.isLibraryLoaded());
|
nlassert(lib.isLibraryLoaded());
|
||||||
|
|
|
@ -1223,6 +1223,11 @@ void createDebug (const char *logPath, bool logInFile, bool eraseLastLog)
|
||||||
#endif // LOG_IN_FILE
|
#endif // LOG_IN_FILE
|
||||||
DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD");
|
DefaultMemDisplayer = new CMemDisplayer ("DEFAULT_MD");
|
||||||
|
|
||||||
|
#ifdef NL_OS_WINDOWS
|
||||||
|
if (GetConsoleWindow() == NULL)
|
||||||
|
INelContext::getInstance().setWindowedApplication(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
initDebug2(logInFile);
|
initDebug2(logInFile);
|
||||||
|
|
||||||
INelContext::getInstance().setAlreadyCreateSharedAmongThreads(true);
|
INelContext::getInstance().setAlreadyCreateSharedAmongThreads(true);
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#pragma comment(lib, "gthread-1.3.lib")
|
#pragma comment(lib, "gthread-1.3.lib")
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "nel/misc/app_context.h"
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
#include "nel/misc/command.h"
|
#include "nel/misc/command.h"
|
||||||
#include "nel/misc/thread.h"
|
#include "nel/misc/thread.h"
|
||||||
|
@ -59,6 +60,14 @@ static GtkWidget *hrootbox = NULL, *scrolled_win2 = NULL;
|
||||||
// Functions
|
// Functions
|
||||||
//
|
//
|
||||||
|
|
||||||
|
CGtkDisplayer (const char *displayerName) : CWindowDisplayer(displayerName)
|
||||||
|
{
|
||||||
|
needSlashR = false;
|
||||||
|
createLabel ("@Clear|CLEAR");
|
||||||
|
|
||||||
|
INelContext::getInstance().setWindowedApplication(true);
|
||||||
|
}
|
||||||
|
|
||||||
CGtkDisplayer::~CGtkDisplayer ()
|
CGtkDisplayer::~CGtkDisplayer ()
|
||||||
{
|
{
|
||||||
if (_Init)
|
if (_Init)
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
#include <commctrl.h>
|
#include <commctrl.h>
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
#include "nel/misc/app_context.h"
|
||||||
#include "nel/misc/path.h"
|
#include "nel/misc/path.h"
|
||||||
#include "nel/misc/command.h"
|
#include "nel/misc/command.h"
|
||||||
#include "nel/misc/thread.h"
|
#include "nel/misc/thread.h"
|
||||||
|
@ -41,6 +42,13 @@ namespace NLMISC {
|
||||||
|
|
||||||
static CHARFORMAT2 CharFormat;
|
static CHARFORMAT2 CharFormat;
|
||||||
|
|
||||||
|
CWinDisplayer::CWinDisplayer(const char *displayerName) : CWindowDisplayer(displayerName), Exit(false)
|
||||||
|
{
|
||||||
|
needSlashR = true;
|
||||||
|
createLabel("@Clear|CLEAR");
|
||||||
|
|
||||||
|
INelContext::getInstance().setWindowedApplication(true);
|
||||||
|
}
|
||||||
|
|
||||||
CWinDisplayer::~CWinDisplayer ()
|
CWinDisplayer::~CWinDisplayer ()
|
||||||
{
|
{
|
||||||
|
|
|
@ -365,6 +365,8 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
createDebug();
|
createDebug();
|
||||||
|
|
||||||
|
INelContext::getInstance().setWindowedApplication(true);
|
||||||
|
|
||||||
#ifndef NL_DEBUG
|
#ifndef NL_DEBUG
|
||||||
INelContext::getInstance().getDebugLog()->removeDisplayer("DEFAULT_SD");
|
INelContext::getInstance().getDebugLog()->removeDisplayer("DEFAULT_SD");
|
||||||
INelContext::getInstance().getInfoLog()->removeDisplayer("DEFAULT_SD");
|
INelContext::getInstance().getInfoLog()->removeDisplayer("DEFAULT_SD");
|
||||||
|
|
|
@ -1264,6 +1264,7 @@ sint main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
// use log.log if NEL_LOG_IN_FILE and SBCLIENT_USE_LOG_LOG defined as 1
|
// use log.log if NEL_LOG_IN_FILE and SBCLIENT_USE_LOG_LOG defined as 1
|
||||||
createDebug(NULL, SBCLIENT_USE_LOG_LOG, false);
|
createDebug(NULL, SBCLIENT_USE_LOG_LOG, false);
|
||||||
|
INelContext::getInstance().setWindowedApplication(true);
|
||||||
|
|
||||||
#if SBCLIENT_USE_LOG
|
#if SBCLIENT_USE_LOG
|
||||||
// create snowballs_client.log
|
// create snowballs_client.log
|
||||||
|
|
Loading…
Reference in a new issue