Skip to content

Minimal Builds of Icu4C

Eberhard Beilharz edited this page Mar 6, 2017 · 1 revision

Rather than using the full version of ICU (which can be ~25 MB), a custom minimum build can be used. The instructions based on this reference for creating the minimum ICU 54.1 build are below.

The Icu4c.Win.Min nuget package gets created with these instructions.

  1. Download ICU source
  2. Customize ICU Data library by selecting the following:
    • Collators/coll/ucadata.icu
    • Get ICU4C Data library and extract to icu/source/data/in
  3. Modify the following ICU source files:
    • icu/source/common/unicode/uconfig.h

      #define UCONFIG_ONLY_COLLATION 1
      #define UCONFIG_NO_LEGACY_CONVERSION 1
    • icu/source/i18n/sharedpluralrules.h

      virtual ~SharedPluralRules() { delete ptr; }
  4. Build ICU VS solution in icu/source/allinone/allinone.sln.
    • Choose Configuration Release and Target Platform Win32. There will be errors about "tstfiles.mk not found" that can be ignored.

What's in the minimum build

  • Characters
  • ErrorCodes
  • Locale
  • Normalizer
  • Rules-based Collator
  • Unicode set to pattern conversions
Clone this wiki locally