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 / +28 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
					// this is in case we're using PDE from a special named exe
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()) {
159
						buffer.append(",absolute:file:"); //$NON-NLS-1$
158
							appendAbsolutePath(buffer, file);
160
						buffer.append(file.getAbsolutePath());
159
						}
160
					} else {
161
						file = new File(homeDir, "eclipse"); //$NON-NLS-1$
162
						if (file.exists()) {
163
							appendAbsolutePath(buffer, file);
164
						}
165
						file = new File(homeDir, "eclipse.exe"); //$NON-NLS-1$
166
						if (file.exists()) {
167
							appendAbsolutePath(buffer, file);
168
						}
161
					}
169
					}
162
					file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
170
					file = new File(homeDir, "libXm.so.2"); //$NON-NLS-1$
163
					if (file.exists()) {
171
					if (file.exists()) {
164
						buffer.append(",absolute:file:"); //$NON-NLS-1$
172
						appendAbsolutePath(buffer, file);
165
						buffer.append(file.getAbsolutePath());
166
					}
173
					}
167
				}
174
				}
168
			}
175
			}
Lines 175-180 Link Here
175
		return buffer.toString();
182
		return buffer.toString();
176
	}
183
	}
177
184
185
	private void appendAbsolutePath(StringBuffer buffer, File file) {
186
		if (buffer.length() > 0)
187
			buffer.append(","); //$NON-NLS-1$
188
189
		buffer.append("absolute:file:"); //$NON-NLS-1$
190
		buffer.append(file.getAbsolutePath());
191
	}
192
178
	private void createEclipseProductFile() {
193
	private void createEclipseProductFile() {
179
		File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$
194
		File dir = new File(fFeatureLocation, "temp"); //$NON-NLS-1$
180
		if (!dir.exists() || !dir.isDirectory())
195
		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