Files
PortProtonQt/build-aux/AppImageBuilder.yml
Boris Yumankulov c8a9cc9d2c
All checks were successful
Code and build check / Check code (push) Successful in 1m30s
Code and build check / Build with uv (push) Successful in 51s
chore(build): returned forget rm -r to appimage
Signed-off-by: Boris Yumankulov <boria138@altlinux.org>
2025-07-16 16:25:59 +05:00

88 lines
3.5 KiB
YAML

version: 1
script:
# 1) Чистим старый AppDir
- rm -rf AppDir || true
# 2) Создаём структуру каталога
- mkdir -p AppDir/usr/local/lib/python3.10/dist-packages
# 3) UV: создаём виртуальное окружение и устанавливаем зависимости из pyproject.toml
- uv venv
- uv pip install --no-cache-dir ../
# 4) Копируем всё из .venv в AppDir
- cp -r .venv/lib/python3.10/site-packages/* AppDir/usr/local/lib/python3.10/dist-packages
- cp -r share AppDir/usr
# 5) Удаляем pycache файлы
- find AppDir -name "__pycache__" -type d -exec rm -rf {} + || true
# 6) Удаляем тестовые файлы и документацию
- find AppDir -path "*/test*" -type d -exec rm -rf {} + || true
- find AppDir -path "*/tests*" -type d -exec rm -rf {} + || true
- find AppDir -name "*.md" -delete || true
- find AppDir -name "*.rst" -delete || true
- find AppDir -name "*.txt" -delete || true
- find AppDir -path "*/doc*" -type d -exec rm -rf {} + || true
- find AppDir -path "*/docs*" -type d -exec rm -rf {} + || true
- find AppDir -name "README*" -delete || true
- find AppDir -name "CHANGELOG*" -delete || true
- find AppDir -name "LICENSE*" -delete || true
- find AppDir -name "COPYING*" -delete || true
- find AppDir -name "AUTHORS*" -delete || true
- find AppDir -name "CONTRIBUTORS*" -delete || true
# 7) Чистим от ненужных модулей и бинарников
- rm -rf AppDir/usr/local/lib/python3.10/dist-packages/PySide6/Qt/qml/
- rm -f AppDir/usr/local/lib/python3.10/dist-packages/PySide6/{assistant,designer,linguist,lrelease,lupdate}
# 8) Удаляем все модули и библиотеки Qt кроме QtCore, QtGui, QtMultimedia, QtSvg, QtWidgets
- shopt -s extglob
- rm -rf AppDir/usr/local/lib/python3.10/dist-packages/PySide6/!(QtCore*|QtGui*|QtMultimedia*|QtSvg*|QtWidgets*)
- rm -rf AppDir/usr/local/lib/python3.10/dist-packages/PySide6/Qt/lib/!(libQt6Core*|libQt6Gui*|libQt6Widgets*|libQt6Svg*|libQt6Multimedia*|libQt6XcbQpa*|libQt6Wayland*|libQt6Egl*|libicudata*|libicuuc*|libicui18n*)
AppDir:
path: ./AppDir
app_info:
id: ru.linux_gaming.PortProtonQt
name: PortProtonQt
icon: ru.linux_gaming.PortProtonQt
version: 0.1.3
exec: usr/bin/python3
exec_args: "-m portprotonqt.app $@"
apt:
arch: amd64
sources:
- sourceline: 'deb [arch=amd64] http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse'
key_url: 'http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x871920d1991bc93c'
include:
- python3-minimal
- python3-pkg-resources
- libopengl0
- libk5crypto3
- libkrb5-3
- libgssapi-krb5-2
- libxcb-cursor0
- libimage-exiftool-perl
- xdg-utils
exclude:
- man-db
- manpages
- manpages-*
- doc-base
- info
- install-info
runtime:
env:
PYTHONHOME: '${APPDIR}/usr'
PYTHONPATH: '${APPDIR}/usr/local/lib/python3.10/dist-packages'
before_bundle:
# Применяем strip к бинарникам и библиотекам для уменьшения размера
- find AppDir -type f -name "*.so*" -exec strip --strip-all {} \; 2>/dev/null || true
- find AppDir -type f -executable -exec strip --strip-unneeded {} \; 2>/dev/null || true
# Удаляем пустые папки
- find AppDir -type d -empty -delete || true
AppImage:
sign-key: None
arch: x86_64