Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2008-12-07 19:49:51 +0000
committerDoug Schaefer2008-12-07 19:49:51 +0000
commitd7367d54be4db2486ea682de1a055e0966224e7c (patch)
treeafb1becb5969d8f3028c545a8bca679e460c0d9d /p2/org.eclipse.cdt.p2.generator
parentc37f9bd7a2f4cce1899b907fa5b4b053ac72bdae (diff)
downloadorg.eclipse.cdt-d7367d54be4db2486ea682de1a055e0966224e7c.tar.gz
org.eclipse.cdt-d7367d54be4db2486ea682de1a055e0966224e7c.tar.xz
org.eclipse.cdt-d7367d54be4db2486ea682de1a055e0966224e7c.zip
Productized p2 for sdks.
Diffstat (limited to 'p2/org.eclipse.cdt.p2.generator')
-rw-r--r--p2/org.eclipse.cdt.p2.generator/about.html24
-rw-r--r--p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java79
2 files changed, 91 insertions, 12 deletions
diff --git a/p2/org.eclipse.cdt.p2.generator/about.html b/p2/org.eclipse.cdt.p2.generator/about.html
new file mode 100644
index 0000000000..d7c511887d
--- /dev/null
+++ b/p2/org.eclipse.cdt.p2.generator/about.html
@@ -0,0 +1,24 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"><head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>About</title></head>
+
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 22, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, "Program" will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party ("Redistributor") and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body></html> \ No newline at end of file
diff --git a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
index 5a4c72fe94..9ec0173a0b 100644
--- a/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
+++ b/p2/org.eclipse.cdt.p2.generator/src/org/eclipse/cdt/p2/generator/MinGWGenerator.java
@@ -12,7 +12,6 @@
package org.eclipse.cdt.p2.generator;
import java.io.File;
-import java.net.MalformedURLException;
import java.net.URL;
import java.util.HashMap;
import java.util.Map;
@@ -27,6 +26,8 @@ import org.eclipse.equinox.internal.provisional.p2.artifact.repository.IArtifact
import org.eclipse.equinox.internal.provisional.p2.core.ProvisionException;
import org.eclipse.equinox.internal.provisional.p2.metadata.IArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.metadata.IInstallableUnit;
+import org.eclipse.equinox.internal.provisional.p2.metadata.IUpdateDescriptor;
+import org.eclipse.equinox.internal.provisional.p2.metadata.License;
import org.eclipse.equinox.internal.provisional.p2.metadata.MetadataFactory;
import org.eclipse.equinox.internal.provisional.p2.metadata.ProvidedCapability;
import org.eclipse.equinox.internal.provisional.p2.metadata.RequiredCapability;
@@ -67,13 +68,17 @@ public class MinGWGenerator implements IApplication {
metaRepo = metaRepoMgr.createRepository(repoLocation, REPO_NAME, IMetadataRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
artiRepo = artiRepoMgr.createRepository(repoLocation, REPO_NAME, IArtifactRepositoryManager.TYPE_SIMPLE_REPOSITORY, null);
+ License publicDomainLic = MetadataFactory.createLicense(null, publicDomain);
+ License gplLic = MetadataFactory.createLicense(gplURL, gpl);
+ License lgplLic = MetadataFactory.createLicense(lgplURL, lgpl);
+
Version wascanaVersion = new Version("1.0.0");
String mingwSubdir = "mingw";
// MinGW Runtime
String runtimeId = "wascana.mingw.mingwrt";
Version runtimeVersion = new Version("4.15.1");
- InstallableUnitDescription runtimeIUDesc = createIUDesc(runtimeId, runtimeVersion, "MinGW Runtime");
+ InstallableUnitDescription runtimeIUDesc = createIUDesc(runtimeId, runtimeVersion, "MinGW Runtime Library", publicDomainLic);
IInstallableUnit runtimeIU = createIU(runtimeIUDesc, runtimeId, runtimeVersion,
"http://downloads.sourceforge.net/mingw/mingwrt-3.15.1-mingw32.tar.gz",
mingwSubdir,
@@ -81,17 +86,17 @@ public class MinGWGenerator implements IApplication {
// w32api
String w32apiId = "wascana.mingw.w32api";
- Version w32apiVersion = new Version("3.12");
- InstallableUnitDescription w32apiIUDesc = createIUDesc(w32apiId, w32apiVersion, "MinGW Windows SDK");
+ Version w32apiVersion = new Version("3.13");
+ InstallableUnitDescription w32apiIUDesc = createIUDesc(w32apiId, w32apiVersion, "MinGW Windows Library", publicDomainLic);
IInstallableUnit w32apiIU = createIU(w32apiIUDesc, w32apiId, w32apiVersion,
- "http://downloads.sourceforge.net/mingw/w32api-3.12-mingw32-dev.tar.gz",
+ "http://downloads.sourceforge.net/mingw/w32api-3.13-mingw32-dev.tar.gz",
mingwSubdir,
InstallArtifactRepository.GZIP_COMPRESSON);
// binutils
String binutilsId = "wascana.mingw.binutils";
Version binutilsVersion = new Version("2.18.50.20080109-2");
- InstallableUnitDescription binutilsIUDesc = createIUDesc(binutilsId, binutilsVersion, "MinGW binutils");
+ InstallableUnitDescription binutilsIUDesc = createIUDesc(binutilsId, binutilsVersion, "MinGW binutils", gplLic);
IInstallableUnit binutilsIU = createIU(binutilsIUDesc, binutilsId, binutilsVersion,
"http://downloads.sourceforge.net/mingw/binutils-2.18.50-20080109-2.tar.gz",
mingwSubdir,
@@ -100,7 +105,7 @@ public class MinGWGenerator implements IApplication {
// gcc-4 core
String gcc4coreId = "wascana.mingw.gcc4.core";
Version gcc4Version = new Version("4.3.2.tdm-1");
- InstallableUnitDescription gcc4coreIUDesc = createIUDesc(gcc4coreId, gcc4Version, "MinGW gcc-4 core");
+ InstallableUnitDescription gcc4coreIUDesc = createIUDesc(gcc4coreId, gcc4Version, "MinGW gcc-4 core", gplLic);
RequiredCapability[] gcc4coreReqs = new RequiredCapability[] {
MetadataFactory.createRequiredCapability(
IInstallableUnit.NAMESPACE_IU_ID,
@@ -120,7 +125,8 @@ public class MinGWGenerator implements IApplication {
// gcc-4 g++
String gcc4gppId = "wascana.mingw.gcc4.g++";
- InstallableUnitDescription gcc4gppIUDesc = createIUDesc(gcc4gppId, gcc4Version, "MinGW gcc-4 g++");
+ InstallableUnitDescription gcc4gppIUDesc = createIUDesc(gcc4gppId, gcc4Version, "MinGW gcc-4 g++", gplLic);
+ gcc4gppIUDesc.setLicense(gplLic);
RequiredCapability[] gcc4gppReqs = new RequiredCapability[] {
MetadataFactory.createRequiredCapability(
IInstallableUnit.NAMESPACE_IU_ID,
@@ -134,15 +140,24 @@ public class MinGWGenerator implements IApplication {
// gdb
String gdbId = "wascana.mingw.gdb";
- Version gdbVersion = new Version("6.8.0.3");
- InstallableUnitDescription gdbIUDesc = createIUDesc(gdbId, gdbVersion, "MinGW gdb");
+ Version gdbVersion = new Version("6.8.0.4");
+ InstallableUnitDescription gdbIUDesc = createIUDesc(gdbId, gdbVersion, "MinGW gdb", gplLic);
IInstallableUnit gdbIU = createIU(gdbIUDesc, gdbId, gdbVersion,
"http://downloads.sourceforge.net/mingw/gdb-6.8-mingw-3.tar.bz2",
mingwSubdir,
InstallArtifactRepository.BZIP2_COMPRESSION);
+ // msys
+ String msysId = "wascana.msys.core";
+ Version msysVersion = new Version("1.0.11.20080826");
+ InstallableUnitDescription msysIUDesc = createIUDesc(msysId, msysVersion, "MSYS Build System", gplLic);
+ IInstallableUnit msysIU = createIU(msysIUDesc, msysId, msysVersion,
+ "http://downloads.sourceforge.net/mingw/msysCORE-1.0.11-20080826.tar.gz",
+ "msys",
+ InstallArtifactRepository.GZIP_COMPRESSON);
+
// MinGW toolchain category
- InstallableUnitDescription mingwToolchainDesc = createIUDesc("wascana.mingw", wascanaVersion, "MinGW Toolchain");
+ InstallableUnitDescription mingwToolchainDesc = createIUDesc("wascana.mingw", wascanaVersion, "MinGW Toolchain", null);;
mingwToolchainDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
RequiredCapability[] mingwToolchainReqs = new RequiredCapability[] {
MetadataFactory.createRequiredCapability(
@@ -163,10 +178,33 @@ public class MinGWGenerator implements IApplication {
MetadataFactory.createRequiredCapability(
IInstallableUnit.NAMESPACE_IU_ID,
gdbIU.getId(), new VersionRange(null), null, false, false),
+ MetadataFactory.createRequiredCapability(
+ IInstallableUnit.NAMESPACE_IU_ID,
+ msysIU.getId(), new VersionRange(null), null, false, false),
};
mingwToolchainDesc.setRequiredCapabilities(mingwToolchainReqs);
IInstallableUnit mingwToolchainIU = MetadataFactory.createInstallableUnit(mingwToolchainDesc);
+ // SDL
+ String sdlId = "wascana.sdl";
+ Version sdlVersion = new Version("1.2.13");
+ InstallableUnitDescription sdlIUDesc = createIUDesc(sdlId, sdlVersion, "SDL (Simple Directmedia Layer) Library", lgplLic);
+ IInstallableUnit sdlIU = createIU(sdlIUDesc, sdlId, sdlVersion,
+ "http://www.libsdl.org/release/SDL-devel-1.2.13-mingw32.tar.gz",
+ mingwSubdir,
+ InstallArtifactRepository.GZIP_COMPRESSON);
+
+ // Libraries toolchain category
+ InstallableUnitDescription libsIUDesc = createIUDesc("wascana.libs", wascanaVersion, "Libraries", null);;
+ libsIUDesc.setProperty(IInstallableUnit.PROP_TYPE_CATEGORY, Boolean.TRUE.toString());
+ RequiredCapability[] libsReqs = new RequiredCapability[] {
+ MetadataFactory.createRequiredCapability(
+ IInstallableUnit.NAMESPACE_IU_ID,
+ sdlIU.getId(), new VersionRange(null), null, false, false),
+ };
+ libsIUDesc.setRequiredCapabilities(libsReqs);
+ IInstallableUnit libsIU = MetadataFactory.createInstallableUnit(libsIUDesc);
+
metaRepo.addInstallableUnits(new IInstallableUnit[] {
runtimeIU,
w32apiIU,
@@ -174,7 +212,11 @@ public class MinGWGenerator implements IApplication {
gcc4coreIU,
gcc4gppIU,
gdbIU,
+ msysIU,
mingwToolchainIU,
+
+// sdlIU,
+// libsIU
});
System.out.println("done");
@@ -186,15 +228,17 @@ public class MinGWGenerator implements IApplication {
public void stop() {
}
- private InstallableUnitDescription createIUDesc(String id, Version version, String name) throws ProvisionException {
+ private InstallableUnitDescription createIUDesc(String id, Version version, String name, License license) throws ProvisionException {
InstallableUnitDescription iuDesc = new MetadataFactory.InstallableUnitDescription();
iuDesc.setId(id);
iuDesc.setVersion(version);
+ iuDesc.setLicense(license);
iuDesc.setSingleton(true);
iuDesc.setProperty(IInstallableUnit.PROP_NAME, name);
iuDesc.setCapabilities(new ProvidedCapability[] {
MetadataFactory.createProvidedCapability(IInstallableUnit.NAMESPACE_IU_ID, id, version)
});
+ iuDesc.setUpdateDescriptor(MetadataFactory.createUpdateDescriptor(id, new VersionRange(null), IUpdateDescriptor.NORMAL, ""));
return iuDesc;
}
@@ -214,4 +258,15 @@ public class MinGWGenerator implements IApplication {
return MetadataFactory.createInstallableUnit(iuDesc);
}
+ public static final String publicDomain = "This package is placed in the Public Domain."
+ + " No warranty is given; refer to the header files within the package.";
+
+ public static final String gplURL = "http://www.gnu.org/copyleft/gpl.html";
+
+ public static final String gpl = "GNU GENERAL PUBLIC LICENSE\n" + gplURL;
+
+ public static final String lgplURL = "http://www.gnu.org/copyleft/lesser.html";
+
+ public static final String lgpl = "GNU LESSER GENERAL PUBLIC LICENSE\n" + lgplURL;
+
}

Back to the top