Qt Creator puts quotation marks around command name in custom process step
qt, qt-creator, windows
Solution
Seems like Qt Creator is trying to run `copy.exe`, but `copy` is really just an internal command of `cmd.exe`. Try putting your Custom Process Step like this instead:
Command: cmd.exe
Arguments: /c copy /y %{sourceDir}\Config.ini %{buildDir}\Config.ini
This way, Qt Creator will run `cmd.exe`, which will run its internal `copy` command. /c means carries out the command specified by string and then terminates. You can run `cmd/?` in Command Prompt for other switches.
Problem
I'm trying to add a simple custom process step during build to copy a text file from source dir to build dir. The command is just `copy /y sourceFile destFile`, it can't really get any more simple. I have `copy` in command field, and `/y %{sourceDir}\Config.ini %{buildDir}\Config.ini` in arguments field. Qt Creator shows the command as `copy /y D:\correctSourcePath\Config.ini D:\correctDestPath\Config.ini` When executed manually, it does exactly what I want it. But when I build the project, it fails, and show the command that is failing as `"copy" /y D:\correctSourcePath\Config.ini D:\correctDestPath\Config.ini` For some reason, Qt Creator inserts a pair of quotation marks around the command, which,. of course, completely messes up everything. What's up with this, and how do I get it to stop inserting quotes?