Skip to content

feat: add app bundle script and app icon - #4

Closed
petercrocker wants to merge 1 commit into
phalladar:mainfrom
petercrocker:feat/app-bundle-and-icon
Closed

petercrocker wants to merge 1 commit into
phalladar:mainfrom
petercrocker:feat/app-bundle-and-icon

Conversation

@petercrocker

Copy link
Copy Markdown
Contributor

Summary

MacDirStat currently only runs via swift run, so it never appears in /Applications, Launchpad or Spotlight, and has no icon. This adds a one-command way to build and install it as a proper macOS app.

Key Changes

  • scripts/bundle-app.sh --install builds a release binary, wraps it in MacDirStat.app with an Info.plist and icon, ad-hoc signs it and installs it to /Applications
  • New full-bleed treemap app icon (Resources/AppIcon.iconset), converted to .icns at build time so macOS applies its own icon mask
  • Each build gets a unique CFBundleVersion, so macOS icon caches don't serve a stale icon after reinstalling
  • README: install instructions, Xcode recommendation (some Command Line Tools releases lack the SwiftUIMacros plugin that recent SwiftUI SDKs need), and a fix for the cd macdirstat case in the clone steps

Documentation Updates

  • README: new Requirements, Install as an app, and Run from source sections; Project Structure lists Resources/ and scripts/

Test Plan

  • scripts/bundle-app.sh produces build/MacDirStat.app; codesign --verify --strict passes and plutil -lint passes on the generated Info.plist
  • scripts/bundle-app.sh --install, then launch from /Applications: icon shows in Finder, Dock and Cmd-Tab
  • Tested on the macOS 27 beta with Xcode beta. Not tested on macOS 15, where the full-bleed icon is likely shown unmasked (square corners)

Note: the icon artwork was generated with OpenAI's image generation tool.

🤖 Generated with Claude Code

Add scripts/bundle-app.sh, which builds a release binary, wraps it in a
minimal MacDirStat.app with an Info.plist and icon, ad-hoc signs it and
optionally installs it to /Applications. Each build gets a unique
CFBundleVersion so macOS icon caches keyed on bundle ID and version do
not serve a stale icon after reinstalling.

Add a full-bleed treemap app icon as an iconset; the script converts it
to .icns with iconutil so macOS applies its own icon mask.

Document app installation, the Xcode requirement for SDKs whose SwiftUI
needs the SwiftUIMacros plugin, and fix the clone directory case.
@petercrocker
petercrocker marked this pull request as ready for review October 3, 2026 10:10
@phalladar

Copy link
Copy Markdown
Owner

Thanks for putting this together, @petercrocker! Since you opened this, main has gained scripts/build-app.sh (#7) for building the .app, and we've gone with a different icon (#9), so I'm closing this as superseded. Your Full Disk Access banner from #5 has been rebased onto main without this commit.

@phalladar phalladar closed this Oct 3, 2026
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