View | Details | Raw Unified | Return to bug 205833 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/pde/internal/core/exports/ProductExportOperation.java (-13 / +35 lines)
Lines 146-168 Link Here
146
		File homeDir = new File(TargetPlatform.getLocation());
146
		File homeDir = new File(TargetPlatform.getLocation());
147
		if (!hasLaunchers) {
147
		if (!hasLaunchers) {
148
			if (homeDir.exists() && homeDir.isDirectory()) {
148
			if (homeDir.exists() && homeDir.isDirectory()) {
149
				buffer.append("absolute:file:"); //$NON-NLS-1$
149
				appendAbsolutePath(buffer, new File(homeDir, "startup.jar")); //$NON-NLS-1$
150
				buffer.append(new File(homeDir, "startup.jar").getAbsolutePath()); //$NON-NLS-1$
151
				if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
150
				if (!TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
152
					File file = new File(homeDir, "eclipse"); //$NON-NLS-1$
151
					// try to retrieve the exact eclipse launcher path
153
					if (file.exists()) {
152
					// see bug 205833
154
						buffer.append(",absolute:file:"); //$NON-NLS-1$
153
					File file = null;
155
						buffer.append(file.getAbsolutePath());
154
					if (System.getProperties().get("eclipse.launcher") != null) { //$NON-NLS-1$
156
					}
155
						String launcherPath = System.getProperties().get("eclipse.launcher").toString(); //$NON-NLS-1$
157
					file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$
156
						file = new File(launcherPath);
158
					if (file.exists()) {
157
						if (file.exists() && !file.isDirectory()) {
159
						buffer.append(",absolute:file:"); //$NON-NLS-1$
158
							appendAbsolutePath(buffer, file);
160
						buffer.append(file.getAbsolutePath());
159
						} else { // just assume traditional eclipse paths
160
							appendEclipsePath(buffer, homeDir);
161
						}
162
					} else { // just assume traditional eclipse paths
163
						appendEclipsePath(buffer, homeDir);
161
					}
164
					}
162
					file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
165
					file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
163
					if (file.exists()) {
166
					if (file.exists()) {
164
						buffer.append(",absolute:file:"); //$NON-NLS-1$
167
						appendAbsolutePath(buffer, file);
165
						buffer.append(file.getAbsolutePath());
166
					}
168
					}
167
				}
169
				}
168
			}
170
			}
Lines 175-180 Link Here
175
		return buffer.toString();
177
		return buffer.toString();
176
	}
178
	}
177
179
180
	private void appendEclipsePath(StringBuffer buffer, File homeDir) {
181
		File file = null;
182
		file = new File(homeDir, "eclipse"); //$NON-NLS-1$
183
		if (file.exists()) {
184
			appendAbsolutePath(buffer, file);
185
		}
186
		file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$
187
		if (file.exists()) {
188
			appendAbsolutePath(buffer, file);
189
		}
190
	}
191
192
	private void appendAbsolutePath(StringBuffer buffer, File file) {
193
		if (buffer.length() > 0)
194
			buffer.append(","); //$NON-NLS-1$
195
196
		buffer.append("absolute:file:"); //$NON-NLS-1$
197
		buffer.append(file.getAbsolutePath());
198
	}
199
178
	private void createEclipseProductFile() {
200
	private void createEclipseProductFile() {
179
		File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$
201
		File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$
180
		if (!dir.exists() || !dir.isDirectory())
202
		if (!dir.exists() || !dir.isDirectory())
(-)src/org/eclipse/pde/ui/launcher/EclipseApplicationLaunchConfiguration.java (-2 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2007 IBM Corporation and others.
2
 * Copyright (c) 2005, 2008 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 108-114 Link Here
108
				if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
108
				if (TargetPlatform.getOS().equals("macosx")) { //$NON-NLS-1$
109
					path = new Path(TargetPlatform.getLocation()).append("Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS/eclipse"); //$NON-NLS-1$
109
					path = new Path(TargetPlatform.getLocation()).append("Eclipse.app/Contents/Resources/Splash.app/Contents/MacOS/eclipse"); //$NON-NLS-1$
110
				} else {
110
				} else {
111
					path = new Path(TargetPlatform.getLocation()).append("eclipse"); //$NON-NLS-1$	
111
					path = new Path(TargetPlatform.getLocation()).append("eclipse"); //$NON-NLS-1$
112
					if (TargetPlatform.getOS().equals("win32")) { //$NON-NLS-1$
113
						path = path.addFileExtension(".exe"); //$NON-NLS-1$
114
					}
112
				}
115
				}
113
116
114
				programArgs.add(1, path.toOSString()); //This could be the branded launcher if we want (also this does not bring much)
117
				programArgs.add(1, path.toOSString()); //This could be the branded launcher if we want (also this does not bring much)

Return to bug 205833