样例:使用文件夹来组织用于插件的组件

此样例反映在使用文件夹来组织组件时,插件的软件包将如何显示。

建议为较大的应用程序使用组织好的文件夹结构,因为这可以显著加快加载时间。以下是包含多个 LSP 文件和资源文件的插件的示例。在本示例中的插件名为 OfficeSymbols,其文件夹结构可能如下所示:

OfficeSymbols.bundle

  |- PackageContents.xml

  |- Contents

      |- OfficeSymbolsMain.lsp

      |- OfficeSymbolsUtilities.lsp

      |- Resources

          |- OfficeSymbols.dwg

          |- OfficeSymbols.cuix

          |- OfficeSymbols.ico

      |- Help

          |- OfficeSymbols.htm

PackageContents.xml 的定义

<?xml version="1.0" encoding="utf-8" ?>
<ApplicationPackage
    SchemaVersion="1.0"
    AppVersion="1.0"
    Author="ABC Indoor CAD, Inc."
    ProductCode="[Add Unique Plug-in GUID Here]"
    Name="Office Symbols (contains Full version)"
    Icon="./Contents/Resources/OfficeSymbols.ico"
    Helpfile="./Contents/Help/OfficeSymbols.htm"
>
 
  <CompanyDetails
    Name="ABC Indoor CAD, Inc."
    Phone="1 (555)-415-1234"
    PhoneEsp="34 5554 151234"
    Url="www.abcindoorcad.com"
    UrlEsp="www.abcindoorcad.es"
    Email="support@abcindoorcad.com"
  />
 
  <Components>
    <RuntimeRequirements SupportPath="./Contents/Support"/>
    <ComponentEntry
      AppName="MainLISP"
      ModuleName="./Contents/OfficeSymbolsMain.lsp"
    />
    <ComponentEntry
      AppName="UtilitiesLISP"
      ModuleName="./Contents/OfficeSymbolsUtilities.lsp"
    />
    <ComponentEntry
      ModuleName="./Contents/Resources/OfficeSymbols.cuix"
    />
  </Components>
</ApplicationPackage>