Skip to content

Commit

Permalink
RE2 Current Path Support (#30)
Browse files Browse the repository at this point in the history
* Set game-specific configuration.

* Create RE2_TDB66 configurations.

* Use a constexpr for the game string.
  • Loading branch information
TheTedder authored Jul 22, 2023
1 parent 2d2897a commit 1607002
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 21 deletions.
5 changes: 5 additions & 0 deletions REFix.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
#pragma once
#include <reframework/API.hpp>

// hack
#define _STR(S) #S
#define STR(S) _STR(S)
constexpr const char GAME_STRING[] = STR(GAME);

namespace REF = reframework;

namespace REFix {
Expand Down
18 changes: 12 additions & 6 deletions REFix.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "REFix", "REFix.vcxproj", "{
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Release|x64 = Release|x64
RE2_TDB66Debug|x64 = RE2_TDB66Debug|x64
RE2_TDB66Release|x64 = RE2_TDB66Release|x64
RE2Debug|x64 = RE2Debug|x64
RE2Release|x64 = RE2Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.Debug|x64.ActiveCfg = Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.Debug|x64.Build.0 = Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.Release|x64.ActiveCfg = Release|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.Release|x64.Build.0 = Release|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2_TDB66Debug|x64.ActiveCfg = RE2_TDB66Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2_TDB66Debug|x64.Build.0 = RE2_TDB66Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2_TDB66Release|x64.ActiveCfg = RE2_TDB66Release|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2_TDB66Release|x64.Build.0 = RE2_TDB66Release|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2Debug|x64.ActiveCfg = RE2Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2Debug|x64.Build.0 = RE2Debug|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2Release|x64.ActiveCfg = RE2Release|x64
{D1E885D9-C511-46C1-83D5-43AB4539A81D}.RE2Release|x64.Build.0 = RE2Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
105 changes: 91 additions & 14 deletions REFix.vcxproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<ProjectConfiguration Include="RE2Debug|x64">
<Configuration>RE2Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<ProjectConfiguration Include="RE2Release|x64">
<Configuration>RE2Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RE2_TDB66Debug|x64">
<Configuration>RE2_TDB66Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="RE2_TDB66Release|x64">
<Configuration>RE2_TDB66Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
Expand All @@ -18,13 +26,26 @@
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
Expand All @@ -36,29 +57,43 @@
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='RE2Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Debug|x64'" Label="PropertySheets">
<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)'=='RE2Release|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'">
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Label="Vcpkg">
<VcpkgEnableManifest>true</VcpkgEnableManifest>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='RE2Debug|x64'">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgUseMD>true</VcpkgUseMD>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Debug|x64'" Label="Vcpkg">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgUseMD>true</VcpkgUseMD>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='RE2Release|x64'">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgUseMD>true</VcpkgUseMD>
</PropertyGroup>
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Release|x64'" Label="Vcpkg">
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgUseMD>true</VcpkgUseMD>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RE2Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;GAME=RE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp20</LanguageStandard>
Expand All @@ -73,13 +108,55 @@
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;GAME=RE2_TDB66;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>..\REFramework\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RE2Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;GAME=RE2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp20</LanguageStandard>
<LanguageStandard_C>stdc17</LanguageStandard_C>
<AdditionalIncludeDirectories>..\REFramework\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<EnableEnhancedInstructionSet>AdvancedVectorExtensions2</EnableEnhancedInstructionSet>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableUAC>false</EnableUAC>
<AdditionalDependencies>Shlwapi.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='RE2_TDB66Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;REFIX_EXPORTS;_WINDOWS;_USRDLL;GAME=RE2_TDB66;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<LanguageStandard>stdcpp20</LanguageStandard>
Expand Down
2 changes: 1 addition & 1 deletion Version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ void reframework_plugin_required_version(REFrameworkPluginVersion* version) {
version->major = REFRAMEWORK_PLUGIN_VERSION_MAJOR;
version->minor = REFRAMEWORK_PLUGIN_VERSION_MINOR;
version->patch = REFRAMEWORK_PLUGIN_VERSION_PATCH;
version->game_name = "RE2_TDB66";
version->game_name = GAME_STRING;
}

0 comments on commit 1607002

Please sign in to comment.