Relative paths in WB settings

Discussions about the WinBoard protocol. Here you can also report bugs and request new features.

Moderators: hgm, Andres Valverde

Relative paths in WB settings

Postby vsoljan » 31 Aug 2010, 20:02

I am trying to put together portable winboard folder so everything works even if I move Winboard folder somewhere else.
This is why I am using relative paths, e.g:
/polyglotDir="." (polyglot.exe is in Winboard folder)
/defaultPathEGTB=".\egtb" (egtb folder is in Winboard folder)

In Winboard folder I have winboard.exe, polyglot.exe, egtb folder and a folder for each UCI engine.
What I have noticed is that when I use ".\egtb" for egtb path than engine does not use egtb, but when I put "..\egtb" it works.
This is a little bit confusing because it would be more logical if polyglot is in "." folder to use ".\egtb" path.
My question is - is this (egtb path being relative to engine path) intentional or bug?
vsoljan
 
Posts: 24
Joined: 28 Sep 2009, 14:15

Re: Relative paths in WB settings

Postby H.G.Muller » 01 Sep 2010, 08:55

This is a good point, which escaped my attention so far, because I never use EGTB.

The EGTB path is merely communicated to the engine, and it is the latter that uses it. WinBoard never accesses any EGTB by itself. So it is indeed logical that a relative path would be interpreted from the engine folder.

Now this cannot possibly work if not all engines are at the same level of the file-system tree. So I guess the WB docs should mention that the EGTB path should be an absolute path, which is what 99% of all people would do anyway, (e.g. if you use the browse button to set it, you automatically get an absolute path), but which unfortunately is of no use for what you want. In the install I distribute, WinBoard is in a sister folder of all engine folders, so indicating a file in the WinBoard folder so that engines, WinBoard and PSWBTM all get at it by the same relative path is possible with "..\WinBoard\FILENAME". By this I can allow users to install in an arbitrary location, without running into problems like you point out.

I guess it would be better if WinBoard would make any file or path name it passes to the engine absolute, even when they were given as a relative path by the user or in the ini file. For save game files (which are not passed tot he engine, but they are stored back into the ini file on saving settings) making the names absolute already seems to take place. This would apply to the egtpath argument, as well as to engine options of the -file and -path type. (UCI engines would probably not be helped much by this, as, unlike WB protocol, UCI2 does not distinguish -file and -path options from -string options, so the GUI could not know when a string passed to the engine has to be expanded as a file name or not.)
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL


Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 9 guests