ModOrganizer 2: Add experimental repair command #945
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an experimental command for ModOrganizer 2, which attempts to repair a broken standalone MO2 prefix.
We run ModOrganizer 2 using a Wine command, but if the Proton version changes, there is a chance the prefix may break as well. The newer Proton version may not be compatible with the typical Wine entry point,
kernel32.dll
. This will result in an error along the lines ofwine: could not load kernel32.dll, status c0000135
. Even the status code here is typically the same.We can fix this by running a Wine command using Proton, which will update the symlinked libraries to the ones used by the current Proton version. The command of choice used here was
wine
which doesn't do anything and exits quickly, so the command will look something likeSTEAM_COMPAT_DATA_PATH="/home/gaben/.config/steamtinkerlaunch/mo2/compatdata" "/home/gaben/.local/share/Steam/compatibilitytools.d/GE-Proton8-20/proton" run wine
.This does not happen with regular launches because we run in the game's prefix, which is repaired with Proton already. But the standalone MO2 compatdata does not get this luxury.
There may be a way to automate this in future, such as when the MO2 Proton version changes, or maybe we can switch over to using Proton to run MO2 directly at a later date. For now, this works and fixed the problem for me, so I think it could be useful for others to have this too.