sonic2kk / steamtinkerlaunch

Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs
GNU General Public License v3.0
2.13k stars 71 forks source link

Fix handling of nxm:// URLs for MO2 #1082

Closed zerodogg closed 5 months ago

zerodogg commented 5 months ago

It now writes the MO2Conf files on each startup of MO2, and in addition to the STEAM/PROTON variables it will now also write MO2PFX, MO2WINE and MO2INST, so that it can launch URLs in an MO2 instance launched by startMO2.

zerodogg commented 5 months ago

Resolves #848 (improves #851)

sonic2kk commented 5 months ago

Thanks for the PR! I'll do some testing to confirm.

I'd like to know though, why does this NXM link handling work for some people and not others? It works for me already.

If you don't have an answer that's fine. I'll test when I have some time and confirm that at the very least this doesn't break anything.

Really nice to see the community stepping up to help here!

sonic2kk commented 5 months ago

For some reason, ShellCheck CI didn't run against this PR. Odd. I'll see if I can manually kick it off!

zerodogg commented 5 months ago

It seems like it only wrote the MO2Conf file in certain instances when running the actual game, but never when MO2 was just started on its own. So the file wouldn't exist (or could be wrong, referencing an older game). This patch adds writing that file when starting MO2 as well, and I had to just add some additional vars since starting MO2 references WINE and WINEPREFIX rather than a PROTON.

sonic2kk commented 5 months ago

Oh, right, can you bump the version at the top of the file to PROGVERS="v14.0.2040415-1"? :-)

I can't leave a review comment about that.

sonic2kk commented 5 months ago

Changes make sense overall and don't break anything. ShellCheck is also green locally. I'm not sure why it didn't run on CI but I'll look into that separately, that isn't an issue for your PR.

MO2 still starts up in Standalone Mode and Game Mode correctly. NXM URLs still work for me with no change in behaviour, and code makes sense. I did request a slight change but since ShellCheck isn't complain it's not a huge deal. I've also asked a question just for my own clarity, since I'm not overly familiar with this part of the code. Version needs bumped but at worst I can bump it myself.

Thank you a ton for taking the time to investigate and fix this issue! It comes up all the time, despite me highly disapproving of this feature in MO2 to begin with, I appreciate that you spent the time to fix it.

zerodogg commented 5 months ago

Oh, right, can you bump the version at the top of the file to PROGVERS="v14.0.2040415-1"? :-)

I can't leave a review comment about that.

Done

sonic2kk commented 5 months ago

Awesome change, thank you! Will merge now.

zerodogg commented 5 months ago

Thanks ! :)

sonic2kk commented 5 months ago

Changelog has been updated with credit to you :slightly_smiling_face: https://github.com/sonic2kk/steamtinkerlaunch/wiki/Changelog#fixes

frostworx commented 5 months ago

Really nice to see the community stepping up to help here!

full ack :heart: