Topic : Relative path for the project program files.

Forum : Ride IDE

Original Post
Post Information Post
April 7, 2009 - 1:20pm
Guest

Hi.
When we create a project, we can define the directory for the include files as a relative path, for example ..\..\include.
Is there any way to do the same with the source files included in the project. The problem is that if we copy the project to another directory, we have to make a new project to be able to work in the new directory.

Best regards

Replies
Post Information Post
+1
0
-1
April 7, 2009 - 3:37pm
Raisonance Support Team

Hi Francesc,

Indeed Ride7 supports quite poorly the change of directory.
A good thing to do, first, is to avoid "project directories" within Ride7, which are hard to track for "make" facility, especially if you are using "..\" stuff (relative paths which are NOT descendants of the current path).

Another thing you can do is to manually edit the .rapp and .rprj files for your project and replace the absolute paths by relative ones. You can check our examples such as Towers or Whetstone, which have this trick wired in. Once these 2 steps are done it will be possible to move your project around without much problems. Although it will be necessary to perform a CLEAN build after each copy of your project is performed. If you do not, the make facility will be lost...

I hope this helps,
Bruno

+1
0
-1
April 8, 2009 - 8:41am
Guest

Hi Bruno.
I have been reading your replay and I don't understand some parts of it.

When you comment that "a good thing to do is to avoid "project directories" , do you mean that it's interesting to put the project, the source and the include files in the same directory?

When you comment that project directories are hard to track for the "make" facility, does it mean that the make process is slower?

About the relative path, I have got and old project and it seems that Ride7 has lost all the information of the project. May be that it was due to old (or not compatible) versions of Ride7.
I have tried to change the directory of a project and it works fine.

Thanks for the information
Francesc

+1
0
-1
April 8, 2009 - 3:59pm
Raisonance Support Team

Hello Francesc,

Ride7's internal make facility converts filenames to unique IDs (kind of strings). Converting from a path+file to string is easy, but the other way is more complex. Sometimes if there are similar files in a project (such as src\file.c and srcfile.c for instance) the make could get corrupted.
We are working on this problem, but it is difficult as some components require absolute paths although other ones require relative ones. Currently Ride7 internally converts all paths to absolute, so that everything works well "out of the box"; but it is not recommended to move project files to a different directory :(

I would then recommend to have all your .c and .h project files in a single directory. You can have your output files (object, map files, listings, hex etc) in a different directory, no problem.

Concerning backward compatibility we try to keep projects working even with newer Ride7 or RKit versions. I don't think we have been modifying the .rapp nor .rprj files syntax and semantics, so your old project should work fine on new software.

Regards,
Bruno