Difference between revisions of "Run OOo versions parallel"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Windows)
(Windows)
Line 88: Line 88:
 
   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.
 +
 +
=== 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 <code><OOo_installation>\program\bootstrap.ini</code> 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 <code>UserInstallation</code>.)
 +
 +
Change this to
 +
  UserInstallation=$ORIGIN/..
 +
 +
Now, your user data will be put into a folder <code>user</code> right besides your <code>program</code> 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.

Revision as of 06:37, 29 November 2007

How to run different OpenOffice.org versions in parallel

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 an 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 made be 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 compressed file. In fact, we won't install it but rather extract the files in an RPM version. Notice that we use an RPM version, but as we are extracting the files, it works also for Debian based distributions.

Before starting, you will need GNU tar (http://www.gnu.org/software/tar/) and GNU cpio (http://www.gnu.org/software/cpio/cpio.html).

# cd to the folder where you downloaded the *.tar.gz file
# in this example we downloaded 
# the file OOo_SRC680_m231_LinuxX86_install_es_rpm.tar.gz
# in the folder /home/user/download/ooo/
~> cd download/ooo/

# make a temp dir to extract the file content 
~/download/ooo> mkdir INSTooo231 

# cd to that temp folder 
~/download/ooo> cd INSTooo231/ 

# extract the file content 
~/download/ooo/INSTooo231> tar zxvf ./OOo_SRC680_m231_LinuxX86_install_es_rpm.tar.gz 

# now we have to create another temp dir to extract all the RPMs 
~/download/ooo/INSTooo231> cd RPMS/ 

# make a temp dir where to extract OpenOffice.org installation root directory
~/download/ooo/INSTooo231/RPMS> mkdir TEMP_ROOT 
~/download/ooo/INSTooo231/RPMS> cd TEMP_ROOT/ 

# extract the RPMs 
~/download/ooo/INSTooo231/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/INSTooo231/RPMS/TEMP_ROOT all the root directory: ~/download/ooo/INSTooo231/TEMP_ROOT/opt/openoffice.org2.3/

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


User directory configuration

Before running this new version, we have to make some changes in the configuration.

By default, an OpenOffice.org version will read and write in the corresponding user directory (for example, a stable OpenOffice.org 2.3 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

Edit the line starting with UserInstallation= as follows:

UserInstallation=$ORIGIN/../.openoffice.org2

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.

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

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.

Personal tools