- Inno-Setup-Installer (packaging/playtube.iss): installiert pro Benutzer nach %LOCALAPPDATA%\Programs\Playtube, feste AppId -> jede neue Version ueberschreibt die vorhandene Installation an Ort und Stelle, raeumt den alten _internal-Ordner auf und beendet laufende Playtube-Prozesse vor dem Kopieren - Updater: installierte Kopie nimmt das kleine Patch (Versionseintrag in "Apps & Features" wird nachgezogen), portable Kopie wechselt per stillem Setup in die regulaere Installation; Patch nur bei passender PySide6-Version (steht im Dateinamen), sonst Setup; Aufraeumen des heruntergeladenen Installers - Einzelinstanz-Schutz (playtube/single_instance.py): zwei Prozesse auf demselben Browser-Profil liessen auf YouTube alle Icons verschwinden; ein zweiter Start holt jetzt das laufende Fenster nach vorn (auch .play-Patchdateien werden weitergereicht) - build.ps1 baut den Installer mit, Release-Pipeline haengt ihn an jedes Release - README: Installation, Update-Ablauf, Troubleshooting fuer fehlende Icons
142 lines
5.3 KiB
YAML
142 lines
5.3 KiB
YAML
name: Release
|
|
|
|
# Baut Playtube fuer Windows und Linux und veroeffentlicht beide als Assets an einem
|
|
# GitHub Release, sobald ein Tag im Format "vX.Y.Z" gepusht wird (z.B. durch
|
|
# packaging/release.ps1). Playtube.exe/Playtube auf den Nutzer-Rechnern erkennt neue
|
|
# Releases danach automatisch (siehe playtube/updater.py) und bietet die Installation an.
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
workflow_dispatch: {}
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build-windows:
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Abhaengigkeiten installieren
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Playtube.exe bauen
|
|
run: pyinstaller packaging\playtube.spec --noconfirm --distpath dist --workpath build
|
|
|
|
- name: Setup-Installer bauen (Inno Setup)
|
|
# Der Installer ist der empfohlene Download fuer Neueinsteiger UND das, was
|
|
# Playtube fuer volle Updates benutzt (siehe playtube/updater.py): eine einzige
|
|
# Installation, die jedes Update an Ort und Stelle ueberschreibt (feste AppId in
|
|
# packaging/playtube.iss) - keine parallelen Versionsordner mehr.
|
|
shell: pwsh
|
|
run: |
|
|
$version = (Select-String -Path playtube\__init__.py -Pattern '__version__\s*=\s*"([^"]+)"').Matches[0].Groups[1].Value
|
|
$iscc = Join-Path ${env:ProgramFiles(x86)} "Inno Setup 6\ISCC.exe"
|
|
if (-not (Test-Path $iscc)) {
|
|
choco install innosetup -y --no-progress
|
|
}
|
|
& $iscc "/DAppVersion=$version" packaging\playtube.iss
|
|
if ($LASTEXITCODE -ne 0) { throw "Inno-Setup-Build fehlgeschlagen." }
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-setup
|
|
path: dist/installer/Playtube-Setup-v*.exe
|
|
|
|
- name: Als .zip packen (volles Paket, portabel)
|
|
run: Compress-Archive -Path dist\Playtube -DestinationPath Playtube-${{ github.ref_name }}-win64.zip
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-build
|
|
path: Playtube-${{ github.ref_name }}-win64.zip
|
|
|
|
- name: Patch-Paket packen (nur Playtube.exe, fuer schnelle Updates)
|
|
# .play statt .zip: eigene Dateiendung, die Playtube nach dem ersten Start als
|
|
# Windows-Dateizuordnung registriert (siehe shortcuts.py) - ein manuell
|
|
# heruntergeladenes Patch laesst sich so auch per Doppelklick installieren.
|
|
# Technisch bleibt es ein ganz normales ZIP-Archiv.
|
|
# Die PySide6-Version steht im Dateinamen: hat sich die Laufzeit gegenueber der
|
|
# installierten App geaendert, ist ein reines .exe-Patch nicht mehr kompatibel und
|
|
# der Updater nimmt stattdessen den Setup-Installer (siehe _patch_is_compatible).
|
|
shell: pwsh
|
|
run: |
|
|
$pyside = python -c "import PySide6; print(PySide6.__version__)"
|
|
$name = "Playtube-${{ github.ref_name }}-win64-pyside${pyside}-patch"
|
|
Compress-Archive -Path dist\Playtube\Playtube.exe -DestinationPath "$name.zip"
|
|
Rename-Item -Path "$name.zip" -NewName "$name.play"
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-patch
|
|
path: Playtube-*-win64-pyside*-patch.play
|
|
|
|
build-linux:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Qt-WebEngine-Laufzeitabhaengigkeiten installieren
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libxkbcommon0 libegl1 libopengl0 libnss3 libnspr4 \
|
|
libxcomposite1 libxdamage1 libxrandr2 libxtst6 libxcursor1 \
|
|
libgbm1 libasound2t64 libatk-bridge2.0-0 libatk1.0-0 libcups2 \
|
|
libdbus-1-3 libdrm2 libpango-1.0-0 libpangocairo-1.0-0 \
|
|
libxfixes3 libxi6 libxext6 fonts-liberation
|
|
|
|
- name: Abhaengigkeiten installieren
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
pip install pyinstaller
|
|
|
|
- name: Playtube-Binary bauen
|
|
run: pyinstaller packaging/playtube.spec --noconfirm --distpath dist --workpath build
|
|
|
|
- name: Als .tar.gz packen (volles Paket)
|
|
run: tar -C dist -czf Playtube-${{ github.ref_name }}-linux-x86_64.tar.gz Playtube
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-build
|
|
path: Playtube-${{ github.ref_name }}-linux-x86_64.tar.gz
|
|
|
|
- name: Patch-Paket packen (nur Playtube-Binary, fuer schnelle Updates)
|
|
run: tar -C dist/Playtube -czf Playtube-${{ github.ref_name }}-linux-x86_64-patch.tar.gz Playtube
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: linux-patch
|
|
path: Playtube-${{ github.ref_name }}-linux-x86_64-patch.tar.gz
|
|
|
|
publish-release:
|
|
needs: [build-windows, build-linux]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/download-artifact@v4
|
|
with:
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: GitHub Release veroeffentlichen
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: artifacts/*
|
|
generate_release_notes: true
|