Author Topic: project environment variables  (Read 2120 times)

Offline reversegecko

  • Single posting newcomer
  • *
  • Posts: 3
project environment variables
« on: April 03, 2008, 06:41:41 am »
Is there any way to set environment variables from project/target settings?

I'm running  script from the pre build steps for my target, and the script needs several env vars to be set. The same script is run from other projects, but the env vars need to be set differently in each case, so setting the vars using settings->environment isn't an ideal solution.

Thanks for your help

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9508
Re: project environment variables
« Reply #1 on: April 03, 2008, 09:31:39 pm »
Thanks for your help
The environment variables plugin (envvars plugin) can do such. It allows to define several "envvar sets" which can be applied at project level - thus, if a project get's activated (e.g. during build).
If you use 08.02 make sure you have enabled this plugin to be installed via the installer. On Windows it's within the "contrib plugins" section... hence you forget to tell anything about what platform/OS/C::B version you use. :-(
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline reversegecko

  • Single posting newcomer
  • *
  • Posts: 3
Re: project environment variables
« Reply #2 on: April 05, 2008, 10:18:27 pm »
Thanks, that should work much better than manually enabling stuff. It's still slightly less than ideal since every time another programmer opens the project, they'll have to know they they need to add a bunch of environment variables to their global settings before they try to compile and run the program.

I'm using 8.02 for Mac OS.