Difference between revisions of "EiffelOnMac"

m (Corrected broken link for installing MacPorts)
(Add a link to an explanation of what the Mac Terminal is)
Line 19: Line 19:
 
MacPorts is a 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 Eiffel Studio with all dependencies in a convenient way. First, install [http://guide.macports.org/#installing MacPorts].
 
MacPorts is a 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 Eiffel Studio with all dependencies in a convenient way. First, install [http://guide.macports.org/#installing MacPorts].
  
Now simply type (from a bash terminal):
+
Now simply type (from a bash [http://guides.macrumors.com/Terminal terminal]):
 
<pre>
 
<pre>
 
sudo port install eiffelstudioXX
 
sudo port install eiffelstudioXX

Revision as of 21:27, 9 October 2012


This page gives you an overview about how to get EiffelStudio running on your Mac (Leopard, Snow Leopard, Lion or Mountain Lion).

Requirements

  • You will need to install Xcode from the App Store. (On old versions of OS X, Xcode was on your OSX-Installation disk, or you downloaded it from Apple's developer web site.)
  • Make sure that you install the development tools with Xcode. (In theory, with current versions of the development tools, you may not need to install Xcode. You could save yourself a huge amount of time by not downloading Xcode; but on the other hand, you might waste a lot of time trying to fix missing dependencies if things go wrong. Unless you're feeling adventurous, do install Xcode.)
  • On OS X 10.5 and later, you don't need to install X11. (On older versions of OS X, install it from your OS X installation disk.)

Installation

Using MacPorts

The following should work on Mac OS X 10.4 and later.

MacPorts is a 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 Eiffel Studio with all dependencies in a convenient way. First, install MacPorts.

Now simply type (from a bash terminal):

sudo port install eiffelstudioXX

where 'XX' stands for the EiffelStudio version you want to install (for example eiffelstudio71) and after some time (compiling on a 2.4 GHz Intel Mac takes about an hour) you're ready to go.

Older development packages are available under the name eiffelstudio65, etc. All packages can be installed simultaneously because they are located in different directories.

When a new release of the same version EiffelStudio becomes available, you can upgrade like so:

sudo port selfupdate
sudo port upgrade outdated

Warning.png Warning: EiffelStudio 7.1 has a bug that prevents Vision2 applications from compiling out of the box. You can work around this by editing /Applications/MacPorts/Eiffel71/library/vision2/vision2.ecf and removing line 147:

<custom name="vision_implementation" excluded_value="gtk34"/>

Warning.png Warning: gtk2 version 2_24_5_0+x11 breaks EiffelStudio 6.8 (that depends on it). A fix is to install gtk2 2_24_4_0+x11 (the previous minor version), or to deactivate the former and activate the latter if you already have both installed.

sudo port deactivate gtk2 @2_24_5_0+x11
sudo port activate gtk2 @2_24_4_0+x11

Using binary packages

Warning.png Warning: This method does not work at the moment. Please install EiffelStudio using MacPorts.
See Discussion for more information.

  1. Install the latest version of XQuartz: download
  2. Install the EiffelStudio 6.4 Mac package: download

This installer was created using MacPorts as well as using the mpkg command. For more information take a look at the MacPorts Guide

Starting EiffelStudio

Simply navigate to /Applications/MacPorts/EiffelXX and double click the EiffelStudio icon.

Alternatively, you can also start EiffelStudio from the command line by entering the command 'estudio' or use the command-line eiffel compiler 'ec'.

FAQ

I get a crash with a Permission denied: Operating system error, how do I fix it?

Delete the .ec directory in your home directory.

I get an error with precompiles, why is that ?

Precompiles did not work on the Mac before EiffelStudio 6.4 due to a limitation of the linker. To work around this issue you have to disable the precompiles with those versions or upgrade to a recent version of EiffelStudio.

Information.png Note: When you create a project, EiffelStudio will ask if you want to perform precompiles – say no. Then disable the precompiles for this project through the Project>Project menu. In the 'Groups>Precompile' section, remove all precompiles (eg., base_pre). Select the 'base_pre' precompile and click the red cross delete tool at the top of the window.


Information.png Note: Precompiling the Eiffel libraries after installing the Port is possible, there are security policies to take into account. The Port installs EiffelStudio under the system's /Application/MacPorts directory and not the user ~/Application/MacPorts. Due of this, EiffelStudio must be run as a super user and the precompiles build using the Tools > Precompile Wizard option. Alternatively, alter the base installation path when requesting to install the Port.

How can I make EiffelStudio on the Mac look nicer?

  • From macports, install the gtk2 (if not already installed) and gtk-chtheme packets. Then run gtk-chtheme and you get a nice GUI to choose your theme. Additional GTK themes can be put in /opt/local/share/themes/ (There a thousands of them on the web, for example here : http://art.gnome.org/themes/gtk2)

Typing ec or estudio on the command line doesn't work

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/Eiffel66
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 latest release of EiffelStudio isn't available yet via MacPorts

MacPorts installs a particular version of EiffelStudio by following the rules defined in a Portfile. For example, http://trac.macports.org/browser/trunk/dports/lang/eiffelstudio68/Portfile is the Portfile for EiffelStudio 6.8. Someone has to write this file and upload it, but they might not have done so yet. You could make enquiries about when it will be available, but if you want to get the latest urgently it isn't hard to write your own Portfile and run it locally. Here's how.

http://guide.macports.org/#development.local-repositories explains how to do it.

  1. Go to https://sourceforge.net/projects/eiffelstudio/files and download the relevant PorterPackage file.
  2. Run openssl to find out the checksum of the PorterPackage file. E.g., for EiffelStudio 7.1 the command is openssl rmd160 ~/Downloads/PorterPackage_88986_gpl.tar.
  3. Open /opt/local/etc/macports/sources.conf in a text editor (with super user privileges). Insert a line as explained on http://guide.macports.org, e.g., file:///Applications/MacPorts/ports
  4. Create the Portfile in a text editor, e.g., file:///Applications/MacPorts/ports/lang/eiffelstudio71/Portfile
  5. Go to the ports directory, e.g., cd /Applications/MacPorts/ports
  6. sudo portindex
  7. You should now be able to install in the usual way, e.g., sudo port install eiffelstudio71

Hints

  • 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...
  • 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 later 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.