Skip to content

Commit bdee431

Browse files
authored
Generate macos logo file AppIcon.icns in generate-images.sh. (#174)
Copy macos logo file AppIcon.icns during publish to keep it up-to-date from ~/resources-images.
1 parent 7c23bf2 commit bdee431

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

resources/images/AppIcon.icns

1.91 MB
Binary file not shown.

resources/images/generate-images.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,20 @@ echo "Generated: favicon.png"
5050
# Generate favicon.ico (64x64) from logo-simple.png
5151
sips --resampleHeightWidth 64 64 "$SOURCE_SIMPLE" --setProperty format com.microsoft.ico --out "$SCRIPT_DIR/favicon.ico" > /dev/null
5252
echo "Generated: favicon.ico"
53+
54+
# Generate AppIcon.icns for macOS from logo-simple.png
55+
ICONSET_DIR="$SCRIPT_DIR/AppIcon.iconset"
56+
mkdir -p "$ICONSET_DIR"
57+
sips --resampleHeightWidth 16 16 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/icon_16x16.png" > /dev/null
58+
sips --resampleHeightWidth 32 32 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/[email protected]" > /dev/null
59+
sips --resampleHeightWidth 32 32 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/icon_32x32.png" > /dev/null
60+
sips --resampleHeightWidth 64 64 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/[email protected]" > /dev/null
61+
sips --resampleHeightWidth 128 128 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/icon_128x128.png" > /dev/null
62+
sips --resampleHeightWidth 256 256 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/[email protected]" > /dev/null
63+
sips --resampleHeightWidth 256 256 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/icon_256x256.png" > /dev/null
64+
sips --resampleHeightWidth 512 512 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/[email protected]" > /dev/null
65+
sips --resampleHeightWidth 512 512 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/icon_512x512.png" > /dev/null
66+
sips --resampleHeightWidth 1024 1024 "$SOURCE_SIMPLE" --out "$ICONSET_DIR/[email protected]" > /dev/null
67+
iconutil -c icns "$ICONSET_DIR" -o "$SCRIPT_DIR/AppIcon.icns"
68+
rm -rf "$ICONSET_DIR"
69+
echo "Generated: AppIcon.icns"
Binary file not shown.

src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Desktop/publish.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ if [[ "$RUNTIME" == osx-* ]]; then
9797
# Copy Info.plist
9898
cp "$SCRIPT_DIR/Info.plist" "$APP_DIR/Contents/Info.plist"
9999

100-
# Copy icon
101-
cp "$SCRIPT_DIR/AppIcon.icns" "$RESOURCES_DIR/AppIcon.icns"
100+
# Copy icon (generated by resources/images/generate-images.sh)
101+
cp "$SCRIPT_DIR/../../../../resources/images/AppIcon.icns" "$RESOURCES_DIR/AppIcon.icns"
102102

103103
# Move all published files into MacOS directory
104104
# (exclude the .app bundle itself to avoid recursion)

0 commit comments

Comments
 (0)