Skip to content

Commit 9024d78

Browse files
committed
🐛 fix: restore full app icon after build to fix missing DMG icon
Xcode's asset catalog compiler strips larger icon sizes (256, 512, 1024px) from the AppIcon.icns file during build. This caused the app to appear without an icon in the DMG window, which displays icons at 80px. The fix copies the full source icon (with all sizes 16-1024px) over the stripped version after the build completes.
1 parent ccf8b24 commit 9024d78

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

build-release.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ build_for_arch() {
132132
exit 1
133133
fi
134134

135+
# Fix app icon - Xcode strips larger sizes from icns in asset catalogs
136+
# Copy the full source icon to ensure all sizes (16-1024px) are included
137+
SOURCE_ICON="TablePro/Assets.xcassets/AppIcon.appiconset/AppIcon.icns"
138+
DEST_ICON="$BUILD_DIR/$OUTPUT_NAME/Contents/Resources/AppIcon.icns"
139+
if [ -f "$SOURCE_ICON" ]; then
140+
echo "🎨 Restoring full app icon (Xcode strips large sizes from asset catalog)..."
141+
if cp "$SOURCE_ICON" "$DEST_ICON"; then
142+
echo " ✅ Full icon restored ($(ls -lh "$SOURCE_ICON" | awk '{print $5}'))"
143+
else
144+
echo " ⚠️ WARNING: Could not copy icon, DMG may have missing icon"
145+
fi
146+
else
147+
echo " ⚠️ WARNING: Source icon not found at $SOURCE_ICON"
148+
fi
149+
135150
# Verify binary exists inside the copied bundle
136151
BINARY_PATH="$BUILD_DIR/$OUTPUT_NAME/Contents/MacOS/TablePro"
137152
if [ ! -f "$BINARY_PATH" ]; then

0 commit comments

Comments
 (0)