Closed GoogleCodeExporter closed 9 years ago
Please update the wiki page BranchesAndBuildings as well. See attached patch
Original comment by k...@censhare.de
on 15 Jan 2014 at 11:36
Attachments:
One additional patch-file to avoid problems with Windows compatibility (there
is a problem if the library path is corrected within CefContext.cpp).
Please add 2014-01-15_03-moved_to_ant_app_bundle_creation.patch first and afterwards add this attached patch file.
Original comment by k...@censhare.de
on 17 Jan 2014 at 7:07
Attachments:
Thanks for the patch. A few questions:
1. 2014-01-15_03-moved_to_ant_app_bundle_creation.patch line 196:
- const std::string& module_dir = GetJNIString(env, argPathToJavaDLL);
+ std::string module_dir = GetJNIString(env, argPathToJavaDLL);
+ std::size_t endPos = module_dir.find(':');
+ module_dir = module_dir.substr(0,endPos);
Can you explain why this is necessary?
2. 2014-01-15_03-moved_to_ant_app_bundle_creation.patch line 583:
+ export
CLS_PATH="$OUT_PATH/jcef.jar:$OUT_PATH/jcef-tests.jar:$OUT_PATH/gluegen-rt.jar:$
OUT_PATH/gluegen-rt-natives-macosx-universal.jar:$OUT_PATH/jogl-all.jar:$OUT_PAT
H/jogl-all-natives-macosx-universal.jar"
Can we use a wildcard ($OUT_PATH/*) instead of specifying the full name of each
jar file?
Original comment by magreenb...@gmail.com
on 22 Jan 2014 at 3:28
Thanks for reviewing the patch.
Regarding your questions:
1.)
The function Java_org_cef_CefContext_N_1Initialize is called by Java with
System.getProperty("java.library.path"); as value for the param
argPathToJavaDLL.
According Java's definition, the property "java.library.path" can contain more
than one path to search for libraries. These paths are separated by the
character
which is stored within the property "path.separator" (":" for UNIX and ";" for
Windows).
(see
http://docs.oracle.com/javase/7/docs/api/java/lang/System.html#getProperties())
So if you use JCEF within great projects, you'll get soon or later problems by
interpreting the property value of "java.library.path" as only one path. Most
of
the big projects may have not only one lib-path to search in and so you'll get a
non valid path passed to the native world.
As a workaround of this problem I've added that "split" patch to the function,
so
that only one (and not a bunch of paths) path is passed to "GetHeplerPath()",
append to "settings.resources_dir_path" and append to
"settings.locales_dir_path".
BUT: You're right. There are some problems with this patch:
(1) I forgot that there are different path separators on different systems
(2) Maybe not in every case the first path is that one which contains the jcef
lib.
(3) Maybe the file for the patch isn't the best choice.
For that reason I've removed the patch from CefContext.cpp and added a more
concrete
one to CefContext.java. The Java-Patch splits "java.library.path" by
"path.separator"
and searches within the directory for the JCEF lib. If it contains it, the
single
path is passed to the native world.
2.)
Yes you're right. Addressing several JARs within the same directory is nonsense.
So, I've reduced it to the wildcard pattern as suggested by you.
See attached patch-file for my changes.
Original comment by k...@censhare.de
on 24 Jan 2014 at 11:06
Attachments:
Added in revision 18 with minor style changes. Also updated the distrib scripts.
Original comment by magreenb...@gmail.com
on 30 Jan 2014 at 5:16
Original issue reported on code.google.com by
k...@censhare.de
on 15 Jan 2014 at 10:32Attachments: