This will be a guide for those not using the Docker container provided by DomiStyle.
In the guide we will be using Debian 9 Stretch and the latest wine-staging release (3.7 at the time of writing).
Starting with installing wine-staging, let’s follow the instructions that wine-staging.com provides:
Wine consists of a 32-bit and optional 64-bit part. In order to install i386 packages on a 64-bit system, you have to run the following command as a first step:
sudo dpkg --add-architecture i386
Afterwards import the key for our repository:
wget -nc https://repos.wine-staging.com/wine/Release.key sudo apt-key add Release.key
And add our repository at the end of your file: /etc/apt/sources.list
For Debian Stretch:
deb https://dl.winehq.org/wine-builds/debian/ stretch main
Update and install dependencies:
sudo apt-get update sudo apt-get install winehq-staging cabextract xvfb
Download winetricks and use it to install winhttp:
wget https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks chmod +x winetricks
Now we can begin to prepare the wine prefix that we will use for the dedicated server. We set the prefix path, use a 64 bit prefix, use wineboot to generate the bare prefix, winetricks to install winhttp, and use Xvfb start a fake X display so that we can install our C++ 2012 dependency headless. We’ll need the fake X display to run the server too.
export WINEPREFIX=/home/user/Halo_Online1/prefix export WINEARCH=win64 wineboot ~/winetricks winhttp vcrun2012
After that is complete we need to make an adjustment to our DLL overrides. Open prefix/user.reg with your text editor and add the following line under [Software\\Wine\\DllOverrides]
"rasapi32"="native"
We can now make a simple launch script for the server.
#!/bin/bash Xvfb :1 -screen 0 320x240x24 & export DISPLAY=:1 export WINEPREFIX=/home/user/Halo_Online1/prefix wineconsole /home/user/Halo_Online1/eldorado.exe -launcher -dedicated -minimize
I run several servers so what I did was make another script to handle launching the different server instances and then call it with cron at reboot time.
#!/bin/bash screen -dmS Halo_Online1 /home/user/Halo_Online1/dedicated_server.sh sleep 2 screen -dmS Halo_Online2 /home/user/Halo_Online2/dedicated_server.sh sleep 2 screen -dmS Halo_Online3 /home/user/Halo_Online3/dedicated_server.sh sleep 2 screen -dmS Halo_Online4 /home/user/Halo_Online4/dedicated_server.sh
Edit your crontab with crontab -e and add:
@reboot /home/user/Halo_Online_Shared/start_servers.sh >/dev/null 2>&1