Installing the GOG version of The Witcher 2: Assassins of Kings on 64-bit Arch Linux

The Linux version of The Witcher: Assassins of Kings has been recently updated on GOG with the latest patch (version 1.0.0.4) and I decided to try and install it under 64-bit Arch Linux with multilib support. And, as you may guess, it didn’t work out too well…

Ideally, I should just download the archive with the game (gog_the_witcher_2_assassins_of_kings_1.0.0.4.tar.gz), unpack it and run ./start.sh in the game folder. The reality, however, tends to be a bit harsher and what I got was consecutive complaints about missing libraries. Installing packages such as lib32-sdl2 and lib32-sdl2_image from AUR solved some of the problems, but building an older version of libcurl.so.4 to ensure compatibility (CURL_OPENSSL_3) seemed like too much of a hassle.

Steam to the rescue

I found a very good hint on how to solve the lack of libraries in a post which suggests copying missing libraries from the Steam installation. It requires you to have a Steam client installed, but that shouldn’t be a problem for most gamers.

I took it one step further and instead of copying required libraries I decided to modify the library path used to run the game. This approach also frees you from the need to install lib32-sdl2 and lib32-sdl2_image, and possibly some other packages too.

Steam contains required 32-bit libraries in the following two directories:

  • ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/ (at least libselinux.so.1)
  • ~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/ (most of the other libraries)

Additionally, all other 32-bit libraries such as the libpng12.so reside in /usr/lib32/ so we need to remember about that one too.

Therefore, in order to run the game with required libraries, create a simple script in the game directory and make it executable:

#!/bin/sh
export LD_LIBRARY_PATH="~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/lib/i386-linux-gnu/:~/.local/share/Steam/ubuntu12_32/steam-runtime/i386/usr/lib/i386-linux-gnu/:/usr/lib32/"
primusrun ./start.sh

You should leave the primusrun (or optirun) out if you don’t use Bumblebee and you can replace ~/ with the absolute path. That should allow you to run the game successfully. If not, you may be missing some lib32-* libraries from the multilib repository, so in such case please install likely suspects and try again.

Importing saves from The Witcher 1

If you’ve played The Witcher then you may want to import saves to The Witcher 2. If you’re interested in the details (and what is transferred to the sequel) please see this article on The Witcher Wiki.

If you just want to import the saves and go straight to playing the game, then briefly, before starting a new game you should copy the saves from The Witcher (which are likely to be located in C:\Users\[username]\Documents\The Witcher\saves on Windows) to ~/.local/share/cdprojektred/witcher2/GameDocuments/Witcher 2/gamesaves on Linux.