#!/bin/sh

#  WARNING:
#    This script is deprecated, and probably doesn't even work any more. It's
#   here just in case there's anyone out there that still needs it. It will be
#   removed in 0.10.
qmake psi.pro
make

mkdir dmg
mv src/psi.app dmg/Psi.app
mkdir -p dmg/Psi.app/Contents/Frameworks
cp -f /Developer/qt/lib/libqt-mt.3.dylib dmg/Psi.app/Contents/Frameworks
cp -f README COPYING dmg

strip dmg/Psi.app/Contents/MacOS/psi

install_name_tool -id @executable_path/../Frameworks/libqt-mt.3.dylib dmg/Psi.app/Contents/Frameworks/libqt-mt.3.dylib

install_name_tool -change libqt-mt.3.dylib @executable_path/../Frameworks/libqt-mt.3.dylib dmg/Psi.app/Contents/MacOS/psi

