"Fossies" - the Fresh Open Source Software archive 
Member "pnet-0.8.0/resgen/resgen.1" of archive pnet-0.8.0.tar.gz:
Table of Contents
resgen - resource generation and conversion utility
resgen
[ options ] input ... output
Resgen converts strings between a
number of resource formats that are used within the Portable.NET platform.
It is typically used to convert text resources (.txt), XML resources (.resx),
or GNU gettext resources (.po) into binary resources (.resources) that can
be attached to an IL executable or dynamic link library.
Resgen can convert
multiple input files into a single output file. A number of options are
available to specify the format of the input files and the output file.
Alternatively, resgen can guess the format of a file from its extension:
..- Text resources.
.- Binary resources.
..- XML resources.
.- GNU gettext resources.
....- Binary
resources within an IL image (input only).
The input filename ‘-’ may be used
to specify standard input. If an input format is not specified, standard
input is assumed to contain text resources.
The output filename ‘-’ may be
used to specify standard output. If an output format is not specified,
the format of standard output is assumed to be text.
- -t, --text-input
- The input files are all assumed to be in text resource format.
- -r, --res-input
- The input files are all assumed to be in binary resource format.
- -i, --il-input
- The input files are all assumed to be IL image files (i.e. executables, dynamic
link libraries, or object files).
- -x, --xml-input
- The input files are all assumed
to be in XML resource format.
- -p, --po-input
- The input files are all assumed
to be in GNU gettext .po resource format.
- -T, --text-output
- The output format
is set to text resources.
- -R, --res-output
- The output format is set to binary
resources.
- -X, --xml-output
- The output format is set to XML resources.
- -P, --po-output
- The output format is set to GNU gettext .po resources.
- -l, --latin1
- Interpret
text and .po files as Latin-1 rather than UTF-8.
- -s, --sort-names
- When writing
text resources as output, sort the resources by name. This typically makes
it easier for humans to read the output.
This option is ignored if the
output format is not text.
- --help
- Print a usage message for the resgen program.
- -v, --version
- Print the version of the resgen program.
- --
- Marks the end of the
command-line options, and the beginning of the input filenames. You may
need to use this if your filename begins with ’-’. e.g. "ilresgen -- -input.txt
output.resources". This is not needed if the input is stdin: "ilresgen - output.resources"
is perfectly valid.
Text resource files contain one
line for each resource. Each line has the form ‘name=value’, where ‘name’ is
the tag name associated with the resource, and ‘value’ is the resource’s string
value. For example:
Arg_InvalidBase=Base must be 2, 8, 10, or 16
Overflow_Byte=Valid Byte values are between 0 and 255, inclusive
Comments are lines that begin with a ‘#’ character. Blank lines are also
considered comments.
Resource string values are assumed to be in the UTF-8
text encoding unless the -l command-line option is supplied. No other character
sets are currently supported. Values can contain one of the following escape
sequences, which indicate special characters:
- \n
- Newline character, ’\u000A’.
- \r
- Carriage return character, ’\u000D’.
- \t
- TAB character, ’\u0009’.
- \f
- Form feed character,
’\u000C’.
- \v
- Vertical TAB character, ’\u000B’.
- \0
- NUL character, ’\u0000’.
- \NNN
- 8-bit octal
Unicode character.
- \xHH
- 8-bit hexadecimal Unicode character.
- \uHHHH
- 16-bit hexadecimal
Unicode character.
- \UHHHHHHHH
- 32-bit hexadecimal Unicode character.
The
following command-line converts three text resource input files into a binary
resource output file:
resgen file1.txt file2.txt file3.txt output.resources
If the files did not have extensions whose format can be guessed, then
command-line options can be used specify the formats:
resgen --text-input --res-output file1 file2 file3 output
The default resources within an executable can be extracted to text format
on standard output as follows:
resgen -s program.exe -
The ‘-s’ option was used here to sort the output so that it is more easily
digested by the user.
Written by Southern Storm Software, Pty Ltd.
http://www.southern-storm.com.au/
cscc(1)
Exit status is
1 if an error occurred while processing the input. Otherwise the exit status
is 0.
Table of Contents