Skip to content

Commit

Permalink
[java] support --java-lib <directory>
Browse files Browse the repository at this point in the history
  • Loading branch information
Gama11 committed Jun 11, 2020
1 parent 132c899 commit ef84e24
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/context/nativeLibraryHandler.ml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,17 @@ let add_native_lib com file is_extern = match com.platform with
| Globals.Flash ->
SwfLoader.add_swf_lib com file is_extern
| Globals.Java ->
let std = file = "lib/hxjava-std.jar" in
Java.add_java_lib com file std is_extern
let add file =
let std = file = "lib/hxjava-std.jar" in
Java.add_java_lib com file std is_extern
in
if try Sys.is_directory file with Sys_error _ -> false then
let dir = file in
(fun _ -> Array.iter (fun file ->
if ExtString.String.ends_with file ".jar" then add (dir ^ "/" ^ file) ()
) (Sys.readdir file))
else
add file
| Globals.Cs ->
let file, is_std = match ExtString.String.nsplit file "@" with
| [file] ->
Expand Down

0 comments on commit ef84e24

Please sign in to comment.