diff --git a/Programs/SaraTune/Icon.png b/Programs/SaraTune/Icon.png new file mode 100644 index 0000000..2ccd352 Binary files /dev/null and b/Programs/SaraTune/Icon.png differ diff --git a/Programs/SaraTune/Manifest.toml b/Programs/SaraTune/Manifest.toml new file mode 100644 index 0000000..b453311 --- /dev/null +++ b/Programs/SaraTune/Manifest.toml @@ -0,0 +1,48 @@ +# Kept in sync between SaraSuite/Programs/SaraTune/ and SaraTune/Packaging/SaraSuite/. +Name = "SaraTune" +Platforms = ["Linux", "Windows"] +Description = "A music player with two modes: Audio to open a file or folder and listen right away, Music for your library, a queue and saved playlists. Linux needs libmpv (Fedora: mpv-libs)." + +[Source] +Git = "{GitHost}/SaraTune" +Include = ["*.py", "requirements.txt", "assets/**"] +Exclude = ["Packaging"] + +[Python] +RequirementsFile = "requirements.txt" + +# Linux: a launcher and a desktop entry (also offered for opening audio files). +[[Templates]] +Platform = "Linux" +Source = "Launch.sh" +Target = "{AppDir}/Packaging/Launch.sh" +Executable = true + +[[Templates]] +Platform = "Linux" +Source = "SaraTune.desktop" +Target = "{ApplicationsDir}/SaraTune.desktop" + +# Windows: a Start Menu shortcut (pythonw.exe Main.py, from the app folder). +[[Shortcuts]] +Platform = "Windows" +Name = "SaraTune" +Script = "Main.py" +Icon = "assets/Icon.png" + +# Made by SaraTune itself. +[[Leftovers]] +Path = "{ConfigDir}" +Kind = "Config" +Note = "SaraTune's settings, saved queue and your playlists" + +[[Leftovers]] +Path = "{CacheHome}/SaraSuite/SaraTune" +Kind = "Runtime" +Note = "library tag cache and cover thumbnails" + +# Shared with the other Flet programs; see Programs/FletIdentity.py. +[[Templates]] +Platform = "Linux" +Source = "../../FletIdentity.py" +Target = "{ProgramDir}/FletIdentity.py" diff --git a/Programs/SaraTune/Templates/Launch.sh b/Programs/SaraTune/Templates/Launch.sh new file mode 100644 index 0000000..d8142dc --- /dev/null +++ b/Programs/SaraTune/Templates/Launch.sh @@ -0,0 +1,10 @@ +#!/bin/sh +# Written by SaraSuite. Runs from the app folder so Flet finds assets/. +# Flet's audio player is only in its "full" desktop client. +export FLET_DESKTOP_FLAVOR=full +# A Flet client copy with the window app ID srhtnin.{Name}, so the desktop +# matches the window to {Name}.desktop (StartupWMClass) instead of showing it +# as "com.appveyor.flet". Empty if that fails: Flet then uses its own client. +export FLET_VIEW_PATH="$("{Python}" "{ProgramDir}/FletIdentity.py" "srhtnin.{Name}")" +cd "{AppDir}" || exit 1 +exec "{Python}" Main.py "$@" diff --git a/Programs/SaraTune/Templates/SaraTune.desktop b/Programs/SaraTune/Templates/SaraTune.desktop new file mode 100644 index 0000000..0824605 --- /dev/null +++ b/Programs/SaraTune/Templates/SaraTune.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=SaraTune +Comment=Play audio files and your music library +Exec={AppDir}/Packaging/Launch.sh %F +Icon={AppDir}/assets/Icon.png +Terminal=false +Categories=AudioVideo;Audio;Player; +MimeType=audio/mpeg;audio/flac;audio/x-flac;audio/ogg;audio/x-vorbis+ogg;audio/opus;audio/x-opus+ogg;audio/wav;audio/x-wav;audio/mp4;audio/x-m4a;audio/aac;audio/x-aiff;audio/x-ms-wma;audio/x-matroska;audio/webm; +StartupNotify=true +StartupWMClass=srhtnin.{Name}