Author Topic: Is it possible to export the Compiler options-> Custom variables in scirpt?  (Read 9058 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
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.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 6077
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
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");

« Last Edit: April 28, 2013, 05:34:53 am by ollydbg »
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.