Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acristoffers/very-simple-resource-dumper
Creates a .c and .h files to embed resource files into the executable
https://github.com/acristoffers/very-simple-resource-dumper
Last synced: about 2 months ago
JSON representation
Creates a .c and .h files to embed resource files into the executable
- Host: GitHub
- URL: https://github.com/acristoffers/very-simple-resource-dumper
- Owner: acristoffers
- License: other
- Created: 2012-11-27T17:48:47.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2015-09-08T10:02:22.000Z (over 9 years ago)
- Last Synced: 2023-03-27T15:52:23.005Z (over 1 year ago)
- Language: C++
- Size: 248 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Very Simple Resource Dumper
===========================Dumps one .c and one .h files that can be used to compile resources into the binary executable.
It has a very simple api. Only one method:
const char* getResource(const char* resource, unsigned long long *size);
Generate the .h file with:
vsrd --header -o file_name.h
generate the .c file with
vsrd input.crs -o output.c
Include the .h and compile/link with the .c to use the files like:unsigned long long resSize;
const char* logo = getResource("/imgs/logo.png", &resSize);
// use logo
The file describing the resources for this could look like:! /imgs ;
@ logo.png : path_to_file_in_disk/logo_file_name.png ;
See the test folder for more info.The tool recurser.py can be used to traverse a directory
The tool is meant to be called, without arguments, from the root the directory containing the resources
It will generate a resources.src file containing all the files in all subdirectories using relative paths