From 6e4d55670d251bb53d82169468d40bdad799f714 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Mon, 11 Mar 2024 15:34:33 +0300 Subject: [PATCH 1/7] Update electron to 29 --- .github/workflows/build.yml | 2 +- PKGBUILD | 4 ++-- templates/PKGBUILD | 4 ++-- utility/update_version.py | 2 +- utility/version_info.json | 8 ++++---- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e286be9..de8be1a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,7 +22,7 @@ jobs: image: archlinux:latest steps: - name: Install packages - run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron27 libpulse dpkg unzip xdg-utils python rpm-tools + run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron29 libpulse dpkg unzip xdg-utils python rpm-tools - name: Checkout uses: actions/checkout@v4 with: diff --git a/PKGBUILD b/PKGBUILD index f7d4d09..b764805 100644 --- a/PKGBUILD +++ b/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=("electron29" "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") @@ -33,6 +33,6 @@ package() { # 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" + echo 'exec electron29 /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music" chmod 755 "$pkgdir/usr/bin/yandex-music" } diff --git a/templates/PKGBUILD b/templates/PKGBUILD index c536739..d90001a 100644 --- a/templates/PKGBUILD +++ b/templates/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=("electron29" "libpulse" "xdg-utils") makedepends=("p7zip" "nodejs" "asar" "jq" "python") source=("%exe_link%" "git+https://github.com/cucumber-sp/yandex-music-linux") @@ -33,6 +33,6 @@ package() { # 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" + echo 'exec electron29 /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music" chmod 755 "$pkgdir/usr/bin/yandex-music" } diff --git a/utility/update_version.py b/utility/update_version.py index 9047284..4148cbb 100644 --- a/utility/update_version.py +++ b/utility/update_version.py @@ -46,7 +46,7 @@ print(f"Sha256: {exe_sha256}") print("Getting latest electron version") electron_releases = requests.get(ELECTRON_VERSIONS_URL).json() electron_versions = list(map(lambda x: x["version"], electron_releases)) -electron_versions = list(filter(lambda x: "-" not in x and x.startswith("27"), electron_versions)) +electron_versions = list(filter(lambda x: "-" not in x and x.startswith("29"), electron_versions)) electron_version = electron_versions[0] print(f"Latest electron version: {electron_version}") electron_x64 = ELECTRON_DOWNLOAD_URL.format(electron_version, "x64") diff --git a/utility/version_info.json b/utility/version_info.json index c7d3413..aadbd85 100644 --- a/utility/version_info.json +++ b/utility/version_info.json @@ -6,9 +6,9 @@ "exe_sha256": "c10c6c4b5d596f9bf490a231d7c13bbd2627109f71c9c57aa4e2b034e31252f4" }, "electron": { - "version": "27.3.5", - "x64": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-x64.zip", - "armv7l": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-armv7l.zip", - "arm64": "https://github.com/electron/electron/releases/download/v27.3.5/electron-v27.3.5-linux-arm64.zip" + "version": "29.1.1", + "x64": "https://github.com/electron/electron/releases/download/v29.1.1/electron-v29.1.1-linux-x64.zip", + "armv7l": "https://github.com/electron/electron/releases/download/v29.1.1/electron-v29.1.1-linux-armv7l.zip", + "arm64": "https://github.com/electron/electron/releases/download/v29.1.1/electron-v29.1.1-linux-arm64.zip" } } \ No newline at end of file From 363c6e8b71c30b7359204538fb422e561d4250de Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Mon, 11 Mar 2024 17:48:13 +0300 Subject: [PATCH 2/7] Cleanup CI file --- .github/workflows/retrieve_version.sh | 13 --- .github/workflows/update-build-release.yml | 114 ++++++++++++--------- 2 files changed, 63 insertions(+), 64 deletions(-) delete mode 100644 .github/workflows/retrieve_version.sh diff --git a/.github/workflows/retrieve_version.sh b/.github/workflows/retrieve_version.sh deleted file mode 100644 index 68a6138..0000000 --- a/.github/workflows/retrieve_version.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -# get version -VERSION=$(jq -r '.ym.version' ./utility/version_info.json) -release_name="Beta $VERSION" -tag_name="v$VERSION" - -#write variables to github env -echo "VERSION=$VERSION" >> $GITHUB_ENV -echo "release_name=$release_name" >> $GITHUB_ENV -echo "tag_name=$tag_name" >> $GITHUB_ENV \ No newline at end of file diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index 3049edf..016d590 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -15,36 +15,67 @@ jobs: container: image: archlinux:latest steps: - - name: Packages install - run: pacman -Syy --noconfirm && pacman -S --noconfirm git jq nix python python-requests + + - name: Install dependencies + run: pacman -Syy --noconfirm && pacman -S --noconfirm git jq nix python python-requests - name: Checkout uses: actions/checkout@v4 - - - name: Fix git access - run: - git config --global --add safe.directory "*" - - - name: Update version file - run: python utility/update_version.py + + - name: Git Access Fix + run: git config --global --add safe.directory "*" - name: Update package files - run: python utility/generate_packages.py - - - name: Retrieve version to make commit - run: bash .github/workflows/retrieve_version.sh + run: python utility/update_version.py + python utility/generate_packages.py - name: Commit and push changes uses: EndBug/add-and-commit@v9.1.4 - id: commit + id: commit with: - message: "Update packages to ${{ env.release_name }}" + message: Update packages add: "." - author_name: "GitHub Actions" - author_email: "loraner123@gmail.com" + author_name: GitHub Actions + author_email: loraner123@gmail.com" + + - name: Get Version + id: version + run: VERSION=$(jq -r '.ym.version' ./utility/version_info.json) + release_name="Beta $VERSION" + tag_name="v$VERSION" + echo "VERSION=$VERSION" >> $GITHUB_OUTPUT + echo "release_name=$release_name" >> $GITHUB_OUTPUT + echo "tag_name=$tag_name" >> $GITHUB_OUTPUT + + outputs: + commited: ${{ steps.commit.outputs.commited || github.event.head_commit }} + commit_long_sha: ${{ steps.commit.outputs.commit_long_sha || github.event.head_commit.id}} + commit_name: ${{ github.event.head_commit.message || 'Update packages' }} + tag_name: ${{ steps.version.outputs.tag_name }} + release_name: ${{ steps.version.outputs.release_name }} + version: ${{ steps.version.outputs.VERSION }} + + + build: + needs: [update_packages] + uses: ./.github/workflows/build.yml + if: ${{ needs.update_packages.outputs.commited }} + with: + ref: ${{ needs.update_packages.outputs.commit_long_sha }} + + + upload-release: + needs: [build, update_packages] + if: ${{ needs.update_packages.outputs.commited }} + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: ${{ needs.update_packages.outputs.commit_long_sha }} - name: Publish package changes to AUR - if: "${{ github.event.commits[0] || steps.commit.outputs.commited }}" + if: "${{ needs.update_packages.outputs.commited && github.ref_name == 'main' }}" uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 with: pkgname: "yandex-music" @@ -54,60 +85,41 @@ jobs: commit_username: "cucumber-sp" commit_email: "loraner123@gmail.com" ssh_private_key: "${{ secrets.AUR_SSH_PRIVATE_KEY }}" - commit_message: "${{ github.event.commits[0].message || env.release_name }}" + commit_message: "${{ needs.update_packages.outputs.commit_name }}" ssh_keyscan_types: "rsa,dsa,ecdsa,ed25519" - - outputs: - new_version: ${{ steps.commit.outputs.commited }} - commit_long_sha: ${{ steps.commit.outputs.commit_long_sha }} - build: - needs: update_packages - uses: ./.github/workflows/build.yml - with: - ref: ${{ (needs.update_packages.outputs.commit_long_sha || '') }} - - upload-release: - needs: [build, update_packages] - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: ${{ (needs.update_packages.outputs.commit_long_sha || '') }} - - - name: Download artifact - uses: actions/download-artifact@v4 + - name: Download artifact + uses: actions/download-artifact@v4 with: merge-multiple: true path: dist - - name: Retrieve version - run: | - sudo apt-get update - sudo apt-get install jq - bash ./.github/workflows/retrieve_version.sh + - name: Install packages + run: sudo apt-get update -y + sudo apt-get install jq -y - name: Get Release Notes HTML - run: echo "release_html=$(jq -r --arg version "$VERSION" '.["desktop-release-notes." + $version]' ./dist/release_notes.json)" >> $GITHUB_ENV + id: release_notes + run: echo "release_html=$(jq -r --arg version "${{ needs.update_packages.outputs.version }}" '.["desktop-release-notes." + $version]' ./dist/release_notes.json)" >> $GITHUB_OUTPUT - - run: rm -rf dist/release_notes.json + - run: rm -rf dist/release_notes.json - name: Tag Repo uses: richardsimko/update-tag@v1 with: - tag_name: ${{ env.tag_name }} + tag_name: ${{ needs.update_packages.outputs.tag_name}} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload files to a GitHub release uses: ncipollo/release-action@v1.13.0 + if: ${{ github.ref_name == 'main' }} with: allowUpdates: true artifacts: dist/* makeLatest: true - name: ${{ env.release_name }} + name: ${{ needs.update_packages.outputs.release_name }} replacesArtifacts: true - tag: ${{ env.tag_name }} - body: ${{ env.release_html }} + tag: ${{ needs.update_packages.outputs.tag_name }} + body: ${{ steps.release_notes.outputs.release_html }} From 0964ca28b7bbe4de926510a37b8d1e01754afca4 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Mon, 11 Mar 2024 18:06:19 +0300 Subject: [PATCH 3/7] Outputs logging --- .github/workflows/build.yml | 3 -- .github/workflows/update-build-release.yml | 34 ++++++++++++++++------ 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de8be1a..b05bbed 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,9 +10,6 @@ on: pull_request: branches: - '*' - push: - branches: - - 'dev' jobs: diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index 016d590..0a1911f 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -7,6 +7,7 @@ on: push: branches: - 'master' + - 'dev' jobs: @@ -26,7 +27,8 @@ jobs: run: git config --global --add safe.directory "*" - name: Update package files - run: python utility/update_version.py + run: | + python utility/update_version.py python utility/generate_packages.py - name: Commit and push changes @@ -40,20 +42,33 @@ jobs: - name: Get Version id: version - run: VERSION=$(jq -r '.ym.version' ./utility/version_info.json) + run: | + VERSION=$(jq -r '.ym.version' ./utility/version_info.json) release_name="Beta $VERSION" tag_name="v$VERSION" echo "VERSION=$VERSION" >> $GITHUB_OUTPUT echo "release_name=$release_name" >> $GITHUB_OUTPUT echo "tag_name=$tag_name" >> $GITHUB_OUTPUT + + - name: Outputs + id: outputs + run: | + echo "commited=${{ steps.commit.outputs.commited || github.event.head_commit }}" >> $GITHUB_OUTPUT + echo "commit_long_sha=${{ steps.commit.outputs.commit_long_sha || github.event.head_commit.id}}" >> $GITHUB_OUTPUT + echo "commit_name=${{ github.event.head_commit.message || 'Update packages' }}" >> $GITHUB_OUTPUT + echo "tag_name=${{ steps.version.outputs.tag_name }}" >> $GITHUB_OUTPUT + echo "release_name=${{ steps.version.outputs.release_name }}" >> $GITHUB_OUTPUT + echo "VERSION=${{ steps.version.outputs.VERSION }}" >> $GITHUB_OUTPUT + cat $GITHUB_OUTPUT + outputs: - commited: ${{ steps.commit.outputs.commited || github.event.head_commit }} - commit_long_sha: ${{ steps.commit.outputs.commit_long_sha || github.event.head_commit.id}} - commit_name: ${{ github.event.head_commit.message || 'Update packages' }} - tag_name: ${{ steps.version.outputs.tag_name }} - release_name: ${{ steps.version.outputs.release_name }} - version: ${{ steps.version.outputs.VERSION }} + commited: ${{ steps.outputs.commited != '' }} + commit_long_sha: ${{ steps.outputs.commit_long_sha }} + commit_name: ${{ steps.outputs.commit_name }} + tag_name: ${{ steps.outputs.tag_name }} + release_name: ${{ steps.outputs.release_name }} + version: ${{ steps.outputs.VERSION }} build: @@ -95,7 +110,8 @@ jobs: path: dist - name: Install packages - run: sudo apt-get update -y + run: | + sudo apt-get update -y sudo apt-get install jq -y - name: Get Release Notes HTML From 1c96b3f0ab2fb0f21f59c33249869ac86ce7caad Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Mon, 11 Mar 2024 18:15:09 +0300 Subject: [PATCH 4/7] Reduce logging in console --- .github/workflows/build.yml | 2 +- .github/workflows/update-build-release.yml | 6 ++---- build_tarball.sh | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b05bbed..bca3346 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: image: archlinux:latest steps: - name: Install packages - run: pacman -Syy --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron29 libpulse dpkg unzip xdg-utils python rpm-tools + run: pacman -Syy -q --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron29 libpulse dpkg unzip xdg-utils python rpm-tools - name: Checkout uses: actions/checkout@v4 with: diff --git a/.github/workflows/update-build-release.yml b/.github/workflows/update-build-release.yml index 0a1911f..dc116e1 100644 --- a/.github/workflows/update-build-release.yml +++ b/.github/workflows/update-build-release.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Install dependencies - run: pacman -Syy --noconfirm && pacman -S --noconfirm git jq nix python python-requests + run: pacman -Syy -q --noconfirm && pacman -S -q --noconfirm git jq nix python python-requests - name: Checkout uses: actions/checkout@v4 @@ -81,7 +81,7 @@ jobs: upload-release: needs: [build, update_packages] - if: ${{ needs.update_packages.outputs.commited }} + if: ${{ needs.update_packages.outputs.commited && github.ref_name == 'main' }} runs-on: ubuntu-latest steps: - name: Checkout @@ -90,7 +90,6 @@ jobs: ref: ${{ needs.update_packages.outputs.commit_long_sha }} - name: Publish package changes to AUR - if: "${{ needs.update_packages.outputs.commited && github.ref_name == 'main' }}" uses: KSXGitHub/github-actions-deploy-aur@v2.7.0 with: pkgname: "yandex-music" @@ -129,7 +128,6 @@ jobs: - name: Upload files to a GitHub release uses: ncipollo/release-action@v1.13.0 - if: ${{ github.ref_name == 'main' }} with: allowUpdates: true artifacts: dist/* diff --git a/build_tarball.sh b/build_tarball.sh index 20a3791..58c6d3d 100644 --- a/build_tarball.sh +++ b/build_tarball.sh @@ -44,7 +44,7 @@ build_tarball(){ chmod 755 "${app_dir}/usr/bin/yandex-music" cd "${app_dir}" - tar cvfz "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" * + tar -czf "${OUTPUT_DIR}/yandex-music_${version}_${arch}.tar.gz" * cd "${INITIAL_DIR}" } From 870091c7caf22b7b734f60c45ecb4fe491ce60ee Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Tue, 12 Mar 2024 22:20:14 +0300 Subject: [PATCH 5/7] Config file support / Wayland (no nix) --- .github/workflows/build.yml | 2 +- build_tarball.sh | 6 +++--- templates/PKGBUILD | 9 +++++---- templates/default.conf | 2 ++ templates/yandex-music.sh | 28 ++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 templates/default.conf create mode 100644 templates/yandex-music.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index bca3346..bf61ced 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,7 +19,7 @@ jobs: image: archlinux:latest steps: - name: Install packages - run: pacman -Syy -q --noconfirm && pacman -S --noconfirm git sudo base-devel p7zip nodejs jq asar electron29 libpulse dpkg unzip xdg-utils python rpm-tools + run: pacman -Syy -q --noconfirm && pacman -S -q --noconfirm git sudo base-devel p7zip nodejs jq asar electron29 libpulse dpkg unzip xdg-utils python rpm-tools - name: Checkout uses: actions/checkout@v4 with: diff --git a/build_tarball.sh b/build_tarball.sh index 58c6d3d..91b70dc 100644 --- a/build_tarball.sh +++ b/build_tarball.sh @@ -36,12 +36,12 @@ build_tarball(){ install -Dm644 "${TEMPDIR}/app/favicon.svg" "${app_dir}/usr/share/icons/hicolor/scalable/apps/yandex-music.svg" 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" - echo "#!/bin/sh" > "${app_dir}/usr/bin/yandex-music" - echo 'exec /usr/lib/yandex-music/electron/electron /usr/lib/yandex-music/yandex-music.asar "$@"' >> "${app_dir}/usr/bin/yandex-music" - chmod 755 "${app_dir}/usr/bin/yandex-music" + install -Dm755 "./templates/yandex-music.sh" "${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 d90001a..c1e56e0 100644 --- a/templates/PKGBUILD +++ b/templates/PKGBUILD @@ -29,10 +29,11 @@ package() { install -Dm644 "$srcdir/app/favicon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/yandex-music.svg" 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" - # Create a script to launch the app with Electron - echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music" - echo 'exec electron29 /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music" - chmod 755 "$pkgdir/usr/bin/yandex-music" + install -Dm755 "$srcdir/yandex-music-linux/templates/yandex-music.sh" "$pkgdir/usr/bin/yandex-music" } diff --git a/templates/default.conf b/templates/default.conf new file mode 100644 index 0000000..522dd2a --- /dev/null +++ b/templates/default.conf @@ -0,0 +1,2 @@ +ELECTRON_BIN=%electron_path% +ELECTRON_ARGS="--no-sandbox" \ No newline at end of file diff --git a/templates/yandex-music.sh b/templates/yandex-music.sh new file mode 100644 index 0000000..b85d6a7 --- /dev/null +++ b/templates/yandex-music.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +set -e + +CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" +CONFIG_FILE="${YANDEX_MUSIC_CONFIG:-$CONFIG_HOME/yandex-music.conf}" + +echo "Using config file: ${CONFIG_FILE}" + +if [ ! -f "$CONFIG_FILE" ]; then + echo "Config file not found, copying default" + mkdir -p "$(dirname "$CONFIG_FILE")" + cp /usr/lib/yandex-music/default.conf "$CONFIG_FILE" +fi + +source "$CONFIG_FILE" + +WAYLAND_FLAGS="" +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 + +exec "${ELECTRON_BIN}" "${ELECTRON_ARGS}" "${WAYLAND_FLAGS}" /usr/lib/yandex-music/app.asar \ No newline at end of file From f4e5952bbeb84cbcd1d460b77077f79a4a75e2e2 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 12 Mar 2024 19:33:47 +0000 Subject: [PATCH 6/7] Update packages --- PKGBUILD | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PKGBUILD b/PKGBUILD index b764805..d14b988 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -29,10 +29,11 @@ package() { install -Dm644 "$srcdir/app/favicon.svg" "$pkgdir/usr/share/icons/hicolor/scalable/apps/yandex-music.svg" 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" - # Create a script to launch the app with Electron - echo "#!/bin/sh" > "$pkgdir/usr/bin/yandex-music" - echo 'exec electron29 /usr/lib/yandex-music/yandex-music.asar "$@"' >> "$pkgdir/usr/bin/yandex-music" - chmod 755 "$pkgdir/usr/bin/yandex-music" + install -Dm755 "$srcdir/yandex-music-linux/templates/yandex-music.sh" "$pkgdir/usr/bin/yandex-music" } From ae59e6afde1d481c8c15699e554770198478cd43 Mon Sep 17 00:00:00 2001 From: Andrey Onishchenko Date: Thu, 14 Mar 2024 14:00:22 +0300 Subject: [PATCH 7/7] Fix bin file --- templates/yandex-music.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/yandex-music.sh b/templates/yandex-music.sh index b85d6a7..1a1ac59 100644 --- a/templates/yandex-music.sh +++ b/templates/yandex-music.sh @@ -25,4 +25,4 @@ if [ -z "$ELECTRON_BIN" ]; then exit 1 fi -exec "${ELECTRON_BIN}" "${ELECTRON_ARGS}" "${WAYLAND_FLAGS}" /usr/lib/yandex-music/app.asar \ No newline at end of file +exec "${ELECTRON_BIN}" /usr/lib/yandex-music/yandex-music.asar "${ELECTRON_ARGS}" "${WAYLAND_FLAGS}" \ No newline at end of file