Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

How to produce the ready_to_use jar packages

Raimund Hocke edited this page Mar 12, 2015 · 56 revisions

You need a valid Maven 3 installation allowing to use mvn on command line.
... and out of the box it only works in the context of this repo structure

For the normal user (not being a Sikuli developer or contributor)
it is strongly recommended, to produce the ready-to-use jars

  • sikulix.jar
  • sikulixapi.jar

using sikulixsetup-1.1.0.jar from the download page



**The following applies to version 1.1.0+**

The Basics

The ready-to-use jars contain all Java dependencies and, depending on the selected setup options, native libraries and the basic tessdata folder. The jars downloaded during setup (or taken locally from the setup/Downloads folder) are not useable without being processed by setup. Setup will add the additional stuff as needed locally and so produce the ready-to-use fat jars.
Additionally the setup process checks relevant environment aspects, exports convenience command scripts and some other stuff and runs a basic test after package build, to assure, that the package is useable. On Windows the needed entry in system path for the native libraries is added to the registry on the fly.


**IN ANY CASE:**
When running setup with stuff generated from this repo, be aware, that you are doing an offline setup.
**So be sure, not to download anything during the setup process.**

How To

In the root folder run mvn clean install, if anything was changed since the last time.

In the following the term version in filenames is the current version of the repo like:
1.1.0

In the following the term timestamp in folder-/filenames is the build time (install run) of the repo like:
201503120932 (as YYYYMMDDHHSS)

In the following the term SikulixAppData in foldernames is the following location on your system:

  • Windows: the folder Sikulix in the path pointed to by environment variable %APPDATA%
  • Mac: ~/Library/Applications Support/Sikulix
  • Linux: ~/.Sikulix

This is the expected result at the time, when the setup options dialog appears:

-- folder [SikulixAppData]/SikulixSetup
   sikulixsetup-version.jar

-- folder [SikulixAppData]/SikulixDownloads
   jython-standalone-2.7-b3.jar (Jython)
   jruby-complete-1.7.18.jar (JRuby)
   tesseract-ocr-3.02.eng.tar.gz (tessdata)

-- folder [SikulixAppData]/SikulixDownloads-timestamp
   timestamp-1.jar (IDE)
   timestamp-2.jar (API)
   sikulixlibslux-version.jar (native libs for Linux)
   sikulixlibsmac-version.jar (native libs for Mac)
   sikulixlibswin-version.jar (native libs for Windows)

At this point, you might cancel the setup process in the options dialog and move the sikulixsetup-version.jar (and nothing else!) to a suitable place, to finally run the setup there.

As already mentioned: None of these jars in the folders SikulixDownloads... are useable!

If you have run setup to the end, then you will have in the folder where you run the setup (depending on selected options):

sikulixsetup-version.jar
sikulix.jar (option 1)
sikulixapi.jar (option 2)
runsikulix(.cmd) (option 1)

These artefacts can be moved/copied to wherever you want.

But to avoid future version/update problems, you should keep them in one prominent place only and work with links/references (e.g. in IDE's like Eclipse, NetBeans, ...).

Additionally the following folders/contents where created in the folder SikulixAppData:

-- folder [SikulixAppData]
   -- folder SikulixLibs_timestamp
      content: native libs for this system suitable for the version with that build timestamp
   -- folder Libs
      content: stuff needed for scripting with Jython, JRuby and JavaScript
   -- folder: SikulixTesseract
      content: stuff to support Tesseract usage (tessdata)
   -- folder Extensions
      content: future use (additions/plugins for Sikulix)

Generally you should only touch these folders in SikulixAppData and their content, if you know what you are doing.
NEVER move this stuff elsewhere (though copy is allowed, but has no effect for Sikulix)

At any time (e.g. in debugging situations) you might delete one or more of these folders (always folders - not only files!), since they will be recreated on the fly at runtime using the respective feature jar.

In usage situations, just take care, that the respective jar (sikulix or sikulixapi) is on the Java class path at runtime.

Special for Linux