Hello,
since the past view years i work on and off on the UserVariableManager... Now i am finally pleased to have a working patch against svn head...
From my point of view (correct me if i am wrong) global user variables should be used to configure external libraries (path, compiler and linker flags) that are different on each pc. On linux this is less used than on windows. To fulfil this functionality it should have the following properties:
1) Flexible naming (different sets, different variable names (ex. wx), different members of the variable (ex. include, library ecc.)
2) Definable over command line for batch builds
3) Inform the user if a variable is not defined and give some hints what the variable is used for
What it is NOT meant to do (at the moment)
*) Automatically detect a library or paths to a library
With the current implementation only 1) is implemented, 2) over a dirty hack and 3) partially and fails on headless batch builds. Batch building is tricky because when a variable is not defined no messages are logged and on headless servers the build simply was stuck....
With the attached patch 2 is possible and 3 partially (at least on informing the user), and with a follow up patch also 3 is better implemented.
What does this patch:
1) The attached patch does NOT modify the behaviour of global variables from a user perspective! Old projects should behave the same. If not it is a bug!
2) It adds the command line flag '-D variable[.member]=value' that can be repeated multiple times for different variables. If the variable is not stored in the current configuration it is temporary generated. This allows to set and override global variables via command line.
3) It adds the command line flag -S setname to activate a specific set (this would currently be possible with different personalities, but it is extremely cumbersome)
4) It stores the variables in memory and does not load them from configuration file every time they are used during compiling (should theoretically speed up compile times)
5) It adds an cancel/save button to the edit variable dialog, so the user can cancel a erroneous input
6) Adds a lot API and documentation to UserVariableManager so it can be used in other plugins or over scripting
6.1) Api for get and set variable sets, variables and members
6.2) Api to get and set the whole set of variables
6.3) Api to store the variables to configuration file
6.4) Api to parse variable names
6.5) Api to check if a variable exists in the first place
7) Moves all related dialogs from sdk to src

Introduces an UI interface so we can use different UIs for batch builds (console) and UI builds
9) More information is logged to the codeblocks log if something went wrong (this helps on headless servers A LOT)
10) Remove any config file writing that has happened in user variable dialogs to the new api of the UserVariableManager so configuration file loading and storing are in one single place
I have looked over this patch 100 times, but i think i am now blind for any (format) errors...
I have not already incremented the SDK API number, because this api is not stable until after the next patch...
Any comments?