Saturday 23 October 2010

How to Move a Qt Install / Library (Version 1)

Step 1: Move Qt
  • Cut and Paste
  • Current directory - C:\tools\Qt
  • Destination directory -C:\sim\dep\Qt

Step 2: Get Old Qt Directory
  • Go to C:\sim\dep\Qt\2010.02.1\Qt
  • Open .qmake.cache
  • Find variable QT_SOURCE_TREE
  • Note the value of QT_SOURCE_TREE
  • Mine was C:\tools\Qt\2010.02.1\Qt

Step 3: Patch Qt
  • Go to C:\sim\dep\Qt\2010.02.1\bin
  • The syntax is qpatch.exe list oldDir newDir
  • qpatch.exe files-to-patch-windows C:\tools\Qt\2010.02.1\Qt C:\sim\dep\Qt\2010.02.1\Qt

Step 4: Set Environment Variables
  • set QTDIR=C:\sim\dep\Qt\2010.02.1\Qt
  • set QMAKESPEC=C:\sim\dep\Qt\2010.02.1\Qt\mkspecs\win32-g++
  • set PATH=%path%;C:\sim\dep\Qt\2010.02.1\Qt\bin
  • set PATH=%path%;C:\sim\dep\Qt\2010.02.1\bin

Notes:

Related Links

6 comments:

  1. That's actually quite useful, especially as I have many different QT builds and end up wanting to move them around all the time. Find the size of the whole thing a bit unwieldy to be honest. Takes just under a decade to do a complete rebuild. :)

    I like QT plan on doing a lot with it. But I do worry about it's long term future, especially if Nokia's plans for Meego/Maemo don't work out. Do you have any thoughts on this?

    ReplyDelete
  2. Hi Andy!

    Thanks for leaving a comment. I'm glad you find this useful as it took me a fair while to figure out. :)

    The code I'm working on came integrated with Qt and I've been removing more and more Qt as I go. I'm at a stage where I'm only using Qt to create window so I can switch pretty easily.

    So far Qt has been getting in my way more often than it has been helping. Qt stills seems like the one of the most sophisticated libraries and is likely to be so for a fair while yet.

    ReplyDelete
  3. >I'm at a stage where I'm only using Qt to create window so I can switch pretty easily.

    What are using instead of QT?

    I try to keep most of my code independent of the framework I use for the GUI.

    My apps tends to be Windows focused, so thinking about going to C++ .NET for the front-end before I find that I have too much written with QT to consider switching. (Although I do like the fact that my QT based apps could run on, say, MacOS with only bit of jigging around.)

    ReplyDelete
  4. Hi Andy,

    My simulation is not GUI intensive so I'm only using Qt to create a window. I'm thinking about moving to SDL but I'm not sure because Qt has so much functionality. I've had a look at some advanced Qt GUI's and they are quite attractive.

    I like to keep my code separate from frameworks as well, especially with something I'm so unsure about like Qt.

    I like to keep my code platform independent and I just prefer to work with free and open source tools. If I do leave Qt, I'll be switching to SDL, cmake and g++.

    ReplyDelete
  5. thanks i couldnt remember how to do this, and now i know :D

    ReplyDelete
  6. Hi Chris!

    Thanks for leaving a comment, much appreciated. This took me ages to work out!

    ReplyDelete