My way of running almost any Windows game that isn't preliminary prepared for Linux

rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
790
Reaction score
644
Credits
5,031
As you probably know there are some games for Windows that have been prepared for Linux - either by Vavle, sometimes by GOG or another platform. But these games do not always run as expected. Not to mention that quite often there aren't enough seeders (if any at all, even if the game is free-to-play, like MMORPG, and those games often resort to torrents to the torrent protocol to spread their files) which leaves you with only one option: to download the game with its Windows installer. You can try using POL or Lutris but my experience with them has always meant hours spent in trying to run any game which is why I don't use them. I have my own way for that which really takes less than 30 seconds, thans to two scripts I wrote. Well, more accurately - I took a similar script from the internet and modified it for my needs.

Since Wine doesn't automatically pass every single DLL to the game EXE, I found a way to force it to. At first I was doing it manually file by file but then it hit me I could save a lot of time writing the two scripts. But here I'll give you only the first script bc the second one is only for my own convenience and you won't need it. So here's the deal:

Install in the system the latest versions of DXVK and VKD3D. If you're using Arch or Arch-based distro, that's easy. I can't guarantee about the installation process in the other distros, though. This will save you another trouble later.

1. Open your favorite file manager and navigate to the main directory of the game - where the EXE and the DLLs usually are. In most cases both file types are in the same directory.
2. Open terminal in that dir - in PCManFM that's done by the F4 key.
3. Run this script (you better make an alias of it - a lot easier to run it than having to type the path to the script every single time):

Code:
list-all-dlls.sh

find *.dll > /B/123/GameLibs.txt && cd /B/123 && sed -i 's/^.*$/"&"="native,builtin"/g' GameLibs.txt
(You could add "#!/usr/bin/env bash" at the beginning of the file, altough that line isn't really necessary, if you add the 'sh' extension)

This script basically finds and lists all DLLs in the directory and lists them one file per line. That's the main reason I use "find" and not "ls" - "find" separates each file with a new line. Then, once all DLLs are listed, it saves them in a file in the predefined path by me but you can change that path, if you want. After that it changes the working directory to where the newly created file is (GameLibs.txt), removes all symbols after the dot ('.dll') and surrounds the remaining words with:
• a double quote on the left
• this text on the right:
Code:
"="native,builtin"

4. Open ~/.wine/user.reg with any prefered text editor and search (Ctrl+F) for "overrides" ([Software\\Wine\\DllOverrides]). Also open GameLibs.txt after it has been processed by the script in Step 3. Ctrl+A the text you see and paste it right BELOW the line "[Software\\Wine\\DllOverrides]" in ~/.wine/user.reg, then save the file.
If you run $ winecfg and click on "Libraries" tab, you'll see all the libraries you just added by copy-pasting them from GameLibs.txt. Depending on the game, the number of these libraries could be over 20 and you just added them to Wine Overrides with a simple script, saving you A LOT of time typing each one manually!

In most cases that's pretty much it.
In SOME cases the installed VKD3D (the replacement for DX12) might not give you the performance you expect. This is where these two libs come into play (the attachment). whispering: I sorta stole them from Steam after I discovered where they've hidden them. Place them in the main game dir where the executable is located, then run the game again.

I can't guarantee you'll be able to run every single game using this method but you'll run the most of them, especially: "World of Tanks", "World of Warships" and "Armored Warfare". "World of Tanks Blitz" is a "maybe", depending on the hardware. IDK why (yet) but running WOTB with Proton 8.0 or Experimental works a little better than running the game via WarGaming's launcher. But the other 3 games run even better than they ever have on Windows. :D
I think you can run pretty much any online game (this actually just gave me an idea...), for as long as it doesn't have EAC. SOME games with GameGuard.dll do run on Linux (Cabal Online does; or least it did last year, IDK about now), others don't, so you'll have to try and see will it work or not.

Finally, in order not to do this library adding in case you have to reinstall the system due to whatever reason, it's a good idea after each time you add libraries to the 'reg' file to copy it somewhere else for backup. After the system reinstall, install wine, run winecfg, close it and then add and overwrite the user.reg file with the one you have in backup - it will be bigger than the original.

P.S. I know, someone will say you could run the game in terminal and then read the dxvk log to find out which libraries it's looking for. But you tell me - isn't it easier to simply add ALL of the libraries at once within mere seconds than spending probably an hour or more sifting through the log and trying to figure it out which libraries the game needs? ;)
P.S.2. It looks long and hard because of the detailed way I wrote it. But in reality it's pretty quick, less than 20 seconds:

 

Attachments

  • libvkd3d-2files.zip
    1.6 MB · Views: 44
Last edited:


You might want to clean up the first sentence so that it doesn't look like we're suggesting/endorsing piracy.
 
You might want to clean up the first sentence so that it doesn't look like we're suggesting/endorsing piracy.
How is it now?

As you probably know there are some games for Windows that have been prepared for Linux - either by Vavle, sometimes by GOG or another platform. But these games do not always run as expected. Not to mention that quite often there aren't enough seeders (if any at all, even if the game is free-to-play, like MMORPG, and those games often resort to torrents to the torrent protocol to spread their files) which leaves you with only one option: to download the game with its Windows installer.
Better, I hope? I was talking about mostly free-to-play games and now I clarified that. Hopefully this will be enough. If you have a better idea of introduction to the topic, I'm all superears about it. :)
 
How is it now?


Better, I hope? I was talking about mostly free-to-play games and now I clarified that. Hopefully this will be enough. If you have a better idea of introduction to the topic, I'm all superears about it. :)

Good enough for me. Thanks.
 

Members online


Latest posts

Top