Hi Mike,
Mike Traum wrote:
Thomas, I'm not sure what you mean by the user or administrator defining the default installation. This would be possible in linux/unix, but, from what I've gathered, there's no way to do this in Windows. OOo 1.1.x will always trump all other installations (unless there's something I don't know). Even 2.0 and beyond, how could you do this if multiple versions were installed in system space?
As far as searching for all installations, in Windows it wouldn't be too expensive to search for all of the registry keys, would it? Under linux/unix, I agree that you wouldn't want to search the whole system. But, you could try to use 'locate', which is used by many (most?) non-server distributions. In general, it seems weird to be making calls to external programs, but I believe this is already being done in the Loader by calling 'which'. You could also easily search well known locations, such as those used when installing from rpm.
just as a side remark, on the Unix/Linux platforms the UNO installation is found by using the which command only for those Java versions which don't support environment variables (e.g. Java 1.3.1, 1.4). For all other Java versions the UNO installation is found from the PATH environment variable, that means the first soffice symbolic link which is found in one of the directories in PATH is taken.
Looking toward the future, I think it would be prudent if OOo wrote a file (at least on unix/linux) stating what versions are available and where that are. Then, Loader could just read that. I think this used to exist as sversion.ini, but was removed. I assume it was removed because in theory you don't need this. But in practice, I think you really do.
Mike
I think our discussion now really goes round in circles. Nevertheless in general there are two approaches:
a) the user/administrator defines a default office on the system; this installation is used by the loader
A default installation is defined by the following requirements: - Windows: The default installation is specified in the key "Software\OpenOffice.org\UNO\InstallPath" in HKEY_CURRENT_USER. If this key is missing, the same key in HKEY_LOCAL_MACHINE is taken. - Unix/Linux: A soffice symbolic link has to be created in one of the directories in the PATH environment variable.
b) find all offices on the system, decide later which version should be taken
You strongly favour b). The problem with b) is, how to select an office from a list of all offices on the system. Version numbers won't work. So what's your proposal for making a decision. In addition I doubt that one always finds all offices on the system. Sure, there's locate, there's which, there are rpms, there is pkgchck, there a default locations, but all this varies from system to system.
We decided to go for a) and I don't really see any problems with it. You mentioned the problem with OOo 1.1.x which always writes to HKEY_CURRENT_USER. This is a bug and very unfortunate. I think this bug cannot be fixed in OOo 1.1.x but probably I'm wrong. Therefore I only see two solutions. Either you remove all OOo 1.1.x installations from the system or you delete the registry key in HKEY_CURRENT_USER.
Thomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]