Skip to content

Commit ec0550f

Browse files
authored
always add qt translations
1 parent 93218ae commit ec0550f

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

useful-tools/quick-sharun.sh

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -823,8 +823,12 @@ _handle_bins_scripts() {
823823
fi
824824

825825
if [ "$DEPLOY_QT_WEB_ENGINE" = 1 ]; then
826-
cp -r /usr/share/qt*/resources "$APPDIR"/lib/qt*
827-
cp -r /usr/share/qt*/translations "$APPDIR"/lib/qt*
826+
src_res=/usr/share/"$QT_DIR"/resources
827+
dst_res="$APPDIR"/shared/lib/"$QT_DIR"/resources
828+
if [ -d "$src_res" ] && [ ! -d "$dst_res" ]; then
829+
mkdir -p "${dst_res%/*}"
830+
cp -r "$src_res" "$dst_res"
831+
fi
828832
fi
829833

830834
# handle shell scripts
@@ -1732,11 +1736,19 @@ if [ "$DEPLOY_GEGL" = 1 ]; then
17321736
_echo "* Copied gegl json files"
17331737
fi
17341738
fi
1735-
if [ "$DEPLOY_QT" = 1 ] && [ -f "$TMPDIR"/libqgtk3.so ]; then
1736-
d="$APPDIR"/lib/"$QT_DIR"/plugins/platformthemes
1737-
mkdir -p "$d"
1738-
mv "$TMPDIR"/libqgtk3.so "$d"
1739-
"$APPDIR"/sharun -g 2>/dev/null || :
1739+
if [ "$DEPLOY_QT" = 1 ]; then
1740+
src_trans=/usr/share/"$QT_DIR"/translations
1741+
dst_trans="$APPDIR"/shared/lib/"$QT_DIR"/translations
1742+
if [ -d "$src_trans" ] && [ ! -d "$dst_trans" ]; then
1743+
mkdir -p "${dst_trans%/*}"
1744+
cp -r "$src_trans" "$dst_trans"
1745+
fi
1746+
if [ -f "$TMPDIR"/libqgtk3.so ]; then
1747+
d="$APPDIR"/lib/"$QT_DIR"/plugins/platformthemes
1748+
mkdir -p "$d"
1749+
mv "$TMPDIR"/libqgtk3.so "$d"
1750+
"$APPDIR"/sharun -g 2>/dev/null || :
1751+
fi
17401752
fi
17411753

17421754
# some libraries may need to look for a relative ../share directory

0 commit comments

Comments
 (0)