Difference between revisions of "EiffelOnMac"

(Intel)
(Using Homebrew)
 
(125 intermediate revisions by 13 users not shown)
Line 1: Line 1:
 
[[Category:EiffelStudio]]
 
[[Category:EiffelStudio]]
 +
[[Category:Macintosh]]
 +
 +
This page gives you an overview about how to get EiffelStudio running on your Mac (Mavericks or above).
  
 
==Requirements==
 
==Requirements==
*'''Install X11, X11SDK and XCode''' from your OSX-Installation disk
 
*'''Download''' [http://svn.macosforge.org/repository/macports/downloads/DarwinPorts-1.3.2/DarwinPorts-1.3.2.tar.bz2 DarwinPorts-1.3.2.tar.bz2] from macports.org
 
**open a terminal (Programs->Utilities->Terminal) and type:
 
<pre>
 
cd your_download_directory
 
tar xjvf DarwinPorts-1.3.2.tar.bz2
 
cd DarwinPorts-1.3.2
 
./configure && make && sudo make install
 
export PATH=/opt/local/bin:$PATH
 
</pre>
 
  
*'''Install GTK2''' from macports by typing:  
+
*'''X11 (XQuartz)''': install version 2.7.5 minimum from http://xquartz.macosforge.org.
 +
*You will need to install '''Xcode''' from the App Store. After installing Xcode, make sure to install the command line tools by typing:
 
<pre>
 
<pre>
sudo port install gtk2
+
xcode-select --install
 
</pre>
 
</pre>
 +
This will popup a dialog asking if you want to install the command line developer tools.
  
== Getting EiffelStudio ==
+
{{Note|If you have an OS older than 10.10 (e.g. 10.9.5) you might have a problem installing Xcode from the App Store. You can then go to https://developer.apple.com/downloads/ (Apple ID needed). Remember to install the command line tools.}}
===PPC===
+
If you use a Mac, that '''does not have an Intel Processor''', you can download EiffelStudio here:
+
*[http://se.inf.ethz.ch/builds/es/EiffelStudio57-ppc.zip EiffelStudio57.app] (19.10.2006 - Revision 64380)
+
----
+
*or maybe you just want the [http://n.ethz.ch/student/roederja/download/Eiffel57_gpl_64380-macosx-ppc.tar.7z Eiffel57] folder (19.10.2006 - Revision 64380)
+
** Note: This file is compressed using [http://www.7-zip.org 7-zip]. 7z compresses the Eiffel57 distribution 15 MB smaller than bzip2. To uncompress it either get the p7zip package from macports and use this command: <pre>7za x -so Eiffel57_gpl_64380-macosx-ppc.tar.7z | tar xfv - </pre>
+
  
===Intel===
+
{{Note| Advanced users may not need to install Xcode as long as you install the '''development tools'''. Even though you save in download time, you might waste  a lot of time trying to fix missing dependencies. In other words, unless you are feeling adventurous, do install Xcode.}}
If yor use a Mac that '''has an Intel processor''', you can download EiffelStudio here:
+
[http://se.inf.ethz.ch/builds/es/EiffelStudio57-intel.zip EiffelStudio57.app]
+
----
+
  
* '''MacOS X - Intel''' (25.10.2006 - Revision 64493) :
+
== Installation ==
** Compiled Archive with darwinports (the archive is compiled using darwin ports - so you SHOULD have installed the latest version of darwin ports): [http://se.inf.ethz.ch/~moriol/www/EiffelStudioMacOSXIntel/Eiffel57_gpl_macosx-intel-DarwinPorts_64493.tar.gz Eiffel57_gpl_macosx-intel-DarwinPorts_64493.tar.gz]
+
** Compiled Archive with macports (the archive is compiled using mac ports - so you SHOULD have installed the latest version of mac ports): [http://se.inf.ethz.ch/~moriol/www/EiffelStudioMacOSXIntel/Eiffel57_gpl_macosx-intel-MacPorts_64493.tar.gz Eiffel57_gpl_macosx-intel-MacPorts_64493.tar.gz]
+
  
===Compiling Eiffel Studio using the Porter Package===
+
=== Using MacPorts ===
If you want to compile your own EiffelStudio, instead of using the packages, make sure, you have the environment variables set and the necessary software installed, as indicated below:
+
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].
  
====Environment====
+
Now simply type (from a bash [http://guides.macrumors.com/Terminal terminal]):
Eiffel Studio needs several environment variables in order to work properly. I suggest you put them into your .bashrc and .profile file in your home directory. (on my system .bashrc is a symlink to .profile)
+
<pre>
 +
sudo port install eiffelstudio
 +
</pre>
 +
This will actually compile and install the whole EiffelStudio delivery. This takes about 15 minutes on a 2013 Mac.
  
You need to define the following variables:
+
When a new release of EiffelStudio becomes available, it may take some weeks before it's available from MacPorts. You can check by running this command:
 +
<pre>
 +
port info eiffelstudio
 +
</pre>
  
 +
Once the new release is available, you can upgrade like so:
 
<pre>
 
<pre>
 +
sudo port selfupdate
 +
sudo port upgrade outdated
 +
</pre>
  
# for Macports
+
=== Using Homebrew ===
export PATH=/opt/local/bin:$PATH
+
export MANPATH=$MANPATH:/opt/local/share/man
+
export INFOPATH=$INFOPATH:INFOPATH:/opt/local/share/info
+
  
# For EiffelStudio
+
{{Warning|As of 2015, the graphical version of EiffelStudio won't work in Homebrew due to a bug in the GTK package included in Homebrew. However all the command line tools will work.}}
export ISE_PLATFORM=macosx-ppc # macosx-x86 on intel
+
export ISE_EIFFEL=<PATH TO YOUR Eiffel57 directory e.g. /Developer/Applications/Eiffel57>
+
  
export PATH=$PATH:$ISE_EIFFEL/studio/spec/$ISE_PLATFORM/bin:$GOBO/bin
+
A light-weight alternative to installing MacPorts is [https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Installation.md#installation Homebrew].
 +
Once Homebrew is installed type the following commands to install EiffelStudio (from a bash [http://guides.macrumors.com/Terminal terminal]):
  
# Optional
+
<pre>
export GOBO=$ISE_EIFFEL/library/gobo # Only needed if you want to use gobo
+
brew update
export EIFFEL_SRC=<PATH TO YOUR EIFFEL SVN CHECKOUT, only needed if you want to compile ES yourself>
+
brew install eiffelstudio
export ISE_LIBRARY=$ISE_EIFFEL # If this is not defined it defaults to ISE_EIFFEL
+
 
</pre>
 
</pre>
  
====Software Requirements====
+
=== Using binary packages ===
As above you need:
+
* X11, X11SDK, XCode. Install them from your Install Disk that came with your Mac. (You can get the latest [http://developer.apple.com/tools/ Xcode] and [http://www.apple.com/downloads/macosx/apple/x11formacosx.html X11] on the web.)
+
* [http://www.macports.org MacPorts] previously known as [http://darwinports.opendarwin.org/ Darwin Ports]
+
* GTK2 from MacPorts: Do a "sudo port install gtk2" , this will install gtk2 and all required dependencies
+
  
====Note====
+
{{Warning|This method still requires an initial installation via MacPorts or Homebrew.}}
NOTE: Since the C code generated by Eiffel Studio might not work properly if compiled with gcc 4, you might want to switch to GCC 3 by doing a "sudo gcc_select 3.3". However I've never encountered this problem with GCC4.
+
  
====Installation====
+
Download the latest .tar.bz2 package from the Eiffel Software site that matches MacPorts or Homebrew. Then follow the same [https://docs.eiffel.com/book/eiffelstudio/eiffelstudio-linux instructions as the Linux version] to setup the environment variables needed to run EiffelStudio. Keep the ISE_PLATFORM value to macosx-x86-64.
# Make sure that you have all requirements that are listed above and that you have set the ISE_PLATFORM environment variable to macosx-ppc or macosx-x86 depending on your platform.
+
# Download the latest Porter Package from [http://eiffelsoftware.origo.ethz.ch/downloads/builds/ here] (PorterPackage_57_XXXXX.tar)
+
# Extract the PorterPackage, double-clicking should work
+
# Open a Terminal window and cd into the PorterPackage directory
+
# Compile the Porter Package:<pre>./compile_exes $ISE_PLATFORM</pre> This will compile the complete EiffelStudio Package. This takes 1-2 hours depending on your machine.
+
# '''IMPORTANT''' : The installation now resides in PorterPackage/Eiffel57. In order to make it work you have to set execution permissions on the ec executable. <pre>chmod a+x Eiffel57/studio/spec/$ISE_PLATFORM/bin/ec</pre>
+
# Now you can move the Eiffel57 directory to any place you want. Just make sure to set the ISE_EIFFEL evironment variable accordingly.
+
# If you want the gobo tools you can compile them using this script, which will place them in the correct directory and clean up: [http://n.ethz.ch/student/roederja/download/gobo-script.sh gobo-script.sh]
+
  
====Running Eiffel Studio====
+
== Starting EiffelStudio installed via MacPorts ==
Enter "estudio" in a X-Term window. Make sure that your macports installation is the '''first''' item in your PATH environment variable.
+
 
 +
Simply navigate to /Applications/MacPorts/Eiffel''XX'' 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'.
  
 
==Hints==
 
==Hints==
* Use Helvetica 12 as Editor font
+
* Pick and Drop works with Apple-key + mouse click.
* 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...
 
* To set up the correct (default) browsers use "open" as your command-line browser in Tools>Preferences...
[[Image:preferences_open_mac.jpg]]
+
* 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.
 +
 
 +
== FAQ ==
 +
=== 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 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):
 +
<pre>
 +
# 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
 +
</pre>
 +
 
 +
===The latest release of EiffelStudio isn't available yet via MacPorts===
 +
 
 +
If you want to upgrade to the latest release of EiffelStudio, but it isn't available yet via MacPorts, the easiest and quickest thing is to install from binary packages as noted above. Nonetheless, if you really want to install it via MacPorts, here's how.
 +
 
 +
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/eiffelstudio71/Portfile is the Portfile for EiffelStudio 7.1. The person who maintains EiffelStudio for MacPorts 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.
 +
# Go to https://sourceforge.net/projects/eiffelstudio/files and download the relevant PorterPackage file.
 +
# Run '''openssl''' to find out the '''checksum''' of the PorterPackage file. E.g., for EiffelStudio 7.2 the command is '''openssl rmd160 ~/Downloads/PorterPackage_72_91284_gpl.tar'''.
 +
# 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
 +
# Create the Portfile in a text editor, e.g., file:///Applications/MacPorts/ports/lang/eiffelstudio72/Portfile
 +
#* Copy the contents of the most recently available EiffelStudio Portfile (e.g., from http://trac.macports.org/browser/trunk/dports/lang/eiffelstudio71/Portfile) into your Portfile.
 +
#* Correct the '''name''', '''minor_version''' and '''version'''.
 +
#* Make sure that the '''distname''' will resolve to the current PorterPackage file name that you see on https://sourceforge.net/projects/eiffelstudio/files
 +
#* Set the first '''checksums''' to the value that you got earlier from running openssl.
 +
#* You've finished writing your Portfile. Save it!
 +
# Go to the ports directory, e.g., cd /Applications/MacPorts/ports
 +
# sudo portindex
 +
# You should now be able to install in the usual way, e.g., sudo port install eiffelstudio72

Latest revision as of 21:03, 13 May 2016


This page gives you an overview about how to get EiffelStudio running on your Mac (Mavericks or above).

Requirements

  • X11 (XQuartz): install version 2.7.5 minimum from http://xquartz.macosforge.org.
  • You will need to install Xcode from the App Store. After installing Xcode, make sure to install the command line tools by typing:
xcode-select --install

This will popup a dialog asking if you want to install the command line developer tools.

Information.png Note: If you have an OS older than 10.10 (e.g. 10.9.5) you might have a problem installing Xcode from the App Store. You can then go to https://developer.apple.com/downloads/ (Apple ID needed). Remember to install the command line tools.

Information.png Note: Advanced users may not need to install Xcode as long as you install the development tools. Even though you save in download time, you might waste a lot of time trying to fix missing dependencies. In other words, unless you are feeling adventurous, do install Xcode.

Installation

Using 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 MacPorts.

Now simply type (from a bash terminal):

sudo port install eiffelstudio

This will actually compile and install the whole EiffelStudio delivery. This takes about 15 minutes on a 2013 Mac.

When a new release of EiffelStudio becomes available, it may take some weeks before it's available from MacPorts. You can check by running this command:

port info eiffelstudio

Once the new release is available, you can upgrade like so:

sudo port selfupdate
sudo port upgrade outdated

Using Homebrew

Warning.png Warning: As of 2015, the graphical version of EiffelStudio won't work in Homebrew due to a bug in the GTK package included in Homebrew. However all the command line tools will work.

A light-weight alternative to installing MacPorts is Homebrew. Once Homebrew is installed type the following commands to install EiffelStudio (from a bash terminal):

brew update
brew install eiffelstudio

Using binary packages

Warning.png Warning: This method still requires an initial installation via MacPorts or Homebrew.

Download the latest .tar.bz2 package from the Eiffel Software site that matches MacPorts or Homebrew. Then follow the same instructions as the Linux version to setup the environment variables needed to run EiffelStudio. Keep the ISE_PLATFORM value to macosx-x86-64.

Starting EiffelStudio installed via MacPorts

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'.

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.

FAQ

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

If you want to upgrade to the latest release of EiffelStudio, but it isn't available yet via MacPorts, the easiest and quickest thing is to install from binary packages as noted above. Nonetheless, if you really want to install it via MacPorts, here's how.

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/eiffelstudio71/Portfile is the Portfile for EiffelStudio 7.1. The person who maintains EiffelStudio for MacPorts 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.2 the command is openssl rmd160 ~/Downloads/PorterPackage_72_91284_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/eiffelstudio72/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 eiffelstudio72