Code::Blocks Forums

User forums => Help => Topic started by: tvossi on July 13, 2006, 02:09:17 pm

Title: Convert File-based Template to Wizard based one
Post by: tvossi on July 13, 2006, 02:09:17 pm
Hello

In Codeblocks 20060605 I built a Template for WinAVR and put it in the Templates folder. In the new Version (20060711) only Wizard based Templates are accepted. So how can I convert. The Template creates a Project with a custom Makefile and custom Make commands.

Thank you very much for helping me!

regards, Thomas

Here ist the Template-File:

<CodeBlocks_template_file>
   <Template name="WinAVR" title="WinAVR-Project" category="WinAVR" bitmap="winavr.png">
      <FileSet name="c" title="C source">
         <File source="winavr-main-c.cpp" destination="main.c"/>
         <File source="Makefile.cpp" destination="Makefile"/>
      </FileSet>
      <Option name="WinAVR-Project">
         <Project file="winavr.cbp"/>
      </Option>
   </Template>
</CodeBlocks_template_file>


and here the Project File:

<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_project_file>
<CodeBlocks_project_file>
   <FileVersion major="1" minor="1"/>
   <Project>
      <Option title="WinAVR-Project"/>
      <Option makefile="Makefile"/>
      <Option makefile_is_custom="1" />
      <MakeCommands>
         <Build command="$make -f $makefile all" />
         <CompileFile command="$make -f $makefile program" />
         <Clean command="$make -f $makefile clean" />
         <DistClean command="$make -f $makefile clean" />
      </MakeCommands>
      <Build>
         <Target title="default">
            <Option type="1"/>
            <Option parameters=""/>
            <Option includeInTargetAll="1"/>
            <Option projectCompilerOptionsRelation="3"/>
            <Option projectLinkerOptionsRelation="3"/>
            <Option projectIncludeDirsRelation="3"/>
            <Option projectLibDirsRelation="3"/>
            <Compiler>
               <Add option=""/>
            </Compiler>
            <Linker>
               <Add option=""/>
            </Linker>
         </Target>
      </Build>
   </Project>
</CodeBlocks_project_file>

Title: Re: Convert File-based Template to Wizard based one
Post by: mandrav on July 13, 2006, 02:59:30 pm
Until the scripts documentation is finished, you can convert it to a user template.
Title: Re: Convert File-based Template to Wizard based one
Post by: tvossi on July 13, 2006, 03:59:07 pm
Thanks for your reply. But then I have the next problem. I use CB from an USB Stick. How can I take my Usertemplates with me (the default.conf-File runs from the CB-Directory)?