Problem to run XBoard with Mac command line

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

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

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

hgm wrote:Since you are here, what is the version of HaQiKi D you distribute with XBoard?
Xboard comes with the HaQiKi D 1.7d ana.

I still need to update the XboardXq app which is still at 4.8.0. i think I was waiting for you to send me the latest version of HaQiKi D and then I forgot :)

On another note, I just booted up my hackentosh, after a few weeks of non use, and now GDK pixbuffs are suddenly working fine... Really weird. I really wish I knew what the problem was, or what could have changed to fix it.
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Problem to run XBoard with Mac command line

Post by phhnguyen »

Wow, thanks, I missed some features of XBoard. Now I have been watching the tournaments between HaQiKi, Eleeye and Maxqi!!!

Questions:
- is there anyway to get results (win/lose ratio) in the middle/on fly?
- can I organise and run a tournament by command line/script file only?

I know 10 games are too small number but just started and need to set all engines to their max strengths before making some long tournaments. I have seen eleeye has a file book.dat in its folder but not HaQiKi. Both have no ini file.
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Problem to run XBoard with Mac command line

Post by phhnguyen »

Thanks Joshua Pettus!

Actually I am lucky to catch you here so I can "blame" you a bit ;)

For your question first, I have not seen any things (changed icon colours, dots...) you mentioned. I have played a short match and attach the image bellow. You can see that White is computing but XBoard icon is still in black.

Image

Now, few small bug reports:
- When opening a pgn file with multi games, if I select a game has a comment in the end, the board and all pieces may be disappeared (I have reported this problem long time ago)
- I cannot quickly select a variant (not Western chess) engine from bottom of menu Engine. When I click on the line “farymax” the XBoard works OK but not with the line haqkid - a box is popped out with message: “No engine haqkid is installed”
- My computer has been installed some languages, English and Vietnamese. But English is still set Primary. System and all other apps show English everywhere but XBoard - it is using Vietnamese. Not sure if it is your purpose ;)

I am eager for your Xiangqi version. I guess that more people will get benefit from that than default one.

Tech details if you need: I am using XBoard 4.9.1 for Mac. My computer is Macbook pro mid 2015, MacOS is Sierra 10.12.1
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Problem to run XBoard with Mac command line

Post by phhnguyen »

When watching engines' matches I have seen (so far few times) a popup with error message: "bad repeat loop".

So hard to guess from whom/what happens :|
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

Unfortunately I couldn't fix the gdk bug back when I could reproduce it... Now I'm at a total loss.. :( I did play around with a method for pixbuffs for finding resources in the app, but both methods not work on my hackentosh. so I don't know...
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

As with the other issues:

1. Don't know. Maybe an XBoard bug.
2. Strange Haqikid works on my install of xboard, you can edit what you need to in the Engine->Edit Engine List dialog box. Maybe there is some typo there or maybe it's a hold over from some earlier version of xboard.app when I did things different.
3. I'm not sure about the language or what can be done about that. It sounds like the system still reports to GTK that it is Vietnam hence the change. Have you used the mac app of gimp? Does it too do that?
4. No idea about the loop, never seen it before.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

JoshPettus wrote:Unfortunately I couldn't fix the gdk bug back when I could reproduce it... Now I'm at a total loss.. :( I did play around with a method for pixbuffs for finding resources in the app, but both methods NOW work on my hackentosh. so I don't know...
Boy I must be tired... How did I not notice this...
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Problem to run XBoard with Mac command line

Post by bob »

hgm wrote:I never had a Mac, but I know that in Linux you cannot start programs in the current directory by just mentioning the name of the binary. You have to prefix it with "./". So perhaps you could try it with -fcp "./haqikid".

Note that in the command line you posted here, XBoard would try to use Elephant Eye as a WinBoard engine, as you gave it no indication that it is UCCI. You would have to add -sUCCI to indicate that. (Assuming XBoard is configured to use UCI2WB properly, which should be the case if you are using the OS X App.)
You don't need the "./" if you add "." to the end of your shell path variable.

IE I use the csh and have

set path = ($path .)

so that it searches the current directory last when looking for an executable.
User avatar
hgm
Posts: 27790
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem to run XBoard with Mac command line

Post by hgm »

I never quite understood how this works. It is not the shell that is responsible for interpretation of relative path names, is it? It is the system. I can do an exec call on 'mybin/foo', and the system would interpret it with respect to the current directory. For 'mybin/foo' this seems to work. But not for the bare 'foo'. It seems the system requires there is at least one slash in the argument of an exec call.

If adding '.' to the path would work around it, it must be because it triggers the shell to use a work-around, and prefixes the name typed by the user with the current directory as obtained from the system, before passing it to exec.

This would not be helpful for arguments of XBoard, however, as the shell is not involved. XBoard performs an exec call on the given -fcp argument directly.
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Problem to run XBoard with Mac command line

Post by Sven »

hgm wrote:I never quite understood how this works. It is not the shell that is responsible for interpretation of relative path names, is it? It is the system. I can do an exec call on 'mybin/foo', and the system would interpret it with respect to the current directory. For 'mybin/foo' this seems to work. But not for the bare 'foo'. It seems the system requires there is at least one slash in the argument of an exec call.

If adding '.' to the path would work around it, it must be because it triggers the shell to use a work-around, and prefixes the name typed by the user with the current directory as obtained from the system, before passing it to exec.

This would not be helpful for arguments of XBoard, however, as the shell is not involved. XBoard performs an exec call on the given -fcp argument directly.
Both the shell and the exec call (or better: the family of exec calls, like execl, execv, ...) do this. See here for instance. The PATH environment variable is ignored if there is at least one slash in the given file name/path name.