Skip to content

niknah/SikuliX-2014

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SikuliX-2014 (current version 1.1.0)

This Maven multi-module setup contains everything to
build the ready-to-use packages available on Launchpad
(this is at least the intention at time of final release end January 2014).

Forking and/or downloading this repo only makes sense:

  • if you want to get a knowledge about the internals of Sikuli
  • if you want to create your own packages containing Sikuli features
  • if you want to contribute.

Even if you want to develop in Java or any Java aware scripting language (Jython, JRuby, Scala. Closure, ...) it is strongly recommended to start with sikuli-java.jar (run Sikuli setup with option 4).

To get the ready-to-use packages (IDE, Script, Java/Jython support)
it is still recommended to start here.

The structure of this repo

Each folder (module) in this repo is a Maven project by itself with its own POM, but it needs to be in this folder and POM structure, since there is a super POM on the first level, that is the parent POM for all the other child POMs and installs all modules into your local Maven repo. For detailed usage information look further below.


--- The top level modules (representing the Sikuli features) ---

Module API

The Java implementation comprising the API to access the top elements (Screen, Region, Pattern, Match, Image, ...) and their methods allowing to search for images and to act on points and matches simulating mouse and keyboard.

The base package sikuli-java.jar provides this API for Java programming and any Java aware scripting languages (currently with some special support for Jython).

The convenience package sikuli-script.jar comes with the bundled Jython interpreter, thus allowing to run Sikuli scripts out of the box from the commandline and providing an interactive Sikuli aware Jython shell.
This package will vanish in the long range, since it is fully contained in the IDE package.

Module IDE

Implements a GUI using Java, that allows to edit and run Sikuli scripts (currently only Jython is supported). It is an easy to use IDE focusing on the handling of the screenshots and images used in the typical Sikuli workflows.

The package sikuli-ide.jar is the top level package containing all other options. It can be used from commandline in the same way as sikuli-script.jar and hence usually only this IDE package is needed.


--- The helper/utility modules (intended for internal use only) ---

Module Jython

Implements the Jython support for the IDE and for running scripts using Jython as scripting language.
(contained in packages sikuli-ide.jar and sikuli-script.jar)

Module Basics

Implements basic ustility and helper features used in the top level packages (basic file and folder handling, download features, jar access and handling, export of native libraries, parameter and preferences handling, update and extension handling, ...) and hence it is contained in all packages.

As a special feature it comprises the sikuli-setup.jar, which is run after download to build the wanted Sikuli packages and make them ready-to-use on the specific system (Windows, Mac or Linux).

Module OpenCV

Sikuli's image search is based on respective features of OpenCV. Starting with version 2.4.6 OpenCV provides a self-contained JNI interface to the OpenCV native libraries, allowing to use OpenCV features directly in Java (and hence making C++ programming obsolete for this).

This module contains a specially configured Java/JNI OpenCV package (built using the standard OpenCV configure/make workflow) for use with the OpenCV features currently needed by Sikuli (core, imgproc, feature2d and highgui). The corresponding native library pack (currently Mac only) is contained in the module Libs.

With the final availability of version 1.1.0 the implementation of the OpenCV usage will be moved completely to the Java level. Until then the histrical implementation in C++ is activated in the standard. The usage of the new implementation (in the new classes ImageFinder and ImageFind) can be switched on optinally for testing and developement.

For Windows and Mac the native packages will again be pre-built and ready-to-use. For Linux there will be advices and scripts available to get the needed features.

Module Natives

Contains the Java sources interface classes (JNI based, mainly SWIG generated) and the C++ sources providing the implementation of the OpenCV and Tesseract usage and the implementation of some system specific features (HotKeyHandling, App class support,...).

A maven based build workflow for the native libraries (libVisionProxy, lib...Util and hotky support on Mac) is available in the module Libs, which is also the target module for the prebuilt libraries finally bundled with the top level packages.


--- The modules used to support package production (container jars) ---

Module Libs

The prebuilt native libraries for Windows, Mac and Linux (partially).
(contained in sikuli-setup.jar)

Module Tesseract

Currently as a convenience the standard tessdata folder needed for using Tesseract 3.0.
(will be downloaded on request during a Sikuli setup)

Module MacApp

A template Sikuli-IDE.app, that is downloaded on request and made ready-to-use during Sikuli setup.

Module Docs

The source files for the textual documentation (built with PythonSphinx based on .rst files) and a ready-to-use HTML version as well as a HTML version of the JavaDocs of the main public Java API.
(is downloaded and made ready-to-use-locally during Sikuli setup)


--- Modules being AddOns or Extensions --

Module Guide

Module Remote


Usage - basic information

If you intend to compile and build the modules after having downloaded this repo, you need a valid Maven 3 installation and for editing, testing and integration some IDE, that is enabled for working with Maven projects.
(I myself use NetBeans 7.4, which supports Maven by default)

Take care Even if you only want to work on one of the modules (e.g. API), the modules should not be moved around, but stay in the structure of the downloaded repo. Each module depends on the parent POM in the root and the ready-to-use-jar-production POMs additionally on the assembly descriptors plain.xml and complete.xml.

--- Mandatory first step

In the root directory of the repo run
mvn clean install
which builds all modules and installs the artifacts into your local Maven repository.

If you want jars containing the sources of the respective modules and/or containing the javadocs you can use the following profile switches:
mvn clean install -PwithSource,withDocs
(but for local usages, there might not be any sense in that ;-)

Be aware This mandatory first step will add "tons" of additional stuff from Maven Central repository to your local Maven repository, especially when you are a first time Maven user.

--- Basic compile/package/install for each module

You have 3 options, to selectively run the POM of a specific module alone:

  1. in the root folder run
    mvn -pl<ModuleName> [clean] [compile|package|install]
    where <ModuleName> is the respective folder name
  2. in the module's folder run
    mvn [clean] [compile|package|install]
  3. use the respective build steps in your IDE being in one of the module projects

You might additionally use the above mentioned profile switches.

--- How to produce the ready to use jars ...

... sikuli-ide.jar, sikuli-script.jar and sikuli-java.jar

please look here

About

Sikuli version 1.1 as Maven multi-module setup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 84.8%
  • C++ 8.4%
  • Python 2.3%
  • JavaScript 1.8%
  • CSS 1.2%
  • Shell 1.1%
  • Other 0.4%