Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Project Wizard - Couple of questions

(1/4) > >>

MortenMacFly:
Dear all,
I'm using the new project wizard intensivly (expect quite a few wizards once it has reached "final stage" ;-)). Anyway - questions remain that I'd like  to ask how this is possible:
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?

3.) (not wizard related) I'd like to set nothing (an empty string) into the objects output directory. Thus the compiler would really create a command line like: compiler -c mycode.c -o myobject.obj instead of e.g. compiler -c mycode.c -o .\myobject.obj. Hence it I setup "empty", C::B adds the complete path itself which under certain circumstances will break the compilation. How do I achive a command line like: compiler -c mycode.c -o myobject.obj?

With regadrs, Morten.

Edit: Another one (4.):
How do I disable the creation of the -I- compiler flag? Because of this I cannot compile any Smartwin application. I don't understand when this is added to the compiler options. It is not within the project file and I cannot disable it in the compiler options...?!

mandrav:

--- Quote ---1.) Some projects may require a specific compiler. So how can I set the compiler silently (something like SetCompilerID(id))?
--- End quote ---

project->SetCompilerID("gcc");


--- Quote ---2.) I'd like to present a page with further information upon a specfic selection made in the wizard. Is this possible? How?
--- End quote ---

Are you asking how to create a custom page or how to inject a page dynamically?


--- Quote ---How do I disable the creation of the -I- compiler flag?
--- End quote ---

project->SetModeForPCH(pchSourceDir);

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.

MortenMacFly:

--- Quote from: mandrav on April 25, 2006, 04:47:31 pm ---project->SetCompilerID("gcc");

--- End quote ---
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.


--- Quote from: mandrav on April 25, 2006, 04:47:31 pm ---Are you asking how to create a custom page or how to inject a page dynamically?

--- End quote ---
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.


--- Quote from: mandrav on April 25, 2006, 04:47:31 pm ---project->SetModeForPCH(pchSourceDir);

--- End quote ---
Seems to work, too. Thanks a lot.


--- Quote from: mandrav on April 25, 2006, 04:47:31 pm ---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.

--- End quote ---
Reminds me to update the SDK documentation - which I will do in a while...

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?!

With regards, Morten.

MortenMacFly:

--- Quote from: MortenMacFly on April 25, 2006, 07:33:51 pm ---
--- Quote from: mandrav on April 25, 2006, 04:47:31 pm ---project->SetCompilerID("gcc");

--- End quote ---
This works now and because of this I can skip the compiler page for e.g. the Matlab S-Function wizard.

--- End quote ---
Oops- I was too fast with that because I can't. C::B fires an error then:
This wizard is missing some or all of the following mandatory wizard pages:
Project path selection
Compiler and targets selection
Execution aborted...
But what If I have a wizard (and indeed it is like that) where selecting a compiler makes no sense (because it will work with only one compiler) and selecting targets as well as changing the path's is not possible (as it is in the case of a Matlab-S-Function). This is because the LCC compiler expects all object files in the same folder where the sources are. So providing the opportunity to change this would break the compilation ability.
What should I do next?
With regards, Morten.

mandrav:

--- Quote ---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.
--- End quote ---

Not possible yet, but easy to implement :)


--- Quote ---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.
--- End quote ---

Create a resource named wizard.xrc and create wxPanels in there, one for each extra wizard screen.
Then just add the panels using one or more Wizard.AddPage("PanelNameGoesHere"); in BeginWizard()...


--- Quote ---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?!

--- End quote ---

I 'll come back for this one...

Navigation

[0] Message Index

[#] Next page

Go to full version