summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
Diffstat (limited to 'Tools')
-rw-r--r--Tools/AnvilStats/.gitignore4
-rw-r--r--Tools/AnvilStats/AnvilStats.sln55
-rw-r--r--Tools/AnvilStats/AnvilStats.vcproj468
-rw-r--r--Tools/AnvilStats/CMakeLists.txt122
4 files changed, 126 insertions, 523 deletions
diff --git a/Tools/AnvilStats/.gitignore b/Tools/AnvilStats/.gitignore
index 96210cfc9..afd34cdda 100644
--- a/Tools/AnvilStats/.gitignore
+++ b/Tools/AnvilStats/.gitignore
@@ -1,3 +1,7 @@
+*.vcproj
+*.vcxproj
+*.sln
+*.user
.xls
Statistics.txt
*.bmp
diff --git a/Tools/AnvilStats/AnvilStats.sln b/Tools/AnvilStats/AnvilStats.sln
deleted file mode 100644
index 46bed8969..000000000
--- a/Tools/AnvilStats/AnvilStats.sln
+++ /dev/null
@@ -1,55 +0,0 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2013 for Windows Desktop
-VisualStudioVersion = 12.0.21005.1
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AnvilStats", "AnvilStats.vcxproj", "{CF996A5E-0A86-4004-9710-682B06B5AEBA}"
- ProjectSection(ProjectDependencies) = postProject
- {B61007AC-B557-4B67-A765-E468C0C3A821} = {B61007AC-B557-4B67-A765-E468C0C3A821}
- EndProjectSection
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\lib\zlib\zlib.vcxproj", "{B61007AC-B557-4B67-A765-E468C0C3A821}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Win32 = Debug|Win32
- DebugProfile|Win32 = DebugProfile|Win32
- MinSizeRel|Win32 = MinSizeRel|Win32
- Release profiled|Win32 = Release profiled|Win32
- Release|Win32 = Release|Win32
- ReleaseProfile|Win32 = ReleaseProfile|Win32
- RelWithDebInfo|Win32 = RelWithDebInfo|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Debug|Win32.ActiveCfg = Debug|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Debug|Win32.Build.0 = Debug|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.DebugProfile|Win32.ActiveCfg = Debug|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.DebugProfile|Win32.Build.0 = Debug|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.MinSizeRel|Win32.ActiveCfg = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.MinSizeRel|Win32.Build.0 = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Release profiled|Win32.ActiveCfg = Release profiled|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Release profiled|Win32.Build.0 = Release profiled|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Release|Win32.ActiveCfg = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.Release|Win32.Build.0 = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.ReleaseProfile|Win32.ActiveCfg = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.ReleaseProfile|Win32.Build.0 = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.RelWithDebInfo|Win32.ActiveCfg = Release|Win32
- {CF996A5E-0A86-4004-9710-682B06B5AEBA}.RelWithDebInfo|Win32.Build.0 = Release|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Debug|Win32.ActiveCfg = Debug|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Debug|Win32.Build.0 = Debug|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.DebugProfile|Win32.ActiveCfg = DebugProfile|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.DebugProfile|Win32.Build.0 = DebugProfile|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.MinSizeRel|Win32.ActiveCfg = MinSizeRel|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.MinSizeRel|Win32.Build.0 = MinSizeRel|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Release profiled|Win32.ActiveCfg = Release|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Release profiled|Win32.Build.0 = Release|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Release|Win32.ActiveCfg = Release|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.Release|Win32.Build.0 = Release|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.ReleaseProfile|Win32.ActiveCfg = ReleaseProfile|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.ReleaseProfile|Win32.Build.0 = ReleaseProfile|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.RelWithDebInfo|Win32.ActiveCfg = RelWithDebInfo|Win32
- {B61007AC-B557-4B67-A765-E468C0C3A821}.RelWithDebInfo|Win32.Build.0 = RelWithDebInfo|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/Tools/AnvilStats/AnvilStats.vcproj b/Tools/AnvilStats/AnvilStats.vcproj
deleted file mode 100644
index c7a2e9390..000000000
--- a/Tools/AnvilStats/AnvilStats.vcproj
+++ /dev/null
@@ -1,468 +0,0 @@
-<?xml version="1.0" encoding="windows-1250"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="AnvilStats"
- ProjectGUID="{CF996A5E-0A86-4004-9710-682B06B5AEBA}"
- RootNamespace="AnvilStats"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Debug|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="0"
- AdditionalIncludeDirectories="&quot;..\..\lib&quot;"
- PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
- MinimalRebuild="true"
- BasicRuntimeChecks="3"
- RuntimeLibrary="1"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
- WarningLevel="3"
- DebugInformationFormat="4"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- LinkIncremental="2"
- GenerateDebugInformation="true"
- SubSystem="1"
- StackReserveSize="16777216"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="&quot;..\..\lib&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- StackReserveSize="16777216"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- <Configuration
- Name="Release profiled|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="2"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="2"
- EnableIntrinsicFunctions="true"
- AdditionalIncludeDirectories="&quot;..\..\lib&quot;"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
- RuntimeLibrary="0"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="2"
- PrecompiledHeaderThrough="Globals.h"
- WarningLevel="3"
- DebugInformationFormat="3"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="ws2_32.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- StackReserveSize="16777216"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- Profile="true"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Source Files"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\AnvilStats.cpp"
- >
- </File>
- <File
- RelativePath=".\BiomeMap.cpp"
- >
- </File>
- <File
- RelativePath=".\BiomeMap.h"
- >
- </File>
- <File
- RelativePath=".\Callback.h"
- >
- </File>
- <File
- RelativePath=".\ChunkExtract.cpp"
- >
- </File>
- <File
- RelativePath=".\ChunkExtract.h"
- >
- </File>
- <File
- RelativePath=".\Globals.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release profiled|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- UsePrecompiledHeader="1"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath=".\Globals.h"
- >
- </File>
- <File
- RelativePath=".\HeightBiomeMap.cpp"
- >
- </File>
- <File
- RelativePath=".\HeightBiomeMap.h"
- >
- </File>
- <File
- RelativePath=".\HeightMap.cpp"
- >
- </File>
- <File
- RelativePath=".\HeightMap.h"
- >
- </File>
- <File
- RelativePath=".\ImageComposingCallback.cpp"
- >
- </File>
- <File
- RelativePath=".\ImageComposingCallback.h"
- >
- </File>
- <File
- RelativePath=".\Processor.cpp"
- >
- </File>
- <File
- RelativePath=".\Processor.h"
- >
- </File>
- <File
- RelativePath=".\SpringStats.cpp"
- >
- </File>
- <File
- RelativePath=".\SpringStats.h"
- >
- </File>
- <File
- RelativePath=".\Statistics.cpp"
- >
- </File>
- <File
- RelativePath=".\Statistics.h"
- >
- </File>
- <File
- RelativePath=".\Utils.cpp"
- >
- </File>
- <File
- RelativePath=".\Utils.h"
- >
- </File>
- </Filter>
- <Filter
- Name="shared"
- >
- <File
- RelativePath="..\..\src\OSSupport\CriticalSection.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\CriticalSection.h"
- >
- </File>
- <File
- RelativePath="..\..\src\Endianness.h"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\Event.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\Event.h"
- >
- </File>
- <File
- RelativePath="..\..\src\WorldStorage\FastNBT.cpp"
- >
- <FileConfiguration
- Name="Debug|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NBT_RESERVE_SIZE=10000"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NBT_RESERVE_SIZE=10000"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release profiled|Win32"
- >
- <Tool
- Name="VCCLCompilerTool"
- PreprocessorDefinitions="NBT_RESERVE_SIZE=10000"
- />
- </FileConfiguration>
- </File>
- <File
- RelativePath="..\..\src\WorldStorage\FastNBT.h"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\File.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\File.h"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\GZipFile.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\GZipFile.h"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\IsThread.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\OSSupport\IsThread.h"
- >
- </File>
- <File
- RelativePath="..\..\src\StringUtils.cpp"
- >
- </File>
- <File
- RelativePath="..\..\src\StringUtils.h"
- >
- </File>
- </Filter>
- <File
- RelativePath=".\AnvilStats.txt"
- >
- </File>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/Tools/AnvilStats/CMakeLists.txt b/Tools/AnvilStats/CMakeLists.txt
new file mode 100644
index 000000000..8cbcf6be4
--- /dev/null
+++ b/Tools/AnvilStats/CMakeLists.txt
@@ -0,0 +1,122 @@
+
+cmake_minimum_required (VERSION 2.8.3)
+
+project (AnvilStats)
+
+include(../../SetFlags.cmake)
+
+set_flags()
+set_lib_flags()
+
+
+# Set include paths to the used libraries:
+include_directories("../../lib")
+include_directories("../../src")
+
+
+
+function(flatten_files arg1)
+ set(res "")
+ foreach(f ${${arg1}})
+ get_filename_component(f ${f} ABSOLUTE)
+ list(APPEND res ${f})
+ endforeach()
+ set(${arg1} "${res}" PARENT_SCOPE)
+endfunction()
+
+add_subdirectory(../../lib/zlib ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/lib/zlib)
+
+set_exe_flags()
+
+# Include the shared files:
+set(SHARED_SRC
+ ../../src/ByteBuffer.cpp
+ ../../src/StringUtils.cpp
+ ../../src/LoggerListeners.cpp
+ ../../src/Logger.cpp
+ ../../src/WorldStorage/FastNBT.cpp
+ ../BiomeVisualiser/BiomeColors.cpp
+)
+
+set(SHARED_HDR
+ ../../src/ByteBuffer.h
+ ../../src/StringUtils.h
+ ../../src/LoggerListeners.h
+ ../../src/Logger.h
+ ../../src/WorldStorage/FastNBT.h
+ ../BiomeVisualiser/BiomeColors.h
+)
+
+set(SHARED_OSS_SRC
+ ../../src/OSSupport/CriticalSection.cpp
+ ../../src/OSSupport/Event.cpp
+ ../../src/OSSupport/File.cpp
+ ../../src/OSSupport/GZipFile.cpp
+ ../../src/OSSupport/IsThread.cpp
+ ../../src/OSSupport/Timer.cpp
+)
+
+set(SHARED_OSS_HDR
+ ../../src/OSSupport/CriticalSection.h
+ ../../src/OSSupport/Event.h
+ ../../src/OSSupport/File.h
+ ../../src/OSSupport/GZipFile.h
+ ../../src/OSSupport/IsThread.h
+ ../../src/OSSupport/Timer.h
+)
+
+flatten_files(SHARED_SRC)
+flatten_files(SHARED_HDR)
+flatten_files(SHARED_OSS_SRC)
+flatten_files(SHARED_OSS_HDR)
+source_group("Shared" FILES ${SHARED_SRC} ${SHARED_HDR})
+source_group("Shared\\OSSupport" FILES ${SHARED_OSS_SRC} ${SHARED_OSS_HDR})
+
+
+
+# Include the main source files:
+set(SOURCES
+ AnvilStats.cpp
+ BiomeMap.cpp
+ ChunkExtract.cpp
+ Globals.cpp
+ HeightBiomeMap.cpp
+ HeightMap.cpp
+ ImageComposingCallback.cpp
+ Processor.cpp
+ SpringStats.cpp
+ Statistics.cpp
+ Utils.cpp
+)
+
+set(HEADERS
+ BiomeMap.h
+ Callback.h
+ ChunkExtract.h
+ Globals.h
+ HeightBiomeMap.h
+ HeightMap.h
+ ImageComposingCallback.h
+ Processor.h
+ SpringStats.h
+ Statistics.h
+ Utils.h
+
+ AnvilStats.txt
+)
+
+source_group("" FILES ${SOURCES} ${HEADERS})
+
+add_definitions(-DNBT_RESERVE_SIZE=10000)
+
+add_executable(AnvilStats
+ ${SOURCES}
+ ${HEADERS}
+ ${SHARED_SRC}
+ ${SHARED_HDR}
+ ${SHARED_OSS_SRC}
+ ${SHARED_OSS_HDR}
+)
+
+target_link_libraries(AnvilStats zlib)
+