如何在Qt-Creator中添加自定义构建步骤? [英] How can i add custom build steps in Qt-Creator?
本文介绍了如何在Qt-Creator中添加自定义构建步骤?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
构建我的应用程序后,我想将其复制到特定目录(在Windows 7上)。
After build my app, i want copy it to specific directory (on Windows 7).
自定义构建步骤
cmd.exe \c \k copy MyPlugin.dll ..\..\..\HostApp\Debug\plugins
但是我有错误:
Can't run process "cmd.exe \c \k copy MyPlugin.dll ..\..\..\HostApp\Debug\plugins"
那是错的吗?
推荐答案
一个这样做的方法是更改.pro文件中的生成输出目录。
之类的
One way to do it would be to change the build output directory in the .pro file. Something like
CONFIG(debug, debug|release) {
DESTDIR = C:/myApp/debug
} else {
DESTDIR = C:/myApp/release
}
或者在您的特定情况下
CONFIG(debug, debug|release) {
DESTDIR = ..\..\..\HostApp\Debug\plugins
} else {
DESTDIR = ..\..\..\HostApp\Release\plugins
}
编辑:
此问题有一些很好的替代方法。
This question has some good alternatives to my answer.
这篇关于如何在Qt-Creator中添加自定义构建步骤?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文