Difference between revisions of "Extensions Integration into Installation Set"

From Apache OpenOffice Wiki
Jump to: navigation, search
(made headings headings, not wikilinks)
Line 1: Line 1:
== Integrating an extension into OpenOffice.org / StarOffice installation sets ==
+
How to integrate an extension into OpenOffice.org / StarOffice installation sets.
  
  
[[Global rules for extensions:]]
+
== 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 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.
Line 8: Line 8:
 
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.
 
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:]]
+
== 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  
 
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  
Line 34: Line 34:
 
That is all in the scp projects. This has to be done for all platforms. The additional tasks are platform dependent.
 
That is all in the scp projects. This has to be done for all platforms. The additional tasks are platform dependent.
  
[[Platform dependent tasks:]]
+
== Platform dependent tasks ==
  
Windows:
+
=== Windows ===
  
 
Congratulations, you have done it already. There are two CustomActions executed
 
Congratulations, you have done it already. There are two CustomActions executed
Line 43: Line 43:
 
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.
 
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:
+
=== 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.
 
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.
Line 71: Line 71:
 
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:
 
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:
+
=== 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.
 
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:
+
=== Solaris ===
  
 
There are two shell scripts, that are installed into the program directory. This scripts have the names "register_extensions" and "deregister_extensions". This scripts register or deregister all extension that can be found in directory "share/extension/install". After the installation of all packages, the script "register_extensions" has to be executed by hand.
 
There are two shell scripts, that are installed into the program directory. This scripts have the names "register_extensions" and "deregister_extensions". This scripts register or deregister all extension that can be found in directory "share/extension/install". After the installation of all packages, the script "register_extensions" has to be executed by hand.
  
 
[[Category:Extensions]]
 
[[Category:Extensions]]

Revision as of 16:11, 13 March 2007

How to integrate an extension into OpenOffice.org / StarOffice installation sets.


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

There are two shell scripts, that are installed into the program directory. This scripts have the names "register_extensions" and "deregister_extensions". This scripts register or deregister all extension that can be found in directory "share/extension/install". After the installation of all packages, the script "register_extensions" has to be executed by hand.

Personal tools