You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -29,7 +29,7 @@ It is designed to be easy to use by developers and to provide easy call function
29
29
30
30
The generated functions that reads and extracts the embedded content does not rely on external libraries so you don't need to setup your projects to use any third party library to start using bin2cpp. All your embedded data can be accessed right away.
char * buffer = resource.newBuffer(); //returns a new buffer with a copy of the file. Ownership is transfered to the local function
212
+
size_t bufferSize = resource.getSize();
213
+
std::string encodedFile = toBase64(buffer, bufferSize); //binary to base64 encoder
214
+
delete buffer; //delete allocatd buffer from newBuffer()
215
+
buffer = NULL;
216
+
217
+
//do something with the base64 encoded file
218
+
//...
219
+
220
+
return 0;
221
+
}
222
+
```
223
+
224
+
# Installing
225
+
226
+
This section explains how to compile and build the software and how to get a development environment running.
227
+
228
+
## Compatible with
229
+
230
+
bin2cpp is only available for the Windows platform and has been tested with the following version of Windows:
231
+
232
+
* Windows XP
233
+
* Windows Vista
234
+
* Windows 7
235
+
236
+
## Prerequisites
237
+
238
+
The following software must be installed on the system for compiling source code:
239
+
240
+
* Visual Studio 2010 (or newer) (There are plans to migrate the software to other platform. See [issue #9](https://github.com/end2endzone/bin2cpp/issues/9))
241
+
* [Google Test v1.6.0](https://github.com/google/googletest/tree/release-1.6.0) (untested with other versions)
242
+
* [CMake](http://www.cmake.org/) for compilation of Google Test library. (Tested with CMake 3.9.6)
1) Download googletest source code to your computer using one of the following:
250
+
1) Download googletest as a [zip file](https://github.com/google/googletest/archive/release-1.6.0.zip) and extract to a temporary directory (for example c:\projects\third_party\googletest).
251
+
2) Clone the git repository using the following commands:
1) Download the [bin2cpp source code](https://github.com/end2endzone/bin2cpp/tags) and extract the content to a temporary directory (for example c:\projects\bin2cpp).
281
+
282
+
2) Open the Visual Studio 2010 solution file located in
283
+
***c:\projects\bin2cpp\msvc\bin2cpp.sln***
284
+
285
+
## Testing
286
+
bin2cpp comes with unit tests which tests for multiple combinations to make sure that input files are always encoded without errors.
287
+
288
+
Test are build using the Google Test v1.6.0 framework. For more information on how googletest is working, see the [google test documentation primer](https://github.com/google/googletest/blob/release-1.8.0/googletest/docs/V1_6_Primer.md).
289
+
290
+
Test are automatically build when building the solution. Please see the '*build step*' section for details on how to build the software.
291
+
292
+
Test can be executed from the following two locations:
293
+
294
+
1) From the Visual Studio IDE:
295
+
1) Select the project '*bin2cpp_unittest*' as StartUp project.
296
+
2) Hit CTRL+F5 (Start Without Debugging)
297
+
2) From the output binaries folder:
298
+
1) Open a file navigator and browse to the output folder(for example c:\projects\bin2cpp\msvc\Win32\Release)
299
+
2) Run the '*generate_test_files.bat*' batch script. The script will generate all required input files.
300
+
3) Run the '*bin2cpp_unittest.exe*'
301
+
302
+
See also the latest test results at the beginning of the document.
@@ -196,27 +315,17 @@ bin2cpp is only available for the Windows platform and has been tested with the
196
315
* Windows XP
197
316
* Windows Vista
198
317
* Windows 7
318
+
319
+
# Versioning
199
320
200
-
# License
321
+
We use [Semantic Versioning 2.0.0](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/end2endzone/bin2cpp/tags).
0 commit comments