|
Lines 201-208
Link Here
|
| 201 |
} |
201 |
} |
| 202 |
libName1 = name + "-" + Platform.PLATFORM + "-" + version; //$NON-NLS-1$ //$NON-NLS-2$ |
202 |
libName1 = name + "-" + Platform.PLATFORM + "-" + version; //$NON-NLS-1$ //$NON-NLS-2$ |
| 203 |
libName2 = name + "-" + Platform.PLATFORM; //$NON-NLS-1$ |
203 |
libName2 = name + "-" + Platform.PLATFORM; //$NON-NLS-1$ |
| 204 |
mappedName1 = System.mapLibraryName (libName1); |
204 |
mappedName1 = mapLibraryName (libName1); |
| 205 |
mappedName2 = System.mapLibraryName (libName2); |
205 |
mappedName2 = mapLibraryName (libName2); |
| 206 |
} else { |
206 |
} else { |
| 207 |
libName1 = libName2 = mappedName1 = mappedName2 = name; |
207 |
libName1 = libName2 = mappedName1 = mappedName2 = name; |
| 208 |
} |
208 |
} |
|
Lines 230-237
Link Here
|
| 230 |
} else { |
230 |
} else { |
| 231 |
/* fall back to using the tmp directory */ |
231 |
/* fall back to using the tmp directory */ |
| 232 |
if (IS_64) { |
232 |
if (IS_64) { |
| 233 |
fileName1 = System.mapLibraryName (libName1 + SUFFIX_64); |
233 |
fileName1 = mapLibraryName (libName1 + SUFFIX_64); |
| 234 |
fileName2 = System.mapLibraryName (libName2 + SUFFIX_64); |
234 |
fileName2 = mapLibraryName (libName2 + SUFFIX_64); |
| 235 |
} |
235 |
} |
| 236 |
} |
236 |
} |
| 237 |
if (load (path + SEPARATOR + fileName1)) return; |
237 |
if (load (path + SEPARATOR + fileName1)) return; |
|
Lines 248-251
Link Here
|
| 248 |
throw new UnsatisfiedLinkError ("no " + libName1 + " or " + libName2 + " in swt.library.path, java.library.path or the jar file"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
248 |
throw new UnsatisfiedLinkError ("no " + libName1 + " or " + libName2 + " in swt.library.path, java.library.path or the jar file"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 249 |
} |
249 |
} |
| 250 |
|
250 |
|
|
|
251 |
static String mapLibraryName (String libName) { |
| 252 |
libName = System.mapLibraryName (libName); |
| 253 |
String ext = ".dylib"; |
| 254 |
if (libName.endsWith(".dylib")) { |
| 255 |
libName = libName.substring(0, libName.length() - ext.length()) + ".jnilib"; |
| 256 |
} |
| 257 |
return libName; |
| 258 |
} |
| 259 |
|
| 251 |
} |
260 |
} |