Difference between revisions of "EiffelOnMac"

(Installation using MacPorts)
(Using Homebrew)
 
(74 intermediate revisions by 7 users not shown)
Line 2: Line 2:
 
[[Category:Macintosh]]
 
[[Category:Macintosh]]
  
This page gives you an overview about how to get EiffelStudio running on your Mac.
+
This page gives you an overview about how to get EiffelStudio running on your Mac (Mavericks or above).
  
== Installation ==
+
==Requirements==
  
 
+
*'''X11 (XQuartz)''': install version 2.7.5 minimum from http://xquartz.macosforge.org.
=== Using MacPorts ===
+
*You will need to install '''Xcode''' from the App Store. After installing Xcode, make sure to install the command line tools by typing:
The officially supported versions of Mac OS X are 10.4 and 10.5.
+
 
+
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 Eiffel Studio with all dependencies in a convenient way. First, install MacPorts as described [http://trac.macosforge.org/projects/macports/wiki/InstallingMacPorts here].
+
 
+
Now simply type:
+
 
<pre>
 
<pre>
sudo port install eiffelstudio64
+
xcode-select --install
 
</pre>
 
</pre>
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.
+
This will popup a dialog asking if you want to install the command line developer tools.  
  
A fairly recent development package is available under the name eiffelstudio65. (Both packages can be installed simultaneously)
+
{{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.}}
  
== Starting EiffelStudio ==
+
{{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.}}
  
Simply navigate to /Applications/MacPorts/Eiffel<nn> and double click the EiffelStudio icon.
+
== Installation ==
  
Alternatively, you can also start EiffelStudio from the command line by entering the command 'estudio' or use the command-line eiffel compiler 'ec'.
+
=== 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 [http://guide.macports.org/#installing MacPorts].
  
== Upgrading ==
+
Now simply type (from a bash [http://guides.macrumors.com/Terminal terminal]):
 
+
When a new version of EiffelStudio is available, you can upgrade like so:
+
 
<pre>
 
<pre>
sudo port selfupdate
+
sudo port install eiffelstudio
sudo port upgrade eiffelstudio
+
 
</pre>
 
</pre>
 +
This will actually compile and install the whole EiffelStudio delivery. This takes about 15 minutes on a 2013 Mac.
  
Be prepared for another long wait while it compiles. You can do likewise for eiffelstudio-devel, of course.
+
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:
 
+
Beware that this may not get the latest release if [http://trac.macports.org/browser/trunk/dports/lang/eiffelstudio/Portfile the Port file] has not been updated yet. Even after it has been updated, it may take a week for it to propagate to MacPorts. If you can't wait, here's how to get the latest version immediately:
+
# Edit your local copy of the Portfile: '''sudo port edit eiffelstudio'''. Change '''minor_version''' and '''version'''. Save.
+
# Tell MacPorts to use the local copy of your Portfile: '''cd /opt/local/var/macports/sources/rsync.macports.org/release/ports''' (assuming this is where your ports are), then type '''portindex'''. It will print hundreds of "Adding port" messages, one of which should be lang/eiffelstudio.
+
# Find out the checksums for the new version: '''sudo port -d upgrade eiffelstudio'''.
+
# Edit your local Portfile again, substituting the checksums.
+
# Now '''sudo port upgrade eiffelstudio''' should upgrade to the version described in your local Portfile.
+
 
+
== 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:
+
 
<pre>
 
<pre>
svn co http://svn.macports.org/repository/macports/trunk/dports/
+
port info eiffelstudio
 
</pre>
 
</pre>
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:
 
<pre>
 
# To get macports from the macports rsync server use:
 
# rsync://rsync.macports.org/release/ports/
 
  
file:///Volumes/Data/SVN/macports/dports [default]
+
Once the new release is available, you can upgrade like so:
 +
<pre>
 +
sudo port selfupdate
 +
sudo port upgrade outdated
 
</pre>
 
</pre>
  
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.
+
=== Using Homebrew ===
  
Alternate instructions can be found on the [http://trac.macports.org/wiki/howto/SyncingWithSVN macports website]
+
{{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.}}
  
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.
+
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]):
  
That being said, you can create a Mac OS X installer for EiffelStudio and all dependencies by typing
 
 
<pre>
 
<pre>
sudo port mpkg eiffelstudio
+
brew update
 +
brew install eiffelstudio
 
</pre>
 
</pre>
  
You can then find the .mpkg file in /opt/local/var/macports/build/<folder name that contains the word eiffelstudio>
+
=== Using binary packages ===
  
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.
+
{{Warning|This method still requires an initial installation via MacPorts or Homebrew.}}
  
== FAQ ==
+
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.
====I get a crash with a Permission denied: Operating system error, how do I fix it?====
+
  
Delete the .ec directory in your home directory.
+
== Starting EiffelStudio installed via MacPorts ==
  
====I get a linking error with precompiles on PPC, why is that ?====
+
Simply navigate to /Applications/MacPorts/Eiffel''XX'' and double click the EiffelStudio icon.
  
Precompiles did not work on the Mac before EiffelStudio 6.4 due to a limitation of the linker. To work around this issue don't use precompiles on Macs.
+
Alternatively, you can also start EiffelStudio from the command line by entering the command 'estudio' or use the command-line eiffel compiler 'ec'.
 
+
{{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.}}
+
 
+
 
+
 
+
{{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.}}
+
  
 
==Hints==
 
==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.
 
* 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:
* To run the '''ec''' compiler from your shell, set up variables similar to these (e.g. in ~/.profile):
+
** 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>
 
<pre>
 
# Setting variables for EiffelStudio.
 
# Setting variables for EiffelStudio.
export ISE_EIFFEL=/Applications/MacPorts/Eiffel61
+
export ISE_EIFFEL=/Applications/MacPorts/Eiffel66
 
export ISE_PLATFORM=macosx-ppc (or macosx-x86)
 
export ISE_PLATFORM=macosx-ppc (or macosx-x86)
 
export ISE_PROJECTS=$HOME
 
export ISE_PROJECTS=$HOME
Line 100: Line 85:
 
export PATH=$ES_PATH:$PATH
 
export PATH=$ES_PATH:$PATH
 
</pre>
 
</pre>
* The F10 and F11 debugging shortcuts conflict with the standard Exposé keys. Here are some workarounds:
+
 
** Use the toolbar instead.
+
===The latest release of EiffelStudio isn't available yet via MacPorts===
** Reassign these shortcuts in EiffelStudio (Tools>Preferences).
+
 
** Reassign the Exposé keys in System Preferences.
+
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.
* 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.
+
 
 +
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