Custom Process Step...how?
I'm trying to figure out how to add a Custom Process Step in QT Creator on OSX. Here are my assumptions and confusions:
- "Command" is the path to the shell script? At the moment the test_shell.sh is:
- "Working Directory"...not sure if this should be the build or the project directory?
All I know is that the compiler throws errors when trying to run this step.
Any ideas?
Re: Custom Process Step...how?
Command is the actual command. In your case the shell script.
Working directory is the directory where the command is run in. Most likely you want the build dir here: %{buildDir}
Command arguments are any arguments you want to use when running the command.
Make sure you add the complete path of the command.
Make sure that any results are being output in the correct working directory. In other words, if you need to generate a file called generated.h in a specific folder, make sure that the command and the working directory actually generate this file in the expected place.
Tip: check the compile output pane to see if there are problems when running the script.
Re: Custom Process Step...how?
Thanks for the input.
Here's the step:
http://i52.tinypic.com/2q8atdg.png
Quote:
Command is the actual command. In your case the shell script.
OK. This looks like it's set correctly. It's not in red so I'm assuming Qt likes (found) it.
Quote:
Working directory is the directory where the command is run in. Most likely you want the build dir here: %{buildDir}
OK. Used %{buildDir}. It's in red so I'm not sure Qt likes it. I tried with the full path to the build directory also and still the same issues as before.
Quote:
Command arguments are any arguments you want to use when running the command.
OK. I have none at the moment just to keep things simple.
Quote:
Make sure you add the complete path of the command.
OK, did.
Quote:
Tip: check the compile output pane to see if there are problems when running the script.
OK, here's the error I'm getting:
Code:
The process "/usr/bin/make" exited normally.
Could not start process "/Users/me/Documents/Software and Web Development/FMOD Practice/03/03/link_libs.sh"
Error while building project 03 (target: Desktop)
When executing build step 'Custom Process Step'
I'm not sure why it says "(target: Desktop)".
Re: Custom Process Step...how?
Quote:
Originally Posted by
My3rdGradeShirt
OK. Used %{buildDir}. It's in red so I'm not sure Qt likes it. I tried with the full path to the build directory also and still the same issues as before.
In a recent git checkout of Qt Creator, that's the standard text already filled in in the text box. In an older Qt Creator you might need to fill in the complete build dir. But I'm not sure.
But that's not the problem here, see below.
Quote:
OK, here's the error I'm getting:
Code:
Could not start process "/Users/me/Documents/Software and Web Development/FMOD Practice/03/03/link_libs.sh"
That tells you that your custom script could not be run.
It might be because of the use of spaces, but that's just a wild guess.
Quote:
I'm not sure why it says "(target: Desktop)".
It means that the target application or library is an application or library for a normal desktop computer.
Re: Custom Process Step...how?
Quote:
That tells you that your custom script could not be run.
It might be because of the use of spaces, but that's just a wild guess.
My script only is one line:
So I'm assuming you mean the spaces in the path to the script. I moved the script file and tried with the script path as "/Users/me/Desktop/link_libs.sh" and the working directory as "/Users/me/Desktop". As you can see no spaces in the path. Still get the same error. I run this script in the terminal so I know it works and is executable (correct permission).
Quote:
It means that the target application or library is an application or library for a normal desktop computer.
Ahh.
Re: Custom Process Step...how?
this is broken for me too.. anyone have any ideas?
Re: Custom Process Step...how?
Add the following line at the beginning of your script:
and chmod the script to be executable.