X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gtk%2Fxboard.c;h=4c66bdc6dc4295542bb2362992b49b7699e68abf;hb=36a3483dd6f8361b0ccb7c5648e83922883bb9a6;hp=6769a199f8d3849f1397e339fdd497d36e5ddc60;hpb=27f670dbe352c1333448bb137a6aa008e4cdf3ad;p=xboard.git diff --git a/gtk/xboard.c b/gtk/xboard.c index 6769a19..4c66bdc 100644 --- a/gtk/xboard.c +++ b/gtk/xboard.c @@ -779,7 +779,7 @@ main (int argc, char **argv) GtkosxApplication *theApp = g_object_new(GTKOSX_TYPE_APPLICATION, NULL); char *path = gtkosx_application_get_bundle_path(); strncpy(dataDir, path, MSG_SIZ); - snprintf(masterSettings, MSG_SIZ, "%s/../Resources/etc/xboard.conf", path); + snprintf(masterSettings, MSG_SIZ, "%s/Contents/Resources/etc/xboard.conf", path); g_signal_connect(theApp, "NSApplicationOpenFile", G_CALLBACK(StartNewXBoard), NULL); // we must call application ready before we can get the signal, // and supply a (dummy) menu bar before that, to avoid problems with dual apples in it @@ -848,6 +848,8 @@ main (int argc, char **argv) { // [HGM] initstring: kludge to fix bad bug. expand '\n' characters in init string and computer string. static char buf[MSG_SIZ]; + snprintf(buf, MSG_SIZ, appData.sysOpen, DATADIR); + ASSIGN(appData.sysOpen, buf); // expand %s in -openCommand to DATADIR (usefull for OS X configuring) EscapeExpand(buf, appData.firstInitString); appData.firstInitString = strdup(buf); EscapeExpand(buf, appData.secondInitString); @@ -1807,7 +1809,9 @@ void ManProc () { // called from menu #ifdef __APPLE__ - system("%s ./man.command", appData.sysOpen); + char buf[MSG_SIZ]; + snprintf(buf, MSG_SIZ, "%s ./man.command", appData.sysOpen); + system(buf); #else system("xterm -e man xboard &"); #endif