Author Topic: Environment Variable  (Read 5013 times)

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Environment Variable
« on: November 01, 2007, 07:34:08 pm »
I have set an environment variable in my Code-Block project ABC. Now I am trying to read the file in project abc which stores the path with environment variable included in that. Will Code-Block be able to read the file using that environment variable?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: Environment Variable
« Reply #1 on: November 01, 2007, 07:47:54 pm »
I have set an environment variable in my Code-Block project ABC. Now I am trying to read the file in project abc which stores the path with environment variable included in that. Will Code-Block be able to read the file using that environment variable?

Why don't you try it on your own?? :shock:

Instead of asking others for a solution without even touching the problem, give it a try first. You know your requirements better than others.
Be a part of the solution, not a part of the problem.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Environment Variable
« Reply #2 on: November 01, 2007, 07:49:59 pm »
all processes spawned by cb should respect the environment vars that you set. but I agree with biplab, why don't you experiment with this before posting.

also, this post belongs in help or general, not in development.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Environment Variable
« Reply #3 on: November 01, 2007, 08:33:57 pm »
I have tried that, but code-Block is not reading it.

Thanks,

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Environment Variable
« Reply #4 on: November 01, 2007, 09:21:55 pm »
be a little more specific about what you are actually doing.

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Environment Variable
« Reply #5 on: November 01, 2007, 09:44:41 pm »
ok ..I have set an environment variable for my Project.
I am setting the variable at Project->Build Options->Custom Variables. Lets say I define a variable REP=C:\\Temp.
Now I am specifying the path of my files to be REP\\src\\base\\tinyxml.cpp
Then when I try to open this file by double click, "it says file not found".

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Environment Variable
« Reply #6 on: November 01, 2007, 09:54:01 pm »
unfortunately, custom variables aren't environment variables, they only exist within cb scope. you need to use the environment variables plugin. set a group of environment vars in settings -> environment -> "environment variables" then activate that set globally with set now or in project scope using project -> properties -> envvar options

Offline puneet_m

  • Multiple posting newcomer
  • *
  • Posts: 73
Re: Environment Variable
« Reply #7 on: November 01, 2007, 10:00:30 pm »
I am using the latest version of the code-block and I don't see any of these options in my code-block. So, do I need to install install any other plugin for environment variables?

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Environment Variable
« Reply #8 on: November 01, 2007, 10:07:29 pm »
I thought it was a contrib plugin - have you installed those?