Executable from sh file
-
wrote on 21 Sept 2024, 12:13 last edited by
I have sh file which opened by Qt Creator as executable
is it possible to change this setting from terminal, not manually changing setting for each projectsh file
gnome-terminal --geometry=80x24+100+100 -- bash -c "/home/j/M-Debug/M; exec bash"to execute this I usually go Run
executable:.sh file
dir - /home/j/M-Debug/M
I need to be able to do this for each App from terminal -
-
When you post code, please use the </> code formatting tags to make it easier to read for everybody.
Furthermore, after reading your post 3 times, I dont understand- the headline: What is an "Executable from sh file" ?
- the question: What do you mean by "for each App from terminal" ?
-
When you post code, please use the </> code formatting tags to make it easier to read for everybody.
Furthermore, after reading your post 3 times, I dont understand- the headline: What is an "Executable from sh file" ?
- the question: What do you mean by "for each App from terminal" ?
wrote on 21 Sept 2024, 20:54 last edited by@Axel-Spoerl oh, my apologies, when I see request to put code to code tags, I understand it literally and never recognize terminal command as code.
Next time, if not forget, gonna put it to <> as you requested -
Thanks.
What is it that you actually want to do? Run your application in a terminal from Qt Creator?
In that case, clicking the "Run in terminal" checkbox is enough.
Otherwise: what isopen_terminal.sh
? Please post the content. -
Thanks.
What is it that you actually want to do? Run your application in a terminal from Qt Creator?
In that case, clicking the "Run in terminal" checkbox is enough.
Otherwise: what isopen_terminal.sh
? Please post the content.wrote on 21 Sept 2024, 21:29 last edited by@Axel-Spoerl
I want to open terminal called by Qt Creator on predefined xy and whgnome-terminal --geometry=80x24+100+100 -- bash -c "/home/j/M-Debug/M; exec bash"
-
@Axel-Spoerl
I want to open terminal called by Qt Creator on predefined xy and whgnome-terminal --geometry=80x24+100+100 -- bash -c "/home/j/M-Debug/M; exec bash"
wrote on 22 Sept 2024, 08:40 last edited by JonB@JacobNovitsky
And what happens if that is what you have in youropen_terminal.sh
as you show it?I don't understand your
bash -c "/home/j/M-Debug/M; exec bash"
part? What is it supposed to do and does what you have really work?/home/j/M-Debug/M
: is this really some executable? If not this is not a legal shell command.exec bash
: what are you trying to do here? Creator is supposed presumably to use this to create a terminal in which you can run the actual executable your project is producing. I can only guess it puts your executable at the end of this command, perhaps preceded by some option or perhaps you are supposed to put that in or deal with it yourself. I am not convinced your script is dealing with that correctly. Find out what exact command Creator produces with your script and your executable. If you can't find that write a one-line script to use as your command which simply prints/sends to file precisely how it is being invoked (all command-line arguments) so then you will know. -
@JacobNovitsky
And what happens if that is what you have in youropen_terminal.sh
as you show it?I don't understand your
bash -c "/home/j/M-Debug/M; exec bash"
part? What is it supposed to do and does what you have really work?/home/j/M-Debug/M
: is this really some executable? If not this is not a legal shell command.exec bash
: what are you trying to do here? Creator is supposed presumably to use this to create a terminal in which you can run the actual executable your project is producing. I can only guess it puts your executable at the end of this command, perhaps preceded by some option or perhaps you are supposed to put that in or deal with it yourself. I am not convinced your script is dealing with that correctly. Find out what exact command Creator produces with your script and your executable. If you can't find that write a one-line script to use as your command which simply prints/sends to file precisely how it is being invoked (all command-line arguments) so then you will know.wrote on 22 Sept 2024, 10:55 last edited by JacobNovitsky@JonB it opens my app with Qt Terminal in predefined xy wh
It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
cheersthis is pass to .o files and app executable itself, files made by Qt Creator
build directory
/home/j/M-Debug/M
where M is AppName -
@JonB it opens my app with Qt Terminal in predefined xy wh
It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
cheersthis is pass to .o files and app executable itself, files made by Qt Creator
build directory
/home/j/M-Debug/M
where M is AppNamewrote on 22 Sept 2024, 10:57 last edited by@JacobNovitsky said in Executable from sh file:
but I want to be able to change this setting not manually but in automated way
I do not know what that means/what you have in mind.
-
@JonB it opens my app with Qt Terminal in predefined xy wh
It works well, but I want to be able to change this setting not manually in Qt Creator settings, but in automated way
cheersthis is pass to .o files and app executable itself, files made by Qt Creator
build directory
/home/j/M-Debug/M
where M is AppNamewrote on 22 Sept 2024, 10:59 last edited by@JacobNovitsky
in terminal: qtcreator appName setExecutable -> path to open_terminal.sh -
@JacobNovitsky
in terminal: qtcreator appName setExecutable -> path to open_terminal.shwrote on 22 Sept 2024, 11:04 last edited by@JacobNovitsky
I think you are saying you want to pass the name/path of your current executable as a Command line argument to the script (and change the script to pick that up from its command line arguments). And you probably would like that name/path to come from a "variable" which Creator has set up for you when you configure your project.I don't know how you do that in this place to get it from a "Creator variable". I see the Command line arguments has a drop-down to the right. What does that offer you?
1/10