OSX Xboard 4.7.2 .app

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27793
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 »

I guess during the holidays I will have little time for programming. And we should set up a better way to exchange code patches now it seems to get more complex. Perhaps I should create an OSX branch in the hgm.nubati.net XBoard source repository, from which you could download patches to try.
NaltaP312
Posts: 56
Joined: Wed Oct 29, 2008 1:06 pm
Full name: Marc Paule

Re: OSX Xboard 4.7.2 .app

Post by NaltaP312 »

Happy Christmas ;)
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

That sounds like a great idea! Have a Merry Christmas!
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Just do me a favor and build it off of the 4.7.2 stable branch. I plan on making a patch off of it when we are done so it would be easier for me to maintain as xboard updates.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

I was going through our recent code again, as I had just updated gtk-osx-application to 2.0.5 manually. Didn't fix the extra apple menu issue. But I found out that those errors were there before we put in the dummyBar stuff!

Another note - It also tacks the executable name after about so now it reads About Xboard Xboard. I don't know why I bothered :-\ But as that is the latest we should deal with that. Simple edit I'm sure.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Ok, I've gone and solved everything! I'm not sure where that bunch of errors crept up but it was unrelated to what you were doing with the dummy menu. I've gone and started from scratch and it never shown up.

The first time you did a dummy menu with the simple line in main () worked. no more stupid apple menu!

My silly problem with install_name_tool i solved by adding -headerpad_max_install_names to the LDFLAGS when compiling xboard, so it would link the libraries correctly.

So now menus work, and loading files via OS open signal work!

We just need to come up with a good way to hide the XBoard part from "About XBoard" (rather silly if you ask me, I wonder why the gtkmacintegration dev went and assumed that the UNIX applications don't have their names after their About menu. It probably wouldn't have been much work to check if the app name was there first) I'm going to call it a night and sometime after Christmas I'll finish associating files and working on a patch file.


Man that was a dousy! Just one thing after another with nothing just working like we expected. Thank-you so much for all this!
User avatar
hgm
Posts: 27793
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 »

You could just test or, and replace the item text in CreateMenuPopUp, where we already put the suppression of the separators:

Code: Select all

if(!strcmp(msg, "About XBoard")) msg = "About";
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Haha, thanks, I figured it was something simple like that. I just guessed wrong with the combination. ;) That worked fine!

I also removed the separator suppression lines since the library now takes care of it for us.
User avatar
hgm
Posts: 27793
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 »

If everything works now, can you give me the complete patch that finally did it? Then I can include it in 4.7.3, which we hope to release soon.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: OSX Xboard 4.7.2 .app

Post by JoshPettus »

Oh absolutely, infact, I already created the patch but haven't had a chance to upload it. Sorry, today has been a rather busy as I'm sure it is for you :)

Might want to go through some of it with a grain of salt as not everything would be useful for you.

Here it is
https://dl.dropboxusercontent.com/u/504 ... dOSX.patch

and one for setting it to compile on 10.6 if that is useful to you,
https://www.dropbox.com/s/dptl4wpu77ne2 ... 10.6.patch

Btw, Merry Christmas! :D