开发者

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

开发者 https://www.devze.com 2023-01-30 06:22 出处:网络
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

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

精彩评论

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