Friday, October 29, 2010

Auto-updates

The following site is home to TinkerCell's plugins.

http://tinkercellextra.svn.sourceforge.net/

If a machine as SVN installed, then TinkerCell automatically sets up an SVN repository in the TinkerCell home folder (i.e. usually Documents/TinkerCell). The files in the above repository are automatically updated each time TinkerCell starts. This is very simple. In the DynamicCodeMain.cpp.in file, a system call is made to svn -- simple.

Additionally, there is a file called updates.txt in this repository that is automatically updated by CMake. In the DynamicCodeTools/CMakeLists.txt file, the last line runs a perl script that updates the updates.txt file so that updates.txt has the current SVN revision number in it. When TinkerCell starts, it checks to see that the version number matches the number listed in this file. If not, a message is displayed notifying the user of a newer version.

No comments: