Skip to content

Add macOS DMG installer support - #49

Merged
djankov merged 1 commit into
mainfrom
feat/macos-dmg-installer
May 1, 2026
Merged

djankov merged 1 commit into
mainfrom
feat/macos-dmg-installer

Conversation

@djankov

@djankov djankov commented Apr 30, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Extends the OS dispatch from Windows installer support + audit v0.1 Linux-hardcoding (OS dispatch refactor) #37 with a macos branch that downloads the signed gmat-mac-x64-{V}.dmg from SourceForge (URL template per macOS DMG installer support #38), mounts it via hdiutil, copies the resolved GMAT root off the read-only mount, detaches in finally, and hands off to the existing BuildApiStartupFile.py + smoke-check pipeline unchanged.
  • Mountpoint and intermediate staging dir live under RUNNER_TEMP with random suffixes so self-hosted runners stay clean and concurrent extracts can't collide. The finally-block detach plus io.rmRF on the mountpoint guarantees no stranded mounts even when cp -R fails.
  • The DMG's wrapper-folder name is not deterministic across versions, so the GMAT root is resolved by locating BuildApiStartupFile.py inside the mount and walking up two levels — same robust pattern gmat-run's working macOS CI uses.
  • hdiutil attach runs with -nobrowse -readonly -noautoopen and an explicitly empty stdin (Buffer.alloc(0)) to defend against any interactive license-acceptance prompt blocking the runner.
  • Per-version size floors: R2026a 400 MiB (matches the charter's "≥ 400 MB" line and the actual ~455 MiB DMG); R2022a/R2025a get conservative 350/380 MiB truncation guards since I don't have verified archive sizes for those.
  • v0.1 generalization audit: path.join is already used everywhere, io.which('python', true) resolves the same way on macOS as on Linux, RUNNER_TEMP is set on hosted macOS runners, and cache.ts reads RUNNER_OS/RUNNER_ARCH directly so the cache key picks up macOS-X64 (or ARM64 under Rosetta) for free. cp -R on BSD cp preserves symlinks, and Mach-O code signatures live inside the binaries themselves so universal binaries and signed dylibs survive the copy without extra flags.
  • Updates README.md and the docs landing surface (index, getting-started, faq) to reflect macOS support and rolls macOS into the v0.2 roadmap row.
  • Rebuilds dist/ so the Verify dist/ matches src/ CI step stays green.

Cross-platform self-CI for macos-latest is intentionally not added here — that's #40's scope.

Test plan

  • npm run format:check clean.
  • npm run lint clean.
  • npm run typecheck clean.
  • npm run build clean; git diff dist/ clean after rebuild.
  • CI: build and self-test jobs pass on the PR.
  • macOS runtime verification deferred to Cross-platform self-CI matrix (3 OS × 3 versions) #40's macos-latest matrix self-test — no live macOS runner in this workspace.

Closes #38

Extends the OS dispatcher introduced in #37 with a macos branch:

- src/os.ts: accept RUNNER_OS=macOS, drop the unsupported-OS error.
- src/download.ts: gmat-mac-x64-{V}-signed.dmg URL template with
  per-version size thresholds (R2026a floor 400 MiB matches the
  charter and the actual ~455 MiB DMG; R2022a/R2025a are conservative
  truncation guards).
- src/extract.ts: hdiutil attach -nobrowse -readonly -noautoopen on a
  unique mountpoint under RUNNER_TEMP, locate the GMAT root inside the
  mount via find BuildApiStartupFile.py (the wrapper folder name is
  not deterministic across versions), cp -R off the read-only mount
  into a writable staging dir, then hdiutil detach in finally so a
  failed copy still releases the mount on self-hosted runners.

Closes #38
@djankov
djankov marked this pull request as ready for review May 1, 2026 00:01
@djankov
djankov merged commit c3bf497 into main May 1, 2026
4 checks passed
@djankov
djankov deleted the feat/macos-dmg-installer branch May 1, 2026 00:02
djankov added a commit that referenced this pull request May 1, 2026
- docs/troubleshooting.md: three new sections for platform-specific failure modes from the Windows (#48) and macOS (#49) installer paths — hdiutil attach failures (busy mountpoint, truncated DMG, permission), the hdiutil detach warning that leaves a stale mountpoint on killed self-hosted runners, and Windows ZIP extraction failures (path-length under MAX_PATH=260 on self-hosted runners). Existing "python is not on PATH" section gets a Windows-specific note covering the WindowsApps store-stub interception and the unpublished-python-version case.
- docs/faq.md: new "Are there OS-specific Python gotchas?" entry summarising per-OS quirks, and a dedicated "What about R2023a and R2024a?" entry. The supported-versions entry links to it instead of restating.

Closes #45
djankov added a commit that referenced this pull request May 1, 2026
- README quick start: matrix is now 3-OS (ubuntu/windows/macos) on a single GMAT version, replacing the single-OS single-version stub. Adds a pointer to the multi-version compatibility recipe for consumers who want to vary GMAT version too.
- README roadmap: drops the now-shipped v0.2 row (scope landed in #48/#49/#50/#51/#52) and relabels the new top row as v0.2 (current).
- docs/inputs-outputs.md: version input description gains a one-line note that R2023a/R2024a were never released, linking to the canonical FAQ entry. gmat-root output description drops the stale "in v0.1" qualifier (the path is the same in v0.2).
- docs/faq.md: download-verification entry drops the "in v0.1" qualifier — the action still does not verify a checksum or signature in v0.2; supply-chain hardening remains on the v0.3 roadmap.

Closes #43
@djankov djankov mentioned this pull request May 1, 2026
2 of 6 tasks
djankov added a commit that referenced this pull request May 1, 2026
- Populate CHANGELOG.md with the [0.2.0] - 2026-05-01 section, aggregated from the 11 merged v0.2 PRs (#47, #48, #49, #50, #51, #52, #53, #55, #56, #57, #58).
- Bump package.json version from 0.1.0 to 0.2.0.

The v0.2 row in the README roadmap was already trimmed-and-relabelled (`v0.2 _(current)_`) by #58 ahead of the cut, mirroring the v0.1 cut precedent (#35), so no README change is needed here.

Closes #46.
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.

macOS DMG installer support

1 participant