Page 1 of 2

BF2 on Linux

Posted: 2015-03-28 16:25
by Arduras
Hi, I enjoy Linux and it runs much better on this crappy laptop of mine.
According to WineHQ I can run BF2 with little problems.

What I'm asking is has anyone tried PR:BF2 on Linux and what are some
hurdles you had to jump? Hoops you had to jump through?

I'm considering using ArchLinux (my fav, somewhat minimalist distro)
Linux simply gives me better performance on the same hardware compared
to Windows. I've never really liked Windows and the ONLY reason I use it is
because game developers don't seem to like using OpenGL/OpenAL/OSS

Re: BF2 on Linux

Posted: 2015-03-28 18:19
by LITOralis.nMd
It is not possible to run PR on Linux.
sorry.

Re: BF2 on Linux

Posted: 2015-03-29 19:05
by Tommygun
I'd thought the issues originally were to do with authentication and bf codes etc. I thought that maybe with the EA authentication server down it may work now? I suspect I may not know what I'm talking about tho....

Posted: 2015-03-29 19:17
by AfterDune
No, it's the launcher and Mumble that don't cooperate with Linux.

Re: BF2 on Linux

Posted: 2015-03-29 19:24
by Arduras
Well it's no skin off my back, enjoy guys.

Re: BF2 on Linux

Posted: 2015-03-29 22:26
by Wicca
I think clund came pretty close to launching it.

Re: BF2 on Linux

Posted: 2015-04-10 14:56
by Aiii
plz keep us updated

Re: BF2 on Linux

Posted: 2015-05-11 19:10
by Ranzpirat
Welp, I sucessfully ran a local server and walked around on it. (as in the launcher worked!)
Image
Image

No Idea what that gibberish on the bottom is. :)

Wenn connecting to an online server it hangs on "joining game" though. :( Winedebug output tells me nothing, so we'll see.

But it's something!

Re: BF2 on Linux

Posted: 2015-05-11 19:19
by WeeD-KilleR
I am really interested in how you made the launcher work. Since last time I checked it didnt because it was using WPF which is not supported by wine. or did they add it?

Also the gibberish is from the hook PR uses to disply the information from mumble if I rember correctly.

Re: BF2 on Linux

Posted: 2015-05-11 19:28
by Ranzpirat
I did a fresh win32 wineprefix, installed

Code: Select all

winetricks -q msxml3 dotnet40 corefonts d3dx9
ran bf2 one time to get the installlocation registry key and then started PRLauncher.

Code: Select all

lib32-libwbclient 4.2.1-1
lib32-smbclient 4.2.1-1
Needed to be installed as well, otherwise the launcher crashed.

Re: BF2 on Linux

Posted: 2015-05-11 19:37
by WeeD-KilleR
Sound awesome. Please keep me updated, because I would love too see it running on linux. For the connection issue: did you check if any traffic goes through?

EDIT: I dont know if this is still relevant. https://bugs.debian.org/cgi-bin/bugrepo ... bug=474289

Check for it. But I dont think it should matter.

Re: BF2 on Linux

Posted: 2015-05-11 19:41
by Ranzpirat
I just backuped the "working" wine prefix (1.7.42 with staging patchset) and did a new one with wine 1.7.42. Now it tells me that my levels are corrupted. So maybe that was the case before as well and it just didnt tell me. (and thus didnt let me play online)

Im gonna try reinstalling one time and if it still thinks its corrupt, try again with the old prefix and wireshark myself through the netlog.

edit: Levelvalidation still works under Windows. I'm gonna try and shovel bf2/pr from my ntfs partition to a ext4 drive. Maybe ntfs-3g does some fuckup (had that happen to me with heroes of the storm before)

Posted: 2015-05-11 20:54
by AfterDune
Interesting stuff :)

Re: BF2 on Linux

Posted: 2015-05-11 21:16
by Mats391
The weird text is PRLauncher memory edits not working. That is to be expected as linux use different addressing. I guess if you are really committed you could figure out the linux offsets and then hope someone makes a linux launcher. Chances of that are very low tho.

Re: BF2 on Linux

Posted: 2015-05-12 16:34
by Ranzpirat
Okay, first things first though. :)

What kind of checksum is used to verify level integrity? Even after Installing pr directly onto a native FS the verification part fails. With the staged patchset on wine ist just doesnt show. I checked and there is no network activity from pr/wine when connecting to a server, so I assume its simply halting because the profile is not allowed to connect online.

edit: My train of thought is if multiplayer is not possible anyhow (and thus needed fileverification), theres no sense in putting an effort into trying to get the offset working for mumble/marker overlay.

eid2: I suspect that its the difference of windows/unix linenendings. This would change md5sums e.g. I think there are tools to convert though; will check it out.

Re: BF2 on Linux

Posted: 2015-05-19 12:09
by WeeD-KilleR
Bump, Ranz you made any new discoveries?

Re: BF2 on Linux

Posted: 2015-05-19 13:05
by Ranzpirat
Nope, I'm stuck on the md5 checks.

I haven't used any checksum tools under windows yet, could someone maybe throw some checksums of mods/pr/levels/*/*.zip at me? So I can check if I get the same results on GNU/Linux and maybe also under wine (I dont know if .Net implements it itself or uses userspace tools, but that would show). Or I will do it on thursday myself.

Or is there more magic involved in PRLaunchers validation than plain md5?

Because without working filevalidation there is no multiplayer -> no need to get dirty with the memory offset. The offset looks reproducable btw, as in the markers on my map are always dearanged with the same amount of pixels.

If you want to help join me in IRC #newcommunity.eu or /q Ranzpirat, both in quakenet. ;)

Re: BF2 on Linux

Posted: 2015-05-20 02:55
by Raklodder
I would love to play this on Linux!

Re: BF2 on Linux

Posted: 2015-05-21 19:01
by Clund
Well I came pretty close but it hangs while verifying files, so I think wine/dotnet on wine has some problems with hash functions or so.

So that was my conclusion, if it wouldn't be dotnet, then it would work ... ;)

If someone could give me the specs of what to do in order to launch PR, I could try to code it for Linux ... But I think you guys are doing some funny stuff like binding the executable in like a dll and then calling specific functions or so :twisted:

Re: BF2 on Linux

Posted: 2015-10-18 19:57
by LakeMole
Ranzpirat wrote:Nope, I'm stuck on the md5 checks.

I haven't used any checksum tools under windows yet, could someone maybe throw some checksums of mods/pr/levels/*/*.zip at me?
It's been a while, but here are the md5s of every file in the levels folder while in windows. Md5s are md5s so they should be the same across all platforms.

https://gist.github.com/anonymous/c911ee41e4bf49bedca7

Just zip files
https://gist.github.com/anonymous/6c91c1098cb96fac5e82


Please excuse the necro because I don't wish to create a new thread and am interested in getting this running on Linux.