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

[Proposal] Move the custom variables WX_SUFFIX... to global variables

<< < (2/6) > >>

stahta01:

--- Quote from: BlueHazzard on February 01, 2017, 01:24:48 am ---Well, you have to set $(#WX) anyway, so i don't think this should be a issue if it is mentioned in the build instruction or readme file.

Or we implement default values for global variables ;)

--- End quote ---

I think default values for global variables or a script that sets up default values for global variables is a good idea.
Anyone know if the scripting language can setup default values for global variables?

Tim S.

oBFusCATed:

--- Quote from: BlueHazzard on February 01, 2017, 01:24:48 am ---Well, you have to set $(#WX) anyway, so i don't think this should be a issue if it is mentioned in the build instruction or readme file.

--- End quote ---
No one reads instructions. Everybody tries if it works and then asks in the forum.
Also the UI doesn't tell you which sub-variables you need to fill in.


--- Quote from: BlueHazzard on February 01, 2017, 01:24:48 am ---Or we implement default values for global variables ;)

--- End quote ---
This is the only option if you want to use those...

But I'm not sure our current way of managing projects is good idea. Probably it is better to switch to something like cmake which can generate C::B projects and can handle the differences between platforms and wx versions.

BlueHazzard:

--- Quote from: oBFusCATed on February 01, 2017, 08:28:59 am ---But I'm not sure our current way of managing projects is good idea. Probably it is better to switch to something like cmake which can generate C::B projects and can handle the differences between platforms and wx versions.

--- End quote ---
i don't like the idea to add a other build system to create a build system ;) (other then standard make)

Lets think about this:
A easy to implementable solution, would be to set the non existent global variables with some squirrel script.
1) Check if the variable is there with "UserVariableManager.Exists()"
2) If not set it to some default value

For this is needed:
1) Add function UserVariableManager::SetVariable(wxString name, wxString value) to the sdk code
2) Add UserVariableManager::SetVariable(wxString name, wxString value) to the squirrel binding
3) Have a possibility to run a script at project loading

Point 3 is the "most tricky" part, but it would be useful in other places to.... Beside point 3 this is a easy, non intrusive fast solution and point 3 has also his advantages.
I think this would also not be a problem to implement... One possibility is to add a new tab in the project properties with load script, or to add a script in the "Build script" tab
We can't use a build script (the most easy way) because codeblocks will complain about the missing variables on load time and not at build time...

Disclaimer: I am a fanboy of scriptable things/ programs, they make things a lot easier...

oBFusCATed:

--- Quote from: BlueHazzard on March 01, 2017, 09:54:22 pm ---i don't like the idea to add a other build system to create a build system ;) (other then standard make)

--- End quote ---
Have you used it? I was sceptical (quite a bit) that cmake is any good. It has problems, but as a tool used daily it has tons of advantages and makes things a lot easier in cross platform projects.


--- Quote from: BlueHazzard on March 01, 2017, 09:54:22 pm ---For this is needed:
1) Add function UserVariableManager::SetVariable(wxString name, wxString value) to the sdk code
2) Add UserVariableManager::SetVariable(wxString name, wxString value) to the squirrel binding
3) Have a possibility to run a script at project loading

--- End quote ---
I don't understand how this will help? How will it find where is wxwidgets located? What version is? What variant on windows?
Also I'm not sure this will be discoverable by non cb projects. How will we teach them to write their project loading script?

BlueHazzard:

--- Quote ---I don't understand how this will help? How will it find where is wxwidgets located? What version is? What variant on windows?
Also I'm not sure this will be discoverable by non cb projects. How will we teach them to write their project loading script?
--- End quote ---
This is NOT what I want to achieve and not the current workflow on windows. I for example have 5 different wx version on my pc, so it would be impossible for any script (CMake or other) to guess the right installation. What i want is a EASY way to set the path to wxWidgets and its configuration for the whole codeblocks workspace and for noobs, an easy possibility to use the default installation way. Setting the path is implemented at the moment.
At the moment you have to set the path to wxWidgets and this is fine. The amount of reports with the problem to set the path is non existent in this forum, so it is no problem for other/new user. Also the default configuration seems to work fine, because also for this there are no complains.
The problem i want to address is that wx uses build configuration parameter in its name. This parameter to create the name are currently configured at a project level, but if you want to build codeblocks you want this parameter at a workspace level. Simply as that... No auto detection and no other complicated things... Autodetection is brain.exe who sets one path one time, all other things make it more complicated.


--- Quote ---Have you used it? I was sceptical (quite a bit) that cmake is any good. It has problems, but as a tool used daily it has tons of advantages and makes things a lot easier in cross platform projects.
--- End quote ---
I have tried to compile KiCad many times on windows and linux and the auto detection of wx NEVER worked. I always had to tune paths, or even find missing cmake scripts, search through tons of configuration parameter to fiddle the right ones under the advanced option...

just my two cents...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version