From 2cfc38757a6941e8da78de501e937181512f694c Mon Sep 17 00:00:00 2001 From: JellyBrick Date: Thu, 10 Jul 2025 13:57:27 +0900 Subject: [PATCH] feat: isolate electron-builder configuration --- .gitignore | 1 - electron-builder.yml | 125 ++++++++++++++++++++++++++++++ package.json | 178 ------------------------------------------- 3 files changed, 125 insertions(+), 179 deletions(-) create mode 100644 electron-builder.yml diff --git a/.gitignore b/.gitignore index f5fb3ed5..7958e968 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules /dist /pack -electron-builder.yml .vscode/settings.json .idea diff --git a/electron-builder.yml b/electron-builder.yml new file mode 100644 index 00000000..16302fb1 --- /dev/null +++ b/electron-builder.yml @@ -0,0 +1,125 @@ +appId: com.github.th-ch.youtube-music +productName: YouTube Music +files: + - '!*' + - dist + - assets + - license + - '!node_modules' + - 'node_modules/custom-electron-prompt/**' + - 'node_modules/@ghostery/adblocker-electron-preload/**' + - 'node_modules/@ffmpeg.wasm/core-mt/**' + - '!node_modules/**/*.map' + - '!node_modules/**/*.ts' +asarUnpack: + - assets +mac: + identity: null + target: + - target: dmg + arch: + - x64 + - arm64 + icon: assets/generated/icons/mac/icon.icns + compression: maximum +win: + icon: assets/generated/icons/win/icon.ico + target: + - target: nsis-web + arch: + - x64 + - ia32 + - arm64 + - target: portable + arch: + - x64 + - ia32 + - arm64 + compression: maximum +nsisWeb: + runAfterFinish: false +linux: + icon: assets/generated/icons/png + category: AudioVideo + desktop: + entry: + StartupWMClass: com.github.th_ch.youtube_music + target: + - target: AppImage + arch: + - x64 + - arm64 + - armv7l + - target: flatpak + arch: + - x64 + - target: deb + arch: + - x64 + - arm64 + - armv7l + - target: rpm + arch: + - x64 + - arm64 + - target: snap + arch: + - x64 + - target: freebsd + arch: + - x64 + - arm64 + - armv7l + - target: tar.gz + arch: + - x64 + - arm64 + - armv7l +appImage: + description: >- + YouTube Music Desktop App bundled with custom plugins (and built-in ad + blocker / downloader) + category: AudioVideo +flatpak: + description: >- + YouTube Music Desktop App bundled with custom plugins (and built-in ad + blocker / downloader) + category: AudioVideo + runtimeVersion: '24.08' + baseVersion: '24.08' + finishArgs: + - '--socket=wayland' + - '--socket=x11' + - '--share=ipc' + - '--device=dri' + - '--socket=pulseaudio' + - '--share=network' + - '--filesystem=xdg-music:rw' + - '--talk-name=org.freedesktop.Notifications' + - '--talk-name=org.gnome.SessionManager' + - '--talk-name=org.kde.StatusNotifierWatcher' + - '--own-name=org.mpris.MediaPlayer2.YoutubeMusic.*' +deb: + depends: + - libgtk-3-0 + - libnotify4 + - libnss3 + - libxss1 + - libxtst6 + - xdg-utils + - libatspi2.0-0 + - libuuid1 + - libasound2 + - libgbm1 +rpm: + depends: + - /usr/lib64/libuuid.so.1 + fpm: + - '--rpm-rpmbuild-define' + - _build_id_links none +snap: + slots: + - mpris: + interface: mpris +directories: + output: ./pack/ diff --git a/package.json b/package.json index bfe98f37..5b2911a8 100644 --- a/package.json +++ b/package.json @@ -13,184 +13,6 @@ "email": "th-ch@users.noreply.github.com", "url": "https://github.com/th-ch/youtube-music" }, - "build": { - "appId": "com.github.th-ch.youtube-music", - "productName": "YouTube Music", - "files": [ - "!*", - "dist", - "assets", - "license", - "!node_modules", - "node_modules/custom-electron-prompt/**", - "node_modules/@ghostery/adblocker-electron-preload/**", - "node_modules/@ffmpeg.wasm/core-mt/**", - "!node_modules/**/*.map", - "!node_modules/**/*.ts" - ], - "asarUnpack": [ - "assets" - ], - "mac": { - "identity": null, - "target": [ - { - "target": "dmg", - "arch": [ - "x64", - "arm64" - ] - } - ], - "icon": "assets/generated/icons/mac/icon.icns", - "compression": "maximum" - }, - "win": { - "icon": "assets/generated/icons/win/icon.ico", - "target": [ - { - "target": "nsis-web", - "arch": [ - "x64", - "ia32", - "arm64" - ] - }, - { - "target": "portable", - "arch": [ - "x64", - "ia32", - "arm64" - ] - } - ], - "compression": "maximum" - }, - "nsisWeb": { - "runAfterFinish": false - }, - "linux": { - "icon": "assets/generated/icons/png", - "category": "AudioVideo", - "desktop": { - "entry": { - "StartupWMClass": "com.github.th_ch.youtube_music" - } - }, - "target": [ - { - "target": "AppImage", - "arch": [ - "x64", - "arm64", - "armv7l" - ] - }, - { - "target": "flatpak", - "arch": [ - "x64" - ] - }, - { - "target": "deb", - "arch": [ - "x64", - "arm64", - "armv7l" - ] - }, - { - "target": "rpm", - "arch": [ - "x64", - "arm64" - ] - }, - { - "target": "snap", - "arch": [ - "x64" - ] - }, - { - "target": "freebsd", - "arch": [ - "x64", - "arm64", - "armv7l" - ] - }, - { - "target": "tar.gz", - "arch": [ - "x64", - "arm64", - "armv7l" - ] - } - ] - }, - "appImage": { - "description": "YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)", - "category": "AudioVideo" - }, - "flatpak": { - "description": "YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)", - "category": "AudioVideo", - "runtimeVersion": "24.08", - "baseVersion": "24.08", - "finishArgs": [ - "--socket=wayland", - "--socket=x11", - "--share=ipc", - "--device=dri", - "--socket=pulseaudio", - "--share=network", - "--filesystem=xdg-music:rw", - "--talk-name=org.freedesktop.Notifications", - "--talk-name=org.gnome.SessionManager", - "--talk-name=org.kde.StatusNotifierWatcher", - "--own-name=org.mpris.MediaPlayer2.YoutubeMusic.*" - ] - }, - "deb": { - "depends": [ - "libgtk-3-0", - "libnotify4", - "libnss3", - "libxss1", - "libxtst6", - "xdg-utils", - "libatspi2.0-0", - "libuuid1", - "libasound2", - "libgbm1" - ] - }, - "rpm": { - "depends": [ - "/usr/lib64/libuuid.so.1" - ], - "fpm": [ - "--rpm-rpmbuild-define", - "_build_id_links none" - ] - }, - "snap": { - "slots": [ - { - "mpris": { - "interface": "mpris" - } - } - ] - }, - "directories": { - "output": "./pack/" - } - }, "scripts": { "test": "playwright test", "test:debug": "cross-env DEBUG=pw:*,-pw:test:protocol playwright test",