[Interest] Replacing icudtXX.dll without rebuilding Qt?
Elvis Stansvik
elvstone at gmail.com
Sun Jan 17 16:14:56 CET 2016
2016-01-17 15:44 GMT+01:00 Konstantin Tokarev <annulen at yandex.ru>:
>
>
> 17.01.2016, 17:30, "Elvis Stansvik" <elvstone at gmail.com>:
>> 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?
>
> You can rebuild ICU in a way that .dat file is loaded at runtime and you can do any customizations you like without messing with libraries. See documentation on ICU site.
Aha. I see. But if I re-build ICU in such a way, will I also need to
re-build Qt against the new ICU? Or can I use it as a drop-in
replacement, provided that I used the same version + compilation
flags, except for the one that enables run-time loading of the .dat
file?
Maybe John has already answered this in his answer. I'll answer him as well.
Thanks for the input.
Elvis
>
>>
>> 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?
>>
>> Cheers,
>> Elvis
>>
>>> My questions are:
>>>
>>> 1. Is this is safe to to replace icudtXX.dll without replacing the
>>> other two ICU DLLs (icuinXX.dll and icuucXX.dll) and re-building the
>>> Qt library itself?
>>>
>>> 2. Are the ICU build options / data config used for the ICU DLLs that
>>> comes bundled with official Qt builds documented somewhere? I tried
>>> looking in the `qtqa` repo, but found no ICU build scripts or similar
>>> there. I know that Qt hosts some pre-built ICU version at [3]. Are
>>> these the ones shipped with official Qt builds? If so, how were they
>>> built?
>>>
>>> I'm currently using MSVC on Appveyor to build my standalone ZIP, and
>>> I'm using the official builds of Qt. I know I can completely cut out
>>> the dependency on ICU by re-building Qt, but I'm looking for solution
>>> where I don't have to do that.
>>>
>>> If it's unsafe to replace icudtXX.dll without also re-building Qt,
>>> I'll abandon the idea. If it's possible if I also replace the other
>>> two ICU DLLs, then I'll consider it.
>>>
>>> I know people don't really care if the size of a package is 4 MB or 11
>>> MB, but it just feels a bit silly that 60% of the binaries in my
>>> package are not really needed.
>>>
>>> Thanks in advance.
>>>
>>> Elvis
>>>
>>> [1] https://github.com/estan/protoc-gen-doc
>>> [2] http://apps.icu-project.org/datacustom/ICUData54.html
>>> [3] http://download.qt.io/development_releases/prebuilt/icu/prebuilt/
>>
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
>
> --
> Regards,
> Konstantin
More information about the Interest
mailing list