Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: ollydbg on April 28, 2013, 03:28:25 am

Title: Is it possible to export the Compiler options-> Custom variables in scirpt?
Post by: ollydbg on April 28, 2013, 03:28:25 am
Hi, I'm asking to export the property of project build options -> Custom variables manipulation functions in scripts. I'm checking this file: sdk\scripting\bindings\scriptbindings.cpp, but I don't see it was exported.

The reason is that I would like to create a project wizard for OpenCV, but I'd like to add some custom variables in the project, it is much like the things in cbp files like:
Code
			<Environment>
<Variable name="WX_CFG" value="" />
</Environment>
I'd like to add some custom variables like "CV_CFG", and I need to set it's value in script wizard. Is it possible? Is it simple? I'm unfamilar with script bindings, thanks.
Title: Re: Is it possible to export the Compiler options-> Custom variables in scirpt?
Post by: oBFusCATed on April 28, 2013, 04:23:11 am
Then you'll have to read this: http://wiki.codeblocks.org/index.php?title=Script_bindings
Title: Re: Is it possible to export the Compiler options-> Custom variables in scirpt?
Post by: ollydbg on April 28, 2013, 04:45:18 am
Then you'll have to read this: http://wiki.codeblocks.org/index.php?title=Script_bindings
Thanks for point to this reference, I will read it soon. :)

EDIT:
Oh, it looks like those functions are already exposed, they are:
Code
                func(&CompileOptionsBase::SetVar, "SetVar").
                func(&CompileOptionsBase::GetVar, "GetVar").
                func(&CompileOptionsBase::UnsetVar, "UnsetVar").
                func(&CompileOptionsBase::UnsetAllVars, "UnsetAllVars");