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