Skip to content

Commit 9e91c17

Browse files
committed
* Fixed issue #53: Generate only C code.
1 parent 6dc1c4d commit 9e91c17

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

CHANGES

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Changes for 3.1.0:
22

3+
* New feature: Support for generating C code.
34
* Fixed issue #29: Create arguments to filter files found with '--dir' argument.
5+
* Fixed issue #53: Generate only C code.
46
* Fixed issue #63: Context class redesign. Move arguments handling into a Context class.
57
* Fixed issue #64: Remove build artifacts of samples from installation packages.
68
* Fixed issue #72: Move the code FileManager class generation code into its own IGenerator implementation.

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ The following section shows how to use bin2cpp with code examples:
8888
```
8989
bin2cpp --file=<path> --output=<path> [--headerfile=<name>] [--identifier=<name>]
9090
[--generator=<name>] [--encoding=<name>] [--chunksize=<value>] [--namespace=<value>]
91-
[--baseclass=<name>] [--managerfile=<name>] [--registerfile]
92-
[--reportedfilepath=<value>] [--override] [--noheader] [--quiet]
91+
[--baseclass=<name>] [--managerfile=<name>] [--registerfile] [--code]
92+
[--reportedfilepath=<value>] [--plainoutput] [--override] [--noheader] [--quiet]
9393
bin2cpp --dir=<path> --output=<path> [--keepdirs]
9494
[--generator=<name>] [--encoding=<name>] [--chunksize=<value>] [--namespace=<value>]
95-
[--baseclass=<name>] [--managerfile=<name>] [--registerfile]
96-
[--dirincludefilter=<value>] [--direxcludefilter=<value>]
95+
[--baseclass=<name>] [--managerfile=<name>] [--registerfile] [--code]
96+
[--dirincludefilter=<value>] [--direxcludefilter=<value>]
9797
[--override] [--noheader] [--quiet]
9898
bin2cpp --help
9999
bin2cpp --version
@@ -111,15 +111,16 @@ bin2cpp --version
111111
| --generator=&lt;name&gt; | Name of the generator to use. Possible values are 'segment', 'string', 'array' and 'win32'.<br>[default: segment] |
112112
| --encoding=&lt;name&gt; | Name of the binary to string literal encoding to use. Possible values are 'oct' and 'hex'.<br>[default: oct] |
113113
| --chunksize=&lt;value&gt; | Size in bytes of each string segments (bytes per LoC).<br>[default: 200] |
114-
| --baseclass=&lt;name&gt; | The name of the interface for embedded files.<br>[default: File] |
115-
| --namespace=&lt;name&gt; | The namespace of the generated source code.<br>[default: bin2cpp] |
114+
| --baseclass=&lt;name&gt; | The name of the interface for embedded files. [default: File]<br>For C generated code, this parameter is for naming the File structure. [default: Bin2cFile] |
115+
| --namespace=&lt;name&gt; | The namespace of the generated source code. [default: bin2cpp]<br>For C generated code, this parameter is for setting the prefix of all function names. [default: bin2c] |
116116
| --reportedfilepath=&lt;path&gt; | The relative reported path of the File. Path returned when calling method getFilePath() of the File class. Automatically calculated when --dir mode is used.<br>ie: images/DCIM/IMG_0001.jpg |
117117
| --managerfile=&lt;path&gt; | File name or relative path of the generated C++ header file for the FileManager class.<br>ie: FileManager.h. |
118118
| --registerfile | Register the generated file to the FileManager class. This flags is automatically set when parameter 'managerfile' is specified. |
119119
| --dirincludefilter=&lt;value&gt;| Set a positive filter on the input directory to only select files matching the filter. Wildcard characters are accepted. Separate each filter with the character ':'. Valid only when --dir is used. See wildcard characters definition below. |
120120
| --direxcludefilter=&lt;value&gt;| Set a negative filter on the input directory to skip files matching the filter. Wildcard characters are accepted. Separate each filter with the character ':'. Valid only when --dir is used. See wildcard characters definition below. The exclude filter has precedence over the include filter. |
121121
| --keepdirs | Keep the directory structure. Forces the output files to have the same directory structure as the input files. Valid only when --dir is used. |
122122
| --plainoutput | Print the encoded string in plain format to stdout. Useful for scripts and integration with third party application. |
123+
| --code | Define the programming language output for code generation. Supported values are `c`, `cpp` or `c++`. |
123124
| --override | Tells bin2cpp to overwrite the destination files. |
124125
| --noheader | Do not print program header to standard output. |
125126
| --quiet | Do not log any message to standard output. |

0 commit comments

Comments
 (0)