HOME environment variable - how to access it?

General questions regarding the usage of CodeLite
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

HOME environment variable - how to access it?

Post by HJarausch »

Hi,

I want to create a project template for my students.
For that I create a project myself and save it as template afterwards.
But, I don't like to enter my own home directory in the project path.
I'd like to put $HOME/C++-Lab there, where $HOME accesses the HOME environment variable
which gives the name of the current user's home directory (on Linux).

How can I achieve that?

Many thanks for a hint,
Helmut.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: HOME environment variable - how to access it?

Post by eranif »

You should surround it with braces '$(HOME)'
Eran
Make sure you have read the HOW TO POST thread
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: HOME environment variable - how to access it?

Post by HJarausch »

Thanks, but I have even tried this

$(PATH)/C++-Kurs

but I get "invalid path" though this does exist.

Helmut.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: HOME environment variable - how to access it?

Post by eranif »

Do you mean: you want to save $(HOME) in the 'New project' dialog? you can't do that.

However, the template that you have created can be used on other computers, since codelite keeps all paths relative. None of the paths will be kept as absolute path
Eran
Make sure you have read the HOW TO POST thread
HJarausch
CodeLite Veteran
Posts: 98
Joined: Thu Feb 18, 2010 10:54 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: HOME environment variable - how to access it?

Post by HJarausch »

eranif wrote:Do you mean: you want to save $(HOME) in the 'New project' dialog? you can't do that.

However, the template that you have created can be used on other computers, since codelite keeps all paths relative. None of the paths will be kept as absolute path
Thanks! Good to know,
Helmut.
Post Reply