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. Handle Qt programs for different Qt versions on one machine

Handle Qt programs for different Qt versions on one machine

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 4 Posters 1.3k Views 2 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.
  • SoerenS Offline
    SoerenS Offline
    Soeren
    wrote on last edited by
    #1

    How could we manage applications related to different machines on one machine?

    Lets say:

    • App1 needs Qt 5.3
    • App2 needs Qt 5.3
    • App3 needs Qt 5.3
    • App4 needs Qt 5.6
    • App5 needs Qt 5.6

    That means want just ONE Qt5.3 installations set and ONE für 5.6. How to set the paths for the apps?

    kshegunovK 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      can you put app 1,2,3 in same deploy folder ?
      and 4,5 in other?

      If on windows, the Operating system will look for the dlls near
      the exe. So sharing the dlls are not so easy.

      On linux, u can use rpath

      http://doc.qt.io/qt-5/windows-deployment.html
      http://doc.qt.io/qt-5/linux-deployment.html

      1 Reply Last reply
      1
      • SoerenS Soeren

        How could we manage applications related to different machines on one machine?

        Lets say:

        • App1 needs Qt 5.3
        • App2 needs Qt 5.3
        • App3 needs Qt 5.3
        • App4 needs Qt 5.6
        • App5 needs Qt 5.6

        That means want just ONE Qt5.3 installations set and ONE für 5.6. How to set the paths for the apps?

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by
        #3

        @Soeren
        Hello,
        Qt is binary compatible, so you actually only need one distribution of Qt 5.6 to run all of your listed (5) programs.

        Read and abide by the Qt Code of Conduct

        1 Reply Last reply
        3
        • R Offline
          R Offline
          Rondog
          wrote on last edited by Rondog
          #4

          I use a batch file and command console shortcut. As long as the appropriate variables are set you can have as many versions of Qt that you want.

          Startup Batch File contents.
          This sets a few Qt variables and also defines the locations of the various Qt tools and GCC folder.

          @set PATH=C:\qt\5.6.0\qtbase\bin;C:\qt\mingw482_32\bin;C:\msys\bin;C:\Program Files\CMake\bin;%PATH%
          @set QMAKESPEC=win32-g++
          @set QTDIR=C:\qt\5.6.0
          
          @ECHO INF:  Console configured for Qt 5.6.0
          
          @CD /D "c:\MyProjects"
          
          

          Startup Shortcut for Command Console.
          This is a regular windows shortcut you create on the desktop or wherever you want. It will startup the command console (cmd.exe) and run the startup batch file shown above. The 'target' and 'start in' entries are shown below for what I use.

          target: %COMSPEC% /K "C:\qt\QT5_SETUP.BAT"
          start in: %windir%
          
          

          Note: If you only use the command console this should work very well. If you need something more (like an IDE) this part could be a bit of an issue.

          Note: If you used an installer that setup the Windows environment variables you might want to review those settings as this will likely interfear with this method.

          1 Reply Last reply
          2
          • SoerenS Offline
            SoerenS Offline
            Soeren
            wrote on last edited by
            #5

            Thanks for your replies. It turns out that we cannot build a no static version of Qt with static runtime :-(

            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