Skip to content

armgit / chops

Public Imported from GitHub
0

Your AI agent skills, finally organized. A macOS app to browse, edit, and manage skills across Claude Code, Cursor, Codex, Windsurf, and Amp.

feat: add drag-to-Applications DMG installer

Nick Gurneyf9e79390cd61
diff --git a/scripts/dmg-background.png b/scripts/dmg-background.png
new file mode 100644
index 0000000..4f87148
Binary files /dev/null and b/scripts/dmg-background.png differ
diff --git a/scripts/release.sh b/scripts/release.sh
index d9af815..938b83c 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -9,6 +9,58 @@ SIGNING_IDENTITY="Developer ID Application: Sabotage Media, LLC ($TEAM_ID)"
APPLE_ID="[email protected]"
BUNDLE_ID="com.joshpigford.Chops"
+create_chops_dmg() {
+ rm -f build/Chops.dmg build/Chops_rw.dmg
+
+ # Create writable DMG from the app (temp volume name avoids Gatekeeper collision)
+ hdiutil create -volname "Chops Installer" -srcfolder build/export/Chops.app -fs HFS+ -format UDRW build/Chops_rw.dmg
+
+ # Mount, add Applications symlink and background, apply Finder styling
+ hdiutil attach build/Chops_rw.dmg
+ ln -s /Applications "/Volumes/Chops Installer/Applications"
+ mkdir -p "/Volumes/Chops Installer/.background"
+ cp scripts/dmg-background.png "/Volumes/Chops Installer/.background/background.png"
+
+ osascript <<'APPLESCRIPT'
+tell application "Finder"
+ tell disk "Chops Installer"
+ open
+ tell container window
+ set current view to icon view
+ set toolbar visible to false
+ set statusbar visible to false
+ set the bounds to {200, 120, 990, 600}
+ end tell
+ set opts to the icon view options of container window
+ tell opts
+ set icon size to 128
+ set text size to 13
+ set arrangement to not arranged
+ set background picture to POSIX file "/Volumes/Chops Installer/.background/background.png"
+ end tell
+ set position of item "Chops.app" to {195, 220}
+ set position of item "Applications" to {595, 220}
+ set the extension hidden of item "Chops.app" to true
+ close
+ open
+ delay 1
+ tell container window
+ set the bounds to {200, 120, 980, 590}
+ end tell
+ delay 1
+ tell container window
+ set the bounds to {200, 120, 990, 600}
+ end tell
+ delay 3
+ end tell
+end tell
+APPLESCRIPT
+
+ hdiutil detach "/Volumes/Chops Installer"
+ hdiutil convert build/Chops_rw.dmg -format UDZO -o build/Chops.dmg
+ rm -f build/Chops_rw.dmg
+}
+
echo "πŸ”¨ Building Chops v$VERSION..."
# Generate Xcode project
@@ -37,10 +89,7 @@ xcodebuild -exportArchive \
-exportPath build/export
echo "πŸ“¦ Creating DMG..."
-hdiutil create -volname "Chops" \
- -srcfolder build/export/Chops.app \
- -ov -format UDZO \
- build/Chops.dmg
+create_chops_dmg
echo "πŸ” Notarizing..."
xcrun notarytool submit build/Chops.dmg \
@@ -49,11 +98,7 @@ xcrun notarytool submit build/Chops.dmg \
echo "πŸ“Ž Stapling..."
xcrun stapler staple build/export/Chops.app
-rm build/Chops.dmg
-hdiutil create -volname "Chops" \
- -srcfolder build/export/Chops.app \
- -ov -format UDZO \
- build/Chops.dmg
+create_chops_dmg
xcrun stapler staple build/Chops.dmg || echo "⚠️ DMG staple failed (normal β€” CDN propagation delay). App inside is stapled."
echo "🏷️ Tagging v$VERSION..."