How to run different OpenOffice.org versions in parallel

From Apache OpenOffice Wiki
Jump to: navigation, search


Documentation caution.png This document may no longer be completely valid for OpenOffice.org 3.x Also See: Create an unattended / silent install of OpenOffice.org 3 on the OpenOffice.org User Forum. Posted: Thu Mar 18, 2010


To participate in OpenOffice.org you do not need to be a programmer: you can help to fix OpenOffice.org bugs as soon as possible by simply installing a developer snapshot and using it as you usually do.

Usually every version comes in an installable file that installs in the same directory as previous versions: for example a stable version, let's say OpenOffice.org 2.3.1, will install on a directory like /opt/openoffice.org2.3/ (*nix systems) and C:\Program Files\OpenOffice.org 2.3\ (Windows, where the folder "Program Files" has usually a localized name), while a developer snapshot will install in /opt/ooo-dev2.3/ (*nix systems) and C:\Program Files\OOo-dev 2.3\ (Windows).

This has some drawbacks: you may want to install different developer snapshots, or also want to keep your "old" stable version of OpenOffice.org. A new stable or developer version will install in the corresponding folder, replacing the current installation (on Windows this will be done by the installer, on *nix systems you will have to deinstall old versions before installing new ones).

To avoid this we will explain how to install different OpenOffice.org versions and run them in parallel.


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).

Installing 2.* versions

RPM packages

Before starting, make sure you have GNU tar (http://www.gnu.org/software/tar/), rpm2cpio (http://www.rpm.org/) and GNU cpio (http://www.gnu.org/software/cpio/cpio.html).

In the following example we will "install"

OOo_2.4.0_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_2.4.0_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_2.4.0_LinuxIntel_install_en-US.tar.gz

With this commands we have unpacked the content of the tarball in the temporal directory. Note that the directory structure we may find varies in different OpenOffice.org versions; older versions unpacked the RPMS directory in the root (in this example download/ooo/TEMP_INST/RPMS/).

Recent versions have a root directory named according to the build number; in our example the root directory is OOH680_m12_native_packed-1_en-US.9286.

We need 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
# Some older versions created only a RPMS folder in the dir
# where we unpacked, for example download/ooo/TEMP_INST/RPMS/
# In this example the root directory begins with the build name
 
~/download/ooo/TEMP_INST> cd OOH680_m12_native_packed-1_en-US.9286/RPMS/ 
 
# in the following we will shorten the dir name
# instead of ~/download/ooo/TEMP_INST/OOH680_m12_native_packed-2_en-US.9276/RPMS>
# we will write ~/download/ooo/TEMP_INST/OOH680_m12 .../RPMS>
 
# make a temp dir where to extract OpenOffice.org installation root directory
 
~/download/ooo/TEMP_INST/OOH680_m12.../RPMS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/OOH680_m12.../RPMS> cd TEMP_ROOT/ 
 
# extract the RPMs
 
~/download/ooo/TEMP_INST/OOH680_m12.../RPMS/TEMP_ROOT> for i in ../openoffice.org*.rpm; do rpm2cpio $i | cpio -id; done

With this procedure we will find in

/home/user/download/ooo/TEMP_INST/OOH680_m12_native_packed-1_en-US.9286/RPMS/TEMP_ROOT

all the root directory:

~/download/ooo/TEMP_INST/OOH680_m12_native_packed-1_en-US.9286/RPMS/TEMP_ROOT/opt/openoffice.org2.4/

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

~/download/ooo/TEMP_INST/OOH680_m12.../RPMS/TEMP_ROOT>cd opt
 
# make sure not to precede "opt" with a slash, as in /opt
# because this will point to the folder where resides the main installation
# in /opt/openoffice.org2.4/
 
# in this example we "install" the new version on home/user/openoffice.org2.4
 
~/download/ooo/TEMP_INST/OOH680_m12.../RPMS/TEMP_ROOT/opt> mv openoffice.org2.4 ~

And finally remove all the temporary files

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

DEB packages

In the following example we will "install"

OOo_2.4.0_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_2.4.0_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_2.4.0_LinuxIntel_install_en-US_deb.tar.gz

With this commands we have unpacked the content of the tarball in the temporal directory. Note that the directory structure we may find varies in different OpenOffice.org versions; older versions unpacked the DEBS directory in the root (in this example download/ooo/TEMP_INST/DEBS/).

Recent versions have a root directory named according to the build number; in our example the root directory is OOH680_m12_native_packed-1_en-US.9286.

We need 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 OOH680_m12_native_packed-1_en-US.9286/DEBS/ 
 
# in the following we will shorten the dir name
# instead of ~/download/ooo/TEMP_INST/OOH680_m12_native_packed-2_en-US.9276/DEBS>
# we will write ~/download/ooo/TEMP_INST/OOH680_m12 .../DEBS>
 
# make a temp dir where to extract OpenOffice.org installation root directory
 
~/download/ooo/TEMP_INST/OOH680_m12.../DEBS> mkdir TEMP_ROOT 
~/download/ooo/TEMP_INST/OOH680_m12.../DEBS> cd TEMP_ROOT/ 
 
# extract the DEBs 
 
~/download/ooo/TEMP_INST/OOH680_m12.../DEBS/TEMP_ROOT> for i in ../openoffice.org*.deb; do dpkg-deb -x $i . ; done

With this procedure we will find in

/home/user/download/ooo/TEMP_INST/OOH680_m12_native_packed-1_en-US.9286/DEBS/TEMP_ROOT

all the root directory:

~/download/ooo/TEMP_INST/OOH680_m12_native_packed-1_en-US.9286/DEBS/TEMP_ROOT/opt/openoffice.org2.4/

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

~/download/ooo/TEMP_INST/OOH680_m12.../DEBS/TEMP_ROOT>cd opt
 
# make sure not to precede "opt" with a slash, as in /opt
# because this will point to the folder where resides the main installation
# in /opt/openoffice.org2.4/
 
# in this example we "install" the new version on home/user/openoffice.org2.4
 
~/download/ooo/TEMP_INST/OOH680_m12.../DEBS/TEMP_ROOT/opt> mv openoffice.org2.4 ~

And finally remove all the temporary files

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

Once all this is done, to run OpenOffice 2.4, you'll need to cd to the /openoffice.org2.4/program/ folder then run the program with ./soffice or ./swriter etc. You can of course create a desktop or menu shortcut to do the same thing.

So:

cd ~/openoffice.org2.4/program/
And then:
./soffice

You might like to add the language packs that correspond to your parallel installation. If so, then it is just a question of running the dpkg command inside the same directory you installed OOo to, with the correct path indicated for the decompressed language pack. So, if you're in TEMP_INST, as above, and you've downloaded the language pack, first you'll have to do:

~/download/ooo/TEMP_INST> tar -zxvf ../OOo_your_language_pack_deb.tar.gz

which will put the decompressed your_language_pack in the TEMP_INST directory. Then, once dpkg has been run for the program itself, and supposing you're now in TEMP_ROOT as above:

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

where ../../../OOo_your_language_pack/DEBS/*.deb gives the path to the OOo_your_language_pack .deb files, i.e. back to TEMP_INST folder: (../../../) then into the language pack: OOo_your_language_pack/DEBS/

User directory configuration for 2.* versions

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 located in $OO_INST_ROOT_DIR/program/bootstraprc

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

~> cd openoffice.org2.4/program/
~/openoffice.org2.4/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=$ORIGIN/..
InstallMode=<installmode>
ProductKey=OpenOffice.org 2.4
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.


Installing 3.* versions (three layer OpenOffice.org)

Starting with DEV300m4, OpenOffice.org has three layers (see Three-Layer OOo). This means that when we extract the RPM/DEB packages, we will find two directories:

  1. opt/openoffice.org (contains the lowest and the middle layers: ure and basis)
  2. opt/ooo-dev3.0 (contains the top layer)

where you have to replace ooo-dev3.0 with the product name, for example openoffice.org3.0.

As we want to create a completely self-contained installation (without any system/desktop integration, and with its own user directory), we only need to extract the packages and then rename this opt directory so that the three layers are kept together.

RPM packages

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 packages

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/

User directory configuration for 3.* versions

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.

Alternative proceeding using batch-file

Instead of all that console typing you also can simply create a document "install.bat", what can be used again and again with small modifications und is much more comfortable than typing long path names with DOS console. The document needs following contents (all in 1 line):

msiexec /a "C:<Sourcepath>\openoffice410.msi" TARGETDIR="C:\<Targetpath>\<revnr_date>\" /L*V "AOO4.log"
  1. Copy install.bat to the folder to what you have unzipped the installation.exe (with name similar to Apache_OpenOffice_4.1.0_Win_x86_install_en-US.exe_1559545.exe (where you find the openoffice410.msi)
  2. In WIN Files Explorer rightclick -> Edit install.bat (will open the document for edits)
  3. copy from WIN Files Explorer Path of install.bat and paste into install.bat to replace <Sourcepath>
  4. Replace <Targetpath> by the path to where you want to install AOO (Example: C:\AOO_Server_\410
  5. Replace <revno_date> by the rev.-no (here 1559545) and the date when you downloaded the x86_install; only recommendation, you can use different path names!
  6. Close and save install.bat
  7. Execute install.bat with a double click
    1. With few confirmation ok installation will proceed, and the AOO4.log might help if you observe problems later.



User Configuration

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.

Adapt changes for automated testing

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

VCLTestTool-options-OOoProgramDir.png

Personal tools