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()) |