Well, this would be easy enough, just adding a line
- Code: Select all
{ 0, 0, 0, NULL, (void*) &appData.logoDir, "", NULL, PathName, N_("Directory with engine logos") },
in the list of initializers for boardOptions[], in dialogs.c.
But wouldn't it be better to configure it to a fixed folder inside the bundle, with the -logoDir option? If we do supply logos with the bundle for FICS and Fairy-Max, people would lose them when they would alter the logo directory.
[Edit] How are the engines in the bundle organized anyway? Are they all in the same directory, such as in /usr/games in Linux, or are they each in their own folder, as in Windows? In the latter case it would be much more convenient to take the logos for -autoLogo from the engine directory (looking for a file logo.png there). The logoDir was really a work-around for the fact that on Linux all engine executables are in the same folder, so that the Windows method did not work. A drawback is that logos are expected to come with the engine package, and it is rather inconvenient, and against the packaging rules of most distros, when the engine packages would have to install files in the XBoard sub-tree. Logical would be to have a /usr/share/games/enginepackagename/logo.png in each engine package, but XBoard cannot know easily the engine package name (e.g. maxqi comes from the fairymax package), and there is the problem with /usr/share or /usr/local/share, etc. I guess it would be very helpful to extend WB protocol with a feature data="datadirpath" to tell XBoard where to look for engine add-ons such as logos. But of course no existing engine would use it anyway, certainly not UCI engines.
We could make the XBoard method a cascade: if an -fd argument was given (i.e. unequal to the default ".") we look for logo.png in that directory, if that file does not exist, we fall back on the logoDir with a png constructed from the 'tidy name' of the engine, as we do in Linux. In fact this would also work conveniently on Linux, as you would use the -fd only with engines imported Windows engines running under wine.