Installing packages in Squeak
In my previous post I mentioned some useful packages that do not come installed by default in normal distribution of Squeak. There are two ways that you can get hold of those packages in your image.
The first way is to download a specially packaged image that contains most of the developer tools. You can get that image from here. The advantage is that you get all the tools that Squeak developers usually use. The disadvantage is that if this is your first time using Squeak, you might not know all the tools. Hence you end up with an image that contains a lot of things that you will not use. And documentation for tools are usually pretty sparse so it is a good idea to start small and selectively choose the tools that you will use.
Thus, I present the second method to get hold of those tools: installing them as individual packages. For this process, I am going to start with a clean image to show you how it is done. I will install the Shout workspace package which gives you syntax highlighting in the workspace.
Bring up SqueakMap Package loader first.
It's a good idea to update the list of packages from the net every time you want to install a package. This gets you the latest version.
Notice how we now have 694 packages instead of 667. We also want to upgrade any installed packages before installing new ones. In this example, the SqueakMap Package loader itself will be upgraded.
In the newly upgraded SqueakMap Package Loader, search for "shout workspace".
If you read the description, you will notice that it requires Shout to be installed first. As this example shows, it is always a good idea to actually read the description before installing anything.
Here we install the prerequisite: Shout. Just middle-click on the package name and it will automatically install the package that is most compatible with your system (if it can find one).
Now we select Shout Workspace. You will get a bunch of warnings at this time saying that Shout Workspace might not be compatible with your system. When you get a warning like that, use your own judgment on whether to install it. You can always try to install it first and if it does not work then you can just quit the image without saving.
Now, when you bring up the open menu you see Shout Workspace as an option.
This is the syntax highlighting that you get from the Shout workspace.
Because you have installed Shout as well, you will get syntax highlighting in the normal class browser.
Installing packages in Squeak 3.9 still has some caveats. Some packages do not work together well. This will change for the better in Squeak 3.10 with the introduction of a more standardized package universe where all packages in that universe must work together.
This brings me to the second part of the post. Uninstalling the packages that you do not want. There are two ways to do so. First, if you discover that the package that you install does not work well (or if you do not like it) then you can quit the image without saving it. The next time you start the image that package will not be in it.
The second method involves using Monticello browser as illustrated below.
Bring up the Monticello browser. Monticello is the name of a version control system in Squeak. Most new packages are stored in the Monticello format.
Find "Shout Workspace" and select unload packages.
This only works if the package was installed as a Monticello package. Most new packages are but some of the older packages are installed as changesets and cannot be removed so easily.
However, uninstalling packages is not always a clean process. In our example, even after unintalling Shout workspace, some of its side effects remain. For instance, if you click on desktop to get the World Menu and click open... you still see Shout Workspace in the list even though it has been removed. Clicking on Shout Workspace only produces an instance of a normal workspace that does not have syntax highlighting. Unfortunately, to remove Shout Workspace from the list, you have to murk with some of the other classes in Squeak. Take a look at the TheWorldMenu
Trackbacks
Use the following link to trackback from your own site:
http://softwareengineering.vazexqi.com/trackbacks?article_id=installing-packages-in-squeak&day=26&month=05&year=2007

3 days later: