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

Global addition of build options (in this case search directories), in Squirrel!

<< < (2/3) > >>

oBFusCATed:
I don't know if it is possible, but generally it is not a good idea to add paths there.
Can you explain why you want to change them with a script?
The idea of the scripting engine is to make configuring projects easier - for example you can make a script plugin that registers a menu which modifies all projects in the workspace when invoked.

xod:
Thanks for replying.

I understand that. The reason that I keep SDKs isolated in separate folders is because I can manage them much easier this way. Far from always do the file names contain common affixes. So that allows me to easily make propder association of files. And this leads to why I want to have a script doing this for me. As I keep installing/updating/uninstalling of SDKs, it would be (and has been) a pain in the butt to keep configuring the IDE manually. I intend to do more scripts for automation, where that is possible. I suppose I have to do it on project level for now. It would be more than nice though to have the full CompilerManager API available for squirrel.

stahta01:
Learn about CB Global vars. http://wiki.codeblocks.org/index.php/Global_compiler_variables

xod:

--- Quote from: stahta01 on August 15, 2016, 04:16:39 pm ---Learn about CB Global vars. http://wiki.codeblocks.org/index.php/Global_compiler_variables

--- End quote ---

Thanks for that. I knew about them, but it seems that I cannot programmatically access (add/modify) global variables either. That is needed for many types of automation scripts.

ConfigManager has only the Read() and Write() functions exposed, so I'm assuming they access only 'default.conf' ? Or is the (C++) 'SetPath()' function setting the path for the node in the XML (default.conf) for Read()/Write() ? If not the latter, what is the format of the key/name parameter to those functions in order to access a node with correct path ?
I have tried things like: "app.version", "app.version.str", "app/version", "/app/version", "app/version/str", "/app/version/str" as parameter to Read(). Read(_T(KEY), _T("undefined")) returns "undefined". Any help would be appreciated. Else, I'd have no choice but to reluctantly dig in the source code, which I cannot do right now.

xod:
Apparently the ConfigManager Squirrel-exposed API (only exposing Read() and Write()) provides isolated/sandboxed 'default.conf' root node :|

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version