Add macOS build/support and packaging#11
Conversation
Add macOS support for bundled OpenSCAD/PrusaSlicer and release builds. Changes include: - Add deps/macos compressed app archives and .gitignore rules to ignore macOS bundles and .DS_Store. - Extend scripts/get_deps.sh to download/extract macOS DMGs, copy apps from /Applications when available, and archive .app bundles; make it cross-platform (linux|windows|macos|all). - Add scripts/macos_build.sh to run PyInstaller on macOS, extract bundled apps if needed, and package the dist archive. - Update 3dm.spec to include common datas list, avoid bundling the deps dir on Darwin, and fix a hidden import name. - Update utils/bundle_paths.py to recognize Darwin and point to macOS app executable paths. - Add macholib to Pipfile (and lockfile) for macOS PyInstaller builds. - Update README and docs/developer.md to mention macOS release artifacts and build steps. - Add AGENTS.md (guidance for Codex, replicates existing claude.md) and small e2e_test.py fix to consume POST body when present.
|
Thanks for figuring this out! It's late here in Japan but I will take a closer look in the next day or two. One thing I was confused about though - why is the deps dir for MacOS excluded from the PyInstaller archive? |
|
Because PyInstaller’s macOS collection step tried to treat the nested Essentially, PyInstaller does extra macOS-specific processing on anything it bundles, including executable files and frameworks. The OpenSCAD and PrusaSlicer When PyInstaller included them directly, it started treating their contents as pieces of 3DMake itself, which caused packaging/signing problems. The build script avoids that by letting PyInstaller build 3DMake first, then copying the OpenSCAD and PrusaSlicer apps into the finished release unchanged. The final release archive still contains the macOS deps in the expected runtime location. They are excluded only from PyInstaller’s own processing step, not from the shipped release. This keeps PyInstaller from modifying or trying to sign third-party app bundles. |
A much cleaner MacOS build implementation which duplicates the existing setup for windows and linux. I have bundled compressed MacOS deps but the script can also download them. tested on a clean MacOS install. Note that a preemptive MacOS download link was added in the readme, feel free to remove those as you see fit.
Hopefully this suits the project. I'll work on a UI next.