Flatpak version works, miss MPRIS

This commit is contained in:
aunetx 2021-10-12 18:59:27 +02:00
parent 1b007615f9
commit ef8d43ec78
5 changed files with 77 additions and 8 deletions

4
.gitignore vendored
View File

@ -9,4 +9,6 @@ app-32.7z
deezer-*.exe
package-lock.json
package.json
app.7z
app.7z
repo
*.AppImage

View File

@ -38,7 +38,6 @@ install_build_deps:
npm install --engine-strict asar
npm install prettier
prepare: install_build_deps
mkdir -p source
# Download installer
@ -66,27 +65,37 @@ prepare: install_build_deps
head -n -2 app/package.json > tmp.txt && mv tmp.txt app/package.json
echo $(pkg_json_append) | tee -a app/package.json
build_flatpak: prepare
prepare_flatpak: prepare
# Generate npm sources (without installing them)
npm i --prefix=app --package-lock-only
# Package the sources to use them in flatpak-builder offline
./flatpak-node-generator.py npm app/package-lock.json -o flatpak/generated-sources.json --electron-node-headers --xdg-layout
# Build the Flatpak app
cd flatpak && flatpak-builder build dev.aunetx.deezer.yml --install --force-clean --user
build_flatpak: prepare_flatpak
# Build the flatpak image
cd flatpak && flatpak-builder --force-clean build dev.aunetx.deezer.yml
export_flatpak: prepare_flatpak
# Build the flatpak package and export it to the repo
cd flatpak && flatpak-builder --gpg-sign=5A7D3B06F15FB60238941027EB3A799E7EE716EB --repo=repo --force-clean build dev.aunetx.deezer.yml
flatpak_bundle: build_flatpak
# Create a flatpak bundle
flatpak build-bundle --gpg-sign=5A7D3B06F15FB60238941027EB3A799E7EE716EB flatpak/repo deezer.flatpak dev.aunetx.deezer
install_flatpak: prepare_flatpak
# Build and install locally the flatpak image
cd flatpak && flatpak-builder --force-clean --user --install build dev.aunetx.deezer.yml
build_appimage: prepare
# Install required dependencies to pack them with AppImage
npm i --prefix=app
# Build the AppImage package
npm run dist --prefix=app
mv app/dist/*.AppImage .
run_flatpak:
flatpak run dev.aunetx.deezer
clean:
rm -rf app extra flatpak/{.flatpak-builder,build} node_modules source app-32.7z app.7z deezer-*.exe package-lock.json

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>dev.aunetx.deezer</id>
<provides>
<id>dev.aunetx.deezer.desktop</id>
</provides>
<launchable type="desktop-id">dev.aunetx.deezer.desktop</launchable>
<name>Deezer</name>
<developer_name>aunetx</developer_name>
<summary>Online music streaming service</summary>
<metadata_license>CC0-1.0</metadata_license>
<project_license>LicenseRef-proprietary=https://www.deezer.com/legal/cgu/</project_license>
<url type="homepage">https://www.deezer.com</url>
<url type="help">https://github.com/aunetx/deezer-linux</url>
<description>
<p>An unofficial linux port of the deezer desktop application.
Access all of your favorite music, and save them offline for later!</p>
</description>
<kudos>
<kudo>HiDpiIcon</kudo>
</kudos>
<releases>
<release version="5.30.0.alpha" date="2021-10-10" />
</releases>
<content_rating type="oars-1.1" />
<update_contact>me_at_aunetx.dev</update_contact>
</component>

15
dev.aunetx.deezer.desktop Normal file
View File

@ -0,0 +1,15 @@
[Desktop Entry]
Type=Application
Name=Deezer
GenericName=Online music streaming service
Comment=Listen and download all your favorite music
StartupNotify=true
Icon=dev.aunetx.deezer
TryExec=/app/bin/run.sh
Exec=/app/bin/run.sh %U
Terminal=false
MimeType=x-scheme-handler/deezer;
Categories=Audio;Music;Player;AudioVideo;
Keywords=Music;Player;Streaming;Online;
StartupWMClass=Deezer
X-GNOME-UsesNotifications=true

16
dev.aunetx.deezer.svg Normal file
View File

@ -0,0 +1,16 @@
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" version="1">
<rect style="opacity:0.2" width="56" height="59" x="-61" y="-62" rx="2.8" ry="2.95" transform="matrix(0,-1,-1,0,0,0)"/>
<rect style="fill:#3f3f3f" width="56" height="59" x="-60" y="-62" rx="2.8" ry="2.95" transform="matrix(0,-1,-1,0,0,0)"/>
<path style="fill:#16be71" d="M 57,15 H 47 v 6 h 10 z"/>
<path style="fill:#05ac9c" d="M 57,24 H 47 v 6 h 10 z"/>
<path style="fill:#026ed2" d="M 57,33 H 47 v 6 h 10 z"/>
<path style="fill:#f6a500" d="M 18,42 H 8 v 6 h 10 z"/>
<path style="fill:#e74b32" d="M 31,42 H 21 v 6 h 10 z"/>
<path style="fill:#3446d9" d="M 57,42 H 47 v 6 h 10 z"/>
<path style="fill:#9e2bbb" d="M 44,39 H 34 v -6 h 10 z"/>
<path style="fill:#b72b68" d="M 44,48 H 34 v -6 h 10 z"/>
<path style="fill:#f57524" d="M 31,33 H 21 v 6 h 10 z"/>
<path style="fill:#fabc45" d="M 31,24 H 21 v 6 h 10 z"/>
<path style="opacity:0.2" d="M 47 21 L 47 22 L 57 22 L 57 21 L 47 21 z M 21 30 L 21 31 L 31 31 L 31 30 L 21 30 z M 47 30 L 47 31 L 57 31 L 57 30 L 47 30 z M 21 39 L 21 40 L 31 40 L 31 39 L 21 39 z M 34 39 L 34 40 L 44 40 L 44 39 L 34 39 z M 47 39 L 47 40 L 57 40 L 57 39 L 47 39 z M 8 48 L 8 49 L 18 49 L 18 48 L 8 48 z M 21 48 L 21 49 L 31 49 L 31 48 L 21 48 z M 34 48 L 34 49 L 44 49 L 44 48 L 34 48 z M 47 48 L 47 49 L 57 49 L 57 48 L 47 48 z"/>
<path style="fill:#ffffff;opacity:0.1" d="M 5.9492188 4 C 4.3149189 4 3 5.2495813 3 6.8007812 L 3 7.8007812 C 3 6.2495813 4.3149189 5 5.9492188 5 L 59.050781 5 C 60.685081 5 62 6.2495813 62 7.8007812 L 62 6.8007812 C 62 5.2495813 60.685081 4 59.050781 4 L 5.9492188 4 z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB