mirror of
https://git.freebsd.org/ports.git
synced 2025-06-18 03:00:42 -04:00
36 lines
1.2 KiB
Text
36 lines
1.2 KiB
Text
Allow relocation of resource files
|
|
|
|
--- cmake/BuildParameters.cmake.orig 2024-04-07 18:04:50 UTC
|
|
+++ cmake/BuildParameters.cmake
|
|
@@ -228,6 +228,10 @@ if(USE_CLANG AND TIMETRACE)
|
|
|
|
if(USE_CLANG AND TIMETRACE)
|
|
add_compile_options(-ftime-trace)
|
|
+endif()
|
|
+
|
|
+if(DEFINED PCSX2_RESOURCES_PATH)
|
|
+ add_compile_definitions(PCSX2_RESOURCES_PATH="${PCSX2_RESOURCES_PATH}")
|
|
endif()
|
|
|
|
set(PCSX2_WARNINGS ${DEFAULT_WARNINGS})
|
|
--- pcsx2/Pcsx2Config.cpp.orig 2024-04-10 11:22:25 UTC
|
|
+++ pcsx2/Pcsx2Config.cpp
|
|
@@ -1855,6 +1855,10 @@ bool EmuFolders::SetResourcesDirectory()
|
|
|
|
bool EmuFolders::SetResourcesDirectory()
|
|
{
|
|
+#ifdef PCSX2_RESOURCES_PATH
|
|
+ // Resources' path specified at compile time
|
|
+ EmuFolders::Resources = Path::Canonicalize(PCSX2_RESOURCES_PATH);
|
|
+#else
|
|
#ifndef __APPLE__
|
|
// On Windows/Linux, these are in the binary directory.
|
|
Resources = Path::Combine(AppRoot, "resources");
|
|
@@ -1862,6 +1866,7 @@ bool EmuFolders::SetResourcesDirectory()
|
|
// On macOS, this is in the bundle resources directory.
|
|
Resources = Path::Canonicalize(Path::Combine(AppRoot, "../Resources"));
|
|
#endif
|
|
+#endif // PCSX2_RESOURCES_PATH
|
|
|
|
Console.WriteLnFmt("Resources Directory: {}", Resources);
|
|
|