-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2515 from ericoporto/add-agfexport
Tool: agfexport - export miscellaneous data from the game source
- Loading branch information
Showing
8 changed files
with
664 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="..\..\Common\debug\debugmanager.cpp" /> | ||
<ClCompile Include="..\..\Common\util\bufferedstream.cpp" /> | ||
<ClCompile Include="..\..\Common\util\cmdlineopts.cpp" /> | ||
<ClCompile Include="..\..\Common\util\file.cpp" /> | ||
<ClCompile Include="..\..\Common\util\filestream.cpp" /> | ||
<ClCompile Include="..\..\Common\util\path.cpp" /> | ||
<ClCompile Include="..\..\Common\util\stdio_compat.c" /> | ||
<ClCompile Include="..\..\Common\util\stream.cpp" /> | ||
<ClCompile Include="..\..\Common\util\string.cpp" /> | ||
<ClCompile Include="..\..\Common\util\string_compat.c" /> | ||
<ClCompile Include="..\..\Common\util\string_utils.cpp" /> | ||
<ClCompile Include="..\..\Common\util\textstreamreader.cpp" /> | ||
<ClCompile Include="..\..\libsrc\tinyxml2\tinyxml2.cpp" /> | ||
<ClCompile Include="..\..\Tools\agfexport\main.cpp" /> | ||
<ClCompile Include="..\..\Tools\data\agfreader.cpp" /> | ||
<ClCompile Include="..\..\Tools\data\scriptgen.cpp" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="..\..\libsrc\tinyxml2\tinyxml2.h" /> | ||
<ClInclude Include="..\..\Tools\data\agfreader.h" /> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<ProjectGuid>{776E38BA-D6A4-431E-8053-299310D85301}</ProjectGuid> | ||
<RootNamespace>MakeRoomHeader</RootNamespace> | ||
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion> | ||
<ProjectName>agfexport</ProjectName> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v140</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> | ||
</ImportGroup> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<OutDir>$(SolutionDir)\.build\$(Configuration)\</OutDir> | ||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<OutDir>$(SolutionDir)\.build\$(Configuration)\</OutDir> | ||
<IntDir>$(Configuration)\$(ProjectName)\</IntDir> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>Disabled</Optimization> | ||
<SDLCheck>true</SDLCheck> | ||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<AdditionalIncludeDirectories>..\..\Tools;..\..\Common;..\..\libsrc\tinyxml2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
<SubSystem>Console</SubSystem> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>Disabled</Optimization> | ||
<SDLCheck>true</SDLCheck> | ||
</ClCompile> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck>true</SDLCheck> | ||
<AdditionalIncludeDirectories>..\..\Tools;..\..\Common;..\..\libsrc\tinyxml2;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> | ||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<DisableSpecificWarnings>4996</DisableSpecificWarnings> | ||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> | ||
</ClCompile> | ||
<Link> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<AdditionalDependencies>shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies> | ||
<SubSystem>Console</SubSystem> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<Optimization>MaxSpeed</Optimization> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck>true</SDLCheck> | ||
</ClCompile> | ||
<Link> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<Filter Include="Resource Files"> | ||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> | ||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions> | ||
</Filter> | ||
<Filter Include="Common"> | ||
<UniqueIdentifier>{eadadb9c-903a-4a50-8db9-a82dbf36b434}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="tinyxml2"> | ||
<UniqueIdentifier>{46208ff5-d822-4f9b-8208-d51993dbec22}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="data"> | ||
<UniqueIdentifier>{bdb62516-d050-4c05-81b5-4bedb3b8da0b}</UniqueIdentifier> | ||
</Filter> | ||
<Filter Include="agfexport"> | ||
<UniqueIdentifier>{731e5dde-24bd-46ed-ae96-82f7baf41d3d}</UniqueIdentifier> | ||
</Filter> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="..\..\Common\util\bufferedstream.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\cmdlineopts.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\file.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\filestream.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\stream.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\string.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\textstreamreader.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\stdio_compat.c"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\debug\debugmanager.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\string_utils.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\libsrc\tinyxml2\tinyxml2.cpp"> | ||
<Filter>tinyxml2</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Tools\data\agfreader.cpp"> | ||
<Filter>data</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Tools\data\scriptgen.cpp"> | ||
<Filter>data</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Tools\agfexport\main.cpp"> | ||
<Filter>agfexport</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\path.cpp"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
<ClCompile Include="..\..\Common\util\string_compat.c"> | ||
<Filter>Common</Filter> | ||
</ClCompile> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClInclude Include="..\..\libsrc\tinyxml2\tinyxml2.h"> | ||
<Filter>tinyxml2</Filter> | ||
</ClInclude> | ||
<ClInclude Include="..\..\Tools\data\agfreader.h"> | ||
<Filter>data</Filter> | ||
</ClInclude> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
INCDIR = ../../Common ../../Tools ../../libsrc/tinyxml2 | ||
LIBDIR = | ||
|
||
CFLAGS := -O2 -g \ | ||
-fsigned-char -fno-strict-aliasing -fwrapv \ | ||
-Wunused-result \ | ||
-Wno-unused-value \ | ||
-Werror=write-strings -Werror=format -Werror=format-security \ | ||
-DNDEBUG \ | ||
-D_FILE_OFFSET_BITS=64 -DRTLD_NEXT \ | ||
$(CFLAGS) | ||
|
||
CXXFLAGS := -std=c++11 -Werror=delete-non-virtual-dtor $(CXXFLAGS) | ||
|
||
PREFIX ?= /usr/local | ||
CC ?= gcc | ||
CXX ?= g++ | ||
AR ?= ar | ||
CFLAGS += $(addprefix -I,$(INCDIR)) | ||
CXXFLAGS += $(CFLAGS) | ||
ASFLAGS += $(CFLAGS) | ||
LDFLAGS += -rdynamic -Wl,--as-needed $(addprefix -L,$(LIBDIR)) | ||
CFLAGS += -Werror=implicit-function-declaration | ||
|
||
COMMON_OBJS = \ | ||
../../Common/debug/debugmanager.cpp \ | ||
../../Common/util/bufferedstream.cpp \ | ||
../../Common/util/cmdlineopts.cpp \ | ||
../../Common/util/file.cpp \ | ||
../../Common/util/filestream.cpp \ | ||
../../Common/util/path.cpp \ | ||
../../Common/util/stdio_compat.c \ | ||
../../Common/util/stream.cpp \ | ||
../../Common/util/string.cpp \ | ||
../../Common/util/string_compat.c \ | ||
../../Common/util/string_utils.cpp \ | ||
../../Common/util/textstreamreader.cpp | ||
|
||
TOOL_OBJS = \ | ||
../../Tools/data/agfreader.cpp \ | ||
../../Tools/data/scriptgen.cpp | ||
|
||
TINYXML2 = \ | ||
../../libsrc/tinyxml2/tinyxml2.cpp | ||
|
||
OBJS := main.cpp \ | ||
$(COMMON_OBJS) \ | ||
$(TOOL_OBJS) \ | ||
$(TINYXML2) | ||
OBJS := $(OBJS:.cpp=.o) | ||
OBJS := $(OBJS:.c=.o) | ||
|
||
DEPFILES = $(OBJS:.o=.d) | ||
|
||
-include config.mak | ||
|
||
.PHONY: printflags clean install uninstall rebuild | ||
|
||
all: printflags agfexport | ||
|
||
agfexport: $(OBJS) | ||
@echo "Linking..." | ||
$(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) $(LIBS) | ||
|
||
debug: CXXFLAGS += -UNDEBUG -D_DEBUG -Og -g -pg | ||
debug: CFLAGS += -UNDEBUG -D_DEBUG -Og -g -pg | ||
debug: LDFLAGS += -pg | ||
debug: printflags agfexport | ||
|
||
-include $(DEPFILES) | ||
|
||
%.o: %.c | ||
@echo $@ | ||
$(CMD_PREFIX) $(CC) $(CFLAGS) -MD -c -o $@ $< | ||
|
||
%.o: %.cpp | ||
@echo $@ | ||
$(CMD_PREFIX) $(CXX) $(CXXFLAGS) -MD -c -o $@ $< | ||
|
||
printflags: | ||
@echo "CFLAGS =" $(CFLAGS) "\n" | ||
@echo "CXXFLAGS =" $(CXXFLAGS) "\n" | ||
@echo "LDFLAGS =" $(LDFLAGS) "\n" | ||
@echo "LIBS =" $(LIBS) "\n" | ||
|
||
rebuild: clean all | ||
|
||
clean: | ||
@echo "Cleaning..." | ||
$(CMD_PREFIX) rm -f agfexport $(OBJS) $(DEPFILES) | ||
|
||
install: agfexport | ||
mkdir -p $(PREFIX)/bin | ||
cp -t $(PREFIX)/bin agfexport | ||
|
||
uninstall: | ||
rm -f $(PREFIX)/bin/agfexport |
Oops, something went wrong.