1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 02:36:34 +01:00

Mac: Create the bundle target and modify affected shell scripts (#2260)

This commit is contained in:
Marti Martz 2017-03-18 09:48:11 -06:00 committed by David Rosca
parent 44cd68e3d9
commit 621ed8ff28
6 changed files with 31 additions and 33 deletions

View File

@ -69,7 +69,7 @@ script:
before_deploy:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd $QZ_DIR;
./mac/macdeploy.sh $MACDEPLOYQT;
make bundle;
mv bin/QupZilla.dmg bin/QupZilla-${QZ_VER}.dmg;
fi

View File

@ -47,13 +47,9 @@ MAC OS X
You need to have Xcode from the Apple App Store installed in Applications, [Command Line Tools for the same Xcode version](https://developer.apple.com/) may be included depending on the version,
[Homebrew](http://brew.sh/), and `$ brew install openssl` for openssl.
Next compulsory requirement is Qt 5 (>= 5.8) with QtWebEngine.
After successful compilation, you need to build the application bundle and follow any
instructions that may be presented. You will do it with following command:
After successful compilation, you need to build the application bundle. You will do it with following command:
$ ./mac/macdeploy.sh [<path-to-macdeployqt>]
You need to specify path to macdeployqt (usually in QTDIR/bin/macdeployqt) only
if it is not in PATH.
$ make bundle
FreeBSD
----------------------------------------------------------------------------------

View File

@ -29,3 +29,9 @@ src_plugins.subdir = src/plugins
src_plugins.depends = sub-src-lib
SUBDIRS += src_lib src_main src_plugins
mac: {
macdeploysh.target = bundle
macdeploysh.commands = mac/macdeploy.sh $$[QT_INSTALL_BINS]/macdeployqt
QMAKE_EXTRA_TARGETS += macdeploysh
}

View File

@ -55,9 +55,7 @@ On Linux/Unix: To install QupZilla, run this command: (it may be necessary to ru
On Mac OS X: To deploy QupZilla in dmg image, run this command:
$ ./mac/macdeploy.sh full-path-to-macdeployqt
You need to specify path to `macdeployqt` only if it is not in PATH.
$ make bundle
Current version
----------------------------------------------------------------------------------------

View File

@ -45,7 +45,7 @@ hdiutil create -size 200m "$TMP/$WORK_TEMPLATE" -type SPARSE -fs HFS+ -volname "
cp -fpR "$BUNDLE_PATH/QupZilla.app/Contents" "$TMP/$VOLUME_TEMPLATE/QupZilla.app"
echo "Blessing folder to automatically open on mount…"
bless -folder "$TMP/$VOLUME_TEMPLATE" --openfolder "$TMP/$VOLUME_TEMPLATE"
bless --folder "$TMP/$VOLUME_TEMPLATE" --openfolder "$TMP/$VOLUME_TEMPLATE"
echo "Detaching working disk image template from write…"
hdiutil detach "$TMP/$VOLUME_TEMPLATE"

View File

@ -1,19 +1,20 @@
#!/bin/bash
#
# Usage: ./macdeploy.sh [<full-path-to-macdeployqt>]
# Usage: ./macdeploy.sh <full-path-to-macdeployqt>
#
# macdeployqt is usually located in QTDIR/bin/macdeployqt
# If path to macdeployqt is not specified, using it from PATH
MACDEPLOYQT="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"
if [ -n "$1" ]; then
MACDEPLOYQT=$1
fi
# cd to directory with bundle
test -d bin || cd ..
cd bin
@ -34,22 +35,19 @@ do
install_name_tool -change $LIBRARY_NAME @executable_path/$LIBRARY_NAME $plugin
done
if [ -z ${QTDIR+x} ]; then
printf '\nPlease set the environment variable for the Qt platform folder.\n\texample:\n\t$ export QTDIR="$HOME/Qt/5.8/clang_64"\n'
exit 1
else
printf '\nCopying known, missing, Qt native library plugins to target bundle...\n'
# 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
mkdir -p $QTPLUGINS
FILE="$QTDIR/plugins/iconengines/libqsvgicon.dylib"
if [ -f "$FILE" ]; then
FILE="$QTDIR/plugins/iconengines/libqsvgicon.dylib"
if [ -f "$FILE" ]; then
cp $FILE $QTPLUGINS/
else
else
echo "$FILE: No such file"
exit 1
fi
fi
# run macdeployqt