Using Eclipse / Mojave

From Einstein Toolkit Documentation
Revision as of 18:40, 22 February 2011 by Sbrandt (talk | contribs)
Jump to: navigation, search

Installing Eclipse

  • Go to http://www.eclipse.org/downloads/, select the Eclipse IDE for C/C++ developers. Select the relevant operating system and download, then untar / unzip. That is all there is the installation.
  • To run eclipse, simply start the binary. Eclipse typically requires a "workspace" to manage its projects. It will prompt you for the creation of this directory when you first start the program.

Installing Mojave

  • Click on Help > Install New Software ...
  • Click on the Add tab, a dialogue will appear
  • In the dialogue, put "Mojave" for the name, and "http://stevenrbrandt.com/Mojave-Update/" for the location.
  • The dialogue below will create a checkbox next to Mojave. Click next to continue the install.
  • Please make sure that your system also has perl, python, git, and subversion installed as well.
  • If you wish to build locally, you will also need gcc, g++, gfortran (or equivalent compilers), and make.

Installing Photran

  • Click on Help > Install New Software ...
  • Click on the Add tab, a dialogue will appear
  • In the dialogue, put "PTP" for the name, and "http://download.eclipse.org/tools/ptp/updates/helios" for the location.
  • Type the word "Photran" in the filter text box.
  • Select all checkboxes, and click next to continue the install.

Creating a Mojave Project in Eclipse

To use Mojave you first need to create a Cactus project. These projects can either come from the web, or you can use an existing installation on disk.

To install from the web

Installing from the web creates a completely new Cactus installation within the Eclipse workspace.

  • Click File > Project > New Mojave Project
  • Select the radio button for installing from the web
  • On the next page of the wizard, fill in your email address (for configuration of SimFactory), a project name, and the location of a thornlist. By default, einsteintoolkit.th will be loaded. This is a big project and will take time to download.

width=300

To use an existing install

This install creates links from within the Eclipse workspace to another location. It will not overwrite any files. Deleting an installation (even if you check delete project contents) of this type will leave all linked directories unharmed.

  • Click File > Project > New Mojave Project
  • Select the radio button for using an existing install
  • On the wizard, select an Eclipse project name and browse to the existing install.
  • Note that Mojave expects the Python version of SimFactory.

Building with Mojave

  • Right click on your project name in the package explorer and select properties. Select Mojave. This dialogue will allow you to configure your thornlist, par file, which host you want to compile on, and what options you want.
  • Every time you modify a source file, it becomes possible to build.
  • Building is triggered from Projects > Build Project.
  • When building, errors and warnings generated by the compiler will appear in the "Console" window. These messages will be hyperlinked to the source code, enabling you to quickly navigate.
  • Note: The cancel button does not always stop a compile instantly. It sends a kill, closes streams, then reclaims outstanding characters in the input buffer.