Forgot to ask, also need to be able to setup various debugger settings so the generated projects can immediately use OpenOCD. Not found any functions for setting debugger options in the Wiizard.script , so any information there would also be useful.at the moment this is not possible:
TIA
I am sure its obvious, but any hints? Are there functions to do this, is anything done automagically, do I have to simply grab the source file folder from somewhere, and use scripts to manually copy everything to the Projects folder?
function GetGeneratedFile(file_index)
filename.ext;contents
local path = Wizard.FindTemplateFile("YourTemplateFileName");
local buffer = IO.ReadFileContents(path);
Wizard.FindTemplateFile
/templates/wizard/sub folder. So you should put your template files in a subfolder of these path. Ofc you have to add this subfolder to the name you provide to the FindTemplateFile function.
@oBFusCATedIt is fine to add stuff to the script bindings. We'll have to do some conflict resolving, but this is inevitable anyway.
So is this a no or a go for the api changes to the script binding? Probably not before the next release?
QuoteI am sure its obvious, but any hints? Are there functions to do this, is anything done automagically, do I have to simply grab the source file folder from somewhere, and use scripts to manually copy everything to the Projects folder?
The Wizard "asks" you for the file to generate inCodefunction. As described you have to return the filename and content with the syntax:function GetGeneratedFile(file_index)
CodeThe variable index is incremented automatically on each call, so you can go trough an array of your files.filename.ext;contents
If you have templates you have to read them and return the content from this functionCodeYou can modify the content of the file before you return it.local path = Wizard.FindTemplateFile("YourTemplateFileName");
local buffer = IO.ReadFileContents(path);
The functionCodeWizard.FindTemplateFile
Will search for the filename in theQuote/templates/wizard/sub folder. So you should put your template files in a subfolder of these path. Ofc you have to add this subfolder to the name you provide to the FindTemplateFile function.
I hope this helps a bit...
@oBFusCATed
So is this a no or a go for the api changes to the script binding? Probably not before the next release?
I'm available for doing patch reviews and guidance how to implement something. If you're going to change something in Code::Blocks it is better to ask first if the direction is good, so there is a change that your modification would be accepted.
I'm not sure if I'll be available to do feature implementations next year.
The remote debugging feature have been committed.
See these two links:
* https://sourceforge.net/p/codeblocks/tickets/512/#fcab
* http://forums.codeblocks.org/index.php/topic,16852.msg159912.html#msg159912