[PD] Help with OSX App minefield

Jonathan Wilkes jancsika at yahoo.com
Mon Oct 21 21:59:42 CEST 2013


On 10/21/2013 02:12 PM, Hans-Christoph Steiner wrote:
> Carbon has been deprecated by Apple and might have been removed entirely.  It
> will only ever be 32-bit, and starting in 10.7, everything is 64-bit.
> Anything Carbon is dead, unless you're happy working with 10.6 and older.

I'm running Pd-extended and my Pd-l2ork port on 10.7.5.  Both link
to the Carbon system libraries.  Both run.

An update to the Pd-l2ork port:
* figured out how to build tkpath against the Carbon stuff.  It runs 
fine now.
* got some basic libraries compiled and installed to ship with the app.
(zexy, hcs, cyclone, and a few others).
* currently working on an issue with the Shift key "sticking"-- that is, 
if I
do <Shift-RightArrow> to move an object by 10 pixels, when I release
Shift and then do <RightArrow> it continues moving the object by
10 pixels instead of 1 pixel.  Once I fix that it should be usable.

Best,
Jonathan

>
> .hc
>
> On 10/09/2013 10:45 PM, Jonathan Wilkes wrote:
>> 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
>>>
>>>
>>
>> _______________________________________________
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> _______________________________________________
> 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