Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. HOW TO: Install Qt SDK on wine (running on GNU/Linux).
Servers for Qt installer are currently down

HOW TO: Install Qt SDK on wine (running on GNU/Linux).

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 3.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.
  • P Offline
    P Offline
    PC LX
    wrote on 18 Mar 2022, 12:37 last edited by
    #1

    I'm currently using a VM with Windows 10 that has Qt SDK installed to build and test the Qt base projects I'm working on. Windows is giving me too many headaches so I though that maybe I could try installing the Qt SDK on wine and do my work there and reduce my headaches.

    Unfortunately, installing the Qt SDK on wine did not succeed. The online installed starts but gets stuck at "Performing license pre-conditions check...".

    The console shows many "0108:fixme:netprofm:connection_GetAdapterId 048B6370, 0538DAE8" messages.

    So I would like to ask if anyone succeeded at installing the Qt SQK on wine?

    1 Reply Last reply
    0
    • H Offline
      H Offline
      hskoglund
      wrote on 18 Mar 2022, 13:16 last edited by
      #2

      Hi, I just tried it on Wine on Ubuntu 20.04, by downloading the online installer, which refused to start:

       wine qt-unified-windows-x86-4.3.0-1-online.exe 
      [25] Warning: Qt Account settings file [C:\\users\\henry\\Application Data\\Qt\\qtaccount.ini] does not exist.
      [27] Warning: Could not find Qt Account.
      [640] Warning: No QtAccount credentials found. Please login via the maintenance tool of the SDK.
      

      Then I copied the MaintenanceTool.exe (just the .exe file) from my Windows 10 PC, try to start it:

      wine MaintenanceTool.exe 
      No marker found, stopped after 1.00 MB.
      

      Then I tried the online installer again, got the same errors but the UI lighted up :-)
      While typing my email and password it spammed "Warning: No QtAccount..." but it installed Qt 6.2.4 just fine :-)
      alt text
      alt text

      However, doing wine C:\Qt\Tools\QtCreator\bin\QtCreator didn't work. got:
      02b:err:combase:RoGetActivationFactory Failed to find library for L"Windows.System.UserProfile.GlobalizationPreferences"

      It looks like a Qt6 error, an older version of Qt Creator might work...

      1 Reply Last reply
      0
      • P Offline
        P Offline
        PC LX
        wrote on 13 Apr 2022, 09:36 last edited by
        #3

        After trying several approaches I got it to (kind of) work so I may as well post it here in case someone else find it useful.

        I could not get the installer to work on wine but it works on my Windows 10 installation. In fact it was already installed there so instead of installing on Wine I tried to use that installation from wine. My Windows 10 installation is in a NTFS formatted partition on one of the drives. This way it can be booted both in a virtual QEMU/KVM machine and as a normal dual boot. It also makes it trivial to mount the partition on my GNU/Linux system.

        After mounting the Windows 10 partition and configuring Wine to show the partition as a drive (D:), the Qt SDK installation was accessible from Wine.

        Trying to run Qt Creator was a bust. It did not work at all but the CLI tools worked. cmake, gcc, ninja, qmake, bin tools, all worked.

        After a bit of trial and error I wrote a script that would call cmake to build my project.

        The following bash script is particular to my system but the basic idea is to set the PATH (through WINEPATH) to point to all the needed binaries and to pass a bunch of paths to cmake so that it can find the stuff it needs.

        Hope this helps others.

        #!/bin/sh
        
        export WINEPATH="D:/Qt/Tools/mingw900_64/bin;D:/Qt/Tools/Ninja;D:/Qt/Tools/CMake_64/bin;D:/Qt/6.2.3/mingw_64/bin"
        export WINEDEBUG=fixme-all
        export PROJECT="foobar"
        
        function setup {
                BUILD_TYPE="$1"
                SUB_PROJECT="$2"
                wine "D:/Qt/Tools/CMake_64/bin/cmake.exe" \
                        -S E:/work/$PROJECT/$SUB_PROJECT \
                        -B E:/tmp/mingw64/$PROJECT/$SUB_PROJECT/$BUILD_TYPE \
                        -GNinja \
                        -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE \
                        -DCMAKE_PROJECT_INCLUDE_BEFORE:PATH="D:/Qt/Tools/QtCreator/share/qtcreator/package-manager/auto-setup.cmake" \
                        -DQT_QMAKE_EXECUTABLE:STRING="D:/Qt/6.2.3/mingw_64/bin/qmake.exe" \
                        -DCMAKE_PREFIX_PATH:STRING="D:/Qt/6.2.3/mingw_64" \
                        -DCMAKE_C_COMPILER:STRING="D:/Qt/Tools/mingw900_64/bin/x86_64-w64-mingw32-gcc.exe" \
                        -DCMAKE_CXX_COMPILER:STRING="D:/Qt/Tools/mingw900_64/bin/x86_64-w64-mingw32-g++.exe"
        }
        
        function build {
                BUILD_TYPE="$1"
                SUB_PROJECT="$2"
                wine D:/Qt/Tools/CMake_64/bin/cmake.exe \
                        --build E:/tmp/mingw64/$PROJECT/$SUB_PROJECT/$BUILD_TYPE \
                        --target all
        }
        
        mkdir -p ~/tmp/mingw64/$PROJECT
        
        if [ "$1" != "" ]; then
                setup "$1" "$2" && build "$1" "$2"
                exit $?
        fi
        
        for BUILD_TYPE in Debug Release MinSizeRel RelWithDebInfo ; do
                for SUB_PROJECT in lib gui tui cli ; do
                        setup $BUILD_TYPE $SUB_PROJECT || exit $?
                done
        done
        
        for BUILD_TYPE in Debug Release MinSizeRel RelWithDebInfo ; do
                for SUB_PROJECT in lib gui tui cli ; do
                        build $BUILD_TYPE $SUB_PROJECT || exit $?
                done
        done
        
        exit 0
        
        1 Reply Last reply
        0
        • H Offline
          H Offline
          hskoglund
          wrote on 13 Apr 2022, 10:40 last edited by
          #4

          Just to add some more info on how use Qt on Wine: I tried today (on Ubuntu 20.04) installing a Qt Creator based on Qt5, I downloaded this one: https://download.qt.io/snapshots/qtcreator_qt5/7.0/7.0.1/134/

          It works fine:
          QtCreator701BasedOnQt5.png

          And you can use it to compile and run Qt 6.2.4 MinGW programs :-)
          RunningMinGW.png

          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