One question: What happens if the primary settings file that was given has the same name as the one that Polyglot constructs from the engine name (or that was given by the user)? Would that transparantly work? Or would it mes up the oriinal because it thinks almost no settings have changed, and thus save only part of the settings back?
I am afraid that this is what would happen. Of course PG could detect this name collision and in this special case save all settings rather than just
the changed ones. But there is also the problem that the engine specific ini file is relative to the classical ini file (if present). If you then
take out the classical ini file you may lose the value of some options. This not an issue of course if you use -noini.
My motivation for choosing the current architecture was the following. Suppose that you do
xboard -fcp fruit -fUCI
Then polyglot has to find (and store) the options for the engine fruit somewhere. An ini file based on the name of the engine seemed to be the
most natural choice. But to get the name of the engine PG has to start the engine first. And to do this it may need the classical ini file
(which currently is polyglot_1st.ini).
Rather than putting a lot of PG_ pefixed filenames all in the WinBoard directory, whouldn't it be better to save them all in a sub-directory PG (or .pg)? Keeping files in a different directory seems a superior way of organization from having to go on parts of the names.
I wasn't aware that on windows the current directory would typically be the WinBoard directory. Then yes. Storing them in a subfolder
is a good idea.
On Linux they should go in $HOME/.polyglot. I guess Linux users would be mature enough to know that the user specific configfiles for PG would be stored in this directory.