Compare commits
2 Commits
61fa03042f
...
b184525212
Author | SHA1 | Date |
---|---|---|
Michael Pfaff | b184525212 | |
Michael Pfaff | b78e44c3bd |
4
build.sh
4
build.sh
|
@ -10,7 +10,7 @@ export JAVA_HOME=${JAVA_HOME:-`asdf where java`}
|
|||
|
||||
ant generate-all
|
||||
|
||||
ant compile
|
||||
ant compile+NoGen
|
||||
|
||||
ant compile_native
|
||||
ant compile_native+NoGen
|
||||
|
||||
|
|
|
@ -198,6 +198,15 @@ public class LWJGLUtil {
|
|||
* @return Paths to located libraries, if any
|
||||
*/
|
||||
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
|
||||
List<String> possible_paths = new ArrayList<String>();
|
||||
|
||||
|
@ -220,12 +229,6 @@ public class LWJGLUtil {
|
|||
+ 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
|
||||
String java_library_path = getPrivilegedProperty("java.library.path");
|
||||
|
||||
|
@ -235,11 +238,6 @@ public class LWJGLUtil {
|
|||
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)
|
||||
possible_paths.add(platform_lib_name);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue