Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Shipping a Self-Contained macOS App: How 24 Homebrew dylibs Broke My DeepSeek Harness Installer

Description and use

The author built a self‑contained macOS installer for DeepSeek Harness, fixing a crash caused by 24 Homebrew dylibs linked via absolute paths. By copying the libraries, rewriting paths to @loader_path, and re‑signing, the app ran on clean Macs, shrank from 792 MB to 620 MB, and included three extra plugins.

Problem

An Electron‑based macOS installer for DeepSeek Harness failed on clean Macs because the bundled Node binary linked 24 Homebrew‑provided dynamic libraries via absolute paths, causing the app to terminate instantly with no logs.

Outcome

The app became truly self‑contained, ran on clean macOS installations, reduced size, and shipped additional plugins.

Workflow

  • 1. Run otool -L on the bundled Node to list all linked dylibs.
  • 2. Recursively scan each dylib for further dependencies using a custom scan() script.
  • 3. Copy every discovered dylib into the app’s runtime/lib/ directory.
  • 4. Use install_name_tool -change to rewrite absolute Homebrew paths to relative @loader_path references.
  • 5. Manually handle libraries referenced via @rpath (e.g., ICU, brotli) by copying them and updating the path.
  • 6. Re‑sign the modified binaries with codesign --force --deep --sign -.
  • 7. Verify no remaining Homebrew paths with otool -L and test the installer on a clean Mac.

Evidence

otool -L revealed 24 dynamic libraries linked by absolute Homebrew paths.

Source

Fixing it meant copying every dylib into the app bundle, rewriting paths to @loader_path, and re‑signing.

Source

The installer got smaller (792 MB → 620 MB) while gaining three plugins.

Source

  • Record date: 2026-09-21T07:45:25.944Z