Skip to content

Building OpenRCT2 on Windows Subsystem for Linux

Margen67 edited this page Apr 29, 2021 · 5 revisions

Building

See building OpenRCT2 on Linux.

Execute

Download and install: https://sourceforge.net/projects/vcxsrv/

Download and extract: https://www.freedesktop.org/wiki/Software/PulseAudio/Ports/Windows/Support/

Add the following to etc/pulse/default.pa where you extracted PulseAudio:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1

If you want to prevent the audio server from exiting some time after disconnecting, add the following to etc/pulse/deamon.conf:

exit-idle-time = -1

Install PulseAudio on WSL by:

$ sudo add-apt-repository ppa:therealkenc/wsl-pulseaudio
$ sudo apt-get update
$ sudo apt-get install pulseaudio libpulse0

Save the following at /usr/local/bin/openrct2-wsl and make it executable with chmod +x /usr/local/bin/openrct2-wsl:

#!/bin/bash -e
/mnt/c/Program\ Files/VcXsrv/vcxsrv.exe :99 -swrastwgl &
/mnt/c/Program\ Files\ \(x86\)/Pulseaudio/bin/pulseaudio.exe &

Save the following at /usr/local/bin/openrct2 and make it executable with chmod +x /usr/local/bin/openrct2:

#!/bin/bash -e
DISPLAY=:99 PULSE_SERVER=tcp:localhost ./openrct2

Launch openrct2 by:

$ openrct2-wsl
$ openrct2

References

Clone this wiki locally