Ticket #54661: patch-bdj-mac.diff
File patch-bdj-mac.diff, 2.3 KB (added by RJVB (René Bertin), 7 years ago) |
---|
-
src/libbluray/bdj/
old new 221 221 } 222 222 #endif 223 223 224 #ifdef __APPLE__ 225 #define MACOS_JRE_HOME "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home" 226 static const char *jre_plugin_path = MACOS_JRE_HOME; 227 #endif 228 224 229 #if defined(__APPLE__) && !defined(HAVE_BDJ_J2ME) 225 230 226 231 #define MACOS_JAVA_HOME "/usr/libexec/java_home" … … 324 329 const char *java_home = NULL; 325 330 static const char jli_dir[] = "jre/lib/jli"; 326 331 static const char jli_lib[] = "libjli"; 332 void *handle; 327 333 328 334 /* JAVA_HOME set, use it */ 329 335 java_home = getenv("JAVA_HOME"); … … 333 339 334 340 java_home = _java_home_macos(); 335 341 if (java_home) { 336 return _jvm_dlopen(java_home, jli_dir, jli_lib); 342 handle = _jvm_dlopen(java_home, jli_dir, jli_lib); 343 if (handle) { 344 return handle; 345 } 337 346 } 338 return NULL; 347 // check if the JRE is installed; it ends up in the internet plugins repository: 348 return _jvm_dlopen(jre_plugin_path, "lib/jli", jli_lib); 339 349 } 340 350 #endif 341 351 … … 362 372 static const char jvm_lib[] = "jvm"; 363 373 # else 364 374 # ifdef __APPLE__ 365 static const char * const jvm_path[] = {NULL, JDK_HOME}; 366 static const char * const jvm_dir[] = {"jre/lib/server"}; 375 static const char * const jvm_path[] = {NULL, JDK_HOME, MACOS_JRE_HOME}; 376 static const char * const jvm_dir[] = {"jre/lib/server", 377 "lib/server"}; 367 378 # else 368 379 static const char * const jvm_path[] = {NULL, 369 380 JDK_HOME, … … 404 415 #if defined(__APPLE__) && !defined(HAVE_BDJ_J2ME) 405 416 java_home = _java_home_macos(); 406 417 if (java_home) { 407 *p_java_home = java_home; 408 return _jvm_dlopen_a(java_home, jvm_dir, num_jvm_dir, jvm_lib); 418 handle = _jvm_dlopen_a(java_home, jvm_dir, num_jvm_dir, jvm_lib); 419 if (handle) { 420 *p_java_home = java_home; 421 return handle; 422 } 423 } 424 // check if the JRE is installed; it ends up in the internet plugins repository: 425 handle = _jvm_dlopen(jre_plugin_path, "lib/server", jvm_lib); 426 if (handle) { 427 *p_java_home = jre_plugin_path; 428 return handle; 409 429 } 410 430 #endif 411 431