Hmm. Sounds pretty easy. Since it would be in an applescript, it sounds like it would be easy to put up a dialog box asking if the user wanted to download the latest update. A framework might go like this (within the athena/artemis/hephaestus scripts) 1. Did we update today, yes -> startup horae 2. Curl over the latest copy of a fixed file like http:// cars.uchicago.edu/ifeffit/updates/current_mac.dat 3. If update not available -> startup horae 4. Ask the user if they would like to update giving them the new version 5. Grab the new version of the installer via curl (would it be better to get it from sourceforge via an indirect from cars?) 6. Start up the installer, user interacts with installer 7. Tell the user to run horae again with the new version 8. stop The idea would be to use the same AppleScript file as is now used for starting up a horae element, fork off a shell script that would check for updates and return a result code that indicated if one is available (e.g. 0 no updates, 1 means update). The current version could be grep'd from one of the executables that live in the Ifeffit folder (is there an official way to get the version number?). Does this sort of plan sound reasonable. The installer would be started and would be waiting for the user to click OK. I don't think doing these automatically beyond this point is really advisable. On Feb 20, 2006, at 12:49 PM, Matt Newville wrote:
Hi Paul,
Thanks! I think the long name is fine. I'll change the download links on the ifeffit page Monday morning (Chicago time).
For a Mac OS X auto-updater, I would recommend this as being somewhat gentler than a cron job: All Ifeffit/Horae applications run from AppleScript icons first run the shell script /Applications/Ifeffit/bin/iff_init.sh. This (or .../iff_init.csh) is also but in startup files for Terminals (that is, .profile or .cshrc), so that opening a Terminal and typing 'athena' will work.
Right now, /Applications/Ifeffit/bin/iff_init.sh sets environmental variables for PATH, PGPLOT_DEV, etc and not much else. It would be simple to write a 'look for updates' script (say, modified from horae_update or the Windows updater, pointing only to the cars.uchicago.edu site) and just run that to iff_init.sh. That way, the updates would be looked for every time someone runs an Ifeffit application (as opposed to the fixed frequency of a cron job).
This is essentially how the Windows updater work. There, the script also notes when it last checked for updates so that it doesn't run 10 times a day. The Windows updater does a fast check for "is there a new version" with a fixed url of http://cars.uchicago.edu/ifeffit/updates/current.dat
--Matt
On 2/17/06, Paul Fons
wrote: Hi Matt, The Mac installer now has the somewhat long winded name ifeffit-1.2.8-Mac10.4_horae60_pkg.dmg . I was wary of changing the name before as it will break the link on cars, but since you are hosting the various installers on cars as well, it would probably be best if to have a clear name so one could be sure the version is the same on both. I thought it might also be prudent to have the installer for 10.3 check the os version (using the gestalt value in the installer) so that incompatible versions don't get installed (the 10.3 perl and Tk will I think break on 10.4). I should do the same for the 10.4 version as well. I may be able to make the same sort of check for the 10.3 package installer as well using the package you built. I can't, however, update the older installer to the new horae version as I don't have a 10.3 system to build it on.
Paul _______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit
_______________________________________________ Ifeffit mailing list Ifeffit@millenia.cars.aps.anl.gov http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit