2008-04-11 05:39:38 -05:00
|
|
|
#
|
2012-06-27 11:37:30 -05:00
|
|
|
# This file is part of the LibreOffice project.
|
2008-04-11 05:39:38 -05:00
|
|
|
#
|
2012-06-27 11:37:30 -05:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2008-04-11 05:39:38 -05:00
|
|
|
#
|
2012-06-27 11:37:30 -05:00
|
|
|
# This file incorporates work covered by the following license notice:
|
2008-04-11 05:39:38 -05:00
|
|
|
#
|
2012-06-27 11:37:30 -05:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed
|
|
|
|
# with this work for additional information regarding copyright
|
|
|
|
# ownership. The ASF licenses this file to you under the Apache
|
|
|
|
# License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
# except in compliance with the License. You may obtain a copy of
|
|
|
|
# the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
2008-04-11 05:39:38 -05:00
|
|
|
#
|
2005-09-23 05:50:58 -05:00
|
|
|
|
2006-03-09 03:49:40 -06:00
|
|
|
Adapting version after a release of an office
|
|
|
|
=============================================
|
|
|
|
After a release the entries in cli_ure/version/version.txt must be changed to reflect the versions
|
|
|
|
of the assemblies at the time of the release. Please refer to the document at
|
2006-11-06 08:08:31 -06:00
|
|
|
http://udk.openoffice.org/common/man/spec/assemblyversioning.html
|
2006-03-09 03:49:40 -06:00
|
|
|
for more information about versioning of assemblies.
|
2005-09-23 05:50:58 -05:00
|
|
|
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
Step 1: Remove old office installations.
|
2008-06-25 06:04:52 -05:00
|
|
|
|
2006-03-09 03:49:40 -06:00
|
|
|
To do this, deinstall all offices,
|
|
|
|
and make sure that there are no assemblies installed in the Global Assembly Cache (GAC). The GAC
|
|
|
|
is contained in C:\Windows\assembly. Change C:\Windows according to your windows installation.
|
|
|
|
Use the Windows Explorer to view the contents of the GAC. Are there any of the following assemblies
|
|
|
|
installed:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
cli_uretypes.dll
|
2006-03-09 03:49:40 -06:00
|
|
|
cli_basetypes.dll
|
|
|
|
cli_cppuhelper.dll
|
|
|
|
cli_ure.dll
|
2008-06-25 06:04:52 -05:00
|
|
|
cli_oootypes.dll (build in unoil)
|
2006-03-09 03:49:40 -06:00
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
policy.x.y.cli_uretypes.dll
|
2006-03-09 03:49:40 -06:00
|
|
|
policy.x.y.cli_basetypes.dll
|
|
|
|
policy.x.y.cli_ure.dll
|
|
|
|
policy.x.y.cli_cppuhelper.dll
|
2008-06-25 06:04:52 -05:00
|
|
|
policy.x.y.cli_oootypes.dll (build in unoil)
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
The "x" and "y" in the names of the policy assemblies are to be replaces by version numbers. At the
|
|
|
|
time of writing the real names are:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
policy.1.0.cli_uretypes.dll
|
2006-03-09 03:49:40 -06:00
|
|
|
policy.1.0.cli_basetypes.dll
|
|
|
|
policy.1.0.cli_ure.dll
|
|
|
|
policy.1.0.cli_cppuhelper.dll
|
2008-06-25 06:04:52 -05:00
|
|
|
policy.1.0.cli_ootypes.dll (build in unoil)
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
After deinstalling the offices, there should none of them remain in the GAC. If there are some, then
|
|
|
|
try to remove them by clicking on them an choose uninstall from the context menu of the mouse.
|
|
|
|
|
|
|
|
Step 2: Install the office of the last release (respin when using staroffice)
|
|
|
|
|
|
|
|
Step 3: Determine the versions of the assemblies
|
2008-06-25 06:04:52 -05:00
|
|
|
|
2006-03-09 03:49:40 -06:00
|
|
|
Use the Windows Explorer to view the contents of the Windows\assembly directory. Locate the assemblies
|
|
|
|
and policy assemblies. See step 1 for the names of those assemblies. Take down the version number as
|
|
|
|
can be found in the version column, which is usually right next to the name column.
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
Step 4: Changing the versions in the cli_ure module.
|
|
|
|
|
2006-03-09 03:49:40 -06:00
|
|
|
Open the file cli_ure\version\version.txt.
|
2008-06-25 06:04:52 -05:00
|
|
|
The file contains name/value pairs, such as:CLI_URETYPES_NEW_VERSION=1.0.3.0.
|
2006-03-09 03:49:40 -06:00
|
|
|
The first part of the names represent the assemly which they are referring to. So obviously
|
2008-06-25 06:04:52 -05:00
|
|
|
entries starting with CLI_URETYPES refer to the cli_uretypes.dll. Entries which contain the part "POLICY" refer
|
2006-03-09 03:49:40 -06:00
|
|
|
to the policy assembly. For example:
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_POLICY_VERSION refers to the policy assembly for cli_uretypes which is named
|
|
|
|
policy.1.0.cli_uretypes.dll
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
The versions may already have been incremented because someone has changed code after the
|
|
|
|
last release. So if a version from version.txt is greater then the one of the respective
|
|
|
|
assembly in the GAC then leave it at that.
|
|
|
|
|
|
|
|
The values have to be adjusted as follows:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
XYZ_NEW_VERSION : increse the value of the version
|
|
|
|
GAC. "XYZ_" would be "CLI_URETYPES", "CLI_URE", etc.
|
2006-03-09 03:49:40 -06:00
|
|
|
XYZ_OLD_VERSION : must be changes so that the right version part is one less than
|
|
|
|
XYZ_NEW_VERSION. For example
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=1.0.[3].0
|
|
|
|
CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.[2].0
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
The affected part is marked by the brackets.
|
|
|
|
|
|
|
|
XYZ_POLICY_VERSION: change the version according to the version of the policy assembly from the
|
|
|
|
GAC.
|
|
|
|
|
|
|
|
XYZ_POLICY_ASSEMBLY: remain unchanged.
|
|
|
|
|
|
|
|
Commit the changes and rebuild the project.
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
Step 5: Changing the versions in the unoil module
|
|
|
|
|
|
|
|
The unoil module builds the cli_oootypes.dll which contains the office types (offapi). Change the contents
|
|
|
|
of unoil/climaker/version.txt similar to the versions.txt in this module. Then rebuild the module
|
2006-03-09 03:49:40 -06:00
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
//======
|
2006-03-09 03:49:40 -06:00
|
|
|
The automatic test in cli_ure/qa/versioning should be extended. See the readme.txt in that directory
|
|
|
|
for more information.
|
2008-06-25 06:04:52 -05:00
|
|
|
//=====
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
How does the version mechanism works
|
|
|
|
====================================
|
|
|
|
|
|
|
|
The assemblies which are build in this project have a strong name and hence a version. The version should
|
|
|
|
be increased whenever something was fixed or the code has changed in any way. For further information
|
|
|
|
have a look at
|
|
|
|
http://udk.openoffice.org/common/man/spec/assemblyversioning.html
|
|
|
|
|
|
|
|
The versions of all assemblies are contained in cli_ure/version/version.txt. This is the place where
|
|
|
|
the versions are changed. This will happen under two circumstances. First, the versions are
|
|
|
|
adjusted AFTER an office was released. The version.txt must then contain the versions at the
|
|
|
|
time of the release. Second, when something was fixed. Then a version should be changed unless
|
|
|
|
this has already be done for the next release. Please look at the document mentioned further
|
|
|
|
above.
|
|
|
|
|
|
|
|
If new published UNO types have been added since the last release (product update) then the
|
2008-06-25 06:04:52 -05:00
|
|
|
minor version of cli_uretypes.dll should be incremented. When building the version directory, a script
|
2006-03-09 03:49:40 -06:00
|
|
|
is run that recognizes this and writes a cliureversion.mk file in the bin directory.
|
|
|
|
cliureversion.mk contains all the entries of version.txt. The versions have been incremented
|
|
|
|
by the script. The script obtains the information of new types from unotype_statistics.txt
|
|
|
|
which is build in offapi.
|
|
|
|
|
|
|
|
The contents of cliureversion.mk is used when building the assemblies in this project. It
|
|
|
|
is also delivered so that instset_native (or instsetoo_native) can use it when building
|
|
|
|
the installation sets.
|
|
|
|
|
|
|
|
|
|
|
|
The contents of version.txt
|
|
|
|
===========================
|
|
|
|
The entries in version.txt are needed for building the assemblies and for building the
|
|
|
|
installation set (msi database).
|
|
|
|
|
|
|
|
For every assembly exist four
|
|
|
|
entries. For example:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=1.0.3.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.2.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=3.0.0.0
|
|
|
|
CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
The meaning of these entries is the following:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION represents the current version of the assembly.
|
2006-03-09 03:49:40 -06:00
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_OLD_VERSION represents a range of former versions (which were compatible).
|
2006-03-09 03:49:40 -06:00
|
|
|
It has to be placed in the
|
2008-06-25 06:04:52 -05:00
|
|
|
cli_uretypes.config XML file which is part of the policy assembly. This is done automatically.
|
2006-03-09 03:49:40 -06:00
|
|
|
The XYZ_OLD_VERSION and XYZ_NEW_VERSION values are used for the binding redirection of
|
|
|
|
the policy file.
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_POLICY_VERSION represents the version of the policy file.
|
2006-03-09 03:49:40 -06:00
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_POLICY_ASSEMBLY represents the name of the policy file.
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
Please refer to the document at
|
|
|
|
http://udk.openoffice.org/common/man/spec/assemblyversioning.html
|
|
|
|
about how the versions have to look like.
|
|
|
|
|
|
|
|
When the minor version is changed, which is the third number from the left, the
|
|
|
|
"old version" and the policy version must be changed as well. Using the former example,
|
|
|
|
an incremented version would look like this:
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=1.0.4.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=4.0.0.0
|
|
|
|
CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
If the major version changed we would have these values:
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=2.0.0.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.0.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=1.0.0.0
|
|
|
|
CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
Because a change of a major is only done if the code has changed incompatibly, we must not
|
|
|
|
redirect old client code to the new assembly. Actually we would not need a policy file here.
|
|
|
|
The name of the policy file has changed as well so as to refer to the new version. Since
|
2008-06-25 06:04:52 -05:00
|
|
|
the name is new and refers to the version 2 auf cli_uretypes, we can start with the policy version
|
2006-03-09 03:49:40 -06:00
|
|
|
from 1.
|
|
|
|
|
|
|
|
The next compatible change would require to change the version to these:
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=2.0.1.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.1.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=2.0.0.0
|
|
|
|
CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
|
|
|
|
Automatic incrementation of the version
|
|
|
|
=======================================
|
2007-01-02 07:47:34 -06:00
|
|
|
Currently switched off! See cli_ure/version/makefile.mk
|
2006-03-09 03:49:40 -06:00
|
|
|
The automatic incrementation of the version this is done when new published types have been
|
|
|
|
introduce between two releases.In cli_ure/version/makefile.mk the script
|
|
|
|
cli_ure/source/scripts/increment_version.pl
|
|
|
|
is run which creates the cliureversion.mk with the new versions. This automatism only changes
|
|
|
|
the version parts which have the meaning of a compatible change. Which versions are to be
|
|
|
|
incremented is contained in cli_ure/version/incversions.txt. It contains, for example these entries:
|
|
|
|
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION
|
|
|
|
CLI_URETYPES_OLD_VERSION
|
|
|
|
CLI_URETYPES_POLICY_VERSION
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
The names are exactly the same as in version.txt. The script knows how to increase the version
|
|
|
|
of the different types:
|
|
|
|
|
|
|
|
Entries ending on _NEW_VERSION: The third number from the left is incremented.
|
|
|
|
Entries ending on _OLD_VERSION: The third number from the left of the second version is incremented.
|
|
|
|
Entries ending on _POLICY_VERSION: The first number from the left is incremented.
|
|
|
|
|
|
|
|
For example, the versions in version.txt are:
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=1.0.4.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=4.0.0.0
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
If new types have been added the script would create these entries in cliureversion.mk
|
2008-06-25 06:04:52 -05:00
|
|
|
CLI_URETYPES_NEW_VERSION=1.0.5.0
|
|
|
|
CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.4.0
|
|
|
|
CLI_URETYPES_POLICY_VERSION=5.0.0.0
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
As one can see from the incversions.txt, the versions of the cli_ure.dll and cli_cppuhelper.dll
|
2008-06-25 06:04:52 -05:00
|
|
|
are also changed. This is because these are dependent on cli_uretypes.dll.
|
2006-03-09 03:49:40 -06:00
|
|
|
|
|
|
|
|
|
|
|
Further notes on increasing the assembly versions
|
|
|
|
================================
|
|
|
|
Changing a version for one assembly means changing
|
|
|
|
at least the XYZ_NEW_VERSION, XYZ_OLD_VERSION and XYZ_POLICY_VERSION. In case of an incompatible
|
|
|
|
change, that is one of the first two numbers of the version has been changed, the XYZ_POLICY_ASSEMBLY
|
|
|
|
must also be changed.
|
|
|
|
|
|
|
|
When changing a version of an assembly then the versions of the assemblies which depend on it should
|
2008-06-25 06:04:52 -05:00
|
|
|
be changed as well. For example, when changing the version of cli_uretypes.dll, then the versions of
|
2006-03-09 03:49:40 -06:00
|
|
|
cli_ure.dll and cli_cppuhelper.dll should be changed as well. One can use idlasm.exe to see which
|
|
|
|
assemblies are referenced by an assembly. The information is contained in the assemblie's manifest.
|
|
|
|
|
|
|
|
If one would not change the versions of the dependent dlls then one would risk that an assembly
|
|
|
|
has the same old version but references a different assembly. For example, say we have a
|
2008-06-25 06:04:52 -05:00
|
|
|
cli_uretypes.dll with version 1 and a cli_ure.dll with version 1. cli_ure.dll references version 1 of
|
|
|
|
cli_uretypes.dll. Now the version of cli_uretypes.dll changes to version 2 and its policy assembly is
|
2006-03-09 03:49:40 -06:00
|
|
|
adapted so that all code that uses version 1 now uses version 2. This would also allow cli_ure.dll
|
2008-06-25 06:04:52 -05:00
|
|
|
o run with the new cli_uretypes.dll. If now cli_ure.dll is build, then it would reference
|
|
|
|
cli_uretypes.dll version 2, because our build environment does not keep the older assembly. The old
|
|
|
|
cli_uretypes.dll version 1 was replaced by version 2. cli_ure.dll now references cli_uretypes.dll version 2
|
2006-03-09 03:49:40 -06:00
|
|
|
but still has the old version.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rebasing of assemblies
|
|
|
|
=======================================================
|
|
|
|
Neither assemblies nor policy assemblies may be rebased. This would
|
|
|
|
make the signature invalid. Therefore all assemblies must be contained
|
2008-06-25 06:04:52 -05:00
|
|
|
in postprocess/rebase/no_rebase.txt
|