Provides a way to keep procedure files in sync with releases on IgorExchange. This is not a package manager for multi-file projects, just a way to keep individual procedure files updated as new versions are released.
Igor 7 allows procedure files to be updated by external editors. The idea here is to parse the releases page on IgorExchange to find new updates. When a more recent release is found Updater will ask you if you want to download the new release and overwrite the existing file. After the file has been updated, Igor will give the option of reloading the updated version of the procedure file.
If you're an end-user of packages that can be updated this way, all you need to do is to save this package, updater.ipf, in the Igor Procedures folder (look in the Help menu for "Show Igor Pro User Files").
The default settings for Igor Pro will result in Igor presenting the user with a dialog after the procedure file has been updated, giving an option to reload the updated file. For more seamless updating, you can tell Igor to automatically reload any updated file. Choose Misc->Miscellaneous Settings, click Text Editing in the left pane, click the External Editor tab, and select Reload Automatically, As Soon as Modification is Detected. For more information, execute
displayHelpTopic "A Plain Text File Has Been Modified Externally"
from the command line.
If you're developing a package and wish to use this updater:
- Save this package, updater.ipf, in the Igor Procedures folder
- Add the following code to your procedure file:
#pragma version=1.00 // Needed, edit number to match release on IgorExchange
#pragma moduleName=MyPackage // Recommended. Doesn't have to be same as ksSHORTNAME.
static constant kCHECK_FOR_UPDATES=1 // Needed. Set to 1 to check for updates on init.
static strconstant ksSHORTNAME="MyPackage" // The project shortname on IgorExchange, needed if not the same as moduleName.
static function CheckForUpdates()
You should edit the values of the constants to match your file.
- In the initializing function of your package insert these lines:
return 0 // this file has been updated; quit execution to allow user to reload
- This package relies on being able to access and interpret the 'All Releases' page at IgorExchange for the project to be updated. New releases should be uploaded to IgorExchange as a plain text, i.e. uncompressed, Igor Pro procedure file.
- Updater has a menu-driven option (Help -> Updater: Check for new releases) for checking manually for new releases for all open eligible procedure files. To be eligible for checking, a procedure file must have updater headers and functions as described above, and have a regular module name defined by
#pragma moduleName = MyPackage
- Getting this to work with independent modules is a bit more complicated. See http://www.igorexchange.com/node/8214.
- User is presented with a doAlert dialog before overwriting any file, but I cannot guarantee that nothing is going to go wrong with this. If the target procedure is somehow corrupted by my code (hasn't happened yet, but I can imagine unforeseen errors related to character encoding or something), replace the procedure file with a fresh copy downloaded from IgorExchange, turn off checking by setting kCHECK_FOR_UPDATES=0, and let me know that I've goofed!
- Updater selects for download the most recent release that's compatible with the version of Igor that you're using. To roll back to an earlier version of a project release, download the older release from IgorExchange and set kCHECK_FOR_UPDATES=0 in the downloaded file to prevent updater from checking that file.
Projects that work with Project Updater
I've added updater capabilities to most of my packages:
Arc Hull Baseline
and, of course, Updater can update itself (although releases prior to version 1.08 don't know about the new location of IgorExchange, so if you have an older version please replace it with the most recent release available here).
Prototype package installer
This may work for simple packages:
installs IgorExchange package with shortname foo in a location within the Igor User Files folder chosen by the user.
install("foo;bar;", location=SpecialDirPath("Igor Pro User Files",0,0,0)+"User Procedures:")
installs packages foo and bar in the User Procedures folder.
Current Project Release
Project Updater IGOR.7.00.x-2.08
|Version Date:||Tue, 07/17/2018 - 04:20 pm|
|Version Patch Level:||8|
|OS Compatibility:||Windows Mac-Intel Mac-PPC|
Looks for new releases here on the IgorExchange section of wavemetrics.com instead of the retired IgorExchange site.
Igor Pro 8
Igor XOP Toolkit
Igor NIDAQ Tools MX