Installing Project Reality: BF2 on Linux Opinionated guide for installing PR on Arch Linux using the latest wine-staging as the compatibility layer. I'm not saying this is the only way, or the correct way, but this is how I like to do it.
Credits
I want to give special thanks to [R-COM] PvtNewb for researching and solving most of the technical issues of installing PR on Linux. I'm a long-time casual UNIX/Linux user, but creating this guide was my first contact with Wine. Finding answers to questions like which Linux flavour gives the best chances of success, what software packages need to be installed, debugging the login flow, disabling ASLR, and the base concept of the helper script were all [R-COM] PvtNewb's ideas. I then refined those ideas, sometimes converting them from screenshots to command line compatible form, and composed this guide into its current form.
Disclaimer
This works for me. Your mileage may vary.
Instructions
Complete all four parts, copy-pasting and running each shell command in the order they are listed.
After the fourth part you should see a PR icon on your desktop and in your menus. Use the icon to start PR. You can also run the helper script prbf2.sh from the command line to start PR, optionally with Wine debugging and other advanced options enabled.
Spoiler for Part 1 of 4:
Prerequisites and assumptions
Arch Linux up and running
X11, or Wayland with XWayland up and running
multilib repository is enabled (no 32-bit binaries will be installed)
sudo rights
shell commands in this guide are written for bash
latest PR full installer (v1.8.0.0 as of this writing) downloaded and extracted to $XDG_DOWNLOAD_DIR (default $HOME/Downloads)
Helper script Use this script to start PR once it's installed. The script is designed to work with both the command line and the Desktop Environment's launcher files.
Install PR outside Wine prefix Makes life easier if you ever have to nuke your Wine prefix or reinstall PR. From Wine's point of view, the destination path will be c:\pr\prbf2.
Run the Project Reality: BF2 installer in unattended mode
A progress window will be shown, but without user-selectable options. After this step, you must run also the subsequent path fixing step before attempting to play PR.
MIME type handler for the prbf2 protocol. No longer in use. The protocol provided a method for starting PR and joining to a game server in one action. Syntax of a protocol URL is prbf2://GAME_SERVER_IP:PORT.
Spoiler for Appendix C: Obsolete steps:
The following steps are obsolete in the context of this guide and can be skipped. They are included here only for completeness.
Spoiler for Obsolete:
Disable dxvk for PRLauncher.exe by overriding d3d9.dll
Has no effect if dxvk is not installed, and has no effect on PR main executable.
Fix the path in the prlauncher-login protocol handler
This step can be skipped. The file is not needed nor is it created, if the prefix has Windows-based browser installed and available.