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