update docs

This commit is contained in:
Alexey Loginov 2019-06-25 02:05:07 +03:00
parent b1a7ca9342
commit 5354630a70
10 changed files with 810 additions and 842 deletions

View File

@ -1,21 +1,20 @@
# Linux
Ensure that the following packages 'cmake', 'libqt5-dev', 'libasound2-dev' and
'build-essential" are installed.
Ensure that the build required packages are installed. Full list of them you can find [here](pkgs).
Then type
Then type:
```cmake .```
```make```
Finally as root type
Finally as root type:
```make install -C build```
(The pianobooster binary executable is now in the "build" subdirectory.)
To build a debug version create a dir called "debug" and change to that dir and then type
To build a debug version create a dir called "debug" and change to that dir and then type:
```cmake -DCMAKE_BUILD_TYPE=Debug .```
@ -27,8 +26,6 @@
See [ARCH](pkgs/arch/PKGBUILD) for more details.
If you make changes to the source code then please post details.
# macOS
Install latest Xcode (from Apple Developer Connection, free registration required).
@ -48,45 +45,41 @@
It's recommends to build with disabled USE_FTGL.
If you make changes to the source code then please post details.
# Windows
To compile in Windows install the Open Source version of Qt and CMake and optionally Geany.
When installing Qt select the option to download and install the MinGW compiler. Open the
Qt Command Prompt and then change to the "PianoBooster" directory and then type the
command below.
command below:
```"C:\Program Files\CMake 2.6\bin\cmake.exe" -G "MinGW Makefiles" .```
Once this is completed type
Once this is completed type:
```make```
Or alternatively you can install QtCreator and then open the pianobooster.pro
Or alternatively you can install QtCreator and then open the pianobooster.pro.
It's recommends to build with disabled USE_FTGL to fix notes drawing.
If you make changes to the source code then please post details.
# Build options
**USE_FTGL**: link with ftgl; enabled by default; disabling disable notes localization
**USE_FTGL**: link with ftgl; enabled by default; disabling disable notes localization.
**NO_DOCS**: do not install documents; disabled by default
**NO_DOCS**: do not install documents; disabled by default.
**WITH_MAN**: install man page; disabled by default
**WITH_MAN**: install man page; disabled by default.
**WITH_TIMIDITY**: install desktop file and wrapper script for timidity; disabled by default
**WITH_TIMIDITY**: install desktop file and wrapper script for timidity; disabled by default.
**WITH_FLUIDSYNTH**: install desktop file and wrapper script for fluidsynth; disabled by default
**WITH_FLUIDSYNTH**: install desktop file and wrapper script for fluidsynth; disabled by default.
**INSTALL_ALL_LANGS**: install all languages; disabled by default for cmake and enabled for qmake
**INSTALL_ALL_LANGS**: install all languages; disabled by default for cmake and enabled for qmake.
**USE_SYSTEM_RTMIDI**: build with system (not bundled) rtmidi; disabled by default
**USE_SYSTEM_RTMIDI**: build with system (not bundled) rtmidi; disabled by default.
**USE_FLUIDSYNTH**: enable setting for fluidsynth in GUI; disabled by default
**USE_FLUIDSYNTH**: enable setting for fluidsynth in GUI; disabled by default.
**USE_SYSTEM_FONT**: do not use and do not install bundled font, use system font instead; enabled by default
**USE_SYSTEM_FONT**: do not use and do not install bundled font, use system font instead; enabled by default.
**USE_FONT**: build with specified font; empty by default
**USE_FONT**: build with specified font; null by default.

View File

@ -66,7 +66,7 @@ This must be started before Pianobooster, and also allows to load custom Soundfo
Install RPM, DEB, etc. package.
Packages for Linux are available in repositories of distributions [here](https://pkgs.org/download/pianobooster)
Packages for Linux are available in repositories of distributions [here](https://pkgs.org/download/pianobooster).
Packages for Linux are available in OBS repository:
@ -76,9 +76,6 @@ Packages for Linux are available in OBS repository:
[pianobooster-fluidsynth](https://software.opensuse.org/download.html?project=home%3Aloginov_alex_valer&package=pianobooster-fluidsynth)
*Note:* In Ubuntu 9.04 there is an issue with the Intel drivers which that means PianoBooster
performs very badly if you have Intel graphic chips. Upgrading to Ubuntu 9.10 fixes this problem.
*Note:* The packages provided with distributions may not exist or are out of date,
in which case you will have to compile from the source code.
However compiling from source is quite easy on Linux, see the instructions
@ -115,7 +112,7 @@ new translations with it. Use our
(Transifex) to add your favorite languages.
Using Transifex is not mandatory.
You can translate by [Pull Request](https://github.com/captnfab/PianoBooster/pulls)
You can translate by [Pull Request](https://github.com/captnfab/PianoBooster/pulls).
You need to translate:
@ -203,7 +200,7 @@ PianoBooster is community developing project since 2018. You're welcome with pat
We have many [issues](https://github.com/captnfab/PianoBooster/issues) always.
We are looking for musicians to make music for pianobooster. It can be educational courses or other melodies: [music sources](music/src). For more information look at [README.md](doc/courses/README.md)
We are looking for musicians to make music for pianobooster. It can be educational courses or other melodies: [music sources](music/src). For more information look at [README.md](doc/courses/README.md).
PLATFORMS
=========

View File

@ -74,7 +74,7 @@ learning piano technique.
Timing markers show whether you are playing ahead or behind of the beat.
They appear as white crosses that are drawn over the note.
Timing markers are new in version 0.6.2
Timing markers are new in version 0.6.2.
![Piano Booster timing markers](images/timingmarkers.jpeg)

View File

@ -17,7 +17,7 @@ and the accompaniment was created with the <a href="http://www.mellowood.ca/mma/
<h2>Start with your thumb on Middle C</h2>
<p>Press it four times. wait for four beats then press it again</p>
<p>Press it four times. wait for four beats then press it again.</p>
<h2>Next play E</h2>
@ -25,7 +25,7 @@ and the accompaniment was created with the <a href="http://www.mellowood.ca/mma/
<h2>Jump over F to get to G</h2>
<p>Jump over F to get to G</p>
<p>Jump over F to get to G.</p>
<h2>The first five white notes</h2>

View File

@ -1,193 +1,193 @@
# Piano Booster Music
These pieces of music have been created to work with _PianoBooster_ and
are free from copyright or have the creative commons copyright.
All the music is available [here](https://github.com/captnfab/PianoBooster/raw/master/music/BoosterMusicBooks.zip).
_Please add to the music on this page - everyone can help._ For more information see this
[forum post](http://piano-booster.2625608.n2.nabble.com/Creating-music-for-PianoBooster-using-MMA-Everyone-can-help-td4167350.html).
The piano parts for were created using the [ABC Plus music](http://abcplus.sourceforge.net/) system,
and the accompaniment was created with the [Musical MIDI Accompaniment (MMA)](http://www.mellowood.ca/mma/).
# Beginners Piano Course
## Find middle C
Here it is. right in the middle.
## Start with your thumb on Middle C
Press it four times. wait for four beats then press it again
## Next play E
Two white notes to the right of C is a note called E. Press it four times.
## Jump over F to get to G
Jump over F to get to G
## The first five white notes
We will just play the first five notes. up an down. One note for each finger. (This is the start of the C major scale)
## The C cord
These three notes make a cord of C. Press all the notes together, use your thumb, middle finger and little finger to press all three notes at the same time. Any three note cord is called a triad??????.
## An Arpeggio for the C cord
When you play the notes in a cord one after the other it is called an arpeggio. Play the three notes one at a time, up and down.
## The scale of C Major
All the white notes up to the next c. There are eight notes in a scale. Play scale up and down.
## Our first tune
We are ready to play our first tune.
# Piano Booster Course
## 01-StartWithMiddleC
![score](BeginnerCourse/01-StartWithMiddleC.svg)
**Start With Middle C** is an extremely easy piece. Just find **middle C** on the piano and then play that note four times using your **thumb** on your **right hand**. The first half of the piece has **middle C** in the **Treble Clef**, then for the second half of the piece the same **middle C** note is shown the **Bass Clef**. Play this using your **thumb** on your **left hand**.
**Hint:** _Try to remember where **Middle C** is on the piano - this is the most **important note**!_
[midi file](BeginnerCourse/01-StartWithMiddleC.mid)
## 02-ChordOfCMajor
![score](BeginnerCourse/02-ChordOfCMajor.svg)
The **Chord of C Major** piece, introduces you to the chord of **C Major** which has three notes **Middle C**, **E** and **G**.
Use your **thumb** for **C**, your **middle finger** for **E** and your **little finger** for **G**.
**Hint:** _If you don't know the names of the notes on the score then turn on **Show Note Names** from the PianoBooster **Setup/Preferences** menu._
[midi file](BeginnerCourse/02-ChordOfCMajor.mid)
## 03-UpAndDown
![score](BeginnerCourse/03-UpAndDown.svg)
**Up And Down** uses all the fingers of your right hand to play the first five notes of the **scale of C major**.
Use your **thumb** for **C**, your **index finger** for **D**, . . . , all the way up to your **little finger** for **G**. Make sure you keep using the correct finger for each note.
**Hint:** _If you don't know the notes on the piano then **label the piano keys** using the PianoBooster **Note Chart**._
[midi file](BeginnerCourse/03-UpAndDown.mid)
## 04-ClairDeLaLune
![score](BeginnerCourse/04-ClairDeLaLune.svg)
This is a simplified version of **Clair De La Lune** that uses just three notes **C D** and **E** from your right hand. First find **middle C** and always use your **thumb** for this note, then for **D** use your **first finger** and for **E** use **middle finger**.
**Hint:** _Remember the fingering: Use your **thumb** for **middle C**, your **first finger** for **D** and **middle finger** for **E**._
[midi file](BeginnerCourse/04-ClairDeLaLune.mid)
## 05-ChordOfFMajor
![score](BeginnerCourse/05-ChordOfFMajor.svg)
Now we are going to play using your **left hand** the **F major chord**. The three notes of a chord are called a triad and this chord has the same shape as the C major chord we played earlier but played on a different part of the piano.
Use your **little finger** on the left hand for **F**, your **middle finger** for **A** and your **thumb** for **C**.
**Hint:** _If you don't know the names of the notes on the score then turn on **Show Note Names** from the PianoBooster **Setup/Preferences** menu._
[midi file](BeginnerCourse/05-ChordOfFMajor.mid)
## 06-DownAndUp
![score](BeginnerCourse/06-DownAndUp.svg)
**Down And Up** is mirror version of the Up And Down piece we played earlier but this version uses your **left hand**. These are the top five notes of the scale of C major. Again try to use all your fingers.
Use your **thumb** for **C**, your **index finger** for **B**, . . . , all the way down to your **little finger** for **F**.
**Hint:** _Make sure you use **every finger** on your **left hand** when playing this piece._
[midi file](BeginnerCourse/06-DownAndUp.mid)
## 01-ClairDeLaLune
![score](BoosterMusic/01-ClairDeLaLune.svg)
This is a simplified version of **Clair De La Lune** that uses only the three notes **C D** and **E** from your right hand. First find **middle C** and always use your **thumb** for this note, then for **D** use your **first finger** and for **E** use **middle finger**.
**Hint:** _If you are a complete beginner try the pieces from the **Beginner Course** first._
[midi file](BoosterMusic/01-ClairDeLaLune.mid)
## 02-LavendersBlue
![score](BoosterMusic/02-LavendersBlue.svg)
**Lavender's Blue** is a simple tune in the right hand only that uses the first six notes of the scale of C Major. For the lowest five notes **C D E F** and **G** use all the fingers or your right hand - one for each note. (With your **thumb** on **C** and your **little finger** on **G**). Then for **A** just stretch your **little finger** to reach that note.
**Hint:** _To help find the notes ensure **Show Note Names** are turned on from **Setup Preferences** menu._
[midi file](BoosterMusic/02-LavendersBlue.mid)
## 03-SkipToMyLoo
![score](BoosterMusic/03-SkipToMyLoo.svg)
For **Skip To My Loo** start with both thumbs on **middle C** and then use one finger for each white note on the piano. So for the first two notes which are **E** you should use the **middle finger** of your right hand.
This piece introduces the use of **both hands** as the melody goes across **middle C**.
**Hint:** _For the notes in the **treble clef** you always use your **right hand** and for the **base clef** your **left hand**. Make sure you always keep using the correct finger for each note._
[midi file](BoosterMusic/03-SkipToMyLoo.mid)
## 04-FrereJacques
![score](BoosterMusic/04-FrereJacques.svg)
For **Frere Jacques** introduces the use of playing both hands together with a very simple left hand part. First practice the **left hand** and **right hand** parts separately. Then when ready reduce the **speed to 70%** and try **both hands** together. Again start with **both thumbs** on **Middle C**.
**Hint:** _Practice the **left hand** and **right hand** parts separately._
[midi file](BoosterMusic/04-FrereJacques.mid)
## 05-ScarboroughFair
![score](BoosterMusic/05-ScarboroughFair.svg)
**Scarborough Fair** spans a range of eight notes and so you will have to move fingers up the piano. Use the fingering that you feel comfortable with but ensure that you **use all your fingers** (of your right hand).
**Hint:** _Don't think about what fingers to use, just use the fingering that **comes naturally to you**._
[midi file](BoosterMusic/05-ScarboroughFair.mid)
## 06-Greensleeves
![score](BoosterMusic/06-Greensleeves.svg)
**Green Sleeves** introduces the key of **G major** which has **one Sharp - F#**. Normally the sharp symbol is not shown when **F#** is played (but turning on **Courtesy Accidentals** from the Piano Booster setup/preferences menu will show all accidentals in the key signature). The melody is in the right hand with a simple left hand part.
**Hint:** _You can show **Courtesy Accidentals** from the PianoBooster setup/preferences menu. But remember to **turn them off** when you get more skilled._
[midi file](BoosterMusic/06-Greensleeves.mid)
## 07-AmazingGrace
![score](BoosterMusic/07-AmazingGrace.svg)
**Amazing Grace** introduces the key of **F major** which has a **single Flat - Bb**. Again the flat symbol is not normally shown on the score when playing Bb. Practice both hands separately at first and then when ready reduce the speed to 70% when trying both hands for the first time.
**Hint:** _Reduce the speed to 70% when trying both hands for the first time._
[midi file](BoosterMusic/07-AmazingGrace.mid)
# Piano Booster Music
These pieces of music have been created to work with _PianoBooster_ and
are free from copyright or have the creative commons copyright.
All the music is available [here](https://github.com/captnfab/PianoBooster/raw/master/music/BoosterMusicBooks.zip).
_Please add to the music on this page - everyone can help._ For more information see this
[forum post](http://piano-booster.2625608.n2.nabble.com/Creating-music-for-PianoBooster-using-MMA-Everyone-can-help-td4167350.html).
The piano parts for were created using the [ABC Plus music](http://abcplus.sourceforge.net/) system,
and the accompaniment was created with the [Musical MIDI Accompaniment (MMA)](http://www.mellowood.ca/mma/).
# Beginners Piano Course
## Find middle C
Here it is. right in the middle.
## Start with your thumb on Middle C
Press it four times. wait for four beats then press it again.
## Next play E
Two white notes to the right of C is a note called E. Press it four times.
## Jump over F to get to G
Jump over F to get to G.
## The first five white notes
We will just play the first five notes. up an down. One note for each finger. (This is the start of the C major scale)
## The C cord
These three notes make a cord of C. Press all the notes together, use your thumb, middle finger and little finger to press all three notes at the same time. Any three note cord is called a triad??????.
## An Arpeggio for the C cord
When you play the notes in a cord one after the other it is called an arpeggio. Play the three notes one at a time, up and down.
## The scale of C Major
All the white notes up to the next c. There are eight notes in a scale. Play scale up and down.
## Our first tune
We are ready to play our first tune.
# Piano Booster Course
## 01-StartWithMiddleC
![score](BeginnerCourse/01-StartWithMiddleC.svg)
**Start With Middle C** is an extremely easy piece. Just find **middle C** on the piano and then play that note four times using your **thumb** on your **right hand**. The first half of the piece has **middle C** in the **Treble Clef**, then for the second half of the piece the same **middle C** note is shown the **Bass Clef**. Play this using your **thumb** on your **left hand**.
**Hint:** _Try to remember where **Middle C** is on the piano - this is the most **important note**!_
[midi file](BeginnerCourse/01-StartWithMiddleC.mid)
## 02-ChordOfCMajor
![score](BeginnerCourse/02-ChordOfCMajor.svg)
The **Chord of C Major** piece, introduces you to the chord of **C Major** which has three notes **Middle C**, **E** and **G**.
Use your **thumb** for **C**, your **middle finger** for **E** and your **little finger** for **G**.
**Hint:** _If you don't know the names of the notes on the score then turn on **Show Note Names** from the PianoBooster **Setup/Preferences** menu._
[midi file](BeginnerCourse/02-ChordOfCMajor.mid)
## 03-UpAndDown
![score](BeginnerCourse/03-UpAndDown.svg)
**Up And Down** uses all the fingers of your right hand to play the first five notes of the **scale of C major**.
Use your **thumb** for **C**, your **index finger** for **D**, . . . , all the way up to your **little finger** for **G**. Make sure you keep using the correct finger for each note.
**Hint:** _If you don't know the notes on the piano then **label the piano keys** using the PianoBooster **Note Chart**._
[midi file](BeginnerCourse/03-UpAndDown.mid)
## 04-ClairDeLaLune
![score](BeginnerCourse/04-ClairDeLaLune.svg)
This is a simplified version of **Clair De La Lune** that uses just three notes **C D** and **E** from your right hand. First find **middle C** and always use your **thumb** for this note, then for **D** use your **first finger** and for **E** use **middle finger**.
**Hint:** _Remember the fingering: Use your **thumb** for **middle C**, your **first finger** for **D** and **middle finger** for **E**._
[midi file](BeginnerCourse/04-ClairDeLaLune.mid)
## 05-ChordOfFMajor
![score](BeginnerCourse/05-ChordOfFMajor.svg)
Now we are going to play using your **left hand** the **F major chord**. The three notes of a chord are called a triad and this chord has the same shape as the C major chord we played earlier but played on a different part of the piano.
Use your **little finger** on the left hand for **F**, your **middle finger** for **A** and your **thumb** for **C**.
**Hint:** _If you don't know the names of the notes on the score then turn on **Show Note Names** from the PianoBooster **Setup/Preferences** menu._
[midi file](BeginnerCourse/05-ChordOfFMajor.mid)
## 06-DownAndUp
![score](BeginnerCourse/06-DownAndUp.svg)
**Down And Up** is mirror version of the Up And Down piece we played earlier but this version uses your **left hand**. These are the top five notes of the scale of C major. Again try to use all your fingers.
Use your **thumb** for **C**, your **index finger** for **B**, . . . , all the way down to your **little finger** for **F**.
**Hint:** _Make sure you use **every finger** on your **left hand** when playing this piece._
[midi file](BeginnerCourse/06-DownAndUp.mid)
## 01-ClairDeLaLune
![score](BoosterMusic/01-ClairDeLaLune.svg)
This is a simplified version of **Clair De La Lune** that uses only the three notes **C D** and **E** from your right hand. First find **middle C** and always use your **thumb** for this note, then for **D** use your **first finger** and for **E** use **middle finger**.
**Hint:** _If you are a complete beginner try the pieces from the **Beginner Course** first._
[midi file](BoosterMusic/01-ClairDeLaLune.mid)
## 02-LavendersBlue
![score](BoosterMusic/02-LavendersBlue.svg)
**Lavender's Blue** is a simple tune in the right hand only that uses the first six notes of the scale of C Major. For the lowest five notes **C D E F** and **G** use all the fingers or your right hand - one for each note. (With your **thumb** on **C** and your **little finger** on **G**). Then for **A** just stretch your **little finger** to reach that note.
**Hint:** _To help find the notes ensure **Show Note Names** are turned on from **Setup Preferences** menu._
[midi file](BoosterMusic/02-LavendersBlue.mid)
## 03-SkipToMyLoo
![score](BoosterMusic/03-SkipToMyLoo.svg)
For **Skip To My Loo** start with both thumbs on **middle C** and then use one finger for each white note on the piano. So for the first two notes which are **E** you should use the **middle finger** of your right hand.
This piece introduces the use of **both hands** as the melody goes across **middle C**.
**Hint:** _For the notes in the **treble clef** you always use your **right hand** and for the **base clef** your **left hand**. Make sure you always keep using the correct finger for each note._
[midi file](BoosterMusic/03-SkipToMyLoo.mid)
## 04-FrereJacques
![score](BoosterMusic/04-FrereJacques.svg)
For **Frere Jacques** introduces the use of playing both hands together with a very simple left hand part. First practice the **left hand** and **right hand** parts separately. Then when ready reduce the **speed to 70%** and try **both hands** together. Again start with **both thumbs** on **Middle C**.
**Hint:** _Practice the **left hand** and **right hand** parts separately._
[midi file](BoosterMusic/04-FrereJacques.mid)
## 05-ScarboroughFair
![score](BoosterMusic/05-ScarboroughFair.svg)
**Scarborough Fair** spans a range of eight notes and so you will have to move fingers up the piano. Use the fingering that you feel comfortable with but ensure that you **use all your fingers** (of your right hand).
**Hint:** _Don't think about what fingers to use, just use the fingering that **comes naturally to you**._
[midi file](BoosterMusic/05-ScarboroughFair.mid)
## 06-Greensleeves
![score](BoosterMusic/06-Greensleeves.svg)
**Green Sleeves** introduces the key of **G major** which has **one Sharp - F#**. Normally the sharp symbol is not shown when **F#** is played (but turning on **Courtesy Accidentals** from the Piano Booster setup/preferences menu will show all accidentals in the key signature). The melody is in the right hand with a simple left hand part.
**Hint:** _You can show **Courtesy Accidentals** from the PianoBooster setup/preferences menu. But remember to **turn them off** when you get more skilled._
[midi file](BoosterMusic/06-Greensleeves.mid)
## 07-AmazingGrace
![score](BoosterMusic/07-AmazingGrace.svg)
**Amazing Grace** introduces the key of **F major** which has a **single Flat - Bb**. Again the flat symbol is not normally shown on the score when playing Bb. Practice both hands separately at first and then when ready reduce the speed to 70% when trying both hands for the first time.
**Hint:** _Reduce the speed to 70% when trying both hands for the first time._
[midi file](BoosterMusic/07-AmazingGrace.mid)
All the music on this page is available [here](https://github.com/captnfab/PianoBooster/raw/master/music/BoosterMusicBooks.zip).
This free sheet music can be used for beginner piano lessons with _PianoBooster_.

View File

@ -128,7 +128,7 @@ Using 'fluidsynth': [wrapper script and desktop file](https://github.com/captnfa
While there are many possible choices General Midi sound generators for the Mac
(Timidity, FluidSynth or an external MIDI Synth), the easiest way is to use
SimpleSynth, which can be obtained for free (MIT license) frome [here](http://notahat.com/simplesynth)
SimpleSynth, which can be obtained for free (MIT license) frome [here](http://notahat.com/simplesynth).
This must be started before Pianobooster, and also allows to load custom Soundfonts.

View File

@ -17,7 +17,7 @@ Here it is. right in the middle.
## Start with your thumb on Middle C
Press it four times. wait for four beats then press it again
Press it four times. wait for four beats then press it again.
## Next play E
@ -25,7 +25,7 @@ Two white notes to the right of C is a note called E. Press it four times.
## Jump over F to get to G
Jump over F to get to G
Jump over F to get to G.
## The first five white notes

View File

@ -1,335 +1,335 @@
#CONFIG += USE_FLUIDSYNTH
CONFIG += release
#CONFIG += console
CONFIG += link_pkgconfig
# default
isEmpty(USE_FTGL): USE_FTGL="ON"
isEmpty(NO_DOCS): NO_DOCS="OFF"
isEmpty(WITH_MAN): WITH_MAN="OFF"
isEmpty(WITH_TIMIDITY): WITH_TIMIDITY="OFF"
isEmpty(WITH_FLUIDSYNTH): WITH_FLUIDSYNTH="OFF"
isEmpty(INSTALL_ALL_LANGS): INSTALL_ALL_LANGS="OFF"
TRANSLATIONS = translations/pianobooster_af.ts \
translations/pianobooster_am.ts \
translations/pianobooster_ar.ts \
translations/pianobooster_as.ts \
translations/pianobooster_ast.ts \
translations/pianobooster_az.ts \
translations/pianobooster_be.ts \
translations/pianobooster_bg.ts \
translations/pianobooster_blank.ts \
translations/pianobooster_bn.ts \
translations/pianobooster_br.ts \
translations/pianobooster_bs_BA.ts \
translations/pianobooster_bs.ts \
translations/pianobooster_ca.ts \
translations/pianobooster_crh.ts \
translations/pianobooster_csb.ts \
translations/pianobooster_cs.ts \
translations/pianobooster_cy.ts \
translations/pianobooster_da.ts \
translations/pianobooster_de.ts \
translations/pianobooster_dz.ts \
translations/pianobooster_el.ts \
translations/pianobooster_eo.ts \
translations/pianobooster_es.ts \
translations/pianobooster_et.ts \
translations/pianobooster_eu.ts \
translations/pianobooster_fa.ts \
translations/pianobooster_fi.ts \
translations/pianobooster_fo.ts \
translations/pianobooster_frp.ts \
translations/pianobooster_fr.ts \
translations/pianobooster_fur.ts \
translations/pianobooster_fy.ts \
translations/pianobooster_ga.ts \
translations/pianobooster_gd.ts \
translations/pianobooster_gl.ts \
translations/pianobooster_gu.ts \
translations/pianobooster_he.ts \
translations/pianobooster_hi.ts \
translations/pianobooster_hr.ts \
translations/pianobooster_hu.ts \
translations/pianobooster_hy.ts \
translations/pianobooster_id.ts \
translations/pianobooster_is.ts \
translations/pianobooster_it.ts \
translations/pianobooster_ja.ts \
translations/pianobooster_ka.ts \
translations/pianobooster_kk.ts \
translations/pianobooster_kn.ts \
translations/pianobooster_ko.ts \
translations/pianobooster_ks.ts \
translations/pianobooster_ku.ts \
translations/pianobooster_lt.ts \
translations/pianobooster_lv.ts \
translations/pianobooster_mai.ts \
translations/pianobooster_mg.ts \
translations/pianobooster_mi.ts \
translations/pianobooster_ml.ts \
translations/pianobooster_mn.ts \
translations/pianobooster_mr.ts \
translations/pianobooster_ms.ts \
translations/pianobooster_my.ts \
translations/pianobooster_nb.ts \
translations/pianobooster_nds.ts \
translations/pianobooster_ne.ts \
translations/pianobooster_nl.ts \
translations/pianobooster_nn.ts \
translations/pianobooster_oc.ts \
translations/pianobooster_or.ts \
translations/pianobooster_pa.ts \
translations/pianobooster_pl.ts \
translations/pianobooster_ps.ts \
translations/pianobooster_pt_BR.ts \
translations/pianobooster_pt.ts \
translations/pianobooster_ro.ts \
translations/pianobooster_ru.ts \
translations/pianobooster_se.ts \
translations/pianobooster_si.ts \
translations/pianobooster_sk.ts \
translations/pianobooster_sl.ts \
translations/pianobooster_sq.ts \
translations/pianobooster_sr@latin.ts \
translations/pianobooster_sr.ts \
translations/pianobooster_sv.ts \
translations/pianobooster_ta.ts \
translations/pianobooster_te.ts \
translations/pianobooster_tg.ts \
translations/pianobooster_th.ts \
translations/pianobooster_tr.ts \
translations/pianobooster_tt.ts \
translations/pianobooster_uk.ts \
translations/pianobooster_uz.ts \
translations/pianobooster_vi.ts \
translations/pianobooster_wa.ts \
translations/pianobooster_xh.ts \
translations/pianobooster_zh_HK.ts \
translations/pianobooster_zh.ts \
contains(INSTALL_ALL_LANGS, ON){
message(building with all languages)
TRANSLATIONS = $$files(translations/*.ts)
}
TRANSLATIONS ~= s/(translations.music_blank.ts)//d
TRANSLATIONS ~= s/(translations.pianobooster_blank.ts)//d
USE_FLUIDSYNTH {
# Note The FLUIDSYNTH_INPLACE_DIR dir is used mainly used when compiling on windows
# You normally do not need to set it
#FLUIDSYNTH_INPLACE_DIR = ../../fluidsynth-1.0.9
message(building using fluidsynth)
DEFINES += PB_USE_FLUIDSYNTH
}
CONFIG(debug, debug|release): DEFINES += IS_DEBUG
HEADERS = src/QtWindow.h \
src/GlView.h \
src/GuiTopBar.h \
src/GuiSidePanel.h \
src/GuiMidiSetupDialog.h \
src/GuiKeyboardSetupDialog.h \
src/GuiPreferencesDialog.h \
src/GuiSongDetailsDialog.h \
src/GuiLoopingPopup.h \
src/Settings.h \
src/Draw.h \
src/TrackList.h
FORMS = src/GuiTopBar.ui \
src/GuiSidePanel.ui \
src/GuiMidiSetupDialog.ui \
src/GuiKeyboardSetupDialog.ui \
src/GuiPreferencesDialog.ui \
src/GuiSongDetailsDialog.ui \
src/GuiLoopingPopup.ui
RESOURCES = src/application.qrc
SOURCES = src/QtMain.cpp \
src/QtWindow.cpp \
src/GuiTopBar.cpp \
src/GuiSidePanel.cpp \
src/GuiMidiSetupDialog.cpp \
src/GuiKeyboardSetupDialog.cpp \
src/GuiPreferencesDialog.cpp \
src/GuiSongDetailsDialog.cpp \
src/GuiLoopingPopup.cpp \
src/GlView.cpp \
src/MidiFile.cpp \
src/MidiTrack.cpp \
src/Song.cpp \
src/Conductor.cpp \
src/Util.cpp \
src/Chord.cpp \
src/Tempo.cpp \
src/MidiDevice.cpp \
src/MidiDeviceRt.cpp \
src/StavePosition.cpp \
src/Score.cpp \
src/Cfg.cpp \
src/Piano.cpp \
src/Draw.cpp \
src/Scroll.cpp \
src/Notation.cpp \
src/TrackList.cpp \
src/Rating.cpp \
src/Bar.cpp \
src/Settings.cpp \
src/Merge.cpp
contains(USE_SYSTEM_RTMIDI, ON){
message(building using system rtmidi)
PKGCONFIG += rtmidi
}else{
message(building using bundled rtmidi)
INCLUDEPATH += 3rdparty
SOURCES+= src/3rdparty/rtmidi/RtMidi.cpp
}
contains(USE_FTGL, ON){
message(building using ftgl)
PKGCONFIG += ftgl
}else{
message(building without ftgl)
DEFINES += NO_USE_FTGL
}
RC_FILE = src/pianobooster.rc
OBJECTS_DIR = tmp
win32 {
DEFINES += __WINDOWS_MM__ _WIN32
LIBS += libwinmm
}
unix {
DEFINES += __LINUX_ALSASEQ__
LIBS += -lasound -lpthread -lGL
}
USE_FLUIDSYNTH {
SOURCES += src/MidiDeviceFluidSynth.cpp
!isEmpty(FLUIDSYNTH_INPLACE_DIR) {
!exists( $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h ) {
error( "No $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h file found" )
}
message(fluidsynth FLUIDSYNTH_INPLACE_DIR = $${FLUIDSYNTH_INPLACE_DIR})
INCLUDEPATH += $${FLUIDSYNTH_INPLACE_DIR}/include/
win32:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a
unix:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.a
}
}
QT += xml opengl widgets
# enable the console window
#QT+=testlib
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
!win32 {
system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null)
}
win32 {
system($$[QT_INSTALL_BINS]\\lrelease.exe $${_PRO_FILE_})
}
unix {
isEmpty( PREFIX ) { PREFIX = /usr }
target.path = $$PREFIX/bin
contains(NO_DOCS, OFF){
message(building with docs)
docs.path = $$PREFIX/share/doc/pianobooster
docs.files = README.md ReleaseNotes.txt
INSTALLS += docs
}
contains(WITH_MAN, ON){
message(building with man)
man.path = $$PREFIX/share/man/man6/
man.files = pianobooster.6
INSTALLS += man
}
contains(WITH_TIMIDITY, ON){
message(building with timidity)
timidity.path = $$PREFIX/bin
timidity.files = tools/timidity/pianobooster-timidity
INSTALLS += timidity
timidity_desktop.path = $$PREFIX/share/applications
timidity_desktop.files = tools/timidity/pianobooster-timidity.desktop
INSTALLS += timidity_desktop
}
contains(WITH_FLUIDSYNTH, ON){
message(building with fluidsynth)
fluidsynth.path = $$PREFIX/bin
fluidsynth.files = tools/fluidsynth/pianobooster-fluidsynth
INSTALLS += fluidsynth
fluidsynth_desktop.path = $$PREFIX/share/applications
fluidsynth_desktop.files = tools/fluidsynth/pianobooster-fluidsynth.desktop
INSTALLS += fluidsynth_desktop
}
!contains(USE_SYSTEM_FONT, ON){
message(building using system font)
font.path = $$PREFIX/share/games/pianobooster/fonts
font.files = src/fonts/DejaVuSans.ttf
INSTALLS += font
}
!isEmpty(USE_FONT){
message(building with specified font)
myfont.path = $$PREFIX/share/games/pianobooster/fonts
myfont.files = $$USE_FONT
INSTALLS += myfont
DEFINES += USE_FONT=$$USE_FONT
}
updateqm.input = TRANSLATIONS
updateqm.output = translations/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm translations/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
data_langs.path = $$PREFIX/share/games/pianobooster/translations
data_langs.files = translations/*.qm translations/langs.json
INSTALLS += data_langs
desktop.path = $$PREFIX/share/applications
desktop.files = pianobooster.desktop
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon32.files = icons/hicolor/32x32/pianobooster.png
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
icon48.files = icons/hicolor/48x48/pianobooster.png
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
icon64.files = icons/hicolor/64x64/pianobooster.png
music.path = $$PREFIX/share/games/pianobooster/music
music.files = music/BoosterMusicBooks.zip
INSTALLS += target desktop icon32 icon48 icon64 music
}
#CONFIG += USE_FLUIDSYNTH
CONFIG += release
#CONFIG += console
CONFIG += link_pkgconfig
# default
isEmpty(USE_FTGL): USE_FTGL="ON"
isEmpty(NO_DOCS): NO_DOCS="OFF"
isEmpty(WITH_MAN): WITH_MAN="OFF"
isEmpty(WITH_TIMIDITY): WITH_TIMIDITY="OFF"
isEmpty(WITH_FLUIDSYNTH): WITH_FLUIDSYNTH="OFF"
isEmpty(INSTALL_ALL_LANGS): INSTALL_ALL_LANGS="OFF"
TRANSLATIONS = translations/pianobooster_af.ts \
translations/pianobooster_am.ts \
translations/pianobooster_ar.ts \
translations/pianobooster_as.ts \
translations/pianobooster_ast.ts \
translations/pianobooster_az.ts \
translations/pianobooster_be.ts \
translations/pianobooster_bg.ts \
translations/pianobooster_blank.ts \
translations/pianobooster_bn.ts \
translations/pianobooster_br.ts \
translations/pianobooster_bs_BA.ts \
translations/pianobooster_bs.ts \
translations/pianobooster_ca.ts \
translations/pianobooster_crh.ts \
translations/pianobooster_csb.ts \
translations/pianobooster_cs.ts \
translations/pianobooster_cy.ts \
translations/pianobooster_da.ts \
translations/pianobooster_de.ts \
translations/pianobooster_dz.ts \
translations/pianobooster_el.ts \
translations/pianobooster_eo.ts \
translations/pianobooster_es.ts \
translations/pianobooster_et.ts \
translations/pianobooster_eu.ts \
translations/pianobooster_fa.ts \
translations/pianobooster_fi.ts \
translations/pianobooster_fo.ts \
translations/pianobooster_frp.ts \
translations/pianobooster_fr.ts \
translations/pianobooster_fur.ts \
translations/pianobooster_fy.ts \
translations/pianobooster_ga.ts \
translations/pianobooster_gd.ts \
translations/pianobooster_gl.ts \
translations/pianobooster_gu.ts \
translations/pianobooster_he.ts \
translations/pianobooster_hi.ts \
translations/pianobooster_hr.ts \
translations/pianobooster_hu.ts \
translations/pianobooster_hy.ts \
translations/pianobooster_id.ts \
translations/pianobooster_is.ts \
translations/pianobooster_it.ts \
translations/pianobooster_ja.ts \
translations/pianobooster_ka.ts \
translations/pianobooster_kk.ts \
translations/pianobooster_kn.ts \
translations/pianobooster_ko.ts \
translations/pianobooster_ks.ts \
translations/pianobooster_ku.ts \
translations/pianobooster_lt.ts \
translations/pianobooster_lv.ts \
translations/pianobooster_mai.ts \
translations/pianobooster_mg.ts \
translations/pianobooster_mi.ts \
translations/pianobooster_ml.ts \
translations/pianobooster_mn.ts \
translations/pianobooster_mr.ts \
translations/pianobooster_ms.ts \
translations/pianobooster_my.ts \
translations/pianobooster_nb.ts \
translations/pianobooster_nds.ts \
translations/pianobooster_ne.ts \
translations/pianobooster_nl.ts \
translations/pianobooster_nn.ts \
translations/pianobooster_oc.ts \
translations/pianobooster_or.ts \
translations/pianobooster_pa.ts \
translations/pianobooster_pl.ts \
translations/pianobooster_ps.ts \
translations/pianobooster_pt_BR.ts \
translations/pianobooster_pt.ts \
translations/pianobooster_ro.ts \
translations/pianobooster_ru.ts \
translations/pianobooster_se.ts \
translations/pianobooster_si.ts \
translations/pianobooster_sk.ts \
translations/pianobooster_sl.ts \
translations/pianobooster_sq.ts \
translations/pianobooster_sr@latin.ts \
translations/pianobooster_sr.ts \
translations/pianobooster_sv.ts \
translations/pianobooster_ta.ts \
translations/pianobooster_te.ts \
translations/pianobooster_tg.ts \
translations/pianobooster_th.ts \
translations/pianobooster_tr.ts \
translations/pianobooster_tt.ts \
translations/pianobooster_uk.ts \
translations/pianobooster_uz.ts \
translations/pianobooster_vi.ts \
translations/pianobooster_wa.ts \
translations/pianobooster_xh.ts \
translations/pianobooster_zh_HK.ts \
translations/pianobooster_zh.ts
contains(INSTALL_ALL_LANGS, ON){
message(building with all languages)
TRANSLATIONS = $$files(translations/*.ts)
}
TRANSLATIONS ~= s/(translations.music_blank.ts)//d
TRANSLATIONS ~= s/(translations.pianobooster_blank.ts)//d
USE_FLUIDSYNTH {
# Note The FLUIDSYNTH_INPLACE_DIR dir is used mainly used when compiling on windows
# You normally do not need to set it
#FLUIDSYNTH_INPLACE_DIR = ../../fluidsynth-1.0.9
message(building using fluidsynth)
DEFINES += PB_USE_FLUIDSYNTH
}
CONFIG(debug, debug|release): DEFINES += IS_DEBUG
HEADERS = src/QtWindow.h \
src/GlView.h \
src/GuiTopBar.h \
src/GuiSidePanel.h \
src/GuiMidiSetupDialog.h \
src/GuiKeyboardSetupDialog.h \
src/GuiPreferencesDialog.h \
src/GuiSongDetailsDialog.h \
src/GuiLoopingPopup.h \
src/Settings.h \
src/Draw.h \
src/TrackList.h
FORMS = src/GuiTopBar.ui \
src/GuiSidePanel.ui \
src/GuiMidiSetupDialog.ui \
src/GuiKeyboardSetupDialog.ui \
src/GuiPreferencesDialog.ui \
src/GuiSongDetailsDialog.ui \
src/GuiLoopingPopup.ui
RESOURCES = src/application.qrc
SOURCES = src/QtMain.cpp \
src/QtWindow.cpp \
src/GuiTopBar.cpp \
src/GuiSidePanel.cpp \
src/GuiMidiSetupDialog.cpp \
src/GuiKeyboardSetupDialog.cpp \
src/GuiPreferencesDialog.cpp \
src/GuiSongDetailsDialog.cpp \
src/GuiLoopingPopup.cpp \
src/GlView.cpp \
src/MidiFile.cpp \
src/MidiTrack.cpp \
src/Song.cpp \
src/Conductor.cpp \
src/Util.cpp \
src/Chord.cpp \
src/Tempo.cpp \
src/MidiDevice.cpp \
src/MidiDeviceRt.cpp \
src/StavePosition.cpp \
src/Score.cpp \
src/Cfg.cpp \
src/Piano.cpp \
src/Draw.cpp \
src/Scroll.cpp \
src/Notation.cpp \
src/TrackList.cpp \
src/Rating.cpp \
src/Bar.cpp \
src/Settings.cpp \
src/Merge.cpp
contains(USE_SYSTEM_RTMIDI, ON){
message(building using system rtmidi)
PKGCONFIG += rtmidi
}else{
message(building using bundled rtmidi)
INCLUDEPATH += 3rdparty
SOURCES+= src/3rdparty/rtmidi/RtMidi.cpp
}
contains(USE_FTGL, ON){
message(building using ftgl)
PKGCONFIG += ftgl
}else{
message(building without ftgl)
DEFINES += NO_USE_FTGL
}
RC_FILE = src/pianobooster.rc
OBJECTS_DIR = tmp
win32 {
DEFINES += __WINDOWS_MM__ _WIN32
LIBS += libwinmm
}
unix {
DEFINES += __LINUX_ALSASEQ__
LIBS += -lasound -lpthread -lGL
}
USE_FLUIDSYNTH {
SOURCES += src/MidiDeviceFluidSynth.cpp
!isEmpty(FLUIDSYNTH_INPLACE_DIR) {
!exists( $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h ) {
error( "No $${FLUIDSYNTH_INPLACE_DIR}/include/fluidsynth.h file found" )
}
message(fluidsynth FLUIDSYNTH_INPLACE_DIR = $${FLUIDSYNTH_INPLACE_DIR})
INCLUDEPATH += $${FLUIDSYNTH_INPLACE_DIR}/include/
win32:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a
unix:LIBS += $${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.a
}
}
QT += xml opengl widgets
# enable the console window
#QT+=testlib
isEmpty(QMAKE_LRELEASE) {
win32|os2:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\lrelease.exe
else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
unix {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease-qt5 }
} else {
!exists($$QMAKE_LRELEASE) { QMAKE_LRELEASE = lrelease }
}
}
!win32 {
system($${QMAKE_LRELEASE} -silent $${_PRO_FILE_} 2> /dev/null)
}
win32 {
system($$[QT_INSTALL_BINS]\\lrelease.exe $${_PRO_FILE_})
}
unix {
isEmpty( PREFIX ) { PREFIX = /usr }
target.path = $$PREFIX/bin
contains(NO_DOCS, OFF){
message(building with docs)
docs.path = $$PREFIX/share/doc/pianobooster
docs.files = README.md ReleaseNotes.txt
INSTALLS += docs
}
contains(WITH_MAN, ON){
message(building with man)
man.path = $$PREFIX/share/man/man6/
man.files = pianobooster.6
INSTALLS += man
}
contains(WITH_TIMIDITY, ON){
message(building with timidity)
timidity.path = $$PREFIX/bin
timidity.files = tools/timidity/pianobooster-timidity
INSTALLS += timidity
timidity_desktop.path = $$PREFIX/share/applications
timidity_desktop.files = tools/timidity/pianobooster-timidity.desktop
INSTALLS += timidity_desktop
}
contains(WITH_FLUIDSYNTH, ON){
message(building with fluidsynth)
fluidsynth.path = $$PREFIX/bin
fluidsynth.files = tools/fluidsynth/pianobooster-fluidsynth
INSTALLS += fluidsynth
fluidsynth_desktop.path = $$PREFIX/share/applications
fluidsynth_desktop.files = tools/fluidsynth/pianobooster-fluidsynth.desktop
INSTALLS += fluidsynth_desktop
}
!contains(USE_SYSTEM_FONT, ON){
message(building using system font)
font.path = $$PREFIX/share/games/pianobooster/fonts
font.files = src/fonts/DejaVuSans.ttf
INSTALLS += font
}
!isEmpty(USE_FONT){
message(building with specified font)
myfont.path = $$PREFIX/share/games/pianobooster/fonts
myfont.files = $$USE_FONT
INSTALLS += myfont
DEFINES += USE_FONT=$$USE_FONT
}
updateqm.input = TRANSLATIONS
updateqm.output = translations/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$QMAKE_LRELEASE -silent ${QMAKE_FILE_IN} -qm translations/${QMAKE_FILE_BASE}.qm
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm
data_langs.path = $$PREFIX/share/games/pianobooster/translations
data_langs.files = translations/*.qm translations/langs.json
INSTALLS += data_langs
desktop.path = $$PREFIX/share/applications
desktop.files = pianobooster.desktop
icon32.path = $$PREFIX/share/icons/hicolor/32x32/apps
icon32.files = icons/hicolor/32x32/pianobooster.png
icon48.path = $$PREFIX/share/icons/hicolor/48x48/apps
icon48.files = icons/hicolor/48x48/pianobooster.png
icon64.path = $$PREFIX/share/icons/hicolor/64x64/apps
icon64.files = icons/hicolor/64x64/pianobooster.png
music.path = $$PREFIX/share/games/pianobooster/music
music.files = music/BoosterMusicBooks.zip
INSTALLS += target desktop icon32 icon48 icon64 music
}

View File

@ -1,279 +1,258 @@
# Cmake File for Piano Booster
# for the debug build type cmake -DCMAKE_BUILD_TYPE=Debug
SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_VERBOSE_MAKEFILE OFF)
option(USE_FTGL "build with ftgl" ON)
#SET(USE_FLUIDSYNTH OFF)
#SET(OpenGL_GL_PREFERENCE GLVND)
#
# The inplace directory is mainly for windows builds
# SET(FLUIDSYNTH_INPLACE_DIR C:/download/misc/ljb/fluidsynth-1.0.9)
# SET(FLUIDSYNTH_INPLACE_DIR /home/louis/build/fluidsynth-1.0.9)
cmake_minimum_required(VERSION 2.4)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
IF(WIN32)
MESSAGE("GUI system is WIN32 ${CMAKE_GENERATOR}")
SET(CMAKE_COLOR_MAKEFILE OFF)
ENDIF(WIN32)
# set project's name
PROJECT( pianobooster )
# enable warnings
add_compile_options(-Wall)
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
ADD_DEFINITIONS(-DIS_DEBUG)
endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
if(USE_FONT)
add_compile_options("-DUSE_FONT=\"${USE_FONT}\"")
endif(USE_FONT)
FIND_PACKAGE( OpenGL REQUIRED )
include(FindPkgConfig)
FIND_PACKAGE( PkgConfig REQUIRED )
if(USE_FTGL)
pkg_check_modules(FTGL ftgl)
SET(FTGL_INCLUDE_DIR ${FTGL_INCLUDE_DIRS})
SET(FTGL_LIBRARY ${FTGL_LIBRARIES})
else(USE_FTGL)
add_compile_options("-DNO_USE_FTGL")
endif(USE_FTGL)
# Finds Qt5 libraries
FIND_PACKAGE( Qt5 REQUIRED COMPONENTS Core Gui Widgets LinguistTools OpenGL Xml )
#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
add_compile_options(-fPIC)
# Add in the link libraries for each operating system
IF(${CMAKE_SYSTEM} MATCHES "Linux")
#FIND_PACKAGE(PkgConfig REQUIRED)
#PKG_CHECK_MODULES(ALSA REQUIRED alsa>=1.0)
#IF(ALSA_FOUND)
ADD_DEFINITIONS(-D__LINUX_ALSASEQ__)
LINK_LIBRARIES (asound)
LINK_LIBRARIES (pthread)
LINK_LIBRARIES (GL)
#ELSE(ALSA_FOUND)
# MESSAGE(FATAL_ERROR "Please install the 'libasound2-dev' package and then try again")
#ENDIF(ALSA_FOUND)
ENDIF(${CMAKE_SYSTEM} MATCHES "Linux")
IF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
LINK_LIBRARIES (GL)
ENDIF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM} MATCHES "Windows")
# FIND_PACKAGE(WINDRES REQUIRED)
ADD_DEFINITIONS(-D__WINDOWS_MM__ -D_WIN32)
LINK_LIBRARIES(winmm opengl32)
ENDIF(${CMAKE_SYSTEM} MATCHES "Windows")
IF(${CMAKE_SYSTEM} MATCHES "Darwin")
ADD_DEFINITIONS(-D__MACOSX_CORE__)
LINK_LIBRARIES("-framework CoreMidi -framework CoreAudio -framework CoreFoundation -framework OpenGL")
ENDIF(${CMAKE_SYSTEM} MATCHES "Darwin")
IF(USE_FLUIDSYNTH)
ADD_DEFINITIONS(-DPB_USE_FLUIDSYNTH)
MESSAGE("Building using fluidsynth")
SET( PB_BASE_SRCS MidiDeviceFluidSynth.cpp )
IF(FLUIDSYNTH_INPLACE_DIR)
INCLUDE_DIRECTORIES(${FLUIDSYNTH_INPLACE_DIR}/include/)
IF(WIN32)
LINK_LIBRARIES( ${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a)
ENDIF(WIN32)
IF(UNIX)
LINK_LIBRARIES(${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.so)
ENDIF(UNIX)
ELSE(FLUIDSYNTH_INPLACE_DIR)
LINK_LIBRARIES( fluidsynth)
ENDIF(FLUIDSYNTH_INPLACE_DIR)
ENDIF(USE_FLUIDSYNTH)
# we need this to be able to include headers produced by uic in our code
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${OPENGL_INCLUDE_DIR} ${FTGL_INCLUDE_DIR} ${RTMIDI_INCLUDE_DIR})
SET(PB_BASE_SRCS MidiFile.cpp MidiTrack.cpp Song.cpp Conductor.cpp Util.cpp
Chord.cpp Tempo.cpp MidiDevice.cpp MidiDeviceRt.cpp ${PB_BASE_SRCS})
SET(PB_BASE_HDR MidiFile.h MidiTrack.h Song.h Conductor.h Rating.h Util.h
Chord.h Tempo.h MidiDevice.h)
# Check for Jack
find_library(JACK_LIB jack)
pkg_check_modules(JACK jack)
SET(JACK_INCLUDE_DIR ${JACK_INCLUDE_DIRS})
SET(JACK_LIBRARY ${JACK_LIBRARIES})
IF (JACK_FOUND)
ADD_DEFINITIONS(-D__UNIX_JACK__)
ENDIF(JACK_FOUND)
IF (USE_SYSTEM_RTMIDI)
add_compile_options("-DUSE_SYSTEM_RTMIDI")
pkg_check_modules(RTMIDI rtmidi)
SET(RTMIDI_INCLUDE_DIR ${RTMIDI_INCLUDE_DIRS})
SET(RTMIDI_LIBRARY ${RTMIDI_LIBRARIES})
ELSE(USE_SYSTEM_RTMIDI)
INCLUDE_DIRECTORIES("3rdparty")
SET (PB_BASE_SRCS ${PB_BASE_SRCS} 3rdparty/rtmidi/RtMidi.cpp)
SET (PB_BASE_HDR ${PB_BASE_HDR} 3rdparty/rtmidi/RtMidi.h)
ENDIF(USE_SYSTEM_RTMIDI)
# with SET() command you can change variables or define new ones
# here we define PIANOBOOSTER_SRCS variable that contains a list of all .cpp files
# note that we don't need \ at the end of line
SET( PIANOBOOSTER_SRCS
QtMain.cpp
QtWindow.cpp
GuiTopBar.cpp
GuiSidePanel.cpp
GuiMidiSetupDialog.cpp
GuiKeyboardSetupDialog.cpp
GuiPreferencesDialog.cpp
GuiSongDetailsDialog.cpp
GuiLoopingPopup.cpp
GlView.cpp
${PB_BASE_SRCS}
StavePosition.cpp
Score.cpp
Cfg.cpp
Piano.cpp
Draw.cpp
Scroll.cpp
Notation.cpp
TrackList.cpp
Rating.cpp
Bar.cpp
Settings.cpp
Merge.cpp
pianobooster.rc
images/pianobooster.ico
)
# another list, this time it includes all header files that should be treated with moc
SET( PIANOBOOSTER_MOC_HDRS
QtWindow.h
GlView.h
GuiTopBar.h
GuiSidePanel.h
GuiMidiSetupDialog.h
GuiKeyboardSetupDialog.h
GuiPreferencesDialog.h
GuiSongDetailsDialog.h
GuiLoopingPopup.h
)
# some .ui files
SET( PIANOBOOSTER_UIS
./GuiTopBar.ui
./GuiSidePanel.ui
./GuiMidiSetupDialog.ui
./GuiKeyboardSetupDialog.ui
./GuiPreferencesDialog.ui
./GuiSongDetailsDialog.ui
./GuiLoopingPopup.ui
)
# and finally an resource file
SET( PIANOBOOSTER_RCS
./application.qrc
)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# here we instruct CMake to build "pianobooster" executable from all of the source files
IF(APPLE)
ADD_EXECUTABLE( pianobooster MACOSX_BUNDLE ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
ENDIF(APPLE)
IF(UNIX)
ADD_EXECUTABLE( pianobooster ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
ENDIF(UNIX)
IF(WIN32)
ADD_EXECUTABLE( pianobooster WIN32 ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
SET_TARGET_PROPERTIES(pianobooster PROPERTIES LINK_FLAGS "-mwindows")
ENDIF(WIN32)
qt5_use_modules(pianobooster Core Gui Widgets LinguistTools OpenGL Xml)
target_link_libraries (pianobooster Qt5::Widgets Qt5::Xml Qt5::OpenGL ${FTGL_LIBRARY} ${RTMIDI_LIBRARY} ${JACK_LIBRARY})
INSTALL( FILES ../pianobooster.desktop DESTINATION share/applications )
INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin)
#INSTALL( index.docbook INSTALL_DESTINATION ${HTML_INSTALL_DIR}/en SUBDIR kmidimon )
if(NOT NO_DOCS)
INSTALL( FILES ../README.md DESTINATION share/doc/pianobooster/ )
INSTALL( FILES ../ReleaseNotes.txt DESTINATION share/doc/pianobooster/ )
endif()
if(WITH_MAN)
INSTALL( FILES ../pianobooster.6 DESTINATION share/man/man6/ )
endif()
if(WITH_TIMIDITY)
INSTALL( FILES ../tools/timidity/pianobooster-timidity PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION bin )
INSTALL( FILES ../tools/timidity/pianobooster-timidity.desktop DESTINATION share/applications )
endif()
if(WITH_FLUIDSYNTH)
INSTALL( FILES ../tools/fluidsynth/pianobooster-fluidsynth PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION bin )
INSTALL( FILES ../tools/fluidsynth/pianobooster-fluidsynth.desktop DESTINATION share/applications )
endif()
INSTALL ( FILES ../icons/hicolor/32x32/pianobooster.png DESTINATION share/icons/hicolor/32x32/apps )
INSTALL ( FILES ../icons/hicolor/48x48/pianobooster.png DESTINATION share/icons/hicolor/48x48/apps )
INSTALL ( FILES ../icons/hicolor/64x64/pianobooster.png DESTINATION share/icons/hicolor/64x64/apps )
IF (UNIX AND NOT APPLE)
INSTALL ( FILES ../music/BoosterMusicBooks.zip DESTINATION share/games/pianobooster/music )
ENDIF (UNIX AND NOT APPLE)
IF (WIN32)
INSTALL( FILES ../music/BoosterMusicBooks.zip DESTINATION . )
ENDIF (WIN32)
if(USE_FONT)
INSTALL ( FILES ${USE_FONT} DESTINATION share/games/pianobooster/fonts)
endif()
if(NOT USE_SYSTEM_FONT)
INSTALL ( FILES fonts/DejaVuSans.ttf DESTINATION share/games/pianobooster/fonts)
endif()
#INSTALL( FILES "${CMAKE_CURRENT_BINARY_DIR}/translations/*.qm DESTINATION share/pianobooster/translations/ )
ADD_SUBDIRECTORY(../translations ../build/translations)
# Cmake File for Piano Booster
# for the debug build type cmake -DCMAKE_BUILD_TYPE=Debug
SET(CMAKE_BUILD_TYPE Release)
SET(CMAKE_VERBOSE_MAKEFILE OFF)
option(USE_FTGL "build with ftgl" ON)
#SET(USE_FLUIDSYNTH OFF)
#SET(OpenGL_GL_PREFERENCE GLVND)
#
# The inplace directory is mainly for windows builds
# SET(FLUIDSYNTH_INPLACE_DIR C:/download/misc/ljb/fluidsynth-1.0.9)
# SET(FLUIDSYNTH_INPLACE_DIR /home/louis/build/fluidsynth-1.0.9)
cmake_minimum_required(VERSION 2.4)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)
IF(WIN32)
MESSAGE("GUI system is WIN32 ${CMAKE_GENERATOR}")
SET(CMAKE_COLOR_MAKEFILE OFF)
ENDIF(WIN32)
# set project's name
PROJECT( pianobooster )
# enable warnings
add_compile_options(-Wall)
if (${CMAKE_BUILD_TYPE} MATCHES "Debug")
ADD_DEFINITIONS(-DIS_DEBUG)
endif (${CMAKE_BUILD_TYPE} MATCHES "Debug")
if(USE_FONT)
add_compile_options("-DUSE_FONT=\"${USE_FONT}\"")
endif(USE_FONT)
FIND_PACKAGE( OpenGL REQUIRED )
include(FindPkgConfig)
FIND_PACKAGE( PkgConfig REQUIRED )
if(USE_FTGL)
pkg_check_modules(FTGL ftgl)
SET(FTGL_INCLUDE_DIR ${FTGL_INCLUDE_DIRS})
SET(FTGL_LIBRARY ${FTGL_LIBRARIES})
else(USE_FTGL)
add_compile_options("-DNO_USE_FTGL")
endif(USE_FTGL)
# Finds Qt5 libraries
FIND_PACKAGE( Qt5 REQUIRED COMPONENTS Core Gui Widgets LinguistTools OpenGL Xml )
add_compile_options(-fPIC)
# Add in the link libraries for each operating system
IF(${CMAKE_SYSTEM} MATCHES "Linux")
ADD_DEFINITIONS(-D__LINUX_ALSASEQ__)
LINK_LIBRARIES (asound)
LINK_LIBRARIES (pthread)
LINK_LIBRARIES (GL)
ENDIF(${CMAKE_SYSTEM} MATCHES "Linux")
IF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
LINK_LIBRARIES (GL)
ENDIF(${CMAKE_SYSTEM} MATCHES "FreeBSD")
IF(${CMAKE_SYSTEM} MATCHES "Windows")
ADD_DEFINITIONS(-D__WINDOWS_MM__ -D_WIN32)
LINK_LIBRARIES(winmm opengl32)
ENDIF(${CMAKE_SYSTEM} MATCHES "Windows")
IF(${CMAKE_SYSTEM} MATCHES "Darwin")
ADD_DEFINITIONS(-D__MACOSX_CORE__)
LINK_LIBRARIES("-framework CoreMidi -framework CoreAudio -framework CoreFoundation -framework OpenGL")
ENDIF(${CMAKE_SYSTEM} MATCHES "Darwin")
IF(USE_FLUIDSYNTH)
ADD_DEFINITIONS(-DPB_USE_FLUIDSYNTH)
MESSAGE("Building using fluidsynth")
SET( PB_BASE_SRCS MidiDeviceFluidSynth.cpp )
IF(FLUIDSYNTH_INPLACE_DIR)
INCLUDE_DIRECTORIES(${FLUIDSYNTH_INPLACE_DIR}/include/)
IF(WIN32)
LINK_LIBRARIES( ${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.dll.a)
ENDIF(WIN32)
IF(UNIX)
LINK_LIBRARIES(${FLUIDSYNTH_INPLACE_DIR}/src/.libs/libfluidsynth.so)
ENDIF(UNIX)
ELSE(FLUIDSYNTH_INPLACE_DIR)
LINK_LIBRARIES( fluidsynth)
ENDIF(FLUIDSYNTH_INPLACE_DIR)
ENDIF(USE_FLUIDSYNTH)
# we need this to be able to include headers produced by uic in our code
# (CMAKE_BINARY_DIR holds a path to the build directory, while INCLUDE_DIRECTORIES() works just like INCLUDEPATH from qmake)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${OPENGL_INCLUDE_DIR} ${FTGL_INCLUDE_DIR} ${RTMIDI_INCLUDE_DIR})
SET(PB_BASE_SRCS MidiFile.cpp MidiTrack.cpp Song.cpp Conductor.cpp Util.cpp
Chord.cpp Tempo.cpp MidiDevice.cpp MidiDeviceRt.cpp ${PB_BASE_SRCS})
SET(PB_BASE_HDR MidiFile.h MidiTrack.h Song.h Conductor.h Rating.h Util.h
Chord.h Tempo.h MidiDevice.h)
# Check for Jack
find_library(JACK_LIB jack)
pkg_check_modules(JACK jack)
SET(JACK_INCLUDE_DIR ${JACK_INCLUDE_DIRS})
SET(JACK_LIBRARY ${JACK_LIBRARIES})
IF (JACK_FOUND)
ADD_DEFINITIONS(-D__UNIX_JACK__)
ENDIF(JACK_FOUND)
IF (USE_SYSTEM_RTMIDI)
add_compile_options("-DUSE_SYSTEM_RTMIDI")
pkg_check_modules(RTMIDI rtmidi)
SET(RTMIDI_INCLUDE_DIR ${RTMIDI_INCLUDE_DIRS})
SET(RTMIDI_LIBRARY ${RTMIDI_LIBRARIES})
ELSE(USE_SYSTEM_RTMIDI)
INCLUDE_DIRECTORIES("3rdparty")
SET (PB_BASE_SRCS ${PB_BASE_SRCS} 3rdparty/rtmidi/RtMidi.cpp)
SET (PB_BASE_HDR ${PB_BASE_HDR} 3rdparty/rtmidi/RtMidi.h)
ENDIF(USE_SYSTEM_RTMIDI)
# with SET() command you can change variables or define new ones
# here we define PIANOBOOSTER_SRCS variable that contains a list of all .cpp files
# note that we don't need \ at the end of line
SET( PIANOBOOSTER_SRCS
QtMain.cpp
QtWindow.cpp
GuiTopBar.cpp
GuiSidePanel.cpp
GuiMidiSetupDialog.cpp
GuiKeyboardSetupDialog.cpp
GuiPreferencesDialog.cpp
GuiSongDetailsDialog.cpp
GuiLoopingPopup.cpp
GlView.cpp
${PB_BASE_SRCS}
StavePosition.cpp
Score.cpp
Cfg.cpp
Piano.cpp
Draw.cpp
Scroll.cpp
Notation.cpp
TrackList.cpp
Rating.cpp
Bar.cpp
Settings.cpp
Merge.cpp
pianobooster.rc
images/pianobooster.ico
)
# another list, this time it includes all header files that should be treated with moc
SET( PIANOBOOSTER_MOC_HDRS
QtWindow.h
GlView.h
GuiTopBar.h
GuiSidePanel.h
GuiMidiSetupDialog.h
GuiKeyboardSetupDialog.h
GuiPreferencesDialog.h
GuiSongDetailsDialog.h
GuiLoopingPopup.h
)
# some .ui files
SET( PIANOBOOSTER_UIS
./GuiTopBar.ui
./GuiSidePanel.ui
./GuiMidiSetupDialog.ui
./GuiKeyboardSetupDialog.ui
./GuiPreferencesDialog.ui
./GuiSongDetailsDialog.ui
./GuiLoopingPopup.ui
)
# and finally an resource file
SET( PIANOBOOSTER_RCS
./application.qrc
)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# here we instruct CMake to build "pianobooster" executable from all of the source files
IF(APPLE)
ADD_EXECUTABLE( pianobooster MACOSX_BUNDLE ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
ENDIF(APPLE)
IF(UNIX)
ADD_EXECUTABLE( pianobooster ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
ENDIF(UNIX)
IF(WIN32)
ADD_EXECUTABLE( pianobooster WIN32 ${PIANOBOOSTER_SRCS}
${PIANOBOOSTER_MOC_SRCS} ${PIANOBOOSTER_RC_SRCS}
${PIANOBOOSTER_UI_HDRS} ${PIANOBOOSTER_RCS} )
SET_TARGET_PROPERTIES(pianobooster PROPERTIES LINK_FLAGS "-mwindows")
ENDIF(WIN32)
qt5_use_modules(pianobooster Core Gui Widgets LinguistTools OpenGL Xml)
target_link_libraries (pianobooster Qt5::Widgets Qt5::Xml Qt5::OpenGL ${FTGL_LIBRARY} ${RTMIDI_LIBRARY} ${JACK_LIBRARY})
INSTALL( FILES ../pianobooster.desktop DESTINATION share/applications )
INSTALL(TARGETS pianobooster RUNTIME DESTINATION bin)
if(NOT NO_DOCS)
INSTALL( FILES ../README.md DESTINATION share/doc/pianobooster/ )
INSTALL( FILES ../ReleaseNotes.txt DESTINATION share/doc/pianobooster/ )
endif()
if(WITH_MAN)
INSTALL( FILES ../pianobooster.6 DESTINATION share/man/man6/ )
endif()
if(WITH_TIMIDITY)
INSTALL( FILES ../tools/timidity/pianobooster-timidity PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION bin )
INSTALL( FILES ../tools/timidity/pianobooster-timidity.desktop DESTINATION share/applications )
endif()
if(WITH_FLUIDSYNTH)
INSTALL( FILES ../tools/fluidsynth/pianobooster-fluidsynth PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ DESTINATION bin )
INSTALL( FILES ../tools/fluidsynth/pianobooster-fluidsynth.desktop DESTINATION share/applications )
endif()
INSTALL ( FILES ../icons/hicolor/32x32/pianobooster.png DESTINATION share/icons/hicolor/32x32/apps )
INSTALL ( FILES ../icons/hicolor/48x48/pianobooster.png DESTINATION share/icons/hicolor/48x48/apps )
INSTALL ( FILES ../icons/hicolor/64x64/pianobooster.png DESTINATION share/icons/hicolor/64x64/apps )
IF (UNIX AND NOT APPLE)
INSTALL ( FILES ../music/BoosterMusicBooks.zip DESTINATION share/games/pianobooster/music )
ENDIF (UNIX AND NOT APPLE)
IF (WIN32)
INSTALL( FILES ../music/BoosterMusicBooks.zip DESTINATION . )
ENDIF (WIN32)
if(USE_FONT)
INSTALL ( FILES ${USE_FONT} DESTINATION share/games/pianobooster/fonts)
endif()
if(NOT USE_SYSTEM_FONT)
INSTALL ( FILES fonts/DejaVuSans.ttf DESTINATION share/games/pianobooster/fonts)
endif()
ADD_SUBDIRECTORY(../translations ../build/translations)

View File

@ -42,4 +42,3 @@ IF (WIN32)
INSTALL( FILES ${QM_FILES} DESTINATION . )
INSTALL( FILES langs.json DESTINATION . )
ENDIF (WIN32)