Tafres, Security, Automatic Updating, and Online Activation

Last night I successfully got both the Tafres Client _and_ Server to a stage where each of them:

– Checks for updates over the web on startup. If one exists, that is a greater version number by it’s logic, it will ask to download. Once the download is finished, it will ask to install. There is an issue with the Client because it asks to "exit" the program. The update logic works best when the program can shut down silently. Will have to do something about that. Anyway, the installer runs and updates.

– Runs a 10 Day Trial. I haven’t yet worked out whether the 10 day trial will always just happen, or whether the user will need to get the activation code online to get the 10 day trial. Never the less, at the moment, both can be done.

– Allows for the the retrieval of an Activation Code (part of the Licensing information needed) over the internet. This is done using Secwin Online Server, and Secwin.

This is very cool. In terms of support, you want these two things in place before going out into the big bad world. I need my product secure. But it needs to be trialled. It also needs to be updated as painlessly as possible. I’m getting there with the current solution, although there will be some tweaking I can already see.

Along with this, using SetupBuilder I now have the process of creating Installs and Updates working pretty well.

– the file structure is <Product Name>\\<Version>\\ … then in that folder, I have both the Install and Update SetupBuilder files. Also, these folders: <source>, <external source>, and the two that are created by the SB files themselves, which store the Install and Update respectively.

– the updated files (of mine) go in <source>.

– any changes to 3rd Party or stock Clarion files (dlls) go in <external source> (these are used for the Update logic).

– Open up the Install file, change the [DEVFOLDER] value in the script section. Obviously, this is giving SB a base folder to work from. Practically, I just change the version number.

– If I’ve added new functionality that requires new DLLs, I run a static scan on my exe(s), done in the top panel of SB. This adds any new dependencies.

– Compile.

– Open the Update file (close the Install). Change the [DEVFOLDER] value.

– If any changes to 3rd-Party or Clarion DLLs, run the "Project->Task Automation->Perform Auto Update Scan .." action, and check the differences between the <external source> folder in the current version folder against the previous version folder. This adds any changed DLLs to the project.

– If any new dependencies have been added, I run a static scan on the exe (as in the Install).

– The main exe will already be in the Application Folder, with a  "patch" moniker. I open the file’s details in SB and change both the source and patch folders (change the Version number) to reflect the new versions.

– Compile the Update. This takes a little while longer than the Install, but not much. A very nice and small (if only changes in the main exe for example) Update exe.

– I then update the XML file in the <TafresClient-Update> folder (SB creates a folder with the same name as the SB file itself to store the builds in) to reflect the new version number.

– Now it’s time for uploading the Update exe and xml files to the ftp site that Safe Update looks at. Done.

– Finally, I upload the Install.

– I’ve kept my Install and Update filenames generic. I started out sticking the version number in them, for visual reference, but too many things would have been harder. Safe Update, Changing more stuff each time in SB. Generic names keeps the process streamlined. It also means there is only one set of files on the server, not one for each version.

Phew. That’s quite a post. I think I need to spend some time doing this with screenies and wotnot. Might be helpful. I’m planning to do a bunch of stuff for the new Clarion site, and these pieces of development functionality will go in as tutorials at some stage. So probably won’t do it again here.

Leave a Reply

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