- NSIS Discussion
- flash play during installation
Archive: flash play during installation
aditu.g
13th March 2007 11:14 UTC
flash play during installation
I search trough the forum but unfortunately I did not manage to find a solution on this. I am trying to use nsWeb to insert a flash movie and inetc to download a file. What I am not able to do is to merge the two of them in the install page, because nsWeb is using custom page to display the flash and inetc is using the install page. Is there a way to have an installation page displaying the download progress bar inside of it and also to play the flash inside the same page?
kichik
14th March 2007 19:53 UTC
Doesn't inetc have an option to download in a pop-up window?
aditu.g
15th March 2007 12:04 UTC
Yes, inetc has banner option.
Still I am not able to run them (nsweb and inetc) simultaneously ... maybe is so easy but I could not figure it out ...
Takhir
15th March 2007 13:58 UTC
Not flash.. but http://nsis.sourceforge.net/AnimGif_plug-in can do the trick with animated gif.
aditu.g
15th March 2007 14:25 UTC
yes. AnimGif does the trick but what if I want to use flash movie. It should be a combination between AnimGif and nsWeb (use the way that AnimGif use the install window to display and make this work on nsWeb. But I'm too stupid to make that.
I think there are few people that will use and enjoy this flash movie play at installation time if someone can fix nsWeb to use not only custom pages to display iself but also the instpage ....
Joel
15th March 2007 15:30 UTC
Originally posted by aditu.g
if someone can fix nsWeb to use not only custom pages to display iself but also the instpage ....
There's a popup method in my plugin, see the examples.
BTW: You forgot the write the magic word... "please" ;)
Red Wine
15th March 2007 15:33 UTC
You may try this (not tested though), create a 2nd 'installer' which include only the custom page the nsWeb and the flash movie and extract it in $PLUGINSDIR, execute it just before launch inetc in banner mode and close it once inetc has finished.
aditu.g
16th March 2007 11:04 UTC
Originally posted by Joel
There's a popup method in my plugin, see the examples.
BTW: You forgot the write the magic word... "please" ;)
Please, please, please. Could you be so kind
Joel
16th March 2007 19:35 UTC
Originally posted by aditu.g
Please, please, please. Could you be so kind
Do you actually read the plugin examples? :mad:
aditu.g
17th March 2007 11:51 UTC
My need is to display the html page (having flash inside) during installation. I can use the popup way but the window will show over installation window and only when is closed will continue the installation process.
I was thinking if there is a way to insert with resource hacker a control in the installation page (106 I think) and make nsweb use this one instead of 1018 from 105. I mean to place a control for the html in the usual place of the show details.
In this way html is inside the installation page...
But like I said I too dumb to figure out a way to do this. Please :rolleyes: help me
aditu.g
21st March 2007 09:29 UTC
No ideas? If I try to launch the flash and nsweb in popup, the flash is waiting to be close and after that the download is started ... I have made 2 exe: one is displaying the flash in popup, the other is download the files. Is there a way to close the flash popup when download was ended?
Red Wine
21st March 2007 09:59 UTC
I have made 2 exe: one is displaying the flash in popup, the other is download the files.
Does this actually work as expected?
I haven't yet the time to compile and test this suggestion, would be nice if you post a minimal example about :)
Is there a way to close the flash popup when download was ended?
You could use Takhir's function when download is finished,
http://nsis.sourceforge.net/Find_and_Close_or_Terminate
aditu.g
21st March 2007 12:48 UTC
Yes, it is working. In the same ugly way I can just taskill the showHTML.exe process instead of kill the window. I still hope that there is another nice way to use together both plugins. here is the example
Red Wine
21st March 2007 13:13 UTC
Code should reside in section. Below script works as expected,
#Find and Close or Terminate
!define APP_NAME find_close_terminate
!define WND_CLASS "Internet Explorer_TridentDlgFrame"
!define WND_TITLE ""
!define TO_MS 2000
!define SYNC_TERM 0x00100001
!include WinMessages.nsh
LangString termMsg ${LANG_ENGLISH} "Installer cannot stop running ${WND_TITLE}.\
$\nDo you want to terminate process?"
LangString stopMsg ${LANG_ENGLISH} "Stopping ${WND_TITLE} Application"
!macro TerminateApp
Push $0 ; window handle
Push $1
Push $2 ; process handle
DetailPrint "$(stopMsg)"
FindWindow $0 '${WND_CLASS}' ''
IntCmp $0 0 done
System::Call 'user32.dll::GetWindowThreadProcessId(i r0, *i .r1) i .r2'
System::Call 'kernel32.dll::OpenProcess(i ${SYNC_TERM}, i 0, i r1) i .r2'
SendMessage $0 ${WM_CLOSE} 0 0 /TIMEOUT=${TO_MS}
System::Call 'kernel32.dll::WaitForSingleObject(i r2, i ${TO_MS}) i .r1'
IntCmp $1 0 close
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION "$(termMsg)" /SD IDYES \
IDYES terminate IDNO close
System::Call 'kernel32.dll::CloseHandle(i r2) i .r1'
Quit
terminate:
System::Call 'kernel32.dll::TerminateProcess(i r2, i 0) i .r1'
close:
System::Call 'kernel32.dll::CloseHandle(i r2) i .r1'
done:
Pop $2
Pop $1
Pop $0
!macroend
!include "MUI.nsh"
!insertmacro MUI_LANGUAGE "English"
AutoCloseWindow false
OutFile `download.exe`
function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\showHTML.exe "showHTML.exe"
functionend
Section "Dummy Section" SecDummy
HideWindow
exec "$PLUGINSDIR\showHTML.exe"
sleep 1000
inetc::get /caption "Getting main installation" /banner \
"Please wait ... $\nWinRar is downloading necesary files" \
"http://www.rarlab.com/rar/wrar37b5.exe" "$PLUGINSDIR\winrar.exe"
Pop $R1
MessageBox MB_OK "Plugin return code: $R1"
!insertmacro TerminateApp
exec "$PLUGINSDIR\winrar.exe"
BringToFront
SectionEnd
aditu.g
4th April 2007 12:01 UTC
Is there a way to put the banner inetc plugin download on the bottom of the popup window of the nsweb html page? I need to integrate somehow the 2 plugins (inetc and nsweb) and display the html flash content and the download progress bar in the bottom of that window. Any help would be greatly appreciated. thanks
Joel
4th April 2007 14:47 UTC
Since nsweb html page, its boundries is all the dialog window, you'll have to change the source code, to reduce the size.
aditu.g
4th April 2007 16:31 UTC
I used Inetc plugin source code and modify resources in the IDDialog2 (used for the banner method). I inserted there a shockwave flash object. Everything looks ok (I test the dialog in MsVC++ with ctrl+T and it is displaying the flash). After I compiled the dll and call the plugin from the installer nothing happen. Please can someone can take a look and tell me what is wrong ...
Takhir
4th April 2007 18:43 UTC
Looks like common Win32 methods in the DialogBox() call cannot create shockwave flash object in the dialog, this is why plug-in returns "Dialog Error", to see this please
Pop $0
MessageBox MB_OK $0
after plug-in call (present in all samples :) ). You can search internet for samples, this is what I found right now
http://www.codeproject.com/useritems/FlashGui.asp
Takhir
6th April 2007 19:41 UTC
Attached is a flash player sample for Win32 dialog. Finally you need few lines of code in OnInitDialog function only. I am not sure how good this will be on all platforms, but dialog worked fine during 10 minutes I played with it on XP. You can modify Inetc in the same manner. Please note that player require a full path to swf file (may be set in the command line in this sample).