EiffelOnMac

Revision as of 15:20, 3 June 2008 by Peter gummer (Talk | contribs) (FAQ)


This page gives you an overview about how to get EiffelStudio running on your Mac.

Installation using MacPorts

MacPorts is a great tool that allows you to use many Unix applications on the Mac. We have created a package in the MacPorts repository that allows you to to install a fairly recent build with all dependencies in a convenient way. After installing MacPorts as described here simply type

sudo port install eiffelstudio

and you're ready to go (after a few hours compiling that is :)). Compiling on a new Intel Mac reportedly takes about an hour. An old 800 MHz PowerPC takes about seven hours.

The latest development build is available in the eiffelstudio-devel port. To install it type:

sudo port install eiffelstudio-devel

It can be installed alongside the regular ES build.

Note that you may need to precompile the base and vision2 libraries once with admin rights. To do that, you can type: "sudo estudio" in an xterm window and then use the precompilation wizard (Tools>Precompilation wizard) or simply create a new project that will be precompiled. On Mac OS 10.5 (Leopard) this doesn't seem to work anymore. Here you need to set the permissions of the precompile folder to world writeable (or at least writeable for your current user). To do this type chmod a+w $ISE_EIFFEL/precomp , you can change it back after completing the precompilation: chmod 755 $ISE_EIFFEL/precomp

Working around firewall issues

If you can't use the MacPorts rsync repository due to your firewall you can check out the macports source tree via SVN. To do this open a Terminal window and cd to a directory where you want your ports tree to live. Then type:

svn co http://svn.macports.org/repository/macports/trunk/dports/

After the command has finished open the file /opt/local/etc/macports/sources.conf in your favorite text editor. Comment out the rsync URL and add a file URL that points to the dports directory that you just checked out from the SVN repository. Your sources.conf file will then look something like that:

# To get macports from the macports rsync server use:
# rsync://rsync.macports.org/release/ports/

file:///Volumes/Data/SVN/macports/dports

Note: The above steps only work when you have an SVN client installed. This is a bit of a chicken-egg problem, since you usually get the SVN client from macports but you can also download svn from http://www.codingmonkeys.de/mbo.

If you don't have internet at all, or the above seems to be too complicated you can also create a binary package file on a computer that has MacPorts installed and then install it on the target computer. Please note that it is not recommended to install such a binary package on a computer that has MacPorts installed, since the binary installer does not (yet) talk to the MacPorts system to register the ports, so you might get ugly conflicts.

That being said, you can create a Mac OS X installer for EiffelStudio and all dependencies by typing

sudo port mpkg eiffelstudio

You can then find the .mpkg file in /opt/local/var/macports/build/<folder name that contains the word eiffelstudio>

The folder name might look something like this "_Volumes_Data_SVN_macports_dports_lang_eiffelstudio". Just copy the .mpkg file to the target computer. It can then be installed by simply double clicking it. Note however that the build and and the target machine should be of the same architecture (Intel or PPC) and of the same major OS release.

FAQ

I get a crash with a Permission denied: Operating system error, how do I fix it? Answer: Delete the .ec directory in your home directory.

I get a linking error with precompiles on PPC, why is that ? Answer: Precompiles don't seem to work (well) with gcc on the Mac. This seems to be a limitation of the linker on both PPC and Intel. To work around this issue don't use precompiles on Macs.

Hints

  • Use Helvetica 12 as Editor font. If you prefer a smaller font, use Hei 10.
  • Pick and Drop works with Apple-key + mouse click.
  • To set up the correct (default) browsers use "open" as your command-line browser in Tools>Preferences...

Preferences open mac.jpg

  • To run the ec compiler from your shell, set up variables similar to these (e.g. in ~/.profile):
# Setting variables for EiffelStudio.
export ISE_EIFFEL=/Applications/MacPorts/Eiffel61
export ISE_PLATFORM=macosx-ppc (or macosx-x86)
export ISE_PROJECTS=$HOME
export ES_PATH=$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin
export PATH=$ES_PATH:$PATH
  • The F10 and F11 debugging shortcuts conflict with the standard Exposé keys. Here are some workarounds:
    • Use the toolbar instead.
    • Reassign these shortcuts in EiffelStudio (Tools>Preferences).
    • Reassign the Exposé keys in System Preferences.
  • The version of X11 installed with Mac OS X Leopard 10.5.0 and 10.5.1 does not work. The 10.5.2 and 10.5.3 updates are probably ok, however, but if you're having problems have a look at http://trac.macosforge.org/projects/xquartz. For more details, see http://www.eiffelroom.com/blog/paulbates/a_little_help_for_mac_users which pre-dates the release of 10.5.2.