newbie question: deploying oz

Leif Kornstaedt kornstae at ps.uni-sb.de
Fri Jan 3 14:20:11 CET 2003


maarten at shortcut.nl (Maarten van den Dungen) writes:
> The only problem is of course if (a possibly newer) Mozart is already
> installed on the system. The mozart exe is as I understand using the
> path variable.

ozengine.exe examines which directory it itself resides in,
and `guesses' Mozart's installation directory accordingly
(by moving up to the parent directory).  Only executables
created using `ozc -x' or `ozl -x' (that is, which are based
on ozwrapper.bin or ozwrapperw.bin) locate Mozart using the
PATH environment variable.

Of course, you can write a simple application launcher yourself
(say, in C) which takes care of either setting OZHOME (see
below) or running ozengine explicitly from the right directory.

> Would it be possible to have the executable first have
> it look in a (specified?) local directory?

You can set the OZHOME environment variable before running
an executable Oz application.  This does the trick.

> Is it possible to find out
> which version is installed?

Only by using the installed version to execute an Oz
program to inspect the 'oz.version' property.
For example, create a file version.oz containing

   {System.showInfo {Property.get 'oz.version'}}
   {Application.exit 0}

and run

   ozc -lSystem,Property,Application version.oz

This will then print the version number.

Cheers,
Leif.
-
Please send submissions to users at mozart-oz.org
and administriva mail to users-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
Please send bug reports to bugs at mozart-oz.org.





More information about the mozart-users mailing list