forked from siphomateke/deezer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from ressonix/siphomateke-mpris
Updates
- Loading branch information
Showing
9 changed files
with
103 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Deezer Desktop sources | ||
locales/ | ||
resources/ | ||
npm_temp/ | ||
*.pak | ||
*.exe | ||
*.dll | ||
*.dat | ||
*.bin | ||
*.7z | ||
LICENSE.electron.txt | ||
vk_swiftshader_icd.json | ||
LICENSES.chromium.html |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
#!/bin/sh | ||
export DZ_DISABLE_UPDATE="yes" | ||
exec electron /usr/share/deezer/app.asar "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
|
||
# Maintainer: Michael Kinder <[email protected]> | ||
pkgname="deezer" | ||
pkgver=4.32.20 | ||
pkgver=5.30.70 | ||
srcdir="$PWD" | ||
|
||
install_dependencies() { | ||
sudo eopkg -y install p7zip imagemagick nodejs wget patch | ||
sudo npm install -g electron@^6 --unsafe-perm=true | ||
sudo eopkg -y install p7zip imagemagick nodejs wget g++ make patch | ||
sudo npm install -g electron@^13= --unsafe-perm=true | ||
sudo npm install -g --engine-strict asar | ||
sudo npm install -g prettier | ||
} | ||
|
@@ -28,7 +28,6 @@ prepare() { | |
asar extract app.asar app | ||
|
||
mkdir -p app/resources/linux/ | ||
cp win/systray.png app/resources/linux/systray.png | ||
|
||
# Remove NodeRT from package (-205.72 MiB) | ||
rm -r app/node_modules/@nodert | ||
|
@@ -45,15 +44,14 @@ prepare() { | |
done | ||
|
||
cd "$srcdir/resources/app" | ||
mkdir -p resources/linux/ | ||
install -Dm644 "$srcdir/resources/win/systray.png" resources/linux/ | ||
|
||
prettier --write "build/*.js" | ||
# Disable menu bar | ||
patch -p1 < "$srcdir/menu-bar.patch" | ||
# Hide to tray (https://github.com/SibrenVasse/deezer/issues/4) | ||
patch -p1 < "$srcdir/quit.patch" | ||
|
||
# Monkeypatch MPRIS D-Bus interface | ||
patch -p1 < "$srcdir/0001-MPRIS-interface.patch" | ||
# Add start in tray cli option (https://github.com/SibrenVasse/deezer/pull/12) | ||
patch --forward --strip=1 --input="$srcdir/start-hidden-on-tray.patch" | ||
|
||
cd .. | ||
asar pack app app.asar | ||
|
@@ -64,7 +62,7 @@ package() { | |
sudo mkdir -p "$pkgdir"/usr/share/deezer | ||
sudo mkdir -p "$pkgdir"/usr/share/applications | ||
sudo mkdir -p "$pkgdir"/usr/bin/ | ||
for size in 16 32 48 64 128 256 512; do | ||
for size in 16 32 48 64 128 256; do | ||
sudo mkdir -p "$pkgdir"/usr/share/icons/hicolor/${size}x${size}/apps/ | ||
done | ||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,22 @@ | ||
diff --git a/build/main.js b/build/main.js | ||
index 6934bbd..a150316 100644 | ||
index 5066eef..d05dda2 100644 | ||
--- a/build/main.js | ||
+++ b/build/main.js | ||
@@ -3123,7 +3123,7 @@ module.exports = (function(modules) { | ||
}; | ||
@@ -503,7 +503,7 @@ | ||
} | ||
getQuitOptions() { | ||
- return { label: i18n.t("menu_quit-deezer_label"), role: "quit" }; | ||
+ return { label: i18n.t("menu_quit-deezer_label"), click: () => { external_electron_.app.isQuiting = true; external_electron_.app.quit(); } }; | ||
} | ||
getReloadOptions() { | ||
return { | ||
@@ -4714,6 +4714,12 @@ module.exports = (function(modules) { | ||
this.window.on("resize", () => { | ||
this.windowState.save(); | ||
}), | ||
+ this.window.on('close', function(event) { | ||
+ if(!external_electron_.app.isQuiting){ | ||
+ event.preventDefault(); | ||
+ this.hide(); | ||
+ } | ||
+ }), | ||
this.window.once("ready-to-show", () => { | ||
if (windowState.isMaximized) this.window.maximize(); | ||
else if (isPlatform(PLATFORM_WINDOWS)) { | ||
closeWindow() { | ||
if (this.getWindow()) | ||
- return isPlatform(PLATFORM.DARWIN) | ||
+ return isPlatform(PLATFORM.DARWIN) || isPlatform(PLATFORM.LINUX) | ||
? (this.getWindow().isFullScreen() && | ||
this.getWindow().setFullScreen(!1), | ||
this.getWindow().hide()) | ||
@@ -3079,7 +3079,7 @@ | ||
this._adjustViewToContentSize(), | ||
mainView.setAutoResize({ width: !0, height: !0 }); | ||
} else this.appService.setWindow(this.window, void 0); | ||
- if ((this.appService.setUserAgent(), isPlatform(PLATFORM.DARWIN))) { | ||
+ if ((this.appService.setUserAgent(), isPlatform(PLATFORM.DARWIN) || isPlatform(PLATFORM.LINUX))) { | ||
let isQuitting = !1; | ||
external_electron_namespaceObject.app.on( | ||
"before-quit", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/build/main.js b/build/main.js | ||
index 5066eef..592a6bc 100644 | ||
--- a/build/main.js | ||
+++ b/build/main.js | ||
@@ -3122,8 +3122,12 @@ | ||
finalMinSize[1] | ||
); | ||
} | ||
- isDev() ? this.window.showInactive() : this.window.show(), | ||
- this.thumbar.init(); | ||
+ if (!process.argv.some(arg => arg === '--start-in-tray')) { | ||
+ isDev() ? this.window.showInactive() : this.window.show(), | ||
+ this.thumbar.init(); | ||
+ } else { | ||
+ this.window.hide(); | ||
+ } | ||
}), | ||
this.appService.enableDevMode(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
printf "\nPlease enter your root password to proceed.\n" | ||
sudo true | ||
|
||
printf "\nUninstalling Deezer... " | ||
sudo rm -rf /usr/share/deezer &> /dev/null || true | ||
sudo rm /usr/share/applications/deezer.desktop &> /dev/null || true | ||
sudo rm /usr/bin/deezer &> /dev/null || true | ||
|
||
for size in 16 32 48 64 128 256; do | ||
sudo rm /usr/share/icons/hicolor/${size}x${size}/apps/deezer.png &> /dev/null || true | ||
done | ||
|
||
sudo update-desktop-database --quiet | ||
|
||
printf "OK.\nDeezer has been uninstalled.\n\n" |