Installation
This page describes some details of the installation process and gives hints for trouble shooting.Reference platforms for compilation are
| Platform | Type | IDE/Compiler | Remark |
|---|---|---|---|
| Ubuntu 12.04 (Precise) | x386 | gcc 4.6.3 | Build platform for Ubuntu/Mint packages (*.deb) |
| Cent OS 6.2 | x386 | gcc 4.4.6 | Build platform for Redhat/Fedora packages (*.rpm) |
| Mac OS X Snow Leopard | x386 | Apple gcc 4.2.1 | Build platform for Mac OS images (*.dmg) |
| Windows XP | x386 | MinGW gcc 4.5.2 | Build platform for Windows installer (*.exe) |
| Ubuntu 10.04 (LTS Lucid) | x386 | gcc 4.4.3 | Testing only |
| Fedora 17 | x386 | gcc 4.7.0 | Testing only |
| OpenSUSE 12.2 | x386 | gcc 4.7.1 | Testing only |
| Arch Linux 2011.08.19 | x386 | gcc 4.7.1 | Testing only |
| Free BSD 8.2 | x386 | gcc 4.2.1 | Testing only, see notes below |
| Windows XP | x386 | Visual Studio Express 2008 | Testing only, see notes below |
UNIX-like Systems
The distribution is based on automake, so the traditional configure/make should be sufficient on most systems.
Prerequisites
You need wxWidgets 2.8 including the headers. wxWidgets 2.9 (prerelease of version 3.0) works but is not really used yet.Example list for wx 2.8 installation on Ubuntu is
- libwxbase2.8-0
- libwxbase2.8-dev
- libwxgtk2.8-0
- libwxgtk2.8-dev
- wx2.8-headers
- wx2.8-i18n
- libfontconfig1-dev
Other platforms have only 2 or 3 such packages. On Redhat/Fedora the wx packages are called wxGTK and wxGTK-dev.
We recommend Unicode packages if your platform provides Ansi and Unicode versions of the software. If not mentioned, Unicode will most likely be the default.
You can also compile wx from source code, see the wxWidgets Site.
Additional dependencies are
- Required: a C/C++ compiler, GNU compiler including g++ (C++ extension) wil be the default on most systems.
- Development headers of fontconfig package
- flex and byacc for compilation of Lex and Yacc sources (only required after make clean or for experts).
- aclocal, automake and autoconf (only if ou want to dive deeper into the compilation details).
configure
Default installation directory is /usr/local/maitreya.If you want to change this, type
where <directory> could be something like '/usr' or '/opt'. All will be installed under /usr/maitreya or /opt/maitreya etc.
The wx-config script is essential for the platform dependent compiler switches. configure must find it, otherwise there's no chance to compile the program well. wx-config is searched in various standard directories. If configure doesn't find your wx-config, start configure with the option
The resulting executable (src/gui/maitreya) will be quite big. You can strip if you don't want debugging informations (strip src/gui/maitreya).
The font "MaitreyaSymbols.ttf" from the directory "src/fonts" must be installed on your system.
This is done automatically by 'make install' (version 6 only) and can be done manually as follows
- install the font with your system's configuration tools
- copy the font to the default True Type font directory (e.g. /usr/share/fonts/truetype).
Free BSD
WXGTK must be installed. It can be found in the section x11-toolkits. Unicode version of wxgtk 2.8 is recommended.The script wx-config is named wxgtk2u-2.8-config. The configure command looks like
Font installation with make install does not work. The font must installed manually instead.
Copy the font MaitreyaSymbols6.ttf from the source directory src/fonts to /usr/local/lib/X11/fonts/TTF and restart the application.
Windows Systems
You can use either MS Visual Studio Express 2008 or MinGW compiler. Visual Studio is only supported for development, offcial releases are build with MinGW.
Visual Studio Express 2008
Visual Studio Express 2008 can be downloaded for free.wxWidgets compilation is straight forward. The project files are located under build/msw. Recommeded target for first time compilation is the "Unicode Debug" target.
Please read the wx documentation for more details.
The environment variable WXWIN must be set to the directory of the wxWidgets installation (e.g. d:\wxWidgets-2.8.10).
The Maitreya project is located in "maitreya.sln" in the root directory of the package. The batch script "setup_vcpp_resources.bat" can be used to copy the necessary directories (with language resources etc).
Compilation should be done for the target "Unicode Debug". This must be same as before in wx compilation. Other targets (like release) are currently not supported.
Make "gui" the main project (right click on the project context menu).
Main target of the project is the executable "maitreya.exe" in the directory "src/gui".
Remark: older versions of Developer Studio (like 5.0 or 6.0 and Visual Studio Express 2005) are not supported.
MinGW
The compilation with MinGW is a bit more complicated.First step: install MingW. This is straight forward. Read the corresponding MingGW documentation.
Second step: Installation of wxWidgets
Get the source code for wxWidgets from wxWidgets.org. You can fetch either the windows packages (like wx-msw) or the wxAll package. Unpack the source code. Documentation is under doc/msw.
Go to the the root directory of the wxWidgets source code distribution.
Type
make
make install
You can also leave the option --disable-shared. You will then get a shared library of wxWidgets. The release will be bigger then.
If everything goes well, you'll have a ready-to-use wxWidgets installation.
You can test your installation by compiling one of the samples (e.g. sample minimal). Just go to the directory, type
and start the example.
Third step: Installation of Maitreya
Create a directory for the source code tree, e.g. c:\maitreya. Enter this directory.
Unpack the source code archive
or tar jxvf maitreya-<version>.tar.bz2 (bzip2 file) etc.
Type
Hope that everything's going well.
The executable (src/gui/maitreya.exe) will be quite big. You can strip if you don't want debugging informations (strip src/gui/maitreya.exe).
Note
You need MinGW DLL to start the program. So you must either start the program from the MinGW shell or you must provide these files (mingw*.dll) on the path.These files are located in the msys or mingw directory. It's okay to copy them to the place where the executable or Maitreya is located. Probably you can also copy them to the windows directory, try it.
Compilation on MacOS
The program compiles and runs on MacOS Snow Leopard.Prerequisites are
- GNU gcc and g++ (install xcode)
- statically linked version of wxWidgets for release package. wxWidgets from xcode works, too.
export CPPFLAGS="-arch i386"
./configure --enable-unicode --disable-shared
Create the disk image with