0
0
mirror of https://github.com/cucumber-sp/yandex-music-linux.git synced 2024-12-23 22:22:59 +03:00

Upgrade to electron 32: Merge pull request #112 from cucumber-sp/dev

This commit is contained in:
Andrey Onischenko 2024-09-24 02:07:05 +03:00 committed by GitHub
commit 88a798d2c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 28 additions and 12 deletions

View File

@ -7,7 +7,7 @@ pkgdesc="Yandex Music - Personal recommendations, selections for any occasion an
arch=("any") arch=("any")
url="https://github.com/cucumber-sp/yandex-music-linux" url="https://github.com/cucumber-sp/yandex-music-linux"
license=("Unlicense") license=("Unlicense")
depends=("electron29" "libpulse" "xdg-utils" "bash" "hicolor-icon-theme") depends=("electron32" "libpulse" "xdg-utils" "bash" "hicolor-icon-theme")
makedepends=("p7zip" "nodejs" "asar" "jq" "python" "git") makedepends=("p7zip" "nodejs" "asar" "jq" "python" "git")
source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.18.2.exe" "git+${url}#tag=v${pkgver}") source=("https://music-desktop-application.s3.yandex.net/stable/Yandex_Music_x64_5.18.2.exe" "git+${url}#tag=v${pkgver}")
@ -35,6 +35,6 @@ package() {
install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 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" 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" sed -i "s|%electron_path%|/usr/bin/electron32|g" "$pkgdir/usr/bin/yandex-music"
sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "$pkgdir/usr/bin/yandex-music" sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "$pkgdir/usr/bin/yandex-music"
} }

View File

@ -1,14 +1,15 @@
diff --git a/main/config.js b/main/config.js diff --git a/main/config.js b/main/config.js
--- a/main/config.js --- a/main/config.js
+++ b/main/config.js +++ b/main/config.js
@@ -5,8 +5,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) { @@ -4,9 +4,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__esModule", { value: true });
exports.applyCommonConfig = exports.config = void 0; exports.applyCommonConfig = exports.config = void 0;
const package_json_1 = __importDefault(require("../package.json"));
+const devTools = process.env.DEV_TOOLS && process.env.DEV_TOOLS > 0; +const devTools = process.env.DEV_TOOLS && process.env.DEV_TOOLS > 0;
const package_json_1 = __importDefault(require("../package.json"));
exports.config = { exports.config = {
- enableDevTools: false, - enableDevTools: false,
+ enableDevTools: devTools, + enableDevTools: devTools,
enableWebSecurity: true, enableWebSecurity: true,
enableAutoUpdate: true, enableAutoUpdate: true,
bypassCSP: false, enableUpdateByProbability: false,

View File

@ -0,0 +1,14 @@
diff --git a/main/index.js b/main/index.js
--- a/main/index.js
+++ b/main/index.js
@@ -50,9 +50,7 @@ Logger_js_1.Logger.setupLogger();
const trayEnabled = process.env.TRAY_ENABLED && process.env.TRAY_ENABLED > 0;
if (trayEnabled){createTray(window);}
await (0, loadURL_js_1.loadURL)(window);
- if (node_os_1.default.platform() === platform_js_1.Platform.WINDOWS) {
- (0, customTitleBar_js_1.createCustomTitleBar)(window);
- }
+ (0, customTitleBar_js_1.createCustomTitleBar)(window);
if (config_js_1.config.enableAutoUpdate) {
updater.start();
updater.onUpdate((version) => {

View File

@ -73,6 +73,7 @@ find "./" -type f \( -name "*.js" -o -name "*.js.map" \) -print0 | while IFS= re
# Use 'sed' to perform the replacement in-place # Use 'sed' to perform the replacement in-place
sed -i "s/a.t.WINDOWS/a.t.LINUX/g" "$file" sed -i "s/a.t.WINDOWS/a.t.LINUX/g" "$file"
sed -i "s/B.LINUX/B.WINDOWS/g" "$file" sed -i "s/B.LINUX/B.WINDOWS/g" "$file"
sed -i "s/t4T.WINDOWS/t4T.LINUX/g" "$file"
done done
echo "OS spoofed" echo "OS spoofed"

View File

@ -7,7 +7,7 @@ pkgdesc="Yandex Music - Personal recommendations, selections for any occasion an
arch=("any") arch=("any")
url="https://github.com/cucumber-sp/yandex-music-linux" url="https://github.com/cucumber-sp/yandex-music-linux"
license=("Unlicense") license=("Unlicense")
depends=("electron29" "libpulse" "xdg-utils" "bash" "hicolor-icon-theme") depends=("electron32" "libpulse" "xdg-utils" "bash" "hicolor-icon-theme")
makedepends=("p7zip" "nodejs" "asar" "jq" "python" "git") makedepends=("p7zip" "nodejs" "asar" "jq" "python" "git")
source=("%exe_link%" "git+${url}#tag=v${pkgver}") source=("%exe_link%" "git+${url}#tag=v${pkgver}")
@ -35,6 +35,6 @@ package() {
install -Dm644 "$srcdir/yandex-music-linux/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" 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" 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" sed -i "s|%electron_path%|/usr/bin/electron32|g" "$pkgdir/usr/bin/yandex-music"
sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "$pkgdir/usr/bin/yandex-music" sed -i "s|%asar_path%|/usr/lib/yandex-music/yandex-music.asar|g" "$pkgdir/usr/bin/yandex-music"
} }

View File

@ -51,7 +51,7 @@ print(f"Sha256: {exe_sha256}")
print("Getting latest electron version") print("Getting latest electron version")
electron_releases = requests.get(ELECTRON_VERSIONS_URL).json() electron_releases = requests.get(ELECTRON_VERSIONS_URL).json()
electron_versions = list(map(lambda x: x["version"], electron_releases)) electron_versions = list(map(lambda x: x["version"], electron_releases))
electron_versions = list(filter(lambda x: "-" not in x and x.startswith("29"), electron_versions)) electron_versions = list(filter(lambda x: "-" not in x and x.startswith("32"), electron_versions))
electron_version = electron_versions[0] electron_version = electron_versions[0]
print(f"Latest electron version: {electron_version}") print(f"Latest electron version: {electron_version}")
electron_x64 = ELECTRON_DOWNLOAD_URL.format(electron_version, "x64") electron_x64 = ELECTRON_DOWNLOAD_URL.format(electron_version, "x64")

View File

@ -6,9 +6,9 @@
"exe_sha256": "a513eb6aa4bd05bae8503f5578a8e91d778794ffe4eb3a450040903570106941" "exe_sha256": "a513eb6aa4bd05bae8503f5578a8e91d778794ffe4eb3a450040903570106941"
}, },
"electron": { "electron": {
"version": "29.4.6", "version": "32.1.2",
"x64": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-x64.zip", "x64": "https://github.com/electron/electron/releases/download/v32.1.2/electron-v32.1.2-linux-x64.zip",
"armv7l": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-armv7l.zip", "armv7l": "https://github.com/electron/electron/releases/download/v32.1.2/electron-v32.1.2-linux-armv7l.zip",
"arm64": "https://github.com/electron/electron/releases/download/v29.4.6/electron-v29.4.6-linux-arm64.zip" "arm64": "https://github.com/electron/electron/releases/download/v32.1.2/electron-v32.1.2-linux-arm64.zip"
} }
} }