|
|
#41 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
Might be better to give me test script, but I did some changes - redraw not tested.
1006 redraw (RedrawWindow(with erase background)) Downloading ... Connecting now appears at the beginning of download. |
|
|
|
|
|
#42 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
The problem is still there with the overlapping text.
Compile this example; it shows the problem. -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#43 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
Updated. Tested on Win98 SE and WinXP Pro.
And I still hope that InetLoad sounds better then NSISdl
|
|
|
|
|
|
#44 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Works beautifully, well done!
I will convert my installer over to InetLoad ![]() -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#45 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#46 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#47 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#48 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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 14:59. |
|
|
|
|
|
#49 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#50 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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
|
|
|
|
|
|
#51 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Ah very cool!
![]() I will try it out in a few minutes (when my map finishes compiling). -Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#52 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#53 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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
|
|
|
|
|
|
#54 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
Oh I see now. I didn't know that sorry
![]() It now works bloody perfect, excellent! I can now distribute my installer (wahoo!) -Stu
Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#55 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
Last version archive page http://nsis.sourceforge.net/archive/...instances=0,32
|
|
|
|
|
|
#56 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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.
|
|
|
|
|
|
#57 |
|
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: Had to change "Ok" to "1" to get it to work again. Using the archive 1/18/2005 build. |
|
|
|
|
|
#58 | |
|
Junior Member
Join Date: May 2004
Posts: 29
|
Quote:
|
|
|
|
|
|
|
#59 |
|
Junior Member
Join Date: Oct 2002
Posts: 46
|
oops, thanks.
|
|
|
|
|
|
#60 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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.
|
|
|
|
|
|
#61 |
|
Senior Member
Join Date: Oct 2004
Posts: 100
|
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 |
|
|
|
|
|
#62 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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. /USERNAME LOGIN - proxy username /PASSWORD PASSWD - proxy password For example InetLoad::load /PROXY 55.55.55.55:8080 /USERNAME nick /PASSWORD jagger .... 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.htmMany thanks to Yurik for tests. |
|
|
|
|
|
#63 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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 "" for default ("InetLoad plug-in"). |
|
|
|
|
|
#64 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
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 |
|
|
|
|
|
#65 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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.. |
|
|
|
|
|
#66 |
|
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,337
|
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 |
|
|
|
|
|
#67 |
|
Junior Member
Join Date: Aug 2004
Posts: 25
|
Great plugin!
Does this plugin support timeout parameter like nsisdl ? |
|
|
|
|
|
#68 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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. |
|
|
|
|
|
#69 |
|
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)? |
|
|
|
|
|
#70 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
1. If connection to server was lost, but some data were received during last session, plug-in makes a short pause, reconnects and continues download from the current position. A some kind of re-get.
2. If /RESUME "" option set, plug-in on any error except "file not found" first asks user (retry-cancel), this helps on dial-up connection and firewall problems. 2.5 On GetLastError()==12002 or 12003 (in most cases firewall related) plug-in auto-enables /RESUME option, but please note that english default text will be used in the message box (many thanks again to Stu from Shropshire for the great text ).Finally plug-in returns "OK" or error description string (full set of strings in the InetLoad.cpp file), so on error you can ask user again or terminate installation. You can find all plug-in command line options in the Readme.txt (including 3 display modes). I hope all these tricks may help to solve some common download problems
|
|
|
|
|
|
#71 |
|
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.
|
|
|
|
|
|
#72 |
|
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: 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. |
|
|
|
|
|
#73 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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: Status 'OK', file looks correct too. I aslo tested big ftp download with login assword in the LAN, and not found any problems. And I hope that bad syntax only might cause crash
|
|
|
|
|
|
#74 |
|
Junior Member
Join Date: Aug 2004
Posts: 25
|
Does this plug support rtsp or mms protocol ?
|
|
|
|
|
|
#75 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
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.
|
|
|
|
|
|
#76 |
|
Major Dude
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,220
|
CrackUrl() string buffers length bug fixed (256->NSIS string_size).
|
|
|
|
|
|
#77 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#78 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#79 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,202
|
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 Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#80 | |
|
Senior Member
Join Date: Sep 2004
Location: Wisconsin, US
Posts: 258
|
Quote:
Jnuw |
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|