mirror of
https://invent.kde.org/network/falkon.git
synced 2024-11-14 02:52:12 +01:00
686ad7eee2
- Closes #2267
59 lines
1.3 KiB
Bash
Executable File
59 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Usage: ./macdeploy.sh <full-path-to-macdeployqt>
|
|
#
|
|
# macdeployqt is usually located in QTDIR/bin/macdeployqt
|
|
|
|
if [ -z "$1" ]; then
|
|
echo "Required parameter missing for full path to macdeployqt"
|
|
exit 1
|
|
fi
|
|
|
|
MACDEPLOYQT=$1
|
|
QTDIR="`dirname $MACDEPLOYQT`/.."
|
|
LIBRARY_NAME="libQupZilla.2.dylib"
|
|
PLUGINS="QupZilla.app/Contents/Resources/plugins"
|
|
QTPLUGINS="QupZilla.app/Contents/PlugIns"
|
|
|
|
# cd to directory with bundle
|
|
test -d bin || cd ..
|
|
cd bin
|
|
|
|
# copy libQupZilla into bundle
|
|
cp $LIBRARY_NAME QupZilla.app/Contents/MacOS/
|
|
|
|
# copy all QupZilla plugins into bundle
|
|
test -d $PLUGINS || mkdir $PLUGINS
|
|
cp plugins/*.dylib $PLUGINS/
|
|
|
|
# fix libQupZilla
|
|
install_name_tool -change $LIBRARY_NAME @executable_path/$LIBRARY_NAME QupZilla.app/Contents/MacOS/QupZilla
|
|
|
|
# fix plugins
|
|
for plugin in $PLUGINS/*.dylib
|
|
do
|
|
install_name_tool -change $LIBRARY_NAME @executable_path/$LIBRARY_NAME $plugin
|
|
done
|
|
|
|
# copy known, missing, Qt native library plugins into bundle
|
|
#
|
|
# See:
|
|
# * http://code.qt.io/cgit/qt/qttools.git/tree/src/macdeployqt/shared/shared.cpp#n1044
|
|
#
|
|
mkdir -p $QTPLUGINS
|
|
|
|
FILE="$QTDIR/plugins/iconengines/libqsvgicon.dylib"
|
|
if [ -f "$FILE" ]; then
|
|
cp $FILE $QTPLUGINS/
|
|
else
|
|
echo "$FILE: No such file"
|
|
exit 1
|
|
fi
|
|
|
|
# run macdeployqt
|
|
$MACDEPLOYQT QupZilla.app -qmldir=$PWD/../src/lib/data/data
|
|
|
|
# create final dmg image
|
|
cd ../mac
|
|
./create_dmg.sh
|