Skip to content

Installation

Maxim Poliakovski edited this page May 25, 2019 · 5 revisions

Clone, Build & Run

Users' environment can vary widely in terms of machine architecture, operating system, java virtual machine, runtime binaries, browser, firewall, etc. To cope with this variability, we have chosen a single path: the "clone, build & run" approach.

Clone

Purpose is to retrieve all material needed to build the software, notably its source code.

For this, you need the git version control system to be already installed.

Open a terminal window, and from a directory of your choice, use this command (where $> simply represents the command prompt):

$> git clone https://github.com/Audiveris/audiveris.git

In your current directory, this will create a sub-directory named "audiveris" and then download source code into it.

Then move to this sub-directory, via this command:

$> cd audiveris

From now on, we'll suppose you work from this audiveris development directory.

Build

Purpose is to compile the sources and assemble the final program.

You also need a suitable Java SE Development Kit for a 64-bit environment (a 32-bit environment would not work, because of the deep learning library) Note: a JRE is not enough, you need a JDK to get Java compilation tools. Select at least Java SE 7 (preferably Java SE 8).

From the audiveris development directory, use the command in your Windows terminal:

$> gradlew.bat clean build

or this command in your Linux/Mac OS terminal:

$> ./gradlew clean build

The gradle tool will review the software dependencies, automatically download the needed binaries and finally compile and assemble the program.

Run

Purpose is to launch the JVM (Java Virtual Machine) to run the final program on different inputs, either interactively or in batch.

You need to have the data files of Tesseract OCR installed, with at least these languages: ENG, ITA, DEU, FRA.

From the audiveris development directory, use the command:

$> gradlew.bat run

if you're running on Windows or

$> ./gradlew run

if you're running on Linux/Mac OS.

Gradle will note that everything is up-to-date and immediately launch the JVM with Audiveris. By default Audiveris is launched with its basic user interface.

Should you need to provide command line arguments to Audiveris, use a command like:

$> gradlew.bat run -PcmdLineArgs="your,arguments,here"

if you're running on Windows or

$> ./gradlew run -PcmdLineArgs="your,arguments,here"

if you're running on Linux/Mac OS.

Optional Installation

Install

The above step is enough to run Audiveris from its development directory.

But, since you have built the software, you can notice in the "audiveris" development directory, a sub-directory named "build" which in turn contains a "distributions" sub-directory.

This "distributions" directory contains two similar archives: Audiveris.tar and Audiveris.zip. Note the content of these archives is adapted to your current environment, as detected by the gradle build procedure.

You can extract either one of these archives into a target directory of your choice. Let's call this target directory an installation directory (it has no relation at all with the development directory).

Here is an excerpt of the installation directory content:

    ├── bin
    │   ├── Audiveris
    │   └── Audiveris.bat
    └── lib
        ├── annotations-2.0.1.jar
        ├── args4j-2.33.jar
        ├── ...
        ├── ...
        ├── audiveris.jar
        ├── ...
        ├── ...
        ├── tesseract-3.04.01-1.3.jar
        ├── tesseract-3.04.01-1.3-windows-x86_64.jar
        └── videoinput-0.200-1.3.jar

In the bin directory, there are two command files:

  • Audiveris which is a bash file (for Unix)
  • Audiveris.bat which is a cmd file (for Windows)

Launch whichever command file you like, either from a terminal window or via a double-click.

Caveat: If you get an error message like "The input line is too long", this is due to a too long string of concatenated library paths. Since the path to installation directory is replicated in each and every library path, and there are more than 100 of them, an efficient workaround is to choose an installation directory with a short full path, like say:

d:/Audiveris