Build AppImages for older glibc

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
sarahandClaude Opus 5.5 committed 2026-10-13 09:13:49 +02:00
1 parent 4e662beca2
commit d7db153c24
1 file changed
+17 -7
+17 -7
View File
@@ -1,18 +1,28 @@
#!/bin/bash #!/bin/bash
# Builds dist/SaraSuite-x86_64.AppImage: a PyInstaller one-file build (with # Builds dist/SaraSuite-x86_64.AppImage: a PyInstaller one-file build (with
# the program manifests, fonts and icon bundled) wrapped by appimagetool, # 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 set -euo pipefail
cd "$(dirname "$(readlink -f "$0")")/.." 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 {} + find Programs -name __pycache__ -type d -prune -exec rm -rf {} +
.venv/bin/pyinstaller --noconfirm --clean --log-level WARN \ # PyInstaller runs in a manylinux_2_28 container (glibc 2.28) with uv's
--onefile --windowed --name SaraSuite --collect-data flet \ # portable Python, not with Fedora's: PyInstaller bundles libpython, and
--add-data "$PWD/assets:assets" --add-data "$PWD/Programs:Programs" \ # Fedora's needs a newer glibc than many distros have ("GLIBC_ABI_GNU2_TLS
--distpath build/PyInstaller/dist --workpath build/PyInstaller/work --specpath build/PyInstaller \ # not found"). The Python, venv and downloads are cached in build/Container.
"$PWD/Main.py" 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 AppDir=build/AppDir
rm -rf "$AppDir" rm -rf "$AppDir"