Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ TheIDE » U++ TheIDE: Packages » Subdirectories in packages
Subdirectories in packages [message #32686] Thu, 02 June 2011 07:37 Go to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Hello!

Right now I'm trying to use OpenCV 2.2. It's special feature is that all its headers are organized using subfolders (which is great BTW). Now I'm trying to make a package of these headers and meet few problems at once:

1. I can't import whole subtree of headers into package. More like I can, but all the hieracity "flattens" and, obviously, all cross-references between headers breaks.

2. If I just copy whole include dir into my package dir and add each file (tiresome, yep Sad) manually using "Insert package directory file(s)" (why can't I do it to dirs BTW?), it still doesn't solve my problem, because, somehow, all includes in these headers are invalid once again 'cause they do not include package name! Let me show you an example:


I made a package opencv22 and filled it with headers (with subdirs).

Then, I add "#include <opencv22/opencv2/opencv.hpp>" into my header. It worked.

But then I have a string "#include "opencv2/core/core_c.h"" in this file, which is invalid. The valid ones are "#include "core/core_c.h"" and "#include <opencv22/opencv2/core/core_c.h>".


I really wouldn't like to correct each and every #include directive in opencv code. Maybe there is a better way to fix it?
For clarity I attach package I made.
  • Attachment: opencv22.rar
    (Size: 328.94KB, Downloaded 228 times)
Re: Subdirectories in packages [message #32687 is a reply to message #32686] Thu, 02 June 2011 08:08 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1758
Registered: August 2008
Location: Czech Republic
Senior Contributor

Hello GaroRobe!

GaroRobe wrote on Thu, 02 June 2011 07:37

1. I can't import whole subtree of headers into package. More like I can, but all the hieracity "flattens" and, obviously, all cross-references between headers breaks.

Well, I'm not sure why it is designed like this, but I don't like it as well Smile It would be rather easy to implement this functionality, but so far I was always too lazy Rolling Eyes I always ended up opening the *.upp file in text editor and copying in the list of all files, with the directories as necessary. In Linux, you can get such list easily using 'find' command line utility, on windows it might or might not be possible to get the file list using 'dir' or something (I don't remember any more... Smile ).

GaroRobe wrote on Thu, 02 June 2011 07:37

2. If I just copy whole include dir into my package dir and add each file (tiresome, yep Sad) manually using "Insert package directory file(s)" (why can't I do it to dirs BTW?), it still doesn't solve my problem, because, somehow, all includes in these headers are invalid once again 'cause they do not include package name!

...

I really wouldn't like to correct each and every #include directive in opencv code. Maybe there is a better way to fix it?
For clarity I attach package I made.

This can be solved at package level, by adding "internal include" in package organizer. Adding a name of directory will add it to include paths for the give package. The trick in this case is that you add just a single dot "." (meaning current directory). So it will search for the include files in your package dir, where the "core/core_c.h" file will be find Wink

I will add the a request for structured import into the task tracker, I'm pretty sure someone will implement it soon (might even do it myself Smile ).

Hope this helped,
Honza
Re: Subdirectories in packages [message #32688 is a reply to message #32687] Thu, 02 June 2011 08:19 Go to previous messageGo to next message
GaroRobe is currently offline  GaroRobe
Messages: 30
Registered: May 2011
Location: Khabarovsk, Russia
Member

Thanks! Actually helped. I tried "./opencv22", but it didn't help. So had to add "."... I see...
Case closed. Hope to see recursive files import feature soon Smile (guess it's a chance for me to peek at TheIDE internals as well).
Re: Subdirectories in packages [message #32703 is a reply to message #32686] Thu, 02 June 2011 14:18 Go to previous message
Sender Ghost is currently offline  Sender Ghost
Messages: 292
Registered: November 2008
Experienced Member
GaroRobe wrote on Thu, 02 June 2011 07:37

I can't import whole subtree of headers into package. More like I can, but all the hieracity "flattens" and, obviously, all cross-references between headers breaks.


Hello.

Long time ago I created GetUppFromDir command line utility. It have -r (recursive processing of subdirectories) option for this case. It also useful to create U++ packages from scratch.

Edit:
GaroRobe wrote on Thu, 02 June 2011 08:19

Hope to see recursive files import feature soon

Implemented for 4193 release.

[Updated on: Thu, 08 December 2011 22:52]

Report message to a moderator

Previous Topic: Third-party lib packing HOWTO anybody?
Next Topic: Where I find other templates?
Goto Forum:
  


Current Time: Tue Jan 21 12:57:30 CET 2020

Total time taken to generate the page: 0.01550 seconds