2012-04-04 21:12:52 +02:00
|
|
|
#!/bin/bash
|
2012-04-05 09:36:37 +02:00
|
|
|
#
|
|
|
|
# Usage: ./macdeploy.sh [<full-path-to-macdeployqt>]
|
2014-02-05 01:37:26 +01:00
|
|
|
#
|
2012-04-05 09:36:37 +02:00
|
|
|
# macdeployqt is usually located in QTDIR/bin/macdeployqt
|
|
|
|
# If path to macdeployqt is not specified, using it from PATH
|
|
|
|
|
2014-02-05 01:37:26 +01:00
|
|
|
MACDEPLOYQT="macdeployqt"
|
2012-04-04 23:28:19 +02:00
|
|
|
LIBRARY_NAME="libQupZilla.1.dylib"
|
2012-04-04 21:12:52 +02:00
|
|
|
|
2012-04-05 09:36:37 +02:00
|
|
|
if [ -n "$1" ]; then
|
2014-02-05 01:37:26 +01:00
|
|
|
MACDEPLOYQT=$1
|
2012-04-04 21:12:52 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
# cd to directory with bundle
|
2012-04-05 09:36:37 +02:00
|
|
|
test -d bin || cd ..
|
|
|
|
cd bin
|
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
|
2014-02-05 01:37:26 +01:00
|
|
|
$MACDEPLOYQT QupZilla.app
|
|
|
|
|
|
|
|
# create final dmg image
|
|
|
|
./create_dmg.sh
|
|
|
|
|