That's much neater than what I suggested. How many of these variables do we need so that the directory for the a/c does not have to be a subdirectory of $FG_ROOT?
Giles Robertson -----Original Message----- From: Boris Koenig [mailto:[EMAIL PROTECTED] Sent: 22 November 2004 21:50 To: FlightGear developers discussions Subject: Re: [Flightgear-devel] Aircraft directory structure Curtis L. Olson wrote: > However, as things stand right now. We have oodles of references to > stuff as "../../../Instruments/hsi.xml" etc. If we move an aircraft one > directory level deeper (or more) all those relative references break. :-( Well, this is then about relative paths, it could probably already be solved if one added support for standard paths such as $FG_ROOT. Which could mean that the path becomes: $FG_ROOT/Aircraft/Instruments/hsi.xml I think it would take 5 minutes to add support for -automatically defined- environment variables such as: - $FG_AIRCRAFT - $FG_INSTRUMENTS These could all be based on a properly set $FG_ROOT, that way one could simply refer to: "$FG_AIRCRAFTS/c172/c172-set.xml" or "$FG_INSTRUMENTS/hsi.xml" Dealing with such path specifications would mainly come down to looking for an initial '$' sign and stripping of everything behind the first slash in order to determine the real path. > I'm calling for someone to take on the task of making aircraft more > relocatable. If you are mainly thinking about the above problem and my suggestion for a solution is already sufficient, I wouldn't mind to send Erik a corresponding patch. --------- Boris _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel 2f585eeea02e2c79d7b1d8c4963bae2d