sikuli does not use my guide.jar

Asked by Steffen

After contact with RaiMan (https://answers.launchpad.net/sikuli/+question/211340), I loaded the source code of sikulis guide-extension into my development environment, changed only one line of the code and successfully compiled it.
The line I changed was this:
http://bazaar.launchpad.net/~sikuli-dev/sikuli/guide/view/head:/extensions/guide/src/main/java/org/sikuli/guide/SikuliGuideCallout.java
In line 132 I changed "yellow" to "blue".
First I tried running sikuli with the original guide.jar:

import sys, os
myScriptPath = os.path.join(os.path.dirname(getBundlePath()), "..", "..", "TESTENV_SikuliLibs")
if not myScriptPath in sys.path: sys.path.append(myScriptPath)
load(os.path.join(myScriptPath,"guide.jar"))
import guide
guide.text("115.png","success")
guide.show(4)

This worked well (Under the PNG i got a black "success" on yellow background")
After that, I copied my compiled guide.jar into the folder "TESTENV_SikuliLibs", overwrote the original guide.jar and restartet my sikuli IDE.
Result: Nothing changed; sikuli runs, but the text "success" still has a yellow background.

What's my mistake?

Question information

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

I did not test it yet, but looking into the sources it seems, that the load(absolute-path.jar) works, but the following import finds the guide.jar in the Sikuli standard extensions folder first.

So without fixing this in the SikuliImporter, I guess you have to put your modified guide.jar into the extensions folder (or delete/rename it there if you want to stick with your approach).

Revision history for this message
Steffen (steffen-be) said :
#2

Problem solved - I edited the wrong java-file... I edited the Callout file but used the text-command in Sikuli.
And in the Text.java-file I couldn't find a "Color.yellow", because the color there is defined as hexadecimal.