2

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 run process "cmd.exe \c \k copy MyPlugin.dll ..\..\..\HostApp\Debug\plugins"

That's wrong?

HammerSpb
  • 725
  • 1
  • 12
  • 25

1 Answers1

4

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.

Community
  • 1
  • 1
bruno
  • 2,802
  • 1
  • 23
  • 23