Run sikuli-script cross platform.

Asked by Artem

Hi. As I understand sikuli use JNI to interact with opencv and other library, but main part written in Java. Is there some way to use one sikuli-script.jar for different platforms(Windows, *nix, Os X) only specifying somth. like "-Djava.library.path=..." for libraries.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

--- sikuli-script.jar
as such IS platform independent.
It needs the native libraries (which are in fact interfaced with SWIG generated JNI's) specific for the platform to run on. These are in the installation's directory libs (Windows, *nix) and Sikuli-IDE.app/Contents/Frameworks (Mac).

--- current usage of sikuli-script.jar only
the target system needs:
-1- the correct Java
-2- the native libraries in a place, where they can be found by sikuli-script.jar
-3- system path set accordingly

then you can say:
java -jar path-to-/sikuli-script.jar path-to-myscript.sikuli

--- java.library.path
as far as I know: this is currently not used by Sikuli to find the native libraries.

look: https://answers.launchpad.net/sikuli/+question/163291
and: faq 1436

Revision history for this message
Artem (masterzim-art) said :
#2

Thanks RaiMan, that solved my question.