Announcement

Collapse
No announcement yet.

http + ftp download plug-in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #91
    Assistance needed

    Hello all,

    I am a poor downtrodden Senior Tech (well..thats how I feel at the moment anyway). Have been using NSIS for +-8 months to convert those pesky batch files to something even my junior engineers couldn't mess up.. then came SALESmen...who saw what I could do and asked a favour...could I create an installer for an offering that installs multiple 3rd party apps silently...no problem I say...and I get it working...THEN they change the goalposts with a live demo ...TOMORROW!!!
    Just had to tell the story as I feel a lot of techs and devs will have had the same experience...anyway...goalpost change was to download the installers from an FTP site rather than sending out disks to the client...great, but there are multiple files in the ftp locations.

    And here is the question...maybe I am just tired and cranky...inetload is excellent but I can't find a way to download all the files in an FTP location without specifying them individually...please tell me I am missing something and it is easy - either way, I think I will go and apply a hammer to the frontal lobe while I wait for a response. The way my brain is working, some example basic code would help.
    Thanks

    Comment


    • #92
      Afrow UK: progress bar appears on the banner if file size info is available. May not appera on the short files (<8 kB). Known problem - this is not 'cross page' banner (like nxs is), plug-in returns when download is complitted only (or error occure).

      Wishdoctor:
      > TOMORROW!!!
      Not implemented
      This require ftp 'mput' command, but I don't know (right now) how to handle ftp control and data connections in this case. Needs some investigation.
      You can also pack server files to the single archive file and use one of NSIS decompression plug-ins.

      Comment


      • #93
        Don't know if this is a bug or by design but calling the plugin from a Section in /silent mode still brings up "InetLoad plugin" in the details text label at the top.

        I'd like to display "Downloading [file]..." (w/ DetailPrint) there instead which just gets overwritten.

        -Stu

        Comment


        • #94
          This is option. You can change this with following code beginning line 832 of InetLoad.cpp
          code:

          if(hwndParent != NULL &&
          (childwnd = FindWindowEx(hwndParent, NULL, "#32770", NULL)) != NULL)
          {
          if(!silent) SetDlgItemText(childwnd, 1006, PLUGIN_NAME);
          }
          else InitCommonControls();

          And rebuild project (Release).
          Idea was to left "InetLoad" word somewhere May be I'll remove it in the next version (with POST option support, if it will be successfully tested not on my comp only).

          Comment


          • #95
            Umm I'm using Visual C++ 2003 and I get these errors on compile:
            d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(48): error C2365: 'FtpCommandA' : redefinition; previous definition was a 'function'
            d:\Program Files\NSIS\Contrib\inetload\InetLoad.cpp(521): error C2659: '=' : overloaded function as left operand

            -Stu

            Comment


            • #96
              Special build - text for 1006 control as /silent 'some text' option. It looks like NSIS cleans this field before plug-in call, so you cannot use script to set text. Usage sample in the attached file.
              Attached Files

              Comment


              • #97
                Mmm I tried that DLL and I think it's taking 'some text' as a download URL.

                If I use /SILENT "blah" [url] download fails but if I use /SILENT [url] it does not fail.

                -Stu

                Comment


                • #98
                  Sorry, wrong file
                  Attached Files

                  Comment


                  • #99
                    I need this To Work With InetLoad.

                    code:

                    Pop $0

                    MessageBox MB_YESNOCANCEL "Message" IDYES LABEL1 IDNO LABLE2
                    Quit

                    What do I Say After Pop $0 to Get it to
                    Pass The MessageBox and Quit Code if
                    Successful?

                    -MichaelFlya-

                    Comment


                    • Pop $R0
                      StrCmp $R0 ok +3
                      MessageBox MB_YESNOCANCEL "Message"
                      Quit

                      -Stu

                      Comment


                      • Thx Works Well !!

                        -MichaelFlya-

                        Comment


                        • Updated - not skips current download if "Enter" key was pressed.
                          And /SILENT now with text parameter, use
                          /SILENT ""
                          to display default "InetLoad plug-in" in the 1006 control (install progress text on the top of the NSIS window).
                          Attached Files

                          Comment


                          • Great Thanks Takhir !!! "Enter" Button seems to no longer
                            be a problem.

                            (Please help me troubleshoot.)

                            While in /BANNER mode, on the Banner it will show what I
                            want, but above the loading bar it just shows "InetLoad
                            plug-in", I'd rather it be what I want.

                            I may be wrong, you may have put it in some how. It seems
                            you need one more text input for the dialog shown above
                            the details while in the Banner mode. like the Silent mode
                            now has. If you have it already how would you do it?

                            code:

                            InetLoad::load /BANNER "Displays on banner." "Displays on banner." "URL for file" "Directory for file"

                            You have two text fields available, can you add three?

                            I think it is "Set TEXT2DISPLAY to 1006 control". I don't
                            know how to set that manually. How would I?

                            -MichaelFlya-
                            Last edited by MichaelFlya; 6 June 2005, 16:40.

                            Comment


                            • In the Banner or Popup modes this text appears on the background window (NSIS dialog), so user can see: 1) installer's Fileinst page; 2) files installation step - "InetLoad plug-in" text in the 1006 field; 3) Inet file download progress on the popup or banner window. In the NSISdl or Silent modes level (3) is absent and details can be moved to second level, but IMHO this is not realy need for Popup and Banner. And I'd like to left "InetLoad" text somewhere on the screen
                              It looks like installer (NSIS) clears this field before plug-in call, so it is not possible to set 1006 control text from script - it will be removed.
                              But, any case, thanks, I'll think about you idea

                              Comment


                              • Oh ok. It would be nice to say something besides InetLoad
                                the user doesn't need to see that. On long downloads it is
                                there for a long time. It is off topic for the installation.
                                Thank you very much for taking the time to respond.

                                Here is an idea that I would need somewhere down the line
                                and saves time. Your idea is to tell the plug-in to go to a
                                url then specify it's place on the hard drive to download to.
                                Then do it again for another file on the same line.

                                I think you should have another mode that allows you to
                                tell the plug-in to grab files from one url on the Internet
                                then without having to type the directory or url again just
                                specify the files.

                                so something like this:

                                code:

                                InetLoad::load /NewSwitch /ExistingSwitch "Text" "Text" "URL" "Directory to download to" "File_01" "File_02" "File_03" "File_04/Etc"

                                That way you do not have to say "URL for file"
                                or "Directory for file" again, over and over.

                                I know you can rewrite the name with a second field after
                                the file, but in this case it could just keep the same name.

                                Could make one more Switch for those who want to rename
                                like this:

                                code:

                                "File_01" "Rename" "File_02" "Rename" "File_03" "Rename" "File_04" "Rename/Etc"


                                -MichaelFlya-

                                Comment

                                Working...
                                X