Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-20 10:15 GMT+01:00 Koehne Kai <kai.koe...@theqtcompany.com>: > > >> -Original Message- >> From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Elvis >> Stansvik >> Sent: Tuesday, January 19, 2016 8:38 PM >> To: John Layt <jl...@kde.org> >> Cc: interest@qt-project.org Interest <interest@qt-project.org> >> Subject: Re: [Interest] Replacing icudtXX.dll without rebuilding Qt? >> >> 2016-01-17 15:46 GMT+01:00 John Layt <jl...@kde.org>: >> > >> > >> > On 17 January 2016 at 14:30, Elvis Stansvik <elvst...@gmail.com> >> wrote: >> >> >> >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik <elvst...@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 icu.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. Thanks! Elvis > > Regards > > Kai ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
> -Original Message- > From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Elvis > Stansvik > Sent: Tuesday, January 19, 2016 8:38 PM > To: John Layt <jl...@kde.org> > Cc: interest@qt-project.org Interest <interest@qt-project.org> > Subject: Re: [Interest] Replacing icudtXX.dll without rebuilding Qt? > > 2016-01-17 15:46 GMT+01:00 John Layt <jl...@kde.org>: > > > > > > On 17 January 2016 at 14:30, Elvis Stansvik <elvst...@gmail.com> > wrote: > >> > >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik <elvst...@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 icu.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. Regards Kai ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
20.01.2016, 12:15, "Koehne Kai" <kai.koe...@theqtcompany.com>: >> -Original Message- >> From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Elvis >> Stansvik >> Sent: Tuesday, January 19, 2016 8:38 PM >> To: John Layt <jl...@kde.org> >> Cc: interest@qt-project.org Interest <interest@qt-project.org> >> Subject: Re: [Interest] Replacing icudtXX.dll without rebuilding Qt? >> >> 2016-01-17 15:46 GMT+01:00 John Layt <jl...@kde.org>: >> > >> > >> > On 17 January 2016 at 14:30, Elvis Stansvik <elvst...@gmail.com> >> wrote: >> >> >> >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik <elvst...@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 icu.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 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
> -Original Message- > [...] > Out of curiosity, have you ever considered building ICU with separate .dat > file so people could just replace it without any hassle? Yes. https://bugreports.qt.io/browse/QTBUG-29828 and https://codereview.qt-project.org/#/c/49840/ The trouble is that we're using ICU very early on when initializing Qt, sometimes even before main() starts (e.g. to load qt.conf), and that the .dat file has to be loaded before any ICU API is called. This is hard to ensure in a generic way inside Qt Core. Anyway, this is of much less relevance these days, where ICU is optional on Windows. Regards Kai ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-17 15:46 GMT+01:00 John Layt: > > > On 17 January 2016 at 14:30, Elvis Stansvik wrote: >> >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik : >> > 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 icu.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? 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. Elvis > > John. > > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Replacing icudtXX.dll without rebuilding Qt?
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]. 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@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-17 14:48 GMT+01:00 Elvis Stansvik: > 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]. > > 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. To clarify: I'm using the 32-bit version of MSVC 2013 on Appveyor to build my tool in 32-bit mode. Elvis > > 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@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
17.01.2016, 17:30, "Elvis Stansvik": > 2016-01-17 14:48 GMT+01:00 Elvis Stansvik : >> 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 icu.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. > > 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@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest -- Regards, Konstantin ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-17 15:44 GMT+01:00 Konstantin Tokarev: > > > 17.01.2016, 17:30, "Elvis Stansvik" : >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik : >>> 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 icu.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@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > > -- > Regards, > Konstantin ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-17 15:46 GMT+01:00 John Layt: > > > On 17 January 2016 at 14:30, Elvis Stansvik wrote: >> >> 2016-01-17 14:48 GMT+01:00 Elvis Stansvik : >> > 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 icu.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. Right, I saw that page. It describes how to build ICU with MSVC, and then says: "This will generate a release shared build that you can use in both a debug and release build of Qt." It's this sentence which made me wonder if I'll also need to re-build Qt, or if I can just use the new DLLs as a drop-in replacement? > > 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. I see, yes, that would give me the smallest possible deployment, and also be the "safest" way (no worries about replacing DLLs). However, I found it so convenient that the Appveyor CI has recent versions of the official Qt builds pre-installed. Building a custom Qt on Appveyor is out of the question (the build would time out), and I don't have a Windows machine myself. So to use a custom Qt, I would have to dig out a Windows machine somewhere each time I want to update Qt. But I realize now that an ICU build on Appveyor is perhaps out of the question for the same reason. It's a pretty large library after all. Do you know how long a build roughly takes on a modern machine? I'll have to think a bit if all this is actually worth the trouble. If it's too much hassle, I'll just abandon the idea and live with a 11 MB ZIP. Thanks for the advice. Elvis > > John. > > > ___ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest > ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
2016-01-17 14:48 GMT+01:00 Elvis Stansvik: > 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 icu.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? 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@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Replacing icudtXX.dll without rebuilding Qt?
On 17 January 2016 at 14:30, Elvis Stansvikwrote: > 2016-01-17 14:48 GMT+01:00 Elvis Stansvik : > > 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 icu.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. John. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest