Installation - topological-state/stskit GitHub Wiki

English text below.

Allgemeines

STSkit läuft auf allen Plattformen, auf denen Python verfügbar ist (also u.a. Linux, Windows, MacOS). Es gibt zwei Wege, das Programm einzurichten und auszuführen:

  1. Quelltext. Funktioniert auf allen Systemen, auf denen Python verfügbar ist, erfordert aber (einfache) Operationen auf der Kommandozeile. Das GitHub-Repository ist immer auf dem neusten Stand.
  2. Ausführbare Programmdatei für Windows, Ubuntu (latest LTS) und MacOS. Programmdateien werden nach bestem Wissen erstellt, es gibt keine Garantie, dass sie in allen Umgebungen funktionieren und frei von Fehlern oder schädlichem Code sind. Die Programmdateien werden automatisch erstellt und nicht getestet. Bei Problemen bitte einen Issue melden und bis zur Behebung eine ältere Version verwenden..

STSdispo Version 2 verwendet ein neues Konfigurationsschema. Die alten Konfigurationsdaten werden automatisch migriert. Es wird empfohlen, ein Backup der alten Konfigurationsdateien zu erstellen.

Quelltext

Die folgende Anleitung gilt für STSdispo Version 2 (Repository-Branch version2).

Die empfohlene Python-Version ist 3.12. STSkit ist kompatibel mit Python 3.10-3.12. Zur Installation wird uv verwendet.

Schritt 1: uv installieren

Passenden uv Installer von https://docs.astral.sh/uv/ herunterladen und starten. Andere Paketmanager (conda, pip) können verwendet werden, werden aber hier nicht beschrieben.

Schritt 2: STSkit herunterladen

Quellcode als zip-File aus dem GitHub-Repository herunterladen und in ein Zielverzeichnis deiner Wahl entpacken.

Anwender, die mit git vertraut sind, können alternativ das Repository klonen:

git clone -b version2 https://github.com/topological-state/stskit.git

Schritt 3: Stellwerksim starten

Stellwerksim mit einem beliebigen Stellwerk starten.

Schritt 4: STSdispo starten

Terminal (bzw. Powershell auf Windows) öffnen und ins oben angelegte stskit-Verzeichnis wechseln. Das Verzeichnis muss die Datei pyproject.toml enthalten.

uv run stsdispo.py

uv lädt die notwendigen Python-Pakte herunter und startet das Programm. Das Hauptfenster von STSdispo öffnet und verbindet sich mit dem laufenden Stellwerk. Wenn beim Starten, Fehler auftreten, die Umgebung mit folgendem Befehl aktualisieren, und das Programm nochmals starten.

uv sync

Nach der ersten Installation sind zum Starten nur die Schritte 3-4 nötig.

Ausführbare Programmdatei

Schritt 1: Programmdatei herunterladen

Ausführbare Programmdateien für Windows (exe), Ubuntu (bin) und MacOS (app) werden soweit verfügbar unter Releases im Abschnitt Assets veröffentlicht.

Schritt 2: Stellwerksim und STSdispo starten

  1. Starte ein Stellwerk im Stellwerksim.
  2. Starte das Programm stsdispo.exe.

Kommandozeilen-Optionen

Ohne Angabe verbindet sich STSdispo mit dem laufenden Stellwerk auf dem gleichen Rechner. Wenn der Simulator auf einem anderen Rechner im gleichen Netzwerk oder auf einem anderen Port läuft, können die folgenden Optionen angegeben werden:

--host other-host --port 12345

Wenn Fehler auftreten, erstellt STSdispo eine Protokolldatei stskit.log im aktuellen Verzeichnis. Für mehr Details kann ein niedriger Log Level (WARNING, INFO or DEBUG) eingestellt werden. Ausserdem kann der Name der Protokolldatei angegeben werden:

--log-level DEBUG --log-file mylog.log

Installation from Source Code

The following instructions apply to version 2 of STSdispo (version2 branch in the repo). The recommended Python version is 3.12. stskit is compatible with 3.10-3.12.

The following instructions are based on the recommended uv package manager. uv is a smar package manager that reduces the number of installation steps to a minimum. Other package managers (conda, pip) or the official Python binaries using packages from https://pypi.org/ should work as well but will not be covered here.

Step 1: Installing uv

Install uv according to their installation instructions.

Step 2: Installing stskit

Download the STSkit source code from the Github repository, version2 branch. Users familiar with git may choose to clone the repository, all others should just download a zip file and unpack it to a directory of their choice.

Step 3: Running Stellwerksim

Start a Stellwerk of your choice.

Step 4: Running STSdispo

Open a terminal (or Powershell on Windows) and switch to the directory that contains pyproject.toml. Then run STSdispo:

uv run stsdispo.py

STSdispo will open its main window and connect to the locally running stellwerk. To terminate STSdispo, close the main window. If the program does not start, you may need to sync the environment and retry:

uv sync

Command Line Options

By default, STSdispo connects to the running stellwerk on the local host. To specify another host and/or port:

--host other-host --port 12345

By default, a log file stskit.log will be produced if errors are encountered. More verbose output can be generated by specifying a lower log level (WARNING, INFO or DEBUG). Example:

--log-level DEBUG --log-file mylog.log

Compiled Binaries

Compiled binaries for the latest versions of Ubuntu (bin), Windows (exe) and MacOS (app) are provided without warranty at the GitHub releases page under Assets. Note that binaries are created automatically and not tested. In case of unknown problems, please report them and try with an older version.