Old 1st March 2007, 12:20   #241
ts77
Junior Member
 
Join Date: Feb 2007
Posts: 4
Is there a chance to use the "chmod" command if uploading with ftp?
I'm building an installer for a webapp using this great plugin but I couldn't find a way to call chmod remotely (beside using a plain ftp-client ).
ts77 is offline   Reply With Quote
Old 25th March 2007, 12:47   #242
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
InetLoad steals focus everytime it downloads a new file, even if I minimize the installer, it grabs the focus.

Extremely annoying.

Other than that, InetLoad has saved me

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 25th March 2007, 15:46   #243
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
ts77
all is possible, only time is a problem

empezar
Looks like you are using very old InetLoad version.. This feature was removed more then year ago (sf() function). While some focus tricks still may present in NSISdl display mode. Try to use http://nsis.sourceforge.net/Inetc_plug-in
You can also put more url/file pairs to stack and download all you need in 'single' InetLoad/Inetc session. /NOUNLOAD option in the command line may help as well.
Takhir is offline   Reply With Quote
Old 25th March 2007, 16:08   #244
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
what's the difference between inetc and inetload?

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 26th March 2007, 18:15   #245
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
My installer is crashing all over the place with both this and inetc plugin.

I'm downloading about 82 files using this macro:

code:
!macro DownloadDistfile PACKAGE
StrCpy $R0 ${PACKAGE}
${Unless} ${FileExists} "$DISTFILES_PATH\$R0"
FileWrite $DISTLOG "$R0$\r$\n"
inetc::get "$DISTFILES_URL/$R0" "$DISTFILES_PATH\$R0"
Pop $0
${Unless} $0 == "OK"
${If} $0 == "Cancelled"
call .abortDownload
${Else}
DetailPrint "Error downloading: $R0"
${EndIf}
${Else}
DetailPrint "Successfully downloaded: $R0"
${EndUnless}
${Else}
DetailPrint "Skipping: $R0"
${EndUnless}
!macroend



and calling them all like this:

code:
!insertmacro DownloadDistfile package.zip


in 82 different sections.

this is the only code in each section, so this is all the code used from the start of the installer to the end, and it crashes after a while, not always during the same download!


oh and by the way, that focus thing still bothers me. even with the inetc plugin.

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 26th March 2007, 19:06   #246
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
I re-tested serial download of 3 12MB files
code:
SetDetailsView hide
inetc::get "http://localhost/IMG_0188.tif" "$EXEDIR\IMG_0188.tif" /END
Pop $0
DetailPrint "Downloading: $0"
inetc::get "http://localhost/IMG_0189.tif" "$EXEDIR\IMG_0189.tif" /END
Pop $1
DetailPrint "Downloading: $1"
inetc::get "http://localhost/IMG_0190.tif" "$EXEDIR\IMG_0190.tif" /END
Pop $2
DetailPrint "Downloading: $2"
MessageBox MB_OK "Download Status: $0, $1, $2"


with minimized installer, all the time I had notepad opened and it never losed focus during download. So bothering
problem not reproduces with my Apache.
Crashes also not happened. I never tested 82 sections, this may be NSIS problem as well. Do you see any minimum sections number when the problem appear?
Can you test your script with "inetc::get /NOUNLOAD ... /END"? this should decrease number of dll loads/unloads.
Takhir is offline   Reply With Quote
Old 26th March 2007, 23:15   #247
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
thanks, that solved it!

also, forget what I said about the focus thing - i was testing with an old installer my bad.

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 27th March 2007, 22:22   #248
fabiochelly
Senior Member
 
fabiochelly's Avatar
 
Join Date: Nov 2003
Location: Vincennes, France
Posts: 122
Send a message via ICQ to fabiochelly
Hi,

is it possible to add a function to list files in a ftp directory?

In fact, I need to download the list of existing files (with their dates) in a specific FTP directory.
After that, I will display this list to the user so he can choose what file he wants to download.

Is it possible to add a new method InetLoad::list?

Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
fabiochelly is offline   Reply With Quote
Old 28th March 2007, 17:14   #249
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
is it possible to pause downloading? say if a user presses Cancel, I want to display "Are you sure?" and have the download PAUSE. if they then press NO, the download should resume. I've only succeeded in making the download re-download, but that is not very good when we're talking 100MB+ files

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 28th March 2007, 18:32   #250
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Not in current version. BTW if plug-in loses connection it re-gets file from the current position, on permanent problems it displays customizable /resume message and also correctly continue download, but on Cancel (may be disabled) it even deletes local file.
Takhir is offline   Reply With Quote
Old 28th March 2007, 18:59   #251
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
one more question. is it possible to display different messages on the same /BANNER download window?

e.g. "Downloading file 1 of 3" -> 2 of 3 -> 3 of 3

that is without it popping up another window?

it's annoying when you have to download a lot of files during initialization and each file has its own window, as moving one window will only result in the next popping back up in the middle of the screen.

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 28th March 2007, 22:40   #252
fabiochelly
Senior Member
 
fabiochelly's Avatar
 
Join Date: Nov 2003
Location: Vincennes, France
Posts: 122
Send a message via ICQ to fabiochelly
I've got a problem with one of my ftp servers.
This server, hosted by infomaniak.ch returns a 404 when I try to get a file via FTP.

If I try to upload a file via FTP on this server, it works fine
If I try to get the same file but with a HTTP get, it works fine.
If I try to get a file from any other server than this one, it works fine.
Every other FTP client can download from this server without error (even Internet Explorer)

Is there a way to find why I get a 404 from this server if I use a FTP get with inetc?

Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
fabiochelly is offline   Reply With Quote
Old 29th March 2007, 06:57   #253
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
empezar
You can add as many url/file pairs to the command line as you want. To keep working with short command line use push to stack in the reverse order:
code:
Push /end
Push filen
Push urln
...
Push file1
Push url1
inetc::get

This way plugin not re-creates dialog and not center it on every new file. But this is not compatible with various banner texts.
fabiochelly
404 is common http status code, please check ftp:// at the beginning of command line http://en.wikipedia.org/wiki/List_of...r_return_codes . Also for full path (from / ) use ftp://server//path/file, but for current user home dir use single slash before path.
Takhir is offline   Reply With Quote
Old 29th March 2007, 07:16   #254
fabiochelly
Senior Member
 
fabiochelly's Avatar
 
Join Date: Nov 2003
Location: Vincennes, France
Posts: 122
Send a message via ICQ to fabiochelly
I checked my host but everything seems correct:
host: ftp://login:password@chelly.net/bp.exe

I always get a 404! I really think that my problem comes from the fact that this server is configured differently.
I think there is a problem with your plugin if used with some rare servers or a specific configuration

Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
fabiochelly is offline   Reply With Quote
Old 31st March 2007, 13:49   #255
stb
Senior Member
 
Join Date: Mar 2004
Location: Germany, Paderborn
Posts: 177
Hi Takhir,

I just downloaded the latest version of your InetC plugin and noticed that there are more dependencies than before.

You now depend on msvcrt.dll (you did only depend on comctl32.dll and wininet.dll before).
stb is offline   Reply With Quote
Old 31st March 2007, 15:28   #256
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
No. I had a lot of msvcrt dependencies earlier, but removed 80% in last releases. Finally this is not a problem - plug-ins depend on wininet.dll, but any system with wininet has msvcrt.dll
And I've sent pm to fabiochelly
Takhir is offline   Reply With Quote
Old 14th April 2007, 11:27   #257
ART_Adventures
Junior Member
 
Join Date: Apr 2007
Posts: 6
Does this plugin work if there is an @ character in the username for an FTP server? I seem to get a URL parts error.

Thanks.
ART_Adventures is offline   Reply With Quote
Old 14th April 2007, 12:14   #258
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
If InternetCrackUrl (used in plug-in to get url parts)reports url error - no, not supported. The only @ as password-host separator.
Takhir is offline   Reply With Quote
Old 14th April 2007, 16:37   #259
ART_Adventures
Junior Member
 
Join Date: Apr 2007
Posts: 6
I discovered, this can be resolved by susbtituting the first "@" character with "%40"
ART_Adventures is offline   Reply With Quote
Old 20th April 2007, 04:39   #260
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Just curious:
A few posts back, fabiochelly asked:
Quote:
is it possible to add a function to list files in a ftp directory?
Does this functionality exist in the current version? If so, how do you use it? If not, any chance it could be added?
Comperio is offline   Reply With Quote
Old 20th April 2007, 07:03   #261
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Quote:
Does this functionality exist in the current version? If so, how do you use it? If not, any chance it could be added?
1. No.
2. See 1.
3. inetc/inetload looks solid in current implementation, ftp/http, get/put/post - all the functions use 90% of common code (even write and read implemented in the same loop). ftp ls stays a bit apart and this is why I don't want to include it to these plug-ins. IMHO better way is to write a normal ftp plug-in. I even have a code of the ftp backup client (Explorer style, mirroring, files versioning, queues, file migration status for disk cache and so on..) I wrote few years ago for ADIC, but I cannot share this code and have time for small 'free' tasks only now
Takhir is offline   Reply With Quote
Old 20th April 2007, 15:18   #262
Comperio
Major Dude
 
Comperio's Avatar
 
Join Date: Jan 2005
Location: Oregon Coast
Posts: 737
Sounds fair enough. Thanks, Takhir!
Comperio is offline   Reply With Quote
Old 2nd May 2007, 08:43   #263
ART_Adventures
Junior Member
 
Join Date: Apr 2007
Posts: 6
Hi People,

I seem to have a problem downloading text files via ftp. Some new line returns are missing. Should there be an argument to set the ftp to binary or ascii? If so, is there a way I can do this?

Thanks in advance.
ART_Adventures is offline   Reply With Quote
Old 5th May 2007, 19:53   #264
ART_Adventures
Junior Member
 
Join Date: Apr 2007
Posts: 6
Has anybody else found this?

If I put a text file online via ftp. Say the following:

"hello

world

end"

The InetLoad plug-in will download the file without the line returns, as:

"hello
world
end"
ART_Adventures is offline   Reply With Quote
Old 8th May 2007, 11:48   #265
NeoAlus
Junior Member
 
Join Date: Jun 2002
Posts: 26
Send a message via AIM to NeoAlus
layout

NSISdl used the installer's "Cancel" button, and also expanded the progress bar to be the same size as the installation progress bar (in Modern UI mode). Is there a way to get inetc to act the same? (/NOCANCEL just removes the extra cancel button and does not enable the built-in button).
NeoAlus is offline   Reply With Quote
Old 10th May 2007, 12:06   #266
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Just from vacations
ART_Adventures change FTP_TRANSFER_TYPE_ASCII to FTP_TRANSFER_TYPE_BINARY in source code and rebuild plug-in. I cannot remember why ASCII was used But till now I had not problems with binary files download. Nevertheless I'll update wiki to fix your situation (after some tests).
NeoAlus not in options - code correction required. Inetc inserts a small dialog with progress bar to NSIS window (3-rd level dialog), so this dilaog and it's controls to be resized. Looks reasonable, I'll try to add this feature soon.
May be in weekend. A lot of other work now.
Takhir is offline   Reply With Quote
Old 12th May 2007, 17:18   #267
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
1. Plug-in uses ASCII mode for file size requests only (ftp), file download is always binary, so please check your server settings. I tested ASCII download from Wftpd.exe server and everything was correct.
2. Extra Cancel button should exists by design. Second progress bar and text above it may be resized (see attached image), but I don't like this design so I'll leave plug-in as it is now. If you want I can send you inetc.cpp code with resizing I wrote today.
Attached Images
File Type: gif prbar.gif (9.5 KB, 591 views)
Takhir is offline   Reply With Quote
Old 1st June 2007, 03:48   #268
SEK_Blackhawk
Junior Member
 
Join Date: May 2007
Posts: 4
Is this plugin able to calculate the total file size and thus showing the total download time correctly? It works in 'batch' mode, but every file is download separately and therefore the total download time is unknown, if multiple files are requested. (at last if http download is used.)
SEK_Blackhawk is offline   Reply With Quote
Old 4th June 2007, 09:36   #269
acrunner
Junior Member
 
Join Date: Jul 2006
Posts: 5
Some builds threw out a "Url Parts Error" at the end of the downloading but the file is successfully downloaded and not deleted. What's wrong with it?
acrunner is offline   Reply With Quote
Old 4th June 2007, 09:48   #270
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
acrunner: Your stack contains other items, use /END at the end of command line. Otherwise plug-in reads stack till end or first error in URL - File pair.

SEK_Blackhawk: no this option. You can show one of NSIS banners with progress bar showing size or number of files downloaded progress (inetc may be in the silent mode this case). To get files sizes from server use 'head' request. This banner worked correct http://nsis.sourceforge.net/Nxs_plug-in
Takhir is offline   Reply With Quote
Old 9th June 2007, 22:49   #271
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
There really is a problem with Inetload FTP downloads and a recent version of the ProFTPD server. I also get 404 errors, even though the file exists. Try for example to download any file from ftp://ftp.lyx.org.
Joost Verburg is offline   Reply With Quote
Old 10th June 2007, 17:35   #272
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Thanks, Joost,
I could reproduce situation and found 'why' - see attached screenshot. The same answer in console:
PHP Code:
ftpliteral SIZE apache-ant-1.7.0-bin.tar.bz2.md5
550 SIZE
Operation not permitted 
Server not 'eats' SIZE request and plug-in re-interprets 550 as 'file not found'. BTW 'ls -l' not gives extended info on this server as well. Finally I can make ftp working without file size, but IE displays this, so it is possible. Any Ideas?
Edited after short googling: BTW ProFTPD 550 on SIZE has a great history http://www.google*****search?hl=ru&q=...roblem+550&lr= And SIZE request fails even with FTP_TRANSFER_TYPE_BINARY for control connection.
Attached Images
File Type: gif ftp_size.gif (2.5 KB, 552 views)

Last edited by Takhir; 10th June 2007 at 17:57.
Takhir is offline   Reply With Quote
Old 10th June 2007, 17:58   #273
Joost Verburg
NSIS MUI Dev
 
Join Date: Nov 2001
Posts: 3,717
FileZilla is able to display the file sizes, so they must be in some directory listing.
Joost Verburg is offline   Reply With Quote
Old 11th June 2007, 10:50   #274
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
OK, both inetc & inetload allow FTP download now even is server rejects SIZE request, but progress bar functionality will be unavailable while file size is unknown (the same happen with chunked http replies). And confusing '404' shold not appear any more.
Takhir is offline   Reply With Quote
Old 15th June 2007, 10:23   #275
imecstatic
Junior Member
 
Join Date: Jun 2007
Posts: 1
inetload crash on windows Vista

When I run setup on windows vista, sometimes it runs fine but sometimes it crashes.
Every time crash occurs while downloading. I am using InetLoad for downloading through following command:

InetLoad::load /TRANSLATE "Downloading %s" "Connecting ..." second minute hour s "%dkB (%d%%) of %dkB @ %d.%01dkB/s" "(%d %s%s remaining)" \
"192.168.1.204/xyz.exe" "$INSTDIR\xyz.exe" /END

Any help will be appreciated.
imecstatic is offline   Reply With Quote
Old 15th June 2007, 13:13   #276
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
This happen sometimes in NSISdl mode you currently use. Happen in the part of code I took from NSISdl sources The best way is to use inetc plug-in where this part was fully re-worked. inetc::get .... Or popup/banner mode of InetLoad. http://nsis.sourceforge.net/Inetc_plug-in
Takhir is offline   Reply With Quote
Old 18th June 2007, 09:53   #277
51819
Member
 
Join Date: May 2007
Posts: 50
Quote:
Section "Dummy Section" SecDummy

# parameters: URL local_file [reget_attempts [pause_sec]]
InetLoad::load "http://dl.zvuki*****6306/mp3/1.mp3" "$EXEDIR\pavarotti.mp3" 3 10
Pop $0 # return value - exit code
MessageBox MB_OK "HTTP Download Status: $0"

SectionEnd
I don't like MessageBox show "HTTP Download Status: OK" when i completed Download
i like MessageBox show "HTTP Download Status: over"

how can i do it show over
51819 is offline   Reply With Quote
Old 30th July 2007, 10:53   #278
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
is there a way of cancelling the installer by pressing the [x] button on the inetc download window during .onInit?

what "termination code" does inetc provide when you press that [x] button, if any (again, during .onInit with /banner mode)? I've tried "Cancelled" and "Terminated", but I get seemingly random results, and they don't come right away, but after about 2 seconds, which seems a bit buggy to me.

this is the code I use:

code:
GetTempFileName $NQUAKE_INI

Start:
inetc::get /NOUNLOAD /CAPTION "Initializing..." /BANNER "nQuake is initializing, please wait..." /TIMEOUT 5000 "${INSTALLER_URL}/nquake.ini" $NQUAKE_INI /END
Pop $0
${Unless} $0 == "OK"
${If} $0 == "Terminated"
MessageBox MB_OK|MB_ICONEXCLAMATION "Installation aborted."
Abort
${Else}
${Unless} $RETRIES > 0
MessageBox MB_YESNO|MB_ICONEXCLAMATION "Are you trying to install nQuake offline?" IDNO Online
StrCpy $OFFLINE 1
Goto InitEnd
${EndUnless}
Online:
${Unless} $RETRIES == 2
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION "Could not download nquake.ini." IDCANCEL Cancel
IntOp $RETRIES $RETRIES + 1
Goto Start
${EndUnless}
MessageBox MB_OK|MB_ICONEXCLAMATION "Could not download nquake.ini. Please try again later."
Cancel:
Abort
${EndIf}
${EndUnless}


Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Old 30th July 2007, 11:34   #279
Takhir
Major Dude
 
Join Date: Feb 2004
Location: Moscow, Russia
Posts: 1,222
Plug-in should return "Cancelled" string if user pressed this button. Download thread exit may require some time if it waits for data from socket.
Takhir is offline   Reply With Quote
Old 30th July 2007, 12:56   #280
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
okay.

seems to work, though sometimes i still get the "could not download" message instead of "installation aborted". i can live with that though.

Bored with the real world? Try QuakeWorld!
empezar is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump