|
Lines 11-16
Link Here
|
| 11 |
package org.eclipse.pde.internal.build; |
11 |
package org.eclipse.pde.internal.build; |
| 12 |
|
12 |
|
| 13 |
import java.io.File; |
13 |
import java.io.File; |
|
|
14 |
import java.io.IOException; |
| 14 |
import java.util.*; |
15 |
import java.util.*; |
| 15 |
import java.util.jar.JarFile; |
16 |
import java.util.jar.JarFile; |
| 16 |
import org.eclipse.core.runtime.*; |
17 |
import org.eclipse.core.runtime.*; |
|
Lines 20-25
Link Here
|
| 20 |
import org.eclipse.pde.internal.build.builder.BuildDirector; |
21 |
import org.eclipse.pde.internal.build.builder.BuildDirector; |
| 21 |
import org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator; |
22 |
import org.eclipse.pde.internal.build.builder.ModelBuildScriptGenerator; |
| 22 |
import org.eclipse.pde.internal.build.site.BuildTimeFeature; |
23 |
import org.eclipse.pde.internal.build.site.BuildTimeFeature; |
|
|
24 |
import org.osgi.framework.Bundle; |
| 23 |
|
25 |
|
| 24 |
/** |
26 |
/** |
| 25 |
* Generate an assemble script for a given feature and a given config. It |
27 |
* Generate an assemble script for a given feature and a given config. It |
|
Lines 119-128
Link Here
|
| 119 |
|
121 |
|
| 120 |
generateMainBegin(); |
122 |
generateMainBegin(); |
| 121 |
generateInitializationSteps(); |
123 |
generateInitializationSteps(); |
| 122 |
generateGatherCalls(); |
124 |
if (BuildDirector.p2Gathering) { |
| 123 |
generateProcessingCalls(); |
125 |
generateDirectorCall(); |
| 124 |
generateBrandingCalls(); |
126 |
} else { |
| 125 |
generateP2Steps(); |
127 |
generateGatherCalls(); |
|
|
128 |
generateProcessingCalls(); |
| 129 |
generateBrandingCalls(); |
| 130 |
generateP2Steps(); |
| 131 |
} |
| 126 |
generateArchivingCalls(); |
132 |
generateArchivingCalls(); |
| 127 |
generateMainEnd(); |
133 |
generateMainEnd(); |
| 128 |
|
134 |
|
|
Lines 139-144
Link Here
|
| 139 |
script.println(); |
145 |
script.println(); |
| 140 |
} |
146 |
} |
| 141 |
|
147 |
|
|
|
148 |
protected void generateDirectorCall() { |
| 149 |
Map parameters = new HashMap(); |
| 150 |
parameters.put(PROPERTY_OS, Utils.getPropertyFormat(PROPERTY_OS)); |
| 151 |
parameters.put(PROPERTY_WS, Utils.getPropertyFormat(PROPERTY_WS)); |
| 152 |
parameters.put(PROPERTY_ARCH, Utils.getPropertyFormat(PROPERTY_ARCH)); |
| 153 |
parameters.put(PROPERTY_P2_REPO, Utils.getPropertyFormat(PROPERTY_P2_BUILD_REPO)); |
| 154 |
parameters.put(PROPERTY_P2_DIRECTOR_IU, productFile != null ? productFile.getId() : Utils.getPropertyFormat(PROPERTY_P2_ROOT_NAME)); |
| 155 |
parameters.put(PROPERTY_P2_DIRECTOR_VERSION, productFile != null ? productFile.getVersion() : Utils.getPropertyFormat(PROPERTY_P2_ROOT_VERSION)); |
| 156 |
parameters.put(PROPERTY_P2_DIRECTOR_INSTALLPATH, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE)); |
| 157 |
script.printAntTask(Utils.getPropertyFormat(PROPERTY_GENERIC_TARGETS), null, TARGET_RUN_DIRECTOR, null, TRUE, parameters); |
| 158 |
script.println(); |
| 159 |
} |
| 160 |
|
| 142 |
private void generateProcessingCalls() { |
161 |
private void generateProcessingCalls() { |
| 143 |
script.printAntCallTask(TARGET_JAR_PROCESSING, true, null); |
162 |
script.printAntCallTask(TARGET_JAR_PROCESSING, true, null); |
| 144 |
script.println(); |
163 |
script.println(); |
|
Lines 334-339
Link Here
|
| 334 |
script.printProperty(PROPERTY_ECLIPSE_PLUGINS, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_PLUGIN_LOCATION); |
353 |
script.printProperty(PROPERTY_ECLIPSE_PLUGINS, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_PLUGIN_LOCATION); |
| 335 |
script.printProperty(PROPERTY_ECLIPSE_FEATURES, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_FEATURE_LOCATION); |
354 |
script.printProperty(PROPERTY_ECLIPSE_FEATURES, Utils.getPropertyFormat(PROPERTY_ECLIPSE_BASE) + '/' + DEFAULT_FEATURE_LOCATION); |
| 336 |
script.printProperty(PROPERTY_ARCHIVE_FULLPATH, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + Utils.getPropertyFormat(PROPERTY_BUILD_LABEL) + '/' + Utils.getPropertyFormat(PROPERTY_ARCHIVE_NAME)); |
355 |
script.printProperty(PROPERTY_ARCHIVE_FULLPATH, Utils.getPropertyFormat(PROPERTY_BASEDIR) + '/' + Utils.getPropertyFormat(PROPERTY_BUILD_LABEL) + '/' + Utils.getPropertyFormat(PROPERTY_ARCHIVE_NAME)); |
|
|
356 |
printLauncherJarProperty(); |
| 357 |
script.printProperty(PROPERTY_P2_BUILD_REPO, "file:" + Utils.getPropertyFormat(PROPERTY_BUILD_DIRECTORY) + "/buildRepo"); //$NON-NLS-1$ //$NON-NLS-2$ |
| 337 |
script.printAvailableTask(PROPERTY_CUSTOM_ASSEMBLY, "${builder}/customAssembly.xml", "${builder}/customAssembly.xml"); //$NON-NLS-1$ //$NON-NLS-2$ |
358 |
script.printAvailableTask(PROPERTY_CUSTOM_ASSEMBLY, "${builder}/customAssembly.xml", "${builder}/customAssembly.xml"); //$NON-NLS-1$ //$NON-NLS-2$ |
| 338 |
|
359 |
|
| 339 |
if (productFile != null && productFile.getLauncherName() != null) |
360 |
if (productFile != null && productFile.getLauncherName() != null) |
|
Lines 345-350
Link Here
|
| 345 |
generatePackagingTargets(); |
366 |
generatePackagingTargets(); |
| 346 |
} |
367 |
} |
| 347 |
|
368 |
|
|
|
369 |
protected void printLauncherJarProperty() { |
| 370 |
Bundle launcherBundle = Platform.getBundle(BUNDLE_EQUINOX_LAUNCHER); |
| 371 |
try { |
| 372 |
File bundleFile = FileLocator.getBundleFile(launcherBundle); |
| 373 |
script.printProperty(PROPERTY_LAUNCHER_JAR, bundleFile.getAbsolutePath()); |
| 374 |
} catch (IOException e) { |
| 375 |
// what can we do with this? |
| 376 |
} |
| 377 |
} |
| 378 |
|
| 348 |
protected void generateCustomGatherMacro() { |
379 |
protected void generateCustomGatherMacro() { |
| 349 |
List attributes = new ArrayList(5); |
380 |
List attributes = new ArrayList(5); |
| 350 |
attributes.add("dir"); //$NON-NLS-1$ |
381 |
attributes.add("dir"); //$NON-NLS-1$ |