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 of wine: 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 like STEAM_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.
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.