fix gb_PARTIALBUILD usage
[LibreOffice.git] / cli_ure / readme.txt
blobfb716c686fab5d5e9c335ee32c2231de0f10ac23
1 #*************************************************************************
2
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
5 # Copyright 2000, 2010 Oracle and/or its affiliates.
7 # OpenOffice.org - a multi-platform office productivity suite
9 # This file is part of OpenOffice.org.
11 # OpenOffice.org is free software: you can redistribute it and/or modify
12 # it under the terms of the GNU Lesser General Public License version 3
13 # only, as published by the Free Software Foundation.
15 # OpenOffice.org is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU Lesser General Public License version 3 for more details
19 # (a copy is included in the LICENSE file that accompanied this code).
21 # You should have received a copy of the GNU Lesser General Public License
22 # version 3 along with OpenOffice.org.  If not, see
23 # <http://www.openoffice.org/license.html>
24 # for a copy of the LGPLv3 License.
26 # ************************************************************************/
28 Adapting version after a release of an office
29 =============================================
30 After a release the entries in cli_ure/version/version.txt must be changed to reflect the versions
31 of the assemblies at the time of the release. Please refer to the document at 
32 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
33 for more information about versioning of assemblies. 
36 Step 1: Remove old office installations. 
38 To do this, deinstall all offices, 
39 and make sure that there are no assemblies installed in the Global Assembly Cache (GAC). The GAC 
40 is contained in  C:\Windows\assembly. Change C:\Windows according to your windows installation.
41 Use the Windows Explorer to view the contents of the GAC. Are there any of the following assemblies
42 installed:
44 cli_uretypes.dll
45 cli_basetypes.dll
46 cli_cppuhelper.dll
47 cli_ure.dll
48 cli_oootypes.dll (build in unoil)
50 policy.x.y.cli_uretypes.dll
51 policy.x.y.cli_basetypes.dll
52 policy.x.y.cli_ure.dll
53 policy.x.y.cli_cppuhelper.dll
54 policy.x.y.cli_oootypes.dll (build in unoil)
56 The "x" and "y" in the names of the policy assemblies are to be replaces by version numbers. At the 
57 time of writing the real names are:
59 policy.1.0.cli_uretypes.dll
60 policy.1.0.cli_basetypes.dll
61 policy.1.0.cli_ure.dll
62 policy.1.0.cli_cppuhelper.dll
63 policy.1.0.cli_ootypes.dll (build in unoil)
65 After deinstalling the offices, there should none of them remain in the GAC. If there are some, then 
66 try to remove them by clicking on them an choose uninstall from the context menu of the mouse.
68 Step 2: Install the office of the last release (respin when using staroffice)
70 Step 3: Determine the versions of the assemblies
72 Use the Windows Explorer to view the contents of the Windows\assembly directory. Locate the assemblies
73 and policy assemblies. See step 1 for the names of those assemblies. Take down the version number as 
74 can be found in the version column, which is usually right next to the name column.
76 Step 4: Changing the versions in the cli_ure module.
78 Open the file cli_ure\version\version.txt.
79 The file contains name/value pairs, such as:CLI_URETYPES_NEW_VERSION=1.0.3.0.
80 The first part of the names represent the assemly which they are referring to. So obviously 
81 entries starting with CLI_URETYPES refer to the cli_uretypes.dll. Entries which contain the part "POLICY" refer
82 to the policy assembly. For example:
83 CLI_URETYPES_POLICY_VERSION refers to the policy assembly for cli_uretypes which is named 
84 policy.1.0.cli_uretypes.dll
86 The versions may already have been incremented because someone has changed code after the 
87 last release. So if a version from version.txt is greater then the one of the respective 
88 assembly in the GAC then leave it at that.
90 The values have to be adjusted as follows:
92 XYZ_NEW_VERSION : increse the value of the version 
93 GAC. "XYZ_" would be "CLI_URETYPES", "CLI_URE", etc.
94 XYZ_OLD_VERSION : must be changes so that the right version part is one less than 
95 XYZ_NEW_VERSION. For example
97 CLI_URETYPES_NEW_VERSION=1.0.[3].0
98 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.[2].0
100 The affected part is marked by the brackets.
102 XYZ_POLICY_VERSION: change the version according to the version of the policy assembly from the 
103 GAC.
105 XYZ_POLICY_ASSEMBLY: remain unchanged.
107 Commit the changes and rebuild the project.
109 Step 5: Changing the versions in the unoil module
111 The unoil module builds the cli_oootypes.dll which contains the office types (offapi). Change the contents
112 of unoil/climaker/version.txt similar to the versions.txt in this module. Then rebuild the module
114 //======
115 The automatic test in cli_ure/qa/versioning should be extended. See the readme.txt in that directory 
116 for more information.
117 //=====
124 How does the version mechanism works
125 ====================================
127 The assemblies which are build in this project have a strong name and hence a version. The version should 
128 be increased whenever something was fixed or the code has changed in any way. For further information
129 have a look at 
130 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
132 The versions of all assemblies are contained in cli_ure/version/version.txt. This is the place where
133 the versions are changed. This will happen under two circumstances. First, the versions are 
134 adjusted AFTER an office was released. The version.txt must then contain the versions at the 
135 time of the release. Second, when something was fixed. Then a version should be changed unless 
136 this has already be done for the next release. Please look at the document mentioned further
137 above.
139 If new published UNO types have been added since the last release (product update) then the 
140 minor version of cli_uretypes.dll should be incremented. When building the version directory, a script
141 is run that recognizes this and writes a cliureversion.mk file in the bin directory.
142 cliureversion.mk contains all the entries of version.txt. The versions have been incremented 
143 by the script. The script obtains the information of new types from unotype_statistics.txt
144 which is build in offapi.
146 The contents of cliureversion.mk is used when building the assemblies in this project. It 
147 is also delivered so that instset_native (or instsetoo_native) can use it when building 
148 the installation sets.
151 The contents of version.txt
152 ===========================
153 The entries in version.txt are needed for building the assemblies and for building the 
154 installation set (msi database).
156 For every assembly exist four 
157 entries. For example:
159 CLI_URETYPES_NEW_VERSION=1.0.3.0
160 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.2.0
161 CLI_URETYPES_POLICY_VERSION=3.0.0.0
162 CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
164 The meaning of these entries is the following:
166 CLI_URETYPES_NEW_VERSION represents the current version of the assembly.
168 CLI_URETYPES_OLD_VERSION represents a range of former versions (which were compatible). 
169 It has to be placed in the 
170 cli_uretypes.config XML file which is part of the policy assembly. This is done automatically.
171 The XYZ_OLD_VERSION and XYZ_NEW_VERSION values are used for the binding redirection of 
172 the policy file.
174 CLI_URETYPES_POLICY_VERSION represents the version of the policy file.
176 CLI_URETYPES_POLICY_ASSEMBLY represents the name of the policy file. 
178 Please refer to the document at 
179 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
180 about how the versions have to look like.
182 When the minor version is changed, which is the third number from the left, the 
183 "old version" and the policy version must be changed as well. Using the former example,
184 an incremented version would look like this:
185 CLI_URETYPES_NEW_VERSION=1.0.4.0
186 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
187 CLI_URETYPES_POLICY_VERSION=4.0.0.0
188 CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
190 If the major version changed we would have these values:
191 CLI_URETYPES_NEW_VERSION=2.0.0.0
192 CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.0.0
193 CLI_URETYPES_POLICY_VERSION=1.0.0.0
194 CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
196 Because a change of a major is only done if the code has changed incompatibly, we must not 
197 redirect old client code to the new assembly. Actually we would not need a policy file here.
198 The name of the policy file has changed as well so as to refer to the new version. Since
199 the name is new and refers to the version 2 auf cli_uretypes, we can start with the policy version
200 from 1.
202 The next compatible change would require to change the version to these:
203 CLI_URETYPES_NEW_VERSION=2.0.1.0
204 CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.1.0
205 CLI_URETYPES_POLICY_VERSION=2.0.0.0
206 CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
209 Automatic incrementation of the version 
210 =======================================
211 Currently switched off! See cli_ure/version/makefile.mk
212 The automatic incrementation of the version this is done when new published types have been 
213 introduce between two releases.In cli_ure/version/makefile.mk the script 
214 cli_ure/source/scripts/increment_version.pl
215 is run which creates the cliureversion.mk with the new versions. This automatism only changes
216 the version parts which have the meaning of a compatible change. Which versions are to be 
217 incremented is contained in cli_ure/version/incversions.txt. It contains, for example these entries:
219 CLI_URETYPES_NEW_VERSION
220 CLI_URETYPES_OLD_VERSION
221 CLI_URETYPES_POLICY_VERSION
223 The names are exactly the same as in version.txt. The script knows how to increase the version
224 of the different types:
226 Entries ending on _NEW_VERSION: The third number from the left is incremented.
227 Entries ending on _OLD_VERSION: The third number from the left of the second version is incremented.
228 Entries ending on _POLICY_VERSION: The first number from the left is incremented.
230 For example, the versions in version.txt are:
231 CLI_URETYPES_NEW_VERSION=1.0.4.0
232 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
233 CLI_URETYPES_POLICY_VERSION=4.0.0.0
235 If new types have been added the script would create these entries in cliureversion.mk
236 CLI_URETYPES_NEW_VERSION=1.0.5.0
237 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.4.0
238 CLI_URETYPES_POLICY_VERSION=5.0.0.0
240 As one can see from the incversions.txt, the versions of the cli_ure.dll and cli_cppuhelper.dll 
241 are also changed. This is because these are dependent on cli_uretypes.dll.
244 Further notes on increasing the assembly versions
245 ================================
246 Changing a version for one assembly means changing 
247 at least the XYZ_NEW_VERSION, XYZ_OLD_VERSION and XYZ_POLICY_VERSION. In case of an incompatible 
248 change, that is one of the first two numbers of the version has been changed, the XYZ_POLICY_ASSEMBLY
249 must also be changed.
251 When changing a version of an assembly then the versions of the assemblies which depend on it should 
252 be changed as well. For example, when changing the version of cli_uretypes.dll, then the versions of 
253 cli_ure.dll and cli_cppuhelper.dll should be changed as well. One can use idlasm.exe to see which 
254 assemblies are referenced by an assembly. The information is contained in the assemblie's manifest.
256 If one would not change the versions of the dependent dlls then one would risk that an assembly
257 has the same old version but references  a different assembly. For example, say we have a 
258 cli_uretypes.dll with version 1 and a cli_ure.dll with version 1. cli_ure.dll references version 1 of
259 cli_uretypes.dll. Now the version of cli_uretypes.dll changes to version 2 and its policy assembly is 
260 adapted so that all code that uses version 1 now uses version 2. This would also allow cli_ure.dll
261 o run with the new cli_uretypes.dll. If now cli_ure.dll is build, then it would reference 
262 cli_uretypes.dll version 2, because our build environment does not keep the older assembly. The old
263 cli_uretypes.dll version 1 was replaced by version 2. cli_ure.dll now references cli_uretypes.dll version 2
264 but still has the old version.
268 rebasing of assemblies
269 =======================================================
270 Neither assemblies nor policy assemblies may be rebased. This would 
271 make the signature invalid. Therefore all assemblies must be contained
272 in postprocess/rebase/no_rebase.txt