From: SourceForge.net <no...@so...> - 2007-05-24 20:50:17
|
Patches item #1723131, was opened at 2007-05-21 23:37 Message generated for change (Comment added) made by ghazel You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=1723131&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Plugin Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Greg Hazel (ghazel) Assigned to: Amir Szekely (kichik) Summary: NSISdl doesn't handle files over 2GB Initial Comment: Due to the use of ints in NSISdl, files over 2GB cannot be downloaded successfully. ---------------------------------------------------------------------- >Comment By: Greg Hazel (ghazel) Date: 2007-05-24 20:50 Message: Logged In: YES user_id=731668 Originator: YES __allmul and __alldiv, for 64bit multiplication and division are needed by the atoi64() I grabbed from the System plugin. If I don't use 'nodeflib = False', like the System plugin does, I get linker errors. ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-24 18:24 Message: Logged In: YES user_id=584402 Originator: NO msvcr71.dll is an even bigger problem since it's present on even less versions of Windows by default. All link errors should disappear once you stop using floats, doubles and stdio.h. ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-24 18:08 Message: Logged In: YES user_id=731668 Originator: YES I copied 'nodeflib = False' from the System plugin - it seems to resolve the symbol issues I mentioned without a dynamic dependency on msvcrt71.dll. It also increased the size of NSISdl.dll, so I imagine it statically linked in the functions it needed. Is that still a problem? If the reason for not using msvcrt is that it is not on all systems, this solves that. ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-24 10:12 Message: Logged In: YES user_id=584402 Originator: NO Using float is the same as using double and using `nodeflib = False` is the same as including MSVCRT, only it adds even more unwanted code. Instead of floats and %I64u, simple arithmetic should be used. There's also Int64ShllMod32 and friends for handling 64-bit integers. For %I64u, you could simply divide the number further to make it smaller - display number of MB or even GB instead of KB. It makes more sense anyway, because a number like 213472342KB is not that readable. ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-24 01:07 Message: Logged In: YES user_id=731668 Originator: YES Any ideas on %I64u? ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-24 01:06 Message: Logged In: YES user_id=731668 Originator: YES Ok, here's one that doesn't use MSVCRT File Added: 2gb.diff ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-23 21:46 Message: Logged In: YES user_id=584402 Originator: NO MSVCRT is not present on all versions. It's a policy to not use MSVCRT at all with code that's goes into the installer itself. myitoa64 can be made unsigned. And even if not, cutting in half the amount of available exabytes won't make that much of a different. Until the next "NSISdl doesn't handle files over 8EB" ;) ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-23 21:14 Message: Logged In: YES user_id=731668 Originator: YES Another few possible show-stoppers: __allmul __alldiv __fltused __ftol2 ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-23 20:46 Message: Logged In: YES user_id=731668 Originator: YES myitoa64() is signed, not unsigned. Can't use doubles or msvcrt? Why not? ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-23 19:50 Message: Logged In: YES user_id=584402 Originator: NO I've just tested and %I64u doesn't work on Windows 95. ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-23 19:44 Message: Logged In: YES user_id=584402 Originator: NO Thanks. A couple of notes; * MSVCRT should never be a dependency, so: - double shouldn't be used - sscanf shouldn't be used (you can use my_atoi64 from the System plug-in) - stdio.h shouldn't be included * I seem to recall %I64u is not available on earlier versions of Windows, though I can't find any reference to %I64u on MSDN at the moment. * If cl becomes unsigned, JNL_HTTPGet::content_length() should check for the signed content-length server bug and at least return 0. Of course actually fixing the content-length would be nicer. ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-23 19:24 Message: Logged In: YES user_id=731668 Originator: YES There's a patch. Works for me. ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-23 19:23 Message: Logged In: YES user_id=731668 Originator: YES File Added: 2gb.diff ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-23 19:00 Message: Logged In: YES user_id=584402 Originator: NO I didn't say it is the same. I just want it in the same item so it's easier to track. As always, a patch would be appreciated. ---------------------------------------------------------------------- Comment By: Greg Hazel (ghazel) Date: 2007-05-23 18:42 Message: Logged In: YES user_id=731668 Originator: YES That bug is not the same. NSISdl can be made to support >2GB files independently of the rest of NSIS. You could very easily download a >2GB file then ExecShell it, and it would work fine. ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2007-05-23 16:11 Message: Logged In: YES user_id=584402 Originator: NO Nothing supports over 2GB currently. There's already an open feature request for this (#881548), so I'm marking this one as a duplicate for easier tracking. http://sourceforge.net/tracker/index.php?func=detail&aid=881548&group_id=22049&atid=373088 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=1723131&group_id=22049 |