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.15k stars 73 forks source link

ReShade + SpecialK: Automatically export DLL names #920

Closed sonic2kk closed 1 year ago

sonic2kk commented 1 year ago

One more piece of work for #894.

This PR adds the SpecialK and ReShade DLL names to the WINEDLLOVERRIDES, without any .dll extension if it exists. This means custom DLL name should be loaded by the game without any DLL overrides having to be set by the user. Unsure why this wasn't done in #881, but because of that we didn't do it in #912. I guess I thought it would be more complex than this :sweat_smile:

The logic here is a bit messy, as it will export DLL names twice in some scenarios. If we leave the DLL names as defaults, for example dxgi.dll, then it will technically be in WINEDLLOVERRIDES twice. This shouldn't cause issues, though. Logging just might look a little odd at first :-)

The DLLs will only be exported for SpecialK if it actually reaches the block for installation, so they won't be exported in any other case. They were not exported before afaik so I guess the game just picked it up manually, hopefully this won't break anything :-)


This is mostly untested, so will need more testing to ensure this doesn't break anything.

sonic2kk commented 1 year ago

Seems to work! Tested:

In all cases the DLLs were picked up correctly! This is good to merge then.