- main.py: zentraler Start (Fenster, pruefen, export) - build.py + requirements-build.txt: baut eine einzelne Datei ohne Python-Installation (Windows .exe / Linux), plus Zip/tar.gz mit README - app/viewer.py: base_dir() legt daten/ und export/ neben die .exe statt in den temporären Entpack-Ordner; Fehlermeldung bei falschem Ordner - app/export.py: export_on_console für main.py und den Direktaufruf - .gitea/workflows/build.yml: Linux-Build bei Tag v* oder von Hand, Windows-Job vorbereitet (braucht Windows-Runner) - README.md, tests/test_main.py, .gitignore: build/ und dist/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
# Baut das fertige Programm (PyInstaller, siehe build.py) und legt es als
|
||||
# Artefakt am Workflow-Lauf ab (in Gitea: Actions -> Lauf -> Artefakte).
|
||||
#
|
||||
# Startet bei einem Versions-Tag (z.B. "git tag v1.0 && git push origin v1.0")
|
||||
# oder von Hand in Gitea unter Actions -> "Build" -> "Run workflow".
|
||||
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
linux:
|
||||
# Label deines Linux-Runners (wie in tests.yml). Das Programm läuft auf
|
||||
# Linux-Systemen mit gleich neuer oder neuerer glibc als dieses Image.
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Code holen
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Python 3.11
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Systembibliotheken für Qt und PyInstaller
|
||||
run: |
|
||||
SUDO=""
|
||||
if [ "$(id -u)" != "0" ]; then SUDO="sudo"; fi
|
||||
$SUDO apt-get update
|
||||
$SUDO apt-get install -y --no-install-recommends \
|
||||
libegl1 libgl1 libxkbcommon0 libfontconfig1 libdbus-1-3 libglib2.0-0 binutils
|
||||
|
||||
- name: Python-Pakete
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -r requirements-build.txt
|
||||
|
||||
- name: Programm bauen
|
||||
run: python build.py
|
||||
|
||||
- name: Artefakt hochladen
|
||||
# v3: wird von allen Gitea-Versionen unterstützt (v4 erst ab neueren Versionen)
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: Fahrdaten-Tool-linux
|
||||
path: dist/Fahrdaten-Tool-linux.tar.gz
|
||||
|
||||
# Windows-.exe: braucht einen Runner auf Windows (act_runner direkt auf
|
||||
# einem Windows-Rechner, Label z.B. "windows"). Ohne einen solchen Runner
|
||||
# bliebe der Job ewig in der Warteschlange, darum auskommentiert.
|
||||
# Alternativ lokal bauen: python build.py
|
||||
#
|
||||
# windows:
|
||||
# runs-on: windows
|
||||
# steps:
|
||||
# - uses: actions/checkout@v4
|
||||
# - uses: actions/setup-python@v5
|
||||
# with:
|
||||
# python-version: "3.11"
|
||||
# - run: python -m pip install -r requirements-build.txt
|
||||
# - run: python build.py
|
||||
# - uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: Fahrdaten-Tool-windows
|
||||
# path: dist/Fahrdaten-Tool-windows.zip
|
||||
Reference in New Issue
Block a user