diff --git a/build_tarball.sh b/build_tarball.sh index 91b70dc..2ef0874 100644 --- a/build_tarball.sh +++ b/build_tarball.sh @@ -37,11 +37,11 @@ build_tarball(){ install -Dm644 "./templates/desktop" "${app_dir}/usr/share/applications/yandex-music.desktop" install -Dm644 "./templates/default.conf" "${app_dir}/usr/lib/yandex-music/default.conf" - sed -i "s|%electron_path%|/usr/lib/yandex-music/electron/electron|g" "${app_dir}/usr/lib/yandex-music/default.conf" install -Dm644 "./LICENSE.md" "${app_dir}/usr/share/licenses/yandex-music/LICENSE" mv "${TEMPDIR}/electron-${arch}/" "${app_dir}/usr/lib/yandex-music/electron" install -Dm755 "./templates/yandex-music.sh" "${app_dir}/usr/bin/yandex-music" + sed -i "s|%electron_path%|/usr/lib/yandex-music/electron/electron|g" "${app_dir}/usr/bin/yandex-music" cd "${app_dir}" tar -czf "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" * diff --git a/templates/PKGBUILD b/templates/PKGBUILD index c1e56e0..4b1b549 100644 --- a/templates/PKGBUILD +++ b/templates/PKGBUILD @@ -31,9 +31,9 @@ package() { install -Dm644 "$srcdir/yandex-music-linux/templates/desktop" "$pkgdir/usr/share/applications/yandex-music.desktop" install -Dm644 "$srcdir/yandex-music-linux/templates/default.conf" "$pkgdir/usr/lib/yandex-music/default.conf" - sed -i "s|%electron_path%|/usr/bin/electron29|g" "$pkgdir/usr/lib/yandex-music/default.conf" install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" install -Dm755 "$srcdir/yandex-music-linux/templates/yandex-music.sh" "$pkgdir/usr/bin/yandex-music" + sed -i "s|%electron_path%|/usr/bin/electron29|g" "$pkgdir/usr/bin/yandex-music" } diff --git a/templates/default.conf b/templates/default.conf index 522dd2a..cfaeac5 100644 --- a/templates/default.conf +++ b/templates/default.conf @@ -1,2 +1,2 @@ -ELECTRON_BIN=%electron_path% +ELECTRON_CUSTOM_BIN= ELECTRON_ARGS="--no-sandbox" \ No newline at end of file diff --git a/templates/yandex-music.sh b/templates/yandex-music.sh index 1a1ac59..4098ac6 100644 --- a/templates/yandex-music.sh +++ b/templates/yandex-music.sh @@ -20,9 +20,6 @@ if [ "$XDG_SESSION_TYPE" == "wayland" ]; then WAYLAND_FLAGS="--enable-features=UseOzonePlatform --ozone-platform=wayland" fi -if [ -z "$ELECTRON_BIN" ]; then - echo "ELECTRON_BIN is not set" - exit 1 -fi +ELECTRON_BIN=${ELECTRON_CUSTOM_BIN:-%electron_path%} exec "${ELECTRON_BIN}" /usr/lib/yandex-music/yandex-music.asar "${ELECTRON_ARGS}" "${WAYLAND_FLAGS}" \ No newline at end of file