• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1* Copyright (C) 2016 and later: Unicode, Inc. and others.
2* License & terms of use: http://www.unicode.org/copyright.html
3********************************************************************************
4* Copyright (C) 2008-2012, International Business Machines Corporation         *
5* and others. All Rights Reserved.                                             *
6*                                                                              *
7* 6/26/08 - Created by Brian Rower - heavy copying from ICU4J readme & others  *
8*                                                                              *
9********************************************************************************
10
11Procedures for building ICU4J data from ICU4C data:
12
13*Setup*
14
15In the following,
16        $icu4c_root is the ICU4C root directory
17        $icu4j_root is the ICU4J root directory
18        $jdk_bin is the JDK bin directory (for the jar tool)
19
201. *Linux*
21   Download, configure, and build ICU4C. When you configure ICU4C, you must
22   set the environment variable ICU_DATA_BUILDTOOL_OPTS to
23   "--include_uni_core_data" to build additional required ICU4J data:
24
25        ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ./runConfigureICU Linux
26
27   *Windows*
28    - Add ICU_DATA_BUILDTOOL_OPTS as a system environment variable with value "--include_uni_core_data"
29    - Build $icu4c_root\source\allinone\allinone.sln in Visual Studio
30
31   For more instructions on downloading and building ICU4C,
32   see the ICU4C readme at:
33        https://htmlpreview.github.io/?https://github.com/unicode-org/icu/blob/main/icu4c/readme.html#HowToBuild
34        (Windows: build as 'x86, Release' otherwise you will have to set 'CFG' differently below.)
35
36    *NOTE* You should do a full rebuild after any data changes.
37
381a.  If you didn't download from GitHub, you will also need the "icu4c-*-data.zip" file.  Unpack this file and replace the icu/source/data directory's contents with the contents of the data directory from the zip file.
39
40
412. Step 2 depends on whether you are on a Windows or a Unix-type
42platform.
43
44*Windows*
45
462a. On Developer Command Prompt for VS, cd to $icu4c_root\source\data.
47
482b. On Developer Command Prompt for VS,
49        nmake -f makedata.mak ICUMAKE=$icu4c_root\source\data\ CFG=x86\Release JAR="$jdk_bin\jar" ICU4J_ROOT=$icu4j_root icu4j-data-install
50
51       Continue with step 3 below, in Java:
52
53
54*Linux*
55
56        $icu4c_build is the ICU4C root build directory,
57        which is $icu4c_root/source in an in-source build.
58        (in other words, $icu4c_build is where you ran runConfigureICU or configure)
59
602c. On the command line, cd to $icu4c_build/data
61
622d. Do
63        make JAR=$jdk_bin/jar ICU4J_ROOT=$icu4j_root icu4j-data-install
64
65       (You can omit the JAR if it's just jar.)
66
67	Continue with step 3, in Java:
68
69Step 2 on either platform will produce two files: icudata.jar and
70icutzdata.jar in $icu4j_root/main/shared/data.
71
72*Java*
73
743. After the ICU4C-side steps above, build the main target of the
75        ICU4J ant build to unpack the jar files with the following commands:
76
77        cd $icu4j_root
78        ant main
79
80   Run the tests locally and make sure they pass:
81
82        ant check
83