Skip to content

Add macOS build/support and packaging#11

Open
ashleycox wants to merge 1 commit into
tdeck:mainfrom
ashleycox:MacOS
Open

Add macOS build/support and packaging#11
ashleycox wants to merge 1 commit into
tdeck:mainfrom
ashleycox:MacOS

Conversation

@ashleycox
Copy link
Copy Markdown

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.

  • 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.

Hopefully this suits the project. I'll work on a UI next.

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.
@ashleycox ashleycox requested a review from tdeck as a code owner May 12, 2026 15:51
@tdeck
Copy link
Copy Markdown
Owner

tdeck commented May 12, 2026

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?

@ashleycox
Copy link
Copy Markdown
Author

Because PyInstaller’s macOS collection step tried to treat the nested .app bundles like part of its own frozen app payload. That caused problems with macOS bundle handling and signing/rewriting of nested Mach-O/framework files, especially inside OpenSCAD.app.

Essentially, PyInstaller does extra macOS-specific processing on anything it bundles, including executable files and frameworks. The OpenSCAD and PrusaSlicer .app bundles are already complete macOS apps, so we do not want PyInstaller to inspect or modify their internal files.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants