|
Lines 155-160
Link Here
|
| 155 |
|
155 |
|
| 156 |
private void generateP2InfCUs(StringBuffer buffer, int startIndex, boolean cus, boolean launchers) { |
156 |
private void generateP2InfCUs(StringBuffer buffer, int startIndex, boolean cus, boolean launchers) { |
| 157 |
int index = startIndex; |
157 |
int index = startIndex; |
|
|
158 |
|
| 159 |
String productVersionString = productFile.getVersion(); |
| 160 |
String productRangeString = null; |
| 161 |
if (productVersionString.endsWith(PROPERTY_QUALIFIER)) { |
| 162 |
Version productVersion = new Version(productVersionString); |
| 163 |
productVersionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 164 |
productRangeString = "[" + productVersionString + "," + productVersionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 165 |
} else { |
| 166 |
productRangeString = new VersionRange(new Version(productVersionString), true, new Version(productVersionString), true).toString(); |
| 167 |
} |
| 168 |
|
| 158 |
if (cus) { |
169 |
if (cus) { |
| 159 |
BundleInfo[] infos = getDefaultStartInfo(); |
170 |
BundleInfo[] infos = getDefaultStartInfo(); |
| 160 |
for (int i = 0; i < infos.length && infos[i] != null; i++) { |
171 |
for (int i = 0; i < infos.length && infos[i] != null; i++) { |
|
Lines 172-178
Link Here
|
| 172 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"; //$NON-NLS-1$ |
183 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:false);"; //$NON-NLS-1$ |
| 173 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"; //$NON-NLS-1$ |
184 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] += "setProgramProperty(propName:org.eclipse.update.reconcile, propValue:);"; //$NON-NLS-1$ |
| 174 |
} |
185 |
} |
| 175 |
P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), bundle.getVersion(), bundle.getPlatformFilter(), instructions); |
186 |
if (!GENERIC_VERSION_NUMBER.equals(productVersionString)) |
|
|
187 |
P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), productVersionString, bundle.getVersion(), bundle.getPlatformFilter(), instructions); |
| 188 |
else |
| 189 |
P2InfUtils.printBundleCU(buffer, index++, bundle.getSymbolicName(), bundle.getVersion(), bundle.getPlatformFilter(), instructions); |
| 176 |
|
190 |
|
| 177 |
} |
191 |
} |
| 178 |
} |
192 |
} |
|
Lines 180-194
Link Here
|
| 180 |
BundleDescription launcher = assembly.getPlugin(BUNDLE_EQUINOX_LAUNCHER, null); |
194 |
BundleDescription launcher = assembly.getPlugin(BUNDLE_EQUINOX_LAUNCHER, null); |
| 181 |
if (launcher != null && launchers) { |
195 |
if (launcher != null && launchers) { |
| 182 |
VersionRange launcherRange = new VersionRange(launcher.getVersion(), true, launcher.getVersion(), true); |
196 |
VersionRange launcherRange = new VersionRange(launcher.getVersion(), true, launcher.getVersion(), true); |
| 183 |
String versionString = productFile.getVersion(); |
|
|
| 184 |
String rangeString = null; |
| 185 |
if (versionString.endsWith(PROPERTY_QUALIFIER)) { |
| 186 |
Version productVersion = new Version(versionString); |
| 187 |
versionString = productVersion.getMajor() + "." + productVersion.getMinor() + "." + productVersion.getMicro() + ".$qualifier$"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 188 |
rangeString = "[" + versionString + "," + versionString + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 189 |
} else { |
| 190 |
rangeString = new VersionRange(new Version(versionString), true, new Version(versionString), true).toString(); |
| 191 |
} |
| 192 |
|
197 |
|
| 193 |
// include the launcher jar |
198 |
// include the launcher jar |
| 194 |
P2InfUtils.printRequires(buffer, null, index++, P2InfUtils.NAMESPACE_IU, BUNDLE_EQUINOX_LAUNCHER, launcherRange, launcher.getPlatformFilter(), true); |
199 |
P2InfUtils.printRequires(buffer, null, index++, P2InfUtils.NAMESPACE_IU, BUNDLE_EQUINOX_LAUNCHER, launcherRange, launcher.getPlatformFilter(), true); |
|
Lines 201-213
Link Here
|
| 201 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
206 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:-startup);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
| 202 |
P2InfUtils.printBundleCU(buffer, index++, BUNDLE_EQUINOX_LAUNCHER, launcher.getVersion(), null, instructions); |
207 |
P2InfUtils.printBundleCU(buffer, index++, BUNDLE_EQUINOX_LAUNCHER, launcher.getVersion(), null, instructions); |
| 203 |
|
208 |
|
| 204 |
String brandedRange = rangeString; |
209 |
String brandedRange = productRangeString; |
| 205 |
BuildTimeFeature executableFeature = assembly.getRootProvider(FEATURE_EQUINOX_EXECUTABLE, null); |
210 |
BuildTimeFeature executableFeature = assembly.getRootProvider(FEATURE_EQUINOX_EXECUTABLE, null); |
| 206 |
if (executableFeature == null && havePDEUIState()) |
211 |
if (executableFeature == null && havePDEUIState()) |
| 207 |
executableFeature = assembly.getRootProvider("org.eclipse.pde.container.feature", null); //$NON-NLS-1$ |
212 |
executableFeature = assembly.getRootProvider("org.eclipse.pde.container.feature", null); //$NON-NLS-1$ |
| 208 |
|
213 |
|
| 209 |
//in case of no version on the product, the branding defaults to the version of the launcher provider |
214 |
//in case of no version on the product, the branding defaults to the version of the launcher provider |
| 210 |
if (executableFeature != null && versionString.equals(Version.emptyVersion.toString())) { |
215 |
if (executableFeature != null && productVersionString.equals(Version.emptyVersion.toString())) { |
| 211 |
String brandedVersion = executableFeature.getVersion(); |
216 |
String brandedVersion = executableFeature.getVersion(); |
| 212 |
brandedRange = new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true).toString(); |
217 |
brandedRange = new VersionRange(new Version(brandedVersion), true, new Version(brandedVersion), true).toString(); |
| 213 |
} |
218 |
} |
|
Lines 232-237
Link Here
|
| 232 |
instructions[P2InfUtils.INSTRUCTION_UNINSTALL] = UNINSTALL_INSTRUCTION; |
237 |
instructions[P2InfUtils.INSTRUCTION_UNINSTALL] = UNINSTALL_INSTRUCTION; |
| 233 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
238 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "addProgramArg(programArg:--launcher.library);addProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
| 234 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
239 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "removeProgramArg(programArg:--launcher.library);removeProgramArg(programArg:@artifact);"; //$NON-NLS-1$ |
|
|
240 |
//launcher CU gets same version as launcher |
| 235 |
P2InfUtils.printBundleCU(buffer, index++, fragment.getSymbolicName(), fragment.getVersion(), fragment.getPlatformFilter(), instructions); |
241 |
P2InfUtils.printBundleCU(buffer, index++, fragment.getSymbolicName(), fragment.getVersion(), fragment.getPlatformFilter(), instructions); |
| 236 |
|
242 |
|
| 237 |
if (executableFeature != null) { |
243 |
if (executableFeature != null) { |
|
Lines 244-250
Link Here
|
| 244 |
String launcherName = getLauncherName(executableFeature); |
250 |
String launcherName = getLauncherName(executableFeature); |
| 245 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "setLauncherName(name:" + launcherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ |
251 |
instructions[P2InfUtils.INSTRUCTION_CONFIGURE] = "setLauncherName(name:" + launcherName + ")"; //$NON-NLS-1$ //$NON-NLS-2$ |
| 246 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "setLauncherName()"; //$NON-NLS-1$ |
252 |
instructions[P2InfUtils.INSTRUCTION_UNCONFIGURE] = "setLauncherName()"; //$NON-NLS-1$ |
| 247 |
P2InfUtils.printIU(buffer, index++, brandedIU, versionString, config.getPlatformFilter(), instructions); |
253 |
P2InfUtils.printIU(buffer, index++, brandedIU, productVersionString, config.getPlatformFilter(), instructions); |
| 248 |
} |
254 |
} |
| 249 |
} |
255 |
} |
| 250 |
} |
256 |
} |