設定建置的第一個步驟是建立執行建置的目錄。 這個目錄稱為建置目錄,它會包含即將建置的外掛程式和特性及所有產生的構件。 之後,再將外掛程式和特性分別複製到 "plugins" 和 "features" 子目錄中。 feature 資料夾預用來存放建置的特性。
設定建置的第二個步驟,是將 org.eclipse.pde.build/templates/headless-build 中的 build.properties 範本檔複製到將成為建置配置目錄的新目錄(也稱為配置目錄)中。 請編輯複製的 build.properties 檔,設定下列內容:org.foo.Feature
之特性的 allElementsDelegator:
<target name="allElementsDelegator">
<ant antfile="${genericTargets}" target="${target}">
<property name="type" value="feature" />
<property name="id" value="org.foo.Feature" />
</ant>
</target>
org.foo.Feature
(當 configs 設為 win32、win32、x86)時,您應該會有下列目標:
<!--Target for assembling os=win32, ws=win32, arch=x86 -->當建置不關聯於特定平台的配置(未設定 configs,或設為 *,*,*)時,目標應該如下:
<target name="assemble.org.foo.Feature.win32.win32.x86">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}/">
</target>
<!--The platform independent assemble target-->
<target name="assemble.org.foo.Feature">
<ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
</target>
-buildfile=</path/to/build.xml>
:這是 PDE 建置所提供之 build.xml 的路徑。
它在 org.eclipse.pde.build/scripts 目錄中。
它是驅動整個建置程序的建置檔。
-Dbuilder=</path/to/configuration folder>
:這是通往建置配置資料夾的路徑。
java -jar
<eclipseInstall>/startup.jar
-application org.eclipse.ant.core.antRunner -buildfile
<<eclipseInstall>/plugins/org.eclipse.pde.build_<version>/scripts/build.xml>
-Dbuilder=<path to the build configuration folder>
如果建置需要進一步的自訂,也就是從儲存庫中進行提取,請參閱各個「進階 PDE 建置」主題,以取得詳細資訊。