You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by Ariel Constenla-Haile <ar...@apache.org> on 2011/12/20 22:20:48 UTC

[CODE] Replace buildid by svn revision, and fix broken --with-build-version

Hi there,

the attached patches are an attempt to replace the build-id by the
subversion revision; and fix --with-build-version that didn't work.

The svn revision is set in configure (I guess this could have been done
somewhere in the perl installer code).
It supports both subversion and git-svn repositories. In case of plane 
sources without repo, the build-id is set to 0.
(Tested only with git-svn).

With the following configure switches

./configure   \
--with-build-version="$(date +"%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)")" \
--enable-verbose \
--enable-category-b \
...

the About Dialog looks like:

http://people.apache.org/~arielch/images/AboutDlg.png

You can try with this Win build:

http://people.apache.org/~arielch/packages/OOo-Dev_OOO340m1_Win_x86_install-arc_en-US.zip
On WinXP the BUILD_VER_STRING looks too small, may be the font size
should be increased.

Tests and comments/improvements are welcome :)


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE] Replace buildid by svn revision, and fix broken --with-build-version

Posted by "Marcus (OOo)" <ma...@wtnet.de>.
Am 12/28/2011 08:08 PM, schrieb Ariel Constenla-Haile:
> Hi Marcus,
>
> On Wed, Dec 28, 2011 at 12:32:11AM +0100, Marcus (OOo) wrote:
>> As I haven't seen any other comments to this, are you planning to
>> commit the changes in this way or have you got other thoughts in the
>> meantime?
>
> I committed the patch for the About dialog, fixing the broken
> --with-build-version, this allows the string with smaller font you can
> see in my Linux builds.
>
> But setting the svn revision as build-id has issues on windows (that's
> why they are missing in my Win builds). The buildid is used in the
> installer setup.ini as ProductVersion:
>
> [setup]
> database=openofficeorg34.msi
> msiversion=2.0
> productname=OpenOffice.org
> productcode={17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
> productversion=3.4.9584
> upgradekey=Software\OpenOffice.org\OpenOffice.org\3.4\{17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
> [languages]
> count=1
> default=1033
>
>
> This breaks the installers, because "The first field is the major
> version and has a maximum value of 255. The second field is the minor
> version and has a maximum value of 255. The third field is called the
> build version or the update version and has a maximum value of 65,535."
> see
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx
>
> productversion=3.4.$(SVN-REVISION)
>
> here the third field is>  65,535, as we are in revision 1224961
> This breaks the installer with a cryptic message
> http://people.apache.org/~arielch/images/build-id.png
> it took me quite to find out.

OK, what about to change the value type from integer to something that 
takes higher numbers?

Marcus



> In conclusion, I have to think some work around.
> In the meantime, --with-build-version can be used to set the date and
> the revision on the nightly builds.

Re: [CODE] Replace buildid by svn revision, and fix broken --with-build-version

Posted by TJ Frazier <tj...@cfl.rr.com>.
On 12/28/2011 14:08, Ariel Constenla-Haile wrote:
> Hi Marcus,
>
> On Wed, Dec 28, 2011 at 12:32:11AM +0100, Marcus (OOo) wrote:
>> As I haven't seen any other comments to this, are you planning to
>> commit the changes in this way or have you got other thoughts in the
>> meantime?
>
> I committed the patch for the About dialog, fixing the broken
> --with-build-version, this allows the string with smaller font you can
> see in my Linux builds.
>
> But setting the svn revision as build-id has issues on windows (that's
> why they are missing in my Win builds). The buildid is used in the
> installer setup.ini as ProductVersion:
>
> [setup]
> database=openofficeorg34.msi
> msiversion=2.0
> productname=OpenOffice.org
> productcode={17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
> productversion=3.4.9584
> upgradekey=Software\OpenOffice.org\OpenOffice.org\3.4\{17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
> [languages]
> count=1
> default=1033
>
>
> This breaks the installers, because "The first field is the major
> version and has a maximum value of 255. The second field is the minor
> version and has a maximum value of 255. The third field is called the
> build version or the update version and has a maximum value of 65,535."
> see
> http://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx
>
> productversion=3.4.$(SVN-REVISION)
>
> here the third field is>  65,535, as we are in revision 1224961
> This breaks the installer with a cryptic message
> http://people.apache.org/~arielch/images/build-id.png
> it took me quite to find out.
>
>
> In conclusion, I have to think some work around.
> In the meantime, --with-build-version can be used to set the date and
> the revision on the nightly builds.
>
>
> Regards

Hi, Ariel,

May I suggest a two-digit year, followed by the Julian day? That will 
work until 2066.

-- 
/tj/


Re: [CODE] Replace buildid by svn revision, and fix broken --with-build-version

Posted by Ariel Constenla-Haile <ar...@apache.org>.
Hi Marcus,

On Wed, Dec 28, 2011 at 12:32:11AM +0100, Marcus (OOo) wrote:
> As I haven't seen any other comments to this, are you planning to
> commit the changes in this way or have you got other thoughts in the
> meantime?

I committed the patch for the About dialog, fixing the broken
--with-build-version, this allows the string with smaller font you can
see in my Linux builds.

But setting the svn revision as build-id has issues on windows (that's
why they are missing in my Win builds). The buildid is used in the
installer setup.ini as ProductVersion:

[setup]
database=openofficeorg34.msi
msiversion=2.0
productname=OpenOffice.org
productcode={17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
productversion=3.4.9584
upgradekey=Software\OpenOffice.org\OpenOffice.org\3.4\{17E2DC94-B047-41FE-A94B-31CFEBCC87E1}
[languages]
count=1
default=1033


This breaks the installers, because "The first field is the major
version and has a maximum value of 255. The second field is the minor
version and has a maximum value of 255. The third field is called the
build version or the update version and has a maximum value of 65,535."
see
http://msdn.microsoft.com/en-us/library/windows/desktop/aa370859(v=vs.85).aspx

productversion=3.4.$(SVN-REVISION)

here the third field is > 65,535, as we are in revision 1224961
This breaks the installer with a cryptic message
http://people.apache.org/~arielch/images/build-id.png
it took me quite to find out.


In conclusion, I have to think some work around.
In the meantime, --with-build-version can be used to set the date and
the revision on the nightly builds.


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Re: [CODE] Replace buildid by svn revision, and fix broken --with-build-version

Posted by "Marcus (OOo)" <ma...@wtnet.de>.
Am 12/21/2011 01:50 AM, schrieb Marcus (OOo):
> Of course a build number is very useful to identify builds which look
> equal at first view (e.g., same version number, same release date,
> whatever). And I like the short one that we have used for years.
>
> However, I also know that it is nowadays common just to use the revision
> number from the used code repository.
>
> So, if we all agree to use this instead of the old build numbers, then I
> would suggest to add "svn" to the string to make it clear where the
> number comes from:
>
> (Build:svn-1234567890)
>
> or more patch-like (yes, I know it's far away from been correct ;-) ):
>
> -RSCREVISION=340m1(Build:$(BUILD_REVISION))
> +RSCREVISION=340m1(Build:svn-$(BUILD_REVISION))
>
> Furthermore, it's great to have a detailed timestamp in the About
> dialog. That will simplify the work of QA and support to identify which
> version exactly the users have problems with.
>
> So, thanks Ariel for your initiative to drive this change.
>
> Marcus

As I haven't seen any other comments to this, are you planning to commit 
the changes in this way or have you got other thoughts in the meantime?

Thanks

Marcus



> Am 12/20/2011 10:20 PM, schrieb Ariel Constenla-Haile:
>> Hi there,
>>
>> the attached patches are an attempt to replace the build-id by the
>> subversion revision; and fix --with-build-version that didn't work.
>>
>> The svn revision is set in configure (I guess this could have been done
>> somewhere in the perl installer code).
>> It supports both subversion and git-svn repositories. In case of plane
>> sources without repo, the build-id is set to 0.
>> (Tested only with git-svn).
>>
>> With the following configure switches
>>
>> ./configure \
>> --with-build-version="$(date +"%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)")" \
>> --enable-verbose \
>> --enable-category-b \
>> ...
>>
>> the About Dialog looks like:
>>
>> http://people.apache.org/~arielch/images/AboutDlg.png
>>
>> You can try with this Win build:
>>
>> http://people.apache.org/~arielch/packages/OOo-Dev_OOO340m1_Win_x86_install-arc_en-US.zip
>>
>> On WinXP the BUILD_VER_STRING looks too small, may be the font size
>> should be increased.
>>
>> Tests and comments/improvements are welcome :)
>>
>>
>> Regards

Re: [CODE] Replace buildid by svn revision, and fix broken --with-build-version

Posted by "Marcus (OOo)" <ma...@wtnet.de>.
Of course a build number is very useful to identify builds which look 
equal at first view (e.g., same version number, same release date, 
whatever). And I like the short one that we have used for years.

However, I also know that it is nowadays common just to use the revision 
number from the used code repository.

So, if we all agree to use this instead of the old build numbers, then I 
would suggest to add "svn" to the string to make it clear where the 
number comes from:

(Build:svn-1234567890)

or more patch-like (yes, I know it's far away from been correct ;-) ):

-RSCREVISION=340m1(Build:$(BUILD_REVISION))
+RSCREVISION=340m1(Build:svn-$(BUILD_REVISION))

Furthermore, it's great to have a detailed timestamp in the About 
dialog. That will simplify the work of QA and support to identify which 
version exactly the users have problems with.

So, thanks Ariel for your initiative to drive this change.

Marcus



Am 12/20/2011 10:20 PM, schrieb Ariel Constenla-Haile:
> Hi there,
>
> the attached patches are an attempt to replace the build-id by the
> subversion revision; and fix --with-build-version that didn't work.
>
> The svn revision is set in configure (I guess this could have been done
> somewhere in the perl installer code).
> It supports both subversion and git-svn repositories. In case of plane
> sources without repo, the build-id is set to 0.
> (Tested only with git-svn).
>
> With the following configure switches
>
> ./configure   \
> --with-build-version="$(date +"%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)")" \
> --enable-verbose \
> --enable-category-b \
> ...
>
> the About Dialog looks like:
>
> http://people.apache.org/~arielch/images/AboutDlg.png
>
> You can try with this Win build:
>
> http://people.apache.org/~arielch/packages/OOo-Dev_OOO340m1_Win_x86_install-arc_en-US.zip
> On WinXP the BUILD_VER_STRING looks too small, may be the font size
> should be increased.
>
> Tests and comments/improvements are welcome :)
>
>
> Regards