From 45c9f6b2ff63ccd81c4826a32dab05a98f89968f Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 23 Jul 2015 18:27:07 +0200 Subject: [PATCH] =?UTF-8?q?don=E2=80=99t=20bother=20to=20set=20OSX=20DMG?= =?UTF-8?q?=20icon=20on=20old=20systems?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `sips -i` fails on 10.5 and SetFile does not work even if the resource file is provided. --- tools/osx_packaging/osx_build | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index 5a30628c02..72234dcf89 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -769,6 +769,7 @@ hdiutil eject "${DiskDevice}" || true # Create a read-only version, use zlib compression hdiutil convert -format UDZO "${TMPDMG}" -imagekey zlib-level=9 -o "${UC_DMG}" +if test $(sw_vers -productVersion | cut -d '.' -f 2) -gt 5; then echo "setting file icon ..." cp ${PRODUCT_PKG_DIR}/$Resources/appIcon.icns ${ICNSTMP}.icns @@ -778,6 +779,8 @@ Rez -append ${ICNSTMP}.rsrc -o "$UC_DMG" SetFile -a C "$UC_DMG" rm ${ICNSTMP}.icns ${ICNSTMP}.rsrc +fi + rm -rf ${PRODUCT_PKG_DIR} echo