Use compile-time macro for Flatpak instead.

This commit is contained in:
Dario 2025-05-03 18:59:56 -03:00
parent f9d6c8b4ae
commit 91fc309f0e
2 changed files with 5 additions and 7 deletions

View file

@ -28,7 +28,7 @@
"./N64Recomp us.rev1.toml",
"./RSPRecomp aspMain.us.rev1.toml",
"./RSPRecomp njpgdspMain.us.rev1.toml",
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_MAKE_PROGRAM=ninja -DPATCHES_C_COMPILER=clang -DPATCHES_LD=ld.lld -G Ninja -S . -B cmake-build",
"cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_MAKE_PROGRAM=ninja -DPATCHES_C_COMPILER=clang -DPATCHES_LD=ld.lld -DZELDA64RECOMP_FLATPAK -G Ninja -S . -B cmake-build",
"cmake --build cmake-build --config Release --target Zelda64Recompiled --parallel",
"rm -rf assets/scss",
"mkdir -p /app/bin",

View file

@ -48,13 +48,11 @@ namespace zelda64 {
std::filesystem::path get_program_path() {
#if defined(__APPLE__)
return get_bundle_resource_directory();
#elif defined(__linux__)
std::error_code ec;
if (std::filesystem::exists("/.flatpak-info", ec)) {
return "/app/bin";
}
#endif
#elif defined(__linux__) && defined(ZELDA64RECOMP_FLATPAK)
return "/app/bin";
#else
return "";
#endif
}
std::filesystem::path get_asset_path(const char* asset) {