0

I create my executable with inno-setup but I want it to notify the users of the availability of a new version lorce it is isponible

  • 1
    I'd stand by my [idea mentioned here](https://stackoverflow.com/questions/27860099/innosetup-and-automatic-update#comment44122620_27860099). It's your application which should take care of updates, not installer. – TLama Nov 14 '19 at 08:42
  • @TLama Thank you, do you know how I can do it? can you recommend me a tool – Landry Engolo Nov 14 '19 at 09:11
  • No, sorry. I'm not a Python guy. – TLama Nov 14 '19 at 09:18
  • See [How to automatically update an application installed with Inno Setup](https://stackoverflow.com/q/53073973/850848). – Martin Prikryl Nov 14 '19 at 10:40

1 Answers1

1

With my applications, I do it manually.
I have a "Check Version" option in the "Help" menu, although, obviously it can be done automatically on start up.
A simple method is to have your code contain a version variable and your repository contain a text file with the current version, along with the new code/binary. Then it's a simple matter of reading the contents of that text file, comparing it against the current version and either informing the user that there is a newer version or downloading it and installing it, although it's probably best to let the user make that decision for themselves.
Here is the guts of some code to get the current version from the repository.

   def GetVersion(self, event):
        from requests import get
        busy = wx.BusyInfo("Checking SourceForge please wait...",self)
        wx.GetApp().Yield()
        try:
            RawInfo = get('https://sourceforge.net/projects/footswitch2/files/Latest_Version.txt/download', headers={'User-Agent':'footswitch2'})
            del busy
        except Exception as e:
            wx.MessageBox('Version information is unavailable or unable to connect to\nhttps://sourceforge.net/projects/footswitch2/', 'Footswitch2 Version '+str(Version[0]), wx.OK | wx.ICON_INFORMATION)
            del busy
            return
        TextInfo = RawInfo.content.decode('UTF-8')

Now you have TextInfo unpack/split it and compare it to your variable Version (the current version number) and progress from there.
It isn't fancy or sophisticated but it is simple and pretty much foolproof.

Rolf of Saxony
  • 21,661
  • 5
  • 39
  • 60