Author Topic: Custom/environment variables  (Read 13914 times)

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Custom/environment variables
« on: July 14, 2005, 01:57:12 pm »
Custom/environment variables can now be defined per-compiler, per-project and per-target.
The changes are in CVS.

After you build C::B once, change custom variables WX_DIR and WX_CFG in project build options to point to your wxWidgets dir.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Custom/environment variables
« Reply #1 on: July 14, 2005, 05:35:13 pm »
I can see now that it is possible to use variables, so I set the global compiler variables and project specific variables. (WX_DIR and WX_CFG for example)
Which variable will have the highest priority?
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Custom/environment variables
« Reply #2 on: July 14, 2005, 05:54:39 pm »
Quote
Which variable will have the highest priority?

They 're applied in this order: Global -> Project -> Target
so if you set the same variable in global vars and in target vars, target's will be the one last set.

Yiannis.
Be patient!
This bug will be fixed soon...

darklordsatan

  • Guest
Custom/environment variables
« Reply #3 on: July 14, 2005, 05:56:44 pm »
This is just awesome mandrav, will you ever stop?  :D
Now if it works correctly, I think this is a helluva feature

Cheers

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Custom/environment variables
« Reply #4 on: July 14, 2005, 06:10:51 pm »
THANKS Yiannis !

really a great feature !!!

THANKS THANKS THANKS

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Custom/environment variables
« Reply #5 on: July 14, 2005, 06:28:20 pm »
Yiannis, when you say "in CVS", you mean in BOTH branches, right? (crosses fingers  :? )

Also, I suppose these variables are stored in a SEPARATE file, so the .cbp remains unchanged (otherwise, we'd see about 1,000 CVS commits of codeblocks.cbp :lol: )

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Custom/environment variables
« Reply #6 on: July 14, 2005, 06:42:55 pm »
Quote from: rickg22
Yiannis, when you say "in CVS", you mean in BOTH branches, right? (crosses fingers  :? )

Cross them all you want ;)
Yes, both branches.
Quote from: rickg22
Also, I suppose these variables are stored in a SEPARATE file, so the .cbp remains unchanged (otherwise, we'd see about 1,000 CVS commits of codeblocks.cbp :lol: )

The global (per-compiler) vars are stored in the global C::B configuration (registry for win32).
The per-project and per-target are kept in the project file of course.

Yiannis.
Be patient!
This bug will be fixed soon...

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Custom/environment variables
« Reply #7 on: July 14, 2005, 09:00:19 pm »
Okay! :) I was just trying to figure out how this would make possible the building of both branches of codeblocks with the same global setup.

Offline David Perfors

  • Developer
  • Lives here!
  • *****
  • Posts: 560
Custom/environment variables
« Reply #8 on: July 14, 2005, 09:31:53 pm »
Quote from: mandrav
Quote
Which variable will have the highest priority?

They 're applied in this order: Global -> Project -> Target
so if you set the same variable in global vars and in target vars, target's will be the one last set.

It is strange that the Global variables are not overridden by the Project variables :roll:
I tried to compile codeblocks with the cvs projectfile (including WX_DIR var with a path that doesn't excist on my system) It couldn't compile, because the wx/ headers couldn't be found.
I added WX_DIR and WX_CFG to the Global variables and it worked...
OS: winXP
Compiler: mingw
IDE: Code::Blocks SVN WX: 2.8.4 Wish list: faster code completion, easier debugging, refactoring