Code::Blocks Forums
User forums => Using Code::Blocks => Topic started by: vv73 on August 24, 2013, 01:45:03 pm
-
Can I use System Variable, such as $HOME
in General Settings, f.e.
for Terminal Program to run Console application?
Like this
${HOME}/myConsoleapp
Or not?
Thanks!
-
As far as I know, this does not work directly, but you can try to run the command in an own shell.
If yoiu start with /bin/sh -c the system variables get expanded.
-
Unfortunatelly even
/bin/sh -c /home/admin/.codeblocks/wincall
there does not work, because CB does not expand expand it as I need
Executing: /bin/sh -c /home/admin/.codeblocks/wincall /usr/bin/cb_console_runner "/home/admin/test" (in /home/admin)
sh needs one string, but CB does not make it.
If to write
/bin/sh -c "/home/admin/.codeblocks/wincall"
we get
Executing: /bin/sh -c "/home/admin/.codeblocks/wincall" /usr/bin/cb_console_runner "/home/admin/test" (in /home/admin)
Three strings anyway...
-
Without -c and quotes
/bin/sh /home/admin/mycall
works well
but
/bin/sh ${HOME}/mycall
no...
-
Without -c and quotes
/bin/sh /home/admin/mycall
works well
but
/bin/sh ${HOME}/mycall
no...
If you use /bin/sh, the variable gets expandend by the shel and not by C::B, so use just $HOME .
-
/bin/sh $HOME/mycall
no effect...
in Terminal that works fine
with and without {}
-
I need the -c here and expanding the variable works fine on fc19 64bit with bash 4.2.45 .
-
I need the -c here and expanding the variable works fine on fc19 64bit with bash 4.2.45 .
Ok. How can I get the name of the output exefile from the script?
I mean mycall.
-
BTW
What is marco $TITLE,
it used by default in lunch term inputbox?
I coud not find that in CB documentation.
What macros I can use there except of $TITLE?
-
Nobody knows about macros, about $TITLE,
really?
-
I guess this is the title specified in you project -> properties -> project settings
-
I guess this is the title specified in you project -> properties -> project settings
I know that.
But it is important for me to know what marcros I can use there except of that.
I dd not find any $TITLE descprition in CB manual...
The question is still actual.
I want to lanch user own script and get the name of output file there.
And it is good to place that script in user home directory and I want use $HOME or
something like that to make the command universe for all users.