Mon, 02/26/2018 - 12:46 pm
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. Includes a prototype package installer, for installing user projects hosted on wavemetrics.com.
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 wavemetrics.com for the project to be updated.
- 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 notes at top of procedure file for details.
- 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), 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
A GUI is accessible from the Macros menu. The names of all of the user contributions are retrieved from wavemetrics.com. If you select one of these and click 'Install' the project will be downloaded and an attempt will be made to install the project files in the User Procedures folder.
From the command line:
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.10
|Version Date:||Thu, 11/08/2018 - 02:28 pm|
|Version Patch Level:||10|
|OS Compatibility:||Windows Mac-Intel Mac-PPC|
Can update procedure files uploaded to wavemetrics.com as zip archives. Installer now has a GUI.
Igor Pro 8
Igor XOP Toolkit
Igor NIDAQ Tools MX