Skip to content

Compiling Tribler from sources under Eclipse

Helder Sepulveda edited this page Dec 12, 2017 · 8 revisions

This page will go over the steps of compiling and running Tribler from the source code using the Eclipse IDE with the PyDev IDE package added on. This guide is written for deployment on a Linux machine, setting up on other platforms should be much the same however.

Getting Tribler

First we will be acquiring all the source files needed to run Tribler. For this you will be needing Git (you can check this by writing git --version in your Terminal). Now you will have to follow the instructions in README. If you have followed the instructions correctly, executing ./tribler.sh in the Terminal should launch Tribler.

Setting up Eclipse

  1. Download and install Eclipse Classic from eclipse.org, make sure you download the version appropriate for your system (32- or 64-bit). You will need to own Java to run Eclipse.
  2. Open Eclipse and set your workspace to the Tribler top folder (the folder that contains the debian/ and Tribler/ folders).
  3. Follow the instructions on pydev.org to install PyDev for Eclipse.

##Setting up a project

  1. In Eclipse create a new "PyDev Project".
  2. Fill in an arbitrary project name.
  3. Don't use the default Project Contents location but point toward your ./Tribler/ folder.
  4. Now click the "Click here to configure an interpreter not listed." link.
  5. In the interpreter configuration click the "New..." button and add "Python2.7" and /usr/bin/python2.7 as the Interpreter Name and Executable.
  6. Click OK to close this dialog and then click the "New Folder" button.
  7. Navigate to the Tribler top folder (the folder that contains the debian/ and Tribler/ folders) and click the OK button.
  8. Click OK to close the interpreters dialog (you should be back at your create a PyDev Project wizard screen).
  9. Finally check the "Don't configure PYTHONPATH (to be done manually later on)" box and hit the "Finish" button.
  10. In the Project Browser on the left side of your screen a folder with the name you chose in step 2 should pop up.
  11. Right-click this folder and choose Run As>Run Configurations... .
  12. Double click "Python Run" in the list on the left side of the dialog, this should create a new entry with the name "New_configuration".
  13. (Single) click "New_configuration".
  14. Change the Name to "RunTribler", the Project to your name from step 2 and the Main Module to ${workspace_loc:Tribler/Main/tribler.py} .
  15. Now click the "Arguments" tab.
  16. Change your Working Directory in the "Other" entry to point to your top folder (the folder that contains the debian/ and Tribler/ folders).
  17. Press the "Run" button to save your configuration and run Tribler.