2.0.4: Arch, apt and Nix packages, packaging/ restored; Windows opens links and folders in Explorer, no console windows
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
parent
8c5f2f022e
commit
776d34edd4
21 changed files with 587 additions and 14 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -1,5 +1,5 @@
|
|||
target/
|
||||
*.AppImage
|
||||
releases/
|
||||
/releases/
|
||||
dist/
|
||||
.directory
|
||||
|
|
|
|||
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -2226,7 +2226,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mulberry"
|
||||
version = "2.0.3"
|
||||
version = "2.0.4"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"chrono",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "mulberry"
|
||||
version = "2.0.3"
|
||||
version = "2.0.4"
|
||||
edition = "2021"
|
||||
description = "A Material You music player for Linux"
|
||||
license = "MIT"
|
||||
|
|
|
|||
17
README.md
17
README.md
|
|
@ -66,8 +66,21 @@ focus mode (F11), compact and hidden now-playing layouts, a floating bass-reacti
|
|||
## Install
|
||||
|
||||
### From a release
|
||||
Download `Mulberry-<version>-Linux-x86_64.tar.gz` from the [Releases page](https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry/releases),
|
||||
unpack it and run `./install.sh` inside. It installs to `~/.local` (no root).
|
||||
|
||||
Downloads are on the [Releases page](https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry/releases); check them against `SHA256SUMS-<version>`. The Linux builds
|
||||
are made on Arch Linux and need a recent glibc (the version is named in the packages and checked by the installer),
|
||||
so they run on Arch and other up-to-date distributions; on older ones, build from source.
|
||||
|
||||
- **Arch Linux:** `sudo pacman -U Mulberry-<version>-arch-x86_64.pkg.tar.zst` (package `mulberry-bin`; remove it with
|
||||
`sudo pacman -R mulberry-bin`). `packaging/arch/PKGBUILD` builds the same package from the release.
|
||||
- **Debian, Ubuntu and other apt systems:** `sudo apt install ./Mulberry-<version>-amd64.deb`.
|
||||
- **Nix:** `nix profile install git+https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry` (this repo is a flake), or `callPackage ./packaging/nix { }`.
|
||||
- **Any distribution:** unpack `Mulberry-<version>-Linux-x86_64.tar.gz` and run `sh install.sh` inside (your home,
|
||||
`~/.local`, no root) or `sh install.sh --system` (`/usr/local`). `sh uninstall.sh` removes it; `--purge` also
|
||||
deletes settings and data. `installer.sh` from this repo does the same next to a downloaded tar.gz or AppImage.
|
||||
- **AppImage:** `chmod +x Mulberry-<version>-x86_64.AppImage` and run it. libmpv is bundled in it.
|
||||
- **Windows (x64):** `Mulberry-<version>-Setup.exe` installs for your user only (no admin) with a Start menu entry
|
||||
and an uninstaller; `Mulberry-<version>-Windows-portable.zip` runs from any folder.
|
||||
|
||||
### iPhone (jailbroken / TrollStore)
|
||||
`Mulberry-<version>-iOS.ipa` on the Releases page installs with TrollStore. The iOS app lives in [`ios/`](ios/README.md)
|
||||
|
|
|
|||
10
docs/releases/2.0.0.md
Normal file
10
docs/releases/2.0.0.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# Mulberry 2.0.0 — rewritten in Rust
|
||||
|
||||
- Native Rust app (egui + libmpv): no Python or Qt needed, one binary.
|
||||
- Right-click a cell of several selected tracks › **Set album/artist/title/… to “value”** writes the tag into every selected file instantly (undo in the toast).
|
||||
- The wavy seek bar no longer jumps back and forth (monotonic position clock, no per-frame image rescaling).
|
||||
- Animations capped at 30 fps by default; nothing repaints while paused. About 1 ms CPU per frame.
|
||||
- Closing the window or Ctrl+Q with the tray icon enabled keeps playing in the background; tray › Quit exits.
|
||||
- Synced lyrics follow playback; window and tray icon follow the accent colour; compact menus.
|
||||
- Uses your existing library, playlists and covers; settings are imported once from the old config.
|
||||
- Linux only for now. Needs libmpv (`mpv`); optional ffmpeg, cdparanoia, yt-dlp.
|
||||
9
docs/releases/2.0.1.md
Normal file
9
docs/releases/2.0.1.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Mulberry 2.0.1
|
||||
|
||||
- **Drop files from your file manager onto the playlist** (also on Wayland/niri): they are inserted where you hover, with an insert line, and a group of files stays together and in order. Wayland support comes from a patched copy of winit (`vendor/winit`).
|
||||
- Ctrl+V pastes files copied in a file manager.
|
||||
- Dragging rows shows the insert line reliably; dropping below the last row appends.
|
||||
- Stop (media key or button) now clears the "playing" marker in the playlist; MPRIS no longer loses its name to a second instance.
|
||||
- Closing the window or Ctrl+Q keeps playing in the tray when the tray is enabled; Quit in the tray exits.
|
||||
- Synced lyrics follow playback, window/tray icon follow the accent colour, compact menus, Focus mode in the View menu.
|
||||
- New README and screenshots.
|
||||
9
docs/releases/2.0.2.md
Normal file
9
docs/releases/2.0.2.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Mulberry 2.0.2
|
||||
|
||||
- **Windows build**: installer and portable zip (no tray icon or media-key integration yet). Linux gets an AppImage too.
|
||||
- Ctrl+C / Ctrl+X / Ctrl+V now work in every text field (tag editor, filters, dialogs).
|
||||
- Player shortcuts (Ctrl+arrows, Ctrl+Z, Ctrl+A, Ctrl+T/W/J/D/E/L/U/H/M) no longer fire while you are typing in a text box.
|
||||
- Menus: submenu rows line up with the other rows and all rows span the full menu width.
|
||||
- The floating bass shape's "Change shape" menu item works.
|
||||
- "Paste files from file manager" removed from the Playlist menu; Ctrl+V still adds copied files.
|
||||
- Edit lyrics opens with the lyrics currently shown, from any source (synced, plain, embedded, online).
|
||||
5
docs/releases/2.0.3.md
Normal file
5
docs/releases/2.0.3.md
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
# Mulberry 2.0.3
|
||||
|
||||
- **Web links play again**: starting a YouTube/SoundCloud/… link while another track was playing left the player stuck on "loading" (and the old track kept playing underneath). Links now start as soon as yt-dlp has resolved them, with title, length and live state.
|
||||
- While a link is being opened the player shows "Opening link with yt-dlp…" instead of "LIVE".
|
||||
- Links from sites outside the built-in list are handed to yt-dlp when mpv cannot open them.
|
||||
8
docs/releases/2.0.4.md
Normal file
8
docs/releases/2.0.4.md
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# Mulberry 2.0.4
|
||||
|
||||
- **New icon colour:** the icon is berry red instead of purple, so it stands apart from the other apps in a dock.
|
||||
- **More packages:** besides the AppImage, tar.gz and Windows installer and zip, there is now an Arch package
|
||||
(`mulberry-bin`), a Debian/Ubuntu `.deb` and a Nix flake. The tar.gz now unpacks like a prefix (`bin/`, `share/`)
|
||||
with `install.sh` and `uninstall.sh` (`--system` for `/usr/local`, `--purge` to delete your data).
|
||||
- **Windows fixes:** links and "show in folder" open in the browser and Explorer (they did nothing before), and
|
||||
yt-dlp and ffmpeg no longer flash a console window.
|
||||
10
flake.nix
Normal file
10
flake.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
description = "Material You music player";
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
outputs = { self, nixpkgs }:
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
packages.x86_64-linux.default = pkgs.callPackage ./packaging/nix { };
|
||||
apps.x86_64-linux.default = { type = "app"; program = "${self.packages.x86_64-linux.default}/bin/mulberry"; };
|
||||
};
|
||||
}
|
||||
159
installer.sh
Executable file
159
installer.sh
Executable file
|
|
@ -0,0 +1,159 @@
|
|||
#!/bin/sh
|
||||
# Mulberry installer. Installs from a release tar.gz or AppImage, or removes an install.
|
||||
# installer.sh [--user|--system] [--prefix DIR] [--url URL] [FILE]
|
||||
# installer.sh --uninstall [--purge] [--user|--system] [--prefix DIR]
|
||||
# --user (default): ~/.local, no root. --system: /usr/local, sudo only for the copy.
|
||||
# Without FILE it uses the unpacked release folder it sits in, or Mulberry-*-Linux-x86_64.tar.gz or
|
||||
# Mulberry-*-x86_64.AppImage next to it. SHA256SUMS-<version> beside the file is checked when present.
|
||||
# --purge also deletes settings and data (~/.config/mulberry, ~/.local/share/mulberry, ~/.cache/mulberry: settings, library, playlists, caches). DESTDIR=dir stages under dir (no sudo).
|
||||
# Needs glibc 2.35 or newer.
|
||||
set -eu
|
||||
|
||||
app=mulberry main=mulberry need=2.35
|
||||
mode=install scope=user purge=0 prefix= url= file=
|
||||
while [ $# -gt 0 ]; do
|
||||
case $1 in
|
||||
--user) scope=user ;;
|
||||
--system) scope=system ;;
|
||||
--prefix) [ $# -ge 2 ] || { echo "--prefix needs a folder." >&2; exit 2; }; prefix=$2; shift ;;
|
||||
--url) [ $# -ge 2 ] || { echo "--url needs an address." >&2; exit 2; }; url=$2; shift ;;
|
||||
--uninstall) mode=uninstall ;;
|
||||
--purge) purge=1 ;;
|
||||
-h|--help) sed -n '2,9p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
||||
-*) echo "Unknown option: $1 (see --help)." >&2; exit 2 ;;
|
||||
*) file=$1 ;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
[ "$purge" = 0 ] || [ "$mode" = uninstall ] || { echo "--purge only goes with --uninstall." >&2; exit 2; }
|
||||
if [ -z "$prefix" ]; then
|
||||
if [ "$scope" = system ]; then prefix=/usr/local; else prefix=$HOME/.local; fi
|
||||
fi
|
||||
case $prefix in /*) ;; *) echo "--prefix must be an absolute path." >&2; exit 2 ;; esac
|
||||
prefix=${prefix%/}
|
||||
destdir=${DESTDIR:-}
|
||||
root=$destdir$prefix
|
||||
list=$root/lib/$app/files
|
||||
sudo=
|
||||
if [ -z "$destdir" ] && [ "$(id -u)" != 0 ]; then
|
||||
d=$root; while [ ! -e "$d" ]; do d=$(dirname "$d"); done
|
||||
[ -w "$d" ] || sudo=sudo
|
||||
fi
|
||||
|
||||
refresh() {
|
||||
[ -z "$destdir" ] || return 0
|
||||
command -v update-desktop-database >/dev/null 2>&1 && $sudo update-desktop-database -q "$root/share/applications" 2>/dev/null || true
|
||||
[ -f "$root/share/icons/hicolor/index.theme" ] && command -v gtk-update-icon-cache >/dev/null 2>&1 \
|
||||
&& $sudo gtk-update-icon-cache -q -t -f "$root/share/icons/hicolor" 2>/dev/null || true
|
||||
}
|
||||
|
||||
# Removes the files the last install listed, then the folders that became empty.
|
||||
remove_listed() {
|
||||
[ -f "$list" ] || return 0
|
||||
while IFS= read -r f; do
|
||||
[ -n "$f" ] || continue
|
||||
$sudo rm -f "$root/$f"
|
||||
d=$(dirname "$f")
|
||||
while [ "$d" != . ] && $sudo rmdir "$root/$d" 2>/dev/null; do d=$(dirname "$d"); done
|
||||
done < "$list"
|
||||
$sudo rm -f "$list"
|
||||
$sudo rmdir "$root/lib/$app" "$root/lib" 2>/dev/null || true
|
||||
}
|
||||
|
||||
if [ "$mode" = uninstall ]; then
|
||||
if [ ! -f "$list" ]; then
|
||||
echo "Mulberry is not installed in $prefix (no $list)." >&2
|
||||
[ "$purge" = 1 ] || exit 1
|
||||
else
|
||||
remove_listed
|
||||
refresh
|
||||
echo "Mulberry removed from $prefix."
|
||||
fi
|
||||
if [ "$purge" = 1 ]; then
|
||||
rm -rf "${XDG_CONFIG_HOME:-$HOME/.config}/mulberry"
|
||||
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/mulberry"
|
||||
rm -rf "${XDG_CACHE_HOME:-$HOME/.cache}/mulberry"
|
||||
echo "Settings and data removed (~/.config/mulberry, ~/.local/share/mulberry, ~/.cache/mulberry: settings, library, playlists, caches)."
|
||||
else
|
||||
echo "Settings and data are kept (--purge deletes them)."
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# glibc check (MULBERRY_GLIBC overrides the detected version, for tests)
|
||||
have=${MULBERRY_GLIBC:-$(getconf GNU_LIBC_VERSION 2>/dev/null | sed 's/^glibc //')}
|
||||
if [ -z "$have" ]; then
|
||||
echo "Mulberry needs glibc $need or newer, and this system does not report a glibc (musl?). Nothing was installed." >&2; exit 1
|
||||
fi
|
||||
if [ "$(printf '%s\n%s\n' "$need" "$have" | sort -V | head -n 1)" != "$need" ]; then
|
||||
echo "Mulberry needs glibc $need or newer, and this system has glibc $have. Nothing was installed." >&2; exit 1
|
||||
fi
|
||||
|
||||
here=$(cd "$(dirname "$0")" && pwd)
|
||||
tmp=$(mktemp -d); trap 'rm -rf "$tmp"' EXIT INT TERM
|
||||
|
||||
if [ -n "$url" ]; then
|
||||
file=$tmp/$(basename "${url%%\?*}")
|
||||
if command -v curl >/dev/null 2>&1; then curl -fL -o "$file" -- "$url"
|
||||
elif command -v wget >/dev/null 2>&1; then wget -O "$file" -- "$url"
|
||||
else echo "Neither curl nor wget is installed, so $url cannot be fetched." >&2; exit 1; fi
|
||||
fi
|
||||
src=
|
||||
if [ -z "$file" ]; then
|
||||
if [ -f "$here/bin/$main" ]; then src=$here
|
||||
else
|
||||
for f in "$here"/Mulberry-*-Linux-x86_64.tar.gz "$here"/Mulberry-*-x86_64.AppImage; do
|
||||
[ -f "$f" ] && { file=$f; break; }
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [ -z "$src" ]; then
|
||||
[ -n "$file" ] && [ -f "$file" ] || { echo "No Mulberry tar.gz or AppImage was given or found next to the installer." >&2; exit 1; }
|
||||
dir=$(dirname "$file"); name=$(basename "$file")
|
||||
for s in "$dir"/SHA256SUMS-*; do
|
||||
[ -f "$s" ] || continue
|
||||
line=$(grep -F " $name" "$s" | head -n 1 || true)
|
||||
[ -n "$line" ] || continue
|
||||
[ "${line%% *}" = "$(sha256sum "$file" | cut -d' ' -f1)" ] \
|
||||
|| { echo "The checksum of $name does not match $(basename "$s"). Nothing was installed." >&2; exit 1; }
|
||||
echo "Checksum ok."
|
||||
done
|
||||
mkdir "$tmp/x"
|
||||
case $name in
|
||||
*.tar.gz)
|
||||
tar -xzf "$file" -C "$tmp/x"
|
||||
src=$(find "$tmp/x" -maxdepth 1 -mindepth 1 -type d | head -n 1)
|
||||
[ -n "$src" ] && [ -f "$src/bin/$main" ] || { echo "$name has no bin/$main, so it is not a Mulberry release." >&2; exit 1; } ;;
|
||||
*.AppImage)
|
||||
cp "$file" "$tmp/app"; chmod 755 "$tmp/app"
|
||||
(cd "$tmp/x" && "$tmp/app" --appimage-extract >/dev/null 2>&1) || true
|
||||
[ -d "$tmp/x/squashfs-root/usr/share" ] || { echo "Could not read the contents of $name. Nothing was installed." >&2; exit 1; }
|
||||
src=$tmp/src; mkdir -p "$src/bin"
|
||||
mv "$tmp/app" "$src/bin/$main"
|
||||
mv "$tmp/x/squashfs-root/usr/share" "$src/share"
|
||||
[ ! -d "$tmp/x/squashfs-root/usr/lib" ] || mv "$tmp/x/squashfs-root/usr/lib" "$src/lib" ;;
|
||||
*) echo "Unknown file type: $name (need .tar.gz or .AppImage)." >&2; exit 1 ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Stage with launchers pointing at this prefix, then copy and list every file for --uninstall.
|
||||
st=$tmp/stage
|
||||
mkdir -p "$st"
|
||||
for d in bin lib share; do [ ! -d "$src/$d" ] || cp -R "$src/$d" "$st/$d"; done
|
||||
for d in "$st"/share/applications/*.desktop; do
|
||||
[ -f "$d" ] || continue
|
||||
for b in "$st"/bin/*; do
|
||||
b=$(basename "$b")
|
||||
sed -i -e "s#^Exec=$b\( \|\$\)#Exec=$prefix/bin/$b\1#" -e "s#^TryExec=$b\$#TryExec=$prefix/bin/$b#" "$d"
|
||||
done
|
||||
done
|
||||
chmod 755 "$st"/bin/*
|
||||
(cd "$st" && find . \( -type f -o -type l \) | sed 's|^\./||' | sort) > "$tmp/files"
|
||||
mkdir -p "$st/lib/$app"; echo "lib/$app/files" >> "$tmp/files"; cp "$tmp/files" "$st/lib/$app/files"
|
||||
|
||||
remove_listed
|
||||
$sudo mkdir -p "$root"
|
||||
$sudo cp -R "$st/." "$root/"
|
||||
refresh
|
||||
echo "Mulberry installed in $prefix/bin/$main"
|
||||
case ":$PATH:" in *":$prefix/bin:"*) ;; *) echo "Note: $prefix/bin is not on your PATH." ;; esac
|
||||
35
packaging/arch/.SRCINFO
Normal file
35
packaging/arch/.SRCINFO
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
pkgbase = mulberry-bin
|
||||
pkgdesc = Material You music player
|
||||
pkgver = 2.0.4
|
||||
pkgrel = 1
|
||||
url = https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry
|
||||
arch = x86_64
|
||||
license = MIT
|
||||
depends = glibc>=2.35
|
||||
depends = gcc-libs
|
||||
depends = mpv
|
||||
depends = dbus
|
||||
depends = fontconfig
|
||||
depends = libglvnd
|
||||
depends = wayland
|
||||
depends = libxkbcommon
|
||||
depends = libxkbcommon-x11
|
||||
depends = libx11
|
||||
depends = libxcb
|
||||
depends = libxcursor
|
||||
depends = libxi
|
||||
depends = libxrender
|
||||
depends = hicolor-icon-theme
|
||||
optdepends = xdg-desktop-portal: open and save dialogs
|
||||
optdepends = ffmpeg: visualizer analysis and CD encoding
|
||||
optdepends = cdparanoia: CD ripping
|
||||
optdepends = yt-dlp: web links
|
||||
optdepends = libpulse: visualizer for radio streams (parec)
|
||||
provides = mulberry
|
||||
conflicts = mulberry
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = Mulberry-2.0.4-Linux-x86_64.tar.gz::https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry/releases/download/v2.0.4/Mulberry-2.0.4-Linux-x86_64.tar.gz
|
||||
sha256sums = 87dab251e23593457ad3e3b2b8ca7903f79af385b805d276ec29e701785e5e5f
|
||||
|
||||
pkgname = mulberry-bin
|
||||
33
packaging/arch/PKGBUILD
Normal file
33
packaging/arch/PKGBUILD
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Maintainer: astar76
|
||||
# Built by tools/package.sh from the release tar.gz (TARBALL=file://… for an offline build); it keeps pkgver,
|
||||
# sha256sums and the glibc floor current.
|
||||
pkgname=mulberry-bin
|
||||
pkgver=2.0.4
|
||||
pkgrel=1
|
||||
pkgdesc='Material You music player'
|
||||
arch=('x86_64')
|
||||
url='https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry'
|
||||
license=('MIT')
|
||||
depends=('glibc>=2.35' 'gcc-libs' 'mpv' 'dbus' 'fontconfig' 'libglvnd' 'wayland' 'libxkbcommon' 'libxkbcommon-x11' 'libx11' 'libxcb' 'libxcursor' 'libxi' 'libxrender' 'hicolor-icon-theme')
|
||||
optdepends=(
|
||||
'xdg-desktop-portal: open and save dialogs'
|
||||
'ffmpeg: visualizer analysis and CD encoding'
|
||||
'cdparanoia: CD ripping'
|
||||
'yt-dlp: web links'
|
||||
'libpulse: visualizer for radio streams (parec)'
|
||||
)
|
||||
provides=('mulberry')
|
||||
conflicts=('mulberry')
|
||||
options=('!strip' '!debug')
|
||||
source=("Mulberry-$pkgver-Linux-x86_64.tar.gz::${TARBALL:-$url/releases/download/v$pkgver/Mulberry-$pkgver-Linux-x86_64.tar.gz}")
|
||||
sha256sums=('87dab251e23593457ad3e3b2b8ca7903f79af385b805d276ec29e701785e5e5f')
|
||||
|
||||
package() {
|
||||
cd "$srcdir/mulberry-$pkgver"
|
||||
install -d "$pkgdir/usr"
|
||||
for d in bin lib share; do [ ! -d "$d" ] || cp -R "$d" "$pkgdir/usr/"; done
|
||||
if [ -d "$pkgdir/usr/share/licenses/mulberry" ] && [ "$pkgname" != mulberry ]; then
|
||||
mv "$pkgdir/usr/share/licenses/mulberry" "$pkgdir/usr/share/licenses/$pkgname"
|
||||
fi
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 264 KiB After Width: | Height: | Size: 364 KiB |
|
|
@ -1,18 +1,22 @@
|
|||
; Inno Setup script: per-user install (no admin), Start menu entry, uninstaller.
|
||||
; Built on Linux under wine: iscc /DVersion=2.0.1 /DSrc=<folder with mulberry.exe and libmpv-2.dll> mulberry.iss
|
||||
; Built by tools/package.sh under wine: iscc /DVersion=<v> /DSrc=<folder with mulberry.exe> /DOut=<output folder> mulberry.iss
|
||||
#ifndef Version
|
||||
#define Version "0.0.0"
|
||||
#endif
|
||||
#ifndef Src
|
||||
#define Src "..\dist\Mulberry"
|
||||
#endif
|
||||
#ifndef Out
|
||||
#define Out "..\dist"
|
||||
#endif
|
||||
|
||||
[Setup]
|
||||
AppId={{B4F0C1D2-7A63-4E59-8C1B-52D9E0A7F3C6}
|
||||
AppId={{}
|
||||
AppName=Mulberry
|
||||
AppVersion={#Version}
|
||||
AppVerName=Mulberry {#Version}
|
||||
AppPublisher=Mulberry
|
||||
AppPublisher=astar76
|
||||
AppPublisherURL=https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry
|
||||
VersionInfoVersion={#Version}
|
||||
VersionInfoProductName=Mulberry
|
||||
VersionInfoDescription=Mulberry Setup
|
||||
|
|
@ -22,11 +26,12 @@ DisableDirPage=auto
|
|||
PrivilegesRequired=lowest
|
||||
ArchitecturesAllowed=x64compatible
|
||||
ArchitecturesInstallIn64BitMode=x64compatible
|
||||
OutputDir=..\dist
|
||||
OutputDir={#Out}
|
||||
OutputBaseFilename=Mulberry-{#Version}-Setup
|
||||
SetupIconFile=mulberry.ico
|
||||
UninstallDisplayIcon={app}\mulberry.exe
|
||||
UninstallDisplayName=Mulberry
|
||||
LicenseFile=..\LICENSE
|
||||
Compression=lzma2/max
|
||||
SolidCompression=yes
|
||||
WizardStyle=modern
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" width="256" height="256">
|
||||
<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#cdb4ff"/><stop offset="1" stop-color="#f0a6d8"/></linearGradient></defs>
|
||||
<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#feb2c2"/><stop offset="1" stop-color="#dd4677"/></linearGradient></defs>
|
||||
<path d="M250.00,128.00 L249.45,132.24 L247.84,136.38 L245.33,140.33 L242.13,144.04 L238.53,147.49 L234.84,150.71 L231.34,153.77 L228.30,156.76 L225.92,159.82 L224.30,163.05 L223.46,166.57 L223.32,170.44 L223.72,174.69 L224.44,179.28 L225.20,184.12 L225.74,189.08 L225.81,193.97 L225.19,198.61 L223.76,202.82 L221.46,206.42 L218.31,209.31 L214.42,211.45 L209.95,212.87 L205.12,213.65 L200.15,213.98 L195.25,214.07 L190.60,214.16 L186.35,214.51 L182.56,215.31 L179.24,216.75 L176.34,218.91 L173.74,221.78 L171.32,225.30 L168.92,229.27 L166.39,233.47 L163.62,237.61 L160.52,241.41 L157.06,244.57 L153.27,246.87 L149.19,248.15 L144.91,248.34 L140.56,247.48 L136.23,245.69 L132.02,243.19 L128.00,240.24 L124.19,237.16 L120.57,234.24 L117.09,231.77 L113.67,229.96 L110.20,228.92 L106.59,228.71 L102.76,229.24 L98.64,230.38 L94.25,231.88 L89.61,233.47 L84.82,234.86 L80.01,235.78 L75.34,235.98 L70.95,235.30 L67.00,233.66 L63.60,231.06 L60.82,227.60 L58.65,223.45 L57.04,218.82 L55.85,213.98 L54.91,209.17 L54.02,204.61 L52.94,200.48 L51.49,196.89 L49.50,193.87 L46.87,191.39 L43.58,189.33 L39.70,187.56 L35.37,185.88 L30.80,184.12 L26.23,182.11 L21.96,179.72 L18.25,176.86 L15.33,173.52 L13.36,169.73 L12.43,165.55 L12.52,161.11 L13.53,156.54 L15.26,151.96 L17.47,147.49 L19.84,143.20 L22.08,139.13 L23.91,135.28 L25.11,131.59 L25.52,128.00 L25.11,124.41 L23.91,120.72 L22.08,116.87 L19.84,112.80 L17.47,108.51 L15.26,104.04 L13.53,99.46 L12.52,94.89 L12.43,90.45 L13.36,86.27 L15.33,82.48 L18.25,79.14 L21.96,76.28 L26.23,73.89 L30.80,71.88 L35.37,70.12 L39.70,68.44 L43.58,66.67 L46.87,64.61 L49.50,62.13 L51.49,59.11 L52.94,55.52 L54.02,51.39 L54.91,46.83 L55.85,42.02 L57.04,37.18 L58.65,32.55 L60.82,28.40 L63.60,24.94 L67.00,22.34 L70.95,20.70 L75.34,20.02 L80.01,20.22 L84.82,21.14 L89.61,22.53 L94.25,24.12 L98.64,25.62 L102.76,26.76 L106.59,27.29 L110.20,27.08 L113.67,26.04 L117.09,24.23 L120.57,21.76 L124.19,18.84 L128.00,15.76 L132.02,12.81 L136.23,10.31 L140.56,8.52 L144.91,7.66 L149.19,7.85 L153.27,9.13 L157.06,11.43 L160.52,14.59 L163.62,18.39 L166.39,22.53 L168.92,26.73 L171.32,30.70 L173.74,34.22 L176.34,37.09 L179.24,39.25 L182.56,40.69 L186.35,41.49 L190.60,41.84 L195.25,41.93 L200.15,42.02 L205.12,42.35 L209.95,43.13 L214.42,44.55 L218.31,46.69 L221.46,49.58 L223.76,53.18 L225.19,57.39 L225.81,62.03 L225.74,66.92 L225.20,71.88 L224.44,76.72 L223.72,81.31 L223.32,85.56 L223.46,89.43 L224.30,92.95 L225.92,96.18 L228.30,99.24 L231.34,102.23 L234.84,105.29 L238.53,108.51 L242.13,111.96 L245.33,115.67 L247.84,119.62 L249.45,123.76 L250.00,128.00Z" fill="url(#g)"/>
|
||||
<g transform="translate(56,200) scale(0.15)"><path fill="#3a2360" d="M286.5-163.5Q243-207 243-270t43.5-106.5Q330-420 393-420q28 0 50.5 8t39.5 22v-420q0-13 8.5-21.5T513-840h174q13 0 21.5 8.5T717-810v75q0 13-8.5 21.5T687-705H543v435q0 63-43.5 106.5T393-120q-63 0-106.5-43.5Z"/></g>
|
||||
<g transform="translate(56,200) scale(0.15)"><path fill="#3c101d" d="M286.5-163.5Q243-207 243-270t43.5-106.5Q330-420 393-420q28 0 50.5 8t39.5 22v-420q0-13 8.5-21.5T513-840h174q13 0 21.5 8.5T717-810v75q0 13-8.5 21.5T687-705H543v435q0 63-43.5 106.5T393-120q-63 0-106.5-43.5Z"/></g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
33
packaging/nix/default.nix
Normal file
33
packaging/nix/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Mulberry for Nix, from the release tar.gz. Written by tools/package.sh (version and hash); edit the header there.
|
||||
# nix build .#default or nix profile install . (from the repo), or callPackage this file.
|
||||
{ lib, stdenv, fetchurl, autoPatchelfHook, makeWrapper, libGL, wayland, libxkbcommon, xorg, fontconfig, dbus, mpv-unwrapped }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "mulberry";
|
||||
version = "2.0.4";
|
||||
src = fetchurl {
|
||||
url = "https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry/releases/download/v${version}/Mulberry-${version}-Linux-x86_64.tar.gz";
|
||||
hash = "sha256-h9qyUeI1k0V60+OyuMp5A/ea84W4BdJ27CnnAXheXl8=";
|
||||
};
|
||||
nativeBuildInputs = [ autoPatchelfHook makeWrapper ];
|
||||
buildInputs = [ mpv-unwrapped stdenv.cc.cc.lib ];
|
||||
# Loaded with dlopen at run time, so autoPatchelf can't see them.
|
||||
runtimeDependencies = [ libGL wayland libxkbcommon xorg.libX11 xorg.libXcursor xorg.libXi xorg.libXrandr fontconfig dbus ];
|
||||
dontBuild = true;
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out
|
||||
for d in bin lib share; do [ ! -d $d ] || cp -R $d $out/; done
|
||||
install -Dm644 README.md $out/share/doc/mulberry/README.md
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Material You music player";
|
||||
homepage = "https://archlinux.tail7c4f5e.ts.net/git/astar76/Mulberry";
|
||||
license = lib.licenses.mit;
|
||||
platforms = [ "x86_64-linux" ];
|
||||
mainProgram = "mulberry";
|
||||
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
|
||||
};
|
||||
}
|
||||
|
|
@ -600,7 +600,7 @@ pub struct Resolved {
|
|||
|
||||
/// Use yt-dlp to get a playable audio URL.
|
||||
pub fn resolve_stream(url: &str) -> Res<Resolved> {
|
||||
let out = std::process::Command::new("yt-dlp")
|
||||
let out = crate::util::command("yt-dlp")
|
||||
.args(["-J", "--no-playlist", "--no-warnings", "-f", "bestaudio[acodec!=none]/bestaudio/best", "--socket-timeout", "15", url])
|
||||
.stdin(std::process::Stdio::null())
|
||||
.output()
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ impl Spectrum {
|
|||
return;
|
||||
};
|
||||
self.need_live = false;
|
||||
let mut cmd = Command::new("ffmpeg");
|
||||
let mut cmd = crate::util::command("ffmpeg");
|
||||
cmd.args(["-v", "quiet", "-nostdin", "-i", path, "-vn", "-ac", "1", "-ar", &TRACK_RATE.to_string(), "-f", "f32le", "-"])
|
||||
.stdout(Stdio::piped())
|
||||
.stderr(Stdio::null())
|
||||
|
|
|
|||
21
src/util.rs
21
src/util.rs
|
|
@ -11,7 +11,9 @@ pub fn format_local(ts: i64, fmt: &str) -> String {
|
|||
|
||||
/// Open a path or URL with the desktop's default handler.
|
||||
pub fn open_url(url: &str) {
|
||||
let _ = std::process::Command::new("xdg-open")
|
||||
// Explorer opens folders, files and web addresses with their default handler on Windows.
|
||||
let opener = if cfg!(windows) { "explorer" } else { "xdg-open" };
|
||||
let _ = std::process::Command::new(opener)
|
||||
.arg(url)
|
||||
.stdin(std::process::Stdio::null())
|
||||
.stdout(std::process::Stdio::null())
|
||||
|
|
@ -24,6 +26,10 @@ pub fn show_in_file_manager(path: &str) {
|
|||
if !std::path::Path::new(path).exists() {
|
||||
return;
|
||||
}
|
||||
if cfg!(windows) {
|
||||
let _ = std::process::Command::new("explorer").arg(format!("/select,{path}")).spawn();
|
||||
return;
|
||||
}
|
||||
let uri = format!("file://{}", urlencoding::encode(path).replace("%2F", "/"));
|
||||
let ok = std::process::Command::new("dbus-send")
|
||||
.args([
|
||||
|
|
@ -136,3 +142,16 @@ pub fn clipboard_files() -> Vec<String> {
|
|||
.map(|p| crate::song::percent_decode(p))
|
||||
.collect()
|
||||
}
|
||||
|
||||
/// A command for a console tool (yt-dlp, ffmpeg) that opens no console window on Windows.
|
||||
pub fn command(program: impl AsRef<std::ffi::OsStr>) -> std::process::Command {
|
||||
#[allow(unused_mut)]
|
||||
let mut cmd = std::process::Command::new(program);
|
||||
#[cfg(windows)]
|
||||
{
|
||||
use std::os::windows::process::CommandExt;
|
||||
const CREATE_NO_WINDOW: u32 = 0x0800_0000;
|
||||
cmd.creation_flags(CREATE_NO_WINDOW);
|
||||
}
|
||||
cmd
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue