HeroicGamesLauncher icon indicating copy to clipboard operation
HeroicGamesLauncher copied to clipboard

[Fix] Support DXVK installation on 32-bit prefixes

Open casasfernando opened this issue 9 months ago • 2 comments

Fix support for DXVK installation on 32-bit prefixes. Fixes https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/issues/3705.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • [x] Tested the feature and it's working on a current and clean install.
  • [x] Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • [ ] Created / Updated Tests (If necessary)
  • [ ] Created / Updated documentation (If necessary)

casasfernando avatar May 12 '24 18:05 casasfernando

@casasfernando thanks for your contribution!

Can you add instructions on how to test this, examples of games, etc?

flavioislima avatar May 14 '24 09:05 flavioislima

Thanks for reviewing this @flavioislima .

Example of games that would need or prefer a 32-bit Wine prefix:

  • All the "classic" Need for Speed games (II SE, III Hot Pursuit, High Stakes, etc) that were meant run on Windows 95/98 (Wine 64-bit prefixes can't be configured to present themselves as Windows 98).
  • Virtua Fighter PC and Virtua Fighter 2
  • Other games that require Windows 95/98 and would fail to install or run in newer Windows versions like XP

How to test (with the patch in place):

  1. Add the following environment variable in Heroic game settings before adding the new game to the library WINEARCH=win32. This will make the new Wine prefix to be 32-bit.
  2. Go to Library -> Add game.
  3. Fill in the game details and run the installer along any other prerequisites (e.g.: nglide)
  4. Select the game executable
  5. Run the game and it should be using DXVK

Let me know if this is the information you was looking for. If you would like to save some time I can provide a default 32-bit Wine prefix created with Heroic (without any games) that would be enough to test the PR and confirm that with the patch in place the right architecture libraries are copied to system32 when DXVK installation is executed.

Edit: the patch doesn't modify DXVK installation process on 64bit Wine prefixes at all.

casasfernando avatar May 14 '24 10:05 casasfernando

I don't like how much duplication is in this function, but resolving that is not a task for this PR

After/if this PR is merged I was planning to work on two additional ones. One to fix DXVK uninstallation and another one to clean up the function code in general and reduce duplication. But I prefer to address one thing at a time and keep changes as small and clean as possible.

casasfernando avatar May 16 '24 17:05 casasfernando