From 64293a27256699d9400605a9f312f7663bca97fb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 9 May 2018 14:37:21 +0200 Subject: Merge in Flatpak improvements ...from : commit 945f6caad87658b1df1e8918bd5f64939058ab7f (origin/desktop-integration) Author: Robert McQueen Date: Fri Apr 27 16:54:30 2018 +0100 clean up desktop integration - don't register MIME handler for text/plain (Flatpak appears first in XDG_DATA_DIRS so otherwise we "steal" the default text editor association) - copy the icons app into the theme with both their original libreoffice-* name as well as the org.libreoffice name needed by Flatpak, which fixes the window icons - append the appdata for the separate apps (Base, Draw, etc) to the appdata XML we export for Flatpak, so they are visible in software centers etc Change-Id: Ia086071671b9ff5a8b07c55a822240f9e8fbb8d3 Reviewed-on: https://gerrit.libreoffice.org/54030 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- solenv/bin/assemble-flatpak.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh index b0f718a5091f..2d988084cb1c 100755 --- a/solenv/bin/assemble-flatpak.sh +++ b/solenv/bin/assemble-flatpak.sh @@ -26,6 +26,10 @@ done mv /app/share/applications/org.libreoffice.LibreOffice-startcenter.desktop \ /app/share/applications/org.libreoffice.LibreOffice.desktop +# Flatpak .desktop exports take precedence over system ones due to +# the order of XDG_DATA_DIRS - re-associating text/plain seems a bit much +sed -i "s/text\/plain;//" /app/share/applications/org.libreoffice.LibreOffice-writer.desktop + ## icons/hicolor/*/apps/libreoffice-* -> ## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*: mkdir -p /app/share/icons @@ -33,6 +37,8 @@ for i in "${PREFIXDIR?}"/share/icons/hicolor/*/apps/libreoffice-* do mkdir -p \ "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")" + cp -a "$i" \ + "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/"$(basename "$i")" cp -a "$i" \ "$(dirname /app/share/icons/hicolor/"${i#"${PREFIXDIR?}"/share/icons/hicolor/}")"/org.libreoffice.LibreOffice-"${i##*/apps/libreoffice-}" done @@ -133,6 +139,13 @@ cat </app/share/appdata/org.libreoffice.LibreOffice.appdata.xml EOF +# append the appdata for the different components +for i in "${PREFIXDIR?}"/share/appdata/libreoffice-*.appdata.xml +do + sed "1 d; s/libreoffice/org.libreoffice.LibreOffice/" "$i" \ + >>/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml +done + ## see for further places where build-finish would ## look for data: -- cgit