"ofProject add" throws AttributeError:

Hi there,

using ubuntu jaunty and ofProject gives me the following:

  
ofProject add Draggables ofxMSAInteractiveObject   
/usr/lib/python2.6/sets.py:85: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument  
  stacklevel=2)  
/var/lib/python-support/python2.6/amara/bindery.py:4: DeprecationWarning: the sets module is deprecated  
  import sets  
Traceback (most recent call last):  
  File "/usr/local/bin/ofProject", line 48, in <module>  
    projectManager.addAddon(sys.argv[3])  
  File "/usr/local/bin/ofProject", line 34, in addAddon  
    self.project.addAddon(addon)  
  File "/usr/local/ofProjectManager/ofProject.py", line 86, in addAddon  
    for include in addon.includePaths:  
  File "/usr/local/ofProjectManager/ofxDescriptor.py", line 12, in <lambda>  
    fget = lambda self: self.doc.install.add.include.path  
AttributeError: 'include' object has no attribute 'path'  
  

To me, it looks like this might be a problem with python2.6.
How could this be fixed?

thanks a lot.

Richard

hey richard

i’m testing on jaunty, and i have this warnings that weren’t there before but the script works. i think it has something to do with the install.xml in MSAinteractiveobject having some error.

can you post it?

It’s not mine, but I guess as it’s freely available here:
http://addons.openframeworks.cc/projects/show/ofxmsainteractive

  
<install>  
  
	  
  
	<version>1.01</version>  
  
	<author>memo akten</author>  
  
	<url>www.memo.tv</url>  
  
	<requires></requires>  
  
	  
  
	<add>	  
  
		<!-- 	=====================================================================	-->  
  
		<!--	========================== add for the "installation" of OF =========	-->  
  
		<!-- 	=====================================================================	-->  
  
	  
  
		<addons_h>  
  
		#ifdef OF_ADDON_USING_OFXMSAINTERACTIVEOBJECT  
  
			#include "ofxMSAInteractiveObject.h"  
  
		#endif  
  
		</addons_h>  
  
		  
  
		<!-- 	=====================================================================	-->  
  
		<!--	========================== add per project using this addon =========	-->  
  
		<!-- 	=====================================================================	-->  
  
	  
  
		<src>  
  
		</src>  
  
		  
  
		<include>  
  
		</include>  
  
		  
  
	</add>  
  
	   
  
</install>  
  
  
  
  
  
  
  
  
  

ok, yes the problem is the install.xml file doesn’t have any info. substitute the contents with this:

  
<install>  
  
	  
  
	<version>1.01</version>  
  
	<author>memo akten</author>  
  
	<url>www.memo.tv</url>  
  
	<requires></requires>  
  
	  
  
	<add>	  
  
		  
  
		<!-- 	=====================================================================	-->  
  
		<!--	========================== add per project using this addon =========	-->  
  
		<!-- 	=====================================================================	-->  
  
	  
  
		<src>  
		    <folder name="addons/ofxMSAInteractiveObject/src">  
  
				<file>../../../addons/ofxMSAInteractiveObject/src/ofxMSAInteractiveObject.h</file>  
  
				<file>../../../addons/ofxMSAInteractiveObject/src/ofxMSAInteractiveObject.cpp</file>  
  
			</folder>  
  
		</src>  
  
		  
  
		<include>  
			<path>../../../addons/ofxMSAInteractiveObject/src/</path>  
  
		</include>  
  
		  
  
	</add>  
  
	   
  
</install>  

Thanks arturo,

It works well now!

Hey, just saw this post. I wasn’t aware that the install.xml is actually being used so didn’t bother filling them in, sorry bout that! So we do need to fill in install.xml?

well, it’s only being used in 006 linux version. there’s a python script that generates codeblocks projects and adds addons with search paths, libraries… i’ve managed to make it work under windows too but it’s not included in the oficial package. also there isn’t any instructions yet on how to create install.xml files so don’t worry very much by now. anyway if anyone doing addons feel like creating the right install.xml file the addons in the fat distribution for 006 have now the right format.

mmm interesting, I wonder if this is possible on osx too. We have python installed by default, and an xcode project is just a bundle with xml and text files in it - or maybe AppleScript, worth investigating…

yeah, the idea is to be able to generate projects and add addons to them for any platform, even have some kind of oF project xml so we can translate from any platform to any other.

In the python tool there’s a project.py that represents a project so to make it work for mac should just be a matter of making that generate to the xcode format