mirror of
https://git.srhtnin.garden/sarah/SaraSuite.git
synced 2026-10-14 02:28:11 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2ebef97be1 | ||
|
|
d7db153c24 | ||
|
|
4e662beca2 |
No files matched your search
@@ -23,7 +23,7 @@ import tomlkit
|
||||
AppName = "SaraSuite"
|
||||
# Compared with the latest Gitea release to offer self-updates (SelfUpdate.py).
|
||||
# Bump it, then run Packaging/Release.py, to publish a new SaraSuite.
|
||||
AppVersion = "1.2.0"
|
||||
AppVersion = "1.2.1"
|
||||
IsFrozen = bool(getattr(sys, "frozen", False)) # running from the AppImage / .exe
|
||||
IsWindows = sys.platform == "win32"
|
||||
Platform = "Windows" if IsWindows else "Linux" # matches manifests' Platforms / Platform
|
||||
|
||||
@@ -1,18 +1,28 @@
|
||||
#!/bin/bash
|
||||
# Builds dist/SaraSuite-x86_64.AppImage: a PyInstaller one-file build (with
|
||||
# the program manifests, fonts and icon bundled) wrapped by appimagetool,
|
||||
# the same way SaraFem's AppImage is made. Needs appimagetool on PATH.
|
||||
# the same way SaraFem's AppImage is made. Needs podman and appimagetool
|
||||
# on PATH.
|
||||
set -euo pipefail
|
||||
cd "$(dirname "$(readlink -f "$0")")/.."
|
||||
|
||||
.venv/bin/pip install --quiet --disable-pip-version-check pyinstaller
|
||||
find Programs -name __pycache__ -type d -prune -exec rm -rf {} +
|
||||
|
||||
.venv/bin/pyinstaller --noconfirm --clean --log-level WARN \
|
||||
--onefile --windowed --name SaraSuite --collect-data flet \
|
||||
--add-data "$PWD/assets:assets" --add-data "$PWD/Programs:Programs" \
|
||||
--distpath build/PyInstaller/dist --workpath build/PyInstaller/work --specpath build/PyInstaller \
|
||||
"$PWD/Main.py"
|
||||
# PyInstaller runs in a manylinux_2_28 container (glibc 2.28) with uv's
|
||||
# portable Python, not with Fedora's: PyInstaller bundles libpython, and
|
||||
# Fedora's needs a newer glibc than many distros have ("GLIBC_ABI_GNU2_TLS
|
||||
# not found"). The Python, venv and downloads are cached in build/Container.
|
||||
mkdir -p build/Container
|
||||
podman run --rm --security-opt label=disable -v "$PWD:/src" -w /src \
|
||||
-e UV_CACHE_DIR=/src/build/Container/cache -e UV_PYTHON_INSTALL_DIR=/src/build/Container/python \
|
||||
quay.io/pypa/manylinux_2_28_x86_64 bash -euo pipefail -c '
|
||||
uv venv --quiet --allow-existing --managed-python --python 3.14 build/Container/venv
|
||||
uv pip install --quiet --python build/Container/venv -r requirements.txt flet-desktop pyinstaller
|
||||
build/Container/venv/bin/pyinstaller --noconfirm --clean --log-level WARN \
|
||||
--onefile --windowed --name SaraSuite --collect-data flet \
|
||||
--add-data "$PWD/assets:assets" --add-data "$PWD/Programs:Programs" \
|
||||
--distpath build/PyInstaller/dist --workpath build/PyInstaller/work --specpath build/PyInstaller \
|
||||
"$PWD/Main.py"'
|
||||
|
||||
AppDir=build/AppDir
|
||||
rm -rf "$AppDir"
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.0 KiB |
@@ -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"
|
||||
@@ -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 "$@"
|
||||
@@ -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}
|
||||
Reference in new issue
Block a user