PDA

View Full Version : Qt Creator Custom Process Step...how?



My3rdGradeShirt
28th November 2010, 15:12
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:

echo WEEE!
"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?

tbscope
28th November 2010, 15:38
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.

My3rdGradeShirt
28th November 2010, 15:54
Thanks for the input.
Here's the step:
http://i52.tinypic.com/2q8atdg.png


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.


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.


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.


Make sure you add the complete path of the command.
OK, did.


Tip: check the compile output pane to see if there are problems when running the script.
OK, here's the error I'm getting:

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)".

tbscope
28th November 2010, 16:04
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.


OK, here's the error I'm getting:

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.


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.

My3rdGradeShirt
28th November 2010, 16:18
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:

echo 'WEEEE!'
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).


It means that the target application or library is an application or library for a normal desktop computer.
Ahh.

jormon
2nd December 2010, 21:59
this is broken for me too.. anyone have any ideas?

wysota
2nd December 2010, 23:55
Add the following line at the beginning of your script:
#!/bin/sh

and chmod the script to be executable.