It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
Installation - X3: Terran War Pack


Overview

• Install Distro Packages
• Prepare Wine Prefix
• Install Game
• Install Required Winetricks
• Install Microsoft ActiveMovie
• Create Run Scripts
• Configure Game Display
• Create Shortcuts


Tested Environment

Distro: Linux Mint 19.3 "Tricia" | Cinnamon | 64-bit
Kernel: 5.0.0-32-generic
Graphics: NVidia GeForce GTX 670
CPU: Intel i7-3930K @ 3.20GHz × 6
Wine Version: Wine Staging 5.6 (WineHQ)

Game File Checkums:
570f6d88f850912852046bda150ce220 setup_x3_terran_war_pack_3.4_(17049).exe
d904068fe35e09ecdc8dbf63fa410877 setup_x3_terran_war_pack_3.4_(17049)-1.bin
7a2e799a9bfe4b37b85933abc9522975 setup_x3_terran_war_pack_3.4_(17049)-2.bin


Requirements

X3: Terran War Pack (Windows version)
Wine: A recent "staging" version is recommended.
Winetricks: A recent version is required (NOT a repository version).
• Microsoft ActiveMovie - "amov4ie.exe" available from PlayOnLinux or Lone Wolf $cripts (will be installed last)

The following also assumes an Ubuntu-based distribution when discussing package management. GOG only officially supports Ubuntu. Feel free to discuss other distros (Arch/Fedora/etc.) in the comments, but please don't start a pointless distro flame war.


Step 1: Install Distro Packages

X3 is a 32-bit game. Ensure you have the 32-bit (i386) architecture enabled with:

sudo dpkg --add-architecture i386
sudo apt-get update

At a minimum, you'll want the following codec libraries installed:

gstreamer1.0-libav:i386
gstreamer1.0-plugins-base:i386
gstreamer1.0-plugins-good:i386
gstreamer1.0-plugins-ugly:i386

Install the above packages from the command line:

sudo apt-get install gstreamer1.0-libav:i386 gstreamer1.0-plugins-base:i386 gstreamer1.0-plugins-good:i386 gstreamer1.0-plugins-ugly:i386


Step 2: Prepare Wine Prefix

You'll be setting up a 32-bit Wine prefix in a new directory:

mkdir x3-terran-war-pack
cd x3-terran-war-pack
export WINEPREFIX=$PWD
export WINEARCH=win32
winecfg

The last command will prepare a local standalone wine environment and bring up the Wine configuration window.

I highly recommend disabling all "Link" options under the "Desktop Integration" tab to keep installers from polluting your desktop and menu environments.

Hit "Apply" or "OK" before closing the window to save your changes.

IMPORTANT NOTE: The above commands exported WINEPREFIX and WINEARCH, both of which must be available to the commands used in the following steps. Don't close or change terminal sessions until all steps are complete.


Step 3: Install Game

Assuming the game is in your Downloads folder, run the following in your terminal:

wine ~/Downloads/setup_x3_terran_war_pack_3.4_(17049).exe

Click "Exit" when the installer completes. DO NOT click Launch.

Runtime errors near the end of installation are common and won't affect your installation. If encountered, just click through them.

(OPTIONAL) You might want to make a backup of the directory at this point. If any Winetricks fail you'll have to start over.


Step 4: Install Required Winetricks

Before continuing, ensure you're running an up-to-date version of Winetricks.
The Ubuntu repository version is outdated and will not work.
If you fail to heed this warning, expect to start over ;)

The following Winetricks are required, and should be installed in this order:

amstream
devenum
quartz
wsh57
wmp10

Install them all with the following command:

winetricks -q amstream devenum quartz wsh57 wmp10

If you encounter any errors, start over from Step 1... or use that backup I so kindly suggested :)


Step 5: Install Microsoft ActiveMovie

Depending on where you downloaded ActiveMovie from, it will be called "Amov4ie.exe" or "amov4ie.exe". Adjust accordingly.

Assuming the file is in your Downloads folder, run the following in your terminal:

wine ~/Downloads/Amov4ie.exe

If you encounter any errors, start over from Step 1... or use that backup I so kindly suggested :)


Step 6: Create Run Scripts

At this point the games should be fully playable, but it's a hassle to manually define your WINEPREFIX and WINEARCH, change to the game directory, and manually run Wine every time you want to play.

Add the following two scripts, named X3TC.sh and X3AP.sh to your "x3-terran-war-pack" base directory:


--- X3TC.sh ---

#!/bin/bash
export WINEPREFIX=$(realpath $(dirname $0))
export WINEARCH=win32
echo WINEPREFIX: $WINEPREFIX
echo WINEARCH: $WINEARCH
cd "$WINEPREFIX/drive_c/GOG Games/X3 Terran War Pack"
echo Working Directory: $PWD
echo "Running 'X3TC.exe'"
WINEDEBUG=fixme-all wine "X3TC.exe"


--- X3AP.sh ---

#!/bin/bash
export WINEPREFIX=$(realpath $(dirname $0))
export WINEARCH=win32
echo WINEPREFIX: $WINEPREFIX
echo WINEARCH: $WINEARCH
cd "$WINEPREFIX/drive_c/GOG Games/X3 Terran War Pack"
echo Working Directory: $PWD
echo "Running 'X3AP.exe'"
WINEDEBUG=fixme-all wine "X3AP.exe"


To make those scripts executable, run the following in your terminal:

chmod +x X3TC.sh X3AP.sh

Now you can run either of those scripts to fire up "X3: Terran Conflict" or "X3: Albion Prelude" respectively.


Step 7: Configure Game Display

Some window managers won't properly assign focus to fullscreen child processes, or can make Alt-Tabbing difficult.

There are a couple easy steps you can take to address these kinds of issues.

1. Adjust the game's "Fullscreen" settings

Open each game and, on the intro popup, click "Graphics Settings" and change "Fullscreen" to "Borderless".
This retains the fullscreen experience but allows toggling windows without fullscreen switching.

Note that disabling "Fullscreen" will also disable your ability to control antialiasing.

2. Adjust the Wine configuration's Virtual Desktop settings

From the "x3-terran-war-pack" directory, run the following to open up the Wine configuration (settings):

export WINEPREFIX=$PWD
export WINEARCH=win32
winecfg

This should look familiar. It was part of creating the Wine prefix in Step 1.

This time, go to the "Graphics" tab, check "Emulate a virtual desktop".
Set the "Desktop size" boxes to match your current screen resolution.

Using a virtual desktop allows your window manager to handle Alt-Tab behavior instead of the game trying to handle the focus change.


Step 8: Create Shortcuts

Your game(s) should be running pretty well now, but it would be easier to fire it up from the application menu. Unfortunately, I can't give you any hard and fast rules because each desktop environment is different, but there are some commonalities.

Menu entries are usually stored in "~/.local/applications/*.desktop" files.
These files describe location, display name, icon, and category information.

Writing these files by hand is a pain, and most window managers have a built-in mechanism for creating these files. Try right-clicking your application menu icon to see if it has a "Configure" or "Add Application" option.

If you happen to be running Cinnamon, as I am, the process is:

Configure -> Menu -> Open the menu editor -> New Item

Go ahead and create shortcuts pointing to the X3TC.sh and X3AP.sh scripts created in Step 6.

You should be able to select the associated game icon from the "x3-terran-war-pack/drive_c/GOG Games/X3 Terran War Pack" directory (look for *.ico files). In my case, the file was "goggame-1441039322.ico".

If your desktop environment doesn't handle *.ico files, you can use a local editor or a site like iConvert Icons online converter to create a compatible PNG from the ICO format.


Final Thoughts

This post was originally quite a bit longer and covered some alternative options... but GOG wouldn't allow a post that long.

My first attempt at this port failed due to an outdated Winetricks install, so thanks to WinterSnowfall for re-peaking my interest and passing along his working setup. Much appreciated.

And as always, have fun :)
Post edited May 04, 2020 by xixas
Great guide! I'm of course happy I could help out. Do consider also contributing to the Wine AppDB though, as it may help non-GOG users as well ;).
Post edited May 04, 2020 by WinterSnowfall
avatar
WinterSnowfall: ...Do consider also contributing to WineDB though...
I was a regular contributor to the Wine project 15 years or so back (mostly on D3D) and spent far too many hours in Bugzilla. Since then I've intentionally forgotten my login credentials and would rather keep it that way. There just aren't enough hours in the day.

But you're welcome to post (or even maintain!) on my behalf ;)
avatar
xixas: I was a regular contributor to the Wine project 15 years or so back (mostly on D3D) and spent far too many hours in Bugzilla.
Nice. Thanks for your work! :)
avatar
xixas: There just aren't enough hours in the day.
Yeah, I know what you mean...
avatar
xixas: But you're welcome to post (or even maintain!) on my behalf ;)
Sadly, I don't have much time on my hands either these days. But maybe someone else who'll read your guide will be willing to pick up the torch.
Hi,

for the sake of completeness:
The provided Checksums are md5-based and computed by using md5sum.

Cheers,
<invalid id>
For the weary space pilots, a word of warning: it looks like anything beyond Wine Staging 6.7 introduces a music loop bug that causes tracks to restart every 20 seconds or so. Journey beyond this version at your own peril.

(At the time of writing Wine Staging 6.11 is the latest version. At some point this bug may be fixed, hopefully.)

Edit: adding reference to bug for whomever is interested.
Post edited June 19, 2021 by WinterSnowfall
In an unexpected twist of fate, Egosoft has updated the Linux installer on GOG today - it now includes the latest versions of X3:TC. X3:AP as well as the new X3: Farnham's Legacy.

Older libraries issues as well as issues with missing in-game sounds/voices appear to have been fixed as well, so this "Wine workaround" should no longer be necessary for Linux users going forward.

The priest-duke's compliments!
Post edited July 09, 2021 by WinterSnowfall
<removes all my bookmarks for advice on how to install X3 on Linux>
I tried to install the bonus pack on linux (debian 12) with:

innoextract x3tc_bonus_package_4.1.01.exe
for i in Documents t scripts; do
mv -i "app/$i"/* "./GOG Games/X3 Terran War Pack/game/addon/$i/"
rmdir "app/$i"
done
rmdir app

EDIT: this is removing the "./app/" subdirectory from the extracted tree. Also tried moving the app folder into ".../games/addon", nope.

Does not looks like it's working, I see no CLS software in my eqd nor trading stations.
I tried to put the files in addon2 too (overwriting duplicated files), not working either.

I tried loading a save, saving, exiting, then reloading.
I tried a new game.

Nothing seems to work, what am I missing ?

EDIT:
this is on top of latest GOG x3_terran_war_pack_3_8_51737.sh

EDIT: but the instructions given in :
Official bonus packs for TC and AP post #10
still work... (Yeah, I still cannot post links)
Post edited August 08, 2023 by vincele