Change source directory
I'm running into a problem when I download a project from CVS onto my machine. The project was created on another user's computer in some directory. When I try to run the project as is, CrossWorks can't find the source files. This is because it's looking for the source files in the path that was on the other user's computer. How do I go about changing the path? In the properties for each .c file, there is a field called "File Name" and "Full Path", however these seem to be read-only. How do I go about changing these fields so that I can build the project from my machine.
I did have a work around to this problem, but i'm not sure whether this is the best way. I opened in the .hzs and .hzp in wordpad and edited the paths manually.
Can anyone suggest a better method?
Thanks.
-
I believe the .hzs file contains only session information for the IDE, e.g., which files you were viewing, watch windows, HUDs and so on. If you delete it, it will be rebuilt as you set up your environment. I believe it does not contain any data relevant to the project itself, e.g., CPU, defines and so on.
Logical options might be, either close all viewed files before checking in, or (as I've recently chosen to do), exclude the .hzs files from the svn or cvs repository.
Hopefully if I am mistaken, someone will correct me.
If you want to keep the .hzs files and modify the paths, you could try a scripting language like Python, Ruby or Perl to either change them in, or delete them from the .hzs file.
-
I think one of the Crossworks team members posted this in the FAQ - NOTE: I haven't tried it yet:
How do I copy an existing project to a new directory?
The project system attempts to store the location of files in the solution file (.hzp) using relative paths where possible so copying a solution is usually simply a case of copying the entire contents of the solution directory to the new directory.
Note that it is a good idea to remove the session file (.hzs) as this is the file that contains the list of the solution's open files and it can be confusing when you open the new copy of the solution and the source files from the original solution are opened.
-
Hi Harjit.
It's correct, the hzs file will point to the files in the original poject, not the copy.
I now always exclude the .hzs from svn, and always delete the .hzs when copying.
Generally the file rebuilds quickly and easily enough, and avoids the risk of accidently modifying the original files in the mistaken belief you're working with the new copies.
G.
Please sign in to leave a comment.
Comments
3 comments