Author Topic: New Project Wizard script  (Read 3574 times)

Online Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
New Project Wizard script
« on: August 29, 2006, 05:53:51 pm »
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 ?
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/

Online Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
Re: New Project Wizard script
« Reply #1 on: August 29, 2006, 06:51:40 pm »
Hi !

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

The AddBuildTarget can simply be used like this :

Code
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 ...
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/

Trikko

  • Guest
Re: New Project Wizard script
« Reply #2 on: August 31, 2006, 10:50:52 pm »
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)

Online Xaviou

  • Regular
  • ***
  • Posts: 403
    • X@v's wxStuff
Re: New Project Wizard script
« Reply #3 on: September 01, 2006, 12:44:59 am »
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 ?
The french wxWidgets site : http://www.wxdev.fr
My wxWidgets's stuff : https://wxstuff.xaviou.fr/