Bundling it all into the exe...

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
DrBenito
Posts: 35
Joined: Mon Jul 19, 2004 8:50 pm
Location: Newcastle, UK
Contact:

Bundling it all into the exe...

Post by DrBenito »

Hi

Just a question to try and pick anyone's brain about bundlign resource files into the exe...

Ideally what I'm trying to do is compile a windows executable with the .x animated meshfile bundled with it so when I run my app it loads the .x mesh from within itself into an irrlicht IAnimatedMesh...

I suppose the first question would be: is this actually possible?

If so... any suggestions for the best approach, or pointers/links to references/apis etc. Im using the dev-cpp environment which has windres with it. Although again Ive never used this aspect so any good resources on this would be useful too...


Many thanks for any suggestions :)

Ben
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

Hi Doctor,
i dont know, too. But what do you want ? Maybe you want that your resources are safe from "normal" Users ? In Irrlicht its possible to open a zip-file and read the resources from there. I dont know, its a question to the engine-screwers, is it possible to open the zip-file secure with password/and or encryption ? Or to change the engine to a secure zip-file ?
DrBenito
Posts: 35
Joined: Mon Jul 19, 2004 8:50 pm
Location: Newcastle, UK
Contact:

Post by DrBenito »

Hi knighttoflight,

I see what you mean, the secure zip file could be useful indeed. Although that's not quite what Im after here.

Rather than having a zip file as such Im making a screensaver basically and figured rather than worrying about where the resource files (meshes, textures etc) end up on the file system it would make it very easy if they were contained within the executable file itself. Then you just call some kind of "getResource(id)" function.

I suspect it will be something along the lines of:
http://www.winprog.org/tutorial/resources.html

Which means figuring out what windoze excess to include and how to use it, then the final step of how to actually get the irrlicht engine to accept whatever format the win api gives me the data in :)

There is almost certainly an easier way of doing this and I'll find out after I've finished the above :D

Cheers
Ben
DrBenito
Posts: 35
Joined: Mon Jul 19, 2004 8:50 pm
Location: Newcastle, UK
Contact:

Post by DrBenito »

Ever closer....

http://www.codeproject.com/win32/binaryresources.asp

This is basically what I'll be doing only instead of extracting another exe I'll extract a number of mesh.x files...

There may even be a way of doing it without actually writing them to another file and loading in directly to irrlicht... :D

Cheers
Ben
buhatkj
Posts: 444
Joined: Fri Dec 12, 2003 4:53 am
Contact:

.x is text so....

Post by buhatkj »

well, a .x file is just text, so in theory it could just be a big string, and if you could somehow pipe it to the irrlicht file-open dealy, you might make this work...this sort of thing would be easy in PERL, but we are probably talking about a c++ app here...
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
DrBenito
Posts: 35
Joined: Mon Jul 19, 2004 8:50 pm
Location: Newcastle, UK
Contact:

Post by DrBenito »

Hi buhatkj,

true true... it would certainly probably be much simpler doing it that way for string based data, but as soon as you start dealing with textures too it's back to square one :)

it is a c++ app too, so not as easy as Perl :)
Electron
Posts: 874
Joined: Sun Mar 14, 2004 12:05 am
Location: Massachusetts USA

Post by Electron »

when I was first leanring coding I used a form of basic called RapidQ which could bundle resources into the .exe, extract them at runtime, then delete them again. I have no clue how it was done, however.
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.

Crucible of Stars
puh
Posts: 356
Joined: Tue Aug 26, 2003 3:53 pm

Post by puh »

To include Irrlicht.dll into your exe you simple have to make static link library. Read this topic: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=2709
DrBenito
Posts: 35
Joined: Mon Jul 19, 2004 8:50 pm
Location: Newcastle, UK
Contact:

Post by DrBenito »

cool cheers. that'll be helpful too :)
Serapth
Posts: 5
Joined: Mon Aug 16, 2004 2:41 pm

Post by Serapth »

Actually, the resource idea above can still be used. You can put binary file into a resource file without issues, which will result in it being embedded in your application.

Also, there are a few tools out there, that allow you to pack data after your EOF marker in your executable.
Post Reply