Building

First, download the source code from the sourceforge downloads area or from SVN.
Aria is written in C++.

Dependencies :
Build system :
  • scons (included in the Aria source tree so you don't need to get it separately)
  • Under the OSX subdirectory, a Xcode project is available; not that you will need to run ./configure.sh first in the same directory to generate the appropriate files (note that the scons build system does work on OSX so you do not need to use Xcode if you're on mac)
  • You can also build with your favorite IDE/build system, but you'll then need to set up things yourself.


    Prerequisites - Mac OS X

    You will need to install Developer Tools from the mac OS X install disc. You need OS X 10.4.

    Installing wxWidgets : First, download and install wxWidgets. I usually build static. Don't forget to enable OpenGL support if you use wxWidgets 2.8.

    Starting from Aria 1.2, I use wxOSX 2.9.x trunk. wxWidgets 2.8 will still work but it has a couple printing-related bugs. Because wx 2.9 still has a couple bugs, patches have been included in the /OSX directory - apply them to wxWidgets before building it for better results.

    Example terminal commands to build wx (read the instructions that come with wxWidgets or wxWiki for more info):

    cd wxMac2.x.x
    mkdir osx-build && cd osx-build
    ../configure --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin
         --with-zlib=builtin --with-expat=builtin --with-opengl --enable-unicode --disable-shared
    make
    sudo make install
    Make sure wx-config --libs points to the 2.8 libs when run from a terminal. Mac OS X 10.4 comes with wxWidgets 2.5 pre-installed. It is not recommended to build Aria with it. If you install wxWidgets 2.8 from source, it will default to installing in /usr/local, however pre-installed 2.5 is in /usr, so be careful about conflicts. If /usr comes before /usr/local in yout PATH environment variable, you will get the 2.5 libs. For getting 2.5 out of the way quickly, just get /usr/bin/wx-config out of the way (sudo mv /usr/bin/wx-config /usr/bin/wx-config-2.5). If your computer does not find wx-config, make sure /usr/local/bin is in your PATH (or pass WXCONFIG=/usr/local/bin/wx-config to scons - see explainations below).


    Prerequisites - Linux

    The Linux version has been tested less than the mac one but appears to be getting more stable. At this point, you might want to build it to help me test it - it might also be stable enough for production but no promise :) Midi on Linux is especially painful, synthesizers like TiMidity haven't been maintained for years, eat a lot of CPU and don't play nicely with PulseAudio. In the future I will consider alternative implementations.

    You will need Python, Alsa (including -dev packages if your distro uses them), wxGTK (wxWidgets), OpenGL (if you wish to use the OpenGL renderer, and also get -dev packages if any), gcc/g++ (build-essential in Ubuntu). For midi playback, you will need a softsynth like Timidity with a soundbank (more info below)

    Installing wxWidgets : You can simply download wxWidgets 2.8 from your distribution's repositories. It needs OpenGL support enabled if you want to use the OpenGL renderer, and should be Unicode. Don't forget to install -dev packages if your distribution uses them.

    If you want to build wxWidgets from source, you can use commands like (read the instructions that come with wxWidgets or wxWiki for more info):

    cd wxGTK2.8.x
    mkdir gtk-build && cd gtk-build
    ../configure --with-opengl --enable-unicode
    make
    sudo make install

    Make sure wx-config --libs points to the 2.8 libs when run from a terminal. If it does not, it is likely that your distribution's wxWidgets (in /usr/) is picked up before the one you built (in /usr/local/). To fix this, you can pass WXCONFIG=/usr/local/bin/wx-config to scons when building - more info below.


    Prerequisites - Windows

    Install MinGW. You'll need Python if you wish to use the scons build system (and update your PATH env variable if you wish to invoke python from the terminal without using the full path).


    Installing wxWidgets : Build using MinGW. You can use a command like :
    cd "C:\wxWidgets-2.8.10\build\msw"
    mingw32-make -f makefile.gcc UNICODE=1 SHARED=0 MONOLITHIC=0 BUILD=release
    

    Check the wxWidgets READMEs or the wxWiki for more information. You will also need to install the Windows version of wx-config (a binary is included in CodeLite packages so you can rip it from there).




    Compiling Aria (OS X / Linux)

    You are now ready to build Aria itself. All you need to do is type the command appropriate for your system :

    python scons/scons.py
    

    This will do a release build with default wxWidgets. Issue python scons/scons.py --help for a summary of all possible options, like to get a debug build or to use a different wxWidgets build.


    Compiling Aria (Windows)

    The command may need to be adapted a little, depending on your enviroment. Here are a few examples :

    python.exe scons/scons.py WXCONFIG="C:\wx-config --debug=no --static=yes --prefix=C:\wxWidgets-2.8.10" renderer="wxwidgets"  WX_HOME="C:\wxWidgets-2.8.10\"
    python.exe scons/scons.py WXCONFIG="C:\wx-config  --prefix=C:\wxWidgets-2.9.1 --wxcfg=gcc_dll\mswud" renderer="wxwidgets"  WX_HOME="C:\wxWidgets-2.9.1\"
    

    Adapt the path to "wx-config" and to your wxWidgets build as needed. Modify the flags given to wx-config to get the right build if you have many wxWidgets builds.




    Finishing on OS X

    You can make a mac OS X app bundle with the following command:

            python scons/scons.py install
        

    Finishing on Linux
    Getting a MIDI synthesizer

    If it is not already the case, you will need to install a softsynth like Timidity configured with flags :

            ./configure --enable-audio=alsa --enable-server --enable-alsaseq
        
    And you also need a soundbank (many distros will ship FreePats in their repos). And finally run the synth as an Alsa daemon with commands (in the case of Timidity) :
          timidity -iA -Os -EFreverb=0
        
    -EFreverb=0 disables reverbering because it tends to cause problems, but you can leave that part out if you computer is very fast.
    Unfortunately, if you use PulseAudio, there are known compatibility issues with the timidity daemon. In particular, running the Timidity daemon at startup as part of init.d seems to cause a lot of issues.

    Newer versions of Aria have an item in the preferences that, if enabled, will make Aria automatically launch TiMidity and pick a port. This should make the process a little more enjoyable, even though audio on Linux still seems to remain very difficult to handle =( So I'm afraid getting Aria to run on Linux can be a little pain because of the Linux audio maze. Sorry, I'll try to support other midi synths than TiMidity/Alsa in the future.


    Running in-place

    At this point, if you are happy with letting Aria live in this folder, you can simply run it with ./Aria


    Installing

    You can also install Aria into /usr/local/ by running the following command as root :

            python scons/scons.py install
        
    Or, to specify an install prefix :
            python scons/scons.py install prefix=/usr/
        
    You can uninstall it later if you want with
            python scons/scons.py uninstall prefix=/usr
        
    Don't forget to specify the prefix it was installed into if it is not the default one.

    Then, to open Aria, type Aria in a terminal. Hopefully all will be fine!


    Register Aria using Freedesktop standards

    On a further note, you may also run script installMimeType.sh found under the /Freedesktop directory to register Aria Maestosa files associations using the freedesktop standard. This script will also install the .desktop file for Aria in /usr/share/ (this path is not configurable currently, sorry, efit the file if you want to install it somewhere else)


    Finishing on Windows

    If your wxWidgets build is a DLL build, copy the DLL(s) into the same directory as Aria so they are found.




    Closing Words
    If you have any question or issue, do not hesitate to contact me!