|
![]() |
|
Thread Tools | Search this Thread | Display Modes |
![]() |
#1 |
Junior Member
Join Date: Jul 2015
Posts: 9
|
Inetc plugin shows negative download percentage for large 3GB file
Using the Inetc plugin to download a large 3GB file and it displays a negative percent download (so the progress bar doesn't move).
Any help? |
![]() |
![]() |
![]() |
#2 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Sounds very much like signed integer overflow
![]() My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Jul 2015
Posts: 9
|
Is there any way I could fix this?
|
![]() |
![]() |
![]() |
#4 |
Major Dude
|
You need to modify the sources and rebuild the library.
Cool looking installer with custom design: www.graphical-installer.com I offer NSIS scripting, C/C++/C#/Delphi programming: www.unsigned.sk Develop NSIS projects in Visual Studio 2005-2019: www.visual-installer.com or RAD Studio 2009, 2010, XE-10.3 Rio: www.rad-installer.com |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Jul 2015
Posts: 9
|
I'm kind of new to NSIS and I don't know a lot about C++ coding for editing the source file. Is there anyone who can help me with this?
Inetc Plugin: http://nsis.sourceforge.net/Inetc_plug-in Thanks! |
![]() |
![]() |
![]() |
#6 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Here is quick fix. Size above 4 GB will still cause problem, no matter what. Take this with a grain of salt!
My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#7 |
Junior Member
Join Date: Jul 2015
Posts: 9
|
thank you!!
![]() ![]() |
![]() |
![]() |
![]() |
#8 |
Junior Member
Join Date: Jul 2015
Posts: 9
|
When I use this it still seems to give me a percentage far above 100 (it starts off with a 7 digit percentage) and the progress bar doesn't move. In fact it counts down from that number to 100% and then completes. Do you know what the fix for this is? Thanks!
|
![]() |
![]() |
![]() |
#9 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Can you share the download link to the 3 GB file, so I can actually give it a try?
My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#10 | |
Junior Member
Join Date: Jul 2015
Posts: 9
|
Quote:
Thanks ![]() |
|
![]() |
![]() |
![]() |
#11 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Creating a 3 GB file locally is easy, but doesn't help for testing inetc. I would either have to upload it to a web-server (but who has 3 GB of web-space? also uploading 3 GB would take ages) or setup a web-server on my local machine. I will look into the latter option tonight...
My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#12 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,175
|
Just grab a copy of the free Visual Studio ISO, a Linux distro or something else that is big? To do it locally you could use HFS, Baby web server, analogx sswww or one of the other free basic web servers...
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#13 | |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Quote:
For local WWW server, I have been using XAMPP before... My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
|
![]() |
![]() |
![]() |
#14 |
Major Dude
Join Date: Sep 2005
Location: Somewhere over the Slaughterhouse
Posts: 797
|
Okay, here is another attempt
![]() In previous version, the code was still using MulDiv(), which is signed. Unfortunately, there is no unsigned version of that function. So I had to implement my own UMulDiv() function. But then the linker failed with missing reference to __aulldiv(). Apparently a 64-Bit integer division in 32-Bit code requires CRT library calls - which isn't possible when the CRT is excluded from the binary, as in Inetc project. Bummer! (In the end I had to add a custom __aulldiv() implementation to the Inetc project, as assembly code. Seems to work though) My Plugins: StdUtils | NSISList | CPUFeatures | ExecTimeout | KillProc My source of inspiration: http://youtu.be/lCwY4_0W1YI |
![]() |
![]() |
![]() |
#15 |
Moderator
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,175
|
You could use inline assembly but there has to be a better way. Not sure if WinInet is limited to 4gb but if it is you can just set the progressbar range to filesize/2 and the pos to downloaded/2?
IntOp $PostCount $PostCount + 1 |
![]() |
![]() |
![]() |
#16 | |
Junior Member
Join Date: Jul 2015
Posts: 9
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
|
Tags |
download, inetc, large file, negative percent, nsis |
Thread Tools | Search this Thread |
Display Modes | |
|
|