Template libraries are custom project templates that specify how a project should look and what it should contain. When you create a custom template library, it is placed in the New Files dialog box where is accessible for creating a project using FileNew.
You can create template library projects from scratch, or you can use projects previously created by you or other developers as the basis for template libraries. To use an existing project, you simply create an XML file with the extension .bdstemplatelib which describes the project and is used to create the template library using that project.
<TemplateLibrary Version="1.0" id=""> <Name><Name/> <Description><Description/> <Items> <Item id="" Creator=""> <Name>Name of template library here <Name/> <Description>Custom Project Template<Description/> <Author><Author/> <Icon>MyTemplate\MyTemplateIcon.ico<Icon/> <Projectfile>MyTemplate.dproj</Projectfile> <DefaultProjectName>MyTemplate<DefaultProjectName/> <FilePath>MyTemplate<FilePath/> </Item> </Items> </TemplateLibrary>
Important:
Project Type |
Item Creator Attribute Value |
C++ Projects |
Creator="CBuilderProjectRepositoryCreator" |
Delphi Projects |
Creator="DelphiProjectRepositoryCreator" |
Delphi for .NET Projects |
Creator="DelphiDotNetProjectRepositoryCreator" |
Delphi for ASP .NET Projects |
Creator="AspDelphiProjectRepositoryCreator" |
Example
<TemplateLibrary Version="1.0" id="CompanyXYZASPWebSiteProject"> <Name>ASPWebSiteProject<Name/> <Description>ASP.NET WebSite Project Template<Description/> <Items> <Item id="ASPWebSiteProject" Creator="AspDelphiProjectRepositoryCreator"> <Name>ASP.NET WebSite Project<Name/> <Description>ASP.NET WebSite<Description/> <Author>John Smith<Author/> <Icon>ASPWebsiteProject\ASPWebsiteProjectIcon.ico<Icon/> <Projectfile>ASPWebSiteProject.dproj</Projectfile> <DefaultProjectName>ASPWebSiteProject<DefaultProjectName/> <FilePath>ASPWebSiteProject<FilePath/> </Item> </Items> </TemplateLibrary>
If you have several related projects, you can use a single .bdstemplatelib template library file to list all the projects.
<TemplateLibrary Version="1.0" id="CodeGearASPWebSiteProject"> <Name>ASPWebSiteProject<Name/> <Description>ASP.NET WebSite Project Template<Description/> <Items> <Item id="ASPWebSiteProject" Creator="AspDelphiProjectRepositoryCreator"> <Name>ASP.NET WebSite Project<Name/> <Description>ASP.NET WebSite Project<Description/> <Author>CodeGear<Author/> <Icon>ASPWebsiteProject\ASPWebsiteProjectIcon.ico<Icon/> <Projectfile>ASPWebSiteProject.dproj</Projectfile> <DefaultProjectName>ASPWebSiteProject<DefaultProjectName/> <FilePath>ASPWebSiteProject<FilePath/> </Item> <Item id="ASPWebSiteProjectMP" Creator="AspDelphiProjectRepositoryCreator"> <Name>ASP.NET WebSite Project Master Page<Name/> <Description>ASP.NET WebSite Project Master Page<Description/> <Author>CodeGear<Author/> <Icon>ASPWebsiteProjectMP\ASPWebsiteProjectMPIcon.ico<Icon/> <Projectfile>ASPWebSiteProjectMP.dproj</Projectfile> <DefaultProjectName>ASPWebSiteProjectMP<DefaultProjectName/> <FilePath>ASPWebSiteProjectMP<FilePath/> </Item> <Item id="ASPWebSiteProjectForm" Creator="AspDelphiProjectRepositoryCreator"> <Name>ASP.NET WebSite Project Information Form<Name/> <Description>ASP.NET WebSite Information Form<Description/> <Author>CodeGear<Author/> <Icon>ASPWebsiteProjectForm\ASPWebsiteProjectFormIcon.ico<Icon/> <Projectfile>ASPWebSiteProjectForm.dproj</Projectfile> <DefaultProjectName>ASPWebSiteProjectForm<DefaultProjectName/> <FilePath>ASPWebSiteProjectForm<FilePath/> </Item> </Items> </TemplateLibrary>
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|