Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. WebKit for minGW - how To build?
Forum Updated to NodeBB v4.3 + New Features

WebKit for minGW - how To build?

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 5 Posters 4.3k Views 3 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.
  • T Offline
    T Offline
    TomNow99
    wrote on last edited by
    #1

    Hi,

    My Qt version: 5.12.8
    Os: Windows 10 Pro 64bits
    cmake version 3.18.0

    I would like to build WebKit for MinGW, so I go to page:

    https://github.com/qtwebkit/qtwebkit/releases/tag/qtwebkit-5.212.0-alpha2

    download "qtwebkit-5.212.0-alpha2.tar.xz", unzip it and move to folder "webkitFiles" and create in this folder other folder "build", so in folder "webkitFiles" I have:

    1. folder "build"
    2. folder "qtwebkit-5.212.0-alpha2"

    Next I run cmake ( cmake-gui ) and select path to folders:

    1. where is the source code: C:/Users/tom/Desktop/webkitFiles/qtwebkit-5.212.0-alpha2/Source
    2. where to build the binaries: C:/Users/tom/Desktop/webkitFiles/build

    Next I clicked "configure" and in popup I select:

    Specify the generator for this project: MinGW MakeFiles
    Specyfy native compilers
    ( clicked next)

    Compilers:
    C C:/Qt/Qt5.12.8/Tools/mingw730_64/bin/gcc.exe
    C++ C:/Qt/Qt5.12.8/Tools/mingw730_64/bin/g++.exe
    Fortran ( don't set )
    (clicked finish )

    And here I get errors:

    CMake Warning (dev) in CMakeLists.txt:
      No project() command is present.  The top-level CMakeLists.txt file must
      contain a literal, direct call to the project() command.  Add a line of
      code such as
    
        project(ProjectName)
    
      near the top of the file, but after cmake_minimum_required().
    
      CMake is pretending there is a "project(Project)" command on the first
      line.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Error: CMake was unable to find a build program corresponding to "MinGW Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
    CMake Warning (dev) in CMakeLists.txt:
      No cmake_minimum_required command is present.  A line of code such as
    
        cmake_minimum_required(VERSION 3.18)
    
      should be added at the top of the file.  The version specified may be lower
      if you wish to support older CMake versions for this project.  For more
      information run "cmake --help-policy CMP0000".
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    Configuring incomplete, errors occurred!
    

    I don't changed any file, which I download, so that files are broken?

    1 Reply Last reply
    0
    • artwawA Offline
      artwawA Offline
      artwaw
      wrote on last edited by artwaw
      #2

      Hi,
      Please read this page https://github.com/qtwebkit/qtwebkit/wiki/Building-QtWebKit-on-Windows
      I managed to compile QtWebkit on windows 10, macOS and Debian.

      On Windows, in particular, please pay attention to the prerequisites, i.e. Python 3 and Conan.

      Conan script makes sure all dependencies are met and does the job brilliantly.

      Also please make sure you checkout a proper repository before compiling, should be qtwebkit-5.212 - it is not the default one.

      EDIT:
      you might also want to skip the build process and get yourself precompiled binaries from this branch: http://download.qt.io/snapshots/ci/qtwebkit/5.212/1600126303/qtwebkit/

      For more information please re-read.

      Kind Regards,
      Artur

      1 Reply Last reply
      2
      • T Offline
        T Offline
        TomNow99
        wrote on last edited by
        #3

        @artwaw Arturze! Thank you very much. This way with precompiled binaries seems very nice, but... I never do this before.

        Websites, which can help me:

        https://github.com/qtwebkit/qtwebkit/wiki/Using-QtWebKit-in-your-project

        "First of all you need to build QtWebKit (according to instructions for you OS), and install it (ninja install if you build with Ninja). " <- I have build, but I don't know, how can I install it.

        https://doc.qt.io/qt-5.12/windows-building.html

        "For MinGW, type: mingw32-make". But I don't see any makefiles in this folder with precompiled binaries. How can I install it?

        jsulmJ 1 Reply Last reply
        0
        • T TomNow99

          @artwaw Arturze! Thank you very much. This way with precompiled binaries seems very nice, but... I never do this before.

          Websites, which can help me:

          https://github.com/qtwebkit/qtwebkit/wiki/Using-QtWebKit-in-your-project

          "First of all you need to build QtWebKit (according to instructions for you OS), and install it (ninja install if you build with Ninja). " <- I have build, but I don't know, how can I install it.

          https://doc.qt.io/qt-5.12/windows-building.html

          "For MinGW, type: mingw32-make". But I don't see any makefiles in this folder with precompiled binaries. How can I install it?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @TomNow99

          mingw32-make install
          

          is usually the step to install after building.

          "But I don't see any makefiles in this folder with precompiled binaries" - of course not, these are binaries. Just copy the binaries over your Qt installation.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          2
          • T Offline
            T Offline
            TomNow99
            wrote on last edited by
            #5

            @jsulm I know that is noob question, but could you tell me what I have to do?

            binaries.png

            On the left is folder: C:\Qt\Qt5.14.0\5.14.0\mingw73_64
            On the right is folder with binaries: C:\Users\tom\Desktop\webkitFiles

            ( the qt version is other because of I do that on other pc )

            So I have to open all of that 5 folders ( right ) and move all files on it to folders ( left ) with the same names?

            jsulmJ 1 Reply Last reply
            0
            • T TomNow99

              @jsulm I know that is noob question, but could you tell me what I have to do?

              binaries.png

              On the left is folder: C:\Qt\Qt5.14.0\5.14.0\mingw73_64
              On the right is folder with binaries: C:\Users\tom\Desktop\webkitFiles

              ( the qt version is other because of I do that on other pc )

              So I have to open all of that 5 folders ( right ) and move all files on it to folders ( left ) with the same names?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @TomNow99 As I wrote: copy it over (means: content of bin folder goes into the bin folder of your Qt installations and so on).

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              1
              • T Offline
                T Offline
                TomNow99
                wrote on last edited by
                #7

                @jsulm Done. I try do "mingw32-make install" using cmd.exe in "C:\Qt\Qt5.14.0\5.14.0\mingw73_64\bin", but I get error:
                No rule to make target "install". Stop.

                jsulmJ 1 Reply Last reply
                0
                • T TomNow99

                  @jsulm Done. I try do "mingw32-make install" using cmd.exe in "C:\Qt\Qt5.14.0\5.14.0\mingw73_64\bin", but I get error:
                  No rule to make target "install". Stop.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  @TomNow99 Come on: you installed BINARIES, there is no need to call make install (it is only needed when building sources).

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  1
                  • T Offline
                    T Offline
                    TomNow99
                    wrote on last edited by
                    #9

                    @jsulm Ok, I understand. Now I add in .pro
                    QT += webkit webkitwidgets

                    and I have to do something with the path. Could you tell me, where and what? I think I have to add path in qtcreator in projects->system variables -> path -> append path

                    I know that my question is noob question, but I prefer to ask something stupid and have perfect schedule, what I have to do, when I need other libraries.

                    jsulmJ 1 Reply Last reply
                    0
                    • T TomNow99

                      @jsulm Ok, I understand. Now I add in .pro
                      QT += webkit webkitwidgets

                      and I have to do something with the path. Could you tell me, where and what? I think I have to add path in qtcreator in projects->system variables -> path -> append path

                      I know that my question is noob question, but I prefer to ask something stupid and have perfect schedule, what I have to do, when I need other libraries.

                      jsulmJ Offline
                      jsulmJ Offline
                      jsulm
                      Lifetime Qt Champion
                      wrote on last edited by jsulm
                      #10

                      @TomNow99 said in WebKit for minGW - how To build?:

                      and I have to do something with the path

                      What do you mean? What path? If you installed correct binaries it should just work.

                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      1
                      • T Offline
                        T Offline
                        TomNow99
                        wrote on last edited by TomNow99
                        #11

                        @jsulm When I build my simple project ( I only add this line in .pro ) I get error
                        "Unknown module(s) in QT: webkit webkitwidgets" and in qtcreator files "mainwindow.h", "mainwindow.cpp", "main.cpp" are in dark gray color.

                        EDIT mainwindow.ui the same dark gray color

                        EDIT2:
                        binaries2.png

                        jsulmJ 1 Reply Last reply
                        0
                        • T TomNow99

                          @jsulm When I build my simple project ( I only add this line in .pro ) I get error
                          "Unknown module(s) in QT: webkit webkitwidgets" and in qtcreator files "mainwindow.h", "mainwindow.cpp", "main.cpp" are in dark gray color.

                          EDIT mainwindow.ui the same dark gray color

                          EDIT2:
                          binaries2.png

                          jsulmJ Offline
                          jsulmJ Offline
                          jsulm
                          Lifetime Qt Champion
                          wrote on last edited by
                          #12

                          @TomNow99 Which exact archive did you download from http://download.qt.io/snapshots/ci/qtwebkit/5.212/1600126303/qtwebkit/ ? You have to use the one matching your Qt (MinGW 64bit).

                          https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply
                          1
                          • T Offline
                            T Offline
                            TomNow99
                            wrote on last edited by
                            #13

                            @jsulm I add edit2 in my last post.

                            I downloaded version to Win 10 mingw, so the first one - " qtwebkit-Windows-Windows_10-Mingw-Windows-Windows_10-X86_64.7z"

                            jsulmJ 1 Reply Last reply
                            0
                            • T TomNow99

                              @jsulm I add edit2 in my last post.

                              I downloaded version to Win 10 mingw, so the first one - " qtwebkit-Windows-Windows_10-Mingw-Windows-Windows_10-X86_64.7z"

                              jsulmJ Offline
                              jsulmJ Offline
                              jsulm
                              Lifetime Qt Champion
                              wrote on last edited by
                              #14

                              @TomNow99 And you copied everything (not only bin)?

                              https://forum.qt.io/topic/113070/qt-code-of-conduct

                              1 Reply Last reply
                              1
                              • T Offline
                                T Offline
                                TomNow99
                                wrote on last edited by
                                #15

                                @jsulm I copied all files from "C:\Users\tom\Desktop\webkitFiles\bin"

                                so I copied:

                                binaries3.png

                                I don't touch any other folder in "C:\Users\tom\Desktop\webkitFiles\bin" ( include, lib, mkspecs, qml ).

                                jsulmJ 1 Reply Last reply
                                0
                                • T TomNow99

                                  @jsulm I copied all files from "C:\Users\tom\Desktop\webkitFiles\bin"

                                  so I copied:

                                  binaries3.png

                                  I don't touch any other folder in "C:\Users\tom\Desktop\webkitFiles\bin" ( include, lib, mkspecs, qml ).

                                  jsulmJ Offline
                                  jsulmJ Offline
                                  jsulm
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #16

                                  @TomNow99 You have to copy over everything from the downloaded archive, not only bin...

                                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  1 Reply Last reply
                                  1
                                  • T Offline
                                    T Offline
                                    TomNow99
                                    wrote on last edited by
                                    #17

                                    @jsulm I think when you wrote "(means: content of bin folder goes into the bin folder of your Qt installations and so on)." you mean really only bin folder

                                    jsulmJ 1 Reply Last reply
                                    0
                                    • T TomNow99

                                      @jsulm I think when you wrote "(means: content of bin folder goes into the bin folder of your Qt installations and so on)." you mean really only bin folder

                                      jsulmJ Offline
                                      jsulmJ Offline
                                      jsulm
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #18

                                      @TomNow99 "(means: content of bin folder goes into the bin folder of your Qt installations and so on)" - see "and so one", bin was just an example.

                                      https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      1 Reply Last reply
                                      1
                                      • T Offline
                                        T Offline
                                        TomNow99
                                        wrote on last edited by
                                        #19

                                        @jsulm Now it works.

                                        Jsulm, you are a good man. Really. THANK YOU VERY MUCH!

                                        1 Reply Last reply
                                        1
                                        • artwawA Offline
                                          artwawA Offline
                                          artwaw
                                          wrote on last edited by
                                          #20

                                          Hi,
                                          sorry for late reply but I see @jsulm helped you sort things out.

                                          While building stuff yourself is usually (frustrating) fun and I like to do it (one can take a user from Linux but never a Linux from the user) using precompiled binaries is more often better approach. Especially if you don't intend to expand those in any way, just use. Above all, saves time.

                                          Just to recap on your last posts - docs for QtWebKit can be sometimes misleading for a newbie. Should you attempt in the future to compile it - don't bother with cmake. Use the conan script and conan script only, on Windows if you add --install switch it should install binaries in your Qt folder tree ready for use. Any other approach requires a bit more digging around (and can lead to errors).

                                          Anyway, I am happy you managed to sort out your problem.

                                          For more information please re-read.

                                          Kind Regards,
                                          Artur

                                          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 Extensions
                                          • Unsolved