Windows-Patch-Pakete heissen jetzt Playtube-vX.Y.Z-win64-patch.play statt .zip (technisch weiterhin ein ganz normales ZIP-Archiv - Windows/Python schauen beim Entpacken auf die Magic Bytes, nicht auf die Endung). Playtube registriert .play beim ersten Start als Windows-Dateizuordnung (HKCU, keine Admin-Rechte noetig), sodass eine manuell heruntergeladene Patchdatei per Doppelklick installiert werden kann, ohne dass Playtube selbst etwas herunterladen muss: - shortcuts.py: ensure_play_file_association() registriert ProgID + DefaultIcon + shell/open/command und stoesst SHChangeNotify an, damit die Zuordnung sofort greift. - updater.py: UpdateInstaller akzeptiert jetzt optional local_archive_path statt einer download_url und ueberspringt dann den Download komplett. - main.py: erkennt eine .play-Datei als Kommandozeilenargument (Doppelklick- Start) und uebergibt sie an MainWindow.install_local_patch(). - release.yml: Windows-Patch wird als .zip gepackt und anschliessend zu .play umbenannt; _find_platform_asset() sucht fuer Windows-Patches jetzt nach .play statt .zip. Co-Authored-By: Claude Sonnet 5 <[email protected]>
116 lines
3.9 KiB
YAML
116 lines
3.9 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: Als .zip packen (volles Paket)
|
|
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.
|
|
run: |
|
|
Compress-Archive -Path dist\Playtube\Playtube.exe -DestinationPath Playtube-${{ github.ref_name }}-win64-patch.zip
|
|
Rename-Item -Path Playtube-${{ github.ref_name }}-win64-patch.zip -NewName Playtube-${{ github.ref_name }}-win64-patch.play
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-patch
|
|
path: Playtube-${{ github.ref_name }}-win64-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
|