Building instructions

Laurent Pugin edited this page May 14, 2018 · 16 revisions

Command-line tool

To build the command-line tool with CMake, run:

$ cd tools
$ cmake .
$ make
$ sudo make install

By default the executable is not stripped. To strip it during the installation do

$ sudo make install/strip

For seeing the command-line options, run:

$ ./verovio --help

For building it without Plain and Easy support (without regex.h), run:

$ cmake . -DNO_PAE_SUPPORT=ON

To allow PAE support again, you must run the command

$ cmake . -DNO_PAE_SUPPORT=OFF

since running cmake . will not clear the state of the define variable.

Likewise, the Humdrum importer can be turned on/off by using NO_HUMDRUM_SUPPORT. Also, to use the MusicXML Humdrum importer by default instead of the direct MusicXML importer, add -DMUSICXML_DEFAULT_HUMDRUM=ON.

For usage instructions, please check the following page on the verovio website: Link

XCode

For OS X users, there is also an XCode project in the Verovio root directory. By default, humdrum support is turned off in XCode. To turn in on, remove the NO_HUMDRUM_SUPPORT preprocessor macro.

Visual Studio

  • Install CMake
  • Go into the tools folder of Verovio
  • Execute cmake . -DNO_PAE_SUPPORT=ON (add -DCMAKE_GENERATOR_PLATFORM=x64 for a x64 solution)
  • Use the resulting Verovio.sln with Visual Studio

JavaScript toolkit

To build the JavaScript toolkit you need to have the Emscripten compiler installed on your machine. Then run:

$ cd emscripten
$ ./buildToolkit -H

The toolkit will be written to:

./emscripten/build/verovio-toolkit.js

Building without -H will include the Humdrum support, which increases the size of the toolkit by about one third. In that case, the output will be written to verovio-toolkit-hum.js.

Building the Python toolkit

To build the Python toolkit you need to have swig and swig-python installed on your machine (see SWIG) and the Python distutils package. To install SWIG in OS X using Homebrew, type the command brew install swig. Then, to build it in-place, run:

$ cd bindings/python
$ python setup.py build_ext --inplace

If you want to install it, run:

$ cd bindings/python
$ python setup.py build_ext
$ sudo python setup.py install

For building it without Plain and Easy support (without regex.h), run:

$ python setup.py build_ext --inplace --define NO_PAE_SUPPORT

Building the Java toolkit

To build the Java toolkit you need to have swig and swig-java installed on your machine (see SWIG). Then, to build it, run:

$ cd bindings/java
$ mvn package
$ mvn package

Note the mvn package command needs to be run twice. You can test it with the MEI and PAE examples. For example:

$ cd example-mei
$ javac -cp .:../target/VerovioToolkit-2.0.0.jar main.java
$ java -cp .:../target/VerovioToolkit-2.0.0.jar main

This should write an output.svg file in the current directory. The PAE example will write the SVG to the standard output.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.