Difference between revisions of "Extensions Integration into Installation Set"
(made headings headings, not wikilinks) |
(→Solaris) |
||
Line 77: | Line 77: | ||
=== Solaris === | === Solaris === | ||
− | + | Still under construction, but a solution will be available soon. | |
[[Category:Extensions]] | [[Category:Extensions]] |
Revision as of 14:40, 29 June 2007
How to integrate an extension into OpenOffice.org / StarOffice installation sets.
Contents
Global rules for extensions
All extensions that need to be registered during installation process have to be installed into the directory “share/extension/install” in the Office installation. "Installed" means in this context only "copied" or "unpacked" from the installation set and does not include the registration process in the Office product. The scripts (Unix) and CustomActions (Windows), that register the extensions using the tool "unopkg", look only in the directory “share/extension/install” for oxt files.
All extensions have to be included into an own module in scp project. Therefore they are packed into their own RPM (Linux) or Solaris package (Solaris) and can be selected and deselected during the installation process on all platforms. The module defined in scp should not contain any additional content.
Changes in scp projects
In scp projects you have to add a file (the extension) and a module. This can be easily explained with the following example of the extension
File gid_File_Oxt_Myextension TXT_FILE_BODY; Styles = (PACKED); Dir = gid_Dir_Share_Extension_Install; Name = "myExtension.oxt"; End
It is important to use “gid_Dir_Share_Extension_Install”. Only with this directory global id the extensions are installed into the correct directory.
Additionally a module has to be defined in scp projects:
Module gid_Module_Optional_Myextension Name = "My extension”; Description = "Description of my extension"; ParentID = gid_Module_Optional; Default = YES; Files = (gid_File_Oxt_Myextension); End
Of course “Name” and “Description” have to be localized. That is all in the scp projects. This has to be done for all platforms. The additional tasks are platform dependent.
Platform dependent tasks
Windows
Congratulations, you have done it already. There are two CustomActions executed at the end of the installation and at the start of the deinstallation. The CustomAction at the end of the installation registers all extensions, that are located in "share/extension/install". The CustomAction for the uninstallation process deregisters all extensions located in "share/extension/install". Therefore your new extension is automatically registered or deregistered without any further action.
Unix
For the Unix platforms it is required, that a RPM or Solaris package is created from the content of the new module that you defined in scp projects. Therefore you have to define a new package, which currently happens in the project instsetoo_native. The file "instsetoo_native/inc_openoffice/unix/packagelist.txt" is a list of all packages of OpenOffice.org.
The new package has a dependency to the package core02, which contains the
unopkg executable. Additionally this new package must include as "script" the
script file "shellscripts_extensions.txt", that contains three scripts required for
RPM installation.
Example:
Start module = "gid_Module_Optional_Myextension" script = "shellscripts_extensions.txt" solarispackagename = "%WITHOUTDOTUNIXPRODUCTNAME-myextension" solarisrequires = "%WITHOUTDOTUNIXPRODUCTNAME-core02" packagename = "%UNIXPRODUCTNAME-myextension" linuxreplaces = "%WITHOUTDOTUNIXPRODUCTNAME-myextension" freebsdrequires = "%UNIXPRODUCTNAME-core02" requires = "%UNIXPRODUCTNAME-core02" copyright = "1999-2006 by OpenOffice.org" vendor = "OpenOffice.org" description = "MY extension for %PRODUCTNAME %PRODUCTVERSION" destpath = "/opt/%UNIXPRODUCTNAME%PRODUCTVERSION" End
That's it. Now the installation set contains a new package, that includes your extension. For Linux and Solaris there are different procedures, in which the extension is registered in the Office suite:
Linux
The RPMs including extensions have several scripts included, in which unopkg is called. This is required in "preinstall", "postinstall" and "preremove". Therefore the extension is registered after the rpm installation and deregistered if the rpm is removed.
Solaris
Still under construction, but a solution will be available soon.