solenv/bin/assemble-flatpak.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+)
New commits: commit 33af02a486ee911ba68608ec6f4f0b06dd742473 Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed May 9 14:37:21 2018 +0200 Merge in Flatpak improvements ...from <https://github.com/flathub/org.libreoffice.LibreOffice/>: commit 945f6caad87658b1df1e8918bd5f64939058ab7f (origin/desktop-integration) Author: Robert McQueen <r...@endlessm.com> 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/54031 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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 @@ -34,6 +38,8 @@ 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 <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml </component> EOF +# append the appdata for the different components +for i in "${PREFIXDIR?}"/share/appdata/libreoffice-*.appdata.xml +do + sed "1 d; s/<id>libreoffice/<id>org.libreoffice.LibreOffice/" "$i" \ + >>/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml +done + ## see <https://github.com/flatpak/flatpak/blob/master/app/ ## flatpak-builtins-build-finish.c> for further places where build-finish would ## look for data: _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits