Software Engineering Matters

giving a little more thought...

Installing packages in Squeak

Posted by Nicholas Chen Sat, 26 May 2007 22:09:23 GMT

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.

Installing packages in Squeak - 1
Bring up SqueakMap Package loader first.

Installing packages in Squeak - 2
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.

Installing packages in Squeak - 3
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.

Installing packages in Squeak - 4
In the newly upgraded SqueakMap Package Loader, search for "shout workspace".

Installing packages in Squeak - 5
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.

Installing packages in Squeak - 6
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).

Installing packages in Squeak - 7
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.

Installing packages in Squeak - 8
Now, when you bring up the open menu you see Shout Workspace as an option.

Installing packages in Squeak - 9
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.

Uninstalling packages in Squeak - 1
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.

Uninstalling packages in Squeak - 2
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

Posted in | 1 comment | atom

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

Comments

Leave a response

  1. Avatar
    uhk
    3 days later:
    Nice article. I had trouble accessing the squeakmap repository behind a firewall - found the solution here (http://wiki.squeak.org/squeak/23)

Leave a comment