[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[XBoard-devel] App bundler script for Xboard OSX
From: |
Joshua Pettus |
Subject: |
[XBoard-devel] App bundler script for Xboard OSX |
Date: |
Sun, 6 Jul 2014 10:15:52 -0400 |
Hello all,
I finally managed to boil my process down to a simple shell script. I took the
liberty of putting it, and all the supporting files, (including icons,
xboard.conf, mans, gtk configs and a osx style gtk2 theme). In the included
readme file, I describe how to setup macports properly to build xboard and run
the script. All you have to do after is unzip the folder into a xboard source
package and, after compiling the binary, run the script.
Surely all this can be done within the makefiles itself, so someone with more
knowledge in this department can feel free to give it a try.
A few things though with the current make/configure file. Right now it doesn’t
properly link the gtkmacintegration library. I have to keep putting it in
LDFLAGS in the make file before building. Also if someone could add the
-headerpad_max_install_names flag, to the OSX gtk build process, that would be
very handy as it is always necessary to be able to relink the libraries.
————
And finally there are a couple of comments made by HGM that haven’t made it
into any branch that are needed.
First in args.h there is some code that is necessary to keep the user.conf file
portable with its directories:
args.h
------
case ArgFilename:
if(*(char**)ad->argLoc == NULL) break; // just in case
{ char buf[MSG_SIZ];
snprintf(buf, MSG_SIZ, "%s", *(char**)ad->argLoc);
#ifdef __APPLE__
if(strstr(buf, DATADIR) == buf)
snprintf(buf, MSG_SIZ, "~~%s", *(char**)ad->argLoc + strlen(DATADIR));
#endif
if (strchr(buf, '\"')) {
fprintf(f, OPTCHAR "%s" SEPCHAR "'%s'\n", ad->argName, buf);
} else {
fprintf(f, OPTCHAR "%s" SEPCHAR "\"%s\"\n", ad->argName, buf);
}
}
break;
case ArgBoardSize:
------
Second this is needed to be able to use the info file in the OSX Terminal.
(opening a .command file automatically opens the Terminal.app which has no
other way to be opened for this situation.)
menu.c
------
InfoProc ()
{
#ifdef __APPLE__
char buf[MSG_SIZ];
snprintf(buf, MSG_SIZ, "%s ./info.command", appData.sysOpen);
system(buf);
#else
char buf[MSG_SIZ];
snprintf(buf, sizeof(buf), "xterm -e info --directory %s --directory . -f
%s &",
INFODIR, INFOFILE);
system(buf);
#endif
}
———
Best Regards,
Josh
mac-app.zip
Description: Zip archive
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [XBoard-devel] App bundler script for Xboard OSX,
Joshua Pettus <=