Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Bull2011-02-25 18:41:20 -0500
committerIan Bull2011-02-25 18:41:20 -0500
commit986bc7548c62270ac88eddd3315b5d23cdfc945f (patch)
tree9cc484ff9799eb171b4c407c42038b66fd83f439 /bundles/org.eclipse.equinox.p2.publisher
parent43aed90cbe654a7dfbf1fabd7195ab0717d650dd (diff)
downloadrt.equinox.p2-986bc7548c62270ac88eddd3315b5d23cdfc945f.tar.gz
rt.equinox.p2-986bc7548c62270ac88eddd3315b5d23cdfc945f.tar.xz
rt.equinox.p2-986bc7548c62270ac88eddd3315b5d23cdfc945f.zip
bug 268895: [publisher] product 'includeLaunchers' attribute
https://bugs.eclipse.org/bugs/show_bug.cgi?id=268895
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.publisher')
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java5
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java8
-rw-r--r--bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java2
3 files changed, 14 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
index 56b46abab..d37be68f6 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/IProductDescriptor.java
@@ -119,6 +119,11 @@ public interface IProductDescriptor {
public File getLocation();
/**
+ * Determines if the launchers should be included in the published product
+ */
+ public boolean includeLaunchers();
+
+ /**
* Returns the license URL for this product
*/
public String getLicenseURL();
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
index 6fac40d04..546cf305c 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/internal/p2/publisher/eclipse/ProductFile.java
@@ -35,6 +35,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
private static final String ATTRIBUTE_ICON = "icon"; //$NON-NLS-1$
protected static final String ATTRIBUTE_FRAGMENT = "fragment"; //$NON-NLS-1$
private static final String ATTRIBUTE_APPLICATION = "application"; //$NON-NLS-1$
+ private static final String ATTRIBUTE_INCLUDE_LAUNCHERS = "includeLaunchers"; //$NON-NLS-1$
private static final String ATTRIBUTE_NAME = "name"; //$NON-NLS-1$
private static final String ATTRIBUTE_VALUE = "value"; //$NON-NLS-1$
private static final String ATTRIBUTE_LOCATION = "location"; //$NON-NLS-1$
@@ -140,6 +141,7 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
private File location;
private List<BundleInfo> bundleInfos;
private Map<String, String> properties;
+ private boolean includeLaunchers = true;
private String licenseURL;
private String licenseText = null;
@@ -320,6 +322,10 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
return (version == null || version.length() == 0) ? "0.0.0" : version; //$NON-NLS-1$
}
+ public boolean includeLaunchers() {
+ return includeLaunchers;
+ }
+
/**
* Returns the VM arguments for a specific platform.
* If the empty string is used for the OS, this returns
@@ -664,6 +670,8 @@ public class ProductFile extends DefaultHandler implements IProductDescriptor {
uid = attributes.getValue(ATTRIBUTE_UID);
productName = attributes.getValue(ATTRIBUTE_NAME);
application = attributes.getValue(ATTRIBUTE_APPLICATION);
+ if (attributes.getIndex(ATTRIBUTE_INCLUDE_LAUNCHERS) >= 0)
+ includeLaunchers = Boolean.parseBoolean(attributes.getValue(ATTRIBUTE_INCLUDE_LAUNCHERS));
String use = attributes.getValue("useFeatures"); //$NON-NLS-1$
if (use != null)
useFeatures = Boolean.valueOf(use).booleanValue();
diff --git a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
index 2f803f4c0..a5ad2675c 100644
--- a/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
+++ b/bundles/org.eclipse.equinox.p2.publisher/src/org/eclipse/equinox/p2/publisher/eclipse/ProductAction.java
@@ -48,7 +48,7 @@ public class ProductAction extends AbstractPublisherAction {
// create all the actions needed to publish a product
ArrayList<IPublisherAction> actions = new ArrayList<IPublisherAction>();
// products include the executable so add actions to publish them
- if (getExecutablesLocation() != null)
+ if (getExecutablesLocation() != null && this.product.includeLaunchers())
actions.add(createApplicationExecutableAction(info.getConfigurations()));
// add the actions that just configure things.
actions.add(createConfigCUsAction());

Back to the top