目标平台

From Apache OpenOffice Wiki
Jump to: navigation, search


[自 OOo 3.0 起] 可以使用 description.xml 中的 平台 标签来确定一个扩展的目标平台。


请注意 这个平台标签在安装过程中使用以确定用户使用何种平台。这无法用来识别扩展,详见 标识符文档


如果没有平台标签,那么就默认为所有平台适用。这与显示注明所有平台适用是一样的:

<platform value="all" />


属性值可以包含多个平台标记,由逗号分隔:

<platform value="windows_x86,linux_x86,solaris_sparc" />


只有在其中一个平台标签与用户平台相匹配时扩展才能被安装。特殊的“all"平台表示所有平台。也就是说,这个扩展可以安装在所有平台上。相反的

<platform value=" " />

将防止在所有平台安装。


平台标签(Flatform token)需要由 OOo 来定义。每个标签可以表示一个特定的平台集。当前已定义的标签在 平台标签章节列出。

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 a 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.
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 OOo 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 OOo was built. Here are some examples:

Extension platform OOo build for platform Platform where OOo 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).
Personal tools
In other languages