3rdparty: Add rcheevos

This commit is contained in:
Connor McLaughlin 2022-04-18 20:15:31 +10:00 committed by refractionpcsx2
parent 9c64193434
commit 9f2c4c6b59
8 changed files with 300 additions and 0 deletions

3
.gitmodules vendored
View File

@ -36,3 +36,6 @@
[submodule "3rdparty/zstd/zstd"]
path = 3rdparty/zstd/zstd
url = https://github.com/facebook/zstd.git
[submodule "3rdparty/rcheevos/rcheevos"]
path = 3rdparty/rcheevos/rcheevos
url = https://github.com/RetroAchievements/rcheevos.git

47
3rdparty/rcheevos/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,47 @@
add_library(rcheevos
rcheevos/include/rc_api_editor.h
rcheevos/include/rc_api_info.h
rcheevos/include/rc_api_request.h
rcheevos/include/rc_api_runtime.h
rcheevos/include/rc_api_user.h
rcheevos/include/rc_consoles.h
rcheevos/include/rc_error.h
rcheevos/include/rc_hash.h
rcheevos/include/rcheevos.h
rcheevos/include/rc_runtime.h
rcheevos/include/rc_runtime_types.h
rcheevos/include/rc_url.h
rcheevos/src/rapi/rc_api_common.c
rcheevos/src/rapi/rc_api_common.h
rcheevos/src/rapi/rc_api_editor.c
rcheevos/src/rapi/rc_api_info.c
rcheevos/src/rapi/rc_api_runtime.c
rcheevos/src/rapi/rc_api_user.c
rcheevos/src/rcheevos/alloc.c
rcheevos/src/rcheevos/compat.c
rcheevos/src/rcheevos/condition.c
rcheevos/src/rcheevos/condset.c
rcheevos/src/rcheevos/consoleinfo.c
rcheevos/src/rcheevos/format.c
rcheevos/src/rcheevos/lboard.c
rcheevos/src/rcheevos/memref.c
rcheevos/src/rcheevos/operand.c
rcheevos/src/rcheevos/rc_compat.h
rcheevos/src/rcheevos/rc_internal.h
rcheevos/src/rcheevos/rc_validate.c
rcheevos/src/rcheevos/rc_validate.h
rcheevos/src/rcheevos/richpresence.c
rcheevos/src/rcheevos/runtime.c
rcheevos/src/rcheevos/runtime_progress.c
rcheevos/src/rcheevos/trigger.c
rcheevos/src/rcheevos/value.c
rcheevos/src/rhash/hash.c
rcheevos/src/rhash/md5.c
rcheevos/src/rhash/md5.h
rcheevos/src/rurl/url.c
)
target_include_directories(rcheevos PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/rcheevos/include")
target_include_directories(rcheevos INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/rcheevos/include")
target_compile_definitions(rcheevos PRIVATE "RC_DISABLE_LUA=1" "RCHEEVOS_URL_SSL")

1
3rdparty/rcheevos/rcheevos vendored Submodule

@ -0,0 +1 @@
Subproject commit 31f8788fe0e694e99db7ce138d45a655c556fa96

84
3rdparty/rcheevos/rcheevos.vcxproj vendored Normal file
View File

@ -0,0 +1,84 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(SolutionDir)common\vsprops\BaseProjectConfig.props" />
<Import Project="$(SolutionDir)common\vsprops\WinSDK.props" />
<PropertyGroup Label="Globals">
<ProjectGuid>{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
<WholeProgramOptimization Condition="$(Configuration.Contains(Release))">true</WholeProgramOptimization>
<UseDebugLibraries Condition="$(Configuration.Contains(Debug))">true</UseDebugLibraries>
<UseDebugLibraries Condition="!$(Configuration.Contains(Debug))">false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
<Import Condition="$(Configuration.Contains(Debug))" Project="..\..\common\vsprops\CodeGen_Debug.props" />
<Import Condition="$(Configuration.Contains(Devel))" Project="..\..\common\vsprops\CodeGen_Devel.props" />
<Import Condition="$(Configuration.Contains(Release))" Project="..\..\common\vsprops\CodeGen_Release.props" />
<Import Condition="!$(Configuration.Contains(Release))" Project="..\..\common\vsprops\IncrementalLinking.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
</PropertyGroup>
<ItemGroup>
<ClCompile Include="rcheevos\src\rapi\rc_api_common.c" />
<ClCompile Include="rcheevos\src\rapi\rc_api_editor.c" />
<ClCompile Include="rcheevos\src\rapi\rc_api_info.c" />
<ClCompile Include="rcheevos\src\rapi\rc_api_runtime.c" />
<ClCompile Include="rcheevos\src\rapi\rc_api_user.c" />
<ClCompile Include="rcheevos\src\rcheevos\alloc.c" />
<ClCompile Include="rcheevos\src\rcheevos\compat.c" />
<ClCompile Include="rcheevos\src\rcheevos\condition.c" />
<ClCompile Include="rcheevos\src\rcheevos\condset.c" />
<ClCompile Include="rcheevos\src\rcheevos\consoleinfo.c" />
<ClCompile Include="rcheevos\src\rcheevos\format.c" />
<ClCompile Include="rcheevos\src\rcheevos\lboard.c" />
<ClCompile Include="rcheevos\src\rcheevos\memref.c" />
<ClCompile Include="rcheevos\src\rcheevos\operand.c" />
<ClCompile Include="rcheevos\src\rcheevos\rc_validate.c" />
<ClCompile Include="rcheevos\src\rcheevos\richpresence.c" />
<ClCompile Include="rcheevos\src\rcheevos\runtime.c" />
<ClCompile Include="rcheevos\src\rcheevos\runtime_progress.c" />
<ClCompile Include="rcheevos\src\rcheevos\trigger.c" />
<ClCompile Include="rcheevos\src\rcheevos\value.c" />
<ClCompile Include="rcheevos\src\rhash\hash.c" />
<ClCompile Include="rcheevos\src\rhash\md5.c" />
<ClCompile Include="rcheevos\src\rurl\url.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="rcheevos\include\rcheevos.h" />
<ClInclude Include="rcheevos\include\rc_api_editor.h" />
<ClInclude Include="rcheevos\include\rc_api_info.h" />
<ClInclude Include="rcheevos\include\rc_api_request.h" />
<ClInclude Include="rcheevos\include\rc_api_runtime.h" />
<ClInclude Include="rcheevos\include\rc_api_user.h" />
<ClInclude Include="rcheevos\include\rc_consoles.h" />
<ClInclude Include="rcheevos\include\rc_error.h" />
<ClInclude Include="rcheevos\include\rc_hash.h" />
<ClInclude Include="rcheevos\include\rc_runtime.h" />
<ClInclude Include="rcheevos\include\rc_runtime_types.h" />
<ClInclude Include="rcheevos\include\rc_url.h" />
<ClInclude Include="rcheevos\src\rapi\rc_api_common.h" />
<ClInclude Include="rcheevos\src\rcheevos\rc_compat.h" />
<ClInclude Include="rcheevos\src\rcheevos\rc_internal.h" />
<ClInclude Include="rcheevos\src\rcheevos\rc_validate.h" />
<ClInclude Include="rcheevos\src\rhash\md5.h" />
</ItemGroup>
<ItemDefinitionGroup>
<ClCompile>
<PreprocessorDefinitions>_CRT_NONSTDC_NO_WARNINGS;RC_DISABLE_LUA;RCHEEVOS_URL_SSL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)rcheevos\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<WarningLevel>TurnOffAllWarnings</WarningLevel>
</ClCompile>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets" />
</Project>

View File

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="rcheevos">
<UniqueIdentifier>{0d8ef204-a486-4873-a41d-743ca6cbe840}</UniqueIdentifier>
</Filter>
<Filter Include="rurl">
<UniqueIdentifier>{3aa9379e-4fd1-4772-b18c-b899631a4161}</UniqueIdentifier>
</Filter>
<Filter Include="rhash">
<UniqueIdentifier>{c95da822-5bca-4274-b57e-d2092e76e8f1}</UniqueIdentifier>
</Filter>
<Filter Include="include">
<UniqueIdentifier>{01fc10b0-c122-461b-b75a-f97c8b89d627}</UniqueIdentifier>
</Filter>
<Filter Include="rapi">
<UniqueIdentifier>{f132daaf-af7e-4a43-8fcf-5651b805b43f}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="rcheevos\src\rapi\rc_api_editor.c">
<Filter>rapi</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rapi\rc_api_info.c">
<Filter>rapi</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rapi\rc_api_runtime.c">
<Filter>rapi</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rapi\rc_api_user.c">
<Filter>rapi</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rapi\rc_api_common.c">
<Filter>rapi</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\format.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\lboard.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\memref.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\operand.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\rc_validate.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\richpresence.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\runtime.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\runtime_progress.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\trigger.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\value.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\alloc.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\compat.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\condition.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\condset.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rcheevos\consoleinfo.c">
<Filter>rcheevos</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rhash\hash.c">
<Filter>rhash</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rhash\md5.c">
<Filter>rhash</Filter>
</ClCompile>
<ClCompile Include="rcheevos\src\rurl\url.c">
<Filter>rurl</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="rcheevos\src\rapi\rc_api_common.h">
<Filter>rapi</Filter>
</ClInclude>
<ClInclude Include="rcheevos\src\rcheevos\rc_compat.h">
<Filter>rcheevos</Filter>
</ClInclude>
<ClInclude Include="rcheevos\src\rcheevos\rc_internal.h">
<Filter>rcheevos</Filter>
</ClInclude>
<ClInclude Include="rcheevos\src\rcheevos\rc_validate.h">
<Filter>rcheevos</Filter>
</ClInclude>
<ClInclude Include="rcheevos\src\rhash\md5.h">
<Filter>rhash</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_api_runtime.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_api_user.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_consoles.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_error.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_hash.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_runtime.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_runtime_types.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_url.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rcheevos.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_api_editor.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_api_info.h">
<Filter>include</Filter>
</ClInclude>
<ClInclude Include="rcheevos\include\rc_api_request.h">
<Filter>include</Filter>
</ClInclude>
</ItemGroup>
</Project>

View File

@ -57,6 +57,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "updater", "updater\updater.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cpuinfo", "3rdparty\cpuinfo\cpuinfo.vcxproj", "{7E183337-A7E9-460C-9D3D-568BC9F9BCC1}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rcheevos", "3rdparty\rcheevos\rcheevos.vcxproj", "{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug AVX2|x64 = Debug AVX2|x64
@ -379,6 +381,18 @@ Global
{7E183337-A7E9-460C-9D3D-568BC9F9BCC1}.Release AVX2|x64.Build.0 = Release|x64
{7E183337-A7E9-460C-9D3D-568BC9F9BCC1}.Release|x64.ActiveCfg = Release|x64
{7E183337-A7E9-460C-9D3D-568BC9F9BCC1}.Release|x64.Build.0 = Release|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Debug AVX2|x64.ActiveCfg = Debug|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Debug AVX2|x64.Build.0 = Debug|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Debug|x64.ActiveCfg = Debug|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Debug|x64.Build.0 = Debug|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Devel AVX2|x64.ActiveCfg = Devel|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Devel AVX2|x64.Build.0 = Devel|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Devel|x64.ActiveCfg = Devel|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Devel|x64.Build.0 = Devel|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Release AVX2|x64.ActiveCfg = Release|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Release AVX2|x64.Build.0 = Release|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Release|x64.ActiveCfg = Release|x64
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -406,6 +420,7 @@ Global
{D45CEC7A-3171-40DD-975D-E1544CF16139} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{A4323327-3F2B-4271-83D9-7F9A3C66B6B2} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{7E183337-A7E9-460C-9D3D-568BC9F9BCC1} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
{6D5B5AD9-1525-459B-939F-A5E1082AF6B3} = {78EBE642-7A4D-4EA7-86BE-5639C6646C38}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {0BC474EA-3628-45D3-9DBC-E22D0B7E0F77}

View File

@ -38,6 +38,7 @@ if(DISABLE_BUILD_DATE OR openSUSE)
endif()
option(USE_VTUNE "Plug VTUNE to profile GS JIT.")
option(USE_ACHIEVEMENTS "Build with RetroAchievements support" ON)
#-------------------------------------------------------------------------------
# Graphical option

View File

@ -234,6 +234,11 @@ if(QT_BUILD)
# We use the bundled (latest) SDL version for Qt.
find_optional_system_library(SDL2 3rdparty/sdl2 2.0.22)
# rcheevos backend for RetroAchievements.
if(USE_ACHIEVEMENTS)
add_subdirectory(3rdparty/rcheevos EXCLUDE_FROM_ALL)
endif()
endif()
if(NOT WIN32 AND QT_BUILD)