开发者

How can i add custom build steps in Qt-Creator?

After build my app, i want copy it to specific directory (on Windows 7).

Custom build step

cmd.exe \c \k copy MyPlugin.dll ..\..\..\HostApp\Debug\plugins

But I have error:

Can't r开发者_如何学Pythonun process "cmd.exe \c \k copy MyPlugin.dll ..\..\..\HostApp\Debug\plugins"

That's wrong?


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
}

Or in your particular case

CONFIG(debug, debug|release) {
    DESTDIR = ..\..\..\HostApp\Debug\plugins
} else {
    DESTDIR = ..\..\..\HostApp\Release\plugins
}

Edit: This question has some good alternatives to my answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜