RAD Studio
ContentsIndex
PreviousUpNext
Package Collection Files

Package collections (.dpc files) offer a convenient way to distribute packages to other developers. Each package collection contains one or more packages, including bpls and any additional files you want to distribute with them. When a package collection is selected for IDE installation, its constituent files are automatically extracted from their .pce container; the Installation dialog box offers a choice of installing all packages in the collection or installing packages selectively.

To create package collection files

  1. Choose ToolsPackage Collection Editor to open the Package Collection editor.
  2. Either choose EditAdd Package or click the Add a package button, then select a bpl in the Select Package dialog and click Open. To add more bpls to the collection, click the Add a package button again. A tree diagram on the left side of the Package editor displays the bpls as you add them. To remove a package, select it and either choose EditRemove Package or click the Remove the selected package button.
  3. Select the Collection node at the top of the tree diagram. On the right side of the Package Collection editor, two fields appear:
    • In the Author/Vendor Name edit box, you can enter optional information about your package collection that appear in the Installation dialog when users install packages.
    • Under Directory list, list the default directories where you want the files in your package collection to be installed. Use the Add, Edit, and Delete buttons to edit this list. For example, suppose you want all source code files to be copied to the same directory. In this case, you might enter Source as a Directory name with C:\MyPackage\Source as the Suggested path. The Installation dialog box will display C:\MyPackage\Source as the suggested path for the directory.
  4. In addition to bpls, your package collection can contain .dcp, .dcu, and .pas (unit) files, documentation, and any other files you want to include with the distribution. Ancillary files are placed in file groups associated with specific packages (bpls); the files in a group are installed only when their associated bpl is installed. To place ancillary files in your package collection, select a bpl in the tree diagram and click the Add a file group button; type a name for the file group. Add more file groups, if desired, in the same way. When you select a file group, new fields will appear on the right in the Package Collection editor.
    • In the Install Directory list box, select the directory where you want files in this group to be installed. The drop-down list includes the directories you entered under Directory list in step 3, above.
    • Check the Optional Group check box if you want installation of the files in this group to be optional.
    • Under Include Files, list the files you want to include in this group. Use the Add, Delete, and Auto buttons to edit the list. The Auto button allows you to select all files with specified extensions that are listed in the contains clause of the package; the Package Collection editor uses the global Library Path to search for these files.
  5. You can select installation directories for the packages listed in the requires clause of any package in your collection. When you select a bpl in the tree diagram, four new fields appear on the right side of the Package Collection editor:
    • In the Required Executables list box, select the directory where you want the .bpl files for packages listed in the requires clause to be installed. (The drop-down list includes the directories you entered under Directory list in step 3, above.) The Package Collection editor searches for these files using Delphi's global Library Path and lists them under Required Executable Files.
    • In the Required Libraries list box, select the directory where you want the .dcp files for packages listed in the requires clause to be installed. (The drop-down list includes the directories you entered under Directory List in step 3, above.) The Package Collection editor searches for these files using the global Library Path and lists them under Required Library Files.
  6. To save your package collection source file, choose FileSave. Package collection source files should be saved with the .pce extension.
  7. To build your package collection, click the Compile button. The Package Collection editor generates a .dpc file with the same name as your source (.pce) file. If you have not yet saved the source file, the editor queries you for a file name before compiling.
To edit or recompile an existing .pce file, select FileOpen in the Package Collection editor and locate the file you want to work with.

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!