UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Build docviewer with libreoffice support for xenial

    Scheduled Pinned Locked Moved App Development
    5 Posts 3 Posters 1.4k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      chris
      last edited by

      while pdf files should already work, it was not yet possible to build a docviewer packages with libreoffice support.
      I wanted to post the steps I already did and the results

      1 Reply Last reply Reply Quote 1
      • C Offline
        chris
        last edited by

        Here some screenshots to the steps described in https://github.com/ubports/docviewer-app/pull/25

        If you uncomment the line "#INSTALL( DIRECTORY ${UPSTREAM_LIBS_DIR}/opt/libreoffice/lib/libreoffice/ DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET}/libreoffice )" in Click.cmake, you get a click package without libreoffice support (e.g. text and pdf files work).

        If you try to open an odt file, you get the message:
        0_1532933086926_817d8460-f142-4954-8189-316b7e3de512-image.png

        If you add (e.g. in a chroot environment with clickable --container-mode) libreoffice to the dependencies, and put the line " #INSTALL(DIRECTORY /usr/lib/libreoffice/ DESTINATION ${DATA_DIR}lib/${ARCH_TRIPLET}/libreoffice )" to the Click.cmake, you get an about 80MB click package.

        Again opening an example odt file, you now get:
        0_1532933299206_8fb63d12-50df-420a-a1eb-1f9e827182fd-image.png

        In the logviewer you see, for example:
        0_1532933418726_278dec83-9e5e-4966-a94e-bb0c58546ec9-image.png

        After adding the missing dependencies, at some point it was no longer complaining, the screen looked like:
        0_1532933511056_3b1ef51b-2db6-440a-a525-bd1897193ea8-image.png

        and the corresponding log:
        qml: Path of the document: /media/phablet/7873-B162/Documents/example.odt
        [FILE] Extracting information from the file...
        [FILE] Requested file mime type: QVariant(QString, "application/vnd.oasis.opendocument.text")
        [FILE] Path parsed as: "/media/phablet/7873-B162/Documents/example.odt"
        Loading document...
        LibreOffice binaries found at: "/opt/click.ubuntu.com/.click/users/phablet/com.ubuntu.docviewer/lib/arm-linux-gnueabihf/libreoffice/program"
        LibreOffice profile path: "file:///home/phablet/.config/com.ubuntu.docviewer/libreoffice/4"
        Document loaded successfully !

        But at that point docviewer crashed. I will not have much time currently to look into that in more detail, but at least that is where I got on Saturday...

        1 Reply Last reply Reply Quote 0
        • C Offline
          chris
          last edited by

          Yesterday I tried the same for the amd64 clickable container (adding the dependendies manually and run in desktop mode), and got:
          [FILE] Extracting information from the file...
          [FILE] Requested file mime type: QVariant(QString, "application/vnd.oasis.opendocument.text")
          [FILE] Path parsed as: "/tmp/Documents/hello.odt"
          Loading document...
          LibreOffice binaries found at: "/home/chris/git/docviewer-app/build/tmp/lib/x86_64-linux-gnu/libreoffice/program"
          LibreOffice profile path: "file:///tmp/.config/com.ubuntu.docviewer/libreoffice/4"
          Bootstrapping exception 'component context fails to supply singleton com.sun.star.configuration.theDefaultProvider of type com.sun.star.lang.XMultiServiceFactory'
          /home/chris/git/docviewer-app/build/tmp/lib/x86_64-linux-gnu/bin/ubuntu-docviewer-app: line 5: 10 Segmentation fault (core dumped) ubuntu-docviewer-app

          1 Reply Last reply Reply Quote 0
          • flohackF Offline
            flohack
            last edited by

            We got a working build now which will appear in Openstore until Friday or so. Thanks for your efforts! πŸ˜‰

            My languages: πŸ‡¦πŸ‡Ή πŸ‡©πŸ‡ͺ πŸ‡¬πŸ‡§ πŸ‡ΊπŸ‡Έ

            ? 1 Reply Last reply Reply Quote 2
            • ? Offline
              A Former User @flohack
              last edited by

              πŸ™‚ Excellent work @flohack!

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better πŸ’—

              Register Login
              • First post
                Last post