Compare commits
No commits in common. "b18452521298020c8a46f838d069e77d729d8a43" and "61fa03042f5dc9b38f748c6feb05317a469f92a5" have entirely different histories.
b184525212
...
61fa03042f
4
build.sh
4
build.sh
|
@ -10,7 +10,7 @@ export JAVA_HOME=${JAVA_HOME:-`asdf where java`}
|
||||||
|
|
||||||
ant generate-all
|
ant generate-all
|
||||||
|
|
||||||
ant compile+NoGen
|
ant compile
|
||||||
|
|
||||||
ant compile_native+NoGen
|
ant compile_native
|
||||||
|
|
||||||
|
|
|
@ -198,15 +198,6 @@ public class LWJGLUtil {
|
||||||
* @return Paths to located libraries, if any
|
* @return Paths to located libraries, if any
|
||||||
*/
|
*/
|
||||||
public static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader) {
|
public static String[] getLibraryPaths(String libname, String[] platform_lib_names, ClassLoader classloader) {
|
||||||
String overridePath = getPrivilegedProperty("org.lwjgl.librarypath");
|
|
||||||
if (overridePath != null) {
|
|
||||||
String[] paths = new String[platform_lib_names.length];
|
|
||||||
for (int i = 0; i < paths.length; i++) {
|
|
||||||
paths[i] = overridePath + File.separator + platform_lib_names[i];
|
|
||||||
}
|
|
||||||
return paths;
|
|
||||||
}
|
|
||||||
|
|
||||||
// need to pass path of possible locations of library to native side
|
// need to pass path of possible locations of library to native side
|
||||||
List<String> possible_paths = new ArrayList<String>();
|
List<String> possible_paths = new ArrayList<String>();
|
||||||
|
|
||||||
|
@ -229,6 +220,12 @@ public class LWJGLUtil {
|
||||||
+ File.separator + platform_lib_name);
|
+ File.separator + platform_lib_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// add Installer path
|
||||||
|
String alternative_path = getPrivilegedProperty("org.lwjgl.librarypath");
|
||||||
|
if ( alternative_path != null ) {
|
||||||
|
possible_paths.add(alternative_path + File.separator + platform_lib_name);
|
||||||
|
}
|
||||||
|
|
||||||
// Add all possible paths from java.library.path
|
// Add all possible paths from java.library.path
|
||||||
String java_library_path = getPrivilegedProperty("java.library.path");
|
String java_library_path = getPrivilegedProperty("java.library.path");
|
||||||
|
|
||||||
|
@ -238,6 +235,11 @@ public class LWJGLUtil {
|
||||||
possible_paths.add(path + File.separator + platform_lib_name);
|
possible_paths.add(path + File.separator + platform_lib_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: this can be very dangerous (see recent (2022-08) use of completely safe notepad.exe to load a malicious dll)
|
||||||
|
//add current path
|
||||||
|
String current_dir = getPrivilegedProperty("user.dir");
|
||||||
|
possible_paths.add(current_dir + File.separator + platform_lib_name);
|
||||||
|
|
||||||
//add pure library (no path, let OS search)
|
//add pure library (no path, let OS search)
|
||||||
possible_paths.add(platform_lib_name);
|
possible_paths.add(platform_lib_name);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue