Compile sikulixapi.jar for all platforms?

Asked by Tom Hallett

Hi,

Thank you for all the hard work put into Sikuli - it's a very powerful tool and I think it can really help my Automated Testing. :)

I am using the sikulix maven build, and it appears that the jar being built can only be executed on the platform which compiled it.

I've noticed that with the old sikuli-setup.jar, option 6 was "I want the packages to be useable on Windows, Mac and Linux (they contain the stuff for all systems - one pack for all)". Reference (http://stackoverflow.com/questions/20114511/how-to-get-sikuli-script-jar-for-windows-64-bit-machine and http://i.stack.imgur.com/Y4yiZ.png).

But in the most recent version, there is no such option. Reference (http://www.sikulix.com/quickstart.html and http://www.sikulix.com/uploads/1/4/2/8/14281286/3812431_orig.png).

Is building the sikulixapi for Mac and Windows in one build no longer possible? If so, would you recommend I need a build machine for each platform I want to target? Some other solution?

Thanks,
Tom

Note: Here is 2 excerpts of my pom.xml for reference:

        <dependency>
            <groupId>com.sikulix</groupId>
            <artifactId>sikulixapi</artifactId>
            <version>1.1.0</version>
        </dependency>

        <repository>
            <name>com.sikulix</name>
            <id>com.sikulix</id>
            <url>https://oss.sonatype.org/content/groups/public</url>
            <layout>default</layout>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
        </repository>

And here is the error message I got when running my sikulix jar program on Windows (which I compiled on mac):

RunTimeINIT: *** terminating: libs to export not found on above classpath: /sikulixlibs/windows/lib32

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

using SikuliX setup to get a useable sikulixapi.jar and using Maven to integrate sikulixapi into your own Java app are 2 different approaches.
The latter is always supposed to be running on the target system and hence produces a currect final artefact for this system.

If you want to use a sikulixapi.jar, that runs on all possible systems, with your Java app, you have to use the classpath approach or put your own Maven artefact for sikulixapi.jar into your local repo.

The option to setup a multi-system sikulixapi.jar is no longer shown in the setup dialog, but functionally available when running setup from commandline (see faq 2609)

Revision history for this message
Tom Hallett (tomhallett) said :
#2

Got it! I'll give the custom maven a shot. Thanks for the help.