[request] want a real standalone sikuli-script.jar
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| SikuliX |
Wishlist
|
Unassigned |
Bug Description
scope: Sikuli X on all platforms.
--- Request:
Available with the downloadable package I want to have a fully self contained sikuli-
Possible Solution: pack ALL needed native libraries in the jar file and copy them as needed at runtime into the appropriate temp folder so they can find themselves automatically. It should be one .jar for all platforms to be able to pack it together with the scripts.
--- Current Situation:
When you decide (based on whatever reasons) to not use the Sikuli IDE to edit, run and debug your scripts, you only need two resources from the package you download from Sikuli home:
- the folder that contains the native libraries (openCV (has to be installed seperately on Linux) and some system specifics)
- sikuli-script.jar
With some practical differences on the platforms you have to take care:
- that Sikuli finds the native libraries (mainly using path specifications in system path)
- to have sikuli-script.jar in the java class path
- to have sikuli-
- to say "from sikuli.Sikuli import * " in your main module and all imported modules using Sikuli features
- preserve the .sikuli/.skl folder structure if you want to use the new import/imagePath feature
(I know, that there are currently problems with 64-Bit environments, but this has nothing to do with this principal approach)
This is all you need for the Python level.
If you want to use Sikuli features on the Java level, it is principally the same (but no need for Python path, Sikuli features are imported using org.sikuli.
Having this prepared you can use IDE's like NetBeans or Eclipse (you might need plugins for Python) to edit, run and debug your scripts and run your scripts using plain Jython or Java.
With the new features of Sikuli X it is now possible to manage your image libraries and some related scripts with Sikuli IDE, but completely using e.g. NetBeans to do the programming (edit, run, debug, ...) of your workflows and/or test suites.
--- Current technical solution regarding the dynamic libraries:
When the initialization logic in sikuli-script.jar (triggered with the first import sikuli.Sikuli) realizes, that it is not running in the IDE context, it copies some proxy dynamic libraries contained in sikuli-script.jar to a temp directory, that in turn will try to find the other above mentioned native libraries. this location is maintained in the java system property java.library.tmpdir and can be set by the script before the first import of Sikuli features.
On Windows currently it is sufficient to add the following to the system path:
path-to-
On Linux it should be similar
On Mac you have to manipulate the jnilib's and dylib's to contain the correct pointers to each other, depending on the location of the libraries (if interested contact me directly). the most flexible way is to use the directive @loader_path.
--- Specifying sikuli-
in some IDE/platform combinations it is not possible to specify this in the settings panels.
Then you have the following choices:
- in your main script modify sys.path before the first import of Sikuli features
- edit the relevant configuration file by hand: (Netbeans: User folder .netbeans/
Changed in sikuli: | |
status: | New → Fix Committed |
milestone: | none → x1.0-rc2 |
summary: |
- [feature request] want a real standalone sikuli-script.jar + [request] want a real standalone sikuli-script.jar |
surfdork (surfdork) wrote : | #1 |
RaiMan (raimund-hocke) wrote : | #2 |
What is happening?
What is your configuration?
I have it running with Netbeans or plain Jython or plain java only using sikuli-script.jar and the native libs that come with the distribution on Mac OS X 10.6 and Windows 7.
Changed in sikuli: | |
importance: | Undecided → Wishlist |
Powers Foss (powers-foss) wrote : | #3 |
Hi RaiMan,
I see this request has a "Fix Committed" status. Does that mean it'll make it into X1.0 rc3? I would love to be able to drop in Sikuli from my Java code. I'm going to try to get it working using the steps you noted above on my Mac OS 10.6 system. My current test automation framework is Java/Selenium 2.0/WebDriver, but I find Sikuli very promising and would love to incorporate its functionality. Any estimates on when either the next release candidate or final 1.0 release might be delivered? Thanks for all the good work!
Cheers,
Powers.
Powers Foss (powers-foss) wrote : | #4 |
Oh, I meant to say, "Does that mean it'll make it into X1.0 rc2?" I see now that rc2 is slated for 1/30/2011. Hoping it can all be a standalone jar. Even though I went through all 3 steps listed here http://<email address hidden>
java.lang.
If this is all you had to do to get it working on OS X 10.6 then I will download a fresh copy of X1.0 RC1 and try again. If that doesn't work, I'm hoping it'll work out-of-the-box in RC2. Fingers crossed!
Powers Foss (powers-foss) wrote : | #5 |
Okay, I got it working. It was my mistake. Using only the 3 steps mentioned here http://<email address hidden>
RaiMan (raimund-hocke) wrote : | #6 |
Yes I know, that it will work with X 1.0 rc2 out of the box. Only preliminary will be, that Sikuli-IDE.app is in /Applications.
When rc2 is out, I will document the options in FAQ 1436.
tritethunder (tritethunder) wrote : | #7 |
I am getting this error do I miss something I am trying to run the same code using eclipse in mac
Exception in thread "main" java.lang.
at java.lang.
at java.lang.
at java.lang.
at java.lang.
at java.lang.
at com.wapmx.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.sikuli.
at org.spotify.
RaiMan (raimund-hocke) wrote : | #8 |
on Mac, the situation with X 1.0rc1 is a bit more complex with the native libraries like libVisionProxy.
Either wait for X 1.0rc2, where the problem will be solved, or send me a mail to https:/
Changed in sikuli: | |
status: | Fix Committed → Fix Released |
janet (jed-pculture) wrote : | #9 |
Since rc-2 was released, I've been meaning to write a quick comment and express my appreciation of all the work you have done on Sikuli-X.
This feature in particular is hugely helpful to me. Today, trying to figure out how I could create a subset test suite, picking and choosing unittests from my various .sikuli suites, I found I can use this command.
java -jar $SIKULI_
Also - I've started working to get my scripts to run on linux as well. Just needed to make a few minor tweaks and have found it to be rocket fast.
So awesomely simple. So Thanks, thank you and Thanks! to everyone on your team.
LavanyaBalaiah (lavanya-balaiah) wrote : | #10 |
Hi,
I m using Mac OS X 10.8.2 (12C2034) and Sikuli version x-1.0rc2 and using java version "1.6.0_37".But I m getting the error while running the sikuli script in eclipse.
"/private/
Please help me to resolve this problem...
RaiMan (raimund-hocke) wrote : | #11 |
When asking questions in comments to other questions, you should subscribe to the question, to get notified about comments to your comment.
- upgrade to X-1.0rc3 (http://
- look faq 1436
The current instructions are inadequate.
This is a significant issue that is blocking use of Sikuli,
I still can't get scripts to execute
My project will be terminated this Friday unless I can get my previously working Sikuli scripts to work from within NetBeans.
One error leads to another, I can no longer import subprocess even in the Sikuli IDE, this breaks most of my scripts.