I am preparing an R package that will include a third party compiled executable. The plan is to interface it to R using system() calls. I have permission to distribute this executable, but not its source code. Unfortunately it is only compiled under Windows 32 bit, and it is not possible to easily recompile it under different architectures.
Understanding that this package will have a somewhat limited audience, how should the executable be distributed? I also recognize that it will not be allowed on CRAN for this reason.
For example, should the executable be included in the /bin/ subfolder of the package installation, or alternately should the package somehow download the executable when it is itself installed.
In addition, what licensing issues, if any do I face under this scenario?
The approach suggested by Ben Bolker is also used by the CRAN package "dismo" - to make the function maxent() work, you have to download the maxent java binary and place it into the appropriate subdirectory within the main package folder.
I have worked on two packages that do something like this, both hosted on R-forge because of the CRAN binary restriction (which, by the way, seems perfectly sensible to me). (I don't think you're missing anything obvious in your question -- just saying here what I chose to do.)
cpcbp
package (common principal components/back-projection) uses a binary compiled from code written by Patrick Phillips; the source code is unredistributable because it uses some Numerical Recipes routines. I've been meaning to re-write this core in R (it's just straightforward numerical linear algebra, it wouldn't be that hard). It occurs to me that I probably have to go modify the license on this one -- I probably said "GPL" but I don't think I can actually do that given the unredistributable component ...glmmADMB
package uses freely redistributable source code (BSD license), but the toolchain is sufficiently complicated that I don't want users to have to download the entire supporting packageIn both cases I put the binaries in
inst/bin
and possibly under architecture-specific subdirectories (which get installed in/bin
) and use the appropriate logic to detect the architecture and run the correct binary.I guess in principle you could get around the inability to license via GPL by making the non-redistributable part into a download (as you suggest), but that would seem to violate the spirit ...