How to add a project item to the repository with empty and not empty folders in Delphi 10.3.3

Viewed 205

I've created a project skeleton and added to the repository as a custom item. But when I want to create a project by the repository, it says:

Could not copy file basefoldername\subfoldername1\filename1.pas

I examined the radstudiorepository.xml and found a section like this

<RADStudioObjectRepository Version="">
  ...
  <Items>
    ...
    <Item IDString="my repository item project name">
      ...
      <Files>
        <File>basefoldername\subfoldername1\filename1.pas</File>
        <File>basefoldername\subfoldername2\filename2.pas</File>
        ...
      </Files>
    </Item>
    ...
  </Items>
  ...
</RADStudioObjectRepository>

I haven't found a DTD or XSD for RADStudioObjectRepository on the net. Could you tell me how could I register a folder to create in this xml file?

You can find the radstudiorepository.xml in this way:

  • Select menu item File\New\Other
  • On the right pane of the New Items dialog RIGHT click on any item
  • Select the Template libraries popup menu item
  • In the Template libraries dialog you can see the value assigned to RAD Studio Object Repository
1 Answers

The Folders tag must be before the Files one. The Folders tag contains Folder tags just like Files contains File ones. The Folder tag text content should be the folder name, just like the File tag text content the file name.

<RADStudioObjectRepository Version="">
  ...
  <Items>
    ...
    <Item IDString="my repository item project name">
      ...
      <Folders>
        <Folder>basefoldername\subfoldername1\</Folder>
        <Folder>basefoldername\subfoldername2\</Folder>
        ...
      </Folders>
      <Files>
        <File>basefoldername\subfoldername1\filename1.pas</File>
        <File>basefoldername\subfoldername2\filename2.pas</File>
        ...
      </Files>
    </Item>
    ...
  </Items>
  ...
</RADStudioObjectRepository>
Related