Skip to content
⌘ NSIS Forum Archive

http + ftp download plug-in

545 posts

pengyou#edited
I have had similar problems with Inetc and downloading more than 1 file where the progress is not displayed at all
Are you using Inetc in NSISdl mode? Some servers do not supply the size information so Inetc cannot provide a progress bar which "moves" (because it does not know how big the file is). The progress bar stays "empty".

Try using Inetc's POPUP mode - in the popup the plugin will tell you if the size is unavailable but it will show you how much data is being downloaded so you can tell something is happening.
Takhir#
I forgot to note that progress bar may not appear if file size is less then 8 kB (data bufer).
Backland#
I'm using Inetc in NSISdl mode, file is > 8kb and server definitely sends filesize as 90% of the time the progressbar shows up for the first download, but completely disappears for the second one and any others after that.

The label showing status message always works fine though.
michael.hejwosz#
a minor problem

I am using your wonderful plugin yet I seem to be having a little problem I do not know what it is related to.

I am using the /TRANSLATE switch with the following, among a few, text: "Downloading SuperMemo 2006 (13.01 Beta I from Jan 22, 2007)..." (skip the quotation marks)
Yet the text displayed about the first progress bar sheds the last 4 chars: ")..."
Could you please tell me what the reason is??

Thank you in advance,
Mike
Takhir#
I've put to wiki new version with increased string buffers. Next time please attach a short sample demonstrating the problem, it's not easy to find situation basing on the text 'among a few' 🙂
michael.hejwosz#
label too narrow??

Thank you. Unfortunately, the problem persists.

Here can you find a more detailed description with a screenshot: http://forums.winamp.com/showthread....hreadid=264467
Thank you for your help.
Mike
cbexaminr#
possible inetc problem

Making mention of this here in case it comes to appropriate individuals attention sooner than the actual bug report...

For description of possible problem, please see:


Thanks.
Takhir#
I added KillTimer to wiki release, but probably you used pre Sep 7, 2006 version in NSISdl mode. System should kill all timers and messages queue when window destroyed.
michael.hejwosz#
I have managed to solve my problem. The original line of source code looks as follows:
Downloading SuperMemo ${strSMYear4D} ($strSMVerTag from $strSMVerDate)...
The values of the last two variables (i.e. $strSMVerTag and $strSMVerDate) are read from a text file downloaded from the web. The reason why ")..." kept being truncated was that the value of $strSMVerDate had new line at the end of it.
It is solved now. Thank you for your help.

On a related topic. The InetLoad readme text file advises to peek into the source code (i.e. InetLoad.cpp) for a full set of status strings. I am particularly interested in error status codes. I did look into the code but found not entirely satisfactory for an FAQ I am planning to write accompanying the installer. Since InetLoad is based on WinInet API, is there somewhere a list of error codes I could be referred to??
cbexaminr#
The release I have contains last comment dated 1-jan-2007. (This may not be what was used in the actual build of the released mingw installer - I didn't build that one, I'm just trying to figure out why it sometimes crashes on me.)

But, for the wiki release...

I see no mention of a KillTimer() call in inetc.cpp.

I searched everything expanded from the archive, and get no hits on "KillTimer".

I do see a call and comment that is presumably used to generate an extra call to WM_TIMER functionality, i.e. PostMessage(hDlg, WM_TIMER, 1, 0); // show url & fn, do it sync

(The comment mentions "sync", however I believe to be synchronous, would need to be using SendMessage(), not PostMessage().)

***Where are the changes that actually kill the timer? Is it done by some means other than KillTimer()? What changes were made in the sep 7, 2006 to accomplish this? (Failed to find inetc in NSIS CVS to explore myself...)

Thanks in advance for the info.

(The crash address appears to be inside of progress_callback(), which appears to only be invoked from the WM_TIMER handling code. As I've tried to re-build the installer locally, obtaining all correct versions (except maybe add-ins, which I apparently can't obtain), and have failed to reproduce the crash, (although I get a display problem possibly from inetc), I'll acknowledge it may indeed be fixed... But I'm interested in knowing how it was addressed/fixed, since I don't see how the timer is being destroyed.)
Takhir#
2 michael.hejwosz: you can find errors in inetc.cpp file.

2 cbexaminr: Thanks for your help. InetLoad/Inetc crashes in NSISdl (no popup) mode found earlier but I supposed sutiation was fixed with Backland help in september. All versions are here http://nsis.sourceforge.net/File:Inetc.zip Unfortunatelly I could not reproduce crash on my comp, so please let me know if you can find 'problem' line in code.
In the today's morning (MSK) version KillTimer was line 953. WM_TIMER handler additionally includes now IsWindow() check for (IMHO weird) situation when window already destroyed, but message loops still delivers events. PostMessage is called at the very beginning of download and should not cause crash, but any way this should be fixed now.
michael.hejwosz#
Can someone help me map the error messages found @ http://msdn2.microsoft.com/en-us/library/aa385465.aspx to the following piece of the source code??
enum STATUS_CODES {
ST_OK = 0,
ST_CONNECTING,
ST_DOWNLOAD,
ST_CANCELLED,
ST_URLOPEN,
ST_PAUSE,
ERR_TERMINATED,
ERR_DIALOG,
ERR_INETOPEN,
ERR_URLOPEN,
ERR_TRANSFER,
ERR_FILEOPEN,
ERR_FILEWRITE,
ERR_REGET,
ERR_CONNECT,
ERR_OPENREQUEST,
ERR_SENDREQUEST,
ERR_CRACKURL,
ERR_NOTFOUND,
ERR_THREAD,
ERR_PROXY,
ERR_FORBIDDEN,
ERR_REQUEST,
ERR_SERVER,
ERR_AUTH
};
Thank you in advance,
Mike
MinterWute#
Takhir: I've just been trying the latest inetc with NSIS 2.23 and the progress dialog is not being redrawn properly for some reason. This is on Windows 2000 Pro.

Does something need changed for the latest NSIS? I did try rebuilding with the latest exdll header without success.
Backland#
MinterWute,

I have similar problems with this as well on both XP/2000. I'm still working on a script to reproduce the issue for Takhir.

Its not a bad idea that you attach your script for examination. Please also note Inetc is last updated on 30th of Jan.
Takhir#
Thanks, Backland, script may help. Right now I re-tested latest inetc on my home XP Pro with following script
SetDetailsView hide
inetc::get "http://ineum.narod****spr_2004.htm" "$EXEDIR\spr4.htm" \
"http://ineum.narod****spr_2005.htm" "$EXEDIR\spr5.htm"
Pop $0
inetc::get "http://ineum.narod****spr_2006.htm" "$EXEDIR\spr6.htm"
Pop $2
but could not reproduce redraw issue 🙁
cbexaminr#
1) Redraw issue
I and another individual (who I guess is the maintainer of the mingw installer) also have the redraw problem.

You can grab the mingw installer source, and probably see the issue. To the best of my knowledge neither of us have done anything but use a different (latest) inetc - the script code is apparently the same. The url to browse that stuff is:


The instructions to check it out with command line cvs are at:


2)earlier reported crash - older version of inetc
I have learned that the crashing version of inetc was the 10 june version. Further research indicates that the crash was occurring at the location where a routine ParentWndProc() should have been (before the pages were released.)

It appears that this routine is no longer part of the current inetc source, and so I will assume that problem is no longer a problem.
Takhir#
OK, redraw is the only problem in current version, so let's find where and why 🙂 OS, IE ver., NSIS ver, latest Inetc, short script reproducing the problem. To test this I have XP Pro and win98 with home dial-up and all OSes and most of connection types in office. Please attach script to post.
Backland#
seems the forum is blocking external links, can you guys post your links as plain text (probably by removing the http://www)

google.com
Red Wine#
@ Backland, the forum blocks external links that added from new registered users 😉
I bet the blocked link above is just spammers attempt to add their craps in this forum.

If for instance you try to submit an external link, I bet won't be blocked 😉
Backland#
Thanks Red Wine, testing http://www.google.com

cbexaminr added 2 links just a few posts above, i think those were to the installer which has the redraw issues.
Red Wine#
Originally posted by Backland
Thanks Red Wine, testing http://www.google.com

cbexaminr added 2 links just a few posts above, i think those were to the installer which has the redraw issues.
You probably realize that a strong protection from spammers requires some patience from the rest of new registered users 😉
cbexaminr#
browse mingw installer source tree:
mingw.cvs.sourceforge.net/mingw/MiGW/

to checkout mingw installer source follow instructions at:
sourceforge.net/cvs/?group_id=2435

Sorry it's not "reduced script" - but it's what I can point you toward.

(hope these "links" pass the filtering - funny, I don't think the "preview" showed the links blacked out in original post. There is no www on the items, just h t t p : / / .)
MinterWute#
Using SetDetailsView show gives the redraw error for me with your small script. This used to work with previous versions but maybe it's something that I shouldn't have been doing?


SetDetailsView show
inetc::get /RESUME "" "http://downloads.sourceforge.net/devkitpro/libnds-20060719.tar.bz2" "$EXEDIR\libnds-20060719.tar.bz2" /END
Pop $0
MessageBox MB_OK "Download Status: $0"

Takhir#edited
I tested script from my previous post on the following OSes: Win98 SE (IE5), Win2000 SP2, WinXP Pro SP2, Win2003 SP1, Vista Ultimate Final Release (IE7) - no problems with redraw. Last Inetc Jan 30, 2007. NSIS 2.22. With 'SetDetailsView show' dialog looks ugly (tested on XP), but redraw was correct. May be progress bar smothing in not-XP style would be better.
Edited: I used 2 versions of dotnetfx.exe (20 MB) for LAN downloads.
Takhir#
New Inetc version.
1. /POPUP option now with text (again), /POPUP "HOST_ALIAS" - this allow to hide real URL in popup mode and (if encoded) login/password(!).
2. Transfer speed calculation improved (for paused state mainly).
3. Redirection sample added (I received request for HTTP 301/302, and even added code, but finally found that WinInet does this internally). But redirection prohibitted for https (right now I cannot remember why 🙂 ).
Takhir#
I tested last build at home on XP Pro, without .NET and now in office on Win98 and Win2000 (no .NET as well), Inetc works correct on all these comps. If you have problem with all plug-ins (NSISdl, InetLoad, Inetc) it's a good time to check your own script 😉
BTW did you built NSIS from sources?
Mr Inches#
The .NET install usually includes versions of the MS C Runtime libraries (DLLs).

Is it possible that one of these is getting clobbered and causing the problem? (assuming that the problem is only evident on computer with the .NET framework installed.)

What about the presence of VS 2005, it uses a different version of the MS CRT again (8.0)?

Duncan
pedroac#
I concluded that this problem was only happening in a single PC, there must be something wrong with the .NET libraries (the problem is that even with all the .NET versions unistalled the problem keeps happening...)