User forums > Help

Wizard writing...

<< < (2/2)

davemalham:

--- Quote from: davemalham on July 30, 2008, 04:01:29 pm ---
--- Quote from: 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

--- End quote ---

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

--- End quote ---

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

dmoore:

--- Quote from: davemalham on July 31, 2008, 03:57:24 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

--- End quote ---

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?

Navigation

[0] Message Index

[*] Previous page

Go to full version