mkapp

command
v0.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

mkapp builds the macOS .app bundle on plain Linux — pure stdlib, no Xcode, no codesign. It stitches the two darwin cross-builds Go already produces (make darwin/amd64 + darwin/arm64) into one universal (fat) Mach-O, renders the icns icon set from internal/art, writes the Info.plist, and packs the bundle into a deterministic zip — same contract as tools/mkdeb / tools/mkipa:

CGO_ENABLED=0 go run ./tools/mkapp -version v0.3.3 \
  -amd64 dist/mario-darwin-amd64 -arm64 dist/mario-darwin-arm64 \
  -universal dist/mario-darwin-universal \
  -out dist/mario_0.3.3_macos.app.zip

The fat container is assembled by hand per <mach-o/fat.h>: a big-endian fat_header (magic 0xcafebabe, nfat_arch) followed by big-endian fat_arch records (cputype, cpusubtype, offset, size, align = log2 of the slice alignment), x86_64 slice first, each slice padded to its 2^align boundary (4 KiB / 16 KiB — dyld maps slices at page-aligned file offsets). The bundle is unsigned (no Developer ID): Gatekeeper shows the right-click → Open dialog on first launch; the arm64 slice is already ad-hoc signed by the Go linker.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL