http + ftp download plug-in

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Takhir
    Major Dude
    • Feb 2004
    • 1222

    http + ftp download plug-in

    Attached plugin supports http and ftp downloads. Included script sample downloads 2 mp3 files (one for each protocol). I wrote it fast (from code pieces I had ) and used the simplest InternetOpenUrl() way to do this, so functionality is limited (ftp restart may not work, WM_NOTIFY_OUTER_NEXT skipped, english only, ...). And dialog design is ugly (any ideas?)
    But finally http works good (many thanks to MS guys), I even tested download restart after disconnect (but this require more tests). Re-get defaults: disabled, pause 5 sec.
    Attached Files
  • Takhir
    Major Dude
    • Feb 2004
    • 1222

    #2
    wording improved
    Attached Files

    Comment

    • Takhir
      Major Dude
      • Feb 2004
      • 1222

      #3
      Empty file size fields looks lonely on ftp download, so I added ftp file size request. If ftp server not allows directory browsing (like dl.zvuki.ru does), InternetOpenUrl() fails and new connect (and time) required for file download, so I reworked this to common ftp session with single InternetConnect(). Script sample requests big (14 MB) file from MS ftp site (file size available), so better replace this with your own link.
      Attached Files

      Comment


      • #4
        Can this plugin download silent and with process?

        can can shellexecute it.

        I am new in NSIS can you include a simple example?

        Thanks...

        Comment

        • Takhir
          Major Dude
          • Feb 2004
          • 1222

          #5
          This may be interesting - start download at the very beginning and run 2 processes, installation itself and file download (or I misunderstood something?).
          It is possible to run dll as a process using rundll(32).dll, only new plug-in dll entry point required for this (short function). Programming side of problem is simple, but I'd like to understand first how to make working ftp reget using FtpCommand() call (size and restart commands). After this - may be.
          If you want hide plug-in dialog in it's current state - comment ShowWindow() line in source code and rebuild project.

          Comment

          • kichik
            M.I.A.
            [NSIS Dev, Mod]
            • Oct 2001
            • 11343

            #6
            What are the minimum requirements for this plug-in? It takes proxy settings from IE, right? I have been meaning to write a new NSISdl based on IE's downloading engine to solve all of those proxy problems. If you're already at it, how about you add an option to download more than one file in a row, I review the code, and we slap a NSISdl2 tag on it?
            NSIS FAQ | NSIS Home Page | Donate $
            "I hear and I forget. I see and I remember. I do and I understand." -- Confucius

            Comment

            • grahama
              Senior Member
              • Sep 2004
              • 223

              #7
              yea
              I am having a lot of problems with corporate networks using proxy settings
              a new NSISdl would be fantastic
              g

              Comment

              • Takhir
                Major Dude
                • Feb 2004
                • 1222

                #8
                Originally posted by kichik
                What are the minimum requirements for this plug-in? It takes proxy settings from IE, right?
                I also had a full range of chunked HTTP + proxy problems in one of my apps when used socket based http client . What is good for net learning, sometimes is bad for business But few years ago Win95 compatibility requirement was taken off (in later Win versions IE and Inet API is always on place), and I could re-work it to Inet API.
                Minimum requirements... HTTP without problems. I also thought about re-get functionality (for installers trying to download dotnetfx via dial-up) and about ftp, but it looks like both idias are not claimed by developers
                OK, simple and stable http download without re-get, but more then one file. I thought about local path definition only (instead of every local file parameter), but this limits functionality with static server files only (not cgi/php), so parameters line is following:

                InetLoad::load URL1 local_file1 [URL2 local_file2 [...]]

                ftp works, but it not requests file size - InternetOpenUrl() functionality is limited.
                Attached Files

                Comment

                • Takhir
                  Major Dude
                  • Feb 2004
                  • 1222

                  #9
                  to Kichik
                  I also thought a little about extended requirements and result attached, better ftp and simple (hidden) re-get. But more code - more bugs You can use any version.
                  Attached Files

                  Comment

                  • Takhir
                    Major Dude
                    • Feb 2004
                    • 1222

                    #10
                    I fixed one bug in last (extended) version and improved download status displaying.
                    Attached Files

                    Comment

                    • grahama
                      Senior Member
                      • Sep 2004
                      • 223

                      #11
                      is inetload working with proxy networks...or is that a future thing ?
                      g

                      Comment

                      • Takhir
                        Major Dude
                        • Feb 2004
                        • 1222

                        #12
                        Good question. Plug-in works in my proxy tests, but this is 10% of success only - independent test results required. I see non-zero downloads count, may be somebody (grahama) also can test plug-in Another request - english spelling in the InetLoad.cpp (and may be dialog window).
                        Thanks.
                        Attached version functionality is almost the same as in the previous post, I only made an attempt to remember "coding rules" and re-formatted source text (for possible cvs commits .
                        Attached Files

                        Comment

                        • grahama
                          Senior Member
                          • Sep 2004
                          • 223

                          #13
                          will do and report back...

                          g

                          Comment

                          • grahama
                            Senior Member
                            • Sep 2004
                            • 223

                            #14
                            could add a Silent feature ?
                            something like:
                            inetLoad::load /SILENT "http://blah.com/blah.jpg" "$EXEDIR\blah.jpg"


                            will possibly get this thing tested today
                            g

                            Comment

                            • grahama
                              Senior Member
                              • Sep 2004
                              • 223

                              #15
                              great news
                              initial tests from a client came back successful...
                              I'll go there myself to make sure later in the week...
                              but this is very good news as nothing was getting thru with nsisdl
                              g

                              Comment

                              Working...
                              X