|
@@ -1,5 +1,6 @@
|
|
using System.IO;
|
|
using System.IO;
|
|
using System.Reflection;
|
|
using System.Reflection;
|
|
|
|
+using MonoMod.Utils;
|
|
|
|
|
|
namespace BepInEx
|
|
namespace BepInEx
|
|
{
|
|
{
|
|
@@ -12,7 +13,11 @@ namespace BepInEx
|
|
{
|
|
{
|
|
ExecutablePath = executablePath;
|
|
ExecutablePath = executablePath;
|
|
ProcessName = Path.GetFileNameWithoutExtension(executablePath);
|
|
ProcessName = Path.GetFileNameWithoutExtension(executablePath);
|
|
- GameRootPath = Path.GetDirectoryName(executablePath);
|
|
|
|
|
|
+
|
|
|
|
+ GameRootPath = Utility.CurrentPlatform == Platform.MacOS
|
|
|
|
+ ? Utility.ParentDirectory(executablePath, 4)
|
|
|
|
+ : Path.GetDirectoryName(executablePath);
|
|
|
|
+
|
|
BepInExRootPath = bepinRootPath ?? Path.Combine(GameRootPath, "BepInEx");
|
|
BepInExRootPath = bepinRootPath ?? Path.Combine(GameRootPath, "BepInEx");
|
|
ConfigPath = Path.Combine(BepInExRootPath, "config");
|
|
ConfigPath = Path.Combine(BepInExRootPath, "config");
|
|
BepInExConfigPath = Path.Combine(ConfigPath, "BepInEx.cfg");
|
|
BepInExConfigPath = Path.Combine(ConfigPath, "BepInEx.cfg");
|
|
@@ -50,6 +55,7 @@ namespace BepInEx
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// The directory that the currently executing process resides in.
|
|
/// The directory that the currently executing process resides in.
|
|
|
|
+ /// <para>On OSX however, this is the parent directory of the game.app folder.</para>
|
|
/// </summary>
|
|
/// </summary>
|
|
public static string GameRootPath { get; private set; }
|
|
public static string GameRootPath { get; private set; }
|
|
|
|
|