Fix .deb bundle: merge built FreeCAD with pixi dependencies

The pixi environment only has dependencies, not FreeCAD itself.
Need to copy both:
1. .pixi/envs/default/* (dependencies: Qt, Python, xerces, etc.)
2. build/release/install/* (FreeCAD binaries and modules)

Also removed the binary filtering that was excluding FreeCAD.
This commit is contained in:
forbes
2026-01-28 22:19:36 -06:00
parent f424f0e499
commit e02d0db326

View File

@@ -142,12 +142,18 @@ jobs:
run: |
# Create a bundled environment with all dependencies (like AppImage)
# The .deb needs all libraries bundled since we can't rely on system packages
# We need BOTH the pixi environment (dependencies) AND the built FreeCAD
BUNDLE_DIR="build/release/bundle"
mkdir -p "${BUNDLE_DIR}"
echo "Copying pixi environment..."
echo "Copying pixi environment (dependencies)..."
cp -a .pixi/envs/default/* "${BUNDLE_DIR}/"
echo "Original size: $(du -sh ${BUNDLE_DIR} | cut -f1)"
echo "After pixi copy: $(du -sh ${BUNDLE_DIR} | cut -f1)"
echo "Copying built FreeCAD into bundle..."
# Copy the built FreeCAD (bin, lib, Mod, share, etc.) over the pixi env
cp -a build/release/install/* "${BUNDLE_DIR}/"
echo "After FreeCAD copy: $(du -sh ${BUNDLE_DIR} | cut -f1)"
# Remove unnecessary files to reduce size significantly
echo "Removing unnecessary files..."
@@ -166,22 +172,14 @@ jobs:
# Remove static libraries and dev files
find "${BUNDLE_DIR}" -name "*.a" -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.la" -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.h" -type f -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.hpp" -type f -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.cmake" -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -path "*/__pycache__/*" -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.pyc" -delete 2>/dev/null || true
find "${BUNDLE_DIR}" -name "*.pyo" -delete 2>/dev/null || true
# Keep only necessary binaries
if [ -d "${BUNDLE_DIR}/bin" ]; then
mv "${BUNDLE_DIR}/bin" "${BUNDLE_DIR}/bin_tmp"
mkdir "${BUNDLE_DIR}/bin"
for bin in FreeCAD FreeCADCmd freecad freecadcmd python python3 python3.11 ccx gmsh dot pip pyside6-rcc; do
[ -f "${BUNDLE_DIR}/bin_tmp/${bin}" ] && cp -a "${BUNDLE_DIR}/bin_tmp/${bin}" "${BUNDLE_DIR}/bin/" || true
done
rm -rf "${BUNDLE_DIR}/bin_tmp"
fi
# List what's in bin to verify FreeCAD is there
echo "Binaries in bundle:"
ls -la "${BUNDLE_DIR}/bin/" | head -20
echo "Final bundle size: $(du -sh ${BUNDLE_DIR} | cut -f1)"