News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

New Project Wizard script

Started by Xaviou, August 29, 2006, 05:53:51 PM

Previous topic - Next topic

Xaviou

Hello,

I'm trying to create my own wizard. I don't want it to show the standard "Compiler / Targets" page, but I want to create my own page for this.

My question is : Hown can I add customized build targets to the new project ? I found a "AddBuildTarget" function, but I don't know how to use it.
I didn't found any help on this, neither in this forum, nor in the wiki.

Can someone help me, please ?
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

Xaviou

Hi !

After a couple of tests, I've founded something.

The AddBuildTarget can simply be used like this :

local target=project.AddBuildTarget(_T("target1"));

But another problem persists : how to remove the "default" target automatically created by the wizard ?

Thanks for your replies ...
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]

Trikko

Try with:

project.RemoveBuildTarget(_T("default"));

it works for me.

But i have another problem. I've created a lot of target but all file inside of them are not set for compiling (see checklistbox on project properties/ targets)

Xaviou

Hello.

Thanks for the "project.RemoveBuildTarget" function, I'll try it.

I think I found why all files are unselected in the new targets we create (yes, I have the same problem).

If you have a look at the ScriptedWizard's source code, you'll see that the "SetupProject" function is called after all files are added to all build targets. It is also why the "default" target is created (I think).

If you want files to be selected with all targets, you must create your targets before the "GetFiles" function is called, for example, when leaving the last wizard page. But the problem is : How to get the "project" variable to do this ?
My wxWidgets's stuff : [url="https://wxstuff.xaviou.fr/"]https://wxstuff.xaviou.fr/[/url]