lok: intercept the UNO command ".uno:ThesaurusDialog"
[LibreOffice.git] / cli_ure / readme.txt
blob89fe2172aba645be9072434ece7edff5d4a8f1a9
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 #   Licensed to the Apache Software Foundation (ASF) under one or more
11 #   contributor license agreements. See the NOTICE file distributed
12 #   with this work for additional information regarding copyright
13 #   ownership. The ASF licenses this file to you under the Apache
14 #   License, Version 2.0 (the "License"); you may not use this file
15 #   except in compliance with the License. You may obtain a copy of
16 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 Adapting version after a release of an office
20 =============================================
21 After a release the entries in cli_ure/version/version.txt must be changed to reflect the versions
22 of the assemblies at the time of the release. Please refer to the document at 
23 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
24 for more information about versioning of assemblies. 
27 Step 1: Remove old office installations. 
29 To do this, deinstall all offices, 
30 and make sure that there are no assemblies installed in the Global Assembly Cache (GAC). The GAC 
31 is contained in  C:\Windows\assembly. Change C:\Windows according to your windows installation.
32 Use the Windows Explorer to view the contents of the GAC. Are there any of the following assemblies
33 installed:
35 cli_uretypes.dll
36 cli_basetypes.dll
37 cli_cppuhelper.dll
38 cli_ure.dll
39 cli_oootypes.dll (build in unoil)
41 policy.x.y.cli_uretypes.dll
42 policy.x.y.cli_basetypes.dll
43 policy.x.y.cli_ure.dll
44 policy.x.y.cli_cppuhelper.dll
45 policy.x.y.cli_oootypes.dll (build in unoil)
47 The "x" and "y" in the names of the policy assemblies are to be replaces by version numbers. At the 
48 time of writing the real names are:
50 policy.1.0.cli_uretypes.dll
51 policy.1.0.cli_basetypes.dll
52 policy.1.0.cli_ure.dll
53 policy.1.0.cli_cppuhelper.dll
54 policy.1.0.cli_ootypes.dll (build in unoil)
56 After deinstalling the offices, there should none of them remain in the GAC. If there are some, then 
57 try to remove them by clicking on them an choose uninstall from the context menu of the mouse.
59 Step 2: Install the office of the last release (respin when using staroffice)
61 Step 3: Determine the versions of the assemblies
63 Use the Windows Explorer to view the contents of the Windows\assembly directory. Locate the assemblies
64 and policy assemblies. See step 1 for the names of those assemblies. Take down the version number as 
65 can be found in the version column, which is usually right next to the name column.
67 Step 4: Changing the versions in the cli_ure module.
69 Open the file cli_ure\version\version.txt.
70 The file contains name/value pairs, such as:CLI_URETYPES_NEW_VERSION=1.0.3.0.
71 The first part of the names represent the assembly which they are referring to. So obviously
72 entries starting with CLI_URETYPES refer to the cli_uretypes.dll. Entries which contain the part "POLICY" refer
73 to the policy assembly. For example:
74 CLI_URETYPES_POLICY_VERSION refers to the policy assembly for cli_uretypes which is named 
75 policy.1.0.cli_uretypes.dll
77 The versions may already have been incremented because someone has changed code after the 
78 last release. So if a version from version.txt is greater then the one of the respective 
79 assembly in the GAC then leave it at that.
81 The values have to be adjusted as follows:
83 XYZ_NEW_VERSION : increase the value of the version
84 GAC. "XYZ_" would be "CLI_URETYPES", "CLI_URE", etc.
85 XYZ_OLD_VERSION : must be changes so that the right version part is one less than 
86 XYZ_NEW_VERSION. For example
88 CLI_URETYPES_NEW_VERSION=1.0.[3].0
89 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.[2].0
91 The affected part is marked by the brackets.
93 XYZ_POLICY_VERSION: change the version according to the version of the policy assembly from the 
94 GAC.
96 XYZ_POLICY_ASSEMBLY: remain unchanged.
98 Commit the changes and rebuild the project.
100 Step 5: Changing the versions in the unoil module
102 The unoil module builds the cli_oootypes.dll which contains the office types (offapi). Change the contents
103 of unoil/climaker/version.txt similar to the versions.txt in this module. Then rebuild the module
106 The automatic test in cli_ure/qa/versioning should be extended. See the readme.txt in that directory 
107 for more information.
115 How does the version mechanism works
116 ====================================
118 The assemblies which are build in this project have a strong name and hence a version. The version should 
119 be increased whenever something was fixed or the code has changed in any way. For further information
120 have a look at 
121 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
123 The versions of all assemblies are contained in cli_ure/version/version.txt. This is the place where
124 the versions are changed. This will happen under two circumstances. First, the versions are 
125 adjusted AFTER an office was released. The version.txt must then contain the versions at the 
126 time of the release. Second, when something was fixed. Then a version should be changed unless 
127 this has already be done for the next release. Please look at the document mentioned further
128 above.
130 If new published UNO types have been added since the last release (product update) then the 
131 minor version of cli_uretypes.dll should be incremented. When building the version directory, a script
132 is run that recognizes this and writes a cliureversion.mk file in the bin directory.
133 cliureversion.mk contains all the entries of version.txt. The versions have been incremented 
134 by the script. The script obtains the information of new types from unotype_statistics.txt
135 which is build in offapi.
137 The contents of cliureversion.mk is used when building the assemblies in this project. It 
138 is also delivered so that instset_native (or instsetoo_native) can use it when building 
139 the installation sets.
142 The contents of version.txt
143 ===========================
144 The entries in version.txt are needed for building the assemblies and for building the 
145 installation set (msi database).
147 For every assembly exist four 
148 entries. For example:
150 CLI_URETYPES_NEW_VERSION=1.0.3.0
151 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.2.0
152 CLI_URETYPES_POLICY_VERSION=3.0.0.0
153 CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
155 The meaning of these entries is the following:
157 CLI_URETYPES_NEW_VERSION represents the current version of the assembly.
159 CLI_URETYPES_OLD_VERSION represents a range of former versions (which were compatible). 
160 It has to be placed in the 
161 cli_uretypes.config XML file which is part of the policy assembly. This is done automatically.
162 The XYZ_OLD_VERSION and XYZ_NEW_VERSION values are used for the binding redirection of 
163 the policy file.
165 CLI_URETYPES_POLICY_VERSION represents the version of the policy file.
167 CLI_URETYPES_POLICY_ASSEMBLY represents the name of the policy file. 
169 Please refer to the document at 
170 http://udk.openoffice.org/common/man/spec/assemblyversioning.html
171 about how the versions have to look like.
173 When the minor version is changed, which is the third number from the left, the 
174 "old version" and the policy version must be changed as well. Using the former example,
175 an incremented version would look like this:
176 CLI_URETYPES_NEW_VERSION=1.0.4.0
177 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
178 CLI_URETYPES_POLICY_VERSION=4.0.0.0
179 CLI_URETYPES_POLICY_ASSEMBLY=policy.1.0.cli_uretypes
181 If the major version changed we would have these values:
182 CLI_URETYPES_NEW_VERSION=2.0.0.0
183 CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.0.0
184 CLI_URETYPES_POLICY_VERSION=1.0.0.0
185 CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
187 Because a change of a major is only done if the code has changed incompatibly, we must not 
188 redirect old client code to the new assembly. Actually we would not need a policy file here.
189 The name of the policy file has changed as well so as to refer to the new version. Since
190 the name is new and refers to the version 2 of cli_uretypes, we can start with the policy version
191 from 1.
193 The next compatible change would require to change the version to these:
194 CLI_URETYPES_NEW_VERSION=2.0.1.0
195 CLI_URETYPES_OLD_VERSION=2.0.0.0-2.0.1.0
196 CLI_URETYPES_POLICY_VERSION=2.0.0.0
197 CLI_URETYPES_POLICY_ASSEMBLY=policy.2.0.cli_uretypes
200 Automatic incrementation of the version 
201 =======================================
202 Currently switched off! See cli_ure/version/makefile.mk
203 The automatic incrementation of the version this is done when new published types have been 
204 introduce between two releases.In cli_ure/version/makefile.mk the script 
205 cli_ure/source/scripts/increment_version.pl
206 is run which creates the cliureversion.mk with the new versions. This automatism only changes
207 the version parts which have the meaning of a compatible change. Which versions are to be 
208 incremented is contained in cli_ure/version/incversions.txt. It contains, for example these entries:
210 CLI_URETYPES_NEW_VERSION
211 CLI_URETYPES_OLD_VERSION
212 CLI_URETYPES_POLICY_VERSION
214 The names are exactly the same as in version.txt. The script knows how to increase the version
215 of the different types:
217 Entries ending on _NEW_VERSION: The third number from the left is incremented.
218 Entries ending on _OLD_VERSION: The third number from the left of the second version is incremented.
219 Entries ending on _POLICY_VERSION: The first number from the left is incremented.
221 For example, the versions in version.txt are:
222 CLI_URETYPES_NEW_VERSION=1.0.4.0
223 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.3.0
224 CLI_URETYPES_POLICY_VERSION=4.0.0.0
226 If new types have been added the script would create these entries in cliureversion.mk
227 CLI_URETYPES_NEW_VERSION=1.0.5.0
228 CLI_URETYPES_OLD_VERSION=1.0.0.0-1.0.4.0
229 CLI_URETYPES_POLICY_VERSION=5.0.0.0
231 As one can see from the incversions.txt, the versions of the cli_ure.dll and cli_cppuhelper.dll 
232 are also changed. This is because these are dependent on cli_uretypes.dll.
235 Further notes on increasing the assembly versions
236 ================================
237 Changing a version for one assembly means changing 
238 at least the XYZ_NEW_VERSION, XYZ_OLD_VERSION and XYZ_POLICY_VERSION. In case of an incompatible 
239 change, that is one of the first two numbers of the version has been changed, the XYZ_POLICY_ASSEMBLY
240 must also be changed.
242 When changing a version of an assembly then the versions of the assemblies which depend on it should 
243 be changed as well. For example, when changing the version of cli_uretypes.dll, then the versions of 
244 cli_ure.dll and cli_cppuhelper.dll should be changed as well. One can use idlasm.exe to see which 
245 assemblies are referenced by an assembly. The information is contained in the assemblie's manifest.
247 If one would not change the versions of the dependent dlls then one would risk that an assembly
248 has the same old version but references  a different assembly. For example, say we have a 
249 cli_uretypes.dll with version 1 and a cli_ure.dll with version 1. cli_ure.dll references version 1 of
250 cli_uretypes.dll. Now the version of cli_uretypes.dll changes to version 2 and its policy assembly is 
251 adapted so that all code that uses version 1 now uses version 2. This would also allow cli_ure.dll
252 o run with the new cli_uretypes.dll. If now cli_ure.dll is build, then it would reference 
253 cli_uretypes.dll version 2, because our build environment does not keep the older assembly. The old
254 cli_uretypes.dll version 1 was replaced by version 2. cli_ure.dll now references cli_uretypes.dll version 2
255 but still has the old version.
259 rebasing of assemblies
260 =======================================================
261 Neither assemblies nor policy assemblies may be rebased. This would 
262 make the signature invalid. Therefore all assemblies must be contained
263 in postprocess/rebase/no_rebase.txt