Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: BlueHazzard on July 19, 2019, 01:12:35 am

Title: [RFC] Add the possibility to change global variables over arguments
Post by: BlueHazzard on July 19, 2019, 01:12:35 am
Hi,
I still try to fully automate the whole build process of codeblocks for every version... This comes with some problems where i have to change the global variables for every project file. At the moment i do this by replacing the variables in the project file. This is slow and inconvenient...

I propose to add a command line parameter to change the global variable on the fly. Something like
Code
--globalVar wx30="New/Path/For/Wx30"
or
Code
--globalVarwx30="New/Path/For/Wx30"
or
Code
-Dwx30="New/Path/For/Wx30"
or similar syntax...
This will overwrite the set configuration of the global variable...

any comments?
Title: Re: [RFC] Add the possibility to change global variables over arguments
Post by: sodev on July 19, 2019, 02:11:08 am
You can have multiple sets of global variables, this way you can assign different values to the same variable. However i dont know if you can select the set from the command line. I used sets for a while, but too often i forgot to switch to the required one so i ended up using tagged variables instead, like wx_vc140_x86.
Title: Re: [RFC] Add the possibility to change global variables over arguments
Post by: stahta01 on July 19, 2019, 02:15:48 am
Did you try using different profiles for each set of global variable values?

Note: This is over kill; so,  a better way would be nice.

-p parameter

Tim S.
Title: Re: [RFC] Add the possibility to change global variables over arguments
Post by: BlueHazzard on July 19, 2019, 08:24:02 am
Thank you! I totally missed the codeblocks personality function. You reminded me to it.
Now i think i am able to build every codeblocks version with one single bat file... Nice. Finally an automated complete build...

I still think this would be an valuable addition to the parameter list....