Установка OOo разных версий в одну систему

From Wiki
Revision as of 09:44, 1 May 2010 by Sancho (talk | contribs) (исправлены категории и применён шаблон подвала)
Jump to navigationJump to search

ja:JA/QA/Run_OOo_versions_parallelsl:SL/Run_OOo_versions_parallelde:DE/Run_OOo_versions_parallel

Для улучшения OOo не обязательно быть программистом, вы можете помогать исправлять ошибки просто установив DEV сборку и используя её как вы обычно это делаете, и докладывать об обнаруженных ошибках.

Обычно, каждая версия устанавливается в свою папку (к примеру, /opt на Linux, Program Files на Windows), например, стабильная сборка OOo 3.2 ставится в папку /opt/openoffice.org3 на *nix системах, и C:\Program Files\OpenOffice.org 3\ на Windows, ну а DEV сборка установится в /opt/ooo-dev3/ (*nix) и C:\Program Files\OOo-dev 3\ (Windows).

В связи с этим, если вы хотите установить несколько DEV сборок или хотите сохранить в системе старые стабильные сборки, обычный способ установки не позволит этого, т.к. одна версия перезапишет другую.

Тут мы объясним, каким способом можно установить параллельно несколько разных сборок.


Linux

In this section we will show how to "install" any OpenOffice.org version distributed in a RPM or DEB package. In fact, we won't install it but rather extract the files in the packages.

Notice that with this method you can use an RPM or a DEB package, regardless of your distribution’s package format (that is, you can extract an RPM package in Debian, or a DEB package in Mandriva).

Установка OOo 3.* (трёхслойный OpenOffice.org)

Начиная с DEV300m4, в OpenOffice.org есть три слоя (см. Three-Layer OOo). Это значит, что если мы распакуем пакеты RPM/DEB, у нас будет 2 директории:

  1. opt/openoffice.org (содержит нижний и средний слои: ure and basis)
  2. opt/ooo-dev3 (содержит верхний слой)

где возможно вам нужно заменить ooo-dev3 на другое имя продукта типа openoffice.org3.

Т.к. мы хотим установить OOo в самодостаточную папку (без интеграции с системой, со своим профилем, который не будет пересекаться с профилями других версий, то нам нужно всего лишь распаковать пакеты и переименовать эту директорию opt так чтобы три слоя по прежнему были вместе.

RPM пакеты

In the following example we will "install"

OOo-Dev_DEV300_m7_LinuxIntel_install_en-US.tar.gz

that has been downloaded in the directory

/home/user/download/ooo/

# cd to the folder where you downloaded the *.tar.gz file
# in this example we downloaded 
# the file OOo-Dev_DEV300_m7_LinuxIntel_install_en-US.tar.gz 
# in the folder /home/user/download/ooo/

~> cd download/ooo/

# make a temp dir to extract the file content
# in this example we name it TEMP_INST

~/download/ooo> mkdir TEMP_INST 

# cd to that temp folder

~/download/ooo> cd TEMP_INST/ 

# extract the file content

~/download/ooo/TEMP_INST> tar -zxvf ../OOo-Dev_DEV300_m7_LinuxIntel_install_en-US.tar.gz

With this commands we have unpacked the content of the tarball in the temporal directory.

We need now to cd the RPMS inside this root, where all the rpms are located.

# now we have to create another temp dir to extract all the RPMs files
# contained in the RPMS folder

~/download/ooo/TEMP_INST> cd DEV300_m7_native_packed-1_en-US.9293/RPMS/ 

# in the following we will shorten the dir name 
# instead of ~/download/ooo/TEMP_INST/DEV300_m7_native_packed-1_en-US.9293/RPMS>
# we will write ~/download/ooo/TEMP_INST/ DEV300_m7.../RPMS>

# make a temp dir where to extract OpenOffice.org installation root directory

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/DEV300_m7.../RPMS> cd TEMP_ROOT/

Notice that depending on the version, you may find two different naming schemes:

  1. openoffice.org-*.rpm for the lowest and middle layers
  2. ooo-dev-*.rpm for the top layer

So you can extract the RPMs in one or two steps:

# extract the RPMs in one step

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS/TEMP_ROOT> for i in ../o*.rpm; do rpm2cpio $i | cpio -id; done

Note that we do not use the wildcard for i in ../*.rpm, because the package may include the rpm for Java Runtime Environment (in this example, the package comes with jre-6u4-linux-i586.rpm), so using the wildcard ../o*.rpm we make sure that only the rpms sarting with "o" are extracted.

# extract the RPMs in two steps
# the lowest and middle layers

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS/TEMP_ROOT> for i in ../openoffice.org*.rpm; do rpm2cpio $i | cpio -id; done 

# extract the top layer

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS/TEMP_ROOT> for i in ../ooo-dev*.rpm; do rpm2cpio $i | cpio -id; done

With this procedures we will find in

/home/user/download/ooo/TEMP_INST/DEV300_m7_native_packed-1_en-US.9293/RPMS/TEMP_ROOT

an opt folder that contains two directories:

  1. /TEMP_ROOT/opt/ooo-dev3.0
  2. /TEMP_ROOT/opt/openoffice.org

this last folder contains in turn other two directories: basis3.0 and ure.

Now you just have to copy or move that opt directory wherever you want.

# in this example we "install" the new version on home/user/OOo_DEV300_m7

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS/TEMP_ROOT> mv opt ~/OOo_DEV300_m7

And finally remove all the temporary files

~/download/ooo/TEMP_INST/DEV300_m7.../RPMS/TEMP_ROOT> cd ~/download/ooo/
~download/ooo> rm -rf TEMP_INST/

DEB пакеты

In the following example we will "install"

OOo-Dev_DEV300_m7_LinuxIntel_install_en-US_deb.tar.gz

that has been downloaded in the directory

/home/user/download/ooo/

# cd to the folder where you downloaded the *.tar.gz file
# in this example we downloaded 
# the file OOo-Dev_DEV300_m7_LinuxIntel_install_en-US_deb.tar.gz 
# in the folder /home/user/download/ooo/

~> cd download/ooo/

# make a temp dir to extract the file content
# in this example we name it TEMP_INST

~/download/ooo> mkdir TEMP_INST 

# cd to that temp folder

~/download/ooo> cd TEMP_INST/ 

# extract the file content

~/download/ooo/TEMP_INST> tar -zxvf ../OOo-Dev_DEV300_m7_LinuxIntel_install_en-US_deb.tar.gz

With this commands we have unpacked the content of the tarball in the temporal directory.

We need now to cd the DEBS inside this root, where all the debs are located.

# now we have to create another temp dir to extract all the DEBs files
# contained in the DEBS folder

~/download/ooo/TEMP_INST> cd DEV300_m7_native_packed-1_en-US.9293/DEBS/ 

# in the following we will shorten the dir name 
# instead of ~/download/ooo/TEMP_INST/DEV300_m7_native_packed-1_en-US.9293/DEBS>
# we will write ~/download/ooo/TEMP_INST/DEV300_m7.../DEBS>

# make a temp dir where to extract OpenOffice.org installation root directory

~/download/ooo/TEMP_INST/DEV300_m7.../DEBS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/DEV300_m7 .../DEBS> cd TEMP_ROOT/

Notice that depending on the version, you may find two different naming schemes:

  1. openoffice.org-*.deb for the lowest and middle layers
  2. ooo-dev-*.deb for the top layer

So you can extract the DEBs in one or two steps:

# extract the DEBs in one step

~/download/ooo/TEMP_INST/DEV300_m7.../DEBS/TEMP_ROOT> for i in ../*.deb; do dpkg-deb -x $i . ; done
# extract the DEBs in two steps
# the lowest and middle layers

~/download/ooo/TEMP_INST/DEV300_m7.../DEBS/TEMP_ROOT> for i in ../openoffice.org*.deb; do dpkg-deb -x $i . ; done 

# extract the top layer
~/download/ooo/TEMP_INST/DEV300_m7.../DEBS/TEMP_ROOT> for i in ../ooo-dev*.deb; do dpkg-deb -x $i . ; done

With this procedure we will find in

/home/user/download/ooo/TEMP_INST/DEV300_m7_native_packed-1_en-US.9293/DEBS/TEMP_ROOT

an opt folder that contains two directories:

  1. /TEMP_ROOT/opt/ooo-dev3.0
  2. /TEMP_ROOT/opt/openoffice.org

this last folder contains in turn other two directories: basis3.0 and ure.

Now you just have to copy or move that opt directory wherever you want.

# in this example we "install" the new version on home/user/OOo_DEV300_m7

~/download/ooo/TEMP_INST/DEV300_m7.../DEBS/TEMP_ROOT> mv opt ~/OOo_DEV300_m7

And finally remove all the temporary files

~/download/ooo/TEMP_INST/DEV300_m7.../DEBS/TEMP_ROOT> cd ~/download/ooo/
~download/ooo> rm -rf TEMP_INST/

Настройки профиля для версий 3.*

Before running this new version, we have to make some changes in the configuration. The procedure is the same for RPM and DEB packages.

By default, an OpenOffice.org version will read and write in the corresponding user directory (for example, a stable OpenOffice.org 2.N version in /home/user/.openoffice.org2/, a developer snapshot in /home/user/.ooo-dev2/). This means that you can not run in parallel two versions that install as openoffice.orgN, or two as ooo-devN, because this could lead to inconsistencies.

To avoid this we must change OpenOffice.org configuration to look for the user's directory somewhere else: we will indicate the same installation root directory, this way we will have all together, being easier to deinstall later.

To do this we must edit the configuration file bootstraprc located in the program directory inside the top layer, in this example:

/home/user/OOo_DEV300_m7/ooo-dev3.0/program

As this file does not have write permission, change this first

> cd ~/OOo_DEV300_m7/ooo-dev3.0/program
~/OOo_DEV300_m7/ooo-dev3.0/program> chmod +w bootstraprc

Now you can open this file with your text editor and change the line starting with UserInstallation= as follows:

UserInstallation=$ORIGIN/..

The whole file may look then as follows:

[Bootstrap]
BaseInstallation=${OOO_BASE_DIR}
InstallMode=<installmode>
ProductKey=OOo-dev 3.0
UserInstallation=$ORIGIN/..
[ErrorReport]
ErrorReportPort=80
ErrorReportServer=report.services.openoffice.org

This way the user directory will be in the root directory of OpenOffice.org, and you can run several version in parallel.

Windows

On Windows, you must do a so-called administrative installation of your package. This is something available for all msi-based installations, and basically simply means extracting the .cab files which come with your installation.

If you have a all-in-one executable containing your installation set (one single .exe file having more than 100 MB, named e.g. OOo_2.4.237_Win32Intel_install.exe), you first allow it to extract itself. For this, simply start the executable - it will prompt you for where to extract the files. After extraction, it will automatically run the real installer - cancel it.

In the following, we assume you extracted it to c:\temp\install

Now, open a console (<Windows_Key>+R, following by typing "cmd<enter>", will do), there do a

 ...> c:
 c:\> cd \temp\install
 c:\temp\install> msiexec /a ooodev24.msi

(The above assumes there is a file ooodev24.msi in the given directory. The name changes with the version you're installing, but it should always be exactly one .msi file. Use this one's name.)

msiexec is a tool to, well, execute .msi files. The /a switch tells it to do an administrative install. It will start a UI, where you again are asked for the target location - choose a folder where you finally want to have OOo being installed. Then, click the "Install" button, wait a few minutes, and there you are.

side note for advanced users:

 msiexec /a ooodev24.msi TARGETDIR="c:\Program Files\OOoDev\m237" /qr

will install OOo into the folder "c:\Program Files\OOoDev\m237", without any further user interaction.

Beginning with DEV300m23, the necessary Microsoft Visual C++ runtime files are no longer contained in the installed OOo product, but are rather installed into the system during normal installation (see this interface-announce@openoffice.org mail). As this is not done during an administrative installation, you have to install the Microsoft Visual C++ 2008 Redistributable Package (x86) (or equivalent for different compiler versions) yourself.

Профиль

Like with the Linux version above, you need to make sure the user data of the just installed OOo version doesn't conflict with the user data of other installations. To do so, open the file <OOo_installation>\program\bootstrap.ini in a text editor of your choice, and locate the line

 UserInstallation=$SYSUSERCONFIG/OOo-dev2

(Again, the last part of this depends on the concrete version you installed, but there's only one line starting with UserInstallation.)

Change this to

 UserInstallation=$ORIGIN/..

The entire file may now look like this:

[Bootstrap]
BaseInstallation=${OOO_BASE_DIR}
InstallMode=<installmode>
ProductKey=OpenOffice.org 3.2
UserInstallation=$ORIGIN/..
[ErrorReport]
ErrorReportPort=80
ErrorReportServer=report.services.openoffice.org

Now, your user data will be put into a folder user right besides your program folder. Which has two advantages: Different version's user data don't clash anymore, and you can remove the complete installation, including your user data, by simply deleting the installation folder. Be aware, however, that now different people working on the same Windows machine will all work with the same user data, which is unlike a normal installation.

Настройки для автоматического тестирования

If you plan to use an installation for automated testing with VCLTestTool please check Wiki-page to learn what settings must be made.

To let VCLTestTool find the administrative installation it is required to adapt an option named 'OOoProgramDir'. Simply change this to the program-dir in the brand layer of your OpenOffice.org Installation

File:VCLTestTool-options-OOoProgramDir.png

Template:RU/documentation/signtransyear

Template:QaВottom