No announcement yet.

auto updater

  • Filter
  • Time
  • Show
Clear All
new posts

  • auto updater

    i am REALLY new to NSIS just started using it a few days ago, got a nice installer made, just the basics but it's all i need

    im wondering if there is a way to make an auto updater that will check a server for a new version or if there is a way to make it download a list of sections from a server every time the installer runs it gets a new list of options to choose from (if the list was updated)

    i'd be happy enough if there were something like the uninstall generator that made an update checker where you give it a url and it checks if the file is updated by viewing a text file or something then has the user download it

    i've seen SOMETHING about downloading used in the plugin and i dont know if that has anything to do with what im doing but it'd be cool anyways

  • #2
    It's not possible to dynamically add Sections, but you can have a look at Software Updata:

    Software Updata is written in NSIS and you can download the source there (although it might be hard to get you head around).

    Basically, it uses the InetLoad NSIS download plugin by Takhir to do just about everything.



    • #3
      cool thnx i'll have a look


      • #4
        alright i have no idea how to use it, but i installed both the exe and the nsis plugin stuff


        • #5
          If you plan on using SwUpdata, you need to read the documentation that comes with it. Otherwise just download the InetLoad plugin (search this forum).



          • #6
            Hi, I am playing around with this. Now I have everything set up but the problem i am having is that the updater does not install the files in the correct sub-directories, it just puts everything in the root directory.

            So if my update file has an entry like below, the file blank.dll is installed in the root install dir and not in root/mydir/blank.dll Any ideas?:

            27/09/2005 @ 16:23:46




            • #7
              Thanks, this has been fixed in SwUpdata



              • #8
                Thanks it works.

                I added /NOUNLOAD to the section below in main.nsh. Each file download would hang for 20-30secs without it on my pc but ymmv.

                ## Download the bugger!
                Delete "${Downloads}\$DownloadName"
                Push /END
                Push "${Downloads}\$DownloadName"
                Push "$ServerURLForward$DownloadURL"
                Push " (%d %s%s left)"
                Push "%dkB (%d%%) of %dkB; @ %d.%01dkB/s"
                Push "s"
                Push "hour"
                Push "min"
                Push "sec"
                Push "Connecting..."
                Push "Downloading %s"
                Push /TRANSLATE
                CallInstDLL "${DLL-InetLoad}" /NOUNLOAD load


                • #9
                  Hmm that's interesting thanks I will add that for next release.



                  • #10
                    BTW InetLoad can take few files from server in a single session, this might work in Updater

                    Push /END
                    Push "${Downloads}\$DownloadName1"
                    Push "$ServerURLForward$DownloadURL1"
                    Push "${Downloads}\$DownloadName2"
                    Push "$ServerURLForward$DownloadURL2"

                    WinInet detach caused up to 60 sec delay on plug-in unload, but I was sure that I solved this problem in July' version.


                    • #11
                      I was installing trial-ware that uses InstallShield, and was interested to see that its auto-update checker was based on InstallShield (see attachment).

                      I was getting ready to put in a feature request that nsis implement this capability, but fortunately did a "Search" (BTW: perhaps the Search field could be at the top of the page to make it more likely to be used).

                      I hadn't realized that nsis is capable of accomplishing this. I'm a participant on several open-source projects, and have had it on the respective to-do lists of several of them to implement AutoUpdateCheck, but wasn't clear how to go about that. Also, this valuable capability seems to be more or less invisible in the documentation.

                      Maybe I'm the only one, but I had never heard of nsis' AutoUpdateCheck capabiliy (or perhaps I need to get my alertness pill medication upped in dosage ). To me, this is a VERY valuable feature ... almost up there with generating an uninstaller.

                      Seems like the NsisInstaller itself could/should have this capability (nsis-#.##.exe from sourceforge) ... that would give the feature much greater visibility. Also, perhaps the cleaned-up bigtest.nsi example could show how to do this (or another example)?

                      My impression is that the AutoUpdateCheck capability isn't particularly integrated into nsis ... fwiw, my vote would be to have it directly available, as a selectable default (unless it adds greatly to the size of the installer??).

                      (I suppose I would even be willing to offer to help out if this capability is a work-in-progress)
                      Attached Files


                      • #12
                        It might not be difficult for the setup to check an update site for a newer version of the setup, download it, run it and then exit. If no newer version is found, the setup continues as normal.

                        EclipseNSIS - An NSIS IDE for the Eclipse Platform | My contributions to the wiki


                        • #13
                          I can tell you how I do it in my plugins.

                          I update the compile NSIS script with the newest engine version, then the installer does the following:

                          It tries to find and load the VS Engine, if that fails it downloads it from the web server.
                          If it did load, it gets the version number from the engine DLL with a custom NSIS plugin/extension I made that reads the version # and compares it with the latest version. If the one on your system is older then the newest it updates it.

                          Want a dynamic winamp signature? See