Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Sphinx/environment"

(Setting the target platform)
 
(34 intermediate revisions by 6 users not shown)
Line 1: Line 1:
This page aims at providing a procedure to get Sphinx sources and settle a development environment.
+
This page explains how to setup an environment required for developing Sphinx. It consists of a minimal Eclipse IDE, an appropriate target platform and the source code of Sphinx.
  
==Setting the Eclipse environment==
+
==Recommended: Automated setup==
Before getting Sphinx, the first step consists in setting the required Eclipse environment. The principle consists in using a minimal environment for the edition, and an adapted target platform to compile and run Sphinx.
+
# Download and start [https://wiki.eclipse.org/Eclipse_Installer Eclipse Installer (Oomph)].
 +
# Download the installer configuration for Sphinx [http://git.eclipse.org/c/sphinx/org.eclipse.sphinx.git/tree/tools/org.eclipse.sphinx.oomph/Sphinx.setup Sphinx.setup].
 +
# On the initial page, click on the Switch to advanced mode button in the top right.
 +
# On the Product page, select '''Eclipse Modeling Tools'''.
 +
# Drag and Drop the '''Sphinx.setup''' file into the Projects Page.
 +
# On the Projects page, double-click <user>/Sphinx.
 +
# Choose your preferred installation settings on the Variables page.
 +
# Finish the wizard, drink a cup of coffee, and watch how your Sphinx development environment is assembled.
  
===Install Eclipse===
+
The Sphinx.setup will provide:
No comments.
+
* The Eclipse IDE
 +
* Source Code
 +
* Configuration of Mylyn Queries (Tasks and Build)
 +
* Working Sets
 +
* Initial Target configuration (which should be refined later)
  
===Install a Subversion client===
+
==Alternative: Manual setup==
We recommend the use of Subversive. Subversive may be installed from the following update sites:
+
If you don't like the magic of the Eclipse Installer, you can set up the Eclipse IDE and get the source code manually:
* http://download.eclipse.org/technology/subversive/0.7/update-site/
+
===Setting up an Eclipse IDE===
* http://www.polarion.org/projects/subversive/download/eclipse/2.0/update-site/
+
  
Install the following feature groups:
+
[http://eclipse.org/downloads Download] and [http://wiki.eclipse.org/Eclipse/Installation install] the latest '''Eclipse Modeling Tools''' package.
* Subversive SVN Team Provider Plugin (Incubation)
+
* Subversive SVN Connectors
+
  
==SVN checkout==
+
===Getting the source code===
===SVN repository configuration===
+
Create a new SVN repository with the following attributes:
+
* URL: https://dev.eclipse.org/svnroot/modeling/org.eclipse.mdt.sphinx (caution: https, not http)
+
* User: ''<empty>''
+
* Password: ''<empty>''
+
  
===Import the project set===
+
====Git repository access====
Sphinx provides a project set that lists all the Sphinx plug-ins/projects.
+
* Browse the SVN repository
+
* Check-out the project ''trunk/tools/org.eclipse.sphinx.psf''
+
  
===Import the sources===
+
The source code of Sphinx is managed in a [http://git-scm.com Git] repository that can be accessed in one of the following ways:
Once the project set is downloaded, it is easy to check-out the whole Sphinx project sources.
+
* Browse the org.eclipse.sphinx.psf project in your workspace
+
* Right-click on file all-subversive.psf
+
* Click on ''Import Project Set...''
+
  
All the projects of Sphinx are then checked out in your workspace. They are automatically organized into several working sets.
+
Read-only access:
 +
* URL: git://git.eclipse.org/gitroot/sphinx/org.eclipse.sphinx.git
 +
* User name: ''<leave empty>''
 +
* Password: ''<leave empty>''
 +
 
 +
TODO list other access options
 +
 
 +
====Cloning and importing the source code with EGit====
 +
 
 +
The recommended way to clone and import the source code of Sphinx is to use [http://eclipse.org/egit EGit] - the Eclipse Team provider for Git:
 +
* Open the ''Git Repository Exploring'' perspective
 +
* Click on the ''Clone a Git Repository and add the clone to this view'' button
 +
* Enter the Git repository access data using one of the options indicated above, and then click on ''Next''
 +
* Select the relevant Git repository branches (e.g. ''master''), and then click on ''Next''
 +
* Make sure that ''Import all existing projects after clone finishes'' is checked and then click on ''Finish''
 +
* Wait until the cloning process has been completed and go back to the ''Plug-in Development'' perspective
  
 
==Setting the target platform==
 
==Setting the target platform==
Sphinx provides target platform definition for the two last versions of Sphinx. These target definitions are in project ''org.eclipse.sphinx.targetdefs'', in working set ''Tools''.
 
  
These target definitions suppose that a directory containing the target platform exists in the local file system.
+
Sphinx provides target platform definitions for the two latest Eclipse releases. These target definitions are in the project ''org.eclipse.sphinx.targetdefs'' which is part of the ''Tools'' working set.
Our issue consists now in the recreation of this directory.
+
* Open the target definition file ''xxx.target'' that corresponds to the Eclipse release you want to work with;
 +
* Wait for the completion of the ''Resolving Target Definition'' operation. This may take a while, in particular at the first time, because all directly and indirectly required target platform plug-ins and features are being downloaded or updated as necessary during that operation. If errors occur, try to close and reopen the target definition file so as to re-trigger the target platform resolution;
 +
* Click on link ''Set as Target Platform'' (in the upper right corner of the target editor).
 +
 
 +
==Creating an EMF example library model==
 +
The example project that is provided with Sphinx makes use of the library model coming from EMF. Thus, we have to get it to be able to compile everything.
  
The current solution is inherited from Artop. A discussion is opened to find a better solution to provide the Sphinx target platform (cf. https://bugs.eclipse.org/bugs/show_bug.cgi?id=340589)
+
===Installing EMF SDK===
 +
First, we have to install EMF SDK in the Eclipse environment.
 +
* Open menu ''Help/Install New Software...'';
 +
* Select work with ''Juno'';
 +
* Install ''EMF - Eclipse Modeling Framework SDK'' in ''Modeling'' category.
  
For the moment, we propose the following procedure (only for Eclipse 3.6).
+
===Creating the library model projects===
 +
* Open menu ''File/New/Example...'';
 +
* Select ''Eclipse Modeling Framework/Extended Library Model Example'';
 +
* Finish the creation and wait until the workspace has been rebuilt.
  
===Getting the target platform===
+
==Building Shinx==
* Download this file: [[Media:3.6 by sites.zip|3.6_by_sites.zip]];
+
* Unzip its content in project ''org.eclipse.sphinx.targetdefs'';
+
* Open the file ''3.6_by_sites.target'';
+
* Wait for the completion of the ''Resolving Target Definition'' task;
+
* Click on link ''Set as Target Platform'' (upper right corner of the target editor).
+
  
===Optimizing the target platform===
+
<pre>
The previous solution works but has drawbacks. For each workspace it downloads in cache a new full target platform.
+
cd releng/org.eclipse.sphinx.releng.builds
The solution consists in recreating a local target platform, as initially intended.
+
mvn clean install
* Create a directory in your local file system;
+
</pre>
* Create an environment variable called ''SPHINX_TARGETS'' that refers to this directory;
+
* Create a subdirectory ''target-3.6'';
+
* Copy the content of ''<workspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool'' in ''target-3.6'';
+
* Open preferences by clicking on menu ''Window/Preferences'' and select ''Plug-in Development/Target Platform'';
+
* Click on ''Add...'' to create a new target platform definition;
+
* Start with ''Nothing'', that is an empty target definition and click ''Next >'';
+
* Give a name: ''Sphinx Eclipse 3.6 local'';
+
* Select the ''Locations'' tab and click ''Add...'';
+
* Select ''Directory'' and click ''Next >'';
+
* Provide the location: ''${env_var:SPHINX_TARGETS}/target-3.6'' and click ''Finish'';
+
* Click ''Finish'' to end the definition of the target;
+
* Select the new target definition and click ''Share...''
+
* Enter the parent folder ''org.eclipse.sphinx.targetdefs'' and the file name ''3.6_local'';
+
* Check the box in front of the target definition and click ''OK''.
+
Remark: The use of an environment variable is not mandatory. It is just cleaner for future management of target platforms.
+

Latest revision as of 02:44, 18 May 2022

This page explains how to setup an environment required for developing Sphinx. It consists of a minimal Eclipse IDE, an appropriate target platform and the source code of Sphinx.

Recommended: Automated setup

  1. Download and start Eclipse Installer (Oomph).
  2. Download the installer configuration for Sphinx Sphinx.setup.
  3. On the initial page, click on the Switch to advanced mode button in the top right.
  4. On the Product page, select Eclipse Modeling Tools.
  5. Drag and Drop the Sphinx.setup file into the Projects Page.
  6. On the Projects page, double-click <user>/Sphinx.
  7. Choose your preferred installation settings on the Variables page.
  8. Finish the wizard, drink a cup of coffee, and watch how your Sphinx development environment is assembled.

The Sphinx.setup will provide:

  • The Eclipse IDE
  • Source Code
  • Configuration of Mylyn Queries (Tasks and Build)
  • Working Sets
  • Initial Target configuration (which should be refined later)

Alternative: Manual setup

If you don't like the magic of the Eclipse Installer, you can set up the Eclipse IDE and get the source code manually:

Setting up an Eclipse IDE

Download and install the latest Eclipse Modeling Tools package.

Getting the source code

Git repository access

The source code of Sphinx is managed in a Git repository that can be accessed in one of the following ways:

Read-only access:

TODO list other access options

Cloning and importing the source code with EGit

The recommended way to clone and import the source code of Sphinx is to use EGit - the Eclipse Team provider for Git:

  • Open the Git Repository Exploring perspective
  • Click on the Clone a Git Repository and add the clone to this view button
  • Enter the Git repository access data using one of the options indicated above, and then click on Next
  • Select the relevant Git repository branches (e.g. master), and then click on Next
  • Make sure that Import all existing projects after clone finishes is checked and then click on Finish
  • Wait until the cloning process has been completed and go back to the Plug-in Development perspective

Setting the target platform

Sphinx provides target platform definitions for the two latest Eclipse releases. These target definitions are in the project org.eclipse.sphinx.targetdefs which is part of the Tools working set.

  • Open the target definition file xxx.target that corresponds to the Eclipse release you want to work with;
  • Wait for the completion of the Resolving Target Definition operation. This may take a while, in particular at the first time, because all directly and indirectly required target platform plug-ins and features are being downloaded or updated as necessary during that operation. If errors occur, try to close and reopen the target definition file so as to re-trigger the target platform resolution;
  • Click on link Set as Target Platform (in the upper right corner of the target editor).

Creating an EMF example library model

The example project that is provided with Sphinx makes use of the library model coming from EMF. Thus, we have to get it to be able to compile everything.

Installing EMF SDK

First, we have to install EMF SDK in the Eclipse environment.

  • Open menu Help/Install New Software...;
  • Select work with Juno;
  • Install EMF - Eclipse Modeling Framework SDK in Modeling category.

Creating the library model projects

  • Open menu File/New/Example...;
  • Select Eclipse Modeling Framework/Extended Library Model Example;
  • Finish the creation and wait until the workspace has been rebuilt.

Building Shinx

cd releng/org.eclipse.sphinx.releng.builds
mvn clean install

Back to the top