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 »

I'd be happy too! but it's just the standard makefiles that came with 4.7.2 source code. I haven't made any source code changes, just changes to the conf files to look for resources within the package. And then I also changed where the binary looks for its dylib's after compilation using the dylib bundler tool.

http://macdylibbundler.sourceforge.net/

My suspicion is that you guys are getting the segfault because I compiled the executable for OS 10.8 Unfortunately I don't see how compiling xboard with min os to 10.6 will help because GTK and cairo and all 6 trillion of their supporting libraries were setup in macports for my OS... unless you have an idea? :(
[EDIT]
Actually i have one!
follow my steps and we can create one specifically for os 10.6 then it should work for later OS's.

I guess step one would be to setup mac ports properly
ports I used and in this order

Code: Select all

sudo port install automake
sudo port install autoconf
sudo port -v install pango +builtin_modules +quartz
sudo port -v install gtk2 +quartz
sudo port -v install librsvg +quartz
Then you can download xboard 4.7.2 source and extact
it's not a bad idea to go to gtk/xboard.h and edit to find its conf file in the executable's directory.
#define SETTINGS_FILE "."

./configure --with-gtk
make
rename executable to xboard-bin and copy replace bin inside my app under
Xboard.app/Contents/MacOS/

delete the old lib folder under
Xboard.app/Contents/Resources/lib

Then download the dylib package tool
http://macdylibbundler.sourceforge.net/
sudo make install

run this command

Code: Select all

dylibbundler -od -cd -b -x <directory>/xboard.app/Contents/MacOS/xboard-bin -d <dirctory>/xboard.app/Contents/Resources/lib -p @executable_path/../Resources/lib
And it will scan the xboard-bin, find out what libs it needs and copies them into the folder linking everything to each other.

then you would have to compile fairymax using
cc -O2 -s -DINI_FILE=\"./data/fmax.ini\" fmaxi.c -o fmax

copy that bin as well into
Xboard.app/Conetents/MacOS

and that should be it. Everything else should be actually already compiled with 10.6 as target. As they were from my previous install and rigged to be so.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

I guess it is to say I didn't do any fancy automated package creation scripting. (save the dylib bundler tool) I just brutally cobbled an app package together using GIMP as a model.

Oh darn, I forgot to mention before deleting the old lib folder, be sure to keep the gtk-pixbuf-2.0 and gtk-2.0 folders inside. Then copy them into your new lib folder once dylib bundler is done.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: OSX Xboard 4.7.2 .app

Post by zullil »

Hi Joshua,

I hope it's clear that I really appreciate the effort you've made. I can easily build my own Xboard for 10.6; in fact, I already have one.

And I didn't intend in the slightest to serve as the GPL police. I was just wondering what compile flags you might have used, so I looked inside the bundle for source code and, in particular, a makefile.

Louis
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: OSX Xboard 4.7.2 .app

Post by trojanfoe »

zullil wrote: I found the tone of your post rather unpleasant. But perhaps that's my problem. Since you seem to know a bit about development under OS X, maybe you could offer Joshua some assistance, without snarky comments like "If you cannot make your app know its own bundle path then you have many problems on the road ahead."
Yes, the tone was somewhat "off"; apologies if I caused offence, I was in stackoverflow mode.

However I have no time to assist anyone with anything at this time.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Oh don't worry Louis I didn't take any offense or anything. I was just trying to show you what I did, as I simply didn't have anything in the way of compile flags.

Btw, do you mind showing me what you did? That way was so we don't have to leave other 10.6 users in the dust.

Xboard is itself with the GTK and cairo requirements is the only tricky part. The rest I can compile with
-mmacosx-version-min=10.6
should be ok.
User avatar
hgm
Posts: 27787
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 »

JoshPettus wrote:Then you can download xboard 4.7.2 source and extact
it's not a bad idea to go to gtk/xboard.h and edit to find its conf file in the executable's directory.
#define SETTINGS_FILE "."
That is "./xboard.conf", I should hope. "." is a directory, so it could never save anything there. You should also make sure that the xboard.conf master settings file is put in that directory then.
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: OSX Xboard 4.7.2 .app

Post by syzygy »

hgm wrote:And what if this 'script' is noting but a single line

HGsuperCompiler -O99 *.c -o gpl.exe

where HGsuperCompiler is not publicly available? I could even specify its version very precisely as $999,867, but that wouldn't really make it useful for anyone.
If HGsuperCompiler does not fall under this special exception:
However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.
then the source code for the binary includes the source code of HGsuperCompiler including its Makefile etc.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: OSX Xboard 4.7.2 .app

Post by zullil »

JoshPettus wrote: Btw, do you mind showing me what you did? That way was so we don't have to leave other 10.6 users in the dust.
I simply decided to use X11, since I didn't want the hassle of compiling special versions of gtk and cairo. I use X11 all the time anyway, so I don't mind using it for Xboard.
User avatar
hgm
Posts: 27787
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, MSVC is not normally distributed with Windows, right? You have to buy it separately.

So it is illegal to distribute binaries compiled by MSVC unless you include the sources of MSVC?

It seems a bit of a counter-productive rule, to force users of GPL'ed software to use only second-rate compilers...
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: OSX Xboard 4.7.2 .app

Post by trojanfoe »

hgm wrote:Well, MSVC is not normally distributed with Windows, right? You have to buy it separately.

So it is illegal to distribute binaries compiled by MSVC unless you include the sources of MSVC?

It seems a bit of a counter-productive rule, to force users of GPL'ed software to use only second-rate compilers...
There is a compiler in the Windows SDK, which is free.