1/ Intro:
This post is not a guide / nor a tutorial (yet) but a memory of what I personally did to make plutonium work on Linux/Debian.
I hope it will help you guys configuring a COD BO2/MW3 server using recent WINE version with ESYNC patch (better performances)
This technic can be applied to other games with few modifications, including others plutonium flavors
(However, ESYNC is not going to help all games, you have to make benchmarks.)
If you follow those steps and find issues feel free to post them here, and I will try to make corrections.
2/ Preparation:
Let's start, assuming you have a computer / VM running an updated Linux version (tested with current Debian stable here).
It will be easier with GUI as a starting point.
I suggest making it work with a GUI VM/PC and then port it to a headless machine (or make the current one headless) when it's working well.
Install distro version of wine (to get required deps):
su -
dpkg --add-architecture i386
apt update
apt install wine wine32 wine64 libwine libwine:i386 fonts-wine
create an account for your gameserver:
adduser codbo2server
Now, logon to your new account with graphics.
3/ Installing last Wine:
Download wine tkg from GITHUB:
https://github.com/Kron4ek/Wine-Builds/releases
For instance: wine-6.0-rc5-staging-tkg-amd64.tar.xz
extract to ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64
install your new prefix:
WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wineboot
4/ Installing .NET:
Download last winetricks script from GITHUB:
https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
install dotnet472:
chmod +x ./winetricks
WINE=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wine WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ./winetricks --force dotnet472 corefonts
Note: this step will take a while and will ask you for multiple confirmation in the installation process
Note2: if it fails (sometime install script can get broken...:-/) please search a little bit on Google before asking here...
Note3: when installer ask for reboot, do not reboot
restart your wine prefix:
WINEARCH=win32 WINEPREFIX=~/.local/share/wineprefix/CODBBO2 ~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64/bin/wineboot
Note++: There is a free replacement of .NET : MONO , you can try it but for that you will have to use another clean wineprefix.
5/ The game:
Put your game in your new created prefix.
Personnaly I created a CODBO2/CODMW3 folder in the prefix dir
According to previous steps, put game files in:
~/.local/share/wineprefix/CODBBO2/drive_c/CODBO2
Now you have to put plutonium files in the game directory.
While it is possible to use the launcher update feature, I personally end up copying files from my PC because I had problems running the plutonium launcher GUI inside wine.
It launches and download files, but the GUI was not displaying correctly and it instant-crashes if I click.
I assume you now have all the files from Game and Plutonium in the game directory.
Now, download required configuration files:
https://github.com/ChxseH/COD-Dedicated-Server-Configs/tree/master/T6
Put them in the game directory (.bat files are not needed)
6/ Launch:
You can now try to launch the gameserver with a script like this:
WINEPATH=~/.local/share/wine/wine-6.0-rc5-staging-tkg-amd64
export WINEARCH=win32
export WINEPREFIX=~/.local/share/wineprefix/CODBBO2
export WINEESYNC=1
KEY=<YOURKEY>
CFG=dedicated.cfg
PORT=27116
$WINEPATH/bin/wine $WINEPREFIX/bin/plutonium-bootstratper-win32.exe t6mp 'C:\\CODBO2' +set key '$KEY' -dedicated +set sv_config $CFG +set net_port $PORT
If it works, congratulation you have your working proof of concept :).
Server is running on last wine / ms dotnet / esync enabled
Note that wine/dotnet is very memory hungry, idle server take 500MB+ ram and it will keep growing while players get connected.
7/ Further work:
Next you can Google :
- screen: to allow it to run in a convenient headless context
- systemd: to make it start at boot
- alotofotherstuff : tons of other cool possible features (autorestart/autoupgrade for instance)