Re: Re: [AD] [ alleg-Bugs-1223257 ] Mac OSX allegro will not read config files

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> 
> From: Chris <chris.kcat@xxxxxxxxxx>
> Date: 2005/06/19 Sun PM 08:44:47 GMT
> To: alleg-developers@xxxxxxxxxx
> Subject: Re: [AD] [ alleg-Bugs-1223257 ] Mac OSX allegro will not read	config
>  files
> 
> Elias Pschernig wrote:
> > On Sun, 2005-06-19 at 20:56 +0100, Peter Hull wrote:
> > 
> >>I don't think this is a bug. From my interpretation of the  
> >>documentation, Allegro will search various paths, including the
> >>executable directory, _only_ for the allegro.cfg file. If you specify 
> >>your own config file, as exconfig does, it will look in the place
> >>that you specified, so if you gave it a path-less filename, it will 
> >>look in the current directory only.
> 
> I don't believe so. It's been my understanding that it'd look at the 
> path relative to the executable's directory. So if you run 
> ./examples/exconfig and set custom.cfg, it'd try to read 
> ./examples/custom.cfg. The docs could further imply it'd also search the 
> ALLEGRO environment var (thus ${ALLEGRO}/custom.cfg) and /etc in Unix 
> (thus /etc/custom.cfg).
> 
> It depends on how you read the manual. To me it sounds like it says 
> "Specifies an alternate config file, or if you don't specify a config 
> file, it'll use allegro.cfg. Furthermore, it'll look for the file in the 
> same directory as the program, the Allegro environment variable, etc..."
> 

I think we can agree that the docs are ambiguous... I based my interpretation more on what the code does. I may be wrong but I traced through a few calls with gdb, and it didn't look like Allegro was making any attempt to search different directories for the custom config file. I'm guessing that was the intent of the authors of that code, it's not like they tried to include searching and introduced a bug accidentally. Also, as far as I can see, Allegro has always behaved that way.

At this stage, my recommendation would be to clarify the documents, to match the actual behaviour. We can then have a think and implement a new system in 4.3.x. I have a feeling it will turn out to be more complicated than it seems, as we have to decide the priority of multiple locations, which are highly-platform dependent. Furthermore there is the issue of overrides, and where settings are saved vs. where they are loaded from.

Pete

-----------------------------------------
Email provided by http://www.ntlhome.com/





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/