In order to compile and run mtCellEdit you must have several packages already present on your system:
These must also include library headers, which some operating systems provide in separate packages.
mtCellEdit then requires various libraries that I have created:
Package | Dependencies | Description |
libmtKit | zlib | Low level C routines, including strings, UTF-8, ZIP file handling, preferences, trees. |
libmtcelledit | libmtKit | The spreadsheet engine, including all file handling and general operations. |
libmtIMG | libmtKit, Freetype, libpng | The pixel graphics engine, e.g. font rendering. |
libmtCedUI | libmtKit, libmtcelledit, libmtIMG, Cairo | Toolkit agnostic UI code, e.g. graph and sheet rendering. |
libmtGEX | libmtKit, libmtIMG, GTK+2 | Various GTK+ version 2 function utilities including a file picker, colour picker, and preferences editor. |
The other optional parts of the suite have these dependencies:
Package | Dependencies | Description |
mtCedCLI | libmtKit, libmtcelledit, libmtCedUI, readline | Command line spreadsheet |
mtCedUtils | libmtKit, libmtcelledit | Command line text tools |
mtEleana | libmtKit, libmtcelledit, libmtIMG, libmtGEX, GTK+2 | General election analysis |
mtNetlog | libmtKit, libmtcelledit | Network logging |
mtRaft | libmtKit, libmtcelledit, GTK+2 | Directory analysis |
mtRDC | libmtKit, libmtcelledit | Random data creator |
As outlined above you must build and install the packages in this order:
In all cases you use these commands to compile the programs:
./configure make
Don't forget to study the makefile and configure script before doing anything. For the complete set of configure options use:
./configure --help
The build system I have created uses simple hand built scripts and makefiles. I find this the best way to build the various components of the project. More elaborate systems like GNU Autotools are of no interest to me as they do not solve any problems I have (portability outside the GNU or BSD ecosystems is of no interest to me).
Once compilation is completed, use this to install (you must have root user rights):
make install
You can change the destination directory at this stage if you are creating a package by using:
make install DESTDIR=/my/chosen/directory/
All of the programs in the mtCellEdit suite have usage information contained in the associated man page. This can be read in the usual way using the man program, such as this example:
man cedutils
You can uninstall the program and libraries by using (you must have root user rights):
make uninstall
You will also need to remove any preferences files which are kept in the user directories such as /home/user/.config/mtcelledit/prefs.txt
I aim to get my software working on as many different GNU/Linux systems as possible. To achieve this rationally without testing on hundreds of systems, I work towards compatibility with these system types: Debian, Fedora, and Arch. In doing so I will also achieve compatibility with similar systems.
To achieve these goals as quickly and as easily as possible I use various scripts in the /pkg/ directory to install and test the software (including how I package the software using native package management tools such as pacman, dpkg and rpm). The README.txt file in /pkg/ documents how I do these things, step by step.
The scripts for the different systems all do very different jobs but their interface at the command line is identical. For example to build and install on different platforms using the native package management system you could use:
./build_arch.sh --preconf "CC=clang" ./build_debian.sh --conf "debug" ./build_fedora.sh --conf "--libdir=/usr/lib64"
If your system doesn't use pacman, dpkg, or rpm then you can always use the classic ./configure, make, make install based script using the same arguments:
./build_install.sh --preconf "CC=clang" --conf "--libdir=/usr/lib64"
And if you want to remove all of the installed packages from your system, just use one of these:
./build_arch.sh remove ./build_debian.sh remove ./build_fedora.sh remove ./build_install.sh remove
Here are the options that are available to these 4 scripts:
flush | Clear out the temporary files after a compilation. |
remove | Remove all installed files from a previous build and install. |
--preconf ARG | Add environment variable settings such as CC or CFLAGS. |
--conf ARG | Pass arguments to the configure script such as --libdir or debug. |
--bcfile ARG | If you want to pass different configure lines to different packages you would use a custom built bcfile. See /pkg/ for a few examples example of this. When using --bcfile the options --preconf and --conf do nothing. |
Normally all of the different packages are built in sequence. However you can also pass specific package names to build and install just those items, such as:
./build_install.sh libmtkit libmtcelledit mtnetlog
To remove these items you would use:
./build_install.sh libmtkit libmtcelledit mtnetlog remove
In 2013, after 5 years of building mtCellEdit with GTK+2, I decided it would be a good idea to make the GUI programs in the mtCellEdit suite work with the Qt platform. By doing this I can achieve various desirable goals:
The /pkg/ directory in the source code contains information in the README.txt that may be useful for installing the Qt versions via native package management tools.
Qt 4 is the most tested, reliable, and broadly available version of Qt currently in use.
As always you must consult the configure script help system to ensure you are using the correct settings for things like the system directory you will be installing to.
After installing all of the core library components listed earlier you do the following:
./configure --enable-qt4 make sudo make install
./configure --enable-qt4 --program-suffix=-qt4 make sudo make install
Qt 4 sometimes struggles to find the correct icon theme for desktop environments outside GNOME, XFCE, and KDE. This can be fixed by using these command lines:
gconftool-2 --type string --set /desktop/gnome/interface/icon_theme elementary DESKTOP_SESSION=gnome /usr/bin/mtcelledit-qt4
Change "elementary" to the name of your chosen theme. If you use the standard "gnome" theme then this command isn't needed.
If you wish to call this version of mtCellEdit from inside a local .desktop file you would use this line:
Exec=env DESKTOP_SESSION=gnome /usr/bin/mtcelledit-qt4 %f
If you install the Qt version on your system with a different binary name as above, it will use a slightly different preferences file to the GTK+2 version:
.mtcelledit-qt4
If you want to share the preferences between the two different programs you would call the program like this:
mtcelledit-qt4 -prefs ~/.mtcelledit
Qt and GTK+ don't calculate the window geometry in quite the same way so their may be a slight discrepancy between the two when switching.
Qt 5 is a very recent and newer version of Qt. It is less tested, less reliable, and less available than Qt 4. On Arch Linux and Fedora there are major performance problems so until these issues are resolved, my advice is to stick to the GTK+2 or Qt 4 versions.
As always you must consult the configure script help system to ensure you are using the correct settings for things like the system directory you will be installing to.
After installing all of the core library components listed earlier you do the following:
./configure --enable-qt5 make sudo make install
./configure --enable-qt5 --program-suffix=-qt5 make sudo make install
Although I am mainly interested in GNU/Linux systems for my day to day work, porting to FreeBSD is useful as it allows my software to be tested from a slightly different perspective. It also ensures I don't become entrenched in my GNU/Linux habits as I study how other people solve similar software development issues with a different philosophy and toolchain.
For further details of the FreeBSD port (e.g. which version of FreeBSD I have tested) see the /pkg/ directory which contains more information and build scripts.