Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt for WebAssembly Tech Preview how to get?
Qt 6.12 LTS is out! See what's new in the release blog

Qt for WebAssembly Tech Preview how to get?

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 5 Posters 4.7k Views 1 Watching
  • 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.
  • M Offline
    M Offline
    matze42
    wrote on last edited by
    #4

    David,

    you have to clone the git-repositories like stated in the wiki.

    Martin

    1 Reply Last reply
    4
    • D Offline
      D Offline
      DavidXanatos
      wrote on last edited by
      #5

      Only the 3 or all of them and if all of them where can i find an exhaustive list?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        matze42
        wrote on last edited by
        #6

        Only the 3.

        In the directory of your choice:

        git clone -b wip/webassembly https://code.qt.io/qt/qtbase.git
        git clone -b wip/webassembly https://code.qt.io/qt/qtdeclarative.git 
        git clone -b wip/webassembly https://code.qt.io/qt/qtwebsockets.git
        

        Then in ./qtbase:

        ./configure -xplatform emscripten -developer-build -release -static -no-thread -nomake tests -nomake examples  -no-dbus -no-headersclean -system-libpng -no-ssl -no-warnings-are-errors
        
        make -j4 (or whatever number of CPUs you want to incorporate).
        

        Before install "emscripten" as described here:
        https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

        Be sure you have the emscripten tools in your PATH before building Qt.

        A 1 Reply Last reply
        5
        • lorn.potterL Offline
          lorn.potterL Offline
          lorn.potter
          wrote on last edited by
          #7

          You can either grab the source with git according to the Qt WebAssembly wiki, or download the package here:

          https://download.qt.io/development_releases/qt/qtwebassembly-for-5.11-tp/

          Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
          Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

          1 Reply Last reply
          2
          • M matze42

            Only the 3.

            In the directory of your choice:

            git clone -b wip/webassembly https://code.qt.io/qt/qtbase.git
            git clone -b wip/webassembly https://code.qt.io/qt/qtdeclarative.git 
            git clone -b wip/webassembly https://code.qt.io/qt/qtwebsockets.git
            

            Then in ./qtbase:

            ./configure -xplatform emscripten -developer-build -release -static -no-thread -nomake tests -nomake examples  -no-dbus -no-headersclean -system-libpng -no-ssl -no-warnings-are-errors
            
            make -j4 (or whatever number of CPUs you want to incorporate).
            

            Before install "emscripten" as described here:
            https://kripken.github.io/emscripten-site/docs/getting_started/downloads.html

            Be sure you have the emscripten tools in your PATH before building Qt.

            A Offline
            A Offline
            Antonio Ortiz
            wrote on last edited by Antonio Ortiz
            #8

            @matze42 I did exactlywhat you say, but when I run ./configure it doesn't access or use the qtdeclarative and qtwebsockets directories for the build.
            And using @lorn-potter method I get "Checking for target architecture... Project ERROR: target architecture detection binary not found."
            I'm using Xubuntu 18.04 64 bits version

            1 Reply Last reply
            1
            • lorn.potterL Offline
              lorn.potterL Offline
              lorn.potter
              wrote on last edited by
              #9

              You probably have emscripten version greater than 1.38.
              If you have 1.38 and want to compile the tech preview package, you need this patch:
              https://codereview.qt-project.org/#/c/230230/2//ALL,unified

              If you are using git repos, you will need to run qmake for qtdeclarative and qtwebsockets manually

              Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
              Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

              M 1 Reply Last reply
              4
              • A Offline
                A Offline
                Antonio Ortiz
                wrote on last edited by
                #10

                Thanks @lorn-potter. It works as a charm

                1 Reply Last reply
                1
                • lorn.potterL lorn.potter

                  You probably have emscripten version greater than 1.38.
                  If you have 1.38 and want to compile the tech preview package, you need this patch:
                  https://codereview.qt-project.org/#/c/230230/2//ALL,unified

                  If you are using git repos, you will need to run qmake for qtdeclarative and qtwebsockets manually

                  M Offline
                  M Offline
                  Mohammad Kanan
                  wrote on last edited by Mohammad Kanan
                  #11

                  @lorn.potter I have emscripten 1.38.12 , I want to compile the latest base 5.12, I cloned the three modules mentioned .. I can run ./qtbase/configure ... my problem is "How to run qmake separately for the other modules .. I am almost ignorant in this! by guess, compile them as normal project by running ~/qtbase/qmake/qmake qtdeclarative.pro , am I write?

                  lorn.potterL 1 Reply Last reply
                  0
                  • M Mohammad Kanan

                    @lorn.potter I have emscripten 1.38.12 , I want to compile the latest base 5.12, I cloned the three modules mentioned .. I can run ./qtbase/configure ... my problem is "How to run qmake separately for the other modules .. I am almost ignorant in this! by guess, compile them as normal project by running ~/qtbase/qmake/qmake qtdeclarative.pro , am I write?

                    lorn.potterL Offline
                    lorn.potterL Offline
                    lorn.potter
                    wrote on last edited by
                    #12

                    @Mohammad-Kanan
                    For other modules just make sure that the qmake from that build is in your path (as well as the emscripten compiler), and then run qmake as normal.

                    WebAssembly support is now in the 5.12 branch of QtDeclarative (as of today), so if you use QtBase 5.12 branch, then use that as well.
                    There are changes in the 5.12 like filedialog is not currently enabled, but we will open them back up soon.
                    Other modules like QtCharts, QtQuickcontrols can be used with just the 5.12 branch.

                    Freelance Software Engineer, Platform Maintainer QtWebAssembly, Maintainer QtSensors
                    Author, Hands-On Mobile and Embedded Development with Qt 5 http://bit.ly/HandsOnMobileEmbedded

                    M 1 Reply Last reply
                    1
                    • lorn.potterL lorn.potter

                      @Mohammad-Kanan
                      For other modules just make sure that the qmake from that build is in your path (as well as the emscripten compiler), and then run qmake as normal.

                      WebAssembly support is now in the 5.12 branch of QtDeclarative (as of today), so if you use QtBase 5.12 branch, then use that as well.
                      There are changes in the 5.12 like filedialog is not currently enabled, but we will open them back up soon.
                      Other modules like QtCharts, QtQuickcontrols can be used with just the 5.12 branch.

                      M Offline
                      M Offline
                      Mohammad Kanan
                      wrote on last edited by Mohammad Kanan
                      #13

                      @lorn.potter , Thanks so much for your fast response. regarding: "WebAssembly support is now in the 5.12 branch of QtDeclarative (as of today), so if you use QtBase 5.12 branch, then use that as well."
                      , I am currently downloading the three modules as mentioned in the Qt for WebAssembly wiki (i.e I don't use anything from WebAssembly 5.11-tp), I assume all downloads in the wiki are QtBase 5.12 and no further download or git updates needed?

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt
                      • Unsolved