Skip to content
Browse files

Use ImageMagick if available instead of sips to avoid "Unsupported ou…

…tput format com.apple.icns" error
  • Loading branch information...
1 parent facf159 commit 884f4bba5bf012636fb1902830ffa5efe2295a68 @0xced 0xced committed Feb 20, 2010
Showing with 7 additions and 2 deletions.
  1. +7 −2 Source/Bundler/bundle-tool.sh
View
9 Source/Bundler/bundle-tool.sh
@@ -123,8 +123,13 @@ populate_meta_data () {
check_error "Could not create temporary file for Icon resampling" ${DESTINATION_WRITE_FAILED}
# Convert the icon. If we were really cool, we'd support applying the same effects that Apple
- # does.
- /usr/bin/sips --resampleWidth 128 -s format icns "${APP_ICON}" --out "${APP_DEST}/${ICNS_FILE}"
+ # does. Use ImageMagick if available.
+ local convert=`which convert`
+ if [ ! -z "$convert" ]; then
+ $convert "${APP_ICON}" -resample 128x128 "${APP_DEST}/${ICNS_FILE}"
+ else
+ /usr/bin/sips --resampleWidth 128 -s format icns "${APP_ICON}" --out "${APP_DEST}/${ICNS_FILE}"
+ fi
check_error "Failed to convert application icon" ${DESTINATION_WRITE_FAILED}
# Clean up

0 comments on commit 884f4bb

Please sign in to comment.
Something went wrong with that request. Please try again.