Package Projtemplates lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- Inthya · 2021-11-01 11:17 Hello, I tried to configure the package ProjTemplates. After some experimentation today I was able to successfully create a new project out of a template with this package. But it seems there is a problem with the detection inside __PROJNAME__.lpi. After creating the new project, Lazarus told me, that the created lpi- file seems no ordinary lpi-file. So I looked into the lpi-file with a basic editor. In fact the package replaced the section name <\ProjectOptions> with the name of the new Project. For example, if my given name for the new Project is “test” the package replaces <\ProjectOptions> with <\testOptions> Obviously Lazarus isn’t able to read the informations between <\testOptions> Is there something I’m doing wrong? Below are my templatefiles and the files created by projtemplates. I named the new project "test". Take a look at lines 3 and 39 of __PROJNAME__.lpi and compare it with lines 3 and 39 of test.lpi. My project.ini file Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i [Variables] [Project]Name=FUH_2Description=Einfache Lazarus-Anwendung an die Vorgaben der FUH angepasst. My __PROJNAME__.lpr file Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$R+}{$B+} program __PROJNAME__ (output);   { Das Programm nacht ... und gibt ... aus }   { constant definition part }   { type definition part}   { variable declaration part}   { function declaration part} begin end.  My __PROJNAME__.lpi file Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i                                                                   <UseAppBundle Value="False"/>      <ResourceType Value="res"/>    </General>    <BuildModes Count="1" Active="Default">      <Item1 Name="Default" Default="True"/>    </BuildModes>    <PublishOptions>    <Version Value="2"/>      <UseFileFilters Value="True"/>    </PublishOptions>    <RunParams>      <FormatVersion Value="2"/>      <Modes Count="0"/>    </RunParams>    <Units Count="1">      <Unit0>      <Filename Value="__PROJNAME__.lpr"/>        <IsPartOfProject Value="True"/>        <IsVisibleTab Value="True"/>        <CursorPos X="5" Y="18"/>        <UsageCount Value="20"/>        <Loaded Value="True"/>      </Unit0>    </Units>    <JumpHistory HistoryIndex="-1"/>  </ProjectOptions>  <CompilerOptions>    <Version Value="11"/>    <PathDelim Value="\"/>    <Target>      <Filename Value="__PROJNAME__"/>    </Target>    <SearchPaths>      <IncludeFiles Value="$(ProjOutDir)"/>      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>    </SearchPaths>  </CompilerOptions>  <Debugging>    <Exceptions Count="3">      <Item1>        <Name Value="EAbort"/>      </Item1>      <Item2>      <Name Value="ECodetoolError"/>      </Item2>      <Item3>        <Name Value="EFOpenError"/>      </Item3>    </Exceptions>  </Debugging></CONFIG> The created test.lpr file Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$R+}{$B+} program test (output);   { Das Programm nacht ... und gibt ... aus }   { constant definition part }   { type definition part}   { variable declaration part}   { function declaration part} begin end.  The created test.lpi file Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i <?xml version="1.0" encoding="UTF-8"?><CONFIG>  <testOptions>    <Version Value="11"/>    <PathDelim Value="\"/>    <General>      <Flags>      <MainUnitHasCreateFormStatements Value="False"/>        <MainUnitHasTitleStatement Value="False"/>        <MainUnitHasScaledStatement Value="False"/>      </Flags>      <MainUnit Value="0"/>      <Title Value="test"/>      <UseAppBundle Value="False"/>      <ResourceType Value="res"/>    </General>    <BuildModes Count="1" Active="Default">      <Item1 Name="Default" Default="True"/>    </BuildModes>    <PublishOptions>      <Version Value="2"/>      <UseFileFilters Value="True"/>    </PublishOptions>  <RunParams>      <FormatVersion Value="2"/>      <Modes Count="0"/>  </RunParams>    <Units Count="1">      <Unit0>        <Filename Value="test.lpr"/>        <IsPartOftest Value="True"/>        <IsVisibleTab Value="True"/>        <CursorPos X="5" Y="18"/>        <UsageCount Value="20"/>        <Loaded Value="True"/>      </Unit0>  </Units>    <JumpHistory HistoryIndex="-1"/>  </testOptions>  <CompilerOptions>    <Version Value="11"/>    <PathDelim Value="\"/>  <Target>      <Filename Value="test"/>    </Target>    <SearchPaths>      <IncludeFiles Value="$(ProjOutDir)"/>      <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>    </SearchPaths>  </CompilerOptions>  <Debugging>    <Exceptions Count="3">      <Item1>        <Name Value="EAbort"/>      </Item1>      <Item2>      <Name Value="ECodetoolError"/>      </Item2>      <Item3>        <Name Value="EFOpenError"/>      </Item3>    </Exceptions>  </Debugging></CONFIG>