TestEgk 1.5l1 :

- aggiornamento a VS2013
- da INI ridefinibile path per file log.
This commit is contained in:
Dario Sassi
2014-12-17 15:23:42 +00:00
parent 51bee5fc83
commit 41563df19c
3 changed files with 17 additions and 16 deletions
+11 -14
View File
@@ -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<IGeomDB> pGdb( CreateGeomDB()) ;
BIN
View File
Binary file not shown.
+6 -2
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
@@ -28,23 +28,27 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v120_xp</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
@@ -161,7 +165,7 @@
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
<EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<OmitFramePointers>false</OmitFramePointers>