Wednesday, August 02, 2006

 

All those versions ...

Since the open sourcing of EiffelStudio everybody has now also access to all those exciting interim releases of EiffelStudio via http://eiffelsoftware.origo.ethz.ch/downloads/builds/.

With the ability to have a peak at the very latest features also comes the burden of constantly installing and switching between all those versions. Bernd and I hacked together a little script that simplifies both installing and switching between the various versions. The script is called estudio_tools.sh . Just safe it somewhere on your (Unix) machine and source it in your .bashrc. This will give you two new commands:

# install_estudio [version]
#
# Installs the given version of Eiffel Studio. It first
# downloads the version and then unpacks it into ${LOCAL_ROOT}
# (see configuration section below). When no version is given the
# function lists the installable versions. When the version "default"
# is given it installs the latest version. Note that this function
# does not set any environment variables neccessary to run
# EiffelStudio. To accomplish this have a look at the function
# `activate_estudio'.
#
# activate_estudio [version]
#
# Activates the given version of Eiffel Studio. It sets/changes
# the environment variables ${ISE_EIFFEL}, ${ISE_LIBRARY}, and
# ${PATH}. When no version is given the function lists the installed
# version of EiffelStudio. When the version "default" is given the latest
# version will be activated.

I have the following in my .bashrc:

source /usr/local/bin/estudio_tools.sh
activate_estudio default

The above first loads the function definitions and then activates the default EiffelStudio version. But let's see what the commands do on an clean and empty system. After sourcing estudio_tools.sh on a clean system invoking install_estudio yields the following (today):

$ install_estudio
57_gpl_62110

This means that the only installable version is 57_gpl_62110. I can then install this version via:

$ install_estudio default
Downloading EiffelStudio version 57_gpl_62110 ...
Finished download.
Unpacking EiffelStudio version 57_gpl_62110 ...
Finished unpacking.

Now the requested version of EiffelStudio is installed but not ready to use. We still have to set a few environment variables. But first lets use activate_estudio to verify this version is installed:

$ activate_estudio
57_gpl_62110

And indeed the version is installed. What is left now is to activate this version. Note that you will have to activate for every shell-session a new.

$ activate_estudio default
aleitner@bruck:~$ ec -version
ISE EiffelStudio version 5.7.62110 GPL Edition

The tool is very unintrusive. It simply installs all versions into a common directory. This directory (and some other details) can be changed by editing the the top part of the script. Chances are that if you already have such a directory where you store the various versions you can just reuse this directory. The script will probably recognize your old installations and offer you to install new ones too.

have fun,
Andreas

Comments:
Yes, in fact this is what I do. Here is the list of versions that I have currently installed:

$ activate_estudio
5
56
56.1218.edu
56.1218.free
57
57.59914
57.60288
57.60907
57.61376
57.61570
57_gpl_62110


I just manually unpacked the older versions into the common root directory. The short versions like 5 and 57 are actually just symlinks. That's quite handy too.
 
Philipp Boenhof has further extended the script. Most notably it supports Windows now, but there are many other improvements. Get it from: http://n.ethz.ch/student/pboenhof/helper_scripts/estudio_tools.sh
 
Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?