[PD] Help with OSX App minefield

Jonathan Wilkes jancsika at yahoo.com
Thu Oct 10 04:45:42 CEST 2013


Update-- I've got a working Pd-l2ork, tkpath based App running on
OSX.  (No ppc support, unfortunately.)  Audio is running.

Minefields:
* I cannot for the life of me figure out how to build tkpath using the
Tcl/tk Frameworks (Carbon-based) inside Pd-l2ork.app instead of the
system ones. (Tried both Xcode and command line tools).  Anybody
have hints for that?
* I can't figure out how to build the externals in "extra".  If I do
"make" the linker doesn't find any of the m_pd.h functions, even if
I do the ugly hack of copying m_pd.h to the directory.
* I'm abusing my function for returning the executable path in order
to get Pd to look for doc/ and extra/ inside the App (in addition to
the usual places on the system).  Is there a trick to this?
* key presses/releases sometimes get stuck in one state or the other.
I think there's some simple tcl/tk hack for ignoring autokeys that may
remedy this, but I'm not sure yet.

Best,
Jonathan

On 10/07/2013 04:05 PM, Jonathan Wilkes wrote:
> Hello,
>       I'm hoping some MacOSX gurus can help me traverse this mine-field.
>
> What I'm trying to do:
> Port Pd-l2ork (quick-and-dirty) to MacOSX in the form of a Pd-l2ork.app
>
> Minefields:
> * Pd-l2ork uses tkpath, which is built to work with Carbon and not Cocoa.  So I
> must use tcl/tk Framework that uses Carbon instead of Cocoa.  That should be
> ok because Pd-extended.app is currently set up to use Carbon.
> * Pd-l2ork uses the old pd.tk framework instead of the newer stuff from the gui-rewrite
>
> What I've done so far:
> * updated the configure file successfully
> * made a workaround for statbuf from stat.h not existing on OSX (in s_main.c)
> * made a workaround for RTLD not existing after ./configure and trying to make (s_loader.c)
> * successfully compiled Pd-l2ork
> * checked that tkpath actually works on OSX.  It seems to work, using tcl/tk w/Carbon
> instead of Cocoa.
> * used otool and install_name_tool to change libPdTcl.dylib libraries to point at the
> App's Framework directory instead of system directories
> * changed AppMain.tcl to launch pd.tk instead of pd-gui (which it does successfully)
>
> What crashes so far:
> * inside pd.tk, I'm trying to do this:
>      load $pd_guidir/bin/libPdTcl.dylib
> It finds the dylib fine but then it crashes, with the crash report referencing the first line
> of the following function of t_tkcmd.c in the backtrace:
>
> int Pdtcl_Init(Tcl_Interp *interp)
> {
>      const char *argv = Tcl_GetVar(interp, "argv", 0);
>
> ***
>
> Any ideas where to begin to debug this?  Is there some code I can add to
> Pdtcl_Init to print out some info I can use to tell where it's going wrong?
>
> I put the full error log here:
> http://pastebin.com/duHdRrsY
>
> Any suggestions appreciated.
>
> -Jonathan
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>
>




More information about the Pd-list mailing list