User forums > Help

Setting of OS variables possible?

<< < (4/6) > >>

MortenMacFly:

--- Quote from: thomas on January 26, 2006, 04:57:37 pm ---What would it matter? [...]

--- End quote ---
Aaaah! I see. I thought the command line is analysed, then the macros from this very command-line are translated/applied and then command is called. If I got it right than first the macros are all translated/applied then (each) command line is computed and the command is called. That's even better. So my objection can be safely ignored.


--- Quote from: mandrav on January 26, 2006, 05:50:23 pm ---Would it be a bad time to say I don't agree with the asterisk thing?

--- End quote ---
Of couse not, but I would be interested in the reason...

Morten.

mandrav:

--- Quote from: thomas on January 26, 2006, 06:11:38 pm ---With the asterisk specifically, or with the idea as such?

--- End quote ---

Well, with the whole idea.
I think the most straightforward way is to just add a checkbox in custom variables page, something like "Expose these vars to the environment". So we expose only what the user needs exposed, with his own approval, and we don't add more burden to the MacrosManager...

Game_Ender:
What about a simple wxCheckListBox ?  Just check to indicate that the variable should become part of the environment.

I think it would be bad to have either them all be on or all off.  Being able to select on a per variable basis offer more flexibility and less chance of conflicts.

On this same note, you should be able to tell Code::Blocks to define some environment variables for when a target is run.  Curently there is no way to do this an programs that need a custom LD_LIBRARY_PATH are hindered.  I have to run a hacked console_runner that invokes the real console runner with the proper environmental variables set.

thomas:
I like the asterisk idea because it is simple. :)
You need zero changes to the project file and zero changes to the GUI. The only necessary change would be to iterate through the key-value map once per target change (for example from within the RecalcVars function), applying all elements which comply with iter->first.Last()=='*' to the environment.

If you append another boolean to every variable, then you have to store it in the project file, too, altering its structure. On the other hand, if there is an extra character in a variable's name, then the project file loader couldn't care less.

MortenMacFly:

--- Quote from: Game_Ender on January 26, 2006, 06:37:32 pm ---What about a simple wxCheckListBox ?

--- End quote ---
I personally agree with Game_Ender here. I think to apply the expansion to all variables might result in other problems (e.g. overwriting variables by accident). What about to add a checkbox with a clear description to the dialog that appears for adding a new custom variable?

On second thoughts: Isn't this a compiler specific (and not project/target specific) problem? If so, would it make sense to have this setup per global compiler only, thus a page/section on the global compiler setup? Does that make sense???

Morten.

Edit: Thomas, that's the second time we were posting in parallel... but I'm always the one that is late... :lol:

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version