1.) Some projects may require a specific compiler. So how can I set the compiler silently (something like SetCompilerID(id))?
2.) I'd like to present a page with further information upon a specfic selection made in the wizard. Is this possible? How?
How do I disable the creation of the -I- compiler flag?
project->SetCompilerID("gcc");This works now and because of this I can skip the compiler page for e.g. the Matlab S-Function wizard. Anyway: If I would like to use the compiler page to setup the targets and path only, would it be possible to select a compiler in the combobox but greying it out? Thus a user could not change the compiler, but get's informed about the selection.
Are you asking how to create a custom page or how to inject a page dynamically?I really ment a custom page (like the welcome dialog) where I could place some - or at least one - lable(s) with additional information. To make an example: For the Matlab S-Function in the end there should be a page that informs the user about the fact that depending on the Matlab version he may have to remove a library and rename another.
project->SetModeForPCH(pchSourceDir);Seems to work, too. Thanks a lot.
Generally, until a doc is written, if you want to know what parts of the SDK are exposed to scripts have a look at src/sdk/as/*.cpp.Reminds me to update the SDK documentation - which I will do in a while...
Oops- I was too fast with that because I can't. C::B fires an error then:project->SetCompilerID("gcc");This works now and because of this I can skip the compiler page for e.g. the Matlab S-Function wizard.
This works now and because of this I can skip the compiler page for e.g. the Matlab S-Function wizard. Anyway: If I would like to use the compiler page to setup the targets and path only, would it be possible to select a compiler in the combobox but greying it out? Thus a user could not change the compiler, but get's informed about the selection.
I really ment a custom page (like the welcome dialog) where I could place some - or at least one - lable(s) with additional information. To make an example: For the Matlab S-Function in the end there should be a page that informs the user about the fact that depending on the Matlab version he may have to remove a library and rename another.
Another question is raised concerning the compiler selection: How do I verify a compiler with a specific ID is present? E.g. it the LCC patch is not applied there is no compiler with the ID "lcc". I searched the cpp files but "SetCompilerID" is a void function...?! I suggest changing it to bool to provide this feedback for this purpose?!
Create a resource named wizard.xrc and create wxPanels in there, one for each extra wizard screen.Sometimes I can't see the wood for the trees. Of course! So it's like with the path setup... Sorry, this question was kind of stupid... :oops:
Check out revision 2385.Thanks Yiannis, the changes looking good! :D I've played around a little but trapped in an assertion failure where I need some help:
if (!IsValidCompilerID("lcc"))
{
ShowError("The wizard has detected that your version of Code::Blocks does not "
"support the LCC compiler which is required for this project. "
"The wizard cannot continue. Please update Code::Blocks.");
return false;
}
Wizard.AddIntroPage(intro_msg);
Wizard.AddProjectPathPage();
Wizard.AddPage("MatlabPath");
Wizard.AddPage("MatlabHint");
Check out revision 2385.Thanks Yiannis, the changes looking good! :D I've played around a little but trapped in an assertion failure where I need some help:
I added the following code in my Matlab-C-S-Function wizard in the SetupProject(...) method:Codeif (!IsValidCompilerID("lcc"))
{
ShowError("The wizard has detected that your version of Code::Blocks does not "
"support the LCC compiler which is required for this project. "
"The wizard cannot continue. Please update Code::Blocks.");
return false;
}
CompilerFactory.IsValidCompilerID(). Can you test it and tell me if this works?Yes, this works again. Anyway, now the wizard runs through but during creation of the project C::B crashes (in CompilerFactory::GetCompilerIndex(...)). I've attached the crash report and the wizard your your inspection.
BuildTarget@ target = project.GetBuildTarget(Wizard.GetDebugName());
Anyway: If I run the wizard a second time the message does not appear but C::B crashes again with the same error. I've attached the rpt file for this case.
It has already been said that you will experience this behaviour, if your wx version is lower than 2.6.1 (or was that 2.6.2? - can't recall now).I know, but I use wxWidgets 2.6.2 (I forgot to add that to the post).
Anyway: Are you sure that this is related? Because if I remove the messagbox I experience the crash in the first place.