ADC Home > Reference Library > Reference > Mac OS X > Mac OS X Man Pages

 

This document is a Mac OS X manual page. Manual pages are a command-line technology for providing documentation. You can view these manual pages locally using the man(1) command. These manual pages come from many different sources, and thus, have a variety of writing styles.

This manual page is associated with the Mac OS X developer tools. The software or headers described may not be present on your Mac OS X installation until you install the developer tools package. This package is available on your Mac OS X installation DVD, and the latest versions can be downloaded from developer.apple.com.

For more information about the manual page format, see the manual page for manpages(5).



BuildStrings(1)           BSD General Commands Manual          BuildStrings(1)

NAME
     /Developer/Tools/BuildStrings -- Generate header (.h) or resource (.r) file from text files

SYNOPSIS
     /Developer/Tools/BuildStrings [-define variable] [-header] [-attributes attributeList] [-type filekind]
                                   -id ResID -in path -out path

DESCRIPTION
     The /Developer/Tools/BuildStrings command translates a text file into a resource or header file for use
     in localizing your Carbon application.  The input file is a series of newline-separated pairs of new-line-separated newline-separated
     line-separated strings.  Each pair of strings represents the "base" string and the localized equiva-lent. equivalent.
     lent.  When generating a resource file, /Developer/Tools/BuildStrings generates a STR# resource con-taining containing
     taining only the localized equivalents (which must be enclosed in double quotes in the source file).
     When generating the header file, /Developer/Tools/BuildStrings generates a C header file with #define
     directives for each of the base strings (which must be valid C preprocessor symbols) equating each to
     the ordinal number of the string in the STR# resource.  Your C/C++ source code can use these preproces-sor preprocessor
     sor macros, along with standard Resource Manager calls (like GetIndString) to load the appropriate
     localized string.

     The source file may include #ifdef/#endif (or #ifndef/#endif) directives to conditionally include dif-ferent different
     ferent pairs of strings, e.g. for debugging builds or different versions.  Note that these are the only
     preprocessor directives allowed in the source file.

     When generating a resource file, you can set the resource ID and attributes of the STR# resource by
     providing /Developer/Tools/BuildStrings with the appropriate command-line options.

     You can use /Developer/Tools/BuildStrings with several different sets of strings in the same applica-tion, application,
     tion, for example, error strings and warning strings.  The -type argument customizes some #defines in
     the generated header file so there are no conflicts.

     The /Developer/Tools/BuildStrings command accepts the following arguments:

     -header  Generate a header file.  If not provided, default is resource file format.  Note that the file
              extension is not provided automatically; your output file name must have the appropriate .h or
              .r extension.

     -define variable
              Defines variable for use in #ifdef or #ifndef conditionals.  No value may be assigned to vari-able. variable.
              able.  This argument may be repeated for any number of variables.

     -id ResID
              The resource ID for the STR# resource.  There is no support for setting the resource name.

     -attributes attribute
              Resource attributes for the STR# resource definition (such as locked, preload, etc.)  These
              are provided after the resource name in the resource definition.  This argument may be
              repeated for any number of attributes. It is ignored if generating a header.

     -type filekind
              Customizes three preprocessor variables (MinValidFoo, MaxValidFoo, FooRsrcID) #defined in a
              generated header file.  Note that if this argument is not provided, the default is the literal
              string "(null)", which will cause compile errors in the header file.

     -in path
              The input file, a set of newline-separated pairs of newline-separated strings.  The first
              string of the pair is ignored for the resource file (but is provided in a comment) and is used
              as the preprocessor symbol in the header file.  The second string of the pair is used as the
              resource string in the resource file and is ignored in the header file (but is provided in a
              comment), and must be enclosed in double-quotes in your source file.

     -out path
              The output file.  Note that you should provide the appropriate file extension; it is not pro-vided provided
              vided automatically according to the -header flag.

SEE ALSO
     Rez(1), DeRez(1)

Mac OS X                        April 12, 2004                        Mac OS X

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.