Files
PLStatus/build.sh
2026-02-17 09:17:46 +03:00

27 lines
957 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Сборка одного исполняемого файла для Linux (PyInstaller)
# Запуск: chmod +x build.sh && ./build.sh
set -e
cd "$(dirname "$0")"
if [ ! -f ".venv/bin/activate" ]; then
echo "Создайте venv и установите зависимости:"
echo " python3 -m venv .venv && . .venv/bin/activate && pip install -r requirements.txt"
exit 1
fi
. .venv/bin/activate
pip install pyinstaller -q
# Иконка: если нет icon.ico — создаём заглушку
[ ! -f "icon.ico" ] && python make_icon.py || true
ICON_OPT=""
[ -f "icon.ico" ] && ICON_OPT="--icon icon.ico"
pyinstaller --onefile --noconsole --name PLStatus --clean $ICON_OPT status_automation.py
echo ""
echo "Готово: dist/PLStatus (без консоли, с иконкой если был icon.ico)"
echo "Рядом с бинарником положите config.json и папку images/ (см. README)"