Until now once you installed Matrex in a directory, Matrex used the same directory to:
- write its log file
- write the changes to its configuration files
- write additional templates
- write scripts used as base of templates
This is natural for a java application that is installed with a java installer and does not pretend to integrate with the platform in which it is installed.
But what if we want to create
installers for specific platforms (Windows setup, MacOSX application bundles, Linux .deb and .rpm files)?
In this case:
- it is the operating system that defines in which directory or directories Matrex is installed.
- Matrex cannot write the files it produces (templates, configurations, log...) in the directories in which it is installed, but must use a writable directory, which can be under Documents and Settings in Windows or under the home directory in Linux.
Version 1.3.5 will make this possible with two changes:
- the new configuration file main.properties, which contains the paths of all other configuration files (which can contain environment variables).
- the new concept of configuration files that contain the locations of other files.
The configuration files that contain the locations of other files are:
- templates.cld, which contains the paths of the top directories of directory trees containing functions templates.
- plugins.cld, which contains the directories and jar files containing additional java classes used as plugins and their dependencies.
- scrips.cld, which contains the top directories of directory trees containing scripts used by templates.
With the addition of
main.properties and of the
.cld files it is possible to have the configuration files that change after the installation and additional templates, java classes and scripts in writable directories.
In this way anyone can change these files, add them or delete them without touching the original installation.
It will be then easy to install Matrex:
- In Windows in a directory under the Program Files directory, with the additional files and the writable configuration files in a directory under Documents and Settings.
- In Linux in the standard directories (/usr/bin, usr/share...), with the additional files and the writable configuration files in a directory (.matrex ?) under the home directory.
- In MacOSX in a directory under the Applications directory, with the additional files and the writable configuration files in a directory under Users
I tested this new feature installing version 1.3.5 under a
read-only directory and configuring it so that it keeps all the files that need to be changed under a writable directory.
It works fine.
As soon as possible I will release a beta of this version.