openplanet-nl / issues

Issue tracker for Openplanet.
10 stars 0 forks source link

Missing reg entry prevents loading by default in Linux #101

Open qwertychouskie opened 2 years ago

qwertychouskie commented 2 years ago

On Linux with Wine/Proton, the following key is needed to allow loading the modified dinput8.dll:

[Software\\Wine\\DllOverrides]
"dinput8"="native,builtin"

Otherwise, the modified dinput8.dll is never loaded. Although the DLL override can be manually added with winecfg, it would be better if the installer just sets the needed key out of the box.

codecat commented 2 years ago

That would require the installer (built with NSIS) to know if it's running under Wine. A quick google search on whether that can be detected from within NSIS doesn't show a lot of results though.

qwertychouskie commented 2 years ago

AFAIK, setting the key under Windows will not cause any issues, it may be easiest to just set the value regardless of platform.

Alternatively: https://stackoverflow.com/questions/7372388/determine-whether-a-program-is-running-under-wine-at-runtime

codecat commented 2 years ago

While it might not be a bad solution, I also don't want to unnecessarily clutter the registry. The code you linked is useful, but is not specifically for NSIS scripts.

MisterTakaashi commented 1 year ago

Hi, just a comment here for Lutris users: you can make openplanet work in Trackmania 2020 on lutris:

Thank you @qwertychouskie

maeries commented 1 year ago

Hi, just a comment here for Lutris users: you can make openplanet work in Trackmania 2020 on lutris:

* Open game configuration

* Go to runner options

* Show advanced options

* Modify DLL overrides, add:

  * key: dinput8
  * value: native,builtin

* Save

Thank you @qwertychouskie

That doesn't work for me. But doing the same in winecfg (click the arrow next to the joystick in lutris -> Wine configuration -> Libraries -> add override) does the trick. No idea why

MisterTakaashi commented 1 year ago

FYI with the Steam release of Trackmania, the problem persists. The current solution is to set this as launch option: WINEDLLOVERRIDES="dinput8=n,b" %command%

codecat commented 1 year ago

I might actually consider doing this now that the game is on Steam, I think it makes installation a lot easier for those platforms. 👀

qwertychouskie commented 1 year ago

I might actually consider doing this now that the game is on Steam, I think it makes installation a lot easier for those platforms. eyes

That would be awesome! Between the Steam and Console releases, the game is likely going to have a big increase in playerbase, so making tools as accessible as possible on as many platforms as possible is a benefit to everyone.

codecat commented 1 year ago

Agreed. Additionally, I wanted to have a nicer/easier way to install on Steam Deck, too. I am considering using Decky Loader for this, but I haven't done enough research on this topic yet.

codecat commented 1 year ago

According to this page I should be able to use AppDefaults\Trackmania.exe. I will be adding this in the next update, so that the following registry key is set:

HKCU\Software\Wine\AppDefaults\Trackmania.exe\DllOverrides\dinput8
native,builtin

Hopefully this works. Would be cool if someone could test it once 1.25.26 becomes available! (First in the edge branch)

EmeraldSnorlax commented 1 year ago

I might actually consider doing this now that the game is on Steam, I think it makes installation a lot easier for those platforms. eyes

i mean, you could just add a note on the download page for linux users? i came here from the github listed on the website to check if linux support was on the roadmap, so maybe just add a note or something

needing to set a dll override is fairly common for other games i mod on linux through proton/wine that rely on dll loading. (e.g. SuperBLT for PAYDAY 2 also requires you to do a similar thing, WINEDLLOVERRIDES="wsock32=n,b" %command%)

just my two cents, at least, if you still stand by this:

I also don't want to unnecessarily clutter the registry. The code you linked is useful, but is not specifically for NSIS scripts.

codecat commented 1 year ago

I've already made the change in the installer (as of 1.25.26), so I think I'm over "unnecessarily cluttering the registry" 😜

This change is currently on the edge branch and will make it into the next stable release. You can manually download edge builds here: https://openplanet.dev/download/next?branch=edge

(Edit: I accidentally posted the same comment reply twice due to Github having issues, sorry if anyone got double emails.)

EmeraldSnorlax commented 1 year ago

i'm not sure if you'd find this useful, but i just grabbed the latest edge build 1.25.27 and openplanet does not seem to load by default;

FYI with the Steam release of Trackmania, the problem persists. The current solution is to set this as launch option: WINEDLLOVERRIDES="dinput8=n,b" %command%

this is still required

codecat commented 1 year ago

Interesting, so the registry key isn't working then? 🤔

EmeraldSnorlax commented 1 year ago

apparently not? image my proton registry looks like this (looks like valve adds their own registry keys, as i don't own half these games)

image looks like the key you tried to set indeed gets set, though. (HKEY_CURRENT_USER\Software\Wine\AppDefaults\Trackmania.exe\DllOverrides)

i do wonder if wine actually honours this?

qwertychouskie commented 1 year ago

Seems to work as expected on my system with no launch option set in Steam. I just installed Openplanet with the latest installer and it worked out-of-the-box.

MisterTakaashi commented 1 year ago

Really ? Tried it today on my Linux desktop through Steam, still had to set the launch option to make it work, even with 1.25.43

codecat commented 1 year ago

Why can't Wine just work as advertised 😔

qwertychouskie commented 1 year ago

Really ? Tried it today on my Linux desktop through Steam, still had to set the launch option to make it work, even with 1.25.43

By guess is that you didn't run the Openplanet installer within the Wineprefix for Trackmania, therefore the registry key didn't get added.

How I recommend to install so it works is to use Protontricks. Select the Trackmania: 2225070 list item, (ignore any warnings about 64bit), then Select the default prefix, then Run explorer, then use that explorer window to run the Openplanet installer exe. (It's probably possible to condense this down to a one-liner command that can by copy-pasted.)