OF eclipse 4 debian/ubuntu

Hi all

I’ve made an OF distribution for eclipse under debian/ubuntu, it downloads the last version from svn and creates an eclipse workspace from that. You can download it from:

OFEclipse

Here’re some instructions

Creating workspace

Execute createWorkspace.sh from the scripts directory by double clicking it an executing from a console, as it will ask for password. It will install svn if it isn’t, download openFrameworks, addons and examples and convert them to an eclipse workspace.

Every directory will be created at the same level were you uncompressed the OF package. The directory structure is very similar to that used for code::blocks.

Installing eclipse

Download and uncompress Eclipse-IDE-for-C/C+±Developers

To be able to run your apps from eclipse you can copy the file eclipse.sh from scripts to your eclipse directory, edit it, an change the variable OF_HOME to the directory of_preRelease_v0.05_eclipse_svn that has been created when you uncompressed OF. Note that you have to write the path next to the = without spaces.

Opening OF workspace

Execute eclipse from the eclipse.sh script you just copied to your install, and select the new workspace directory (of_preRelease_v0.05_eclipse_svn/workspace) from eclipse.

The workspace is divided in three working sets:

  • ofExamples, with the main OF examples and openFrameworks code
  • ofAddons, with the addons examples, the addons code and openFrameworks.
  • myApps where you have a empty template project that can be copied to create a new project.

You can change them from the arrow above the project explorer at the left of the window. When you create a new project remember to include it in the myApps working set from the same menu in the arrow above.

You’ll have to refresh the projects before you can use them as eclipse saves a kind of index of the workspace projects, and any modification done outside eclipse, ends with resources out of sync.

Also build first openFrameworks an ofAddons first as the examples depens on them.

Upating openframeworks

If you run again the script at any time, it’ll update your OF install, and eclipse projects in directories whose name end with Example, so if you don’t want your project settings (libraries, included directories…) to be modified, just create it with a name different to *Example. Don’t really like very much this, if anyone has other ideas…

You can edit the install script to use a different version, just uncomment only one of the exports at the begining of the file:

export RELEASE=tags/005 # last stable release
#export RELEASE=trunk # last changes
#export RELEASE=branches/??? # other versions

and execute it again so your current version get updated. It’s posible that if you try to use trunk the projects won’t work, if that happens uncomment the latest stable version and execute the script again.

enjoy it

arturo

Arturo,

This is sweet! The script ran flawlessly and created my workspace. I made a few changes to the eclipse.sh file to use absolute paths and left it where it was instead of copying it to my eclipse install directory.

I actually haven’t successfully compiled any of the examples yet. I got an error in the linker about -lopenFrameworks when I tried it last night, then I went to bed. I can’t remember the error now and I’m not asking for help on it (I’ll see if I can figure it out tonight), but I really just wanted to leave the note to say thanks. Once I get it working, this will solve a lot of the issues I had come across when configuring Eclipse for OF.

I like, for example, how each of the examples is it’s own project. My solution was to have one OF project and one “working” bin directory, then creating new make targets for each project. Using the makefile was less work than adding the includes manually, but having to deal with all the make targets and one binary folder was a bit of a drag.

Anyway, I’ll have more feedback as I continue to test drive your solution.

-Brian

Hi

glad it helps, about the linker error, every example has dependencies with the openframeworks project, and the addons examples with the ofAddons project, so you have to compile them first, in order to run the rest.

Ah, cool. I compiled openFrameworks and ofAddons and now things work well. Thanks again for putting this together.

Cheers,
Brian

[quote author=“arturo”]Hi

glad it helps, about the linker error, every example has dependencies with the openframeworks project, and the addons examples with the ofAddons project, so you have to compile them first, in order to run the rest.[/quote]

I had to copy manually the export/wsMetadata to workspace/.metadata for eclipse to recognize the projects, and then refresh each one of the proyects with F5 to avoid the out of sync message.

Now it is working fine. I think im leaving netBeans and adopting Eclipse.

Hi, I’m having problems with the createWorkspace.sh…
It install svn but it asks me to identify for the addons directory on the svn…
Where can I find those login and pass ?

The problem is the addons structure in the svn has changed, I think I have a modified version that works with the new structure, I’ll take a look and post if i find it.

ok, cool if you find it !