Directory StructureInstallation DirectoryCurrent ConfigurationCurrently Argo contains definitions of certain directories. These are calculated at execution time and may be viewed on the Environment tab under the menu selection Edit -> Settings.
The first three values shown in the list (argo.root, argo.home, and argo.ext.dir) are calculated. These are currently defined as follows:
The following java fragment
from org.argouml.application.modules.ModuleLoader
calculates argo.root:
Proposed ConfigurationRather than computing the value for argo.home, ArgoUML should determine that location from a system argument passed on the command line, or from a property file located in a "well-known" location.
These "well-known" locations would be selected from
the directories provided by the Java run-time through the
java.lang.System.getProperties() .)
argo.root would become obsolete, and its value would only be used internally if argo.home needed to be calculated because it was not otherwise provided. The initialization process would then become:
Note: We do not attempt to look in user.dir since this could cause more issues than it solves. This approach seems to provide sufficient flexibility and operating system independence. Additionally, the property file search approach should allow continued support for running ArgoUML under Java Web Start, which does not currently allow users to add command line arguments.
Developers The tag "developer_snapshot" contained in build.xml should be changed to "install", and determine the location of argo.home in a similar manner, but also checking the directory named by the ant built-in property basedir for the file argouml.initialization.properties.
Example of proposed installed directory structureThus a typical installation on a *nix system might have the following directory structure. The software would be installed in the/usr/share/argouml directory.
argo.home would be /usr/share/argouml .
argo.ext.dir would be /usr/share/argouml/lib/ext .
The files contained in argo.home/bin would be scripts
specialized for the installation
(with -Dargo.home=/usr/share/argouml on the java command, for example),
and could be copied to any directory
(such as /usr/local/bin ) and executed directly.
|