First, download the source code from the sourceforge downloads area or from SVN.
Aria is written in C++.
Dependencies :
wxWidgets. I am currently using 2.8.x.
OpenGL and GLUT (included by default on mac OS X)
libjdkmidi (included in the Aria source)
irrXML (included in the Aria source)
Build system :
scons (included in source tarballs. To build from SVN, install scons 0.98 or better)
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.
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 :).
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 - Mac OS X
First, download and install wxWidgets. I usually build static. Don't forget to enable OpenGL support. In order to get proper Unified ToolBar support, you will need to patch wxWidgets as follows :
--- wxMac-2.8.9/src/mac/carbon/toolbar.cpp 2008-09-15 05:39:33.000000000 -0400
+++ wxMac-2.8.9/src/mac/carbon/toolbar.cpp 2008-12-23 13:51:16.000000000 -0500
@@ -1200,6 +1200,11 @@
{
// since setting the help texts is non-virtual we have to update
// the strings now
+
+ wxString label = tool->GetLabel();
+ HIToolbarItemSetLabel( hiItemRef , wxMacCFStringHolder(label, enc) );
+
HIToolbarItemSetHelpText( hiItemRef,
wxMacCFStringHolder( tool->GetShortHelp(), enc ),
wxMacCFStringHolder( tool->GetLongHelp(), enc ) );
Furthermore, the print dialog in wxWidgets has a bug, it will show 9999 as the number of pages no matter what. To fix this, apply the following patch (this was taken in SVN version of wxWidgets. The same fix works on wx 2.8.x but you will need to apply the changes manually since this patch won't work there. In wx 2.8, the file to patch is instead src/mac/carbon/printmac.cpp).
Index: src/osx/core/printmac.cpp
===================================================================
--- src/osx/core/printmac.cpp (revision 57516)
+++ src/osx/core/printmac.cpp (working copy)
@@ -468,11 +468,24 @@
return false;
printout->SetIsPreview(false);
+
+ // Get some parameters from the printout, if defined
+ int fromPage, toPage;
+ int minPage, maxPage;
+ printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
+
+ if (maxPage == 0) return false;
+
+ // Only set min and max, because from and to will be
+ // set by the user
+ m_printDialogData.SetMinPage(minPage);
+ m_printDialogData.SetMaxPage(maxPage);
+
if (m_printDialogData.GetMinPage() < 1)
m_printDialogData.SetMinPage(1);
if (m_printDialogData.GetMaxPage() < 1)
m_printDialogData.SetMaxPage(9999);
-
+
// Create a suitable device context
wxPrinterDC *dc = NULL;
if (prompt)
@@ -526,23 +539,7 @@
wxBeginBusyCursor();
printout->OnPreparePrinting();
-
- // Get some parameters from the printout, if defined
- int fromPage, toPage;
- int minPage, maxPage;
- printout->GetPageInfo(&minPage, &maxPage, &fromPage, &toPage);
-
- if (maxPage == 0)
- {
- wxEndBusyCursor();
- return false;
- }
-
- // Only set min and max, because from and to have been
- // set by the user
- m_printDialogData.SetMinPage(minPage);
- m_printDialogData.SetMaxPage(maxPage);
-
+
printout->OnBeginPrinting();
bool keepGoing = true;
Example terminal commands to build wx (read the instructions that come with wxWidgets or wxWiki for more info):
cd wxMac2.8.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).
Installing wxWidgets - Linux
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.
building libjdkmidi (any platform)
Then you need to build libjdkmidi - its source is included with Aria however it is built seperately.
cd /path/to/Aria/Src
cd libjdkmidi
./configure
make
cd ..
Compiling Aria (any platform)
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.
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
At this point, if you are happy with letting Aria live in this folder, you can simply run it with ./Aria
You can also install Aria into /usr/local/ by running the following command as root :
python scons/scons.py install
This will require scons 0.98.4 or later to work correctly.
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.
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 a soundbank, and run it as Alsa daemon with commands (in the case of Timidity) :
sudo modprobe snd-seq-midi
sudo timidity -iA -B2,8 -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.
Then, to open Aria, type Aria in a terminal - enjoy!
If you have any question or issue, do not hesitate to contact me!