WinBoard 4.5.1 released

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

WinBoard 4.5.1 released

Post by hgm »

The binary installer package for WinBoard 4.5.1 is now available from WinBoard forum. This release so quickly after 4.5.0 was necessary, because the latter source release contained some packaging errors for WinBoard files, and MSVC and 64-bit compiler incompatibilities. The latter did not affect the binary package, though, because it was made from the git tar ball and 32-bit gcc.

So the only difference between the 4.5.0 and 4.5.1 binary installer package are:
*) Fixed a bug that prevented display of a move entered by the user that ended the game (e.g. through checkmate).
*) Fixed two bugs in Xiangqi (1-step Elephant moves and King facing)
*) Added a traditional-Chinese language file. (Mechanically converted from simplified Chinese,and not checked by any human, so probably not very good.) This means you can now optionally select to install 6 languages next to English:

Spanish
German
Italian
Vietnamese
Chinese(simplified)
Chinese(traditional)
Max
Posts: 247
Joined: Tue Apr 13, 2010 10:41 am

Re: WinBoard 4.5.1 released

Post by Max »

Got (after ./configure) while make an error on my MacBook with OS X 10.5.8:

Code: Select all

engineoutput.c:31:20: error: malloc.h: No such file or directory
make[1]: *** [engineoutput.o] Error 1
make: *** [all] Error 2
With commenting the line in file eingineoutput.c (//#include <malloc.h>) xboard 4.5.1 builds fine on my mac.

Max
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: WinBoard 4.5.1 released

Post by Evert »

Max wrote:Got (after ./configure) while make an error on my MacBook with OS X 10.5.8:

Code: Select all

engineoutput.c&#58;31&#58;20&#58; error&#58; malloc.h&#58; No such file or directory
make&#91;1&#93;&#58; *** &#91;engineoutput.o&#93; Error 1
make&#58; *** &#91;all&#93; Error 2
With commenting the line in file eingineoutput.c (//#include <malloc.h>) xboard 4.5.1 builds fine on my mac.

Max
I meant to complain about that one a few times as well, but forgot.
It shouldn't really be necessary to have that line, it does nothing on modern compilers. Otherwise it could just be #ifdef APPLE'd though.

In a way it's a shame there is no native Mac port of XBoard... I started one once but never finished it. I don't remember how far I got with it though. :(
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard 4.5.1 released

Post by hgm »

The problem with XBoard/WinBoard is the quite poor front-end / back-end separation. For the WinBoard features I port to XBoard I usually try to cleanse them completely from back-end code, so that as little true platform-dependent code remains as possible to rewrite for the XBoard front-end. Ideally the platform-dependent code should be reduced to almost nothing, then it would become very easy to make ports to Mac and such. Unfortunately I often lack the motivation to work on cleansing features that both XBoard and WinBoard have from duplicated code (such as drawing the board).

I just implemented a nce trick (to go into future versions) to make adding menu dialogs or items to XBoard almost trivial: I slightly adapted the Engine-Settings dialog, which was a table-driven dialog generator, using the table of options supplied by the engine, to work on pre-defined tables of XBoard options in stead. Still have to figure out a nice way to handle options that must trigger an action (e.g. redraw, or sending something to the engine) when they change.
FrancoisK
Posts: 80
Joined: Tue Jul 18, 2006 10:46 pm

Re: WinBoard 4.5.1 released : NPS=0 mode bug fix.

Post by FrancoisK »

Hi,

I forgot to report this one : to use NPS mode 0 (ie use time actually used to engine), i had to change "if(cps->nps > 0) { /* [HGM] nps */" to "if(cps->nps >= 0) { /* [HGM] nps */" in backend.c (line 12573 & 13731). Without this, winboard does not send the nps command to the engines.

Seems like i am the only user of this very useful feature ;-)
BTW i found clock() to be of no use under Windows (=wall clock time), i am using GetProcessTimes which seems to do the job - i wonder if there is a better alternative.

François
User avatar
phhnguyen
Posts: 1437
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: WinBoard 4.5.1 released

Post by phhnguyen »

Thanks Muller for the new version.

Just few quick problems:

- Uninstall in Win7: after uninstalling (successfully), the WinBoard group still remains with all file icons (but none can be run) in Windows menu

- Use Xiangqi pieces for displaying (Western) chess pieces. For previous versions, I usually use WB for Xiangqi. However, after uninstalling all WB versions, deleting all their folders, re-installing WB 4.5.1 and then opening Winboard Startup dialog for editing, the pieces are still Xiangqi ones. How can I run WB for chess without any checking / modifying init files?

- For Xiangqi, board in big sizes still displays wrongly
User avatar
hgm
Posts: 27808
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: WinBoard 4.5.1 released

Post by hgm »

phhnguyen wrote:Thanks Muller for the new version.

Just few quick problems:

- Uninstall in Win7: after uninstalling (successfully), the WinBoard group still remains with all file icons (but none can be run) in Windows menu
I guess this must be a problem of the NSIS installer. Under older windows the menu links and folders are deleted without problem, but I don't have anything in the installer script that tells it to do that. The script provides macros for adding start-menu items, and when I use them, it seems to automatically add code to the un-installer to delete them. (This is different with the files; I have to add explicit delete commands for every normal file that is installed.) Perhaps it could be solved by using a newer version of the NSIS installer compiler, that is "Win-7 proof". I don't have Windows 7, so I cannot really test it.
- Use Xiangqi pieces for displaying (Western) chess pieces. For previous versions, I usually use WB for Xiangqi. However, after uninstalling all WB versions, deleting all their folders, re-installing WB 4.5.1 and then opening Winboard Startup dialog for editing, the pieces are still Xiangqi ones. How can I run WB for chess without any checking / modifying init files?
The new system of ini files used by WinBoard 4.5 (storing the actual settings somewhere in the user's AppData folder) makes the problem of unwanted persistance of settings from a previous version bigger. A new install will not overwrite these user settings files. I do supply a file with default settings (defaults.ini) with the install. This contains the settings you would get when nu user settings file pre-exists, and you would run WinBoard for the first time. This would then use the compiled-in default settings, modified by the master ini file. You can re-install these settings by starting WinBoard through the startup dialog, and as "Additional Optons" type @defaults. Because the order in which the settings are specified (and overrule each other) is compiled-in defaults -> master settings file -> user settings file -> command line, this will overrule the old user settings.

If it s only the font that bothers you, starting once with "Additional Options /renderPiecesWithFont="" should switch you back to the default. Unfortunately there is no menu yet to change the font used for piece rendering.

The underlying problem is that although WinBoard looks are highly configurable, they are not variant-dependent. So switching often between Chess, Xiangqi,or Shogi, which need totally different and mutually incompatible settings for a lot of display options, is a problem. The best way is to pick one 'theme', which you use most (say Chess), as standard, and allow that to be saved in the settings file, and collect all setting changes you would have to do to create the theme for the other variants in a small ini file, where you disable automatic saving of options, so that these deviating settings will not leak into your settings file. (The standard installation has a file "xiangqi.ini" for thispurpose.) When playing Xiangqi you would then have to give @xiangqi as "Additional Options", or include it in the command line of a shortcut (which is exactly what the menu item "WB XQ Startup (Oriental)" start menu item is), or include it on the engine line of every Xiangqi engine you install.

If you use all variants equally, and do not care so much which look you will get when starting WinBoard without any options, you can make small ini files for every variant (i.e. chess.ini, xiangqi.ini, shogi.in, spartan.ini), each specifying their own font and board graphics, (and perhaps defining their own list of engines fot in the startupcommand boxes), and not suppressing saving. And then always make sure WinBoard will be started with one of these as option, either from the WinBoard commandline (in a shortcut), or with the engine line (like MaxQi /fd=..\Fairy-Max /firstXBook @xiangi). Switching during the session between Chess and Xiangqi (supposing you would have an engine that could do that) would remain impossible in the current design.

[qoute]- For Xiangqi, board in big sizes still displays wrongly[/quote]
Yeah, I know. The bitmap of the XQ board is not large enough. But upto size 'bulky' it is bearable (the Palace diagonals look a bit weird and the pieces are not exactly centered on the gridpoints, but close enough), and I did not feel like drawing a new one. With the built-in (westernized) pieces Xiangqi is also only playable in sizes petite, middling and bulky. (At other sizes Elephant, Advisor, Cannon and King do not exist.) A wood-textured bitmap at size titanic would indeed be titanic, and hardly compressible, and I don't want the size of the download to be dominated by a Xiangqi board that 99% of the current user base would never use. For en even-colored background the compressed size hardly depends on the board size, so I could include that. (But I would still have to draw it...)

Normally it is not our aim to offer a wide range of possible fancy looks. Most users couldeasily 'shop' themselves on the internet for nice bitmaps and piece fonts, to customize their WinBoard. That we provide anything at all in this area only serves to provide the user with a working example how it could be done. Perhaps it is worth doing a larger XQ board for the WinBoard-XQ distribution; I have not really updated that yet.
User avatar
phhnguyen
Posts: 1437
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: WinBoard 4.5.1 released

Post by phhnguyen »

hgm wrote: I guess this must be a problem of the NSIS installer. Under older windows the menu links and folders are deleted without problem, but I don't have anything in the installer script that tells it to do that. The script provides macros for adding start-menu items, and when I use them, it seems to automatically add code to the un-installer to delete them. (This is different with the files; I have to add explicit delete commands for every normal file that is installed.) Perhaps it could be solved by using a newer version of the NSIS installer compiler, that is "Win-7 proof". I don't have Windows 7, so I cannot really test it.
I search and found some pages about NSIS installer and solutions. I can help you to test on my Win 7.

Do you consider any other installers such as MSI?

The new system of ini files used by WinBoard 4.5 (storing the actual settings somewhere in the user's AppData folder) makes the problem of unwanted persistance of settings from a previous version bigger. A new install will not overwrite these user settings files. I do supply a file with default settings (defaults.ini) with the install. This contains the settings you would get when nu user settings file pre-exists, and you would run WinBoard for the first time. This would then use the compiled-in default settings, modified by the master ini file. You can re-install these settings by starting WinBoard through the startup dialog, and as "Additional Optons" type @defaults. Because the order in which the settings are specified (and overrule each other) is compiled-in defaults -> master settings file -> user settings file -> command line, this will overrule the old user settings.

If it s only the font that bothers you, starting once with "Additional Options /renderPiecesWithFont="" should switch you back to the default. Unfortunately there is no menu yet to change the font used for piece rendering.

The underlying problem is that although WinBoard looks are highly configurable, they are not variant-dependent. So switching often between Chess, Xiangqi,or Shogi, which need totally different and mutually incompatible settings for a lot of display options, is a problem. The best way is to pick one 'theme', which you use most (say Chess), as standard, and allow that to be saved in the settings file, and collect all setting changes you would have to do to create the theme for the other variants in a small ini file, where you disable automatic saving of options, so that these deviating settings will not leak into your settings file. (The standard installation has a file "xiangqi.ini" for thispurpose.) When playing Xiangqi you would then have to give @xiangqi as "Additional Options", or include it in the command line of a shortcut (which is exactly what the menu item "WB XQ Startup (Oriental)" start menu item is), or include it on the engine line of every Xiangqi engine you install.

If you use all variants equally, and do not care so much which look you will get when starting WinBoard without any options, you can make small ini files for every variant (i.e. chess.ini, xiangqi.ini, shogi.in, spartan.ini), each specifying their own font and board graphics, (and perhaps defining their own list of engines fot in the startupcommand boxes), and not suppressing saving. And then always make sure WinBoard will be started with one of these as option, either from the WinBoard commandline (in a shortcut), or with the engine line (like MaxQi /fd=..\Fairy-Max /firstXBook @xiangi). Switching during the session between Chess and Xiangqi (supposing you would have an engine that could do that) would remain impossible in the current design.
For me, almost all my tasks are using command lines so that problem actually did not affect me but normal users.

I think in the view of normal users, WB should be easier and more consistent to use. If one start WB by using icon "Winboard Startup Dialog" it must be a (Western) chess, regardless which variant he has used before. The similar should be for Xq startup dialog.

It should not be too hard to check and trim out any inconsistent settings from ini files
Yeah, I know. The bitmap of the XQ board is not large enough. But upto size 'bulky' it is bearable (the Palace diagonals look a bit weird and the pieces are not exactly centered on the gridpoints, but close enough), and I did not feel like drawing a new one. With the built-in (westernized) pieces Xiangqi is also only playable in sizes petite, middling and bulky. (At other sizes Elephant, Advisor, Cannon and King do not exist.) A wood-textured bitmap at size titanic would indeed be titanic, and hardly compressible, and I don't want the size of the download to be dominated by a Xiangqi board that 99% of the current user base would never use. For en even-colored background the compressed size hardly depends on the board size, so I could include that. (But I would still have to draw it...)

Normally it is not our aim to offer a wide range of possible fancy looks. Most users couldeasily 'shop' themselves on the internet for nice bitmaps and piece fonts, to customize their WinBoard. That we provide anything at all in this area only serves to provide the user with a working example how it could be done. Perhaps it is worth doing a larger XQ board for the WinBoard-XQ distribution; I have not really updated that yet.
If Chinese love your WB, you may have 99% of users using only XQ variant ;) Good luck!
User avatar
Giorgio Medeot
Posts: 52
Joined: Fri Jan 29, 2010 2:01 pm
Location: Ivrea, Italy

Re: WinBoard 4.5.1 released

Post by Giorgio Medeot »

Hi,
I found a little bug related to localization and debug file. I reported in the Winboard forum: http://www.open-aurec.com/wbforum/viewt ... 19&t=51567

Cheers,
  • Giorgio