Josh Pettus wrote:You're probably right about the sound dir. But with the logo's you are forgetting about ICS logos, and there isn't really a standard place for logos to be defined anyway.
Yes, there is, I just defined it (/usr/share/games/plugins/logos). If that is not satisfactory for OS X, we should define another one for that is. And it might actually work best for OS X to adopt as primary standard that logos should go in the engine directory, so that no dedicated logo directory is needed. Note that engine logos are not really connected with XBoard in any way; they can be used by any GUI. So ~/Library/Application Support/XBoard would definitely not be the proper place.
You are right about the ICS logos, though; this is also a problem on Linux, as ICS are not installed on the machines in any package. So if there are to be ICS logos, they must come with the package of the ICS client, i.e. XBoard. But that makes it logical to place them in XBoard's private data, i.e. /usr/share/games/xboard/logos/FICS.png etc. This could mean duplication of data if there are different ICS clients that each want to use logos, but as there are only a handful of ICS and logo files are small, that isn't really something worth worrying about.
XBoard distinguishes between ICS and engine anyway, for what exactly it does on -autoLogo. So for engines it can look in the engine dir and the system's default logo folder (which the packager can configure through the -logoDir option to be suitable to the OS he packages for), and for ICS (where there is no equivalent for the engine dir) it would look in the DATADIR of XBoard (which would normaly be adapted to the distro by the ./configure process, but in the case of OS X would be mapped inside the bundle through the bundle_path kludge we already use to determine it at run time). And as a second option it could then be made to look in the -logoDir, just in case the user wanted to do something non-standard, and has redefined it (and deleted the FICS and ICC logos in the bundle).
This does leave the problem of handle-specific ICS logos, but I think at the moment XBoard does not support those at all. I think this concept only makes sense if we also have an -autoTradeLogos option, which would send players each other's logos through the ICS. (For how else could such logos be distributed?) That means that XBoard should be able to store the received logos, which sort of rules out standard system places where you have to be superuser to write. It seems that the Debian standard to solve such problems is to have a 3-step hierarchy for looking for files: /usr/share/games/xboard/ (for standard packages), /usr/local/share/games/xboard/ (for adminitrator installs from source) and ~/.xboard/ (for installs by users without admin rights), searched in the reverse order. I guess the ~/.xboard/ is similar to OS X' ~/Library/Application Support/XBoard; it is also hidden. In this case the logos are only weakly connected with XBoard, though. So it would probably make more sense to just store them in ~/icslogos/<icsname>/<playername>.png, where '~/icslogos' could be made a user-configurable option distinct from the -logoDir for engines (although I am not sure how much sense that makes).