Compare commits
1 Commits
f6a7ca7df6
...
main
Author | SHA1 | Date | |
---|---|---|---|
272be51bb0
|
@ -17,11 +17,11 @@ jobs:
|
|||||||
- name: Install required dependencies
|
- name: Install required dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync git
|
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync git zstd
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
pip3 install git+https://github.com/Frederic98/appimage-builder.git
|
pip3 install git+https://github.com/Boria138/appimage-builder.git
|
||||||
pip3 install uv
|
pip3 install uv
|
||||||
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
|
@ -23,11 +23,11 @@ jobs:
|
|||||||
- name: Install required dependencies
|
- name: Install required dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync git
|
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync git zstd
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
pip3 install git+https://github.com/Frederic98/appimage-builder.git
|
pip3 install git+https://github.com/Boria138/appimage-builder.git
|
||||||
pip3 install uv
|
pip3 install uv
|
||||||
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
@ -159,6 +159,7 @@ jobs:
|
|||||||
mkdir -p extracted
|
mkdir -p extracted
|
||||||
find release/ -name '*.zip' -exec unzip -o {} -d extracted/ \;
|
find release/ -name '*.zip' -exec unzip -o {} -d extracted/ \;
|
||||||
find extracted/ -type f -exec mv {} release/ \;
|
find extracted/ -type f -exec mv {} release/ \;
|
||||||
|
find release/ -name '*.zip' -delete
|
||||||
rm -rf extracted/
|
rm -rf extracted/
|
||||||
|
|
||||||
- name: Extract changelog for version
|
- name: Extract changelog for version
|
||||||
|
@ -68,11 +68,11 @@ jobs:
|
|||||||
- name: Install required dependencies
|
- name: Install required dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync git
|
sudo apt install -y binutils coreutils desktop-file-utils gtk-update-icon-cache fakeroot fuse libgdk-pixbuf2.0-dev patchelf python3-pip python3-dev python3-setuptools squashfs-tools strace util-linux zsync zstd git
|
||||||
|
|
||||||
- name: Install tools
|
- name: Install tools
|
||||||
run: |
|
run: |
|
||||||
pip3 install git+https://github.com/Frederic98/appimage-builder.git
|
pip3 install git+https://github.com/Boria138/appimage-builder.git
|
||||||
pip3 install uv
|
pip3 install uv
|
||||||
|
|
||||||
- name: Build AppImage
|
- name: Build AppImage
|
||||||
|
@ -82,5 +82,4 @@ AppDir:
|
|||||||
PERLLIB: '${APPDIR}/usr/share/perl5:${APPDIR}/usr/lib/x86_64-linux-gnu/perl/5.34:${APPDIR}/usr/share/perl/5.34'
|
PERLLIB: '${APPDIR}/usr/share/perl5:${APPDIR}/usr/lib/x86_64-linux-gnu/perl/5.34:${APPDIR}/usr/share/perl/5.34'
|
||||||
AppImage:
|
AppImage:
|
||||||
sign-key: None
|
sign-key: None
|
||||||
comp: gzip
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
@ -33,7 +33,7 @@ class PySide6DependencyAnalyzer:
|
|||||||
"""Находит все Python файлы в директории"""
|
"""Находит все Python файлы в директории"""
|
||||||
python_files = []
|
python_files = []
|
||||||
for root, dirs, files in os.walk(directory):
|
for root, dirs, files in os.walk(directory):
|
||||||
dirs[:] = [d for d in dirs if d not in {'.venv', '__pycache__', '.git', 'node_modules'}]
|
dirs[:] = [d for d in dirs if d not in {'.venv', '__pycache__', '.git'}]
|
||||||
|
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.endswith('.py'):
|
if file.endswith('.py'):
|
||||||
@ -44,43 +44,24 @@ class PySide6DependencyAnalyzer:
|
|||||||
"""Находит все PySide6 библиотеки (.so файлы)"""
|
"""Находит все PySide6 библиотеки (.so файлы)"""
|
||||||
libs = {}
|
libs = {}
|
||||||
|
|
||||||
# Поиск в разных возможных локациях
|
# Поиск в единственной локации
|
||||||
search_paths = [
|
search_path = Path("../.venv/lib/python3.10/site-packages/PySide6")
|
||||||
base_path / "usr/local/lib/python3.10/dist-packages/PySide6",
|
print(f"Поиск PySide6 библиотек в: {search_path}")
|
||||||
base_path / "usr/local/lib/python3.11/dist-packages/PySide6",
|
|
||||||
base_path / "usr/lib/python3/dist-packages/PySide6",
|
|
||||||
base_path / ".venv/lib/python3.10/site-packages/PySide6",
|
|
||||||
base_path / ".venv/lib/python3.11/site-packages/PySide6",
|
|
||||||
]
|
|
||||||
|
|
||||||
# Также добавляем путь, если PySide6 установлен системно
|
if search_path.exists():
|
||||||
try:
|
# Ищем .so файлы модулей
|
||||||
import PySide6
|
for so_file in search_path.glob("Qt*.*.so"):
|
||||||
system_path = Path(PySide6.__file__).parent
|
module_name = so_file.stem.split('.')[0] # QtCore.abi3.so -> QtCore
|
||||||
search_paths.append(system_path)
|
if module_name.startswith('Qt'):
|
||||||
except ImportError:
|
libs[module_name] = so_file
|
||||||
pass
|
|
||||||
|
|
||||||
for search_path in search_paths:
|
# Также ищем в подпапках
|
||||||
if search_path.exists():
|
for subdir in search_path.iterdir():
|
||||||
print(f"Поиск PySide6 библиотек в: {search_path}")
|
if subdir.is_dir() and subdir.name.startswith('Qt'):
|
||||||
|
for so_file in subdir.glob("*.so*"):
|
||||||
# Ищем .so файлы модулей
|
if 'Qt' in so_file.name:
|
||||||
for so_file in search_path.glob("Qt*.*.so"):
|
libs[subdir.name] = so_file
|
||||||
module_name = so_file.stem.split('.')[0] # QtCore.abi3.so -> QtCore
|
break
|
||||||
if module_name.startswith('Qt'):
|
|
||||||
libs[module_name] = so_file
|
|
||||||
|
|
||||||
# Также ищем в подпапках
|
|
||||||
for subdir in search_path.iterdir():
|
|
||||||
if subdir.is_dir() and subdir.name.startswith('Qt'):
|
|
||||||
for so_file in subdir.glob("*.so*"):
|
|
||||||
if 'Qt' in so_file.name:
|
|
||||||
libs[subdir.name] = so_file
|
|
||||||
break
|
|
||||||
|
|
||||||
if libs:
|
|
||||||
break
|
|
||||||
|
|
||||||
return libs
|
return libs
|
||||||
|
|
||||||
@ -366,13 +347,13 @@ def main():
|
|||||||
print(f"\nПотенциальная экономия места: {results['analysis_summary']['space_saving_potential']}")
|
print(f"\nПотенциальная экономия места: {results['analysis_summary']['space_saving_potential']}")
|
||||||
|
|
||||||
if args.verbose and results['real_dependencies']:
|
if args.verbose and results['real_dependencies']:
|
||||||
print(f"\nРеальные зависимости (ldd):")
|
Devlin(f"\nРеальные зависимости (ldd):")
|
||||||
for module, deps in results['real_dependencies'].items():
|
for module, deps in results['real_dependencies'].items():
|
||||||
if deps:
|
if deps:
|
||||||
print(f" {module} → {', '.join(deps)}")
|
print(f" {module} → {', '.join(deps)}")
|
||||||
|
|
||||||
# Обновляем AppImage рецепт
|
# Обновляем AppImage рецепт
|
||||||
recipe_path = project_path / "../build-aux/AppImageBuilder.yml"
|
recipe_path = Path("../build-aux/AppImageBuilder.yml")
|
||||||
if recipe_path.exists():
|
if recipe_path.exists():
|
||||||
updated_recipe = analyzer.generate_appimage_recipe(results['removable'], recipe_path)
|
updated_recipe = analyzer.generate_appimage_recipe(results['removable'], recipe_path)
|
||||||
if updated_recipe:
|
if updated_recipe:
|
||||||
|
Reference in New Issue
Block a user