• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1Copyright (C) 2016 and later: Unicode, Inc. and others.
2License & terms of use: http://www.unicode.org/copyright.html#License
3
4Copyright (c) 2001-2010 International Business Machines
5Corporation and others. All Rights Reserved.
6uresb: Resource Bundle
7
8This sample demonstrates
9         Building a resource bundle
10         Using ICU to print data from a resource bundle
11
12
13Files:
14    uresb.c        Main source file in C
15    uresb.sln      Windows MSVC workspace.  Double-click this to get started.
16    uresb.vcproj   Windows MSVC project file
17    resources.dsp  Windows project file for resources
18    resources.mak  Windows makefile for resources
19
20    root.txt       Root resource bundle
21    en.txt         English translation
22    sr.txt         Serbian translation (cp1251)
23
24To Build uresb on Windows
25    1.  Install and build ICU
26    2.  In MSVC, open the workspace file icu\samples\uresb\uresb.sln
27    3.  Choose a Debug or Release build.
28    4.  Build.
29
30To Run on Windows
31    1.  Start a command shell window
32    2.  Add ICU's bin directory to the path, e.g.
33            set PATH=c:\icu\bin;%PATH%
34        (Use the path to where ever ICU is on your system.)
35    3.  cd into the uresb directory, e.g.
36            cd c:\icu\source\samples\uresb\debug
37    4.  Run it  (with a locale name, ex. english)
38            uresb  en
39    WARNING: The .txt files must be in the same directory as the executable, which is not the case by default on some systems.
40
41To Build on Unixes
42    1.  Build ICU.
43        Specify an ICU install directory when running configure,
44        using the --prefix option.  The steps to build ICU will look something
45        like this:
46           cd <icu directory>/source
47           runConfigureICU <platform-name> --prefix <icu install directory> [other options]
48           gmake all
49
50    2.  Install ICU,
51           gmake install
52
53    3.  Compile
54           cd <icu directory>/source/samples/uresb
55           gmake ICU_PREFIX=<icu install directory) ICU_PATH=<icu source directory>
56
57 To Run on Unixes
58           cd <icu directory>/source/samples/uresb
59
60           gmake ICU_PREFIX=<icu install directory>  check
61               -or-
62
63           export LD_LIBRARY_PATH=<icu install directory>/lib:.:$LD_LIBRARY_PATH
64           uresb
65
66
67 Note:  The name of the LD_LIBRARY_PATH variable is different on some systems.
68        If in doubt, run the sample using "gmake check", and note the name of
69        the variable that is used there.  LD_LIBRARY_PATH is the correct name
70        for Linux and Solaris.
71
72