[Libreoffice-commits] core.git: solenv/bin
Mike Kaganski
mike.kaganski at collabora.com
Fri Mar 23 15:58:53 UTC 2018
solenv/bin/modules/installer/windows/file.pm | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 2367557493c216be5b5e8156ba6493d440a10b0f
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Fri Mar 23 14:17:14 2018 +0100
tdf#116581: also read UTF16-encoded version string from TTF
Change-Id: I47d8a755450b085be39346615f06cee4f920859f
Reviewed-on: https://gerrit.libreoffice.org/51781
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/solenv/bin/modules/installer/windows/file.pm b/solenv/bin/modules/installer/windows/file.pm
index 1a12becb6076..76217f859b45 100644
--- a/solenv/bin/modules/installer/windows/file.pm
+++ b/solenv/bin/modules/installer/windows/file.pm
@@ -560,12 +560,19 @@ sub get_fileversion
close TTF;
my $ttfversion = "(Version )([0-9]+[.]*([0-9][.])*[0-9]+)";
+ # UTF16-encoded version string
+ my $ttfversionU = "(V\0e\0r\0s\0i\0o\0n\0 \0)(([0-9]\0)+([.]\0([0-9]\0)+)*)";
if ($ttfdata =~ /$ttfversion/ms)
{
my ($version, $subversion, $microversion, $vervariant) = split(/\./,$2);
$fileversion = int($version) . "." . int($subversion) . "." . int($microversion) . "." . int($vervariant);
}
+ elsif ($ttfdata =~ /$ttfversionU/ms)
+ {
+ my ($version, $subversion, $microversion, $vervariant) = split(/\./,$2 =~ s/\0//gr);
+ $fileversion = int($version) . "." . int($subversion) . "." . int($microversion) . "." . int($vervariant);
+ }
else
{
$fileversion = "1.0.0.0";
More information about the Libreoffice-commits
mailing list