Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Add UI to store default values and descriptions of global variables in project

<< < (2/2)


--- Quote from: MortenMacFly on June 20, 2022, 08:28:04 pm ---Additionally, I have a patch pending that allows to manage environment variables at workspace level which may do what you want.

--- End quote ---

Workspace level setting of environment variables sounds very good to me. Never thought of that solution.

Tim S.

It is not intended to change behaviour of global variables.
It is intended to give the user a hint, what a global variable is and what the developer intended.

For example if you open the codeblocks project with a fresh installation the user is asked for two global variables: cb and wx31 (or whatever)
But the user has absolute no clue what to do with this variables or even with this dialog.

With this patch (this is only part one of a series of patches) the developer can store some information in the project file. For example it could store for the cb variable in the description field:

--- Quote ---This variable is used to pass additional compiler flags to the build process of codeblocks. For example if you want to build a fast codeblocks installation pass -O3, but if you want build with debug information pass a -g to this variable
--- End quote ---
Now when the user opens the project file and codeblocks can not find the global variable 'cb' it will open a dialog with the description the developer provided.
If the variable is already defined nothing would happen. (Note that this described dialog is not part of this patch, i am currently working on it. This patch adds only the possibility for the developer to store additional description information to the project file)
 If the developer passes a default value this value will be suggested to the user. For the 'cb' variable the dev would provide -O3 and in the ask dialog -O3 would be provided. For the wx31 variable it would not make any sense to provide a default value, but you could provide a description what is like:

--- Quote ---Point this path to installation directory of your wxWidgets 3.1 installation
--- End quote ---


--- Quote ---Additionally it introduces ambiguity and unexpected behaviour.
--- End quote ---
Can you describe this a bit more? I can not find any ambiguity  or unexpected behaviour


[0] Message Index

[*] Previous page

Go to full version