Bundle Sikuli script with a Mac Cocoa application.

Asked by Smythe Winsington

Hi,

I was wondering if it is possible to bundle a Sikuli script into an application bundle? I assume that it will be more difficult than simply including the Sikuli execution environment and script into the bundle via XCode?

Thanks!

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

To run a script, you only need sikuli-script.jar and access to the native libs (standard location: /Applications/Sikuli-IDE/Frameworks).

I use this .sh to run my scripts from command line:

#!/bin/sh
SikScript="/Applications/Sikuli-IDE.app/Contents/Resources/Java/sikuli-script.jar"
JavaParm="-Xms64M -Xmx512M -Dfile.encoding=UTF-8"
java $JavaParm -jar "$SikScript" $@

For this to work the only prerequisite is a Sikuli-IDE installed in /Applications.

So if you know how to make a bundle, you could either take the Sikuli-IDE bundle as a base or build up your own. The only thing you have to solve is location of/reference to your script (somewhere in the bundle).

Revision history for this message
Smythe Winsington (zrb0529) said :
#2

Ah, that looks pretty easy.

Thanks for the tip :)

Revision history for this message
Smythe Winsington (zrb0529) said :
#3

Thanks RaiMan, that solved my question.