소스 검색

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.
Mary 3 년 전
부모
커밋
1f1e2a7f03
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8 1
      Ryujinx.Common/ReleaseInformation.cs

+ 8 - 1
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
     }
 }