mirror of
https://git.srhtnin.garden/sarah/SaraSuite.git
synced 2026-10-13 18:18:12 +02:00
38 lines
1.3 KiB
Bash
Executable File
38 lines
1.3 KiB
Bash
Executable File
#!/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.
|
|
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"
|
|
|
|
AppDir=build/AppDir
|
|
rm -rf "$AppDir"
|
|
mkdir -p "$AppDir/usr/bin"
|
|
cp build/PyInstaller/dist/SaraSuite "$AppDir/usr/bin/SaraSuite"
|
|
ln -s usr/bin/SaraSuite "$AppDir/AppRun"
|
|
cp assets/Icon.png "$AppDir/SaraSuite.png"
|
|
ln -s SaraSuite.png "$AppDir/.DirIcon"
|
|
cat > "$AppDir/SaraSuite.desktop" << DESKTOP
|
|
[Desktop Entry]
|
|
Type=Application
|
|
Name=SaraSuite
|
|
Comment=Install, update and remove Sara programs
|
|
Exec=SaraSuite
|
|
Icon=SaraSuite
|
|
Terminal=false
|
|
Categories=System;
|
|
DESKTOP
|
|
|
|
mkdir -p dist
|
|
ARCH=x86_64 appimagetool --no-appstream "$AppDir" dist/SaraSuite-x86_64.AppImage
|
|
echo "Built dist/SaraSuite-x86_64.AppImage"
|