On Mon, May 14, 2007 at 12:18:16PM -0400, Eric S. Raymond wrote:
> I have written and tested Unix support in the WML preprocessor for two
> extensions:
>
> %final.cfg: if a directory named 'dir' contains a %final.cfg, then
> when processing the files in dir is invoked by the
> construct {dir}, %final.cfg will be processed last.
> (The order in which the other files will be processed
> remains unspecified.)
>
> %main.cfg: if a directory named 'dir' contains a %main.cfg, then
> when processing the files in dir is invoked by the
> construct {dir}, *only* %main.cfg will be processed
> automatically. (It may of course include other files.)
>
> If a directory has both a %main.cfg and a %final.cfg, the %final.cfg
> will be ignored.
>
> The reason for these extensions is to allow directories of .cfg
> files to be self-contained packages. Thus, a campaign named
> "Battle for Fubar" need no longer consist of a Battle_for_Fubar.cfg
> and Battle_for_Fubar subdirectory, but can now consist of the
> Battle_for_Fubar subdirectory containing a %main.cfg.
>
> There are three issues with this, one cosmetic and two fundamental:
>
> 1. The cosmetic issue is that I chose these special names to sort
> to the beginning of ls listings. Sadly, they don't. Therefore the
> special names are likely to have to change.
>
> 2. I don't know what special names are acceptable under Windows and
> MacOS.
>
> 3. get_files_in_dir() needs port patches to implement %main.cfg under
> Windows and Mac OS X. As soon as I commit patches that use these
> features, *those ports are going to break*.
>
> Note to the persons responsible for these ports: please make the small
> patches needed to enable %main.cfg support under your OS. Please
> write it in terms of the symbol MAINCFG, because the name might change.
Well if % isn't supported by some filesystems, it's starting to be messy...
If some developers / packager / whatever use such filesystem it might even be
a problem for svn checkout...
I've done a quick test at work under Windows XP, i could create a %main.cfg
file.
If it is really a problem we should probably use some more conventional
filenames like _main.cfg instead of %main.cfg for example.
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev