bin2d 0.1.0

A tool that enables files to be compiled into an executable and extracted at startup.


To use this package, run the following command in your project's root directory:

Bin2D

A tool that enables files to be compiled into an executable and extracted at startup.

Basic usage:

Basic usage is as follows Bin2D <output file>[=<module name>] <files or directories...>

Example

$ ./Bin2D output.d=awsome.app.resources.output resources/images/logo.png resources/images/pretty.jpg resources/models/animated_logo.obj Will create a file called output.d with a model name of awsome.app.resources.output and will have:

  • resources/images/logo.png
  • resources/images/pretty.jpg
  • resources/models/animated_logo.obj

Stored in mangled named arrays of that.

But what if I don't know the name at compile time?

To get access to all the values with names you need to iterate over two seperate arrays. The first assetNames will give you the mangled names. The second assetValues will give you the values based upon the index in assetNames.

So how do you extract?

This will extract any files given to it. With specific output directory. It returns an array of the file systems names with the original extension. Directories have been encoded away however.

import modulename;
outputBin2D2FS("output/stored/here");

And for a temporary directories?

import modulename;
outputBin2D2FS();

It does return the same result as output outputBin2D2FS(string) does.

Authors:
  • Richard Andrew Cattermole
Dependencies:
none
Versions:
0.2.1 2016-Dec-15
0.2.0 2015-Jul-23
0.1.0 2015-Jan-30
~master 2016-Dec-15
Show all 4 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 0 downloads total

Score:
0.6
Short URL:
bin2d.dub.pm