Git Product home page Git Product logo

very-simple-resource-dumper's Introduction

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

very-simple-resource-dumper's People

Contributors

doomhammer avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.