Xboard 4.6.X Installer for Mac OSX

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

Moderators: hgm, Andres Valverde

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 26 Mar 2010, 20:11

Updated to the latest version of xboard alpha and replaced manuals with the new ones.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby H.G.Muller » 27 Mar 2010, 08:19

This one should be a real improvement. I figured out how to translate mouse clicks on a text widget into character positions in XBoard. So now you can right-click a PV in the Engine-Output window to step through it in the board window, and click a PGN variation comment in the Comment Popup to switch to it in Edit Game mode. This worked already in WinBoard, but now XBoard supports it too.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard alpha builds for Mac OS X Intel

Postby rigao » 27 Mar 2010, 13:31

Great! Which version do I need to download?
rigao
 
Posts: 63
Joined: 14 Dec 2008, 17:33

Re: Xboard alpha builds for Mac OS X Intel

Postby H.G.Muller » 27 Mar 2010, 13:34

The souces can be obtained as the latest snapshot from http://hgm.nubati.net/cgi-bin/gitweb.cg ... heads/hgm4 . The installer for the Mac made by Darklord from the link he gives above.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 27 Mar 2010, 22:52

The mac installer is on the first post and will get you started. Then you can replace the xboard binary in the installer with the very latest one with the link below it. HGM updated the xboard sources again within a couple of hours of me rebuilding the package, not that I'm complaining ;)

@HGM
I noticed! so far works beautifully! Just a small thing, is there anyway for one to scroll trough moves in xboard like we can in winboard with the mouse wheel?
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby H.G.Muller » 28 Mar 2010, 00:02

There is no mousewheel driver in XBoard yet. I am not even sure that the X-toolkit supports a mouse wheel; I would have to check that out.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 14 May 2010, 18:00

Updated to latest sources of xboard alpha, polyglot 1.4.58b and several engines
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 21 Oct 2010, 19:58

Darklord,
Nice installation package. I tried it and it works fine but I have a problem changing the xboard engine or using other modes you have not cared for.
Can you give me information on the following:

Is there an easy way to change the engines in xboard and to use more recent xboard sources ?
What program is used to create the installation package?
Can you supply the scripts you used to create the binaries ?
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 22 Oct 2010, 03:03

Unfortunately there isn't as there is no dialog box to select engines like there is in winboard, nor external engine manager. And I didn't want to setup xboard as you would on a linux computer (where all engines and xboard go into /usr/games/ and would easily type in the engines name into the console and it would run), as that paradigm doesn't really work for mac users, especially when most mac users don't have xcode tools, or know about the terminal. So I tried to set it up in a way where a user could click on an icon and, vola, all set.

Hopefully a better solution can be found for other settings but normally what I do is launch it as you would do in linux. Open console, drag xboard on to it to put in address info, type -fcp drag engine onto console , -fUCI (if applicable), and start.

But better way which I can think of is to load everything in a bash script as you would with winboard and windows shortcuts. I gave a few examples there to get started, but forgot one with an engine.
All you do is create a text file which will have:

#!/bin/bash
/Applications/Xboard/xboard -fcp /enginedir/engine (-fUCI if it is UCI)

Then rename the text file as whatever.command and xboard will launch with those settings upon clicking it.

I'll add a few more next time, but I was holding out till the next stable release.
---------
As for your other questions.

I created the package with package manager included with xcode tools, available on the apple website though you must register as a mac developer.

I created the binaries directly from the source code which is available for many engines. Or there are some programs like timestamp, timeseal and fruit which are already compiled for mac but must have permissions changed with
chmod 755
before they can be used.

I'll probably make another package with newer sources this weekend if you want, but you said in the other thread that you successfully compiled xboard yourself.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 22 Oct 2010, 03:18

Also I should recommend that if you use xboard on mac that you download the latest XQuartz
http://xquartz.macosforge.org/

The built in X11 with Snow Leopard is older and appears to have rendering problems with line boarders, which can be annoying in the dialog boxes.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 22 Oct 2010, 22:54

Darklord,
Thanks for the info. I have seen that you use xboard,conf in usr/local/etc to set the parameters for xboard, polyglot and engines. I changed the file to my needs (changing the engine etc). I think this can also be done by Applescript making changes to xboard.conf via a user interface.
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 23 Oct 2010, 00:32

Well I thought I had it set so it would generate an xboard.conf in the /Applications/Xboard/ folder so you could have edited that and it would override any settings on the one in /usr/local/etc. As that one cant easily be configured with out replacing with administrative access. Of course you would have to save settings within xboard first before it generates.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 23 Oct 2010, 23:22

That's right, but you can't change engines that way.
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

Re: Xboard alpha builds for Mac OS X Intel

Postby H.G.Muller » 24 Oct 2010, 08:27

Indeed, the engines are volatile options.

People that want to redefine some volatile options compared to their system's defaults, can use the settings-file dederection recursively, though. E.g. if /usr/local/etc wouuld redirect the settings file to ~/.xboardrc in your home directory, you could put the commands

/fcp="..."
/settingsFile="~/xboard.ini"
/saveSettingsFile="~/xboard.ini"

in the latter, so that the file xboard.ini is used for storing and loading the settings, and the engine will by default be set to the value specified in ~/.xboardrc. This way each user can specify his own default engine.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 26 Oct 2010, 14:33

H.G.Muller wrote:Indeed, the engines are volatile options.

People that want to redefine some volatile options compared to their system's defaults, can use the settings-file dederection recursively, though. E.g. if /usr/local/etc wouuld redirect the settings file to ~/.xboardrc in your home directory, you could put the commands

/fcp="..."
/settingsFile="~/xboard.ini"
/saveSettingsFile="~/xboard.ini"

in the latter, so that the file xboard.ini is used for storing and loading the settings, and the engine will by default be set to the value specified in ~/.xboardrc. This way each user can specify his own default engine.


This is not an ideal solution for Mac users. The default fcp in ~/xboardrc is not copied in /xboard.ini and the file ~/.xboardrc is invisible for users who don't know how to show hidden files.
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 27 Oct 2010, 15:52

Well rather than make the file /.xboardrc and stick it in the home folder, i just told the master .ini to name it xboard.ini and put it in the /Applications/Xboard folder. This way it is visible, and mac users don't have to go looking for it in places they wont necessarily expect.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 27 Oct 2010, 18:51

Darklord42 wrote:Well rather than make the file /.xboardrc and stick it in the home folder, i just told the master .ini to name it xboard.ini and put it in the /Applications/Xboard folder. This way it is visible, and mac users don't have to go looking for it in places they wont necessarily expect.

Now I am lost. What do you mean with master.ini ? Your installation package creates a xboard.conf in usr/local/etc and the contents is copied to xboard.conf in Applications/Xboard at the first closing of xboard. Have you done away with these files or is usr/local/etc/xboard.conf renamed to master.ini and have you included HGM's suggestions in this file with the safeFile options to xboard.ini ?
Please elaborate a bit more, I can not find anything in the XBoard manual about the use of ini files. .Xresources is mentioned and plain XBoard in the home directory to be used in the same way as you use the conf files. Also nothing on .xboardrc . Grateful if someone can tell me where I can find info about how to use these files and what they are supposed to do and where to locate them.
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

Re: Xboard alpha builds for Mac OS X Intel

Postby H.G.Muller » 27 Oct 2010, 22:32

.Xresources is ignored in the development version. The docs you have seen must be for v4.4.x. I think the source download also contains updated man files that describe the new system

The "master" ini file is /usr/local/etc/xboard.conf, and comes with the install . It contains options at the end

-settingsFile XXX
-saveSettingsFile XXX

where XXX is some filename. (For Debian Linux systems this should be ~/.xboardrc, and the master ini file is /etc/xboard.conf there, btw). The options will then be saved in the file XXX, for every user on that system. If yoou are an administrator, and you are not happy with XXX, you can change it (for all users) in the master ini file. If you are a normal user, and just would like to change it for yourself, you can repeat the same trick in XXX: include the above two options with a name that you would like. There doesn't have to be anything else in XXX. (But if there is, they would act as new default settings. E.g. if you only use XBoard to play Crazyhouse, you could make that the default variant by including a line with

-variant crazyhouse

in XXX.
User avatar
H.G.Muller
 
Posts: 3453
Joined: 16 Nov 2005, 12:02
Location: Diemen, NL

Re: Xboard alpha builds for Mac OS X Intel

Postby Josh Pettus » 28 Oct 2010, 05:25

Yah sorry for the confusion. I have been using winboard a lot recently and I think I just coined the term "master.ini" file. But yes I meant the /usr/local/etc/xboard.conf.
Josh Pettus
 
Posts: 317
Joined: 11 Mar 2009, 01:11

Re: Xboard alpha builds for Mac OS X Intel

Postby imai » 16 Nov 2010, 13:34

HGM and Darklord, thanks for the explanation. I have done exactly as you suggested and everything works fine.
I reduced the original xboard.conf in the usr/local/etc to the 2 lines redirecting the save settings to the file xboard.conf in /Applications/Xboard and in this file I redirected the savings to a hidden file .xb.conf. Now I can make permanent changes in the /Applications/Xboard/xboard.conf
As I had almost finished an Applescript application to change the variant and chess engines in the /usr/local/etc/config file, I changed it a bit and use it now to make changes in the /Application/Xboard/xboard.conf. The script is based on the installation package of Darklord taking into account the changes as mentioned earlier.
For anyone interested here is the code :

Code: Select all
global theFile, theList, thePath, theCount, theFileContents, myOptions, mySelectedOptions, thePrompt, startFolder, theFolder, theEng, theFirstEng, theSecondEng, myFirstEng, mySecondEng, txt

set startFolder to "/Applications/Xboard/Engines/"

set theFile to "/Applications/Xboard/xboard.conf"

readFile(theFile)

if txt is "" then
   display dialog "File not found" & return & return & "install xboard.conf in /Applications/Xboard" & return & return & "This program will close now" buttons {"OK"} default button 1 with icon caution
quit
end if

set theList to every paragraph of text of txt
set theCount to (count of theList)
set theVariant to DefaultValues("variant")
set theMode to DefaultValues("Mode")
set theFirstEng to DefaultValues("firstChessProgram")
set theSecondEng to DefaultValues("secondChessProgram")

set theChoice to display dialog "The mode of operation is :  " & theVariant & return & return & theMode & return & return & "The first engine :  " & theFirstEng & return & return & "The second engine :  " & theSecondEng buttons {"Accept Defaults", "Change Defaults"}
set theAnswer to button returned of theChoice

if theAnswer is equal to "Accept Defaults" then
   display dialog "Nothing will be changed !" & return & return & "This program will close now" buttons {"OK"}
   quit
else
   set myOptions to {"Chess_engines", "Variant"}
   set mySelectedOptions to {}
   setOptions()
   set myChange to mySelectedOptions
end if

if myChange contains "Variant" then
   set myOptions to {"normal", "wildcastle", "nocastle", "fischerandom", "bughouse", "crazyhouse", "losers", "suicide", "giveaway", "twokings", "kriegspiel", "atomic", "3check", "shatranj", "xiangqi", "shogi", "capablanca", "gothic", "caparandom", "janus", "courier", "falcon", "berolina", "cylinder", "knightmate", "super", "makruk", "fairy"}
   set mySelectedOptions to {}
   setOptions()
   set var to mySelectedOptions
   set myVariant to "-variant  " & var
   set txt to my Replace(txt, theVariant, myVariant)
end if

if myChange contains "Chess_engines" then
   set theEng to false
   set thePrompt to ""
   set theFile to ""
   set thePath to ""
   set theFolder to ""
   
   set thePrompt to "Select the first chess engine"
   SelectEng() -- select first engine
   set myFirstEng to "-firstChessProgram  " & thePath
   set txt to my Replace(txt, theFirstEng, myFirstEng)
   
   set thePrompt to "Select the second chess engine"
   SelectEng() --select the second engine   
   set mySecondEng to "-secondChessProgram  " & thePath
   set txt to my Replace(txt, theSecondEng, mySecondEng)
end if


set bootDisk to (path to startup disk) as Unicode text
set theConf to (bootDisk & "Applications:Xboard:xboard.conf")
set theFile to open for access file theConf with write permission
write txt to theFile
close access theFile


on Replace(txt, srch, rpl)
   set oldtid to AppleScript's text item delimiters
   set AppleScript's text item delimiters to {srch}
   set txt to text items of txt
   set AppleScript's text item delimiters to {rpl}
   set txt to "" & txt
   set AppleScript's text item delimiters to oldtid
   return txt
end Replace



on readFile(unixPath)
   set foo to (open for access (POSIX file unixPath))
   set txt to (read foo for (get eof foo))
   close access foo
   return txt
end readFile

on DefaultValues(theValue)
   repeat with i from 1 to theCount
      set theWord to item i of theList
      if theWord contains theValue then
         set theMode to theWord as string
      end if
   end repeat
   set AppleScript's text item delimiters to "\""
   set theModePath to (text items of theMode)
   set AppleScript's text item delimiters to ""
   set theModePath to (theModePath as string)
   return theModePath
end DefaultValues

on setOptions()
   set optionsTemp to (choose from list myOptions with prompt "Select the settings to change" default items mySelectedOptions OK button name "Select" with multiple selections allowed)
   if (optionsTemp ≠ false) then
      set mySelectedOptions to optionsTemp
   end if
end setOptions

on SelectEng() --main handle for engine selection
   set theRept to false
   repeat until theRept is true
      fileSelect(thePrompt)
      if theFile contains "." then
         checkFolder()
      else if theFolder is not "Engines" then
         checkFolder()
      else
         checkEngine()
         if theEng is true then
            set theRept to true
         end if
      end if
   end repeat
end SelectEng

on checkEngine() --make sure that the user is happy with the selection and stop the handle SelectEng
   display dialog "The selected engine is  " & theFile & return & return & "Is this correct ?" buttons {"Yes", "No"} default button 1
   set theAnswer to button returned of result
   if theAnswer is equal to "Yes" then
      set theEng to true
   else
      return
   end if
end checkEngine

on checkFolder() --Inform the user that the selection is wrong and continue
   display dialog "This is not an engine or the selected engine is not in a sub folder of Engines" & return & return & "install chess engines in a sub folder of Xboard/Engines" buttons {"OK"} default button 1 with icon caution
   return
end checkFolder

on fileSelect(thePrompt) --Engine selection handle
   set PathFile to choose file with prompt thePrompt default location startFolder
   --return PathFile
   set thePath to (the POSIX path of PathFile)
   set AppleScript's text item delimiters to "/"
   set theFilename to text items of thePath
   set AppleScript's text item delimiters to {""}
   set theFile to item -1 of theFilename
   set theFolder to item -3 of theFilename
end fileSelect
imai
 
Posts: 50
Joined: 14 Dec 2009, 21:46

PreviousNext

Return to WinBoard development and bugfixing

Who is online

Users browsing this forum: No registered users and 1 guest

cron