Difference between revisions of "Documentation/DevGuide/Extensions/Target Platform"
m |
m |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 4: | Line 4: | ||
|NextPage=Documentation/DevGuide/Extensions/Simple License | |NextPage=Documentation/DevGuide/Extensions/Simple License | ||
}} | }} | ||
− | + | {{Documentation/DevGuideLanguages|Documentation/DevGuide/Extensions/{{SUBPAGENAME}}}} | |
{{DISPLAYTITLE:Target Platform}} | {{DISPLAYTITLE:Target Platform}} | ||
− | [Since | + | [Since OpenOffice.org 3.0] |
It is possible to determine a target platform for an extension by providing a platform tag in the [[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/platform|platform ]] tag in the [[Documentation/DevGuide/Extensions/Description of XML Elements|description.xml]]. | It is possible to determine a target platform for an extension by providing a platform tag in the [[Documentation/DevGuide/Extensions/Description of XML Elements#Element /description/platform|platform ]] tag in the [[Documentation/DevGuide/Extensions/Description of XML Elements|description.xml]]. | ||
Line 13: | Line 13: | ||
If the platform is not present then it is assumed that all platforms are suitable. This corresponds to explicitly specifying all platforms: | If the platform is not present then it is assumed that all platforms are suitable. This corresponds to explicitly specifying all platforms: | ||
− | < | + | <syntaxhighlight lang="xml"> |
<platform value="all" /> | <platform value="all" /> | ||
− | </ | + | </syntaxhighlight> |
The attribute value may contain one to many platform tokens separated by commas: | The attribute value may contain one to many platform tokens separated by commas: | ||
− | < | + | <syntaxhighlight lang="xml"> |
<platform value="windows_x86,linux_x86,solaris_sparc" /> | <platform value="windows_x86,linux_x86,solaris_sparc" /> | ||
− | </ | + | </syntaxhighlight> |
An extension can only be installed if one of the provided platform tokens matches the user's platform. The special 'all' platform represents all platforms. That is, the extension can be installed everywhere. Whereas | An extension can only be installed if one of the provided platform tokens matches the user's platform. The special 'all' platform represents all platforms. That is, the extension can be installed everywhere. Whereas | ||
− | < | + | <syntaxhighlight lang="xml"> |
<platform value=" " /> | <platform value=" " /> | ||
− | </ | + | </syntaxhighlight> |
would prevent installation on all platforms. | would prevent installation on all platforms. | ||
− | The tokens need to be defined by | + | The tokens need to be defined by {{AOo}}. Every token can represent a particular platform constellation. The currently defined tokens are listed in the paragraph [[Documentation/DevGuide/Extensions/Target Platform#Platform Tokens| Platform Tokens ]] |
Do not confuse these tokens with those used to specify a native library in the [[Documentation/DevGuide/Extensions/File Format#Shared Library UNO Components for particular Platforms |manifest.xml]]. We will unify the use of the tokens in one of the future releases. | Do not confuse these tokens with those used to specify a native library in the [[Documentation/DevGuide/Extensions/File Format#Shared Library UNO Components for particular Platforms |manifest.xml]]. We will unify the use of the tokens in one of the future releases. | ||
Line 57: | Line 57: | ||
|- | |- | ||
|<code>linux_ia64</code> | |<code>linux_ia64</code> | ||
− | |Linux operating system running on | + | |Linux operating system running on an ia64 CPU. |
|- | |- | ||
|<code>linux_mips_eb</code> | |<code>linux_mips_eb</code> | ||
Line 91: | Line 91: | ||
|<code>macosx_x86</code> | |<code>macosx_x86</code> | ||
|Mac X operating system running on a x86 CPU. | |Mac X operating system running on a x86 CPU. | ||
+ | |- | ||
+ | |<code>macosx_x86_64</code> | ||
+ | |Mac X operating system running on a x86-64 CPU. | ||
|- | |- | ||
|<code>os2_x86</code> | |<code>os2_x86</code> | ||
Line 109: | Line 112: | ||
===Backward Compatibility of Platforms=== | ===Backward Compatibility of Platforms=== | ||
− | Often an | + | Often an {{AOo}} built for 32bit platform will run on the respective 64bit platform as well. In this case the platform element would only need the value of the 32bit platform. The reason is, that the extension manager compares the platform of the extension with the platform for which {{AOo}} was built. Here are some examples: |
{|border="1" cellpadding=4 style="border-collapse:collapse;" | {|border="1" cellpadding=4 style="border-collapse:collapse;" | ||
Line 115: | Line 118: | ||
!Extension platform | !Extension platform | ||
− | ! | + | !{{AOo}} build for platform |
− | !Platform where | + | !Platform where {{AOo}} runs |
!Result | !Result | ||
|- | |- | ||
Line 145: | Line 148: | ||
When it is necessary to generate the description.xml and the platform string during in the build process one can utilize the rtlbootstrap.mk which is contained in the inc folder. rtlbootstrap.mk is build in module sal and contains values for the operating system and processor. For example: | When it is necessary to generate the description.xml and the platform string during in the build process one can utilize the rtlbootstrap.mk which is contained in the inc folder. rtlbootstrap.mk is build in module sal and contains values for the operating system and processor. For example: | ||
− | < | + | <syntaxhighlight lang="ini"> |
RTL_OS:=Linux | RTL_OS:=Linux | ||
RTL_ARCH:=x86 | RTL_ARCH:=x86 | ||
− | </ | + | </syntaxhighlight> |
These values correspond to the values of the bootstrap variable ${_OS} and ${_ARCH}. | These values correspond to the values of the bootstrap variable ${_OS} and ${_ARCH}. | ||
The file can be included in the makefile which generates the description.xml and use | The file can be included in the makefile which generates the description.xml and use | ||
− | < | + | <syntaxhighlight lang="ini"> |
PLATFORMSTRING = $(RTL_OS:l)_$(RTL_ARCH:l) | PLATFORMSTRING = $(RTL_OS:l)_$(RTL_ARCH:l) | ||
− | </ | + | </syntaxhighlight> |
to form the string. | to form the string. | ||
Latest revision as of 16:19, 2 January 2021
[Since OpenOffice.org 3.0]
It is possible to determine a target platform for an extension by providing a platform tag in the platform tag in the description.xml.
Please notice that this platform tag is ONLY used during installation in order to see if the user's platform is usable. It is NOT used for identifying an extension. Please read the identifier documentation for details.
If the platform is not present then it is assumed that all platforms are suitable. This corresponds to explicitly specifying all platforms:
<platform value="all" />
The attribute value may contain one to many platform tokens separated by commas:
<platform value="windows_x86,linux_x86,solaris_sparc" />
An extension can only be installed if one of the provided platform tokens matches the user's platform. The special 'all' platform represents all platforms. That is, the extension can be installed everywhere. Whereas
<platform value=" " />
would prevent installation on all platforms.
The tokens need to be defined by Apache OpenOffice. Every token can represent a particular platform constellation. The currently defined tokens are listed in the paragraph Platform Tokens
Do not confuse these tokens with those used to specify a native library in the manifest.xml. We will unify the use of the tokens in one of the future releases.
Platform Tokens
Token | Description |
---|---|
all
|
Represents all platforms. |
freebsd_x86
|
FreeBSD operating system running on x86 compatible CPU. |
freebsd_x86_64
|
FreeBSD operating system running on x86 compatible 64bit CPU. |
linux_arm_eabi
|
(Not yet supported) Linux operating system running on ARM CPU using 'EABI'. |
linux_arm_oabi
|
(Not yet supported) Linux operating system running on ARM CPU using 'OABI'. |
linux_ia64
|
Linux operating system running on an ia64 CPU. |
linux_mips_eb
|
(Not yet supported) Linux operating system running on a MIPS CPU using 'EB' ABI. |
linux_mips_el
|
(Not yet supported) Linux operating system running on a MIPS CPU using 'EL' ABI. |
linux_powerpc
|
Linux operating system running on a POWERPC CPU. |
linux_powerpc64
|
(Not yet supported) Linux operating system running on a POWERPC 64bit CPU. |
linux_s390
|
Linux operating system running on a s390 CPU. |
linux_s390x
|
(Not yet supported) Linux operating system running on a s390x CPU. |
linux_sparc
|
Linux operating system running on a SPARC CPU. |
linux_x86
|
Linux operating system running on a x86 CPU. |
linux_x86_64
|
Linux operating system running on a x86 64 bit CPU. |
macosx_powerpc
|
Mac X operating system running on a POWERPC CPU. |
macosx_x86
|
Mac X operating system running on a x86 CPU. |
macosx_x86_64
|
Mac X operating system running on a x86-64 CPU. |
os2_x86
|
OS/2 operating system running on a x86 CPU. |
solaris_sparc
|
Solaris operating system running on a SPARC CPU. |
solaris_x86
|
Solaris operating system running on a x86 CPU. |
windows_x86
|
Windows operating system running on a x86 CPU. |
The tokens with the description 'Not yet supported' will be supported at a later time (see issue 88578).
Backward Compatibility of Platforms
Often an Apache OpenOffice built for 32bit platform will run on the respective 64bit platform as well. In this case the platform element would only need the value of the 32bit platform. The reason is, that the extension manager compares the platform of the extension with the platform for which Apache OpenOffice was built. Here are some examples:
Extension platform | Apache OpenOffice build for platform | Platform where Apache OpenOffice runs | Result |
---|---|---|---|
Linux_x86 | Linux_x86 | Linux_x86 | ok |
Linux_x86 | Linux_x86 | Linux_x86_64 | ok |
Linux_x86 | Linux_x86_64 | Linux_x86_64 | fails |
Linux_x86_64 | Linux_x86 | Linux_x86_64 | fails |
Generating the Platform String in the Build Environment
When it is necessary to generate the description.xml and the platform string during in the build process one can utilize the rtlbootstrap.mk which is contained in the inc folder. rtlbootstrap.mk is build in module sal and contains values for the operating system and processor. For example:
RTL_OS:=Linux RTL_ARCH:=x86
These values correspond to the values of the bootstrap variable ${_OS} and ${_ARCH}. The file can be included in the makefile which generates the description.xml and use
PLATFORMSTRING = $(RTL_OS:l)_$(RTL_ARCH:l)
to form the string.
See also
Content on this page is licensed under the Public Documentation License (PDL). |