With this patch i would like to introduce the possibility to store user variables (name, description and default value) in project files.
This would allow us to describe global variables in project files and allow us to show the user some hints how to set it.
In this patch i only made the UI in Project->Properties->Global variables and store the variable in the project file. I will not explain how it works now, to test if the UI is convenient or not. I would like to point out, that at the moment it modifies only the project file, but not the handling and UI of global variables.
A next step would be to show the user some UI if the project gets loaded and a user variable is not defined, but described in the project file.
The final goal should be to use only one project file for all wxWidgets configurations and configure the build via global variables. To introduce this i would like to add this UI first. This will be the focus of my work for now.
Any comments?
Thank you in advance
EDIT: forum discussion https://forums.codeblocks.org/index.php/topic,25009.new.html
Diff:
Diff:
In the merging of the code into my local tree I spotted the following:
1. Why does the src/sdk/compileoptionsbase.cpp file effectively have one change to include a header, but no other changes? Cannot see why the include file has been added from the patch.
2. The src/sdk/compileoptionsbase.cpp include change will fail as it has a comma instead of a dot point (full stop).
#include "uservarmanager**,**h"
3. The src/sdk/uservarmanager.cpp
m_RE_Var.Compile(_T("([^$]|^)(\\$[({]?(#[A-Za-z_0-9.]+)[\\)} /\\\\]?)"), wxRE_EXTENDED | wxRE_NEWLINE);
includes the "_T()" macro, but does not need it.Now to move to the build and test stage.
fixed your suggestions and pushed it to git repo: https://github.com/bluehazzard/codeblocks_sf/tree/test/global_user_var_to_prject/1
Diff:
Thanks. Working on the DAP debugger stuff , so will have another look in a day or two.
The changes make it more usable.
When I built the code on Linux I found that the FromDIP is not available in WxWidget 3.0.x. , so I had to add a #if wxCHECK_VERSION(3,1,0) which caused issues with the column widths..... Something to look at.