HowTo/Installing Trainz at Linux: Debian based Distributions

From TrainzOnline
Jump to: navigation, search

See Trainz Forum Discussion Thread "Installing and running Trainz at Linux, here Ubuntu 24.04 LTS noble - post #1 and #3" too.

Contents

Ubuntu 24.4 LTS noble

The idea

This is a very old idea and often discussed. I searched for a systematic instruction, but I didn't find one. So I tried to test it and how it runs. Here's my personal systematic for Debian based Linux systems. For my knowledge such systems aren't able to execute windows programs (*.exe) out of the box. We need some helper apps. In my case I will use WineHQ from an external repository.

Install WineHQ

A useful instruction to do so is here (in German): Wine Fertige-Pakete in sub chapter "Methode 2 - Wine-Fremdquelle". Maybe you want to use this script:

 sudo dpkg --add-architecture i386     # Only necessary for 64bit systems.
 sudo mkdir -pm755 /etc/apt/keyrings   # No longer necessary from version 24.04 onwards.
 sudo wget -nc -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key
 sudo wget -NP /etc/apt/sources.list.d/ "https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -c | grep -o '\w*$')/winehq-$(lsb_release -c | grep -o '\w*$').sources"
 sudo apt update
 sudo apt install --install-recommends winehq-stable

The following chapter handles the installation of Trainz instances. The paths in the later following scripts are based on a collecting folder "Wine" in $USER.

Download and unpack the Trainz install files

After downloading the full installer zip files

* TANE-SP4-Offline-Installer-105766.zip
* TRS19-SP4-Offline-Installer-114800.zip
* TRS22-Offline-Installer-126273.zip
* TrainzPlus-Offline-Installer-128486.zip

and unpacking it into the sub folder looks like this

hidden collapsed folder file structure (please expand ->):

$HOME/Wine/TRSDL/
+-- TANESP4_105766
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRS19PE_114800
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRS22PE_126273
|   +-- ...
|   +-- install.exe
|   +-- ...
+-- TRSPLUS_128486
    +-- ...
    +-- install.exe
    +-- ...

Install the Trainz instances

We install every Trainz instance in its own wine prefix. The install statements of the following scripts create the wine prefixes ".TANESP4", ".TRS19PE", ".TRS22PE respective ".TRSPLUS" as hidden same named folders. Every installation process creates two links at the desktop. I don't currently know the purpose of the link with the purple circle and a white arrow. The launch link for the Trainz instance with a Trainz icon and a small red dot with a white cross is blocked. By right-clicking it and using the "Allow launching" entry, it will be possible to launch Trainz. Maybe you want to use one of this scripts to install a Trainz instance:

#!/bin/bash
#===============================================================================
# Installation of TANESP4 in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TANESP4 wine $HOME/Wine/TRSDL/TANESP4_105766/install.exe
#===============================================================================
#!/bin/bash
#===============================================================================
# Installation TRS19PE in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRS19PE wine $HOME/Wine/TRSDL/TRS19PE_114800/install.exe
#===============================================================================
#!/bin/bash
#===============================================================================
# Installation TRS22PE in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRS22PE wine $HOME/Wine/TRSDL/TRS22PE_126273/install.exe
#===============================================================================
#!/bin/bash
#===============================================================================
# Installation TRSPLUS in Wine on Ubuntu
#-------------------------------------------------------------------------------
WINEPREFIX=$HOME/Wine/.TRSPLUS wine $HOME/Wine/TRSDL/TRSPLUS_128486/install.exe
#=============================================================================== 

Good luck and have fun!

Personal tools