[Qt-creator] Add a Build for Distribution menu choice to QtCreator

Steve Atkins steve at blighty.com
Sun Apr 6 20:23:58 CEST 2014

On Apr 6, 2014, at 11:09 AM, Henry Skoglund <fromqt at tungware.se> wrote:

> Hi,
> I've been using QtCreator since last year and it's an excellent IDE and 
> project tool. However once you leave the safe haven of your dev. PC, 
> i.e. you want to deploy your fancy app to other PCs without Qt, some 
> pain can ensue. Especially if you, like me, are a "Qt rookie".
> For Windows, you can run the utility windeployqt and for Macs there is 
> macdeployqt which is *really* useful (I know, I sat many hours typing 
> "install_name_tool -change xxx yyy" until I learned about macdeployt on 
> qt-project.org's forum.) For Linux though, there is no linuxdeployqt :-(
> However windeployqt leaves you a bit stranded, since it doesn't copy 
> compiler specific DLLs like msvcr120.dll etc. And on the Mac, if you try 
> run the Qt app in a folder that's been macdeployqt'ed on your 
> development Mac you'll get the double Qt syndrome.
> All of this you'll eventually learn, not really a showstopper. But I 
> think it's possible for QtCreator to more helpful here, by including a 
> *Build for Distribution* menu choice.
> The way I envision it: build for distribution creates a folder prefixed 
> with "dist-" or "distribute-" instead of "build-" (obviously requiring 
> shadow builds to be enabled). It then compiles in Release Mode, perhaps 
> first creating new files in the normal release folder. Then deletes 
> possible prev. "dist-xxx" folder, creates a new "dist-xxx" one and 
> copies the newly built app file, invokes windeployqt/macdeployqt on that 
> folder or in case of Linux, copies the needed Qt files into it and 
> invokes chrpath -r $ORIGIN on the app.elf file.
> And for Windows, copies the MinGW or MSVC compiler specific files (which 
> ones could be specified in mkspecs).

You tend to build installers on Windows or disk images on Mac.
And on Linux, it's usually native packages (rpms, debs, etc).

There are lots of different Windows installers and lots of ways to configure
them, and they have different tradeoffs. They also have their own
UIs and configuration. Wix is very different to installshield is very
different to inno setup.

If anything, it's more complex for Linux packages. This isn't
something an IDE really should be getting *too* involved with
(and if it does it "wrong", encouraging people to distribute Qt
apps in a way that doesn't match the platform philosophy, that's
not a good thing for Qt's cross-platform reputation.)

The Qt docs cover the Qt requirements for distribution of libraries
and plugins fairly well, and are well worth a read if you haven't


More information about the Qt-creator mailing list