1. Summary of Project:
The idea behind this project is to rebuild the well known X program xclock in Ada with GtkAda.
2. Motivation:
I had this idea of the clock because it serves as a demonstrator for basic program elements like a timer, drawing of basic vector elements and in general for GtkAda usage. It serves as a kind of library which I create to collect simple elements which are combined to more sophisticated projects later.
Another idea with the GtkClock was to build a standalone program which can be run without the necessity of loading dynamic libraries, i.e. with static libraries. With this I intend to test X capabilities of Linux network connections not depending on X but on an alternative UI system.
Finally another advantage and charm of Ada and GtkAda in this context is that, having a compiler on my system, I can build a tool chain (Ada) on my development system from source code with simple means. From source because this allows me to take my software packages and restore my system(s) in a couple of years again building the complete software without compatibility worries. Furthermore I have control over the built software via build options, e.g. to build dynamic and/or static libraries, can put it in custom directories and exchange versions freely. In contrast to Gnat and GtkAda, I am having a hard time building an X and Gtk toolchain from source. Installing the binary packages is not an option as this takes away flexibility (package exchange, installation directory).
3. Building Instruction:
The deployment of the software is fairly simple keeping in mind that all necessary build tools and software is located in one directory, which is called "workspace-ada". It needs to be created. Within this directory Gnat(-2020-Community) and GtkAda are installed into the directories "gnat-2020" and "gtkada-2020" respectively. Finally the supplied project Clock.tar.bz2 is extracted into the workspace.
This final directory structure (under Linux) can look as follows:
$HOME/workspace-ada
$HOME/workspace-ada/gnat-2020/...
$HOME/workspace-ada/gtkada-2020/...
$HOME/workspace-ada/Clock/Clock/...
4. Deployment:
The project Clock contains the script run.clock. In it adjust the "WORKSPACE_ADA" to match your path to the Ada workspace (by default it is set to $HOME/workspace-ada). The essential actions are executed by the script with one of the following options:
- Opening the project in Gnatstudio: $ ./run.clock open
- Building the project: $ ./run.clock build
- Run the program: $ ./run.clock run
- Show help/further options: $ ./run.clock
Comments