Files
lnxgit/scripts/_install_essentials.sh
LnxGit 057cf839bc 清理源码中的 UTF-8 BOM 与 CRLF,新增 clean_sources 检查工具
BOM 会让 pyside6-android-deploy 的 ast.parse 失败,从而无法定位 Qt 模块依赖;
clean_sources.py 可批量修复并用于 CI 检查。
2026-09-22 11:55:18 +08:00

37 lines
966 B
Bash
Raw Permalink 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.

#!/usr/bin/env bash
# 在 venv 中安装 PySide6 Essentials / Addons(提供 deploy 工具链与 Qt 运行库)。
set -uo pipefail
WORK="${WORK:-$HOME/lnxgit-android}"
VENV="$WORK/venv"
QT_VER="${QT_VER:-6.11.2}"
"$VENV/bin/pip" install --no-deps "PySide6_Essentials==$QT_VER" "PySide6_Addons==$QT_VER"
echo
echo "=== PySide6.scripts ==="
"$VENV/bin/python" - <<'PY'
import os
try:
import PySide6.scripts as s
d = os.path.dirname(s.__file__)
print("路径:", d)
print("内容:", sorted(os.listdir(d)))
except Exception as exc:
print("导入失败:", type(exc).__name__, exc)
PY
echo
echo "=== venv/bin 中的打包工具 ==="
ls "$VENV/bin" | grep -iE 'deploy|android|pyside6' | head -30 || echo "(无)"
echo
echo "=== deploy_lib ==="
"$VENV/bin/python" - <<'PY'
import os
try:
import deploy_lib
print("路径:", os.path.dirname(deploy_lib.__file__))
except Exception as exc:
print("导入失败:", type(exc).__name__, exc)
PY