-
Notifications
You must be signed in to change notification settings - Fork 2
How to debug JamomaPuredata on Mac OS X
First you need to clone the JamomaPuredata repository and initialize its submodules. This is the easiest step.
git clone https://github.com/jamoma/JamomaPureData.git
cd JamomaPuredata
git submodule update --init
Then you could use the CMake GUI to configure the project, or use this command line to generate the project :
cmake -G "Xcode" -DCMAKE_INSTALL_PREFIX=${PWD}/JamomaInstall -DFAT_BINARY=ON \
-DPD_MAIN_PATH=/Applications/Pd-0.46-6-64bit.app/Contents/Resources \
/path/to/the/JamomaPuredata/folder
This will generate Xcode project.
Don't forget to setup the CMAKE_INSTALL_PREFIX
to a path you can write to and you know where it is.
And of course adjust the path to your system installation.
Then you could open the project in Xcode and build it.
Prior to debug you have to build the install target which will put all the files needed into the CMAKE_INSTALL_PREFIX/jamoma/JamomaPd/Jamoma
.
You have to symlink this folder into ~/Library/Pd
with :
ln -s CMAKE_INSTALL_PREFIX/jamoma/JamomaPd/Jamoma ~/Library/Pd
of course replace CMAKE_INSTALL_PREFIX
with the value you use in the cmake step.
Then you have to configure Xcode to run Pd in debug mode.
But Xcode can't use the application bundle to debug, you have to point to the pd exececutable in /Applications/Pd-0.46-6-64bit.app/Contents/Resources/bin
folder.
But Xcode browser can't enter into the bundle tree...
So I made a symlink of the Ressources folder in ~/pd
and use it to select the pd executable.
In the Arguments tab, you should add -nrt -noprefs -lib Jamoma
those will be passed to Pd at launch.
On my system, when I run it like this, Pd loads Jamoma from the build directory which is not what I want.
The only workaround I found to avoid that is to move the build folder to /tmp
before starting Pd and restore it after with the pre- and post-actions script.
This is kind of hack, but if you're here, you seems to use Puredata, and thus you should be used to hack things :-)
I hope this will encourage someone to setup a debug environment and help debugging JamomaPuredata on Mac OS.
@avilleret