Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 20389 Details for
Bug 92420
It should be possible to export cross platform
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
An even BETTER patch
pde-ui-crossplatform.patch (text/plain), 26.04 KB, created by
Jeff McAffer
on 2005-04-26 19:06:58 EDT
(
hide
)
Description:
An even BETTER patch
Filename:
MIME Type:
Creator:
Jeff McAffer
Created:
2005-04-26 19:06:58 EDT
Size:
26.04 KB
patch
obsolete
>Index: src/org/eclipse/pde/internal/ui/build/BuildFeatureAction.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildFeatureAction.java,v >retrieving revision 1.18 >diff -u -r1.18 BuildFeatureAction.java >--- src/org/eclipse/pde/internal/ui/build/BuildFeatureAction.java 31 Mar 2005 16:56:07 -0000 1.18 >+++ src/org/eclipse/pde/internal/ui/build/BuildFeatureAction.java 26 Apr 2005 23:00:29 -0000 >@@ -49,7 +49,6 @@ > generator.setBuildingOSGi(PDECore.getDefault().getModelManager().isOSGiRuntime()); > generator.setChildren(true); > AbstractScriptGenerator.setEmbeddedSource(AbstractScriptGenerator.getDefaultEmbeddedSource()); >- AbstractBuildScriptGenerator.setBrandExecutable(false); > > String url = ClasspathHelper.getDevEntriesProperties(fManifestFile.getProject().getLocation().addTrailingSeparator().toString() + "dev.properties", false); //$NON-NLS-1$ > generator.setDevEntries(url); >Index: src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java,v >retrieving revision 1.15 >diff -u -r1.15 BuildPluginAction.java >--- src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java 31 Mar 2005 16:56:07 -0000 1.15 >+++ src/org/eclipse/pde/internal/ui/build/BuildPluginAction.java 26 Apr 2005 23:00:29 -0000 >@@ -29,7 +29,6 @@ > ModelBuildScriptGenerator.setEmbeddedSource(AbstractScriptGenerator.getDefaultEmbeddedSource()); > ModelBuildScriptGenerator.setForceUpdateJar(AbstractScriptGenerator.getForceUpdateJarFormat()); > ModelBuildScriptGenerator.setConfigInfo(AbstractScriptGenerator.getDefaultConfigInfos()); >- AbstractBuildScriptGenerator.setBrandExecutable(false); > > IProject project = fManifestFile.getProject(); > generator.setWorkingDirectory(project.getLocation().toOSString()); >Index: src/org/eclipse/pde/internal/ui/build/ProductExportJob.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/build/ProductExportJob.java,v >retrieving revision 1.34 >diff -u -r1.34 ProductExportJob.java >--- src/org/eclipse/pde/internal/ui/build/ProductExportJob.java 23 Apr 2005 20:21:23 -0000 1.34 >+++ src/org/eclipse/pde/internal/ui/build/ProductExportJob.java 26 Apr 2005 23:00:29 -0000 >@@ -32,13 +32,11 @@ > > public class ProductExportJob extends FeatureExportJob { > >- private IProduct fProduct; >- > private String fFeatureLocation; > > private String fRoot; > >- public ProductExportJob(IProductModel model, String productRoot, boolean toDirectory, boolean exportSource, String destination, String zipFileName) { >+ public ProductExportJob(IProductModel model, String productRoot, boolean toDirectory, boolean exportSource, String destination, String zipFileName, String[][] targets) { > super(PDEUIMessages.ProductExportJob_jobName); //$NON-NLS-1$ > fProduct = model.getProduct(); > fExportToDirectory = toDirectory; >@@ -46,6 +44,10 @@ > fDestinationDirectory = destination; > fZipFilename = zipFileName; > fRoot = productRoot; >+ ftargets = targets; >+ // TODO remove when there is UI to set ftargets >+ if (ftargets == null) >+ ftargets = new String[][] { { "linux", "gtk", "x86", ""} , {"win32", "win32", "x86", ""} }; > if (fProduct.useFeatures()) { > fItems = getFeatureModels(); > } else { >@@ -83,30 +85,36 @@ > > protected void doExports(IProgressMonitor monitor) > throws InvocationTargetException, CoreException { >- try { >- monitor.beginTask("", 10); >- // create a feature to wrap all plug-ins and features >- String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$ >- fFeatureLocation = fBuildTempLocation + File.separator + featureID; >- createFeature(featureID, fFeatureLocation); >- createBuildPropertiesFile(fFeatureLocation); >- createConfigIniFile(); >- createEclipseProductFile(); >- createLauncherIniFile(); >- doExport(featureID, >- null, >- fFeatureLocation, >- TargetPlatform.getOS(), >- TargetPlatform.getWS(), >- TargetPlatform.getOSArch(), >- new SubProgressMonitor(monitor, 7)); >- } catch (IOException e) { >- } finally { >- for (int i = 0; i < fItems.length; i++) { >- deleteBuildFiles((IModel)fItems[i]); >+ String[][] configurations = ftargets; >+ if (configurations == null) >+ configurations = new String[][] { {TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL() } }; >+ for (int i = 0; i < configurations.length; i++) { >+ try { >+ String[] config = configurations[i]; >+ monitor.beginTask("", 10); >+ // create a feature to wrap all plug-ins and features >+ String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$ >+ fFeatureLocation = fBuildTempLocation + File.separator + featureID; >+ createFeature(featureID, fFeatureLocation, config, true); >+ createBuildPropertiesFile(fFeatureLocation); >+ createConfigIniFile(); >+ createEclipseProductFile(); >+ createLauncherIniFile(); >+ doExport(featureID, >+ null, >+ fFeatureLocation, >+ config[0], >+ config[1], >+ config[2], >+ new SubProgressMonitor(monitor, 7)); >+ } catch (IOException e) { >+ } finally { >+ for (int j = 0; j < fItems.length; j++) { >+ deleteBuildFiles((IModel)fItems[j]); >+ } >+ cleanup(ftargets == null ? null : configurations[i], new SubProgressMonitor(monitor, 3)); >+ monitor.done(); > } >- cleanup(new SubProgressMonitor(monitor, 3)); >- monitor.done(); > } > } > >@@ -140,39 +148,42 @@ > File file = new File(featureLocation); > if (!file.exists() || !file.isDirectory()) > file.mkdirs(); >+ boolean hasLaunchers = false; >+ IFeatureModel[] models = PDECore.getDefault().getFeatureModelManager().getModels(); >+ for (int i = 0; i < models.length; i++) { >+ if ("org.eclipse.platform.launchers".equals(models[i].getFeature().getId())) >+ hasLaunchers = true; >+ } > > Properties properties = new Properties(); >- properties.put(IBuildPropertiesConstants.ROOT, getRootFileLocations()); //To copy a folder >- properties.put("root.permissions.755", getLauncherName()); //$NON-NLS-1$ >- if (TargetPlatform.getOS().equals("linux")) { //$NON-NLS-1$ >- properties.put("root.linux.motif.x86.link", "libXm.so.2.1,libXm.so.2,libXm.so.2.1,libXm.so"); //$NON-NLS-1$ //$NON-NLS-2$ >- properties.put("root.linux.motif.x86.permissions.755", "*.so*"); //$NON-NLS-1$ //$NON-NLS-2$ >+ properties.put(IBuildPropertiesConstants.ROOT, getRootFileLocations(hasLaunchers)); //To copy a folder >+ if (!hasLaunchers) { >+ properties.put("root.permissions.755", getLauncherName()); //$NON-NLS-1$ >+ if (TargetPlatform.getOS().equals("linux")) { //$NON-NLS-1$ >+ properties.put("root.linux.motif.x86.link", "libXm.so.2.1,libXm.so.2,libXm.so.2.1,libXm.so"); //$NON-NLS-1$ //$NON-NLS-2$ >+ properties.put("root.linux.motif.x86.permissions.755", "*.so*"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } > } > save(new File(file, "build.properties"), properties, "Build Configuration"); //$NON-NLS-1$ //$NON-NLS-2$ > } > >- private String getRootFileLocations() { >+ private String getRootFileLocations(boolean hasLaunchers) { > StringBuffer buffer = new StringBuffer(); >- >- File homeDir = ExternalModelManager.getEclipseHome().toFile(); >- if (homeDir.exists() && homeDir.isDirectory()) { >- File[] files = homeDir.listFiles(); >- for (int i = 0; i < files.length; i++) { >- // TODO for now copy everything except .eclipseproduct >- // Once the branded executable is generated, we should not copy >- // eclipse.exe nor icon.xpm >- if (files[i].isFile() && !files[i].getName().startsWith(".") //$NON-NLS-1$ >- && !files[i].getName().endsWith(".html")) { //$NON-NLS-1$ >- buffer.append("absolute:file:"); //$NON-NLS-1$ >- buffer.append(files[i].getAbsolutePath()); >- buffer.append(","); //$NON-NLS-1$ >- } >- } >+ >+ if (!hasLaunchers) { >+ File homeDir = ExternalModelManager.getEclipseHome().toFile(); >+ if (homeDir.exists() && homeDir.isDirectory()) { >+ buffer.append("absolute:file:"); //$NON-NLS-1$ >+ buffer.append(new File(homeDir, "eclipse").getAbsolutePath()); >+ buffer.append(","); //$NON-NLS-1$ >+ buffer.append(new File(homeDir, "eclipse.exe").getAbsolutePath()); >+ buffer.append(","); //$NON-NLS-1$ >+ buffer.append(new File(homeDir, "startup.jar").getAbsolutePath()); >+ buffer.append(","); //$NON-NLS-1$ >+ } > } > // add content of temp folder (.eclipseproduct, configuration/config.ini) > buffer.append("/temp/"); //$NON-NLS-1$ >- buffer.append(","); //$NON-NLS-1$ >- > return buffer.toString(); > } > >@@ -319,10 +330,6 @@ > return buffer.toString(); > } > >- protected boolean needBranding() { >- return true; >- } >- > protected HashMap createAntBuildProperties(String os, String ws, String arch) { > HashMap properties = super.createAntBuildProperties(os, ws, arch); > properties.put(IXMLConstants.PROPERTY_LAUNCHER_NAME, getLauncherName()); >Index: src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportJob.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportJob.java,v >retrieving revision 1.57 >diff -u -r1.57 FeatureExportJob.java >--- src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportJob.java 23 Apr 2005 20:21:23 -0000 1.57 >+++ src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportJob.java 26 Apr 2005 23:00:29 -0000 >@@ -21,6 +21,8 @@ > import org.eclipse.core.runtime.jobs.*; > import org.eclipse.jdt.core.*; > import org.eclipse.jface.dialogs.*; >+import org.eclipse.osgi.service.resolver.BundleDescription; >+import org.eclipse.osgi.service.resolver.State; > import org.eclipse.osgi.util.NLS; > import org.eclipse.pde.core.*; > import org.eclipse.pde.core.build.*; >@@ -30,6 +32,7 @@ > import org.eclipse.pde.internal.core.build.*; > import org.eclipse.pde.internal.core.feature.FeatureChild; > import org.eclipse.pde.internal.core.ifeature.*; >+import org.eclipse.pde.internal.core.iproduct.IProduct; > import org.eclipse.pde.internal.core.util.CoreUtility; > import org.eclipse.pde.internal.ui.*; > import org.eclipse.pde.internal.ui.build.*; >@@ -58,9 +61,11 @@ > protected HashMap fAntBuildProperties; > private String[] fSigningInfo = null; > private String[] fJnlpInfo = null; >- >+ protected IProduct fProduct = null; >+ > protected static String FEATURE_POST_PROCESSING = "features.postProcessingSteps.properties"; //$NON-NLS-1$ > protected static String PLUGIN_POST_PROCESSING = "plugins.postProcessingSteps.properties"; //$NON-NLS-1$ >+ protected String[][] ftargets; > > class SchedulingRule implements ISchedulingRule { > >@@ -85,7 +90,7 @@ > setRule(new SchedulingRule()); > } > >- public FeatureExportJob(boolean toDirectory, boolean useJarFormat, boolean exportSource, String destination, String zipFileName, Object[] items, String[] signingInfo, String[] jnlpInfo) { >+ public FeatureExportJob(boolean toDirectory, boolean useJarFormat, boolean exportSource, String destination, String zipFileName, Object[] items, String[] signingInfo, String[] jnlpInfo, String[][] targets) { > super(PDEUIMessages.FeatureExportJob_name); //$NON-NLS-1$ > fExportToDirectory = toDirectory; > fUseJarFormat = useJarFormat; >@@ -95,12 +100,16 @@ > fItems = items; > fSigningInfo = signingInfo; > fJnlpInfo = jnlpInfo; >+ ftargets = targets; >+ // TODO remove when there is UI to set ftargets >+// if (ftargets == null) >+// ftargets = new String[][] { { "linux", "gtk", "x86", ""} , {"win32", "win32", "x86", ""} }; > fBuildTempLocation = PDEPlugin.getDefault().getStateLocation().append("temp").toString(); //$NON-NLS-1$ > setRule(new SchedulingRule()); > } > > public FeatureExportJob(boolean toDirectory, boolean useJarFormat, boolean exportSource, String destination, String zipFileName, Object[] items) { >- this(toDirectory, useJarFormat, exportSource, destination, zipFileName, items, null, null); >+ this(toDirectory, useJarFormat, exportSource, destination, zipFileName, items, null, null, null); > } > > /* >@@ -150,30 +159,35 @@ > protected void doExports(IProgressMonitor monitor) throws InvocationTargetException, CoreException { > createDestination(); > monitor.beginTask("", fItems.length + 1); //$NON-NLS-1$ >- try { >- for (int i = 0; i < fItems.length; i++) { >- if (monitor.isCanceled()) >- throw new OperationCanceledException(); >- IFeatureModel model = (IFeatureModel) fItems[i]; >- try { >- String location = model.getInstallLocation(); >- if (fUseJarFormat) { >- createPostProcessingFile(new File(location, FEATURE_POST_PROCESSING)); >- createPostProcessingFile(new File(location, PLUGIN_POST_PROCESSING)); >- } >- IFeature feature = model.getFeature(); >- String id = feature.getId(); >- String os = getOS(feature); >- String ws = getWS(feature); >- String arch = getOSArch(feature); >- doExport(id, model.getFeature().getVersion(), model.getInstallLocation(), os, ws, arch, new SubProgressMonitor(monitor, 1)); >- } finally { >- deleteBuildFiles(model); >+ String[][] configurations = ftargets; >+ if (configurations == null) >+ configurations = new String[][] { null }; >+ >+ for (int i = 0; i < configurations.length; i++) { >+ try { >+ for (int j = 0; j < fItems.length; j++) { >+ if (monitor.isCanceled()) >+ throw new OperationCanceledException(); >+ doExport((IFeatureModel) fItems[j], configurations[i], monitor); > } >+ } finally { >+ cleanup(configurations[i], new SubProgressMonitor(monitor, 1)); >+ monitor.done(); >+ } >+ } >+ } >+ >+ private void doExport(IFeatureModel model, String os, String ws, String arch, IProgressMonitor monitor) throws CoreException, InvocationTargetException { >+ try { >+ String location = model.getInstallLocation(); >+ if (fUseJarFormat) { >+ createPostProcessingFile(new File(location, FEATURE_POST_PROCESSING)); >+ createPostProcessingFile(new File(location, PLUGIN_POST_PROCESSING)); > } >+ IFeature feature = model.getFeature(); >+ doExport(feature.getId(), feature.getVersion(), location, os, ws, arch, new SubProgressMonitor(monitor, 1)); > } finally { >- cleanup(new SubProgressMonitor(monitor, 1)); >- monitor.done(); >+ deleteBuildFiles(model); > } > } > >@@ -224,6 +238,27 @@ > } > } > >+ private void createDestination(String os, String ws, String arch) throws InvocationTargetException { >+ if (!fExportToDirectory) >+ return; >+ File file = new File(fDestinationDirectory, os + '.' + ws + '.' + arch); >+ if (!file.exists() || !file.isDirectory()) { >+ if (!file.mkdirs()) >+ throw new InvocationTargetException(new Exception(PDEUIMessages.ExportWizard_badDirectory)); //$NON-NLS-1$ >+ } >+ } >+ >+ protected void doExport(IFeatureModel model, String[] config, IProgressMonitor monitor) throws CoreException, InvocationTargetException { >+ // TODO progress monitoring >+ if (config == null) { >+ IFeature feature = model.getFeature(); >+ doExport(model, getOS(feature), getWS(feature), getOSArch(feature), monitor); >+ } else { >+ createDestination(config[0], config[1], config[2]); >+ doExport(model, config[0], config[1], config[2], monitor); >+ } >+ } >+ > protected void doExport(String featureID, String version, String featureLocation, String os, String ws, String arch, IProgressMonitor monitor) throws CoreException, InvocationTargetException { > monitor.beginTask("", 5); //$NON-NLS-1$ > monitor.setTaskName(PDEUIMessages.FeatureExportJob_taskName); //$NON-NLS-1$ >@@ -249,13 +284,7 @@ > + ".xml"; //$NON-NLS-1$ > } > >- protected boolean needBranding() { >- return false; >- } >- > protected HashMap createAntBuildProperties(String os, String ws, String arch) { >- AbstractScriptGenerator.setBrandExecutable(needBranding()); >- > if (fAntBuildProperties == null) { > fAntBuildProperties = new HashMap(15); > if (fSigningInfo != null) { >@@ -291,10 +320,20 @@ > fAntBuildProperties.put(IXMLConstants.PROPERTY_COLLECTING_FOLDER, "."); //$NON-NLS-1$ > String prefix = Platform.getOS().equals("macosx") ? "." : ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > fAntBuildProperties.put(IXMLConstants.PROPERTY_ARCHIVE_PREFIX, prefix); >- if (!fExportToDirectory) >- fAntBuildProperties.put(IXMLConstants.PROPERTY_ARCHIVE_FULLPATH, fDestinationDirectory + File.separator + fZipFilename); >- else >- fAntBuildProperties.put(IXMLConstants.PROPERTY_ASSEMBLY_TMP, fDestinationDirectory); >+ >+ if (!fExportToDirectory) { >+ String filename = fZipFilename; >+ if (ftargets != null) { >+ int i = filename.lastIndexOf('.'); >+ filename = filename.substring(0, i) + '.' + os + '.' + ws + '.' + arch + filename.substring(i); >+ } >+ fAntBuildProperties.put(IXMLConstants.PROPERTY_ARCHIVE_FULLPATH, fDestinationDirectory + File.separator + filename); >+ } else { >+ String dir = fDestinationDirectory; >+ if (ftargets != null) >+ dir += File.separatorChar + os + '.' + ws + '.' + arch; >+ fAntBuildProperties.put(IXMLConstants.PROPERTY_ASSEMBLY_TMP, dir); >+ } > fAntBuildProperties.put(IXMLConstants.PROPERTY_TAR_ARGS, ""); //$NON-NLS-1$ > } > return fAntBuildProperties; >@@ -312,6 +351,8 @@ > generator.setIgnoreMissingPropertiesFile(true); > generator.setSignJars(fSigningInfo != null); > generator.setGenerateJnlp(fJnlpInfo != null); >+ if (fProduct != null) >+ generator.setProduct(fProduct.getModel().getInstallLocation()); > String config = os + ',' + ws + ',' + arch; > AbstractScriptGenerator.setConfigInfo(config); //This needs to be set before we set the format > String format; >@@ -455,7 +496,15 @@ > paths.add(models[i].getInstallLocation() + IPath.SEPARATOR + "feature.xml"); //$NON-NLS-1$ > } > >- String[] plugins = TargetPlatform.createPluginPath(); >+ // Old code was: >+// String[] plugins = TargetPlatform.createPluginPath(); >+ // But here we need to find ALL plugins, not just the resolved ones >+ State state = TargetPlatform.getState(); >+ BundleDescription[] descriptions = state.getBundles(); >+ String[] plugins = new String[descriptions.length]; >+ for (int i = 0; i < descriptions.length; i++) >+ plugins[i] = descriptions[i].getLocation(); >+ > String[] features = (String[]) paths.toArray(new String[paths.size()]); > String[] all = new String[plugins.length + paths.size()]; > System.arraycopy(plugins, 0, all, 0, plugins.length); >@@ -482,16 +531,20 @@ > return writer; > } > >- protected void cleanup(IProgressMonitor monitor) { >+ protected void cleanup(String[] config, IProgressMonitor monitor) { > monitor.beginTask("", 2); >+ // clear out some cached values that depend on the configuration being built. >+ fDevProperties = null; >+ fAntBuildProperties = null; >+ > File scriptFile = null; > try { > scriptFile = createScriptFile(); > writer = new PrintWriter(new FileWriter(scriptFile), true); > generateHeader(writer); >- generateDeleteZipTarget(writer); >+ generateDeleteZipTarget(writer, config); > generateCleanTarget(writer); >- boolean errors = generateZipLogsTarget(writer); >+ boolean errors = generateZipLogsTarget(writer, config); > generateClosingTag(writer); > writer.close(); > >@@ -534,16 +587,21 @@ > writer.println("</target>"); //$NON-NLS-1$ > } > >- private void generateDeleteZipTarget(PrintWriter writer) { >+ private String logName(String[] config) { >+ if (config == null) >+ return "/logs.zip"; >+ return "/logs." + config[0] + '.' + config[1] + '.' + config[2] + ".zip"; >+ } >+ private void generateDeleteZipTarget(PrintWriter writer, String[] config) { > writer.println("<target name=\"deleteZip\">"); //$NON-NLS-1$ >- writer.println("<delete file=\"" + fDestinationDirectory + "/logs.zip\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ >+ writer.println("<delete file=\"" + fDestinationDirectory + logName(config) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ > writer.println("</target>"); //$NON-NLS-1$ > } > >- private boolean generateZipLogsTarget(PrintWriter writer) { >+ private boolean generateZipLogsTarget(PrintWriter writer, String[] config) { > if (logFile != null && logFile.exists() && logFile.length() > 0) { > writer.println("<target name=\"zip.logs\">"); //$NON-NLS-1$ >- writer.println("<zip zipfile=\"" + fDestinationDirectory + "/logs.zip\" basedir=\"" + fBuildTempLocation + "/pde.logs\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ >+ writer.println("<zip zipfile=\"" + fDestinationDirectory + logName(config) + "\" basedir=\"" + fBuildTempLocation + "/pde.logs\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ > writer.println("</target>"); //$NON-NLS-1$ > return true; > } >@@ -577,7 +635,7 @@ > return NLS.bind(PDEUIMessages.ExportJob_error_message, fDestinationDirectory + File.separator + "logs.zip"); //$NON-NLS-1$ //$NON-NLS-2$ > } > >- protected void createFeature(String featureID, String featureLocation) throws IOException { >+ protected void createFeature(String featureID, String featureLocation, String[] config, boolean includeLauncher) throws IOException { > File file = new File(featureLocation); > if (!file.exists() || !file.isDirectory()) > file.mkdirs(); >@@ -588,7 +646,21 @@ > writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$ > writer.println("<feature id=\"" + featureID + "\" version=\"1.0\">"); //$NON-NLS-1$ //$NON-NLS-2$ > >- Dictionary environment = TargetPlatform.getTargetEnvironment(); >+ if (includeLauncher) { >+ IFeatureModel[] models = PDECore.getDefault().getFeatureModelManager().getModels(); >+ for (int i = 0; i < models.length; i++) { >+ IFeature feature = models[i].getFeature(); >+ if ("org.eclipse.platform.launchers".equals(feature.getId())) >+ writer.println("<includes id=\"" + feature.getId() + "\" version=\"" + feature.getVersion() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ >+ } >+ } >+ >+ Dictionary environment = new Hashtable(4); >+ environment.put("osgi.os", config[0]); >+ environment.put("osgi.ws", config[1]); >+ environment.put("osgi.arch", config[2]); >+ environment.put("osgi.nl", config[3]); >+ > BundleContext context = PDEPlugin.getDefault().getBundleContext(); > for (int i = 0; i < fItems.length; i++) { > if (fItems[i] instanceof IPluginModelBase) { >Index: src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java,v >retrieving revision 1.44 >diff -u -r1.44 FeatureExportWizard.java >--- src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java 14 Mar 2005 06:22:04 -0000 1.44 >+++ src/org/eclipse/pde/internal/ui/wizards/exports/FeatureExportWizard.java 26 Apr 2005 23:00:29 -0000 >@@ -46,7 +46,8 @@ > fPage1.getFileName(), > ((ExportWizardPageWithTable)fPage1).getSelectedItems(), > signingInfo, >- jnlpInfo); >+ jnlpInfo, >+ null); > job.setUser(true); > job.schedule(); > job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_FEATURE_OBJ); >Index: src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportJob.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportJob.java,v >retrieving revision 1.21 >diff -u -r1.21 PluginExportJob.java >--- src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportJob.java 31 Mar 2005 06:04:53 -0000 1.21 >+++ src/org/eclipse/pde/internal/ui/wizards/exports/PluginExportJob.java 26 Apr 2005 23:00:29 -0000 >@@ -40,7 +40,7 @@ > String zipFileName, > Object[] items, > String[] signingInfo) { >- super(toDirectory, useJarFormat, exportSource, destination, zipFileName, items, signingInfo, null); >+ super(toDirectory, useJarFormat, exportSource, destination, zipFileName, items, signingInfo, null, null); > } > > /* (non-Javadoc) >@@ -53,7 +53,8 @@ > // create a feature to contain all plug-ins > String featureID = "org.eclipse.pde.container.feature"; //$NON-NLS-1$ > fFeatureLocation = fBuildTempLocation + File.separator + featureID; >- createFeature(featureID, fFeatureLocation); >+ String[] config = new String[] {TargetPlatform.getOS(), TargetPlatform.getWS(), TargetPlatform.getOSArch(), TargetPlatform.getNL() }; >+ createFeature(featureID, fFeatureLocation, config, false); > createBuildPropertiesFile(fFeatureLocation); > if (fUseJarFormat) > createPostProcessingFile(new File(fFeatureLocation, PLUGIN_POST_PROCESSING)); >@@ -65,7 +66,7 @@ > if (fItems[i] instanceof IPluginModelBase) > deleteBuildFiles((IPluginModelBase)fItems[i]); > } >- cleanup(new SubProgressMonitor(monitor, 3)); >+ cleanup(null, new SubProgressMonitor(monitor, 3)); > monitor.done(); > } > } >Index: src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java,v >retrieving revision 1.4 >diff -u -r1.4 ProductExportWizard.java >--- src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java 9 Apr 2005 01:53:43 -0000 1.4 >+++ src/org/eclipse/pde/internal/ui/wizards/exports/ProductExportWizard.java 26 Apr 2005 23:00:29 -0000 >@@ -62,7 +62,8 @@ > page.doExportToDirectory(), > page.doExportSource(), > page.getDestination(), >- page.getFileName()); >+ page.getFileName(), >+ null); > job.setUser(true); > job.schedule(); > job.setProperty(IProgressConstants.ICON_PROPERTY, PDEPluginImages.DESC_FEATURE_OBJ);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 92420
:
20253
|
20269
| 20389