HowTo/Installing Trainz at Linux: Debian based Distributions

From TrainzOnline
< HowTo(Difference between revisions)
Jump to: navigation, search
 
Line 6: Line 6:
 
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.
 
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.
 
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 ===
 
=== Install WineHQ ===
A useful instruction to do so is here (in German):[URL='https://wiki.ubuntuusers.de/Wine/#Fertige-Pakete']ubuntuusers.de Wine Fertige-Pakete[/URL] in sub chapter "Methode 2 - Wine-Fremdquelle". Maybe you want to use this script:
+
A useful instruction to do so is here (in German): [https://wiki.ubuntuusers.de/Wine/#Fertige-Pakete|ubuntuusers.de Wine Fertige-Pakete]  
 +
in sub chapter "'''Methode 2 - Wine-Fremdquelle'''". Maybe you want to use this script:
  
  sudo dpkg --add-architecture i386    # Nur auf 64-Bit-Systemen notwendig.
+
<pre>
  sudo mkdir -pm755 /etc/apt/keyrings  # Ab 22.04 nicht mehr nötig.
+
  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 -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 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 update
 
  sudo apt install --install-recommends winehq-stable
 
  sudo apt install --install-recommends winehq-stable
 +
</pre>
  
 
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.
 
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.
Line 25: Line 29:
 
  * TrainzPlus-Offline-Installer-128486.zip
 
  * TrainzPlus-Offline-Installer-128486.zip
  
and unpacking it into the sub folder looks
+
and unpacking it into the sub folder looks like this
 
<div class="toccolours mw-collapsible mw-collapsed">
 
<div class="toccolours mw-collapsible mw-collapsed">
like this:  
+
hidden collapsed folder file structure (please expand ->):
 
<div class="mw-collapsible-content">
 
<div class="mw-collapsible-content">
  

Latest revision as of 20:20, 2 May 2025

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

Contents

[edit] Ubuntu 24.4 LTS noble

[edit] 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.

[edit] 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.

[edit] 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
    +-- ...

[edit] 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