### Eclipse Workspace Patch 1.0 #P org.eclipse.pde.core Index: src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java,v retrieving revision 1.24 diff -u -r1.24 ProductExportOperation.java --- src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 2 Jan 2008 19:58:41 -0000 1.24 +++ src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java 4 Feb 2008 16:23:27 -0000 @@ -146,23 +146,30 @@ File homeDir = new File(TargetPlatform.getLocation()); if (!hasLaunchers) { if (homeDir.exists() && homeDir.isDirectory()) { - buffer.append("absolute:file:"); //$NON-NLS-1$ - buffer.append(new File(homeDir, "startup.jar").getAbsolutePath()); //$NON-NLS-1$ + appendAbsolutePath(buffer, new File(homeDir, "startup.jar")); //$NON-NLS-1$ if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$ - File file = new File(homeDir, "eclipse"); //$NON-NLS-1$ - if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); - } - file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ - if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); + // try to retrieve the exact eclipse launcher path + // this is in case we're using PDE from a special named exe + File file = null; + if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$ + String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$ + file = new File(launcherPath); + if (file.exists()) { + appendAbsolutePath(buffer, file); + } + } else { + file = new File(homeDir, "eclipse"); //$NON-NLS-1$ + if (file.exists()) { + appendAbsolutePath(buffer, file); + } + file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$ + if (file.exists()) { + appendAbsolutePath(buffer, file); + } } file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$ if (file.exists()) { - buffer.append(",absolute:file:"); //$NON-NLS-1$ - buffer.append(file.getAbsolutePath()); + appendAbsolutePath(buffer, file); } } } @@ -175,6 +182,14 @@ return buffer.toString(); } + private void appendAbsolutePath(StringBuffer buffer, File file) { + if (buffer.length() > 0) + buffer.append(","); //$NON-NLS-1$ + + buffer.append("absolute:file:"); //$NON-NLS-1$ + buffer.append(file.getAbsolutePath()); + } + private void createEclipseProductFile() { File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$ if (!dir.exists() || !dir.isDirectory()) #P org.eclipse.pde.ui Index: src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.pde.ui/src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java,v retrieving revision 1.27 diff -u -r1.27 EclipseApplicationLaunchConfiguration.java --- src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java 16 Jan 2008 17:08:34 -0000 1.27 +++ src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java 4 Feb 2008 16:23:29 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2007 IBM Corporation and others. + * Copyright (c) 2005, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -108,7 +108,10 @@ if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$ path = new Path(TargetPlatform.getLocation()).append("Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS/eclipse"); //$NON-NLS-1$ } else { - path = new Path(TargetPlatform.getLocation()).append("eclipse"); //$NON-NLS-1$ + path = new Path(TargetPlatform.getLocation()).append("eclipse"); //$NON-NLS-1$ + if (TargetPlatform.getOS().equals("win32")) { //$NON-NLS-1$ + path = path.addFileExtension(".exe"); //$NON-NLS-1$ + } } programArgs.add(1, path.toOSString()); //This could be the branded launcher if we want (also this does not bring much)