Skip to main content
summaryrefslogtreecommitdiffstats
path: root/p2
diff options
context:
space:
mode:
authorDoug Schaefer2010-01-14 00:49:53 -0500
committerDoug Schaefer2010-01-14 00:49:53 -0500
commit27cd1b6b1964598d02d2b8ad773d53e1c00939f9 (patch)
tree427bc3364d73cef7f25385d961f7dd44b23fb836 /p2
parent7cb02cf641cc303a3eef4b7ab0e2a22df73851d1 (diff)
downloadorg.eclipse.cdt-27cd1b6b1964598d02d2b8ad773d53e1c00939f9.tar.gz
org.eclipse.cdt-27cd1b6b1964598d02d2b8ad773d53e1c00939f9.tar.xz
org.eclipse.cdt-27cd1b6b1964598d02d2b8ad773d53e1c00939f9.zip
Add source.
Diffstat (limited to 'p2')
-rw-r--r--p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java62
1 files changed, 40 insertions, 22 deletions
diff --git a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
index c87339c04d..7a9ca9b693 100644
--- a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
+++ b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/WascanaGenerator.java
@@ -83,46 +83,55 @@ public class WascanaGenerator implements IApplication {
binutilsVersion,
gpl30License,
null);
+ IInstallableUnit binutilsSrcIU = createIU(
+ "wascana.binutils.source",
+ "Wascana MinGW binutils source",
+ binutilsVersion,
+ gpl30License,
+ null);
// toolchain
- InstallableUnitDescription toolsIUDesc = createIUDesc(
+ IInstallableUnit toolsIU = createCategory(
"wascana.tools",
"Wascana Tools",
wascanaVersion,
- null);
- toolsIUDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
- toolsIUDesc.setRequiredCapabilities(new IRequiredCapability[] {
- createRequiredCap(binutilsIU),
- });
- IInstallableUnit toolsIU = MetadataFactory.createInstallableUnit(toolsIUDesc);
+ new IRequiredCapability[] {
+ createRequiredCap(binutilsIU),
+ });
- InstallableUnitDescription sdksIUDesc = createIUDesc(
+ IInstallableUnit sdksIU = createCategory(
"wascana.sdks",
"Wascana SDKs",
wascanaVersion,
- null);
- sdksIUDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
- sdksIUDesc.setRequiredCapabilities(new IRequiredCapability[] {
- });
- IInstallableUnit sdksIU = MetadataFactory.createInstallableUnit(sdksIUDesc);
+ new IRequiredCapability[] {
+ });
- // The main Wascana category
- InstallableUnitDescription wascanaIUDesc = createIUDesc(
+ IInstallableUnit sourceIU = createCategory(
+ "wascana.source",
+ "Wascana Source",
+ wascanaVersion,
+ new IRequiredCapability[] {
+ createRequiredCap(binutilsSrcIU),
+ });
+
+ IInstallableUnit wascanaIU = createCategory(
"wascana",
"Wascana Desktop Developer",
wascanaVersion,
- null);
- wascanaIUDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
- wascanaIUDesc.setRequiredCapabilities(new IRequiredCapability[] {
- createRequiredCap(toolsIU),
- createRequiredCap(sdksIU),
- });
- IInstallableUnit wascanaIU = MetadataFactory.createInstallableUnit(wascanaIUDesc);
+ new IRequiredCapability[] {
+ createRequiredCap(toolsIU),
+ createRequiredCap(sdksIU),
+ createRequiredCap(sourceIU),
+ });
metaRepo.addInstallableUnits(new IInstallableUnit[] {
binutilsIU,
+ binutilsSrcIU,
+
toolsIU,
sdksIU,
+ sourceIU,
+
wascanaIU
});
@@ -211,6 +220,15 @@ public class WascanaGenerator implements IApplication {
return MetadataFactory.createInstallableUnit(iuDesc);
}
+ private IInstallableUnit createCategory(String id, String name, Version version,
+ IRequiredCapability[] reqs) throws ProvisionException {
+ InstallableUnitDescription iuDesc = createIUDesc(id, name, version, null);
+ if (reqs != null)
+ iuDesc.setRequiredCapabilities(reqs);
+ iuDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, String.valueOf(true));
+ return MetadataFactory.createInstallableUnit(iuDesc);
+ }
+
private IRequiredCapability createRequiredCap(IInstallableUnit iu) {
return MetadataFactory.createRequiredCapability(
IInstallableUnit.NAMESPACE_IU_ID,

Back to the top