package;
import cpp.Lib;
import haxe.Resource;
import haxe.io.Bytes;
import haxe.io.BytesInput;
import haxe.zip.Reader;
import haxe.zip.Entry;
import sys.io.Process;
/**
* ...
* @author Jens Eckervogt
*/
class Main
{
static function main()
{
var bytes = haxe.Resource.getBytes("DataZip");
trace(bytes.getString(0, bytes.length));
// Run exe from embedded data.zip
var bytesInput = new BytesInput(bytes);
var reader = new Reader(bytesInput);
var entries:List<Entry> = reader.read();
//trace(entries.toString());
//Listing to SimpleOpenGLView.exe
var embeddedExeFromDataZip = "SimpleOpenGLView.exe";
for(entry in entries)
{
var filename = entry.fileName;
switch (entry.fileName)
{
case "SimpleOpenGLView.exe":
var p = new Process(entry.fileName, []);
trace("exitcode: " + p.exitCode());
p.close();
}
}
}
}
cpp.cppia.Host.runFile('data.cppia');
'N' below represent the digits found on the Android Acadnme(v1.0) app top left corner.
haxelib run nme cppia --deploy=NNN.NNN.NNN.NNN