Skip to content

Installation on macOS makes checks for Windows paths before calling GetOS() #193

@tercenya

Description

@tercenya

Describe the problem
I downloaded QModManager 4.0.2.3-201-4-0-2-3-1600476097.exe, installed it on a Windows VM, copied the latest BepInEx folder over to my Mac (10.15.6). While attempting to run mono QModManager.exe, I kept getting a "Could not find Managed directory" error, no matter where I put the BepInEx directory.

A quick survey of the code

string gameRootDirectory = Path.Combine(Environment.CurrentDirectory, "../../..");
string snManagedDirectory = Path.Combine(gameRootDirectory, "Subnautica_Data", "Managed");
shows that the installer is looking for ../../../Subnautica_Data/Managed, and can fail with the above error before it calls GetOS
os = GetOS();
to specialize directory names. Unfortunately the directory in question in macOS is ~/Library/ApplicationSupport/Steam/steamapps/common/Subnautica/Subnautica.app/Contents/Resources/Data/Managed, so the check for the managed directory always fails.

I also couldn't run the QModManager.exe with out importing the BepInEx dlls to the local folder since the relative paths require me to execute the file from its own directory?

Workaround
Since the first check expected the Data folder to 3 dirctories down, I placed the BepInEx folder in ~/Library/ApplicationSupport/Steam/steamapps/common/Subnautica/Subnautica.app/Contents/Resources and ran:

cd ~/Library/ApplicationSupport/Steam/steamapps/common/Subnautica/Subnautica.app/Contents/Resources
ln -s Data Subnautica_Data
cd BepInEx/patchers/QModManager
ln -s ../../core/* .
mono QModManager.exe

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions