Changed from onedir to one file to fix pyinstaller workflow

This commit is contained in:
Warezpeddler
2026-05-05 11:00:59 +01:00
parent 2adb75fc0d
commit a67459e7e0
2 changed files with 10 additions and 28 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Build one-folder PyInstaller distribution (see applepy.spec). Requires: pip install -e ".[bundle]"
# Build single-file PyInstaller binary (see applepy.spec). Requires: pip install -e ".[bundle]"
# By default fetches NIST macos_security + Lynis into applepy/data/ (git + network). Offline:
# SKIP_VENDOR_COMPLIANCE=1 ./scripts/build_bundle.sh
set -euo pipefail
@@ -17,15 +17,8 @@ fi
python -m pip install -q -e ".[bundle]"
DIST_OUT="${ROOT}/dist/applepy"
if [[ -e "${DIST_OUT}" ]]; then
echo "Removing previous bundle: ${DIST_OUT}"
if ! rm -rf "${DIST_OUT}"; then
echo "ERROR: Could not remove ${DIST_OUT}." >&2
echo "This usually means root-owned files under .../macos_security/build from a prior sudo run of the bundle." >&2
echo "Fix: sudo rm -rf \"${DIST_OUT}\"" >&2
echo "Then re-run this script. The spec omits mSCP build/ from the bundle to avoid shipping host output." >&2
exit 1
fi
echo "Removing previous binary: ${DIST_OUT}"
rm -rf "${DIST_OUT}"
fi
python -m PyInstaller --noconfirm "${ROOT}/applepy.spec"
echo "Output: ${ROOT}/dist/applepy/ → run: dist/applepy/applepy --help"
echo "Note: build/applepy/ is PyInstallers work dir only (no _internal/). Do not run that copy."
python -m PyInstaller --noconfirm --clean "${ROOT}/applepy.spec"
echo "Output: ${ROOT}/dist/applepy → run: dist/applepy --help"