Mulberry 1.1.0: Material You music player for Linux and Windows
- KDE/Windows accent-driven Material 3 theme, live updating - Library, tabbed playlists, smart/saved lists, queue, ratings - mpv and Qt Multimedia engines, EQ, ReplayGain, gapless - Synced lyrics (LRCLIB, NetEase, local .lrc), covers, MusicBrainz tags - Last.fm/ListenBrainz scrobbling, MPRIS, Windows media keys - Audio CD playback and ripping - PyInstaller, Inno Setup and AppImage builds via GitHub Actions Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01J7imThHV9BMkG24GaxPDeq
This commit is contained in:
commit
615b21d64a
1 changed files with 11333 additions and 0 deletions
115
.github/workflows/build.yml
vendored
Normal file
115
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
windows:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt pyinstaller
|
||||
- name: Version
|
||||
shell: bash
|
||||
run: echo "VERSION=$(python -c "import re;print(re.search(r'VERSION = \"(.+?)\"', open('mulberry/config.py').read()).group(1))")" >> $GITHUB_ENV
|
||||
- name: Icons
|
||||
run: python packaging/make_icons.py
|
||||
- name: Fetch libmpv (gapless, EQ, CD playback & ripping)
|
||||
continue-on-error: true
|
||||
shell: pwsh
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: |
|
||||
$rel = Invoke-RestMethod "https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/latest" -Headers @{ Authorization = "Bearer $env:GH_TOKEN" }
|
||||
$asset = $rel.assets | Where-Object { $_.name -match '^mpv-dev-x86_64-\d{8}-git-[0-9a-f]+\.7z$' } | Select-Object -First 1
|
||||
if (-not $asset) { throw "libmpv asset not found" }
|
||||
Invoke-WebRequest $asset.browser_download_url -OutFile mpv-dev.7z
|
||||
7z x mpv-dev.7z -ompv-dev -y | Out-Null
|
||||
New-Item -ItemType Directory -Force packaging/windows/mpv | Out-Null
|
||||
Copy-Item mpv-dev/libmpv-2.dll packaging/windows/mpv/
|
||||
Get-ChildItem packaging/windows/mpv
|
||||
- name: PyInstaller
|
||||
run: pyinstaller packaging/mulberry.spec --noconfirm --distpath build/dist --workpath build/work
|
||||
- name: Portable zip
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force dist | Out-Null
|
||||
Compress-Archive -Path build/dist/Mulberry -DestinationPath "dist/Mulberry-$env:VERSION-Windows-Portable.zip"
|
||||
- name: Installer (Inno Setup)
|
||||
shell: pwsh
|
||||
run: |
|
||||
$iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe"
|
||||
if (-not (Test-Path $iscc)) { choco install innosetup -y --no-progress; $iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" }
|
||||
& $iscc "/DAppVersion=$env:VERSION" packaging\windows\mulberry.iss
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: windows
|
||||
path: dist/*
|
||||
|
||||
linux:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: System packages
|
||||
run: sudo apt-get update && sudo apt-get install -y libegl1 libxkbcommon0 libxcb-cursor0 desktop-file-utils file
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt pyinstaller
|
||||
- name: Version
|
||||
run: echo "VERSION=$(python -c "import re;print(re.search(r'VERSION = \"(.+?)\"', open('mulberry/config.py').read()).group(1))")" >> $GITHUB_ENV
|
||||
- name: Icons
|
||||
run: python packaging/make_icons.py
|
||||
- name: PyInstaller
|
||||
run: pyinstaller packaging/mulberry.spec --noconfirm --distpath build/dist --workpath build/work
|
||||
- name: Tarball
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp mulberry.desktop mulberry/assets/mulberry.svg build/dist/Mulberry/
|
||||
tar -C build/dist -czf "dist/Mulberry-$VERSION-Linux-x86_64.tar.gz" Mulberry
|
||||
- name: AppImage
|
||||
run: |
|
||||
APPDIR=build/AppDir
|
||||
mkdir -p $APPDIR/usr/lib $APPDIR/usr/share/icons/hicolor/256x256/apps $APPDIR/usr/share/applications
|
||||
cp -r build/dist/Mulberry $APPDIR/usr/lib/mulberry
|
||||
cp packaging/linux/AppRun $APPDIR/AppRun && chmod +x $APPDIR/AppRun
|
||||
grep -v '^Actions=\|^\[Desktop Action\|^Name=Play\|^Name=Next\|^Name=Previous\|^Exec=dbus' mulberry.desktop > $APPDIR/mulberry.desktop
|
||||
cp $APPDIR/mulberry.desktop $APPDIR/usr/share/applications/
|
||||
cp packaging/build-icons/mulberry-256.png $APPDIR/mulberry.png
|
||||
cp packaging/build-icons/mulberry-256.png $APPDIR/usr/share/icons/hicolor/256x256/apps/mulberry.png
|
||||
wget -q https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool
|
||||
chmod +x appimagetool
|
||||
ARCH=x86_64 ./appimagetool --appimage-extract-and-run $APPDIR "dist/Mulberry-$VERSION-x86_64.AppImage"
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: linux
|
||||
path: dist/*
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: [windows, linux]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: artifacts/**/*
|
||||
generate_release_notes: true
|
||||
Loading…
Reference in a new issue