message: Implemented post build steps to finalize Mac dmg
diff: @@ -800,9 +800,76 @@ CORES_TO_USE=${CORES_TO_USE} cmake \
  rtc=$?
  info ""
  if [[ ${rtc} = 0 ]]; then
  - info " -> Finished: ${BUILD_DIR}/aliaswallet/Alias.dmg"
  + info " -> Finished pure build of Alias.dmg"
  else
  die 50 " => Creation of Alias.dmg failed with return code ${rtc}"
  fi
  +info ""
  +info "Performing post build steps:"
  +info "============================"
  +
  +cd ${BUILD_DIR}/aliaswallet/
  +cp Alias.dmg Alias.dmg.bak
  +
  +info "Change permision of .dmg file"
  +hdiutil convert "Alias.dmg" -format UDRW -o "Alias_Rw.dmg"
  +info " -> Done"
  +
  +info "Mount it and save the device"
  +PATH_AT_VOLUME=/Volumes/Alias
  +DEVICE=$(hdiutil attach -readwrite -noverify "Alias_Rw.dmg" | grep ${PATH_AT_VOLUME} | awk '{print $1}')
  +info " -> Done (${DEVICE})"
  +
  +sleep 2
  +
  +info "Create symbolic link to application folder"
  +pushd "$PATH_AT_VOLUME"
  +ln -s /Applications
  +popd
  +info " -> Done"
  +
  +#info "Copy background image in to package"
  +#mkdir "$PATH_AT_VOLUME"/.background
  +#cp backgroundImage.png "$PATH_AT_VOLUME"/.background/
  +#info " -> Done"
  +
  +info "Resize window, set background, change icon size, place icons in the right position, etc."
  +echo '
  + tell application "Finder"
  + tell disk "Alias" ## check Path inside cd /Volume/
  + open
  + set current view of container window to icon view
  + set toolbar visible of container window to false
  + set statusbar visible of container window to false
  + set the bounds of container window to {400, 100, 1200, 650}
  + set viewOptions to the icon view options of container window
  + set arrangement of viewOptions to not arranged
  + set icon size of viewOptions to 200
  + ## set background picture of viewOptions to file ".background:backgroundImage.png"
  + set position of item "Alias.app" of container window to {180, 200}
  + set position of item "Applications" of container window to {620, 200}
  + close
  + open
  + update without registering applications
  + delay 2
  + end tell
  + end tell
  +' | osascript
  +info " -> Done"
  +
  +sync
  +
  +info "Unmount"
  +hdiutil detach "${DEVICE}"
  +info " -> Done"
  +
  +info "Cleanup and convert"
  +rm -f "Alias.dmg"
  +hdiutil convert "Alias_Rw.dmg" -format UDZO -o "Alias.dmg"
  +rm -f "Alias_Rw.dmg"
  +info " -> Done"
  +
  +info " -> Finished: ${BUILD_DIR}/aliaswallet/Alias.dmg"
  +
  cd "${callDir}" || die 1 "Unable to cd back to where we came from (${callDir})"
  