Using Eclipse

From Inkscape Wiki
Revision as of 17:03, 31 May 2007 by Gbanaszk (talk | contribs) (Initial text, no images yet)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Eclipse is a popular development tool used primarily with Java; however, with the CDT plugin, C/C++ development can also be done. This page will help you set up Eclipse for coding, building, and debugging Inkscape.

Eclipse on Windows

Running Eclipse provides a relatively easy and familiar way to work with Inkscape code on Windows. This section will explain how to make it happen.

Note: Some of these instructions may be applicable to development on Mac or Linux. Feel free to refactor them if you are adding information for those platforms.

Initial Setup

First, if you don't have Eclipse, get it. Check out the online help if needed.

Next, you need to set up the necessary add-ons. Most important is the CDT plug-in which facilitates C/C++ development. You may also wish to add Subclipse for SVN access within Eclipse. Alternatively, many Windows users prefer to use TortoiseSVN, which works with Windows Explorer.

Finally, follow the instructions on the Win32Port page under the heading Inkscape under Windows.

Creating a Project


The next step is to get the source code ready for use in Eclipse. Check here for general instructions for working with SVN; in this section, the aim is to show how to check out the code using Subclipse.

In Eclipse, we want the SVN perspective to be open. Click Window > Open Perspective > Other. Choose SVN Repository Exploring and click ok.

-> screenshot-01.png

In the SVN Repository tab, right click and choose New > Repository Location....

-> screenshot-02.png

In the Location Url: box, paste the link and click finish. This location will now show in the SVN Repository tab. You can expand the tree to see what is on the server.

Now right click the location name (which is really just the link given above), and click Checkout.... Choose Check out as a project configured using the New Project Wizard and the revision you want (probably Head), and click Finish.

In the New Project window that appears, choose Standard Make C++ Project and click Next.

-> screenshot-03.png

Give your project a name such as InkscapeSVN. Uncheck the Use default location box so you can provide a better project location outside of your workspace, such as C:\InkscapeSVN. Click Finish. The source code will now be checked out - this may take a while. You will also now have a project in the C/C++ Perspective with whatever name you provided earlier.


To use TortoiseSVN instead of Subclipse to check out your project, open a Windows Explorer instance. Right click anywhere outside of an existing SVN tree and choose SVN Checkout.... Specify the link given above and the destination directory.

To get a project in Eclipse, go to the C/C++ Perspective. Right click in the C/C++ Projects tab, and choose New > Project... and in the window choose Standard Make C++ Project. Give the project a name, and uncheck the Use default location box. You must give the location that you checked the code out into here.

At this point, you will be able to use TortoiseSVN or Subclipse within Eclipse to control the source.