r4 - 07 Apr 2008 - 14:57:05 - DavidWithersYou are here: myGrid wiki >  Mygrid Web  > BuildingTaverna > ReleaseProcedure > MacRelease

Making an OS X release of Taverna

Assume we already have the generic taverna-1.5 release ready and want to make a fancy Mac version. This is the advantages of the mac way:

You get one icon, one application, with a nice Taverna icon, called "Taverna". Users install it by just dragging it to /Applications. The icon is really a folder, and inside is all our juicy Java code and even GraphWiz?. The users just see an "Application", though, and treat it as a single entity.

We put this application together with the examples (named Example workflows) on a disk image. A disk image is kind of like a .zip except it is mounted as a real folder in OS X, and can have Finder attributes such as specialised backgrounds.

We have made such a background that says "To install Taverna, drag it to Applications", and made an image, Taverna.dmg, that includes Taverna, Example workflows and a link to Applications shown nicely positioned.

You should copy and mount this disk image and use it as the skeleton for the real disk image. Note that there is a finalisation step for the disk image to make it read-only, compressed and "Internet enabled".

Get the normal Taverna distribution

Use curl -fO, scp or Safari to download your already prepared taverna-workbench-1.5.xx.zip, as described in the release procedure. Unzip by either double clicking or using unzip.

Copying Taverna.app

From taverna1.x/osx in CVS, copy Taverna.dmg to some other folder, say your Desktop. If you don't have the CVS tree on your mac, you can simply transfer this file as with the Taverna distribution, possibly even from ViewCVS.

Double click to mount Taverna.dmg. In Finder, or on your desktop, you should now find your mounted Taverna image, shown as a white disk icon. Inside there will be the Taverna application skeleton, an Workflow Examples folder, and an alias to the Applications folder.

Use a terminal window (Applications -> Utillities -> Terminal), or right click and select "Open package content" on Taverna, and walk down into Taverna.app/Contents/Resources/Java.

This is where we place our jar files, thanks to Raven that only means taverna-bootstrap-1.5-*.jar from the normal Taverna distribution, which you unzipped in the previous step. Note that we will have to edit Info.plist to reflect this filename. Also copy the conf and plugins directories here.

The skeleton image should be without this JAR file and with an empty examples folder, so that we are reminding ourself to copy in these from the normal Taverna distribution. Do this using cp -R or a normal drag-and-drop.

Copy examples

Copy all the examples from the normal Taverna distribution into the Workflow Examples folder. The icon of this folder has been set using deep OS X magic, so don't replace it.

Editing Info.plist

Taverna.app/Contents/Info.plist is the XML property files that tells OS X what is really to be run when you double click the application. Edit this either using your favourite text editor (like vim) or the GUI editor by double clicking it. An editor would be faster for the search-replace we are going to do next.

You will need to update at the filename to the jar file towards the bottom of the file. If you search-replace 1.5-SNAPSHOT with the current version for the whole file, it would usually be enough. In addition, update the CFBundleVersion? to today's date. The filename should now match.

In addition there's Java options in the bottom. Note how we run Java this way, and not through runme.sh. That means that any fancy option in runme.sh needs to be here, like -Xms300m. Running Java this way avoids any console windows, and makes a running Taverna appear in the dock using it's own icon and be called "Taverna" in the application menu.

Properties

In this file, we have specified some properties manually. You normally wouldn't have to update any of these unless the runme.sh of the normal Taverna distribution has been updated.

Example, enabling our locally bundled graphviz dot:

            <key>taverna.dotlocation</key>
              <string>$APP_PACKAGE/Contents/MacOS/dot</string>

or using our fancy bootloader:

            <key>java.system.class.loader</key>
             <string>net.sf.taverna.tools.BootstrapClassLoader</string>

In addition we turn on apple.laf.useScreenMenuBar that puts the menubar on the very top of the screen, OS X style, instead of the old fashioned menubar-in-the-window.

Update shellscripts

We also distribute some shellscripts, executeworkflow.sh and dataviewer.sh. (The latter is currently excluded since it doesn't work). These are located in Contents/MacOS. You should make sure both of these have been updated compared to the distribution, the difference is that we replace this original line:

    TAVERNA_HOME="`dirname "$PRG"`"
with:
  TAVERNA_HOME="`dirname "$PRG"`/../Resources/Java"

A check with diff should verify this for you.

You can then test them from outside your "Taverna.app" like this in the Terminal, but wait until you've tested the actual Taverna application as otherwise this would start the full Raven download in terminal mode:

    : stain@mira /Volumes/Taverna 1.5.1;Taverna.app/Contents/MacOS/executeworkflow.sh -help
    usage: executeworkflow  [..]
       Execute workflow and save outputs. Inputs can be specified by multiple
       --input options, or loaded from an XML input document as saved from
       (..)

Users who install Taverna can symlink to these shell scripts and place the symlinks in their $PATH.

Testing Taverna.app

To test the application itself, first move away or delete your Taverna home directory, on the Mac located in $HOME/Library/Application\ Support/Taverna/. In the Finder, you can browse from your home directory, down Library and Application Support to find Taverna.

This is so that you test-start from blank. (You can later try what happens if you keep the old directory from an older Taverna version, to check how upgrades are handled.) Double click on Taverna from the Finder, inside the disk image.

There should be a nice Taverna wheel dancing in the dock (not a white Java icon), splashscreen, and after a while, Taverna should appear. The menu on the very top of the screen should say "Taverna" in bold letters and then "File" etc. If you right-click (or Ctrl-click) on the Taverna application in Finder, you should see the correct verison number listed under "Get info".

Remember, if you run this on a laptop, be on the allow-everything-ethernet and not on the firewalled-wireless, otherwise lots of services might not work as expected.

Cleaning up CVS/crap

This point is not needed if you use the Taverna.dmg as a starting point.

Before we release this copy of your Taverna.app, let's remove all those CVS folders. In a terminal, go inside Taverna.app and run mr. find:

: stain@mira ~/taverna-workbench-1.5; cd Taverna.app 
: stain@mira ~/taverna-workbench-1.5/Taverna.app; find . -name CVS|xargs rm -r

Building a new disk image

Now - for the actual release, what we do is to send out a compressed read-only disk image that is "Internet enabled". This means that when users download and double click the disk image file, the fancy Finder window will appear with our customised background, and the user can just drag Taverna to his Applications folder. If the image has been Internet enabled and downloaded using Safari, it will automatically be deleted when it's unmounted.

First, close any terminals that are inside the working disk image. We are not going to ship this, as it's writeable. Umount it by either dragging the white disk icon towards the Trash (should change to an eject icon), right click and Eject, or click the Eject icon next to it in Finder.

Start Disk Utillity, found in Applications/Utillities. Make sure no disk is selected (no selection in the white pane) and do Images->Convert in the menu. Select Taverna.dmg from the Desktop. (That's wher eyou placed it, right?).

Select Image format "Compressed", "None encryption", and save the new converted disk image on the Desktop as taverna-workbench-1.5.x.dmg (our current naming scheme matches the .zip filename)

This would now be a read-only image. Double click on this. You will notice the difference from the read-write image in that a Finder window pops up automatically. This should look like this:

tavernamounted.png

If it does not, you might have to change to View->As Icon and possibly move the icons the appropriate positions. If the background image has disappeared, or must be upgraded, a slightly more complicated procedure is needed.

Eject the image if everything is OK. Now, "internet enable" the image. From the Terminal, go to $HOME/Desktop:

: stain@mira ~/Desktop;cd $HOME/Desktop
: stain@mira ~/Desktop;hdiutil internet-enable -yes taverna-workbench-1.5.1.dmg 
hdiutil: internet-enable: enable succeeded

important Do not open the image after it has been set internet enabled, as this would turn off the internet bit. Copy the image to test the copy instead.

Again, the internet enable makes it so that people who have downloaded the image using Safari, copied over the application, and then eject it, don't have to delete the .dmg file afterwards, because OSX knows that it was just used for downloading software. However, this seems to only work with Safari..

When you do your testing, also try to ask some mac friends with a different architecture (say powerpc instead of intel) and who might not have Taverna installed to test it for you.

If everything is OK, the image is ready to be released to SourceForge.

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
pngpng tavernamounted.png manage 412.7 K 26 Jan 2007 - 16:58 StianSoiland Taverna mounted and showed in Finder
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r4 < r3 < r2 < r1 | More topic actions
 
Powered by myGrid wiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding myGrid wiki? Send feedback