-
Notifications
You must be signed in to change notification settings - Fork 91
Building and packaging externals for Android
Thanks to Jan Berkel's patch, building and packaging externals for Pd for Android has become much simpler. Instead of building externals, renaming them according to Pd's naming scheme, packaging them for deployment, and writing code for unpacking and installing them, it is now enough to just build them with the Android build tools.
The latest version of libpd (as of 12/28/2012) includes Jan's patch, which causes Pd to look for the file names that ndk-build produces. That means that the Android tools can now automatically build and package binaries for multiple architectures, and the Android installer will automatically choose the right one for a given devices. The only additional step that's needed is to add the location of the binaries to Pd's search path, but if your project uses PdService, you already get that for free.
Consequently, I have removed a few hacks that only served to support the old, awkward way of deploying externals. This may break existing projects that use their own externals, but I believe the disruption will be minor and worth the payoff. The result is a much cleaner design that everybody will benefit from.
Update from 21.12.2015
For an example of how to use externals in an Android project, check out the JNI folder of the PdTest sample project, especially Android.mk, as well as the build.gradle of that project, to see the changes that you should make to your build file. That's all it takes to include externals; there's no need to do anything on the Java side.