Archive: NSISdl::download for SourceForge FRS


NSISdl::download for SourceForge FRS
I've got an installer that uses NSISdl::download to grab install files from a webserver. I'm trying to update the installer to point to install files that are in Sourceforge's file release system (FRS). However, the download seems to work for a few seconds and then aborts. I'm thinking that it has to do with the fact that the Sourceforge link to the file actually re-directs (after a few seconds) to one of the mirror sites.

Has anyone handled this problem before? Any solutions?

Thanks.
-Tony

Here's an example of the url: http://sourceforge.net/projects/wxds...evPak/download

Here's a sample of the NSIS command I am trying:


NSISdl::download /TIMEOUT=30000 "http://sourceforge.net/projects/wxdsgn/files/wxDev-C%2B%2B/devpaks/wxWidgets_samples.DevPak/download" "$INSTDIR\Packages\wxWidgets_samples.DevPak"

But this one worked (presumably because the link didn't re-direct to a mirror):

NSISdl::download /TIMEOUT=30000 "http://wxdsgn.sourceforge.net/webupdate/wxWidgets_samples.DevPak" "$INSTDIR\Packages\wxWidgets_samples.DevPak"


You could try inetc instead.

Stu


Originally posted by Afrow UK
You could try inetc instead.

Stu
Thanks. I tried it with inetc, but still have no luck. I even tried moving the directory on SF so that there were no spaces, but still the download fails. Then, I tried specify the mirror to use in the url, but still no luck.

Here's the inetc command:

inetc::get /POPUP "http://downloads.sourceforge.net/project/wxdsgn/devpaks/wxdevcpp.DevPak?r=&ts=1318788916&use_mirror=hivelocity" "$INSTDIR\Packages\wxdevcpp.DevPak"

Pop $0

Ideally, I'd just like to use:

inetc::get /POPUP "http://downloads.sourceforge.net/project/wxdsgn/devpaks/wxdevcpp.DevPak" "$INSTDIR\Packages\wxdevcpp.DevPak"

Pop $0

but that doesn't work either.

Maybe this is a SF problem?? However, I can use the url in my browser just fine. Of course, re-directs to an intermittent page with an advertisement for 5 seconds until the download begins. Maybe the re-direct is the problem for inetc/nsisdl?

-Tony

Nevermind. The problem was between the keyboard and the chair.

I was using the return value of "success" (used by NSISdl) rather than "OK" (used by inetc). Seems to be working fine now.

Thanks.
-Tony


!define DOWNLOAD_URL "http://downloads.sourceforge.net/project/wxdsgn/devpaks/" ; Url of devpak server for downloads

DetailPrint "Url: ${DOWNLOAD_URL}${FILENAME}"
inetc::get "${DOWNLOAD_URL}${FILENAME}" "$INSTDIR\Packages\${DEVPAK_NAME}" /END
Pop $R0 ;Get the return value

${IF} $R0 != "OK"
MessageBox MB_OK "Download failed: return = $R0"
Abort ; Abort the installation
${ENDIF}