18th December 2004, 15:47   #41
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Might be better to give me test script, but I did some changes - redraw not tested.
1006 redraw (RedrawWindow(with erase background))
Attached Files

18th December 2004, 20:50   #42
Afrow UK
Moderator

Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
The problem is still there with the overlapping text.
Compile this example; it shows the problem.

-Stu
Attached Files

19th December 2004, 07:47   #43
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Updated. Tested on Win98 SE and WinXP Pro.
And I still hope that InetLoad sounds better then NSISdl
Attached Files

 19th December 2004, 14:28 #44 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Works beautifully, well done! I will convert my installer over to InetLoad -Stu
19th December 2004, 15:23   #45
Afrow UK
Moderator

Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ok, I found some really dodgy weird bug.

If I Push two things onto the stack before calling InetLoad, InetLoad always fails and returns either "File Open Error" or "URL Parts Error".
InetLoad returns "File Open Error" if I have two empty strings ("") onto the stack, and "URL Parts Error" if I have two non-empty strings on the stack (ie "blah").
If I Pop one of them off immediately, InetLoad works as normal!
It seems that if I have more than one item on the NSIS stack, InetLoad fails.

This example shows the problem...
Compile it and you'll get the problem straight away.

Edit: Have you got code in there to read the URL and the save-to-file from the stack? Nothing in the readme about it!!!
And it's not reading from the top of the stack either, more like either at the bottom of somewhere in-between!

-Stu
Attached Files

 19th December 2004, 15:33 #46 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Could you just remove the stack support? For some reason because I'm using the stack a lot in this installer InetLoad messes the stack up completely (it seems to move things on the stack around!) -Stu
 19th December 2004, 15:38 #47 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 If I Push this onto the stack first: "ja" "ja" "$EXEDIR\GameVer.muf" "http://myweb.tiscali.co.uk/imker/Updater/Games/hostile.gdf" "" "$EXEDIR\GameVer.muf" "http://myweb.tiscali.co.uk/imker/Updater/Games/hostile.gdf" Then I call InetLoad, the stack becomes just: "ja" Definately something strange going on there -Stu
 19th December 2004, 15:43 #48 Takhir Major Dude   Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 This is not a bug, Kichik asked to add multiple files support, as many as plug-in can find in stack. This is why plug-in reads stack till the bottom. If plug-in cannot read both URL and file_name (one string presents), it exits with OK code, but if 2 strings comes from stack and one is not URL or another is not a valid file path - it fails with some code. And one more redraw of 1006 control on exit added, sorry, it's for 'Completed'. Last edited by Takhir; 19th December 2004 at 15:59.
 19th December 2004, 15:59 #49 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 You need something in the plugin to check when the URL's Pushed on to the stack end. E.g. Push "start urls" Push "url 1" Push "save to" Push "url 2" Push "save to" InetLoad::Load /SILENT InetLoad just needs to keep Popping off the stack until it finds the string "start urls" (or something). Currently it's Popping everything off the stack in case that it's another download URL. This is silly because we might need to use the stack for other strings as well. We call InetLoad and after that they're all gone! Edit: I don't think Kichik told you, but this has to be the default behaviour. Check out all the NSISdl macro's on the archive which do exactly the same thing... -Stu
19th December 2004, 16:28   #50
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
I can add /END parameter for such situations, for example

Push "bla"
InetLoad::load /POPUP "http://myweb.tiscali.co.uk/imker/Updater/Games/hostile.gdf" "$EXEDIR\GameVer.muf" /END Pop$R0
MessageBox MB_OK $R0 Pop$R0
MessageBox MB_OK $R0 Second MessageBox says "bla" in my test Attached Files  inetload.zip (17.5 KB, 944 views)  19th December 2004, 16:49 #51 Afrow UK Moderator Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Ah very cool! I will try it out in a few minutes (when my map finishes compiling). -Stu  19th December 2004, 16:54 #52 Afrow UK Moderator Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Just curious then... How does the plugin know whether to get the URL's from the stack or from the command-line. If no extra params exist on the command-line then it reads from the stack? If it reads from the stack, then how does it know when to stop? I might think about using the stack to pass multiple URL's... -Stu  19th December 2004, 17:42 #53 Takhir Major Dude Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 Plug-in takes all parameters from the stack only. And I thought this is mainroad of NSIS plug-in usage (or I misunderstood something?). Installer pushes command line parameters to stack before plug-in call, plug-in uses popstring() for [IN] parameters and pushstring() for [OUT] result (because all plug-in entry points are 'void' type). I guess  19th December 2004, 18:26 #54 Afrow UK Moderator Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Oh I see now. I didn't know that sorry It now works bloody perfect, excellent! I can now distribute my installer (wahoo!) -Stu  5th January 2005, 19:38 #55 Takhir Major Dude Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 Last version archive page http://nsis.sourceforge.net/archive/...instances=0,32 11th January 2005, 07:55 #56 Takhir Major Dude Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 I tested new version, it supports MSI banner mode, two parameters set this window caption and text "/BANNER CAPTION TEXT". Multilined text may be created using$\n character in the TEXT string, up to 3 lines I could add there. Plug-in displays package first icon in the top left corner of the banner window. Progress bar appears when (and if) file size comes from server, so if file size is unavailable (chunked reply, very seldom for static files) or file size is < 8 kB and line is fast, progress bar may stay hidden.
Attached Files

 18th February 2005, 21:16 #57 mrtech Junior Member   Join Date: Oct 2002 Posts: 46 I've just notice a little issue with the status returned after downloading. I've seen this on Win2k & XPsp1 systems so far, what happens is that InetLoad return "1" instead of "Ok" after succesfully downloading a file. Here's my code snippet that I'm using with 2.05: code: InetLoad::load "${PRODUCT_URL}$WEBFILE" "$TEMP\$WEBFILE" MessageBox MB_YESNO|MB_ICONQUESTION "$0" 0 0 StrCmp$0 "Ok" 0 dlskip ExecWait '"$TEMP\$WEBFILE" /q' Delete '"$TEMP\$WEBFILE"' dlskip:  Had to change "Ok" to "1" to get it to work again. Using the archive 1/18/2005 build.
18th February 2005, 22:56   #58
robber98
Junior Member

Join Date: May 2004
Posts: 29
Quote:
 Originally posted by mrtech I've just notice a little issue with the status returned after downloading. I've seen this on Win2k & XPsp1 systems so far, what happens is that InetLoad return "1" instead of "Ok" after succesfully downloading a file. Here's my code snippet that I'm using with 2.05: code: InetLoad::load "${PRODUCT_URL}$WEBFILE" "$TEMP\$WEBFILE" MessageBox MB_YESNO|MB_ICONQUESTION "$0" 0 0 StrCmp$0 "Ok" 0 dlskip ExecWait '"$TEMP\$WEBFILE" /q' Delete '"$TEMP\$WEBFILE"' dlskip:  Had to change "Ok" to "1" to get it to work again. Using the archive 1/18/2005 build.
Don't you have to pop the return value after InetLoad? I don't see it from your code.

 19th February 2005, 00:24 #59 mrtech Junior Member   Join Date: Oct 2002 Posts: 46 oops, thanks.
21st February 2005, 12:48   #60
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
2 updates: Resume option (for really bad connections ) and ftp "file not found" check out. If resume option set (/RESUME "Do u want to retry?") and error occure (except "not found"), plug-in first asks user to check connection. Many thanks to Afrow UK and azmoviez for ideas and help.
Attached Files

 2nd March 2005, 15:17 #61 Yurik Senior Member   Join Date: Oct 2004 Posts: 103 Takhir, is it possible to set proxy settings (proxy/port/user/password) for your plugin inside the NSIS script? Thanks Computer Forensics Investigations, Internet Security and Parental Control, - http://belkasoft.com
3rd March 2005, 12:36   #62
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Proxy authorization support added. New command line options:

/PROXY IP:PORT - overwrites current proxy settings, not required in most cases, because IE settings will be used by default.

For example

BTW URL can also include target server login/password, CrackUrl function recognizes it, something like this (remove spaces after : , :+p= ) : http://username: password@www.whatever.com/secret/eyesonly.htm

Many thanks to Yurik for tests.
Attached Files

9th March 2005, 09:44   #63
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
I have few similar requests, so new option:
/POPUP PREFIX
sets first part of the popup dialog caption (prefix), for example
/POPUP "Some text"
displays:
Some text - Connecting...
You cannot skip this parameter, but can use
/POPUP ""
Attached Files

 25th March 2005, 12:00 #64 kichik M.I.A.[NSIS Dev, Mod]     Join Date: Oct 2001 Location: Israel Posts: 11,343 I have tested the plug-in on Windows XP SP2. The HTTP download went well, but the FTP download failed. I have Windows Firewall turned on and it popped up a message asking me if I want to allow the installer to connect. InetLoad gave me an error message before I could unblock it. When I tried it again, after it was unblocked, it just failed with the same error message - "Open URL Error". The URL in the example seems OK. I was able to open it using Firefox. NSIS FAQ | NSIS Home Page | Donate $"I hear and I forget. I see and I remember. I do and I understand." -- Confucius 25th March 2005, 13:49 #65 Takhir Major Dude Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 Now I work on XP Pro SP2 too, new project http://www.modya.com requires this MS Firewall bihaviour is so strange I deleted InetLoad from exclusions list, firewall popuped "restricted access" dialog, but I could see on the NSIS window under this dialog (I not closed it) that 25 MB download was continued and finished with OK status ... Nevertheless, first question - MS Firewall connection error, simple patch: /RESUME "" option, I re-tested this, plug-in popups messagebox and continued download attempts after I clicked "Retry". Better way - specific firewall error, this case plug-in can auto-enable resume option (if install is not 'silent'). I wrote above that I could not reproduce situation, so KichiK please test attached dll, it should display messagebox with lasterror and InternetGetLastResponseInfo (if any). The only code I saw in the similar situations earlier with other programs was 12002 (when Firewall threated conection as virus atack). Second question - InetLoad is in the Firewall list, but still connect error occure - no ideas right now.. Attached Files  inetload.zip (8.0 KB, 852 views)  25th March 2005, 15:16 #66 kichik M.I.A.[NSIS Dev, Mod] Join Date: Oct 2001 Location: Israel Posts: 11,343 I didn't get any new message box using the attached DLL. Still the same "Download Status: Open URL Error". I should have included the "Download Status:" part in the last message. It seems the download does start because it updates the file size field (17kb). But then the firewall dialog opens and the failure message pops up. NSIS FAQ | NSIS Home Page | Donate$ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius
 26th March 2005, 01:30 #67 dujuan Junior Member   Join Date: Aug 2004 Posts: 25 Great plugin! Does this plugin support timeout parameter like nsisdl ?
26th March 2005, 13:47   #68
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Attached version supports
InternetSetOption flags include few timeout parameters, but I guess connect is what you want.
Also:
1. ftp client works in the passive mode, all modern servers support this.
2. On firewall error plug-in (if not in the silent mode) auto-enables Resume option and displays message box, so user can solve firewall problem and click Retry.
Attached Files

 28th March 2005, 16:01 #69 delboy Junior Member   Join Date: Jun 2004 Location: London Posts: 15 Really cool, will set about updating our installers! Quick question - when i used NSISDL i hacked together a method of allowing the user to quit out of the installer and pick up the download when they reran it (not very pretty but it helps for people downloading large files over dial up) Is there a way of doing this more elegantly using the retry functionality you have in here (ie is there some way of persisting the status of download and picking it up again)?
 1st April 2005, 15:04 #71 delboy Junior Member   Join Date: Jun 2004 Location: London Posts: 15 Hi Takhir, Is persisting the download session possible, such that a user may actually quit out of the installation and on the next run auto resume the download? obviosuly the logic behind this would be in the nsis script itself, but its more a question of how easy it would be to have say a retry now retry later and cancel options on that connection failure box.
 14th April 2005, 05:03 #72 seniorquico Junior Member   Join Date: Apr 2005 Location: San Luis Obispo, CA Posts: 1 I've got an interesting problem with Inetload. I haven't really found any info on something like this, but I've been scratching my head for a few hours and I just can't seem to figure it out. I copied the Inetload command from the example in the plugin archive and added a file of my own on a new command right after it, just like so (on multiple lines to try not to break page's design): code:InetLoad::load /POPUP "http://www.dreamgirlswallpaper.co.uk/ fiveyearsonline/wallpaper/Cameron_Diaz/camerond09big.JPG" "$EXEDIR\cd.jpg" InetLoad::load /POPUP "ftp://my_server/patches/patch1.exe" "$EXEDIR\patch1.exe"  The above code WORKS without any problems. But now the interesting thing (at least to me), the moment I delete the first line, the Cameron Diaz pic dl, the whole thing stops working! To be more specific, the installer downloads the file just like it did previously, but as soon as it obtains the file, the installer crashes! I started to play around with this some more, and I further came to the conclusion that if I even change the Cameron Diaz pic to ANYTHING else, the installer crashes after obtaining the files. Now, I don't know if this is a cruel joke to make us all download that file, but I really can't figure this problem out. But, I'm just a "simple" web programmer so what do I know about these complex NSIS scripts and plugins. Any help would be GREATLY appreciated.
 14th April 2005, 07:29 #73 Takhir Major Dude   Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 First of all if you are using latest plug-in version, popup parameter includes 'prefix' text, to use default it should be /POPUP "" Code above should not work because first download result - 'OK' string (from Cameron ) is in the stack yet, please use Pop $1 (for example) after every download to clean stack. Otherwise 'OK' string will be first parameter for the next plug-in call. If you are using stack for other vars, use /END parameter (see Readme) to stop plug-in's stack reading at the end of this command line. Plug-in also supports few downloads from one command line. And now some single ftp download, re-tested: code: Section "Dummy Section" SecDummy InetLoad::load /POPUP "Readme.txt from MS FTP" "ftp://ftp.microsoft.com/MISC/ReadMe1.txt" "$EXEDIR\rm.txt" /END Pop $0 # return value = exit code, "OK" if OK MessageBox MB_OK "Download Status:$0" SectionEnd  Status 'OK', file looks correct too. I aslo tested big ftp download with loginassword in the LAN, and not found any problems. And I hope that bad syntax only might cause crash
 15th April 2005, 10:55 #74 dujuan Junior Member   Join Date: Aug 2004 Posts: 25 Does this plug support rtsp or mms protocol ?
 15th April 2005, 11:23 #75 Takhir Major Dude   Join Date: Feb 2004 Location: Moscow, Russia Posts: 1,222 http and ftp only. rtsp(tcp) - no, rtsp over http - I am not sure, but if you want (and can) save all content to file (using http as transport) - may be (not tested). But please note, http and ftp support GET method only. Probably the same with mms.
18th April 2005, 09:10   #76
Takhir
Major Dude

Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
CrackUrl() string buffers length bug fixed (256->NSIS string_size).
Attached Files

 23rd April 2005, 13:01 #77 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Hey Takhir, just wondering why with InetLoad I only get a maximum of 30kbps download speeds on all servers when through browsers I usually get 80-120kbps. Other people have the same problem too. Edit: Same problem with NSISdl too -Stu
 23rd April 2005, 20:18 #78 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 I was wondering if you could implement the NXS progress banner into InetLoad, so we could have just a simple progress bar when downloading small files between pages. Also, how easy would it be to write a BitTorrent plugin that works. I've tried the one on the archive (written in Python) but it doesn't seem to work at all. The actual example is very poor too. -Stu
 23rd April 2005, 22:18 #79 Afrow UK Moderator     Join Date: Nov 2002 Location: Surrey, England Posts: 8,434 Now I'm trying to get InetLoad to execute a PHP script on the internet. Everytime it says File Open Error, when the script is executed fine through my browser. I've even tried setting the Content-length header and then it works in NSISdl, but still not with InetLoad. I tried the post example script you made, but that doesn't work for me either. I'm wondering if it's the server, but if it works with NSISdl then surely it can't be... Please help Edit: LOL now it's working. Because I'm using CallInstDLL to call the plugin, I had the URL and local file Push order swapped -Stu
25th April 2005, 21:43   #80
Jnuw
Senior Member

Join Date: Sep 2004
Location: Wisconsin, US
Posts: 258
Quote:
 Originally posted by Afrow UK Hey Takhir, just wondering why with InetLoad I only get a maximum of 30kbps download speeds on all servers when through browsers I usually get 80-120kbps. Other people have the same problem too. Edit: Same problem with NSISdl too -Stu
Stu, I just tested it on my work PC, i was getting around 1360kbps which is about 90% of our T1. I'm using the InetLoad from 3/3/05, which is probably this one. Hope this helps.

Jnuw