Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » How to put workspace & project files in some subdirectory of my project?
How to put workspace & project files in some subdirectory of my project? [message #117637] Thu, 26 August 2004 18:15 Go to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Hi to all! :)

This is second try. I have already posted this question, but couldn't
believe somebody haven't seen this problem before or do not know how to
solve it. :(

- Recently I cam to one specific problem I couldn't find way to solve. I
have huge C++ project which is organized in following fashion:

..
|-- CMakeTmp
|-- bin
|-- doc
|   `-- reference
|       `-- html
|-- ide
|   |-- bcb
|   |-- devcxx
|   |-- symbian
|   |-- vcpp6
|   |   |-- array0
|   |   |-- dict0
|   |   |-- list0
|   |   |-- rtk_static
|   |   |-- string0
|   |   |-- test_core_dict0
|   |   `-- variant0
|   `-- vcpp7
|       |-- list0
|       |-- rtk_static
|       |-- string0
|       |-- test_core_dict0
|       |-- test_core_file0
|       `-- variant0
|-- lib
|-- rtk
|-- scripts
|-- src
|   |-- core
|   |   `-- platform
|   |       |-- epoc32
|   |       |-- linux
|   |       `-- win32
|   |-- device
|   |   |-- linux
|   |   `-- win32
|   |-- gui
|   |   |-- GD
|   |   |-- VDAL
|   |   `-- WMAL
|   `-- templates
|-- statcvs
|-- test
|   `-- core
`-- uml

Project has few libraries (librtk_core, librtk_gui,
librtk_device_linux, ...), all of them organized as separate projects in
one single Eclipse workspace named "rtk".

My question/problem is: How to force Eclipse to store all projects and
workspace in /ide/eclipse directory? Every time I tried something, I ended
up with .project, .cdtbuild  and .cdtproject in top-level directory (ro ot
of my source tree).

Is there some way of doing this easily? - Please help me! :(

Kind regards

Dejan

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #117756 is a reply to message #117637] Fri, 27 August 2004 09:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Will anybody help me with this? :(

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #117780 is a reply to message #117756] Fri, 27 August 2004 12:42 Go to previous messageGo to next message
Eclipse UserFriend
Dejan,
Have you tried posting the question on other Eclipse fora? It doesn't
seem like a CTD-specific issue, so perhaps people on other groups have
techniques for controlling where the project-related information gets
stored. I can tell you that the MBS assumes the build information file
is located in the root folder of the project. It will not know where
else to look. I really haven't delved into this in detail, but unless
Eclipse offers an API for plugins to locate these files, then I suspect
that the Eclipse framework itself will not have a way for you to tell it
where to store things.

Is there some reason you cannot accept the default behaviour?

Sean

Dejan Lekic wrote:
> Will anybody help me with this? :(
>
Re: How to put workspace & project files in some subdirectory of my project? [message #117815 is a reply to message #117780] Fri, 27 August 2004 14:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Sean Evoy wrote:

> Dejan,
> Have you tried posting the question on other Eclipse fora? It doesn't
> seem like a CTD-specific issue, so perhaps people on other groups have
> techniques for controlling where the project-related information gets
> stored. I can tell you that the MBS assumes the build information file
> is located in the root folder of the project. It will not know where
> else to look. I really haven't delved into this in detail, but unless
> Eclipse offers an API for plugins to locate these files, then I suspect
> that the Eclipse framework itself will not have a way for you to tell it
> where to store things.
>
> Is there some reason you cannot accept the default behaviour?
>
> Sean
>
> Dejan Lekic wrote:
>> Will anybody help me with this? :(
>>

Dear Mr. Evoy,

I really do not see the problem here. What is the problem if all project
files, and workspace files are in
directory /path/to/myproject/subdir/eclipse ? I can allways say something
like "include directories
are: ../../include:../../third/libpng:../../third/zlib" or "lib directories
are: ../../lib:/home/dejan/lib"). Don't you agree with this? Also,
references to source files are in the same fashion, for "SomeClass.cpp" i
would have reference to "../../src/SomeClass.cpp" file. Maybe those links
in "New -> File" could help, i don't know...

The reason behind this is that in my /ide directory we will have a lot of
different files for different IDEs (codewarrior, visual this, visual that,
Borland this, Borland that, Dev-C++, Eclipse, ...) and having stuff in
top-level directory will make it full with files not directly important for
the whole project...

Kind regards

Dejan

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #117825 is a reply to message #117815] Fri, 27 August 2004 14:33 Go to previous messageGo to next message
Eclipse UserFriend
Dejan,
You can call me Sean. I really do not have enough expertise in this area
to engage you in this discussion. The CDT is a plugin to Eclipse. We
create projects via an API and the framework puts files in the root of
the project. I did not work on the Eclipse framework, so I am not the
right person to ask why you cannot control the location of the project
files programmatically. Frankly, I don't even want to hazard a guess.

Maybe the solution is to create your CDT project rooted at the
subdirectory that contains the files that are unique to the CDT. Then,
add linked directories to the source tree you described. Like I said,
this is not something I know a lot about and the broader Eclipse
newsgroups may have tackled similar problems for the JDT.

Sean

>
> I really do not see the problem here. What is the problem if all project
> files, and workspace files are in
> directory /path/to/myproject/subdir/eclipse ? I can allways say something
> like "include directories
> are: ../../include:../../third/libpng:../../third/zlib" or "lib directories
> are: ../../lib:/home/dejan/lib"). Don't you agree with this? Also,
> references to source files are in the same fashion, for "SomeClass.cpp" i
> would have reference to "../../src/SomeClass.cpp" file. Maybe those links
> in "New -> File" could help, i don't know...
>
> The reason behind this is that in my /ide directory we will have a lot of
> different files for different IDEs (codewarrior, visual this, visual that,
> Borland this, Borland that, Dev-C++, Eclipse, ...) and having stuff in
> top-level directory will make it full with files not directly important for
> the whole project...
>
> Kind regards
>
> Dejan
>
Re: How to put workspace & project files in some subdirectory of my project? [message #117836 is a reply to message #117825] Fri, 27 August 2004 14:46 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Sean thanks for your help, I really do apriciate it very much. I will try to
do as we both suspected (I also thought that could solve my problem) - to
create everything in /ide/eclipse and than link all other /directories into
it.

I'll inform you about success/failure. :)

Best regards

Dejan

> Dejan,
> You can call me Sean. I really do not have enough expertise in this area
> to engage you in this discussion. The CDT is a plugin to Eclipse. We
> create projects via an API and the framework puts files in the root of
> the project. I did not work on the Eclipse framework, so I am not the
> right person to ask why you cannot control the location of the project
> files programmatically. Frankly, I don't even want to hazard a guess.
>
> Maybe the solution is to create your CDT project rooted at the
> subdirectory that contains the files that are unique to the CDT. Then,
> add linked directories to the source tree you described. Like I said,
> this is not something I know a lot about and the broader Eclipse
> newsgroups may have tackled similar problems for the JDT.
>
> Sean

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #117848 is a reply to message #117836] Fri, 27 August 2004 15:19 Go to previous messageGo to next message
Eclipse UserFriend
Dejan
We put a fix in 2.0.1 to handle generating build commands for linked
resources in a managed project. Until 2.0.1 though, your best bet is to
try it out with a standard project.

Good luck,

Sean

Dejan Lekic wrote:

> Sean thanks for your help, I really do apriciate it very much. I will try to
> do as we both suspected (I also thought that could solve my problem) - to
> create everything in /ide/eclipse and than link all other /directories into
> it.
>
> I'll inform you about success/failure. :)
>
> Best regards
>
> Dejan
>
>
>>Dejan,
>>You can call me Sean. I really do not have enough expertise in this area
>>to engage you in this discussion. The CDT is a plugin to Eclipse. We
>>create projects via an API and the framework puts files in the root of
>>the project. I did not work on the Eclipse framework, so I am not the
>>right person to ask why you cannot control the location of the project
>>files programmatically. Frankly, I don't even want to hazard a guess.
>>
>>Maybe the solution is to create your CDT project rooted at the
>>subdirectory that contains the files that are unique to the CDT. Then,
>>add linked directories to the source tree you described. Like I said,
>>this is not something I know a lot about and the broader Eclipse
>>newsgroups may have tackled similar problems for the JDT.
>>
>>Sean
>
>
Re: How to put workspace & project files in some subdirectory of my project? [message #118025 is a reply to message #117848] Sun, 29 August 2004 12:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ebascon.hotmail.com

Hi Dejan and Sean:

I had your problem too. My project has the following file tree:

* myproject
* source
* include
* binaries
* win32
* mingw
* makefiles
* mingw
* projects
* eclipse
* mingw

So, I want my projects to be inside the myproject/projects/eclipse/mingw;
so, I created the work space in that directory (sadly, I must specify an
absolute path: c:/myproject/... ) and I added the subprojects inside that
directory.

In Eclipse, I created folders doing a "link to the file system", linking the
Eclipse folders with my source, binaries, include, makefiles folders (again,
Eclipse does not allow to specify relative paths to do this :( ).

Using standard makefile project, my makefiles can be inside a makefiles file
tree, so I am able to build the binaries using something like:

gcc -c ../../../sources/myproject/core/core.cpp

I would be happy if support for relative paths would be added to the Eclipse
IDE (I dunno if this is Eclipse or CDT related)

Saludos


Ernesto



"Sean Evoy" <sevoy@ca.ibm.com> wrote in message
news:cgo1an$t7j$1@eclipse.org...
> Dejan
> We put a fix in 2.0.1 to handle generating build commands for linked
> resources in a managed project. Until 2.0.1 though, your best bet is to
> try it out with a standard project.
>
> Good luck,
>
> Sean
>
> Dejan Lekic wrote:
>
> > Sean thanks for your help, I really do apriciate it very much. I will
try to
> > do as we both suspected (I also thought that could solve my problem) -
to
> > create everything in /ide/eclipse and than link all other /directories
into
> > it.
> >
> > I'll inform you about success/failure. :)
> >
> > Best regards
> >
> > Dejan
> >
> >
> >>Dejan,
> >>You can call me Sean. I really do not have enough expertise in this area
> >>to engage you in this discussion. The CDT is a plugin to Eclipse. We
> >>create projects via an API and the framework puts files in the root of
> >>the project. I did not work on the Eclipse framework, so I am not the
> >>right person to ask why you cannot control the location of the project
> >>files programmatically. Frankly, I don't even want to hazard a guess.
> >>
> >>Maybe the solution is to create your CDT project rooted at the
> >>subdirectory that contains the files that are unique to the CDT. Then,
> >>add linked directories to the source tree you described. Like I said,
> >>this is not something I know a lot about and the broader Eclipse
> >>newsgroups may have tackled similar problems for the JDT.
> >>
> >>Sean
> >
> >
Re: How to put workspace & project files in some subdirectory of my project? [message #118067 is a reply to message #118025] Sun, 29 August 2004 12:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Thanks Ernesto - that was exactly what we discussed here previously - now
when we know it works we can continue with work... ;)

Best regards

Dejan

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #118143 is a reply to message #118067] Mon, 30 August 2004 11:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ebascon.hotmail.com

Hi Dejan:

The problem is that I cannot set my paths to relative paths. Now everything
is ok, but when I will want to distribute my source code, the users must
install in the same root path that I did in my computer and it seems very
restrictive to me.

Ernesto


"Dejan Lekic" <dejan@nu6.org> wrote in message
news:cgt19k$3up$1@eclipse.org...
> Thanks Ernesto - that was exactly what we discussed here previously - now
> when we know it works we can continue with work... ;)
>
> Best regards
>
> Dejan
>
> --
> Dejan Lekic
> developer, sysadmin and DBA
> http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #118716 is a reply to message #118143] Wed, 01 September 2004 15:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

I've found excellent solution! There is way to link to any directory in
filesystem with one excellent option - variable.
So, it's possible to setup link to MYPROJDIR/src and MYPROJDIR/third/src per
example (sure you should set MYPROJDIR to valid directory name with full
path). This works perfectly, and later developers simply change that
variable on their machines, and have working workspace. GOOD! GOOD!

I am so happy now!

BEST regards!

Dejan

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #118729 is a reply to message #118716] Wed, 01 September 2004 16:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: ebascon.hotmail.com

Dejan:

They are really good news!!!! I will use them tonight at home!!!

But I think that allowing to set relative paths will be THE REAL SOLUTION!!!
Do you agree?

Thanx a lot.

Saludos


Ernesto




"Dejan Lekic" <dejan@nu6.org> wrote in message
news:ch57ug$li0$1@eclipse.org...
> I've found excellent solution! There is way to link to any directory in
> filesystem with one excellent option - variable.
> So, it's possible to setup link to MYPROJDIR/src and MYPROJDIR/third/src
per
> example (sure you should set MYPROJDIR to valid directory name with full
> path). This works perfectly, and later developers simply change that
> variable on their machines, and have working workspace. GOOD! GOOD!
>
> I am so happy now!
>
> BEST regards!
>
> Dejan
>
> --
> Dejan Lekic
> developer, sysadmin and DBA
> http://dejan.lekic.org
Re: How to put workspace & project files in some subdirectory of my project? [message #118769 is a reply to message #118729] Wed, 01 September 2004 19:45 Go to previous message
Eclipse UserFriend
Originally posted by: dejan.nu6.org

Sure, but I am satisfied with this too. :)

--
Dejan Lekic
developer, sysadmin and DBA
http://dejan.lekic.org
Previous Topic:Pbarray.cpp not compiling
Next Topic:How to integrate Qt
Goto Forum:
  


Current Time: Fri May 09 15:20:54 EDT 2025

Powered by FUDForum. Page generated in 0.04136 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top