Canorus - a free music score editor
===================================
Canorus  is a free music score editor. It supports note writing, scripting support,
import/export of various file formats, MIDI input and output and more! Note that
Canorus is still in heavy stage of development and not all the features are
implemented yet!

Canorus is free (libre) software, licensed under GNU GPL. This means that the program
source code is available to public, anyone is welcome to research how the program
works, participate in its development, freely distribute the program and spread the
word! Canorus runs on Linux, Windows, MacOSX and others! 

Build dependencies:
===================
The latest version of Qt4, Swig and CMake is prefered.

- Qt development package >=4.4 (http://www.qt-project.org)
- Swig >=2 (http://www.swig.org)
- g++ >=4, make (http://gcc.gnu.org, http://www.mingw.org)
- cmake >=2.6.2 (http://www.cmake.org)
- Python development package >=3.0 (http://www.python.org)
- (optional) Lyx, tex4ht (user's guide)

Qt5 Build (Experimental, not tested with Qt 5.4.x)
- Qt development package 5.3.2 (http://www.qt-project.org)
- Swig, g++, cmake, python, lyx as above
- copy the CMakeListQt5.txt files (main folder and src) to CMakeList.txt

Runtime dependencies:
=====================
- Qt library, same version
- Python library, same version
- On Windows, Mingw library, same version

Compilation:
============
1. (Optional) Compile User's guide:
 $ cd doc/usersguide
 $ make
  You need latex and other tools installed (see doc/Readme-doc.txt for details).
  You can skip this step, but the User's guide won't be launched using
  Help->User's Guide action then.
2. Go to Canorus root directory and run:
 $ cmake .
 $ make
 $ src/canorus(.exe)
  To create a release build without debug info, run:
 $ cmake -DCMAKE_BUILD_TYPE=Release
  Note that this also causes QT_NO_DEBUG to be defined.


Installation
============
 $ make install

Debian based distributions:
===========================
Download the SVN/release version of canorus, go to Canorus root directory and run:
 $ debian/rules binary
 
Install the created .deb package.

Troubleshooting:
================

If you get the following error (could be only the last line!):

 QT_QMAKE_EXECUTABLE set to qmake version: QTVERSION = **Unknown**
 QT_QMAKE_EXECUTABLE = /usr/bin/qmake, please set to path to qmake from qt4.
 Qt qmake not found!

Then you have to run cmake with the following switch:
 $ cmake -DQT_QMAKE_EXECUTABLE="/usr/lib/qt4/bin/qmake"

(replace the path to fit your needs).

IMPORTANT: Do not run cmake again before removing the cache files
CMakeCache.txt and the directory CMakeFiles!

If you use gcc 4.8.x with Qt < 4.8.5 you will get an error. This can
be fixed by editing the header qt4/QtCore/qtconcurrentfilter.h and
removing the line that caused the error (the fix Qt Team performed too).

-------------------------------------------------------------------------------

If you get the error "swig not found" then you have the problem
that FindSWIG.cmake does not match your system configuration. On
my system swig files are in /usr/share/swig2.x.y, so I needed to
create a link to it from swig2.x:

 $ ln -s /usr/share/swig2.x.y /usr/share/swig2.x

Replace 2.x.y with the real version f.e. 2.0.4.

-------------------------------------------------------------------------------

If you get the following error:
"libpython.a: undefined reference to openpty"
your system requires the util library to be included to the
Canorus link libaries. To do this edit src/CMakeFile.txt file
and search for the line containing TARGET_LINK_LIBRARIES.
Add " util" as last library to the line f.e. like this:

 TARGET_LINK_LIBRARIES(canorus ${QT_LIBRARIES} ${QT_QTXML_LIBRARY} ${RUBY_LIBRARY} ${PYTHON_LIBRARY} util)

-------------------------------------------------------------------------------

To disable Ruby/Python support even when installed call cmake with these options:
 $ cmake -DNO_RUBY=1 -DNO_PYTHON=1

I hope that the NO_DEFAULT_PATH options gets added to newer cmake releases :)

Settings
========
Settings are stored in $HOME/.config/Canorus directory under POSIX systems and under
Local settings directory in your user profile directory under Microsoft Windows.

Windows users
=============
See windows/Readme.txt for details about building Canorus under Microsoft Windows.

Mac OS X users
==============
Check macosx/ directory and run Make.
