Hi,

Could someone explain how to configure the Qt Creator .pro file to copy the
dependent dlls into a directory with the program executable. My intention is
to either zip up the directory to be dropped onto another computer or use
NSIS or equivalent, to package the software in an installer. It makes sense
for qmake to get the dependent dlls, as qmake knows what dlls it used to
bind with the exe.

For example a Qt Creator project file (aprogram.pro)
<http://aprogram.pro>on XP using mingw and a non-statically built Qt.

# aprogram.pro file
TARGET = aprogram

TEMPLATE = app

SOURCES += main.cpp\

mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui

target.path = $$PWD/deploy

INSTALLS += target

This copies aprogram exe to the deploy directory when "make install" is run.
<path to aprogram.pro directory>/deploy/aprogram.exe

It would be nice if the dependent dlls could be copied to the deploy
directory as well. This list would depend on the QT variable in the .pro
file and the compiler (mingw or Visual Studio).
<path to aprogram.pro directory>/deploy/aprogram.exe
<path to aprogram.pro directory>/deploy/QtCore.dll
<path to aprogram.pro directory>/deploy/QtGui.dll
<path to aprogram.pro directory>/deploy/mingwm10.dll

I've seen some discussion about a similar issue in previous Qt forum
question (2005?), where someone wanted a single exe generated.

I'm using Qt Creator 1.2.1, Qt 4.5.2 on XP.

Cheers,
Luke
_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to