Absolute filepaths in Studio projects

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I just ran into a real stinker in Studio.

Background: I work at several computers, so to be able to move about effortlessly I have a server too where my projects normally reside. One of the workstations is a laptop that comes with me on journeys, so sometimes projects reside on the local drive. I synch this against the server manually when I have to.

As I was at home today I worked on the laptop with a project residing on the server, and after having done extensive work I decided to store away the source file in a backup copy before going into a semi redesign. I did this by copying the sources on the server.

An hour later I discovered, to my horror, that the source files on the server where a bit old, to say the least.

Turns out that although the project file is on the server it refers to sources on the workstation. The project was probably set up there to, and then copied/synched to the server.

This means that the file I took a backup of was several weeks old (yes, my bad not to notice), and I have lost the state of the code befo the redesign.

1. Is this behaviour (absolute filepaths in Studio projects) by design?

2. Is there any way to set a relative path for a file in a project (eg. relative to the directory the project file resides in)?

I wonder why there has not been any "arhghh"s about this. Seems to me that anyone moving/copying a project would run into this. Have I missed something?

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

After trying to sleep the frustration off, I had another look at it. The project file is an "almost-XML" file. Thats good.

The project file mentions the source file several times (and has some other paths pointing to the "wrong" directory too). That's not so good, but can be lived with.

After removing all paths on the sourcefile names, I opened the project in Studio and the source file opened was the one in the directory where the project file resides. Thats really good.

After opening the project (yes, directly after opening the project) the project file gets updated with absolute filepaths again. Thats really really bad.

I can only conclude that moving a Studio project is not feasible. You'll have to move the source files only, and then set up the project again. OTOH I have a hard time coming to terms with someone really designing it this way, so please tell me I'm wrong.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

strange ? I often copy a whole project into a zip file, and send it to someone,
then he unpack it where he likes, and open and compile and all works just fine.
I have more than one PC and moving back and forward with projects are normal here,
all without any trouble, I always just copy the whole project.

Yours: Thomas Scherrer - Denmark
OZ2CPU www.webx.dk

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, I'll do some more tests later. Right now I'm trying to recapture the code that went into binary void space.

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Johan,

I'm not sure if this is relevant but I usually build on a network drive N: but the other day I zipped up a project to give to someone else. To do this I copied all the project files to a C: directory structure and zipped that (after manually editing N:'s to C:'s in the .APS file). Later they asked what the .D files were (dependencies obviously). When I looked at those I found they too still had N: paths in them. I guess I should have done a "make clean" before I copied/zipped the files

So I guess the point I'm making is that if you copy a project but don't clean it first then the dependency files may still contain references to the old locations.

Either way it does seem that the .aps project file (XML) has hard coded absolute rather than relative paths anyway.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, Cliff, and thanks for the input. My problem was eith sorce files though, and it was an asembler project.

I'm still investigating this. I made some more tests after Thomas' post above, and it sure looks like projects can be moved. It might have something to do with loosing a connection to the server (intentionally or by accident/malfunction). And it might be a "driver error", eg. me screwing things up. I'll do some more tests before I'll get back to this thread. (Just gotta resurrect the lost code first.)

As of January 15, 2018, Site fix-up work has begun! Now do your part and report any bugs or deficiencies here

No guarantees, but if we don't report problems they won't get much of  a chance to be fixed! Details/discussions at link given just above.

 

"Some questions have no answers."[C Baird] "There comes a point where the spoon-feeding has to stop and the independent thinking has to start." [C Lawson] "There are always ways to disagree, without being disagreeable."[E Weddington] "Words represent concepts. Use the wrong words, communicate the wrong concept." [J Morin] "Persistence only goes so far if you set yourself up for failure." [Kartman]

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi Johan,

First of all, I'm sorry for your loss of work

[Edited 2006-01-17]
I was at the wrong track in yesterday's post, I thought I spotted the problem being related to Studio being confused over the existence of 2 project directories (the original and the copy), but it seems Studio handles this correctly (at least for simple assembler projects). I am not able to reproduce the situation.

I assume you run the latest version of AVR Studio (4.12.462) on all computers accessing projects at your server? We have made changes in the project file format between 4.11 and 4.12. While 4.12 is able to open project files created by 4.11 correctly, the other way around is not guaranteed to work (we have not tested that situation)..

--
Roland Kruse
Atmel AVR Tools