Changes between Version 18 and Version 19 of DevEnvironment


Ignore:
Timestamp:
10/30/12 15:24:40 (21 months ago)
Author:
matija
Comment:

Update to 12.10 and Eclipse indigo, remove the unnecessary copy&paste by debugging_maniac.

Legend:

Unmodified
Added
Removed
Modified
  • DevEnvironment

    v18 v19  
    77== Ubuntu & Eclipse == 
    88 
    9 This procedure has been written for and tested on Ubuntu 12.04, but should also work for newer and older (down to 10.04) releases. 
     9This procedure has been written for and tested on Ubuntu 12.10, but should also work for newer and older (down to 10.04) releases. 
    1010 
    1111=== Package Installation === 
     
    3737Open a terminal, get to the directory where you want the code to reside and clone our repository: 
    3838{{{ 
    39 hg clone https://bitbucket.org/biolab/orange . 
     39hg clone https://bitbucket.org/biolab/orange 
    4040}}} 
    4141 
    4242After a little while you'll notice you now have subdirectory `orange` containing, among other things, the following directories: 
    43  * `orange` with Orange's Python source code, 
     43 * `Orange` with Orange's Python source code, 
    4444 * `source` with Orange's C++ source code, 
    4545 * `docs` with Orange documentation. 
     
    5858You will need to provide your password, because `sudo` is used to write to a system directory. You may dissect the command to figure out what it does; it basically puts two paths in your repository clone to a file `orange.pth` in python's `dist-packages` directory. 
    5959 
    60  
    61  
    62 ================== '''FROM HERE THINGS GO DIFFERENTLY DEPENDING ON THE ECLIPSE INSTALLED:''' ====================== 
    63  
    64  
    65  
    66 ================================================'''ECLIPSE:HELIOS'''=============================================== 
    67  
    6860=== Setting Up The Eclipse IDE === 
    6961 
    7062Next, you need to run Eclipse. As the workspace, choose some directory outside your local Orange repository. Within Eclipse, install the needed plugins: CDT (C/C++ Development Tooling), PyDev (Python IDE for Eclipse) and MercurialEclipse (for Mercurial repository support). That is, choose Help->Install New Software... and add the following Update Sites: 
    71  * CDT Site: http://download.eclipse.org/tools/cdt/releases/helios 
     63 * CDT Site: http://download.eclipse.org/tools/cdt/releases/indigo 
    7264 * PyDev Site: http://pydev.org/updates/ 
    7365 * MercurialEclipse Site: http://cbes.javaforge.com/update 
     66 
     67(You should replace "indigo" with the version of eclipse you run.) 
    7468 
    7569Choose --All Available Sites-- for the "Work with" option and install the following choices: MercurialEclipse->MercurialEclipse, PyDev and CDT Main Features. 
     
    9387For debugging, it's best to set up three debug configurations: one for Python code, one for C++ code with Orange Canvas being invoked and one without Canvas to debug in python scripting environment. Choose Run->Debug Configurations and set up the following configurations. 
    9488 
    95 Add a new "Python Run" configuration, name it `orange-canvas-python` (or otherwise, if you will), select `orange` as the project and select `Orange/OrangeCanvas/orngCanvas.pyw` as the main module. Click apply. 
     89Add a new "Python Run" configuration, name it `orange-canvas-python` (or otherwise, if you will), select `orange` as the project and use `${workspace_loc:orange/Orange/OrangeCanvas/orngCanvas.pyw}` as the main module. Click apply. 
    9690 
    9791Now add a new "C/C++ Application" configuration, name it `orange-cpp`, select `source` as the project and `/usr/bin/python` as the C/C++ Application. In the Debugger tab, uncheck the "Stop on startup at `main`". You may now apply the configuration. 
    9892 
    99 Now clone the last configuration, name it `orange-canvas-cpp` and add, in the Arguments tab, enter `<path to your Orange repository>/Orange/OrangeCanvas/orngCanvas.pyw` as program arguments. 
     93Now clone the last configuration, name it `orange-canvas-cpp` and add, in the Arguments tab, enter `${project_loc:/orange/Orange/OrangeCanvas/orngCanvas.pyw}` as program arguments. 
    10094 
    10195You can now test those three configurations. Beware that without setting `-ggdb` flags (as described higher up in this document) you will not be able to debug C++ code. Note also that on the first run (and after heavy modifications of C++ code) it will take some time for your computer to build the C++ code of Orange. 
     
    10498 
    10599To build the documentation, open a terminal and go to `docs/reference` directory under your workspace. Invoke `make html` (preceded by `make clean` if you want to force a rebuild of all documentation). You should now have a `html/index.html` file with documentation index. 
    106  
    107  
    108  
    109  
    110 THAT'S IT! 
    111  
    112  
    113  
    114 ================================================'''ECLIPSE:INDIGO'''=============================================== 
    115  
    116 By default, indigo is installed in ubuntu. For that follow the steps: 
    117  
    118 Eun Eclipse. As the workspace, choose some directory outside your local Orange repository. Within Eclipse, install the needed plugins: CDT (C/C++ Development Tooling), PyDev (Python IDE for Eclipse) and MercurialEclipse (for Mercurial repository support). That is, choose Help->Install New Software... and add the following Update Sites: 
    119  
    120     CDT Site:  http://download.eclipse.org/tools/cdt/releases/indigo 
    121     PyDev Site:  http://pydev.org/updates/ 
    122     MercurialEclipse Site:  http://cbes.javaforge.com/update  
    123  
    124 Choose –All Available Sites– for the "Work with" option and install the following choices: MercurialEclipse->MercurialEclipse, PyDev and CDT Main Features. 
    125  
    126 Now let's set up the projects in Eclipse. We'll set up two projects: orange for Python code and source for C++ code. 
    127  
    128  
    129 1. Open the New Project dialog once , select Pydev->Pydev Project and name the project orange. Change the project location to the location of your repository (which contains the Orange directory). Use the "Add project directory to PYTHONPATH" option, and in no case the "Create 'src' folder and add it to PYTHONPATH". Configure the interpreter if Eclipse requests so; you may use the Auto Config button with default settings. Select source as a referenced project. 
    130  
    131  
    132 2. Open the New Project dialog, select C/C++->Makefile Project with Existing Code->Mark C++ ,Unmark C-> Use source as project name, untick the "Use default location" checkbox and choose the source directory in your local Orange repository. Disregard the warning about project directory already existing. 
    133  
    134 Under project-> properties -> C/C++ Build->Environment, add the following environmental variables: 
    135  
    136 Click Add 
    137 Name:    CXXFLAGS 
    138 Value: -ggdb 
    139  
    140 Press OK 
    141  
    142 Click Add 
    143 Name:  LDFLAGS 
    144 Value: -ggdb 
    145  
    146 Press OK    
    147   
    148 Apply & OK. 
    149  
    150  
    151 Enabling Running and Debugging 
    152  
    153 For debugging, it's best to set up three debug configurations: one for Python code, one for C++ code with Orange Canvas being invoked and one without Canvas to debug in python scripting environment. Choose Run->Debug Configurations and set up the following configurations. 
    154  
    155 Add a new "Python Run" configuration, name it orange-canvas-python, select orange as the project and select Orange/OrangeCanvas/orngCanvas.pyw as the main module. Click apply. 
    156  
    157 Now add a new "C/C++ Application" configuration, name it orange-cpp, select source as the project and /usr/bin/python as the C/C++ Application. In the Debugger tab, uncheck the "Stop on startup at main". You may now apply the configuration. 
    158  
    159 Now clone the last configuration, name it orange-canvas-cpp and add, in the Arguments tab, enter <path to your Orange repository>/Orange/OrangeCanvas/orngCanvas.pyw as program arguments. 
    160 In Package explorer, Right click on "source"->Run as-> Run Configurations->C/C++ Application->orange-canvas-cpp  
    161  
    162  
    163 THAT's IT.. YOU ARE DONE