Archive: image from the resources ?


image from the resources ?
Exist some way to use a gif file directly from the installer exe resources ? This is to not need to extract it.


nobody knows a way to do that ?
maybe i nto explained so fine.

i want to use a image file into the installer executable, but i dont want to extract it to a file. How can i do that ?


you can probably add the resource using !packhdr and resource hacker. Reading it from the resource is another matter. IE and some other MS things support the res:// protocol, that might help


when i tell "resources" i mean into the installer exe made by makensis. I only want to transfer the file from the memory to the plugin to show it.


yes i know what you mean, resource hacker can be called from the command line.

But why can't you just extract it like a normal file to $pluginsdir?

Even if it is a resource, people can still make a copy of your image by using resource hacker


so ewasy to understand why i want that.
Imagine want to use certain images only to show during the install function. Then why we need to extract these images ?
The best would be to load them on the memory and give this memory to the splash plugin, or others.


$pluginsdir is deleted when installer quits, no reason not to put it there. The image is even compressed, if it was a resource, it would not be compressed


well

at finally nobody know how to do that ?
i thought can be possible to made on nsis...


As said use Resource Hacker to add a resource using !packhdr and then use the LoadBitmap API to load it at run time then set it at run time using SendMessage with STM_SETIMAGE.

To be honest though, what on Earth is the point? There really is no benefits by storing the bitmap in the exe header when you can compress it in the data block.

Stu


maybe you not understand what i want to do. ok i go to repeat.

I want to use a bmp or gif or jpg. This image is into the installer generated by makensis. But to use this image, i dont want to extract it to a file. I WANT TO USE IT DIRECTLY FORM THE MEMORY. Is that possible with nsis ?


Yes, it is possible. Afrow UK just gave you the solution: add a resource using a command line tool like Resource Hacker (using the compile-time !packhdr command) and load it from your executable using the LoadBitmap API (check the System plug-in for info about calling Windows API).

Note that your images will be uncompressed when stored inside the installer resources.


and we cant add the resource with makensis ?


If makensis could do that we would tell you :)

Stu