Code::Blocks Forums

User forums => Help => Topic started by: davemalham on July 23, 2008, 04:56:35 pm

Title: Wizard writing...
Post by: davemalham on July 23, 2008, 04:56:35 pm
Okay, so not that new a topic but I'm currently really stumped as to how to do something, having read the wiki topics, looked (I think) all the supplied wizards and read the forums. I'm putting together a wizard to produce VST (audio) plugins (Windows and Mac) using VSTGui. I want a new project to have in it the standard files from the VSTSDK and VSTGui folders on my machine but I do not want to have them copied into the project folder each time - which I could do just by putting them in the wizard/files folder. I know that this is likely to result in a "D'oooh" moment, but any help would be greatly appreciated and the wizard will, of course, be made publicly available when it's stable...

   Dave
Title: Re: Wizard writing...
Post by: davemalham on July 25, 2008, 05:58:08 pm
Anyone??
Title: Re: Wizard writing...
Post by: dje on July 25, 2008, 10:42:42 pm
I do not want to have them copied into the project folder each time - which I could do just by putting them in the wizard/files folder.
I'm not sure to really understand what you mean.
If the purpose is to install you SDK once without copying it for each project, you could adapt wxWidgets project wizard to your need.

Dje
Title: Re: Wizard writing...
Post by: stahta01 on July 26, 2008, 04:50:06 am
Is this what project templates are for?

I have not used them, but I thought this was there purpose.

Tim S
Title: Re: Wizard writing...
Post by: davemalham on July 30, 2008, 04:01:29 pm
Is this what project templates are for?

I have not used them, but I thought this was there purpose.

Tim S

Well, I would prefer to use a wizard because the scripting (once I get my head round it) should give me the opportunity to make the whole process a lot more student proof (note that we're not talking about computer scientists here, just ordinary students doing Music Technology), but, for now, I have worked up a template which does pretty well all the basics of what I want, except change the name of the .def file I have to pass to the linker (this is required because of the way VST audio plugs are structured). If I make a new VST plug project, setting the name as, say, "New_VST_Plugin" all the file names, such as the .dll output name, etc., get changed appropriately, but not the .def file which, because it is include in the template file thus;
<Linker>
      <Add option="-def AmbVSTGui.def" />
</Linker>

whereas any other AmbVSTGui reference is changed to New_VST_Plugin in the .cbp project file generated from the template. Is there some magic I can do to change this behaviour, or is this a C::B "feature"?

   Dave
Title: Re: Wizard writing...
Post by: davemalham on July 31, 2008, 03:57:24 pm
Is this what project templates are for?

I have not used them, but I thought this was there purpose.

Tim S

Well, I would prefer to use a wizard because the scripting (once I get my head round it) should give me the opportunity to make the whole process a lot more student proof (note that we're not talking about computer scientists here, just ordinary students doing Music Technology), but, for now, I have worked up a template which does pretty well all the basics of what I want, except change the name of the .def file I have to pass to the linker (this is required because of the way VST audio plugs are structured). If I make a new VST plug project, setting the name as, say, "New_VST_Plugin" all the file names, such as the .dll output name, etc., get changed appropriately, but not the .def file which, because it is include in the template file thus;
<Linker>
      <Add option="-def AmbVSTGui.def" />
</Linker>

whereas any other AmbVSTGui reference is changed to New_VST_Plugin in the .cbp project file generated from the template. Is there some magic I can do to change this behaviour, or is this a C::B "feature"?

   Dave

I have tried the following, which I thought should work, but it doesn't :(;

<Linker>
   <Add option="-def $(PROJECT_FILENAME).def" />
</linker>
as the -def $(PROJECT_FILENAME).def just appears verbatim in the Project build options "Other linker options" box
Title: Re: Wizard writing...
Post by: dmoore on July 31, 2008, 08:52:54 pm
I have tried the following, which I thought should work, but it doesn't :(;

<Linker>
   <Add option="-def $(PROJECT_FILENAME).def" />
</linker>
as the -def $(PROJECT_FILENAME).def just appears verbatim in the Project build options "Other linker options" box

The variable substitutions aren't made at project creation time, only at build time, so that's why you see the literal text in the build options. Using such a substitution should still do what you need, but you probably want to use PROJECT_NAME instead of PROJECT_FILENAME because the latter appends (.cbp). (I think it is possible for PROJECT_NAME+".cbp" !=PROJECT_FILENAME, which may be an issue)

have you tried building a sample project?