javisar / ONI-Modloader

A modloader for Oxygen Not Included
MIT License
72 stars 25 forks source link

Not able to run patched DLLs using Mac version (used to be possible) #20

Closed Fury1SOG closed 6 years ago

Fury1SOG commented 6 years ago

Prerequisites *Please answer the following questions for yourself before submitting an issue. YOU MAY DELETE THE PREREQUISITES SECTION.

Describe the bug It used to be possible to patch the DLL in Windows (up until around Cosmic Update), and then copy the DLLs to the Mac version of ONI, but this is no longer possible.

Expected behavior ONI boots corrects as previously in Cosmic Update

Current behavior An error message appears in the Unity log, and ONI freezes at the KLEI screen.

To Reproduce Steps to reproduce the behavior:

  1. Inject ModLoader in Windows and verify that ONI loads.
  2. Copy patched DLLs, and files in Managed folder to MacOS OxygenNotIncluded.app/Contents/Resources/Data/Managed
  3. Start ONI from Steam menu (no actual mods copied to Mods folder yet)
  4. See unity error log:

FileNotFoundException: Could not load file or assembly '/Users/xxxxxx/Library/Application Support/Steam/steamapps/common/OxygenNotIncluded/OxygenNotIncluded.app/Contents/Resources/Data/Managed\ModLoader.dll' or one of its dependencies. The system cannot find the file specified. at (wrapper managed-to-native) System.Reflection.Assembly:LoadFrom (string,bool) at System.Reflection.Assembly.LoadFrom (System.String assemblyFile) [0x00000] in :0 at LaunchInitializer.Update () [0x00000] in :0

(Filename: Line: -1)


Possible Solution Has something changed from before how folders are handled?

Screenshots If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

Additional context Add any other context about the problem here like used Config files

Output log If applicable (game crashes or displays errors) please copy and paste part of the output_log.txt game file that contains information about the crash/error. Check for error logs in:

Relevant code

  // TODO(you): code here
javisar commented 6 years ago

Mmmm, this is going to be a little hard, I don't have MacOS. I'll have a look to the injector to check if everything is ok. The injection was modified to handle paths in different OSs but since you are doing it in Windows and moving it to Mac I don't know the behavior. Do you have mono available in mac? It should be possible to run the injector in Mac with it. Thanks for filling the issue.

Fury1SOG commented 6 years ago

Thank you very much for this hint! I was able to get the ModLoader working in MacOS:

  1. Install newest stable version of Mono from https://www.mono-project.com.
  2. Open terminal and cd to '/Users//Library/Application Support/Steam/steamapps/common/OxygenNotIncluded/OxygenNotIncluded.app/Contents/Resources/Data/Managed'
  3. run "mono injector.exe"
javisar commented 6 years ago

Glad that it worked. I'll update the instructions.