First, download the source code from the sourceforge downloads area or from SVN.
Aria is written in C++.
Dependencies :
- GCC (g++). Included in the developer tools on OS X, found in repositories of all distros on Linux, MinGW on Windows (VisualStudio not supported).
- wxWidgets. I am currently using 2.8.x on Linux/Windows, and 2.9.x trunk on OS X (because trunk has a couple printing bugs fixed)
- OpenGL if you use the OpenGL renderer, which is optional (OpenGL is included by default on mac OS X)
- libjdkmidi (included in the Aria source)
- irrXML (included in the Aria source)
- On Linux/Unix systems, you need Alsa or Jack (experimental Jack support is available starting from 1.2.3). [On OSX/Windows, the native MIDI librairies are used so nothing needs to be installed there]
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
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):
../configure --with-cocoa --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --without-libtiff --with-zlib=builtin --with-expat=builtin --disable-shared --enable-macosx_arch=i386 --with-macosx-version-min=10.5 --with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdkMake 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).
Warning : 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 Fluidsynth or Timidity plus 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 installMake 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.
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.9.4\build\msw" mingw32-make -f makefile.gcc UNICODE=1 SHARED=1 MONOLITHIC=1 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
You are now ready to build Aria itself. All you need to do is type the scons command :
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.
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
You can make a mac OS X app bundle with the following command:
python scons/scons.py install
If you do not already have one, you will need to install a softsynth like Fluidsynth or Timidity. See Installing a MIDI synthesizer on Linux for more information.
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, edit the file if you want to install it somewhere else)
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!