888b      88                                    88                     
8888b     88                             ,d     88                     
88 `8b    88                             88     88                     
88  `8b   88   ,adPPYba,    ,adPPYba,  MM88MMM  88   ,d8   ,adPPYYba,  
88   `8b  88  a8"     "8a  a8"     "8a   88     88 ,a8"    ""     `Y8  
88    `8b 88  8b       d8  8b       d8   88     8888[      ,adPPPPP88  
88     `8888  "8a,   ,a8"  "8a,   ,a8"   88,    88`"Yba,   88,    ,88  
88      `888   `"YbbdP"'    `"YbbdP"'    "Y888  88   `Y8a  `"8bbdP"Y8  
                                                                       
                                                         ... to play scores

Nootka is an application to discover and learn classical score notation.
It helps to understand the rules of reading and writing scores
and helps with developing skills of playing and singing notes from a score.
      The application is free and open source.
      It works under Windows, Linux and Mac.


              BUILD INSTRUCTION

######################################################################################
                I...   Requirements:                         #########################
######################################################################################
- Qt libraries (at least version 5.2)
	In particular: Qt5Core, Qt5Gui, Qt5Widgets, Qt5PrintSupport, Qt5Network
- Ogg Vorbis (http://www.xiph.org/downloads/) 
  both ogg and vorbis. Dll libraries are on mentioned site in vorbis-tools archive
  and headers are in libogg and libvorbis archives.
  Under Linux: libvorbis-dev & libogg-dev (or similar)
- FFTW libraries (http://www.fftw.org/)
	Under Linux: libfftw3-dev (or similar)
- under Linux and MacOs only
  SoundTouch library (http://www.surina.net/soundtouch/)
  (libsoundtouch and libsoundtouch-dev)
- libasound-dev under linux

######################################################################################
                 II...    Building:                           ########################
######################################################################################
In short:
  cmake nootka_folder && make && make install

In details:
1. Unpack Nootka tarball (archive)
2. go into unpacked directory
3. create some directory (i.e. 'build')
4. go into created dir (i.e. cd build)
  ---------------------------------------------------------------------------------------------------------
5. Launch:
		cmake ../ 
	or 
		ccmake ../
	or  
		launch graphical cmake-gui and select source and build directories there
  ---------------------------------------------------------------------------------------------------------
  if you get error about not found libfftw or libvorbis
  put them manually as a cmake launch parameter:
      -DFFTW3_LIBRARIES=/path_to/libfftw3f.la(dll)
      -DFFTW3_INCLUDE_DIRS=/path_to_dir_with/fftw3.h
      -DVORBIS_LIBRARIES =/path_to/libvorbisfile.so(dll) 
      -DVORBIS_INCLUDE_DIRS=/path_to_dir_with/vorbis/vorbisfile.h
      -DOGG_INCLUDE_DIRS=/path_to_dir_with/ogg/ogg.h      
    also
      -DCMAKE_INSTALL_PREFIX=/install/dir to change installation target
      -DCMAKE_BUILD_TYPE=debug to build Nootka in debug mode
    so you can invoke:
      cmake -DCMAKE_INSTALL_PREFIX=/my/special/dir ../
      
    or do the same with GUI
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
	NOTE for Windows build:
    If you put unpacked archives of fftw and ogg-vorbis in the 'build' directory, 
    and you remove the versions numbers from their names, to have:
    libogg, libvorbis, fftw and vorbis-tools directories,
    cmake will find all of them automagically.
    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  ---------------------------------------------------------------------------------------------------------
  - There is an option for building Nootka with online checking for new versions
  ---------------------------------------------------------------------------------------------------------
  - Also under Linux there are options to build Nootka with native support for:
   - Jack Audio Connection Kit support (requires libjack-dev)
   - PulseAudio (requires libpulse-dev)
    When those headers/libs are found - options are selected automatically
    but they can be controlled by:
	  -DENABLE_JACK=OFF -DENABLE_PULSEAUDIO=OFF (OFF or ON)
	---------------------------------------------------------------------------------------------------------
6. then call
  make 
  or 
  make -j[number of CPU cores], f.e.: make -j4
  ---------------------------------------------------------------------------------------------------------
- If you want to launch Nootka without installing - in a place where it is compiled
	call
		make runinplace
		it will copy or link all necessary staff next to build executable
	then invoke
	  ./src/nootka
	or just hit a file called 'nootka'
  ---------------------------------------------------------------------------------------------------------
7. make install (usually as root)
  alternatively you can invoke 
     make install DESTDIR=/your/Dir
  and push the installation wherever you want (similarly to -DCMAKE_INSTALL_PREFIX)
  Under Windows call
    make deploy
  to copy all related libraries and make instalation folder independent
  ---------------------------------------------------------------------------------------------------------
8. to remove (uninstall)
- make uninstall (usually as root)

+++++++++++++++++++++++++++++ Qt Creator +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
	Steps from 2 to 8 can be achieved also in Qt Creator - development IDE.
	Just open CMakeLists.txt file placed in main Nootka archive folder and follow the instructions
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  !!!!!!!!!!!! GOOD LUCK !!!!!!!!!

############################################################################################################
                 III...    Packaging              ##########################################################
############################################################################################################
you can easily generate rpm and deb package and Windows installer.
1. For deb call:
  cpack -G DEB
  (obviously dependencies for build debian packages are required)
  
2. For rpm call
  cpack -G RPM
  
3. To build Windows installer http://nsis.sourceforge.net is necessary.
After installation there is nootka-utf8.nsi file. Launch it in nsis and the installer will be built.
  make deploy 
has to be caled before!
  
  
  
######################################################################################
####    How to prepare development environment under MacOs                          ##
######################################################################################
1. Install Xcode & X11 (from MacOs install DVD or App Store). XCode SDK is not required
2. Install MacPorts 
	http://www.macports.org/install.php
	and in terminal type:
    sudo port install pkgconfig cmake mercurial fftw-3-single libvorbis soundtouch
  Alternatively you can use Fink or another MacOs packaging system


3. Download and install QT libraries:
  go to 
    http://qt-project.org/downloads
    and take Qt libraries version 5.2 or any above
    and install it.

4. Now you can go to to Building section

5. 'make install' under MacOs generates independent bundle with all needed frameworks inside


 





