- Fixed some bugs related to logfile processing.

- Added debug project to win32 projects
- Changed some compiler settings for win32 projects to enable sse
This commit is contained in:
Mark Vejvoda
2010-05-02 06:21:36 +00:00
parent 63aff0751c
commit abf05a2ae6
10 changed files with 148 additions and 41 deletions

View File

@@ -29,6 +29,7 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Debug+MT|Win32 = Debug+MT|Win32 Debug+MT|Win32 = Debug+MT|Win32
Debug-MT|Win32 = Debug-MT|Win32
No debug|Win32 = No debug|Win32 No debug|Win32 = No debug|Win32
Release with error catching|Win32 = Release with error catching|Win32 Release with error catching|Win32 = Release with error catching|Win32
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
@@ -40,6 +41,8 @@ Global
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug|Win32.Build.0 = Debug|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug|Win32.Build.0 = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug+MT|Win32.Build.0 = Debug|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug+MT|Win32.Build.0 = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug-MT|Win32.ActiveCfg = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Debug-MT|Win32.Build.0 = Debug|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.No debug|Win32.ActiveCfg = Release|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.No debug|Win32.ActiveCfg = Release|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.No debug|Win32.Build.0 = Release|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.No debug|Win32.Build.0 = Release|Win32
{6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Release with error catching|Win32.ActiveCfg = Release|Win32 {6B0C65F1-D031-46AF-AC0D-7C38892D2952}.Release with error catching|Win32.ActiveCfg = Release|Win32
@@ -54,6 +57,8 @@ Global
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug|Win32.Build.0 = Debug|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug|Win32.Build.0 = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug+MT|Win32.Build.0 = Debug|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug+MT|Win32.Build.0 = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug-MT|Win32.ActiveCfg = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Debug-MT|Win32.Build.0 = Debug|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.No debug|Win32.ActiveCfg = Release|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.No debug|Win32.ActiveCfg = Release|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.No debug|Win32.Build.0 = Release|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.No debug|Win32.Build.0 = Release|Win32
{8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Release with error catching|Win32.ActiveCfg = Release|Win32 {8DAA0C24-95CD-4F66-B4C5-19ABDD771746}.Release with error catching|Win32.ActiveCfg = Release|Win32
@@ -68,6 +73,8 @@ Global
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug|Win32.Build.0 = Debug|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug|Win32.Build.0 = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug+MT|Win32.Build.0 = Debug|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug+MT|Win32.Build.0 = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug-MT|Win32.ActiveCfg = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Debug-MT|Win32.Build.0 = Debug|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.No debug|Win32.ActiveCfg = Release|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.No debug|Win32.ActiveCfg = Release|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.No debug|Win32.Build.0 = Release|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.No debug|Win32.Build.0 = Release|Win32
{5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Release with error catching|Win32.ActiveCfg = Release|Win32 {5D09BE33-81EC-450B-8A7B-2E7B941ADC56}.Release with error catching|Win32.ActiveCfg = Release|Win32
@@ -82,6 +89,8 @@ Global
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug|Win32.Build.0 = Debug|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug+MT|Win32.Build.0 = Debug|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug+MT|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug-MT|Win32.ActiveCfg = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Debug-MT|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.No debug|Win32.ActiveCfg = Release|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.No debug|Win32.ActiveCfg = Release|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.No debug|Win32.Build.0 = Release|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.No debug|Win32.Build.0 = Release|Win32
{FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Release with error catching|Win32.ActiveCfg = Release|Win32 {FE5C7C7C-F109-44F5-8329-25A4E24F162C}.Release with error catching|Win32.ActiveCfg = Release|Win32
@@ -96,6 +105,8 @@ Global
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug|Win32.Build.0 = Debug|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug+MT|Win32.Build.0 = Debug|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug+MT|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug-MT|Win32.ActiveCfg = Debug|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Debug-MT|Win32.Build.0 = Debug|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.No debug|Win32.ActiveCfg = Release|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.No debug|Win32.ActiveCfg = Release|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.No debug|Win32.Build.0 = Release|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.No debug|Win32.Build.0 = Release|Win32
{FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Release with error catching|Win32.ActiveCfg = Release|Win32 {FE5C7C7C-F109-44F5-8329-19A4E24F162D}.Release with error catching|Win32.ActiveCfg = Release|Win32
@@ -110,6 +121,8 @@ Global
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug|Win32.Build.0 = Debug|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug|Win32.Build.0 = Debug|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug+MT|Win32.ActiveCfg = Debug|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug+MT|Win32.ActiveCfg = Debug|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug+MT|Win32.Build.0 = Debug|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug+MT|Win32.Build.0 = Debug|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug-MT|Win32.ActiveCfg = Debug-MT|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Debug-MT|Win32.Build.0 = Debug-MT|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.No debug|Win32.ActiveCfg = Release|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.No debug|Win32.ActiveCfg = Release|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.No debug|Win32.Build.0 = Release|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.No debug|Win32.Build.0 = Release|Win32
{CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Release with error catching|Win32.ActiveCfg = Release|Win32 {CDF4DDB9-945E-4D0D-9F0E-2BBEB5D22141}.Release with error catching|Win32.ActiveCfg = Release|Win32

Binary file not shown.

View File

@@ -116,6 +116,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common" AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
StringPooling="true" StringPooling="true"

View File

@@ -116,6 +116,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\xml;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/platform/common" AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\mswd&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\xml;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/platform/common"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;"
StringPooling="true" StringPooling="true"

View File

@@ -116,6 +116,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\msw&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common" AdditionalIncludeDirectories="&quot;..\..\source\win32_deps\wxWidgets-2.8.10\lib\vc_lib\msw&quot;;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include\msvc&quot;;..\..\source\shared_lib\include\util;..\..\source\shared_lib\include\platform\win32;..\..\source\shared_lib\include\graphics\gl;..\..\source\win32_deps\include;..\..\source\shared_lib\include\graphics;&quot;..\..\source\win32_deps\wxWidgets-2.8.10\include&quot;;..\..\source\shared_lib\include\platform\sdl;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common"
PreprocessorDefinitions="MWIN;__WXMSW__" PreprocessorDefinitions="MWIN;__WXMSW__"
StringPooling="true" StringPooling="true"

View File

@@ -44,14 +44,14 @@
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
WholeProgramOptimization="false" WholeProgramOptimization="false"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;" AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/shared_lib/include/tinyxml;../../source/glest_game/ai;../../source/glest_game/facilities;../../source/glest_game/game;../../source/glest_game/global;../../source/glest_game/graphics;../../source/glest_game/gui;../../source/glest_game/main;../../source/glest_game/menu;../../source/glest_game/network;../../source/glest_game/sound;../../source/glest_game/type_instances;../../source/glest_game/types;../../source/glest_game/world;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/SDL-1.2.14/include&quot;;../../source/shared_lib/include/platform/sdl;../../source/shared_lib/include/sound/openal;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/platform/common;$(NOINHERIT)"
AdditionalUsingDirectories="" AdditionalUsingDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;XML_LIBRARY;NO_GL_ASSERTIONS;USE_PCH=1" PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;XML_LIBRARY;NO_GL_ASSERTIONS;USE_PCH=1;USE_STREFLOP;STREFLOP_X87;LIBM_COMPILING_FLT32"
StringPooling="true" StringPooling="true"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
SmallerTypeCheck="true" SmallerTypeCheck="true"
RuntimeLibrary="3" RuntimeLibrary="1"
EnableEnhancedInstructionSet="2" EnableEnhancedInstructionSet="2"
FloatingPointModel="2" FloatingPointModel="2"
UsePrecompiledHeader="0" UsePrecompiledHeader="0"
@@ -73,8 +73,8 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib zlib.lib lua5.1.lib xerces-c_3D.lib Dbghelp.lib libpng.lib jpeg.lib" AdditionalDependencies="dsound.lib dxguid.lib ogg_static.lib vorbis_static.lib vorbisfile_static.lib opengl32.lib glu32.lib wsock32.lib libglest.lib mmc.lib lua5.1.lib xerces-c_3.lib Dbghelp.lib libpng.lib jpeg.lib zlib.lib sdl.lib sdlmain.lib winmm.lib openal32.lib iphlpapi.lib libstreflop.lib"
AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;" AdditionalLibraryDirectories="../../source/win32_deps/lib;&quot;../../build/$(ConfigurationName)/libglest&quot;;../../source/shared_lib/sources/streflop/libstreflop"
IgnoreAllDefaultLibraries="false" IgnoreAllDefaultLibraries="false"
IgnoreDefaultLibraryNames="" IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true" GenerateDebugInformation="true"
@@ -128,6 +128,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
Optimization="2" Optimization="2"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
@@ -169,7 +170,7 @@
LinkTimeCodeGeneration="0" LinkTimeCodeGeneration="0"
RandomizedBaseAddress="1" RandomizedBaseAddress="1"
DataExecutionPrevention="0" DataExecutionPrevention="0"
TargetMachine="1" TargetMachine="0"
/> />
<Tool <Tool
Name="VCALinkTool" Name="VCALinkTool"

View File

@@ -42,7 +42,7 @@
Optimization="0" Optimization="0"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
RuntimeLibrary="3" RuntimeLibrary="1"
WarningLevel="3" WarningLevel="3"
DebugInformationFormat="4" DebugInformationFormat="4"
/> />
@@ -107,6 +107,79 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
Optimization="2"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;..\..\source\shared_lib\include\streflop\libm\flt-32&quot;;..\..\source\shared_lib\include\streflop\libm\headers"
PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;USE_PCH=1;USE_STREFLOP;STREFLOP_X87;LIBM_COMPILING_FLT32"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="0"
FloatingPointModel="0"
RuntimeTypeInfo="true"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug-MT|Win32"
OutputDirectory="$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
Optimization="2" Optimization="2"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"

View File

@@ -40,13 +40,13 @@
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="0" Optimization="0"
AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/lpng141;&quot;../../source/win32_deps/jpeg-8a&quot;" AdditionalIncludeDirectories="../../../deps/include/lua;../../../deps/include;../../source/shared_lib/include;../../source/shared_lib/include/graphics;../../source/shared_lib/include/graphics/gl;../../source/shared_lib/include/platform;../../source/shared_lib/include/platform/win32;../../source/shared_lib/include/sound;../../source/shared_lib/include/sound/ds8;../../source/shared_lib/include/util;../../source/shared_lib/include/lua;../../source/shared_lib/include/xml;../../source/win32_deps/include;&quot;../../source/win32_deps/xerces-c-3.0.1/src&quot;;&quot;../../source/win32_deps/xerces-c-3.0.1/src/xercesc/xinclude&quot;;../../source/win32_deps/libpng141;&quot;../../source/win32_deps/jpeg-8a&quot;;&quot;../../source/win32_deps/SDL-1.2.14/include&quot;;../../source/shared_lib/include/platform/sdl;&quot;../../source/win32_deps/openal-soft-1.12.854/include&quot;;../../source/shared_lib/include/sound/openal;../../source/shared_lib/include/platform/posix;../../source/shared_lib/include/streflop;../../source/shared_lib/include/streflop/libm_flt32_source;../../source/shared_lib/include/platform/common"
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NO_GL_ASSERTIONS;USE_PCH=1" PreprocessorDefinitions="WIN32;_DEBUG;_LIB;_CRT_SECURE_NO_WARNINGS;NO_GL_ASSERTIONS;USE_PCH=1;USE_STREFLOP;STREFLOP_X87;LIBM_COMPILING_FLT32"
StringPooling="true" StringPooling="true"
MinimalRebuild="true" MinimalRebuild="true"
BasicRuntimeChecks="3" BasicRuntimeChecks="3"
SmallerTypeCheck="true" SmallerTypeCheck="true"
RuntimeLibrary="3" RuntimeLibrary="1"
EnableFunctionLevelLinking="true" EnableFunctionLevelLinking="true"
FloatingPointModel="2" FloatingPointModel="2"
RuntimeTypeInfo="false" RuntimeTypeInfo="false"
@@ -109,6 +109,7 @@
/> />
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
AdditionalOptions="/arch:SSE2"
Optimization="2" Optimization="2"
InlineFunctionExpansion="2" InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true" EnableIntrinsicFunctions="true"
@@ -731,6 +732,10 @@
RelativePath="..\..\source\shared_lib\include\platform\sdl\gl_wrap.h" RelativePath="..\..\source\shared_lib\include\platform\sdl\gl_wrap.h"
> >
</File> </File>
<File
RelativePath="..\..\source\shared_lib\include\platform\common\math_wrapper.h"
>
</File>
<File <File
RelativePath="..\..\source\shared_lib\include\platform\sdl\noimpl.h" RelativePath="..\..\source\shared_lib\include\platform\sdl\noimpl.h"
> >

View File

@@ -15,10 +15,10 @@
#include <string> #include <string>
#include <fstream> #include <fstream>
#include <map> #include <map>
//#include "thread.h" #include "thread.h"
using std::string; using std::string;
//using namespace Shared::Platform; using namespace Shared::Platform;
namespace Shared{ namespace Util{ namespace Shared{ namespace Util{
@@ -45,7 +45,7 @@ public:
this->fileStream = NULL; this->fileStream = NULL;
this->debugLogFileName = ""; this->debugLogFileName = "";
this->fileStreamOwner = false; this->fileStreamOwner = false;
//this->mutex = NULL; this->mutex = NULL;
} }
SystemFlagsType(DebugType debugType) { SystemFlagsType(DebugType debugType) {
this->debugType = debugType; this->debugType = debugType;
@@ -53,7 +53,10 @@ public:
this->fileStream = NULL; this->fileStream = NULL;
this->debugLogFileName = ""; this->debugLogFileName = "";
this->fileStreamOwner = false; this->fileStreamOwner = false;
//this->mutex = NULL; this->mutex = NULL;
}
~SystemFlagsType() {
Close();
} }
SystemFlagsType(DebugType debugType,bool enabled, SystemFlagsType(DebugType debugType,bool enabled,
std::ofstream *fileStream,std::string debugLogFileName) { std::ofstream *fileStream,std::string debugLogFileName) {
@@ -62,14 +65,28 @@ public:
this->fileStream = fileStream; this->fileStream = fileStream;
this->debugLogFileName = debugLogFileName; this->debugLogFileName = debugLogFileName;
this->fileStreamOwner = false; this->fileStreamOwner = false;
//this->mutex = mutex; this->mutex = NULL;
}
void Close() {
if(this->fileStreamOwner == true) {
if( this->fileStream != NULL &&
this->fileStream->is_open() == true) {
this->fileStream->close();
}
delete this->fileStream;
delete this->mutex;
}
this->fileStream = NULL;
this->fileStreamOwner = false;
this->mutex = NULL;
} }
bool enabled; bool enabled;
std::ofstream *fileStream; std::ofstream *fileStream;
std::string debugLogFileName; std::string debugLogFileName;
bool fileStreamOwner; bool fileStreamOwner;
//Mutex *mutex; Mutex *mutex;
}; };
protected: protected:

View File

@@ -40,11 +40,13 @@ namespace Shared{ namespace Util{
std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType> SystemFlags::debugLogFileList; std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType> SystemFlags::debugLogFileList;
void SystemFlags::init() { void SystemFlags::init() {
if(SystemFlags::debugLogFileList.size() == 0) {
SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem); SystemFlags::debugLogFileList[SystemFlags::debugSystem] = SystemFlags::SystemFlagsType(SystemFlags::debugSystem);
SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork); SystemFlags::debugLogFileList[SystemFlags::debugNetwork] = SystemFlags::SystemFlagsType(SystemFlags::debugNetwork);
SystemFlags::debugLogFileList[SystemFlags::debugPerformance] = SystemFlags::SystemFlagsType(SystemFlags::debugPerformance); SystemFlags::debugLogFileList[SystemFlags::debugPerformance] = SystemFlags::SystemFlagsType(SystemFlags::debugPerformance);
SystemFlags::debugLogFileList[SystemFlags::debugWorldSynch] = SystemFlags::SystemFlagsType(SystemFlags::debugWorldSynch); SystemFlags::debugLogFileList[SystemFlags::debugWorldSynch] = SystemFlags::SystemFlagsType(SystemFlags::debugWorldSynch);
} }
}
int SystemFlags::lockFile = -1; int SystemFlags::lockFile = -1;
string SystemFlags::lockfilename = ""; string SystemFlags::lockfilename = "";
@@ -74,23 +76,13 @@ SystemFlags::~SystemFlags() {
void SystemFlags::Close() { void SystemFlags::Close() {
printf("START Closing logfiles\n"); printf("START Closing logfiles\n");
if(SystemFlags::debugLogFileList.size() > 0) {
for(std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType>::iterator iterMap = SystemFlags::debugLogFileList.begin(); for(std::map<SystemFlags::DebugType,SystemFlags::SystemFlagsType>::iterator iterMap = SystemFlags::debugLogFileList.begin();
iterMap != SystemFlags::debugLogFileList.end(); iterMap++) { iterMap != SystemFlags::debugLogFileList.end(); iterMap++) {
SystemFlags::SystemFlagsType &currentDebugLog = iterMap->second; SystemFlags::SystemFlagsType &currentDebugLog = iterMap->second;
currentDebugLog.Close();
if(currentDebugLog.fileStreamOwner == true) {
if( currentDebugLog.fileStream != NULL &&
currentDebugLog.fileStream->is_open() == true) {
currentDebugLog.fileStream->close();
} }
delete currentDebugLog.fileStream;
//delete currentDebugLog.mutex;
} }
currentDebugLog.fileStream = NULL;
currentDebugLog.fileStreamOwner = false;
//currentDebugLog.mutex = NULL;
}
if(SystemFlags::lockFile != -1) { if(SystemFlags::lockFile != -1) {
#ifndef WIN32 #ifndef WIN32
close(SystemFlags::lockFile); close(SystemFlags::lockFile);
@@ -109,6 +101,9 @@ void SystemFlags::Close() {
} }
void SystemFlags::OutputDebug(DebugType type, const char *fmt, ...) { void SystemFlags::OutputDebug(DebugType type, const char *fmt, ...) {
if(SystemFlags::debugLogFileList.size() == 0) {
SystemFlags::init();
}
SystemFlags::SystemFlagsType &currentDebugLog = SystemFlags::debugLogFileList[type]; SystemFlags::SystemFlagsType &currentDebugLog = SystemFlags::debugLogFileList[type];
if(currentDebugLog.enabled == false) { if(currentDebugLog.enabled == false) {
return; return;
@@ -143,7 +138,7 @@ void SystemFlags::OutputDebug(DebugType type, const char *fmt, ...) {
currentDebugLog2.fileStream != NULL) { currentDebugLog2.fileStream != NULL) {
currentDebugLog.fileStream = currentDebugLog2.fileStream; currentDebugLog.fileStream = currentDebugLog2.fileStream;
currentDebugLog.fileStreamOwner = false; currentDebugLog.fileStreamOwner = false;
//currentDebugLog.mutex = currentDebugLog2.mutex; currentDebugLog.mutex = currentDebugLog2.mutex;
break; break;
} }
} }
@@ -189,17 +184,17 @@ void SystemFlags::OutputDebug(DebugType type, const char *fmt, ...) {
currentDebugLog.fileStream = new std::ofstream(); currentDebugLog.fileStream = new std::ofstream();
currentDebugLog.fileStream->open(debugLog.c_str(), ios_base::out | ios_base::trunc); currentDebugLog.fileStream->open(debugLog.c_str(), ios_base::out | ios_base::trunc);
currentDebugLog.fileStreamOwner = true; currentDebugLog.fileStreamOwner = true;
//currentDebugLog.mutex = new Mutex(); currentDebugLog.mutex = new Mutex();
} }
printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner); printf("Opening logfile [%s] type = %d, currentDebugLog.fileStreamOwner = %d\n",debugLog.c_str(),type, currentDebugLog.fileStreamOwner);
//currentDebugLog.mutex->p(); currentDebugLog.mutex->p();
(*currentDebugLog.fileStream) << "Starting Mega-Glest logging for type: " << type << "\n"; (*currentDebugLog.fileStream) << "Starting Mega-Glest logging for type: " << type << "\n";
(*currentDebugLog.fileStream).flush(); (*currentDebugLog.fileStream).flush();
//currentDebugLog.mutex->v(); currentDebugLog.mutex->v();
} }
//printf("Logfile is open [%s]\n",SystemFlags::debugLogFile); //printf("Logfile is open [%s]\n",SystemFlags::debugLogFile);
@@ -208,12 +203,12 @@ void SystemFlags::OutputDebug(DebugType type, const char *fmt, ...) {
assert(currentDebugLog.fileStream != NULL); assert(currentDebugLog.fileStream != NULL);
//currentDebugLog.mutex->p(); currentDebugLog.mutex->p();
(*currentDebugLog.fileStream) << "[" << szBuf2 << "] " << szBuf; (*currentDebugLog.fileStream) << "[" << szBuf2 << "] " << szBuf;
(*currentDebugLog.fileStream).flush(); (*currentDebugLog.fileStream).flush();
//currentDebugLog.mutex->v(); currentDebugLog.mutex->v();
} }
// output to console // output to console
else { else {