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.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Ideology, politics and journalism, which luxuriate in failure, are
impotent in the face of hope and joy.
-- P. J. O'Rourke
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev