Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to Build QMLLS Binary from Source
QtWS25 Last Chance

How to Build QMLLS Binary from Source

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
7 Posts 3 Posters 2.1k Views
  • 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.
  • G Offline
    G Offline
    GLaDOS1105
    wrote on 18 Jul 2022, 03:02 last edited by
    #1

    I am trying to use the QML language server qmlls to support QML language in other editors. However, I do not know how to compile qmlls binary from source. I found the source code in this repository and tried but fail to find some documentation to get how to build it.

    I have attempted to clone the repo and run cmake . in tools/qmlls but an error occurs:

    CMake Error at CMakeLists.txt:8 (qt_internal_add_app):
      Unknown CMake command "qt_internal_add_app".
    

    It seems I need to somehow import this qt_internal_add_app function from QtToolHelpers.cmake in qtbase repo. However, I am not sure how to import it as a dependency. Hopefully, there is a way to build qmlls only from a small set of files.

    Also, would there be a way to get qmlls binary directly? If that is possible, I think the language server could be installed easily and integrated into many code editors.

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kkoehne
      Moderators
      wrote on 18 Jul 2022, 09:19 last edited by kkoehne
      #2

      It seems I need to somehow import this qt_internal_add_app function from QtToolHelpers.cmake in qtbase repo. However, I am not sure how to import it as a dependency. Hopefully, there is a way to build qmlls only from a small set of files.

      The qmlls binary is supposed to be built as part of qtdeclarative - and should be part of the normal Qt packages, since Qt 6.3.0 I believe. So if you haven't built Qt yourself so far, it's probably best to check out whether you need to install additional packages from your system.

      If you are building Qt yourself, and you don't do a top-level build, make sure that the qtlanguageserver repository is built & configured & installed before configuring qtdeclarative.

      Director R&D, The Qt Company

      1 Reply Last reply
      0
      • G Offline
        G Offline
        GLaDOS1105
        wrote on 18 Jul 2022, 14:08 last edited by
        #3

        Hi @kkoehne, thanks for the fast reply.

        So, does that mean I have to have Qt fully installed/built to use qmlls? It would be wonderful if there is a simple way to get qmlls binary for a user's platform. In that way, other code editors could have a dedicated extension to support QML installed automatically without requiring users to preinstall a full Qt base dependency.

        1 Reply Last reply
        0
        • K Offline
          K Offline
          kkoehne
          Moderators
          wrote on 18 Jul 2022, 15:44 last edited by
          #4

          @GLaDOS1105 said in How to Build QMLLS Binary from Source:

          So, does that mean I have to have Qt fully installed/built to use qmlls?

          This is currently the intended workflow, yes.

          What's your use case for having the QML language server, but no actual QML library or runtime?

          You can try to de-bundle it manually by packaging qmlls, dependant dll's and plugins separately. But this is not something I believe anybody is offering currently.

          Director R&D, The Qt Company

          1 Reply Last reply
          0
          • G Offline
            G Offline
            GLaDOS1105
            wrote on 18 Jul 2022, 15:56 last edited by
            #5

            Thanks again for the answer!

            I am trying to build a Visual Studio Code extension to support QML with PySide. PySide 6 itself provides QML library and other tool binaries except qmlls. Thus, I think it would be helpful to build it from source directly on installing the extension. Would there be any other better ways to achieve this? I believe if PySide 6 has qmlls binary pre-built like qmllint, it would be much easier to extend its support on other editors.

            C 1 Reply Last reply 20 Jul 2022, 15:13
            0
            • G GLaDOS1105
              18 Jul 2022, 15:56

              Thanks again for the answer!

              I am trying to build a Visual Studio Code extension to support QML with PySide. PySide 6 itself provides QML library and other tool binaries except qmlls. Thus, I think it would be helpful to build it from source directly on installing the extension. Would there be any other better ways to achieve this? I believe if PySide 6 has qmlls binary pre-built like qmllint, it would be much easier to extend its support on other editors.

              C Offline
              C Offline
              CristianMaureira
              wrote on 20 Jul 2022, 15:13 last edited by
              #6

              I am trying to build a Visual Studio Code extension to support QML with PySide. PySide 6 itself provides QML library and other tool binaries except qmlls. Thus, I think it would be helpful to build it from source directly on installing the extension. Would there be any other better ways to achieve this? I believe if PySide 6 has qmlls binary pre-built like qmllint, it would be much easier to extend its support on other editors.

              Hey,
              so you are trying to rely on the binary from a PySide wheel to package it into an extension?
              or your approach is to build an extension that looks inside the site-packages/PySide6/qmlls to use it from the current installation?

              1 Reply Last reply
              0
              • G Offline
                G Offline
                GLaDOS1105
                wrote on 21 Jul 2022, 00:55 last edited by
                #7

                Hi @CristianMaureira,

                I would prefer the second approach: looking inside the site-packages/PySide6/qmlls. However, in the current version of PySide6, there is no binary qmlls at all. I was able to build the extension integrating other PySide tools, including rcc and uic, with the helper functions in site-packages/PySide6/scripts/pyside_tool.py but no anything related to qmlls can be found in there. Is it possible to find another way to get the binary? I think building the binary from source would be a detour and easy to break than using something provided by PySide package directly.

                1 Reply Last reply
                0
                • J JonB referenced this topic on 7 May 2023, 08:21

                5/7

                18 Jul 2022, 15:56

                • Login

                • Login or register to search.
                5 out of 7
                • First post
                  5/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved