Skip to content

Instantly share code, notes, and snippets.

@ObserverOfTime
Last active February 11, 2024 07:05
Show Gist options
  • Save ObserverOfTime/2594e37dad16373637ddd5befada6aac to your computer and use it in GitHub Desktop.
Save ObserverOfTime/2594e37dad16373637ddd5befada6aac to your computer and use it in GitHub Desktop.
Install and patch White Album 2 on Linux

For Ubuntu and other Debian-based distros

This gist is deprecated. You can find the latest instructions here.

1: Enable Japanese Locale

Check whether it's already enabled:

$ locale -a | grep ja

If you see something like this, you can proceed to the next step.

ja_JP
ja_JP.eucjp
ja_JP.shiftjis
ja_JP.ujis
ja_JP.utf8
japanese
japanese.euc

If not, create the locale file:

$ sudo touch /var/lib/locales/supported.d/ja

And write these lines into it:

ja_JP.UTF-8 UTF-8
ja_JP.EUC-JP EUC-JP
ja_JP SJIS

Next, run this command:

$ sudo dpkg-reconfigure locales

You can ignore the SJIS error.

2: Install some Japanese fonts

$ sudo apt install -y fonts-takao fonts-vlgothic fonts-horai-umefont fonts-mona fonts-monapo

3: Install wine and winetricks

Install wine following the official instructions.

Get the latest version of winetricks:

$ curl -O https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks
$ chmod +x winetricks
$ sudo mv winetricks /usr/local/bin

You might also need to install cabextract:

$ sudo apt install -y cabextract

4: Create a wineprefix for the game

$ export WINEARCH=win32
$ export WINEPREFIX="$HOME/.local/share/wineprefixes/wa2"
$ mkdir -p "$WINEPREFIX" && wineboot -u

Install wine-mono and wine-gecko if prompted.

5: Install the game

If you've already installed the game elsewhere:

Copy the files to the wineprefix:

(assuming you have them in your home folder)

$ cd "$WINEPREFIX"
$ cp -r "$HOME/WHITE ALBUM2" "drive_c/Program Files"

Apply a registry edit to act like the game has been installed:

$ curl -o wa2.reg https://ghostbin.com/paste/r627o/download
$ wine regedit wa2.reg

You can now proceed to the next step.

If you haven't installed the game before:

Mount the WA2 disks in /tmp:

(assuming you have them in your home folder)

$ mkdir -p /tmp/disk{1..2}
$ sudo mount "$HOME/WHITE_ALBUM2_1.mdf" /tmp/disk1
$ sudo mount "$HOME/WHITE_ALBUM2_2.mdf" /tmp/disk2 

Now, mount them in the wineprefix:

$ cd dosdevices
$ ln -s /tmp/disk1 x:
$ ln -s /tmp/disk2 y:
$ ln -s "$HOME/WHITE_ALBUM2_1.mdf" x::
$ ln -s "$HOME/WHITE_ALBUM2_2.mdf" y::

Run the setup:

$ cd x:
$ LANGUAGE=ja_JP LANG=ja_JP.eucjp wine setup.exe

Note: You can set an alias to run programs with Japanese locale by adding the following line to your .bashrc file:

alias winejp='LANGUAGE=ja_JP LANG=ja_JP.eucjp wine'

6: Configure wine

Enable opengl:

$ winetricks settings ddr=opengl

Install requirements:

$ winetricks lucida
$ winetricks devenum
$ winetricks d3dx9
$ winetricks quartz
$ winetricks wmp10

The installation of wmp10 may hang after it's finished. You can terminate it with Ctrl + C.

7: Install the patch

Install wget:

$ sudo apt install -y wget

Download the latest stable release of the installer:

$ wget -O WA2_patch.exe `curl -s \
  https://api.github.com/repos/ObserverOfTime/WA2EnglishPatch/releases/latest \
  | grep browser_download_url | cut -d '"' -f 4`

Or, the latest release including nightly builds:

$ wget -O WA2_patch.exe `curl -s \
  https://api.github.com/repos/ObserverOfTime/WA2EnglishPatch/releases \
  | grep browser_download_url | cut -d '"' -f 4 | head -1`

Run the installer:

$ wine WA2_patch.exe

You should now be able to launch the game with this:

$ LIBGL_ALWAYS_SOFTWARE=1 wine WA2_en.exe

LIBGL_ALWAYS_SOFTWARE=1 is necessary to be able to run the game. You can set an alias for it by writing alias winegl='LIBGL_ALWAYS_SOFTWARE=1 wine' in your .bashrc file and then run the game with winegl WA2_en.exe.

That's it!

Links

Other platforms

Credits

@eshrh
Copy link

eshrh commented Feb 11, 2024

For some reason, linking to x: and y: did not work for me, I'd get errors like Read access denied for device L"\\??\\<letter>:\\", FS volume label and serial are not available. In my case, it looked like it was checking for drives d: and e:, so I linked there instead of x and y. It worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment