2016-01-08 17:55:32 +00:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# if you run the build.sh script to build Subsurface you'll never need
|
|
|
|
# this, but if you build your binaries differently for some reason and
|
|
|
|
# you want to build Subsurface-mobile, running this from within the
|
|
|
|
# checked out source directory (not your build directory) should do the
|
|
|
|
# trick - you can also run this to update to the latest upstream when
|
|
|
|
# you don't want to rerun the whole build.sh script.
|
|
|
|
|
|
|
|
SRC=$(cd .. ; pwd)
|
|
|
|
|
2016-04-05 05:02:03 +00:00
|
|
|
if [ ! -d "$SRC/subsurface" ] || [ ! -d "mobile-widgets" ] || [ ! -d "core" ] ; then
|
2016-01-08 17:55:32 +00:00
|
|
|
echo "please start this script from the Subsurface source directory (which needs to be named \"subsurface\")."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2020-11-23 17:34:02 +00:00
|
|
|
# completely changing the Kirigami build, going down the path that the
|
|
|
|
# Kirigami developers favor, which is to install Kirigami and Breeze in
|
|
|
|
# a 3rdparty folder within our sources
|
|
|
|
./scripts/get-dep-lib.sh single "$SRC"/subsurface/mobile-widgets/3rdparty kirigami
|
|
|
|
./scripts/get-dep-lib.sh single "$SRC"/subsurface/mobile-widgets/3rdparty breeze-icons
|
|
|
|
|
|
|
|
|
|
|
|
exit 0
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-10 13:40:19 +00:00
|
|
|
# now bring in the latest Kirigami mobile components plus a couple of icons that we need
|
2016-01-08 17:55:32 +00:00
|
|
|
# first, get the latest from upstream
|
|
|
|
# yes, this is a bit overkill as we clone a lot of stuff for just a few files, but this way
|
|
|
|
# we stop having to manually merge our code with upstream all the time
|
|
|
|
# as we get closer to shipping a production version we'll likely check out specific tags
|
|
|
|
# or SHAs from upstream
|
2018-05-23 13:42:15 +00:00
|
|
|
./scripts/get-dep-lib.sh single .. kirigami
|
|
|
|
./scripts/get-dep-lib.sh single .. breeze-icons
|
2016-01-08 17:55:32 +00:00
|
|
|
|
|
|
|
# now copy the components and a couple of icons into plae
|
2016-04-05 05:02:03 +00:00
|
|
|
MC=$SRC/subsurface/mobile-widgets/qml/kirigami
|
2018-05-23 13:42:15 +00:00
|
|
|
PMMC=../kirigami
|
|
|
|
BREEZE=../breeze-icons
|
2016-01-08 17:55:32 +00:00
|
|
|
|
|
|
|
rm -rf $MC
|
|
|
|
mkdir -p $MC/icons
|
2016-03-31 23:10:24 +00:00
|
|
|
cp -R $PMMC/* $MC/
|
2016-04-01 21:40:07 +00:00
|
|
|
|
2018-03-08 19:16:24 +00:00
|
|
|
cp $BREEZE/icons/actions/22/map-globe.svg $MC/icons
|
2016-01-08 17:55:32 +00:00
|
|
|
cp $BREEZE/icons/actions/24/dialog-cancel.svg $MC/icons
|
|
|
|
cp $BREEZE/icons/actions/24/distribute-horizontal-x.svg $MC/icons
|
2020-03-20 19:20:43 +00:00
|
|
|
cp $BREEZE/icons-dark/actions/24/document-edit.svg $MC/icons
|
|
|
|
cp $BREEZE/icons-dark/actions/24/document-save.svg $MC/icons
|
2016-01-08 17:55:32 +00:00
|
|
|
cp $BREEZE/icons/actions/24/go-next.svg $MC/icons
|
|
|
|
cp $BREEZE/icons/actions/24/go-previous.svg $MC/icons
|
2017-06-22 15:52:33 +00:00
|
|
|
cp $BREEZE/icons/actions/24/go-up.svg $MC/icons
|
2016-01-08 17:55:32 +00:00
|
|
|
cp $BREEZE/icons/actions/16/view-readermode.svg $MC/icons
|
2016-01-09 05:48:53 +00:00
|
|
|
cp $BREEZE/icons/actions/24/application-menu.svg $MC/icons
|
2016-01-09 07:17:48 +00:00
|
|
|
cp $BREEZE/icons/actions/22/gps.svg $MC/icons
|
2016-01-09 07:16:19 +00:00
|
|
|
cp $BREEZE/icons/actions/24/trash-empty.svg $MC/icons
|
2018-10-27 07:21:40 +00:00
|
|
|
cp $BREEZE/icons/actions/24/edit-copy.svg $MC/icons
|
|
|
|
cp $BREEZE/icons/actions/24/edit-paste.svg $MC/icons
|
2016-04-02 03:30:28 +00:00
|
|
|
cp $BREEZE/icons/actions/24/list-add.svg $MC/icons
|
2016-06-12 14:31:14 +00:00
|
|
|
cp $BREEZE/icons/actions/22/handle-left.svg $MC/icons
|
2017-07-14 13:41:00 +00:00
|
|
|
cp $BREEZE/icons/actions/22/handle-right.svg $MC/icons
|
2017-10-10 04:09:54 +00:00
|
|
|
cp $BREEZE/icons/actions/22/overflow-menu.svg $MC/icons
|
2016-01-08 17:55:32 +00:00
|
|
|
|
2017-01-02 20:55:13 +00:00
|
|
|
# kirigami now needs the breeze-icons internally as well
|
|
|
|
pushd $MC
|
2018-05-23 13:42:15 +00:00
|
|
|
ln -s $SRC/breeze-icons .
|
2018-02-15 09:44:13 +00:00
|
|
|
|
2018-05-13 13:39:26 +00:00
|
|
|
# kirigami hack: passive notification hijacks area even after disabled.
|
|
|
|
# https://bugs.kde.org/show_bug.cgi?id=394204
|
|
|
|
sed -i -e "s/width: backgroundRect/enabled: root.enabled; width: backgroundRect/g" src/controls/templates/private/PassiveNotification.qml
|
|
|
|
|
2019-10-08 19:24:47 +00:00
|
|
|
# four more hacks - as a diff file for simplicity
|
2019-10-08 17:06:02 +00:00
|
|
|
# (1) Do not include the Kirigami resources (on static build). It causes
|
2018-02-15 09:44:13 +00:00
|
|
|
# double defined symbols in our setting. I would like a nicer fix for this
|
|
|
|
# issue, but failed to find one. For example, not adding the resource in
|
|
|
|
# our build causes the qrc file not to be generated. Manual generation
|
2020-11-23 17:34:02 +00:00
|
|
|
# of the resource file (using rcc) introduces the double symbols again.
|
2018-02-15 09:44:13 +00:00
|
|
|
# so it seems some Kirigami weirdness (but their staticcmake example compiles
|
|
|
|
# correctly).
|
2018-06-16 20:59:02 +00:00
|
|
|
|
2019-10-08 17:06:02 +00:00
|
|
|
# (2) we want to use the topContent in the GlobalDrawer for our
|
2018-06-16 20:59:02 +00:00
|
|
|
# own image / logo / text (in part because the logo display got broken, in
|
|
|
|
# part because we want a second line of text to show the account ID
|
|
|
|
# for this to work we need to remove the margin that the GlobalDrawer
|
|
|
|
# forces around the topContent
|
2019-10-08 17:06:02 +00:00
|
|
|
|
|
|
|
# (3) theming the toolbar fails. It should get the background color from
|
|
|
|
# the theme, but somehow that always gets overwritten with the default
|
|
|
|
# value for 'active' set in qtquickcontrols2.conf
|
|
|
|
|
2019-10-08 19:24:47 +00:00
|
|
|
# (4) add a source line mirroring the name line for the forward and
|
|
|
|
# backward icons in the global tool bar. Otherwise those icons aren't
|
|
|
|
# found
|
|
|
|
|
2018-06-16 20:59:02 +00:00
|
|
|
patch -p0 < $SRC/subsurface/scripts/kirigami.diff
|
|
|
|
|
2020-11-18 21:26:48 +00:00
|
|
|
# with Qt5.15 the readonly properties are failing on Android. So let's
|
|
|
|
# patch those out
|
|
|
|
for qml in $(grep -l -R readonly\ .); do
|
|
|
|
sed -i -e "s/readonly //" $qml
|
|
|
|
done
|
|
|
|
|
2017-01-02 20:55:13 +00:00
|
|
|
popd
|
|
|
|
|
2016-03-31 23:10:24 +00:00
|
|
|
echo org.kde.plasma.kirigami synced from upstream
|