Installation and Deployment
To compile Aluminium you need Qt (version 4.4 or newer). Compilation is done by running:
qmake && make
in the directory you extracted the source (note, that qmake may have a different name in your distribution (e.g. qmake-qt4)). This will produce a directory named bin, containing two executables (alrunc and dia2al) and a directory (plugins).
dia2al is used to convert Dia diagrams to Aluminium runnable files:
./dia2al --help
Dia to Aluminium converter v0.3
Usage: dia2al [OPTIONS] <input file> [<input file> ...]
Options:
-d <output directory> - where to save output files
-o <output file> - all output to be saved in one file (-d ignored)
-m <main app> - which application is main (when -o is used)
-i <include directory> - where to look for include files
-z - compress output
Currently you will only want to generate many output files (-d option), so -o and -m options should not be interesting (future versions will need those). Include directory is the directory where files, included with UML - State elements, can be found. -z option compresses output files - this affects only file sizes (and execution time).
If any of the directories isn't specified, current directory will be used.
alrunc is used to execute the Aluminium files:
./alrunc --help
Aluminium Runner v0.3
Usage: alrunc [OPTIONS] [<input file>]
Options:
-p <plugin directory> - where to look for operation plug-ins
-t - print the amount of consumed time at the end
All operations are compiled as separate libraries, loadable at run time (placed in the plugins directory). By default, alrunc looks for them in the standard Qt plug-in directory (depends on your Qt installation. For example, in the distribution I use, it is /usr/lib/qt/plugins/almodules). To change this directory, you can use qt.conf, or the -p option.
-t option enables time debugging - <!-- served in ??? ms --> will be printed at the end of each generated document.
If input file is not specified, data is read from stdin.
If you are going to install Aluminium in an environment where Qt is not installed globally, you might want to read this.
Using With Apache
Perhaps the easiest way to set up Aluminium with Apache is to use the Action and AddHandler directives. In the global Apache configuration file, or a local .htaccess file, you should add these lines:
Action al-run /cgi-bin/alrun.sh AddHandler al-run .al
And the alrun.sh script could look like this:
#!/bin/sh # In case Qt isn't installed globally: #export set LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/qt/libs exec /path/to/alrunc -p /path/to/almodules $PATH_TRANSLATED
You might also want to make index.al to work like a directort index with DirectoryIndex directive:
DirectoryIndex index.al
Using With Lighttpd
To set up Aluminium with Lighttpd, first make sure mod_cgi module is enabled. Then add ".al" extension to the static-file.exclude-extensions variable, and
".al" => "/path/to/alrunc"
to the cgi.assign variable. You might also want to add "index.al" to the index-file.names variable.