From 41563df19cd6fccd96c380b1115070bd55ee3034 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 17 Dec 2014 15:23:42 +0000 Subject: [PATCH] TestEgk 1.5l1 : - aggiornamento a VS2013 - da INI ridefinibile path per file log. --- TestEGk.cpp | 25 +++++++++++-------------- TestEGk.rc | Bin 11726 -> 11726 bytes TestEGk.vcxproj | 8 ++++++-- 3 files changed, 17 insertions(+), 16 deletions(-) diff --git a/TestEGk.cpp b/TestEGk.cpp index 8e3dce1..0239f2f 100644 --- a/TestEGk.cpp +++ b/TestEGk.cpp @@ -52,39 +52,36 @@ using namespace egtlogger ; int wmain( int argc, wchar_t* argv[]) { - int nErr ; - int nDebug ; - string sIn ; - string sExeDir ; - string sFileIni ; - - // se debug, imposto stampe memory leaks all'uscita #ifdef _DEBUG _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF) ; #endif // recupero il direttorio del programma e costruisco path file INI + string sExeDir ; GetModuleDirectory( NULL, sExeDir) ; - sFileIni = sExeDir + "\\TestEgk.ini" ; + string sFileIni = sExeDir + "\\TestEgk.ini" ; // imposto direttorio di lavoro SetCurrentDirectory( sExeDir) ; - // interpreto i parametri di linea - // nome file di comandi + // nome file di comandi + string sIn ; if ( argc >= 2) sIn = LPSTR( WtoA( argv[1])) ; else sIn = GetPrivateProfileStringUtf8( "General", "Batch", "In.btsc", sFileIni.c_str()) ; - // livello di debug - nDebug = GetPrivateProfileInt( "General", "Debug", 0, sFileIni.c_str()) ; + // livello di debug + int nDebug = GetPrivateProfileInt( "General", "Debug", 0, sFileIni.c_str()) ; + + // file di log + string sLog = GetPrivateProfileStringUtf8( "General", "Log", "TestEgk.log", sFileIni.c_str()) ; // inizializzazioni del logger Logger logger( ( nDebug > 0 ? LL_DEBUG : LL_INFO), "TestEGk") ; logger.AddOutputStream( cout, false, LL_INFO) ; - logger.AddOutputStream( new(nothrow) ofstream( "TestEgk.log"), true) ; + logger.AddOutputStream( new(nothrow) ofstream( sLog), true) ; // inizio programma LOG_DATETIME( &logger, " Start Test") @@ -117,7 +114,7 @@ wmain( int argc, wchar_t* argv[]) InitFontManager( sNfeFontDir, sDefaultFont) ; // nessun errore - nErr = 0 ; + int nErr = 0 ; // esecuzione script PtrOwner pGdb( CreateGeomDB()) ; diff --git a/TestEGk.rc b/TestEGk.rc index a35693a1d6d10803f69d0d0b30816886bc1165f9..355ce6a7c419b9dc72715bcd837a6e5c31d8adbe 100644 GIT binary patch delta 260 zcmX>XeJ*;#I%aKGhCGIJh8%`WhGK>c1_cHUhESkLCPN8BDnkm89}HwAf_cT0Z)!Hq)$ delta 249 zcmX>XeJ*;#I%aiGhCGIJh8%`ehGHOAV9;O)W+-7u1ma8}FBB-731Ux{R&U)L$1;nF z(QxxYxw}l0cS!~?XEPX1W|Yz0Y$X-MxOoM)2{TyIlNlkQ1d - + Debug @@ -28,23 +28,27 @@ Application true Unicode + v120_xp Application true Unicode + v120_xp Application false true Unicode + v120_xp Application false true Unicode + v120_xp @@ -161,7 +165,7 @@ true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) true - StreamingSIMDExtensions2 + NotSet AnySuitable Speed false