Sign in to follow this  
Bill Nye The Russian Spy

[Linux] [Wine/Steamplay] COD4X DLL Problems

Recommended Posts

So I have been seeing some people having trouble with COD4X and Steamplay on Linux where when launching COD4X, it complains about some missing DLLs and then attempts to load a previous version (1.7 in my case)

cod4xdllscreenshot.png.8bed51ef2ba3738dfc4af26888484e63.png

I dug around and found out that the DLLs that COD4X requires are placed in a folder called "cod4x_0??" within %APPDATA%/Local/CallofDuty4MW/bin/ (Or "SomeDriveLetter:/Users/*Your User*/AppData/Local/CallofDuty4MW/bin/), at least on Windows. After you use the install script, they are placed in a similar path in whatever wine prefix you ran the installer under. I had to dig around quite a bit to find the needed folder. Once found, copy the DLL folder into this path: *YourWinePrefix*/drive_c/users/*YourUser*/Local Settings/Application Data/CallofDuty4MW/bin/.

If you need an explanation for how Proton wine prefixes work: https://github.com/ValveSoftware/Proton/wiki/Proton-FAQ#how-does-proton-manage-wine-prefixes

This worked for me and allowed COD4X to start and at least talk to the master server to get listings. There is still another issue I'm trying to work out where COD4X can't connect to any servers as it claims Steam is not running. Whatever systems COD4X has to talk with steam do not work with Proton clearly.

More info can also be found here: https://cod4x.me/index.php?/forums/topic/2810-linux-steam-play/

Share this post


Link to post
Share on other sites

Me and @Koaja able to play with steam version. We used lutris to install the wine steam and the game itself. Then connected to one 1.8 server, let the autoinstall install the cod4x files, then good to go. However need to launch the multiplayer in lutris, you can setup a +connect ip:port argument in lutris. This is needed, because if you launch without this, it starts the single player, and then when you launch the multiplayer ingame, you will get around 10-15 fps.. 

Share this post


Link to post
Share on other sites

Then, another thing, you will have black screenshot in every getss attempt, so you might get banned from the servers. Be careful. 

Then another thing, if you using b3, its not gonna work under linux, b3 cannot auth you, because you will don't have proper playerID. 

Share this post


Link to post
Share on other sites

Then, another thing, you should try d9vk, if your graphics card is vulkan ready. 

Share this post


Link to post
Share on other sites

Hello My Friends,

As @Bill Nye The Russian Spy explained all you have to do is place all the client files manually in the following directory for wine/linux because wine cannot execute the install script correctly to make the folders because of permission issues. (you need to make the bin and cod4x_017 folders yourself). Place the 1.7 iw3mp.exe file in the bin folder if its not there already. It is recommended you use Lutris to run this on Linux.

/home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/CallofDuty4MW/bin/cod4x_017

2020-02-14_23-26.thumb.png.e63f682941f2d4e29a6d843070fec1f4.png

As for the Steam is not running issues that I am working on now... and maybe post a tutorial after. You can read more about it on reddit HERE and WineHQ HERE and HERE.

qCga3dI.thumb.png.60ba8539f340400aa625aa12709a569d.png

Edited by Alleviate

Share this post


Link to post
Share on other sites

You need to launch WIne Steam first. But probably it will doesn't work still. I've got the game on Steam, so I've installed with Wine Steam. It just worked fine. Even with autoupdate, and everything. Do not expect working screenshots tho, so you might get banned.

Share this post


Link to post
Share on other sites
On 2/15/2020 at 8:38 AM, AlexC said:

You need to launch WIne Steam first. But probably it will doesn't work still. I've got the game on Steam, so I've installed with Wine Steam. It just worked fine. Even with autoupdate, and everything. Do not expect working screenshots tho, so you might get banned.

I was able to install Steam via Wine 5.0 (new release) and call of duty and got it working as well as with Lutris. Please see below for Ubuntu 19.10 instructions.

1) Run the following command and the following ones in the Linux terminal to remove old wine if not on 5.0

sudo apt remove winehq-stable wine-stable wine1.6 wine-mono wine-geco winetricks

2) Add support for 32 bit apps

sudo dpkg --add-architecture i386

3) Download wine repository key

wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

4) Add the downloaded repository key

sudo apt-add-repository "deb https://dl.winehq.org/wine-builds/ubuntu $(lsb_release -cs) main"

5) Install Wine 5.0

sudo apt update && sudo apt install --install-recommends winehq-stable

6) Now run this command to check your wine version. If it says 5.0 your good!

wine --version

1505855303_WineVersion5.0.png.6d5a65702bbba1ac5b4a683c50a0be04.png

7) Your files will be installed in a hidden .wine folder Example : /home/USERNAME/.wine/drive_c

74364163_WineCFiles.png.97d7c6c75f823ff662a8c6c47e7f1356.png

8 ) Download the windows steam install from steams website HERE.

9) Go to your terminal and go to your download directory Replace USERNAME with your own and the name of the executable file. NEVER USE ROOT/SUPER USER FOR WINE COMMANDS!

cd /home/USERNAME/Downloads
wine SteamSetup.exe

10) If done right the steam install window will show up. Install Steam like normal. Delete the steam folder in the wine C drive as shown above if it already exists (WIne 5.0 creates this folder by default I think).

1207790344_SteamSetup.png.680c83cc4268685ec37788ef5ebd6ce5.png

11) After steam is done do these similar steps to install Call of Duty 4 Modern Warfare via wine. You first install Call of Duty 1.0 by going to the directory and run Wine Setup.exe like with steam and install it via the default directory. You do not have to install direct x so answer no for that.

cd /media/USERNAME/COD4MW
wine Setup.exe

1696324525_Callofdutyinstall.png.1f3df8736f191b202070ac8978aaa81d.png

12) Then you download and install patch 1.6 the same way (you have to wait 10+ minutes for it to load after click install - IT ALWAYS HANGS FOR 10 MINUTES JUST WAIT!)

cd /home/USERNAME/Downloads
wine cod4mw-1.6-patchsetup.exe

218882356_Patch1.6Stall.png.49f4a0cb5826bb1ef1d1b160ed94c25d.png

13) Download and Install patch 1.7 the same way but it shouldn't hang.

cd /home/USERNAME/Downloads
wine cod4mw-1.7-patchsetup.exe

1270357055_Patch1.7.png.f645b5a26c994eb3f226e6fa7d070808.png

13b) Download the cod4xme client files folder and place them in your Call of duty modern warfare folder. Example: /home/james/.wine/drive_c/Program Files (x86)/Activision

299986300_ActivisionFolder.thumb.png.0e2ca04f0ca24d2da4cd44cd3c09569d.png

13c) Go to your cod4x18_v17_9_client folder directory and run the install.cmd script using the command interpreter with wine.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Activision/Call of Duty 4 - Modern Warfare/cod4x18_v17_9_client'
wine cmd.exe /C install.cmd

435416777_Executeinstallcmd.png.547bfd65f433bb51dbda8c56e09a68b4.png

13d) If done correctly you should see the cod4x_017 files in "/home/YOURUSERNAME/.wine/drive_c/users/YOURUSERNAME/Local Settings/Application Data/CallofDuty4MW/bin/cod4x_017"

1136428715_cod4xappdata.png.e715f94ac04dfe365d06123610d7e09a.png

14) Go to the C:/Program Files (x86) directory and Run steam via Wine 5.0. You need to use special arguments "-no-cef-sandbox" or else Steams web forms will not load! ITS A STUPID BUG IN STEAM >.<. Replace USERNAME with your own.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam'
wine Steam.exe -no-cef-sandbox

15) Log into your steam account. If you do not have one CREATE ONE. You have no choice now if you want to play on the latest version sadly.

1555165065_SteamLogin.png.a8885c8b29c297d9c6066d056fb0c674.png

16) If you ran wine with the correct arguments above you can actually see the Steam pages load as shown below.

432787261_Steamloaded.png.904ace0bb822484e22f69e59c1ee0584.png

17) Click on Games -> Add Non-Steam Game To Library

123140355_AddNonSteamGame.png.5d48c16c6fe2ae08ec3724b00ad640fc.png

18) Call of Duty 4 Modern Warfare Single Player and Multiplayer should show up. Select them both and click add selected programs.

640967916_AddNonSteamGameCheckbow.png.9e693e9b21041a5058a2ea3153069890.png

19) Go to Games -> View Games Library

1486818751_SteamViewGames.thumb.png.52896d2b1281f8315328291eab49519a.png

20) Click on Call of Duty Multiplayer and click play. If you did it correctly you will see the steam overlay in the bottom right corner. Join a server with the 1.8 patch and it will update your client if you did not run the install.cmd script above (you have to run COD 1 or 2 times again the finalize the update). The install.cmd scrip with cod4x will not run correctly in wine. You have to place the files manually as shown above. It is easier to just join a cod4x server and update that way. The user name in your steam profile is the name you will see in game.

1296460396_SelectGame.thumb.png.9616eb25e22bbcd8d451d949d94cc42e.png

if its patched correctly you should see the following with 17.9 in the corner.

182901617_Callofdutyscreenshot.thumb.png.020825571b2adfb905617884fa00a1a0.png

If you did not you will see this lovely Error loading Cod4X popup: "Failed to load CoD4X because file cod4x_xxx.dll or entry point was not found. Attempting to load Cod4 v1.7". Its because it cannot find the application data folder in the right place based on your user name.

1309744594_Cod4xerror.png.png.f4fd470474c8965501475f36604ffcdc.png

21) Run steam via wine to play COD4x any time you want to via Steam. If your lazy you can configure it in via Lutris below.

cd '/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam'
wine Steam.exe -no-cef-sandbox

22) OPTIONAL STEPS IF YOU DONT WANT TO RUN THE TERMINAL WINE COMMAND EACH TIME TO RUN STEAM! Install Lutris via terminal commands.

sudo add-apt-repository ppa:lutris-team/lutris
sudo apt-get update
sudo apt-get install lutris

23) Run Lutris via the applications portal. Click on the plus button -> Add Game

818953789_LutrisMainWindow.png.c1bc4162e7b3de288f46832f4fd5b6d0.png

24) Enter the name of your program "Steam". Select the Runner as Wine. You shouldn't have to install specific runners since 5.0 is installed.

1408270506_SteamPart1.png.96fbcda9f5c335c4375753a1fc81a082.png

25) Click on Game Options at the top. Find your steam executable location. replace USERNAME with your own if you copy paste the path below. Enter the arguments "-no-cef-sandbox" or STEAM PAGES WONT LOAD! Leave the Prefix architecture as Auto (default).

/home/USERNAME/.wine/drive_c/Program Files (x86)/Steam/Steam.exe
-no-cef-sandbox

681356945_SteamPart2.png.64c8f67c7e24f57cc69859db44c5c784.png

26) Click on Runner options at the top and make sure the Wine version is System (5.0). Un-Enable D9VK as its merged into the DXVK libraries now (thanks AlexC) Click the Save button.

1308061113_SteamRunnerSetup.png.ee9d97b9da3d78224abf613438e6bca6.png

27) Now you can just select Steam and click play and even make a desktop shortcut or app shortcut.

1970132100_SteamPart4.png.989be0ebf197267214fd6b10ab9fadc4.png

Thats all folks.

 

 

Edited by Alleviate
  • Like 1

Share this post


Link to post
Share on other sites
17 hours ago, T-Max said:

I guess this tutorial can be attached somewhere in FAQ...

That would be cool... someone else needs to follow my guide above and let me know if they have issues and what changes need to be done to the instructions if you do add it to the FAQ. It took me forever to put it together and get it working T-Max. If it can save someone the 48 hours I spent to get it working that would be great. I was only able to figure this out because I am a experienced linux user and coder/developer. Thanks for making cod4x.

I made a pull request for changes to the FAQ/official documentation.

Edited by Alleviate

Share this post


Link to post
Share on other sites

You should disable D9VK, since it's got merged into the main DXVK libraries. :)

Share this post


Link to post
Share on other sites

But well done, good job. If someone has the game on Steam, the process much easier. Just install Lutris, and use the Wine Steam installer script from it. All you need to do is replace the 1.8 version of the iw3mp.exe with the 1.7 version variant, then join a cod4x 1.8 server, it will auto update the game, and you can play.

1 minor trick needed, for me at least, if I launch the game from lutris, it will open up the single player first. Then if I switch to multiplayer, I have got really choppy fps, around 30-40. I've used Lutris as mentioned above, the thing needed is add a +connect <serverip> argument in launch options on Lutris options, so Lutris will open up the multiplayer first. With this I get a solid fps, as normal, and expected.

Btw I use Arch. :D

Share this post


Link to post
Share on other sites
16 hours ago, AlexC said:

But well done, good job. If someone has the game on Steam, the process much easier. Just install Lutris, and use the Wine Steam installer script from it. All you need to do is replace the 1.8 version of the iw3mp.exe with the 1.7 version variant, then join a cod4x 1.8 server, it will auto update the game, and you can play.

1 minor trick needed, for me at least, if I launch the game from lutris, it will open up the single player first. Then if I switch to multiplayer, I have got really choppy fps, around 30-40. I've used Lutris as mentioned above, the thing needed is add a +connect <serverip> argument in launch options on Lutris options, so Lutris will open up the multiplayer first. With this I get a solid fps, as normal, and expected.

Btw I use Arch. :D

Thanks, I updated the section for D9VK. I tried using Wine Steam but it always gave me issues for some reason but your right its an option. Thats a good thing to know for connecting via ip. Can you post a screen shot of your  Lutris argument configuration to help others and maybe we can add it later to this tutorial I dunno :X. I might have to update it to include all distro's but that will take time.

 

I am such a crazy son of a bitch I just might try and make a MAC tutorial as well. That might impossible at the moment though because Catalina doesn't support/run 32-bit apps no more and wine doesn't run on MAC OSX no more. LETS A SEE YIPEE!

 

I have added a specific topic for this HERE . Please look at that one from now on as I will not update the old post here.

Edited by Alleviate

Share this post


Link to post
Share on other sites

Okay. So obviously you need wine here also. Install lutris on whatever distro you on, make sure multilib is enabled. In my case I had to install a bunch of 32 bit libraries, otherwise it won't work. Specially for wine, and 32-bit GPU driver related libraries.

Then needed to install vulkan. You can find here: https://github.com/lutris/lutris/wiki/Installing-drivers#installing-vulkan
You will need both 64 and 32 bit version on your system.

Then installed lutris, head over lutris page and use the Wine Steam script: https://lutris.net/games/call-of-duty-4-modern-warfare/ 
It will install Wine Steam, and inside wine steam will install CoD4 as usually on a normal windows machine.

For me needed to open 2-3 times for some silly reason, but let it download, then in lutris kill all wine process, and good to go to the next step.

Then you will need the original 1.7 iw3mp.exe what need to be overwritten in the installation folder. It can be find here: https://www.dropbox.com/s/pnmo82n9x5bp5s3/iw3mp.exe?dl=0
Then open a file manager, and enable hidden folder view, and navigate here: /home/<USER>/.local/share/lutris/runners/winesteam/prefix64/drive_c/Program FIles (x86)/Steam/steamapps/common/Call of Duty 4/
Overwrite the downloaded exe over here what you downloaded before.

Then launch the game from lutris. open up multiplayer and connect any cod4x 1.8 server and apply the auto-update.

Don't be afraid the game will be choppy, but all we need now is just install the patch. install it, it will close. kill all wine process, start again.

Launch multiplayer, it will prompt "CoD4 has updated, relaunch the game". Do that. kill all wine process and relaunch the game.

Then make sure you have running CoD4x on the bottom right corner.

If yes. close the game, and we will head over the workarounds.

In my case if I launch the Single Player first, then in-game change to multiplayer, my fps is terrible.

So here is my workaround. Head over lutris settings and add your favourite server to the launch options.
Screenshot_2020-02-17_10-12-49.png.8113a97ced4e61d74a660e54d679ed08.png

My options though I usually enable ingame FPS counter, far better than the original CoD has.

Head over to the System options tab and add these linesScreenshot_2020-02-17_10-15-32.png.011d86948e8f3d82a136dad8c50ac9c8.png

Last step, save these settings and enjoy playing.
Sidenote tho, if someone request a screenshot from you, it will be a black image, so you might get banned from servers. I have no workaround for this sadly at the moment.

Enjoy.

Edited by AlexC

Share this post


Link to post
Share on other sites

I had some further looks into Steamplay (Proton or whatver you want to call it) and specifically COD4X - The worst thing is the game loads and plays fine through Proton without having to use Lutris - but the Steamapi fails to initialise on startup screenshot attached.

 

Otherwise the game would be fine to play through Proton (unless you dont care for admin perms in which case carry on lol). I am still looking into it but not sure how much furkeling I can do with it... 1043881093_Screenshotfrom2020-03-2320-03-26.thumb.png.b9e305458317befa36774e0b0041f55c.png

Share this post


Link to post
Share on other sites

Steamoverlay renders fine (once we enable it in COD4X) - whether it will allow you to take screenshots ingame is another story (all /screenshotJpeg results have come back black) 

Share this post


Link to post
Share on other sites

Thanks to @AlexC for digging around. He managed to find a way to play the game via proton.

Adding the -no-cef-sandbox switch to the start up of Steam (ie in your steam.desktop file, or via CLI) was enough for me to be able to get in game and execute commands using admin plugins.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this