OSX Xboard 4.7.2 .app

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Ah but in order for it to work, the OS would have to have gettext installed, therefor I'd have to have it included in the app bundle somehow.

And then get xboard to use that.

how does it search the OS for the language of the OS?

------------------
That might be a better way to get shogi/xiangqi clock names then changing it in the code.

Could have

LANG=shogi.utf8 xboard in their launch script.
I'll have to look at it.
User avatar
hgm
Posts: 28123
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: OSX Xboard 4.7.2 .app

Post by hgm »

Well, shogi.utf8 is not currently a supported locale. I must admit that I really don't know too much about this internationalization stuff. After some looking in the Linux file system I found files

/usr/local/share/locale/*/LC_MESSAGES/xboard.mo

where * = de, nl, es, it, ru etc. It seems that make-install puts them there, and that it is the default place for gettext to look when XBoard is run with a different locale. The .mo files are built as part of the make process, from .po files, which contain the translations in human-readable form. They are made from a .pot (template) file, by including the translations. I don't know if it would be easy to add a new language 'shogi'. Perhaps it would just be a matter of creating the po/shogi.po and adding 'shogi' as supported language to the file po/LINGUAS, before make-install.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

You wouldn't happen to know how to get xboard to search for these locale .mo files in ~~/Resources/share/locale would you? Or would I have to compile gettext dylibs with that sort of information? I can steal them from Gimp.app if so.

I wish I knew why ./configure fails with NLS. It's a real pain to have to go into conf.h file and force NLS and the GETTEXT functions, as well as enable it in the makefile (nls=yes in 3 places). And even then I will have no idea if it's working till it works.

All I know is the I can't get the binary to throw any errors about the libgettextlib-0.18.3.dylib, libgettextpo.0.dylib and libgettextsrc-0.18.3.dylib libraries, and dylibbundler isn't adding them into the bundle. So to me it looks like they aren't even linked to the binary which has me scratching my head.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

So I got myself a new (used) macbook. After 7 years the monitor literally fell off on my old one, cracked along the bezel near the hinge and after several months finally fell apart.

New one has a much bigger screen and is great for this dev work. :)

@hgm, I see you are sorta back into winboard dev. Personally I'd like to tackle this repeating open bug, if we can, before the next version. It's by far the most troublesome bug and someone reported it can happen as well if you launch the xboard executable with -fcp chessengine from command line
ie

Code: Select all

    /Applications/XBoard.app/Contents/MacOS/XBoard -debug -fd $(pwd) -fcp ./MyCustomEngine
But it doesn't happen when you launch with just the engine or just debug.
(which doesn't make any sense to me.)

I had put in the old debug code for jokes to see if it could shine a little more light as to what is going on, (since we thought we fixed it)
This was the results when opening two games to view.

Code: Select all

25556 Start XBoard: argc = 1, arg = NONE
 25556 Signal: suppress = 0, path = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25567 Start XBoard: argc = 2, arg = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25567 Signal: suppress = 0, path = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25576 Start XBoard: argc = 2, arg = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25576 Signal: suppress = 0, path = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25584 Start XBoard: argc = 2, arg = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25584 Signal: suppress = 0, path = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25592 Start XBoard: argc = 2, arg = /Applications/Xboard/joshua-Sjeng_11.2.pgn
 25592 Signal: suppress = 0, path = /Applications/Xboard/joshua-Sjeng_11.2.pgn
....
If we could fix this I would feel a lot better.
User avatar
hgm
Posts: 28123
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: OSX Xboard 4.7.2 .app

Post by hgm »

OK, I'll have a look into this, this week. The current master version on hgm.nubati.net still has a problem in the initial sizing of the board when I use logos, which I want to fix first.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Sure, that would be nice to fix too :)
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Hi Harm,

I realize you are still probably busy, but regarding the unsyncing checkmarks, I have been digging around in the gtk-mac integration library code and I was trying to find where the library had a section regarding cocoa signals for toggling the checkmark. NSOnState, NSOffState, and NSMixedState.

(referenced from here

I found that section over here.

I can't make heads or tails of it, but it might be worth trying to figure out how the library works here to see where we may be going wrong.