QModManager icon indicating copy to clipboard operation
QModManager copied to clipboard

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

Open tercenya opened this issue 4 years ago • 4 comments

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 https://github.com/SubnauticaModding/QModManager/blob/77217a22dbcbf583b4db81c3c4a66f65ace925ce/Executable/Program.cs#L54-L55 shows that the installer is looking for ../../../Subnautica_Data/Managed, and can fail with the above error before it calls GetOS https://github.com/SubnauticaModding/QModManager/blob/77217a22dbcbf583b4db81c3c4a66f65ace925ce/Executable/Program.cs#L79 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

tercenya avatar Sep 20 '20 19:09 tercenya

That's because that folder is within the subnautica.app under resources I believe

silvervirus avatar Sep 20 '20 20:09 silvervirus

here's a script that is working for me, and it avoids using the installer https://gist.github.com/slheavner/7b95d9e652b8b9df7b5f5b72c50754b3

Edit: adding notes of what it does

  • fetch BepInEx and install per instructions from their site.
  • copy required dlls/files to plugins and patchers folders of BepInEx
  • instruct the user to add the appropriate luanch options for subnuatica in steam, as per BepInEx's website

slheavner avatar Oct 07 '20 19:10 slheavner

@tobeyStraitjacket Take a look at this when you can.

PrimeSonic avatar Oct 07 '20 19:10 PrimeSonic

Ah, interesting. Ty for this info I will get this fixed soon

toebeann avatar Oct 08 '20 18:10 toebeann