Author Topic: [RFC] Add the possibility to change global variables over arguments  (Read 483 times)

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2566
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: [Select]
--globalVar wx30="New/Path/For/Wx30"
or
Code: [Select]
--globalVarwx30="New/Path/For/Wx30"
or
Code: [Select]
-Dwx30="New/Path/For/Wx30"
or similar syntax...
This will overwrite the set configuration of the global variable...

any comments?

Offline sodev

  • Regular
  • ***
  • Posts: 333
Re: [RFC] Add the possibility to change global variables over arguments
« Reply #1 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.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6671
    • My Best Post
Re: [RFC] Add the possibility to change global variables over arguments
« Reply #2 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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2566
Re: [RFC] Add the possibility to change global variables over arguments
« Reply #3 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....