Archive: Rotating images while instfiles?


Rotating images while instfiles?
Hello,

ive searched the articles / plugins and fourms but didnt find a way to display rotating images while the installation process.

Maybe someone out there who can help me how to realize this?

kind regards,
Ingo Bartel


I have not tried this myself but I think it might be possible using the bgImage plugin, although I could be wrong.

Vytautas


It's not possible with bgImage, but with some source changes to it, it would most certainly be possible.


Hello,

thanks for your replies.

Yes tried with bgImage before kichik's post but couldnt use addimage without using setbg before.

@kichik: i saw you made the bgImage plugin. Would you able to create a similiar plugin for adding images to the NSIS dialogs?

kind regards,
Ingo Bartel


You can already add images to the NSIS dialog using AddBrandingImage and SetBrandingImage. See gfx.nsi for example.


Hello,

yes i tried that before. However i cant use AddBrandingImage inside functions/sections. Even if i could i dont want the window gets resized.

What i tried to do is displaying different images below the installation progress.

AddBrandingImage wont help me here.

kind regards,
Ingo Bartel


AddBrandingImage will help you. You use AddBrandingImage outside of a function or a section and then SetBrandingImage inside. See gfx.nsi.


Hello,

i did see how gfx.nsi used it. However when i use AddBrindingImage once the window gets "framed".

Ie. when i use AddBrandingImage bottom 100 the bottom 100 pixels of the NSIS window gets reservde for the branding image. This goes for all dialogs rather than just the instfiles dialog. The branding image gets adjusted to the border as well.

I saw Modern GUI used SetBrandingImage with a imageid. I couldnt figure out what 1046 means. Maybe i could use InstallOptions in addition with SetBrandingImage? This would lead into a second problem i currently have: How can i use InstallOptions inside the instfiles page (when using modern GUI) .

kind regards,
Ingo Bartel


This is one big misunderstanding :(

You want to switch the pictures, not rotate them as in 90 degrees to the right or something like that...

You can do that with BgImage. You don't have to use AddImage, SetBg can set an image too as the background. But those will show behind the installer. If you want it to show below the progress bar you'd need some more work. Let me know if BgImage is not enough for you and I'll tell you how to do that.

As for the new questions, you can't use InstallOptions in a section, 1046 is the id of the branding image placeholder in the MUI UI (open modern.exe in Resource Hacker - dialog 105) and yes, AddBrandingImage does indeed adds an image for the entire installation. But you can switch that while installing too...

I'm sorry for the confusion.


Hello,

sorry for not beeing specific. Yes i meant switching pictures.
SetBG isnt enough - i would like to have just the installer window.

kind regards,
Ingo Bartel


Ok, then you'd have to edit the UI file with Resource Hacker, add a place holder for an image where you want it to be and then do the image loading and setting on yourself using System.dll. The code for loading and setting images can be found in exec.c under EW_SETBRANDINGIMAGE. You should use that as a refernce for the System.dll calls. To get the HWND of the place holder you should use:

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 <insert control id>
# load image...
SendMessage $0 <insert value of STM_SETIMAGE here> <insert value of IMAGE_BITMAP here> <insert handle to loaded image here>


Hello,

thanks alot it's working well now (exactly is i wanted).

kind regards,
Ingo Bartel


SendMessage $0 <insert value of STM_SETIMAGE here> <insert value of IMAGE_BITMAP here> <insert handle to loaded image here>
I'm trying to get this to work for my installer, but I don't understand what "insert handle to loaded image here" means. Could someone provide some advice with this?

BTW, this doesn't work:

SendMessage $0 ${STM_SETIMAGE} ${IMAGE_BITMAP} "STR:C:\windows\blocks.bmp"

I found http://nsis.sourceforge.net/archive/...php?pageid=405 which works for me (I'm not using MUI)


Hi,

i copy files using :


File /r ..\plugin\eclipse32\


and i wanted some image files to display during installation (about 233 Mb files).
I tried ebanner and the modified MUI provided here but there is no way to specify multiple file and time between displays so that i can display only one picture during install.
I tried to "cut" the process of the files copy in parts but i could not manage well with it.
Would it be possible ?
Hope i ve been clear ^^
Thanks

Is it possible to edit the script image.nsh to load multiple pictures and display them at given time during install ?


just giving this thread a last chance to get an answer ! ^^


http://nsis.sourceforge.net/AnimGif_plug-in


Thx Takhir, i'll try this (thought about using an animated gif but didn't try if it was possible during the files copy)


Hi all:

Everybody can give me Modern_Instpics.zip,I don't down it.thx!


Hi all:

Everybody can give me Modern_Instpics.zip,I don't down it.thx!


Email: skyfish2u@yahoo.com


have you tried here: http://vytautas.mine.nu/joomla/index...d=21&Itemid=35

Vytautas


Sorry,I can't open the URL. Vytautas,Would you send it give me ? Thx!


hhhmmm strange seems to work for me. anyhow file sent


You are a great guy! I'll keep secret your mail address! Thx again!


Hi Takhir,

i tried to display an animated gif in the current window where i have the progress bar of the copying files but the gif "flicks" and is not well displayed (almost invisible).
i tried both dll versions (in the second package, the example with the bird and baby is exactly what i want and display correctly).
If i put another window on top then i return to the installation window the gif display correctly but for a really short time...
Any idea ?
Thx anyone who could help !


Extract code :


# Installer sections
Section -Main SEC0000
SetOutPath $INSTDIR
SetOverwrite on
AnimGif::play /NOUNLOAD /VALIGN=CENTER "$EXEDIR\aist.gif"
File ..\plugin\eclipse32\*


Edit : do i have to create an empty white placeholder for animated header GIF like proposed in an example ??

You don't need placeholder for INSTFILES page. If you can attach image and (short) script to post I'll test it. May some overlapping with progress bar have place? Try with default bottom valign.


Takhir,

i was about to send you my complete script but wanted to clean some useless code before, i found that i had tested Modern_Instpics with an "!include Image.nsh" so i comment it and recompile script and test it and... it works !
I m now using default modern.exe UI and not modern_instpics.exe overriden by the Image.nsh include.
Sorry for that and special thx for your help Takhir and dll ! ^^


How to do it

Originally posted by kichik
Ok, then you'd have to edit the UI file with Resource Hacker, add a place holder for an image where you want it to be and then do the image loading and setting on yourself using System.dll. The code for loading and setting images can be found in exec.c under EW_SETBRANDINGIMAGE. You should use that as a refernce for the System.dll calls. To get the HWND of the place holder you should use:

FindWindow $0 "#32770" "" $HWNDPARENT
GetDlgItem $0 $0 <insert control id>
# load image...
SendMessage $0 <insert value of STM_SETIMAGE here> <insert value of IMAGE_BITMAP here> <insert handle to loaded image here>
Kichik:
I'm a newbie in NSIS, Would you tell me that how can i do it ?

See the result of this thread:

http://nsis.sourceforge.net/wiki/Mod...stalling_files