Installation
This page describes some details of the installation process and gives hints for trouble shooting.
Platforms
The program runs under various platforms including Windows, MacOC (Intel and Silicon), Linux (Ubuntu, Debian, Arch) and BSD (FreeBSD, OpenBSD).
UNIX-like Systems
The distribution is based on automake, so the traditional configure/make should be sufficient on most systems.
Prerequisites
You need wxWidgets including the headers. Version 3.0 is required. Legacy version 2.8 works until release 8.0, later versions require wx3.
Example list for wx 3.0 installation on Ubuntu 20 is
- libwxbase3.0-0
- libwxbase3.0-dev
- libwxgtk3.0-gtk3-0
- libwxgtk3.0-gtk3-dev _ wx3.0-headers
- wx3.0-i18n
- libfontconfig1-dev
The following command can be pasted to the console:
sudo apt-get install libwxbase3.0-0v5 libwxbase3.0-dev libwxgtk3.0-gtk3-0 libwxgtk3.0-gtk3-dev wx3.0-headers wx3.0-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. clang compiler should work as well.
- 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 you want to dive deeper into the compilation details).
Configure
Default installation directory ("prefix") is according to GNU conventions under /usr/local. Data directory would bei /usr/share/maitreya8, the binaries would be located at /usr/local/bin.
If you want to change this, type
./configure --prefix=<directory>
where 'directory' could be something like '/usr' or '/opt'.
If the configure script complains about a wrong automake version you can run the autogen.sh script to create the automake stuff from scratch. Automake and aclocal must be installed in that case.
The wx-config script is essential for the platform dependent compiler switches. configure must find it, otherwise the program will not compile. wx-config is searched in various standard directories. If configure doesn't find your wx-config, start configure with the option
--with-wx-config=<name>
The resulting executable (src/gui/maitreya8.bin) will be quite big. You can strip if you don't want debugging informations (strip src/gui/maitreya8.bin).
The font "Saravali.ttf" from the directory "src/fonts" must be installed on your system.
This is done automatically by 'make install' 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).
Arch Linux
Arch Linux can build from AUR.
Free BSD
wxGTK must be installed. It can be found in the section x11-toolkits. Unicode version of wxgtk 3.0 is recommended.
The script wx-config is named wxgtk2u-3.0-config. The configure command looks like
./configure --with-wx-config=wxgtk2u-3.0-config
If configure complains about missing fontconfig installation you can set these environment variables and call configure again. See note below (C shell syntax, use export command for bash or ksh).
setenv FONTCONFIG_CFLAGS "-I/usr/include"
setenv FONTCONFIG_LIBS "-lfontconfig"
./configure --with-wx-config=wxgtk2u-3.0-config
make
If font installation with make install does not work you can install it manually instead: copy the font Saravali.ttf from the source directory src/fonts to /usr/local/lib/X11/fonts/TTF and restart the application.
Windows Systems
Visual Studio 2022 and Mingw are supported.
Visual Studio 2022
Compile wxWidgets with Visual Studio (workspace in e.g. build/msw/wx_vc17.sln).
Set the environment variable WXWIDGETS to the appropriate directory (e.g. c:\wxWidgets-3.2.4).
Open maitreya.sln. Make "gui" the start project and build.
MinGW
Install MinGW. Read the documentation for details.
Install gcc and wxWidgets with pacman.
Unpack the Maitreya source code archive and enter the directory.
Type
make -f Makefile.win
The executable (src/gui/maitreya8.exe) will be quite big. You can strip if you don't want debugging informations (strip src/gui/maitreya8.exe).
Command Line Interface
You can also build the command line interface
cd src/jyotish
make -f Makefile.win textclient
Compilation on Mac OS X
GNU gcc and g++ are required (install xcode command line tools)
download wxWidgets source package, unpack it. Create folder for build, change to folder and call configure and make
../configure --disable-shared
make
Unpack the maitreya release and call configure and make.
export CC="gcc"
export CXX="g++"
./configure --with-wx-config=[path-to-wx-build]/wx-config
make
Calling the script "create_mac_release.sh" will create the release directory and application folder "Maitreya8.app" with required data. It can be started with the "open" command or with mouse click from the Finder.
Create the disk image with
create_mac_release.sh dmg