Browse Source

snap: Multiple improvements (#3697)

* Add avahi-browse interface, fixing Chromecast support ([hopefully] Closes: #3650)
* Use gnome-3-28 platform extension, reducing snap size.
* Set appropriate TMPDIR environment, fixing the indicator icon
* (Should) Actually build in the Launchpad environment (hopefully!)
tags/v4.7.1
Christopher James Halse Rogers 9 months ago
committed by Jesse Ostrander
parent
commit
4b64f7a674
3 changed files with 90 additions and 82 deletions
  1. +90
    -0
      snap/snapcraft.yaml
  2. +0
    -69
      snapcraft.yaml
  3. +0
    -13
      vendor/snap/google-play-music-desktop-player.desktop

+ 90
- 0
snap/snapcraft.yaml View File

@@ -0,0 +1,90 @@
name: google-play-music-desktop-player
adopt-info: google-play-music-desktop-player
summary: Standalone player for Google Play Music
description: |
This Google Play Music player provides desktop integration - with music
hotkeys and the sound indicator via an MPRIS interface, the abiliy to use
custom colours and load custom themes, a remote-control interface, and
lower resource consumption than a full-blown browser tab.
.
This is *not* an official Google project.
grade: stable
base: core18
confinement: strict
icon: src/assets/icons/svg/vector_logo.svg

apps:
google-play-music-desktop-player:
command: desktop-launch google-play-music-desktop-player
environment:
TMPDIR: $XDG_RUNTIME_DIR
desktop: usr/share/applications/google-play-music-desktop-player.desktop
extensions:
- gnome-3-28
plugs:
- unity7
- alsa
- audio-playback
- pulseaudio
- opengl
- browser-support
- network
- network-bind
- gsettings
- avahi-observe
slots:
- mpris-player

slots:
mpris-player:
interface: mpris
name: google_play_music_desktop_player


parts:
google-play-music-desktop-player:
plugin: nodejs
source: .
source-type: git
build-packages:
- g++
- libavahi-compat-libdnssd-dev
- libdbus-1-dev
- libx11-dev
- libexpat1-dev
- libnotify-dev
- python3
- python
- git
stage-packages:
- libnss3
- ca-certificates
- libasound2-data
- libasound2-plugins
- libnotify4
- libavahi-compat-libdnssd1
- libxss1
- libgconf2-4
- libxtst6
- libdbus-1-3
- libx11-xcb1
- libappindicator3-1
- unity-gtk3-module
override-build: |
export PATH=$PATH:$SNAPCRAFT_PART_BUILD/../npm/bin
export PATH=$PATH:$SNAPCRAFT_PART_BUILD/node_modules/.bin
snapcraftctl set-version $(git describe --tags)
npm install
npm run build
npm run make:deb:64
cp ${SNAPCRAFT_PART_BUILD}/dist/installers/debian/*.deb ${SNAPCRAFT_STAGE}/dist.deb

dump-package:
plugin: dump
source: ../stage/dist.deb
source-type: deb
override-build: |
snapcraftctl build
sed -i 's|Icon=google-play-music-desktop-player|Icon=/usr/share/pixmaps/google-play-music-desktop-player.png|g' $SNAPCRAFT_PART_INSTALL/usr/share/applications/google-play-music-desktop-player.desktop
after:
- google-play-music-desktop-player

+ 0
- 69
snapcraft.yaml View File

@@ -1,69 +0,0 @@
name: google-play-music-desktop-player
version: '4.6.0'
summary: Standalone player for Google Play Music
description: |
This Google Play Music player provides desktop integration - with music
hotkeys and the sound indicator via an MPRIS interface, the abiliy to use
custom colours and load custom themes, a remote-control interface, and
lower resource consumption than a full-blown browser tab.
.
This is *not* an official Google project.
grade: stable
confinement: strict
icon: src/assets/icons/svg/vector_logo.svg

apps:
google-play-music-desktop-player:
command: desktop-launch "$SNAP/google-play-music-desktop-player/Google Play Music Desktop Player"
desktop: google-play-music-desktop-player.desktop
plugs:
- pulseaudio
- x11
- opengl
- browser-support
- network
- network-bind
- process-control
- unity7
- gsettings
slots:
- mpris

parts:
desktop-file:
plugin: dump
source: vendor/snap/

google-play-music-desktop-player:
plugin: gulp
node-engine: 8.11.1
source: .
source-type: git
gulp-tasks:
- package:linux:64
build-packages:
- g++
- libavahi-compat-libdnssd-dev
- libdbus-1-dev
- libx11-dev
- libexpat1-dev
- libnotify-dev
- python3
- python
stage-packages:
- libnss3
- ca-certificates
- libasound2-data
- libasound2-plugins
- libnotify4
- libavahi-compat-libdnssd1
- libxss1
- libgconf2-4
- libxtst6
- libdbus-1-3
after:
- desktop-gtk2
- indicator-gtk2
organize:
'../build/dist/Google Play Music Desktop Player-linux-x64': google-play-music-desktop-player
../build/build/assets/img/main.png: main.png

+ 0
- 13
vendor/snap/google-play-music-desktop-player.desktop View File

@@ -1,13 +0,0 @@
[Desktop Entry]
Name=Google Play Music Desktop Player
Name[fr]=Google Play Musique pour Bureau
Comment=An electron wrapper for Google Play Music
Comment[fr]=Une application Electron intégrant Google Play Musique au bureau.
GenericName=Google Play Music Desktop Player
GenericName[fr]=Lecteur en streaming de Google - version pour bureau
Exec=env PULSE_PROP=media.role=music google-play-music-desktop-player %U
Icon=google-play-music-desktop-player
Type=Application
StartupNotify=true
Categories=AudioVideo;Audio;
X-PulseAudio-Properties=media.role=music

Loading…
Cancel
Save