mirror of
https://github.com/cucumber-sp/yandex-music-linux.git
synced 2025-07-02 09:43:44 +03:00
Wayland support
This commit is contained in:
parent
51a06feb51
commit
285cf4c07b
13
PKGBUILD
13
PKGBUILD
@ -7,7 +7,7 @@ pkgdesc="Yandex Music - Personal recommendations, selections for any occasion an
|
||||
arch=("any")
|
||||
url="https://github.com/cucumber-sp/yandex-music-linux"
|
||||
license=("custom")
|
||||
depends=("electron27" "libpulse" "xdg-utils")
|
||||
depends=("electron28" "libpulse" "xdg-utils")
|
||||
makedepends=("p7zip" "nodejs" "asar" "jq" "python")
|
||||
|
||||
source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.0.14.exe" "git+https://github.com/cucumber-sp/yandex-music-linux")
|
||||
@ -31,8 +31,11 @@ package() {
|
||||
install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop"
|
||||
install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
||||
|
||||
# Create a script to launch the app with Electron
|
||||
echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music"
|
||||
echo 'exec electron27 /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music"
|
||||
chmod 755 "$pkgdir/usr/bin/yandex-music"
|
||||
touch electron-path
|
||||
install -Dm644 electron-path "$pkgdir/usr/lib/yandex-music/electron-path"
|
||||
echo '/usr/bin/electron28' >> "$pkgdir/usr/lib/yandex-music/electron-path"
|
||||
|
||||
# Launcher
|
||||
install -Dm755 "$srcdir/yandex-music-linux/templates/${pkgname}.sh" "$pkgdir/usr/bin/${pkgname}"
|
||||
}
|
||||
|
||||
|
10
templates/yandex-music.sh
Executable file
10
templates/yandex-music.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
ELECTRON_PATH=$(tr '\n' ' ' < /usr/lib/yandex-music/electron-path)
|
||||
|
||||
if [ "$XDG_SESSION_TYPE" == "wayland" ]; then
|
||||
WAYLAND_FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
fi
|
||||
|
||||
# Launch
|
||||
exec ${ELECTRON_PATH} /usr/lib/yandex-music/yandex-music.asar ${WAYLAND_FLAGS} "$@"
|
Loading…
Reference in New Issue
Block a user