Running LibreWorlds on macOS (Intel) with Wine
These instructions are for running LibreWorlds on an Intel Mac using Wine with a dedicated Wine prefix. One of my friends enjoys the game and I wanted to play it with them. Upon writing these instructions I am in the process of moving and dealing with emergency evacuations due to a historical wild fire destroying a section of my home area. The only computer I have is my MacBook (Retina, 12-inch, Early 2016) running MacOS 12. I do not know what other versions of macOS this works on.
If not already, install Brew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
If not already, install Wine:
brew install wine
1. Create a Wine Prefix
Open Terminal and run:
export WINEPREFIX="$HOME/.wine-worlds"
wineboot
This creates a new Wine prefix at:
~/.wine-worlds
2. Install Winetricks (Reccomended)
brew install winetricks
Install compatibility components:
WINEPREFIX="$HOME/.wine-worlds" winetricks corefonts ie8
3. Install LibreWorlds
Download the installer:
Run the installer:
In my case, I will run ibreworlds_worldsplayer1890-2.exe -so change the command accordingly to your installer and location.
WINEPREFIX="$HOME/.wine-worlds" wine ~/Downloads/libreworlds_worldsplayer1890-2.exe
After installation, LibreWorlds should be located in:
~/.wine-worlds/drive_c/Worlds
4. Verify Java
Check that the bundled Java works:
WINEPREFIX="$HOME/.wine-worlds" \
wine ~/.wine-worlds/drive_c/Worlds/bin/java.exe -version
Expected output:
java version "1.3.0"
Java(TM) 2 Runtime Environment
This should work, but I had issues figuring this out so might as well check again. If not, further tinkering needs to be done.
5. Launch LibreWorlds
Important: run.exe must be started from the Worlds directory.
export WINEPREFIX="$HOME/.wine-worlds"
cd "$HOME/.wine-worlds/drive_c/Worlds"
wine run.exe
Launching run.exe from another directory may produce a "Can't find Java Runtime Environment" error. This was the main hidden problem I was facing.
Creating a macOS Launcher
If you don’t want to run the launch command every single time, I recommend making a macOS launcher, I did this myself.
Using Automator
Open Automator.
Create a new Application.
Add Run Shell Script.
Paste:
#!/bin/bash
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
export WINEPREFIX="$HOME/.wine-worlds"
cd "$HOME/.wine-worlds/drive_c/Worlds"
/usr/local/bin/wine run.exe
Save it as LibreWorlds1890-2.app.
You can now launch LibreWorlds like a normal Mac application. I recommend including the launcher version after the name of your installer in case you are testing out different players.
Useful Commands
Open the Wine prefix:
open ~/.wine-worlds
Open the C: drive:
open ~/.wine-worlds/drive_c
Open the Worlds folder:
open ~/.wine-worlds/drive_c/Worlds
Notes
The bundled Java 1.3 runtime is included with LibreWorlds.
The launcher (run.exe) relies on the current working directory being the Worlds installation folder.
If LibreWorlds reports "Can't find Java Runtime Environment", verify that you are launching it from:
~/.wine-worlds/drive_c/Worlds
or
use the Automator launcher above.
These instructions were based off of the Lutris Installer for worldsplayer-libreworlds-worldspl for Linux.