This feature is about displaying a license text to the user during installation. The user can agree or decline the license, where in the latter case the installation will be aborted. It is called “Simple License” because there is no tamper resistant mechanism that prevents the installation in case the user does not agree to the license. It also does not do anything more than just displaying a license text. The text can be localized (see Documentation/DevGuide/Extensions/Localized XML Elements).
The license text is displayed either in a dialog or in the console dependent on the way the Extension Manager was started. When it was started by the Tools - Extension Manager menu item or by invoking
unopkg gui in the console then a dialog is used. By using unopkg add the license text will be displayed in the console and user input has to be done through the same.
The license dialog or the license text in the console is displayed when the extension is being installed. Currently there are two modes to install extensions, user mode and shared mode. An extension that was installed in user mode (let's call it a user extension) can only be used by just that person who installed it. If the extension was installed in shared mode (let's call it a shared extension), then it can be used by all users. Since the license text is only displayed during installation, all users who are using a shared extension will not see any license text (except the user who installed this shared extension). However, the publisher of the extension may think it necessary that everyone who wants to use it has to agree to the license first. For this purpose, he can mark the extension accordingly. This extension can then only be installed in user mode and not in shared mode. Likewise the extension can be marked indicating that only the person who installs it needs to agree to the license. Such an extension can be installed in both modes. But when installing in user mode then every user has to agree to the license nonetheless.
Here is an example of the description.xml:
<?xml version="1.0" encoding="UTF-8"?> <description xmlns="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <registration> <simple-license accept-by="user" > <license-text xlink:href="registration/license_de.txt" lang="de" /> <license-text xlink:href="registration/license_en_US.txt" lang="en-US" /> </simple-license> </registration> </description>
In this example, the license would have to be agreed to by all users (that means no shared mode installation). This is indicated by the value
user of the attribute accept-by in the
<simple-license> element. The attribute could also have the value
admin, which would indicate that the license needs only be agreed to by the person who installs it.
<license-text> elements contain information about the files which contain the text that is displayed. The content of these files must be UTF-8 encoded. It is displayed exactly as it is in the file. That is, no formatting occurs. There can be one to many
<license-text> elements, where each element provides information about a different language of the license text. The attribute
xlink:href contains a relative URL (relative to the root directory of the extension) which points to a file which contains the license text in exactly one language. Which language is indicated by
If the package manager does not find a
<license-text> element which matches the locale of OpenOffice.org then it will pick the first
<license-text> element as the default. Prior to OOo 2.4. the default entry needed to marked explicitely by
- Using the simple license in extensions always requires user interaction. Using
<license-text>prevents this extension from being installed centrally, that is as shared extensions. Both issues can prevent the extension from being used by companies, which centrally maintain software.
- The 'simple license' does not work for bundled extensions. If one wants to build an OOo installation set with bundled extensions, then they must not use this feature.
|Content on this page is licensed under the Public Documentation License (PDL).|