Way for user to provide external DLL paths (e.g. mfplat and friends) to Proton #4520
Open
2 tasks done
Labels
Feature Request
New feature or request
Feature Request
I confirm:
contain this feature already.
Description
Many games run at all or with more features if they have access to the official DLLs from MS. The Media Foundation DLLs are the most common offender. At the same time many users have easy access to these official DLLs, e.g. from a preinstalled Windows partition on their computer. What is missing is an easy way to allow the user to inject these DLLs into Proton on a general and a per-game basis.
I suggest the following:
Proton should read a simple text file from a defined location within the user's realm of control, e.g.
$HOME/.config/proton/extra-dlls.ini
The file should contain a list of paths of directories where the user has official Windows DLLs available (e.g. a mounted Windows partition)
The file should contain a list of DLL names and identifying hashes (e.g. md5) found in those directories. This list should be in a format easy to generate for the user, e.g. the output from
md5sum *.dll
within a directory.The file should have sections for 32bit and 64bit with each section containing a list of preferred hashes for each DLL, e.g.
The file should have sections for individual games (identified by some ID, e.g. Steam's name) with a list of preferred hashes. E.g.
When Proton launches a game, it checks if the above file has a section matching that game. If it does, Proton reads the list of DLL names and their preferred hashes from that game's section. Proton combines this user-provided info with an internal list shipped with Proton. If no section for the game exists in the text file, Proton only uses its shipped info (if any). Proton adds in the information from the general 32bit or 64bit section depending on what is appropriate for the game. The result is a list of DLL names and hashes that would be desirable to use with the game.
Proton uses the hash list described in 3. to quickly check if all of the desirable DLLs are made available by the user. This is preferable to scanning the list of directories because that may be very slow AND the user may not actually want to make available all DLLs he has lying around to Proton.
If and only if all of the desirable DLLs are available based on the check 7. does Proton scan the provided directories from 2. to locate an actual instance for each DLL with the respective hash.
Only if all desirable DLLs are found in the proper version as defined by the hash, does Proton replace all of its internal Wine-provided counterparts of these DLLs with the external versions and adds all of the external DLLs for which Wine has no counterpart to its runtime environment for the launched game instance only. This means no piecemeal adding of incomplete sets of DLLs and no permanent modifications to the whole Proton instance that could influence other games. The external DLLs used for this launch should probably be copied to a temporary location used only for this specific launch. No matter the implementation, it must be ensured that if the user removes or changes the info for the game in the text file, the new info takes effect for the next launch of the game with no leftover DLLs from previous launches being injected. It must also be ensured that other games launched with the same Proton instance do not accidentally use DLLs not configured for that game.
Justification [optional]
Wine has mechanisms for using externally provided DLLs with a Wine installation, but these are unfit for Proton for the following reasons:
The text was updated successfully, but these errors were encountered: