[Lazarus] How to add your own 'New Project' template?

Michael Van Canneyt michael at freepascal.org
Sat Aug 23 13:21:52 CEST 2008



On Fri, 22 Aug 2008, Tom Verhoeff wrote:

> Since project.ini seems to be treated specially anyway (it is
> not copied), it makes sense to treat project.* also specially
> and substitute $(ProjName) for 'project'.  I will then add an
> example...
> 
> (I'll start a new thread on renaming files within a project,
> after creation.)

I have implemented the option as I proposed it.
ProjectFile=demo
all files called demo.* will be renamed to the PROJNAME variable.
(references to such file are NOT automatically renamed,  you must
replace these references with __PROJNAME__ yourself.

The ProjectFile setting defaults to 'project'.

Please take into account that the variable substitution happens
on __VARNAME__ instead of $(VarName). This was a patch by someone,
I don't remember who exactly. (there are 2 variable names which
control this, so it's easily changeable). 
I have adapted the README for this.

I adapted the variable dialog so that if no variables are present,
the grid is disabled and the caption adapted accordingly.

Committed in revision 16196 of lazarus.

Michael.



More information about the Lazarus mailing list