EgtInterface 1.6c9 :
- EgtGraphics, EgtExchange ed EgtMachKernel sono caricabili opzionalmente.
This commit is contained in:
+41
-23
@@ -15,14 +15,14 @@
|
||||
#include "stdafx.h"
|
||||
#include "API.h"
|
||||
#include "LUA_Base.h"
|
||||
#include "DllGraphics.h"
|
||||
#include "DllExchange.h"
|
||||
#include "DllMachKernel.h"
|
||||
#include "/EgtDev/Include/EInAPI.h"
|
||||
#include "/EgtDev/Include/EInDllMain.h"
|
||||
#include "/EgtDev/Include/EGnDllMain.h"
|
||||
#include "/EgtDev/Include/ENkDllMain.h"
|
||||
#include "/EgtDev/Include/EMkDllMain.h"
|
||||
#include "/EgtDev/Include/EGkDllMain.h"
|
||||
#include "/EgtDev/Include/EExDllMain.h"
|
||||
#include "/EgtDev/Include/EGrDllMain.h"
|
||||
#include "/EgtDev/Include/EGnStringUtils.h"
|
||||
#include "/EgtDev/Include/EGnStringConverter.h"
|
||||
#include "/EgtDev/Include/EGnPcInfo.h"
|
||||
@@ -46,6 +46,7 @@ __stdcall EgtInit( int nDebug, const wchar_t* sLogFile, const wchar_t* sLogMsg)
|
||||
// cancello eventuale vecchio logger
|
||||
if ( s_pGenLog != nullptr)
|
||||
delete s_pGenLog ;
|
||||
|
||||
// creo il logger generale
|
||||
s_pGenLog = new Logger( ( nDebug > 0 ? LL_DEBUG : LL_INFO), "EgtInterface") ;
|
||||
if ( s_pGenLog == nullptr)
|
||||
@@ -56,24 +57,24 @@ __stdcall EgtInit( int nDebug, const wchar_t* sLogFile, const wchar_t* sLogMsg)
|
||||
SetEGnLogger( s_pGenLog) ;
|
||||
SetENkLogger( s_pGenLog) ;
|
||||
SetEGkLogger( s_pGenLog) ;
|
||||
SetEMkLogger( s_pGenLog) ;
|
||||
SetEExLogger( s_pGenLog) ;
|
||||
SetEGrLogger( s_pGenLog) ;
|
||||
|
||||
// carico librerie opzionali
|
||||
LoadGraphicsDll() ;
|
||||
MySetEGrLogger( s_pGenLog) ;
|
||||
LoadExchangeDll() ;
|
||||
MySetEExLogger( s_pGenLog) ;
|
||||
LoadMachKernelDll() ;
|
||||
MySetEMkLogger( s_pGenLog) ;
|
||||
|
||||
// dichiaro inizio programma
|
||||
LOG_DATETIME( s_pGenLog, " Init")
|
||||
// eventuale messaggio dall'applicazione
|
||||
if ( sLogMsg != nullptr && sLogMsg[0] != L'\0')
|
||||
LOG_INFO( s_pGenLog, LPSTR( WtoA( sLogMsg)))
|
||||
// versione dell'interfaccia
|
||||
LOG_INFO( s_pGenLog, GetEInVersion())
|
||||
// versione delle librerie
|
||||
LOG_INFO( s_pGenLog, GetEGnVersion())
|
||||
LOG_INFO( s_pGenLog, GetENkVersion())
|
||||
LOG_INFO( s_pGenLog, GetEGkVersion())
|
||||
LOG_INFO( s_pGenLog, GetEMkVersion())
|
||||
LOG_INFO( s_pGenLog, GetEExVersion())
|
||||
LOG_INFO( s_pGenLog, GetEGrVersion())
|
||||
// versione di interfaccia e componenti
|
||||
string sVer ;
|
||||
EgtGetVersionInfo( sVer, "\n") ;
|
||||
LOG_INFO( s_pGenLog, sVer.c_str())
|
||||
// Info sul sistema
|
||||
string sTmp ;
|
||||
if ( GetOsInfo( sTmp))
|
||||
@@ -99,6 +100,11 @@ __stdcall EgtExit( void)
|
||||
// termino l'interprete LUA
|
||||
LuaExit() ;
|
||||
|
||||
// libero le librerie opzionali
|
||||
FreeMachKernelDll() ;
|
||||
FreeExchangeDll() ;
|
||||
FreeGraphicsDll() ;
|
||||
|
||||
// fine programma
|
||||
LOG_DATETIME( s_pGenLog, " Exit")
|
||||
|
||||
@@ -123,7 +129,9 @@ __stdcall EgtSetKey( const wchar_t* swKey)
|
||||
{
|
||||
string sKey = WtoA( swKey) ;
|
||||
SetEGkKey( sKey) ;
|
||||
SetEMkKey( sKey) ;
|
||||
MySetEGrKey( sKey) ;
|
||||
MySetEExKey( sKey) ;
|
||||
MySetEMkKey( sKey) ;
|
||||
return TRUE ;
|
||||
}
|
||||
|
||||
@@ -226,18 +234,28 @@ EgtGetVersionInfo( string& sVer, const char* szNewLine)
|
||||
// verifico il parametro
|
||||
if ( &sVer == nullptr)
|
||||
return false ;
|
||||
// recupero le informazioni sulle DLL
|
||||
// recupero le informazioni sulle DLL sempre presenti
|
||||
sVer += GetEInVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetEGrVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetEExVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetEGkVersion() ;
|
||||
sVer += GetEGnVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetENkVersion() ;
|
||||
sVer += szNewLine ;
|
||||
sVer += GetEGnVersion() ;
|
||||
sVer += GetEGkVersion() ;
|
||||
// recupero le informazioni sulle DLL opzionali
|
||||
if ( IsLoadedGraphicsDll()) {
|
||||
sVer += szNewLine ;
|
||||
sVer += MyGetEGrVersion() ;
|
||||
}
|
||||
if ( IsLoadedExchangeDll()) {
|
||||
sVer += szNewLine ;
|
||||
sVer += MyGetEExVersion() ;
|
||||
}
|
||||
string sEMkVer = MyGetEMkVersion() ;
|
||||
if ( ! sEMkVer.empty()) {
|
||||
sVer += szNewLine ;
|
||||
sVer += sEMkVer ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user