#!/bin/bash
#
# Make Isabelle application bundle

THIS="$(cd "$(dirname "$0")"; pwd)"

COCOADIALOG_APP="/Applications/CocoaDialog.app"

/usr/local/bin/platypus \
  -a Isabelle -u Isabelle \
  -I "de.tum.in.isabelle" \
  -i "$THIS/../isabelle.icns" \
  -D -X thy \
  -Q "$THIS/../theory.icns" \
  -p /bin/bash \
  -R \
  -o None \
  -f "$COCOADIALOG_APP" \
  "$THIS/script" \
  "$PWD/Isabelle.app"

rm -f Contents/Resources/Isabelle
ln -s Contents/Resources/Isabelle Isabelle.app/Isabelle