How Thor checks and distributes new versions of tools in FoxPro

In this post I will explain how Thor checks for new version and distributes tools from VFPx community like GoFish, FoxCharts, FoxyPreviewer, etc.  I was involved with Jim Nelson at a pretty low level when all this distribute/update goodness for FoxPro via Thor was first being developed. I have emails dated October 2011 where we were working on this, so 6 years ago as of this post in October 2017.

First, look in the Thor Updates folder of your Thor installation. On my machine the Path is:

C:\Fox\Utils\Thor\Thor\Tools\Updates

In this folder, you will find an updater prg for each tool that is available from Thor. In this case, for the FoxyPreviewer app:

Now, open that file and have a look… In this file, you will see it contains all the info that the Thor update engine uses to check for updates and download a tool.

In this case, the current version that Thor publishes ver ‘v2.99z30’ and it pulls the zip file from this website, which is owned by Rick Schummer, and Jim Nelson (along with a few others I think) have FTP access to this server to post the latest ZIP file.

ZIP location:

So, to get a tool updated, Jim has to do 2 things:

  1. Distribute an updated updater prg which will be pulled down when the user from Thor Check For Update. So, he sends out an updated Thor_Update_<<ToolName>>.prg with the new . VersionNumber (or the updater pfg may use a .VersionFileURL property which points to a file on the server which has the new version number) , and a .SourceFileUrl property which has the URL location of a zip file on the server which all the app file in it. Users will see all available updates for any of the Thor distributed apps in the CFU grid.

  2. He, or the tool author, must also post the referenced ZIP file to the server (usually an ftp server at a web hosting account) at the URL path referenced in the updater prg.

With these two things in place, lots a black magic happens (or, white magic, since it is Jim, and he is a good fella by most accounts), and users will see that a new update is available, and if Jim has been living right, it will download and unzip to the users local Tools or Components path in the Thor folder.

Here is the code in thor_Update_FoxyPreviewer.prg

2 thoughts on “How Thor checks and distributes new versions of tools in FoxPro”

  1. Hi, my name is Rodrigo Ortiz and progrograming in Visual Foxpro 9 . Would you have documantation for the “Thor Tools” and send me for learn this tool ?

    Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *