2012-04-04 21:12:52 +02:00
|
|
|
#!/bin/bash
|
|
|
|
COMMAND=$1
|
2012-04-04 23:28:19 +02:00
|
|
|
LIBRARY_NAME="libQupZilla.1.dylib"
|
2012-04-04 21:12:52 +02:00
|
|
|
|
|
|
|
if [ $COMMAND = "" ]; then
|
|
|
|
$COMMAND="macdeployqt"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# cd to directory with bundle
|
2012-04-04 23:28:19 +02:00
|
|
|
test -d build || cd ..
|
|
|
|
cd build
|
2012-04-04 21:12:52 +02:00
|
|
|
|
|
|
|
# copy libQupZilla into bundle
|
2012-04-04 23:28:19 +02:00
|
|
|
cp $LIBRARY_NAME QupZilla.app/Contents/MacOS/
|
2012-04-04 21:12:52 +02:00
|
|
|
|
|
|
|
# copy all plugins into bundle
|
|
|
|
test -d QupZilla.app/Contents/Resources/plugins || mkdir QupZilla.app/Contents/Resources/plugins
|
2012-04-04 23:28:19 +02:00
|
|
|
cp plugins/*.dylib QupZilla.app/Contents/Resources/plugins/
|
2012-04-04 21:12:52 +02:00
|
|
|
|
|
|
|
# fix libQupZilla
|
2012-04-04 23:28:19 +02:00
|
|
|
install_name_tool -change $LIBRARY_NAME @executable_path/$LIBRARY_NAME QupZilla.app/Contents/MacOS/QupZilla
|
2012-04-04 21:12:52 +02:00
|
|
|
|
|
|
|
# fix plugins
|
2012-04-04 23:28:19 +02:00
|
|
|
for plugin in QupZilla.app/Contents/Resources/plugins/*.dylib
|
2012-04-04 21:12:52 +02:00
|
|
|
do
|
2012-04-04 23:28:19 +02:00
|
|
|
install_name_tool -change $LIBRARY_NAME @executable_path/$LIBRARY_NAME $plugin
|
2012-04-04 21:12:52 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# run macdeployqt
|
|
|
|
$COMMAND QupZilla.app
|