From 1f1e2a7f03aad988cb04045eee18a360a807d13f Mon Sep 17 00:00:00 2001 From: Mary Date: Tue, 21 Feb 2023 22:38:34 +0100 Subject: [PATCH] misc: changes base application directory behaviour (#4460) This allows changing base application directory behavior at build time via FORCE_EXTERNAL_BASE_DIR. This is intended to be used by nixpkgs and flathub builds. I also added the missing patch for macOS that we have on macos1 to avoid invalidating code signature. --- Ryujinx.Common/ReleaseInformation.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Ryujinx.Common/ReleaseInformation.cs b/Ryujinx.Common/ReleaseInformation.cs index d0e013282..601c05b17 100644 --- a/Ryujinx.Common/ReleaseInformation.cs +++ b/Ryujinx.Common/ReleaseInformation.cs @@ -40,14 +40,21 @@ namespace Ryujinx.Common } } +#if FORCE_EXTERNAL_BASE_DIR public static string GetBaseApplicationDirectory() { - if (IsFlatHubBuild()) + return AppDataManager.BaseDirPath; + } +#else + public static string GetBaseApplicationDirectory() + { + if (IsFlatHubBuild() || OperatingSystem.IsMacOS()) { return AppDataManager.BaseDirPath; } return AppDomain.CurrentDomain.BaseDirectory; } +#endif } } \ No newline at end of file