xref: /aoo42x/main/cli_ure/readme.txt (revision cdf0e10c)
1*cdf0e10cSrcweir#*************************************************************************
2*cdf0e10cSrcweir#
3*cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir#
5*cdf0e10cSrcweir# Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir#
7*cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir#
9*cdf0e10cSrcweir# This file is part of OpenOffice.org.
10*cdf0e10cSrcweir#
11*cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir#
15*cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir#
21*cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir#
26*cdf0e10cSrcweir# ************************************************************************/
27*cdf0e10cSrcweir
28*cdf0e10cSrcweirAdapting version after a release of an office
29*cdf0e10cSrcweir=============================================
30*cdf0e10cSrcweirAfter a release the entries in cli_ure/version/version.txt must be changed to reflect the versions
31*cdf0e10cSrcweirof the assemblies at the time of the release. Please refer to the document at
32*cdf0e10cSrcweirhttp://udk.openoffice.org/common/man/spec/assemblyversioning.html
33*cdf0e10cSrcweirfor more information about versioning of assemblies.
34*cdf0e10cSrcweir
35*cdf0e10cSrcweir
36*cdf0e10cSrcweirStep 1: Remove old office installations.
37*cdf0e10cSrcweir
38*cdf0e10cSrcweirTo do this, deinstall all offices,
39*cdf0e10cSrcweirand make sure that there are no assemblies installed in the Global Assembly Cache (GAC). The GAC
40*cdf0e10cSrcweiris contained in  C:\Windows\assembly. Change C:\Windows according to your windows installation.
41*cdf0e10cSrcweirUse the Windows Explorer to view the contents of the GAC. Are there any of the following assemblies
42*cdf0e10cSrcweirinstalled:
43*cdf0e10cSrcweir
44*cdf0e10cSrcweircli_uretypes.dll
45*cdf0e10cSrcweircli_basetypes.dll
46*cdf0e10cSrcweircli_cppuhelper.dll
47*cdf0e10cSrcweircli_ure.dll
48*cdf0e10cSrcweircli_oootypes.dll (build in unoil)
49*cdf0e10cSrcweir
50*cdf0e10cSrcweirpolicy.x.y.cli_uretypes.dll
51*cdf0e10cSrcweirpolicy.x.y.cli_basetypes.dll
52*cdf0e10cSrcweirpolicy.x.y.cli_ure.dll
53*cdf0e10cSrcweirpolicy.x.y.cli_cppuhelper.dll
54*cdf0e10cSrcweirpolicy.x.y.cli_oootypes.dll (build in unoil)
55*cdf0e10cSrcweir
56*cdf0e10cSrcweirThe "x" and "y" in the names of the policy assemblies are to be replaces by version numbers. At the
57*cdf0e10cSrcweirtime of writing the real names are:
58*cdf0e10cSrcweir
59*cdf0e10cSrcweirpolicy.1.0.cli_uretypes.dll
60*cdf0e10cSrcweirpolicy.1.0.cli_basetypes.dll
61*cdf0e10cSrcweirpolicy.1.0.cli_ure.dll
62*cdf0e10cSrcweirpolicy.1.0.cli_cppuhelper.dll
63*cdf0e10cSrcweirpolicy.1.0.cli_ootypes.dll (build in unoil)
64*cdf0e10cSrcweir
65*cdf0e10cSrcweirAfter deinstalling the offices, there should none of them remain in the GAC. If there are some, then
66*cdf0e10cSrcweirtry to remove them by clicking on them an choose uninstall from the context menu of the mouse.
67*cdf0e10cSrcweir
68*cdf0e10cSrcweirStep 2: Install the office of the last release (respin when using staroffice)
69*cdf0e10cSrcweir
70*cdf0e10cSrcweirStep 3: Determine the versions of the assemblies
71*cdf0e10cSrcweir
72*cdf0e10cSrcweirUse the Windows Explorer to view the contents of the Windows\assembly directory. Locate the assemblies
73*cdf0e10cSrcweirand policy assemblies. See step 1 for the names of those assemblies. Take down the version number as
74*cdf0e10cSrcweircan be found in the version column, which is usually right next to the name column.
75*cdf0e10cSrcweir
76*cdf0e10cSrcweirStep 4: Changing the versions in the cli_ure module.
77*cdf0e10cSrcweir
78*cdf0e10cSrcweirOpen the file cli_ure\version\version.txt.
79*cdf0e10cSrcweirThe file contains name/value pairs, such as:CLI_URETYPES_NEW_VERSION=1.0.3.0.
80*cdf0e10cSrcweirThe first part of the names represent the assemly which they are referring to. So obviously
81*cdf0e10cSrcweirentries starting with CLI_URETYPES refer to the cli_uretypes.dll. Entries which contain the part "POLICY" refer
82*cdf0e10cSrcweirto the policy assembly. For example:
83*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION refers to the policy assembly for cli_uretypes which is named
84*cdf0e10cSrcweirpolicy.1.0.cli_uretypes.dll
85*cdf0e10cSrcweir
86*cdf0e10cSrcweirThe versions may already have been incremented because someone has changed code after the
87*cdf0e10cSrcweirlast release. So if a version from version.txt is greater then the one of the respective
88*cdf0e10cSrcweirassembly in the GAC then leave it at that.
89*cdf0e10cSrcweir
90*cdf0e10cSrcweirThe values have to be adjusted as follows:
91*cdf0e10cSrcweir
92*cdf0e10cSrcweirXYZ_NEW_VERSION : increse the value of the version
93*cdf0e10cSrcweirGAC. "XYZ_" would be "CLI_URETYPES", "CLI_URE", etc.
94*cdf0e10cSrcweirXYZ_OLD_VERSION : must be changes so that the right version part is one less than
95*cdf0e10cSrcweirXYZ_NEW_VERSION. For example
96*cdf0e10cSrcweir
97*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=1.0.[3].0
98*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.[2].0
99*cdf0e10cSrcweir
100*cdf0e10cSrcweirThe affected part is marked by the brackets.
101*cdf0e10cSrcweir
102*cdf0e10cSrcweirXYZ_POLICY_VERSION: change the version according to the version of the policy assembly from the
103*cdf0e10cSrcweirGAC.
104*cdf0e10cSrcweir
105*cdf0e10cSrcweirXYZ_POLICY_ASSEMBLY: remain unchanged.
106*cdf0e10cSrcweir
107*cdf0e10cSrcweirCommit the changes and rebuild the project.
108*cdf0e10cSrcweir
109*cdf0e10cSrcweirStep 5: Changing the versions in the unoil module
110*cdf0e10cSrcweir
111*cdf0e10cSrcweirThe unoil module builds the cli_oootypes.dll which contains the office types (offapi). Change the contents
112*cdf0e10cSrcweirof unoil/climaker/version.txt similar to the versions.txt in this module. Then rebuild the module
113*cdf0e10cSrcweir
114*cdf0e10cSrcweir//======
115*cdf0e10cSrcweirThe automatic test in cli_ure/qa/versioning should be extended. See the readme.txt in that directory
116*cdf0e10cSrcweirfor more information.
117*cdf0e10cSrcweir//=====
118*cdf0e10cSrcweir
119*cdf0e10cSrcweir
120*cdf0e10cSrcweir
121*cdf0e10cSrcweir
122*cdf0e10cSrcweir
123*cdf0e10cSrcweir
124*cdf0e10cSrcweirHow does the version mechanism works
125*cdf0e10cSrcweir====================================
126*cdf0e10cSrcweir
127*cdf0e10cSrcweirThe assemblies which are build in this project have a strong name and hence a version. The version should
128*cdf0e10cSrcweirbe increased whenever something was fixed or the code has changed in any way. For further information
129*cdf0e10cSrcweirhave a look at
130*cdf0e10cSrcweirhttp://udk.openoffice.org/common/man/spec/assemblyversioning.html
131*cdf0e10cSrcweir
132*cdf0e10cSrcweirThe versions of all assemblies are contained in cli_ure/version/version.txt. This is the place where
133*cdf0e10cSrcweirthe versions are changed. This will happen under two circumstances. First, the versions are
134*cdf0e10cSrcweiradjusted AFTER an office was released. The version.txt must then contain the versions at the
135*cdf0e10cSrcweirtime of the release. Second, when something was fixed. Then a version should be changed unless
136*cdf0e10cSrcweirthis has already be done for the next release. Please look at the document mentioned further
137*cdf0e10cSrcweirabove.
138*cdf0e10cSrcweir
139*cdf0e10cSrcweirIf new published UNO types have been added since the last release (product update) then the
140*cdf0e10cSrcweirminor version of cli_uretypes.dll should be incremented. When building the version directory, a script
141*cdf0e10cSrcweiris run that recognizes this and writes a cliureversion.mk file in the bin directory.
142*cdf0e10cSrcweircliureversion.mk contains all the entries of version.txt. The versions have been incremented
143*cdf0e10cSrcweirby the script. The script obtains the information of new types from unotype_statistics.txt
144*cdf0e10cSrcweirwhich is build in offapi.
145*cdf0e10cSrcweir
146*cdf0e10cSrcweirThe contents of cliureversion.mk is used when building the assemblies in this project. It
147*cdf0e10cSrcweiris also delivered so that instset_native (or instsetoo_native) can use it when building
148*cdf0e10cSrcweirthe installation sets.
149*cdf0e10cSrcweir
150*cdf0e10cSrcweir
151*cdf0e10cSrcweirThe contents of version.txt
152*cdf0e10cSrcweir===========================
153*cdf0e10cSrcweirThe entries in version.txt are needed for building the assemblies and for building the
154*cdf0e10cSrcweirinstallation set (msi database).
155*cdf0e10cSrcweir
156*cdf0e10cSrcweirFor every assembly exist four
157*cdf0e10cSrcweirentries. For example:
158*cdf0e10cSrcweir
159*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=1.0.3.0
160*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.2.0
161*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=3.0.0.0
162*cdf0e10cSrcweirCLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
163*cdf0e10cSrcweir
164*cdf0e10cSrcweirThe meaning of these entries is the following:
165*cdf0e10cSrcweir
166*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION represents the current version of the assembly.
167*cdf0e10cSrcweir
168*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION represents a range of former versions (which were compatible).
169*cdf0e10cSrcweirIt has to be placed in the
170*cdf0e10cSrcweircli_uretypes.config XML file which is part of the policy assembly. This is done automatically.
171*cdf0e10cSrcweirThe XYZ_OLD_VERSION and XYZ_NEW_VERSION values are used for the binding redirection of
172*cdf0e10cSrcweirthe policy file.
173*cdf0e10cSrcweir
174*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION represents the version of the policy file.
175*cdf0e10cSrcweir
176*cdf0e10cSrcweirCLI_URETYPES_POLICY_ASSEMBLY represents the name of the policy file.
177*cdf0e10cSrcweir
178*cdf0e10cSrcweirPlease refer to the document at
179*cdf0e10cSrcweirhttp://udk.openoffice.org/common/man/spec/assemblyversioning.html
180*cdf0e10cSrcweirabout how the versions have to look like.
181*cdf0e10cSrcweir
182*cdf0e10cSrcweirWhen the minor version is changed, which is the third number from the left, the
183*cdf0e10cSrcweir"old version" and the policy version must be changed as well. Using the former example,
184*cdf0e10cSrcweiran incremented version would look like this:
185*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=1.0.4.0
186*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
187*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=4.0.0.0
188*cdf0e10cSrcweirCLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
189*cdf0e10cSrcweir
190*cdf0e10cSrcweirIf the major version changed we would have these values:
191*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=2.0.0.0
192*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.0.0
193*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=1.0.0.0
194*cdf0e10cSrcweirCLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
195*cdf0e10cSrcweir
196*cdf0e10cSrcweirBecause a change of a major is only done if the code has changed incompatibly, we must not
197*cdf0e10cSrcweirredirect old client code to the new assembly. Actually we would not need a policy file here.
198*cdf0e10cSrcweirThe name of the policy file has changed as well so as to refer to the new version. Since
199*cdf0e10cSrcweirthe name is new and refers to the version 2 auf cli_uretypes, we can start with the policy version
200*cdf0e10cSrcweirfrom 1.
201*cdf0e10cSrcweir
202*cdf0e10cSrcweirThe next compatible change would require to change the version to these:
203*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=2.0.1.0
204*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.1.0
205*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=2.0.0.0
206*cdf0e10cSrcweirCLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
207*cdf0e10cSrcweir
208*cdf0e10cSrcweir
209*cdf0e10cSrcweirAutomatic incrementation of the version
210*cdf0e10cSrcweir=======================================
211*cdf0e10cSrcweirCurrently switched off! See cli_ure/version/makefile.mk
212*cdf0e10cSrcweirThe automatic incrementation of the version this is done when new published types have been
213*cdf0e10cSrcweirintroduce between two releases.In cli_ure/version/makefile.mk the script
214*cdf0e10cSrcweircli_ure/source/scripts/increment_version.pl
215*cdf0e10cSrcweiris run which creates the cliureversion.mk with the new versions. This automatism only changes
216*cdf0e10cSrcweirthe version parts which have the meaning of a compatible change. Which versions are to be
217*cdf0e10cSrcweirincremented is contained in cli_ure/version/incversions.txt. It contains, for example these entries:
218*cdf0e10cSrcweir
219*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION
220*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION
221*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION
222*cdf0e10cSrcweir
223*cdf0e10cSrcweirThe names are exactly the same as in version.txt. The script knows how to increase the version
224*cdf0e10cSrcweirof the different types:
225*cdf0e10cSrcweir
226*cdf0e10cSrcweirEntries ending on _NEW_VERSION: The third number from the left is incremented.
227*cdf0e10cSrcweirEntries ending on _OLD_VERSION: The third number from the left of the second version is incremented.
228*cdf0e10cSrcweirEntries ending on _POLICY_VERSION: The first number from the left is incremented.
229*cdf0e10cSrcweir
230*cdf0e10cSrcweirFor example, the versions in version.txt are:
231*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=1.0.4.0
232*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
233*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=4.0.0.0
234*cdf0e10cSrcweir
235*cdf0e10cSrcweirIf new types have been added the script would create these entries in cliureversion.mk
236*cdf0e10cSrcweirCLI_URETYPES_NEW_VERSION=1.0.5.0
237*cdf0e10cSrcweirCLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.4.0
238*cdf0e10cSrcweirCLI_URETYPES_POLICY_VERSION=5.0.0.0
239*cdf0e10cSrcweir
240*cdf0e10cSrcweirAs one can see from the incversions.txt, the versions of the cli_ure.dll and cli_cppuhelper.dll
241*cdf0e10cSrcweirare also changed. This is because these are dependent on cli_uretypes.dll.
242*cdf0e10cSrcweir
243*cdf0e10cSrcweir
244*cdf0e10cSrcweirFurther notes on increasing the assembly versions
245*cdf0e10cSrcweir================================
246*cdf0e10cSrcweirChanging a version for one assembly means changing
247*cdf0e10cSrcweirat least the XYZ_NEW_VERSION, XYZ_OLD_VERSION and XYZ_POLICY_VERSION. In case of an incompatible
248*cdf0e10cSrcweirchange, that is one of the first two numbers of the version has been changed, the XYZ_POLICY_ASSEMBLY
249*cdf0e10cSrcweirmust also be changed.
250*cdf0e10cSrcweir
251*cdf0e10cSrcweirWhen changing a version of an assembly then the versions of the assemblies which depend on it should
252*cdf0e10cSrcweirbe changed as well. For example, when changing the version of cli_uretypes.dll, then the versions of
253*cdf0e10cSrcweircli_ure.dll and cli_cppuhelper.dll should be changed as well. One can use idlasm.exe to see which
254*cdf0e10cSrcweirassemblies are referenced by an assembly. The information is contained in the assemblie's manifest.
255*cdf0e10cSrcweir
256*cdf0e10cSrcweirIf one would not change the versions of the dependent dlls then one would risk that an assembly
257*cdf0e10cSrcweirhas the same old version but references  a different assembly. For example, say we have a
258*cdf0e10cSrcweircli_uretypes.dll with version 1 and a cli_ure.dll with version 1. cli_ure.dll references version 1 of
259*cdf0e10cSrcweircli_uretypes.dll. Now the version of cli_uretypes.dll changes to version 2 and its policy assembly is
260*cdf0e10cSrcweiradapted so that all code that uses version 1 now uses version 2. This would also allow cli_ure.dll
261*cdf0e10cSrcweiro run with the new cli_uretypes.dll. If now cli_ure.dll is build, then it would reference
262*cdf0e10cSrcweircli_uretypes.dll version 2, because our build environment does not keep the older assembly. The old
263*cdf0e10cSrcweircli_uretypes.dll version 1 was replaced by version 2. cli_ure.dll now references cli_uretypes.dll version 2
264*cdf0e10cSrcweirbut still has the old version.
265*cdf0e10cSrcweir
266*cdf0e10cSrcweir
267*cdf0e10cSrcweir
268*cdf0e10cSrcweirrebasing of assemblies
269*cdf0e10cSrcweir=======================================================
270*cdf0e10cSrcweirNeither assemblies nor policy assemblies may be rebased. This would
271*cdf0e10cSrcweirmake the signature invalid. Therefore all assemblies must be contained
272*cdf0e10cSrcweirin postprocess/rebase/no_rebase.txt
273