[Interest] Replacing icudtXX.dll without rebuilding Qt?

Konstantin Tokarev annulen at yandex.ru
Wed Jan 20 10:47:26 CET 2016



20.01.2016, 12:15, "Koehne Kai" <Kai.Koehne at theqtcompany.com>:
>>  -----Original Message-----
>>  From: Interest [mailto:interest-bounces at qt-project.org] On Behalf Of Elvis
>>  Stansvik
>>  Sent: Tuesday, January 19, 2016 8:38 PM
>>  To: John Layt <jlayt at kde.org>
>>  Cc: interest at qt-project.org Interest <interest at qt-project.org>
>>  Subject: Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
>>
>>  2016-01-17 15:46 GMT+01:00 John Layt <jlayt at kde.org>:
>>  >
>>  >
>>  > On 17 January 2016 at 14:30, Elvis Stansvik <elvstone at gmail.com>
>>  wrote:
>>  >>
>>  >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik <elvstone at gmail.com>:
>>  >> > Hi all,
>>  >> >
>>  >> > In an effort to cut down on the size of the standalone ZIP
>>  >> > distribution of my small command line tool [1] which only uses
>>  >> > QtCore, and which to my knowledge does not depend on any
>>  >> > localization features, I'd like to try replacing the icudtXX.dll
>>  >> > that I currently take from the Qt bin directory with a custom one
>>  >> > built using the ICU Data Library Customizer [2].
>>  >>
>>  >> I've slightly misunderstood how the ICU Data Library Customizer works.
>>  >> I thought it would generate a icudtXX.dll, but it generates a .dat
>>  >> file to be used in the compilation of ICU.
>>  >>
>>  >> So now that I know that I have to re-build ICU with this .dat file,
>>  >> my question are:
>>  >>
>>  >> 1. Is it safe to replace the three icuXXXX.dll DLL files without also
>>  >> re-building Qt, provided that I use the exact same ICU version,
>>  >> compiled with the exact same compilation flags, but with a different
>>  >> .dat file?
>>  >>
>>  >> 2. If so, which parts of the .dat file can I safely exclude with the
>>  >> ICU Data Library Customizer? I don't think I need any of the features
>>  >> which Qt uses ICU for, but are there some parts that must be included
>>  >> for Qt to function at all?
>>  >>
>>  >> 3. Where can I find out how the ICU bundled with official Qt builds
>>  >> was built?
>>  >
>>  >
>>  > Advice for compiling ICU can be found at
>>  > https://wiki.qt.io/Compiling-ICU-with-MSVC, you don't need to worry
>>  > about compatibility so much as ICU offers no binary compatibility
>>  > guarantees so Qt only uses the C interface.
>>  >
>>  > Frankly though, ICU is a pain to build and if you're rebuilding
>>  > anything I'd suggest you just rebuild Qt instead with the no ICU flag
>>  > set. The only thing you loose on Windows are proper collation support
>>  > for Win XP, proper toUpper/toLower support in tricky languages, and
>>  > various Unicode look-up tables. If you're not worried about those then
>>  > this is a better path for you.
>>
>>  Hi again John,
>>
>>  I'm now in the process of setting up a separate Git repo with an
>>  appveyor.yml file such that it'll build minimal ICU DLLs for me.
>>  Mostly because I wanted to see how easy/hard it'd be. It seems to work out
>>  well so far, just a few kinks to work out.
>>
>>  However, I'm still wondering if there's some definitive place where I can see
>>  which exact version of ICU was used for the official builds.
>>  Perhaps you know where this would be?
>
> The used ICU libs are hosted under
>
> http://download.qt.io/development_releases/prebuilt/icu/
>
> Anyhow, as John already said: Since we're using just the stable C API I wouldn't expect
> any problems, even if you use another compiler / another patch level version of ICU.
>
>>  I know I can look at the file names of installed DLLs (e.g.
>>  icudt54.dll would indicate ICU 54.x was used), but I'd rather be double sure
>>  and see the scripts used to build the ICU that official Qt uses.
>
> The script should be at http://code.qt.io/cgit/qtsdk/qtsdk.git/tree/packaging-tools/bld_icu_tools.py.

Out of curiosity, have you ever considered building ICU with separate .dat file so people could just replace it without any hassle?


-- 
Regards,
Konstantin



More information about the Interest mailing list