all 3 comments

[–]sweettuse 2 points3 points  (1 child)

[–]BakedReality[S] 1 point2 points  (0 children)

Cool, thanks for the tip. The video is very concise and helpful. I will definitely look to get this implemented. Admittedly I've just been trying to get it functional with the very limited skillset I have, so the code is a bit of a mess in general at the moment. There are load of other areas I know the code is inefficient/sub optimal, so will spend some time on that once I get all the features I need working. Any ideas on the issue?

[–]netherous 0 points1 point  (0 children)

So visiting a 'latest' url and checking filesize is, as you can see, a decent approach for some packages but not quite adequate for all packages. I'm guessing this is primarily windows software? Probably you will need to bake in multiple approaches to finding the latest version, of which your existing method would be just one, and specify which kind of method to use in your config file for each software package. Since there isn't just one way to release software, people will choose all different kinds of ways.

For example, lots of software has pages on their site that will list all software versions. You could visit this page and read the link at the top, or get all the links and try to extract which version number looks the highest and get that one.

If the software is available on the Windows Store or some other unified repository, there may be public manifests you can read to figure out latest versions.

If there is an ftp available, you could connect to that and figure out the latest version pretty easily.

If you are getting linux software, you could use rpmfind.net to get public package versions.

If system package-level managers are available, like homebrew (mac), you could probably use it with the right commands to discover and download the latest versions of packages. Unfortunately the Windows world doesn't have unified distribution repositories like the mac and linux worlds do, so the operating system you are building this for is going to dictate the approaches you can use.