diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-02-13 17:22:21 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2008-02-13 17:22:21 +0000 |
commit | f9fa23468aee70a6f7baad02765bc5401432f06d (patch) | |
tree | d14d70838b2ed50a3080a0c6b5a6ef2f48f7b65d /pd/src | |
parent | 61a6a50fcd20fe55a8589299a2ce91403c9040a0 (diff) |
Casal bugfix for OSX 10.5.1 - released as 0.41-1.
Later I learned this might not actually fix the problem
(but had already released it as 0.41-1). Ugh.
Also, lots of portaudio $Id$ stuff that CVS used to bash
uncontrollably might finally retain the
portaudio original lines now that we're in SVN.
svn path=/trunk/; revision=9436
Diffstat (limited to 'pd/src')
-rw-r--r-- | pd/src/m_pd.h | 2 | ||||
-rw-r--r-- | pd/src/notes.txt | 1 | ||||
-rw-r--r-- | pd/src/s_inter.c | 135 | ||||
-rw-r--r-- | pd/src/t_tkcmd.c | 2 |
4 files changed, 72 insertions, 68 deletions
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h index f494ff52..558bd4d2 100644 --- a/pd/src/m_pd.h +++ b/pd/src/m_pd.h @@ -10,7 +10,7 @@ extern "C" { #define PD_MAJOR_VERSION 0 #define PD_MINOR_VERSION 41 -#define PD_BUGFIX_VERSION 0 +#define PD_BUGFIX_VERSION 1 #define PD_TEST_VERSION "" /* old name for "MSW" flag -- we have to take it for the sake of many old diff --git a/pd/src/notes.txt b/pd/src/notes.txt index 168bd184..ea8ed631 100644 --- a/pd/src/notes.txt +++ b/pd/src/notes.txt @@ -13,6 +13,7 @@ mac: Gnome: why don't windows pop up when clicked on? problems: +find asdf$1 (e.g.) doesn't work check real-time gaps in writesf~ fix declare to update current patch when changed objects on GOP don't erase if you edit the GOP while they're showing diff --git a/pd/src/s_inter.c b/pd/src/s_inter.c index 85a5af30..605981c6 100644 --- a/pd/src/s_inter.c +++ b/pd/src/s_inter.c @@ -1018,6 +1018,74 @@ int sys_startgui(const char *guidir) #ifdef UNISTD + if (!sys_guicmd) + { +#ifdef __APPLE__ + char *homedir = getenv("HOME"), filename[250]; + struct stat statbuf; + /* first look for Wish bundled with and renamed "Pd" */ + sprintf(filename, "%s/../../MacOS/Pd", guidir); + if (stat(filename, &statbuf) >= 0) + goto foundit; + if (!homedir || strlen(homedir) > 150) + goto nohomedir; + /* Look for Wish in user's Applications. Might or might + not be names "Wish Shell", and might or might not be + in "Utilities" subdir. */ + sprintf(filename, + "%s/Applications/Utilities/Wish shell.app/Contents/MacOS/Wish Shell", + homedir); + if (stat(filename, &statbuf) >= 0) + goto foundit; + sprintf(filename, + "%s/Applications/Utilities/Wish.app/Contents/MacOS/Wish", + homedir); + if (stat(filename, &statbuf) >= 0) + goto foundit; + sprintf(filename, + "%s/Applications/Wish shell.app/Contents/MacOS/Wish Shell", + homedir); + if (stat(filename, &statbuf) >= 0) + goto foundit; + sprintf(filename, + "%s/Applications/Wish.app/Contents/MacOS/Wish", + homedir); + if (stat(filename, &statbuf) >= 0) + goto foundit; + nohomedir: + /* Perform the same search among system applications. */ + strcpy(filename, + "/usr/bin/wish"); + if (stat(filename, &statbuf) >= 0) + goto foundit; + strcpy(filename, + "/Applications/Utilities/Wish Shell.app/Contents/MacOS/Wish Shell"); + if (stat(filename, &statbuf) >= 0) + goto foundit; + strcpy(filename, + "/Applications/Utilities/Wish.app/Contents/MacOS/Wish"); + if (stat(filename, &statbuf) >= 0) + goto foundit; + strcpy(filename, + "/Applications/Wish Shell.app/Contents/MacOS/Wish Shell"); + if (stat(filename, &statbuf) >= 0) + goto foundit; + strcpy(filename, + "/Applications/Wish.app/Contents/MacOS/Wish"); + foundit: + sprintf(cmdbuf, "\"%s\" %s/pd.tk %d\n", filename, guidir, portno); +#else + sprintf(cmdbuf, + "TCL_LIBRARY=\"%s/tcl/library\" TK_LIBRARY=\"%s/tk/library\" \ + \"%s/pd-gui\" %d\n", + sys_libdir->s_name, sys_libdir->s_name, guidir, portno); +#endif + sys_guicmd = cmdbuf; + } + + if (sys_verbose) + fprintf(stderr, "%s", sys_guicmd); + childpid = fork(); if (childpid < 0) { @@ -1045,75 +1113,10 @@ int sys_startgui(const char *guidir) } } #endif - if (!sys_guicmd) - { -#ifdef __APPLE__ - char *homedir = getenv("HOME"), filename[250]; - struct stat statbuf; - /* first look for Wish bundled with and renamed "Pd" */ - sprintf(filename, "%s/../../MacOS/Pd", guidir); - if (stat(filename, &statbuf) >= 0) - goto foundit; - if (!homedir || strlen(homedir) > 150) - goto nohomedir; - /* Look for Wish in user's Applications. Might or might - not be names "Wish Shell", and might or might not be - in "Utilities" subdir. */ - sprintf(filename, - "%s/Applications/Utilities/Wish shell.app/Contents/MacOS/Wish Shell", - homedir); - if (stat(filename, &statbuf) >= 0) - goto foundit; - sprintf(filename, - "%s/Applications/Utilities/Wish.app/Contents/MacOS/Wish", - homedir); - if (stat(filename, &statbuf) >= 0) - goto foundit; - sprintf(filename, - "%s/Applications/Wish shell.app/Contents/MacOS/Wish Shell", - homedir); - if (stat(filename, &statbuf) >= 0) - goto foundit; - sprintf(filename, - "%s/Applications/Wish.app/Contents/MacOS/Wish", - homedir); - if (stat(filename, &statbuf) >= 0) - goto foundit; - nohomedir: - /* Perform the same search among system applications. */ - strcpy(filename, - "/usr/bin/wish"); - if (stat(filename, &statbuf) >= 0) - goto foundit; - strcpy(filename, - "/Applications/Utilities/Wish Shell.app/Contents/MacOS/Wish Shell"); - if (stat(filename, &statbuf) >= 0) - goto foundit; - strcpy(filename, - "/Applications/Utilities/Wish.app/Contents/MacOS/Wish"); - if (stat(filename, &statbuf) >= 0) - goto foundit; - strcpy(filename, - "/Applications/Wish Shell.app/Contents/MacOS/Wish Shell"); - if (stat(filename, &statbuf) >= 0) - goto foundit; - strcpy(filename, - "/Applications/Wish.app/Contents/MacOS/Wish"); - foundit: - sprintf(cmdbuf, "\"%s\" %s/pd.tk %d\n", filename, guidir, portno); -#else - sprintf(cmdbuf, -"TCL_LIBRARY=\"%s/tcl/library\" TK_LIBRARY=\"%s/tk/library\" \ - \"%s/pd-gui\" %d\n", - sys_libdir->s_name, sys_libdir->s_name, guidir, portno); -#endif - sys_guicmd = cmdbuf; - } - if (sys_verbose) fprintf(stderr, "%s", sys_guicmd); execl("/bin/sh", "sh", "-c", sys_guicmd, (char*)0); perror("pd: exec"); _exit(1); - } + } #endif /* UNISTD */ #ifdef MSW diff --git a/pd/src/t_tkcmd.c b/pd/src/t_tkcmd.c index c32dc346..bd6ff5a5 100644 --- a/pd/src/t_tkcmd.c +++ b/pd/src/t_tkcmd.c @@ -420,6 +420,7 @@ static void pd_startfromgui( void) #endif #ifdef UNISTD + sprintf(cmdbuf, "\"%s\" -guiport %d\n", pdbuf, portno); childpid = fork(); if (childpid < 0) { @@ -429,7 +430,6 @@ static void pd_startfromgui( void) } else if (!childpid) /* we're the child */ { - sprintf(cmdbuf, "\"%s\" -guiport %d\n", pdbuf, portno); #ifdef DEBUGCONNECT fprintf(debugfd, "%s", cmdbuf); fflush(debugfd); |