don’t bother to set OSX DMG icon on old systems
authorRobin Gareus <robin@gareus.org>
Thu, 23 Jul 2015 16:27:07 +0000 (18:27 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 23 Jul 2015 16:27:07 +0000 (18:27 +0200)
`sips -i` fails on 10.5 and SetFile does not work even if
the resource file is provided.

tools/osx_packaging/osx_build

index 5a30628c02454261fc3d012e6d6c9c09259bd4b7..72234dcf89ddb89def4dfae078ae0cdfb069411a 100755 (executable)
@@ -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