[Qt-interest] Distributing Qt with source code using Visual Studio

Eli Hooten elir.hooten at gmail.com
Thu Jun 30 23:50:43 CEST 2011


List,

I'm not sure if the subject line is the best description of the problem I'm
having, but anyway, here goes...

I have built a Qt application in Windows using Microsoft Visual Studio 2008.
My supervisor is requiring me to distribute the code in such a way that
other developers can check out the code and can essentially open the
solution file, click compile, and have the application build and run without
any problems. The issue is that this must be the case regardless of whether
or not the developer already has Qt installed on his/her machine. So,
essentially, the application will have to look for Qt, if it's not on the
machine, install it, and then continue with compiling the actual
application. All of the developers at my place of work would be compiling
this application in Windows using Visual Studio, so there are no cross
platform issues to consider, here.

I've toyed around with including an empty project in the solution file that
all of the other .vcproj projects depend on, and having this project execute
a pre-build event that executes a batch script which builds Qt from source
(the source would be distributed with the application) and, when finished,
goes on to build the rest of the application. However, this approach feels
kludgey at best, and is not without its own problems. For example, after
setting up the %QTDIR% environment variable in the batch script, I will have
to kill Visual Studio and restart it again so that the new environment
variable is loaded (unless there's a better way I don't know of). And that's
just one example.

I feel like there has to be a simpler way and I'm just not seeing it. Has
anyone encountered this kind of issue before or something similar? Is there
any advice/thoughts?

Thanks,
Eli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110630/f6b4700c/attachment.html 


More information about the Qt-interest-old mailing list