Playing with virtual box feature and Packaging.
In the project settings the following mask is set:
Now I create package content01.dat via Package Builder:%DEFAULT FOLDER%\content*.dat
"Allow bundling of external packages" is checked.%DEFAULT FOLDER%\
content\
1.txt
2.txt
On real PC I can read content\1.txt and content\2.txt
But not inside virtual box (VirtualBox 4.2.4 r81684, guest is WinXp, host Win7).
I use the following code:
Code: Select all
...
void doTest(const string &path)
{
ifstream in(path);
cout << "is open: " << in.is_open() << "\n";
char buf[15];
memset(buf, 0, 15);
in.read(buf, 15);
for (int i = 0; i < 15; i++)
cout << "[" << hex << setfill('0') << setw(2) << int(buf[i]) << "]";
cout << "\n";
}
int main(int argc, char **argv)
{
cout << "== 1.txt:\n";
doTest("content\\1.txt");
cout << "== 2.txt:\n";
doTest("content\\2.txt");
}
In real app some files are opens normally in VM, so I wrote example app (above) and it can't open.
Also it's not clear in the docs how EVB feature works. Does it loads whole package on startup? Can I use random access to the bundled files without loading whole content to the memory (for example, I have package with a millon big video files and want to stream one of them)?
Thanks!