[ANN] v2 Package loading/unloading - fully functional

Michal michal-list at auf.net
Mon Feb 21 09:43:42 UTC 2005


hi -

Attached you'll find a much cleaner editor for loading/unloading scripts attached to PackageInfo *and* a fully functional loader/unloader of packages (hence ignore the quick'n'ugly hack I posted a couple of days ago). I've tested it in both 3.7 and 3.8g and was able to load and unload packages cleanly, with preambles and  postscripts run for both loading and unloading. To use it, just file it in and open a new Monticello browser. There you'll find:

1. a new button 'scripts'. Click on it (with a package selected) and it will offer to edit anyone of the four scripts (preamble, postscript, preamble of removal, postscript of removal).

2. a new button 'save as package'. This will save your monticello project as a loadable/unloadable package instead of a simple mcz file. 

3. a working 'unload' function. In the package pane, get the menu and choose 'unload'. This now runs the preamble, postscripts of removal around the actual unload process.

4. when filing in the newly created package, it is seen as a normal SAR file and will do the right thing.

Note that the package format will change towards the one that Avi suggested. This change set implements my original suggestion of creating a SAR which contains the install/preamble|postscript and removal/preamble|postscript. I have done this only as a proof of concept, to show you how the new instVars in PackageInfo lead to directly loadable/unloadable package now, today. (The extension of the package file is simply .mcz.sar)

I expect that the package format will change next week to make it a simple mcz file which nows how to store the preambles/postscripts and how to use them on load/unload. But that's an implementation detail, in fact it needs to change only one method in this changset (#createPackageForVersion:).

Enjoy and packagize :)

Michal

ps. I have also attached a trivial Dummy.mcz.sar package. If you load it and unload it in after having filed in the changeset, you'll see how the preambles/postscripts are run.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PackageLoading.1.cs.gz
Type: application/octet-stream
Size: 3440 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050221/7d360987/PackageLoading.1.cs.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dummy-mist.1.mcz.sar
Type: application/octet-stream
Size: 1961 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20050221/7d360987/Dummy-mist.1.mcz.obj


More information about the Squeak-dev mailing list