nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1diff --git a/src/core/retroarch.cpp b/src/core/retroarch.cpp
2index 7502922..c6a572b 100644
3--- a/src/core/retroarch.cpp
4+++ b/src/core/retroarch.cpp
5@@ -103,7 +103,7 @@ static void loadConfig( std::map<string, string> &configs ) {
6
7 const fs::path basePath = RetroArch::getBasePath();
8 configs["system_directory"] = (basePath / _NFS("system")).u8string();
9- configs["libretro_directory"] = (basePath / _NFS("cores")).u8string();
10+ configs["libretro_directory"] = "@retroArchCoresPath@";
11 configs["savefile_directory"] = (basePath / _NFS("saves")).u8string();
12 configs["savestate_directory"] = (basePath / _NFS("states")).u8string();
13 configs["libretro_info_path"] = (basePath / _NFS("info")).u8string();
14@@ -111,7 +111,7 @@ static void loadConfig( std::map<string, string> &configs ) {
15 #if defined(FLATPAK_VERSION)
16 configs["assets_directory"] = "/app/share/libretro/assets/";
17 #elif defined(__linux__)
18- configs["assets_directory"] = (BaseDir::data() / "retro-data" / "assets").u8string();
19+ configs["assets_directory"] = "@retroArchAssetsPath@";;
20 configs["osk_overlay_directory"] = (BaseDir::data() / "retro-data" / "overlays" / "keyboards").u8string();
21 configs["overlay_directory"] = (BaseDir::data() / "retro-data" / "overlays").u8string();
22 configs["audio_filter_dir"] = (BaseDir::data() / "retro-data" / "filters" / "audio").u8string();
23@@ -866,13 +866,7 @@ fs::path RetroArch::getBasePath() {
24 }
25
26 fs::path RetroArch::getCorePath() {
27-#if defined(_WIN32)
28- return RetroArch::getBasePath() / L"cores" / L"parallel_n64_next_libretro.dll";
29-#elif defined(__APPLE__)
30- return RetroArch::getBasePath() / "cores" / "parallel_n64_next_libretro.dylib";
31-#else
32- return RetroArch::getBasePath() / "cores" / "parallel_n64_next_libretro.so";
33-#endif
34+ return "@parallelN64CorePath@";
35 }
36
37 fs::path RetroArch::getConfigPath() {
38@@ -887,7 +881,7 @@ fs::path RetroArch::getExePath() {
39 #elif defined(FLATPAK_VERSION)
40 return BaseDir::program() / "retroarch";
41 #else
42- return BaseDir::data() / "appimage" / "RetroArch-Linux-x86_64.AppImage";
43+ return "@retroArchExePath@";
44 #endif
45 }
46
47diff --git a/src/main.cpp b/src/main.cpp
48index fbd4c92..91ef84e 100644
49--- a/src/main.cpp
50+++ b/src/main.cpp
51@@ -209,7 +209,7 @@ int main( int argc, char **argv ) {
52 fs::path( "/usr/local/share/parallel-launcher/translations/" ),
53 fs::path( "/usr/share/parallel-launcher/translations/" )
54 #else
55- fs::path( "/usr/share/parallel-launcher/translations/" ),
56+ fs::path( "@sharePath@/translations/" ),
57 fs::path( "/usr/local/share/parallel-launcher/translations/" ),
58 BaseDir::program() / "lang"
59 #endif
60diff --git a/src/plugins/discord-plugin.cpp b/src/plugins/discord-plugin.cpp
61index 055c0ee..7ce44fb 100644
62--- a/src/plugins/discord-plugin.cpp
63+++ b/src/plugins/discord-plugin.cpp
64@@ -38,7 +38,7 @@ const DiscordPlugin &DiscordPlugin::tryLoad( bool *success ) noexcept {
65 return s_abi;
66 }
67
68- void *handle = dlopen( (BaseDir::data() / "plugins" / "libdiscord-rpc.so").u8string().c_str(), RTLD_NOW );
69+ void *handle = dlopen( "libdiscord-rpc.so", RTLD_NOW );
70 if( !handle ) {
71 if( success != nullptr ) *success = false;
72 return s_stub;
73diff --git a/src/polyfill/base-directory.cpp b/src/polyfill/base-directory.cpp
74index 2dcc704..45970a4 100644
75--- a/src/polyfill/base-directory.cpp
76+++ b/src/polyfill/base-directory.cpp
77@@ -146,7 +146,7 @@ static Locations getLocations() {
78 #if defined(FLATPAK_VERSION)
79 fs::path( "/app/share/parallel-launcher" )
80 #elif defined(__linux__)
81- fs::path( "/usr/share/parallel-launcher" )
82+ fs::path( "@sharePath@" )
83 #endif
84 };
85 }