Source file sharing between projects

Joseph Nievelt jjnievel at mtu.edu
Sat Sep 20 12:32:26 BST 2003


Mickael,

For a good solution to this problem, kdevelop/gideon will probably have
to actively change this behavior.  For a workable (if ugly) solution,
you could try making symbolic links (windows doesn't really have these,
check google if you're unfamiliar).  The following should get what you
want:

cd <shared file directory>
for i in *
do
ln -s <shared file directory path>/${i} <project directory>/${i}
done

repeat as necessary.  Then your project directory (you should be able to
put it in a subdirectory too I think) will contain symbolic links to the
shared files.  You can then add these (the links) to your project, and
any change you make will propagate to the linked file in the shared
directory.  Beware that there is no concurrency guarantee here, so don't
edit the same file in more than one place at a time.  In case you aren't
familiar with shell scripting (this one is for bash), you can replace
the * above with any wildcard expression, including *.h or util*.h etc.

I haven't tested it, but I think it should work.  You might also look
into the CVS plugin but I don't know enough about CVS or how kdevelop
uses it to tell you if it could solve this problem.

Joe

On Sat, 2003-09-20 at 03:10, Mickael Faivre-Macon wrote:
> Hi Tobias,
> 
> Thank you for your reply!
> 
> This does not resolve the fact that each file added to the project is 
> duplicated into the project dir.... I don't want to work on a copy of my 
> files. That's the problem. Do you mean I have to include them manually? 
> Without using "Project/Add existing files"? How can I do that?
> 
> Mickael.
> 
> 
> Tobias Gläßer wrote:
> 
> >Hi,
> >
> >heh,
> >
> >just put your xyz.h
> >
> >into /usr/include/xyz/xyz.h
> >
> >and add the line
> >
> >#include <xyz.h>
> >
> >into your projects!
> >
> >Then you only have to update
> >/usr/include/xyz/xyz.h
> >but I would administrate xyz in a
> >small separate project.
> >
> >Greetz...
> >
> >Tobias Gläßer
> >
> >Am Fre, 2003-09-19 um 17.35 schrieb Mickael Faivre-Macon:
> >  
> >
> >>Hi,
> >>
> >>I come from the Windows programming world where the source file of a 
> >>project can be shared between projects. You put your classes in a 
> >>directory and when you include them in a project, they stay in the 
> >>directory they are in. When including files in a KDevelop project, the 
> >>files are copied to the project directory. I find that very annoying 
> >>since a utility class can be used in a lot of project and when you make 
> >>a change in the class you have to copy the newer version to all your 
> >>project dir to have the latest version of you class available.
> >>
> >>Why is it like that ? What can I gain over my old habits by adopting 
> >>this Linux way of doing things ?
> >>
> >>Mickael.
> >>
> 
> 
> ---------------------
> Free SMS: http://organizer.easyplay.com.tw/
> 
> -
> to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
> unsubscribe your-email-address



-
to unsubscribe from this list send an email to kdevelop-request at kdevelop.org with the following body:
unsubscribe »your-email-address«



More information about the KDevelop mailing list