Build Instructions

You should be able to downalod pre-built binaries for few platforms from the Downloads page. However, if a pre-built binary does not exist for your platform or if you would like to build your own version directly from the source code, then you will find below information useful.

CarMusTy source code is avialable on SVN at:

  1. Downloading Source:

    You have two options here:
    • Use SVN Client
    • On Windows systems, I suggest using Tortoise SVN client. On Linux based systems you should be able to use something like KdeSVN or RapidSVN.

    • Browse the SVN source online and download the tar-ball from:

      If you do not know what SVN is or do not care about the using the SVN clients, then this second option is better choice for you.

  2. Setting up the Dependencies:

    Before building the CarMusTy source, you need to setup the required dependencies for the bulid. CarMusTy depends on these below packages (libraries) for the build to succeed:
    • For Unix/Linux variants:
      • libpoppler-qt4-dev (automaticallys installs libqt4-dev)
      • libtse3-dev
      • texlive-xetex
      • texlive-latex-recommended
      • libasound2-dev

      Typically you should be able to get them with Synaptic package manager or with apt-get commands, such as: sudo apt-get install texlive-xetex

      Also, the below dependencies will help you get the MIDI working correctly.

      • qjackctl
      • qsynth
      • fluidsynth, fluid-soundfont-gm
      • vmpk
      • timidity, timidity-deamon

      qjackctl lets you start the jackd server, while the vmpk is a virtual piano keyboard that lets you connect virtual MIDI input and output ports. Enable MIDI-through on the vmpk midi-output port and have it listen on Midi Through input port. Start qsynth and select Fluid Synth as the vmpk midi-output connection. Also you might want to get some sound-fonts such as Unison.sf2 for a variety in sound.

      Use qSynth to configure the sound fonts from the fluid-synth. Follow the below steps, if you have trouble. In the qsynth setup,

      • In the Audio tab, Select alsa as the audio driver
      • In the Sound Fonts tab, Click on Open and load the FluidR3_GM.sf2 file you find in the /usr/share/sounds/sf2/ directory

      Restart qSynth. In the vmpk, under Edit | connections menu

      • Check Enable Midi Thru on MIDI Output
      • Select Midi Through:0 for the input
      • Select Fluid Synth for the output

      Now, when you press any key on the VMPK, you should be able to hear sound and also see the qSynth green light going on and off. In case of no sound yet, run qjackctl once, start it and stop it and then exit it. This may help refresh the drivers. After quitting the qjackctl, your vmpk may start making sounds. Also, in the vmpk, if you find timidity ports in the output selection, you can choose timidity:0 port (instead of fluid synth) as another option.

    • For Windows variants:
      • Qt4: You should be able to get it from

        Tip: If you are trying to build Qt from source for Visual Studio, then you might find the article: building Qt with Visual Studio useful.

      • MikTex: Get it from

        Extract it to bin directory in the CarMusTy source folder.

        For example, if you have source code at C:\CarMusTy, then this path should become valid: C:\CarMusTy\bin\Miktex\miktex\bin\xelatex.exe

      • Get the below Run-time files from:
        • cairo
        • libpng
        • Freetype

        You should extract them to the /src/3rdParty/Winx86 (for 32 bit machines) or to /src/3rdParty/Winx64 (for 64-bit). For example, if you have source code at C:\CarMusTy, then the below paths should become valid:

             C:\CarMusTy\src\3rdparty\Winx86\bin       or        C:\CarMusTy\src\3rdparty\Winx64\bin
             C:\CarMusTy\src\3rdparty\Winx86\lib          or        C:\CarMusTy\src\3rdparty\Winx64\lib
             C:\CarMusTy\src\3rdparty\Winx86\include     or        C:\CarMusTy\src\3rdparty\Winx64\include

  3. Building the Source:

    CarMusTy uses CMake build system for platform-compatibility. So your first step would be to get CMake ready.
    1. Get CMake from for your platform and set it up on your system. If you have done it correctly, then issuing the command cmake on your command prompt (terminal) should give some response (and should not say "command not found" or "unknown command").
    2. Go to the location where you have the CarMusTy source and create a new directory named build.

      For example, if you have CarMusTy source code at C:\CarMusTy\, then you should have the CMake file (downloaded from SVN aleady) at C:\CarMusTy\CMakeLists.txt and your newly created directory at: C:\CarMusTy\build.

    3. On Linux variants, the build is simple:
      • Just go to your newly created build directory with cd and from within the build directory issue the command: cmake .. -G "Unix Makefiles"
      • Once CMake completes successfully, issue the command: make and you are done. Your built executable should at the bin location in your source directory.
      • You should be able to execute the newly built executable with the command: ../bin/CarMusTy from within your build directory
    4. On Windows variants, you can use cmake-gui to configure your options.
      • Open Visual Studio Command-prompt (not the regular command prompt). You should be able to find this option from the "Visual Studio Tools" in the Start menu. The Visual Studio command prompt sets up all the required VC++ paths correctly (unlike the regular command prompt).
      • Similarily, if you want to use MingW compiler, then you should open the MinGW command prompt.
      • From the command prompt, issue the command: cmake-gui
      • CMake-gui has two text-box entries. Enter the source code path in the first text box. This should be the directory where you have the CMakeLists.txt file.

        For example, if you have C:\CarMusTy\CMakeLists.txt then you should enter just C:\CarMusTy.

      • In the second text box, enter the path of your newly created build directory. For example, C:\CarMusTy\build\
      • Then click Configure button. You will be prompted to select the compiler. Select the appropriate version (Visual Studio or MingW, which ever the case).
      • You might see some entries marked Red after configuration. Click Configure few more times till all entries in red are gone.
      • When ready, click Generate
      • After generation completes, you will have your Visual Studio solution file (or MingW Make files) in your build directory. Go to that directory and open your CarMusTy.sln file (or issue make for MinGW).
      • After building the CarMusTy exe, if it fails to run - make sure you have copied all the third party dlls (from your \src\3rdparty\Winx86\bin location) to the executable location