Difference between revisions of "RU/development/qa/run ooo versions parallel"
(Применён шаблон {{OOo}}) |
(Применён шаблон {{OOo}}) |
||
Line 295: | Line 295: | ||
side note for advanced users: | side note for advanced users: | ||
msiexec /a ooodev24.msi TARGETDIR="c:\Program Files\OOoDev\m237" /qr | 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. | + | will install {{OOo}} into the folder "c:\Program Files\OOoDev\m237", without any further user interaction. |
Beginning with <code>DEV300m23</code>, 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 [http://www.openoffice.org/servlets/ReadMsg?list=interface-announce&msgNo=1173 this interface-announce@openoffice.org mail]). As this is not done during an administrative installation, you have to install the [http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF Microsoft Visual C++ 2008 Redistributable Package (x86)] (or equivalent for different compiler versions) yourself. | Beginning with <code>DEV300m23</code>, 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 [http://www.openoffice.org/servlets/ReadMsg?list=interface-announce&msgNo=1173 this interface-announce@openoffice.org mail]). As this is not done during an administrative installation, you have to install the [http://www.microsoft.com/downloads/details.aspx?familyid=9B2DA534-3E03-4391-8A4D-074B9F2BC1BF Microsoft Visual C++ 2008 Redistributable Package (x86)] (or equivalent for different compiler versions) yourself. |
Revision as of 20:14, 2 May 2010
ja:JA/QA/Run_OOo_versions_parallel sl:SL/Run_OOo_versions_parallel de:DE/Run_OOo_versions_parallel
Template:RU/documentation/helpneeded
Для улучшения OpenOffice.org не обязательно быть программистом, вы можете помогать исправлять ошибки просто установив DEV сборку и используя её как вы обычно это делаете, и докладывать об обнаруженных ошибках.
Обычно, каждая версия устанавливается в свою папку (к примеру, /opt на Linux, Program Files на Windows), например, стабильная сборка OpenOffice.org 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 сборок или хотите сохранить в системе старые стабильные сборки, обычный способ установки не позволит этого, т.к. одна версия перезапишет другую.
Тут мы объясним, каким способом можно установить параллельно несколько разных сборок.
Contents
Linux
В этой части мы покажем, как "установить" любую версию OpenOffice.org, распространяемую в пакетах RPM или DEB. На самом деле, мы не будем ничего устанавливать, а просто распакуем пакеты.
Заметьте, что с этим методом не имеет значения, распаковывали вы RPM или DEB, и не имет значения, какой формат пакетов использует ваш дистрибутив Linux (т.е., вы можете распаковать RPM пакеты на Debian, или DEB пакеты на Gentoo).
Установка OpenOffice.org 3.* (трёхслойный OpenOffice.org)
Начиная с DEV300m4, в OpenOffice.org есть три слоя (см. Three-Layer OOo). Это значит, что если мы распакуем пакеты RPM/DEB, у нас будет 2 директории:
opt/openoffice.org
(содержит нижний и средний слои:ure
andbasis
)opt/openoffice.org3
(содержит верхний слой)
где возможно вам нужно заменить openoffice.org
на другое имя продукта типа ooo-dev
.
Т.к. мы хотим установить OpenOffice.org в самодостаточную папку (без интеграции с системой, со своим профилем, который не будет пересекаться с профилями других версий), то нам нужно всего лишь распаковать пакеты и переименовать эту директорию opt
так чтобы три слоя по прежнему были вместе.
RPM пакеты
В следующем примере мы "установим"
OOo-Dev_DEV300m77_Linux_x86_install-rpm_en-US.tar.gz
который был закачан в папку
/home/user/download/ooo/
# cd to the folder where you downloaded the *.tar.gz file
# in this example we downloaded
# the file OOo-Dev_DEV300m77_Linux_x86_install-rpm_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_DEV300m77_Linux_x86_install-rpm_en-US.tar.gz
Этими командами мы распаковали содержимое пакетов во временную папку.
Теперь нам нужно перейти в папку RPMS.
# 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_m77_native_packed-2_en-US.9496/RPMS/
# in the following we will shorten the dir name
# instead of ~/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/RPMS>
# we will write ~/download/ooo/TEMP_INST/ DEV300_m77.../RPMS>
# make a temp dir where to extract OpenOffice.org installation root directory
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS> mkdir TEMP_ROOT
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS> cd TEMP_ROOT/
Заметьте, что в зависимости от версии могут быть разные схемы именований файлов.
Распаковать RPM можно за 1 или 2 шага:
# extract the RPMs in one step
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../o*.rpm; do rpm2cpio $i | cpio -id; done
Заметьте, мы использовали звёздочку так for i in ../o*.rpm
, т.к. среди пакетов может находится пакет с Java Runtime Environment (в данном примере, пакет с JRE называется jre-6u19-linux-i586.rpm
), поэтому ../o*.rpm
говорит, что нужно распаковывать пакеты с "o" вначале имени файла.
# extract the RPMs in two steps
# the lowest and middle layers
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../openoffice.org*.rpm; do rpm2cpio $i | cpio -id; done
# extract the top layer
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> for i in ../ooo-dev*.rpm; do rpm2cpio $i | cpio -id; done
Теперь мы можем обнаружить в папке
/home/user/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/RPMS/TEMP_ROOT
папку opt
, в которой есть 2 папки:
/TEMP_ROOT/opt/ooo-dev3
/TEMP_ROOT/opt/ooo-dev
последняя содержит ещё 2 папки: basis3.3
and ure
.
Теперь всего лишь нужно скопировать или переместить эту папку opt куда угодно.
# in this example we "install" the new version on home/user/OOo_DEV300_m77
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> mv opt ~/OOo_DEV300_m77
И наконец, удалим все временные файлы:
~/download/ooo/TEMP_INST/DEV300_m77.../RPMS/TEMP_ROOT> cd ~/download/ooo/
~download/ooo> rm -rf TEMP_INST/
DEB пакеты
В следующем примере мы "установим" сборку
OOo-Dev_DEV300m77_Linux_x86_install-deb_en-US.tar.gz
закачанную в папку
/home/user/download/ooo/
# cd to the folder where you downloaded the *.tar.gz file
# in this example we downloaded
# the file OOo-Dev_DEV300m77_Linux_x86_install-deb_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_DEV300m77_Linux_x86_install-deb_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 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_m77_native_packed-2_en-US.9496/DEBS/
# in the following we will shorten the dir name
# instead of ~/download/ooo/TEMP_INST/DEV300_m77_native_packed-2_en-US.9496/DEBS>
# we will write ~/download/ooo/TEMP_INST/DEV300_m77.../DEBS>
# make a temp dir where to extract OpenOffice.org installation root directory
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS> mkdir TEMP_ROOT
~/download/ooo/TEMP_INST/DEV300_m77 .../DEBS> cd TEMP_ROOT/
Notice that depending on the version, you may find two different naming schemes:
openoffice.org-*.deb
for the lowest and middle layersooo-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_m77.../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_m77.../DEBS/TEMP_ROOT> for i in ../openoffice.org*.deb; do dpkg-deb -x $i . ; done
# extract the top layer
~/download/ooo/TEMP_INST/DEV300_m77.../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_m77_native_packed-2_en-US.9496/DEBS/TEMP_ROOT
an opt
folder that contains two directories:
/TEMP_ROOT/opt/ooo-dev3
/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_m77
~/download/ooo/TEMP_INST/DEV300_m77.../DEBS/TEMP_ROOT> mv opt ~/OOo_DEV300_m77
И наконец, удалим все временные файлы.
~/download/ooo/TEMP_INST/DEV300_m77.../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_m77/ooo-dev3/program
As this file does not have write permission, change this first
> cd ~/OOo_DEV300_m77/ooo-dev3/program
~/OOo_DEV300_m77/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 OpenOffice.org 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 OpenOffice.org 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 OpenOffice.org 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 OpenOffice.org 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